vendor: 6,644 bytes, lines 1-17
1var Dxe=Object.defineProperty;var Ixe=(e,t,n)=>t in e?Dxe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var W8=(e,t,n)=>Ixe(e,typeof t!="symbol"?t+"":t,n);function Lxe(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Rx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $xe(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var G8={exports:{}},xg={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var FF;function zxe(){if(FF)return xg;FF=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var s=null;if(o!==void 0&&(s=""+o),i.key!==void 0&&(s=""+i.key),"key"in i){o={};for(var a in i)a!=="key"&&(o[a]=i[a])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:s,ref:i!==void 0?i:null,props:o}}return xg.Fragment=t,xg.jsx=n,xg.jsxs=n,xg}var BF;function Fxe(){return BF||(BF=1,G8.exports=zxe()),G8.exports}var u=Fxe(),K8={exports:{}},gt={};/** 10 * @license React 11 * react.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var HF;function Bxe(){if(HF)return gt;HF=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function p(U){return U===null||typeof U!="object"?null:(U=f&&U[f]||U["@@iterator"],typeof U=="function"?U:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function b(U,W,G){this.props=U,this.context=W,this.refs=v,this.updater=G||m}b.prototype.isReactComponent={},b.prototype.setState=function(U,W){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,W,"setState")},b.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function C(){}C.prototype=b.prototype;function S(U,W,G){this.props=U,this.context=W,this.refs=v,this.updater=G||m}var E=S.prototype=new C;E.constructor=S,y(E,b.prototype),E.isPureReactComponent=!0;var A=Array.isArray,_={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function j(U,W,G,Y,X,Q){return G=Q.ref,{$$typeof:e,type:U,key:W,ref:G!==void 0?G:null,props:Q}}function T(U,W){return j(U.type,W,void 0,void 0,void 0,U.props)}function O(U){return typeof U=="object"&&U!==null&&U.$$typeof===e}function D(U){var W={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(G){return W[G]})}var R=/\/+/g;function I(U,W){return typeof U=="object"&&U!==null&&U.key!=null?D(""+U.key):W.toString(36)}function F(){}function $(U){switch(U.status){case"fulfilled":return U.value;case"rejected":throw U.reason;default:switch(typeof U.status=="string"?U.then(F,F):(U.status="pending",U.then(function(W){U.status==="pending"&&(U.status="fulfilled",U.value=W)},function(W){U.status==="pending"&&(U.status="rejected",U.reason=W)})),U.status){case"fulfilled":return U.value;case"rejected":throw U.reason}}throw U}function H(U,W,G,Y,X){var Q=typeof U;(Q==="undefined"||Q==="boolean")&&(U=null);var ne=!1;if(U===null)ne=!0;else switch(Q){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(U.$$typeof){case e:case t:ne=!0;break;case d:return ne=U._init,H(ne(U._payload),W,G,Y,X)}}if(ne)return X=X(U),ne=Y===""?"."+I(U,0):Y,A(X)?(G="",ne!=null&&(G=ne.replace(R,"$&/")+"/"),H(X,W,G,"",function(oe){return oe})):X!=null&&(O(X)&&(X=T(X,G+(X.key==null||U&&U.key===X.key?"":(""+X.key).replace(R,"$&/")+"/")+ne)),W.push(X)),1;ne=0;var ie=Y===""?".":Y+":";if(A(U))for(var se=0;se<U.length;se++)Y=U[se],Q=ie+I(Y,se),ne+=H(Y,W,G,Q,X);else if(se=p(U),typeof se=="function")for(U=se.call(U),se=0;!(Y=U.next()).done;)Y=Y.value,Q=ie+I(Y,se++),ne+=H(Y,W,G,Q,X);else if(Q==="object"){if(typeof U.then=="function")return H($(U),W,G,Y,X);throw W=String(U),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return ne}function L(U,W,G){if(U==null)return U;var Y=[],X=0;return H(U,Y,"","",function(Q){return W.call(G,Q,X++)}),Y}function B(U){if(U._status===-1){var W=U._result;W=W(),W.then(function(G){(U._status===0||U._status===-1)&&(U._status=1,U._result=G)},function(G){(U._status===0||U._status===-1)&&(U._status=2,U._result=G)}),U._status===-1&&(U._status=0,U._result=W)}if(U._status===1)return U._result.default;throw U._result}
vendor: 6,799 bytes, lines 17-25
17var z=typeof reportError=="function"?reportError:function(U){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof U=="object"&&U!==null&&typeof U.message=="string"?String(U.message):String(U),error:U});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",U);return}console.error(U)};function V(){}return gt.Children={map:L,forEach:function(U,W,G){L(U,function(){W.apply(this,arguments)},G)},count:function(U){var W=0;return L(U,function(){W++}),W},toArray:function(U){return L(U,function(W){return W})||[]},only:function(U){if(!O(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},gt.Component=b,gt.Fragment=n,gt.Profiler=i,gt.PureComponent=S,gt.StrictMode=r,gt.Suspense=l,gt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,gt.act=function(){throw Error("act(...) is not supported in production builds of React.")},gt.cache=function(U){return function(){return U.apply(null,arguments)}},gt.cloneElement=function(U,W,G){if(U==null)throw Error("The argument must be a React element, but you passed "+U+".");var Y=y({},U.props),X=U.key,Q=void 0;if(W!=null)for(ne in W.ref!==void 0&&(Q=void 0),W.key!==void 0&&(X=""+W.key),W)!N.call(W,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&W.ref===void 0||(Y[ne]=W[ne]);var ne=arguments.length-2;if(ne===1)Y.children=G;else if(1<ne){for(var ie=Array(ne),se=0;se<ne;se++)ie[se]=arguments[se+2];Y.children=ie}return j(U.type,X,void 0,void 0,Q,Y)},gt.createContext=function(U){return U={$$typeof:s,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null},U.Provider=U,U.Consumer={$$typeof:o,_context:U},U},gt.createElement=function(U,W,G){var Y,X={},Q=null;if(W!=null)for(Y in W.key!==void 0&&(Q=""+W.key),W)N.call(W,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(X[Y]=W[Y]);var ne=arguments.length-2;if(ne===1)X.children=G;else if(1<ne){for(var ie=Array(ne),se=0;se<ne;se++)ie[se]=arguments[se+2];X.children=ie}if(U&&U.defaultProps)for(Y in ne=U.defaultProps,ne)X[Y]===void 0&&(X[Y]=ne[Y]);return j(U,Q,void 0,void 0,null,X)},gt.createRef=function(){return{current:null}},gt.forwardRef=function(U){return{$$typeof:a,render:U}},gt.isValidElement=O,gt.lazy=function(U){return{$$typeof:d,_payload:{_status:-1,_result:U},_init:B}},gt.memo=function(U,W){return{$$typeof:c,type:U,compare:W===void 0?null:W}},gt.startTransition=function(U){var W=_.T,G={};_.T=G;try{var Y=U(),X=_.S;X!==null&&X(G,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(V,z)}catch(Q){z(Q)}finally{_.T=W}},gt.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},gt.use=function(U){return _.H.use(U)},gt.useActionState=function(U,W,G){return _.H.useActionState(U,W,G)},gt.useCallback=function(U,W){return _.H.useCallback(U,W)},gt.useContext=function(U){return _.H.useContext(U)},gt.useDebugValue=function(){},gt.useDeferredValue=function(U,W){return _.H.useDeferredValue(U,W)},gt.useEffect=function(U,W){return _.H.useEffect(U,W)},gt.useId=function(){return _.H.useId()},gt.useImperativeHandle=function(U,W,G){return _.H.useImperativeHandle(U,W,G)},gt.useInsertionEffect=function(U,W){return _.H.useInsertionEffect(U,W)},gt.useLayoutEffect=function(U,W){return _.H.useLayoutEffect(U,W)},gt.useMemo=function(U,W){return _.H.useMemo(U,W)},gt.useOptimistic=function(U,W){return _.H.useOptimistic(U,W)},gt.useReducer=function(U,W,G){return _.H.useReducer(U,W,G)},gt.useRef=function(U){return _.H.useRef(U)},gt.useState=function(U){return _.H.useState(U)},gt.useSyncExternalStore=function(U,W,G){return _.H.useSyncExternalStore(U,W,G)},gt.useTransition=function(){return _.H.useTransition()},gt.version="19.0.0",gt}var VF;function pd(){return VF||(VF=1,K8.exports=Bxe()),K8.exports}var x=pd();const K=Ht(x),xi=Lxe({__proto__:null,default:K},[x]);var Y8={exports:{}},wg={},X8={exports:{}},Z8={};/** 18 * @license React 19 * scheduler.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var UF;function Hxe(){return UF||(UF=1,function(e){function t(L,B){var z=L.length;L.push(B);e:for(;0<z;){var V=z-1>>>1,U=L[V];if(0<i(U,B))L[V]=B,L[z]=U,z=V;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var B=L[0],z=L.pop();if(z!==B){L[0]=z;e:for(var V=0,U=L.length,W=U>>>1;V<W;){var G=2*(V+1)-1,Y=L[G],X=G+1,Q=L[X];if(0>i(Y,z))X<U&&0>i(Q,Y)?(L[V]=Q,L[X]=z,V=X):(L[V]=Y,L[G]=z,V=G);else if(X<U&&0>i(Q,z))L[V]=Q,L[X]=z,V=X;else break e}}return B}function i(L,B){var z=L.sortIndex-B.sortIndex;return z!==0?z:L.id-B.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],c=[],d=1,f=null,p=3,m=!1,y=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function E(L){for(var B=n(c);B!==null;){if(B.callback===null)r(c);else if(B.startTime<=L)r(c),B.sortIndex=B.expirationTime,t(l,B);else break;B=n(c)}}function A(L){if(v=!1,E(L),!y)if(n(l)!==null)y=!0,$();else{var B=n(c);B!==null&&H(A,B.startTime-L)}}var _=!1,N=-1,j=5,T=-1;function O(){return!(e.unstable_now()-T<j)}function D(){if(_){var L=e.unstable_now();T=L;var B=!0;try{e:{y=!1,v&&(v=!1,C(N),N=-1),m=!0;var z=p;try{t:{for(E(L),f=n(l);f!==null&&!(f.expirationTime>L&&O());){var V=f.callback;if(typeof V=="function"){f.callback=null,p=f.priorityLevel;var U=V(f.expirationTime<=L);if(L=e.unstable_now(),typeof U=="function"){f.callback=U,E(L),B=!0;break t}f===n(l)&&r(l),E(L)}else r(l);f=n(l)}if(f!==null)B=!0;else{var W=n(c);W!==null&&H(A,W.startTime-L),B=!1}}break e}finally{f=null,p=z,m=!1}B=void 0}}finally{B?R():_=!1}}}var R;if(typeof S=="function")R=function(){S(D)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,F=I.port2;I.port1.onmessage=D,R=function(){F.postMessage(null)}}else R=function(){b(D,0)};function $(){_||(_=!0,R())}function H(L,B){N=b(function(){L(e.unstable_now())},B)}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(L){L.callback=null},e.unstable_continueExecution=function(){y||m||(y=!0,$())},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<L?Math.floor(1e3/L):
vendor: 4,254 bytes, lines 25-33
255},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(L){switch(p){case 1:case 2:case 3:var B=3;break;default:B=p}var z=p;p=B;try{return L()}finally{p=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,B){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var z=p;p=L;try{return B()}finally{p=z}},e.unstable_scheduleCallback=function(L,B,z){var V=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?V+z:V):z=V,L){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=z+U,L={id:d++,callback:B,priorityLevel:L,startTime:z,expirationTime:U,sortIndex:-1},z>V?(L.sortIndex=z,t(c,L),n(l)===null&&L===n(c)&&(v?(C(N),N=-1):v=!0,H(A,z-V))):(L.sortIndex=U,t(l,L),y||m||(y=!0,$())),L},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(L){var B=p;return function(){var z=p;p=B;try{return L.apply(this,arguments)}finally{p=z}}}}(Z8)),Z8}var qF;function Vxe(){return qF||(qF=1,X8.exports=Hxe()),X8.exports}var Q8={exports:{}},ci={};/** 26 * @license React 27 * react-dom.production.js 28 * 29 * Copyright (c) Meta Platforms, Inc. and affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var WF;function Uxe(){if(WF)return ci;WF=1;var e=pd();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(l,c,d){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:f==null?null:""+f,children:l,containerInfo:c,implementation:d}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return ci.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ci.createPortal=function(l,c){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return o(l,c,null,d)},ci.flushSync=function(l){var c=s.T,d=r.p;try{if(s.T=null,r.p=2,l)return l()}finally{s.T=c,r.p=d,r.d.f()}},ci.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,r.d.C(l,c))},ci.prefetchDNS=function(l){typeof l=="string"&&r.d.D(l)},ci.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var d=c.as,f=a(d,c.crossOrigin),p=typeof c.integrity=="string"?c.integrity:void 0,m=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;d==="style"?r.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:f,integrity:p,fetchPriority:m}):d==="script"&&r.d.X(l,{crossOrigin:f,integrity:p,fetchPriority:m,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},ci.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var d=a(c.as,c.crossOrigin);r.d.M(l,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&r.d.M(l)},ci.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var d=c.as,f=a(d,c.crossOrigin);r.d.L(l,d,{crossOrigin:f,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}}
vendor: 23,394 bytes, lines 33-48
33,ci.preloadModule=function(l,c){if(typeof l=="string")if(c){var d=a(c.as,c.crossOrigin);r.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else r.d.m(l)},ci.requestFormReset=function(l){r.d.r(l)},ci.unstable_batchedUpdates=function(l,c){return l(c)},ci.useFormState=function(l,c,d){return s.H.useFormState(l,c,d)},ci.useFormStatus=function(){return s.H.useHostTransitionStatus()},ci.version="19.0.0",ci}var GF;function Jee(){if(GF)return Q8.exports;GF=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Q8.exports=Uxe(),Q8.exports}/** 34 * @license React 35 * react-dom-client.production.js 36 * 37 * Copyright (c) Meta Platforms, Inc. and affiliates. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE file in the root directory of this source tree. 41 */var KF;function qxe(){if(KF)return wg;KF=1;var e=Vxe(),t=pd(),n=Jee();function r(h){var g="https://react.dev/errors/"+h;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var w=2;w<arguments.length;w++)g+="&args[]="+encodeURIComponent(arguments[w])}return"Minified React error #"+h+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}var o=Symbol.for("react.element"),s=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),A=Symbol.for("react.memo_cache_sentinel"),_=Symbol.iterator;function N(h){return h===null||typeof h!="object"?null:(h=_&&h[_]||h["@@iterator"],typeof h=="function"?h:null)}var j=Symbol.for("react.client.reference");function T(h){if(h==null)return null;if(typeof h=="function")return h.$$typeof===j?null:h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case l:return"Fragment";case a:return"Portal";case d:return"Profiler";case c:return"StrictMode";case v:return"Suspense";case b:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case m:return(h.displayName||"Context")+".Provider";case p:return(h._context.displayName||"Context")+".Consumer";case y:var g=h.render;return h=h.displayName,h||(h=g.displayName||g.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case C:return g=h.displayName||null,g!==null?g:T(h.type)||"Memo";case S:g=h._payload,h=h._init;try{return T(h(g))}catch{}}return null}var O=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.assign,R,I;function F(h){if(R===void 0)try{throw Error()}catch(w){var g=w.stack.trim().match(/\n( *(at )?)/);R=g&&g[1]||"",I=-1<w.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<w.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+R+h+I}var $=!1;function H(h,g){if(!h||$)return"";$=!0;var w=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var k={DetermineComponentFrameRoot:function(){try{if(g){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ge){var he=ge}Reflect.construct(h,[],Ee)}else{try{Ee.call()}catch(ge){he=ge}h.call(Ee.prototype)}}else{try{throw Error()}catch(ge){he=ge}(Ee=h())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ge){if(ge&&he&&typeof ge.stack=="string")return[ge.stack,he.stack]}return[null,null]}};k.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var M=Object.getOwnPropertyDescriptor(k.DetermineComponentFrameRoot,"name");M&&M.configurable&&Object.defineProperty(k.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var P=k.DetermineComponentFrameRoot(),q=P[0],Z=P[1];if(q&&Z){var te=q.split(` 44`),ce=Z.split(` 45`);for(M=k=0;k<te.length&&!te[k].includes("DetermineComponentFrameRoot");)k++;for(;M<ce.length&&!ce[M].includes("DetermineComponentFrameRoot");)M++;if(k===te.length||M===ce.length)for(k=te.length-1,M=ce.length-1;1<=k&&0<=M&&te[k]!==ce[M];)M--;for(;1<=k&&0<=M;k--,M--)if(te[k]!==ce[M]){if(k!==1||M!==1)do if(k--,M--,0>M||te[k]!==ce[M]){var ve=` 46`+te[k].replace(" at new "," at ");return h.displayName&&ve.includes("<anonymous>")&&(ve=ve.replace("<anonymous>",h.displayName)),ve}while(1<=k&&0<=M);break}}}finally{$=!1,Error.prepareStackTrace=w}return(w=h?h.displayName||h.name:"")?F(w):""}function L(h){switch(h.tag){case 26:case 27:case 5:return F(h.type);case 16:return F("Lazy");case 13:return F("Suspense");case 19:return F("SuspenseList");case 0:case 15:return h=H(h.type,!1),h;case 11:return h=H(h.type.render,!1),h;case 1:return h=H(h.type,!0),h;default:return""}}function B(h){try{var g="";do g+=L(h),h=h.return;while(h);return g}catch(w){return` 47Error generating stack: `+w.message+` 48`+w.stack}}function z(h){var g=h,w=h;if(h.alternate)for(;g.return;)g=g.return;else{h=g;do g=h,(g.flags&4098)!==0&&(w=g.return),h=g.return;while(h)}return g.tag===3?w:null}function V(h){if(h.tag===13){var g=h.memoizedState;if(g===null&&(h=h.alternate,h!==null&&(g=h.memoizedState)),g!==null)return g.dehydrated}return null}function U(h){if(z(h)!==h)throw Error(r(188))}function W(h){var g=h.alternate;if(!g){if(g=z(h),g===null)throw Error(r(188));return g!==h?null:h}for(var w=h,k=g;;){var M=w.return;if(M===null)break;var P=M.alternate;if(P===null){if(k=M.return,k!==null){w=k;continue}break}if(M.child===P.child){for(P=M.child;P;){if(P===w)return U(M),h;if(P===k)return U(M),g;P=P.sibling}throw Error(r(188))}if(w.return!==k.return)w=M,k=P;else{for(var q=!1,Z=M.child;Z;){if(Z===w){q=!0,w=M,k=P;break}if(Z===k){q=!0,k=M,w=P;break}Z=Z.sibling}if(!q){for(Z=P.child;Z;){if(Z===w){q=!0,w=P,k=M;break}if(Z===k){q=!0,k=P,w=M;break}Z=Z.sibling}if(!q)throw Error(r(189))}}if(w.alternate!==k)throw Error(r(190))}if(w.tag!==3)throw Error(r(188));return w.stateNode.current===w?h:g}function G(h){var g=h.tag;if(g===5||g===26||g===27||g===6)return h;for(h=h.child;h!==null;){if(g=G(h),g!==null)return g;h=h.sibling}return null}var Y=Array.isArray,X=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},ne=[],ie=-1;function se(h){return{current:h}}function oe(h){0>ie||(h.current=ne[ie],ne[ie]=null,ie--)}function J(h,g){ie++,ne[ie]=h.current,h.current=g}var ae=se(null),re=se(null),pe=se(null),be=se(null);function xe(h,g){switch(J(pe,g),J(re,h),J(ae,null),h=g.nodeType,h){case 9:case 11:g=(g=g.documentElement)&&(g=g.namespaceURI)?mF(g):0;break;default:if(h=h===8?g.parentNode:g,g=h.tagName,h=h.namespaceURI)h=mF(h),g=gF(h,g);else switch(g){case"svg":g=1;break;case"math":g=2;break;default:g=0}}oe(ae),J(ae,g)}function ke(){oe(ae),oe(re),oe(pe)}function Pe(h){h.memoizedState!==null&&J(be,h);var g=ae.current,w=gF(g,h.type);g!==w&&(J(re,h),J(ae,w))}function it(h){re.current===h&&(oe(ae),oe(re)),be.current===h&&(oe(be),mg._currentValue=Q)}var qe=Object.prototype.hasOwnProperty,$n=e.unstable_scheduleCallback,Vt=e.unstable_cancelCallback,ee=e.unstable_shouldYield,ue=e.unstable_requestPaint,me=e.unstable_now,je=e.unstable_getCurrentPriorityLevel,Ae=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,Oe=e.unstable_NormalPriority,dt=e.unstable_LowPriority,vt=e.unstable_IdlePriority,Kt=e.log,Or=e.unstable_setDisableYieldValue,wr=null,en=null;function Rr(h){if(en&&typeof en.onCommitFiberRoot=="function")try{en.onCommitFiberRoot(wr,h,void 0,(h.current.flags&128)===128)}catch{}}function tr(h){if(typeof Kt=="function"&&Or(h),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(wr,h)}catch{}}var De=Math.clz32?Math.clz32:Po,Yt=Math.log,Xt=Math.LN2;function Po(h){return h>>>=0,h===0?32:31-(Yt(h)/Xt|0)|0}var ma=128,bs=4194304;function Fi(h){var g=h&42;if(g!==0)return g;switch(h&-h){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:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return h&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return h}}function ot(h,g){var w=h.pendingLanes;if(w===0)return 0;var k=0,M=h.suspendedLanes,P=h.pingedLanes,q=h.warmLanes;h=h.finishedLanes!==0;var Z=w&134217727;return Z!==0?(w=Z&~M,w!==0?k=Fi(w):(P&=Z,P!==0?k=Fi(P):h||(q=Z&~q,q!==0&&(k=Fi(q))))):(Z=w&~M,Z!==0?k=Fi(Z):P!==0?k=Fi(P):h||(q=w&~q,q!==0&&(k=Fi(q)))),k===0?0:g!==0&&g!==k&&(g&M)===0&&(M=k&-k,q=g&-g,M>=q||M===32&&(q&4194176)!==0)?g:k}function un(h,g){return(h.pendingLanes&~(h.suspendedLanes&~h.pingedLanes)&g)===0}function Un(h,g){switch(h){case 1:case 2:case 4:case 8:return g+250;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 g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ir(){var h=ma;return ma<<=1,(ma&4194176)===0&&(ma=128),h}function Se(){var h=bs;return bs<<=1,(bs&62914560)===0&&(bs=4194304),h}function Te(h){for(var g=[],w=0;31>w;w++)g.push(h);return g}function Le(h,g){h.pendingLanes|=g,g!==268435456&&(h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0)}function tt(h,g,w,k,M,P){var q=h.pendingLanes;h.pendingLanes=w,h.suspendedLanes=0,h.pingedLanes=0,h.warmLanes=0,h.expiredLanes&=w,h.entangledLanes&=w,h.errorRecoveryDisabledLanes&=w,h.shellSuspendCounter=0;var Z=h.entanglements,te=h.expirationTimes,ce=h.hiddenUpdates;for(w=q&~w;0<w;){var ve=31-De(w),Ee=1<<ve;Z[ve]=0,te[ve]=-1;var he=ce[ve];if(he!==null)for(ce[ve]=null,ve=0;ve<he.length;ve++){var ge=he[ve];ge!==null&&(ge.lane&=-536870913)}w&=~Ee}k!==0&&ut(h,k,0),P!==0&&M===0&&h.tag!==0&&(h.suspendedLanes|=P&~(q&~g))}function ut(h,g,w){h.pendingLanes|=g,h.suspendedLanes&=~g;var k=31-De(g);h.entangledLanes|=g,h.entanglements[k]=h.entanglements[k]|1073741824|w&4194218}function Tt(h,g){var w=h.entangledLanes|=g;for(h=h.entanglements;w;){var k=31-De(w),M=1<<k;M&g|h[k]&g&&(h[k]|=g),w&=~M}}function Zt(h){return h&=-h,2<h?8<h?(h&134217727)!==0?32:268435456:8:2}function st(){var h=X.p;return h!==0?h:(h=window.event,h===void 0?32:PF(h.type))}function ln(h,g){var w=X.p;try{return X.p=h,g()}finally{X.p=w}}var Pr=Math.random().toString(36).slice(2),kn="__reactFiber$"+Pr,zn="__reactProps$"+Pr,xs="__reactContainer$"+Pr,Do="__reactEvents$"+Pr,ws="__reactListeners$"+Pr,Ch="__reactHandles$"+Pr,Sb="__reactResources$"+Pr,Od="__reactMarker$"+Pr;function _m(h){delete h[kn],delete h[zn],delete h[Do],delete h[ws],delete h[Ch]}function ul(h){var g=h[kn];if(g)return g;for(var w=h.parentNode;w;){if(g=w[xs]||w[kn]){if(w=g.alternate,g.child!==null||w!==null&&w.child!==null)for(h=bF(h);h!==null;){if(w=h[kn])return w;h=bF(h)}return g}h=w,w=h.parentNode}return null}function Dc(h){if(h=h[kn]||h[xs]){var g=h.tag;if(g===5||g===6||g===13||g===26||g===27||g===3)return h}return null}function Rd(h){var g=h.tag;if(g===5||g===26||g===27||g===6)return h.stateNode;throw Error(r(33))}function dl(h){var g=h[Sb];return g||(g=h[Sb]={hoistableStyles:new Map,hoistableScripts:new Map}),g}function or(h){h[Od]=!0}var Eb=new Set,kb={};function fl(h,g){Ic(h,g),Ic(h+"Capture",g)}function Ic(h,g){for(kb[h]=g,h=0;h<g.length;h++)Eb.add(g[h])}var Cs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),HS=RegExp("^[: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]*$"),Am={},_b={};function VS(h){return qe.call(_b,h)?!0:qe.call(Am,h)?!1:HS.test(h)?_b[h]=!0:(Am[h]=!0,!1)}function Sh(h,g,w){if(VS(g))if(w===null)h.removeAttribute(g);else{switch(typeof w){case"undefined":case"function":case"symbol":h.removeAttribute(g);return;case"boolean":var k=g.toLowerCase().slice(0,5);if(k!=="data-"&&k!=="aria-"){h.removeAttribute(g);return}}h.setAttribute(g,""+w)}}function Eh(h,g,w){if(w===null)h.removeAttribute(g);else{switch(typeof w){case"undefined":case"function":case"symbol":case"boolean":h.removeAttribute(g);return}h.setAttribute(g,""+w)}}function Ss(h,g,w,k){if(k===null)h.removeAttribute(w);else{switch(typeof k){case"undefined":case"function":case"symbol":case"boolean":h.removeAttribute(w);return}h.setAttributeNS(g,w,""+k)}}function Bi(h){switch(typeof h){case"bigint":case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function Ab(h){var g=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function US(h){var g=Ab(h)?"checked":"value",w=Object.getOwnPropertyDescriptor(h.constructor.prototype,g),k=""+h[g];if(!h.hasOwnProperty(g)&&typeof w<"u"&&typeof w.get=="function"&&typeof w.set=="function"){var M=w.get,P=w.set;return Object.defineProperty(h,g,{configurable:!0,get:function(){return M.call(this)},set:function(q){k=""+q,P.call(this,q)}}),Object.defineProperty(h,g,{enumerable:w.enumerable}),{getValue:function(){return k},setValue:function(q){k=""+q},stopTracking:function(){h._valueTracker=null,delete h[g]}}}}function hl(h){h._valueTracker||(h._valueTracker=US(h))}function Nb(h){if(!h)return!1;var g=h._valueTracker;if(!g)return!0;var w=g.getValue(),k="";return h&&(k=Ab(h)?h.checked?"true":"false":h.value),h=k,h!==w?(g.setValue(h),!0):!1}function Pd(h){if(h=h||(typeof document<"u"?document:void 0),typeof h>"u")return null;try{return h.activeElement||h.body}catch{return h.body}}var qS=/[\n"\\]/g;function Hi(h){return h.replace(qS,function(g){return"\\"+g.charCodeAt(0).toString(16)+" "})}function Dd(h,g,w,k,M,P,q,Z){h.name="",q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"?h.type=q:h.removeAttribute("type"),g!=null?q==="number"?(g===0&&h.value===""||h.value!=g)&&(h.value=""+Bi(g)):h.value!==""+Bi(g)&&(h.value=""+Bi(g)):q!=="submit"&&q!=="reset"||h.removeAttribute("value"),g!=null?Nm(h,q,Bi(g)):w!=null?Nm(h,q,Bi(w)):k!=null&&h.removeAttribute("value"),M==null&&P!=null&&(h.defaultChecked=!!P),M!=null&&(h.checked=M&&typeof M!="function"&&typeof M!="symbol"),Z!=null&&typeof Z!="function"&&typeof Z!="symbol"&&typeof Z!="boolean"?h.name=""+Bi(Z):h.removeAttribute("name")}function jb(h,g,w,k,M,P,q,Z){if(P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(h.type=P),g!=null||w!=null){if(!(P!=="submit"&&P!=="reset"||g!=null))return;w=w!=null?""+Bi(w):"",g=g!=null?""+Bi(g):w,Z||g===h.value||(h.value=g),h.defaultValue=g}k=k??M,k=typeof k!="function"&&typeof k!="symbol"&&!!k,h.checked=Z?h.checked:!!k,h.defaultChecked=!!k,q!=null&&typeof q!="function"&&typeof q!="symbol"&&typeof q!="boolean"&&(h.name=q)}function Nm(h,g,w){g==="number"&&Pd(h.ownerDocument)===h||h.defaultValue===""+w||(h.defaultValue=""+w)}function pl(h,g,w,k){if(h=h.options,g){g={};for(var M=0;M<w.length;M++)g["$"+w[M]]=!0;for(w=0;w<h.length;w++)M=g.hasOwnProperty("$"+h[w].value),h[w].selected!==M&&(h[w].selected=M),M&&k&&(h[w].defaultSelected=!0)}else{for(w=""+Bi(w),g=null,M=0;M<h.length;M++){if(h[M].value===w){h[M].selected=!0,k&&(h[M].defaultSelected=!0);return}g!==null||h[M].disabled||(g=h[M])}g!==null&&(g.selected=!0)}}function wL(h,g,w){if(g!=null&&(g=""+Bi(g),g!==h.value&&(h.value=g),w==null)){h.defaultValue!==g&&(h.defaultValue=g);return}h.defaultValue=w!=null?""+Bi(w):""}function CL(h,g,w,k){if(g==null){if(k!=null){if(w!=null)throw Error(r(92));if(Y(k)){if(1<k.length)throw Error(r(93));k=k[0]}w=k}w==null&&(w=""),g=w}w=Bi(g),h.defaultValue=w,k=h.textContent,k===w&&k!==""&&k!==null&&(h.value=k)}function kh(h,g){if(g){var w=h.firstChild;if(w&&w===h.lastChild&&w.nodeType===3){w.nodeValue=g;return}}h.textContent=g}var Ove=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function SL(h,g,w){var k=g.indexOf("--")===0;w==null||typeof w=="boolean"||w===""?k?h.setProperty(g,""):g==="float"?h.cssFloat="":h[g]="":k?h.setProperty(g,w):typeof w!="number"||w===0||Ove.has(g)?g==="float"?h.cssFloat=w:h[g]=(""+w).trim():h[g]=w+"px"}function EL(h,g,w){if(g!=null&&typeof g!="object")throw Error(r(62));if(h=h.style,w!=null){for(var k in w)!w.hasOwnProperty(k)||g!=null&&g.hasOwnProperty(k)||(k.indexOf("--")===0?h.setProperty(k,""):k==="float"?h.cssFloat="":h[k]="");for(var M in g)k=g[M],g.hasOwnProperty(M)&&w[M]!==k&&SL(h,M,k)}else for(var P in g)g.hasOwnProperty(P)&&SL(h,P,g[P])}function WS(h){if(h.indexOf("-")===-1)return!1;switch(h){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 Rve=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Pve=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Tb(h){return Pve.test(""+h)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":h}var GS=null;function KS(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var _h=null,Ah=null;function kL(h){var g=Dc(h);if(g&&(h=g.stateNode)){var w=h[zn]||null;e:switch(h=g.stateNode,g.type){case"input":if(Dd(h,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name),g=w.name,w.type==="radio"&&g!=null){for(w=h;w.parentNode;)w=w.parentNode;for(w=w.querySelectorAll('input[name="'+Hi(""+g)+'"][type="radio"]'),g=0;g<w.length;g++){var k=w[g];if(k!==h&&k.form===h.form){var M=k[zn]||null;if(!M)throw Error(r(90));Dd(k,M.value,M.defaultValue,M.defaultValue,M.checked,M.defaultChecked,M.type,M.name)}}for(g=0;g<w.length;g++)k=w[g],k.form===h.form&&Nb(k)}break e;case"textarea":wL(h,w.value,w.defaultValue);break e;case"select":g=w.value,g!=null&&pl(h,!!w.multiple,g,!1)}}}var YS=!1;function _L(h,g,w){if(YS)return h(g,w);YS=!0;try{var k=h(g);return k}finally{if(YS=!1,(_h!==null||Ah!==null)&&(hx(),_h&&(g=_h,h=Ah,Ah=_h=null,kL(g),h)))for(g=0;g<h.length;g++)kL(h[g])}}function jm(h,g){var w=h.stateNode;if(w===null)return null;var k=w[zn]||null;if(k===null)return null;w=k[g];e:switch(g){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(k=!k.disabled)||(h=h.type,k=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!k;break e;default:h=!1}if(h)return null;if(w&&typeof w!="function")throw Error(r(231,g,typeof w));return w}var XS=!1;if(Cs)try{var Tm={};Object.defineProperty(Tm,"passive",{get:function(){XS=!0}}),window.addEventListener("test",Tm,Tm),window.removeEventListener("test",Tm,Tm)}catch{XS=!1}var Lc=null,ZS=null,Mb=null;function AL(){if(Mb)return Mb;var h,g=ZS,w=g.length,k,M="value"in Lc?Lc.value:Lc.textContent,P=M.length;for(h=0;h<w&&g[h]===M[h];h++);var q=w-h;for(k=1;k<=q&&g[w-k]===M[P-k];k++);return Mb=M.slice(h,1<k?1-k:void 0)}function Ob(h){var g=h.keyCode;
vendor: 5,278 bytes, line 48
48return"charCode"in h?(h=h.charCode,h===0&&g===13&&(h=13)):h=g,h===10&&(h=13),32<=h||h===13?h:0}function Rb(){return!0}function NL(){return!1}function Vi(h){function g(w,k,M,P,q){this._reactName=w,this._targetInst=M,this.type=k,this.nativeEvent=P,this.target=q,this.currentTarget=null;for(var Z in h)h.hasOwnProperty(Z)&&(w=h[Z],this[Z]=w?w(P):P[Z]);return this.isDefaultPrevented=(P.defaultPrevented!=null?P.defaultPrevented:P.returnValue===!1)?Rb:NL,this.isPropagationStopped=NL,this}return D(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var w=this.nativeEvent;w&&(w.preventDefault?w.preventDefault():typeof w.returnValue!="unknown"&&(w.returnValue=!1),this.isDefaultPrevented=Rb)},stopPropagation:function(){var w=this.nativeEvent;w&&(w.stopPropagation?w.stopPropagation():typeof w.cancelBubble!="unknown"&&(w.cancelBubble=!0),this.isPropagationStopped=Rb)},persist:function(){},isPersistent:Rb}),g}var Id={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pb=Vi(Id),Mm=D({},Id,{view:0,detail:0}),Dve=Vi(Mm),QS,JS,Om,Db=D({},Mm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:t6,button:0,buttons:0,relatedTarget:function(h){return h.relatedTarget===void 0?h.fromElement===h.srcElement?h.toElement:h.fromElement:h.relatedTarget},movementX:function(h){return"movementX"in h?h.movementX:(h!==Om&&(Om&&h.type==="mousemove"?(QS=h.screenX-Om.screenX,JS=h.screenY-Om.screenY):JS=QS=0,Om=h),QS)},movementY:function(h){return"movementY"in h?h.movementY:JS}}),jL=Vi(Db),Ive=D({},Db,{dataTransfer:0}),Lve=Vi(Ive),$ve=D({},Mm,{relatedTarget:0}),e6=Vi($ve),zve=D({},Id,{animationName:0,elapsedTime:0,pseudoElement:0}),Fve=Vi(zve),Bve=D({},Id,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),Hve=Vi(Bve),Vve=D({},Id,{data:0}),TL=Vi(Vve),Uve={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qve={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"},Wve={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gve(h){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(h):(h=Wve[h])?!!g[h]:!1}function t6(){return Gve}var Kve=D({},Mm,{key:function(h){if(h.key){var g=Uve[h.key]||h.key;if(g!=="Unidentified")return g}return h.type==="keypress"?(h=Ob(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?qve[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:t6,charCode:function(h){return h.type==="keypress"?Ob(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?Ob(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),Yve=Vi(Kve),Xve=D({},Db,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ML=Vi(Xve),Zve=D({},Mm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:t6}),Qve=Vi(Zve),Jve=D({},Id,{propertyName:0,elapsedTime:0,pseudoElement:0}),ebe=Vi(Jve),tbe=D({},Db,{deltaX:function(h){return"deltaX"in h?h.deltaX:"wheelDeltaX"in h?-h.wheelDeltaX:0},deltaY:function(h){return"deltaY"in h?h.deltaY:"wheelDeltaY"in h?-h.wheelDeltaY:"wheelDelta"in h?-h.wheelDelta:0},deltaZ:0,deltaMode:0}),nbe=Vi(tbe),rbe=D({},Id,{newState:0,oldState:0}),ibe=Vi(rbe),obe=[9,13,27,32],n6=Cs&&"CompositionEvent"in window,Rm=null;Cs&&"documentMode"in document&&(Rm=document.documentMode);var sbe=Cs&&"TextEvent"in window&&!Rm,OL=Cs&&(!n6||Rm&&8<Rm&&11>=Rm),RL=" ",PL=!1;function DL(h,g){switch(h){case"keyup":return obe.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IL(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Nh=!1;function abe(h,g){switch(h){case"compositionend":return IL(g);case"keypress":return g.which!==32?null:(PL=!0,RL);case"textInput":return h=g.data,h===RL&&PL?null:h;default:return null}}function lbe(h,g){if(Nh)return h==="compositionend"||!n6&&DL(h,g)?(h=AL(),Mb=ZS=Lc=null,Nh=!1,h):null;switch(h){case"paste":return null;case"keypress":if(!(g.ctrlKey||g.altKey||g.metaKey)||g.ctrlKey&&g.altKey){if(g.char&&1<g.char.length)return g.char;if(g.which)return String.fromCharCode(g.which)}return null;case"compositionend":return OL&&g.locale!=="ko"?null:g.data;default:return null}}var cbe={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 LL(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g==="input"?!!cbe[h.type]:g==="textarea"}
vendor: 5,751 bytes, line 48
48function $L(h,g,w,k){_h?Ah?Ah.push(k):Ah=[k]:_h=k,g=vx(g,"onChange"),0<g.length&&(w=new Pb("onChange","change",null,w,k),h.push({event:w,listeners:g}))}var Pm=null,Dm=null;function ube(h){uF(h,0)}function Ib(h){var g=Rd(h);if(Nb(g))return h}function zL(h,g){if(h==="change")return g}var FL=!1;if(Cs){var r6;if(Cs){var i6="oninput"in document;if(!i6){var BL=document.createElement("div");BL.setAttribute("oninput","return;"),i6=typeof BL.oninput=="function"}r6=i6}else r6=!1;FL=r6&&(!document.documentMode||9<document.documentMode)}function HL(){Pm&&(Pm.detachEvent("onpropertychange",VL),Dm=Pm=null)}function VL(h){if(h.propertyName==="value"&&Ib(Dm)){var g=[];$L(g,Dm,h,KS(h)),_L(ube,g)}}function dbe(h,g,w){h==="focusin"?(HL(),Pm=g,Dm=w,Pm.attachEvent("onpropertychange",VL)):h==="focusout"&&HL()}function fbe(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return Ib(Dm)}function hbe(h,g){if(h==="click")return Ib(g)}function pbe(h,g){if(h==="input"||h==="change")return Ib(g)}function mbe(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var uo=typeof Object.is=="function"?Object.is:mbe;function Im(h,g){if(uo(h,g))return!0;if(typeof h!="object"||h===null||typeof g!="object"||g===null)return!1;var w=Object.keys(h),k=Object.keys(g);if(w.length!==k.length)return!1;for(k=0;k<w.length;k++){var M=w[k];if(!qe.call(g,M)||!uo(h[M],g[M]))return!1}return!0}function UL(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function qL(h,g){var w=UL(h);h=0;for(var k;w;){if(w.nodeType===3){if(k=h+w.textContent.length,h<=g&&k>=g)return{node:w,offset:g-h};h=k}e:{for(;w;){if(w.nextSibling){w=w.nextSibling;break e}w=w.parentNode}w=void 0}w=UL(w)}}function WL(h,g){return h&&g?h===g?!0:h&&h.nodeType===3?!1:g&&g.nodeType===3?WL(h,g.parentNode):"contains"in h?h.contains(g):h.compareDocumentPosition?!!(h.compareDocumentPosition(g)&16):!1:!1}function GL(h){h=h!=null&&h.ownerDocument!=null&&h.ownerDocument.defaultView!=null?h.ownerDocument.defaultView:window;for(var g=Pd(h.document);g instanceof h.HTMLIFrameElement;){try{var w=typeof g.contentWindow.location.href=="string"}catch{w=!1}if(w)h=g.contentWindow;else break;g=Pd(h.document)}return g}function o6(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g&&(g==="input"&&(h.type==="text"||h.type==="search"||h.type==="tel"||h.type==="url"||h.type==="password")||g==="textarea"||h.contentEditable==="true")}function gbe(h,g){var w=GL(g);g=h.focusedElem;var k=h.selectionRange;if(w!==g&&g&&g.ownerDocument&&WL(g.ownerDocument.documentElement,g)){if(k!==null&&o6(g)){if(h=k.start,w=k.end,w===void 0&&(w=h),"selectionStart"in g)g.selectionStart=h,g.selectionEnd=Math.min(w,g.value.length);else if(w=(h=g.ownerDocument||document)&&h.defaultView||window,w.getSelection){w=w.getSelection();var M=g.textContent.length,P=Math.min(k.start,M);k=k.end===void 0?P:Math.min(k.end,M),!w.extend&&P>k&&(M=k,k=P,P=M),M=qL(g,P);var q=qL(g,k);M&&q&&(w.rangeCount!==1||w.anchorNode!==M.node||w.anchorOffset!==M.offset||w.focusNode!==q.node||w.focusOffset!==q.offset)&&(h=h.createRange(),h.setStart(M.node,M.offset),w.removeAllRanges(),P>k?(w.addRange(h),w.extend(q.node,q.offset)):(h.setEnd(q.node,q.offset),w.addRange(h)))}}for(h=[],w=g;w=w.parentNode;)w.nodeType===1&&h.push({element:w,left:w.scrollLeft,top:w.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g<h.length;g++)w=h[g],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}var ybe=Cs&&"documentMode"in document&&11>=document.documentMode,jh=null,s6=null,Lm=null,a6=!1;function KL(h,g,w){var k=w.window===w?w.document:w.nodeType===9?w:w.ownerDocument;a6||jh==null||jh!==Pd(k)||(k=jh,"selectionStart"in k&&o6(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),Lm&&Im(Lm,k)||(Lm=k,k=vx(s6,"onSelect"),0<k.length&&(g=new Pb("onSelect","select",null,g,w),h.push({event:g,listeners:k}),g.target=jh)))}function Ld(h,g){var w={};return w[h.toLowerCase()]=g.toLowerCase(),w["Webkit"+h]="webkit"+g,w["Moz"+h]="moz"+g,w}var Th={animationend:Ld("Animation","AnimationEnd"),animationiteration:Ld("Animation","AnimationIteration"),animationstart:Ld("Animation","AnimationStart"),transitionrun:Ld("Transition","TransitionRun"),transitionstart:Ld("Transition","TransitionStart"),transitioncancel:Ld("Transition","TransitionCancel"),transitionend:Ld("Transition","TransitionEnd")},l6={},YL={};Cs&&(YL=document.createElement("div").style,"AnimationEvent"in window||(delete Th.animationend.animation,delete Th.animationiteration.animation,delete Th.animationstart.animation),"TransitionEvent"in window||delete Th.transitionend.transition);function $d(h){if(l6[h])return l6[h];if(!Th[h])return h;var g=Th[h],w;for(w in g)if(g.hasOwnProperty(w)&&w in YL)return l6[h]=g[w];return h}var XL=$d("animationend"),ZL=$d("animationiteration"),QL=$d("animationstart"),vbe=$d("transitionrun"),bbe=$d("transitionstart"),xbe=$d("transitioncancel"),JL=$d("transitionend"),e$=new Map,t$="abort auxClick beforeToggle 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 scrollEnd toggle touchMove waiting wheel".split(" ");function Es(h,g){e$.set(h,g),fl(g,[h])}var Io=[],Mh=0,c6=0;
vendor: 14,240 bytes, line 48
48function Lb(){for(var h=Mh,g=c6=Mh=0;g<h;){var w=Io[g];Io[g++]=null;var k=Io[g];Io[g++]=null;var M=Io[g];Io[g++]=null;var P=Io[g];if(Io[g++]=null,k!==null&&M!==null){var q=k.pending;q===null?M.next=M:(M.next=q.next,q.next=M),k.pending=M}P!==0&&n$(w,M,P)}}function $b(h,g,w,k){Io[Mh++]=h,Io[Mh++]=g,Io[Mh++]=w,Io[Mh++]=k,c6|=k,h.lanes|=k,h=h.alternate,h!==null&&(h.lanes|=k)}function u6(h,g,w,k){return $b(h,g,w,k),zb(h)}function $c(h,g){return $b(h,null,null,g),zb(h)}function n$(h,g,w){h.lanes|=w;var k=h.alternate;k!==null&&(k.lanes|=w);for(var M=!1,P=h.return;P!==null;)P.childLanes|=w,k=P.alternate,k!==null&&(k.childLanes|=w),P.tag===22&&(h=P.stateNode,h===null||h._visibility&1||(M=!0)),h=P,P=P.return;M&&g!==null&&h.tag===3&&(P=h.stateNode,M=31-De(w),P=P.hiddenUpdates,h=P[M],h===null?P[M]=[g]:h.push(g),g.lane=w|536870912)}function zb(h){if(50<lg)throw lg=0,g8=null,Error(r(185));for(var g=h.return;g!==null;)h=g,g=h.return;return h.tag===3?h.stateNode:null}var Oh={},r$=new WeakMap;function Lo(h,g){if(typeof h=="object"&&h!==null){var w=r$.get(h);return w!==void 0?w:(g={value:h,source:g,stack:B(g)},r$.set(h,g),g)}return{value:h,source:g,stack:B(g)}}var Rh=[],Ph=0,Fb=null,Bb=0,$o=[],zo=0,zd=null,ml=1,gl="";function Fd(h,g){Rh[Ph++]=Bb,Rh[Ph++]=Fb,Fb=h,Bb=g}function i$(h,g,w){$o[zo++]=ml,$o[zo++]=gl,$o[zo++]=zd,zd=h;var k=ml;h=gl;var M=32-De(k)-1;k&=~(1<<M),w+=1;var P=32-De(g)+M;if(30<P){var q=M-M%5;P=(k&(1<<q)-1).toString(32),k>>=q,M-=q,ml=1<<32-De(g)+M|w<<M|k,gl=P+h}else ml=1<<P|w<<M|k,gl=h}function d6(h){h.return!==null&&(Fd(h,1),i$(h,1,0))}function f6(h){for(;h===Fb;)Fb=Rh[--Ph],Rh[Ph]=null,Bb=Rh[--Ph],Rh[Ph]=null;for(;h===zd;)zd=$o[--zo],$o[zo]=null,gl=$o[--zo],$o[zo]=null,ml=$o[--zo],$o[zo]=null}var _i=null,Gr=null,Ut=!1,ks=null,ga=!1,h6=Error(r(519));function Bd(h){var g=Error(r(418,""));throw Fm(Lo(g,h)),h6}function o$(h){var g=h.stateNode,w=h.type,k=h.memoizedProps;switch(g[kn]=h,g[zn]=k,w){case"dialog":Rt("cancel",g),Rt("close",g);break;case"iframe":case"object":case"embed":Rt("load",g);break;case"video":case"audio":for(w=0;w<ug.length;w++)Rt(ug[w],g);break;case"source":Rt("error",g);break;case"img":case"image":case"link":Rt("error",g),Rt("load",g);break;case"details":Rt("toggle",g);break;case"input":Rt("invalid",g),jb(g,k.value,k.defaultValue,k.checked,k.defaultChecked,k.type,k.name,!0),hl(g);break;case"select":Rt("invalid",g);break;case"textarea":Rt("invalid",g),CL(g,k.value,k.defaultValue,k.children),hl(g)}w=k.children,typeof w!="string"&&typeof w!="number"&&typeof w!="bigint"||g.textContent===""+w||k.suppressHydrationWarning===!0||pF(g.textContent,w)?(k.popover!=null&&(Rt("beforetoggle",g),Rt("toggle",g)),k.onScroll!=null&&Rt("scroll",g),k.onScrollEnd!=null&&Rt("scrollend",g),k.onClick!=null&&(g.onclick=bx),g=!0):g=!1,g||Bd(h)}function s$(h){for(_i=h.return;_i;)switch(_i.tag){case 3:case 27:ga=!0;return;case 5:case 13:ga=!1;return;default:_i=_i.return}}function $m(h){if(h!==_i)return!1;if(!Ut)return s$(h),Ut=!0,!1;var g=!1,w;if((w=h.tag!==3&&h.tag!==27)&&((w=h.tag===5)&&(w=h.type,w=!(w!=="form"&&w!=="button")||R8(h.type,h.memoizedProps)),w=!w),w&&(g=!0),g&&Gr&&Bd(h),s$(h),h.tag===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));e:{for(h=h.nextSibling,g=0;h;){if(h.nodeType===8)if(w=h.data,w==="/$"){if(g===0){Gr=As(h.nextSibling);break e}g--}else w!=="$"&&w!=="$!"&&w!=="$?"||g++;h=h.nextSibling}Gr=null}}else Gr=_i?As(h.stateNode.nextSibling):null;return!0}function zm(){Gr=_i=null,Ut=!1}function Fm(h){ks===null?ks=[h]:ks.push(h)}var Bm=Error(r(460)),a$=Error(r(474)),p6={then:function(){}};function l$(h){return h=h.status,h==="fulfilled"||h==="rejected"}function Hb(){}function c$(h,g,w){switch(w=h[w],w===void 0?h.push(g):w!==g&&(g.then(Hb,Hb),g=w),g.status){case"fulfilled":return g.value;case"rejected":throw h=g.reason,h===Bm?Error(r(483)):h;default:if(typeof g.status=="string")g.then(Hb,Hb);else{if(h=bn,h!==null&&100<h.shellSuspendCounter)throw Error(r(482));h=g,h.status="pending",h.then(function(k){if(g.status==="pending"){var M=g;M.status="fulfilled",M.value=k}},function(k){if(g.status==="pending"){var M=g;M.status="rejected",M.reason=k}})}switch(g.status){case"fulfilled":return g.value;case"rejected":throw h=g.reason,h===Bm?Error(r(483)):h}throw Hm=g,Bm}}var Hm=null;function u$(){if(Hm===null)throw Error(r(459));var h=Hm;return Hm=null,h}var Dh=null,Vm=0;function Vb(h){var g=Vm;return Vm+=1,Dh===null&&(Dh=[]),c$(Dh,h,g)}function Um(h,g){g=g.props.ref,h.ref=g!==void 0?g:null}function Ub(h,g){throw g.$$typeof===o?Error(r(525)):(h=Object.prototype.toString.call(g),Error(r(31,h==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":h)))}function d$(h){var g=h._init;return g(h._payload)}function f$(h){function g(de,le){if(h){var fe=de.deletions;fe===null?(de.deletions=[le],de.flags|=16):fe.push(le)}}function w(de,le){if(!h)return null;for(;le!==null;)g(de,le),le=le.sibling;return null}function k(de){for(var le=new Map;de!==null;)de.key!==null?le.set(de.key,de):le.set(de.index,de),de=de.sibling;return le}function M(de,le){return de=Xc(de,le),de.index=0,de.sibling=null,de}function P(de,le,fe){return de.index=fe,h?(fe=de.alternate,fe!==null?(fe=fe.index,fe<le?(de.flags|=33554434,le):fe):(de.flags|=33554434,le)):(de.flags|=1048576,le)}function q(de){return h&&de.alternate===null&&(de.flags|=33554434),de}function Z(de,le,fe,Ce){return le===null||le.tag!==6?(le=l8(fe,de.mode,Ce),le.return=de,le):(le=M(le,fe),le.return=de,le)}function te(de,le,fe,Ce){var Be=fe.type;return Be===l?ve(de,le,fe.props.children,Ce,fe.key):le!==null&&(le.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===S&&d$(Be)===le.type)?(le=M(le,fe.props),Um(le,fe),le.return=de,le):(le=lx(fe.type,fe.key,fe.props,null,de.mode,Ce),Um(le,fe),le.return=de,le)}function ce(de,le,fe,Ce){return le===null||le.tag!==4||le.stateNode.containerInfo!==fe.containerInfo||le.stateNode.implementation!==fe.implementation?(le=c8(fe,de.mode,Ce),le.return=de,le):(le=M(le,fe.children||[]),le.return=de,le)}function ve(de,le,fe,Ce,Be){return le===null||le.tag!==7?(le=Zd(fe,de.mode,Ce,Be),le.return=de,le):(le=M(le,fe),le.return=de,le)}function Ee(de,le,fe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return le=l8(""+le,de.mode,fe),le.return=de,le;if(typeof le=="object"&&le!==null){switch(le.$$typeof){case s:return fe=lx(le.type,le.key,le.props,null,de.mode,fe),Um(fe,le),fe.return=de,fe;case a:return le=c8(le,de.mode,fe),le.return=de,le;case S:var Ce=le._init;return le=Ce(le._payload),Ee(de,le,fe)}if(Y(le)||N(le))return le=Zd(le,de.mode,fe,null),le.return=de,le;if(typeof le.then=="function")return Ee(de,Vb(le),fe);if(le.$$typeof===m)return Ee(de,ox(de,le),fe);Ub(de,le)}return null}function he(de,le,fe,Ce){var Be=le!==null?le.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Be!==null?null:Z(de,le,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case s:return fe.key===Be?te(de,le,fe,Ce):null;case a:return fe.key===Be?ce(de,le,fe,Ce):null;case S:return Be=fe._init,fe=Be(fe._payload),he(de,le,fe,Ce)}if(Y(fe)||N(fe))return Be!==null?null:ve(de,le,fe,Ce,null);if(typeof fe.then=="function")return he(de,le,Vb(fe),Ce);if(fe.$$typeof===m)return he(de,le,ox(de,fe),Ce);Ub(de,fe)}return null}function ge(de,le,fe,Ce,Be){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number"||typeof Ce=="bigint")return de=de.get(fe)||null,Z(le,de,""+Ce,Be);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case s:return de=de.get(Ce.key===null?fe:Ce.key)||null,te(le,de,Ce,Be);case a:return de=de.get(Ce.key===null?fe:Ce.key)||null,ce(le,de,Ce,Be);case S:var kt=Ce._init;return Ce=kt(Ce._payload),ge(de,le,fe,Ce,Be)}if(Y(Ce)||N(Ce))return de=de.get(fe)||null,ve(le,de,Ce,Be,null);if(typeof Ce.then=="function")return ge(de,le,fe,Vb(Ce),Be);if(Ce.$$typeof===m)return ge(de,le,fe,ox(le,Ce),Be);Ub(le,Ce)}return null}function Ke(de,le,fe,Ce){for(var Be=null,kt=null,Ze=le,nt=le=0,Lr=null;Ze!==null&&nt<fe.length;nt++){Ze.index>nt?(Lr=Ze,Ze=null):Lr=Ze.sibling;var qt=he(de,Ze,fe[nt],Ce);if(qt===null){Ze===null&&(Ze=Lr);break}h&&Ze&&qt.alternate===null&&g(de,Ze),le=P(qt,le,nt),kt===null?Be=qt:kt.sibling=qt,kt=qt,Ze=Lr}if(nt===fe.length)return w(de,Ze),Ut&&Fd(de,nt),Be;if(Ze===null){for(;nt<fe.length;nt++)Ze=Ee(de,fe[nt],Ce),Ze!==null&&(le=P(Ze,le,nt),kt===null?Be=Ze:kt.sibling=Ze,kt=Ze);return Ut&&Fd(de,nt),Be}for(Ze=k(Ze);nt<fe.length;nt++)Lr=ge(Ze,de,nt,fe[nt],Ce),Lr!==null&&(h&&Lr.alternate!==null&&Ze.delete(Lr.key===null?nt:Lr.key),le=P(Lr,le,nt),kt===null?Be=Lr:kt.sibling=Lr,kt=Lr);return h&&Ze.forEach(function(ru){return g(de,ru)}),Ut&&Fd(de,nt),Be}function ft(de,le,fe,Ce){if(fe==null)throw Error(r(151));for(var Be=null,kt=null,Ze=le,nt=le=0,Lr=null,qt=fe.next();Ze!==null&&!qt.done;nt++,qt=fe.next()){Ze.index>nt?(Lr=Ze,Ze=null):Lr=Ze.sibling;var ru=he(de,Ze,qt.value,Ce);if(ru===null){Ze===null&&(Ze=Lr);break}h&&Ze&&ru.alternate===null&&g(de,Ze),le=P(ru,le,nt),kt===null?Be=ru:kt.sibling=ru,kt=ru,Ze=Lr}if(qt.done)return w(de,Ze),Ut&&Fd(de,nt),Be;if(Ze===null){for(;!qt.done;nt++,qt=fe.next())qt=Ee(de,qt.value,Ce),qt!==null&&(le=P(qt,le,nt),kt===null?Be=qt:kt.sibling=qt,kt=qt);return Ut&&Fd(de,nt),Be}for(Ze=k(Ze);!qt.done;nt++,qt=fe.next())qt=ge(Ze,de,nt,qt.value,Ce),qt!==null&&(h&&qt.alternate!==null&&Ze.delete(qt.key===null?nt:qt.key),le=P(qt,le,nt),kt===null?Be=qt:kt.sibling=qt,kt=qt);return h&&Ze.forEach(function(Pxe){return g(de,Pxe)}),Ut&&Fd(de,nt),Be}function Gn(de,le,fe,Ce){if(typeof fe=="object"&&fe!==null&&fe.type===l&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case s:e:{for(var Be=fe.key;le!==null;){if(le.key===Be){if(Be=fe.type,Be===l){if(le.tag===7){w(de,le.sibling),Ce=M(le,fe.props.children),Ce.return=de,de=Ce;break e}}else if(le.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===S&&d$(Be)===le.type){w(de,le.sibling),Ce=M(le,fe.props),Um(Ce,fe),Ce.return=de,de=Ce;break e}w(de,le);break}else g(de,le);le=le.sibling}fe.type===l?(Ce=Zd(fe.props.children,de.mode,Ce,fe.key),Ce.return=de,de=Ce):(Ce=lx(fe.type,fe.key,fe.props,null,de.mode,Ce),Um(Ce,fe),Ce.return=de,de=Ce)}return q(de);case a:e:{for(Be=fe.key;le!==null;){if(le.key===Be)if(le.tag===4&&le.stateNode.containerInfo===fe.containerInfo&&le.stateNode.implementation===fe.implementation){w(de,le.sibling),Ce=M(le,fe.children||[]),Ce.return=de,de=Ce;break e}else{w(de,le);break}else g(de,le);le=le.sibling}Ce=c8(fe,de.mode,Ce),Ce.return=de,de=Ce}return q(de);case S:return Be=fe._init,fe=Be(fe._payload),Gn(de,le,fe,Ce)}if(Y(fe))return Ke(de,le,fe,Ce);if(N(fe)){if(Be=N(fe),typeof Be!="function")throw Error(r(150));return fe=Be.call(fe),ft(de,le,fe,Ce)}if(typeof fe.then=="function")return Gn(de,le,Vb(fe),Ce);if(fe.$$typeof===m)return Gn(de,le,ox(de,fe),Ce);Ub(de,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,le!==null&&le.tag===6?(w(de,le.sibling),Ce=M(le,fe),Ce.return=de,de=Ce):(w(de,le),Ce=l8(fe,de.mode,Ce),Ce.return=de,de=Ce),q(de)):w(de,le)}return function(de,le,fe,Ce){try{Vm=0;var Be=Gn(de,le,fe,Ce);return Dh=null,Be}catch(Ze){if(Ze===Bm)throw Ze;var kt=Vo(29,Ze,null,de.mode);return kt.lanes=Ce,kt.return=de,kt}finally{}}}var Hd=f$(!0),h$=f$(!1),Ih=se(null),qb=se(0);function p$(h,g){h=Al,J(qb,h),J(Ih,g),Al=h|g.baseLanes}function m6(){J(qb,Al),J(Ih,Ih.current)}function g6(){Al=qb.current,oe(Ih),oe(qb)}var Fo=se(null),ya=null;function zc(h){var g=h.alternate;J(Cr,Cr.current&1),J(Fo,h),ya===null&&(g===null||Ih.current!==null||g.memoizedState!==null)&&(ya=h)}function m$(h){if(h.tag===22){if(J(Cr,Cr.current),J(Fo,h),ya===null){var g=h.alternate;g!==null&&g.memoizedState!==null&&(ya=h)}}else Fc()}function Fc(){J(Cr,Cr.current),J(Fo,Fo.current)}function yl(h){oe(Fo),ya===h&&(ya=null),oe(Cr)}var Cr=se(0);function Wb(h){for(var g=h;g!==null;){if(g.tag===13){var w=g.memoizedState;if(w!==null&&(w=w.dehydrated,w===null||w.data==="$?"||w.data==="$!"))return g}else if(g.tag===19&&g.memoizedProps.revealOrder!==void 0){if((g.flags&128)!==0)return g}else if(g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return null;g=g.return}g.sibling.return=g.return,g=g.sibling}return null}var wbe=typeof AbortController<"u"?AbortController:function(){var h=[],g=this.signal={aborted:!1,addEventListener:function(w,k){h.push(k)}};this.abort=function(){g.aborted=!0,h.forEach(function(w){return w()})}},Cbe=e.unstable_scheduleCallback,Sbe=e.unstable_NormalPriority,Sr={$$typeof:m,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function y6(){return{controller:new wbe,data:new Map,refCount:0}}function qm(h){h.refCount--,h.refCount===0&&Cbe(Sbe,function(){h.controller.abort()})}var Wm=null,v6=0,Lh=0,$h=null;function Ebe(h,g){if(Wm===null){var w=Wm=[];v6=0,Lh=E8(),$h={status:"pending",value:void 0,then:function(k){w.push(k)}}}return v6++,g.then(g$,g$),g}function g$(){if(--v6===0&&Wm!==null){$h!==null&&($h.status="fulfilled");var h=Wm;Wm=null,Lh=0,$h=null;for(var g=0;g<h.length;g++)(0,h[g])()}}function kbe(h,g){var w=[],k={status:"pending",value:null,reason:null,then:function(M){w.push(M)}};return h.then(function(){k.status="fulfilled",k.value=g;for(var M=0;M<w.length;M++)(0,w[M])(g)},function(M){for(k.status="rejected",k.reason=M,M=0;M<w.length;M++)(0,w[M])(void 0)}),k}var y$=O.S;O.S=function(h,g){typeof g=="object"&&g!==null&&typeof g.then=="function"&&Ebe(h,g),y$!==null&&y$(h,g)};var Vd=se(null);function b6(){var h=Vd.current;return h!==null?h:bn.pooledCache}function Gb(h,g){g===null?J(Vd,Vd.current):J(Vd,g.pool)}function v$(){var h=b6();return h===null?null:{parent:Sr._currentValue,pool:h}}var Bc=0,Ct=null,dn=null,sr=null,Kb=!1,zh=!1,Ud=!1,Yb=0,Gm=0,Fh=null,_be=0;function nr(){throw Error(r(321))}function x6(h,g){if(g===null)return!1;for(var w=0;w<g.length&&w<h.length;w++)if(!uo(h[w],g[w]))return!1;return!0}function w6(h,g,w,k,M,P){return Bc=P,Ct=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,O.H=h===null||h.memoizedState===null?qd:Hc,Ud=!1,P=w(k,M),Ud=!1,zh&&(P=x$(g,w,k,M)),b$(h),P}function b$(h){O.H=va;var g=dn!==null&&dn.next!==null;if(Bc=0,sr=dn=Ct=null,Kb=!1,Gm=0,Fh=null,g)throw Error(r(300));
vendor: 1,972 bytes, line 48
48h===null||Dr||(h=h.dependencies,h!==null&&ix(h)&&(Dr=!0))}function x$(h,g,w,k){Ct=h;var M=0;do{if(zh&&(Fh=null),Gm=0,zh=!1,25<=M)throw Error(r(301));if(M+=1,sr=dn=null,h.updateQueue!=null){var P=h.updateQueue;P.lastEffect=null,P.events=null,P.stores=null,P.memoCache!=null&&(P.memoCache.index=0)}O.H=Wd,P=g(w,k)}while(zh);return P}function Abe(){var h=O.H,g=h.useState()[0];return g=typeof g.then=="function"?Km(g):g,h=h.useState()[0],(dn!==null?dn.memoizedState:null)!==h&&(Ct.flags|=1024),g}function C6(){var h=Yb!==0;return Yb=0,h}function S6(h,g,w){g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~w}function E6(h){if(Kb){for(h=h.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Kb=!1}Bc=0,sr=dn=Ct=null,zh=!1,Gm=Yb=0,Fh=null}function Ui(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sr===null?Ct.memoizedState=sr=h:sr=sr.next=h,sr}function ar(){if(dn===null){var h=Ct.alternate;h=h!==null?h.memoizedState:null}else h=dn.next;var g=sr===null?Ct.memoizedState:sr.next;if(g!==null)sr=g,dn=h;else{if(h===null)throw Ct.alternate===null?Error(r(467)):Error(r(310));dn=h,h={memoizedState:dn.memoizedState,baseState:dn.baseState,baseQueue:dn.baseQueue,queue:dn.queue,next:null},sr===null?Ct.memoizedState=sr=h:sr=sr.next=h}return sr}var Xb;Xb=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}};function Km(h){var g=Gm;return Gm+=1,Fh===null&&(Fh=[]),h=c$(Fh,h,g),g=Ct,(sr===null?g.memoizedState:sr.next)===null&&(g=g.alternate,O.H=g===null||g.memoizedState===null?qd:Hc),h}function Zb(h){if(h!==null&&typeof h=="object"){if(typeof h.then=="function")return Km(h);if(h.$$typeof===m)return li(h)}throw Error(r(438,String(h)))}function k6(h){var g=null,w=Ct.updateQueue;if(w!==null&&(g=w.memoCache),g==null){var k=Ct.alternate;k!==null&&(k=k.updateQueue,k!==null&&(k=k.memoCache,k!=null&&(g={data:k.data.map(function(M){return M.slice()}),index:0})))}if(g==null&&(g={data:[],index:0}
vendor: 5,787 bytes, line 48
48),w===null&&(w=Xb(),Ct.updateQueue=w),w.memoCache=g,w=g.data[g.index],w===void 0)for(w=g.data[g.index]=Array(h),k=0;k<h;k++)w[k]=A;return g.index++,w}function vl(h,g){return typeof g=="function"?g(h):g}function Qb(h){var g=ar();return _6(g,dn,h)}function _6(h,g,w){var k=h.queue;if(k===null)throw Error(r(311));k.lastRenderedReducer=w;var M=h.baseQueue,P=k.pending;if(P!==null){if(M!==null){var q=M.next;M.next=P.next,P.next=q}g.baseQueue=M=P,k.pending=null}if(P=h.baseState,M===null)h.memoizedState=P;else{g=M.next;var Z=q=null,te=null,ce=g,ve=!1;do{var Ee=ce.lane&-536870913;if(Ee!==ce.lane?($t&Ee)===Ee:(Bc&Ee)===Ee){var he=ce.revertLane;if(he===0)te!==null&&(te=te.next={lane:0,revertLane:0,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),Ee===Lh&&(ve=!0);else if((Bc&he)===he){ce=ce.next,he===Lh&&(ve=!0);continue}else Ee={lane:0,revertLane:ce.revertLane,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},te===null?(Z=te=Ee,q=P):te=te.next=Ee,Ct.lanes|=he,Zc|=he;Ee=ce.action,Ud&&w(P,Ee),P=ce.hasEagerState?ce.eagerState:w(P,Ee)}else he={lane:Ee,revertLane:ce.revertLane,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},te===null?(Z=te=he,q=P):te=te.next=he,Ct.lanes|=Ee,Zc|=Ee;ce=ce.next}while(ce!==null&&ce!==g);if(te===null?q=P:te.next=Z,!uo(P,h.memoizedState)&&(Dr=!0,ve&&(w=$h,w!==null)))throw w;h.memoizedState=P,h.baseState=q,h.baseQueue=te,k.lastRenderedState=P}return M===null&&(k.lanes=0),[h.memoizedState,k.dispatch]}function A6(h){var g=ar(),w=g.queue;if(w===null)throw Error(r(311));w.lastRenderedReducer=h;var k=w.dispatch,M=w.pending,P=g.memoizedState;if(M!==null){w.pending=null;var q=M=M.next;do P=h(P,q.action),q=q.next;while(q!==M);uo(P,g.memoizedState)||(Dr=!0),g.memoizedState=P,g.baseQueue===null&&(g.baseState=P),w.lastRenderedState=P}return[P,k]}function w$(h,g,w){var k=Ct,M=ar(),P=Ut;if(P){if(w===void 0)throw Error(r(407));w=w()}else w=g();var q=!uo((dn||M).memoizedState,w);if(q&&(M.memoizedState=w,Dr=!0),M=M.queue,T6(E$.bind(null,k,M,h),[h]),M.getSnapshot!==g||q||sr!==null&&sr.memoizedState.tag&1){if(k.flags|=2048,Bh(9,S$.bind(null,k,M,w,g),{destroy:void 0},null),bn===null)throw Error(r(349));P||(Bc&60)!==0||C$(k,g,w)}return w}function C$(h,g,w){h.flags|=16384,h={getSnapshot:g,value:w},g=Ct.updateQueue,g===null?(g=Xb(),Ct.updateQueue=g,g.stores=[h]):(w=g.stores,w===null?g.stores=[h]:w.push(h))}function S$(h,g,w,k){g.value=w,g.getSnapshot=k,k$(g)&&_$(h)}function E$(h,g,w){return w(function(){k$(g)&&_$(h)})}function k$(h){var g=h.getSnapshot;h=h.value;try{var w=g();return!uo(h,w)}catch{return!0}}function _$(h){var g=$c(h,2);g!==null&&Ai(g,h,2)}function N6(h){var g=Ui();if(typeof h=="function"){var w=h;if(h=w(),Ud){tr(!0);try{w()}finally{tr(!1)}}}return g.memoizedState=g.baseState=h,g.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:h},g}function A$(h,g,w,k){return h.baseState=w,_6(h,dn,typeof k=="function"?k:vl)}function Nbe(h,g,w,k,M){if(tx(h))throw Error(r(485));if(h=g.action,h!==null){var P={payload:M,action:h,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(q){P.listeners.push(q)}};O.T!==null?w(!0):P.isTransition=!1,k(P),w=g.pending,w===null?(P.next=g.pending=P,N$(g,P)):(P.next=w.next,g.pending=w.next=P)}}function N$(h,g){var w=g.action,k=g.payload,M=h.state;if(g.isTransition){var P=O.T,q={};O.T=q;try{var Z=w(M,k),te=O.S;te!==null&&te(q,Z),j$(h,g,Z)}catch(ce){j6(h,g,ce)}finally{O.T=P}}else try{P=w(M,k),j$(h,g,P)}catch(ce){j6(h,g,ce)}}function j$(h,g,w){w!==null&&typeof w=="object"&&typeof w.then=="function"?w.then(function(k){T$(h,g,k)},function(k){return j6(h,g,k)}):T$(h,g,w)}function T$(h,g,w){g.status="fulfilled",g.value=w,M$(g),h.state=w,g=h.pending,g!==null&&(w=g.next,w===g?h.pending=null:(w=w.next,g.next=w,N$(h,w)))}function j6(h,g,w){var k=h.pending;if(h.pending=null,k!==null){k=k.next;do g.status="rejected",g.reason=w,M$(g),g=g.next;while(g!==k)}h.action=null}function M$(h){h=h.listeners;for(var g=0;g<h.length;g++)(0,h[g])()}function O$(h,g){return g}function R$(h,g){if(Ut){var w=bn.formState;if(w!==null){e:{var k=Ct;if(Ut){if(Gr){t:{for(var M=Gr,P=ga;M.nodeType!==8;){if(!P){M=null;break t}if(M=As(M.nextSibling),M===null){M=null;break t}}P=M.data,M=P==="F!"||P==="F"?M:null}if(M){Gr=As(M.nextSibling),k=M.data==="F!";break e}}Bd(k)}k=!1}k&&(g=w[0])}}return w=Ui(),w.memoizedState=w.baseState=g,k={pending:null,lanes:0,dispatch:null,lastRenderedReducer:O$,lastRenderedState:g},w.queue=k,w=Z$.bind(null,Ct,k),k.dispatch=w,k=N6(!1),P=D6.bind(null,Ct,!1,k.queue),k=Ui(),M={state:g,dispatch:null,action:h,pending:null},k.queue=M,w=Nbe.bind(null,Ct,M,P,w),M.dispatch=w,k.memoizedState=h,[g,w,!1]}function P$(h){var g=ar();return D$(g,dn,h)}function D$(h,g,w){g=_6(h,g,O$)[0],h=Qb(vl)[0],g=typeof g=="object"&&g!==null&&typeof g.then=="function"?Km(g):g;var k=ar(),M=k.queue,P=M.dispatch;return w!==k.memoizedState&&(Ct.flags|=2048,Bh(9,jbe.bind(null,M,w),{destroy:void 0},null)),[g,P,h]}function jbe(h,g){h.action=g}function I$(h){var g=ar(),w=dn;if(w!==null)return D$(g,w,h);ar(),g=g.memoizedState,w=ar();var k=w.queue.dispatch;return w.memoizedState=h,[g,k,!1]}function Bh(h,g,w,k){return h={tag:h,create:g,inst:w,deps:k,next:null},g=Ct.updateQueue,g===null&&(g=Xb(),Ct.updateQueue=g),w=g.lastEffect,w===null?g.lastEffect=h.next=h:(k=w.next,w.next=h,h.next=k,g.lastEffect=h),h}function L$(){return ar().memoizedState}function Jb(h,g,w,k){var M=Ui();Ct.flags|=h,M.memoizedState=Bh(1|g,w,{destroy:void 0},k===void 0?null:k)}function ex(h,g,w,k){var M=ar();k=k===void 0?null:k;var P=M.memoizedState.inst;dn!==null&&k!==null&&x6(k,dn.memoizedState.deps)?M.memoizedState=Bh(g,w,P,k):(Ct.flags|=h,M.memoizedState=Bh(1|g,w,P,k)
vendor: 16,484 bytes, line 48
48)}function $$(h,g){Jb(8390656,8,h,g)}function T6(h,g){ex(2048,8,h,g)}function z$(h,g){return ex(4,2,h,g)}function F$(h,g){return ex(4,4,h,g)}function B$(h,g){if(typeof g=="function"){h=h();var w=g(h);return function(){typeof w=="function"?w():g(null)}}if(g!=null)return h=h(),g.current=h,function(){g.current=null}}function H$(h,g,w){w=w!=null?w.concat([h]):null,ex(4,4,B$.bind(null,g,h),w)}function M6(){}function V$(h,g){var w=ar();g=g===void 0?null:g;var k=w.memoizedState;return g!==null&&x6(g,k[1])?k[0]:(w.memoizedState=[h,g],h)}function U$(h,g){var w=ar();g=g===void 0?null:g;var k=w.memoizedState;if(g!==null&&x6(g,k[1]))return k[0];if(k=h(),Ud){tr(!0);try{h()}finally{tr(!1)}}return w.memoizedState=[k,g],k}function O6(h,g,w){return w===void 0||(Bc&1073741824)!==0?h.memoizedState=g:(h.memoizedState=w,h=Wz(),Ct.lanes|=h,Zc|=h,w)}function q$(h,g,w,k){return uo(w,g)?w:Ih.current!==null?(h=O6(h,w,k),uo(h,g)||(Dr=!0),h):(Bc&42)===0?(Dr=!0,h.memoizedState=w):(h=Wz(),Ct.lanes|=h,Zc|=h,g)}function W$(h,g,w,k,M){var P=X.p;X.p=P!==0&&8>P?P:8;var q=O.T,Z={};O.T=Z,D6(h,!1,g,w);try{var te=M(),ce=O.S;if(ce!==null&&ce(Z,te),te!==null&&typeof te=="object"&&typeof te.then=="function"){var ve=kbe(te,k);Ym(h,g,ve,mo(h))}else Ym(h,g,k,mo(h))}catch(Ee){Ym(h,g,{then:function(){},status:"rejected",reason:Ee},mo())}finally{X.p=P,O.T=q}}function Tbe(){}function R6(h,g,w,k){if(h.tag!==5)throw Error(r(476));var M=G$(h).queue;W$(h,M,g,Q,w===null?Tbe:function(){return K$(h),w(k)})}function G$(h){var g=h.memoizedState;if(g!==null)return g;g={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:Q},next:null};var w={};return g.next={memoizedState:w,baseState:w,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vl,lastRenderedState:w},next:null},h.memoizedState=g,h=h.alternate,h!==null&&(h.memoizedState=g),g}function K$(h){var g=G$(h).next.queue;Ym(h,g,{},mo())}function P6(){return li(mg)}function Y$(){return ar().memoizedState}function X$(){return ar().memoizedState}function Mbe(h){for(var g=h.return;g!==null;){switch(g.tag){case 24:case 3:var w=mo();h=qc(w);var k=Wc(g,h,w);k!==null&&(Ai(k,g,w),Qm(k,g,w)),g={cache:y6()},h.payload=g;return}g=g.return}}function Obe(h,g,w){var k=mo();w={lane:k,revertLane:0,action:w,hasEagerState:!1,eagerState:null,next:null},tx(h)?Q$(g,w):(w=u6(h,g,w,k),w!==null&&(Ai(w,h,k),J$(w,g,k)))}function Z$(h,g,w){var k=mo();Ym(h,g,w,k)}function Ym(h,g,w,k){var M={lane:k,revertLane:0,action:w,hasEagerState:!1,eagerState:null,next:null};if(tx(h))Q$(g,M);else{var P=h.alternate;if(h.lanes===0&&(P===null||P.lanes===0)&&(P=g.lastRenderedReducer,P!==null))try{var q=g.lastRenderedState,Z=P(q,w);if(M.hasEagerState=!0,M.eagerState=Z,uo(Z,q))return $b(h,g,M,0),bn===null&&Lb(),!1}catch{}finally{}if(w=u6(h,g,M,k),w!==null)return Ai(w,h,k),J$(w,g,k),!0}return!1}function D6(h,g,w,k){if(k={lane:2,revertLane:E8(),action:k,hasEagerState:!1,eagerState:null,next:null},tx(h)){if(g)throw Error(r(479))}else g=u6(h,w,k,2),g!==null&&Ai(g,h,2)}function tx(h){var g=h.alternate;return h===Ct||g!==null&&g===Ct}function Q$(h,g){zh=Kb=!0;var w=h.pending;w===null?g.next=g:(g.next=w.next,w.next=g),h.pending=g}function J$(h,g,w){if((w&4194176)!==0){var k=g.lanes;k&=h.pendingLanes,w|=k,g.lanes=w,Tt(h,w)}}var va={readContext:li,use:Zb,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useLayoutEffect:nr,useInsertionEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useSyncExternalStore:nr,useId:nr};va.useCacheRefresh=nr,va.useMemoCache=nr,va.useHostTransitionStatus=nr,va.useFormState=nr,va.useActionState=nr,va.useOptimistic=nr;var qd={readContext:li,use:Zb,useCallback:function(h,g){return Ui().memoizedState=[h,g===void 0?null:g],h},useContext:li,useEffect:$$,useImperativeHandle:function(h,g,w){w=w!=null?w.concat([h]):null,Jb(4194308,4,B$.bind(null,g,h),w)},useLayoutEffect:function(h,g){return Jb(4194308,4,h,g)},useInsertionEffect:function(h,g){Jb(4,2,h,g)},useMemo:function(h,g){var w=Ui();g=g===void 0?null:g;var k=h();if(Ud){tr(!0);try{h()}finally{tr(!1)}}return w.memoizedState=[k,g],k},useReducer:function(h,g,w){var k=Ui();if(w!==void 0){var M=w(g);if(Ud){tr(!0);try{w(g)}finally{tr(!1)}}}else M=g;return k.memoizedState=k.baseState=M,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:M},k.queue=h,h=h.dispatch=Obe.bind(null,Ct,h),[k.memoizedState,h]},useRef:function(h){var g=Ui();return h={current:h},g.memoizedState=h},useState:function(h){h=N6(h);var g=h.queue,w=Z$.bind(null,Ct,g);return g.dispatch=w,[h.memoizedState,w]},useDebugValue:M6,useDeferredValue:function(h,g){var w=Ui();return O6(w,h,g)},useTransition:function(){var h=N6(!1);return h=W$.bind(null,Ct,h.queue,!0,!1),Ui().memoizedState=h,[!1,h]},useSyncExternalStore:function(h,g,w){var k=Ct,M=Ui();if(Ut){if(w===void 0)throw Error(r(407));w=w()}else{if(w=g(),bn===null)throw Error(r(349));($t&60)!==0||C$(k,g,w)}M.memoizedState=w;var P={value:w,getSnapshot:g};return M.queue=P,$$(E$.bind(null,k,P,h),[h]),k.flags|=2048,Bh(9,S$.bind(null,k,P,w,g),{destroy:void 0},null),w},useId:function(){var h=Ui(),g=bn.identifierPrefix;if(Ut){var w=gl,k=ml;w=(k&~(1<<32-De(k)-1)).toString(32)+w,g=":"+g+"R"+w,w=Yb++,0<w&&(g+="H"+w.toString(32)),g+=":"}else w=_be++,g=":"+g+"r"+w.toString(32)+":";return h.memoizedState=g},useCacheRefresh:function(){return Ui().memoizedState=Mbe.bind(null,Ct)}};qd.useMemoCache=k6,qd.useHostTransitionStatus=P6,qd.useFormState=R$,qd.useActionState=R$,qd.useOptimistic=function(h){var g=Ui();g.memoizedState=g.baseState=h;var w={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return g.queue=w,g=D6.bind(null,Ct,!0,w),w.dispatch=g,[h,g]};var Hc={readContext:li,use:Zb,useCallback:V$,useContext:li,useEffect:T6,useImperativeHandle:H$,useInsertionEffect:z$,useLayoutEffect:F$,useMemo:U$,useReducer:Qb,useRef:L$,useState:function(){return Qb(vl)},useDebugValue:M6,useDeferredValue:function(h,g){var w=ar();return q$(w,dn.memoizedState,h,g)},useTransition:function(){var h=Qb(vl)[0],g=ar().memoizedState;return[typeof h=="boolean"?h:Km(h),g]},useSyncExternalStore:w$,useId:Y$};Hc.useCacheRefresh=X$,Hc.useMemoCache=k6,Hc.useHostTransitionStatus=P6,Hc.useFormState=P$,Hc.useActionState=P$,Hc.useOptimistic=function(h,g){var w=ar();return A$(w,dn,h,g)};var Wd={readContext:li,use:Zb,useCallback:V$,useContext:li,useEffect:T6,useImperativeHandle:H$,useInsertionEffect:z$,useLayoutEffect:F$,useMemo:U$,useReducer:A6,useRef:L$,useState:function(){return A6(vl)},useDebugValue:M6,useDeferredValue:function(h,g){var w=ar();return dn===null?O6(w,h,g):q$(w,dn.memoizedState,h,g)},useTransition:function(){var h=A6(vl)[0],g=ar().memoizedState;return[typeof h=="boolean"?h:Km(h),g]},useSyncExternalStore:w$,useId:Y$};Wd.useCacheRefresh=X$,Wd.useMemoCache=k6,Wd.useHostTransitionStatus=P6,Wd.useFormState=I$,Wd.useActionState=I$,Wd.useOptimistic=function(h,g){var w=ar();return dn!==null?A$(w,dn,h,g):(w.baseState=h,[h,w.queue.dispatch])};function I6(h,g,w,k){g=h.memoizedState,w=w(k,g),w=w==null?g:D({},g,w),h.memoizedState=w,h.lanes===0&&(h.updateQueue.baseState=w)}var L6={isMounted:function(h){return(h=h._reactInternals)?z(h)===h:!1},enqueueSetState:function(h,g,w){h=h._reactInternals;var k=mo(),M=qc(k);M.payload=g,w!=null&&(M.callback=w),g=Wc(h,M,k),g!==null&&(Ai(g,h,k),Qm(g,h,k))},enqueueReplaceState:function(h,g,w){h=h._reactInternals;var k=mo(),M=qc(k);M.tag=1,M.payload=g,w!=null&&(M.callback=w),g=Wc(h,M,k),g!==null&&(Ai(g,h,k),Qm(g,h,k))},enqueueForceUpdate:function(h,g){h=h._reactInternals;var w=mo(),k=qc(w);k.tag=2,g!=null&&(k.callback=g),g=Wc(h,k,w),g!==null&&(Ai(g,h,w),Qm(g,h,w))}};function ez(h,g,w,k,M,P,q){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(k,P,q):g.prototype&&g.prototype.isPureReactComponent?!Im(w,k)||!Im(M,P):!0}function tz(h,g,w,k){h=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(w,k),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(w,k),g.state!==h&&L6.enqueueReplaceState(g,g.state,null)}function Gd(h,g){var w=g;if("ref"in g){w={};for(var k in g)k!=="ref"&&(w[k]=g[k])}if(h=h.defaultProps){w===g&&(w=D({},w));for(var M in h)w[M]===void 0&&(w[M]=h[M])}return w}var nx=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var g=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(g))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)};function nz(h){nx(h)}function rz(h){console.error(h)}function iz(h){nx(h)}function rx(h,g){try{var w=h.onUncaughtError;w(g.value,{componentStack:g.stack})}catch(k){setTimeout(function(){throw k})}}function oz(h,g,w){try{var k=h.onCaughtError;k(w.value,{componentStack:w.stack,errorBoundary:g.tag===1?g.stateNode:null})}catch(M){setTimeout(function(){throw M})}}function $6(h,g,w){return w=qc(w),w.tag=3,w.payload={element:null},w.callback=function(){rx(h,g)},w}function sz(h){return h=qc(h),h.tag=3,h}function az(h,g,w,k){var M=w.type.getDerivedStateFromError;if(typeof M=="function"){var P=k.value;h.payload=function(){return M(P)},h.callback=function(){oz(g,w,k)}}var q=w.stateNode;q!==null&&typeof q.componentDidCatch=="function"&&(h.callback=function(){oz(g,w,k),typeof M!="function"&&(Qc===null?Qc=new Set([this]):Qc.add(this));var Z=k.stack;this.componentDidCatch(k.value,{componentStack:Z!==null?Z:""})})}function Rbe(h,g,w,k,M){if(w.flags|=32768,k!==null&&typeof k=="object"&&typeof k.then=="function"){if(g=w.alternate,g!==null&&Zm(g,w,M,!0),w=Fo.current,w!==null){switch(w.tag){case 13:return ya===null?b8():w.alternate===null&&Wn===0&&(Wn=3),w.flags&=-257,w.flags|=65536,w.lanes=M,k===p6?w.flags|=16384:(g=w.updateQueue,g===null?w.updateQueue=new Set([k]):g.add(k),w8(h,k,M)),!1;case 22:return w.flags|=65536,k===p6?w.flags|=16384:(g=w.updateQueue,g===null?(g={transitions:null,markerInstances:null,retryQueue:new Set([k])},w.updateQueue=g):(w=g.retryQueue,w===null?g.retryQueue=new Set([k]):w.add(k)),w8(h,k,M)),!1}throw Error(r(435,w.tag))}return w8(h,k,M),b8(),!1}if(Ut)return g=Fo.current,g!==null?((g.flags&65536)===0&&(g.flags|=256),g.flags|=65536,g.lanes=M,k!==h6&&(h=Error(r(422),{cause:k}),Fm(Lo(h,w)))):(k!==h6&&(g=Error(r(423),{cause:k}),Fm(Lo(g,w))),h=h.current.alternate,h.flags|=65536,M&=-M,h.lanes|=M,k=Lo(k,w),M=$6(h.stateNode,k,M),J6(h,M),Wn!==4&&(Wn=2)),!1;var P=Error(r(520),{cause:k});if(P=Lo(P,w),sg===null?sg=[P]:sg.push(P),Wn!==4&&(Wn=2),g===null)return!0;k=Lo(k,w),w=g;do{switch(w.tag){case 3:return w.flags|=65536,h=M&-M,w.lanes|=h,h=$6(w.stateNode,k,h),J6(w,h),!1;case 1:if(g=w.type,P=w.stateNode,(w.flags&128)===0&&(typeof g.getDerivedStateFromError=="function"||P!==null&&typeof P.componentDidCatch=="function"&&(Qc===null||!Qc.has(P))))return w.flags|=65536,M&=-M,w.lanes|=M,M=sz(M),az(M,h,w,k),J6(w,M),!1}w=w.return}while(w!==null);return!1}var lz=Error(r(461)),Dr=!1;function Kr(h,g,w,k){g.child=h===null?h$(g,null,w,k):Hd(g,h.child,w,k)}function cz(h,g,w,k,M){w=w.render;var P=g.ref;if("ref"in k){var q={};for(var Z in k)Z!=="ref"&&(q[Z]=k[Z])}else q=k;return Yd(g),k=w6(h,g,w,q,P,M),Z=C6(),h!==null&&!Dr?(S6(h,g,M),bl(h,g,M)):(Ut&&Z&&d6(g),g.flags|=1,Kr(h,g,k,M),g.child)}function uz(h,g,w,k,M){if(h===null){var P=w.type;return typeof P=="function"&&!a8(P)&&P.defaultProps===void 0&&w.compare===null?(g.tag=15,g.type=P,dz(h,g,P,k,M)):(h=lx(w.type,null,k,g,g.mode,M),h.ref=g.ref,h.return=g,g.child=h)}if(P=h.child,!G6(h,M)){var q=P.memoizedProps;if(w=w.compare,w=w!==null?w:Im,w(q,k)&&h.ref===g.ref)return bl(h,g,M)}return g.flags|=1,h=Xc(P,k),h.ref=g.ref,h.return=g,g.child=h}function dz(h,g,w,k,M){if(h!==null){var P=h.memoizedProps;if(Im(P,k)&&h.ref===g.ref)if(Dr=!1,g.pendingProps=k=P,G6(h,M))(h.flags&131072)!==0&&(Dr=!0);else return g.lanes=h.lanes,bl(h,g,M)}return z6(h,g,w,k,M)}function fz(h,g,w){var k=g.pendingProps,M=k.children,P=(g.stateNode._pendingVisibility&2)!==0,q=h!==null?h.memoizedState:null;if(Xm(h,g),k.mode==="hidden"||P){if((g.flags&128)!==0){if(k=q!==null?q.baseLanes|w:w,h!==null){for(M=g.child=h.child,P=0;M!==null;)P=P|M.lanes|M.childLanes,M=M.sibling;g.childLanes=P&~k}else g.childLanes=0,g.child=null;return hz(h,g,k,w)}if((w&536870912)!==0)g.memoizedState={baseLanes:0,cachePool:null},h!==null&&Gb(g,q!==null?q.cachePool:null),q!==null?p$(g,q):m6(),m$(g);else return g.lanes=g.childLanes=536870912,hz(h,g,q!==null?q.baseLanes|w:w,w)}else q!==null?(Gb(g,q.cachePool),p$(g,q),Fc(),g.memoizedState=null):(h!==null&&Gb(g,null),m6(),Fc());return Kr(h,g,M,w),g.child}function hz(h,g,w,k){var M=b6();return M=M===null?null:{parent:Sr._currentValue,pool:M},g.memoizedState={baseLanes:w,cachePool:M},h!==null&&Gb(g,null),m6(),m$(g),h!==null&&Zm(h,g,k,!0),null}function Xm(h,g){var w=g.ref;if(w===null)h!==null&&h.ref!==null&&(g.flags|=2097664);else{if(typeof w!="function"&&typeof w!="object")throw Error(r(284));(h===null||h.ref!==w)&&(g.flags|=2097664)}}function z6(h,g,w,k,M){return Yd(g),w=w6(h,g,w,k,void 0,M),k=C6(),h!==null&&!Dr?(S6(h,g,M),bl(h,g,M)):(Ut&&k&&d6(g),g.flags|=1,Kr(h,g,w,M),g.child)}function pz(h,g,w,k,M,P){return Yd(g),g.updateQueue=null,w=x$(g,k,w,M),b$(h),k=C6(),h!==null&&!Dr?(S6(h,g,P),bl(h,g,P)):(Ut&&k&&d6(g),g.flags|=1,Kr(h,g,w,P),g.child)}function mz(h,g,w,k,M){if(Yd(g),g.stateNode===null){var P=Oh,q=w.contextType;typeof q=="object"&&q!==null&&(P=li(q)),P=new w(k,P),g.memoizedState=P.state!==null&&P.state!==void 0?P.state:null,P.updater=L6,g.stateNode=P,P._reactInternals=g,P=g.stateNode,P.props=k,P.state=g.memoizedState,P.refs={},Z6(g),q=w.contextType,P.context=typeof q=="object"&&q!==null?li(q):Oh,P.state=g.memoizedState,q=w.getDerivedStateFromProps,typeof q=="function"&&(I6(g,w,q,k),P.state=g.memoizedState),typeof w.getDerivedStateFromProps=="function"||typeof P.getSnapshotBeforeUpdate=="function"||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(q=P.state,typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount(),q!==P.state&&L6.enqueueReplaceState(P,P.state,null),eg(g,k,P,M),Jm(),P.state=g.memoizedState),typeof P.componentDidMount=="function"&&(g.flags|=4194308),k=!0}else if(h===null){P=g.stateNode;var Z=g.memoizedProps,te=Gd(w,Z);P.props=te;var ce=P.context,ve=w.contextType;q=Oh,typeof ve=="object"&&ve!==null&&(q=li(ve));var Ee=w.getDerivedStateFromProps;ve=typeof Ee=="function"||typeof P.getSnapshotBeforeUpdate=="function",Z=g.pendingProps!==Z,ve||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(Z||ce!==q)&&tz(g,P,k,q),Uc=!1;var he=g.memoizedState;P.state=he,eg(g,k,P,M),Jm(),ce=g.memoizedState,Z||he!==ce||Uc?(typeof Ee=="function"&&(I6(g,w,Ee,k),ce=g.memoizedState),(te=Uc||ez(g,w,te,k,he,ce,q))?(ve||typeof P.UNSAFE_componentWillMount!="function"&&typeof P.componentWillMount!="function"||(typeof P.componentWillMount=="function"&&P.componentWillMount(),typeof P.UNSAFE_componentWillMount=="function"&&P.UNSAFE_componentWillMount()),typeof P.componentDidMount=="function"&&(g.flags|=4194308)):(typeof P.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=k,g.memoizedState=ce),P.props=k,P.state=ce,P.context=q,k=te):(typeof P.componentDidMount=="function"&&(g.flags|=4194308),k=!1)}else{P=g.stateNode,Q6(h,g),q=g.memoizedProps,ve=Gd(w,q),P.props=ve,Ee=g.pendingProps,he=P.context,ce=w.contextType,te=Oh,typeof ce=="object"&&ce!==null&&(te=li(ce)),Z=w.getDerivedStateFromProps,(ce=typeof Z=="function"||typeof P.getSnapshotBeforeUpdate=="function")||typeof P.UNSAFE_componentWillReceiveProps!="function"&&typeof P.componentWillReceiveProps!="function"||(q!==Ee||he!==te)&&tz(g,P,k,te),Uc=!1,he=g.memoizedState,P.state=he,eg(g,k,P,M),Jm();var ge=g.memoizedState;q!==Ee||he!==ge||Uc||h!==null&&h.dependencies!==null&&ix(h.dependencies)?(typeof Z=="function"&&(I6(g,w,Z,k),ge=g.memoizedState),(ve=Uc||ez(g,w,ve,k,he,ge,te)||h!==null&&h.dependencies!==null&&ix(h.dependencies))?(ce||typeof P.UNSAFE_componentWillUpdate!="function"&&typeof P.componentWillUpdate!="function"||(typeof P.componentWillUpdate=="function"&&P.componentWillUpdate(k,ge,te),t
vendor: 1,128 bytes, line 48
48ypeof P.UNSAFE_componentWillUpdate=="function"&&P.UNSAFE_componentWillUpdate(k,ge,te)),typeof P.componentDidUpdate=="function"&&(g.flags|=4),typeof P.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof P.componentDidUpdate!="function"||q===h.memoizedProps&&he===h.memoizedState||(g.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||q===h.memoizedProps&&he===h.memoizedState||(g.flags|=1024),g.memoizedProps=k,g.memoizedState=ge),P.props=k,P.state=ge,P.context=te,k=ve):(typeof P.componentDidUpdate!="function"||q===h.memoizedProps&&he===h.memoizedState||(g.flags|=4),typeof P.getSnapshotBeforeUpdate!="function"||q===h.memoizedProps&&he===h.memoizedState||(g.flags|=1024),k=!1)}return P=k,Xm(h,g),k=(g.flags&128)!==0,P||k?(P=g.stateNode,w=k&&typeof w.getDerivedStateFromError!="function"?null:P.render(),g.flags|=1,h!==null&&k?(g.child=Hd(g,h.child,null,M),g.child=Hd(g,null,w,M)):Kr(h,g,w,M),g.memoizedState=P.state,h=g.child):h=bl(h,g,M),h}function gz(h,g,w,k){return zm(),g.flags|=256,Kr(h,g,w,k),g.child}var F6={dehydrated:null,treeContext:null,retryLane:0};function B6(h){return{baseLanes:h,cachePool:v$()}}
vendor: 11,616 bytes, line 48
48function H6(h,g,w){return h=h!==null?h.childLanes&~w:0,g&&(h|=Uo),h}function yz(h,g,w){var k=g.pendingProps,M=!1,P=(g.flags&128)!==0,q;if((q=P)||(q=h!==null&&h.memoizedState===null?!1:(Cr.current&2)!==0),q&&(M=!0,g.flags&=-129),q=(g.flags&32)!==0,g.flags&=-33,h===null){if(Ut){if(M?zc(g):Fc(),Ut){var Z=Gr,te;if(te=Z){e:{for(te=Z,Z=ga;te.nodeType!==8;){if(!Z){Z=null;break e}if(te=As(te.nextSibling),te===null){Z=null;break e}}Z=te}Z!==null?(g.memoizedState={dehydrated:Z,treeContext:zd!==null?{id:ml,overflow:gl}:null,retryLane:536870912},te=Vo(18,null,null,0),te.stateNode=Z,te.return=g,g.child=te,_i=g,Gr=null,te=!0):te=!1}te||Bd(g)}if(Z=g.memoizedState,Z!==null&&(Z=Z.dehydrated,Z!==null))return Z.data==="$!"?g.lanes=16:g.lanes=536870912,null;yl(g)}return Z=k.children,k=k.fallback,M?(Fc(),M=g.mode,Z=U6({mode:"hidden",children:Z},M),k=Zd(k,M,w,null),Z.return=g,k.return=g,Z.sibling=k,g.child=Z,M=g.child,M.memoizedState=B6(w),M.childLanes=H6(h,q,w),g.memoizedState=F6,k):(zc(g),V6(g,Z))}if(te=h.memoizedState,te!==null&&(Z=te.dehydrated,Z!==null)){if(P)g.flags&256?(zc(g),g.flags&=-257,g=q6(h,g,w)):g.memoizedState!==null?(Fc(),g.child=h.child,g.flags|=128,g=null):(Fc(),M=k.fallback,Z=g.mode,k=U6({mode:"visible",children:k.children},Z),M=Zd(M,Z,w,null),M.flags|=2,k.return=g,M.return=g,k.sibling=M,g.child=k,Hd(g,h.child,null,w),k=g.child,k.memoizedState=B6(w),k.childLanes=H6(h,q,w),g.memoizedState=F6,g=M);else if(zc(g),Z.data==="$!"){if(q=Z.nextSibling&&Z.nextSibling.dataset,q)var ce=q.dgst;q=ce,k=Error(r(419)),k.stack="",k.digest=q,Fm({value:k,source:null,stack:null}),g=q6(h,g,w)}else if(Dr||Zm(h,g,w,!1),q=(w&h.childLanes)!==0,Dr||q){if(q=bn,q!==null){if(k=w&-w,(k&42)!==0)k=1;else switch(k){case 2:k=1;break;case 8:k=4;break;case 32:k=16;break;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:k=64;break;case 268435456:k=134217728;break;default:k=0}if(k=(k&(q.suspendedLanes|w))!==0?0:k,k!==0&&k!==te.retryLane)throw te.retryLane=k,$c(h,k),Ai(q,h,k),lz}Z.data==="$?"||b8(),g=q6(h,g,w)}else Z.data==="$?"?(g.flags|=128,g.child=h.child,g=Kbe.bind(null,h),Z._reactRetry=g,g=null):(h=te.treeContext,Gr=As(Z.nextSibling),_i=g,Ut=!0,ks=null,ga=!1,h!==null&&($o[zo++]=ml,$o[zo++]=gl,$o[zo++]=zd,ml=h.id,gl=h.overflow,zd=g),g=V6(g,k.children),g.flags|=4096);return g}return M?(Fc(),M=k.fallback,Z=g.mode,te=h.child,ce=te.sibling,k=Xc(te,{mode:"hidden",children:k.children}),k.subtreeFlags=te.subtreeFlags&31457280,ce!==null?M=Xc(ce,M):(M=Zd(M,Z,w,null),M.flags|=2),M.return=g,k.return=g,k.sibling=M,g.child=k,k=M,M=g.child,Z=h.child.memoizedState,Z===null?Z=B6(w):(te=Z.cachePool,te!==null?(ce=Sr._currentValue,te=te.parent!==ce?{parent:ce,pool:ce}:te):te=v$(),Z={baseLanes:Z.baseLanes|w,cachePool:te}),M.memoizedState=Z,M.childLanes=H6(h,q,w),g.memoizedState=F6,k):(zc(g),w=h.child,h=w.sibling,w=Xc(w,{mode:"visible",children:k.children}),w.return=g,w.sibling=null,h!==null&&(q=g.deletions,q===null?(g.deletions=[h],g.flags|=16):q.push(h)),g.child=w,g.memoizedState=null,w)}function V6(h,g){return g=U6({mode:"visible",children:g},h.mode),g.return=h,h.child=g}function U6(h,g){return Vz(h,g,0,null)}function q6(h,g,w){return Hd(g,h.child,null,w),h=V6(g,g.pendingProps.children),h.flags|=2,g.memoizedState=null,h}function vz(h,g,w){h.lanes|=g;var k=h.alternate;k!==null&&(k.lanes|=g),Y6(h.return,g,w)}function W6(h,g,w,k,M){var P=h.memoizedState;P===null?h.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:k,tail:w,tailMode:M}:(P.isBackwards=g,P.rendering=null,P.renderingStartTime=0,P.last=k,P.tail=w,P.tailMode=M)}function bz(h,g,w){var k=g.pendingProps,M=k.revealOrder,P=k.tail;if(Kr(h,g,k.children,w),k=Cr.current,(k&2)!==0)k=k&1|2,g.flags|=128;else{if(h!==null&&(h.flags&128)!==0)e:for(h=g.child;h!==null;){if(h.tag===13)h.memoizedState!==null&&vz(h,w,g);else if(h.tag===19)vz(h,w,g);else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===g)break e;for(;h.sibling===null;){if(h.return===null||h.return===g)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}k&=1}switch(J(Cr,k),M){case"forwards":for(w=g.child,M=null;w!==null;)h=w.alternate,h!==null&&Wb(h)===null&&(M=w),w=w.sibling;w=M,w===null?(M=g.child,g.child=null):(M=w.sibling,w.sibling=null),W6(g,!1,M,w,P);break;case"backwards":for(w=null,M=g.child,g.child=null;M!==null;){if(h=M.alternate,h!==null&&Wb(h)===null){g.child=M;break}h=M.sibling,M.sibling=w,w=M,M=h}W6(g,!0,w,null,P);break;case"together":W6(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function bl(h,g,w){if(h!==null&&(g.dependencies=h.dependencies),Zc|=g.lanes,(w&g.childLanes)===0)if(h!==null){if(Zm(h,g,w,!1),(w&g.childLanes)===0)return null}else return null;if(h!==null&&g.child!==h.child)throw Error(r(153));if(g.child!==null){for(h=g.child,w=Xc(h,h.pendingProps),g.child=w,w.return=g;h.sibling!==null;)h=h.sibling,w=w.sibling=Xc(h,h.pendingProps),w.return=g;w.sibling=null}return g.child}function G6(h,g){return(h.lanes&g)!==0?!0:(h=h.dependencies,!!(h!==null&&ix(h)))}function Pbe(h,g,w){switch(g.tag){case 3:xe(g,g.stateNode.containerInfo),Vc(g,Sr,h.memoizedState.cache),zm();break;case 27:case 5:Pe(g);break;case 4:xe(g,g.stateNode.containerInfo);break;case 10:Vc(g,g.type,g.memoizedProps.value);break;case 13:var k=g.memoizedState;if(k!==null)return k.dehydrated!==null?(zc(g),g.flags|=128,null):(w&g.child.childLanes)!==0?yz(h,g,w):(zc(g),h=bl(h,g,w),h!==null?h.sibling:null);zc(g);break;case 19:var M=(h.flags&128)!==0;if(k=(w&g.childLanes)!==0,k||(Zm(h,g,w,!1),k=(w&g.childLanes)!==0),M){if(k)return bz(h,g,w);g.flags|=128}if(M=g.memoizedState,M!==null&&(M.rendering=null,M.tail=null,M.lastEffect=null),J(Cr,Cr.current),k)break;return null;case 22:case 23:return g.lanes=0,fz(h,g,w);case 24:Vc(g,Sr,h.memoizedState.cache)}return bl(h,g,w)}function xz(h,g,w){if(h!==null)if(h.memoizedProps!==g.pendingProps)Dr=!0;else{if(!G6(h,w)&&(g.flags&128)===0)return Dr=!1,Pbe(h,g,w);Dr=(h.flags&131072)!==0}else Dr=!1,Ut&&(g.flags&1048576)!==0&&i$(g,Bb,g.index);switch(g.lanes=0,g.tag){case 16:e:{h=g.pendingProps;var k=g.elementType,M=k._init;if(k=M(k._payload),g.type=k,typeof k=="function")a8(k)?(h=Gd(k,h),g.tag=1,g=mz(null,g,k,h,w)):(g.tag=0,g=z6(null,g,k,h,w));else{if(k!=null){if(M=k.$$typeof,M===y){g.tag=11,g=cz(null,g,k,h,w);break e}else if(M===C){g.tag=14,g=uz(null,g,k,h,w);break e}}throw g=T(k)||k,Error(r(306,g,""))}}return g;case 0:return z6(h,g,g.type,g.pendingProps,w);case 1:return k=g.type,M=Gd(k,g.pendingProps),mz(h,g,k,M,w);case 3:e:{if(xe(g,g.stateNode.containerInfo),h===null)throw Error(r(387));var P=g.pendingProps;M=g.memoizedState,k=M.element,Q6(h,g),eg(g,P,null,w);var q=g.memoizedState;if(P=q.cache,Vc(g,Sr,P),P!==M.cache&&X6(g,[Sr],w,!0),Jm(),P=q.element,M.isDehydrated)if(M={element:P,isDehydrated:!1,cache:q.cache},g.updateQueue.baseState=M,g.memoizedState=M,g.flags&256){g=gz(h,g,P,w);break e}else if(P!==k){k=Lo(Error(r(424)),g),Fm(k),g=gz(h,g,P,w);break e}else for(Gr=As(g.stateNode.containerInfo.firstChild),_i=g,Ut=!0,ks=null,ga=!0,w=h$(g,null,P,w),g.child=w;w;)w.flags=w.flags&-3|4096,w=w.sibling;else{if(zm(),P===k){g=bl(h,g,w);break e}Kr(h,g,P,w)}g=g.child}return g;case 26:return Xm(h,g),h===null?(w=SF(g.type,null,g.pendingProps,null))?g.memoizedState=w:Ut||(w=g.type,h=g.pendingProps,k=xx(pe.current).createElement(w),k[kn]=g,k[zn]=h,Yr(k,w,h),or(k),g.stateNode=k):g.memoizedState=SF(g.type,h.memoizedProps,g.pendingProps,h.memoizedState),null;case 27:return Pe(g),h===null&&Ut&&(k=g.stateNode=xF(g.type,g.pendingProps,pe.current),_i=g,ga=!0,Gr=As(k.firstChild)),k=g.pendingProps.children,h!==null||Ut?Kr(h,g,k,w):g.child=Hd(g,null,k,w),Xm(h,g),g.child;case 5:return h===null&&Ut&&((M=k=Gr)&&(k=uxe(k,g.type,g.pendingProps,ga),k!==null?(g.stateNode=k,_i=g,Gr=As(k.firstChild),ga=!1,M=!0):M=!1),M||Bd(g)),Pe(g),M=g.type,P=g.pendingProps,q=h!==null?h.memoizedProps:null,k=P.children,R8(M,P)?k=null:q!==null&&R8(M,q)&&(g.flags|=32),g.memoizedState!==null&&(M=w6(h,g,Abe,null,null,w),mg._currentValue=M),Xm(h,g),Kr(h,g,k,w),g.child;case 6:return h===null&&Ut&&((h=w=Gr)&&(w=dxe(w,g.pendingProps,ga),w!==null?(g.stateNode=w,_i=g,Gr=null,h=!0):h=!1),h||Bd(g)),null;case 13:return yz(h,g,w);case 4:return xe(g,g.stateNode.containerInfo),k=g.pendingProps,h===null?g.child=Hd(g,null,k,w):Kr(h,g,k,w),g.child;case 11:return cz(h,g,g.type,g.pendingProps,w);case 7:return Kr(h,g,g.pendingProps,w),g.child;case 8:return Kr(h,g,g.pendingProps.children,w),g.child;case 12:return Kr(h,g,g.pendingProps.children,w),g.child;case 10:return k=g.pendingProps,Vc(g,g.type,k.value),Kr(h,g,k.children,w),g.child;case 9:return M=g.type._context,k=g.pendingProps.children,Yd(g),M=li(M),k=k(M),g.flags|=1,Kr(h,g,k,w),g.child;case 14:return uz(h,g,g.type,g.pendingProps,w);case 15:return dz(h,g,g.type,g.pendingProps,w);case 19:return bz(h,g,w);case 22:return fz(h,g,w);case 24:return Yd(g),k=li(Sr),h===null?(M=b6(),M===null&&(M=bn,P=y6(),M.pooledCache=P,P.refCount++,P!==null&&(M.pooledCacheLanes|=w),M=P),g.memoizedState={parent:k,cache:M},Z6(g),Vc(g,Sr,M)):((h.lanes&w)!==0&&(Q6(h,g),eg(g,null,null,w),Jm()),M=h.memoizedState,P=g.memoizedState,M.parent!==k?(M={parent:k,cache:k},g.memoizedState=M,g.lanes===0&&(g.memoizedState=g.updateQueue.baseState=M),Vc(g,Sr,k)):(k=P.cache,Vc(g,Sr,k),k!==M.cache&&X6(g,[Sr],w,!0))),Kr(h,g,g.pendingProps.children,w),g.child;case 29:throw g.pendingProps}throw Error(r(156,g.tag))}var K6=se(null),Kd=null,xl=null;function Vc(h,g,w){J(K6,g._currentValue),g._currentValue=w}function wl(h){h._currentValue=K6.current,oe(K6)}function Y6(h,g,w){for(;h!==null;){var k=h.alternate;if((h.childLanes&g)!==g?(h.childLanes|=g,k!==null&&(k.childLanes|=g)):k!==null&&(k.childLanes&g)!==g&&(k.childLanes|=g),h===w)break;h=h.return}}function X6(h,g,w,k){var M=h.child;for(M!==null&&(M.return=h);M!==null;){var P=M.dependencies;if(P!==null){var q=M.child;P=P.firstContext;e:for(;P!==null;){var Z=P;P=M;for(var te=0;te<g.length;te++)if(Z.context===g[te]){P.lanes|=w,Z=P.alternate,Z!==null&&(Z.lanes|=w),Y6(P.return,w,h),k||(q=null);break e}P=Z.next}}else if(M.tag===18){if(q=M.return,q===null)throw Error(r(341));q.lanes|=w,P=q.alternate,P!==null&&(P.lanes|=w),Y6(q,w,h),q=null}else q=M.child;if(q!==null)q.return=M;else for(q=M;q!==null;){if(q===h){q=null;break}if(M=q.sibling,M!==null){M.return=q.return,q=M;break}q=q.return}M=q}}function Zm(h,g,w,k){h=null;for(var M=g,P=!1;M!==null;){if(!P){if((M.flags&524288)!==0)P=!0;else if((M.flags&262144)!==0)break}if(M.tag===10){var q=M.alternate;if(q===null)throw Error(r(387));if(q=q.memoizedProps,q!==null){var Z=M.type;uo(M.pendingProps.value,q.value)||(h!==null?h.push(Z):h=[Z])}}else if(M===be.current){if(q=M.alternate,q===null)throw Error(r(387));q.memoizedState.memoizedState!==M.memoizedState.memoizedState&&(h!==null?h.push(mg):h=[mg])}M=M.return}h!==null&&X6(g,h,w,k),g.flags|=262144}function ix(h){for(h=h.firstContext;h!==null;){if(!uo(h.context._currentValue,h.memoizedValue))return!0;h=h.next}return!1}function Yd(h){Kd=h,xl=null,h=h.dependencies,h!==null&&(h.firstContext=null)}function li(h){return wz(Kd,h)}function ox(h,g){return Kd===null&&Yd(h),wz(h,g)}function wz(h,g){var w=g._currentValue;if(g={context:g,memoizedValue:w,next:null},xl===null){if(h===null)throw Error(r(308));xl=g,h.dependencies={lanes:0,firstContext:g},h.flags|=524288}else xl=xl.next=g;return w}var Uc=!1;function Z6(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}
vendor: 4,458 bytes, line 48
48function Q6(h,g){h=h.updateQueue,g.updateQueue===h&&(g.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,callbacks:null})}function qc(h){return{lane:h,tag:0,payload:null,callback:null,next:null}}function Wc(h,g,w){var k=h.updateQueue;if(k===null)return null;if(k=k.shared,(Bn&2)!==0){var M=k.pending;return M===null?g.next=g:(g.next=M.next,M.next=g),k.pending=g,g=zb(h),n$(h,null,w),g}return $b(h,k,g,w),zb(h)}function Qm(h,g,w){if(g=g.updateQueue,g!==null&&(g=g.shared,(w&4194176)!==0)){var k=g.lanes;k&=h.pendingLanes,w|=k,g.lanes=w,Tt(h,w)}}function J6(h,g){var w=h.updateQueue,k=h.alternate;if(k!==null&&(k=k.updateQueue,w===k)){var M=null,P=null;if(w=w.firstBaseUpdate,w!==null){do{var q={lane:w.lane,tag:w.tag,payload:w.payload,callback:null,next:null};P===null?M=P=q:P=P.next=q,w=w.next}while(w!==null);P===null?M=P=g:P=P.next=g}else M=P=g;w={baseState:k.baseState,firstBaseUpdate:M,lastBaseUpdate:P,shared:k.shared,callbacks:k.callbacks},h.updateQueue=w;return}h=w.lastBaseUpdate,h===null?w.firstBaseUpdate=g:h.next=g,w.lastBaseUpdate=g}var e8=!1;function Jm(){if(e8){var h=$h;if(h!==null)throw h}}function eg(h,g,w,k){e8=!1;var M=h.updateQueue;Uc=!1;var P=M.firstBaseUpdate,q=M.lastBaseUpdate,Z=M.shared.pending;if(Z!==null){M.shared.pending=null;var te=Z,ce=te.next;te.next=null,q===null?P=ce:q.next=ce,q=te;var ve=h.alternate;ve!==null&&(ve=ve.updateQueue,Z=ve.lastBaseUpdate,Z!==q&&(Z===null?ve.firstBaseUpdate=ce:Z.next=ce,ve.lastBaseUpdate=te))}if(P!==null){var Ee=M.baseState;q=0,ve=ce=te=null,Z=P;do{var he=Z.lane&-536870913,ge=he!==Z.lane;if(ge?($t&he)===he:(k&he)===he){he!==0&&he===Lh&&(e8=!0),ve!==null&&(ve=ve.next={lane:0,tag:Z.tag,payload:Z.payload,callback:null,next:null});e:{var Ke=h,ft=Z;he=g;var Gn=w;switch(ft.tag){case 1:if(Ke=ft.payload,typeof Ke=="function"){Ee=Ke.call(Gn,Ee,he);break e}Ee=Ke;break e;case 3:Ke.flags=Ke.flags&-65537|128;case 0:if(Ke=ft.payload,he=typeof Ke=="function"?Ke.call(Gn,Ee,he):Ke,he==null)break e;Ee=D({},Ee,he);break e;case 2:Uc=!0}}he=Z.callback,he!==null&&(h.flags|=64,ge&&(h.flags|=8192),ge=M.callbacks,ge===null?M.callbacks=[he]:ge.push(he))}else ge={lane:he,tag:Z.tag,payload:Z.payload,callback:Z.callback,next:null},ve===null?(ce=ve=ge,te=Ee):ve=ve.next=ge,q|=he;if(Z=Z.next,Z===null){if(Z=M.shared.pending,Z===null)break;ge=Z,Z=ge.next,ge.next=null,M.lastBaseUpdate=ge,M.shared.pending=null}}while(!0);ve===null&&(te=Ee),M.baseState=te,M.firstBaseUpdate=ce,M.lastBaseUpdate=ve,P===null&&(M.shared.lanes=0),Zc|=q,h.lanes=q,h.memoizedState=Ee}}function Cz(h,g){if(typeof h!="function")throw Error(r(191,h));h.call(g)}function Sz(h,g){var w=h.callbacks;if(w!==null)for(h.callbacks=null,h=0;h<w.length;h++)Cz(w[h],g)}function tg(h,g){try{var w=g.updateQueue,k=w!==null?w.lastEffect:null;if(k!==null){var M=k.next;w=M;do{if((w.tag&h)===h){k=void 0;var P=w.create,q=w.inst;k=P(),q.destroy=k}w=w.next}while(w!==M)}}catch(Z){mn(g,g.return,Z)}}function Gc(h,g,w){try{var k=g.updateQueue,M=k!==null?k.lastEffect:null;if(M!==null){var P=M.next;k=P;do{if((k.tag&h)===h){var q=k.inst,Z=q.destroy;if(Z!==void 0){q.destroy=void 0,M=g;var te=w;try{Z()}catch(ce){mn(M,te,ce)}}}k=k.next}while(k!==P)}}catch(ce){mn(g,g.return,ce)}}function Ez(h){var g=h.updateQueue;if(g!==null){var w=h.stateNode;try{Sz(g,w)}catch(k){mn(h,h.return,k)}}}function kz(h,g,w){w.props=Gd(h.type,h.memoizedProps),w.state=h.memoizedState;try{w.componentWillUnmount()}catch(k){mn(h,g,k)}}function Xd(h,g){try{var w=h.ref;if(w!==null){var k=h.stateNode;switch(h.tag){case 26:case 27:case 5:var M=k;break;default:M=k}typeof w=="function"?h.refCleanup=w(M):w.current=M}}catch(P){mn(h,g,P)}}function fo(h,g){var w=h.ref,k=h.refCleanup;if(w!==null)if(typeof k=="function")try{k()}catch(M){mn(h,g,M)}finally{h.refCleanup=null,h=h.alternate,h!=null&&(h.refCleanup=null)}else if(typeof w=="function")try{w(null)}catch(M){mn(h,g,M)}else w.current=null}function _z(h){var g=h.type,w=h.memoizedProps,k=h.stateNode;try{e:switch(g){case"button":case"input":case"select":case"textarea":w.autoFocus&&k.focus();break e;case"img":w.src?k.src=w.src:w.srcSet&&(k.srcset=w.srcSet)}}catch(M){mn(h,h.return,M)}}function Az(h,g,w){try{var k=h.stateNode;oxe(k,h.type,w,g),k[zn]=g}catch(M){mn(h,h.return,M)}}function Nz(h){return h.tag===5||h.tag===3||h.tag===26||h.tag===27||h.tag===4}function t8(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||Nz(h.return))return null;h=h.return}
vendor: 6,056 bytes, line 48
48for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&h.tag!==27&&h.tag!==18;){if(h.flags&2||h.child===null||h.tag===4)continue e;h.child.return=h,h=h.child}if(!(h.flags&2))return h.stateNode}}function n8(h,g,w){var k=h.tag;if(k===5||k===6)h=h.stateNode,g?w.nodeType===8?w.parentNode.insertBefore(h,g):w.insertBefore(h,g):(w.nodeType===8?(g=w.parentNode,g.insertBefore(h,w)):(g=w,g.appendChild(h)),w=w._reactRootContainer,w!=null||g.onclick!==null||(g.onclick=bx));else if(k!==4&&k!==27&&(h=h.child,h!==null))for(n8(h,g,w),h=h.sibling;h!==null;)n8(h,g,w),h=h.sibling}function sx(h,g,w){var k=h.tag;if(k===5||k===6)h=h.stateNode,g?w.insertBefore(h,g):w.appendChild(h);else if(k!==4&&k!==27&&(h=h.child,h!==null))for(sx(h,g,w),h=h.sibling;h!==null;)sx(h,g,w),h=h.sibling}var Cl=!1,qn=!1,r8=!1,jz=typeof WeakSet=="function"?WeakSet:Set,Ir=null,Tz=!1;function Dbe(h,g){if(h=h.containerInfo,M8=_x,h=GL(h),o6(h)){if("selectionStart"in h)var w={start:h.selectionStart,end:h.selectionEnd};else e:{w=(w=h.ownerDocument)&&w.defaultView||window;var k=w.getSelection&&w.getSelection();if(k&&k.rangeCount!==0){w=k.anchorNode;var M=k.anchorOffset,P=k.focusNode;k=k.focusOffset;try{w.nodeType,P.nodeType}catch{w=null;break e}var q=0,Z=-1,te=-1,ce=0,ve=0,Ee=h,he=null;t:for(;;){for(var ge;Ee!==w||M!==0&&Ee.nodeType!==3||(Z=q+M),Ee!==P||k!==0&&Ee.nodeType!==3||(te=q+k),Ee.nodeType===3&&(q+=Ee.nodeValue.length),(ge=Ee.firstChild)!==null;)he=Ee,Ee=ge;for(;;){if(Ee===h)break t;if(he===w&&++ce===M&&(Z=q),he===P&&++ve===k&&(te=q),(ge=Ee.nextSibling)!==null)break;Ee=he,he=Ee.parentNode}Ee=ge}w=Z===-1||te===-1?null:{start:Z,end:te}}else w=null}w=w||{start:0,end:0}}else w=null;for(O8={focusedElem:h,selectionRange:w},_x=!1,Ir=g;Ir!==null;)if(g=Ir,h=g.child,(g.subtreeFlags&1028)!==0&&h!==null)h.return=g,Ir=h;else for(;Ir!==null;){switch(g=Ir,P=g.alternate,h=g.flags,g.tag){case 0:break;case 11:case 15:break;case 1:if((h&1024)!==0&&P!==null){h=void 0,w=g,M=P.memoizedProps,P=P.memoizedState,k=w.stateNode;try{var Ke=Gd(w.type,M,w.elementType===w.type);h=k.getSnapshotBeforeUpdate(Ke,P),k.__reactInternalSnapshotBeforeUpdate=h}catch(ft){mn(w,w.return,ft)}}break;case 3:if((h&1024)!==0){if(h=g.stateNode.containerInfo,w=h.nodeType,w===9)I8(h);else if(w===1)switch(h.nodeName){case"HEAD":case"HTML":case"BODY":I8(h);break;default:h.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((h&1024)!==0)throw Error(r(163))}if(h=g.sibling,h!==null){h.return=g.return,Ir=h;break}Ir=g.return}return Ke=Tz,Tz=!1,Ke}function Mz(h,g,w){var k=w.flags;switch(w.tag){case 0:case 11:case 15:El(h,w),k&4&&tg(5,w);break;case 1:if(El(h,w),k&4)if(h=w.stateNode,g===null)try{h.componentDidMount()}catch(Z){mn(w,w.return,Z)}else{var M=Gd(w.type,g.memoizedProps);g=g.memoizedState;try{h.componentDidUpdate(M,g,h.__reactInternalSnapshotBeforeUpdate)}catch(Z){mn(w,w.return,Z)}}k&64&&Ez(w),k&512&&Xd(w,w.return);break;case 3:if(El(h,w),k&64&&(k=w.updateQueue,k!==null)){if(h=null,w.child!==null)switch(w.child.tag){case 27:case 5:h=w.child.stateNode;break;case 1:h=w.child.stateNode}try{Sz(k,h)}catch(Z){mn(w,w.return,Z)}}break;case 26:El(h,w),k&512&&Xd(w,w.return);break;case 27:case 5:El(h,w),g===null&&k&4&&_z(w),k&512&&Xd(w,w.return);break;case 12:El(h,w);break;case 13:El(h,w),k&4&&Pz(h,w);break;case 22:if(M=w.memoizedState!==null||Cl,!M){g=g!==null&&g.memoizedState!==null||qn;var P=Cl,q=qn;Cl=M,(qn=g)&&!q?Kc(h,w,(w.subtreeFlags&8772)!==0):El(h,w),Cl=P,qn=q}k&512&&(w.memoizedProps.mode==="manual"?Xd(w,w.return):fo(w,w.return));break;default:El(h,w)}}function Oz(h){var g=h.alternate;g!==null&&(h.alternate=null,Oz(g)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(g=h.stateNode,g!==null&&_m(g)),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}var lr=null,ho=!1;function Sl(h,g,w){for(w=w.child;w!==null;)Rz(h,g,w),w=w.sibling}function Rz(h,g,w){if(en&&typeof en.onCommitFiberUnmount=="function")try{en.onCommitFiberUnmount(wr,w)}catch{}switch(w.tag){case 26:qn||fo(w,g),Sl(h,g,w),w.memoizedState?w.memoizedState.count--:w.stateNode&&(w=w.stateNode,w.parentNode.removeChild(w));break;case 27:qn||fo(w,g);var k=lr,M=ho;for(lr=w.stateNode,Sl(h,g,w),w=w.stateNode,g=w.attributes;g.length;)w.removeAttributeNode(g[0]);_m(w),lr=k,ho=M;break;case 5:qn||fo(w,g);case 6:M=lr;var P=ho;if(lr=null,Sl(h,g,w),lr=M,ho=P,lr!==null)if(ho)try{h=lr,k=w.stateNode,h.nodeType===8?h.parentNode.removeChild(k):h.removeChild(k)}catch(q){mn(w,g,q)}else try{lr.removeChild(w.stateNode)}catch(q){mn(w,g,q)}break;case 18:lr!==null&&(ho?(g=lr,w=w.stateNode,g.nodeType===8?D8(g.parentNode,w):g.nodeType===1&&D8(g,w),bg(g)):D8(lr,w.stateNode));break;case 4:k=lr,M=ho,lr=w.stateNode.containerInfo,ho=!0,Sl(h,g,w),lr=k,ho=M;break;case 0:case 11:case 14:case 15:qn||Gc(2,w,g),qn||Gc(4,w,g),Sl(h,g,w);break;case 1:qn||(fo(w,g),k=w.stateNode,typeof k.componentWillUnmount=="function"&&kz(w,g,k)),Sl(h,g,w);break;case 21:Sl(h,g,w);break;case 22:qn||fo(w,g),qn=(k=qn)||w.memoizedState!==null,Sl(h,g,w),qn=k;break;default:Sl(h,g,w)}}function Pz(h,g){if(g.memoizedState===null&&(h=g.alternate,h!==null&&(h=h.memoizedState,h!==null&&(h=h.dehydrated,h!==null))))try{bg(h)}catch(w){mn(g,g.return,w)}}function Ibe(h){switch(h.tag){case 13:case 19:var g=h.stateNode;return g===null&&(g=h.stateNode=new jz),g;case 22:return h=h.stateNode,g=h._retryCache,g===null&&(g=h._retryCache=new jz),g;default:throw Error(r(435,h.tag))}}function i8(h,g){var w=Ibe(h);g.forEach(function(k){var M=Ybe.bind(null,h,k);w.has(k)||(w.add(k),k.then(M,M))})}function Bo(h,g){var w=g.deletions;if(w!==null)for(var k=0;k<w.length;k++){var M=w[k],P=h,q=g,Z=q;e:for(;Z!==null;){switch(Z.tag){case 27:case 5:lr=Z.stateNode,ho=!1;break e;case 3:lr=Z.stateNode.containerInfo,ho=!0;break e;case 4:lr=Z.stateNode.containerInfo,ho=!0;break e}Z=Z.return}if(lr===null)throw Error(r(160));Rz(P,q,M),lr=null,ho=!1,P=M.alternate,P!==null&&(P.return=null),M.return=null}if(g.subtreeFlags&13878)for(g=g.child;g!==null;
vendor: 4,807 bytes, line 48
48)Dz(g,h),g=g.sibling}var _s=null;function Dz(h,g){var w=h.alternate,k=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:Bo(g,h),Ho(h),k&4&&(Gc(3,h,h.return),tg(3,h),Gc(5,h,h.return));break;case 1:Bo(g,h),Ho(h),k&512&&(qn||w===null||fo(w,w.return)),k&64&&Cl&&(h=h.updateQueue,h!==null&&(k=h.callbacks,k!==null&&(w=h.shared.hiddenCallbacks,h.shared.hiddenCallbacks=w===null?k:w.concat(k))));break;case 26:var M=_s;if(Bo(g,h),Ho(h),k&512&&(qn||w===null||fo(w,w.return)),k&4){var P=w!==null?w.memoizedState:null;if(k=h.memoizedState,w===null)if(k===null)if(h.stateNode===null){e:{k=h.type,w=h.memoizedProps,M=M.ownerDocument||M;t:switch(k){case"title":P=M.getElementsByTagName("title")[0],(!P||P[Od]||P[kn]||P.namespaceURI==="http://www.w3.org/2000/svg"||P.hasAttribute("itemprop"))&&(P=M.createElement(k),M.head.insertBefore(P,M.querySelector("head > title"))),Yr(P,k,w),P[kn]=h,or(P),k=P;break e;case"link":var q=_F("link","href",M).get(k+(w.href||""));if(q){for(var Z=0;Z<q.length;Z++)if(P=q[Z],P.getAttribute("href")===(w.href==null?null:w.href)&&P.getAttribute("rel")===(w.rel==null?null:w.rel)&&P.getAttribute("title")===(w.title==null?null:w.title)&&P.getAttribute("crossorigin")===(w.crossOrigin==null?null:w.crossOrigin)){q.splice(Z,1);break t}}P=M.createElement(k),Yr(P,k,w),M.head.appendChild(P);break;case"meta":if(q=_F("meta","content",M).get(k+(w.content||""))){for(Z=0;Z<q.length;Z++)if(P=q[Z],P.getAttribute("content")===(w.content==null?null:""+w.content)&&P.getAttribute("name")===(w.name==null?null:w.name)&&P.getAttribute("property")===(w.property==null?null:w.property)&&P.getAttribute("http-equiv")===(w.httpEquiv==null?null:w.httpEquiv)&&P.getAttribute("charset")===(w.charSet==null?null:w.charSet)){q.splice(Z,1);break t}}P=M.createElement(k),Yr(P,k,w),M.head.appendChild(P);break;default:throw Error(r(468,k))}P[kn]=h,or(P),k=P}h.stateNode=k}else AF(M,h.type,h.stateNode);else h.stateNode=kF(M,k,h.memoizedProps);else P!==k?(P===null?w.stateNode!==null&&(w=w.stateNode,w.parentNode.removeChild(w)):P.count--,k===null?AF(M,h.type,h.stateNode):kF(M,k,h.memoizedProps)):k===null&&h.stateNode!==null&&Az(h,h.memoizedProps,w.memoizedProps)}break;case 27:if(k&4&&h.alternate===null){M=h.stateNode,P=h.memoizedProps;try{for(var te=M.firstChild;te;){var ce=te.nextSibling,ve=te.nodeName;te[Od]||ve==="HEAD"||ve==="BODY"||ve==="SCRIPT"||ve==="STYLE"||ve==="LINK"&&te.rel.toLowerCase()==="stylesheet"||M.removeChild(te),te=ce}for(var Ee=h.type,he=M.attributes;he.length;)M.removeAttributeNode(he[0]);Yr(M,Ee,P),M[kn]=h,M[zn]=P}catch(Ke){mn(h,h.return,Ke)}}case 5:if(Bo(g,h),Ho(h),k&512&&(qn||w===null||fo(w,w.return)),h.flags&32){M=h.stateNode;try{kh(M,"")}catch(Ke){mn(h,h.return,Ke)}}k&4&&h.stateNode!=null&&(M=h.memoizedProps,Az(h,M,w!==null?w.memoizedProps:M)),k&1024&&(r8=!0);break;case 6:if(Bo(g,h),Ho(h),k&4){if(h.stateNode===null)throw Error(r(162));k=h.memoizedProps,w=h.stateNode;try{w.nodeValue=k}catch(Ke){mn(h,h.return,Ke)}}break;case 3:if(Sx=null,M=_s,_s=wx(g.containerInfo),Bo(g,h),_s=M,Ho(h),k&4&&w!==null&&w.memoizedState.isDehydrated)try{bg(g.containerInfo)}catch(Ke){mn(h,h.return,Ke)}r8&&(r8=!1,Iz(h));break;case 4:k=_s,_s=wx(h.stateNode.containerInfo),Bo(g,h),Ho(h),_s=k;break;case 12:Bo(g,h),Ho(h);break;case 13:Bo(g,h),Ho(h),h.child.flags&8192&&h.memoizedState!==null!=(w!==null&&w.memoizedState!==null)&&(h8=me()),k&4&&(k=h.updateQueue,k!==null&&(h.updateQueue=null,i8(h,k)));break;case 22:if(k&512&&(qn||w===null||fo(w,w.return)),te=h.memoizedState!==null,ce=w!==null&&w.memoizedState!==null,ve=Cl,Ee=qn,Cl=ve||te,qn=Ee||ce,Bo(g,h),qn=Ee,Cl=ve,Ho(h),g=h.stateNode,g._current=h,g._visibility&=-3,g._visibility|=g._pendingVisibility&2,k&8192&&(g._visibility=te?g._visibility&-2:g._visibility|1,te&&(g=Cl||qn,w===null||ce||g||Hh(h)),h.memoizedProps===null||h.memoizedProps.mode!=="manual"))e:for(w=null,g=h;;){if(g.tag===5||g.tag===26||g.tag===27){if(w===null){ce=w=g;try{if(M=ce.stateNode,te)P=M.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{q=ce.stateNode,Z=ce.memoizedProps.style;var ge=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;q.style.display=ge==null||typeof ge=="boolean"?"":(""+ge).trim()}}catch(Ke){mn(ce,ce.return,Ke)}}}else if(g.tag===6){if(w===null){ce=g;try{ce.stateNode.nodeValue=te?"":ce.memoizedProps}catch(Ke){mn(ce,ce.return,Ke)}}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===h)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===h)break e;for(;g.sibling===null;){if(g.return===null||g.return===h)break e;w===g&&(w=null),g=g.return}w===g&&(w=null),g.sibling.return=g.return,g=g.sibling}k&4&&(k=h.updateQueue,k!==null&&(w=k.retryQueue,w!==null&&(k.retryQueue=null,i8(h,w))));break;case 19:Bo(g,h),Ho(h),k&4&&(k=h.updateQueue,k!==null&&(h.updateQueue=null,i8(h,
vendor: 4,438 bytes, line 48
48k)));break;case 21:break;default:Bo(g,h),Ho(h)}}function Ho(h){var g=h.flags;if(g&2){try{if(h.tag!==27){e:{for(var w=h.return;w!==null;){if(Nz(w)){var k=w;break e}w=w.return}throw Error(r(160))}switch(k.tag){case 27:var M=k.stateNode,P=t8(h);sx(h,P,M);break;case 5:var q=k.stateNode;k.flags&32&&(kh(q,""),k.flags&=-33);var Z=t8(h);sx(h,Z,q);break;case 3:case 4:var te=k.stateNode.containerInfo,ce=t8(h);n8(h,ce,te);break;default:throw Error(r(161))}}}catch(ve){mn(h,h.return,ve)}h.flags&=-3}g&4096&&(h.flags&=-4097)}function Iz(h){if(h.subtreeFlags&1024)for(h=h.child;h!==null;){var g=h;Iz(g),g.tag===5&&g.flags&1024&&g.stateNode.reset(),h=h.sibling}}function El(h,g){if(g.subtreeFlags&8772)for(g=g.child;g!==null;)Mz(h,g.alternate,g),g=g.sibling}function Hh(h){for(h=h.child;h!==null;){var g=h;switch(g.tag){case 0:case 11:case 14:case 15:Gc(4,g,g.return),Hh(g);break;case 1:fo(g,g.return);var w=g.stateNode;typeof w.componentWillUnmount=="function"&&kz(g,g.return,w),Hh(g);break;case 26:case 27:case 5:fo(g,g.return),Hh(g);break;case 22:fo(g,g.return),g.memoizedState===null&&Hh(g);break;default:Hh(g)}h=h.sibling}}function Kc(h,g,w){for(w=w&&(g.subtreeFlags&8772)!==0,g=g.child;g!==null;){var k=g.alternate,M=h,P=g,q=P.flags;switch(P.tag){case 0:case 11:case 15:Kc(M,P,w),tg(4,P);break;case 1:if(Kc(M,P,w),k=P,M=k.stateNode,typeof M.componentDidMount=="function")try{M.componentDidMount()}catch(ce){mn(k,k.return,ce)}if(k=P,M=k.updateQueue,M!==null){var Z=k.stateNode;try{var te=M.shared.hiddenCallbacks;if(te!==null)for(M.shared.hiddenCallbacks=null,M=0;M<te.length;M++)Cz(te[M],Z)}catch(ce){mn(k,k.return,ce)}}w&&q&64&&Ez(P),Xd(P,P.return);break;case 26:case 27:case 5:Kc(M,P,w),w&&k===null&&q&4&&_z(P),Xd(P,P.return);break;case 12:Kc(M,P,w);break;case 13:Kc(M,P,w),w&&q&4&&Pz(M,P);break;case 22:P.memoizedState===null&&Kc(M,P,w),Xd(P,P.return);break;default:Kc(M,P,w)}g=g.sibling}}function o8(h,g){var w=null;h!==null&&h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(w=h.memoizedState.cachePool.pool),h=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(h=g.memoizedState.cachePool.pool),h!==w&&(h!=null&&h.refCount++,w!=null&&qm(w))}function s8(h,g){h=null,g.alternate!==null&&(h=g.alternate.memoizedState.cache),g=g.memoizedState.cache,g!==h&&(g.refCount++,h!=null&&qm(h))}function Yc(h,g,w,k){if(g.subtreeFlags&10256)for(g=g.child;g!==null;)Lz(h,g,w,k),g=g.sibling}function Lz(h,g,w,k){var M=g.flags;switch(g.tag){case 0:case 11:case 15:Yc(h,g,w,k),M&2048&&tg(9,g);break;case 3:Yc(h,g,w,k),M&2048&&(h=null,g.alternate!==null&&(h=g.alternate.memoizedState.cache),g=g.memoizedState.cache,g!==h&&(g.refCount++,h!=null&&qm(h)));break;case 12:if(M&2048){Yc(h,g,w,k),h=g.stateNode;try{var P=g.memoizedProps,q=P.id,Z=P.onPostCommit;typeof Z=="function"&&Z(q,g.alternate===null?"mount":"update",h.passiveEffectDuration,-0)}catch(te){mn(g,g.return,te)}}else Yc(h,g,w,k);break;case 23:break;case 22:P=g.stateNode,g.memoizedState!==null?P._visibility&4?Yc(h,g,w,k):ng(h,g):P._visibility&4?Yc(h,g,w,k):(P._visibility|=4,Vh(h,g,w,k,(g.subtreeFlags&10256)!==0)),M&2048&&o8(g.alternate,g);break;case 24:Yc(h,g,w,k),M&2048&&s8(g.alternate,g);break;default:Yc(h,g,w,k)}}function Vh(h,g,w,k,M){for(M=M&&(g.subtreeFlags&10256)!==0,g=g.child;g!==null;){var P=h,q=g,Z=w,te=k,ce=q.flags;switch(q.tag){case 0:case 11:case 15:Vh(P,q,Z,te,M),tg(8,q);break;case 23:break;case 22:var ve=q.stateNode;q.memoizedState!==null?ve._visibility&4?Vh(P,q,Z,te,M):ng(P,q):(ve._visibility|=4,Vh(P,q,Z,te,M)),M&&ce&2048&&o8(q.alternate,q);break;case 24:Vh(P,q,Z,te,M),M&&ce&2048&&s8(q.alternate,q);break;default:Vh(P,q,Z,te,M)}g=g.sibling}}function ng(h,g){if(g.subtreeFlags&10256)for(g=g.child;g!==null;){var w=h,k=g,M=k.flags;switch(k.tag){case 22:ng(w,k),M&2048&&o8(k.alternate,k);break;case 24:ng(w,k),M&2048&&s8(k.alternate,k);break;default:ng(w,k)}g=g.sibling}}var rg=8192;function Uh(h){if(h.subtreeFlags&rg)for(h=h.child;h!==null;)$z(h),h=h.sibling}function $z(h){switch(h.tag){case 26:Uh(h),h.flags&rg&&h.memoizedState!==null&&Exe(_s,h.memoizedState,h.memoizedProps);break;case 5:Uh(h);break;case 3:case 4:var g=_s;_s=wx(h.stateNode.containerInfo),Uh(h),_s=g;break;case 22:h.memoizedState===null&&(g=h.alternate,g!==null&&g.memoizedState!==null?(g=rg,rg=16777216,Uh(h),rg=g):Uh(h));break;default:Uh(h)}}function zz(h){var g=h.alternate;if(g!==null&&(h=g.child,h!==null)){g.child=null;do g=h.sibling,h.sibling=null,h=g;while(h!==null)}}
vendor: 4,406 bytes, line 48
48function ig(h){var g=h.deletions;if((h.flags&16)!==0){if(g!==null)for(var w=0;w<g.length;w++){var k=g[w];Ir=k,Bz(k,h)}zz(h)}if(h.subtreeFlags&10256)for(h=h.child;h!==null;)Fz(h),h=h.sibling}function Fz(h){switch(h.tag){case 0:case 11:case 15:ig(h),h.flags&2048&&Gc(9,h,h.return);break;case 3:ig(h);break;case 12:ig(h);break;case 22:var g=h.stateNode;h.memoizedState!==null&&g._visibility&4&&(h.return===null||h.return.tag!==13)?(g._visibility&=-5,ax(h)):ig(h);break;default:ig(h)}}function ax(h){var g=h.deletions;if((h.flags&16)!==0){if(g!==null)for(var w=0;w<g.length;w++){var k=g[w];Ir=k,Bz(k,h)}zz(h)}for(h=h.child;h!==null;){switch(g=h,g.tag){case 0:case 11:case 15:Gc(8,g,g.return),ax(g);break;case 22:w=g.stateNode,w._visibility&4&&(w._visibility&=-5,ax(g));break;default:ax(g)}h=h.sibling}}function Bz(h,g){for(;Ir!==null;){var w=Ir;switch(w.tag){case 0:case 11:case 15:Gc(8,w,g);break;case 23:case 22:if(w.memoizedState!==null&&w.memoizedState.cachePool!==null){var k=w.memoizedState.cachePool.pool;k!=null&&k.refCount++}break;case 24:qm(w.memoizedState.cache)}if(k=w.child,k!==null)k.return=w,Ir=k;else e:for(w=h;Ir!==null;){k=Ir;var M=k.sibling,P=k.return;if(Oz(k),k===w){Ir=null;break e}if(M!==null){M.return=P,Ir=M;break e}Ir=P}}}function Lbe(h,g,w,k){this.tag=h,this.key=w,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vo(h,g,w,k){return new Lbe(h,g,w,k)}function a8(h){return h=h.prototype,!(!h||!h.isReactComponent)}function Xc(h,g){var w=h.alternate;return w===null?(w=Vo(h.tag,g,h.key,h.mode),w.elementType=h.elementType,w.type=h.type,w.stateNode=h.stateNode,w.alternate=h,h.alternate=w):(w.pendingProps=g,w.type=h.type,w.flags=0,w.subtreeFlags=0,w.deletions=null),w.flags=h.flags&31457280,w.childLanes=h.childLanes,w.lanes=h.lanes,w.child=h.child,w.memoizedProps=h.memoizedProps,w.memoizedState=h.memoizedState,w.updateQueue=h.updateQueue,g=h.dependencies,w.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},w.sibling=h.sibling,w.index=h.index,w.ref=h.ref,w.refCleanup=h.refCleanup,w}function Hz(h,g){h.flags&=31457282;var w=h.alternate;return w===null?(h.childLanes=0,h.lanes=g,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=w.childLanes,h.lanes=w.lanes,h.child=w.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=w.memoizedProps,h.memoizedState=w.memoizedState,h.updateQueue=w.updateQueue,h.type=w.type,g=w.dependencies,h.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext}),h}function lx(h,g,w,k,M,P){var q=0;if(k=h,typeof h=="function")a8(h)&&(q=1);else if(typeof h=="string")q=Cxe(h,w,ae.current)?26:h==="html"||h==="head"||h==="body"?27:5;else e:switch(h){case l:return Zd(w.children,M,P,g);case c:q=8,M|=24;break;case d:return h=Vo(12,w,g,M|2),h.elementType=d,h.lanes=P,h;case v:return h=Vo(13,w,g,M),h.elementType=v,h.lanes=P,h;case b:return h=Vo(19,w,g,M),h.elementType=b,h.lanes=P,h;case E:return Vz(w,M,P,g);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case f:case m:q=10;break e;case p:q=9;break e;case y:q=11;break e;case C:q=14;break e;case S:q=16,k=null;break e}q=29,w=Error(r(130,h===null?"null":typeof h,"")),k=null}return g=Vo(q,w,g,M),g.elementType=h,g.type=k,g.lanes=P,g}function Zd(h,g,w,k){return h=Vo(7,h,k,g),h.lanes=w,h}function Vz(h,g,w,k){h=Vo(22,h,k,g),h.elementType=E,h.lanes=w;var M={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var P=M._current;if(P===null)throw Error(r(456));if((M._pendingVisibility&2)===0){var q=$c(P,2);q!==null&&(M._pendingVisibility|=2,Ai(q,P,2))}},attach:function(){var P=M._current;if(P===null)throw Error(r(456));if((M._pendingVisibility&2)!==0){var q=$c(P,2);q!==null&&(M._pendingVisibility&=-3,Ai(q,P,2))}}};return h.stateNode=M,h}function l8(h,g,w){return h=Vo(6,h,null,g),h.lanes=w,h}function c8(h,g,w){return g=Vo(4,h.children!==null?h.children:[],h.key,g),g.lanes=w,g.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},g}function kl(h){h.flags|=4}
vendor: 13,749 bytes, line 48
48function Uz(h,g){if(g.type!=="stylesheet"||(g.state.loading&4)!==0)h.flags&=-16777217;else if(h.flags|=16777216,!NF(g)){if(g=Fo.current,g!==null&&(($t&4194176)===$t?ya!==null:($t&62914560)!==$t&&($t&536870912)===0||g!==ya))throw Hm=p6,a$;h.flags|=8192}}function cx(h,g){g!==null&&(h.flags|=4),h.flags&16384&&(g=h.tag!==22?Se():536870912,h.lanes|=g,Wh|=g)}function og(h,g){if(!Ut)switch(h.tailMode){case"hidden":g=h.tail;for(var w=null;g!==null;)g.alternate!==null&&(w=g),g=g.sibling;w===null?h.tail=null:w.sibling=null;break;case"collapsed":w=h.tail;for(var k=null;w!==null;)w.alternate!==null&&(k=w),w=w.sibling;k===null?g||h.tail===null?h.tail=null:h.tail.sibling=null:k.sibling=null}}function Fn(h){var g=h.alternate!==null&&h.alternate.child===h.child,w=0,k=0;if(g)for(var M=h.child;M!==null;)w|=M.lanes|M.childLanes,k|=M.subtreeFlags&31457280,k|=M.flags&31457280,M.return=h,M=M.sibling;else for(M=h.child;M!==null;)w|=M.lanes|M.childLanes,k|=M.subtreeFlags,k|=M.flags,M.return=h,M=M.sibling;return h.subtreeFlags|=k,h.childLanes=w,g}function $be(h,g,w){var k=g.pendingProps;switch(f6(g),g.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fn(g),null;case 1:return Fn(g),null;case 3:return w=g.stateNode,k=null,h!==null&&(k=h.memoizedState.cache),g.memoizedState.cache!==k&&(g.flags|=2048),wl(Sr),ke(),w.pendingContext&&(w.context=w.pendingContext,w.pendingContext=null),(h===null||h.child===null)&&($m(g)?kl(g):h===null||h.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,ks!==null&&(y8(ks),ks=null))),Fn(g),null;case 26:return w=g.memoizedState,h===null?(kl(g),w!==null?(Fn(g),Uz(g,w)):(Fn(g),g.flags&=-16777217)):w?w!==h.memoizedState?(kl(g),Fn(g),Uz(g,w)):(Fn(g),g.flags&=-16777217):(h.memoizedProps!==k&&kl(g),Fn(g),g.flags&=-16777217),null;case 27:it(g),w=pe.current;var M=g.type;if(h!==null&&g.stateNode!=null)h.memoizedProps!==k&&kl(g);else{if(!k){if(g.stateNode===null)throw Error(r(166));return Fn(g),null}h=ae.current,$m(g)?o$(g):(h=xF(M,k,w),g.stateNode=h,kl(g))}return Fn(g),null;case 5:if(it(g),w=g.type,h!==null&&g.stateNode!=null)h.memoizedProps!==k&&kl(g);else{if(!k){if(g.stateNode===null)throw Error(r(166));return Fn(g),null}if(h=ae.current,$m(g))o$(g);else{switch(M=xx(pe.current),h){case 1:h=M.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:h=M.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":h=M.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":h=M.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":h=M.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof k.is=="string"?M.createElement("select",{is:k.is}):M.createElement("select"),k.multiple?h.multiple=!0:k.size&&(h.size=k.size);break;default:h=typeof k.is=="string"?M.createElement(w,{is:k.is}):M.createElement(w)}}h[kn]=g,h[zn]=k;e:for(M=g.child;M!==null;){if(M.tag===5||M.tag===6)h.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===g)break e;for(;M.sibling===null;){if(M.return===null||M.return===g)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}g.stateNode=h;e:switch(Yr(h,w,k),w){case"button":case"input":case"select":case"textarea":h=!!k.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&kl(g)}}return Fn(g),g.flags&=-16777217,null;case 6:if(h&&g.stateNode!=null)h.memoizedProps!==k&&kl(g);else{if(typeof k!="string"&&g.stateNode===null)throw Error(r(166));if(h=pe.current,$m(g)){if(h=g.stateNode,w=g.memoizedProps,k=null,M=_i,M!==null)switch(M.tag){case 27:case 5:k=M.memoizedProps}h[kn]=g,h=!!(h.nodeValue===w||k!==null&&k.suppressHydrationWarning===!0||pF(h.nodeValue,w)),h||Bd(g)}else h=xx(h).createTextNode(k),h[kn]=g,g.stateNode=h}return Fn(g),null;case 13:if(k=g.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(M=$m(g),k!==null&&k.dehydrated!==null){if(h===null){if(!M)throw Error(r(318));if(M=g.memoizedState,M=M!==null?M.dehydrated:null,!M)throw Error(r(317));M[kn]=g}else zm(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;Fn(g),M=!1}else ks!==null&&(y8(ks),ks=null),M=!0;if(!M)return g.flags&256?(yl(g),g):(yl(g),null)}if(yl(g),(g.flags&128)!==0)return g.lanes=w,g;if(w=k!==null,h=h!==null&&h.memoizedState!==null,w){k=g.child,M=null,k.alternate!==null&&k.alternate.memoizedState!==null&&k.alternate.memoizedState.cachePool!==null&&(M=k.alternate.memoizedState.cachePool.pool);var P=null;k.memoizedState!==null&&k.memoizedState.cachePool!==null&&(P=k.memoizedState.cachePool.pool),P!==M&&(k.flags|=2048)}return w!==h&&w&&(g.child.flags|=8192),cx(g,g.updateQueue),Fn(g),null;case 4:return ke(),h===null&&N8(g.stateNode.containerInfo),Fn(g),null;case 10:return wl(g.type),Fn(g),null;case 19:if(oe(Cr),M=g.memoizedState,M===null)return Fn(g),null;if(k=(g.flags&128)!==0,P=M.rendering,P===null)if(k)og(M,!1);else{if(Wn!==0||h!==null&&(h.flags&128)!==0)for(h=g.child;h!==null;){if(P=Wb(h),P!==null){for(g.flags|=128,og(M,!1),h=P.updateQueue,g.updateQueue=h,cx(g,h),g.subtreeFlags=0,h=w,w=g.child;w!==null;)Hz(w,h),w=w.sibling;return J(Cr,Cr.current&1|2),g.child}h=h.sibling}M.tail!==null&&me()>ux&&(g.flags|=128,k=!0,og(M,!1),g.lanes=4194304)}else{if(!k)if(h=Wb(P),h!==null){if(g.flags|=128,k=!0,h=h.updateQueue,g.updateQueue=h,cx(g,h),og(M,!0),M.tail===null&&M.tailMode==="hidden"&&!P.alternate&&!Ut)return Fn(g),null}else 2*me()-M.renderingStartTime>ux&&w!==536870912&&(g.flags|=128,k=!0,og(M,!1),g.lanes=4194304);M.isBackwards?(P.sibling=g.child,g.child=P):(h=M.last,h!==null?h.sibling=P:g.child=P,M.last=P)}return M.tail!==null?(g=M.tail,M.rendering=g,M.tail=g.sibling,M.renderingStartTime=me(),g.sibling=null,h=Cr.current,J(Cr,k?h&1|2:h&1),g):(Fn(g),null);case 22:case 23:return yl(g),g6(),k=g.memoizedState!==null,h!==null?h.memoizedState!==null!==k&&(g.flags|=8192):k&&(g.flags|=8192),k?(w&536870912)!==0&&(g.flags&128)===0&&(Fn(g),g.subtreeFlags&6&&(g.flags|=8192)):Fn(g),w=g.updateQueue,w!==null&&cx(g,w.retryQueue),w=null,h!==null&&h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(w=h.memoizedState.cachePool.pool),k=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(k=g.memoizedState.cachePool.pool),k!==w&&(g.flags|=2048),h!==null&&oe(Vd),null;case 24:return w=null,h!==null&&(w=h.memoizedState.cache),g.memoizedState.cache!==w&&(g.flags|=2048),wl(Sr),Fn(g),null;case 25:return null}throw Error(r(156,g.tag))}function zbe(h,g){switch(f6(g),g.tag){case 1:return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 3:return wl(Sr),ke(),h=g.flags,(h&65536)!==0&&(h&128)===0?(g.flags=h&-65537|128,g):null;case 26:case 27:case 5:return it(g),null;case 13:if(yl(g),h=g.memoizedState,h!==null&&h.dehydrated!==null){if(g.alternate===null)throw Error(r(340));zm()}return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 19:return oe(Cr),null;case 4:return ke(),null;case 10:return wl(g.type),null;case 22:case 23:return yl(g),g6(),h!==null&&oe(Vd),h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 24:return wl(Sr),null;case 25:return null;default:return null}}function qz(h,g){switch(f6(g),g.tag){case 3:wl(Sr),ke();break;case 26:case 27:case 5:it(g);break;case 4:ke();break;case 13:yl(g);break;case 19:oe(Cr);break;case 10:wl(g.type);break;case 22:case 23:yl(g),g6(),h!==null&&oe(Vd);break;case 24:wl(Sr)}}var Fbe={getCacheForType:function(h){var g=li(Sr),w=g.data.get(h);return w===void 0&&(w=h(),g.data.set(h,w)),w}},Bbe=typeof WeakMap=="function"?WeakMap:Map,Bn=0,bn=null,_t=null,$t=0,xn=0,po=null,_l=!1,qh=!1,u8=!1,Al=0,Wn=0,Zc=0,Qd=0,d8=0,Uo=0,Wh=0,sg=null,ba=null,f8=!1,h8=0,ux=1/0,dx=null,Qc=null,fx=!1,Jd=null,ag=0,p8=0,m8=null,lg=0,g8=null;function mo(){if((Bn&2)!==0&&$t!==0)return $t&-$t;if(O.T!==null){var h=Lh;return h!==0?h:E8()}return st()}function Wz(){Uo===0&&(Uo=($t&536870912)===0||Ut?ir():536870912);var h=Fo.current;return h!==null&&(h.flags|=32),Uo}function Ai(h,g,w){(h===bn&&xn===2||h.cancelPendingCommit!==null)&&(Gh(h,0),Nl(h,$t,Uo,!1)),Le(h,w),((Bn&2)===0||h!==bn)&&(h===bn&&((Bn&2)===0&&(Qd|=w),Wn===4&&Nl(h,$t,Uo,!1)),xa(h))}function Gz(h,g,w){if((Bn&6)!==0)throw Error(r(327));var k=!w&&(g&60)===0&&(g&h.expiredLanes)===0||un(h,g),M=k?Ube(h,g):x8(h,g,!0),P=k;do{if(M===0){qh&&!k&&Nl(h,g,0,!1);break}else if(M===6)Nl(h,g,0,!_l);else{if(w=h.current.alternate,P&&!Hbe(w)){M=x8(h,g,!1),P=!1;continue}if(M===2){if(P=g,h.errorRecoveryDisabledLanes&P)var q=0;else q=h.pendingLanes&-536870913,q=q!==0?q:q&536870912?536870912:0;if(q!==0){g=q;e:{var Z=h;M=sg;var te=Z.current.memoizedState.isDehydrated;if(te&&(Gh(Z,q).flags|=256),q=x8(Z,q,!1),q!==2){if(u8&&!te){Z.errorRecoveryDisabledLanes|=P,Qd|=P,M=4;break e}P=ba,ba=M,P!==null&&y8(P)}M=q}if(P=!1,M!==2)continue}}if(M===1){Gh(h,0),Nl(h,g,0,!0);break}e:{switch(k=h,M){case 0:case 1:throw Error(r(345));case 4:if((g&4194176)===g){Nl(k,g,Uo,!_l);break e}break;case 2:ba=null;break;case 3:case 5:break;default:throw Error(r(329))}if(k.finishedWork=w,k.finishedLanes=g,(g&62914560)===g&&(P=h8+300-me(),10<P)){if(Nl(k,g,Uo,!_l),ot(k,0)!==0)break e;k.timeoutHandle=yF(Kz.bind(null,k,w,ba,dx,f8,g,Uo,Qd,Wh,_l,2,-0,0),P);break e}Kz(k,w,ba,dx,f8,g,Uo,Qd,Wh,_l,0,-0,0)}}break}while(!0);xa(h)}function y8(h){ba===null?ba=h:ba.push.apply(ba,h)}function Kz(h,g,w,k,M,P,q,Z,te,ce,ve,Ee,he){var ge=g.subtreeFlags;if((ge&8192||(ge&16785408)===16785408)&&(pg={stylesheets:null,count:0,unsuspend:Sxe},$z(g),g=kxe(),g!==null)){h.cancelPendingCommit=g(tF.bind(null,h,w,k,M,q,Z,te,1,Ee,he)),Nl(h,P,q,!ce);return}tF(h,w,k,M,q,Z,te,ve,Ee,he)}function Hbe(h){for(var g=h;;){var w=g.tag;if((w===0||w===11||w===15)&&g.flags&16384&&(w=g.updateQueue,w!==null&&(w=w.stores,w!==null)))for(var k=0;k<w.length;k++){var M=w[k],P=M.getSnapshot;M=M.value;try{if(!uo(P(),M))return!1}catch{return!1}}if(w=g.child,g.subtreeFlags&16384&&w!==null)w.return=g,g=w;else{if(g===h)break;for(;g.sibling===null;){if(g.return===null||g.return===h)return!0;g=g.return}g.sibling.return=g.return,g=g.sibling}}return!0}function Nl(h,g,w,k){g&=~d8,g&=~Qd,h.suspendedLanes|=g,h.pingedLanes&=~g,k&&(h.warmLanes|=g),k=h.expirationTimes;for(var M=g;0<M;){var P=31-De(M),q=1<<P;k[P]=-1,M&=~q}w!==0&&ut(h,w,g)}function hx(){return(Bn&6)===0?(cg(0),!1):!0}function v8(){if(_t!==null){if(xn===0)var h=_t.return;else h=_t,xl=Kd=null,E6(h),Dh=null,Vm=0,h=_t;for(;h!==null;)qz(h.alternate,h),h=h.return;_t=null}}function Gh(h,g){h.finishedWork=null,h.finishedLanes=0;var w=h.timeoutHandle;w!==-1&&(h.timeoutHandle=-1,axe(w)),w=h.cancelPendingCommit,w!==null&&(h.cancelPendingCommit=null,w()),v8(),bn=h,_t=w=Xc(h.current,null),$t=g,xn=0,po=null,_l=!1,qh=un(h,g),u8=!1,Wh=Uo=d8=Qd=Zc=Wn=0,ba=sg=null,f8=!1,(g&8)!==0&&(g|=g&32);var k=h.entangledLanes;if(k!==0)for(h=h.entanglements,k&=g;0<k;){var M=31-De(k),P=1<<M;g|=h[M],k&=~P}return Al=g,Lb(),w}function Yz(h,g){Ct=null,O.H=va,g===Bm?(g=u$(),xn=3):g===a$?(g=u$(),xn=4):xn=g===lz?8:g!==null&&typeof g=="object"&&typeof g.then=="function"?6:1,po=g,_t===null&&(Wn=1,rx(h,Lo(g,h.current)))}function Xz(){var h=O.H;return O.H=va,h===null?va:h}function Zz(){var h=O.A;return O.A=Fbe,h}function b8(){Wn=4,_l||($t&4194176)!==$t&&Fo.current!==null||(qh=!0),(Zc&134217727)===0&&(Qd&134217727)===0||bn===null||Nl(bn,$t,Uo,!1)}function x8(h,g,w){var k=Bn;Bn|=2;var M=Xz(),P=Zz();(bn!==h||$t!==g)&&(dx=null,Gh(h,g)),g=!1;var q=Wn;e:do try{if(xn!==0&&_t!==null){var Z=_t,te=po;switch(xn){case 8:v8(),q=6;break e;case 3:case 2:case 6:Fo.current===null&&(g=!0);var ce=xn;if(xn=0,po=null,Kh(h,Z,te,ce),w&&qh){q=0;break e}break;default:ce=xn,xn=0,po=null,Kh(h,Z,te,ce)}}Vbe(),q=Wn;break}catch(ve){Yz(h,ve)}while(!0);return g&&h.shellSuspendCounter++,xl=Kd=null,Bn=k,O.H=M,O.A=P,_t===null&&(bn=null,$t=0,Lb()),q}function Vbe(){for(;_t!==null;)Qz(_t)}function Ube(h,g){var w=Bn;Bn|=2;var k=Xz(),M=Zz();bn!==h||$t!==g?(dx=null,ux=me()+500,Gh(h,g)):qh=un(h,g);e:do try{if(xn!==0&&_t!==null){g=_t;var P=po;t:switch(xn){case 1:xn=0,po=null,Kh(h,g,P,1);break;case 2:if(l$(P)){xn=0,po=null,Jz(g);break}g=function(){xn===2&&bn===h&&(xn=7),xa(h)},P.then(g,g);break e;case 3:xn=7;break e;case 4:xn=5;break e;case 7:l$(P)?(xn=0,po=null,Jz(g)):(xn=0,po=null,Kh(h,g,P,7));break;case 5:var q=null;switch(_t.tag){case 26:q=_t.memoizedState;case 5:case 27:var Z=_t;if(!q||NF(q)){xn=0,po=null;var te=Z.sibling;if(te!==null)_t=te;else{var ce=Z.return;ce!==null?(_t=ce,px(ce)):_t=null}break t}}xn=0,po=null,Kh(h,g,P,5);break;case 6:xn=0,po=null,Kh(h,g,P,6);break;case 8:v8(),Wn=6;break e;default:throw Error(r(462))}}qbe();break}catch(ve){Yz(h,ve)}while(!0);return xl=Kd=null,O.H=k,O.A=M,Bn=w,_t!==null?0:(bn=null,$t=0,Lb(),Wn)}function qbe(){for(;_t!==null&&!ee();)Qz(_t)}function Qz(h){var g=xz(h.alternate,h,Al);h.memoizedProps=h.pendingProps,g===null?px(h):_t=g}function Jz(h){var g=h,w=g.alternate;switch(g.tag){case 15:case 0:g=pz(w,g,g.pendingProps,g.type,void 0,$t);break;case 11:g=pz(w,g,g.pendingProps,g.type.render,g.ref,$t);break;case 5:E6(g);default:qz(w,g),g=_t=Hz(g,Al),g=xz(w,g,Al)}h.memoizedProps=h.pendingProps,g===null?px(h):_t=g}function Kh(h,g,w,k){xl=Kd=null,E6(g),Dh=null,Vm=0;var M=g.return;try{if(Rbe(h,M,g,w,$t)){Wn=1,rx(h,Lo(w,h.current)),_t=null;return}}catch(P){if(M!==null)throw _t=M,P;Wn=1,rx(h,Lo(w,h.current)),_t=null;return}g.flags&32768?(Ut||k===1?h=!0:qh||($t&536870912)!==0?h=!1:(_l=h=!0,(k===2||k===3||k===6)&&(k=Fo.current,k!==null&&k.tag===13&&(k.flags|=16384))),eF(g,h)):px(g)}function px(h){var g=h;do{if((g.flags&32768)!==0){eF(g,_l);return}h=g.return;var w=$be(g.alternate,g,Al);if(w!==null){_t=w;return}if(g=g.sibling,g!==null){_t=g;return}_t=g=h}while(g!==null);Wn===0&&(Wn=5)}function eF(h,g){do{var w=zbe(h.alternate,h);if(w!==null){w.flags&=32767,_t=w;return}if(w=h.return,w!==null&&(w.flags|=32768,w.subtreeFlags=0,w.deleti
48ons=null),!g&&(h=h.sibling,h!==null)){_t=h;return}_t=h=w}while(h!==null);Wn=6,_t=null}function tF(h,g,w,k,M,P,q,Z,te,ce){var ve=O.T,Ee=X.p;try{X.p=2,O.T=null,Wbe(h,g,w,k,Ee,M,P,q,Z,te,ce)}finally{O.T=ve,X.p=Ee}}function Wbe(h,g,w,k,M,P,q,Z){do Yh();while(Jd!==null);if((Bn&6)!==0)throw Error(r(327));var te=h.finishedWork;if(k=h.finishedLanes,te===null)return null;if(h.finishedWork=null,h.finishedLanes=0,te===h.current)throw Error(r(177));h.callbackNode=null,h.callbackPriority=0,h.cancelPendingCommit=null;var ce=te.lanes|te.childLanes;if(ce|=c6,tt(h,k,ce,P,q,Z),h===bn&&(_t=bn=null,$t=0),(te.subtreeFlags&10256)===0&&(te.flags&10256)===0||fx||(fx=!0,p8=ce,m8=w,Xbe(Oe,function(){return Yh(),null})),w=(te.flags&15990)!==0,(te.subtreeFlags&15990)!==0||w?(w=O.T,O.T=null,P=X.p,X.p=2,q=Bn,Bn|=4,Dbe(h,te),Dz(te,h),gbe(O8,h.containerInfo),_x=!!M8,O8=M8=null,h.current=te,Mz(h,te.alternate,te),ue(),Bn=q,X.p=P,O.T=w):h.current=te,fx?(fx=!1,Jd=h,ag=k):nF(h,ce),ce=h.pendingLanes,ce===0&&(Qc=null),Rr(te.stateNode),xa(h),g!==null)for(M=h.onRecoverableError,te=0;te<g.length;te++)ce=g[te],M(ce.value,{componentStack:ce.stack});return(ag&3)!==0&&Yh(),ce=h.pendingLanes,(k&4194218)!==0&&(ce&42)!==0?h===g8?lg++:(lg=0,g8=h):lg=0,cg(0),null}function nF(h,g){(h.pooledCacheLanes&=g)===0&&(g=h.pooledCache,g!=null&&(h.pooledCache=null,qm(g)))}function Yh(){if(Jd!==null){var h=Jd,g=p8;p8=0;var w=Zt(ag),k=O.T,M=X.p;try{if(X.p=32>w?32:w,O.T=null,Jd===null)var P=!1;else{w=m8,m8=null;var q=Jd,Z=ag;if(Jd=null,ag=0,(Bn&6)!==0)throw Error(r(331));var te=Bn;if(Bn|=4,Fz(q.current),Lz(q,q.current,Z,w),Bn=te,cg(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(wr,q)}catch{}P=!0}return P}finally{X.p=M,O.T=k,nF(h,g)}}return!1}function rF(h,g,w){g=Lo(w,g),g=$6(h.stateNode,g,2),h=Wc(h,g,2),h!==null&&(Le(h,2),xa(h))}function mn(h,g,w){if(h.tag===3)rF(h,h,w);else for(;g!==null;){if(g.tag===3){rF(g,h,w);break}else if(g.tag===1){var k=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof k.componentDidCatch=="function"&&(Qc===null||!Qc.has(k))){h=Lo(w,h),w=sz(2),k=Wc(g,w,2),k!==null&&(az(w,k,g,h),Le(k,2),xa(k));break}}g=g.return}}function w8(h,g,w){var k=h.pingCache;if(k===null){k=h.pingCache=new Bbe;var M=new Set;k.set(g,M)}else M=k.get(g),M===void 0&&(M=new Set,k.set(g,M));M.has(w)||(u8=!0,M.add(w),h=Gbe.bind(null,h,g,w),g.then(h,h))}function Gbe(h,g,w){var k=h.pingCache;k!==null&&k.delete(g),h.pingedLanes|=h.suspendedLanes&w,h.warmLanes&=~w,bn===h&&($t&w)===w&&(Wn===4||Wn===3&&($t&62914560)===$t&&300>me()-h8?(Bn&2)===0&&Gh(h,0):d8|=w,Wh===$t&&(Wh=0)),xa(h)}function iF(h,g){g===0&&(g=Se()),h=$c(h,g),h!==null&&(Le(h,g),xa(h))}function Kbe(h){var g=h.memoizedState,w=0;g!==null&&(w=g.retryLane),iF(h,w)}function Ybe(h,g){var w=0;switch(h.tag){case 13:var k=h.stateNode,M=h.memoizedState;M!==null&&(w=M.retryLane);break;case 19:k=h.stateNode;break;case 22:k=h.stateNode._retryCache;break;default:throw Error(r(314))}k!==null&&k.delete(g),iF(h,w)}function Xbe(h,g){return $n(h,g)}var mx=null,Xh=null,C8=!1,gx=!1,S8=!1,ef=0;function xa(h){h!==Xh&&h.next===null&&(Xh===null?mx=Xh=h:Xh=Xh.next=h),gx=!0,C8||(C8=!0,Qbe(Zbe))}function cg(h,g){if(!S8&&gx){S8=!0;do for(var w=!1,k=mx;k!==null;){if(h!==0){var M=k.pendingLanes;if(M===0)var P=0;else{var q=k.suspendedLanes,Z=k.pingedLanes;P=(1<<31-De(42|h)+1)-1,P&=M&~(q&~Z),P=P&201326677?P&201326677|1:P?P|2:0}P!==0&&(w=!0,aF(k,P))}else P=$t,P=ot(k,k===bn?P:0),(P&3)===0||un(k,P)||(w=!0,aF(k,P));k=k.next}while(w);S8=!1}}function Zbe(){gx=C8=!1;var h=0;ef!==0&&(sxe()&&(h=ef),ef=0);for(var g=me(),w=null,k=mx;k!==null;){var M=k.next,P=oF(k,g);P===0?(k.next=null,w===null?mx=M:w.next=M,M===null&&(Xh=w)):(w=k,(h!==0||(P&3)!==0)&&(gx=!0)),k=M}cg(h)}function oF(h,g){for(var w=h.suspendedLanes,k=h.pingedLanes,M=h.expirationTimes,P=h.pendingLanes&-62914561;0<P;){var q=31-De(P),Z=1<<q,te=M[q];te===-1?((Z&w)===0||(Z&k)!==0)&&(M[q]=Un(Z,g)):te<=g&&(h.expiredLanes|=Z),P&=~Z}if(g=bn,w=$t,w=ot(h,h===g?w:0),k=h.callbackNode,w===0||h===g&&xn===2||h.cancelPendingCommit!==null)return k!==null&&k!==null&&Vt(k),h.callbackNode=null,h.callbackPriority=0;
vendor: 12,650 bytes, lines 48-49
48if((w&3)===0||un(h,w)){if(g=w&-w,g===h.callbackPriority)return g;switch(k!==null&&Vt(k),Zt(w)){case 2:case 8:w=_e;break;case 32:w=Oe;break;case 268435456:w=vt;break;default:w=Oe}return k=sF.bind(null,h),w=$n(w,k),h.callbackPriority=g,h.callbackNode=w,g}return k!==null&&k!==null&&Vt(k),h.callbackPriority=2,h.callbackNode=null,2}function sF(h,g){var w=h.callbackNode;if(Yh()&&h.callbackNode!==w)return null;var k=$t;return k=ot(h,h===bn?k:0),k===0?null:(Gz(h,k,g),oF(h,me()),h.callbackNode!=null&&h.callbackNode===w?sF.bind(null,h):null)}function aF(h,g){if(Yh())return null;Gz(h,g,!0)}function Qbe(h){lxe(function(){(Bn&6)!==0?$n(Ae,h):h()})}function E8(){return ef===0&&(ef=ir()),ef}function lF(h){return h==null||typeof h=="symbol"||typeof h=="boolean"?null:typeof h=="function"?h:Tb(""+h)}function cF(h,g){var w=g.ownerDocument.createElement("input");return w.name=g.name,w.value=g.value,h.id&&w.setAttribute("form",h.id),g.parentNode.insertBefore(w,g),h=new FormData(h),w.parentNode.removeChild(w),h}function Jbe(h,g,w,k,M){if(g==="submit"&&w&&w.stateNode===M){var P=lF((M[zn]||null).action),q=k.submitter;q&&(g=(g=q[zn]||null)?lF(g.formAction):q.getAttribute("formAction"),g!==null&&(P=g,q=null));var Z=new Pb("action","action",null,k,M);h.push({event:Z,listeners:[{instance:null,listener:function(){if(k.defaultPrevented){if(ef!==0){var te=q?cF(M,q):new FormData(M);R6(w,{pending:!0,data:te,method:M.method,action:P},null,te)}}else typeof P=="function"&&(Z.preventDefault(),te=q?cF(M,q):new FormData(M),R6(w,{pending:!0,data:te,method:M.method,action:P},P,te))},currentTarget:M}]})}}for(var k8=0;k8<t$.length;k8++){var _8=t$[k8],exe=_8.toLowerCase(),txe=_8[0].toUpperCase()+_8.slice(1);Es(exe,"on"+txe)}Es(XL,"onAnimationEnd"),Es(ZL,"onAnimationIteration"),Es(QL,"onAnimationStart"),Es("dblclick","onDoubleClick"),Es("focusin","onFocus"),Es("focusout","onBlur"),Es(vbe,"onTransitionRun"),Es(bbe,"onTransitionStart"),Es(xbe,"onTransitionCancel"),Es(JL,"onTransitionEnd"),Ic("onMouseEnter",["mouseout","mouseover"]),Ic("onMouseLeave",["mouseout","mouseover"]),Ic("onPointerEnter",["pointerout","pointerover"]),Ic("onPointerLeave",["pointerout","pointerover"]),fl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fl("onBeforeInput",["compositionend","keypress","textInput","paste"]),fl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ug="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(" "),nxe=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ug));function uF(h,g){g=(g&4)!==0;for(var w=0;w<h.length;w++){var k=h[w],M=k.event;k=k.listeners;e:{var P=void 0;if(g)for(var q=k.length-1;0<=q;q--){var Z=k[q],te=Z.instance,ce=Z.currentTarget;if(Z=Z.listener,te!==P&&M.isPropagationStopped())break e;P=Z,M.currentTarget=ce;try{P(M)}catch(ve){nx(ve)}M.currentTarget=null,P=te}else for(q=0;q<k.length;q++){if(Z=k[q],te=Z.instance,ce=Z.currentTarget,Z=Z.listener,te!==P&&M.isPropagationStopped())break e;P=Z,M.currentTarget=ce;try{P(M)}catch(ve){nx(ve)}M.currentTarget=null,P=te}}}}function Rt(h,g){var w=g[Do];w===void 0&&(w=g[Do]=new Set);var k=h+"__bubble";w.has(k)||(dF(g,h,2,!1),w.add(k))}function A8(h,g,w){var k=0;g&&(k|=4),dF(w,h,k,g)}var yx="_reactListening"+Math.random().toString(36).slice(2);function N8(h){if(!h[yx]){h[yx]=!0,Eb.forEach(function(w){w!=="selectionchange"&&(nxe.has(w)||A8(w,!1,h),A8(w,!0,h))});var g=h.nodeType===9?h:h.ownerDocument;g===null||g[yx]||(g[yx]=!0,A8("selectionchange",!1,g))}}function dF(h,g,w,k){switch(PF(g)){case 2:var M=Nxe;break;case 8:M=jxe;break;default:M=B8}w=M.bind(null,g,w,h),M=void 0,!XS||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(M=!0),k?M!==void 0?h.addEventListener(g,w,{capture:!0,passive:M}):h.addEventListener(g,w,!0):M!==void 0?h.addEventListener(g,w,{passive:M}):h.addEventListener(g,w,!1)}function j8(h,g,w,k,M){var P=k;if((g&1)===0&&(g&2)===0&&k!==null)e:for(;;){if(k===null)return;var q=k.tag;if(q===3||q===4){var Z=k.stateNode.containerInfo;if(Z===M||Z.nodeType===8&&Z.parentNode===M)break;if(q===4)for(q=k.return;q!==null;){var te=q.tag;if((te===3||te===4)&&(te=q.stateNode.containerInfo,te===M||te.nodeType===8&&te.parentNode===M))return;q=q.return}for(;Z!==null;){if(q=ul(Z),q===null)return;if(te=q.tag,te===5||te===6||te===26||te===27){k=P=q;continue e}Z=Z.parentNode}}k=k.return}_L(function(){var ce=P,ve=KS(w),Ee=[];e:{var he=e$.get(h);if(he!==void 0){var ge=Pb,Ke=h;switch(h){case"keypress":if(Ob(w)===0)break e;case"keydown":case"keyup":ge=Yve;break;case"focusin":Ke="focus",ge=e6;break;case"focusout":Ke="blur",ge=e6;break;case"beforeblur":case"afterblur":ge=e6;break;case"click":if(w.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ge=jL;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ge=Lve;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ge=Qve;break;case XL:case ZL:case QL:ge=Fve;break;case JL:ge=ebe;break;case"scroll":case"scrollend":ge=Dve;break;case"wheel":ge=nbe;break;case"copy":case"cut":case"paste":ge=Hve;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ge=ML;break;case"toggle":case"beforetoggle":ge=ibe}var ft=(g&4)!==0,Gn=!ft&&(h==="scroll"||h==="scrollend"),de=ft?he!==null?he+"Capture":null:he;ft=[];for(var le=ce,fe;le!==null;){var Ce=le;if(fe=Ce.stateNode,Ce=Ce.tag,Ce!==5&&Ce!==26&&Ce!==27||fe===null||de===null||(Ce=jm(le,de),Ce!=null&&ft.push(dg(le,Ce,fe))),Gn)break;le=le.return}0<ft.length&&(he=new ge(he,Ke,null,w,ve),Ee.push({event:he,listeners:ft}))}}if((g&7)===0){e:{if(he=h==="mouseover"||h==="pointerover",ge=h==="mouseout"||h==="pointerout",he&&w!==GS&&(Ke=w.relatedTarget||w.fromElement)&&(ul(Ke)||Ke[xs]))break e;if((ge||he)&&(he=ve.window===ve?ve:(he=ve.ownerDocument)?he.defaultView||he.parentWindow:window,ge?(Ke=w.relatedTarget||w.toElement,ge=ce,Ke=Ke?ul(Ke):null,Ke!==null&&(Gn=z(Ke),ft=Ke.tag,Ke!==Gn||ft!==5&&ft!==27&&ft!==6)&&(Ke=null)):(ge=null,Ke=ce),ge!==Ke)){if(ft=jL,Ce="onMouseLeave",de="onMouseEnter",le="mouse",(h==="pointerout"||h==="pointerover")&&(ft=ML,Ce="onPointerLeave",de="onPointerEnter",le="pointer"),Gn=ge==null?he:Rd(ge),fe=Ke==null?he:Rd(Ke),he=new ft(Ce,le+"leave",ge,w,ve),he.target=Gn,he.relatedTarget=fe,Ce=null,ul(ve)===ce&&(ft=new ft(de,le+"enter",Ke,w,ve),ft.target=fe,ft.relatedTarget=Gn,Ce=ft),Gn=Ce,ge&&Ke)t:{for(ft=ge,de=Ke,le=0,fe=ft;fe;fe=Zh(fe))le++;for(fe=0,Ce=de;Ce;Ce=Zh(Ce))fe++;for(;0<le-fe;)ft=Zh(ft),le--;for(;0<fe-le;)de=Zh(de),fe--;for(;le--;){if(ft===de||de!==null&&ft===de.alternate)break t;ft=Zh(ft),de=Zh(de)}ft=null}else ft=null;ge!==null&&fF(Ee,he,ge,ft,!1),Ke!==null&&Gn!==null&&fF(Ee,Gn,Ke,ft,!0)}}e:{if(he=ce?Rd(ce):window,ge=he.nodeName&&he.nodeName.toLowerCase(),ge==="select"||ge==="input"&&he.type==="file")var Be=zL;else if(LL(he))if(FL)Be=pbe;else{Be=fbe;var kt=dbe}else ge=he.nodeName,!ge||ge.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?ce&&WS(ce.elementType)&&(Be=zL):Be=hbe;if(Be&&(Be=Be(h,ce))){$L(Ee,Be,w,ve);break e}kt&&kt(h,he,ce),h==="focusout"&&ce&&he.type==="number"&&ce.memoizedProps.value!=null&&Nm(he,"number",he.value)}switch(kt=ce?Rd(ce):window,h){case"focusin":(LL(kt)||kt.contentEditable==="true")&&(jh=kt,s6=ce,Lm=null);break;case"focusout":Lm=s6=jh=null;break;case"mousedown":a6=!0;break;case"contextmenu":case"mouseup":case"dragend":a6=!1,KL(Ee,w,ve);break;case"selectionchange":if(ybe)break;case"keydown":case"keyup":KL(Ee,w,ve)}var Ze;if(n6)e:{switch(h){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else Nh?DL(h,w)&&(nt="onCompositionEnd"):h==="keydown"&&w.keyCode===229&&(nt="onCompositionStart");nt&&(OL&&w.locale!=="ko"&&(Nh||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&Nh&&(Ze=AL()):(Lc=ve,ZS="value"in Lc?Lc.value:Lc.textContent,Nh=!0)),kt=vx(ce,nt),0<kt.length&&(nt=new TL(nt,h,null,w,ve),Ee.push({event:nt,listeners:kt}),Ze?nt.data=Ze:(Ze=IL(w),Ze!==null&&(nt.data=Ze)))),(Ze=sbe?abe(h,w):lbe(h,w))&&(nt=vx(ce,"onBeforeInput"),0<nt.length&&(kt=new TL("onBeforeInput","beforeinput",null,w,ve),Ee.push({event:kt,listeners:nt}),kt.data=Ze)),Jbe(Ee,h,ce,w,ve)}uF(Ee,g)})}function dg(h,g,w){return{instance:h,listener:g,currentTarget:w}}function vx(h,g){for(var w=g+"Capture",k=[];h!==null;){var M=h,P=M.stateNode;M=M.tag,M!==5&&M!==26&&M!==27||P===null||(M=jm(h,w),M!=null&&k.unshift(dg(h,M,P)),M=jm(h,g),M!=null&&k.push(dg(h,M,P))),h=h.return}return k}function Zh(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5&&h.tag!==27);return h||null}function fF(h,g,w,k,M){for(var P=g._reactName,q=[];w!==null&&w!==k;){var Z=w,te=Z.alternate,ce=Z.stateNode;if(Z=Z.tag,te!==null&&te===k)break;Z!==5&&Z!==26&&Z!==27||ce===null||(te=ce,M?(ce=jm(w,P),ce!=null&&q.unshift(dg(w,ce,te))):M||(ce=jm(w,P),ce!=null&&q.push(dg(w,ce,te)))),w=w.return}q.length!==0&&h.push({event:g,listeners:q})}var rxe=/\r\n?/g,ixe=/\u0000|\uFFFD/g;function hF(h){return(typeof h=="string"?h:""+h).replace(rxe,` 49`).replace(ixe,"")}function pF(h,g){return g=hF(g),hF(h)===g}function bx(){}function fn(h,g,w,k,M,P){switch(w){case"children":typeof k=="string"?g==="body"||g==="textarea"&&k===""||kh(h,k):(typeof k=="number"||typeof k=="bigint")&&g!=="body"&&kh(h,""+k);break;case"className":Eh(h,"class",k);break;case"tabIndex":Eh(h,"tabindex",k);break;case"dir":case"role":case"viewBox":case"width":case"height":Eh(h,w,k);break;case"style":EL(h,k,P);break;case"data":if(g!=="object"){Eh(h,"data",k);break}case"src":case"href":if(k===""&&(g!=="a"||w!=="href")){h.removeAttribute(w);break}if(k==null||typeof k=="function"||typeof k=="symbol"||typeof k=="boolean"){h.removeAttribute(w);break}k=Tb(""+k),h.setAttribute(w,k);break;case"action":case"formAction":if(typeof k=="function"){h.setAttribute(w,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof P=="function"&&(w==="formAction"?(g!=="input"&&fn(h,g,"name",M.name,M,null),fn(h,g,"formEncType",M.formEncType,M,null),fn(h,g,"formMethod",M.formMethod,M,null),fn(h,g,"formTarget",M.formTarget,M,null)):(fn(h,g,"encType",M.encType,M,null),fn(h,g,"method",M.method,M,null),fn(h,g,"target",M.target,M,null)));if(k==null||typeof k=="symbol"||typeof k=="boolean"){h.removeAttribute(w);break}k=Tb(""+k),h.setAttribute(w,k);break;case"onClick":k!=null&&(h.onclick=bx);break;case"onScroll":k!=null&&Rt("scroll",h);break;case"onScrollEnd":k!=null&&Rt("scrollend",h);break;case"dangerouslySetInnerHTML":if(k!=null){if(typeof k!="object"||!("__html"in k))throw Error(r(61));if(w=k.__html,w!=null){if(M.children!=null)throw Error(r(60));h.innerHTML=w}}break;case"multiple":h.multiple=k&&typeof k!="function"&&typeof k!="symbol";break;case"muted":h.muted=k&&typeof k!="function"&&typeof k!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(k==null||typeof k=="function"||typeof k=="boolean"||typeof k=="symbol"){h.removeAttribute("xlink:href");break}w=Tb(""+k),h.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",w);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":k!=null&&typeof k!="function"&&typeof k!="symbol"?h.setAttribute(w,""+k):h.removeAttribute(w);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":k&&typeof k!="function"&&typeof k!="symbol"?h.setAttribute(w,""):h.removeAttribute(w);break;case"capture":case"download":k===!0?h.setAttribute(w,""):k!==!1&&k!=null&&typeof k!="function"&&typeof k!="symbol"?h.setAttribute(w,k):h.removeAttribute(w);break;case"cols":case"rows":case"size":case"span":k!=null&&typeof k!="function"&&typeof k!="symbol"&&!isNaN(k)&&1<=k?h.setAttribute(w,k):h.removeAttribute(w);break;case"rowSpan":case"start":k==null||typeof k=="function"||typeof k=="symbol"||isNaN(k)?h.removeAttribute(w):h.setAttribute(w,k);break;case"popover":Rt("beforetoggle",h),Rt("toggle",h),Sh(h,"popover",k);break;case"xlinkActuate":Ss(h,"http://www.w3.org/1999/xlink","xlink:actuate",k);break;case"xlinkArcrole":Ss(h,"http://www.w3.org/1999/xlink","xlink:arcrole",k);break;case"xlinkRole":Ss(h,"http://www.w3.org/1999/xlink","xlink:role",k);break;case"xlinkShow":Ss(h,"http://www.w3.org/1999/xlink","xlink:show",k);break;case"xlinkTitle":Ss(h,"http://www.w3.org/1999/xlink","xlink:title",k);break;case"xlinkType":Ss(h,"http://www.w3.org/1999/xlink","xlink:type",k);break;case"xmlBase":Ss(h,"http://www.w3.org/XML/1998/namespace","xml:base",k);break;case"xmlLang":Ss(h,"http://www.w3.org/XML/1998/namespace","xml:lang",k);break;case"xmlSpace":Ss(h,"http://www.w3.org/XML/1998/namespace","xml:space",k);break;case"is":Sh(h,"is",k);break;case"innerText":case"textContent":break;default:(!(2<w.length)||w[0]!=="o"&&w[0]!=="O"||w[1]!=="n"&&w[1]!=="N")&&(w=Rve.get(w)||w,Sh(h,w,k))}}function T8(h,g,w,k,M,P){switch(w){case"style":EL(h,k,P);break;case"dangerouslySetInnerHTML":if(k!=null){if(typeof k!="object"||!("__html"in k))throw Error(r(61));if(w=k.__html,w!=null){if(M.children!=null)throw Error(r(60));h.innerHTML=w}}break;case"children":typeof k=="string"?kh(h,k):(typeof k=="number"||typeof k=="bigint")&&kh(h,""+k);break;case"onScroll":k!=null&&Rt("scroll",h);break;case"onScrollEnd":k!=null&&Rt("scrollend",h);break;case"onClick":k!=null&&(h.onclick=bx);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!kb.hasOwnProperty(w))e:{if(w[0]==="o"&&w[1]==="n"&&(M=w.endsWith("Capture"),g=w.slice(2,M?w.length-7:void 0),P=h[zn]||null,P=P!=null?P[w]:null,typeof P=="function"&&h.removeEventListener(g,P,M),typeof k=="function")){typeof P!="function"&&P!==null&&(w in h?h[w]=null:h.hasAttribute(w)&&h.removeAttribute(w)),h.addEventListener(g,k,M);break e}w in h?h[w]=k:k===!0?h.setAttribute(w,""):Sh(h,w,k)}}}function Yr(h,g,w){switch(g){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Rt("error",h),Rt("load",h);var k=!1,M=!1,P;for(P in w)if(w.hasOwnProperty(P)){var q=w[P];if(q!=null)switch(P){case"src":k=!0;break;case"srcSet":M=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,g));default:fn(h,g,P,q,w,null)}}M&&fn(h,g,"srcSet",w.srcSet,w,null),k&&fn(h,g,"src",w.src,w,null);return;case"input":Rt("invalid",h);var Z=P=q=M=null,te=null,ce=null;for(k in w)if(w.hasOwnProperty(k)){var ve=w[k];if(ve!=null)switch(k){case"name":M=ve;break;case"type":q=ve;break;case"checked":te=ve;break;case"defaultChecked":ce=ve;break;case"value":P=ve;break;case"defaultValue":Z=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,g));break;default:fn(h,g,k,ve,w,null)}}jb(h,P,Z,te,ce,q,M,!1),hl(h);return;case"select":Rt("invalid",h),k=q=P=null;for(M in w)if(w.hasOwnProperty(M)&&(Z=w[M],Z!=null))switch(M){case"value":P=Z;break;case"defaultValue":q=Z;break;case"multiple":k=Z;default:fn(h,g,M,Z,w,null)}g=P,w=q,h.multiple=!!k,g!=null?pl(h,!!k,g,!1):w!=null&&pl(h,!!k,w,!0);return;case"textarea":Rt("invalid",h),P=M=k=null;for(q in w)if(w.hasOwnProperty(q)&&(Z=w[q],Z!=null))switch(q){case"value":k=Z;break;case"defaultValue":M=Z;break;case"children":P=Z;break;case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(91));break;default:fn(h,g,q,Z,w,null)}CL(h,k,M,P),hl(h);return;case"option":for(te in w)if(w.hasOwnProperty(te)&&(k=w[te],k!=null))switch(te){case"selected":h.selected=k&&typeof k!="function"&&typeof k!="symbol";break;default:fn(h,g,te,k,w,null)}return;case"dialog":Rt("cancel",h),Rt("close",h);break;case"iframe":case"object":Rt("load",h);break;case"video":case"audio":for(k=0;k<ug.length;k++)Rt(ug[k],h);break;case"image":Rt("error",h),Rt("load",h);break;case"details":Rt("toggle",h);break;case"embed":case"source":case"link":Rt("error",h),Rt("load",h);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ce in w)if(w.hasOwnProperty(ce)&&(k=w[ce],k!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,g));default:fn(h,g,ce,k,w,null)}return;default:if(WS(g)){for(ve in w)w.hasOwnProperty(ve)&&(k=w[ve],k!==void 0&&T8(h,g,ve,k,w,void 0));return}}for(Z in w)w.hasOwnProperty(Z)&&(k=w[Z],k!=null&&fn(h,g,Z,k,w,null))}function oxe(h,g,w,k){switch(g){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var M=null,P=null,q=null,Z=null,te=null,ce=null,ve=null;for(ge in w){var Ee=w[ge];if(w.hasOwnProperty(ge)&&Ee!=null)switch(ge){case"checked":break;case"value":break;case"defaultValue":te=Ee;default:k.hasOwnProperty(ge)||fn(h,g,ge,null,k,Ee)}}for(var he in k){var ge=k[he];if(Ee=w[he],k.hasOwnProperty(he)&&(ge!=null||Ee!=null))switch(he){case"type":P=ge;break;case"name":M=ge;break;case"checked":ce=ge;break;case"defaultChecked":ve=ge;break;case"value":q=ge;break;case"defaultValue":Z=ge;break;case"children":case"dangerouslySetInnerHTML":if(ge!=null)throw Error(r(137,g));break;default:ge!==Ee&&fn(h,g,he,ge,k,Ee)}}Dd(h,q,Z,te,ce,ve,P,M);return;case"select":ge=q=Z=he=null;
vendor: 5,158 bytes, line 49
49for(P in w)if(te=w[P],w.hasOwnProperty(P)&&te!=null)switch(P){case"value":break;case"multiple":ge=te;default:k.hasOwnProperty(P)||fn(h,g,P,null,k,te)}for(M in k)if(P=k[M],te=w[M],k.hasOwnProperty(M)&&(P!=null||te!=null))switch(M){case"value":he=P;break;case"defaultValue":Z=P;break;case"multiple":q=P;default:P!==te&&fn(h,g,M,P,k,te)}g=Z,w=q,k=ge,he!=null?pl(h,!!w,he,!1):!!k!=!!w&&(g!=null?pl(h,!!w,g,!0):pl(h,!!w,w?[]:"",!1));return;case"textarea":ge=he=null;for(Z in w)if(M=w[Z],w.hasOwnProperty(Z)&&M!=null&&!k.hasOwnProperty(Z))switch(Z){case"value":break;case"children":break;default:fn(h,g,Z,null,k,M)}for(q in k)if(M=k[q],P=w[q],k.hasOwnProperty(q)&&(M!=null||P!=null))switch(q){case"value":he=M;break;case"defaultValue":ge=M;break;case"children":break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(r(91));break;default:M!==P&&fn(h,g,q,M,k,P)}wL(h,he,ge);return;case"option":for(var Ke in w)if(he=w[Ke],w.hasOwnProperty(Ke)&&he!=null&&!k.hasOwnProperty(Ke))switch(Ke){case"selected":h.selected=!1;break;default:fn(h,g,Ke,null,k,he)}for(te in k)if(he=k[te],ge=w[te],k.hasOwnProperty(te)&&he!==ge&&(he!=null||ge!=null))switch(te){case"selected":h.selected=he&&typeof he!="function"&&typeof he!="symbol";break;default:fn(h,g,te,he,k,ge)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ft in w)he=w[ft],w.hasOwnProperty(ft)&&he!=null&&!k.hasOwnProperty(ft)&&fn(h,g,ft,null,k,he);for(ce in k)if(he=k[ce],ge=w[ce],k.hasOwnProperty(ce)&&he!==ge&&(he!=null||ge!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,g));break;default:fn(h,g,ce,he,k,ge)}return;default:if(WS(g)){for(var Gn in w)he=w[Gn],w.hasOwnProperty(Gn)&&he!==void 0&&!k.hasOwnProperty(Gn)&&T8(h,g,Gn,void 0,k,he);for(ve in k)he=k[ve],ge=w[ve],!k.hasOwnProperty(ve)||he===ge||he===void 0&&ge===void 0||T8(h,g,ve,he,k,ge);return}}for(var de in w)he=w[de],w.hasOwnProperty(de)&&he!=null&&!k.hasOwnProperty(de)&&fn(h,g,de,null,k,he);for(Ee in k)he=k[Ee],ge=w[Ee],!k.hasOwnProperty(Ee)||he===ge||he==null&&ge==null||fn(h,g,Ee,he,k,ge)}var M8=null,O8=null;function xx(h){return h.nodeType===9?h:h.ownerDocument}function mF(h){switch(h){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function gF(h,g){if(h===0)switch(g){case"svg":return 1;case"math":return 2;default:return 0}return h===1&&g==="foreignObject"?0:h}function R8(h,g){return h==="textarea"||h==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.children=="bigint"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var P8=null;function sxe(){var h=window.event;return h&&h.type==="popstate"?h===P8?!1:(P8=h,!0):(P8=null,!1)}var yF=typeof setTimeout=="function"?setTimeout:void 0,axe=typeof clearTimeout=="function"?clearTimeout:void 0,vF=typeof Promise=="function"?Promise:void 0,lxe=typeof queueMicrotask=="function"?queueMicrotask:typeof vF<"u"?function(h){return vF.resolve(null).then(h).catch(cxe)}:yF;function cxe(h){setTimeout(function(){throw h})}function D8(h,g){var w=g,k=0;do{var M=w.nextSibling;if(h.removeChild(w),M&&M.nodeType===8)if(w=M.data,w==="/$"){if(k===0){h.removeChild(M),bg(g);return}k--}else w!=="$"&&w!=="$?"&&w!=="$!"||k++;w=M}while(w);bg(g)}function I8(h){var g=h.firstChild;for(g&&g.nodeType===10&&(g=g.nextSibling);g;){var w=g;switch(g=g.nextSibling,w.nodeName){case"HTML":case"HEAD":case"BODY":I8(w),_m(w);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(w.rel.toLowerCase()==="stylesheet")continue}h.removeChild(w)}}function uxe(h,g,w,k){for(;h.nodeType===1;){var M=w;if(h.nodeName.toLowerCase()!==g.toLowerCase()){if(!k&&(h.nodeName!=="INPUT"||h.type!=="hidden"))break}else if(k){if(!h[Od])switch(g){case"meta":if(!h.hasAttribute("itemprop"))break;return h;case"link":if(P=h.getAttribute("rel"),P==="stylesheet"&&h.hasAttribute("data-precedence"))break;if(P!==M.rel||h.getAttribute("href")!==(M.href==null?null:M.href)||h.getAttribute("crossorigin")!==(M.crossOrigin==null?null:M.crossOrigin)||h.getAttribute("title")!==(M.title==null?null:M.title))break;return h;case"style":if(h.hasAttribute("data-precedence"))break;return h;case"script":if(P=h.getAttribute("src"),(P!==(M.src==null?null:M.src)||h.getAttribute("type")!==(M.type==null?null:M.type)||h.getAttribute("crossorigin")!==(M.crossOrigin==null?null:M.crossOrigin))&&P&&h.hasAttribute("async")&&!h.hasAttribute("itemprop"))break;return h;default:return h}}else if(g==="input"&&h.type==="hidden"){var P=M.name==null?null:""+M.name;if(M.type==="hidden"&&h.getAttribute("name")===P)return h}else return h;if(h=As(h.nextSibling),h===null)break}return null}function dxe(h,g,w){if(g==="")return null;for(;h.nodeType!==3;)if((h.nodeType!==1||h.nodeName!=="INPUT"||h.type!=="hidden")&&!w||(h=As(h.nextSibling),h===null))return null;return h}function As(h){for(;h!=null;h=h.nextSibling){var g=h.nodeType;if(g===1||g===3)break;if(g===8){if(g=h.data,g==="$"||g==="$!"||g==="$?"||g==="F!"||g==="F")break;
vendor: 17,988 bytes, line 49
49if(g==="/$")return null}}return h}function bF(h){h=h.previousSibling;for(var g=0;h;){if(h.nodeType===8){var w=h.data;if(w==="$"||w==="$!"||w==="$?"){if(g===0)return h;g--}else w==="/$"&&g++}h=h.previousSibling}return null}function xF(h,g,w){switch(g=xx(w),h){case"html":if(h=g.documentElement,!h)throw Error(r(452));return h;case"head":if(h=g.head,!h)throw Error(r(453));return h;case"body":if(h=g.body,!h)throw Error(r(454));return h;default:throw Error(r(451))}}var qo=new Map,wF=new Set;function wx(h){return typeof h.getRootNode=="function"?h.getRootNode():h.ownerDocument}var jl=X.d;X.d={f:fxe,r:hxe,D:pxe,C:mxe,L:gxe,m:yxe,X:bxe,S:vxe,M:xxe};function fxe(){var h=jl.f(),g=hx();return h||g}function hxe(h){var g=Dc(h);g!==null&&g.tag===5&&g.type==="form"?K$(g):jl.r(h)}var Qh=typeof document>"u"?null:document;function CF(h,g,w){var k=Qh;if(k&&typeof g=="string"&&g){var M=Hi(g);M='link[rel="'+h+'"][href="'+M+'"]',typeof w=="string"&&(M+='[crossorigin="'+w+'"]'),wF.has(M)||(wF.add(M),h={rel:h,crossOrigin:w,href:g},k.querySelector(M)===null&&(g=k.createElement("link"),Yr(g,"link",h),or(g),k.head.appendChild(g)))}}function pxe(h){jl.D(h),CF("dns-prefetch",h,null)}function mxe(h,g){jl.C(h,g),CF("preconnect",h,g)}function gxe(h,g,w){jl.L(h,g,w);var k=Qh;if(k&&h&&g){var M='link[rel="preload"][as="'+Hi(g)+'"]';g==="image"&&w&&w.imageSrcSet?(M+='[imagesrcset="'+Hi(w.imageSrcSet)+'"]',typeof w.imageSizes=="string"&&(M+='[imagesizes="'+Hi(w.imageSizes)+'"]')):M+='[href="'+Hi(h)+'"]';var P=M;switch(g){case"style":P=Jh(h);break;case"script":P=ep(h)}qo.has(P)||(h=D({rel:"preload",href:g==="image"&&w&&w.imageSrcSet?void 0:h,as:g},w),qo.set(P,h),k.querySelector(M)!==null||g==="style"&&k.querySelector(fg(P))||g==="script"&&k.querySelector(hg(P))||(g=k.createElement("link"),Yr(g,"link",h),or(g),k.head.appendChild(g)))}}function yxe(h,g){jl.m(h,g);var w=Qh;if(w&&h){var k=g&&typeof g.as=="string"?g.as:"script",M='link[rel="modulepreload"][as="'+Hi(k)+'"][href="'+Hi(h)+'"]',P=M;switch(k){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":P=ep(h)}if(!qo.has(P)&&(h=D({rel:"modulepreload",href:h},g),qo.set(P,h),w.querySelector(M)===null)){switch(k){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(w.querySelector(hg(P)))return}k=w.createElement("link"),Yr(k,"link",h),or(k),w.head.appendChild(k)}}}function vxe(h,g,w){jl.S(h,g,w);var k=Qh;if(k&&h){var M=dl(k).hoistableStyles,P=Jh(h);g=g||"default";var q=M.get(P);if(!q){var Z={loading:0,preload:null};if(q=k.querySelector(fg(P)))Z.loading=5;else{h=D({rel:"stylesheet",href:h,"data-precedence":g},w),(w=qo.get(P))&&L8(h,w);var te=q=k.createElement("link");or(te),Yr(te,"link",h),te._p=new Promise(function(ce,ve){te.onload=ce,te.onerror=ve}),te.addEventListener("load",function(){Z.loading|=1}),te.addEventListener("error",function(){Z.loading|=2}),Z.loading|=4,Cx(q,g,k)}q={type:"stylesheet",instance:q,count:1,state:Z},M.set(P,q)}}}function bxe(h,g){jl.X(h,g);var w=Qh;if(w&&h){var k=dl(w).hoistableScripts,M=ep(h),P=k.get(M);P||(P=w.querySelector(hg(M)),P||(h=D({src:h,async:!0},g),(g=qo.get(M))&&$8(h,g),P=w.createElement("script"),or(P),Yr(P,"link",h),w.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},k.set(M,P))}}function xxe(h,g){jl.M(h,g);var w=Qh;if(w&&h){var k=dl(w).hoistableScripts,M=ep(h),P=k.get(M);P||(P=w.querySelector(hg(M)),P||(h=D({src:h,async:!0,type:"module"},g),(g=qo.get(M))&&$8(h,g),P=w.createElement("script"),or(P),Yr(P,"link",h),w.head.appendChild(P)),P={type:"script",instance:P,count:1,state:null},k.set(M,P))}}function SF(h,g,w,k){var M=(M=pe.current)?wx(M):null;if(!M)throw Error(r(446));switch(h){case"meta":case"title":return null;case"style":return typeof w.precedence=="string"&&typeof w.href=="string"?(g=Jh(w.href),w=dl(M).hoistableStyles,k=w.get(g),k||(k={type:"style",instance:null,count:0,state:null},w.set(g,k)),k):{type:"void",instance:null,count:0,state:null};case"link":if(w.rel==="stylesheet"&&typeof w.href=="string"&&typeof w.precedence=="string"){h=Jh(w.href);var P=dl(M).hoistableStyles,q=P.get(h);if(q||(M=M.ownerDocument||M,q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},P.set(h,q),(P=M.querySelector(fg(h)))&&!P._p&&(q.instance=P,q.state.loading=5),qo.has(h)||(w={rel:"preload",as:"style",href:w.href,crossOrigin:w.crossOrigin,integrity:w.integrity,media:w.media,hrefLang:w.hrefLang,referrerPolicy:w.referrerPolicy},qo.set(h,w),P||wxe(M,h,w,q.state))),g&&k===null)throw Error(r(528,""));return q}if(g&&k!==null)throw Error(r(529,""));return null;case"script":return g=w.async,w=w.src,typeof w=="string"&&g&&typeof g!="function"&&typeof g!="symbol"?(g=ep(w),w=dl(M).hoistableScripts,k=w.get(g),k||(k={type:"script",instance:null,count:0,state:null},w.set(g,k)),k):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,h))}}function Jh(h){return'href="'+Hi(h)+'"'}function fg(h){return'link[rel="stylesheet"]['+h+"]"}function EF(h){return D({},h,{"data-precedence":h.precedence,precedence:null})}function wxe(h,g,w,k){h.querySelector('link[rel="preload"][as="style"]['+g+"]")?k.loading=1:(g=h.createElement("link"),k.preload=g,g.addEventListener("load",function(){return k.loading|=1}),g.addEventListener("error",function(){return k.loading|=2}),Yr(g,"link",w),or(g),h.head.appendChild(g))}function ep(h){return'[src="'+Hi(h)+'"]'}function hg(h){return"script[async]"+h}function kF(h,g,w){if(g.count++,g.instance===null)switch(g.type){case"style":var k=h.querySelector('style[data-href~="'+Hi(w.href)+'"]');if(k)return g.instance=k,or(k),k;var M=D({},w,{"data-href":w.href,"data-precedence":w.precedence,href:null,precedence:null});return k=(h.ownerDocument||h).createElement("style"),or(k),Yr(k,"style",M),Cx(k,w.precedence,h),g.instance=k;case"stylesheet":M=Jh(w.href);var P=h.querySelector(fg(M));if(P)return g.state.loading|=4,g.instance=P,or(P),P;k=EF(w),(M=qo.get(M))&&L8(k,M),P=(h.ownerDocument||h).createElement("link"),or(P);var q=P;return q._p=new Promise(function(Z,te){q.onload=Z,q.onerror=te}),Yr(P,"link",k),g.state.loading|=4,Cx(P,w.precedence,h),g.instance=P;case"script":return P=ep(w.src),(M=h.querySelector(hg(P)))?(g.instance=M,or(M),M):(k=w,(M=qo.get(P))&&(k=D({},w),$8(k,M)),h=h.ownerDocument||h,M=h.createElement("script"),or(M),Yr(M,"link",k),h.head.appendChild(M),g.instance=M);case"void":return null;default:throw Error(r(443,g.type))}else g.type==="stylesheet"&&(g.state.loading&4)===0&&(k=g.instance,g.state.loading|=4,Cx(k,w.precedence,h));return g.instance}function Cx(h,g,w){for(var k=w.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),M=k.length?k[k.length-1]:null,P=M,q=0;q<k.length;q++){var Z=k[q];if(Z.dataset.precedence===g)P=Z;else if(P!==M)break}P?P.parentNode.insertBefore(h,P.nextSibling):(g=w.nodeType===9?w.head:w,g.insertBefore(h,g.firstChild))}function L8(h,g){h.crossOrigin==null&&(h.crossOrigin=g.crossOrigin),h.referrerPolicy==null&&(h.referrerPolicy=g.referrerPolicy),h.title==null&&(h.title=g.title)}function $8(h,g){h.crossOrigin==null&&(h.crossOrigin=g.crossOrigin),h.referrerPolicy==null&&(h.referrerPolicy=g.referrerPolicy),h.integrity==null&&(h.integrity=g.integrity)}var Sx=null;function _F(h,g,w){if(Sx===null){var k=new Map,M=Sx=new Map;M.set(w,k)}else M=Sx,k=M.get(w),k||(k=new Map,M.set(w,k));if(k.has(h))return k;for(k.set(h,null),w=w.getElementsByTagName(h),M=0;M<w.length;M++){var P=w[M];if(!(P[Od]||P[kn]||h==="link"&&P.getAttribute("rel")==="stylesheet")&&P.namespaceURI!=="http://www.w3.org/2000/svg"){var q=P.getAttribute(g)||"";q=h+q;var Z=k.get(q);Z?Z.push(P):k.set(q,[P])}}return k}function AF(h,g,w){h=h.ownerDocument||h,h.head.insertBefore(w,g==="title"?h.querySelector("head > title"):null)}function Cxe(h,g,w){if(w===1||g.itemProp!=null)return!1;switch(h){case"meta":case"title":return!0;case"style":if(typeof g.precedence!="string"||typeof g.href!="string"||g.href==="")break;return!0;case"link":if(typeof g.rel!="string"||typeof g.href!="string"||g.href===""||g.onLoad||g.onError)break;switch(g.rel){case"stylesheet":return h=g.disabled,typeof g.precedence=="string"&&h==null;default:return!0}case"script":if(g.async&&typeof g.async!="function"&&typeof g.async!="symbol"&&!g.onLoad&&!g.onError&&g.src&&typeof g.src=="string")return!0}return!1}function NF(h){return!(h.type==="stylesheet"&&(h.state.loading&3)===0)}var pg=null;function Sxe(){}function Exe(h,g,w){if(pg===null)throw Error(r(475));var k=pg;if(g.type==="stylesheet"&&(typeof w.media!="string"||matchMedia(w.media).matches!==!1)&&(g.state.loading&4)===0){if(g.instance===null){var M=Jh(w.href),P=h.querySelector(fg(M));if(P){h=P._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(k.count++,k=Ex.bind(k),h.then(k,k)),g.state.loading|=4,g.instance=P,or(P);return}P=h.ownerDocument||h,w=EF(w),(M=qo.get(M))&&L8(w,M),P=P.createElement("link"),or(P);var q=P;q._p=new Promise(function(Z,te){q.onload=Z,q.onerror=te}),Yr(P,"link",w),g.instance=P}k.stylesheets===null&&(k.stylesheets=new Map),k.stylesheets.set(g,h),(h=g.state.preload)&&(g.state.loading&3)===0&&(k.count++,g=Ex.bind(k),h.addEventListener("load",g),h.addEventListener("error",g))}}function kxe(){if(pg===null)throw Error(r(475));var h=pg;return h.stylesheets&&h.count===0&&z8(h,h.stylesheets),0<h.count?function(g){var w=setTimeout(function(){if(h.stylesheets&&z8(h,h.stylesheets),h.unsuspend){var k=h.unsuspend;h.unsuspend=null,k()}},6e4);return h.unsuspend=g,function(){h.unsuspend=null,clearTimeout(w)}}:null}function Ex(){if(this.count--,this.count===0){if(this.stylesheets)z8(this,this.stylesheets);else if(this.unsuspend){var h=this.unsuspend;this.unsuspend=null,h()}}}var kx=null;function z8(h,g){h.stylesheets=null,h.unsuspend!==null&&(h.count++,kx=new Map,g.forEach(_xe,h),kx=null,Ex.call(h))}function _xe(h,g){if(!(g.state.loading&4)){var w=kx.get(h);if(w)var k=w.get(null);else{w=new Map,kx.set(h,w);for(var M=h.querySelectorAll("link[data-precedence],style[data-precedence]"),P=0;P<M.length;P++){var q=M[P];(q.nodeName==="LINK"||q.getAttribute("media")!=="not all")&&(w.set(q.dataset.precedence,q),k=q)}k&&w.set(null,k)}M=g.instance,q=M.getAttribute("data-precedence"),P=w.get(q)||k,P===k&&w.set(null,M),w.set(q,M),this.count++,k=Ex.bind(this),M.addEventListener("load",k),M.addEventListener("error",k),P?P.parentNode.insertBefore(M,P.nextSibling):(h=h.nodeType===9?h.head:h,h.insertBefore(M,h.firstChild)),g.state.loading|=4}}var mg={$$typeof:m,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function Axe(h,g,w,k,M,P,q,Z){this.tag=1,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Te(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Te(0),this.hiddenUpdates=Te(null),this.identifierPrefix=k,this.onUncaughtError=M,this.onCaughtError=P,this.onRecoverableError=q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Z,this.incompleteTransitions=new Map}function jF(h,g,w,k,M,P,q,Z,te,ce,ve,Ee){return h=new Axe(h,g,w,q,Z,te,ce,Ee),g=1,P===!0&&(g|=24),P=Vo(3,null,null,g),h.current=P,P.stateNode=h,g=y6(),g.refCount++,h.pooledCache=g,g.refCount++,P.memoizedState={element:k,isDehydrated:w,cache:g},Z6(P),h}function TF(h){return h?(h=Oh,h):Oh}function MF(h,g,w,k,M,P){M=TF(M),k.context===null?k.context=M:k.pendingContext=M,k=qc(g),k.payload={element:w},P=P===void 0?null:P,P!==null&&(k.callback=P),w=Wc(h,k,g),w!==null&&(Ai(w,h,g),Qm(w,h,g))}function OF(h,g){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var w=h.retryLane;h.retryLane=w!==0&&w<g?w:g}}function F8(h,g){OF(h,g),(h=h.alternate)&&OF(h,g)}function RF(h){if(h.tag===13){var g=$c(h,67108864);g!==null&&Ai(g,h,67108864),F8(h,67108864)}}var _x=!0;function Nxe(h,g,w,k){var M=O.T;O.T=null;var P=X.p;try{X.p=2,B8(h,g,w,k)}finally{X.p=P,O.T=M}}function jxe(h,g,w,k){var M=O.T;O.T=null;var P=X.p;try{X.p=8,B8(h,g,w,k)}finally{X.p=P,O.T=M}}function B8(h,g,w,k){if(_x){var M=H8(k);if(M===null)j8(h,g,k,Ax,w),DF(h,k);else if(Mxe(M,h,g,w,k))k.stopPropagation();else if(DF(h,k),g&4&&-1<Txe.indexOf(h)){for(;M!==null;){var P=Dc(M);if(P!==null)switch(P.tag){case 3:if(P=P.stateNode,P.current.memoizedState.isDehydrated){var q=Fi(P.pendingLanes);if(q!==0){var Z=P;for(Z.pendingLanes|=2,Z.entangledLanes|=2;q;){var te=1<<31-De(q);Z.entanglements[1]|=te,q&=~te}xa(P),(Bn&6)===0&&(ux=me()+500,cg(0))}}break;case 13:Z=$c(P,2),Z!==null&&Ai(Z,P,2),hx(),F8(P,2)}if(P=H8(k),P===null&&j8(h,g,k,Ax,w),P===M)break;M=P}M!==null&&k.stopPropagation()}else j8(h,g,k,null,w)}}function H8(h){return h=KS(h),V8(h)}var Ax=null;function V8(h){if(Ax=null,h=ul(h),h!==null){var g=z(h);if(g===null)h=null;else{var w=g.tag;if(w===13){if(h=V(g),h!==null)return h;h=null}else if(w===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;h=null}else g!==h&&(h=null)}}return Ax=h,null}function PF(h){switch(h){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(je()){case Ae:return 2;case _e:return 8;case Oe:case dt:return 32;case vt:return 268435456;default:return 32}default:return 32}}var U8=!1,Jc=null,eu=null,tu=null,gg=new Map,yg=new Map,nu=[],Txe="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".split(" ");function DF(h,g){switch(h){case"focusin":case"focusout":Jc=null;break;case"dragenter":case"dragleave":eu=null;break;case"mouseover":case"mouseout":tu=null;break;case"pointerover":case"pointerout":gg.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":yg.delete(g.pointerId)}}function vg(h,g,w,k,M,P){return h===null||h.nativeEvent!==P?(h={blockedOn:g,domEventName:w,eventSystemFlags:k,nativeEvent:P,targetContainers:[M]},g!==null&&(g=Dc(g),g!==null&&RF(g)),h):(h.eventSystemFlags|=k,g=h.targetContainers,M!==null&&g.indexOf(M)===-1&&g.push(M),h)}function Mxe(h,g,w,k,M){switch(g){case"focusin":return Jc=vg(Jc,h,g,w,k,M),!0;case"dragenter":return eu=vg(eu,h,g,w,k,M),!0;case"mouseover":return tu=vg(tu,h,g,w,k,M),!0;case"pointerover":var P=M.pointerId;return gg.set(P,vg(gg.get(P)||null,h,g,w,k,M)),!0;case"gotpointercapture":return P=M.pointerId,yg.set(P,vg(yg.get(P)||null,h,g,w,k,M)),!0}return!1}function IF(h){var g=ul(h.target);if(g!==null){var w=z(g);if(w!==null){if(g=w.tag,g===13){if(g=V(w),g!==null){h.blockedOn=g,ln(h.priority,function(){if(w.tag===13){var k=mo(),M=$c(w,k);M!==null&&Ai(M,w,k),F8(w,k)}});return}}else if(g===3&&w.stateNode.current.memoizedState.isDehydrated){h.blockedOn=w.tag===3?w.stateNode.containerInfo:null;return}}}h.blockedOn=null}function Nx(h){if(h.blockedOn!==null)return!1;for(var g=h.targetContainers;0<g.length;){var w=H8(h.nativeEvent);if(w===null){w=h.nativeEvent;var k=new w.constructor(w.type,w);GS=k,w.target.dispatchEvent(k),GS=null}else return g=Dc(w),g!==null&&RF(g),h.blockedOn=w,!1;g.shift()}return!0}function LF(h,g,w){Nx(h)&&w.delete(g)}function Oxe(){U8=!1,Jc!==null&&Nx(Jc)&&(Jc=null),eu!==null&&Nx(eu)&&(eu=null),tu!==null&&Nx(tu)&&(tu=null),gg.forEach(LF),yg.forEach(LF)}function jx(h,g){h.blockedOn===g&&(h.blockedOn=null,U8||(U8=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Oxe)))}var Tx=null;function $F(h){Tx!==h&&(Tx=h,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Tx===h&&(Tx=null);for(var g=0;g<h.length;g+=3){var w=h[g],k=h[g+1],M=h[g+2];if(typeof k!="function"){if(V8(k||w)===null)continue;break}var P=Dc(w);P!==null&&(h.splice(g,3),g-=3,R6(P,{pending:!0,data:M,method:w.method,action:k},k,M))}}))}function bg(h){function g(te){return jx(te,h)}Jc!==null&&jx(Jc,h),eu!==null&&jx(eu,h),tu!==null&&jx(tu,h),gg.forEach(g),yg.forEach(g);for(var w=0;w<nu.length;w++){var k=nu[w];k.blockedOn===h&&(k.blockedOn=null)}for(;0<nu.length&&(w=nu[0],w.blockedOn===null);)IF(w),w.blockedOn===null&&nu.shift();if(w=(h.ownerDocument||h).$$reactFormReplay,w!=null)for(k=0;k<w.length;k+=3){var M=w[k],P=w[k+1],q=M[zn]||null;if(typeof P=="function")q||$F(w);else if(q){var Z=null;if(P&&P.hasAttribute("formAction")){if(M=P,q=P[zn]||null)Z=q.formAction;else if(V8(M)!==null)continue}else Z=q.action;typeof Z=="function"?w[k+1]=Z:(w.splice(k,3),k-=3),$F(w)}}}function q8(h){this._internalRoot=h}Mx.prototype.render=q8.prototype.render=function(h){var g=this._internalRoot;if(g===null)throw Error(r(409));var w=g.current,k=mo();MF(w,k,h,g,null,null)},Mx.prototype.unmount=q8.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var g=h.containerInfo;
49h.tag===0&&Yh(),MF(h.current,2,null,h,null,null),hx(),g[xs]=null}};function Mx(h){this._internalRoot=h}Mx.prototype.unstable_scheduleHydration=function(h){if(h){var g=st();h={blockedOn:null,target:h,priority:g};for(var w=0;w<nu.length&&g!==0&&g<nu[w].priority;w++);nu.splice(w,0,h),w===0&&IF(h)}};var zF=t.version;if(zF!=="19.0.0")throw Error(r(527,zF,"19.0.0"));X.findDOMNode=function(h){var g=h._reactInternals;if(g===void 0)throw typeof h.render=="function"?Error(r(188)):(h=Object.keys(h).join(","),Error(r(268,h)));return h=W(g),h=h!==null?G(h):null,h=h===null?null:h.stateNode,h};var Rxe={bundleType:0,version:"19.0.0",rendererPackageName:"react-dom",currentDispatcherRef:O,findFiberByHostInstance:ul,reconcilerVersion:"19.0.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ox=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ox.isDisabled&&Ox.supportsFiber)try{wr=Ox.inject(Rxe),en=Ox}catch{}}return wg.createRoot=function(h,g){if(!i(h))throw Error(r(299));var w=!1,k="",M=nz,P=rz,q=iz,Z=null;return g!=null&&(g.unstable_strictMode===!0&&(w=!0),g.identifierPrefix!==void 0&&(k=g.identifierPrefix),g.onUncaughtError!==void 0&&(M=g.onUncaughtError),g.onCaughtError!==void 0&&(P=g.onCaughtError),g.onRecoverableError!==void 0&&(q=g.onRecoverableError),g.unstable_transitionCallbacks!==void 0&&(Z=g.unstable_transitionCallbacks)),g=jF(h,1,!1,null,null,w,k,M,P,q,Z,null),h[xs]=g.current,N8(h.nodeType===8?h.parentNode:h),new q8(g)},wg.hydrateRoot=function(h,g,w){if(!i(h))throw Error(r(299));var k=!1,M="",P=nz,q=rz,Z=iz,te=null,ce=null;return w!=null&&(w.unstable_strictMode===!0&&(k=!0),w.identifierPrefix!==void 0&&(M=w.identifierPrefix),w.onUncaughtError!==void 0&&(P=w.onUncaughtError),w.onCaughtError!==void 0&&(q=w.onCaughtError),w.onRecoverableError!==void 0&&(Z=w.onRecoverableError),w.unstable_transitionCallbacks!==void 0&&(te=w.unstable_transitionCallbacks),w.formState!==void 0&&(ce=w.formState)),g=jF(h,1,!0,g,w??null,k,M,P,q,Z,te,ce),g.context=TF(null),w=g.current,k=mo(),M=qc(k),M.callback=null,Wc(w,M,k),g.current.lanes=k,Le(g,k),xa(g),h[xs]=g.current,N8(h),new Mx(g)},wg.version="19.0.0",wg}var YF;function Wxe(){if(YF)return Y8.exports;YF=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Y8.exports=qxe(),Y8.exports}var Gxe=Wxe();const Kxe=Ht(Gxe);var Cg={},XF;function Yxe(){if(XF)return Cg;XF=1,Object.defineProperty(Cg,"__esModule",{value:!0}),Cg.parse=s,Cg.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,n=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,r=/^[\u0020-\u003A\u003D-\u007E]*$/,i=Object.prototype.toString,o=(()=>{const p=function(){};return p.prototype=Object.create(null),p})();function s(p,m){const y=new o,v=p.length;if(v<2)return y;const b=(m==null?void 0:m.decode)||d;let C=0;do{const S=p.indexOf("=",C);if(S===-1)break;const E=p.indexOf(";",C),A=E===-1?v:E;if(S>A){C=p.lastIndexOf(";",S-1)+1;continue}const _=a(p,C,S),N=l(p,S,_),j=p.slice(_,N);if(y[j]===void 0){let T=a(p,S+1,A),O=l(p,A,T);const D=b(p.slice(T,O));y[j]=D}C=A+1}while(C<v);return y}function a(p,m,y){do{const v=p.charCodeAt(m);if(v!==32&&v!==9)return m}while(++m<y);return y}function l(p,m,y){for(;m>y;){const v=p.charCodeAt(--m);if(v!==32&&v!==9)return m+1}return y}function c(p,m,y){const v=(y==null?void 0:y.encode)||encodeURIComponent;if(!e.test(p))throw new TypeError(`argument name is invalid: ${p}`);const b=v(m);if(!t.test(b))throw new TypeError(`argument val is invalid: ${m}`);let C=p+"="+b;if(!y)return C;if(y.maxAge!==void 0){if(!Number.isInteger(y.maxAge))throw new TypeError(`option maxAge is invalid: ${y.maxAge}`);C+="; Max-Age="+y.maxAge}if(y.domain){if(!n.test(y.domain))throw new TypeError(`option domain is invalid: ${y.domain}`);C+="; Domain="+y.domain}if(y.path){if(!r.test(y.path))throw new TypeError(`option path is invalid: ${y.path}`);C+="; Path="+y.path}if(y.expires){if(!f(y.expires)||!Number.isFinite(y.expires.valueOf()))throw new TypeError(`option expires is invali
49d: ${y.expires}`);C+="; Expires="+y.expires.toUTCString()}if(y.httpOnly&&(C+="; HttpOnly"),y.secure&&(C+="; Secure"),y.partitioned&&(C+="; Partitioned"),y.priority)switch(typeof y.priority=="string"?y.priority.toLowerCase():void 0){case"low":C+="; Priority=Low";break;case"medium":C+="; Priority=Medium";break;case"high":C+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${y.priority}`)}if(y.sameSite)switch(typeof y.sameSite=="string"?y.sameSite.toLowerCase():y.sameSite){case!0:case"strict":C+="; SameSite=Strict";break;case"lax":C+="; SameSite=Lax";break;case"none":C+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${y.sameSite}`)}return C}function d(p){if(p.indexOf("%")===-1)return p;try{return decodeURIComponent(p)}catch{return p}}function f(p){return i.call(p)==="[object Date]"}return Cg}Yxe();/** 50 * react-router v7.4.0 51 * 52 * Copyright (c) Remix Software Inc. 53 * 54 * This source code is licensed under the MIT license found in the 55 * LICENSE.md file in the root directory of this source tree. 56 * 57 * @license MIT 58 */var ZF="popstate";function Xxe(e={}){function t(r,i){let{pathname:o,search:s,hash:a}=r.location;return _N("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:V1(i)}return Qxe(t,n,null,e)}function Pn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ds(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Zxe(){return Math.random().toString(36).substring(2,10)}function QF(e,t){return{usr:e.state,key:e.key,idx:t}}function _N(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?J0(t):t,state:n,key:t&&t.key||r||Zxe()}}function V1({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function J0(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Qxe(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a="POP",l=null,c=d();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function d(){return(s.state||{idx:null}).idx}function f(){a="POP";let b=d(),C=b==null?null:b-c;c=b,l&&l({action:a,location:v.location,delta:C})}function p(b,C){a="PUSH";let S=_N(v.location,b,C);c=d()+1;let E=QF(S,c),A=v.createHref(S);try{s.pushState(E,"",A)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;i.location.assign(A)}o&&l&&l({action:a,location:v.location,delta:1})}function m(b,C){a="REPLACE";let S=_N(v.location,b,C);c=d();let E=QF(S,c),A=v.createHref(S);s.replaceState(E,"",A),o&&l&&l({action:a,location:v.location,delta:0})}function y(b){let C=i.location.origin!=="null"?i.location.origin:i.location.href,S=typeof b=="string"?b:V1(b);return S=S.replace(/ $/,"%20"),Pn(C,`No window.location.(origin|href) available to create URL for href: ${S}`),new URL(S,C)}let v={get action(){return a},get location(){return e(i,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(ZF,f),l=b,()=>{i.removeEventListener(ZF,f),l=null}},createHref(b){return t(i,b)},createURL:y,encodeLocation(b){let C=y(b);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:p,replace:m,go(b){return s.go(b)}};return v}function ete(e,t,n="/"){return Jxe(e,t,n,!1)}function Jxe(e,t,n,r){let i=typeof t=="string"?J0(t):t,o=cc(i.pathname||"/",n);if(o==null)return null;let s=tte(e);e2e(s);let a=null;for(let l=0;a==null&&l<s.length;++l){let c=d2e(o);a=c2e(s[l],c,r)}return a}function tte(e,t=[],n=[],r=""){let i=(o,s,a)=>{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(Pn(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let c=ec([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Pn(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),tte(o.children,t,d,c)),!(o.path==null&&!o.index)&&t.push({path:c,score:a2e(c,o.index),routesMeta:d})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of nte(o.path))i(o,s,l)}),t}function nte(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=nte(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function e2e(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:l2e(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var t2e=/^:[\w-]+$/,n2e=3,r2e=2,i2e=1,o2e=10,s2e=-2,JF=e=>e==="*";function a2e(e,t){let n=e.split("/"),r=n.length;return n.some(JF)&&(r+=s2e),t&&(r+=r2e),n.filter(i=>!JF(i)).reduce((i,o)=>i+(t2e.test(o)?n2e:o===""?i2e:o2e),r)}function l2e(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function c2e(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",s=[];for(let a=0;a<r.length;++a){let l=r[a],c=a===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f
58=jw({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},d),p=l.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=jw({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(i,f.params),s.push({params:i,pathname:ec([o,f.pathname]),pathnameBase:m2e(ec([o,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(o=ec([o,f.pathnameBase]))}return s}function jw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=u2e(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],s=o.replace(/(.)\/+$/,"$1"),a=i.slice(1);return{params:r.reduce((c,{paramName:d,isOptional:f},p)=>{if(d==="*"){let y=a[p]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const m=a[p];return f&&!m?c[d]=void 0:c[d]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:o,pathnameBase:s,pattern:e}}function u2e(e,t=!1,n=!0){ds(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function d2e(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ds(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function cc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function f2e(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?J0(e):e;return{pathname:n?n.startsWith("/")?n:h2e(n,t):t,search:g2e(r),hash:y2e(i)}}function h2e(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function J8(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function p2e(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bO(e){let t=p2e(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function xO(e,t,n,r=!1){let i;typeof e=="string"?i=J0(e):(i={...e},Pn(!i.pathname||!i.pathname.includes("?"),J8("?","pathname","search",i)),Pn(!i.pathname||!i.pathname.includes("#"),J8("#","pathname","hash",i)),Pn(!i.search||!i.search.includes("#"),J8("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),f-=1;i.pathname=p.join("/")}a=f>=0?t[f]:"/"}let l=f2e(i,a),c=s&&s!=="/"&&s.endsWith("/"),d=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}var ec=e=>e.join("/").replace(/\/\/+/g,"/"),m2e=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),g2e=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,y2e=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function v2e(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var rte=["POST","PUT","PATCH","DELETE"];new Set(rte);var b2e=["GET",...rte];new Set(b2e);var em=x.createContext(null);em.displayName="DataRouter";var y5=x.createContext(null);y5.displayName="DataRouterState";var ite=x.createContext({isTransitioning:!1});ite.displayName="ViewTransition";var x2e=x.createContext(new Map);x2e.displayName="Fetchers";var w2e=x.createContext(null);w2e.displayName="Await";var la=x.createContext(null);la.displayName="Navigation";var vv=x.createContext(null);vv.displayName="Location";var ps=x.createContext({outlet:null,matches:[],isDataRoute:!1});ps.displayName="Route";
58var wO=x.createContext(null);wO.displayName="RouteError";function C2e(e,{relative:t}={}){Pn(tm(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=x.useContext(la),{hash:i,pathname:o,search:s}=bv(e,{relative:t}),a=o;return n!=="/"&&(a=o==="/"?n:ec([n,o])),r.createHref({pathname:a,search:s,hash:i})}function tm(){return x.useContext(vv)!=null}function lo(){return Pn(tm(),"useLocation() may be used only in the context of a <Router> component."),x.useContext(vv).location}var ote="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ste(e){x.useContext(la).static||x.useLayoutEffect(e)}function br(){let{isDataRoute:e}=x.useContext(ps);return e?L2e():S2e()}function S2e(){Pn(tm(),"useNavigate() may be used only in the context of a <Router> component.");let e=x.useContext(em),{basename:t,navigator:n}=x.useContext(la),{matches:r}=x.useContext(ps),{pathname:i}=lo(),o=JSON.stringify(bO(r)),s=x.useRef(!1);return ste(()=>{s.current=!0}),x.useCallback((l,c={})=>{if(ds(s.current,ote),!s.current)return;if(typeof l=="number"){n.go(l);return}let d=xO(l,JSON.parse(o),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:ec([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,o,i,e])}var ate=x.createContext(null);function E2e(){return x.useContext(ate)}function k2e(e){let t=x.useContext(ps).outlet;return t&&x.createElement(ate.Provider,{value:e},t)}function v5(){let{matches:e}=x.useContext(ps),t=e[e.length-1];return t?t.params:{}}function bv(e,{relative:t}={}){let{matches:n}=x.useContext(ps),{pathname:r}=lo(),i=JSON.stringify(bO(n));return x.useMemo(()=>xO(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function _2e(e,t){return lte(e,t)}function lte(e,t,n,r){var S;Pn(tm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i,static:o}=x.useContext(la),{matches:s}=x.useContext(ps),a=s[s.length-1],l=a?a.params:{},c=a?a.pathname:"/",d=a?a.pathnameBase:"/",f=a&&a.route;{let E=f&&f.path||"";cte(c,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${E}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 59 60Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let p=lo(),m;if(t){let E=typeof t=="string"?J0(t):t;Pn(d==="/"||((S=E.pathname)==null?void 0:S.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${E.pathname}" was given in the \`location\` prop.`),m=E}else m=p;let y=m.pathname||"/",v=y;if(d!=="/"){let E=d.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(E.length).join("/")}let b=!o&&n&&n.matches&&n.matches.length>0?n.matches:ete(e,{pathname:v});ds(f||b!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),ds(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=M2e(b&&b.map(E=>Object.assign({},E,{params:Object.assign({},l,E.params),pathname:ec([d,i.encodeLocation?i.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?d:ec([d,i.encodeLocation?i.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),s,n,r);return t&&C?x.createElement(vv.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...m},navigationType:"POP"}},C):C}function A2e(){let e=I2e(),t=v2e(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=x.createElement(x.Fragment,null,x.createElement("p",null,"ð¿ Hey developer ð"),x.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",x.createElement("code",{style:o},"ErrorBoundary")," or"," ",x.createElement("code",{style:o},"errorElement")," prop on your route.")),x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application
60Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:i},n):null,s)}var N2e=x.createElement(A2e,null),j2e=class extends x.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?x.createElement(ps.Provider,{value:this.props.routeContext},x.createElement(wO.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function T2e({routeContext:e,match:t,children:n}){let r=x.useContext(em);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),x.createElement(ps.Provider,{value:e},n)}function M2e(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let l=i.findIndex(c=>c.route.id&&(o==null?void 0:o[c.route.id])!==void 0);Pn(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let s=!1,a=-1;if(n)for(let l=0;l<i.length;l++){let c=i[l];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(a=l),c.route.id){let{loaderData:d,errors:f}=n,p=c.route.loader&&!d.hasOwnProperty(c.route.id)&&(!f||f[c.route.id]===void 0);if(c.route.lazy||p){s=!0,a>=0?i=i.slice(0,a+1):i=[i[0]];break}}}return i.reduceRight((l,c,d)=>{let f,p=!1,m=null,y=null;n&&(f=o&&c.route.id?o[c.route.id]:void 0,m=c.route.errorElement||N2e,s&&(a<0&&d===0?(cte("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,y=null):a===d&&(p=!0,y=c.route.hydrateFallbackElement||null)));let v=t.concat(i.slice(0,d+1)),b=()=>{let C;return f?C=m:p?C=y:c.route.Component?C=x.createElement(c.route.Component,null):c.route.element?C=c.route.element:C=l,x.createElement(T2e,{match:c,routeContext:{outlet:l,matches:v,isDataRoute:n!=null},children:C})};return n&&(c.route.ErrorBoundary||c.route.errorElement||d===0)?x.createElement(j2e,{location:n.location,revalidation:n.revalidation,component:m,error:f,children:b(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):b()},null)}function CO(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function O2e(e){let t=x.useContext(em);return Pn(t,CO(e)),t}function R2e(e){let t=x.useContext(y5);return Pn(t,CO(e)),t}function P2e(e){let t=x.useContext(ps);return Pn(t,CO(e)),t}function SO(e){let t=P2e(e),n=t.matches[t.matches.length-1];return Pn(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function D2e(){return SO("useRouteId")}function I2e(){var r;let e=x.useContext(wO),t=R2e("useRouteError"),n=SO("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function L2e(){let{router:e}=O2e("useNavigate"),t=SO("useNavigate"),n=x.useRef(!1);return ste(()=>{n.current=!0}),x.useCallback(async(i,o={})=>{ds(n.current,ote),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var eB={};function cte(e,t,n){!t&&!eB[e]&&(eB[e]=!0,ds(!1,n))}x.memo($2e);function $2e({routes:e,future:t,state:n}){return lte(e,void 0,n,t)}function Tw({to:e,replace:t,state:n,relative:r}){Pn(tm(),"<Navigate> may be used only in the context of a <Router> component.");let{static:i}=x.useContext(la);ds(!i,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=x.useContext(ps),{pathname:s}=lo(),a=br(),l=xO(e,bO(o),s,r==="path"),c=JSON.stringify(l);return x.useEffect(()=>{a(JSON.parse(c),{replace:t,state:n,relative:r})},[a,c,r,t,n]),null}function U1(e){return k2e(e.context)}function on(e){Pn(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function z2e({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){Pn(!tm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),a=x.useMemo(()=>({basename:s,navigator:i,static:o,future:{}}),[s,i,o]);typeof n=="string"&&(n=J0(n));let{pathname:l="/",search:c="",hash:d="",state:f=null,key:p="default"}
60=n,m=x.useMemo(()=>{let y=cc(l,s);return y==null?null:{location:{pathname:y,search:c,hash:d,state:f,key:p},navigationType:r}},[s,l,c,d,f,p,r]);return ds(m!=null,`<Router basename="${s}"> is not able to match the URL "${l}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),m==null?null:x.createElement(la.Provider,{value:a},x.createElement(vv.Provider,{children:t,value:m}))}function EO({children:e,location:t}){return _2e(AN(e),t)}function AN(e,t=[]){let n=[];return x.Children.forEach(e,(r,i)=>{if(!x.isValidElement(r))return;let o=[...t,i];if(r.type===x.Fragment){n.push.apply(n,AN(r.props.children,o));return}Pn(r.type===on,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pn(!r.props.index||!r.props.children,"An index route cannot have child routes.");let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=AN(r.props.children,o)),n.push(s)}),n}var nw="get",rw="application/x-www-form-urlencoded";function b5(e){return e!=null&&typeof e.tagName=="string"}function F2e(e){return b5(e)&&e.tagName.toLowerCase()==="button"}function B2e(e){return b5(e)&&e.tagName.toLowerCase()==="form"}function H2e(e){return b5(e)&&e.tagName.toLowerCase()==="input"}function V2e(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function U2e(e,t){return e.button===0&&(!t||t==="_self")&&!V2e(e)}function NN(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function q2e(e,t){let n=NN(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var Px=null;function W2e(){if(Px===null)try{new FormData(document.createElement("form"),0),Px=!1}catch{Px=!0}return Px}var G2e=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function e7(e){return e!=null&&!G2e.has(e)?(ds(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${rw}"`),null):e}function K2e(e,t){let n,r,i,o,s;if(B2e(e)){let a=e.getAttribute("action");r=a?cc(a,t):null,n=e.getAttribute("method")||nw,i=e7(e.getAttribute("enctype"))||rw,o=new FormData(e)}else if(F2e(e)||H2e(e)&&(e.type==="submit"||e.type==="image")){let a=e.form;if(a==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||a.getAttribute("action");if(r=l?cc(l,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||nw,i=e7(e.getAttribute("formenctype"))||e7(a.getAttribute("enctype"))||rw,o=new FormData(a,e),!W2e()){let{name:c,type:d,value:f}=e;if(d==="image"){let p=c?`${c}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else c&&o.append(c,f)}}else{if(b5(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=nw,r=null,i=rw,s=e}return o&&i==="text/plain"&&(s=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:s}}function kO(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Y2e(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function X2e(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Z2e(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let s=await Y2e(o,n);return s.links?s.links():[]}return[]}));return twe(r.flat(1).filter(X2e).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function tB(e,t,n,r,i,o){let s=(l,c)=>n[c]?l.route.id!==n[c].route.id:!0,a=(l,c)=>{var d;return n[c].pathname!==l.pathname||((d=n[c].route.path)==null?void 0:d.endsWith("*"))&&n[c].params["*"]!==l.params["*"]};return o==="assets"?t.filter((l,c)=>s(l,c)||a(l,c)):o==="data"?t.filter((l,c)=>{var f;let d=r.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(s(l,c)||a(l,c))return!0;
60if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Q2e(e,t,{includeHydrateFallback:n}={}){return J2e(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function J2e(e){return[...new Set(e)]}function ewe(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function twe(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(ewe(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function nwe(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&cc(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function ute(){let e=x.useContext(em);return kO(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function rwe(){let e=x.useContext(y5);return kO(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var _O=x.createContext(void 0);_O.displayName="FrameworkContext";function dte(){let e=x.useContext(_O);return kO(e,"You must render this element inside a <HydratedRouter> element"),e}function iwe(e,t){let n=x.useContext(_O),[r,i]=x.useState(!1),[o,s]=x.useState(!1),{onFocus:a,onBlur:l,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,p=x.useRef(null);x.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let v=C=>{C.forEach(S=>{s(S.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return p.current&&b.observe(p.current),()=>{b.disconnect()}}},[e]),x.useEffect(()=>{if(r){let v=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(v)}}},[r]);let m=()=>{i(!0)},y=()=>{i(!1),s(!1)};return n?e!=="intent"?[o,p,{}]:[o,p,{onFocus:Sg(a,m),onBlur:Sg(l,y),onMouseEnter:Sg(c,m),onMouseLeave:Sg(d,y),onTouchStart:Sg(f,m)}]:[!1,p,{}]}function Sg(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function owe({page:e,...t}){let{router:n}=ute(),r=x.useMemo(()=>ete(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?x.createElement(awe,{page:e,matches:r,...t}):null}function swe(e){let{manifest:t,routeModules:n}=dte(),[r,i]=x.useState([]);return x.useEffect(()=>{let o=!1;return Z2e(e,t,n).then(s=>{o||i(s)}),()=>{o=!0}},[e,t,n]),r}function awe({page:e,matches:t,...n}){let r=lo(),{manifest:i,routeModules:o}=dte(),{basename:s}=ute(),{loaderData:a,matches:l}=rwe(),c=x.useMemo(()=>tB(e,t,l,i,r,"data"),[e,t,l,i,r]),d=x.useMemo(()=>tB(e,t,l,i,r,"assets"),[e,t,l,i,r]),f=x.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let y=new Set,v=!1;if(t.forEach(C=>{var E;let S=i.routes[C.route.id];!S||!S.hasLoader||(!c.some(A=>A.route.id===C.route.id)&&C.route.id in a&&((E=o[C.route.id])!=null&&E.shouldRevalidate)||S.hasClientLoader?v=!0:y.add(C.route.id))}),y.size===0)return[];let b=nwe(e,s);return v&&y.size>0&&b.searchParams.set("_routes",t.filter(C=>y.has(C.route.id)).map(C=>C.route.id).join(",")),[b.pathname+b.search]},[s,a,r,i,c,t,e,o]),p=x.useMemo(()=>Q2e(d,i),[d,i]),m=swe(d);return x.createElement(x.Fragment,null,f.map(y=>x.createElement("link",{key:y,rel:"prefetch",as:"fetch",href:y,...n})),p.map(y=>x.createElement("link",{key:y,rel:"modulepreload",href:y,...n})),m.map(({key:y,link:v})=>x.createElement("link",{key:y,...v})))}function lwe(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var fte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fte&&(window.__reactRouterVersion="7.4.0")}catch{}function cwe({basename:e,children:t,window:n}){let r=x.useRef();r.current==null&&(r.current=Xxe({window:n,v5Compat:!0}));let i=r.current,[o,s]=x.useState({action:i.action,location:i.location}),a=x.useCallback(l=>{x.startTransition(()=>s(l))},[s]);return x.useLayoutEffect(()=>i.listen(a),[i,a]),x.createElement(z2e,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var hte=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ra=x.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:s,state:a,target:l,to:c,preventScrollReset:d,viewTransition:f,...p},m){let{basename:y}=x.useContext(la),v=typeof c=="string"&&hte.test(c),b,C=!1;if(typeof c=="string"&&v&&(b=c,fte))try{let O=new URL(window.location.href),D=c.startsWith("//")?new URL(O.protocol+c):new URL(c),R=cc(D.pathname,y);D.origin===O.origin&&R!=null?c=R+D.search+D.hash:C=!0}catch{ds(!1,`<Link to="${c}">
60 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let S=C2e(c,{relative:i}),[E,A,_]=iwe(r,p),N=fwe(c,{replace:s,state:a,target:l,preventScrollReset:d,relative:i,viewTransition:f});function j(O){t&&t(O),O.defaultPrevented||N(O)}let T=x.createElement("a",{...p,..._,href:b||S,onClick:C||o?t:j,ref:lwe(m,A),target:l,"data-discover":!v&&n==="render"?"true":void 0});return E&&!v?x.createElement(x.Fragment,null,T,x.createElement(owe,{page:S})):T});ra.displayName="Link";var _p=x.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:s,viewTransition:a,children:l,...c},d){let f=bv(s,{relative:c.relative}),p=lo(),m=x.useContext(y5),{navigator:y,basename:v}=x.useContext(la),b=m!=null&&vwe(f)&&a===!0,C=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,S=p.pathname,E=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;n||(S=S.toLowerCase(),E=E?E.toLowerCase():null,C=C.toLowerCase()),E&&v&&(E=cc(E,v)||E);const A=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let _=S===C||!i&&S.startsWith(C)&&S.charAt(A)==="/",N=E!=null&&(E===C||!i&&E.startsWith(C)&&E.charAt(C.length)==="/"),j={isActive:_,isPending:N,isTransitioning:b},T=_?t:void 0,O;typeof r=="function"?O=r(j):O=[r,_?"active":null,N?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(j):o;return x.createElement(ra,{...c,"aria-current":T,className:O,ref:d,style:D,to:s,viewTransition:a},typeof l=="function"?l(j):l)});_p.displayName="NavLink";var uwe=x.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:s=nw,action:a,onSubmit:l,relative:c,preventScrollReset:d,viewTransition:f,...p},m)=>{let y=gwe(),v=ywe(a,{relative:c}
60),b=s.toLowerCase()==="get"?"get":"post",C=typeof a=="string"&&hte.test(a),S=E=>{if(l&&l(E),E.defaultPrevented)return;E.preventDefault();let A=E.nativeEvent.submitter,_=(A==null?void 0:A.getAttribute("formmethod"))||s;y(A||E.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:i,state:o,relative:c,preventScrollReset:d,viewTransition:f})};return x.createElement("form",{ref:m,method:b,action:v,onSubmit:r?l:S,...p,"data-discover":!C&&e==="render"?"true":void 0})});uwe.displayName="Form";function dwe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pte(e){let t=x.useContext(em);return Pn(t,dwe(e)),t}function fwe(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:s}={}){let a=br(),l=lo(),c=bv(e,{relative:o});return x.useCallback(d=>{if(U2e(d,t)){d.preventDefault();let f=n!==void 0?n:V1(l)===V1(c);a(e,{replace:f,state:r,preventScrollReset:i,relative:o,viewTransition:s})}},[l,a,c,n,r,t,e,i,o,s])}function hwe(e){ds(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=x.useRef(NN(e)),n=x.useRef(!1),r=lo(),i=x.useMemo(()=>q2e(r.search,n.current?null:t.current),[r.search]),o=br(),s=x.useCallback((a,l)=>{const c=NN(typeof a=="function"?a(i):a);n.current=!0,o("?"+c,l)},[o,i]);return[i,s]}var pwe=0,mwe=()=>`__${String(++pwe)}__`;function gwe(){let{router:e}=pte("useSubmit"),{basename:t}=x.useContext(la),n=D2e();return x.useCallback(async(r,i={})=>{let{action:o,method:s,encType:a,formData:l,body:c}=K2e(r,t);if(i.navigate===!1){let d=i.fetcherKey||mwe();await e.fetch(d,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||s,formEncType:i.encType||a,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:c,formMethod:i.method||s,formEncType:i.encType||a,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function ywe(e,{relative:t}={}){let{basename:n}=x.useContext(la),r=x.useContext(ps);Pn(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...bv(e||".",{relative:t})},s=lo();if(e==null){o.search=s.search;let a=new URLSearchParams(o.search),l=a.getAll("index");if(l.some(d=>d==="")){a.delete("index"),l.filter(f=>f).forEach(f=>a.append("index",f));let d=a.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ec([n,o.pathname])),V1(o)}function vwe(e,t={}){let n=x.useContext(ite);Pn(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=pte("useViewTransitionState"),i=bv(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=cc(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=cc(n.nextLocation.pathname,r)||n.nextLocation.pathname;return jw(i.pathname,s)!=null||jw(i.pathname,o)!=null}new TextEncoder;var Si=Jee();const Fs=Ht(Si);var t7={exports:{}},n7={};/** 61 * @license React 62 * use-sync-external-store-with-selector.production.js 63 * 64 * Copyright (c) Meta Platforms, Inc. and affiliates. 65 * 66 * This source code is licensed under the MIT license found in the 67 * LICENSE file in the root directory of this source tree. 68 */var nB;function bwe(){if(nB)return n7;nB=1;var e=pd();function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,a=e.useDebugValue;return n7.useSyncExternalStoreWithSelector=function(l,c,d,f,p){var m=i(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=s(function(){function b(_){if(!C){if(C=!0,S=_,_=f(_),p!==void 0&&y.hasValue){var N=y.value;if(p(N,_))return E=N}return E=_}if(N=E,n(S,_))return N;var j=f(_);return p!==void 0&&p(N,j)?(S=_,N):(S=_,E=j)}var C=!1,S,E,A=d===void 0?null:d;return[function(){return b(c())},A===null?void 0:function(){return b(A())}]},[c,d,f,p]);var v=r(l,m[0],m[1]);return o(function(){y.hasValue=!0,y.value=v},[v]),a(v),v},n7}var rB;function xwe(){return rB||(rB=1,t7.exports=bwe()),t7.exports}var wwe=xwe();function mte(e){e()}function Cwe(){let e=null,t=null;return{clear(){e=null,t=null},notify(){mte(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var iB={notify(){},get:()=>[]};function Swe(e,t){let n,r=iB,i=0,o=!1;function s(v){d();const b=r.subscribe(v);let C=!1;return()=>{C||(C=!0,b(),f())}}function a(){r.notify()}function l(){y.onStateChange&&y.onStateChange()}function c(){return o}function d(){i++,n||(n=e.subscribe(l),r=Cwe())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=iB)}function p(){o||(o=!0,d())}function m(){o&&(o=!1,f())}const y={addNestedSub:s,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return y}var Ewe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kwe=Ewe(),_we=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Awe=_we(),Nwe=()=>kwe||Awe?x.useLayoutEffect:x.useEffect,jwe=Nwe();function oB(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function g1(e,t){if(oB(e,t))return!0;
68if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!oB(e[n[i]],t[n[i]]))return!1;return!0}var r7=Symbol.for("react-redux-context"),i7=typeof globalThis<"u"?globalThis:{};function Twe(){if(!x.createContext)return{};const e=i7[r7]??(i7[r7]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var td=Twe();function Mwe(e){const{children:t,context:n,serverState:r,store:i}=e,o=x.useMemo(()=>{const l=Swe(i);return{store:i,subscription:l,getServerState:r?()=>r:void 0}},[i,r]),s=x.useMemo(()=>i.getState(),[i]);jwe(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),s!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,s]);const a=n||td;return x.createElement(a.Provider,{value:o},t)}var Owe=Mwe;function AO(e=td){return function(){return x.useContext(e)}}var gte=AO();function yte(e=td){const t=e===td?gte:AO(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var vte=yte();function Rwe(e=td){const t=e===td?vte:yte(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var bte=Rwe(),Pwe=(e,t)=>e===t;function Dwe(e=td){const t=e===td?gte:AO(e),n=(r,i={})=>{const{equalityFn:o=Pwe}=typeof i=="function"?{equalityFn:i}:i,s=t(),{store:a,subscription:l,getServerState:c}=s;x.useRef(!0);const d=x.useCallback({[r.name](p){return r(p)}}[r.name],[r]),f=wwe.useSyncExternalStoreWithSelector(l.addNestedSub,a.getState,c||a.getState,d,o);return x.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var xte=Dwe(),Iwe=mte;function Xr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Lwe=typeof Symbol=="function"&&Symbol.observable||"@@observable",sB=Lwe,o7=()=>Math.random().toString(36).substring(7).split("").join("."),$we={INIT:`@@redux/INIT${o7()}`,REPLACE:`@@redux/REPLACE${o7()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${o7()}`},Mw=$we;function nd(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function wte(e,t,n){if(typeof e!="function")throw new Error(Xr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Xr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xr(1));return n(wte)(e,t)}let r=e,i=t,o=new Map,s=o,a=0,l=!1;function c(){s===o&&(s=new Map,o.forEach((b,C)=>{s.set(C,b)}))}function d(){if(l)throw new Error(Xr(3));return i}function f(b){if(typeof b!="function")throw new Error(Xr(4));if(l)throw new Error(Xr(5));let C=!0;c();const S=a++;return s.set(S,b),function(){if(C){if(l)throw new Error(Xr(6));C=!1,c(),s.delete(S),o=null}}}function p(b){if(!nd(b))throw new Error(Xr(7));if(typeof b.type>"u")throw new Error(Xr(8));if(typeof b.type!="string")throw new Error(Xr(17));if(l)throw new Error(Xr(9));try{l=!0,i=r(i,b)}finally{l=!1}
68return(o=s).forEach(S=>{S()}),b}function m(b){if(typeof b!="function")throw new Error(Xr(10));r=b,p({type:Mw.REPLACE})}function y(){const b=f;return{subscribe(C){if(typeof C!="object"||C===null)throw new Error(Xr(11));function S(){const A=C;A.next&&A.next(d())}return S(),{unsubscribe:b(S)}},[sB](){return this}}}return p({type:Mw.INIT}),{dispatch:p,subscribe:f,getState:d,replaceReducer:m,[sB]:y}}function zwe(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Mw.INIT})>"u")throw new Error(Xr(12));if(typeof n(void 0,{type:Mw.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Xr(13))})}function Cte(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{zwe(n)}catch(o){i=o}return function(s={},a){if(i)throw i;let l=!1;const c={};for(let d=0;d<r.length;d++){const f=r[d],p=n[f],m=s[f],y=p(m,a);if(typeof y>"u")throw a&&a.type,new Error(Xr(14));c[f]=y,l=l||y!==m}return l=l||r.length!==Object.keys(s).length,l?c:s}}function Ow(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Fwe(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Xr(15))};const s={getState:i.getState,dispatch:(l,...c)=>o(l,...c)},a=e.map(l=>l(s));return o=Ow(...a)(i.dispatch),{...i,dispatch:o}}}function Ste(e){return nd(e)&&"type"in e&&typeof e.type=="string"}var NO=Symbol.for("immer-nothing"),y1=Symbol.for("immer-draftable"),io=Symbol.for("immer-state");function ni(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zf=Object.getPrototypeOf;function qa(e){return!!e&&!!e[io]}function ia(e){var t;return e?Ete(e)||Array.isArray(e)||!!e[y1]||!!((t=e.constructor)!=null&&t[y1])||xv(e)||wv(e):!1}var Bwe=Object.prototype.constructor.toString();function Ete(e){if(!e||typeof e!="object")return!1;const t=zf(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Bwe}function Hwe(e){return qa(e)||ni(15,e),e[io].base_}function q1(e,t){Ff(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Ff(e){const t=e[io];return t?t.type_:Array.isArray(e)?1:xv(e)?2:wv(e)?3:0}function W1(e,t){return Ff(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function s7(e,t){return Ff(e)===2?e.get(t):e[t]}function kte(e,t,n){const r=Ff(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Vwe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function xv(e){return e instanceof Map}function wv(e){return e instanceof Set}function lf(e){return e.copy_||e.base_}function jN(e,t){if(xv(e))return new Map(e);if(wv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Ete(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[io];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[s]})}return Object.create(zf(e),r)}else{const r=zf(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function jO(e,t=!1){return x5(e)||qa(e)||!ia(e)||(Ff(e)>1&&(e.set=e.add=e.clear=e.delete=Uwe),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>jO(r,!0))),e}function Uwe(){ni(2)}function x5(e){return Object.isFrozen(e)}var TN={};function Bf(e){const t=TN[e];return t||ni(0,e),t}function qwe(e,t){TN[e]||(TN[e]=t)}var G1;function _te(){return G1}function Wwe(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function aB(e,t){t&&(Bf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function MN(e){ON(e),e.drafts_.forEach(Gwe),e.drafts_=null}function ON(e){e===G1&&(G1=e.parent_)}function lB(e){return G1=Wwe(G1,e)}function Gwe(e){const t=e[io];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function cB(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[io].modified_&&(MN(t),ni(4)),ia(e)&&(e=Rw(t,e),t.parent_||Pw(t,e)),t.patches_&&Bf("Patches").generateReplacementPatches_(n[io].base_,e,t.patches_,t.inversePatches_)):e=Rw(t,n,[]),MN(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NO?e:void 0}function Rw(e,t,n){if(x5(t))return t;const r=t[io];if(!r)return q1(t,(i,o)=>uB(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Pw(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),q1(o,(a,l)=>uB(e,r,i,a,l,n,s)),Pw(e,i,!1),n&&e.patches_&&Bf("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}
68function uB(e,t,n,r,i,o,s){if(qa(i)){const a=o&&t&&t.type_!==3&&!W1(t.assigned_,r)?o.concat(r):void 0,l=Rw(e,i,a);if(kte(n,r,l),qa(l))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(ia(i)&&!x5(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Rw(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Pw(e,i)}}function Pw(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jO(t,n)}function Kwe(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:_te(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=TO;n&&(i=[r],o=K1);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var TO={get(e,t){if(t===io)return e;const n=lf(e);if(!W1(n,t))return Ywe(e,n,t);const r=n[t];return e.finalized_||!ia(r)?r:r===a7(e.base_,t)?(l7(e),e.copy_[t]=PN(r,e)):r},has(e,t){return t in lf(e)},ownKeys(e){return Reflect.ownKeys(lf(e))},set(e,t,n){const r=Ate(lf(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=a7(lf(e),t),o=i==null?void 0:i[io];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Vwe(n,i)&&(n!==void 0||W1(e.base_,t)))return!0;l7(e),RN(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return a7(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,l7(e),RN(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=lf(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ni(11)},getPrototypeOf(e){return zf(e.base_)},setPrototypeOf(){ni(12)}},K1={};q1(TO,(e,t)=>{K1[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});K1.deleteProperty=function(e,t){return K1.set.call(this,e,t,void 0)};K1.set=function(e,t,n){return TO.set.call(this,e[0],t,n,e[0])};function a7(e,t){const n=e[io];return(n?lf(n):e)[t]}function Ywe(e,t,n){var i;const r=Ate(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function Ate(e,t){if(!(t in e))return;let n=zf(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=zf(n)}}function RN(e){e.modified_||(e.modified_=!0,e.parent_&&RN(e.parent_))}function l7(e){e.copy_||(e.copy_=jN(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Xwe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(l=o,...c){return s.produce(l,d=>n.call(this,d,...c))}}typeof n!="function"&&ni(6),r!==void 0&&typeof r!="function"&&ni(7);let i;if(ia(t)){const o=lB(this),s=PN(t,void 0);let a=!0;try{i=n(s),a=!1}finally{a?MN(o):ON(o)}return aB(o,r),cB(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===NO&&(i=void 0),this.autoFreeze_&&jO(i,!0),r){const o=[],s=[];Bf("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else ni(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...a)=>this.produceWithPatches(s,l=>t(l,...a));let r,i;return[this.produce(t,n,(s,a)=>{r=s,i=a}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ia(e)||ni(8),qa(e)&&(e=Zwe(e));const t=lB(this),n=PN(e,void 0);return n[io].isManual_=!0,ON(t),n}finishDraft(e,t){const n=e&&e[io];(!n||!n.isManual_)&&ni(9);const{scope_:r}=n;return aB(r,t),cB(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Bf("Patches").applyPatches_;return qa(e)?r(e,t):this.produce(e,i=>r(i,t))}};function PN(e,t){const n=xv(e)?Bf("MapSet").proxyMap_(e,t):wv(e)?Bf("MapSet").proxySet_(e,t):Kwe(e,t);return(t?t.scope_:_te()).drafts_.push(n),n}function Zwe(e){return qa(e)||ni(10,e),Nte(e)}function Nte(e){if(!ia(e)||x5(e))return e;const t=e[io];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=jN(e,t.scope_.immer_.useStrictShallowCopy_)}else n=jN(e,!0);return q1(n,(r,i)=>{kte(n,r,Nte(i))}),t&&(t.finalized_=!1),n}function Qwe(){const t="replace",n="add",r="remove";function i(p,m,y,v){switch(p.type_){case 0:case 2:return s(p,m,y,v);case 1:return o(p,m,y,v);case 3:return a(p,m,y,v)}}function o(p,m,y,v){let{base_:b,assigned_:C}=p,S=p.copy_;S.length<b.length&&([b,S]=[S,b],[y,v]=[v,y]);for(let E=0;E<b.length;E++)if(C[E]&&S[E]!==b[E]){const A=m.concat([E]);y.push({op:t,path:A,value:f(S[E])}),v.push({op:t,path:A,value:f(b[E])})}for(let E=b.length;E<S.length;E++){const A=m.concat([E]);y.push({op:n,path:A,value:f(S[E])})}for(let E=S.length-1;b.length<=E;--E){const A=m.concat([E]);v.push({op:r,path:A})}}function s(p,m,y,v){const{base_:b,copy_:C}=p;q1(p.assigned_,(S,E)=>{const A=s7(b,S),_=s7(C,S),N=E?W1(b,S)?t:n:r;if(A===_&&N===t)return;const j=m.concat(S);y.push(N===r?{op:N,path:j}:{op:N,path:j,value:_}),v.push(N===n?{op:r,path:j}:N===r?{op:n,path:j,value:f(A)}:{op:t,path:j,value:f(A)})})}function a(p,m,y,v){let{base_:b,copy_:C}=p,S=0;b.forEach(E=>{if(!C.has(E)){const A=m.concat([S]);y.push({op:r,path:A,value:E}),v.unshift({op:n,path:A,value:E})}S++}
68),S=0,C.forEach(E=>{if(!b.has(E)){const A=m.concat([S]);y.push({op:n,path:A,value:E}),v.unshift({op:r,path:A,value:E})}S++})}function l(p,m,y,v){y.push({op:t,path:[],value:m===NO?void 0:m}),v.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(y=>{const{path:v,op:b}=y;let C=p;for(let _=0;_<v.length-1;_++){const N=Ff(C);let j=v[_];typeof j!="string"&&typeof j!="number"&&(j=""+j),(N===0||N===1)&&(j==="__proto__"||j==="constructor")&&ni(19),typeof C=="function"&&j==="prototype"&&ni(19),C=s7(C,j),typeof C!="object"&&ni(18,v.join("/"))}const S=Ff(C),E=d(y.value),A=v[v.length-1];switch(b){case t:switch(S){case 2:return C.set(A,E);case 3:ni(16);default:return C[A]=E}case n:switch(S){case 1:return A==="-"?C.push(E):C.splice(A,0,E);case 2:return C.set(A,E);case 3:return C.add(E);default:return C[A]=E}case r:switch(S){case 1:return C.splice(A,1);case 2:return C.delete(A);case 3:return C.delete(y.value);default:return delete C[A]}default:ni(17,b)}}),p}function d(p){if(!ia(p))return p;if(Array.isArray(p))return p.map(d);if(xv(p))return new Map(Array.from(p.entries()).map(([y,v])=>[y,d(v)]));if(wv(p))return new Set(Array.from(p).map(d));const m=Object.create(zf(p));for(const y in p)m[y]=d(p[y]);return W1(p,y1)&&(m[y1]=p[y1]),m}function f(p){return qa(p)?d(p):p}qwe("Patches",{applyPatches_:c,generatePatches_:i,generateReplacementPatches_:l})}var Ao=new Xwe,Cv=Ao.produce,jte=Ao.produceWithPatches.bind(Ao);Ao.setAutoFreeze.bind(Ao);Ao.setUseStrictShallowCopy.bind(Ao);var dB=Ao.applyPatches.bind(Ao);Ao.createDraft.bind(Ao);Ao.finishDraft.bind(Ao);function Jwe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function e3e(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function t3e(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var fB=e=>Array.isArray(e)?e:[e];function n3e(e){const t=Array.isArray(e[0])?e[0]:e;return t3e(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function r3e(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var i3e=class{constructor(e){this.value=e}deref(){return this.value}},o3e=typeof WeakRef<"u"?WeakRef:i3e,s3e=0,hB=1;function Dx(){return{s:s3e,v:void 0,o:null,p:null}}function Dw(e,t={}){let n=Dx();const{resultEqualityCheck:r}=t;let i,o=0;function s(){var f;let a=n;const{length:l}=arguments;for(let p=0,m=l;p<m;p++){const y=arguments[p];if(typeof y=="function"||typeof y=="object"&&y!==null){let v=a.o;v===null&&(a.o=v=new WeakMap);const b=v.get(y);b===void 0?(a=Dx(),v.set(y,a)):a=b}else{let v=a.p;v===null&&(a.p=v=new Map);const b=v.get(y);b===void 0?(a=Dx(),v.set(y,a)):a=b}}const c=a;let d;if(a.s===hB)d=a.v;else if(d=e.apply(null,arguments),o++,r){const p=((f=i==null?void 0:i.deref)==null?void 0:f.call(i))??i;p!=null&&r(p,d)&&(d=p,o!==0&&o--),i=typeof d=="object"&&d!==null||typeof d=="function"?new o3e(d):d}return c.s=hB,c.v=d,d}return s.clearCache=()=>{n=Dx(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function a3e(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,a,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),Jwe(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const d={...n,...l},{memoize:f,memoizeOptions:p=[],argsMemoize:m=Dw,argsMemoizeOptions:y=[]}=d,v=fB(p),b=fB(y),C=n3e(i),S=f(function(){return o++,c.apply(null,arguments)},...v),E=m(function(){s++;const _=r3e(C,arguments);return a=S.apply(null,_),a},...b);return Object.assign(E,{resultFunc:c,memoizedResultFunc:S,dependencies:C,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>a,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:m})};return Object.assign(r,{withTypes:()=>r}),r}var MO=a3e(Dw),l3e=Object.assign((e,t=MO)=>
68{e3e(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((s,a,l)=>(s[n[l]]=a,s),{}))},{withTypes:()=>l3e});function Tte(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var c3e=Tte(),u3e=Tte,d3e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ow:Ow.apply(null,arguments)},f3e=e=>e&&typeof e.match=="function";function Zs(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(is(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Ste(r)&&r.type===e,n}var Mte=class Jg extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Jg.prototype)}static get[Symbol.species](){return Jg}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Jg(...t[0].concat(this)):new Jg(...t.concat(this))}};function pB(e){return ia(e)?Cv(e,()=>{}):e}function mB(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function h3e(e){return typeof e=="boolean"}var p3e=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new Mte;return n&&(h3e(n)?s.push(c3e):s.push(u3e(n.extraArgument))),s},w5="RTK_autoBatch",Eg=()=>e=>({payload:e,meta:{[w5]:!0}}),gB=e=>t=>{setTimeout(t,e)},m3e=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const a=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:gB(10):e.type==="callback"?e.queueNotification:gB(e.timeout),c=()=>{s=!1,o&&(o=!1,a.forEach(d=>d()))};return Object.assign({},r,{subscribe(d){const f=()=>i&&d(),p=r.subscribe(f);return a.add(d),()=>{p(),a.delete(d)}},dispatch(d){var f;try{return i=!((f=d==null?void 0:d.meta)!=null&&f[w5]),o=!i,o&&(s||(s=!0,l(c))),r.dispatch(d)}finally{i=!0}}})},g3e=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Mte(e);return r&&i.push(m3e(typeof r=="object"?r:void 0)),i};function y3e(e){const t=p3e(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let a;if(typeof n=="function")a=n;else if(nd(n))a=Cte(n);else throw new Error(is(1));let l;typeof r=="function"?l=r(t):l=t();let c=Ow;i&&(c=d3e({trace:!1,...typeof i=="object"&&i}));const d=Fwe(...l),f=g3e(d);let p=typeof s=="function"?s(f):f();const m=c(...p);return wte(a,o,m)}function Ote(e){const t={},n=[];let r;const i={addCase(o,s){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(is(28));if(a in t)throw new Error(is(29));return t[a]=s,i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function v3e(e){return typeof e=="function"}function b3e(e,t){let[n,r,i]=Ote(t),o;if(v3e(e))o=()=>pB(e());else{const a=pB(e);o=()=>a}function s(a=o(),l){let c=[n[l.type],...r.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return c.filter(d=>!!d).length===0&&(c=[i]),c.reduce((d,f)=>{if(f)if(qa(d)){const m=f(d,l);return m===void 0?d:m}else{if(ia(d))return Cv(d,p=>f(p,l));{const p=f(d,l);if(p===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return d},a)}return s.getInitialState=o,s}var Rte=(e,t)=>f3e(e)?e.match(t):e(t);function uc(...e){return t=>e.some(n=>Rte(n,t))}function v1(...e){return t=>e.every(n=>Rte(n,t))}function C5(e,t){if(!e||!e.meta)return!1;const n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Sv(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function OO(...e){return e.length===0?t=>C5(t,["pending"]):Sv(e)?uc(...e.map(t=>t.pending)):OO()(e[0])}function e0(...e){return e.length===0?t=>C5(t,["rejected"]):Sv(e)?uc(...e.map(t=>t.rejected)):e0()(e[0])}function S5(...e){const t=n=>n&&n.meta&&n.meta.rejectedWithValue;return e.length===0?v1(e0(...e),t):Sv(e)?v1(e0(...e),t):S5()(e[0])}function rd(...e){return e.length===0?t=>C5(t,["fulfilled"]):Sv(e)?uc(...e.map(t=>t.fulfilled)):rd()(e[0])}function DN(...e){return e.length===0?t=>C5(t,["pending","fulfilled","rejected"]):Sv(e)?uc(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):DN()(e[0])}var x3e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",RO=(e=21)=>{let t="",n=e;for(;n--;)t+=x3e[Math.random()*64|0];return t},w3e=["name","message","stack","code"],c7=class{constructor(e,t){W8(this,"_type");this.payload=e,this.meta=t}},yB=class{constructor(e,t){W8(this,"_type");this.payload=e,this.meta=t}},C3e=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of w3e)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},vB="External signal was aborted",bB=(()=>{function e(t,n,r){const i=Zs(t+"/fulfilled",(l,c,d,f)=>({payload:l,meta:{...f||{},arg:d,requestId:c,requestStatus:"fulfilled"}})),o=Zs(t+"/pending",(l,c,d)=>({payload:void 0,meta:{...d||{},arg:c,requestId:l,requestStatus:"pending"}})),s=Zs(t+"/rejected",(l,c,d,f,p)=>({payload:f,error:(r&&r.serializeError||C3e)(l||"Rejected"),meta:{...p||{},arg:d,requestId:c,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(l==null?void 0:l.name)==="AbortError",condition:(l==null?void 0:l.name)==="ConditionError"}}));function a(l,{signal:c}={}){return(d,f,p)=>{const m=r!=null&&r.idGenerator?r.idGenerator(l):RO(),y=new AbortController;let v,b;function C(E){b=E,y.abort()}c&&(c.aborted?C(vB):c.addEventListener("abort",()=>C(vB),{once:!0}));const S=async function(){var _,N;let E;try{let j=(_=r==null?void 0:r.condition)==null?void 0:_.call(r,l,{getState:f,extra:p});if(E3e(j)&&(j=await j),j===!1||y.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const T=new Promise((O,D)=>{v=()=>{D({name:"AbortError",message:b||"Aborted"})},y.signal.addEventListener("abort",v)});d(o(m,l,(N=r==null?void 0:r.getPendingMeta)==null?void 0:N.call(r,{requestId:m,arg:l},{getState:f,extra:p}))),E=await Promise.race([T,Promise.resolve(n(l,{dispatch:d,getState:f,extra:p,requestId:m,signal:y.signal,abort:C,rejectWithValue:(O,D)=>new c7(O,D),fulfillWithValue:(O,D)=>new yB(O,D)})).then(O=>{if(O instanceof c7)throw O;return O instanceof yB?i(O.payload,m,l,O.meta):i(O,m,l)})])}catch(j){E=j instanceof c7?s(null,m,l,j.payload,j.meta):s(j,m,l)}finally{v&&y.signal.removeEventListener("abort",v)}return r&&!r.dispatchConditionRejection&&s.match(E)&&E.meta.condition||d(E),E}();return Object.assign(S,{abort:C,requestId:m,arg:l,unwrap(){return S.then(S3e)}})}}return Object.assign(a,{pending:o,rejected:s,fulfilled:i,settled:uc(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function S3e(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function E3e(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var k3e=Symbol.for("rtk-slice-createasyncthunk");function _3e(e,t){return`${e}/${t}`}function A3e({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[k3e];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(is(11));const a=(typeof i.reducers=="function"?i.reducers(j3e()):i.reducers)||{},l=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},d={addCase(E,A){const _=typeof E=="string"?E:E.type;if(!_)throw new Error(is(12));if(_ in c.sliceCaseReducersByType)throw new Error(is(13));return c.sliceCaseReducersByType[_]=A,d},addMatcher(E,A){return c.sliceMatchers.push({matcher:E,reducer:A}),d},exposeAction(E,A){return c.actionCreators[E]=A,d},exposeCaseReducer(E,A){return c.sliceCaseReducersByName[E]=A,d}};l.forEach(E=>{const A=a[E],_={reducerName:E,type:_3e(o,E),createNotation:typeof i.reducers=="function"};M3e(A)?R3e(_,A,d,t):T3e(_,A,d)});function f(){const[E={},A=[],_=void 0]=typeof i.extraReducers=="function"?Ote(i.extraReducers):[i.extraReducers],N={...E,...c.sliceCaseReducersByType};return b3e(i.initialState,j=>{for(let T in N)j.addCase(T,N[T]);for(let T of c.sliceMatchers)j.addMatcher(T.matcher,T.reducer);for(let T of A)j.addMatcher(T.matcher,T.reducer);_&&j.addDefaultCase(_)})}const p=E=>E,m=new Map;let y;function v(E,A){return y||(y=f()),y(E,A)}function b(){return y||(y=f()),y.getInitialState()}function C(E,A=!1){function _(j){let T=j[E];return typeof T>"u"&&A&&(T=b()),T}function N(j=p){const T=mB(m,A,()=>new WeakMap);return mB(T,j,()=>{const O={};for(const[D,R]of Object.entries(i.selectors??{}))O[D]=N3e(R,j,b,A);return O})}return{reducerPath:E,getSelectors:N,get selectors(){return N(_)},selectSlice:_}}
vendor: 1,301 bytes, line 68
68const S={name:o,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:b,...C(s),injectInto(E,{reducerPath:A,..._}={}){const N=A??s;return E.inject({reducerPath:N,reducer:v},_),{...S,...C(N,!0)}}};return S}}function N3e(e,t,n,r){function i(o,...s){let a=t(o);return typeof a>"u"&&r&&(a=n()),e(a,...s)}return i.unwrapped=e,i}var yu=A3e();function j3e(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function T3e({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!O3e(r))throw new Error(is(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Zs(e,s):Zs(e))}function M3e(e){return e._reducerDefinitionType==="asyncThunk"}function O3e(e){return e._reducerDefinitionType==="reducerWithPrepare"}function R3e({type:e,reducerName:t},n,r,i){if(!i)throw new Error(is(18));const{payloadCreator:o,fulfilled:s,pending:a,rejected:l,settled:c,options:d}=n,f=i(e,o,d);r.exposeAction(t,f),s&&r.addCase(f.fulfilled,s),a&&r.addCase(f.pen
68ding,a),l&&r.addCase(f.rejected,l),c&&r.addMatcher(f.settled,c),r.exposeCaseReducer(t,{fulfilled:s||Ix,pending:a||Ix,rejected:l||Ix,settled:c||Ix})}function Ix(){}function is(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Pte=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Pte||{});function xB(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var wB=nd;function Dte(e,t){if(e===t||!(wB(e)&&wB(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const s of n)o[s]=Dte(e[s],t[s]),i&&(i=e[s]===o[s]);return i?e:o}function Fp(e){let t=0;for(const n in e)t++;return t}var CB=e=>[].concat(...e);function P3e(e){return new RegExp("(^|:)//").test(e)}function D3e(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function Iw(e){return e!=null}function I3e(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var L3e=e=>e.replace(/\/$/,""),$3e=e=>e.replace(/^\//,"");function z3e(e,t){if(!e)return t;if(!t)return e;if(P3e(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=L3e(e),t=$3e(t),`${e}${n}${t}`}function F3e(e,t,n){return e.has(t)?e.get(t):e.set(t,n).get(t)}var SB=(...e)=>fetch(...e),B3e=e=>e.status>=200&&e.status<=299,H3e=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function EB(e){if(!nd(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}function V3e({baseUrl:e,prepareHeaders:t=f=>f,fetchFn:n=SB,paramsSerializer:r,isJsonContentType:i=H3e,jsonContentType:o="application/json",jsonReplacer:s,timeout:a,responseHandler:l,validateStatus:c,...d}={}){return typeof fetch>"u"&&n===SB&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,m,y)=>{const{getState:v,extra:b,endpoint:C,forced:S,type:E}=m;let A,{url:_,headers:N=new Headers(d.headers),params:j=void 0,responseHandler:T=l??"json",validateStatus:O=c??B3e,timeout:D=a,...R}=typeof p=="string"?{url:p}:p,I,F=m.signal;D&&(I=new AbortController,m.signal.addEventListener("abort",I.abort),F=I.signal);let $={...d,signal:F,...R};N=new Headers(EB(N)),$.headers=await t(N,{getState:v,arg:p,extra:b,endpoint:C,forced:S,type:E,extraOptions:y})||N;const H=X=>typeof X=="object"&&(nd(X)||Array.isArray(X)||typeof X.toJSON=="function");if(!$.headers.has("content-type")&&H($.body)&&$.headers.set("content-type",o),H($.body)&&i($.headers)&&($.body=JSON.stringify($.body,s)),j){const X=~_.indexOf("?")?"&":"?",Q=r?r(j):new URLSearchParams(EB(j));_+=X+Q}_=z3e(e,_);const L=new Request(_,$);A={request:new Request(_,$)};let z,V=!1,U=I&&setTimeout(()=>{V=!0,I.abort()},D);try{z=await n(L)}catch(X){return{error:{status:V?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(X)},meta:A}}finally{U&&clearTimeout(U),I==null||I.signal.removeEventListener("abort",I.abort)}const W=z.clone();A.response=W;let G,Y="";try{let X;if(await Promise.all([f(z,T).then(Q=>G=Q,Q=>X=Q),W.text().then(Q=>Y=Q,()=>{})]),X)throw X}catch(X){return{error:{status:"PARSING_ERROR",originalStatus:z.status,data:Y,error:String(X)},meta:A}}return O(z,G)?{data:G,meta:A}:{error:{status:z.status,data:G},meta:A}};async function f(p,m){if(typeof m=="function")return m(p);if(m==="content-type"&&(m=i(p.headers)?"json":"text"),m==="json"){const y=await p.text();return y.length?JSON.parse(y):null}return p.text()}}var kB=class{constructor(e,t=void 0){this.value=e,this.meta=t}},E5=Zs("__rtkq/focused"),PO=Zs("__rtkq/unfocused"),k5=Zs("__rtkq/online"),DO=Zs("__rtkq/offline"),u7=!1;function U3e(e,t){function n(){const r=()=>e(E5()),i=()=>e(PO()),o=()=>e(k5()),s=()=>e(DO()),a=()=>{window.document.visibilityState==="visible"?r():i()};return u7||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",a,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",o,!1),window.addEventListener("offline",s,!1),u7=!0),()=>{window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",a),window.removeEventListener("online",o),window.removeEventListener("offline",s),u7=!1}}return n()}function IO(e){return e.type==="query"}function q3e(e){return e.type==="mutation"}function LO(e){return e.type==="infinitequery"}function $O(e,t,n,r,i,o){return W3e(e)?e(t,n,r,i).filter(Iw).map(IN).map(o):Array.isArray(e)?e.map(IN).map(o):[]}function W3e(e){return typeof e=="function"}function IN(e){return typeof e=="string"?{type:e}:e}function G3e(e,t){return e.catch(t)}var Y1=Symbol("forceQueryFn"),LN=e=>typeof e[Y1]=="function";function K3e({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o}){const s=new Map,a=new Map,{unsubscribeQueryResult:l,removeMutationResult:c,updateSubscriptionOptions:d}=i.internalActions;return{buildInitiateQuery:b,buildInitiateInfiniteQuery:C,buildInitiateMutation:S,getRunningQueryThunk:f,getRunningMutationThunk:p,getRunningQueriesThunk:m,getRunningMutationsThunk:y};function f(E,A){return _=>{var T;const N=o.endpointDefinitions[E],j=e({queryArgs:A,endpointDefinition:N,endpointName:E});return(T=s.get(_))==null?void 0:T[j]}}function p(E,A){return _=>{var N;return(N=a.get(_))==null?void 0:N[A]}}function m(){return E=>Object.values(s.get(E)||{}).filter(Iw)}function y(){return E=>Object.values(a.get(E)||{}).filter(Iw)}function v(E,A){const _=(N,{subscribe:j=!0,forceRefetch:T,subscriptionOptions:O,[Y1]:D,...R}={})=>(I,F)=>{var ne;const $=e({queryArgs:N,endpointDefinition:A,endpointName:E});let H;const L={...R,type:"query",subscribe:j,forceRefetch:T,subscriptionOptions:O,endpointName:E,originalArgs:N,queryCacheKey:$,[Y1]:D};if(IO(A))H=t(L);else{const{direction:ie,initialPageParam:se}=R;H=n({...L,direction:ie,initialPageParam:se})}const B=i.endpoints[E].select(N),z=I(H),V=B(F()),{requestId:U,abort:W}=z,G=V.requestId!==U,Y=(ne=s.get(I))==null?void 0:ne[$],X=()=>B(F()),Q=Object.assign(D?z.then(X):G&&!Y?Promise.resolve(V):Promise.all([Y,z]).then(X),{arg:N,requestId:U,subscriptionOptions:O,queryCacheKey:$,abort:W,async unwrap(){const ie=await Q;if(ie.isError)throw ie.error;return ie.data},refetch:()=>I(_(N,{subscribe:!1,forceRefetch:!0})),unsubscribe(){j&&I(l({queryCacheKey:$,requestId:U}))},updateSubscriptionOptions(ie){Q.subscriptionOptions=ie,I(d({endpointName:E,requestId:U,queryCacheKey:$,options:ie}))}});if(!Y&&!G&&!D){const ie=F3e(s,I,{});ie[$]=Q,Q.then(()=>{delete ie[$],Fp(ie)||s.delete(I)})}return Q};return _}function b(E,A){return v(E,A)}function C(E,A){return v(E,A)}function S(E){return(A,{track:_=!0,fixedCacheKey:N}={})=>(j,T)=>{const O=r({type:"mutation",endpointName:E,originalArgs:A,track:_,fixedCacheKey:N}),D=j(O),{requestId:R,abort:I,unwrap:F}=D,$=G3e(D.unwrap().then(z=>({data:z})),z=>({error:z})),H=()=>{j(c({requestId:R,fixedCacheKey:N}))},L=Object.assign($,{arg:D.arg,requestId:R,abort:I,unwrap:F,reset:H}),B=a.get(j)||{};return a.set(j,B),B[R]=L,L.then(()=>{delete B[R],Fp(B)||a.delete(j)}),N&&(B[N]=L,L.then(()=>{B[N]===L&&(delete B[N],Fp(B)||a.delete(j))})),L}}}function Y3e(e){return e}var Lx=(e={})=>({...e,[w5]:!0});function X3e({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n}
68,serializeQueryArgs:r,api:i,assertTagType:o,selectors:s}){const a=(T,O,D,R)=>(I,F)=>{const $=n[T],H=r({queryArgs:O,endpointDefinition:$,endpointName:T});if(I(i.internalActions.queryResultPatched({queryCacheKey:H,patches:D})),!R)return;const L=i.endpoints[T].select(O)(F()),B=$O($.providesTags,L.data,void 0,O,{},o);I(i.internalActions.updateProvidedBy({queryCacheKey:H,providedTags:B}))};function l(T,O,D=0){const R=[O,...T];return D&&R.length>D?R.slice(0,-1):R}function c(T,O,D=0){const R=[...T,O];return D&&R.length>D?R.slice(1):R}const d=(T,O,D,R=!0)=>(I,F)=>{const H=i.endpoints[T].select(O)(F()),L={patches:[],inversePatches:[],undo:()=>I(i.util.patchQueryData(T,O,L.inversePatches,R))};if(H.status==="uninitialized")return L;let B;if("data"in H)if(ia(H.data)){const[z,V,U]=jte(H.data,D);L.patches.push(...V),L.inversePatches.push(...U),B=z}else B=D(H.data),L.patches.push({op:"replace",path:[],value:B}),L.inversePatches.push({op:"replace",path:[],value:H.data});return L.patches.length===0||I(i.util.patchQueryData(T,O,L.patches,R)),L},f=(T,O,D)=>R=>R(i.endpoints[T].initiate(O,{subscribe:!1,forceRefetch:!0,[Y1]:()=>({data:D})})),p=(T,O)=>T.query&&T[O]?T[O]:Y3e,m=async(T,{signal:O,abort:D,rejectWithValue:R,fulfillWithValue:I,dispatch:F,getState:$,extra:H})=>{var B;const L=n[T.endpointName];try{let z=p(L,"transformResponse");const V={signal:O,abort:D,dispatch:F,getState:$,extra:H,endpoint:T.endpointName,type:T.type,forced:T.type==="query"?y(T,$()):void 0,queryCacheKey:T.type==="query"?T.queryCacheKey:void 0},U=T.type==="query"?T[Y1]:void 0;let W;const G=async(X,Q,ne,ie)=>{if(Q==null&&X.pages.length)return Promise.resolve({data:X});const se={queryArg:T.originalArgs,pageParam:Q},oe=await Y(se),J=ie?l:c;return{data:{pages:J(X.pages,oe.data,ne),pageParams:J(X.pageParams,Q,ne)}}};async function Y(X){let Q;const{extraOptions:ne}=L;if(U?Q=U():L.query?Q=await t(L.query(X),V,ne):Q=await L.queryFn(X,V,ne,se=>t(se,V,ne)),typeof process<"u",Q.error)throw new kB(Q.error,Q.meta);const ie=await z(Q.data,Q.meta,X);return{...Q,data:ie}}if(T.type==="query"&&"infiniteQueryOptions"in L){const{infiniteQueryOptions:X}=L,{maxPages:Q=1/0}=X;let ne;const ie={pages:[],pageParams:[]},se=(B=s.selectQueryEntry($(),T.queryCacheKey))==null?void 0:B.data,J=y(T,$())&&!T.direction||!se?ie:se;if("direction"in T&&T.direction&&J.pages.length){const ae=T.direction==="backward",pe=(ae?Ite:$N)(X,J);ne=await G(J,pe,Q,ae)}else{const{initialPageParam:ae=X.initialPageParam}=T,re=(se==null?void 0:se.pageParams)??[],pe=re[0]??ae,be=re.length;ne=await G(J,pe,Q),U&&(ne={data:ne.data.pages[0]});for(let xe=1;xe<be;xe++){const ke=$N(X,ne.data);ne=await G(ne.data,ke,Q)}}W=ne}else W=await Y(T.originalArgs);return I(W.data,Lx({fulfilledTimeStamp:Date.now(),baseQueryMeta:W.meta}))}catch(z){let V=z;if(V instanceof kB){let U=p(L,"transformErrorResponse");try{return R(await U(V.value,V.meta,T.originalArgs),Lx({baseQueryMeta:V.meta}))}catch(W){V=W}}throw console.error(V),V}};function y(T,O){const D=s.selectQueryEntry(O,T.queryCacheKey),R=s.selectConfig(O).refetchOnMountOrArgChange,I=D==null?void 0:D.fulfilledTimeStamp,F=T.forceRefetch??(T.subscribe&&R);return F?F===!0||(Number(new Date)-Number(I))/1e3>=F:!1}const v=()=>bB(`${e}/executeQuery`,m,{getPendingMeta({arg:O}){const D=n[O.endpointName];return Lx({startedTimeStamp:Date.now(),...LO(D)?{direction:O.direction}:{}})},condition(O,{getState:D}){var z;const R=D(),I=s.selectQueryEntry(R,O.queryCacheKey),F=I==null?void 0:I.fulfilledTimeStamp,$=O.originalArgs,H=I==null?void 0:I.originalArgs,L=n[O.endpointName],B=O.direction;return LN(O)?!0:(I==null?void 0:I.status)==="pending"?!1:y(O,R)||IO(L)&&((z=L==null?void 0:L.forceRefetch)!=null&&z.call(L,{currentArg:$,previousArg:H,endpointState:I,state:R}
68))?!0:!(F&&!B)},dispatchConditionRejection:!0}),b=v(),C=v(),S=bB(`${e}/executeMutation`,m,{getPendingMeta(){return Lx({startedTimeStamp:Date.now()})}}),E=T=>"force"in T,A=T=>"ifOlderThan"in T,_=(T,O,D)=>(R,I)=>{const F=E(D)&&D.force,$=A(D)&&D.ifOlderThan,H=(B=!0)=>{const z={forceRefetch:B,isPrefetch:!0};return i.endpoints[T].initiate(O,z)},L=i.endpoints[T].select(O)(I());if(F)R(H());else if($){const B=L==null?void 0:L.fulfilledTimeStamp;if(!B){R(H());return}(Number(new Date)-Number(new Date(B)))/1e3>=$&&R(H())}else R(H(!1))};function N(T){return O=>{var D,R;return((R=(D=O==null?void 0:O.meta)==null?void 0:D.arg)==null?void 0:R.endpointName)===T}}function j(T,O){return{matchPending:v1(OO(T),N(O)),matchFulfilled:v1(rd(T),N(O)),matchRejected:v1(e0(T),N(O))}}return{queryThunk:b,mutationThunk:S,infiniteQueryThunk:C,prefetch:_,updateQueryData:d,upsertQueryData:f,patchQueryData:a,buildMatchThunkActions:j}}function $N(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function Ite(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}function Lte(e,t,n,r){return $O(n[e.meta.arg.endpointName][t],rd(e)?e.payload:void 0,S5(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function $x(e,t,n){const r=e[t];r&&n(r)}function X1(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function _B(e,t,n){const r=e[X1(t)];r&&n(r)}var kg={};function Z3e({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:s,hasRehydrationInfo:a},assertTagType:l,config:c}){const d=Zs(`${e}/resetApiState`);function f(j,T,O,D){var R;j[R=T.queryCacheKey]??(j[R]={status:"uninitialized",endpointName:T.endpointName}),$x(j,T.queryCacheKey,I=>{I.status="pending",I.requestId=O&&I.requestId?I.requestId:D.requestId,T.originalArgs!==void 0&&(I.originalArgs=T.originalArgs),I.startedTimeStamp=D.startedTimeStamp;const F=i[D.arg.endpointName];LO(F)&&"direction"in T&&(I.direction=T.direction)})}function p(j,T,O,D){$x(j,T.arg.queryCacheKey,R=>{if(R.requestId!==T.requestId&&!D)return;const{merge:I}=i[T.arg.endpointName];if(R.status="fulfilled",I)if(R.data!==void 0){const{fulfilledTimeStamp:F,arg:$,baseQueryMeta:H,requestId:L}=T;let B=Cv(R.data,z=>I(z,O,{arg:$.originalArgs,baseQueryMeta:H,fulfilledTimeStamp:F,requestId:L}));R.data=B}else R.data=O;else R.data=i[T.arg.endpointName].structuralSharing??!0?Dte(qa(R.data)?Hwe(R.data):R.data,O):O;delete R.error,R.fulfilledTimeStamp=T.fulfilledTimeStamp})}const m=yu({name:`${e}/queries`,initialState:kg,reducers:{removeQueryResult:{reducer(j,{payload:{queryCacheKey:T}}){delete j[T]},prepare:Eg()},cacheEntriesUpserted:{reducer(j,T){for(const O of T.payload){const{queryDescription:D,value:R}=O;f(j,D,!0,{arg:D,requestId:T.meta.requestId,startedTimeStamp:T.meta.timestamp}),p(j,{arg:D,requestId:T.meta.requestId,fulfilledTimeStamp:T.meta.timestamp,baseQueryMeta:{}},R,!0)}},prepare:j=>({payload:j.map(D=>{const{endpointName:R,arg:I,value:F}=D,$=i[R];return{queryDescription:{type:"query",endpointName:R,originalArgs:D.arg,queryCacheKey:r({queryArgs:I,endpointDefinition:$,endpointName:R})},value:F}}),meta:{[w5]:!0,requestId:RO(),timestamp:Date.now()}})},queryResultPatched:{reducer(j,{payload:{queryCacheKey:T,patches:O}}){$x(j,T,D=>{D.data=dB(D.data,O.concat())})},prepare:Eg()}},extraReducers(j){j.addCase(t.pending,(T,{meta:O,meta:{arg:D}})=>{const R=LN(D);f(T,D,R,O)}).addCase(t.fulfilled,(T,{meta:O,payload:D})=>{const R=LN(O.arg);p(T,O,D,R)}).addCase(t.rejected,(T,{meta:{condition:O,arg:D,requestId:R},error:I,payload:F})=>{$x(T,D.queryCacheKey,$=>{if(!O){if($.requestId!==R)return;$.status="rejected",$.error=F??I}})}).addMatcher(a,(T,O)=>{const{queries:D}=s(O);for(const[R,I]of Object.entries(D))((I==null?void 0:I.status)==="fulfilled"||(I==null?void 0:I.status)==="rejected")&&(T[R]=I)})}}),y=yu({name:`${e}/mutations`,initialState:kg,reducers:{removeMutationResult:{reducer(j,{payload:T}){const O=X1(T);O in j&&delete j[O]},prepare:Eg()}},extraReducers(j){j.addCase(n.pending,(T,{meta:O,meta:{requestId:D,arg:R,startedTimeStamp:I}})=>{R.track&&(T[X1(O)]={requestId:D,status:"pending",endpointName:R.endpointName,startedTimeStamp:I})}).addCase(n.fulfilled,(T,{payload:O,meta:D})=>{D.arg.track&&_B(T,D,R=>{R.requestId===D.requestId&&(R.status="fulfilled",R.data=O,R.fulfilledTimeStamp=D.fulfilledTimeStamp)})}).addCase(n.rejected,(T,{payload:O,error:D,meta:R})=>{R.arg.track&&_B(T,R,I=>{I.requestId===R.requestId&&(I.status="rejected",I.error=O??D)})}).addMatcher(a,(T,O)=>{const{mutations:D}=s(O);for(const[R,I]of Object.entries(D))((I==null?void 0:I.status)==="fulfilled"||(I==null?void 0:I.status)==="rejected")&&R!==(I==null?void 0:I.requestId)&&(T[R]=I)})}}),v=yu({name:`${e}/invalidation`,initialState:kg,reducers:{updateProvidedBy:{reducer(j,T){var R,I;const{queryCacheKey:O,providedTags:D}=T.payload;for(const F of Object.values(j))for(const $ of Object.values(F)){const H=$.indexOf(O);H!==-1&&$.splice(H,1)}for(const{type:F,id:$}
68of D){const H=(R=j[F]??(j[F]={}))[I=$||"__internal_without_id"]??(R[I]=[]);H.includes(O)||H.push(O)}},prepare:Eg()}},extraReducers(j){j.addCase(m.actions.removeQueryResult,(T,{payload:{queryCacheKey:O}})=>{for(const D of Object.values(T))for(const R of Object.values(D)){const I=R.indexOf(O);I!==-1&&R.splice(I,1)}}).addMatcher(a,(T,O)=>{var R,I;const{provided:D}=s(O);for(const[F,$]of Object.entries(D))for(const[H,L]of Object.entries($)){const B=(R=T[F]??(T[F]={}))[I=H||"__internal_without_id"]??(R[I]=[]);for(const z of L)B.includes(z)||B.push(z)}}).addMatcher(uc(rd(t),S5(t)),(T,O)=>{b(T,O)}).addMatcher(m.actions.cacheEntriesUpserted.match,(T,O)=>{for(const{queryDescription:D,value:R}of O.payload)b(T,{type:"UNKNOWN",payload:R,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:D}})})}});function b(j,T){const O=Lte(T,"providesTags",i,l),{queryCacheKey:D}=T.meta.arg;v.caseReducers.updateProvidedBy(j,v.actions.updateProvidedBy({queryCacheKey:D,providedTags:O}))}const C=yu({name:`${e}/subscriptions`,initialState:kg,reducers:{updateSubscriptionOptions(j,T){},unsubscribeQueryResult(j,T){},internal_getRTKQSubscriptions(){}}}),S=yu({name:`${e}/internalSubscriptions`,initialState:kg,reducers:{subscriptionsUpdated:{reducer(j,T){return dB(j,T.payload)},prepare:Eg()}}}),E=yu({name:`${e}/config`,initialState:{online:I3e(),focused:D3e(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(j,{payload:T}){j.middlewareRegistered=j.middlewareRegistered==="conflict"||o!==T?"conflict":!0}},extraReducers:j=>{j.addCase(k5,T=>{T.online=!0}).addCase(DO,T=>{T.online=!1}).addCase(E5,T=>{T.focused=!0}).addCase(PO,T=>{T.focused=!1}).addMatcher(a,T=>({...T}))}}),A=Cte({queries:m.reducer,mutations:y.reducer,provided:v.reducer,subscriptions:S.reducer,config:E.reducer}),_=(j,T)=>A(d.match(T)?void 0:j,T),N={...E.actions,...m.actions,...C.actions,...S.actions,...y.actions,...v.actions,resetApiState:d};return{reducer:_,actions:N}}var Vl=Symbol.for("RTKQ/skipToken"),$te={status:"uninitialized"},AB=Cv($te,()=>{}),NB=Cv($te,()=>{});function Q3e({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=E=>AB,i=E=>NB;return{buildQuerySelector:p,buildInfiniteQuerySelector:m,buildMutationSelector:y,selectInvalidatedBy:v,selectCachedArgsForQuery:b,selectApiState:s,selectQueries:a,selectMutations:c,selectQueryEntry:l,selectConfig:d};function o(E){return{...E,...xB(E.status)}}function s(E){return E[t]}function a(E){var A;return(A=s(E))==null?void 0:A.queries}function l(E,A){var _;return(_=a(E))==null?void 0:_[A]}function c(E){var A;return(A=s(E))==null?void 0:A.mutations}function d(E){var A;return(A=s(E))==null?void 0:A.config}function f(E,A,_){return N=>{if(N===Vl)return n(r,_);const j=e({queryArgs:N,endpointDefinition:A,endpointName:E});return n(O=>l(O,j)??AB,_)}}function p(E,A){return f(E,A,o)}function m(E,A){const{infiniteQueryOptions:_}=A;function N(j){const T={...j,...xB(j.status)},{isLoading:O,isError:D,direction:R}=T,I=R==="forward",F=R==="backward";return{...T,hasNextPage:C(_,T.data),hasPreviousPage:S(_,T.data),isFetchingNextPage:O&&I,isFetchingPreviousPage:O&&F,isFetchNextPageError:D&&I,isFetchPreviousPageError:D&&F}}return f(E,A,N)}function y(){return E=>{let A;return typeof E=="object"?A=X1(E)??Vl:A=E,n(A===Vl?i:j=>{var T,O;return((O=(T=s(j))==null?void 0:T.mutations)==null?void 0:O[A])??NB},o)}}function v(E,A){const _=E[t],N=new Set;for(const j of A.filter(Iw).map(IN)){const T=_.provided[j.type];if(!T)continue;let O=(j.id!==void 0?T[j.id]:CB(Object.values(T)))??[];for(const D of O)N.add(D)}return CB(Array.from(N.values()).map(j=>{const T=_.queries[j];return T?[{queryCacheKey:j,endpointName:T.endpointName,originalArgs:T.originalArgs}]:[]}))}function b(E,A){return Object.values(a(E)).filter(_=>(_==null?void 0:_.endpointName)===A&&_.status!=="uninitialized").map(_=>_.originalArgs)}function C(E,A){return A?$N(E,A)!=null:!1}function S(E,A){return!A||!E.getPreviousPageParam?!1:Ite(E,A)!=null}}var tp=WeakMap?new WeakMap:void 0,zN=({endpointName:e,queryArgs:t})=>{let n="";const r=tp==null?void 0:tp.get(t);if(typeof r=="string")n=r;else{const i=JSON.stringify(t,(o,s)=>(s=typeof s=="bigint"?{$bigint:s.toString()}:s,s=nd(s)?Object.keys(s).sort().reduce((a,l)=>(a[l]=s[l],a),{}):s,s));nd(t)&&(tp==null||tp.set(t,i)),n=i}return`${e}(${n})`};function zte(...e){return function(n){const r=Dw(c=>{var d;return(d=n.extractRehydrationInfo)==null?void 0:d.call(n,c,{reducerPath:n.reducerPath??"api"})}
68),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(c){let d=zN;if("serializeQueryArgs"in c.endpointDefinition){const f=c.endpointDefinition.serializeQueryArgs;d=p=>{const m=f(p);return typeof m=="string"?m:zN({...p,queryArgs:m})}}else n.serializeQueryArgs&&(d=n.serializeQueryArgs);return d(c)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(c){c()},apiUid:RO(),extractRehydrationInfo:r,hasRehydrationInfo:Dw(c=>r(c)!=null)},s={injectEndpoints:l,enhanceEndpoints({addTagTypes:c,endpoints:d}){if(c)for(const f of c)i.tagTypes.includes(f)||i.tagTypes.push(f);if(d)for(const[f,p]of Object.entries(d))typeof p=="function"?p(o.endpointDefinitions[f]):Object.assign(o.endpointDefinitions[f]||{},p);return s}},a=e.map(c=>c.init(s,i,o));function l(c){const d=c.endpoints({query:f=>({...f,type:"query"}),mutation:f=>({...f,type:"mutation"}),infiniteQuery:f=>({...f,type:"infinitequery"})});for(const[f,p]of Object.entries(d)){if(c.overrideExisting!==!0&&f in o.endpointDefinitions){if(c.overrideExisting==="throw")throw new Error(is(39));continue}o.endpointDefinitions[f]=p;for(const m of a)m.injectEndpoint(f,p)}return s}return s.injectEndpoints({endpoints:n.endpoints})}}function J3e(){return function(){throw new Error(is(33))}}function Tl(e,...t){return Object.assign(e,...t)}var e4e=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,o=null;const{updateSubscriptionOptions:s,unsubscribeQueryResult:a}=e.internalActions,l=(m,y)=>{var b,C,S;if(s.match(y)){const{queryCacheKey:E,requestId:A,options:_}=y.payload;return(b=m==null?void 0:m[E])!=null&&b[A]&&(m[E][A]=_),!0}if(a.match(y)){const{queryCacheKey:E,requestId:A}=y.payload;return m[E]&&delete m[E][A],!0}if(e.internalActions.removeQueryResult.match(y))return delete m[y.payload.queryCacheKey],!0;if(t.pending.match(y)){const{meta:{arg:E,requestId:A}}=y,_=m[C=E.queryCacheKey]??(m[C]={});return _[`${A}_running`]={},E.subscribe&&(_[A]=E.subscriptionOptions??_[A]??{}),!0}let v=!1;if(t.fulfilled.match(y)||t.rejected.match(y)){const E=m[y.meta.arg.queryCacheKey]||{},A=`${y.meta.requestId}_running`;v||(v=!!E[A]),delete E[A]}if(t.rejected.match(y)){const{meta:{condition:E,arg:A,requestId:_}}=y;if(E&&A.subscribe){const N=m[S=A.queryCacheKey]??(m[S]={});N[_]=A.subscriptionOptions??N[_]??{},v=!0}}return v},c=()=>n.currentSubscriptions,p={getSubscriptions:c,getSubscriptionCount:m=>{const v=c()[m]??{};return Fp(v)},isRequestSubscribed:(m,y)=>{var b;const v=c();return!!((b=v==null?void 0:v[m])!=null&&b[y])}};return(m,y)=>{if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(m))return i=n.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(m))return[!1,p];const v=l(n.currentSubscriptions,m);let b=!0;if(v){o||(o=setTimeout(()=>{const E=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,A]=jte(i,()=>E);y.next(e.internalActions.subscriptionsUpdated(A)),i=E,o=null},500));const C=typeof m.type=="string"&&!!m.type.startsWith(r),S=t.rejected.match(m)&&m.meta.condition&&!!m.meta.arg.subscribe;b=!C&&!S}return[b,!1]}};function t4e(e){for(const t in e)return!1;return!0}var n4e=2147483647/1e3-1,r4e=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:s}})=>{const{removeQueryResult:a,unsubscribeQueryResult:l,cacheEntriesUpserted:c}=t.internalActions,d=uc(l.match,n.fulfilled,n.rejected,c.match);function f(b){const C=i.currentSubscriptions[b];return!!C&&!t4e(C)}const p={},m=(b,C,S)=>{const E=C.getState(),A=s(E);if(d(b)){let _;if(c.match(b))_=b.payload.map(N=>N.queryDescription.queryCacheKey);else{const{queryCacheKey:N}=l.match(b)?b.payload:b.meta.arg;_=[N]}y(_,C,A)}if(t.util.resetApiState.match(b))for(const[_,N]of Object.entries(p))N&&clearTimeout(N),delete p[_];if(r.hasRehydrationInfo(b)){const{queries:_}=r.extractRehydrationInfo(b);y(Object.keys(_),C,A)}};function y(b,C,S){const E=C.getState();for(const A of b){const _=o(E,A);v(A,_==null?void 0:_.endpointName,C,S)}}function v(b,C,S,E){const A=r.endpointDefinitions[C],_=(A==null?void 0:A.keepUnusedData
68For)??E.keepUnusedDataFor;if(_===1/0)return;const N=Math.max(0,Math.min(_,n4e));if(!f(b)){const j=p[b];j&&clearTimeout(j),p[b]=setTimeout(()=>{f(b)||S.dispatch(a({queryCacheKey:b})),delete p[b]},N*1e3)}}return m},jB=new Error("Promise never resolved before cacheEntryRemoved."),i4e=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:s,selectApiState:a}})=>{const l=DN(r),c=DN(i),d=rd(r,i),f={};function p(C,S,E){const A=f[C];A!=null&&A.valueResolved&&(A.valueResolved({data:S,meta:E}),delete A.valueResolved)}function m(C){const S=f[C];S&&(delete f[C],S.cacheEntryRemoved())}const y=(C,S,E)=>{const A=v(C);function _(N,j,T,O){const D=s(E,j),R=s(S.getState(),j);!D&&R&&b(N,O,j,S,T)}if(r.pending.match(C))_(C.meta.arg.endpointName,A,C.meta.requestId,C.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(C))for(const{queryDescription:N,value:j}of C.payload){const{endpointName:T,originalArgs:O,queryCacheKey:D}=N;_(T,D,C.meta.requestId,O),p(D,j,{})}else if(i.pending.match(C))S.getState()[t].mutations[A]&&b(C.meta.arg.endpointName,C.meta.arg.originalArgs,A,S,C.meta.requestId);else if(d(C))p(A,C.payload,C.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(C)||e.internalActions.removeMutationResult.match(C))m(A);else if(e.util.resetApiState.match(C))for(const N of Object.keys(f))m(N)};function v(C){return l(C)?C.meta.arg.queryCacheKey:c(C)?C.meta.arg.fixedCacheKey??C.meta.requestId:e.internalActions.removeQueryResult.match(C)?C.payload.queryCacheKey:e.internalActions.removeMutationResult.match(C)?X1(C.payload):""}function b(C,S,E,A,_){const N=n.endpointDefinitions[C],j=N==null?void 0:N.onCacheEntryAdded;if(!j)return;const T={},O=new Promise(H=>{T.cacheEntryRemoved=H}),D=Promise.race([new Promise(H=>{T.valueResolved=H}),O.then(()=>{throw jB})]);D.catch(()=>{}),f[E]=T;const R=e.endpoints[C].select(N.type==="query"?S:E),I=A.dispatch((H,L,B)=>B),F={...A,getCacheEntry:()=>R(A.getState()),requestId:_,extra:I,updateCachedData:N.type==="query"?H=>A.dispatch(e.util.updateQueryData(C,S,H)):void 0,cacheDataLoaded:D,cacheEntryRemoved:O},$=j(S,F);Promise.resolve($).catch(H=>{if(H!==jB)throw H})}return y},o4e=({api:e,context:{apiUid:t},reducerPath:n})=>(r,i)=>{e.util.resetApiState.match(r)&&i.dispatch(e.internalActions.middlewareRegistered(t))},s4e=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:s,refetchQuery:a,internalState:l})=>{const{removeQueryResult:c}=o.internalActions,d=uc(rd(r),S5(r)),f=uc(rd(r,i),e0(r,i));let p=[];const m=(b,C)=>{d(b)?v(Lte(b,"invalidatesTags",n,s),C):f(b)?v([],C):o.util.invalidateTags.match(b)&&v($O(b.payload,void 0,void 0,void 0,void 0,s),C)};function y(b){var E;const{queries:C,mutations:S}=b;for(const A of[C,S])for(const _ in A)if(((E=A[_])==null?void 0:E.status)==="pending")return!0;return!1}function v(b,C){const S=C.getState(),E=S[e];if(p.push(...b),E.config.invalidationBehavior==="delayed"&&y(E))return;const A=p;if(p=[],A.length===0)return;const _=o.util.selectInvalidatedBy(S,A);t.batch(()=>{const N=Array.from(_.values());for(const{queryCacheKey:j}of N){const T=E.queries[j],O=l.currentSubscriptions[j]??{};T&&(Fp(O)===0?C.dispatch(c({queryCacheKey:j})):T.status!=="uninitialized"&&C.dispatch(a(T)))}})}return m},a4e=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const o={},s=(p,m)=>{(n.internalActions.updateSubscriptionOptions.match(p)||n.internalActions.unsubscribeQueryResult.match(p))&&l(p.payload,m),(t.pending.match(p)||t.rejected.match(p)&&p.meta.condition)&&l(p.meta.arg,m),(t.fulfilled.match(p)||t.rejected.match(p)&&!p.meta.condition)&&a(p.meta.arg,m),n.util.resetApiState.match(p)&&d()};function a({queryCacheKey:p},m){const y=m.getState()[e],v=y.queries[p],b=i.currentSubscriptions[p];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:C,skipPollingIfUnfocused:S}=f(b);if(!Number.isFinite(C))return;const E=o[p];E!=null&&E.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);const A=Date.now()+C;o[p]={nextPollTimestamp:A,pollingInterval:C,timeout:setTimeout(()=>{(y.config.focused||!S)&&m.dispatch(r(v)),a({queryCacheKey:p},m)},C)}}function l({queryCacheKey:p},m){const v=m.getState()[e].queries[p],b=i.currentSubscriptions[p];if(!v||v.status==="uninitialized")return;const{lowestPollingInterval:C}=f(b);if(!Number.isFinite(C)){c(p);return}const S=o[p],E=Date.now()+C;(!S||E<S.nextPollTimestamp)&&a({queryCacheKey:p},m)}function c(p){const m=o[p];m!=null&&m.timeout&&clearTimeout(m.timeout),delete o[p]}function d(){for(const p of Object.keys(o))c(p)}function f(p={}){let m=!1,y=Number.POSITIVE_INFINITY;for(let v in p)p[v].pollingInterval&&(y=Math.min(p[v].pollingInterval,y),m=p[v].skipPollingIfUnfocused||m);return{lowestPollingInterval:y,skipPollingIfUnfocused:m}}return s},l4e=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=OO(n,r),o=e0(n,r),s=rd(n,r),a={};return(c,d)=>{var f,p;if(i(c)){const{requestId:m,arg:{endpointName:y,originalArgs:v}}=c.meta,b=t.endpointDefinitions[y],C=b==null?void 0:b.onQueryStarted;if(C){const S={},E=new Promise((j,T)=>{S.resolve=j,S.reject=T});E.catch(()=>{}),a[m]=S;const A=e.endpoints[y].select(b.type==="query"?v:m),_=d.dispatch((j,T,O)=>O),N={...d,getCacheEntry:()=>A(d.getState()),requestId:m,extra:_,updateCachedData:b.type==="query"?j=>d.dispatch(e.util.updateQueryData(y,v,j)):void 0,queryFulfilled:E};C(v,N)}}else if(s(c)){const{requestId:m,baseQueryMeta:y}=c.meta;(f=a[m])==null||f.resolve({data:c.payload,meta:y}),delete a[m]}else if(o(c)){const{requestId:m,rejectedWithValue:y,baseQueryMeta:v}=c.meta;
68(p=a[m])==null||p.reject({error:c.payload??c.error,isUnhandledError:!y,meta:v}),delete a[m]}}},c4e=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions,s=(l,c)=>{E5.match(l)&&a(c,"refetchOnFocus"),k5.match(l)&&a(c,"refetchOnReconnect")};function a(l,c){const d=l.getState()[e],f=d.queries,p=i.currentSubscriptions;t.batch(()=>{for(const m of Object.keys(p)){const y=f[m],v=p[m];if(!v||!y)continue;(Object.values(v).some(C=>C[c]===!0)||Object.values(v).every(C=>C[c]===void 0)&&d.config[c])&&(Fp(v)===0?l.dispatch(o({queryCacheKey:m})):y.status!=="uninitialized"&&l.dispatch(r(y)))}})}return s};function u4e(e){const{reducerPath:t,queryThunk:n,api:r,context:i}=e,{apiUid:o}=i,s={invalidateTags:Zs(`${t}/invalidateTags`)},a=f=>f.type.startsWith(`${t}/`),l=[o4e,r4e,s4e,a4e,i4e,l4e];return{middleware:f=>{let p=!1;const y={...e,internalState:{currentSubscriptions:{}},refetchQuery:d,isThisApiSliceAction:a},v=l.map(S=>S(y)),b=e4e(y),C=c4e(y);return S=>E=>{if(!Ste(E))return S(E);p||(p=!0,f.dispatch(r.internalActions.middlewareRegistered(o)));const A={...f,next:S},_=f.getState(),[N,j]=b(E,A,_);let T;if(N?T=S(E):T=j,f.getState()[t]&&(C(E,A,_),a(E)||i.hasRehydrationInfo(E)))for(const O of v)O(E,A,_);return T}},actions:s};function d(f){return e.api.endpoints[f.endpointName].initiate(f.originalArgs,{subscribe:!1,forceRefetch:!0})}}var TB=Symbol(),Fte=({createSelector:e=MO}={})=>({name:TB,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:s,refetchOnMountOrArgChange:a,refetchOnFocus:l,refetchOnReconnect:c,invalidationBehavior:d},f){Qwe();const p=G=>G;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:k5,onOffline:DO,onFocus:E5,onFocusLost:PO},util:{}});const m=Q3e({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:y,selectCachedArgsForQuery:v,buildQuerySelector:b,buildInfiniteQuerySelector:C,buildMutationSelector:S}=m;Tl(t.util,{selectInvalidatedBy:y,selectCachedArgsForQuery:v});const{queryThunk:E,infiniteQueryThunk:A,mutationThunk:_,patchQueryData:N,updateQueryData:j,upsertQueryData:T,prefetch:O,buildMatchThunkActions:D}=X3e({baseQuery:n,reducerPath:i,context:f,api:t,serializeQueryArgs:o,assertTagType:p,selectors:m}),{reducer:R,actions:I}=Z3e({context:f,queryThunk:E,mutationThunk:_,serializeQueryArgs:o,reducerPath:i,assertTagType:p,config:{refetchOnFocus:l,refetchOnReconnect:c,refetchOnMountOrArgChange:a,keepUnusedDataFor:s,reducerPath:i,invalidationBehavior:d}});Tl(t.util,{patchQueryData:N,updateQueryData:j,upsertQueryData:T,prefetch:O,resetApiState:I.resetApiState,upsertQueryEntries:I.cacheEntriesUpserted}),Tl(t.internalActions,I);const{middleware:F,actions:$}=u4e({reducerPath:i,context:f,queryThunk:E,mutationThunk:_,infiniteQueryThunk:A,api:t,assertTagType:p,selectors:m});Tl(t.util,$),Tl(t,{reducer:R,middleware:F});const{buildInitiateQuery:H,buildInitiateInfiniteQuery:L,buildInitiateMutation:B,getRunningMutationThunk:z,getRunningMutationsThunk:V,getRunningQueriesThunk:U,getRunningQueryThunk:W}=K3e({queryThunk:E,mutationThunk:_,infiniteQueryThunk:A,api:t,serializeQueryArgs:o,context:f});return Tl(t.util,{getRunningMutationThunk:z,getRunningMutationsThunk:V,getRunningQueryThunk:W,getRunningQueriesThunk:U}),{name:TB,injectEndpoint(G,Y){var ne;const Q=(ne=t.endpoints)[G]??(ne[G]={});IO(Y)&&Tl(Q,{name:G,select:b(G,Y),initiate:H(G,Y)},D(E,G)),q3e(Y)&&Tl(Q,{name:G,select:S(),initiate:B(G)},D(_,G)),LO(Y)&&Tl(Q,{name:G,select:C(G,Y),initiate:L(G,Y)},D(E,G))}}}});Fte();function zx(e){return e.replace(e[0],e[0].toUpperCase())}function d4e(e){return e.type==="query"}function f4e(e){return e.type==="mutation"}function Bte(e){return e.type==="infinitequery"}function _g(e,...t){return Object.assign(e,...t)}var d7=Symbol();function MB(e,t,n,r){const i=x.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}),[e,t,n,r]),o=x.useRef(i);return x.useEffect(()=>{o.current.serialized!==i.serialized&&(o.current=i)},[i]),o.current.serialized===i.serialized?o.current.queryArgs:e}function Fx(e){const t=x.useRef(e);return x.useEffect(()=>{g1(t.current,e)||(t.current=e)},[e]),g1(t.current,e)?t.current:e}var h4e=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p4e=h4e(),m4e=()=>typeof navigator<"u"&&navigator.product==="ReactNative",g4e=m4e(),y4e=()=>p4e||g4e?x.useLayoutEffect:x.useEffect,v4e=y4e(),OB=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Pte.pending}:e;function f7(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var h7=["data","status","isLoading","isSuccess","isError","error"];function b4e({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:s},serializeQueryArgs:a,context:l}){const c=o?A=>A():x.useEffect;return{buildQueryHooks:C,buildInfiniteQueryHooks:S,buildMutationHook:E,usePrefetch:p};function d(A,_,N){if(_!=null&&_.endpointName&&A.isUninitialized){const{endpointName:I}=_,F=l.endpointDefinitions[I];
68N!==Vl&&a({queryArgs:_.originalArgs,endpointDefinition:F,endpointName:I})===a({queryArgs:N,endpointDefinition:F,endpointName:I})&&(_=void 0)}let j=A.isSuccess?A.data:_==null?void 0:_.data;j===void 0&&(j=A.data);const T=j!==void 0,O=A.isLoading,D=(!_||_.isLoading||_.isUninitialized)&&!T&&O,R=A.isSuccess||T&&(O&&!(_!=null&&_.isError)||A.isUninitialized);return{...A,data:j,currentData:A.data,isFetching:O,isLoading:D,isSuccess:R}}function f(A,_,N){if(_!=null&&_.endpointName&&A.isUninitialized){const{endpointName:I}=_,F=l.endpointDefinitions[I];a({queryArgs:_.originalArgs,endpointDefinition:F,endpointName:I})===a({queryArgs:N,endpointDefinition:F,endpointName:I})&&(_=void 0)}let j=A.isSuccess?A.data:_==null?void 0:_.data;j===void 0&&(j=A.data);const T=j!==void 0,O=A.isLoading,D=(!_||_.isLoading||_.isUninitialized)&&!T&&O,R=A.isSuccess||O&&T;return{...A,data:j,currentData:A.data,isFetching:O,isLoading:D,isSuccess:R}}function p(A,_){const N=n(),j=Fx(_);return x.useCallback((T,O)=>N(e.util.prefetch(A,T,{...j,...O})),[A,N,j])}function m(A,_,{refetchOnReconnect:N,refetchOnFocus:j,refetchOnMountOrArgChange:T,skip:O=!1,pollingInterval:D=0,skipPollingIfUnfocused:R=!1,...I}={}){const{initiate:F}=e.endpoints[A],$=n(),H=x.useRef(void 0);if(!H.current){const ne=$(e.internalActions.internal_getRTKQSubscriptions());H.current=ne}const L=MB(O?Vl:_,zN,l.endpointDefinitions[A],A),B=Fx({refetchOnReconnect:N,refetchOnFocus:j,pollingInterval:D,skipPollingIfUnfocused:R}),z=x.useRef(!1),V=I.initialPageParam,U=Fx(V),W=x.useRef(void 0);let{queryCacheKey:G,requestId:Y}=W.current||{},X=!1;G&&Y&&(X=H.current.isRequestSubscribed(G,Y));const Q=!X&&z.current;return c(()=>{z.current=X}),c(()=>{Q&&(W.current=void 0)},[Q]),c(()=>{var se;const ne=W.current;if(L===Vl){ne==null||ne.unsubscribe(),W.current=void 0;return}const ie=(se=W.current)==null?void 0:se.subscriptionOptions;if(!ne||ne.arg!==L){ne==null||ne.unsubscribe();const oe=$(F(L,{subscriptionOptions:B,forceRefetch:T,...Bte(l.endpointDefinitions[A])?{initialPageParam:U}:{}}));W.current=oe}else B!==ie&&ne.updateSubscriptionOptions(B)},[$,F,T,L,B,Q,U,A]),[W,$,F,B]}function y(A,_){return(j,{skip:T=!1,selectFromResult:O}={})=>{const{select:D}=e.endpoints[A],R=MB(T?Vl:j,a,l.endpointDefinitions[A],A),I=x.useRef(void 0),F=x.useMemo(()=>s([D(R),(z,V)=>V,z=>R],_,{memoizeOptions:{resultEqualityCheck:g1}}),[D,R]),$=x.useMemo(()=>O?s([F],O,{devModeChecks:{identityFunctionCheck:"never"}}):F,[F,O]),H=r(z=>$(z,I.current),g1),L=i(),B=F(L.getState(),I.current);return v4e(()=>{I.current=B},[B]),H}}function v(A){x.useEffect(()=>()=>{var _,N;(N=(_=A.current)==null?void 0:_.unsubscribe)==null||N.call(_),A.current=void 0},[A])}function b(A){if(!A.current)throw new Error(is(38));return A.current.refetch()}function C(A){const _=(T,O={})=>{const[D]=m(A,T,O);return v(D),x.useMemo(()=>({refetch:()=>b(D)}),[D])},N=({refetchOnReconnect:T,refetchOnFocus:O,pollingInterval:D=0,skipPollingIfUnfocused:R=!1}={})=>{const{initiate:I}=e.endpoints[A],F=n(),[$,H]=x.useState(d7),L=x.useRef(void 0),B=Fx({refetchOnReconnect:T,refetchOnFocus:O,pollingInterval:D,skipPollingIfUnfocused:R});c(()=>{var G,Y;const W=(G=L.current)==null?void 0:G.subscriptionOptions;B!==W&&((Y=L.current)==null||Y.updateSubscriptionOptions(B))},[B]);const z=x.useRef(B);c(()=>{z.current=B},[B]);const V=x.useCallback(function(W,G=!1){let Y;return t(()=>{var X;(X=L.current)==null||X.unsubscribe(),L.current=Y=F(I(W,{subscriptionOptions:z.current,forceRefetch:!G})),H(W)}),Y},[F,I]),U=x.useCallback(()=>{var W,G;(W=L.current)!=null&&W.queryCacheKey&&F(e.internalActions.removeQueryResult({queryCacheKey:(G=L.current)==null?void 0:G.queryCacheKey}))},[F]);return x.useEffect(()=>()=>{var W;(W=L==null?void 0:L.current)==null||W.unsubscribe()},[]),x.useEffect(()=>{$!==d7&&!L.current&&V($,!0)},[$,V]),x.useMemo(()=>[V,$,{reset:U}],[V,$,U])},j=y(A,d);return{useQueryState:j,useQuerySubscription:_,useLazyQuerySubscription:N,useLazyQuery(T){const[O,D,{reset:R}]=N(T),I=j(D,{...T,skip:D===d7}),F=x.useMemo(()=>({lastArg:D}),[D]);return x.useMemo(()=>[O,{...I,reset:R},F],[O,I,R,F])},useQuery(T,O){const D=_(T,O),R=j(T,{selectFromResult:T===Vl||O!=null&&O.skip?void 0:OB,...O}),I=f7(R,...h7);return x.useDebugValue(I),x.useMemo(()=>({...R,...D}),[R,D])}}}function S(A){const _=(j,T={})=>{const[O,D,R,I]=m(A,j,T),F=x.useRef(I);c(()=>{F.current=I},[I]);const $=x.useCallback(function(H,L){let B;return t(()=>{var z;(z=O.current)==null||z.unsubscribe(),O.current=B=D(R(H,{subscriptionOptions:F.current,direction:L}))}),B},[O,D,R]);return v(O),x.useMemo(()=>({trigger:$,refetch:()=>b(O),fetchNextPage:()=>$(j,"forward"),fetchPreviousPage:()=>$(j,"backward")}),[O,$,j])},N=y(A,f);return{useInfiniteQueryState:N,useInfiniteQuerySubscription:_,useInfiniteQuery(j,T){const{refetch:O,fetchNextPage:D,fetchPreviousPage:R}=_(j,T),I=N(j,{selectFromResult:j===Vl||T!=null&&T.skip?void 0:OB,...T}),F=f7(I,...h7,"hasNextPage","hasPreviousPage");return x.useDebugValue(F),x.useMemo(()=>({...I,fetchNextPage:D,fetchPreviousPage:R,refetch:O}),[I,D,R,O])}}}function E(A){return({selectFromResult:_,fixedCacheKey:N}={})=>{const{select:j,initiate:T}=e.endpoints[A],O=n(),[D,R]=x.useState();x.useEffect(()=>()=>{D!=null&&D.arg.fixedCacheKey||D==null||D.reset()},[D]);const I=x.useCallback(function(W){const G=O(T(W,{fixedCacheKey:N}));return R(G),G},[O,T,N]),{requestId:F}=D||{},$=x.useMemo(()=>j({fixedCacheKey:N,requestId:D==null?void 0:D.requestId}),[N,D,j]),H=x.useMemo(()=>_?s([$],_):$,[_,$]),L=r(H,g1),B=N==null?D==null?void 0:D.arg.originalArgs:void 0,z=x.useCallback(()=>{t(()=>{D&&R(void 0),N&&O(e.internalActions.removeMutationResult({requestId:F,fixedCacheKey:N}))})},[O,N,D,F]),V=f7(L,...h7,"endpointName");x.useDebugValue(V);const U=x.useMemo(()=>({...L,originalArgs:B,reset:z}),[L,B,z]);return x.useMemo(()=>[I,U],[I,U])}}}var x4e=Symbol(),w4e=({batch:e=Iwe,hooks:t={useDispatch:bte,useSelector:xte,useStore:vte},createSelector:n=MO,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:x4e,init(o,{serializeQueryArgs:s},a){const l=o,{buildQueryHooks:c,buildInfiniteQueryHooks:d,buildMutationHook:f,usePrefetch:p}=b4e({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:s,context:a});return _g(l,{usePrefetch:p}),_g(a,{batch:e}),{injectEndpoint(m,y){if(d4e(y)){const{useQuery:v,useLazyQuery:b,useLazyQuerySubscription:C,useQueryState:S,useQuerySubscription:E}=c(m);_g(l.endpoints[m],{useQuery:v,useLazyQuery:b,useLazyQuerySubscription:C,useQueryState:S,useQuerySubscription:E}),o[`use${zx(m)}Query`]=v,o[`useLazy${zx(m)}Query`]=b}if(f4e(y)){const v=f(m);_g(l.endpoints[m],{useMutation:v}),o[`use${zx(m)}Mutation`]=v}else if(Bte(y)){const{useInfiniteQuery:v,useInfiniteQuerySubscription:b,useInfiniteQueryState:C}=d(m);_g(l.endpoints[m],{useInfiniteQuery:v,useInfiniteQuerySubscription:b,useInfiniteQueryState:C}),o[`use${zx(m)}InfiniteQuery`]=v}}}}}),Hte=zte(Fte(),w4e());const C4e="modulepreload",S4e=function(e){return"/"+e},RB={},t0=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=S4e(l),l in RB)return;RB[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":C4e,c||(f.as="script"),f.crossOrigin="",f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,m)=>{f.addEventListener("load",p),f.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}function o(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return i.then(s=>{for(const a of s||[])a.status==="rejected"&&o(a.reason);return t().catch(o)})},E4e=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>t0(async()=>{const{default:r}=await Promise.resolve().then(()=>nm);return{default:r}},[]).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)};
68class zO extends Error{constructor(t,n="FunctionsError",r){super(t),this.name=n,this.context=r}}class k4e extends zO{constructor(t){super("Failed to send a request to the Edge Function","FunctionsFetchError",t)}}class _4e extends zO{constructor(t){super("Relay Error invoking the Edge Function","FunctionsRelayError",t)}}class A4e extends zO{constructor(t){super("Edge Function returned a non-2xx status code","FunctionsHttpError",t)}}var FN;(function(e){e.Any="any",e.ApNortheast1="ap-northeast-1",e.ApNortheast2="ap-northeast-2",e.ApSouth1="ap-south-1",e.ApSoutheast1="ap-southeast-1",e.ApSoutheast2="ap-southeast-2",e.CaCentral1="ca-central-1",e.EuCentral1="eu-central-1",e.EuWest1="eu-west-1",e.EuWest2="eu-west-2",e.EuWest3="eu-west-3",e.SaEast1="sa-east-1",e.UsEast1="us-east-1",e.UsWest1="us-west-1",e.UsWest2="us-west-2"})(FN||(FN={}));var N4e=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class j4e{constructor(t,{headers:n={},customFetch:r,region:i=FN.Any}={}){this.url=t,this.headers=n,this.region=i,this.fetch=E4e(r)}setAuth(t){this.headers.Authorization=`Bearer ${t}`}invoke(t,n={}){var r;return N4e(this,void 0,void 0,function*(){try{const{headers:i,method:o,body:s}=n;let a={},{region:l}=n;l||(l=this.region),l&&l!=="any"&&(a["x-region"]=l);let c;s&&(i&&!Object.prototype.hasOwnProperty.call(i,"Content-Type")||!i)&&(typeof Blob<"u"&&s instanceof Blob||s instanceof ArrayBuffer?(a["Content-Type"]="application/octet-stream",c=s):typeof s=="string"?(a["Content-Type"]="text/plain",c=s):typeof FormData<"u"&&s instanceof FormData?c=s:(a["Content-Type"]="application/json",c=JSON.stringify(s)));const d=yield this.fetch(`${this.url}/${t}`,{method:o||"POST",headers:Object.assign(Object.assign(Object.assign({},a),this.headers),i),body:c}).catch(y=>{throw new k4e(y)}),f=d.headers.get("x-relay-error");if(f&&f==="true")throw new _4e(d);if(!d.ok)throw new A4e(d);let p=((r=d.headers.get("Content-Type"))!==null&&r!==void 0?r:"text/plain").split(";")[0].trim(),m;return p==="application/json"?m=yield d.json():p==="application/octet-stream"?m=yield d.blob():p==="text/event-stream"?m=d:p==="multipart/form-data"?m=yield d.formData():m=yield d.text(),{data:m,error:null}}catch(i){return{data:null,error:i}}})}}var $r={},np={},rp={},ip={},op={},sp={},T4e=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("unable to locate global object")},n0=T4e();const M4e=n0.fetch,Vte=n0.fetch.bind(n0),Ute=n0.Headers,O4e=n0.Request,R4e=n0.Response,nm=Object.freeze(Object.defineProperty({__proto__:null,Headers:Ute,Request:O4e,Response:R4e,default:Vte,fetch:M4e},Symbol.toStringTag,{value:"Module"})),P4e=$xe(nm);var Bx={},PB;function qte(){if(PB)return Bx;PB=1,Object.defineProperty(Bx,"__esModule",{value:!0});class e extends Error{constructor(n){super(n.message),this.name="PostgrestError",this.details=n.details,this.hint=n.hint,this.co
68de=n.code}}return Bx.default=e,Bx}var DB;function Wte(){if(DB)return sp;DB=1;var e=sp&&sp.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(sp,"__esModule",{value:!0});const t=e(P4e),n=e(qte());class r{constructor(o){this.shouldThrowOnError=!1,this.method=o.method,this.url=o.url,this.headers=o.headers,this.schema=o.schema,this.body=o.body,this.shouldThrowOnError=o.shouldThrowOnError,this.signal=o.signal,this.isMaybeSingle=o.isMaybeSingle,o.fetch?this.fetch=o.fetch:typeof fetch>"u"?this.fetch=t.default:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(o,s){return this.headers=Object.assign({},this.headers),this.headers[o]=s,this}then(o,s){this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers["Accept-Profile"]=this.schema:this.headers["Content-Profile"]=this.schema),this.method!=="GET"&&this.method!=="HEAD"&&(this.headers["Content-Type"]="application/json");const a=this.fetch;let l=a(this.url.toString(),{method:this.method,headers:this.headers,body:JSON.stringify(this.body),signal:this.signal}).then(async c=>{var d,f,p;let m=null,y=null,v=null,b=c.status,C=c.statusText;if(c.ok){if(this.method!=="HEAD"){const _=await c.text();_===""||(this.headers.Accept==="text/csv"||this.headers.Accept&&this.headers.Accept.includes("application/vnd.pgrst.plan+text")?y=_:y=JSON.parse(_))}const E=(d=this.headers.Prefer)===null||d===void 0?void 0:d.match(/count=(exact|planned|estimated)/),A=(f=c.headers.get("content-range"))===null||f===void 0?void 0:f.split("/");E&&A&&A.length>1&&(v=parseInt(A[1])),this.isMaybeSingle&&this.method==="GET"&&Array.isArray(y)&&(y.length>1?(m={code:"PGRST116",details:`Results contain ${y.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},y=null,v=null,b=406,C="Not Acceptable"):y.length===1?y=y[0]:y=null)}else{const E=await c.text();try{m=JSON.parse(E),Array.isArray(m)&&c.status===404&&(y=[],m=null,b=200,C="OK")}catch{c.status===404&&E===""?(b=204,C="No Content"):m={message:E}}if(m&&this.isMaybeSingle&&(!((p=m==null?void 0:m.details)===null||p===void 0)&&p.includes("0 rows"))&&(m=null,b=200,C="OK"),m&&this.shouldThrowOnError)throw new n.default(m)}return{error:m,data:y,count:v,status:b,statusText:C}});return this.shouldThrowOnError||(l=l.catch(c=>{var d,f,p;return{error:{message:`${(d=c==null?void 0:c.name)!==null&&d!==void 0?d:"FetchError"}: ${c==null?void 0:c.message}`,details:`${(f=c==null?void 0:c.stack)!==null&&f!==void 0?f:""}`,hint:"",code:`${(p=c==null?void 0:c.code)!==null&&p!==void 0?p:""}`},data:null,count:null,status:0,statusText:""}})),l.then(o,s)}returns(){return this}overrideTypes(){return this}}return sp.default=r,sp}var IB;function Gte(){if(IB)return op;IB=1;var e=op&&op.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(op,"__esModule",{value:!0});const t=e(Wte());class n extends t.default{select(i){let o=!1;const s=(i??"*").split("").map(a=>/\s/.test(a)&&!o?"":(a==='"'&&(o=!o),a)).join("");return this.url.searchParams.set("select",s),this.headers.Prefer&&(this.headers.Prefer+=","),this.headers.Prefer+="return=representation",this}order(i,{ascending:o=!0,nullsFirst:s,foreignTable:a,referencedTable:l=a}={}){const c=l?`${l}.order`:"order",d=this.url.searchParams.get(c);return this.url.searchParams.set(c,`${d?`${d},`:""}${i}.${o?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(i,{foreignTable:o,referencedTable:s=o}={}){const a=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(a,`${i}`),this}range(i,o,{foreignTable:s,referencedTable:a=s}={}){const l=typeof a>"u"?"offset":`${a}.offset`,c=typeof a>"u"?"limit":`${a}.limit`;return this.url.searchParams.set(l,`${i}`),this.url.searchParams.set(c,`${o-i+1}`),this}abortSignal(i){return this.signal=i,this}single(){return this.headers.Accept="application/vnd.pgrst.object+json",this}maybeSingle(){return this.method==="GET"?this.headers.Accept="application/json":this.headers.Accept="application/vnd.pgrst.object+json",this.isMaybeSingle=!0,this}csv(){return this.headers.Accept="text/csv",this}geojson(){return this.headers.Accept="application/geo+json",this}
68explain({analyze:i=!1,verbose:o=!1,settings:s=!1,buffers:a=!1,wal:l=!1,format:c="text"}={}){var d;const f=[i?"analyze":null,o?"verbose":null,s?"settings":null,a?"buffers":null,l?"wal":null].filter(Boolean).join("|"),p=(d=this.headers.Accept)!==null&&d!==void 0?d:"application/json";return this.headers.Accept=`application/vnd.pgrst.plan+${c}; for="${p}"; options=${f};`,c==="json"?this:this}rollback(){var i;return((i=this.headers.Prefer)!==null&&i!==void 0?i:"").trim().length>0?this.headers.Prefer+=",tx=rollback":this.headers.Prefer="tx=rollback",this}returns(){return this}}return op.default=n,op}var LB;function FO(){if(LB)return ip;LB=1;var e=ip&&ip.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ip,"__esModule",{value:!0});const t=e(Gte());class n extends t.default{eq(i,o){return this.url.searchParams.append(i,`eq.${o}`),this}neq(i,o){return this.url.searchParams.append(i,`neq.${o}`),this}gt(i,o){return this.url.searchParams.append(i,`gt.${o}`),this}gte(i,o){return this.url.searchParams.append(i,`gte.${o}`),this}lt(i,o){return this.url.searchParams.append(i,`lt.${o}`),this}lte(i,o){return this.url.searchParams.append(i,`lte.${o}`),this}like(i,o){return this.url.searchParams.append(i,`like.${o}`),this}likeAllOf(i,o){return this.url.searchParams.append(i,`like(all).{${o.join(",")}}`),this}likeAnyOf(i,o){return this.url.searchParams.append(i,`like(any).{${o.join(",")}}`),this}ilike(i,o){return this.url.searchParams.append(i,`ilike.${o}`),this}ilikeAllOf(i,o){return this.url.searchParams.append(i,`ilike(all).{${o.join(",")}}`),this}ilikeAnyOf(i,o){return this.url.searchParams.append(i,`ilike(any).{${o.join(",")}}`),this}is(i,o){return this.url.searchParams.append(i,`is.${o}`),this}in(i,o){const s=Array.from(new Set(o)).map(a=>typeof a=="string"&&new RegExp("[,()]").test(a)?`"${a}"`:`${a}`).join(",");return this.url.searchParams.append(i,`in.(${s})`),this}contains(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cs.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cs.{${o.join(",")}}`):this.url.searchParams.append(i,`cs.${JSON.stringify(o)}`),this}containedBy(i,o){return typeof o=="string"?this.url.searchParams.append(i,`cd.${o}`):Array.isArray(o)?this.url.searchParams.append(i,`cd.{${o.join(",")}}`):this.url.searchParams.append(i,`cd.${JSON.stringify(o)}`),this}rangeGt(i,o){return this.url.searchParams.append(i,`sr.${o}`),this}rangeGte(i,o){return this.url.searchParams.append(i,`nxl.${o}`),this}rangeLt(i,o){return this.url.searchParams.append(i,`sl.${o}`),this}rangeLte(i,o){return this.url.searchParams.append(i,`nxr.${o}`),this}rangeAdjacent(i,o){return this.url.searchParams.append(i,`adj.${o}`),this}overlaps(i,o){return typeof o=="string"?this.url.searchParams.append(i,`ov.${o}`):this.url.searchParams.append(i,`ov.{${o.join(",")}}`),this}textSearch(i,o,{config:s,type:a}={}){let l="";a==="plain"?l="pl":a==="phrase"?l="ph":a==="websearch"&&(l="w");const c=s===void 0?"":`(${s})`;return this.url.searchParams.append(i,`${l}fts${c}.${o}`),this}match(i){return Object.entries(i).forEach(([o,s])=>{this.url.searchParams.append(o,`eq.${s}`)}),this}not(i,o,s){return this.url.searchParams.append(i,`not.${o}.${s}`),this}or(i,{foreignTable:o,referencedTable:s=o}={}){const a=s?`${s}.or`:"or";return this.url.searchParams.append(a,`(${i})`),this}filter(i,o,s){return this.url.searchParams.append(i,`${o}.${s}`),this}}return ip.default=n,ip}var $B;function Kte(){if($B)return rp;$B=1;var e=rp&&rp.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(rp,"__esModule",{value:!0});const t=e(FO());class n{constructor(i,{headers:o={},schema:s,fetch:a}){this.url=i,this.headers=o,this.schema=s,this.fetch=a}select(i,{head:o=!1,count:s}={}){const a=o?"HEAD":"GET";let l=!1;const c=(i??"*").split("").map(d=>/\s/.test(d)&&!l?"":(d==='"'&&(l=!l),d)).join("");return this.url.searchParams.set("select",c),s&&(this.headers.Prefer=`count=${s}`),new t.default({method:a,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}insert(i,{count:o,defaultToNull:s=!0}={}){const a="POST",l=[];if(this.headers.Prefer&&l.push(this.headers.Prefer),o&&l.push(`count=${o}`),s||l.push("missing=default"),this.headers.Prefer=l.join(","),Array.isArray(i)){const c=i.reduce((d,f)=>d.concat(Object.keys(f)),[]);if(c.length>0){const d=[...new Set(c)].map(f=>`"${f}"`);this.url.searchParams.set("columns",d.join(","))}}return new t.default({method:a,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:this.fetch,allowEmpty:!1})}upsert(i,{onConflict:o,ignoreDuplicates:s=!1,count:a,defaultToNull:l=!0}={}){const c="POST",d=[`resolution=${s?"ignore":"merge"}-duplicates`];if(o!==void 0&&this.url.searchParams.set("on_conflict",o),this.headers.Prefer&&d.push(this.headers.Prefer),a&&d.push(`count=${a}`),l||d.push("missing=default"),this.headers.Prefer=d.join(","),Array.isArray(i)){const f=i.reduce((p,m)=>p.concat(Object.keys(m)),[]);if(f.length>0){const p=[...new Set(f)].map(m=>`"${m}"`);this.url.searchParams.set("columns",p.join(","))}}return new t.default({method:c,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:this.fetch,allowEmpty:!1})}update(i,{count:o}={}){const s="PATCH",a=[];return this.headers.Prefer&&a.push(this.headers.Prefer),o&&a.push(`count=${o}`),this.headers.Prefer=a.join(","),new t.default({method:s,url:this.url,headers:this.headers,schema:this.schema,body:i,fetch:this.fetch,allowEmpty:!1})}delete({count:i}={}){const o="DELETE",s=[];return i&&s.push(`count=${i}`),this.headers.Prefer&&s.unshift(this.headers.Prefer),this.headers.Prefer=s.join(","),new t.default({method:o,url:this.url,headers:this.headers,schema:this.schema,fetch:this.fetch,allowEmpty:!1})}}return rp.default=n,rp}var Ag={},Ng={},zB;function D4e(){return zB||(zB=1,Object.defineProperty(Ng,"__esMo
68dule",{value:!0}),Ng.version=void 0,Ng.version="0.0.0-automated"),Ng}var FB;function I4e(){if(FB)return Ag;FB=1,Object.defineProperty(Ag,"__esModule",{value:!0}),Ag.DEFAULT_HEADERS=void 0;const e=D4e();return Ag.DEFAULT_HEADERS={"X-Client-Info":`postgrest-js/${e.version}`},Ag}var BB;function L4e(){if(BB)return np;BB=1;var e=np&&np.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(np,"__esModule",{value:!0});const t=e(Kte()),n=e(FO()),r=I4e();class i{constructor(s,{headers:a={},schema:l,fetch:c}={}){this.url=s,this.headers=Object.assign(Object.assign({},r.DEFAULT_HEADERS),a),this.schemaName=l,this.fetch=c}from(s){const a=new URL(`${this.url}/${s}`);return new t.default(a,{headers:Object.assign({},this.headers),schema:this.schemaName,fetch:this.fetch})}schema(s){return new i(this.url,{headers:this.headers,schema:s,fetch:this.fetch})}rpc(s,a={},{head:l=!1,get:c=!1,count:d}={}){let f;const p=new URL(`${this.url}/rpc/${s}`);let m;l||c?(f=l?"HEAD":"GET",Object.entries(a).filter(([v,b])=>b!==void 0).map(([v,b])=>[v,Array.isArray(b)?`{${b.join(",")}}`:`${b}`]).forEach(([v,b])=>{p.searchParams.append(v,b)})):(f="POST",m=a);const y=Object.assign({},this.headers);return d&&(y.Prefer=`count=${d}`),new n.default({method:f,url:p,headers:y,schema:this.schemaName,body:m,fetch:this.fetch,allowEmpty:!1})}}return np.default=i,np}var HB;function $4e(){if(HB)return $r;HB=1;var e=$r&&$r.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty($r,"__esModule",{value:!0}),$r.PostgrestError=$r.PostgrestBuilder=$r.PostgrestTransformBuilder=$r.PostgrestFilterBuilder=$r.PostgrestQueryBuilder=$r.PostgrestClient=void 0;const t=e(L4e());$r.PostgrestClient=t.default;const n=e(Kte());$r.PostgrestQueryBuilder=n.default;const r=e(FO());$r.PostgrestFilterBuilder=r.default;const i=e(Gte());$r.PostgrestTransformBuilder=i.default;const o=e(Wte());$r.PostgrestBuilder=o.default;const s=e(qte());return $r.PostgrestError=s.default,$r.default={PostgrestClient:t.default,PostgrestQueryBuilder:n.default,PostgrestFilterBuilder:r.default,PostgrestTransformBuilder:i.default,PostgrestBuilder:o.default,PostgrestError:s.default},$r}var z4e=$4e();const F4e=Ht(z4e),{PostgrestClient:B4e,PostgrestQueryBuilder:mSt,PostgrestFilterBuilder:gSt,PostgrestTransformBuilder:ySt,PostgrestBuilder:vSt,PostgrestError:bSt}=F4e,H4e="2.11.2",V4e={"X-Client-Info":`realtime-js/${H4e}`},U4e="1.0.0",Yte=1e4,q4e=1e3;var Bp;(function(e){e[e.connecting=0]="connecting",e[e.open=1]="open",e[e.closing=2]="closing",e[e.closed=3]="closed"})(Bp||(Bp={}));var vo;(function(e){e.closed="closed",e.errored="errored",e.joined="joined",e.joining="joining",e.leaving="leaving"})(vo||(vo={}));var Ms;(function(e){e.close="phx_close",e.error="phx_error",e.join="phx_join",e.reply="phx_reply",e.leave="phx_leave",e.access_token="access_token"})(Ms||(Ms={}));var BN;(function(e){e.websocket="websocket"})(BN||(BN={}));var gf;(function(e){e.Connecting="connecting",e.Open="open",e.Closing="closing",e.Closed="closed"})(gf||(gf={}));class W4e{constructor(){this.HEADER_LENGTH=1}decode(t,n){return t.constructor===ArrayBuffer?n(this._binaryDecode(t)):n(typeof t=="string"?JSON.parse(t):{})}_binaryDecode(t){const n=new DataView(t),r=new TextDecoder;return this._decodeBroadcast(t,n,r)}_decodeBroadcast(t,n,r){const i=n.getUint8(1),o=n.getUint8(2);let s=this.HEADER_LENGTH+2;const a=r.decode(t.slice(s,s+i));s=s+i;const l=r.decode(t.slice(s,s+o));s=s+o;const c=JSON.parse(r.decode(t.slice(s,t.byteLength)));return{ref:null,topic:a,event:l,payload:c}}}let Xte=class{constructor(t,n){this.callback=t,this.timerCalc=n,this.timer=void 0,this.tries=0,this.callback=t,this.timerCalc=n}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}};var wn;(function(e){e.abstime="abstime",e.bool="bool",e.date="date",e.daterange="daterange",e.float4="float4",e.float8="float8",e.int2="int2",e.int4="int4",e.int4range="int4range",e.int8="int8",e.int8range="int8range",e.json="json",e.jsonb="jsonb",e.money="money",e.numeric="numeric",e.oid="oid",e.reltime="reltime",e.text="text",e.time="time",e.timestamp="timestamp",e.timestamptz="timestamptz",e.timetz="timetz",e.tsrange="tsrange",e.tstzrange="tstzrange"})(wn||(wn={}));const VB=(e,t,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return Object.keys(t).reduce((o,s)=>(o[s]=G4e(s,e,t,i),o),{})},G4e=(e,t,n,r)=>{const i=t.find(a=>a.name===e),o=i==null?void 0:i.type,s=n[e];return o&&!r.includes(o)?Zte(o,s):HN(s)},Zte=(e,t)=>
vendor: 14,197 bytes, lines 68-73
68{if(e.charAt(0)==="_"){const n=e.slice(1,e.length);return Z4e(t,n)}switch(e){case wn.bool:return K4e(t);case wn.float4:case wn.float8:case wn.int2:case wn.int4:case wn.int8:case wn.numeric:case wn.oid:return Y4e(t);case wn.json:case wn.jsonb:return X4e(t);case wn.timestamp:return Q4e(t);case wn.abstime:case wn.date:case wn.daterange:case wn.int4range:case wn.int8range:case wn.money:case wn.reltime:case wn.text:case wn.time:case wn.timestamptz:case wn.timetz:case wn.tsrange:case wn.tstzrange:return HN(t);default:return HN(t)}},HN=e=>e,K4e=e=>{switch(e){case"t":return!0;case"f":return!1;default:return e}},Y4e=e=>{if(typeof e=="string"){const t=parseFloat(e);if(!Number.isNaN(t))return t}return e},X4e=e=>{if(typeof e=="string")try{return JSON.parse(e)}catch(t){return console.log(`JSON parse error: ${t}`),e}return e},Z4e=(e,t)=>{if(typeof e!="string")return e;const n=e.length-1,r=e[n];if(e[0]==="{"&&r==="}"){let o;const s=e.slice(1,n);try{o=JSON.parse("["+s+"]")}catch{o=s?s.split(","):[]}return o.map(a=>Zte(t,a))}return e},Q4e=e=>typeof e=="string"?e.replace(" ","T"):e,Qte=e=>{let t=e;return t=t.replace(/^ws/i,"http"),t=t.replace(/(\/socket\/websocket|\/socket|\/websocket)\/?$/i,""),t.replace(/\/+$/,"")};class p7{constructor(t,n,r={},i=Yte){this.channel=t,this.event=n,this.payload=r,this.timeout=i,this.sent=!1,this.timeoutTimer=void 0,this.ref="",this.receivedResp=null,this.recHooks=[],this.refEvent=null}resend(t){this.timeout=t,this._cancelRefEvent(),this.ref="",this.refEvent=null,this.receivedResp=null,this.sent=!1,this.send()}send(){this._hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload,ref:this.ref,join_ref:this.channel._joinRef()}))}updatePayload(t){this.payload=Object.assign(Object.assign({},this.payload),t)}receive(t,n){var r;return this._hasReceived(t)&&n((r=this.receivedResp)===null||r===void 0?void 0:r.response),this.recHooks.push({status:t,callback:n}),this}startTimeout(){if(this.timeoutTimer)return;this.ref=this.channel.socket._makeRef(),this.refEvent=this.channel._replyEventName(this.ref);const t=n=>{this._cancelRefEvent(),this._cancelTimeout(),this.receivedResp=n,this._matchReceive(n)};this.channel._on(this.refEvent,{},t),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}trigger(t,n){this.refEvent&&this.channel._trigger(this.refEvent,{status:t,response:n})}destroy(){this._cancelRefEvent(),this._cancelTimeout()}_cancelRefEvent(){this.refEvent&&this.channel._off(this.refEvent,{})}_cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=void 0}_matchReceive({status:t,response:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(n))}_hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}}var UB;(function(e){e.SYNC="sync",e.JOIN="join",e.LEAVE="leave"})(UB||(UB={}));class b1{constructor(t,n){this.channel=t,this.state={},this.pendingDiffs=[],this.joinRef=null,this.caller={onJoin:()=>{},onLeave:()=>{},onSync:()=>{}};const r=(n==null?void 0:n.events)||{state:"presence_state",diff:"presence_diff"};this.channel._on(r.state,{},i=>{const{onJoin:o,onLeave:s,onSync:a}=this.caller;this.joinRef=this.channel._joinRef(),this.state=b1.syncState(this.state,i,o,s),this.pendingDiffs.forEach(l=>{this.state=b1.syncDiff(this.state,l,o,s)}),this.pendingDiffs=[],a()}),this.channel._on(r.diff,{},i=>{const{onJoin:o,onLeave:s,onSync:a}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=b1.syncDiff(this.state,i,o,s),a())}),this.onJoin((i,o,s)=>{this.channel._trigger("presence",{event:"join",key:i,currentPresences:o,newPresences:s})}),this.onLeave((i,o,s)=>{this.channel._trigger("presence",{event:"leave",key:i,currentPresences:o,leftPresences:s})}),this.onSync(()=>{this.channel._trigger("presence",{event:"sync"})})}static syncState(t,n,r,i){const o=this.cloneDeep(t),s=this.transformState(n),a={},l={};return this.map(o,(c,d)=>{s[c]||(l[c]=d)}),this.map(s,(c,d)=>{const f=o[c];if(f){const p=d.map(b=>b.presence_ref),m=f.map(b=>b.presence_ref),y=d.filter(b=>m.indexOf(b.presence_ref)<0),v=f.filter(b=>p.indexOf(b.presence_ref)<0);y.length>0&&(a[c]=y),v.length>0&&(l[c]=v)}else a[c]=d}),this.syncDiff(o,{joins:a,leaves:l},r,i)}static syncDiff(t,n,r,i){const{joins:o,leaves:s}={joins:this.transformState(n.joins),leaves:this.transformState(n.leaves)};return r||(r=()=>{}),i||(i=()=>{}),this.map(o,(a,l)=>{var c;const d=(c=t[a])!==null&&c!==void 0?c:[];if(t[a]=this.cloneDeep(l),d.length>0){const f=t[a].map(m=>m.presence_ref),p=d.filter(m=>f.indexOf(m.presence_ref)<0);t[a].unshift(...p)}r(a,d,l)}),this.map(s,(a,l)=>{let c=t[a];if(!c)return;const d=l.map(f=>f.presence_ref);c=c.filter(f=>d.indexOf(f.presence_ref)<0),t[a]=c,i(a,c,l),c.length===0&&delete t[a]}),t}static map(t,n){return Object.getOwnPropertyNames(t).map(r=>n(r,t[r]))}static transformState(t){return t=this.cloneDeep(t),Object.getOwnPropertyNames(t).reduce((n,r)=>{const i=t[r];return"metas"in i?n[r]=i.metas.map(o=>(o.presence_ref=o.phx_ref,delete o.phx_ref,delete o.phx_ref_prev,o)):n[r]=i,n},{})}static cloneDeep(t){return JSON.parse(JSON.stringify(t))}onJoin(t){this.caller.onJoin=t}onLeave(t){this.caller.onLeave=t}onSync(t){this.caller.onSync=t}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel._joinRef()}}var qB;(function(e){e.ALL="*",e.INSERT="INSERT",e.UPDATE="UPDATE",e.DELETE="DELETE"})(qB||(qB={}));var WB;(function(e){e.BROADCAST="broadcast",e.PRESENCE="presence",e.POSTGRES_CHANGES="postgres_changes",e.SYSTEM="system"})(WB||(WB={}));var Fl;(function(e){e.SUBSCRIBED="SUBSCRIBED",e.TIMED_OUT="TIMED_OUT",e.CLOSED="CLOSED",e.CHANNEL_ERROR="CHANNEL_ERROR"})(Fl||(Fl={}));class BO{constructor(t,n={config:{}},r){this.topic=t,this.params=n,this.socket=r,this.bindings={},this.state=vo.closed,this.joinedOnce=!1,this.pushBuffer=[],this.subTopic=t.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:""},private:!1},n.config),this.timeout=this.socket.timeout,this.joinPush=new p7(this,Ms.join,this.params,this.timeout),this.rejoinTimer=new Xte(()=>this._rejoinUntilConnected(),this.socket.reconnectAfterMs),this.joinPush.receive("ok",()=>{this.state=vo.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this._onClose(()=>{this.rejoinTimer.reset(),this.socket.log("channel",`close ${this.topic} ${this._joinRef()}`),this.state=vo.closed,this.socket._remove(this)}),this._onError(i=>{this._isLeaving()||this._isClosed()||(this.socket.log("channel",`error ${this.topic}`,i),this.state=vo.errored,this.rejoinTimer.scheduleTimeout())}),this.joinPush.receive("timeout",()=>{this._isJoining()&&(this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),this.state=vo.errored,this.rejoinTimer.scheduleTimeout())}),this._on(Ms.reply,{},(i,o)=>{this._trigger(this._replyEventName(o),i)}),this.presence=new b1(this),this.broadcastEndpointURL=Qte(this.socket.endPoint)+"/api/broadcast",this.private=this.params.config.private||!1}subscribe(t,n=this.timeout){var r,i;if(this.socket.isConnected()||this.socket.connect(),this.joinedOnce)throw"tried to subscribe multiple times. 'subscribe' can only be called a single time per channel instance";{const{config:{broadcast:o,presence:s,private:a}}=this.params;this._onError(d=>t==null?void 0:t(Fl.CHANNEL_ERROR,d)),this._onClose(()=>t==null?void 0:t(Fl.CLOSED));const l={},c={broadcast:o,presence:s,postgres_changes:(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(d=>d.filter))!==null&&i!==void 0?i:[],private:a};this.socket.accessTokenValue&&(l.access_token=this.socket.accessTokenValue),this.updateJoinPayload(Object.assign({config:c},l)),this.joinedOnce=!0,this._rejoin(n),this.joinPush.receive("ok",async({postgres_changes:d})=>{var f;if(this.socket.setAuth(),d===void 0){t==null||t(Fl.SUBSCRIBED);return}else{const p=this.bindings.postgres_changes,m=(f=p==null?void 0:p.length)!==null&&f!==void 0?f:0,y=[];for(let v=0;v<m;v++){const b=p[v],{filter:{event:C,schema:S,table:E,filter:A}}=b,_=d&&d[v];if(_&&_.event===C&&_.schema===S&&_.table===E&&_.filter===A)y.push(Object.assign(Object.assign({},b),{id:_.id}));else{this.unsubscribe(),t==null||t(Fl.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=y,t&&t(Fl.SUBSCRIBED);return}}).receive("error",d=>{t==null||t(Fl.CHANNEL_ERROR,new Error(JSON.stringify(Object.values(d).join(", ")||"error")))}).receive("timeout",()=>{t==null||t(Fl.TIMED_OUT)})}return this}presenceState(){return this.presence.state}async track(t,n={}){return await this.send({type:"presence",event:"track",payload:t},n.timeout||this.timeout)}async untrack(t={}){return await this.send({type:"presence",event:"untrack"},t)}on(t,n,r){return this._on(t,n,r)}async send(t,n={}){var r,i;if(!this._canPush()&&t.type==="broadcast"){const{event:o,payload:s}=t,l={method:"POST",headers:{Authorization:this.socket.accessTokenValue?`Bearer ${this.socket.accessTokenValue}`:"",apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"},body:JSON.stringify({messages:[{topic:this.subTopic,event:o,payload:s,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=c.body)===null||i===void 0?void 0:i.cancel()),c.ok?"ok":"error"}catch(c){return c.name==="AbortError"?"timed out":"error"}}else return new Promise(o=>{var s,a,l;const c=this._push(t.type,t,n.timeout||this.timeout);t.type==="broadcast"&&!(!((l=(a=(s=this.params)===null||s===void 0?void 0:s.config)===null||a===void 0?void 0:a.broadcast)===null||l===void 0)&&l.ack)&&o("ok"),c.receive("ok",()=>o("ok")),c.receive("error",()=>o("error")),c.receive("timeout",()=>o("timed out"))})}updateJoinPayload(t){this.joinPush.updatePayload(t)}unsubscribe(t=this.timeout){this.state=vo.leaving;const n=()=>{this.socket.log("channel",`leave ${this.topic}`),this._trigger(Ms.close,"leave",this._joinRef())};return this.rejoinTimer.reset(),this.joinPush.destroy(),new Promise(r=>{const i=new p7(this,Ms.leave,{},t);i.receive("ok",()=>{n(),r("ok")}).receive("timeout",()=>{n(),r("timed out")}).receive("error",()=>{r("error")}),i.send(),this._canPush()||i.trigger("ok",{})})}async _fetchWithTimeout(t,n,r){const i=new AbortController,o=setTimeout(()=>i.abort(),r),s=await this.socket.fetch(t,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(o),s}_push(t,n,r=this.timeout){if(!this.joinedOnce)throw`tried to push '${t}' to '${this.topic}' before joining. Use channel.subscribe() before pushing events`;let i=new p7(this,t,n,r);return this._canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}_onMessage(t,n,r){return n}_isMember(t){return this.topic===t}_joinRef(){return this.joinPush.ref}_trigger(t,n,r){var i,o;const s=t.toLocaleLowerCase(),{close:a,error:l,leave:c,join:d}=Ms;if(r&&[a,l,c,d].indexOf(s)>=0&&r!==this._joinRef())return;let p=this._onMessage(s,n,r);if(n&&!p)throw"channel onMessage callbacks must return the payload, modified or unmodified";["insert","update","delete"].includes(s)?(i=this.bindings.postgres_changes)===null||i===void 0||i.filter(m=>{var y,v,b;return((y=m.filter)===null||y===void 0?void 0:y.event)==="*"||((b=(v=m.filter)===null||v===void 0?void 0:v.event)===null||b===void 0?void 0:b.toLocaleLowerCase())===s}).map(m=>m.callback(p,r)):(o=this.bindings[s])===null||o===void 0||o.filter(m=>{var y,v,b,C,S,E;if(["broadcast","presence","postgres_changes"].includes(s))if("id"in m){const A=m.id,_=(y=m.filter)===null||y===void 0?void 0:y.event;return A&&((v=n.ids)===null||v===void 0?void 0:v.includes(A))&&(_==="*"||(_==null?void 0:_.toLocaleLowerCase())===((b=n.data)===null||b===void 0?void 0:b.type.toLocaleLowerCase()))}else{const A=(S=(C=m==null?void 0:m.filter)===null||C===void 0?void 0:C.event)===null||S===void 0?void 0:S.toLocaleLowerCase();return A==="*"||A===((E=n==null?void 0:n.event)===null||E===void 0?void 0:E.toLocaleLowerCase())}else return m.type.toLocaleLowerCase()===s}).map(m=>{if(typeof p=="object"&&"ids"in p){const y=p.data,{schema:v,table:b,commit_timestamp:C,type:S,errors:E}=y;p=Object.assign(Object.assign({},{schema:v,table:b,commit_timestamp:C,eventType:S,new:{},old:{},errors:E}),this._getPayloadRecords(y))}m.callback(p,r)})}_isClosed(){return this.state===vo.closed}_isJoined(){return this.state===vo.joined}_isJoining(){return this.state===vo.joining}_isLeaving(){return this.state===vo.leaving}_replyEventName(t){return`chan_reply_${t}`}_on(t,n,r){const i=t.toLocaleLowerCase(),o={type:i,filter:n,callback:r};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this}_off(t,n){const r=t.toLocaleLowerCase();return this.bindings[r]=this.bindings[r].filter(i=>{var o;return!(((o=i.type)===null||o===void 0?void 0:o.toLocaleLowerCase())===r&&BO.isEqual(i.filter,n))}),this}static isEqual(t,n){if(Object.keys(t).length!==Object.keys(n).length)return!1;for(const r in t)if(t[r]!==n[r])return!1;return!0}_rejoinUntilConnected(){this.rejoinTimer.scheduleTimeout(),this.socket.isConnected()&&this._rejoin()}_onClose(t){this._on(Ms.close,{},t)}_onError(t){this._on(Ms.error,{},n=>t(n))}_canPush(){return this.socket.isConnected()&&this._isJoined()}_rejoin(t=this.timeout){this._isLeaving()||(this.socket._leaveOpenTopic(this.topic),this.state=vo.joining,this.joinPush.resend(t))}_getPayloadRecords(t){const n={new:{},old:{}};return(t.type==="INSERT"||t.type==="UPDATE")&&(n.new=VB(t.columns,t.record)),(t.type==="UPDATE"||t.type==="DELETE")&&(n.old=VB(t.columns,t.old_record)),n}}const J4e=()=>{},e5e=typeof WebSocket<"u",t5e=` 69 addEventListener("message", (e) => { 70 if (e.data.event === "start") { 71 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 72 } 73 });`;class n5e{constructor(t,n){var r;this.accessTokenValue=null,this.apiKey=null,this.channels=[],this.endPoint="",this.httpEndpoint="",this.headers=V4e,this.params={},this.timeout=Yte,this.heartbeatIntervalMs=3e4,this.heartbeatTimer=void 0,this.pendingHeartbeatRef=null,this.ref=0,this.logger=J4e,this.conn=null,this.sendBuffer=[],this.serializer
73=new W4e,this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.accessToken=null,this._resolveFetch=o=>{let s;return o?s=o:typeof fetch>"u"?s=(...a)=>t0(async()=>{const{default:l}=await Promise.resolve().then(()=>nm);return{default:l}},void 0).then(({default:l})=>l(...a)):s=fetch,(...a)=>s(...a)},this.endPoint=`${t}/${BN.websocket}`,this.httpEndpoint=Qte(t),n!=null&&n.transport?this.transport=n.transport:this.transport=null,n!=null&&n.params&&(this.params=n.params),n!=null&&n.headers&&(this.headers=Object.assign(Object.assign({},this.headers),n.headers)),n!=null&&n.timeout&&(this.timeout=n.timeout),n!=null&&n.logger&&(this.logger=n.logger),n!=null&&n.heartbeatIntervalMs&&(this.heartbeatIntervalMs=n.heartbeatIntervalMs);const i=(r=n==null?void 0:n.params)===null||r===void 0?void 0:r.apikey;if(i&&(this.accessTokenValue=i,this.apiKey=i),this.reconnectAfterMs=n!=null&&n.reconnectAfterMs?n.reconnectAfterMs:o=>[1e3,2e3,5e3,1e4][o-1]||1e4,this.encode=n!=null&&n.encode?n.encode:(o,s)=>s(JSON.stringify(o)),this.decode=n!=null&&n.decode?n.decode:this.serializer.decode.bind(this.serializer),this.reconnectTimer=new Xte(async()=>{this.disconnect(),this.connect()},this.reconnectAfterMs),this.fetch=this._resolveFetch(n==null?void 0:n.fetch),n!=null&&n.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.worker=(n==null?void 0:n.worker)||!1,this.workerUrl=n==null?void 0:n.workerUrl}this.accessToken=(n==null?void 0:n.accessToken)||null}connect(){if(!this.conn){if(this.transport){this.conn=new this.transport(this.endpointURL(),void 0,{headers:this.headers});return}if(e5e){this.conn=new WebSocket(this.endpointURL()),this.setupConnection();return}this.conn=new r5e(this.endpointURL(),void 0,{close:()=>{this.conn=null}}),t0(async()=>{const{default:t}=await import("./browser-DuDas67Z.js").then(n=>n.b);return{default:t}},[]).then(({default:t})=>{this.conn=new t(this.endpointURL(),void 0,{headers:this.headers}),this.setupConnection()})}}endpointURL(){return this._appendParams(this.endPoint,Object.assign({},this.params,{vsn:U4e}))}disconnect(t,n){this.conn&&(this.conn.onclose=function(){},t?this.conn.close(t,n??""):this.conn.close(),this.conn=null,this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.reset())}getChannels(){return this.channels}async removeChannel(t){const n=await t.unsubscribe();return this.channels.length===0&&this.disconnect(),n}async removeAllChannels(){const t=await Promise.all(this.channels.map(n=>n.unsubscribe()));return this.disconnect(),t}log(t,n,r){this.logger(t,n,r)}connectionState(){switch(this.conn&&this.conn.readyState){case Bp.connecting:return gf.Connecting;case Bp.open:return gf.Open;case Bp.closing:return gf.Closing;default:return gf.Closed}}isConnected(){return this.connectionState()===gf.Open}channel(t,n={config:{}}){const r=new BO(`realtime:${t}`,n,this);return this.channels.push(r),r}push(t){const{topic:n,event:r,payload:i,ref:o}=t,s=()=>{this.encode(t,a=>{var l;(l=this.conn)===null||l===void 0||l.send(a)})};this.log("push",`${n} ${r} (${o})`,i),this.isConnected()?s():this.sendBuffer.push(s)}async setAuth(t=null){let n=t||this.accessToken&&await this.accessToken()||this.accessTokenValue;if(n){let r=null;try{r=JSON.parse(atob(n.split(".")[1]))}catch{}if(r&&r.exp&&!(Math.floor(Date.now()/1e3)-r.exp<0))return this.log("auth",`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${r.exp}`),Promise.reject(`InvalidJWTToken: Invalid value for JWT claim "exp" with value ${r.exp}`);this.accessTokenValue=n,this.channels.forEach(i=>{n&&i.updateJoinPayload({access_token:n}),i.joinedOnce&&i._isJoined()&&i._push(Ms.access_token,{access_token:n})})}}async sendHeartbeat(){var t;if(this.isConnected()){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.log("transport","heartbeat timeout. Attempting to re-establish connection"),(t=this.conn)===null||t===void 0||t.close(q4e,"hearbeat timeout");return}this.pendingHeartbeatRef=this._makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.setAuth()}}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}_makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}_leaveOpenTopic(t){let n=this.channels.find(r=>r.topic===t&&(r._isJoined()||r._isJoining()));n&&(this.log("transport",`leaving duplicate topic "${t}"`),n.unsubscribe())}_remove(t){this.channels=this.channels.filter(n=>n._joinRef()!==t._joinRef())}setupConnection(){this.conn&&(this.conn.binaryType="arraybuffer",this.conn.onopen=()=>this._onConnOpen(),this.conn.onerror=t=>this._onConnError(t),this.conn.onmessage=t=>
73this._onConnMessage(t),this.conn.onclose=t=>this._onConnClose(t))}_onConnMessage(t){this.decode(t.data,n=>{let{topic:r,event:i,payload:o,ref:s}=n;s&&s===this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null),this.log("receive",`${o.status||""} ${r} ${i} ${s&&"("+s+")"||""}`,o),this.channels.filter(a=>a._isMember(r)).forEach(a=>a._trigger(i,o,s)),this.stateChangeCallbacks.message.forEach(a=>a(n))})}async _onConnOpen(){if(this.log("transport",`connected to ${this.endpointURL()}`),this.flushSendBuffer(),this.reconnectTimer.reset(),!this.worker)this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval(()=>this.sendHeartbeat(),this.heartbeatIntervalMs);else{this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const t=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(t),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this.workerRef.terminate()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}this.stateChangeCallbacks.open.forEach(t=>t())}_onConnClose(t){this.log("transport","close",t),this._triggerChanError(),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach(n=>n(t))}_onConnError(t){this.log("transport",t.message),this._triggerChanError(),this.stateChangeCallbacks.error.forEach(n=>n(t))}_triggerChanError(){this.channels.forEach(t=>t._trigger(Ms.error))}_appendParams(t,n){if(Object.keys(n).length===0)return t;const r=t.match(/\?/)?"&":"?",i=new URLSearchParams(n);return`${t}${r}${i}`}_workerObjectUrl(t){let n;if(t)n=t;else{const r=new Blob([t5e],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}}class r5e{constructor(t,n,r){this.binaryType="arraybuffer",this.onclose=()=>{},this.onerror=()=>{},this.onmessage=()=>{},this.onopen=()=>{},this.readyState=Bp.connecting,this.send=()=>{},this.url=null,this.url=t,this.close=r.close}}class HO extends Error{constructor(t){super(t),this.__isStorageError=!0,this.name="StorageError"}}function Fr(e){return typeof e=="object"&&e!==null&&"__isStorageError"in e}class i5e extends HO{constructor(t,n){super(t),this.name="StorageApiError",this.status=n}toJSON(){return{name:this.name,message:this.message,status:this.status}}}class VN extends HO{constructor(t,n){super(t),this.name="StorageUnknownError",this.originalError=n}}var o5e=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const Jte=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>t0(async()=>{const{default:r}=await Promise.resolve().then(()=>nm);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},s5e=()=>o5e(void 0,void 0,void 0,function*(){return typeof Response>"u"?(yield t0(()=>Promise.resolve().then(()=>nm),void 0)).Response:Response}),UN=e=>{if(Array.isArray(e))return e.map(n=>UN(n));if(typeof e=="function"||e!==Object(e))return e;const t={};return Object.entries(e).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,o=>o.toUpperCase().replace(/[-_]/g,""));t[i]=UN(r)}),t};var lh=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const m7=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),a5e=(e,t,n)=>lh(void 0,void 0,void 0,function*(){const r=yield s5e();e instanceof r&&!(n!=null&&n.noResolveJson)?e.json().then(i=>{t(new i5e(m7(i),e.status||500))}).catch(i=>{t(new VN(m7(i),i))}):t(new VN(m7(e),e))}),l5e=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json"},t==null?void 0:t.headers),r&&(i.body=JSON.stringify(r)),Object.assign(Object.assign({},i),n))};function Ev(e,t,n,r,i,o){return lh(this,void 0,void 0,function*(){return new Promise((s,a)=>{e(n,l5e(t,r,i,o)).then(l=>{if(!l.ok)throw l;return r!=null&&r.noResolveJson?l:l.json()}).then(l=>s(l)).catch(l=>a5e(l,a,r))})})}function Lw(e,t,n,r){return lh(this,void 0,void 0,function*(){return Ev(e,"GET",t,n,r)})}function vu(e,t,n,r,i){return lh(this,void 0,void 0,function*(){return Ev(e,"POST",t,r,i,n)})}function c5e(e,t,n,r,i){return lh(this,void 0,void 0,function*(){return Ev(e,"PUT",t,r,i,n)})}function u5e(e,t,n,r){return lh(this,void 0,void 0,function*(){return Ev(e,"HEAD",t,Object.assign(Object.assign({},n),{noResolveJson:!0}),r)})}function ene(e,t,n,r,i){return lh(this,void 0,void 0,function*(){return Ev(e,"DELETE",t,r,i,n)})}var qi=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}
73return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const d5e={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},GB={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};class f5e{constructor(t,n={},r,i){this.url=t,this.headers=n,this.bucketId=r,this.fetch=Jte(i)}uploadOrUpdate(t,n,r,i){return qi(this,void 0,void 0,function*(){try{let o;const s=Object.assign(Object.assign({},GB),i);let a=Object.assign(Object.assign({},this.headers),t==="POST"&&{"x-upsert":String(s.upsert)});const l=s.metadata;typeof Blob<"u"&&r instanceof Blob?(o=new FormData,o.append("cacheControl",s.cacheControl),l&&o.append("metadata",this.encodeMetadata(l)),o.append("",r)):typeof FormData<"u"&&r instanceof FormData?(o=r,o.append("cacheControl",s.cacheControl),l&&o.append("metadata",this.encodeMetadata(l))):(o=r,a["cache-control"]=`max-age=${s.cacheControl}`,a["content-type"]=s.contentType,l&&(a["x-metadata"]=this.toBase64(this.encodeMetadata(l)))),i!=null&&i.headers&&(a=Object.assign(Object.assign({},a),i.headers));const c=this._removeEmptyFolders(n),d=this._getFinalPath(c),f=yield this.fetch(`${this.url}/object/${d}`,Object.assign({method:t,body:o,headers:a},s!=null&&s.duplex?{duplex:s.duplex}:{})),p=yield f.json();return f.ok?{data:{path:c,id:p.Id,fullPath:p.Key},error:null}:{data:null,error:p}}catch(o){if(Fr(o))return{data:null,error:o};throw o}})}upload(t,n,r){return qi(this,void 0,void 0,function*(){return this.uploadOrUpdate("POST",t,n,r)})}uploadToSignedUrl(t,n,r,i){return qi(this,void 0,void 0,function*(){const o=this._removeEmptyFolders(t),s=this._getFinalPath(o),a=new URL(this.url+`/object/upload/sign/${s}`);a.searchParams.set("token",n);try{let l;const c=Object.assign({upsert:GB.upsert},i),d=Object.assign(Object.assign({},this.headers),{"x-upsert":String(c.upsert)});typeof Blob<"u"&&r instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),l.append("",r)):typeof FormData<"u"&&r instanceof FormData?(l=r,l.append("cacheControl",c.cacheControl)):(l=r,d["cache-control"]=`max-age=${c.cacheControl}`,d["content-type"]=c.contentType);const f=yield this.fetch(a.toString(),{method:"PUT",body:l,headers:d}),p=yield f.json();return f.ok?{data:{path:o,fullPath:p.Key},error:null}:{data:null,error:p}}catch(l){if(Fr(l))return{data:null,error:l};throw l}})}createSignedUploadUrl(t,n){return qi(this,void 0,void 0,function*(){try{let r=this._getFinalPath(t);const i=Object.assign({},this.headers);n!=null&&n.upsert&&(i["x-upsert"]="true");const o=yield vu(this.fetch,`${this.url}/object/upload/sign/${r}`,{},{headers:i}),s=new URL(this.url+o.url),a=s.searchParams.get("token");if(!a)throw new HO("No token returned by API");return{data:{signedUrl:s.toString(),path:t,token:a},error:null}}catch(r){if(Fr(r))return{data:null,error:r};throw r}})}update(t,n,r){return qi(this,void 0,void 0,function*(){return this.uploadOrUpdate("PUT",t,n,r)})}move(t,n,r){return qi(this,void 0,void 0,function*(){try{return{data:yield vu(this.fetch,`${this.url}/object/move`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers}),error:null}}catch(i){if(Fr(i))return{data:null,error:i};throw i}})}copy(t,n,r){return qi(this,void 0,void 0,function*(){try{return{data:{path:(yield vu(this.fetch,`${this.url}/object/copy`,{bucketId:this.bucketId,sourceKey:t,destinationKey:n,destinationBucket:r==null?void 0:r.destinationBucket},{headers:this.headers})).Key},error:null}}catch(i){if(Fr(i))return{data:null,error:i};throw i}})}createSignedUrl(t,n,r){return qi(this,void 0,void 0,function*(){try{let i=this._getFinalPath(t),o=yield vu(this.fetch,`${this.url}/object/sign/${i}`,Object.assign({expiresIn:n},r!=null&&r.transform?{transform:r.transform}:{}),{headers:this.headers});const s=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return o={signedUrl:encodeURI(`${this.url}${o.signedURL}${s}`)},{data:o,error:null}}catch(i){if(Fr(i))return{data:null,error:i};throw i}})}createSignedUrls(t,n,r){return qi(this,void 0,void 0,function*(){try{const i=yield vu(this.fetch,`${this.url}/object/sign/${this.bucketId}`,{expiresIn:n,paths:t},{headers:this.headers}),o=r!=null&&r.download?`&download=${r.download===!0?"":r.download}`:"";return{data:i.map(s=>Object.assign(Object.assign({},s),{signedUrl:s.signedURL?encodeURI(`${this.url}${s.signedURL}${o}`):null})),error:null}}catch(i){if(Fr(i))return{data:null,error:i};throw i}})}download(t,n){return qi(this,void 0,void 0,function*(){const i=typeof(n==null?void 0:n.transform)<"u"?"render/image/authenticated":"object",o=this.transformOptsToQueryString((n==null?void 0:n.transform)||{}),s=o?`?${o}`:"";try{const a=this._getFinalPath(t);return{data:yield(yield Lw(this.fetch,`${this.url}/${i}/${a}${s}`,{headers:this.headers,noResolveJson:!0})).blob(),error:null}}catch(a){if(Fr(a))return{data:null,error:a};throw a}})}info(t){return qi(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{const r=yield Lw(this.fetch,`${this.url}/object/info/${n}`,{headers:this.headers});return{data:UN(r),error:null}}catch(r){if(Fr(r))return{data:null,error:r};throw r}})}exists(t){return qi(this,void 0,void 0,function*(){const n=this._getFinalPath(t);try{return yield u5e(this.fetch,`${this.url}/object/${n}`,{headers:this.headers}),{data:!0,error:null}}catch(r){if(Fr(r)&&r instanceof VN){const i=r.originalError;if([400,404].includes(i==null?void 0:i.status))return{data:!1,error:r}}throw r}})}getPublicUrl(t,n){const r=this._getFinalPath(t),i=[],o=n!=null&&n.download?`download=${n.download===!0?"":n.download}`:"";o!==""&&i.push(o);const a=typeof(n==null?void 0:n.transform)<"u"?"render/image":"object",l=this.transformOptsToQueryString((n==null?void 0:n.transform)||{});l!==""&&i.push(l);let c=i.join("&");return c!==""&&(c=`?${c}`),{data:{publicUrl:encodeURI(`${this.url}/${a}/public/${r}${c}`)}}}remove(t){return qi(this,void 0,void 0,function*(){try{return{data:yield ene(this.fetch,`${this.url}/object/${this.bucketId}`,{prefixes:t},{headers:this.headers}),error:null}}catch(n){if(Fr(n))return{data:null,error:n};throw n}})}list(t,n,r){return qi(this,void 0,void 0,function*(){try{const i=Object.assign(Object.assign(Object.assign({},d5e),n),{prefix:t||""});return{data:yield vu(this.fetch,`${this.url}/object/list/${this.bucketId}`,i,{headers:this.headers},r),error:null}}catch(i){if(Fr(i))return{data:null,error:i};throw i}})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}transformOptsToQueryString(t){const n=[];return t.width&&n.push(`width=${t.width}`),t.height&&n.push(`height=${t.height}`),t.resize&&n.push(`resize=${t.resize}`),t.format&&n.push(`format=${t.format}`),t.quality&&n.push(`quality=${t.quality}`),n.join("&")}}const h5e="2.7.1",p5e={"X-Client-Info":`storage-js/${h5e}`};var ap=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}
73return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class m5e{constructor(t,n={},r){this.url=t,this.headers=Object.assign(Object.assign({},p5e),n),this.fetch=Jte(r)}listBuckets(){return ap(this,void 0,void 0,function*(){try{return{data:yield Lw(this.fetch,`${this.url}/bucket`,{headers:this.headers}),error:null}}catch(t){if(Fr(t))return{data:null,error:t};throw t}})}getBucket(t){return ap(this,void 0,void 0,function*(){try{return{data:yield Lw(this.fetch,`${this.url}/bucket/${t}`,{headers:this.headers}),error:null}}catch(n){if(Fr(n))return{data:null,error:n};throw n}})}createBucket(t,n={public:!1}){return ap(this,void 0,void 0,function*(){try{return{data:yield vu(this.fetch,`${this.url}/bucket`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Fr(r))return{data:null,error:r};throw r}})}updateBucket(t,n){return ap(this,void 0,void 0,function*(){try{return{data:yield c5e(this.fetch,`${this.url}/bucket/${t}`,{id:t,name:t,public:n.public,file_size_limit:n.fileSizeLimit,allowed_mime_types:n.allowedMimeTypes},{headers:this.headers}),error:null}}catch(r){if(Fr(r))return{data:null,error:r};throw r}})}emptyBucket(t){return ap(this,void 0,void 0,function*(){try{return{data:yield vu(this.fetch,`${this.url}/bucket/${t}/empty`,{},{headers:this.headers}),error:null}}catch(n){if(Fr(n))return{data:null,error:n};throw n}})}deleteBucket(t){return ap(this,void 0,void 0,function*(){try{return{data:yield ene(this.fetch,`${this.url}/bucket/${t}`,{},{headers:this.headers}),error:null}}catch(n){if(Fr(n))return{data:null,error:n};throw n}})}}class g5e extends m5e{constructor(t,n={},r){super(t,n,r)}from(t){return new f5e(this.url,this.headers,t,this.fetch)}}const y5e="2.49.1";let e1="";typeof Deno<"u"?e1="deno":typeof document<"u"?e1="web":typeof navigator<"u"&&navigator.product==="ReactNative"?e1="react-native":e1="node";const v5e={"X-Client-Info":`supabase-js-${e1}/${y5e}`},b5e={headers:v5e},x5e={schema:"public"},w5e={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},C5e={};var S5e=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};const E5e=e=>{let t;return e?t=e:typeof fetch>"u"?t=Vte:t=fetch,(...n)=>t(...n)},k5e=()=>typeof Headers>"u"?Ute:Headers,_5e=(e,t,n)=>{const r=E5e(n),i=k5e();return(o,s)=>S5e(void 0,void 0,void 0,function*(){var a;const l=(a=yield t())!==null&&a!==void 0?a:e;let c=new i(s==null?void 0:s.headers);return c.has("apikey")||c.set("apikey",e),c.has("Authorization")||c.set("Authorization",`Bearer ${l}`),r(o,Object.assign(Object.assign({},s),{headers:c}))})};var A5e=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};function N5e(e){return e.replace(/\/$/,"")}function j5e(e,t){const{db:n,auth:r,realtime:i,global:o}=e,{db:s,auth:a,realtime:l,global:c}=t,d={db:Object.assign(Object.assign({},s),n),auth:Object.assign(Object.assign({},a),r),realtime:Object.assign(Object.assign({},l),i),global:Object.assign(Object.assign({},c),o),accessToken:()=>A5e(this,void 0,void 0,function*(){return""})};return e.accessToken?d.accessToken=e.accessToken:delete d.accessToken,d}const tne="2.68.0",Ap=30*1e3,qN=3,g7=qN*Ap,T5e="http://localhost:9999",M5e="supabase.auth.token",O5e={"X-Client-Info":`gotrue-js/${tne}`},WN="X-Supabase-Api-Version",nne={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}};function R5e(e){return Math.round(Date.now()/1e3)+e}function P5e(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){const t=Math.random()*16|0;return(e=="x"?t:t&3|8).toString(16)})}const Ca=()=>typeof window<"u"&&typeof document<"u",tf={tested:!1,writable:!1},x1=()=>
73{if(!Ca())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(tf.tested)return tf.writable;const e=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(e,e),globalThis.localStorage.removeItem(e),tf.tested=!0,tf.writable=!0}catch{tf.tested=!0,tf.writable=!1}return tf.writable};function D5e(e){const t={},n=new URL(e);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEach((i,o)=>{t[o]=i})}catch{}return n.searchParams.forEach((r,i)=>{t[i]=r}),t}const rne=e=>{let t;return e?t=e:typeof fetch>"u"?t=(...n)=>t0(async()=>{const{default:r}=await Promise.resolve().then(()=>nm);return{default:r}},void 0).then(({default:r})=>r(...n)):t=fetch,(...n)=>t(...n)},I5e=e=>typeof e=="object"&&e!==null&&"status"in e&&"ok"in e&&"json"in e&&typeof e.json=="function",ine=async(e,t,n)=>{await e.setItem(t,JSON.stringify(n))},Hx=async(e,t)=>{const n=await e.getItem(t);if(!n)return null;try{return JSON.parse(n)}catch{return n}},Vx=async(e,t)=>{await e.removeItem(t)};function L5e(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let n="",r,i,o,s,a,l,c,d=0;for(e=e.replace("-","+").replace("_","/");d<e.length;)s=t.indexOf(e.charAt(d++)),a=t.indexOf(e.charAt(d++)),l=t.indexOf(e.charAt(d++)),c=t.indexOf(e.charAt(d++)),r=s<<2|a>>4,i=(a&15)<<4|l>>2,o=(l&3)<<6|c,n=n+String.fromCharCode(r),l!=64&&i!=0&&(n=n+String.fromCharCode(i)),c!=64&&o!=0&&(n=n+String.fromCharCode(o));return n}class _5{constructor(){this.promise=new _5.promiseConstructor((t,n)=>{this.resolve=t,this.reject=n})}}_5.promiseConstructor=Promise;function KB(e){const t=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}=?$|[a-z0-9_-]{2}(==)?$)$/i,n=e.split(".");if(n.length!==3)throw new Error("JWT is not valid: not a JWT structure");if(!t.test(n[1]))throw new Error("JWT is not valid: payload is not in base64url format");const r=n[1];return JSON.parse(L5e(r))}async function $5e(e){return await new Promise(t=>{setTimeout(()=>t(null),e)})}function z5e(e,t){return new Promise((r,i)=>{(async()=>{for(let o=0;o<1/0;o++)try{const s=await e(o);if(!t(o,null,s)){r(s);return}}catch(s){if(!t(o,s)){i(s);return}}})()})}function F5e(e){return("0"+e.toString(16)).substr(-2)}function B5e(){const t=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let o=0;o<56;o++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(t),Array.from(t,F5e).join("")}async function H5e(e){const n=new TextEncoder().encode(e),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(o=>String.fromCharCode(o)).join("")}function V5e(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function U5e(e){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),e;const n=await H5e(e);return V5e(n)}async function lp(e,t,n=!1){const r=B5e();let i=r;n&&(i+="/PASSWORD_RECOVERY"),await ine(e,`${t}-code-verifier`,i);const o=await U5e(r);return[o,r===o?"plain":"s256"]}const q5e=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function W5e(e){const t=e.headers.get(WN);if(!t||!t.match(q5e))return null;try{return new Date(`${t}T00:00:00.0Z`)}catch{return null}}class VO extends Error{constructor(t,n,r){super(t),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}}function xt(e){return typeof e=="object"&&e!==null&&"__isAuthError"in e}class G5e extends VO{constructor(t,n,r){super(t,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function K5e(e){return xt(e)&&e.name==="AuthApiError"}class one extends VO{constructor(t,n){super(t),this.name="AuthUnknownError",this.originalError=n}}class ch extends VO{constructor(t,n,r,i){super(t,r,i),this.name=n,this.status=r}}class cu extends ch{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function Y5e(e){return xt(e)&&e.name==="AuthSessionMissingError"}class y7 extends ch{constructor(){super("Auth session or user missing","AuthInvalidToken
73ResponseError",500,void 0)}}class Ux extends ch{constructor(t){super(t,"AuthInvalidCredentialsError",400,void 0)}}class qx extends ch{constructor(t,n=null){super(t,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}function X5e(e){return xt(e)&&e.name==="AuthImplicitGrantRedirectError"}class YB extends ch{constructor(t,n=null){super(t,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return{name:this.name,message:this.message,status:this.status,details:this.details}}}class GN extends ch{constructor(t,n){super(t,"AuthRetryableFetchError",n,void 0)}}function v7(e){return xt(e)&&e.name==="AuthRetryableFetchError"}class XB extends ch{constructor(t,n,r){super(t,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}}var Z5e=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const cf=e=>e.msg||e.message||e.error_description||e.error||JSON.stringify(e),Q5e=[502,503,504];async function ZB(e){var t;if(!I5e(e))throw new GN(cf(e),0);if(Q5e.includes(e.status))throw new GN(cf(e),e.status);let n;try{n=await e.json()}catch(o){throw new one(cf(o),o)}let r;const i=W5e(e);if(i&&i.getTime()>=nne["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new XB(cf(n),e.status,((t=n.weak_password)===null||t===void 0?void 0:t.reasons)||[]);if(r==="session_not_found")throw new cu}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((o,s)=>o&&typeof s=="string",!0))throw new XB(cf(n),e.status,n.weak_password.reasons);throw new G5e(cf(n),e.status||500,r)}const J5e=(e,t,n,r)=>{const i={method:e,headers:(t==null?void 0:t.headers)||{}};return e==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},t==null?void 0:t.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function Pt(e,t,n,r){var i;const o=Object.assign({},r==null?void 0:r.headers);o[WN]||(o[WN]=nne["2024-01-01"].name),r!=null&&r.jwt&&(o.Authorization=`Bearer ${r.jwt}`);const s=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(s.redirect_to=r.redirectTo);const a=Object.keys(s).length?"?"+new URLSearchParams(s).toString():"",l=await eCe(e,t,n+a,{headers:o,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function eCe(e,t,n,r,i,o){const s=J5e(t,r,i,o);let a;try{a=await e(n,Object.assign({},s))}catch(l){throw console.error(l),new GN(cf(l),0)}if(a.ok||await ZB(a),r!=null&&r.noResolveJson)return a;try{return await a.json()}catch(l){await ZB(l)}}function uu(e){var t;let n=null;iCe(e)&&(n=Object.assign({},e),e.expires_at||(n.expires_at=R5e(e.expires_in)));const r=(t=e.user)!==null&&t!==void 0?t:e;return{data:{session:n,user:r},error:null}}function QB(e){const t=uu(e);return!t.error&&e.weak_password&&typeof e.weak_password=="object"&&Array.isArray(e.weak_password.reasons)&&e.weak_password.reasons.length&&e.weak_password.message&&typeof e.weak_password.message=="string"&&e.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(t.data.weak_password=e.weak_password),t}function Eu(e){var t;return{data:{user:(t=e.user)!==null&&t!==void 0?t:e},error:null}}function tCe(e){return{data:e,error:null}}function nCe(e){const{action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o}=e,s=Z5e(e,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),a={action_link:t,email_otp:n,hashed_token:r,redirect_to:i,verification_type:o},l=Object.assign({},s);return{data:{properties:a,user:l},error:null}}function rCe(e){return e}function iCe(e){return e.access_token&&e.refresh_token&&e.expires_in}var oCe=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};class sCe{constructor({url:t="",headers:n={},fetch:r}){this.url=t,this.headers=n,this.fetch=rne(r),this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)}}async signOut(t,n="global"){try{return await Pt(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:t,noResolveJson:!0}),{data:null,error:null}}catch(r){if(xt(r))return{data:null,error:r};throw r}}async inviteUserByEmail(t,n={}){try{return await Pt(this.fetch,"POST",`${this.url}/invite`,{body:{email:t,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Eu})}catch(r){if(xt(r))return{data:{user:null},error:r};throw r}}async generateLink(t){try{const{options:n}=t,r=oCe(t,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await Pt(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:nCe,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(xt(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(t){try{return await Pt(this.fetch,"POST",`${this.url}/admin/users`,{body:t,headers:this.headers,xform:Eu})}catch(n){if(xt(n))return{data:{user:null},error:n};throw n}}async listUsers(t){var n,r,i,o,s,a,l;try{const c={nextPage:null,lastPage:0,total:0},d=await Pt(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=t==null?void 0:t.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(o=(i=t==null?void 0:t.perPage)===null||i===void 0?void 0:i.toString())!==null&&o!==void 0?o:""},xform:rCe});if(d.error)throw d.error;const f=await d.json(),p=(s=d.headers.get("x-total-count"))!==null&&s!==void 0?s:0,m=(l=(a=d.headers.get("link"))===null||a===void 0?void 0:a.split(","))!==null&&l!==void 0?l:[];return m.length>0&&(m.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),b=JSON.parse(y.split(";")[1].split("=")[1]);c[`${b}Page`]=v}),c.total=parseInt(p)),{data:Object.assign(Object.assign({},f),c),error:null}}catch(c){if(xt(c))return{data:{users:[]},error:c};throw c}}async getUserById(t){try{return await Pt(this.fetch,"GET",`${this.url}/admin/users/${t}`,{headers:this.headers,xform:Eu})}catch(n){if(xt(n))return{data:{user:null},error:n};throw n}}async updateUserById(t,n){try{return await Pt(this.fetch,"PUT",`${this.url}/admin/users/${t}`,{body:n,headers:this.headers,xform:Eu})}catch(r){if(xt(r))return{data:{user:null},error:r};throw r}}
73async deleteUser(t,n=!1){try{return await Pt(this.fetch,"DELETE",`${this.url}/admin/users/${t}`,{headers:this.headers,body:{should_soft_delete:n},xform:Eu})}catch(r){if(xt(r))return{data:{user:null},error:r};throw r}}async _listFactors(t){try{const{data:n,error:r}=await Pt(this.fetch,"GET",`${this.url}/admin/users/${t.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(xt(n))return{data:null,error:n};throw n}}async _deleteFactor(t){try{return{data:await Pt(this.fetch,"DELETE",`${this.url}/admin/users/${t.userId}/factors/${t.id}`,{headers:this.headers}),error:null}}catch(n){if(xt(n))return{data:null,error:n};throw n}}}const aCe={getItem:e=>x1()?globalThis.localStorage.getItem(e):null,setItem:(e,t)=>{x1()&&globalThis.localStorage.setItem(e,t)},removeItem:e=>{x1()&&globalThis.localStorage.removeItem(e)}};function JB(e={}){return{getItem:t=>e[t]||null,setItem:(t,n)=>{e[t]=n},removeItem:t=>{delete e[t]}}}function lCe(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}const cp={debug:!!(globalThis&&x1()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug")==="true")};class sne extends Error{constructor(t){super(t),this.isAcquireTimeout=!0}}class cCe extends sne{}async function uCe(e,t,n){cp.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquire lock",e,t);const r=new globalThis.AbortController;return t>0&&setTimeout(()=>{r.abort(),cp.debug&&console.log("@supabase/gotrue-js: navigatorLock acquire timed out",e)},t),await Promise.resolve().then(()=>globalThis.navigator.locks.request(e,t===0?{mode:"exclusive",ifAvailable:!0}:{mode:"exclusive",signal:r.signal},async i=>{if(i){cp.debug&&console.log("@supabase/gotrue-js: navigatorLock: acquired",e,i.name);try{return await n()}finally{cp.debug&&console.log("@supabase/gotrue-js: navigatorLock: released",e,i.name)}}else{if(t===0)throw cp.debug&&console.log("@supabase/gotrue-js: navigatorLock: not immediately available",e),new cCe(`Acquiring an exclusive Navigator LockManager lock "${e}" immediately failed`);if(cp.debug)try{const o=await globalThis.navigator.locks.query();console.log("@supabase/gotrue-js: Navigator LockManager state",JSON.stringify(o,null," "))}catch(o){console.warn("@supabase/gotrue-js: Error when querying Navigator LockManager state",o)}return console.warn("@supabase/gotrue-js: Navigator LockManager returned a null lock when using #request without ifAvailable set to true, it appears this browser is not following the LockManager spec https://developer.mozilla.org/en-US/docs/Web/API/LockManager/request"),await n()}}))}lCe();const dCe={url:T5e,storageKey:M5e,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:O5e,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1};async function eH(e,t,n){return await n()}class Z1{constructor(t){var n,r;this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.initializePromise=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log,this.instanceID=Z1.nextInstanceID,Z1.nextInstanceID+=1,this.instanceID>0&&Ca()&&console.warn("Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.");const i=Object.assign(Object.assign({},dCe),t);if(this.logDebugMessages=!!i.debug,typeof i.debug=="function"&&(this.logger=i.debug),this.persistSession=i.persistSession,this.storageKey=i.storageKey,this.autoRefreshToken=i.autoRefreshToken,this.admin=new sCe({url:i.url,headers:i.headers,fetch:i.fetch}),this.url=i.url,this.headers=i.headers,this.fetch=rne(i.fetch),this.lock=i.lock||eH,this.detectSessionInUrl=i.detectSessionInUrl,this.flowType=i.flowType,this.hasCustomAuthorizationHeader=i.hasCustomAuthorizationHeader,i.lock?this.lock=i.lock:Ca()&&(!((n=globalThis==null?void 0:globalThis.navigator)===null||n===void 0)&&n.locks)?this.lock=uCe:this.lock=eH,this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this)},this.persistSession?i.storage?this.storage=i.storage:x1()?this.storage=aCe:(this.memoryStorage={},this.storage=JB(this.memoryStorage)):(this.memoryStorage={},this.storage=JB(this.memoryStorage)),Ca()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(o){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",o)}(r=this.broadcastChannel)===null||r===void 0||r.addEventListener("message",async o=>{this._debug("received broadcast notification from other tab or client",o),await this._notifyAllSubscribers(o.data.event,o.data.session,!1)})}this.initialize()}_debug(...t){return this.logDebugMessages&&this.logger(`GoTrueClient@${this.instanceID} (${tne}) ${new Date().toISOString()}`,...t),this}async initialize(){return this.initializePromise?await this.initializePromise:(this.initializePromise=(async()=>await this._acquireLock(-1,async()=>await this._initialize()))(),await this.initializePromise)}async _initialize(){var t;try{const n=D5e(window.location.href);let r="none";if(this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce"),Ca()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:o}=await this._getSessionFromURL(n,r);if(o){if(this._debug("#_initialize()","error detecting session from URL",o),X5e(o)){const l=(t=o.details)===null||t===void 0?void 0:t.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:o}}return await this._removeSession(),{error:o}}const{session:s,redirectType:a}=i;return this._debug("#_initialize()","detected session in URL",s,"redirect type",a),await this._saveSession(s),setTimeout(async()=>{a==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",s):await this._notifyAllSubscribers("SIGNED_IN",s)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return xt(n)?{error:n}:{error:new one("Unexpected error during initialization",n)}}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(t){var n,r,i;try{const o=await Pt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=t==null?void 0:t.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=t==null?void 0:t.options)===null||i===void 0?void 0:i.captchaToken}},xform:uu}),{data:s,error:a}=o;if(a||!s)return{data:{user:null,session:null},error:a};const l=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(o){if(xt(o))return{data:{user:null,session:null},error:o};throw o}}async signUp(t){var n,r,i;try{let o;if("email"in t){const{email:d,password:f,options:p}=t;let m=null,y=null;this.flowType==="pkce"&&([m,y]=await lp(this.storage,this.storageKey)),o=await Pt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:p==null?void 0:p.emailRedirectTo,body:{email:d,password:f,data:(n=p==null?void 0:p.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken},code_challenge:m,code_challenge_method:y},xform:uu})}else if("phone"in t){const{phone:d,password:f,options:p}=t;o=await Pt(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:d,password:f,data:(r=p==null?void 0:p.data)!==null&&r!==void 0?r:{},channel:(i=p==null?void 0:p.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:p==null?void 0:p.captchaToken}},xform:uu})}else throw new Ux("You must provide either an email or phone number and a password");const{data:s,error:a}=o;if(a||!s)return{data:{user:null,session:null},error:a};const l=s.session,c=s.user;return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(o){if(xt(o))return{data:{user:null,session:null},error:o};throw o}}async signInWithPassword(t){try{let n;if("email"in t){const{email:o,password:s,options:a}=t;n=await Pt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:o,password:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:QB})}else if("phone"in t){const{phone:o,password:s,options:a}=t;n=await Pt(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:o,password:s,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:QB})}else throw new Ux("You must provide either an email or phone number and a password");const{data:r,error:i}=n;return i?{data:{user:null,session:null},error:i}:!r||!r.session||!r.user?{data:{user:null,session:null},error:new y7}:(r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),{data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(xt(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOAuth(t){var n,r,i,o;return await this._handleProviderSignIn(t.provider,{redirectTo:(n=t.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=t.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=t.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(o=t.o
73ptions)===null||o===void 0?void 0:o.skipBrowserRedirect})}async exchangeCodeForSession(t){return await this.initializePromise,this._acquireLock(-1,async()=>this._exchangeCodeForSession(t))}async _exchangeCodeForSession(t){const n=await Hx(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{const{data:o,error:s}=await Pt(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:t,code_verifier:r},xform:uu});if(await Vx(this.storage,`${this.storageKey}-code-verifier`),s)throw s;return!o||!o.session||!o.user?{data:{user:null,session:null,redirectType:null},error:new y7}:(o.session&&(await this._saveSession(o.session),await this._notifyAllSubscribers("SIGNED_IN",o.session)),{data:Object.assign(Object.assign({},o),{redirectType:i??null}),error:s})}catch(o){if(xt(o))return{data:{user:null,session:null,redirectType:null},error:o};throw o}}async signInWithIdToken(t){try{const{options:n,provider:r,token:i,access_token:o,nonce:s}=t,a=await Pt(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:o,nonce:s,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:uu}),{data:l,error:c}=a;return c?{data:{user:null,session:null},error:c}:!l||!l.session||!l.user?{data:{user:null,session:null},error:new y7}:(l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),{data:l,error:c})}catch(n){if(xt(n))return{data:{user:null,session:null},error:n};throw n}}async signInWithOtp(t){var n,r,i,o,s;try{if("email"in t){const{email:a,options:l}=t;let c=null,d=null;this.flowType==="pkce"&&([c,d]=await lp(this.storage,this.storageKey));const{error:f}=await Pt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:a,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:d},redirectTo:l==null?void 0:l.emailRedirectTo});return{data:{user:null,session:null},error:f}}if("phone"in t){const{phone:a,options:l}=t,{data:c,error:d}=await Pt(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:a,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(o=l==null?void 0:l.shouldCreateUser)!==null&&o!==void 0?o:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(s=l==null?void 0:l.channel)!==null&&s!==void 0?s:"sms"}});return{data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:d}}throw new Ux("You must provide either an email or phone number.")}catch(a){if(xt(a))return{data:{user:null,session:null},error:a};throw a}}async verifyOtp(t){var n,r;try{let i,o;"options"in t&&(i=(n=t.options)===null||n===void 0?void 0:n.redirectTo,o=(r=t.options)===null||r===void 0?void 0:r.captchaToken);const{data:s,error:a}=await Pt(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},t),{gotrue_meta_security:{captcha_token:o}}),redirectTo:i,xform:uu});if(a)throw a;if(!s)throw new Error("An error occurred on token verification.");const l=s.session,c=s.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(t.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),{data:{user:c,session:l},error:null}}catch(i){if(xt(i))return{data:{user:null,session:null},error:i};throw i}}async signInWithSSO(t){var n,r,i;try{let o=null,s=null;return this.flowType==="pkce"&&([o,s]=await lp(this.storage,this.storageKey)),await Pt(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in t?{provider_id:t.providerId}:null),"domain"in t?{domain:t.domain}:null),{redirect_to:(r=(n=t.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=t==null?void 0:t.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:t.options.captchaToken}}
73:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:s}),headers:this.headers,xform:tCe})}catch(o){if(xt(o))return{data:null,error:o};throw o}}async reauthenticate(){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._reauthenticate())}async _reauthenticate(){try{return await this._useSession(async t=>{const{data:{session:n},error:r}=t;if(r)throw r;if(!n)throw new cu;const{error:i}=await Pt(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return{data:{user:null,session:null},error:i}})}catch(t){if(xt(t))return{data:{user:null,session:null},error:t};throw t}}async resend(t){try{const n=`${this.url}/resend`;if("email"in t){const{email:r,type:i,options:o}=t,{error:s}=await Pt(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},redirectTo:o==null?void 0:o.emailRedirectTo});return{data:{user:null,session:null},error:s}}else if("phone"in t){const{phone:r,type:i,options:o}=t,{data:s,error:a}=await Pt(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}}});return{data:{user:null,session:null,messageId:s==null?void 0:s.message_id},error:a}}throw new Ux("You must provide either an email or phone number and a type")}catch(n){if(xt(n))return{data:{user:null,session:null},error:n};throw n}}async getSession(){return await this.initializePromise,await this._acquireLock(-1,async()=>this._useSession(async n=>n))}async _acquireLock(t,n){this._debug("#_acquireLock","begin",t);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,t,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(t){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await t(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lockAcquired||this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let t=null;const n=await Hx(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?t=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!t)return{data:{session:null},error:null};const r=t.expires_at?t.expires_at*1e3-Date.now()<g7:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",t.expires_at),!r){if(this.storage.isServer){let s=this.suppressGetSessionWarning;t=new Proxy(t,{get:(l,c,d)=>(!s&&c==="user"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),s=!0,this.suppressGetSessionWarning=!0),Reflect.get(l,c,d))})}return{data:{session:t},error:null}}const{session:i,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{session:null},error:o}:{data:{session:i},error:null}}finally{this._debug("#__loadSession()","end")}}async getUser(t){return t?await this._getUser(t):(await this.initializePromise,await this._acquireLock(-1,async()=>await this._getUser()))}async _getUser(t){try{return t?await Pt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:t,xform:Eu}):await this._useSession(async n=>{var r,i,o;const{data:s,error:a}=n;
73if(a)throw a;return!(!((r=s.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new cu}:await Pt(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(o=(i=s.session)===null||i===void 0?void 0:i.access_token)!==null&&o!==void 0?o:void 0,xform:Eu})})}catch(n){if(xt(n))return Y5e(n)&&(await this._removeSession(),await Vx(this.storage,`${this.storageKey}-code-verifier`)),{data:{user:null},error:n};throw n}}async updateUser(t,n={}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._updateUser(t,n))}async _updateUser(t,n={}){try{return await this._useSession(async r=>{const{data:i,error:o}=r;if(o)throw o;if(!i.session)throw new cu;const s=i.session;let a=null,l=null;this.flowType==="pkce"&&t.email!=null&&([a,l]=await lp(this.storage,this.storageKey));const{data:c,error:d}=await Pt(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},t),{code_challenge:a,code_challenge_method:l}),jwt:s.access_token,xform:Eu});if(d)throw d;return s.user=c.user,await this._saveSession(s),await this._notifyAllSubscribers("USER_UPDATED",s),{data:{user:s.user},error:null}})}catch(r){if(xt(r))return{data:{user:null},error:r};throw r}}_decodeJWT(t){return KB(t)}async setSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._setSession(t))}async _setSession(t){try{if(!t.access_token||!t.refresh_token)throw new cu;const n=Date.now()/1e3;let r=n,i=!0,o=null;const s=KB(t.access_token);if(s.exp&&(r=s.exp,i=r<=n),i){const{session:a,error:l}=await this._callRefreshToken(t.refresh_token);if(l)return{data:{user:null,session:null},error:l};if(!a)return{data:{user:null,session:null},error:null};o=a}else{const{data:a,error:l}=await this._getUser(t.access_token);if(l)throw l;o={access_token:t.access_token,refresh_token:t.refresh_token,user:a.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(o),await this._notifyAllSubscribers("SIGNED_IN",o)}return{data:{user:o.user,session:o},error:null}}catch(n){if(xt(n))return{data:{session:null,user:null},error:n};throw n}}async refreshSession(t){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._refreshSession(t))}async _refreshSession(t){try{return await this._useSession(async n=>{var r;if(!t){const{data:s,error:a}=n;if(a)throw a;t=(r=s.session)!==null&&r!==void 0?r:void 0}if(!(t!=null&&t.refresh_token))throw new cu;const{session:i,error:o}=await this._callRefreshToken(t.refresh_token);return o?{data:{user:null,session:null},error:o}:i?{data:{user:i.user,session:i},error:null}:{data:{user:null,session:null},error:null}})}catch(n){if(xt(n))return{data:{user:null,session:null},error:n};throw n}}async _getSessionFromURL(t,n){try{if(!Ca())throw new qx("No browser detected.");if(t.error||t.error_description||t.error_code)throw new qx(t.error_description||"Error in URL with unspecified error_description",{error:t.error||"unspecified_error",code:t.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new YB("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new qx("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!t.code)throw new YB("No code detected.");const{data:S,error:E}=await this._exchangeCodeForSession(t.code);if(E)throw E;const A=new URL(window.location.href);return A.searchParams.delete("code"),window.history.replaceState(window.history.state,"",A.toString()),{data:{session:S.session,redirectType:null},error:null}}const{provider_token:r,provider_refresh_token:i,access_token:o,refresh_token:s,expires_in:a,expires_at:l,token_type:c}=t;if(!o||!a||!s||!c)throw new qx("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(a);let p=d+f;l&&(p=parseInt(l));const m=p-d;m*1e3<=Ap&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${m}s, should have been closer to ${f}s`);const y=p-f;d-y>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",y,p,d):d-y<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",y,p,d);const{data:v,error:b}=await this._getUser(o);if(b)throw b;const C={provider_token:r,provider_refresh_token:i,access_token:o,expires_in:f,expires_at:p,refresh_token:s,token_type:c,user:v.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),{data:{session:C,redirectType:t.type},error:null}}catch(r){if(xt(r))return{data:{session:null,redirectType:null},error:r};throw r}}_isImplicitGrantCallback(t){return!!(t.access_token||t.error_description)}async _isPKCECallback(t){const n=await Hx(this.storage,`${this.storageKey}-code-verifier`);return!!(t.code&&n)}async signOut(t={scope:"global"}){return await this.initializePromise,await this._acquireLock(-1,async()=>await this._signOut(t))}async _signOut({scope:t}={scope:"global"}){return await this._useSession(async n=>{var r;const{data:i,error:o}=n;
73if(o)return{error:o};const s=(r=i.session)===null||r===void 0?void 0:r.access_token;if(s){const{error:a}=await this.admin.signOut(s,t);if(a&&!(K5e(a)&&(a.status===404||a.status===401||a.status===403)))return{error:a}}return t!=="others"&&(await this._removeSession(),await Vx(this.storage,`${this.storageKey}-code-verifier`)),{error:null}})}onAuthStateChange(t){const n=P5e(),r={id:n,callback:t,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,await this._acquireLock(-1,async()=>{this._emitInitialSession(n)})))(),{data:{subscription:r}}}async _emitInitialSession(t){return await this._useSession(async n=>{var r,i;try{const{data:{session:o},error:s}=n;if(s)throw s;await((r=this.stateChangeEmitters.get(t))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",o)),this._debug("INITIAL_SESSION","callback id",t,"session",o)}catch(o){await((i=this.stateChangeEmitters.get(t))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",t,"error",o),console.error(o)}})}async resetPasswordForEmail(t,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await lp(this.storage,this.storageKey,!0));try{return await Pt(this.fetch,"POST",`${this.url}/recover`,{body:{email:t,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(o){if(xt(o))return{data:null,error:o};throw o}}async getUserIdentities(){var t;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return{data:{identities:(t=n.user.identities)!==null&&t!==void 0?t:[]},error:null}}catch(n){if(xt(n))return{data:null,error:n};throw n}}async linkIdentity(t){var n;try{const{data:r,error:i}=await this._useSession(async o=>{var s,a,l,c,d;const{data:f,error:p}=o;if(p)throw p;const m=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,t.provider,{redirectTo:(s=t.options)===null||s===void 0?void 0:s.redirectTo,scopes:(a=t.options)===null||a===void 0?void 0:a.scopes,queryParams:(l=t.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Pt(this.fetch,"GET",m,{headers:this.headers,jwt:(d=(c=f.session)===null||c===void 0?void 0:c.access_token)!==null&&d!==void 0?d:void 0})});if(i)throw i;return Ca()&&!(!((n=t.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),{data:{provider:t.provider,url:r==null?void 0:r.url},error:null}}catch(r){if(xt(r))return{data:{provider:t.provider,url:null},error:r};throw r}}async unlinkIdentity(t){try{return await this._useSession(async n=>{var r,i;const{data:o,error:s}=n;if(s)throw s;return await Pt(this.fetch,"DELETE",`${this.url}/user/identities/${t.identity_id}`,{headers:this.headers,jwt:(i=(r=o.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(xt(n))return{data:null,error:n};throw n}}async _refreshAccessToken(t){const n=`#_refreshAccessToken(${t.substring(0,5)}...)`;this._debug(n,"begin");try{const r=Date.now();return await z5e(async i=>(i>0&&await $5e(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await Pt(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:t},headers:this.headers,xform:uu})),(i,o)=>{const s=200*Math.pow(2,i);return o&&v7(o)&&Date.now()+s-r<Ap})}catch(r){if(this._debug(n,"error",r),xt(r))return{data:{session:null,user:null},error:r};throw r}finally{this._debug(n,"end")}}_isValidSession(t){return typeof t=="object"&&t!==null&&"access_token"in t&&"refresh_token"in t&&"expires_at"in t}async _handleProviderSignIn(t,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,t,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",t,"options",n,"url",r),Ca()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:t,url:r},error:null}}async _recoverAndRefresh(){var t;const n="#_recoverAndRefresh()";this._debug(n,"begin");try{const r=await Hx(this.storage,this.storageKey);if(this._debug(n,"session from storage",r),!this._isValidSession(r)){this._debug(n,"session is not val
73id"),r!==null&&await this._removeSession();return}const i=((t=r.expires_at)!==null&&t!==void 0?t:1/0)*1e3-Date.now()<g7;if(this._debug(n,`session has${i?"":" not"} expired with margin of ${g7}s`),i){if(this.autoRefreshToken&&r.refresh_token){const{error:o}=await this._callRefreshToken(r.refresh_token);o&&(console.error(o),v7(o)||(this._debug(n,"refresh failed with a non-retryable error, removing the session",o),await this._removeSession()))}}else await this._notifyAllSubscribers("SIGNED_IN",r)}catch(r){this._debug(n,"error",r),console.error(r);return}finally{this._debug(n,"end")}}async _callRefreshToken(t){var n,r;if(!t)throw new cu;if(this.refreshingDeferred)return this.refreshingDeferred.promise;const i=`#_callRefreshToken(${t.substring(0,5)}...)`;this._debug(i,"begin");try{this.refreshingDeferred=new _5;const{data:o,error:s}=await this._refreshAccessToken(t);if(s)throw s;if(!o.session)throw new cu;await this._saveSession(o.session),await this._notifyAllSubscribers("TOKEN_REFRESHED",o.session);const a={session:o.session,error:null};return this.refreshingDeferred.resolve(a),a}catch(o){if(this._debug(i,"error",o),xt(o)){const s={session:null,error:o};return v7(o)||await this._removeSession(),(n=this.refreshingDeferred)===null||n===void 0||n.resolve(s),s}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(o),o}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(t,n,r=!0){const i=`#_notifyAllSubscribers(${t})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:t,session:n});const o=[],s=Array.from(this.stateChangeEmitters.values()).map(async a=>{try{await a.callback(t,n)}catch(l){o.push(l)}});if(await Promise.all(s),o.length>0){for(let a=0;a<o.length;a+=1)console.error(o[a]);throw o[0]}}finally{this._debug(i,"end")}}async _saveSession(t){this._debug("#_saveSession()",t),this.suppressGetSessionWarning=!0,await ine(this.storage,this.storageKey,t)}async _removeSession(){this._debug("#_removeSession()"),await Vx(this.storage,this.storageKey),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const t=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{t&&Ca()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",t)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const t=setInterval(()=>this._autoRefreshTokenTick(),Ap);this.autoRefreshTicker=t,t&&typeof t=="object"&&typeof t.unref=="function"?t.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(t),setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const t=this.autoRefreshTicker;this.autoRefreshTicker=null,t&&clearInterval(t)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async _autoRefreshTokenTick(){this._debug("#_autoRefreshTokenTick()","begin");try{await this._acquireLock(0,async()=>{try{const t=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-t)/Ap);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Ap}ms, refresh threshold is ${qN} ticks`),i<=qN&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(t){if(t.isAcquireTimeout||t instanceof sne)this._debug("auto refresh token tick lock not available");else throw t}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ca()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>await this._onVisibilityChanged(!1),window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(t){console.error("_handleVisibilityChange",t)}}async _onVisibilityChanged(t){const n=`#_onVisibilityChanged(${t})`;this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"?(this.autoRefreshToken&&this._startAutoRefresh(),t||(await this.initializePromise,await this._acquireLock(-1,async()=>
73{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()}))):document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(t,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[o,s]=await lp(this.storage,this.storageKey),a=new URLSearchParams({code_challenge:`${encodeURIComponent(o)}`,code_challenge_method:`${encodeURIComponent(s)}`});i.push(a.toString())}if(r!=null&&r.queryParams){const o=new URLSearchParams(r.queryParams);i.push(o.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${t}?${i.join("&")}`}async _unenroll(t){try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;return o?{data:null,error:o}:await Pt(this.fetch,"DELETE",`${this.url}/factors/${t.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(xt(n))return{data:null,error:n};throw n}}async _enroll(t){try{return await this._useSession(async n=>{var r,i;const{data:o,error:s}=n;if(s)return{data:null,error:s};const a=Object.assign({friendly_name:t.friendlyName,factor_type:t.factorType},t.factorType==="phone"?{phone:t.phone}:{issuer:t.issuer}),{data:l,error:c}=await Pt(this.fetch,"POST",`${this.url}/factors`,{body:a,headers:this.headers,jwt:(r=o==null?void 0:o.session)===null||r===void 0?void 0:r.access_token});return c?{data:null,error:c}:(t.factorType==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),{data:l,error:null})})}catch(n){if(xt(n))return{data:null,error:n};throw n}}async _verify(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;if(o)return{data:null,error:o};const{data:s,error:a}=await Pt(this.fetch,"POST",`${this.url}/factors/${t.factorId}/verify`,{body:{code:t.code,challenge_id:t.challengeId},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token});return a?{data:null,error:a}:(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+s.expires_in},s)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",s),{data:s,error:a})})}catch(n){if(xt(n))return{data:null,error:n};throw n}})}async _challenge(t){return this._acquireLock(-1,async()=>{try{return await this._useSession(async n=>{var r;const{data:i,error:o}=n;return o?{data:null,error:o}:await Pt(this.fetch,"POST",`${this.url}/factors/${t.factorId}/challenge`,{body:{channel:t.channel},headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(xt(n))return{data:null,error:n};throw n}})}async _challengeAndVerify(t){const{data:n,error:r}=await this._challenge({factorId:t.factorId});return r?{data:null,error:r}:await this._verify({factorId:t.factorId,challengeId:n.id,code:t.code})}async _listFactors(){const{data:{user:t},error:n}=await this.getUser();if(n)return{data:null,error:n};const r=(t==null?void 0:t.factors)||[],i=r.filter(s=>s.factor_type==="totp"&&s.status==="verified"),o=r.filter(s=>s.factor_type==="phone"&&s.status==="verified");return{data:{all:r,totp:i,phone:o},error:null}}async _getAuthenticatorAssuranceLevel(){return this._acquireLock(-1,async()=>await this._useSession(async t=>{var n,r;const{data:{session:i},error:o}=t;if(o)return{data:null,error:o};if(!i)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const s=this._decodeJWT(i.access_token);let a=null;s.aal&&(a=s.aal);let l=a;((r=(n=i.user.factors)===null||n===void 0?void 0:n.filter(f=>f.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(l="aal2");const d=s.amr||[];return{data:{currentLevel:a,nextLevel:l,currentAuthenticationMethods:d},error:null}}))}}Z1.nextInstanceID=0;const fCe=Z1;class hCe extends fCe{constructor(t){super(t)}}var pCe=function(e,t,n,r){function i(o){return o instanceof n?o:new n(function(s){s(o)})}
73return new(n||(n=Promise))(function(o,s){function a(d){try{c(r.next(d))}catch(f){s(f)}}function l(d){try{c(r.throw(d))}catch(f){s(f)}}function c(d){d.done?o(d.value):i(d.value).then(a,l)}c((r=r.apply(e,t||[])).next())})};class mCe{constructor(t,n,r){var i,o,s;if(this.supabaseUrl=t,this.supabaseKey=n,!t)throw new Error("supabaseUrl is required.");if(!n)throw new Error("supabaseKey is required.");const a=N5e(t);this.realtimeUrl=`${a}/realtime/v1`.replace(/^http/i,"ws"),this.authUrl=`${a}/auth/v1`,this.storageUrl=`${a}/storage/v1`,this.functionsUrl=`${a}/functions/v1`;const l=`sb-${new URL(this.authUrl).hostname.split(".")[0]}-auth-token`,c={db:x5e,realtime:C5e,auth:Object.assign(Object.assign({},w5e),{storageKey:l}),global:b5e},d=j5e(r??{},c);this.storageKey=(i=d.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(o=d.global.headers)!==null&&o!==void 0?o:{},d.accessToken?(this.accessToken=d.accessToken,this.auth=new Proxy({},{get:(f,p)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(p)} is not possible`)}})):this.auth=this._initSupabaseAuthClient((s=d.auth)!==null&&s!==void 0?s:{},this.headers,d.global.fetch),this.fetch=_5e(n,this._getAccessToken.bind(this),d.global.fetch),this.realtime=this._initRealtimeClient(Object.assign({headers:this.headers,accessToken:this._getAccessToken.bind(this)},d.realtime)),this.rest=new B4e(`${a}/rest/v1`,{headers:this.headers,schema:d.db.schema,fetch:this.fetch}),d.accessToken||this._listenForAuthEvents()}get functions(){return new j4e(this.functionsUrl,{headers:this.headers,customFetch:this.fetch})}get storage(){return new g5e(this.storageUrl,this.headers,this.fetch)}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,n={},r={}){return this.rest.rpc(t,n,r)}channel(t,n={config:{}}){return this.realtime.channel(t,n)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}_getAccessToken(){var t,n;return pCe(this,void 0,void 0,function*(){if(this.accessToken)return yield this.accessToken();const{data:r}=yield this.auth.getSession();return(n=(t=r.session)===null||t===void 0?void 0:t.access_token)!==null&&n!==void 0?n:null})}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,storageKey:o,flowType:s,lock:a,debug:l},c,d){const f={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new hCe({url:this.authUrl,headers:Object.assign(Object.assign({},f),c),storageKey:o,autoRefreshToken:t,persistSession:n,detectSessionInUrl:r,storage:i,flowType:s,lock:a,debug:l,fetch:d,hasCustomAuthorizationHeader:"Authorization"in this.headers})}_initRealtimeClient(t){return new n5e(this.realtimeUrl,Object.assign(Object.assign({},t),{params:Object.assign({apikey:this.supabaseKey},t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((n,r)=>{this._handleTokenChanged(n,"CLIENT",r==null?void 0:r.access_token)})}_handleTokenChanged(t,n,r){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN")&&this.changedAccessToken!==r?this.changedAccessToken=r:t==="SIGNED_OUT"&&(this.realtime.setAuth(),n=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}}const gCe=(e,t,n)=>new mCe(e,t,n),yCe="https://kjfzoyaptzreoyzwhwmn.supabase.co",vCe="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtqZnpveWFwdHpyZW95endod21uIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NDI3NjE1MTksImV4cCI6MjA1ODMzNzUxOX0.HGQiMi1vLTIkfiTXeYuk3Jnk5eEINnlSMwnj-XS9Zqw",Ds=gCe(yCe,vCe),jf=Hte({reducerPath:"authApi",baseQuery:J3e(),tagTypes:["Auth"],endpoints:e=>({signUp:e.mutation({queryFn:async({email:t,password:n,metadata:r})=>{try{const{data:i,error:o}=await Ds.auth.signUp({email:t,password:n,options:{data:r}});return o?{error:o.message}:{data:{success:!0,error:null,user:i.user,session:i.session}}}catch(i){return{error:i instanceof Error?i.message:"An unknown error occurred"}}},invalidatesTags:["Auth"],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r,n(jf.util.invalidateTags(["Auth"]))}catch{}}}),signIn:e.mutation({queryFn:async({email:t,password:n})=>{try{const{data:r,error:i}=await Ds.auth.signInWithPassword({email:t,password:n});return i?{error:i.message}:{data:{success:!0,error:null,user:r.user,session:r.session}}}catch(r){return{error:r instanceof Error?r.message:"An unknown error occurred"}}},invalidatesTags:["Auth"],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r,n(jf.util.invalidateTags(["Auth"]))}catch{}}}),signOut:e.mutation({queryFn:async()=>{try{const{error:t}=await Ds.auth.signOut();return t?{error:t.message}:{data:{success:!0,error:null}}}catch(t){return{error:t instanceof Error?t.message:"An unknown error occurred"}}},invalidatesTags:["Auth"]}),signInWithGoogle:e.mutation({queryFn:async()=>{try{const{error:t}=await Ds.auth.signInWithOAuth({provider:"google",options:{redirectTo:`${window.location.origin}/auth/callback`}});return t?{error:t.message}:{data:{success:!0,error:null}}}catch(t){return{error:t instanceof Error?t.message:"An unknown error occurred"}}}}),getSession:e.query({queryFn:async()=>{try{const{data:t,error:n}=await Ds.auth.getSession();return n?{error:n.message}:{data:t.session?{session:t.session,user:t.session.user}:null}}catch(t){return{error:t instanceof Error?t.message:"An unknown error occurred"}}},providesTags:["Auth"]})})}),{useSignUpMutation:bCe,useSignInMutation:xCe,useSignInWithGoogleMutation:ane,useSignOutMutation:wCe,useGetSessionQuery:rm}=jf,CCe="https://api.seio.so";var Dt=(e=>(e.PENDING="pending",e.RESEARCHING="researching",e.AUDITING="auditing",e.PLANNING="planning",e.SECTION_GENERATION="section_generation",e.ASSEMBLING="assembling",e.WORD_COUNT_VERIFICATION="word_count_verification",e.ENHANCING="enhancing",e.ENHANCED_RESEARCHING="enhanced_researching",e.ENHANCED_PLANNING="enhanced_planning",e.ENHANCED_IMAGING="enhanced_imaging",e.ENHANCED_DRAFTING="enhanced_drafting",e.ENHANCED_ASSEMBLING="enhanced_assembling",e.AGENT_BRIEF_GENERATION="agent_brief_generation",e.AGENT_GENERATING_IMAGES="agent_generating_images",e.AGENT_RESEARCHING="agent_researching",e.AGENT_SECTION_PROCESSING="agent_section_processing",e.AGENT_CONTENT_CREATION="agent_c
73ontent_creation",e.AGENT_GENERATING_BLOG_COVER="agent_generating_blog_cover",e.AGENT_GENERATING_EXTRA_CONTENT="agent_generating_extra_content",e.COMPLETED="completed",e.FAILED="failed",e))(Dt||{});const Yn=Hte({reducerPath:"api",baseQuery:V3e({baseUrl:CCe,prepareHeaders:async e=>{try{const{data:{session:t}}=await Ds.auth.getSession();t!=null&&t.access_token&&e.set("authorization",`Bearer ${t.access_token}`)}catch(t){console.error("Error getting session:",t)}return e}}),tagTypes:["Articles","Integrations","Billing","Notifications","Usage","KeywordReports","KeywordLists","UserProfile","ContentMap","ArticlePipeline"],endpoints:e=>({getUserProfile:e.query({async queryFn(t,n,r,i){try{const{data:o}=await Ds.auth.getSession();if(!o.session)return{data:null};const s=await i({url:"/api/users/profile",headers:{"x-user-id":o.session.user.id}});return s.error?{error:s.error}:{data:s.data}}catch(o){return{error:{status:"CUSTOM_ERROR",error:String(o)}}}},providesTags:["UserProfile"]}),completeOnboarding:e.mutation({async queryFn(t,n,r,i){try{const{data:o}=await Ds.auth.getSession();if(!o.session)return{error:{status:"CUSTOM_ERROR",error:"Not authenticated"}};const s=await i({url:"/api/users/complete-onboarding",method:"POST",headers:{"x-user-id":o.session.user.id,"x-user-email":o.session.user.email||""},body:t});if(s.error)return{error:s.error};const a=s.data;return{data:{success:!0,error:null,user:a.user,organizationId:a.organizationId}}}catch(o){return{error:{status:"CUSTOM_ERROR",error:String(o)}}}},invalidatesTags:["UserProfile"]}),getUserArticles:e.query({query:({page:t,pageSize:n})=>({url:"/api/articles",params:{page:t,limit:n}}),providesTags:t=>t!=null&&t.data?[...t.data.map(({id:n})=>({type:"Articles",id:n})),{type:"Articles",id:"LIST"}]:[{type:"Articles",id:"LIST"}]}),getArticleById:e.query({query:t=>`/api/articles/${t}`,providesTags:(t,n,r)=>[{type:"Articles",id:r}],keepUnusedDataFor:0}),getArticlePipeline:e.query({query:()=>"/api/articles/pipeline",providesTags:()=>[{type:"ArticlePipeline",id:"STATUS"}]}),createArticle:e.mutation({query:t=>({url:"/api/articles",method:"POST",body:t}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r,n(Yn.util.invalidateTags([{type:"Articles",id:"LIST"},{type:"ArticlePipeline",id:"STATUS"}]))}catch{n(Yn.util.invalidateTags([{type:"ArticlePipeline",id:"STATUS"}]))}}}),updateArticle:e.mutation({query:({id:t,...n})=>({url:`/api/articles/${t}`,method:"PATCH",body:n}),async onQueryStarted({id:t,...n},{dispatch:r,queryFulfilled:i}){const o=r(Yn.util.updateQueryData("getArticleById",t,s=>{Object.assign(s,n)}));try{await i}catch{o.undo()}}}),updateArticleDetails:e.mutation({query:({id:t,...n})=>({url:`/api/articles/${t}`,method:"PATCH",body:n}),invalidatesTags:(t,n,{id:r})=>[{type:"Articles",id:r}]}),markSectionSuggestionAsUsed:e.mutation({query:({articleId:t,suggestionId:n})=>({url:`/api/articles/${t}/section-suggestions/${n}/use`,method:"PUT"}),invalidatesTags:(t,n,{articleId:r})=>[{type:"Articles",id:r}]}),publishArticle:e.mutation({query:({id:t,...n})=>({url:`/api/articles/${t}/publish`,method:"POST",body:n}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const{data:i}=await r;n(Yn.util.updateQueryData("getArticleById",t.id,o=>{i.article.ghostPostId&&(o.ghostPostId=i.article.ghostPostId),i.article.ghostPostUrl&&(o.ghostPostUrl=i.article.ghostPostUrl),i.article.ghostLastPublishedDate&&(o.ghostLastPublishedDate=i.article.ghostLastPublishedDate)})),n(Yn.util.invalidateTags([{type:"Articles",id:t.id}]))}catch{}}}),updateArticleWithPublish:e.mutation({query:({id:t,...n})=>({url:`/api/articles/${t}/update`,method:"POST",body:n}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{const i=await r;n(Yn.util.updateQueryData("getArticleById",t.id,o=>{i.data.ghostPostId&&(o.ghostPostId=i.data.ghostPostId),i.data.ghostPostUrl&&(o.ghostPostUrl=i.data.ghostPostUrl),i.data.ghostLastPublishedDate&&(o.ghostLastPublishedDate=i.data.ghostLastPublishedDate)})),n(Yn.util.invalidateTags([{type:"Articles",id:t.id}]))}catch{}}}),retryArticle:e.mutation({query:t=>({url:`/api/articles/${t}/retry`,method:"POST"}),invalidatesTags:(t,n,r)=>[{type:"Articles",id:r},{type:"Articles",id:"LIST"},{type:"ArticlePipeline",id:"STATUS"},"ContentMap"],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r}catch{n(Yn.util.invalidateTags([{type:"ArticlePipeline",id:"STATUS"}]))}}}),deleteArticle:e.mutation({query:t=>({url:`/api/articles/${t}`,method:"DELETE"}),invalidatesTags:(t,n,r)=>[{type:"Articles",id:r},{type:"Articles",id:"LIST"},{type:"ArticlePipeline",id:"STATUS"}]}),getAllIntegrations:e.query({query:()=>"/api/integrations",providesTags:["Integrations"]}),createGhostIntegration:e.mutation({query:t=>({url:"/api/integrations/ghost",method:"POST",body:t}),invalidatesTags:["Integrations"]}),updateGhostIntegration:e.mutation({query:t=>({url:"/api/integrations/ghost",method:"PUT",body:t}),invalidatesTags:["Integrations"]}),deleteGhostIntegration:e.mutation({query:()=>({url:"/api/integrations/ghost",method:"DELETE"}),invalidatesTags:["Integrations"]}),getGhostTags:e.query({query:()=>"/api/integrations/ghost/tags",providesTags:["Integrations"]}),getGhostAuthors:e.query({query:()=>"/api/integrations/ghost/authors",providesTags:["Integrations"]}),syncGhostIntegration:e.mutation({query:()=>({url:"/api/integrations/ghost/sync",method:"POST"}),invalidatesTags:["Integrations"]}),saveArticleSettings:e.mutation({query:({id:t,...n})=>({url:`/api/articles/${t}/save-settings`,method:"POST",body:n}),invalidatesTags:(t,n,{id:r})=>[{type:"Articles",id:r}]}),updateGhostPublishSettings:e.mutation({query:({id:t,...n})=>({url:`/api/articles/${t}`,method:"PATCH",body:n}),async onQueryStarted({id:t,...n},{dispatch:r,queryFulfilled:i}){const o=r(Yn.util.updateQueryData("getArticleById",t,s=>{Object.assign(s,n)}));try{await i}catch{o.undo()}}}),getSubscription:e.query({query:()=>"/api/billing/subscription",providesTags:["Billing"]}),createCheckoutSession:e.mutation({query:t=>({url:"/api/billing/create-checkout-session",method:"POST",body:t})}),getNotifications:e.query({query:()=>"/api/notifications",providesTags:["Notifications"]}),markNotificationAsRead:e.mutation({query:t=>({url:`/api/notifications/${t}/read`,method:"POST"}),invalidatesTags:["Notifications"]}),markAllNotificationsAsRead:e.mutation({query:()=>({url:"/api/notifications/read/all",method:"PATCH"}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r,n(Yn.util.updateQueryData("getNotifications",void 0,i=>
73{i&&i.forEach(o=>{o.read=!0})}))}catch{}},invalidatesTags:["Notifications"]}),getUsageSummary:e.query({query:()=>"/api/usage/summary",providesTags:["Usage"]}),getUsageDetails:e.query({query:t=>({url:"/api/usage",params:t}),providesTags:["Usage"]}),generateReport:e.mutation({query:({keyword:t,languageCode:n="en",locationCode:r="US",aiEnabled:i})=>({url:"/api/keyword-reports",method:"POST",body:{keyword:t,languageCode:n,locationCode:r,...i?{aiEnabled:i}:{}}}),async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r,n(Yn.util.invalidateTags(["KeywordReports"]))}catch{}}}),getReport:e.query({query:t=>`/api/keyword-reports/${t}`,providesTags:(t,n,r)=>[{type:"KeywordReports",id:r}]}),deleteReport:e.mutation({query:t=>({url:`/api/keyword-reports/${t}`,method:"DELETE"}),invalidatesTags:(t,n,r)=>[{type:"KeywordReports",id:r},{type:"KeywordReports",id:"LIST"}]}),listReports:e.query({query:()=>"/api/keyword-reports",providesTags:t=>t?[...t.map(({id:n})=>({type:"KeywordReports",id:n})),{type:"KeywordReports",id:"LIST"}]:[{type:"KeywordReports",id:"LIST"}]}),listKeywordLists:e.query({query:()=>"/api/keyword-lists",providesTags:t=>t?[...t.map(({id:n})=>({type:"KeywordLists",id:n})),{type:"KeywordLists",id:"LIST"}]:[{type:"KeywordLists",id:"LIST"}]}),getKeywordList:e.query({query:t=>`/api/keyword-lists/${t}`,providesTags:(t,n,r)=>[{type:"KeywordLists",id:r}]}),createKeywordList:e.mutation({query:t=>({url:"/api/keyword-lists",method:"POST",body:t}),invalidatesTags:[{type:"KeywordLists",id:"LIST"}]}),deleteKeywordList:e.mutation({query:t=>({url:`/api/keyword-lists/${t}`,method:"DELETE"}),invalidatesTags:(t,n,r)=>[{type:"KeywordLists",id:r},{type:"KeywordLists",id:"LIST"}]}),addKeywordToList:e.mutation({query:({listId:t,...n})=>({url:`/api/keyword-lists/${t}/keywords`,method:"POST",body:n}),invalidatesTags:(t,n,{listId:r})=>[{type:"KeywordLists",id:r},{type:"KeywordLists",id:"LIST"}]}),removeKeywordFromList:e.mutation({query:({listId:t,keyword:n})=>({url:`/api/keyword-lists/${t}/keywords/${encodeURIComponent(n)}`,method:"DELETE"}),invalidatesTags:(t,n,{listId:r})=>[{type:"KeywordLists",id:r},{type:"KeywordLists",id:"LIST"}]}),getContentMap:e.query({query:()=>"/api/content-map",providesTags:["ContentMap"]}),updateContentMapName:e.mutation({query:({mapId:t,name:n})=>({url:`/api/content-map/${t}`,method:"PUT",body:{name:n}}),invalidatesTags:["ContentMap"]}),createContentMapNode:e.mutation({query:({mapId:t,...n})=>({url:`/api/content-map/${t}/nodes`,method:"POST",body:n}),invalidatesTags:["ContentMap"]}),updateContentMapNode:e.mutation({query:({mapId:t,nodeId:n,...r})=>({url:`/api/content-map/${t}/nodes/${n}`,method:"PUT",body:r}),invalidatesTags:["ContentMap"]}),batchUpdateContentMapNodePositions:e.mutation({query:({mapId:t,updates:n})=>({url:`/api/content-map/${t}/nodes/batch-position`,method:"PATCH",body:{updates:n}}),invalidatesTags:["ContentMap"]}),deleteContentMapNode:e.mutation({query:({mapId:t,nodeId:n})=>({url:`/api/content-map/${t}/nodes/${n}`,method:"DELETE"}),invalidatesTags:["ContentMap"]}),createContentMapEdge:e.mutation({query:({mapId:t,...n})=>({url:`/api/content-map/${t}/edges`,method:"POST",body:n}),invalidatesTags:["ContentMap"]}),deleteContentMapEdge:e.mutation({query:({mapId:t,edgeId:n})=>({url:`/api/content-map/${t}/edges/${n}`,method:"DELETE"}),invalidatesTags:["ContentMap"]}),createArticleFromContentMapNode:e.mutation({query:({mapId:t,nodeId:n})=>({url:`/api/content-map/${t}/nodes/${n}/create-article`,method:"POST"}),invalidatesTags:["ContentMap",{type:"Articles",id:"LIST"},{type:"ArticlePipeline",id:"STATUS"}],async onQueryStarted(t,{dispatch:n,queryFulfilled:r}){try{await r}catch{n(Yn.util.invalidateTags([{type:"ArticlePipeline",id:"STATUS"}]))}}}),startWebsiteAnalysis:e.mutation({query:t=>({url:"/api/website-analysis/start",method:"POST",body:t})}),getAnalysisStatus:e.query({query:t=>`/api/website-analysis/status/${t}`})})}),{useGetUserProfileQuery:UO,useCompleteOnboardingMutation:SCe,useGetUserArticlesQuery:lne,useGetArticleByIdQuery:cne,useGetArticlePipelineQuery:qO,useCreateArticleMutation:ECe,useUpdateArticleMutation:une,useMarkSectionSuggestionAsUsedMutation:kCe,usePublishArticleMutation:_Ce,useUpdateArticleWithPublishMutation:ACe,useRetryArticleMutation:dne,useDeleteArticleMutation:NCe,useGetAllIntegrationsQuery:jCe,useCreateGhostIntegrationMutation:fne,useUpdateGhostIntegrationMutation:TCe,useDeleteGhostIntegrationMutation:MCe,useGetGhostTagsQuery:A5,useGetGhostAuthorsQuery:WO,useSyncGhostIntegrationMutation:OCe,useSaveArticleSettingsMutation:RCe,useUpdateGhostPublishSettingsMutation:PCe,useGetSubscriptionQuery:hne,useCreateCheckoutSessionMutation:pne,useGetNotificationsQuery:DCe,useGetUsageSummaryQuery:ICe,useGenerateReportMutation:LCe,useGetReportQuery:$Ce,useListReportsQuery:zCe,useDeleteReportMutation:FCe,useListKeywordListsQuery:kv,useGetKeywordListQuery:BCe,useCreateKeywordListMutation:mne,useDeleteKeywordListMutation:HCe,useAddKeywordToListMutation:VCe,useRemoveKeywordFromListMutation:UCe,useGetContentMapQuery:qCe,useCreateContentMapNodeMutation:WCe,useUpdateContentMapNodeMutation:gne,useDeleteContentMapNodeMutation:yne,useCreateContentMapEdgeMutation:GCe,useDeleteContentMapEdgeMutation:KCe,useCreateArticleFromContentMapNodeMutation:YCe,useStartWebsiteAnalysisMutation:XCe}=Yn,tH={id:null,email:null,name:null,isAuthenticated:!1,onboardingComplete:!1,profile:null},vne=yu({name:"user",initialState:tH,reducers:{setUser:(e,t)=>
73{e.id=t.payload.id,e.email=t.payload.email,e.name=t.payload.name||null,e.isAuthenticated=!0},setProfile:(e,t)=>{e.profile=t.payload,e.onboardingComplete=t.payload.onboardingComplete},clearUser:e=>tH}}),{setUser:wSt,setProfile:CSt,clearUser:SSt}=vne.actions,ZCe=vne.reducer,KN="sidebar_collapsed",QCe={isSidebarCollapsed:localStorage.getItem(KN)==="true",isMobileSidebarOpen:!1},bne=yu({name:"sidebar",initialState:QCe,reducers:{toggleSidebar:e=>{e.isSidebarCollapsed=!e.isSidebarCollapsed,localStorage.setItem(KN,String(e.isSidebarCollapsed))},toggleMobileSidebar:e=>{e.isMobileSidebarOpen=!e.isMobileSidebarOpen},closeMobileSidebar:e=>{e.isMobileSidebarOpen=!1},setSidebarCollapsed:(e,t)=>{e.isSidebarCollapsed=t.payload,localStorage.setItem(KN,String(t.payload))}}}),{toggleSidebar:JCe,toggleMobileSidebar:eSe,closeMobileSidebar:tSe,setSidebarCollapsed:ESt}=bne.actions,nSe=bne.reducer,xne=y3e({reducer:{[jf.reducerPath]:jf.reducer,[Yn.reducerPath]:Yn.reducer,user:ZCe,sidebar:nSe},middleware:e=>e().concat(jf.middleware,Yn.middleware)});U3e(xne.dispatch);function nH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function N5(...e){return t=>{let n=!1;const r=e.map(i=>{const o=nH(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():nH(e[i],null)}}}}function _v(...e){return x.useCallback(N5(...e),e)}var rSe=Symbol.for("react.lazy"),$w=xi[" use ".trim().toString()];function iSe(e){return typeof e=="object"&&e!==null&&"then"in e}function wne(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===rSe&&"_payload"in e&&iSe(e._payload)}function Cne(e){const t=oSe(e),n=x.forwardRef((r,i)=>{let{children:o,...s}=r;wne(o)&&typeof $w=="function"&&(o=$w(o._payload));const a=x.Children.toArray(o),l=a.find(aSe);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}var Ei=Cne("Slot");function oSe(e){const t=x.forwardRef((n,r)=>{let{children:i,...o}=n;if(wne(i)&&typeof $w=="function"&&(i=$w(i._payload)),x.isValidElement(i)){const s=cSe(i),a=lSe(o,i.props);return i.type!==x.Fragment&&(a.ref=r?N5(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Sne=Symbol("radix.slottable");function sSe(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Sne,t}var GO=sSe("Slottable");function aSe(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Sne}function lSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function cSe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],dSe=uSe.reduce((e,t)=>{const n=Cne(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fSe="Label",Ene=x.forwardRef((e,t)=>u.jsx(dSe.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ene.displayName=fSe;var KO=Ene;const Pi=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M11 11V5H13V11H19V13H13V19H11V13H5V11H11Z"})),hSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 16L6 10H18L12 16Z"})),kne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M11.9999 13.1714L16.9497 8.22168L18.3639 9.63589L11.9999 15.9999L5.63599 9.63589L7.0502 8.22168L11.9999 13.1714Z"})),Qs=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M10.8284 12.0007L15.7782 16.9504L14.364 18.3646L8 12.0007L14.364 5.63672L15.7782 7.05093L10.8284 12.0007Z"})),im=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})),pSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M11.9498 7.94975L10.5356 9.36396L8.00079 6.828L8.00004 20H6.00004L6.00079 6.828L3.46451 9.36396L2.05029 7.94975L7.00004 3L11.9498 7.94975ZM21.9498 16.0503L17 21L12.0503 16.0503L13.4645 14.636L16.0008 17.172L16 4H18
73L18.0008 17.172L20.5356 14.636L21.9498 16.0503Z"})),mSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 8L18 14H6L12 8Z"})),gSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M11.9999 10.8284L7.0502 15.7782L5.63599 14.364L11.9999 8L18.3639 14.364L16.9497 15.7782L11.9999 10.8284Z"})),Q1=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM7 6H11V10H7V6ZM7 12H17V14H7V12ZM7 16H17V18H7V16ZM13 7H17V9H13V7Z"})),ySe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M5 2H19C19.5523 2 20 2.44772 20 3V22.1433C20 22.4194 19.7761 22.6434 19.5 22.6434C19.4061 22.6434 19.314 22.6168 19.2344 22.5669L12 18.0313L4.76559 22.5669C4.53163 22.7136 4.22306 22.6429 4.07637 22.4089C4.02647 22.3293 4 22.2373 4 22.1433V3C4 2.44772 4.44772 2 5 2ZM18 4H6V19.4324L12 15.6707L18 19.4324V4Z"})),zw=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M9.9997 15.1709L19.1921 5.97852L20.6063 7.39273L9.9997 17.9993L3.63574 11.6354L5.04996 10.2212L9.9997 15.1709Z"})),_ne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.4571 9.45711L11 15.9142L6.79289 11.7071L8.20711 10.2929L11 13.0858L16.0429 8.04289L17.4571 9.45711Z"})),vSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2ZM17.4571 9.45711L16.0429 8.04289L11 13.0858L8.20711 10.2929L6.79289 11.7071L11 15.9142L17.4571 9.45711Z"})),bSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"})),Hf=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M11.9997 10.5865L16.9495 5.63672L18.3637 7.05093L13.4139 12.0007L18.3637 16.9504L16.9495 18.3646L11.9997 13.4149L7.04996 18.3646L5.63574 16.9504L10.5855 12.0007L5.63574 7.05093L7.04996 5.63672L11.9997 10.5865Z"})),Bs=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2
7317 2.44772 17 3V6ZM18 8H6V20H18V8ZM13.4142 13.9997L15.182 15.7675L13.7678 17.1817L12 15.4139L10.2322 17.1817L8.81802 15.7675L10.5858 13.9997L8.81802 12.232L10.2322 10.8178L12 12.5855L13.7678 10.8178L15.182 12.232L13.4142 13.9997ZM9 4V6H15V4H9Z"})),YN=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M17 6H22V8H20V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V8H2V6H7V3C7 2.44772 7.44772 2 8 2H16C16.5523 2 17 2.44772 17 3V6ZM18 8H6V20H18V8ZM9 11H11V17H9V11ZM13 11H15V17H13V11ZM9 4V6H15V4H9Z"})),xSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M13 10H18L12 16L6 10H11V3H13V10ZM4 19H20V12H22V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V12H4V19Z"})),wSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M6.41421 15.89L16.5563 5.74785L15.1421 4.33363L5 14.4758V15.89H6.41421ZM7.24264 17.89H3V13.6473L14.435 2.21231C14.8256 1.82179 15.4587 1.82179 15.8492 2.21231L18.6777 5.04074C19.0682 5.43126 19.0682 6.06443 18.6777 6.45495L7.24264 17.89ZM3 19.89H21V21.89H3V19.89Z"})),Ane=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12.0003 3C17.3924 3 21.8784 6.87976 22.8189 12C21.8784 17.1202 17.3924 21 12.0003 21C6.60812 21 2.12215 17.1202 1.18164 12C2.12215 6.87976 6.60812 3 12.0003 3ZM12.0003 19C16.2359 19 19.8603 16.052 20.7777 12C19.8603 7.94803 16.2359 5 12.0003 5C7.7646 5 4.14022 7.94803 3.22278 12C4.14022 16.052 7.7646 19 12.0003 19ZM12.0003 16.5C9.51498 16.5 7.50026 14.4853 7.50026 12C7.50026 9.51472 9.51498 7.5 12.0003 7.5C14.4855 7.5 16.5003 9.51472 16.5003 12C16.5003 14.4853 14.4855 16.5 12.0003 16.5ZM12.0003 14.5C13.381 14.5 14.5003 13.3807 14.5003 12C14.5003 10.6193 13.381 9.5 12.0003 9.5C10.6196 9.5 9.50026 10.6193 9.50026 12C9.50026 13.3807 10.6196 14.5 12.0003 14.5Z"})),Nne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M17.8827 19.2968C16.1814 20.3755 14.1638 21.0002 12.0003 21.0002C6.60812 21.0002 2.12215 17.1204 1.18164 12.0002C1.61832 9.62282 2.81932 7.5129 4.52047 5.93457L1.39366 2.80777L2.80788 1.39355L22.6069 21.1925L21.1927 22.6068L17.8827 19.2968ZM5.9356 7.3497C4.60673 8.56015 3.6378 10.1672 3.22278 12.0002C4.14022 16.0521 7.7646 19.0002 12.0003 19.0002C13.5997 19.0002 15.112 18.5798 16.4243 17.8384L14.396 15.8101C13.7023 16.2472 12.8808 16.5002 12.0003 16.5002C9.51498 16.5002 7.50026 14.4854 7.50026 12.0002C7.50026 11.1196 7.75317 10.2981 8.19031 9.60442L5.9356 7.3497ZM12.9139 14.328L9.67246 11.0866C9.5613 11.3696 9.50026 11.6777 9.50026 12.0002C9.50026 13.3809 10.6196 14.5002 12.0003 14.5002C12.3227 14.5002 12.6309 14.4391 12.9139 14.328ZM20.8068 16.5925L19.376 15.1617C20.0319 14.2268 20.5154 13.1586 20.7777 12.0002C19.8603 7.94818 16.2359 5.00016 12.0003 5.00016C11.1544 5.00016 10.3329 5.11773 9.55249 5.33818L7.97446 3.76015C9.22127 3.26959 10.5793 3.00016 12.0003 3.00016C17.3924 3.00016 21.8784 6.87992 22.8189 12.0002C22.5067 13.6998 21.8038 15.2628 20.8068 16.5925ZM11.7229 7.50857C11.8146 7.50299 11.9071 7.50016 12.0003 7.50016C14.4855 7.50016 16.5003 9.51488 16.5003 12.0002C16.5003 12.0933 16.4974 12.1858 16.4919 12.2775L11.7229 7.50857Z"})),CSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M19 22H5C3.34315 22 2 20.6569 2 19V3C2 2.44772 2.44772 2 3 2H17C17.5523 2
7318 2.44772 18 3V15H22V19C22 20.6569 20.6569 22 19 22ZM18 17V19C18 19.5523 18.4477 20 19 20C19.5523 20 20 19.5523 20 19V17H18ZM16 20V4H4V19C4 19.5523 4.44772 20 5 20H16ZM6 7H14V9H6V7ZM6 11H14V13H6V11ZM6 15H11V17H6V15Z"})),rH=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M10 18H14V16H10V18ZM3 6V8H21V6H3ZM6 13H18V11H6V13Z"})),iw=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM9.71002 19.6674C8.74743 17.6259 8.15732 15.3742 8.02731 13H4.06189C4.458 16.1765 6.71639 18.7747 9.71002 19.6674ZM10.0307 13C10.1811 15.4388 10.8778 17.7297 12 19.752C13.1222 17.7297 13.8189 15.4388 13.9693 13H10.0307ZM19.9381 13H15.9727C15.8427 15.3742 15.2526 17.6259 14.29 19.6674C17.2836 18.7747 19.542 16.1765 19.9381 13ZM4.06189 11H8.02731C8.15732 8.62577 8.74743 6.37407 9.71002 4.33256C6.71639 5.22533 4.458 7.8235 4.06189 11ZM10.0307 11H13.9693C13.8189 8.56122 13.1222 6.27025 12 4.24799C10.8778 6.27025 10.1811 8.56122 10.0307 11ZM14.29 4.33256C15.2526 6.37407 15.8427 8.62577 15.9727 11H19.9381C19.542 7.8235 17.2836 5.22533 14.29 4.33256Z"})),jne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M2 22C2 17.5817 5.58172 14 10 14C14.4183 14 18 17.5817 18 22H16C16 18.6863 13.3137 16 10 16C6.68629 16 4 18.6863 4 22H2ZM10 13C6.685 13 4 10.315 4 7C4 3.685 6.685 1 10 1C13.315 1 16 3.685 16 7C16 10.315 13.315 13 10 13ZM10 11C12.21 11 14 9.21 14 7C14 4.79 12.21 3 10 3C7.79 3 6 4.79 6 7C6 9.21 7.79 11 10 11ZM18.2837 14.7028C21.0644 15.9561 23 18.752 23 22H21C21 19.564 19.5483 17.4671 17.4628 16.5271L18.2837 14.7028ZM17.5962 3.41321C19.5944 4.23703 21 6.20361 21 8.5C21 11.3702 18.8042 13.7252 16 13.9776V11.9646C17.6967 11.7222 19 10.264 19 8.5C19 7.11935 18.2016 5.92603 17.041 5.35635L17.5962 3.41321Z"})),SSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M2.9918 21C2.44405 21 2 20.5551 2 20.0066V3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918ZM20 15V5H4V19L14 9L20 15ZM20 17.8284L14 11.8284L6.82843 19H20V17.8284ZM8 11C6.89543 11 6 10.1046 6 9C6 7.89543 6.89543 7 8 7C9.10457 7 10 7.89543 10 9C10 10.1046 9.10457 11 8 11Z"})),Tne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 7H13V9H11V7ZM11 11H13V17H11V11Z"})),Mne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M13.0607 8.11097L14.4749 9.52518C17.2086 12.2589 17.2086 16.691 14.4749 19.4247L14.1214 19.7782C11.3877 22.5119 6.95555 22.5119 4.22188 19.7782C1.48821 17.0446 1.48821 12.6124 4.22188 9.87874L5.6361 11.293C3.68348 13.2456 3.68348 16.4114 5.6361 18.364C7.58872 20.3166 10.7545 20.3166 12.7072 18.364L13.0607 18.0105C15.0133 16.0578 15.0133 12.892 13.0607 10.9394L11.6465 9.52518L13.0607 8.11097ZM19.7782 14.1214L18.364 12.7072C20.3166 10.7545 20.3166 7.58872 18.364 5.6361C16.4114 3.68348 13.2456 3.68348 11.293 5.6361L10.9394 5.98965C8.98678 7.94227 8.98678 11.1081 10.9394 13.0607L12.3536 14.4749L10.9394 15.8891L9.52518 14.4749C6.79151 11.7413 6.79151 7.30911 9.52518 4.57544L9.87874 4.22188C12.6124 1.48821 17.0446 1.48821 19.7782 4.22188C22.5119 6.95555 22.5119 11.3877 19.7782 14.1214Z"})),YO=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M18.364 5.63604L16.9497 7.05025C15.683 5.7835 13.933 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12H21C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C14.4853 3 16.7353 4.00736 18.364 5.63604Z"})),One=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M6 8V7C6 3.68629 8.68629 1 12 1C15.3137 1 18 3.68629 18 7V8H20C20.5523 8 21 8.44772 21 9V21C21 21.5523 20.5523 22 20 22H4C3.44772 22 3 21.5523 3 21V9C3 8.44772 3.44772 8 4 8H6ZM19 10H5V20H19V10ZM11 15.7324C10.4022 15.3866 10 14.7403 10 14C10 12.8954 10.8954 12 12 12C13.1046 12 14 12.8954 14 14C14 14.7403 13.5978 15.3866 13 15.7324V18H11V15.7324ZM8 8H16V7C16 4.79086 14.2091 3 12 3C9.79086 3 8 4.79086 8 7V8Z"})),ESe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M4 18H6V20H18V4H6V6H4V3C4 2.44772 4.44772 2 5 2H19C19.5523 2 20 2.44772 20 3V21C20 21.5523 19.5523 22 19 22H5C4.44772 22 4 21.5523 4 21V18ZM6 11H13V13H6V16L1 12L6 8V11Z"})),XO=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM20 7.23792L12.0718 14.338L4 7.21594V19H20V7.23792ZM4.51146 5L12.0619 11.662L19.501 5H4.51146Z"})),kSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M18 3C19.6569 3 21 4.34315 21 6C21 7.65685 19.6569 9 18 9H15C13.6941 9 12.5831 8.16562 12.171 7.0009L11 7C9.9 7 9 7.9 9 9L9.0009 9.17102C10.1656 9.58312 11 10.6941 11 12C11 13.3059 10.1656 14.4169 9.0009 14.829L9 15C9 16.1 9.9 17 11 17L12.1707 17.0001C12.5825 15.8349 13.6937 15 15 15H18C19.6569 15 21 16.3431 21 18C21 19.6569 19.6569 21 18 21H15C13.6941 21 12.5831 20.1656 12.171 19.0009L11 19C8.79 19 7 17.21 7 15H5C3.34315 15 2 13.6569 2 12C2 10.3431 3.34315 9 5 9H7C7 6.79086 8.79086 5 11 5L12.1707 5.00009C12.5825 3.83485 13.6937 3 15 3H18ZM18 17H15C14.4477 17 14 17.4477 14 18C14 18.5523 14.4477 19 15 19H18C18.5523 19 19 18.5523 19 18C19 17.4477 18.5523 17 18 17Z
73M8 11H5C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13H8C8.55228 13 9 12.5523 9 12C9 11.4477 8.55228 11 8 11ZM18 5H15C14.4477 5 14 5.44772 14 6C14 6.55228 14.4477 7 15 7H18C18.5523 7 19 6.55228 19 6C19 5.44772 18.5523 5 18 5Z"})),Av=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 3C11.175 3 10.5 3.675 10.5 4.5C10.5 5.325 11.175 6 12 6C12.825 6 13.5 5.325 13.5 4.5C13.5 3.675 12.825 3 12 3ZM12 18C11.175 18 10.5 18.675 10.5 19.5C10.5 20.325 11.175 21 12 21C12.825 21 13.5 20.325 13.5 19.5C13.5 18.675 12.825 18 12 18ZM12 10.5C11.175 10.5 10.5 11.175 10.5 12C10.5 12.825 11.175 13.5 12 13.5C12.825 13.5 13.5 12.825 13.5 12C13.5 11.175 12.825 10.5 12 10.5Z"})),XN=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M10 2C10.5523 2 11 2.44772 11 3V7C11 7.55228 10.5523 8 10 8H8V10H13V9C13 8.44772 13.4477 8 14 8H20C20.5523 8 21 8.44772 21 9V13C21 13.5523 20.5523 14 20 14H14C13.4477 14 13 13.5523 13 13V12H8V18H13V17C13 16.4477 13.4477 16 14 16H20C20.5523 16 21 16.4477 21 17V21C21 21.5523 20.5523 22 20 22H14C13.4477 22 13 21.5523 13 21V20H7C6.44772 20 6 19.5523 6 19V8H4C3.44772 8 3 7.55228 3 7V3C3 2.44772 3.44772 2 4 2H10ZM19 18H15V20H19V18ZM19 10H15V12H19V10ZM9 4H5V6H9V4Z"})),_Se=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M15.7279 9.57627L14.3137 8.16206L5 17.4758V18.89H6.41421L15.7279 9.57627ZM17.1421 8.16206L18.5563 6.74785L17.1421 5.33363L15.7279 6.74785L17.1421 8.16206ZM7.24264 20.89H3V16.6473L16.435 3.21231C16.8256 2.82179 17.4587 2.82179 17.8492 3.21231L20.6777 6.04074C21.0682 6.43126 21.0682 7.06443 20.6777 7.45495L7.24264 20.89Z"})),ASe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M13 18V20H19V22H13C11.8954 22 11 21.1046 11 20V18H8C5.79086 18 4 16.2091 4 14V7C4 6.44772 4.44772 6 5 6H8V2H10V6H14V2H16V6H19C19.5523 6 20 6.44772 20 7V14C20 16.2091 18.2091 18 16 18H13ZM8 16H16C17.1046 16 18 15.1046 18 14V11H6V14C6 15.1046 6.89543 16 8 16ZM18 8H6V9H18V8ZM12 14.5C11.4477 14.5 11 14.0523 11 13.5C11 12.9477 11.4477 12.5 12 12.5C12.5523 12.5 13 12.9477 13 13.5C13 14.0523 12.5523 14.5 12 14.5Z"})),Rne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20ZM11 15H13V17H11V15ZM13 13.3551V14H11V12.5C11 11.9477 11.4477 11.5 12 11.5C12.8284 11.5 13.5 10.8284 13.5 10C13.5 9.17157 12.8284 8.5 12 8.5C11.2723 8.5 10.6656 9.01823 10.5288 9.70577L8.56731 9.31346C8.88637 7.70919 10.302 6.5 12 6.5C13.933 6.5 15.5 8.067 15.5 10C15.5 11.5855 14.4457 12.9248 13 13.3551Z"})),NSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M5.46257 4.43262C7.21556 2.91688 9.5007 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C9.84982 4 7.89777 4.84827 6.46023 6.22842L5.46257 4.43262ZM18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 9.86386 2.66979 7.88416 3.8108 6.25944L7 12H4C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z"})),Pne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M18.5374 19.5674C16.7844 21.0831 14.4993 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 14.1361 21.3302 16.1158 20.1892 17.7406L17 12H20C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C14.1502 20 16.1022 19.1517 17.5398 17.7716L18.5374 19.5674Z"})),ZN=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M11 2C15.968 2 20 6.032 20 11C20 15.968 15.968 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2ZM11 18C14.8675 18 18 14.8675 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18ZM19.4853 18.0711L22.3137 20.8995L20.8995 22.3137L18.0711 19.4853L19.4853 18.0711Z"})),Dne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M18.031 16.6168L22.3137 20.8995L20.8995 22.3137L16.6168 18.031C15.0769 19.263 13.124 20 11 20C6.032 20 2 15.968 2 11C2 6.032 6.032 2 11 2C15.968 2 20 6.032 20 11C20 13.124 19.263 15.0769 18.031 16.6168ZM16.0247 15.8748C17.2475 14.6146 18 12.8956 18 11C18 7.1325 14.8675 4 11 4C7.1325 4 4 7.1325 4 11C4 14.8675 7.1325 18 11 18C12.8956 18 14.6146 17.2475 15.8748 16.0247L16.0247 15.8748Z"})),jSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M3 3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3ZM8 5H4V19H8V5ZM10 5V19H20V5H10Z"})),Ine=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M20 4V16H23L19 21L15 16H18V4H20ZM12 18V20H3V18H12ZM14 11V13H3V11H14ZM14 4V6H3V4H14Z"})),QN=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M4 22C4 17.5817 7.58172 14 12 14C16.4183 14 20 17.5817 20 22H18C18 18.6863 15.3137 16 12 16C8.68629 16 6 18.6863 6 22H4ZM12 13C8.685 13 6 10.315 6 7C6 3.685 8.685 1 12 1C15.315 1 18 3.685 18 7C18 10.315 15.315 13 12 13ZM12 11C14.21 11 16 9.21 16 7C16 4.79 14.21 3 12 3C9.79 3 8 4.79 8 7C8 9.21 9.79 11 12 11Z"})),Lne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M4.83582 12L11.0429 18.2071L12.4571 16.7929L7.66424 12L12.4571 7.20712L11.0429 5.79291L4.83582 12ZM10.4857 12L16.6928 18.2071L18.107 16.7929L13.3141 12L18.107 7.20712L16.6928 5.79291L10.4857 12Z"})),$ne=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M19.1642 12L12.9571 5.79291L11.5429 7.20712L16.3358 12L11.5429 16.7929L12.9571 18.2071L19.1642 12ZM13.5143 12L7.30722 5.79291L5.89301 7.20712L10.6859 12L5.89301 16.7929L7.30722 18.2071L13.5143 12Z"})),TSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M18 9 12 3 6 9H18ZM18 15 12 21 6 15H18Z"})),MSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M14 4.4375C15.3462 4.4375 16.4375 3.34619 16.4375 2H17.5625C17.5625 3.34619 18.6538 4.4375 20 4.4375V5.5625C18.6538 5.5625 17.5625 6.65381 17.5625 8H16.4375C16.4375 6.65381 15.3462 5.5625 14 5.5625V4.4375ZM1 11C4.31371 11 7 8.31371 7 5H9C9 8.31371 11.6863 11 15 11V13C11.6863 13 9 15.6863 9 19H7C7 15.6863 4.31371 13 1 13V11ZM4.87601 12C6.18717 12.7276 7.27243 13.8128 8 15.124 8.72757 13.8128 9.81283 12.7276 11.124 12 9.81283 11.2724 8.72757 10.1872 8 8.87601 7.27243 10.1872 6.18717 11.2724 4.87601 12ZM17.25 14C17.25 15.7949 15.7949 17.25 14 17.25V18.75C15.7949 18.75 17.25 20.2051 17.25 22H18.75C18.75 20.2051 20.2051 18.75 22 18.75V17.25C20.2051 17.25 18.75 15.7949 18.75 14H17.25Z"})),OSe=({color:e="currentColor",size:t=24,className:n,...r})=>K.createElement("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:t,height:t,fill:e,...r,className:"remixicon "+(n||"")},K.createElement("path",{d:"M22 12C22 17.5228 17.5229 22 12 22C6.4772 22 2 17.5228 2 12C2 6.47715 6.4772 2 12 2V4C7.5817 4 4 7.58172 4 12C4 16.4183 7.5817 20 12 20C16.4183 20 20 16.4183 20 12C20 9.25022 18.6127 6.82447 16.4998 5.38451L16.5 8H14.5V2L20.5 2V4L18.0008 3.99989C20.4293 5.82434 22 8.72873 22 12Z"})),Nv=e=>u.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[u.jsx("path",{d:"M31.9998 7.77651L24.2847 10.2299L11.562 14.2822L8.54323 10.3929L6.64702 7.94829C5.69262 6.71939 4.12016 6.21726 2.67383 6.67535L10.3511 4.23076C10.3553 4.23076 10.3637 4.22636 10.368 4.22636L17.8182 1.85225L23.1074 0.169671C24.5537 -0.292818 26.1262 0.209312 27.0806 1.44262L31.9998 7.77651Z",fill:"url(#paint0_linear)"}),u.jsx("path",{d:"M29.2713 25.3378L21.6655 27.7604L21.6276 27.7736L14.19 30.1433L8.88819 31.8303C7.43765 32.2928 5.8694 31.7907 4.91499 30.5574L0 24.2191L7.72356 21.7613L20.4378 17.7134L23.4356 21.5763L25.357 24.0473C26.2988 25.263 27.8376 25.7651 29.2713 25.3378Z",fill:"url(#paint1_linear)"}),u.jsx("path",{d:"M29.3387 25.3159L29.3261 25.3203C29.3051 25.3247 29.2883 25.3335 29.2673 25.3379C27.8336 25.7652 26.2905 25.2631 25.3529 24.0474L23.4315 21.5764L23.3979 21.5323L20.4337 17.7135L7.72372 21.7614L0.85787 12.8639C0.29027 12.1284 0.0253906 11.2695 0.0253906 10.4238C0.0253906 8.78964 1.00503 7.20837 2.66998 6.67541C4.11631 6.21292 5.68877 6.71505 6.64318 7.94835L8.37961 10.1815L8.54359 10.3929L11.5624 14.2822L24.2892 10.23L31.1551 19.1274C32.8158 21.2812 31.8656 24.5099 29.3387 25.3159Z",fill:"url(#paint2_linear)"}),u.jsx("path",{opacity:"0.16",d:"M8.37541 10.1815L0.85787 12.8639C0.290271 12.1284 0.0253906 11.2695 0.0253906 10.4238C0.0253906 8.78964 1.00503 7.20837 2.66998 6.67541C4.11631 6.21292 5.68877 6.71505 6.64318 7.94835L8.37541 10.1815ZM29.3388 25.3159L29.3261 25.3203C29.3051 25.3247 29.2883 25.3335 29.2673 25.3379C27.8336 25.7652 26.2905 25.2631 25.3529 24.0474L23.4315 21.5764L23.3979 21.5323L31.1509 19.1318C32.8158 21.2812 31.8656 24.5099 29.3388 25.3159Z",fill:"black"}),u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"paint0_linear",x1:"2.75035",y1:"6.26748",x2:"32.2236",y2:"7.81563",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"#76FFF9"}),u.jsx("stop",{offset:"1",stopColor:"#E969FF"})]}),u.jsxs("linearGradient",{id:"paint1_linear",x1:"30.1127",y1:"26.2358",x2:"0.126379",y2:"23.8861",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"#76FFF9"}),u.jsx("stop",{offset:"1",stopColor:"#E969FF"})]}),u.jsxs("linearGradient",{id:"paint2_linear",x1:"16.0053",y1:"-10.079",x2:"16.0053",y2:"36.0593",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"#9250FF"}),u.jsx("stop",{offset:"1",stopColor:"#7C00BA"})]})]})]});function j5(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,RSe(i,...t)]}function RSe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c}
vendor: 10,111 bytes, line 73
73)=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function za(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var PSe=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},DSe=xi[" useInsertionEffect ".trim().toString()]||PSe;function T5({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=ISe({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=x.useCallback(d=>{var f;if(a){const p=LSe(d)?d(e):d;p!==e&&((f=s.current)==null||f.call(s,p))}else o(d)},[a,e,o,s]);return[l,c]}function ISe({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return DSe(()=>{o.current=t},[t]),x.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function LSe(e){return typeof e=="function"}function zne(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var $Se=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function Fne(e){const[t,n]=x.useState(void 0);return $Se(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var iH=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function zSe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var ZO=e=>{const{present:t,children:n}=e,r=FSe(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=_v(r.ref,BSe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};ZO.displayName="Presence";function FSe(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=zSe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Wx(r.current);o.current=a==="mounted"?c:"none"},[a]),iH(()=>{const c=r.current,d=i.current;if(d!==e){const p=o.current,m=Wx(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),iH(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const v=Wx(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=m=>{m.target===t&&(o.current=Wx(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Wx(e){return(e==null?void 0:e.animationName)||"none"}function BSe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function HSe(e){const t=VSe(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find(qSe);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function VSe(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=GSe(i),a=WSe(o,i.props);return i.type!==x.Fragment&&(a.ref=r?N5(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var USe=Symbol("radix.slottable");function qSe(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===USe}function WSe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function GSe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var KSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Za=KSe.reduce((e,t)=>{const n=HSe(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),M5="Checkbox",[YSe,kSt]=j5(M5),[XSe,QO]=YSe(M5);function ZSe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:o,form:s,name:a,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:f}=e,[p,m]=T5({prop:n,defaultProp:i??!1,onChange:l,caller:M5}),[y,v]=x.useState(null),[b,C]=x.useState(null),S=x.useRef(!1),E=y?!!s||!!y.closest("form"):!0,A={checked:p,disabled:o,setChecked:m,control:y,setControl:v,name:a,form:s,value:d,hasConsumerStoppedPropagationRef:S,required:c,defaultChecked:Fu(i)?!1:i,isFormControl:E,bubbleInput:b,setBubbleInput:C};return u.jsx(XSe,{scope:t,...A,children:QSe(f)?f(A):r})}var Bne="CheckboxTrigger",Hne=x.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:o,value:s,disabled:a,checked:l,required:c,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:y}=QO(Bne,e),v=_v(i,d),b=x.useRef(l);return x.useEffect(()=>{const C=o==null?void 0:o.form;if(C){const S=()=>f(b.current);return C.addEventListener("reset",S),()=>C.removeEventListener("reset",S)}},[o,f]),u.jsx(Za.button,{type:"button",role:"checkbox","aria-checked":Fu(l)?"mixed":l,"aria-required":c,"data-state":Gne(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:v,onKeyDown:za(t,C=>{C.key==="Enter"&&C.preventDefault()}),onClick:za(n,C=>{f(S=>Fu(S)?!0:!S),y&&m&&(p.current=C.isPropagationStopped(),p.current||C.stopPropagation())})})});Hne.displayName=Bne;var JO=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:l,onCheckedChange:c,form:d,...f}=e;return u.jsx(ZSe,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:a,required:s,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:p})=>u.jsxs(u.Fragment,{children:[u.jsx(Hne,{...f,ref:t,__scopeCheckbox:n}),p&&u.jsx(Wne,{__scopeCheckbox:n})]})})});JO.displayName=M5;var Vne="CheckboxIndicator",Une=x.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=QO(Vne,n);return u.jsx(ZO,{present:r||Fu(o.checked)||o.checked===!0,children:u.jsx(Za.span,{"data-state":Gne(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Une.displayName=Vne;var qne="CheckboxBubbleInput",Wne=x.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:s,required:a,disabled:l,name:c,value:d,form:f,bubbleInput:p,setBubbleInput:m}=QO(qne,e),y=_v(n,m),v=zne(o),b=Fne(r);x.useEffect(()=>{const S=p;if(!S)return;const E=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(E,"checked").set,N=!i.current;if(v!==o&&_){const j=new Event("click",{bubbles:N});S.indeterminate=Fu(o),_.call(S,Fu(o)?!1:o),S.dispatchEvent(j)}},[p,v,o,i]);const C=x.useRef(Fu(o)?!1:o);return u.jsx(Za.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??C.current,required:a,disabled:l,name:c,value:d,form:f,...t,tabIndex:-1,ref:y,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Wne.displayName=qne;function QSe(e){return typeof e=="function"}function Fu(e){return e==="indeterminate"}function Gne(e){return Fu(e)?"indeterminate":e?"checked":"unchecked"}function Kne(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Kne(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kne(e))&&(r&&(r+=" "),r+=t);return r}const JSe=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},e6e=(e,t)=>({classGroupId:e,validator:t}),Yne=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Fw="-",oH=[],t6e="arbitrary..",n6e=e=>{const t=i6e(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return r6e(s);const a=s.split(Fw),l=a[0]===""&&a.length>1?1:0;return Xne(a,l,t)},getConflictingClassGroupIds:(s,a)=>
vendor: 8,907 bytes, line 73
73{if(a){const l=r[s],c=n[s];return l?c?JSe(c,l):l:c||oH}return n[s]||oH}}},Xne=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const c=Xne(e,t+1,o);if(c)return c}const s=n.validators;if(s===null)return;const a=t===0?e.join(Fw):e.slice(t).join(Fw),l=s.length;for(let c=0;c<l;c++){const d=s[c];if(d.validator(a))return d.classGroupId}},r6e=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?t6e+r:void 0})(),i6e=e=>{const{theme:t,classGroups:n}=e;return o6e(n,t)},o6e=(e,t)=>{const n=Yne();for(const r in e){const i=e[r];eR(i,n,r,t)}return n},eR=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const s=e[o];s6e(s,t,n,r)}},s6e=(e,t,n,r)=>{if(typeof e=="string"){a6e(e,t,n);return}if(typeof e=="function"){l6e(e,t,n,r);return}c6e(e,t,n,r)},a6e=(e,t,n)=>{const r=e===""?t:Zne(t,e);r.classGroupId=n},l6e=(e,t,n,r)=>{if(u6e(e)){eR(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(e6e(n,e))},c6e=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let s=0;s<o;s++){const[a,l]=i[s];eR(l,Zne(t,a),n,r)}},Zne=(e,t)=>{let n=e;const r=t.split(Fw),i=r.length;for(let o=0;o<i;o++){const s=r[o];let a=n.nextPart.get(s);a||(a=Yne(),n.nextPart.set(s,a)),n=a}return n},u6e=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,d6e=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,s)=>{n[o]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let s=n[o];if(s!==void 0)return s;if((s=r[o])!==void 0)return i(o,s),s},set(o,s){o in n?n[o]=s:i(o,s)}}},JN="!",sH=":",f6e=[],aH=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),h6e=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let s=0,a=0,l=0,c;const d=i.length;for(let v=0;v<d;v++){const b=i[v];if(s===0&&a===0){if(b===sH){o.push(i.slice(l,v)),l=v+1;continue}if(b==="/"){c=v;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const f=o.length===0?i:i.slice(l);let p=f,m=!1;f.endsWith(JN)?(p=f.slice(0,-1),m=!0):f.startsWith(JN)&&(p=f.slice(1),m=!0);const y=c&&c>l?c-l:void 0;return aH(o,m,p,y)};if(t){const i=t+sH,o=r;r=s=>s.startsWith(i)?o(s.slice(i.length)):aH(f6e,!1,s,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},p6e=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const s=n[o],a=s[0]==="[",l=t.has(s);a||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},m6e=e=>({cache:d6e(e.cacheSize),parseClassName:h6e(e),sortModifiers:p6e(e),...n6e(e)}),g6e=/\s+/,y6e=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],a=e.trim().split(g6e);let l="";for(let c=a.length-1;c>=0;c-=1){const d=a[c],{isExternal:f,modifiers:p,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:v}=n(d);if(f){l=d+(l.length>0?" "+l:l);continue}let b=!!v,C=r(b?y.substring(0,v):y);if(!C){if(!b){l=d+(l.length>0?" "+l:l);continue}if(C=r(y),!C){l=d+(l.length>0?" "+l:l);continue}b=!1}const S=p.length===0?"":p.length===1?p[0]:o(p).join(":"),E=m?S+JN:S,A=E+C;if(s.indexOf(A)>-1)continue;s.push(A);const _=i(C,b);for(let N=0;N<_.length;++N){const j=_[N];s.push(E+j)}l=d+(l.length>0?" "+l:l)}return l},v6e=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Qne(n))&&(i&&(i+=" "),i+=r);return i},Qne=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Qne(e[r]))&&(n&&(n+=" "),n+=t);return n},ej=(e,...t)=>{let n,r,i,o;const s=l=>{const c=t.reduce((d,f)=>f(d),e());return n=m6e(c),r=n.cache.get,i=n.cache.set,o=a,a(l)},a=l=>{const c=r(l);if(c)return c;const d=y6e(l,n);return i(l,d),d};return o=s,(...l)=>o(v6e(...l))},b6e=[],Er=e=>{const t=n=>n[e]||b6e;return t.isThemeGetter=!0,t},Jne=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ere=/^\((?:(\w[\w-]*):)?(.+)\)$/i,x6e=/^\d+\/\d+$/,w6e=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C6e=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,S6e=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,E6e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,k6e=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,up=e=>x6e.test(e),St=e=>!!e&&!Number.isNaN(Number(e)),iu=e=>!!e&&Number.isInteger(Number(e)),b7=e=>e.endsWith("%")&&St(e.slice(0,-1)),Ml=e=>w6e.test(e),_6e=()=>!0,A6e=e=>C6e.test(e)&&!S6e.test(e),tre=()=>!1,N6e=e=>E6e.test(e),j6e=e=>k6e.test(e),T6e=e=>!He(e)&&!Ve(e),M6e=e=>om(e,ire,tre),He=e=>Jne.test(e),nf=e=>om(e,ore,A6e),x7=e=>om(e,I6e,St),lH=e=>om(e,nre,tre),O6e=e=>om(e,rre,j6e),Gx=e=>om(e,sre,N6e),Ve=e=>ere.test(e),jg=e=>sm(e,ore),R6e=e=>sm(e,L6e),cH=e=>sm(e,nre),P6e=e=>sm(e,ire),D6e=e=>sm(e,rre),Kx=e=>sm(e,sre,!0),om=(e,t,n)=>{const r=Jne.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},sm=(e,t,n=!1)=>{const r=ere.exec(e);return r?r[1]?t(r[1]):n:!1},nre=e=>e==="position"||e==="percentage",rre=e=>e==="image"||e==="url",ire=e=>e==="length"||e==="size"||e==="bg-size",ore=e=>e==="length",I6e=e=>e==="number",L6e=e=>e==="family-name",sre=e=>e==="shadow",tj=()=>{const e=Er("color"),t=Er("font"),n=Er("text"),r=Er("font-weight"),i=Er("tracking"),o=Er("leading"),s=Er("breakpoint"),a=Er("container"),l=Er("spacing"),c=Er("radius"),d=Er("shadow"),f=Er("inset-shadow"),p=Er("text-shadow"),m=Er("drop-shadow"),y=Er("blur"),v=Er("perspective"),b=Er("aspect"),C=Er("ease"),S=Er("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],_=()=>[...A(),Ve,He],N=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto","contain","none"],T=()=>[Ve,He,l],O=()=>[up,"full","auto",...T()],D=()=>[iu,"none","subgrid",Ve,He],R=()=>["auto",{span:["full",iu,Ve,He]},iu,Ve,He],I=()=>[iu,"auto",Ve,He],F=()=>["auto","min","max","fr",Ve,He],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],H=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...T()],B=()=>[up,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],z=()=>[e,Ve,He],V=()=>[...A(),cH,lH,{position:[Ve,He]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",P6e,M6e,{size:[Ve,He]}],G=()=>[b7,jg,nf],Y=()=>["","none","full",c,Ve,He],X=()=>["",St,jg,nf],Q=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[St,b7,cH,lH],se=()=>["","none",y,Ve,He],oe=()=>["none",St,Ve,He],J=()=>["none",St,Ve,He],ae=()=>[St,Ve,He],re=()=>[up,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ml],breakpoint:[Ml],color:[_6e],container:[Ml],"drop-shadow":[Ml],ease:["in","out","in-out"],font:[T6e],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ml],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ml],shadow:[Ml],spacing:["px",St],text:[Ml],"text-shadow":[Ml],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",up,He,Ve,b]}],container:["container"],columns:[{columns:[St,He,Ve,a]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:_()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}
vendor: 11,578 bytes, line 73
73],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[iu,"auto",Ve,He]}],basis:[{basis:[up,"full","auto",a,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[St,up,"auto","initial","none",He]}],grow:[{grow:["",St,Ve,He]}],shrink:[{shrink:["",St,Ve,He]}],order:[{order:[iu,"first","last","none",Ve,He]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:R()}],"col-start":[{"col-start":I()}],"col-end":[{"col-end":I()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:R()}],"row-start":[{"row-start":I()}],"row-end":[{"row-end":I()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":F()}],"auto-rows":[{"auto-rows":F()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...H(),"normal"]}],"justify-self":[{"justify-self":["auto",...H()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...H(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...H(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...H(),"baseline"]}],"place-self":[{"place-self":["auto",...H()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"space-y-reverse":["space-y-reverse"],size:[{size:B()}],w:[{w:[a,"screen",...B()]}],"min-w":[{"min-w":[a,"screen","none",...B()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...B()]}],h:[{h:["screen","lh",...B()]}],"min-h":[{"min-h":["screen","lh","none",...B()]}],"max-h":[{"max-h":["screen","lh",...B()]}],"font-size":[{text:["base",n,jg,nf]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ve,x7]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",b7,He]}],"font-family":[{font:[R6e,He,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ve,He]}],"line-clamp":[{"line-clamp":[St,"none",Ve,x7]}],leading:[{leading:[o,...T()]}],"list-image":[{"list-image":["none",Ve,He]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ve,He]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:[St,"from-font","auto",Ve,nf]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[St,"auto",Ve,He]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ve,He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ve,He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:V()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},iu,Ve,He],radial:["",Ve,He],conic:[iu,Ve,He]},D6e,O6e]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:G()}],"gradient-via-pos":[{via:G()}],"gradient-to-pos":[{to:G()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Q(),"hidden","none"]}],"divide-style":[{divide:[...Q(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...Q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[St,Ve,He]}],"outline-w":[{outline:["",St,jg,nf]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",d,Kx,Gx]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",f,Kx,Gx]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[St,nf]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",p,Kx,Gx]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[St,Ve,He]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[St]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[Ve,He]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[St]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:V()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ve,He]}],filter:[{filter:["","none",Ve,He]}],blur:[{blur:se()}],brightness:[{brightness:[St,Ve,He]}],contrast:[{contrast:[St,Ve,He]}],"drop-shadow":[{"drop-shadow":["","none",m,Kx,Gx]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",St,Ve,He]}],"hue-rotate":[{"hue-rotate":[St,Ve,He]}],invert:[{invert:["",St,Ve,He]}],saturate:[{saturate:[St,Ve,He]}],sepia:[{sepia:["",St,Ve,He]}],"backdrop-filter":[{"backdrop-filter":["","none",Ve,He]}],"backdrop-blur":[{"backdrop-blur":se()}],"backdrop-brightness":[{"backdrop-brightness":[St,Ve,He]}],"backdrop-contrast":[{"backdrop-contrast":[St,Ve,He]}],"backdrop-grayscale":[{"backdrop-grayscale":["",St,Ve,He]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[St,Ve,He]}],"backdrop-invert":[{"backdrop-invert":["",St,Ve,He]}],"backdrop-opacity":[{"backdrop-opacity":[St,Ve,He]}],"backdrop-saturate":[{"backdrop-saturate":[St,Ve,He]}],"backdrop-sepia":[{"backdrop-sepia":["",St,Ve,He]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ve,He]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[St,"initial",Ve,He]}],ease:[{ease:["linear","initial",C,Ve,He]}],delay:[{delay:[St,Ve,He]}],animate:[{animate:["none",S,Ve,He]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ve,He]}],"perspective-origin":[{"perspective-origin":_()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:ae()}],"skew-x":[{"skew-x":ae()}],"skew-y":[{"skew-y":ae()}],transform:[{transform:[Ve,He,"","none","gpu","cpu"]}],"transform-origin":[{origin:_()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:re()}],"translate-x":[{"translate-x":re()}],"translate-y":[{"translate-y":re()}],"translate-z":[{"translate-z":re()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}
vendor: 5,080 bytes, line 73
73],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ve,He]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ve,He]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[St,jg,nf,x7]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},$6e=(e,{cacheSize:t,prefix:n,experimentalParseClassName:r,extend:i={},override:o={}})=>(t1(e,"cacheSize",t),t1(e,"prefix",n),t1(e,"experimentalParseClassName",r),Yx(e.theme,o.theme),Yx(e.classGroups,o.classGroups),Yx(e.conflictingClassGroups,o.conflictingClassGroups),Yx(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),t1(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Xx(e.theme,i.theme),Xx(e.classGroups,i.classGroups),Xx(e.conflictingClassGroups,i.conflictingClassGroups),Xx(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),are(e,i,"orderSensitiveModifiers"),e),t1=(e,t,n)=>{n!==void 0&&(e[t]=n)},Yx=(e,t)=>
73{if(t)for(const n in t)t1(e,n,t[n])},Xx=(e,t)=>{if(t)for(const n in t)are(e,t,n)},are=(e,t,n)=>{const r=t[n];r!==void 0&&(e[n]=e[n]?e[n].concat(r):r)},tR=(e,...t)=>typeof e=="function"?ej(tj,e,...t):ej(()=>$6e(tj(),e),...t),lre=ej(tj);var w7={},C7={},uH;function z6e(){return uH||(uH=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(n){return Array.isArray(n)?n.map(r=>t(r)):typeof n=="object"&&n!==null?Object.fromEntries(Object.entries(n).map(([r,i])=>[r,t(i)])):n}}(C7)),C7}var S7,dH;function F6e(){return dH||(dH=1,S7={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{busy:'busy="true"',checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"al
73ias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridTemplateColumns:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",subgrid:"subgrid",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({...e("spacing"),none:"none",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:({theme:e})=>({...e("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:e})=>({...e("spacing"),full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>
73({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),size:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",svw:"100svw",lvw:"100lvw",dvw:"100dvw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]}),S7}var fH;function B6e(){return fH||(fH=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=z6e(),n=r(F6e());function r(o){return o&&o.__esModule?o:{default:o}}const i=(0,t.cloneDeep)(n.default.theme)}(w7)),w7}var E7,hH;function H6e(){if(hH)return E7;hH=1;let e=B6e();return E7=(e.__esModule?e:{default:e}).default,E7}var V6e=H6e();const k7=Ht(V6e),U6e={"title-h1":["3.5rem",{lineHeight:"4rem",letterSpacing:"-0.01em",fontWeight:"500"}],"title-h2":["3rem",{lineHeight:"3.5rem",letterSpacing:"-0.01em",fontWeight:"500"}],"title-h3":["2.5rem",{lineHeight:"3rem",letterSpacing:"-0.01em",fontWeight:"500"}],"title-h4":["2rem",{lineHeight:"2.5rem",letterSpacing:"-0.005em",fontWeight:"500"}],"title-h5":["1.5rem",{lineHeight:"2rem",letterSpacing:"0em",fontWeight:"500"}],"title-h6":["1.25rem",{lineHeight:"1.75rem",letterSpacing:"0em",fontWeight:"500"}],"label-xl":["1.5rem",{lineHeight:"2rem",letterSpacing:"-0.015em",fontWeight:"500"}],"label-lg":["1.125rem",{lineHeight:"1.5rem",letterSpacing:"-0.015em",fontWeight:"500"}],"label-md":["1rem",{lineHeight:"1.5rem",letterSpacing:"-0.011em",fontWeight:"500"}],"label-sm":[".875rem",{lineHeight:"1.25rem",letterSpacing:"-0.006em",fontWeight:"500"}],"label-xs":[".75rem",{lineHeight:"1rem",letterSpacing:"0em",fontWeight:"500"}],"paragraph-xl":["1.5rem",{lineHeight:"2rem",letterSpacing:"-0.015em",fontWeight:"400"}],"paragraph-lg":["1.125rem",{lineHeight:"1.5rem",letterSpacing:"-0.015em",fontWeight:"400"}],"paragraph-md":["1rem",{lineHeight:"1.5rem",letterSpacing:"-0.011em",fontWeight:"400"}],"paragraph-sm":[".875rem",{lineHeight:"1.25rem",letterSpacing:"-0.006em",fontWeight:"400"}],"paragraph-xs":[".75rem",{lineHeight:"1rem",letterSpacing:"0em",fontWeight:"400"}],"subheading-md":["1rem",{lineHeight:"1.5rem",letterSpacing:"0.06em",fontWeight:"500"}],"subheading-sm":[".875rem",{lineHeight:"1.25rem",letterSpacing:"0.06em",fontWeight:"500"}],"subheading-xs":[".75rem",{lineHeight:"1rem",letterSpacing:"0.04em",fontWeight:"500"}],"subheading-2xs":[".6875rem",{lineHeight:".75rem",letterSpacing:"0.02em",fontWeight:"500"}]},q6e={"regular-xs":"0 1px 2px 0 #0a0d1408","regular-sm":"0 2px 4px #1b1c1d0a","regular-md":"0 16px 32px -12px #0e121b1a","button-primary-focus":["0 0 0 2px theme(colors.bg[white-0])","0 0 0 4px theme(colors.primary[alpha-10])"],"button-important-focus":["0 0 0 2px theme(colors.bg[white-0])","0 0 0 4px theme(colors.neutral[alpha-16])"],"button-error-focus":["0 0 0 2px theme(colors.bg[white-0])","0 0 0 4px theme(colors.red[alpha-10])"],"fancy-buttons-neutral":["0 1px 2px 0 #1b1c1d7a","0 0 0 1px #242628"],"fancy-buttons-primary":["0 1px 2px 0 #0e121b3d","0 0 0 1px theme(colors.primary[base])"],"fancy-buttons-error":["0 1px 2px 0 #0e121b3d","0 0 0 1px theme(colors.error[base])"],"fancy-buttons-stroke":["0 1px 3px 0 #0e121b1f","0 0 0 1px theme(colors.stroke[soft-200])"]},W6e={10:".625rem",20:"1.25rem"};
73[...k7.fontFamily.sans],[...k7.fontFamily.sans],k7.boxShadow.none;const cre={extend:{classGroups:{"font-size":[{text:Object.keys(U6e)}],shadow:[{shadow:Object.keys(q6e)}],rounded:[{rounded:Object.keys(W6e)}]}}},G6e=tR(cre);function ku(...e){return G6e(Mt(...e))}function K6e({...e}){return u.jsx("svg",{width:"10",height:"8",viewBox:"0 0 10 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:u.jsx("path",{d:"M1 3.5L4 6.5L9 1.5",strokeWidth:"1.5",className:"stroke-static-white"})})}function Y6e({...e}){return u.jsx("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:u.jsx("path",{d:"M0 1H8",strokeWidth:"1.5",className:"stroke-static-white"})})}const r0=x.forwardRef(({className:e,checked:t,...n},r)=>{const i=x.useId();return u.jsxs(JO,{ref:r,checked:t,className:ku("group/checkbox relative flex size-5 shrink-0 items-center justify-center outline-none","focus:outline-none",e),...n,children:[u.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("rect",{x:"2",y:"2",width:"16",height:"16",rx:"4",className:ku("fill-bg-soft-200 transition duration-200 ease-out","group-hover/checkbox:fill-bg-sub-300","group-focus/checkbox:fill-primary-base","group-disabled/checkbox:fill-bg-soft-200","group-hover/checkbox:group-data-[state=checked]/checkbox:fill-primary-darker","group-hover/checkbox:group-data-[state=indeterminate]/checkbox:fill-primary-darker","group-focus/checkbox:group-data-[state=checked]/checkbox:fill-primary-dark","group-focus/checkbox:group-data-[state=indeterminate]/checkbox:fill-primary-dark","group-data-[state=checked]/checkbox:fill-primary-base","group-data-[state=indeterminate]/checkbox:fill-primary-base","group-disabled/checkbox:group-data-[state=checked]/checkbox:fill-bg-soft-200","group-disabled/checkbox:group-data-[state=indeterminate]/checkbox:fill-bg-soft-200")}),u.jsx("g",{filter:`url(#${i})`,children:u.jsx("rect",{x:"3.5",y:"3.5",width:"13",height:"13",rx:"2.6",className:ku("fill-bg-white-0 transition duration-200 ease-out","group-disabled/checkbox:hidden","group-data-[state=checked]/checkbox:opacity-0","group-data-[state=indeterminate]/checkbox:opacity-0")})}),u.jsx("defs",{children:u.jsxs("filter",{id:i,x:"1.5",y:"3.5",width:"17",height:"17",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[u.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),u.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),u.jsx("feOffset",{dy:"2"}),u.jsx("feGaussianBlur",{stdDeviation:"1"}),u.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.105882 0 0 0 0 0.109804 0 0 0 0 0.113725 0 0 0 0.12 0"}),u.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_34646_2602"}),u.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_34646_2602",result:"shape"})]})})]}),u.jsxs(Une,{forceMount:!0,className:"[&_path]:transition-all [&_path]:duration-300 [&_path]:ease-out [&_svg]:opacity-0",children:[u.jsx(K6e,{className:ku("absolute left-1/2 top-1/2 shrink-0 -translate-x-1/2 -translate-y-1/2","group-data-[state=checked]/checkbox:opacity-100","group-data-[state=checked]/checkbox:[&>path]:[stroke-dashoffset:0]","[&>path]:[stroke-dasharray:var(--total-length)] [&>path]:[stroke-dashoffset:var(--total-length)]","group-data-[state=indeterminate]/checkbox:invisible"),style:{"--total-length":11.313708305358887}}),u.jsx(Y6e,{className:ku("absolute left-1/2 top-1/2 shrink-0 -translate-x-1/2 -translate-y-1/2","group-data-[state=indeterminate]/checkbox:opacity-100","group-data-[state=indeterminate]/checkbox:[&>path]:[stroke-dashoffset:0]","[&>path]:[stroke-dasharray:var(--total-length)] [&>path]:[stroke-dashoffset:var(--total-length)]","invisible group-data-[state=indeterminate]/checkbox:visible"),style:{"--total-length":8}})]})]})});r0.displayName=JO.displayName;var X6e=/\s+/g,Z6e=e=>typeof e!="string"||!e?e:e.replace(X6e," ").trim(),Bw=(...e)=>{const t=[],n=r=>{if(!r&&r!==0&&r!==0n)return;if(Array.isArray(r)){for(let o=0,s=r.length;o<s;o++)n(r[o]);return}const i=typeof r;if(i==="string"||i==="number"||i==="bigint"){if(i==="number"&&r!==r)return;t.push(String(r))}else if(i==="object"){const o=Object.keys(r);for(let s=0,a=o.length;s<a;s++){const l=o[s];r[l]&&t.push(l)}}};for(let r=0,i=e.length;r<i;r++){const o=e[r];o!=null&&n(o)}return t.length>
730?Z6e(t.join(" ")):void 0},pH=e=>e===!1?"false":e===!0?"true":e===0?"0":e,Wi=e=>{if(!e||typeof e!="object")return!0;for(const t in e)return!1;return!0},Q6e=(e,t)=>{if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const o=n[i];if(!r.includes(o)||e[o]!==t[o])return!1}return!0},J6e=(e,t)=>{for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];n in e?e[n]=Bw(e[n],r):e[n]=r}return e},ure=(e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];Array.isArray(r)?ure(r,t):r&&t.push(r)}},dre=(...e)=>{const t=[];ure(e,t);const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n},nj=(e,t)=>{const n={};for(const r in e){const i=e[r];if(r in t){const o=t[r];Array.isArray(i)||Array.isArray(o)?n[r]=dre(o,i):typeof i=="object"&&typeof o=="object"&&i&&o?n[r]=nj(i,o):n[r]=o+" "+i}else n[r]=i}for(const r in t)r in e||(n[r]=t[r]);return n},e8e={twMerge:!0,twMergeConfig:{}};function t8e(){let e=null,t={},n=!1;return{get cachedTwMerge(){return e},set cachedTwMerge(r){e=r},get cachedTwMergeConfig(){return t},set cachedTwMergeConfig(r){t=r},get didTwMergeConfigChange(){return n},set didTwMergeConfigChange(r){n=r},reset(){e=null,t={},n=!1}}}var Ul=t8e(),n8e=e=>{const t=(r,i)=>{const{extend:o=null,slots:s={},variants:a={},compoundVariants:l=[],compoundSlots:c=[],defaultVariants:d={}}=r,f={...e8e,...i},p=o!=null&&o.base?Bw(o.base,r==null?void 0:r.base):r==null?void 0:r.base,m=o!=null&&o.variants&&!Wi(o.variants)?nj(a,o.variants):a,y=o!=null&&o.defaultVariants&&!Wi(o.defaultVariants)?{...o.defaultVariants,...d}:d;!Wi(f.twMergeConfig)&&!Q6e(f.twMergeConfig,Ul.cachedTwMergeConfig)&&(Ul.didTwMergeConfigChange=!0,Ul.cachedTwMergeConfig=f.twMergeConfig);const v=Wi(o==null?void 0:o.slots),b=Wi(s)?{}:{base:Bw(r==null?void 0:r.base,v&&(o==null?void 0:o.base)),...s},C=v?b:J6e({...o==null?void 0:o.slots},Wi(b)?{base:r==null?void 0:r.base}:b),S=Wi(o==null?void 0:o.compoundVariants)?l:dre(o==null?void 0:o.compoundVariants,l),E=_=>{if(Wi(m)&&Wi(s)&&v)return e(p,_==null?void 0:_.class,_==null?void 0:_.className)(f);if(S&&!Array.isArray(S))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof S}`);if(c&&!Array.isArray(c))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof c}`);const N=($,H=m,L=null,B=null)=>{const z=H[$];if(!z||Wi(z))return null;const V=(B==null?void 0:B[$])??(_==null?void 0:_[$]);if(V===null)return null;const U=pH(V);if(typeof U=="object")return null;const W=y==null?void 0:y[$],G=U??pH(W);return z[G||"false"]},j=()=>{if(!m)return null;const $=Object.keys(m),H=[];for(let L=0;L<$.length;L++){const B=N($[L],m);B&&H.push(B)}return H},T=($,H)=>
73{if(!m||typeof m!="object")return null;const L=[];for(const B in m){const z=N(B,m,$,H),V=$==="base"&&typeof z=="string"?z:z&&z[$];V&&L.push(V)}return L},O={};for(const $ in _){const H=_[$];H!==void 0&&(O[$]=H)}const D=($,H)=>{var B;const L=typeof(_==null?void 0:_[$])=="object"?{[$]:(B=_[$])==null?void 0:B.initial}:{};return{...y,...O,...L,...H}},R=($=[],H)=>{const L=[],B=$.length;for(let z=0;z<B;z++){const{class:V,className:U,...W}=$[z];let G=!0;const Y=D(null,H);for(const X in W){const Q=W[X],ne=Y[X];if(Array.isArray(Q)){if(!Q.includes(ne)){G=!1;break}}else{if((Q==null||Q===!1)&&(ne==null||ne===!1))continue;if(ne!==Q){G=!1;break}}}G&&(V&&L.push(V),U&&L.push(U))}return L},I=$=>{const H=R(S,$);if(!Array.isArray(H))return H;const L={},B=e;for(let z=0;z<H.length;z++){const V=H[z];if(typeof V=="string")L.base=B(L.base,V)(f);else if(typeof V=="object")for(const U in V)L[U]=B(L[U],V[U])(f)}return L},F=$=>{if(c.length<1)return null;const H={},L=D(null,$);for(let B=0;B<c.length;B++){const{slots:z=[],class:V,className:U,...W}=c[B];if(!Wi(W)){let G=!0;for(const Y in W){const X=L[Y],Q=W[Y];if(X===void 0||(Array.isArray(Q)?!Q.includes(X):Q!==X)){G=!1;break}}if(!G)continue}for(let G=0;G<z.length;G++){const Y=z[G];H[Y]||(H[Y]=[]),H[Y].push([V,U])}}return H};if(!Wi(s)||!v){const $={};if(typeof C=="object"&&!Wi(C)){const H=e;for(const L in C)$[L]=B=>{const z=I(B),V=F(B);return H(C[L],T(L,B),z?z[L]:void 0,V?V[L]:void 0,B==null?void 0:B.class,B==null?void 0:B.className)(f)}}return $}return e(p,j(),R(S),_==null?void 0:_.class,_==null?void 0:_.className)(f)},A=()=>{if(!(!m||typeof m!="object"))return Object.keys(m)};return E.variantKeys=A(),E.extend=o,E.base=p,E.slots=C,E.variants=m,E.defaultVariants=y,E.compoundSlots=c,E.compoundVariants=S,E};return{tv:t,createTV:r=>(i,o)=>t(i,o?nj(r,o):r)}},r8e=e=>Wi(e)?lre:tR({...e,extend:{theme:e.theme,classGroups:e.classGroups,conflictingClassGroupModifiers:e.conflictingClassGroupModifiers,conflictingClassGroups:e.conflictingClassGroups,...e.extend}}),i8e=(e,t)=>{const n=Bw(e);return!n||!((t==null?void 0:t.twMerge)??!0)?n:((!Ul.cachedTwMerge||Ul.didTwMergeConfigChange)&&(Ul.didTwMergeConfigChange=!1,Ul.cachedTwMerge=r8e(Ul.cachedTwMergeConfig)),Ul.cachedTwMerge(n)||void 0)},o8e=(...e)=>t=>i8e(e,t),{createTV:fre}=n8e(o8e);const jv=fre({twMergeConfig:cre}),s8e="DividerRoot",a8e=jv({base:"relative flex w-full items-center",variants:{variant:{line:"h-0 before:absolute before:left-0 before:top-1/2 before:h-px before:w-full before:-translate-y-1/2 before:bg-stroke-soft-200","line-spacing":["h-1","before:absolute before:left-0 before:top-1/2 before:h-px before:w-full before:-translate-y-1/2 before:bg-stroke-soft-200"],"line-text":["gap-2.5","text-subheading-2xs text-text-soft-400","before:h-px before:w-full before:flex-1 before:bg-stroke-soft-200","after:h-px after:w-full after:flex-1 after:bg-stroke-soft-200"],content:["gap-2.5","before:h-px before:w-full before:flex-1 before:bg-stroke-soft-200","after:h-px after:w-full after:flex-1 after:bg-stroke-soft-200"],text:["px-2 py-1","text-subheading-xs text-text-soft-400"],"solid-text":["bg-bg-weak-50 px-5 py-1.5 uppercase","text-subheading-xs text-text-soft-400"]}},defaultVariants:{variant:"line"}});function Yi({className:e,variant:t,...n}){return u.jsx("div",{role:"separator",className:a8e({variant:t,class:e}),...n})}Yi.displayName=s8e;function Tv(e,t,n,r,i){const o=x.Children.map(e,(s,a)=>{var f;if(!x.isValidElement(s))return s;const l=((f=s.type)==null?void 0:f.displayName)||"",c=n.includes(l)?t:{},d=s.props;return x.cloneElement(s,{...c,key:`${r}-${a}`},Tv(d==null?void 0:d.children,t,n,r,d==null?void 0:d.asChild))});return i?o==null?void 0:o[0]:o}const l8e="FancyButtonRoot",c8e="FancyButtonIcon",u8e=jv({slots:{root:["group relative inline-flex items-center justify-center whitespace-nowrap text-label-sm outline-none","transition duration-200 ease-out","focus:outline-none","disabled:pointer-events-none disabled:text-text-disabled-300","disabled:bg-bg-weak-50 disabled:bg-none disabled:shadow-none disabled:before:hidden disabled:after:hidden"],icon:"relative z-10 size-5 shrink-0"},variants:{variant:{neutral:{root:"bg-bg-strong-950 text-text-white-0 shadow-fancy-buttons-neutral"},primary:{root:"bg-primary-base text-static-white shadow-fancy-buttons-primary"},destructive:{root:"bg-error-base text-static-white shadow-fancy-buttons-error"},basic:{root:["bg-bg-white-0 text-text-sub-600 shadow-fancy-buttons-stroke","hover:bg-bg-weak-50 hover:text-text-strong-950 hover:shadow-none"]}},size:{medium:{root:"h-10 gap-3 rounded-10 px-3.5",icon:"-mx-1"},small:{root:"h-9 gap-3 rounded-lg px-3",icon:"-mx-1"},xsmall:{root:"h-8 gap-3 rounded-lg px-2.5",icon:"-mx-1"}}}
73,compoundVariants:[{variant:["neutral","primary","destructive"],class:{root:["before:pointer-events-none before:absolute before:inset-0 before:z-10 before:rounded-[inherit]","before:bg-gradient-to-b before:p-px","before:from-static-white/[.12] before:to-transparent","before:[mask-clip:content-box,border-box] before:[mask-composite:exclude] before:[mask-image:linear-gradient(#fff_0_0),linear-gradient(#fff_0_0)]","after:absolute after:inset-0 after:rounded-[inherit] after:bg-gradient-to-b after:from-static-white after:to-transparent","after:pointer-events-none after:opacity-[.16] after:transition after:duration-200 after:ease-out","hover:after:opacity-[.24]"]}}],defaultVariants:{variant:"neutral",size:"medium"}}),ql=x.forwardRef(({asChild:e,children:t,variant:n,size:r,className:i,...o},s)=>{const a=x.useId(),l=e?Ei:"button",{root:c}=u8e({variant:n,size:r}),f=Tv(t,{variant:n,size:r},[c8e],a,e);return u.jsx(l,{ref:s,className:c({class:i}),...o,children:f})});ql.displayName=l8e;const d8e="InputRoot",hre="InputWrapper",pre="InputEl",mre="InputIcon",f8e="InputAffixButton",h8e="InputInlineAffixButton",O5=jv({slots:{root:["group relative flex w-full overflow-hidden bg-bg-white-0 text-text-strong-950 shadow-regular-xs","transition duration-200 ease-out","divide-x divide-stroke-soft-200","before:absolute before:inset-0 before:ring-1 before:ring-inset before:ring-stroke-soft-200","before:pointer-events-none before:rounded-[inherit]","before:transition before:duration-200 before:ease-out","hover:shadow-none","has-[input:focus]:shadow-button-important-focus has-[input:focus]:before:ring-stroke-strong-950","has-[input:disabled]:shadow-none has-[input:disabled]:before:ring-transparent"],wrapper:["group/input-wrapper flex w-full cursor-text items-center bg-bg-white-0","transition duration-200 ease-out","hover:[&:not(&:has(input:focus))]:bg-bg-weak-50","has-[input:disabled]:pointer-events-none has-[input:disabled]:bg-bg-weak-50"],input:["w-full bg-transparent bg-none text-paragraph-sm text-text-strong-950 outline-none","transition duration-200 ease-out","placeholder:select-none placeholder:text-text-soft-400 placeholder:transition placeholder:duration-200 placeholder:ease-out","group-hover/input-wrapper:placeholder:text-text-sub-600","focus:outline-none","group-has-[input:focus]:placeholder:text-text-sub-600","disabled:text-text-disabled-300 disabled:placeholder:text-text-disabled-300"],icon:["flex size-5 shrink-0 select-none items-center justify-center","transition duration-200 ease-out","group-has-[:placeholder-shown]:text-text-soft-400","text-text-sub-600","group-has-[:placeholder-shown]:group-hover/input-wrapper:text-text-sub-600","group-has-[:placeholder-shown]:group-has-[input:focus]/input-wrapper:text-text-sub-600","group-has-[input:disabled]/input-wrapper:text-text-disabled-300"],affix:["shrink-0 bg-bg-white-0 text-paragraph-sm text-text-sub-600","flex items-center justify-center truncate","transition duration-200 ease-out","group-has-[:placeholder-shown]:text-text-soft-400","group-has-[:placeholder-shown]:group-has-[input:focus]:text-text-sub-600"],inlineAffix:["text-paragraph-sm text-text-sub-600","group-has-[:placeholder-shown]:text-text-soft-400","group-has-[:placeholder-shown]:group-has-[input:focus]:text-text-sub-600"]},variants:{size:{medium:{root:"rounded-10",wrapper:"gap-2 px-3",input:"h-10"},small:{root:"rounded-lg",wrapper:"gap-2 px-2.5",input:"h-9"},xsmall:{root:"rounded-lg",wrapper:"gap-1.5 px-2",input:"h-8"}},hasError:{true:{root:["before:ring-error-base","hover:before:ring-error-base hover:[&:not(&:has(input:focus)):has(>:only-child)]:before:ring-error-base","has-[input:focus]:shadow-button-error-focus has-[input:focus]:before:ring-error-base"]},false:{root:["hover:[&:not(:has(input:focus)):has(>:only-child)]:before:ring-transparent"]}}},compoundVariants:[{size:"medium",class:{affix:"px-3"}},{size:["small","xsmall"],class:{affix:"px-2.5"}}],defaultVariants:{size:"medium"}});function Tn({className:e,children:t,size:n,hasError:r,asChild:i,...o}){const s=x.useId(),a=i?Ei:"div",{root:l}=O5({size:n,hasError:r}),d=Tv(t,{size:n,hasError:r},[hre,pre,mre,f8e,h8e],s,i);return u.jsx(a,{className:l({class:e}),...o,children:d})}Tn.displayName=d8e;function Vn({className:e,children:t,size:n,hasError:r,asChild:i,...o}){const s=i?Ei:"label",{wrapper:a}=O5({size:n,hasError:r});return u.jsx(s,{className:a({class:e}),...o,children:t})}Vn.displayName=hre;const Mn=x.forwardRef(({className:e,type:t="text",size:n,hasError:r,asChild:i,...o},s)=>
73{const a=i?Ei:"input",{input:l}=O5({size:n,hasError:r});return u.jsx(a,{type:t,className:l({class:e}),ref:s,...o})});Mn.displayName=pre;function dc({size:e,hasError:t,as:n,className:r,...i}){const o=n||"div",{icon:s}=O5({size:e,hasError:t});return u.jsx(o,{className:s({class:r}),...i})}dc.displayName=mre;const It=x.forwardRef(({className:e,disabled:t,...n},r)=>u.jsx(KO,{ref:r,className:ku("group cursor-pointer text-label-sm text-text-strong-950","flex items-center gap-px","aria-disabled:text-text-disabled-300",e),"aria-disabled":t,...n}));It.displayName="LabelRoot";function ss({className:e,children:t,...n}){return u.jsx("span",{className:ku("text-primary-base","group-aria-disabled:text-text-disabled-300",e),...n,children:t||"*"})}function gre({children:e,className:t,...n}){return u.jsx("span",{className:ku("text-paragraph-sm text-text-sub-600","group-aria-disabled:text-text-disabled-300",t),...n,children:e})}const p8e="LinkButtonRoot",m8e="LinkButtonIcon",g8e=jv({slots:{root:["group inline-flex items-center justify-center whitespace-nowrap outline-none","transition duration-200 ease-out","underline decoration-transparent underline-offset-[3px]","hover:decoration-current","focus:outline-none focus-visible:underline","disabled:pointer-events-none disabled:text-text-disabled-300 disabled:no-underline"],icon:"shrink-0"},variants:{variant:{gray:{root:["text-text-sub-600","focus-visible:text-text-strong-950"]},black:{root:"text-text-strong-950"},primary:{root:["text-primary-base","hover:text-primary-darker"]},error:{root:["text-error-base","hover:text-red-700"]},modifiable:{}},size:{medium:{root:"h-5 gap-1 text-label-sm",icon:"size-5"},small:{root:"h-4 gap-1 text-label-xs",icon:"size-4"}},underline:{true:{root:"decoration-current"}}},defaultVariants:{variant:"gray",size:"medium"}}),yre=x.forwardRef(({asChild:e,children:t,variant:n,size:r,underline:i,className:o,...s},a)=>{const l=x.useId(),c=e?Ei:"button",{root:d}=g8e({variant:n,size:r,underline:i}),p=Tv(t,{variant:n,size:r},[m8e],l,e);return u.jsx(c,{ref:a,className:d({class:o}),...s,children:p})});yre.displayName=p8e;const y8e="SocialButtonRoot",v8e="SocialButtonIcon",b8e=jv({slots:{root:["relative inline-flex h-10 items-center justify-center gap-3.5 whitespace-nowrap rounded-10 px-4 text-label-sm outline-none","transition duration-200 ease-out","focus:outline-none"],icon:"relative z-10 -mx-1.5 size-5 shrink-0"},variants:{brand:{apple:{},twitter:{},google:{},facebook:{},linkedin:{},github:{},dropbox:{}},mode:{filled:{root:["text-static-white","before:pointer-events-none before:absolute before:inset-0 before:rounded-10 before:opacity-0 before:transition before:duration-200 before:ease-out","hover:before:opacity-100","focus-visible:shadow-button-important-focus"]},stroke:{root:["bg-bg-white-0 text-text-strong-950 shadow-regular-xs ring-1 ring-inset ring-stroke-soft-200","hover:bg-bg-weak-50 hover:shadow-none hover:ring-transparent","focus-visible:shadow-button-important-focus focus-visible:ring-stroke-strong-950"]}}},compoundVariants:[{brand:"apple",mode:"filled",class:{root:["bg-static-black","before:bg-white-alpha-16"]}},{brand:"twitter",mode:"filled",class:{root:["bg-static-black","before:bg-white-alpha-16"]}},{brand:"google",mode:"filled",class:{root:["bg-[#f14336]","before:bg-static-black/[.16]"]}},{brand:"facebook",mode:"filled",class:{root:["bg-[#1977f3]","before:bg-static-black/[.16]"]}},{brand:"linkedin",mode:"filled",class:{root:["bg-[#0077b5]","before:bg-static-black/[.16]"]}},{brand:"github",mode:"filled",class:{root:["bg-[#24292f]","before:bg-white-alpha-16"]}},{brand:"dropbox",mode:"filled",class:{root:["bg-[#3984ff]","before:bg-static-black/[.16]"]}},{brand:"apple",mode:"stroke",class:{root:["text-social-apple"]}},{brand:"twitter",mode:"stroke",class:{root:["text-social-twitter"]}},{brand:"github",mode:"stroke",class:{root:["text-social-github"]}}],defaultVariants:{mode:"filled"}}),nR=x.forwardRef(({asChild:e,children:t,mode:n,brand:r,className:i,...o},s)=>{const a=x.useId(),l=e?Ei:"button",{root:c}=b8e({brand:r,mode:n}),f=Tv(t,{mode:n,brand:r},[v8e],a,e);return u.jsx(l,{ref:s,className:c({class:i}),...o,children:f})});nR.displayName=y8e;const rR=()=>u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"492",height:"201",fill:"none",viewBox:"0 0 492 201",children:[u.jsx("rect",{width:"430",height:"60",fill:"#fff",rx:"8"}),u.jsx("path",{fill:"#EBEBEB",d:"M52.056 30c0 12.15-9.85 22-22 22s-22-9.85-22-22 9.85-22 22-22 22 9.85 22 22m-37.84 0c0 8.748 7.092 15.84 15.84 15.84s15.84-7.092 15.84-15.84-7.092-15.84-15.84-15.84-15.84 7.092-15.84 15.84"}),u.jsx("path",{fill:"#FF383C",d:"M30.056 9a.966.966 0 0 1 1-.977 22 22 0 0 1 16.571 35.216.966.966 0 0 1-1.39.147l-3.205-2.652c-.426-.352-.483-.98-.158-1.427a15.839 15.839 0 0 0-11.819-25.115c-.55-.035-.999-.48-.999-1.032z"}),u.jsx("path",{fill:"#5C5C5C",d:"M73.47 19h-3.295V8.818h3.4q1.497 0 2.57.612a4.03 4.03 0 0 1 1.646 1.745q.577 1.133.577 2.72 0 1.59-.582 2.734a4.1 4.1 0 0 1-1.67 1.76q-1.095.61-2.645.611m-1.759-1.342h1.675q1.163 0 1.934-.438.771-.442 1.154-1.277.383-.84.383-2.049 0-1.198-.383-2.033a2.7 2.7 0 0 0-1.129-1.268q-.75-.432-1.864-.432h-1.77zm11.58 1.496q-1.073 0-1.874-.492a3.3 3.3 0 0 1-1.243-1.377q-.442-.886-.442-2.068 0-1.189.442-2.078a3.3 3.3 0 0 1 1.243-1.383q.801-.492 1.875-.492t1.874.492q.8.494 1.243 1.383.442.89.442 2.078 0 1.183-.442 2.068a3.3 3.3 0 0 1-1.243 1.377q-.801.492-1.874.492m.005-1.248q.697 0 1.154-.368.457-.367.676-.98.225-.61.224-1.346 0-.732-.224-1.343a2.2 2.2 0 0 0-.676-.989q-.458-.373-1.154-.373-.7 0-1.163.373a2.2 2.2 0 0 0-.68.99 4 4 0 0 0-.22 1.342q0 .736.22 1.347.222.612.68.98.462.367 1.163.367M88.426 19v-7.636h1.427v1.242h.095q.24-.63.78-.984.542-.358 1.298-.358.765 0 1.283.358.522.358.77.985h.08a2.15 2.15 0 0 1 .87-.975q.596-.368 1.422-.368 1.039 0 1.695.652.66.65.661 1.963V19h-1.486v-4.982q0-.775-.423-1.123a1.54 1.54 0 0 0-1.01-.348q-.725 0-1.128.447-.402.443-.402 1.139V19h-1.482v-5.076q0-.62-.388-1-.388-.377-1.009-.377-.423 0-.78.224-.353.219-.572.611a1.9 1.9 0 0 0-.214.91V19zm14.512.169q-.726 0-1.313-.268a2.2 2.2 0 0 1-.929-.79q-.339-.518-.338-1.269 0-.645.248-1.064.25-.417.671-.66a3.5 3.5 0 0 1 .945-.369 9 9 0 0 1 1.064-.189l1.113-.129q.429-.054.622-.174.194-.12.194-.388v-.034q0-.652-.368-1.01-.363-.357-1.084-.358-.75 0-1.183.333-.427.33-.592.731l-1.397-.318q.249-.696.726-1.123a2.95 2.95 0 0 1 1.109-.627 4.3 4.3 0 0 1 1.317-.199q.457 0 .97.11.516.104.964.387.453.285.741.81.288.523.288 1.358V19h-1.451v-1.044h-.06a2.1 2.1 0 0 1-.433.567q-.288.278-.74.462-.453.184-1.084.184m.323-1.193q.616 0 1.054-.244.443-.243.671-.636a1.65 1.65 0 0 0 .234-.85v-.985q-.08.08-.308.15-.224.064-.513.114-.288.045-.561.084l-.458.06a3.7 3.7 0 0 0-.79.184q-.353.129-.567.373-.209.238-.209.636 0 .552.408.835.408.279 1.039.279M108.602 19v-7.636h1.487V19zm.751-8.815a.94.94 0 0 1-.666-.258.84.84 0 0 1-.274-.627q0-.368.274-.626a.93.93 0 0 1 .666-.263q.387 0 .661.263a.82.82 0 0 1 .279.626q0 .363-.279.627a.93.93 0 0 1-.661.258m4.138 4.28V19h-1.486v-7.636h1.426v1.242h.095q.264-.606.825-.974.567-.368 1.427-.368.78 0 1.367.328.587.323.91.965.323.64.323 1.586V19h-1.486v-4.678q0-.83-.433-1.298-.432-.472-1.188-.472-.517 0-.92.224a1.6 1.6 0 0 0-.631.656q-.23.428-.229 1.034M124.028 19V8.818h3.629q1.184 0 1.964.408.786.408 1.174 1.128.387.717.387 1.656 0 .935-.392 1.646-.388.705-1.174 1.098-.78.393-1.964.393h-2.749v-1.322h2.61q.746 0 1.213-.214a1.4 1.4 0 0 0 .691-.622q.219-.407.219-.98 0-.576-.224-.998a1.44 1.44 0 0 0-.691-.647q-.467-.228-1.228-.228h-1.929V19zm5.026-4.594L131.57 19h-1.75l-2.466-4.594zm6.017 4.763q-.726 0-1.313-.268a2.2 2.2 0 0 1-.93-.79q-.338-.518-.338-1.269 0-.645.249-1.064.249-.417.671-.66a3.5 3.5 0 0 1 .945-.369 9 9 0 0 1 1.064-.189l1.113-.129q.427-.054.622-.174.194-.12.194-.388v-.034q0-.652-.368-1.01-.363-.357-1.084-.358-.751 0-1.183.333-.428.33-.592.731l-1.397-.318q.249-.696.726-1.123a2.9 2.9 0 0 1 1.109-.627 4.3 4.3 0 0 1 1.317-.199q.457 0 .969.11.518.104.965.387.452.285.741.81.288.523.288 1.358V19h-1.452v-1.044h-.059a2.1 2.1 0 0 1-.433.567q-.288.278-.741.462-.452.184
73-1.083.184m.323-1.193q.616 0 1.054-.244.442-.243.671-.636a1.65 1.65 0 0 0 .234-.85v-.985q-.08.08-.309.15-.224.064-.512.114-.288.045-.562.084l-.457.06a3.7 3.7 0 0 0-.79.184 1.35 1.35 0 0 0-.567.373q-.209.238-.209.636 0 .552.408.835.407.279 1.039.279m8.906-6.612v1.193h-4.172v-1.193zm-3.053-1.83h1.487v7.224q0 .432.129.651.129.214.333.293.209.075.452.075.18 0 .314-.025.134-.024.208-.04l.269 1.228a2.5 2.5 0 0 1-.368.1 3 3 0 0 1-.597.06 2.6 2.6 0 0 1-1.093-.21 1.9 1.9 0 0 1-.821-.675q-.313-.457-.313-1.149zM145.86 19v-7.636h1.486V19zm.751-8.815a.95.95 0 0 1-.667-.258.84.84 0 0 1-.273-.627.83.83 0 0 1 .273-.626.94.94 0 0 1 .667-.263q.387 0 .661.263a.82.82 0 0 1 .278.626q0 .363-.278.627a.93.93 0 0 1-.661.258m4.138 4.28V19h-1.487v-7.636h1.427v1.242h.095q.262-.606.825-.974.566-.368 1.427-.368.78 0 1.367.328a2.2 2.2 0 0 1 .91.965q.323.64.323 1.586V19h-1.487v-4.678q0-.83-.432-1.298-.433-.472-1.188-.472a1.86 1.86 0 0 0-.92.224q-.398.223-.632.656-.228.428-.228 1.034m9.998 7.558q-.909 0-1.566-.239-.651-.239-1.064-.631a2.7 2.7 0 0 1-.616-.86l1.277-.527q.135.219.358.462.229.249.617.423.393.174 1.009.174.845 0 1.397-.413.552-.408.552-1.303v-1.501h-.094q-.135.243-.388.542a2.1 2.1 0 0 1-.686.517q-.438.219-1.139.219-.905 0-1.631-.423-.72-.427-1.143-1.258-.417-.835-.418-2.053 0-1.218.413-2.088.418-.87 1.143-1.332a2.98 2.98 0 0 1 1.646-.468q.711 0 1.149.239.436.234.681.547.248.313.382.552h.11v-1.238h1.457v7.805q0 .984-.458 1.616-.457.63-1.238.934-.775.304-1.75.304m-.015-4.37q.642 0 1.084-.299.447-.303.676-.865.234-.567.234-1.357 0-.77-.229-1.357a2 2 0 0 0-.671-.915q-.443-.333-1.094-.333-.67 0-1.118.348a2.1 2.1 0 0 0-.676.935q-.225.591-.224 1.322 0 .75.229 1.318.228.566.676.884.451.32 1.113.319"}),u.jsx("path",{fill:"#171717",d:"M69.584 45.611v-1.738l6.777-9.424h2.656v9.346h2.12v1.816h-2.12V49h-2.06v-3.389zm7.373-1.816v-7.07h-.02l-5.059 7.05v.02z"}),u.jsx("path",{fill:"#5C5C5C",d:"M206.05 12.14v-1.322h7.88v1.323h-3.177V21h-1.531v-8.86zm8.625 8.86v-7.636h1.436v1.213h.08q.208-.616.736-.97a2.1 2.1 0 0 1 1.203-.358 6 6 0 0 1 .631.035v1.422a3 3 0 0 0-.318-.055 3 3 0 0 0-.457-.034 1.94 1.94 0 0 0-.94.223 1.66 1.66 0 0 0-.885 1.497V21zm7.443.169q-.726 0-1.313-.268a2.2 2.2 0 0 1-.93-.79q-.338-.518-.338-1.269 0-.645.249-1.064.249-.417.671-.66a3.5 3.5 0 0 1 .945-.369 9 9 0 0 1 1.064-.189l1.113-.129q.428-.054.622-.174t.194-.388v-.034q0-.652-.368-1.01-.363-.357-1.084-.358-.751 0-1.183.333-.428.33-.592.731l-1.397-.318q.249-.696.726-1.123a2.9 2.9 0 0 1 1.109-.627 4.3 4.3 0 0 1 1.317-.199q.457 0 .97.11.517.104.964.387.453.285.741.81.288.523.288 1.358V21h-1.452v-1.044h-.059a2.1 2.1 0 0 1-.433.567q-.288.278-.741.462-.451.184-1.083.184m.323-1.193q.616 0 1.054-.244.443-.243.671-.636a1.65 1.65 0 0 0 .234-.85v-.985q-.08.08-.309.15a5 5 0 0 1-.512.114q-.288.045-.561.084l-.458.06a3.7 3.7 0 0 0-.79.184 1.35 1.35 0 0 0-.567.373q-.209.238-.209.636 0 .552.408.835.408.279 1.039.279m8.975-6.612v1.193h-4.315v-1.193zM228.284 21v-8.521q0-.717.313-1.188.314-.478.831-.712a2.65 2.65 0 0 1 1.123-.238 3.4 3.4 0 0 1 .766.075q.318.069.472.129l-.348 1.203a7 7 0 0 0-.268-.07 1.5 1.5 0 0 0-.398-.045q-.542 0-.776.269-.228.269-.228.776V21zm8.216-7.636v1.193h-4.315v-1.193zM233.368 21v-8.521q0-.717.313-1.188.314-.478.831-.712a2.65 2.65 0 0 1 1.123-.238 3.4 3.4 0 0 1 .766.075q.318.069.472.129l-.348 1.203a7 7 0 0 0-.268-.07 1.5 1.5 0 0 0-.398-.045q-.542 0-.776.269-.228.269-.228.776V21zm4.582 0v-7.636h1.487V21zm.751-8.815a.94.94 0 0 1-.666-.258.84.84 0 0 1-.274-.627q0-.368.274-.626a.93.93 0 0 1 .666-.263q.387 0 .661.263a.82.82 0 0 1 .278.626q0 .363-.278.627a.93.93 0 0 1-.661.258m5.868 8.97q-1.109 0-1.909-.503a3.33 3.33 0 0 1-1.223-1.397q-.428-.89-.428-2.038 0-1.163.438-2.054a3.34 3.34 0 0 1 1.233-1.397q.795-.502 1.874-.502.87 0 1.551.323.68.319 1.099.895a2.7 2.7 0 0 1 .502 1.348h-1.447a1.73 1.73 0 0 0-.547-.925q-.422-.388-1.133-.388-.621 0-1.089.328-.462.324-.721.925-.258.596-.258 1.412 0 .835.253 1.442.254.606.716.94.468.332 1.099.332.423 0 .766-.154.347-.16.581-.452.238-.294.333-.706h1.447a2.8 2.8 0 0 1-.482 1.322 2.8 2.8 0 0 1-1.079.915q-.671.333-1.576.333"}),u.jsx("path",{fill:"#171717",d:"M211.25 48.179q-1.317 0-2.352-.454-1.03-.453-1.63-1.26a3.33 3.33 0 0 1-.639-1.878h2.007q.038.58.39 1.01.357.42.933.652.575.23 1.278.23.774 0 1.368-.269.601-.268.94-.748.339-.485.339-1.118 0-.66-.339-1.157-.333-.505-.978-.793-.64-.288-1.547-.288h-1.106v-1.61h1.106q.729 0 1.278-.262.556-.262.87-.729.313-.473.313-1.106 0-.607-.275-1.055a1.85 1.85 0 0 0-.767-.71q-.492-.255-1.163-.255-.64 0-1.196.237a2.2 2.2 0 0 0-.895.665 1.7 1.7 0 0 0-.37 1.029h-1.912q.033-1.062.627-1.867.6-.805 1.585-1.26.984-.453 2.186-.453 1.26 0 2.173.492.921.486 1.419 1.298.505.811.499 1.777.007 1.1-.614 1.866-.613.768-1.636 1.03v.102q1.304.198 2.02 1.035.722.838.716 2.078a3.23 3.23 0 0 1-.601 1.936q-.601.857-1.643 1.35-1.041.485-2.384.485m7.215-.179 5.715-11.301v-.096h-6.61v-1.694h8.655v1.752L220.53 48zm15.53-13.09 3.643 10.661h.147l3.644-10.662h2.135L238.853 48h-2.282l-4.711-13.09zM245.031 48v-9.818h1.911V48zm.965-11.333q-.499 0-.857-.333a1.08 1.08 0 0 1-.351-.805q0-.473.351-.805.358-.34.857-.34t.85.34q.358.332.358.805 0 .467-.358.805a1.2 1.2 0 0 1-.85.333m10.604 3.912-1.732.307a2 2 0 0 0-.345-.633 1.7 1.7 0 0 0-.627-.492q-.396-.192-.99-.192-.812 0-1.355.364-.544.358-.544.927 0 .492.365.793.364.3 1.176.492l1.559.358q1.356.313 2.02.965.665.653.665 1.694 0 .882-.511 1.572-.505.684-1.413 1.074-.902.39-2.09.39-1.65 0-2.691-.703-1.042-.71-1.279-2.014l1.848-.28q.172.72.709 1.092.537.365 1.4.365.94 0 1.502-.39.563-.396.563-.965 0-.46-.345-.774-.34-.313-1.042-.473l-1.662-.364q-1.375-.313-2.033-.997-.652-.684-.652-1.733 0-.87.486-1.52.486-.653 1.342-1.017.857-.37 1.962-.371 1.593 0 2.506.69.915.684 1.208 1.835M258.623 48v-9.818h1.912V48zm.966-11.333q-.499 0-.857-.333a1.08 1.08 0 0 1-.351-.805q0-.473.351-.805.358-.34.857-.34.498 0 .85.34.358.332.358.805 0 .467-.358.805a1.2 1.2 0 0 1-.85.333m7.83 1.515v1.534h-5.363v-1.534zm-3.925-2.352h1.911v9.287q0 .555.167.838.165.275.428.377.268.096.582.096.23 0 .402-.032l.269-.052.345 1.58a3 3 0 0 1-.473.127q-.307.07-.767.077a3.4 3.4 0 0 1-1.406-.269 2.4 2.4 0 0 1-1.055-.869q-.403-.588-.403-1.477zm9.799 12.368q-1.38 0-2.41-.633a4.27 4.27 0 0 1-1.598-1.77q-.568-1.138-.568-2.66 0-1.527.568-2.671.57-1.144 1.598-1.777 1.03-.633 2.41-.633t2.41.633 1.598 1.777.569 2.672q0 1.52-.569 2.659a4.26 4.26 0 0 1-1.598 1.77q-1.029.633-2.41.633m.007-1.604q.895 0 1.483-.473.587-.473.869-1.26a5 5 0 0 0 .288-1.732q0-.939-.288-1.726-.281-.792-.869-1.272t-1.483-.479q-.902 0-1.496.48-.588.479-.876 1.271a5.1 5.1 0 0 0-.281 1.726q0 .945.281 1.733.288.785.876 1.259.594.473 1.496.473M279.733 48v-9.818h1.848v1.56h.102q.268-.793.946-1.247.684-.46 1.547-.46a8 8 0 0 1 .812.045v1.828a3 3 0 0 0-.409-.07 4 4 0 0 0-.589-.045q-.677 0-1.208.287-.523.282-.831.787a2.13 2.13 0 0 0-.306 1.137V48zm13.996-7.421-1.732.307a2 2 0 0 0-.346-.633 1.7 1.7 0 0 0-.626-.492q-.397-.192-.99
731-.192-.812 0-1.355.364-.543.358-.543.927 0 .492.364.793.365.3 1.176.492l1.56.358q1.355.313 2.02.965.665.653.665 1.694 0 .882-.512 1.572-.504.684-1.412 1.074-.901.39-2.091.39-1.648 0-2.691-.703-1.041-.71-1.278-2.014l1.847-.28q.173.72.71 1.092.537.365 1.4.365.94 0 1.502-.39.562-.396.562-.965 0-.46-.345-.774-.339-.313-1.042-.473l-1.662-.364q-1.375-.313-2.032-.997-.652-.684-.652-1.733 0-.87.485-1.52.486-.653 1.343-1.017.857-.37 1.962-.371 1.591 0 2.506.69.914.684 1.208 1.835"}),u.jsx("path",{fill:"url(#paint0_linear_197723_97237)",fillOpacity:"0.06",d:"M314.149 50.558h-1.495a.221.221 0 0 0 0 .442h94.779c11.598 0 21-9.402 21-21V13.376a4.376 4.376 0 0 0-8.007-2.442l-11.617 17.273a4.103 4.103 0 0 1-7.2-.727l-5.962-14.471a6.474 6.474 0 0 0-12.116.378l-3.67 10.774c-1.194 3.504-3.297 5.86-6.998 5.86-3.31 0-7.518 1.888-8.966 4.864l-3.85 7.912a4.032 4.032 0 0 1-7.261-.02l-4.809-10.024a4.82 4.82 0 0 0-4.342-2.732 4.82 4.82 0 0 1-4.569-3.293l-4.648-13.936a5.548 5.548 0 0 0-10.681.56l-7.913 35.86a1.72 1.72 0 0 1-1.675 1.346"}),u.jsx("path",{stroke:"#FF383C",strokeWidth:"2",d:"M312.433 51a3.84 3.84 0 0 0 3.753-3.022l7.561-34.626a5.533 5.533 0 0 1 10.66-.553l4.67 14.151a4.8 4.8 0 0 0 4.556 3.294 4.8 4.8 0 0 1 4.334 2.74l4.829 10.172a4.013 4.013 0 0 0 7.242.02l3.878-8.055c1.436-2.981 5.642-4.877 8.951-4.877 3.698 0 5.793-2.36 6.974-5.863l3.704-10.99a6.453 6.453 0 0 1 12.088-.375l5.986 14.685a4.085 4.085 0 0 0 7.183.721l9.21-13.839A12.52 12.52 0 0 1 428.433 9"}),u.jsx("path",{stroke:"#EBEBEB",d:"M186.807 45V15"}),u.jsx("rect",{width:"435",height:"60",x:"57",y:"141",fill:"#fff",rx:"8"}),u.jsx("path",{fill:"#EBEBEB",d:"M109 171c0 12.15-9.85 22-22 22s-22-9.85-22-22 9.85-22 22-22 22 9.85 22 22m-37.84 0c0 8.748 7.092 15.84 15.84 15.84s15.84-7.092 15.84-15.84-7.092-15.84-15.84-15.84-15.84 7.092-15.84 15.84"}),u.jsx("path",{fill:"#34C759",d:"M87 150a.966.966 0 0 1 1-.977 22 22 0 0 1 16.571 35.216.965.965 0 0 1-1.39.147l-3.206-2.652c-.425-.352-.482-.98-.157-1.427a15.85 15.85 0 0 0 1.514-16.051 15.83 15.83 0 0 0-13.333-9.064c-.55-.035-.999-.48-.999-1.032z"}),u.jsx("path",{fill:"#5C5C5C",d:"M130.415 160h-3.296v-10.182h3.4q1.497 0 2.57.612a4.03 4.03 0 0 1 1.646 1.745q.577 1.133.577 2.719 0 1.591-.582 2.735a4.07 4.07 0 0 1-1.67 1.759q-1.094.612-2.645.612m-1.76-1.342h1.675q1.163 0 1.934-.438a2.76 2.76 0 0 0 1.154-1.278q.382-.84.382-2.048 0-1.198-.382-2.033a2.7 2.7 0 0 0-1.129-1.268q-.75-.432-1.864-.432h-1.77zm11.58 1.496q-1.073 0-1.874-.492a3.3 3.3 0 0 1-1.243-1.377q-.442-.886-.442-2.068 0-1.189.442-2.079a3.3 3.3 0 0 1 1.243-1.382q.801-.492 1.874-.492 1.074 0 1.875.492.8.493 1.243 1.382.442.89.442 2.079 0 1.183-.442 2.068a3.3 3.3 0 0 1-1.243 1.377q-.801.492-1.875.492m.005-1.248q.696 0 1.154-.368.457-.367.676-.979a3.9 3.9 0 0 0 .224-1.347q0-.731-.224-1.343a2.2 2.2 0 0 0-.676-.989q-.458-.373-1.154-.373-.7 0-1.163.373a2.2 2.2 0 0 0-.681.989 4 4 0 0 0-.219 1.343q0 .735.219 1.347.224.612.681.979.462.369 1.163.368m5.13 1.094v-7.636h1.427v1.243h.095q.238-.632.78-.985.542-.358 1.298-.358.765 0 1.282.358.522.358.771.985h.08q.273-.612.87-.975.596-.368 1.422-.368 1.038 0 1.695.651.661.652.661 1.964V160h-1.486v-4.982q0-.775-.423-1.123a1.54 1.54 0 0 0-1.009-.348q-.726 0-1.129.447-.403.443-.403 1.139V160h-1.481v-5.076q0-.621-.388-.999t-1.009-.378a1.44 1.44 0 0 0-.781.224 1.6 1.6 0 0 0-.571.611 1.87 1.87 0 0 0-.214.91V160zm14.512.169a3.1 3.1 0 0 1-1.313-.268 2.2 2.2 0 0 1-.929-.791q-.339-.517-.339-1.268 0-.646.249-1.064.249-.417.671-.661a3.5 3.5 0 0 1 .945-.368 9 9 0 0 1 1.064-.189l1.113-.129q.428-.054.622-.174.194-.119.194-.388v-.034q0-.652-.368-1.01-.363-.358-1.084-.358-.75 0-1.183.333-.427.329-.592.731l-1.397-.318q.249-.696.726-1.124a2.9 2.9 0 0 1 1.109-.626 4.3 4.3 0 0 1 1.317-.199q.457 0 .97.11.517.103.964.387.453.283.741.811.288.522.288 1.357V160h-1.452v-1.044h-.059a2.1 2.1 0 0 1-.433.567 2.3 2.3 0 0 1-.74.462q-.453.184-1.084.184m.323-1.193q.616 0 1.054-.244.443-.243.671-.636a1.65 1.65 0 0 0 .234-.85v-.985q-.08.08-.309.15a5 5 0 0 1-.512.114q-.288.045-.561.084l-.458.06a3.7 3.7 0 0 0-.79.184q-.354.129-.567.373-.209.239-.209.636 0 .552.408.835.408.279 1.039.279m5.341 1.024v-7.636h1.487V160zm.751-8.815a.94.94 0 0 1-.666-.258.84.84 0 0 1-.274-.627q0-.368.274-.626a.93.93 0 0 1 .666-.263q.388 0 .661.263a.82.82 0 0 1 .278.626.83.83 0 0 1-.278.627.93.93 0 0 1-.661.258m4.138 4.281V160h-1.487v-7.636h1.427v1.243h.095q.263-.607.825-.975.566-.368 1.427-.368.78 0 1.367.328a2.2 2.2 0 0 1 .91.965q.323.64.323 1.586V160h-1.486v-4.678q0-.83-.433-1.298-.432-.472-1.188-.472-.518 0-.92.224a1.6 1.6 0 0 0-.631.656q-.23.428-.229 1.034M180.972 160v-10.182h3.629q1.184 0 1.964.408.786.408 1.173 1.128.388.717.388 1.656 0 .935-.393 1.646-.387.705-1.173 1.098-.78.393-1.964.393h-2.749v-1.322h2.61q.746 0 1.213-.214.472-.214.691-.622.219-.407.219-.979 0-.577-.224-.999a1.44 1.44 0 0 0-.691-.647q-.467-.228-1.228-.228h-1.929V160zm5.026-4.594 2.516 4.594h-1.75l-2.466-4.594zm6.016 4.763q-.725 0-1.312-.268a2.2 2.2 0 0 1-.93-.791q-.338-.517-.338-1.268 0-.
73646.249-1.064.248-.417.671-.661a3.5 3.5 0 0 1 .945-.368 9 9 0 0 1 1.063-.189l1.114-.129q.427-.054.622-.174.193-.119.193-.388v-.034q0-.652-.367-1.01-.363-.358-1.084-.358-.751 0-1.184.333-.427.329-.591.731l-1.397-.318q.249-.696.726-1.124a2.94 2.94 0 0 1 1.108-.626 4.3 4.3 0 0 1 1.318-.199q.457 0 .969.11.517.103.965.387.451.283.741.811.288.522.288 1.357V160h-1.452v-1.044h-.059a2.2 2.2 0 0 1-.433.567 2.3 2.3 0 0 1-.741.462q-.452.184-1.084.184m.324-1.193q.616 0 1.054-.244.442-.243.671-.636.233-.398.233-.85v-.985q-.079.08-.308.15-.224.065-.512.114-.288.045-.562.084l-.457.06a3.7 3.7 0 0 0-.791.184q-.353.129-.566.373-.21.239-.209.636 0 .552.408.835.407.279 1.039.279m8.905-6.612v1.193h-4.171v-1.193zm-3.052-1.83h1.486v7.224q0 .432.13.651a.67.67 0 0 0 .333.293q.209.075.452.075.18 0 .313-.025.135-.024.209-.04l.269 1.228a2.928 2.928 0 0 1-.965.159 2.6 2.6 0 0 1-1.094-.208 1.9 1.9 0 0 1-.82-.677q-.313-.456-.313-1.148zm4.613 9.466v-7.636h1.486V160zm.751-8.815a.95.95 0 0 1-.667-.258.84.84 0 0 1-.273-.627.83.83 0 0 1 .273-.626.94.94 0 0 1 .667-.263q.387 0 .661.263a.82.82 0 0 1 .278.626.84.84 0 0 1-.278.627.93.93 0 0 1-.661.258m4.138 4.281V160h-1.487v-7.636h1.427v1.243h.094a2.2 2.2 0 0 1 .826-.975q.566-.368 1.427-.368.78 0 1.367.328a2.2 2.2 0 0 1 .91.965q.323.64.323 1.586V160h-1.487v-4.678q0-.83-.432-1.298-.433-.472-1.189-.472a1.85 1.85 0 0 0-.919.224 1.6 1.6 0 0 0-.632.656q-.228.428-.228 1.034m9.998 7.557q-.91 0-1.566-.239-.651-.238-1.064-.631a2.65 2.65 0 0 1-.616-.86l1.277-.527q.135.218.358.462.229.249.617.423.393.174 1.009.174.845 0 1.397-.413.552-.408.552-1.303v-1.501h-.095a3.4 3.4 0 0 1-.387.542 2.1 2.1 0 0 1-.687.517q-.437.219-1.138.219a3.2 3.2 0 0 1-1.631-.423q-.72-.427-1.143-1.258-.418-.835-.418-2.053t.413-2.088q.417-.87 1.143-1.332a2.97 2.97 0 0 1 1.646-.468q.711 0 1.148.239.438.234.681.547.25.313.383.552h.11v-1.238h1.456v7.805q0 .984-.457 1.616a2.7 2.7 0 0 1-1.238.934q-.775.304-1.75.304m-.015-4.37q.642 0 1.084-.299.447-.303.676-.865.234-.566.234-1.357 0-.77-.229-1.357a2 2 0 0 0-.671-.915q-.443-.333-1.094-.333-.67 0-1.118.348-.448.343-.677.935a3.7 3.7 0 0 0-.223 1.322q0 .751.228 1.318.23.566.676.885.453.318 1.114.318"}),u.jsx("path",{fill:"#171717",d:"m127.475 190 6.406-12.666v-.01h-7.412v-1.875h9.599v1.934L129.721 190zm15.175-14.551V190h-2.099v-12.422h-.01l-3.555 2.324v-2.07l3.623-2.383z"}),u.jsx("path",{fill:"#5C5C5C",d:"M261.616 153.141v-1.323h7.88v1.323h-3.176V162h-1.532v-8.859zm8.625 8.859v-7.636h1.437v1.213h.08q.208-.616.736-.97a2.1 2.1 0 0 1 1.203-.358 7 7 0 0 1 .631.035v1.422a3 3 0 0 0-.318-.055 3 3 0 0 0-.457-.035 1.94 1.94 0 0 0-.94.224 1.66 1.66 0 0 0-.885 1.497V162zm7.443.169q-.725 0-1.312-.268a2.2 2.2 0 0 1-.93-.791q-.338-.517-.338-1.268 0-.646.249-1.064.248-.417.671-.661a3.5 3.5 0 0 1 .945-.368 9 9 0 0 1 1.063-.189l1.114-.129q.427-.054.622-.174.193-.119.193-.388v-.034q0-.652-.367-1.01-.363-.358-1.084-.358-.751 0-1.184.333-.428.329-.591.731l-1.397-.318q.249-.696.726-1.124a2.94 2.94 0 0 1 1.108-.626 4.3 4.3 0 0 1 1.318-.199q.457 0 .969.11.518.103.965.387.452.283.741.811.288.522.288 1.357V162h-1.452v-1.044h-.059a2.2 2.2 0 0 1-.433.567 2.3 2.3 0 0 1-.741.462q-.452.184-1.084.184m.324-1.193q.616 0 1.054-.244.442-.243.671-.636.233-.398.233-.85v-.985q-.079.08-.308.15-.224.065-.512.114-.288.045-.562.084l-.457.06a3.7 3.7 0 0 0-.791.184q-.353.129-.566.373-.21.239-.209.636 0 .552.408.835.407.279 1.039.279m8.975-6.612v1.193h-4.315v-1.193zM283.851 162v-8.521q0-.717.313-1.189.314-.477.83-.71.518-.24 1.124-.239.447 0 .766.074.318.07.472.13l-.348 1.203a8 8 0 0 0-.269-.07 1.5 1.5 0 0 0-.397-.044q-.543 0-.776.268-.228.268-.229.776V162zm8.216-7.636v1.193h-4.315v-1.193zM288.935 162v-8.521q0-.717.313-1.189.314-.477.83-.71.518-.24 1.124-.239.447 0 .766.074.318.07.472.13l-.348 1.203a8 8 0 0 0-.269-.07 1.5 1.5 0 0 0-.397-.044q-.543 0-.776.268-.229.268-.229.776V162zm4.582 0v-7.636h1.486V162zm.75-8.815a.95.95 0 0 1-.666-.258.84.84 0 0 1-.273-.627.83.83 0 0 1 .273-.626.93.93 0 0 1 .666-.263q.388 0 .662.263a.82.82 0 0 1 .278.626.84.84 0 0 1-.278.627.93.93 0 0 1-.662.258m5.869 8.969q-1.109 0-1.909-.502a3.3 3.3 0 0 1-1.223-1.397q-.428-.89-.428-2.038 0-1.164.438-2.054a3.35 3.35 0 0 1 1.233-1.397q.795-.502 1.874-.502.87 0 1.551.323.68.319 1.099.895.422.577.502 1.348h-1.447a1.73 1.73 0 0 0-.547-.925q-.423-.388-1.133-.388-.623 0-1.089.328-.462.324-.721.925-.259.596-.259 1.412 0 .835.254 1.442.254.606.716.939.468.333 1.099.333.422 0 .765-.154a1.6 1.6 0 0 0 .582-.452q.238-.294.333-.706h1.447a2.8 2.8 0 0 1-.482 1.322 2.8 2.8 0 0 1-1.079.915q-.672.333-1.576.333"}),u.jsx("path",{fill:"#171717",d:"M267.226 175.909V189h-1.982v-11.109h-.076l-3.132 2.045v-1.892l3.266-2.135zM270.497 189v-1.432l4.43-4.589a24 24 0 0 0 1.169-1.311q.468-.568.697-1.08.23-.511.23-1.087 0-.651-.306-1.125a2 2 0 0 0-.838-.735 2.7 2.7 0 0 0-1.195-.262q-.704 0-1.227.288a1.97 1.97 0 0 0-.806.812q-.28.523-.281 1.227h-1.886q0-1.196.55-2.09a3.73 3.73 0 0 1 1.508-1.387q.96-.5 2.18-.499 1.234 0 2.173.492a3.7 3.7 0 0 1 1.477 1.33q.531.837.531 1.892 0 .729-.275 1.425-.268.697-.94 1.554-.671.85-1.866 2.064l-2.602 2.723v.096h5.894V189zm10.769 0v-1.432l4.43-4.589a25 25 0 0 0 1.17-1.311q.466-.568.696-1.08.23-.511.23-1.087 0-.651-.306-1.125a2 2 0 0 0-.838-.735 2.7 2.7 0 0 0-1.195-.262q-.703 0-1.227.288a1.97 1.97 0 0 0-.806.812q-.28.523-.281 1.227h-1.886q0-1.196.55-2.09a3.73 3.73 0 0 1 1.509-1.387q.958-.5 2.179-.499 1.234 0 2.174.492.945.486 1.476 1.33.531.837.531 1.892 0 .729-.275 1.425-.268.697-.94 1.554-.67.85-1.866 2.064l-2.602 2.723v.096h5.894V189zm15.122-13.27a5 5 0 0 1 1.726.32 4.1 4.1 0 0 1 1.534 1.022q.69.71 1.1 1.918.415 1.201.421 2.992 0 1.719-.345 3.061-.345 1.336-.991 2.257a4.34 4.34 0 0 1-1.553 1.4q-.913.479-2.058.479-1.17 0-2.077-.46a3.95 3.95 0 0 1-1.477-1.272 4.2 4.2 0 0 1-.71-1.88h1.95q.192.844.78 1.368.595.519 1.534.518 1.438 0 2.244-1.253.805-1.259.811-3.515h-.102a3.6 3.6 0 0 1-.831.946 3.8 3.8 0 0 1-1.106.613 3.9 3.9 0 0 1-1.31.218 3.93 3.93 0 0 1-2.058-.556 4.1 4.1 0 0 1-1.477-1.528q-.55-.972-.55-2.218 0-1.24.563-2.25a4.2 4.2 0 0 1 1.585-1.598q1.023-.595 2.397-.582m.007 1.662q-.749 0-1.349.371-.594.364-.94.991-.345.62-.345 1.38 0 .761.332 1.381.339.613.921.978.588.358 1.342.358.563 0 1.048-.217.486-.218.851-.601a3 3 0 0 0 .569-.882q.204-.493.204-1.036 0-.722-.345-1.342a2.7 2.7 0 0 0-.933-.997 2.44 2.44 0 0 0-1.355-.384m12.63-1.483 3.644 10.662h.147l3.643-10.662h2.135L313.883 189h-2.282l-4.711-13.091zM320.061 189v-9.818h1.912V189zm.965-11.333q-.498 0-.856-.332a1.08 1.08 0 0 1-.352-.806q0-.473.352-.805.358-.339.856-.339.499 0 .851.339.358.332.358.805 0 .467-.358.806a1.2 1.2 0 0 1-.851.332m10.605 3.912-1.732.307a2.1 2.1 0 0 0-.345-.633 1.7 1.7 0 0 0-.627-.492q-.396-.192-.99
731-.192-.812 0-1.355.364-.543.358-.543.927 0 .492.364.793.364.3 1.176.492l1.56.358q1.355.313 2.02.965t.665 1.694q0 .882-.512 1.572-.504.684-1.412 1.074-.902.39-2.09.39-1.65 0-2.692-.703-1.041-.71-1.278-2.013l1.847-.282q.173.723.71 1.093.536.365 1.4.365.94 0 1.502-.39.562-.396.562-.965 0-.46-.345-.774-.339-.313-1.042-.473l-1.662-.364q-1.374-.313-2.032-.997-.652-.684-.652-1.733 0-.869.485-1.521.486-.652 1.343-1.016.857-.37 1.962-.371 1.591 0 2.506.69.914.684 1.208 1.835m2.023 7.421v-9.818h1.911V189zm.965-11.333q-.498 0-.856-.332a1.08 1.08 0 0 1-.352-.806q0-.473.352-.805a1.2 1.2 0 0 1 .856-.339q.5 0 .85.339.358.332.358.805 0 .467-.358.806a1.2 1.2 0 0 1-.85.332m7.831 1.515v1.534h-5.363v-1.534zm-3.925-2.352h1.911v9.287q0 .556.166.838a.87.87 0 0 0 .429.377q.268.096.581.096.23 0 .403-.032l.268-.052.346 1.579a3 3 0 0 1-.473.128 3.7 3.7 0 0 1-.767.077 3.4 3.4 0 0 1-1.407-.269 2.4 2.4 0 0 1-1.054-.869q-.403-.588-.403-1.477zm9.799 12.368q-1.38 0-2.41-.633a4.27 4.27 0 0 1-1.598-1.77q-.569-1.138-.569-2.659 0-1.528.569-2.672a4.26 4.26 0 0 1 1.598-1.777q1.03-.633 2.41-.633t2.41.633a4.26 4.26 0 0 1 1.598 1.777q.569 1.144.569 2.672 0 1.52-.569 2.659a4.27 4.27 0 0 1-1.598 1.77q-1.03.633-2.41.633m.006-1.604q.895 0 1.483-.473a2.8 2.8 0 0 0 .87-1.259 5 5 0 0 0 .287-1.733q0-.939-.287-1.726-.282-.792-.87-1.272-.588-.479-1.483-.479-.9 0-1.495.479-.588.48-.876 1.272a5.1 5.1 0 0 0-.281 1.726q0 .946.281 1.733.288.786.876 1.259.594.473 1.495.473m6.434 1.406v-9.818h1.847v1.559h.103q.268-.792.946-1.246.684-.46 1.546-.46a8 8 0 0 1 .812.045v1.828a3 3 0 0 0-.409-.071 4 4 0 0 0-.588-.044 2.5 2.5 0 0 0-1.208.287 2.134 2.134 0 0 0-1.138 1.924V189zm13.995-7.421-1.732.307a2 2 0 0 0-.345-.633 1.7 1.7 0 0 0-.626-.492q-.397-.192-.991-.192-.812 0-1.355.364-.543.358-.544.927 0 .492.365.793.365.3 1.176.492l1.56.358q1.354.313 2.019.965.666.652.665 1.694 0 .882-.511 1.572-.506.684-1.413 1.074-.901.39-2.09.39-1.649 0-2.691-.703-1.042-.71-1.278-2.013l1.847-.282q.172.723.709 1.093.537.365 1.4.365.94 0 1.502-.39.563-.396.563-.965 0-.46-.345-.774-.339-.313-1.042-.473l-1.662-.364q-1.374-.313-2.033-.997-.651-.684-.652-1.733 0-.869.486-1.521t1.342-1.016q.856-.37 1.963-.371 1.591 0 2.505.69.914.684 1.208 1.835"}),u.jsx("path",{fill:"url(#paint1_linear_197723_97237)",fillOpacity:"0.06",d:"M384.602 191.558h-1.381a.221.221 0 0 0 0 .442H471c11.598 0 21-9.402 21-21v-16.937a4.063 4.063 0 0 0-7.498-2.171l-10.984 17.382a3.751 3.751 0 0 1-6.668-.65l-5.736-14.818a5.956 5.956 0 0 0-11.228.335l-3.636 11.358c-1.053 3.289-2.988 5.522-6.442 5.522-3.109 0-7.054 1.813-8.347 4.64l-3.772 8.248a3.69 3.69 0 0 1-6.72-.018l-4.627-10.264a4.43 4.43 0 0 0-4.034-2.606 4.42 4.42 0 0 1-4.222-3.102l-4.489-14.323a5.131 5.131 0 0 0-9.92.493l-7.506 36.192a1.6 1.6 0 0 1-1.569 1.277"}),u.jsx("path",{stroke:"#1DAF61",strokeWidth:"2",d:"M383 192a3.564 3.564 0 0 0 3.491-2.847l7.195-35.064a5.117 5.117 0 0 1 9.9-.487l4.51 14.539a4.41 4.41 0 0 0 4.21 3.103 4.41 4.41 0 0 1 4.027 2.613l4.645 10.414a3.674 3.674 0 0 0 6.703.018l3.797-8.393c1.282-2.832 5.226-4.652 8.334-4.652 3.45 0 5.379-2.235 6.42-5.524l3.667-11.576a5.936 5.936 0 0 1 11.202-.331l5.758 15.033a3.734 3.734 0 0 0 6.652.644l8.846-14.147A11.37 11.37 0 0 1 492 150"}),u.jsx("path",{stroke:"#EBEBEB",d:"M242.5 186v-30"}),u.jsx("path",{fill:"#E6A819",d:"M205.885 128.794a2.5 2.5 0 0 0 3.288 1.299l20.643-8.952a2.5 2.5 0 0 0-1.99-4.588l-18.349 7.958-7.957-18.349a2.5 2.5 0 1 0-4.587 1.99zm11.679-24.755-2.325-.918zM194 67.965l-1.425 2.054 16.004 11.106 1.426-2.054 1.425-2.054-16.005-11.106zm23.564 36.074-2.325-.918-9.386 23.76 2.325.918 2.326.919 9.385-23.76zm-7.559-24.968-1.426 2.054a18.5 18.5 0 0 1 6.66 21.996l2.325.918 2.325.919a23.5 23.5 0 0 0-8.459-27.94z"}),u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"paint0_linear_197723_97237",x1:"370.433",x2:"370.433",y1:"24.862",y2:"51",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"#CFD1D3"}),u.jsx("stop",{offset:"1",stopColor:"#E4E5E7",stopOpacity:"0"})]}),u.jsxs("linearGradient",{id:"paint1_linear_197723_97237",x1:"437.5",x2:"437.5",y1:"165.862",y2:"192",gradientUnits:"userSpaceOnUse",children:[u.jsx("stop",{stopColor:"#CFD1D3"}),u.jsx("stop",{offset:"1",stopColor:"#E4E5E7",stopOpacity:"0"})]})]})]}),am=bte.withTypes(),mH=xte.withTypes();function x8e(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const w8e=e=>{switch(e){case"success":return E8e;case"info":return _8e;case"warning":return k8e;case"error":return A8e;default:return null}},C8e=Array(12).fill(0),S8e=({visible:e,className:t})=>K.createElement("div",{className:["sonner-loading-wrapper",t].filter(
vendor: 2,871 bytes, line 73
73Boolean).join(" "),"data-visible":e},K.createElement("div",{className:"sonner-spinner"},C8e.map((n,r)=>K.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),E8e=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),k8e=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},K.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_8e=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),A8e=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),N8e=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},K.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),K.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),j8e=()=>{const[e,t]=K.useState(document.hidden);return K.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let rj=1;class T8e{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:rj++,s=this.toasts.find(l=>l.id===o),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...t,id:o,title:r}
vendor: 3,216 bytes, line 73
73),{...l,...t,id:o,dismissible:a,title:r}):l):this.addToast({title:r,...i,dismissible:a,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,s;const a=i.then(async c=>{if(s=["resolve",c],K.isValidElement(c))o=!1,this.create({id:r,type:"default",message:c});else if(O8e(c)&&!c.ok){o=!1;const f=typeof n.error=="function"?await n.error(`HTTP error! status: ${c.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${c.status}`):n.description,y=typeof f=="object"&&!K.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...y})}else if(c instanceof Error){o=!1;const f=typeof n.error=="function"?await n.error(c):n.error,p=typeof n.description=="function"?await n.description(c):n.description,y=typeof f=="object"&&!K.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){o=!1;const f=typeof n.success=="function"?await n.success(c):n.success,p=typeof n.description=="function"?await n.description(c):n.description,y=typeof f=="object"&&!K.isValidElement(f)?f:{message:f};this.create({id:r,type:"success",description:p,...y})}}).catch(async c=>{if(s=["reject",c],n.error!==void 0){o=!1;const d=typeof n.error=="function"?await n.error(c):n.error,f=typeof n.description=="function"?await n.description(c):n.description,m=typeof d=="object"&&!K.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:f,...m})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((c,d)=>a.then(()=>s[0]==="reject"?d(s[1]):c(s[1])).catch(d));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||rj++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Gi=new T8e,M8e=(e,t)=>{const n=(t==null?void 0:t.id)||rj++;return Gi.addToast({title:e,...t,id:n}),n},O8e=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",R8e=M8e,P8e=()=>Gi.toasts,D8e=()=>Gi.getActiveToasts(),ze=Object.assign(R8e,{success:Gi.success,info:Gi.info,warning:Gi.warning,error:Gi.error,custom:Gi.custom,message:Gi.message,promise:Gi.promise,dismiss:Gi.dismiss,loading:Gi.loading},{getHistory:P8e,getToasts:D8e});x8e
vendor: 6,602 bytes, line 73
73("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}
vendor: 8,224 bytes, line 73
73[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
73Zx(e){return e.label!==void 0}const I8e=3,L8e="24px",$8e="16px",gH=4e3,z8e=356,F8e=14,B8e=45,H8e=200;function wa(...e){return e.filter(Boolean).join(" ")}function V8e(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const U8e=e=>{var t,n,r,i,o,s,a,l,c;const{invert:d,toast:f,unstyled:p,interacting:m,setHeights:y,visibleToasts:v,heights:b,index:C,toasts:S,exp
vendor: 8,589 bytes, line 73
73anded:E,removeToast:A,defaultRichColors:_,closeButton:N,style:j,cancelButtonStyle:T,actionButtonStyle:O,className:D="",descriptionClassName:R="",duration:I,position:F,gap:$,expandByDefault:H,classNames:L,icons:B,closeButtonAriaLabel:z="Close toast"}=e,[V,U]=K.useState(null),[W,G]=K.useState(null),[Y,X]=K.useState(!1),[Q,ne]=K.useState(!1),[ie,se]=K.useState(!1),[oe,J]=K.useState(!1),[ae,re]=K.useState(!1),[pe,be]=K.useState(0),[xe,ke]=K.useState(0),Pe=K.useRef(f.duration||I||gH),it=K.useRef(null),qe=K.useRef(null),$n=C===0,Vt=C+1<=v,ee=f.type,ue=f.dismissible!==!1,me=f.className||"",je=f.descriptionClassName||"",Ae=K.useMemo(()=>b.findIndex(ot=>ot.toastId===f.id)||0,[b,f.id]),_e=K.useMemo(()=>{var ot;return(ot=f.closeButton)!=null?ot:N},[f.closeButton,N]),Oe=K.useMemo(()=>f.duration||I||gH,[f.duration,I]),dt=K.useRef(0),vt=K.useRef(0),Kt=K.useRef(0),Or=K.useRef(null),[wr,en]=F.split("-"),Rr=K.useMemo(()=>b.reduce((ot,un,Un)=>Un>=Ae?ot:ot+un.height,0),[b,Ae]),tr=j8e(),De=f.invert||d,Yt=ee==="loading";vt.current=K.useMemo(()=>Ae*$+Rr,[Ae,Rr]),K.useEffect(()=>{Pe.current=Oe},[Oe]),K.useEffect(()=>{X(!0)},[]),K.useEffect(()=>{const ot=qe.current;if(ot){const un=ot.getBoundingClientRect().height;return ke(un),y(Un=>[{toastId:f.id,height:un,position:f.position},...Un]),()=>y(Un=>Un.filter(ir=>ir.toastId!==f.id))}},[y,f.id]),K.useLayoutEffect(()=>{if(!Y)return;const ot=qe.current,un=ot.style.height;ot.style.height="auto";const Un=ot.getBoundingClientRect().height;ot.style.height=un,ke(Un),y(ir=>ir.find(Te=>Te.toastId===f.id)?ir.map(Te=>Te.toastId===f.id?{...Te,height:Un}:Te):[{toastId:f.id,height:Un,position:f.position},...ir])},[Y,f.title,f.description,y,f.id]);const Xt=K.useCallback(()=>{ne(!0),be(vt.current),y(ot=>ot.filter(un=>un.toastId!==f.id)),setTimeout(()=>{A(f)},H8e)},[f,A,y,vt]);K.useEffect(()=>{if(f.promise&&ee==="loading"||f.duration===1/0||f.type==="loading")return;let ot;return E||m||tr?(()=>{if(Kt.current<dt.current){const ir=new Date().getTime()-dt.current;Pe.current=Pe.current-ir}Kt.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(dt.current=new Date().getTime(),ot=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),Xt()},Pe.current))})(),()=>clearTimeout(ot)},[E,m,f,ee,tr,Xt]),K.useEffect(()=>{f.delete&&Xt()},[Xt,f.delete]);function Po(){var ot;if(B!=null&&B.loading){var un;return K.createElement("div",{className:wa(L==null?void 0:L.loader,f==null||(un=f.classNames)==null?void 0:un.loader,"sonner-loader"),"data-visible":ee==="loading"},B.loading)}return K.createElement(S8e,{className:wa(L==null?void 0:L.loader,f==null||(ot=f.classNames)==null?void 0:ot.loader),visible:ee==="loading"})}const ma=f.icon||(B==null?void 0:B[ee])||w8e(ee);var bs,Fi;return K.createElement("li",{tabIndex:0,ref:qe,className:wa(D,me,L==null?void 0:L.toast,f==null||(t=f.classNames)==null?void 0:t.toast,L==null?void 0:L.default,L==null?void 0:L[ee],f==null||(n=f.classNames)==null?void 0:n[ee]),"data-sonner-toast":"","data-rich-colors":(bs=f.richColors)!=null?bs:_,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":Y,"data-promise":!!f.promise,"data-swiped":ae,"data-removed":Q,"data-visible":Vt,"data-y-position":wr,"data-x-position":en,"data-index":C,"data-front":$n,"data-swiping":ie,"data-dismissible":ue,"data-type":ee,"data-invert":De,"data-swipe-out":oe,"data-swipe-direction":W,"data-expanded":!!(E||H&&Y),style:{"--index":C,"--toasts-before":C,"--z-index":S.length-C,"--offset":`${Q?pe:vt.current}px`,"--initial-height":H?"auto":`${xe}px`,...j,...f.style},onDragEnd:()=>{se(!1),U(null),Or.current=null},onPointerDown:ot=>{Yt||!ue||(it.current=new Date,be(vt.current),ot.target.setPointerCapture(ot.pointerId),ot.target.tagName!=="BUTTON"&&(se(!0),Or.current={x:ot.clientX,y:ot.clientY}))},onPointerUp:()=>{var ot,un,Un;if(oe||!ue)return;Or.current=null;const ir=Number(((ot=qe.current)==null?void 0:ot.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Se=Number(((un=qe.current)==null?void 0:un.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Te=new Date().getTime()-((Un=it.current)==null?void 0:Un.getTime()),Le=V==="x"?ir:Se,tt=Math.abs(Le)/Te;if(Math.abs(Le)>=B8e||tt>.11){be(vt.current),f.onDismiss==null||f.onDismiss.call(f,f),G(V==="x"?ir>0?"right":"left":Se>0?"down":"up"),Xt(),J(!0);return}else{var ut,Tt;(ut=qe.current)==null||ut.style.setProperty("--swipe-amount-x","0px"),(Tt=qe.current)==null||Tt.style.setProperty("--swipe-amount-y","0px")}re(!1),se(!1),U(null)},onPointerMove:ot=>{var un,Un,ir;if(!Or.current||!ue||((un=window.getSelection())==null?void 0:un.toString().length)>0)return;const Te=ot.clientY-Or.current.y,Le=ot.clientX-Or.current.x;var tt;const ut=(tt=e.swipeDirections)!=null?tt:V8e(F);!V&&(Math.abs(Le)>1||Math.abs(Te)>1)&&U(Math.abs(Le)>Math.abs(Te)?"x":"y");let Tt={x:0,y:0};const Zt=st=>1/(1.5+Math.abs(st)/20);if(V==="y"){if(ut.includes("top")||ut.includes("bottom"))if(ut.includes("top")&&Te<0||ut.includes("bottom")&&Te>0)Tt.y=Te;else{const st=Te*Zt(Te);Tt.y=Math.abs(st)<Math.abs(Te)?st:Te}}else if(V==="x"&&(ut.includes("left")||ut.includes("right")))if(ut.includes("left")&&Le<0||ut.includes("right")&&Le>0)Tt.x=Le;else{const st=Le*Zt(Le);Tt.x=Math.abs(st)<Math.abs(Le)?st:Le}(Math.abs(Tt.x)>0||Math.abs(Tt.y)>0)&&re(!0),(Un=qe.current)==null||Un.style.setProperty("--swipe-amount-x",`${Tt.x}px`),(ir=qe.current)==null||ir.style.setProperty("--swipe-amount-y",`${Tt.y}px`)}},_e&&!f.jsx&&ee!=="loading"?K.createElement("button",{"aria-label":z,"data-disabled":Yt,"data-close-button":!0,onClick:Yt||!ue?()=>{}:()=>{Xt(),f.onDismiss==null||f.onDismiss.call(f,f)},className:wa(L==null?void 0:L.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(Fi=B==null?void 0:B.close)!=null?Fi:N8e):null,(ee||f.icon||f.promise)&&f.icon!==null&&((B==null?void 0:B[ee])!==null||f.icon)?K.createElement("div",{"data-icon":"",className:wa(L==null?void 0:L.icon,f==null||(i=f.classNames)==null?void 0:i.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Po():null,f.type!=="loading"?ma:null):null,K.createElement("div",{"data-content":"",className:wa(L==null?void 0:L.content,f==null||(o=f.classNames)==null?void 0:o.content)},K.createElement("div",{"data-title":"",className:wa(L==null?void 0:L.title,f==null||(s=f.classNames)==null?void 0:s.title)},f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title),f.description?K.createElement("div",{"data-description":"",className:wa(R,je,L==null?void 0:L.description,f==null||(a=f.classNames)==null?void 0:a.description)},typeof f.description=="function"?f.description():f.description):null),K.isValidElement(f.cancel)?f.cancel:f.cancel&&Zx(f.cancel)?K.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||T,onClick:ot=>{Zx(f.cancel)&&ue&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,ot),Xt())},className:wa(L==null?void 0:L.cancelButton,f==null||(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,K.isValidElement(f.action)?f.action:f.action&&Zx(f.action)?K.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||O,onClick:ot=>{Zx(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,ot),!ot.defaultPrevented&&Xt())},className:wa(L==null?void 0:L.actionButton,f==null||(c=f.classNames)==null?void 0:c.actionButton)},f.action.label):null)};function yH(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function q8e(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",a=o?$8e:L8e;function l(c){["top","right","bottom","left"].forEach(d=>{n[`${s}-${d}`]=typeof c=="number"?`${c}px`:c})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(c=>{r[c]===void 0?n[`${s}-${c}`]=a:n[`${s}-${c}`]=typeof r[c]=="number"?`${r[c]}px`:r[c]}):l(a)}),n}const W8e=K.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:s,closeButton:a,className:l,offset:c,mobileOffset:d,theme:f="light",richColors:p,duration:m,style:y,visibleToasts:v=I8e,toastOptions:b,dir:C=yH(),gap:S=F8e,icons:E,containerAriaLabel:A="Notifications"}=t,[_,N]=K.useState([]),j=K.useMemo(()=>Array.from(new Set([i].concat(_.filter(W=>W.position).map(W=>W.position)))),[_,i]),[T,O]=K.useState([]),[D,R]=K.useState(!1),[I,F]=K.useState(!1),[$,H]=K.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
73k":"light"),L=K.useRef(null),B=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),z=K.useRef(null),V=K.useRef(!1),U=K.useCallback(W=>{N(G=>{var Y;return(Y=G.find(X=>X.id===W.id))!=null&&Y.delete||Gi.dismiss(W.id),G.filter(({id:X})=>X!==W.id)})},[]);return K.useEffect(()=>Gi.subscribe(W=>{if(W.dismiss){requestAnimationFrame(()=>{N(G=>G.map(Y=>Y.id===W.id?{...Y,delete:!0}:Y))});return}setTimeout(()=>{Fs.flushSync(()=>{N(G=>{const Y=G.findIndex(X=>X.id===W.id);return Y!==-1?[...G.slice(0,Y),{...G[Y],...W},...G.slice(Y+1)]:[W,...G]})})})}),[_]),K.useEffect(()=>{if(f!=="system"){H(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const W=window.matchMedia("(prefers-color-scheme: dark)");try{W.addEventListener("change",({matches:G})=>{H(G?"dark":"light")})}catch{W.addListener(({matches:Y})=>{try{H(Y?"dark":"light")}catch(X){console.error(X)}})}},[f]),K.useEffect(()=>{_.length<=1&&R(!1)},[_]),K.useEffect(()=>{const W=G=>{var Y;if(o.every(ne=>G[ne]||G.code===ne)){var Q;R(!0),(Q=L.current)==null||Q.focus()}G.code==="Escape"&&(document.activeElement===L.current||(Y=L.current)!=null&&Y.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",W),()=>document.removeEventListener("keydown",W)},[o]),K.useEffect(()=>{if(L.current)return()=>{z.current&&(z.current.focus({preventScroll:!0}),z.current=null,V.current=!1)}},[L.current]),K.createElement("section",{ref:n,"aria-label":`${A} ${B}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},j.map((W,G)=>{var Y;const[X,Q]=W.split("-");return _.length?K.createElement("ol",{key:W,dir:C==="auto"?yH():C,tabIndex:-1,ref:L,className:l,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":X,"data-lifted":D&&_.length>1&&!s,"data-x-position":Q,style:{"--front-toast-height":`${((Y=T[0])==null?void 0:Y.height)||0}px`,"--width":`${z8e}px`,"--gap":`${S}px`,...y,...q8e(c,d)},onBlur:ne=>{V.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(V.current=!1,z.current&&(z.current.focus({preventScroll:!0}),z.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||V.current||(V.current=!0,z.current=ne.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{I||R(!1)},onDragEnd:()=>R(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},_.filter(ne=>!ne.position&&G===0||ne.position===W).map((ne,ie)=>{var se,oe;return K.createElement(U8e,{key:ne.id,icons:E,index:ie,toast:ne,defaultRichColors:p,duration:(se=b==null?void 0:b.duration)!=null?se:m,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:v,closeButton:(oe=b==null?void 0:b.closeButton)!=null?oe:a,interacting:I,position:W,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:U,toasts:_.filter(J=>J.position==ne.position),heights:T.filter(J=>J.position==ne.position),setHeights:O,expandByDefault:s,gap:S,expanded:D,swipeDirections:t.swipeDirections})})):null}))}),G8e="/icons/brands/google.svg";function K8e(e){const[t,n]=x.useState(!1);return u.jsx(Tn,{children:u.jsxs(Vn,{children:[u.jsx(dc,{as:One}),u.jsx(Mn,{type:t?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢",...e}),u.jsx("button",{type:"button",onClick:()=>n(r=>!r),children:t?u.jsx(Nne,{className:"size-5 text-text-soft-400 group-has-[disabled]:text-text-disabled-300"}):u.jsx(Ane,{className:"size-5 text-text-soft-400 group-has-[disabled]:text-text-disabled-300"})})]})})}const go=[{highlight:"Another great tool by George ðð» congrats ð¥",rest:"and thanks for helping us boost our SEO",name:"Yogesh Gosavi",role:"Founder",company:"One4Wall",avatar:"/images/youri.jpg",companyLogo:"/images/one4wall.webp",link:"https://www.one4studio.com/",companyLink:"https://www.one4studio.com/"},{highlight:"Seio has been incredibly useful for quickly generating excellent SEO content for my website.",rest:"It uses the right tags to produce content that sounds very human, and it's much better than other similar products. Of course, I always make a few tweaks, but it's the perfect starting point for my website content! Thanks, George, for creating such a fantastic product!",name:"Marius Bongarts",role:"Founder",company:"Web Highlights",avatar:"/images/marius.jpg",companyLogo:"/images/web-highlights.jpg",link:"https://web-highlights.com/",companyLink:"https://web-highlights.com/"}];
73function Y8e(){const e=br(),t=lo(),n=t.state,r=am(),[i,{isLoading:o}]=xCe(),[s]=ane(),{refetch:a}=rm(),[l,c]=x.useState(0),[d,f]=x.useState(!1),p=x.useCallback(R=>{R!==l&&(f(!0),setTimeout(()=>{c(R),f(!1)},300))},[l]);x.useEffect(()=>{const R=setInterval(()=>{p((l+1)%go.length)},7e3);return()=>clearInterval(R)},[l,p]),x.useEffect(()=>{n!=null&&n.message&&(ze.success(n.message),e(t.pathname,{replace:!0,state:{}}))},[n==null?void 0:n.message,e,t.pathname]);const[m,y]=x.useState({email:"",password:""}),[v,b]=x.useState({email:!1,password:!1}),[C,S]=x.useState({email:"",password:""}),[E,A]=x.useState(null),_=R=>R?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(R)?"":"Please enter a valid email address":"Email is required",N=R=>R?R.length<6?"Password must be at least 6 characters":"":"Password is required",j=()=>{const R=_(m.email),I=N(m.password);return S({email:R,password:I}),b({email:!0,password:!0}),!R&&!I},T=R=>{b({...v,[R]:!0}),R==="email"?S({...C,email:_(m.email)}):R==="password"&&S({...C,password:N(m.password)})},O=(R,I)=>{y({...m,[R]:I}),v[R]&&(R==="email"?S({...C,email:_(I)}):R==="password"&&S({...C,password:N(I)}))},D=async R=>{if(R.preventDefault(),A(null),!!j())try{const I=await i(m).unwrap();if(I.success&&I.user){await a(),ze.success("Welcome back! Logging you in...");const F=await r(Yn.endpoints.getUserProfile.initiate());F.data?F.data&&!F.data.onboardingComplete?e("/onboarding",{replace:!0}):e("/",{replace:!0}):e("/onboarding",{replace:!0})}else I.error&&A(I.error)}catch(I){const F=I&&typeof I=="object"&&"message"in I?String(I.message):typeof I=="string"?I:"";F.includes("Email not confirmed")||F.includes("email_not_confirmed")?A("Please confirm your email address before logging in. Check your inbox for the confirmation link."):F.includes("Invalid login credentials")?A("Invalid email or password. Please try again."):A(F||"Invalid login credentials")}};return u.jsxs("div",{className:"grid min-h-screen lg:grid-cols-[minmax(0,1fr),500px] xl:grid-cols-[minmax(0,1fr),596px] min-[1440px]:grid-cols-[minmax(0,844fr),minmax(0,596fr)]",style:{background:"#335CFF"},children:[u.jsx("div",{className:"flex h-full flex-col p-1.5 lg:p-2 lg:pr-0",children:u.jsxs("div",{className:"flex flex-1 flex-col rounded-2xl bg-bg-white-0 px-3.5 lg:px-11 lg:py-6",children:[u.jsxs("div",{className:"mx-auto flex w-full items-center justify-between gap-6 py-3.5 lg:py-0",children:[u.jsx(Nv,{className:"w-8 h-8 shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-right text-paragraph-sm text-text-sub-600",children:"Don't have an account?"}),u.jsx(ra,{to:"/sign-up",className:"inline-flex items-center justify-center px-2.5 h-8 gap-2.5 rounded-lg text-label-sm ring-1 ring-inset ring-transparent hover:ring-primary-base",style:{color:"#335CFF",background:"rgba(51, 92, 255, 0.1)"},children:"Register"})]})]}),u.jsx("div",{className:"flex flex-1 flex-col py-6 lg:py-[100px]",children:u.jsxs("div",{className:"mx-auto flex w-full max-w-[392px] flex-col gap-6",children:[u.jsxs("div",{className:"flex flex-col items-center gap-2",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center rounded-full backdrop-blur-xl lg:size-20 before:absolute before:inset-0 before:rounded-full before:bg-gradient-to-b before:from-primary-base before:to-transparent before:opacity-10",children:u.jsx("div",{className:"relative z-10 flex size-12 items-center justify-center rounded-full bg-bg-white-0 ring-1 ring-inset ring-stroke-soft-200 lg:size-14",style:{boxShadow:"0px 0px 0px 1px rgba(51, 92, 255, 0.04), 0px 1px 1px 0.5px rgba(51, 92, 255, 0.04), 0px 3px 3px -1.5px rgba(51, 92, 255, 0.02), 0px 6px 6px -3px rgba(51, 92, 255, 0.04), 0px 12px 12px -6px rgba(51, 92, 255, 0.04), 0px 24px 24px -12px rgba(51, 92, 255, 0.04), 0px 48px 48px -24px rgba(51, 92, 255, 0.04), inset 0px -1px 1px -0.5px rgba(51, 92, 255, 0.06)"},children:u.jsx(QN,{className:"size-6 lg:size-7",style:{color:"#335CFF"}})})}),u.jsxs("div",{className:"space-y-1 text-center",children:[u.jsx("div",{className:"font-inter-var text-title-h6 lg:text-title-h5",children:"Login to your account"}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:"Enter your details to login."})]})]}),u.jsxs(nR,{mode:"stroke",brand:"google",className:"w-full",onClick:()=>s(),children:[u.jsx("img",{src:G8e,alt:"Google",className:"size-5"}),u.jsx("span",{children:"Continue with Google"})]}),u.jsx(Yi,{variant:"line-text",children:"OR"}),u.jsxs("form",{onSubmit:D,className:"space-y-3",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsxs(It,{htmlFor:"email",children:["Email Address ",u.jsx(ss,{})]}),u.jsx(Tn,{children:u.jsxs(Vn,{children:[u.jsx(dc,{as:XO}),u.jsx(Mn,{id:"email",name:"email",type:"email",placeholder:"[email protected]",value:m.email,onChange:R=>O("email",R.target.value),onBlur:()=>T("email"),required:!0})]})}),v.email&&C.email&&u.jsx("div",{className:"text-paragraph-sm text-error-dark mt-1",children:C.email})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsxs(It,{htmlFor:"password",children:["Password ",u.jsx(ss,{})]}),u.jsx(K8e,{id:"password",name:"password",value:m.password,onChange:R=>O("password",R.target.value),onBlur:()=>T("password"),required:!0}),v.password&&C.password&&u.jsx("div",{className:"text-paragraph-sm text-error-dark mt-1",children:C.password})]})]}),E&&u.jsx("div",{className:"w-full rounded-lg bg-error-lighter p-4 text-error-dark text-paragraph-sm",children:E}),u.jsxs("div",{className:"flex items-center justify-between gap-4",children:[u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx(r0,{id:"agree"}),u.jsx(KO,{htmlFor:"agree",className:"cursor-pointer text-paragraph-sm text-text-strong-950",children:"Keep me logged in"})]}),u.jsx(yre,{variant:"gray",size:"medium",underline:!0,asChild:!0,children:u.jsx(ra,{to:"/reset-password",children:"Forgot password?"})})]}),u.jsx(ql,{variant:"primary",size:"medium",type:"submit",disabled:o,className:"w-full",children:o?"Signing in...":"Login"})]})]})}),u.jsx("div",{className:"mt-auto pb-4 lg:pb-0",children:u.jsx("div",{className:"text-paragraph-sm text-text-sub-600",children:"© 2025 Seio"})})]})}),u.jsx("div",{className:"hidden lg:block",children:u.jsx("div",{className:"relative size-full",children:u.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center",children:[u.jsx("img",{src:"/images/auth-bg-pattern.svg",width:"596",height:"596",alt:"",className:"absolute right-0 top-0 size-full object-contain object-right-top"}),u.jsxs("div",{className:"flex flex-col gap-10 w-full max-w-[452px] px-6 relative z-10",children:[u.jsx("div",{className:"w-full",children:u.jsx(rR,{})}),u.jsxs("div",{className:`flex w-full flex-col gap-7 transition-all duration-300 ease-in-out ${d?"opacity-0 translate-y-2":"opacity-100 translate-y-0"}`,children:[u.jsxs("div",{className:"font-inter-var text-title-h5 text-white/[.72]",children:[u.jsx("span",{className:"text-white",children:go[l].highlight})," ",go[l].rest]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("div",{className:"relative shrink-0",children:[u.jsx("img",{src:go[l].avatar,alt:go[l].name,className:"size-10 rounded-full object-cover"}),u.jsx("img",{src:go[l].companyLogo,alt:go[l].company,className:"absolute -bottom-0.5 -right-0.5 size-5 rounded-full border-2 border-[#335CFF] object-cover"})]}),u.jsxs("div",{children:[u.jsx("a",{href:go[l].link,target:"_blank",rel:"noopener noreferrer",className:"text-label-md text-white hover:underline",children:go[l].name}),u.jsxs("div",{className:"mt-0.5 text-label-sm text-white/[.72]",children:[go[l].role," / ",u.jsx("a",{href:go[l].companyLink,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:go[l].company})]})]})]})]}),u.jsx("div",{className:"flex gap-1.5",children:go.map((R,I)=>u.jsx("button",{type:"button",onClick:()=>p(I),className:`h-1 shrink-0 rounded-full transition-all duration-200 ease-out ${I===l?"w-4 bg-static-white":"w-1"}`,style:I!==l?{background:"rgba(30, 64, 175, 1)"}:void 0},I))})]})]})})})]})}const X8e="/icons/brands/google.svg";
73function Z8e(e){const[t,n]=x.useState(!1);return u.jsx(Tn,{children:u.jsxs(Vn,{children:[u.jsx(dc,{as:One}),u.jsx(Mn,{type:t?"text":"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢",...e}),u.jsx("button",{type:"button",onClick:()=>n(r=>!r),children:t?u.jsx(Nne,{className:"size-5 text-text-soft-400"}):u.jsx(Ane,{className:"size-5 text-text-soft-400"})})]})})}const yo=[{highlight:"Another great tool by George ðð» congrats ð¥",rest:"and thanks for helping us boost our SEO",name:"Yogesh Gosavi",role:"Founder",company:"One4Wall",avatar:"/images/youri.jpg",companyLogo:"/images/one4wall.webp",link:"https://www.one4studio.com/",companyLink:"https://www.one4studio.com/"},{highlight:"Seio has been incredibly useful for quickly generating excellent SEO content for my website.",rest:"It uses the right tags to produce content that sounds very human, and it's much better than other similar products. Of course, I always make a few tweaks, but it's the perfect starting point for my website content! Thanks, George, for creating such a fantastic product!",name:"Marius Bongarts",role:"Founder",company:"Web Highlights",avatar:"/images/marius.jpg",companyLogo:"/images/web-highlights.jpg",link:"https://web-highlights.com/",companyLink:"https://web-highlights.com/"}];function Q8e(){const e=br(),[t,{isLoading:n}]=bCe(),[r]=ane(),{data:i,refetch:o}=rm(),[s,a]=x.useState(0),[l,c]=x.useState(!1),d=x.useCallback(b=>{b!==s&&(c(!0),setTimeout(()=>{a(b),c(!1)},300))},[s]);x.useEffect(()=>{const b=setInterval(()=>{d((s+1)%yo.length)},7e3);return()=>clearInterval(b)},[s,d]);const[f,p]=x.useState({fullName:"",email:"",password:""}),[m,y]=x.useState(null),v=async b=>{b.preventDefault(),y(null);try{const C=await t({email:f.email,password:f.password,metadata:{full_name:f.fullName,role:"User"}}).unwrap();if(console.log("SignUp result:",C),C.success&&C.user)if(C.session){ze.success("Registration successful! Redirecting to onboarding...");let S=0;const E=5,A=async()=>{const{data:_}=await o();console.log("Session check:",_),_!=null&&_.session?e("/onboarding"):S<E?(S++,setTimeout(A,500)):e("/onboarding")};setTimeout(A,200)}else e("/confirm-email");else C.error&&y(C.error)}catch(C){y(typeof C=="string"?C:"An error occurred during registration")}};return u.jsxs("div",{className:"grid min-h-screen lg:grid-cols-[minmax(0,1fr),500px] xl:grid-cols-[minmax(0,1fr),596px] min-[1440px]:grid-cols-[minmax(0,844fr),minmax(0,596fr)]",style:{background:"#335CFF"},children:[u.jsx("div",{className:"flex h-full flex-col p-1.5 lg:p-2 lg:pr-0",children:u.jsxs("div",{className:"flex flex-1 flex-col rounded-2xl bg-bg-white-0 px-3.5 lg:px-11 lg:py-6",children:[u.jsxs("div",{className:"mx-auto flex w-full items-center justify-between gap-6 py-3.5 lg:py-0",children:[u.jsx(Nv,{className:"w-8 h-8 shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-right text-paragraph-sm text-text-sub-600",children:"Already have an account?"}),u.jsx(ra,{to:"/sign-in",className:"inline-flex items-center justify-center px-2.5 h-8 gap-2.5 rounded-lg text-label-sm ring-1 ring-inset ring-transparent hover:ring-primary-base",style:{color:"#335CFF",background:"rgba(51, 92, 255, 0.1)"},children:"Login"})]})]}),u.jsx("div",{className:"flex flex-1 flex-col py-6 lg:py-[100px]",children:u.jsxs("div",{className:"mx-auto flex w-full max-w-[392px] flex-col gap-6",children:[u.jsxs("div",{className:"flex flex-col items-center gap-2",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center rounded-full backdrop-blur-xl lg:size-20 before:absolute before:inset-0 before:rounded-full before:bg-gradient-to-b before:from-primary-base before:to-transparent before:opacity-10",children:u.jsx("div",{className:"relative z-10 flex size-12 items-center justify-center rounded-full bg-bg-white-0 ring-1 ring-inset ring-stroke-soft-200 lg:size-14",style:{boxShadow:"0px 0px 0px 1px rgba(51, 92, 255, 0.04), 0px 1px 1px 0.5px rgba(51, 92, 255, 0.04), 0px 3px 3px -1.5px rgba(51, 92, 255, 0.02), 0px 6px 6px -3px rgba(51, 92, 255, 0.04), 0px 12px 12px -6px rgba(51, 92, 255, 0.04), 0px 24px 24px -12px rgba(51, 92, 255, 0.04), 0px 48px 48px -24px rgba(51, 92, 255, 0.04), inset 0px -1px 1px -0.5px rgba(51, 92, 255, 0.06)"},children:u.jsx(QN,{className:"size-6 lg:size-7",style:{color:"#335CFF"}})})}),u.jsxs("div",{className:"space-y-1 text-center",children:[u.jsx("div",{className:"font-inter-var text-title-h6 lg:text-title-h5",children:"Create your account"}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:"Enter your details to register."})]})]}),m&&u.jsx("div",{className:"w-full rounded-lg bg-error-lighter p-4 text-error-dark text-paragraph-sm",children:m}),u.jsxs(nR,{mode:"stroke",brand:"google",className:"w-full",onClick:()=>r(),children:[u.jsx("img",{src:X8e,alt:"Google",className:"size-5"}),u.jsx("span",{children:"Continue with Google"})]}),u.jsx(Yi,{variant:"line-text",children:"OR"}),u.jsxs("form",{onSubmit:v,className:"space-y-3",children:[u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsxs(It,{htmlFor:"fullName",children:["Full Name ",u.jsx(ss,{})]}),u.jsx(Tn,{children:u.jsxs(Vn,{children:[u.jsx(dc,{as:QN}),u.jsx(Mn,{id:"fullName",name:"fullName",type:"text",placeholder:"John Doe",value:f.fullName,onChange:b=>p({...f,fullName:b.target.value}),required:!0})]})})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsxs(It,{htmlFor:"email",children:["Email Address ",u.jsx(ss,{})]}),u.jsx(Tn,{children:u.jsxs(Vn,{children:[u.jsx(dc,{as:XO}),u.jsx(Mn,{id:"email",name:"email",type:"email",placeholder:"[email protected]",value:f.email,onChange:b=>p({...f,email:b.target.value}),required:!0})]})})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsxs(It,{htmlFor:"password",children:["Password ",u.jsx(ss,{})]}),u.jsx(Z8e,{id:"password",name:"password",value:f.password,onChange:b=>p({...f,password:b.target.value}),required:!0})]})]}),u.jsx("div",{className:"flex items-center justify-between gap-4",children:u.jsxs("div",{className:"flex items-start gap-2",children:[u.jsx(r0,{id:"newsletter"}),u.jsx(KO,{htmlFor:"newsletter",className:"cursor-pointer text-paragraph-sm text-text-strong-950",children:"Email me about product news"})]})}),u.jsx(ql,{variant:"primary",size:"medium",type:"submit",disabled:n,className:"w-full",children:n?"Creating account...":"Sign Up"})]})]})}),u.jsx("div",{className:"mt-auto pb-4 lg:pb-0",children:u.jsx("div",{className:"text-paragraph-sm text-text-sub-600",children:"© 2025 Seio"})})]})}),u.jsx("div",{className:"hidden lg:block",children:u.jsx("div",{className:"relative size-full",children:u.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center",children:[u.jsx("img",{src:"/images/auth-bg-pattern.svg",width:"596",height:"596",alt:"",className:"absolute right-0 top-0 size-full object-contain object-right-top"}),u.jsxs("div",{className:"flex flex-col gap-10 w-full max-w-[452px] px-6 relative z-10",children:[u.jsx("div",{className:"w-full",children:u.jsx(rR,{})}),u.jsxs("div",{className:`flex w-full flex-col gap-7 transition-all duration-300 ease-in-out ${l?"opacity-0 translate-y-2":"opacity-100 translate-y-0"}`,children:[u.jsxs("div",{className:"font-inter-var text-title-h5 text-white/[.72]",children:[u.jsx("span",{className:"text-white",children:yo[s].highlight})," ",yo[s].rest]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("div",{className:"relative shrink-0",children:[u.jsx("img",{src:yo[s].avatar,alt:yo[s].name,className:"size-10 rounded-full object-cover"}),u.jsx("img",{src:yo[s].companyLogo,alt:yo[s].company,className:"absolute -bottom-0.5 -right-0.5 size-5 rounded-full border-2 border-[#335CFF] object-cover"})]}),u.jsxs("div",{children:[u.jsx("a",{href:yo[s].link,target:"_blank",rel:"noopener noreferrer",className:"text-label-md text-white hover:underline",children:yo[s].name}),u.jsxs("div",{className:"mt-0.5 text-label-sm text-white/[.72]",children:[yo[s].role," / ",u.jsx("a",{href:yo[s].companyLink,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:yo[s].company})]})]})]})]}),u.jsx("div",{className:"flex gap-1.5",children:yo.map((b,C)=>u.jsx("button",{type:"button",onClick:()=>d(C),className:`h-1 shrink-0 rounded-full transition-all duration-200 ease-out ${C===s?"w-4 bg-static-white":"w-1"}`,style:C!==s?{background:"rgba(30, 64, 175, 1)"}:void 0},C))})]})]})})})]})}function J8e(){return u.jsxs("div",{className:"grid min-h-screen lg:grid-cols-[minmax(0,1fr),500px] xl:grid-cols-[minmax(0,1fr),596px] min-[1440px]:grid-cols-[minmax(0,844fr),minmax(0,596fr)]",style:{background:"#335CFF"},children:[u.jsx("div",{className:"flex h-full flex-col p-1.5 lg:p-2 lg:pr-0",children:u.jsxs("div",{className:"flex flex-1 flex-col rounded-2xl bg-bg-white-0 px-3.5 lg:px-11 lg:py-6",children:[u.jsxs("div",{className:"mx-auto flex w-full items-center justify-between gap-6 py-3.5 lg:py-0",children:[u.jsx(Nv,{className:"w-8 h-8 shrink-0"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-right text-paragraph-sm text-text-sub-600",children:"Already confirmed?"}),u.jsx(ra,{to:"/sign-in",className:"inline-flex items-center justify-center px-2.5 h-8 gap-2.5 rounded-lg text-label-sm r
73ing-1 ring-inset ring-transparent hover:ring-primary-base",style:{color:"#335CFF",background:"rgba(51, 92, 255, 0.1)"},children:"Login"})]})]}),u.jsx("div",{className:"flex flex-1 flex-col py-6 lg:py-[100px]",children:u.jsxs("div",{className:"mx-auto flex w-full max-w-[392px] flex-col gap-6",children:[u.jsxs("div",{className:"flex flex-col items-center gap-2",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center rounded-full backdrop-blur-xl lg:size-20 before:absolute before:inset-0 before:rounded-full before:bg-gradient-to-b before:from-primary-base before:to-transparent before:opacity-10",children:u.jsx("div",{className:"relative z-10 flex size-12 items-center justify-center rounded-full bg-bg-white-0 ring-1 ring-inset ring-stroke-soft-200 lg:size-14",style:{boxShadow:"0px 0px 0px 1px rgba(51, 92, 255, 0.04), 0px 1px 1px 0.5px rgba(51, 92, 255, 0.04), 0px 3px 3px -1.5px rgba(51, 92, 255, 0.02), 0px 6px 6px -3px rgba(51, 92, 255, 0.04), 0px 12px 12px -6px rgba(51, 92, 255, 0.04), 0px 24px 24px -12px rgba(51, 92, 255, 0.04), 0px 48px 48px -24px rgba(51, 92, 255, 0.04), inset 0px -1px 1px -0.5px rgba(51, 92, 255, 0.06)"},children:u.jsx(XO,{className:"size-6 lg:size-7",style:{color:"#335CFF"}})})}),u.jsxs("div",{className:"space-y-1 text-center",children:[u.jsx("div",{className:"font-inter-var text-title-h6 lg:text-title-h5",children:"Check your email"}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:"We've sent you a confirmation link. Click the link in your email to get started."})]})]}),u.jsxs("div",{className:"w-full rounded-lg bg-success-lighter p-4 flex items-start gap-3",children:[u.jsx(vSe,{className:"size-5 text-success-base shrink-0 mt-0.5"}),u.jsxs("div",{className:"text-paragraph-sm text-success-dark",children:[u.jsx("p",{className:"font-medium mb-1",children:"Registration successful!"}),u.jsx("p",{children:"Please check your inbox and click the confirmation link to activate your account."})]})]}),u.jsxs("div",{className:"space-y-3 text-center",children:[u.jsx("p",{className:"text-paragraph-sm text-text-sub-600",children:"Didn't receive the email? Check your spam folder or contact support."}),u.jsx("p",{className:"text-paragraph-sm text-text-sub-600",children:"Once confirmed, you'll be able to log in and complete your onboarding."})]})]})}),u.jsx("div",{className:"mt-auto flex items-center justify-between gap-4 pb-4 lg:pb-0",children:u.jsx("div",{className:"text-paragraph-sm text-text-sub-600",children:"© 2025 Seio"})})]})}),u.jsx("div",{className:"hidden lg:block",children:u.jsx("div",{className:"relative size-full",children:u.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center",children:[u.jsx("img",{src:"/images/auth-bg-pattern.svg",width:"596",height:"596",alt:"",className:"absolute right-0 top-0 size-full object-contain object-right-top"}),u.jsxs("div",{className:"flex flex-col gap-10 w-full max-w-[452px] px-6 relative z-10",children:[u.jsx("div",{className:"w-full",children:u.jsx(rR,{})}),u.jsxs("div",{className:"flex w-full flex-col gap-7",children:[u.jsxs("div",{className:"font-inter-var text-title-h5 text-white/[.72]",children:[u.jsx("span",{className:"text-white",children:"Seio has revolutionised our SEO strategy, SEO is a breeze now."})," ","It's efficient and user-friendly, and saves us so much time and money."]}),u.jsxs("div",{children:[u.jsx("div",{className:"text-label-md text-white",children:"Wei Chen"}),u.jsx("div",{className:"mt-1 text-label-sm text-white/[.72]",children:"Founder / Devremote"})]})]}),u.jsxs("div",{className:"flex gap-1.5",children:[u.jsx("button",{type:"button",className:"size-1 shrink-0 rounded-full transition-all duration-200 ease-out w-4 bg-static-white"}),u.jsx("button",{type:"button",className:"size-1 shrink-0 rounded-full transition-all duration-200 ease-out",style:{background:"rgba(30, 64, 175, 1)"}}),u.jsx("button",{type:"button",className:"size-1 shrink-0 rounded-full transition-all duration-200 ease-out",style:{background:"rgba(30, 64, 175, 1)"}})]})]})]})})})]})}
73function e7e(){const e=br(),t=am();return x.useEffect(()=>{const{data:{subscription:n}}=Ds.auth.onAuthStateChange(async r=>{if(r==="SIGNED_IN"){t(jf.util.invalidateTags(["Auth"]));try{const i=await t(Yn.endpoints.getUserProfile.initiate());!i.data||!i.data.onboardingComplete?e("/onboarding",{replace:!0}):e("/",{replace:!0})}catch{e("/onboarding",{replace:!0})}}});return()=>{n.unsubscribe()}},[e,t]),u.jsx("div",{className:"flex min-h-screen items-center justify-center",children:u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"text-title-h6 text-text-strong-950",children:"Signing you in..."}),u.jsx("div",{className:"mt-2 text-paragraph-sm text-text-sub-600",children:"Please wait while we complete authentication."})]})})}function vH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vre(...e){return t=>{let n=!1;const r=e.map(i=>{const o=vH(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():vH(e[i],null)}}}}function uh(...e){return x.useCallback(vre(...e),e)}var bre=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),o=i.find(n7e);
vendor: 4,553 bytes, line 73
73if(o){const s=o.props.children,a=i.map(l=>l===o?x.Children.count(s)>1?x.Children.only(null):x.isValidElement(s)?s.props.children:null:l);return u.jsx(ij,{...r,ref:t,children:x.isValidElement(s)?x.cloneElement(s,void 0,a):null})}return u.jsx(ij,{...r,ref:t,children:n})});bre.displayName="Slot";var ij=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=i7e(n),o=r7e(r,n.props);return n.type!==x.Fragment&&(o.ref=t?vre(t,i):i),x.cloneElement(n,o)}return x.Children.count(n)>1?x.Children.only(null):null});ij.displayName="SlotClone";var t7e=({children:e})=>u.jsx(u.Fragment,{children:e});function n7e(e){return x.isValidElement(e)&&e.type===t7e}function r7e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function i7e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var o7e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mv=o7e.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?bre:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),wi=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{};function s7e(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Ov=e=>{const{present:t,children:n}=e,r=a7e(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=uh(r.ref,l7e(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};Ov.displayName="Presence";function a7e(e){const[t,n]=x.useState(),r=x.useRef({}),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=s7e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=Qx(r.current);o.current=a==="mounted"?c:"none"},[a]),wi(()=>{const c=r.current,d=i.current;if(d!==e){const p=o.current,m=Qx(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),wi(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const v=Qx(r.current).includes(m.animationName);if(m.target===t&&v&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=m=>{m.target===t&&(o.current=Qx(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Qx(e){return(e==null?void 0:e.animationName)||"none"}function l7e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function c7e(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,u7e(i,...t)]}function u7e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c}
vendor: 1,662 bytes, line 73
73)=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function vi(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var d7e=x.createContext(void 0);function f7e(e){const t=x.useContext(d7e);return e||t||"ltr"}function oj(e,[t,n]){return Math.min(n,Math.max(t,e))}function Tf(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function h7e(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var iR="ScrollArea",[xre,_St]=c7e(iR),[p7e,ms]=xre(iR),wre=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=e,[a,l]=x.useState(null),[c,d]=x.useState(null),[f,p]=x.useState(null),[m,y]=x.useState(null),[v,b]=x.useState(null),[C,S]=x.useState(0),[E,A]=x.useState(0),[_,N]=x.useState(!1),[j,T]=x.useState(!1),O=uh(t,R=>l(R)),D=f7e(i);return u.jsx(p7e,{scope:n,type:r,dir:D,scrollHideDelay:o,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:p,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:_,onScrollbarXEnabledChange:N,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:j,onScrollbarYEnabledChange:T,onCornerWidthChange:S,onCornerHeightChange:A,children:u.jsx(Mv.div,{dir:D,...s,ref:O,style:{position:"relative","--radix-scroll-area-corner-width":C+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})})});wre.displayName=iR;var Cre="ScrollAreaViewport",Sre=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}
vendor: 23,040 bytes, line 73
73=e,s=ms(Cre,n),a=x.useRef(null),l=uh(t,a,s.onViewportChange);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),u.jsx(Mv.div,{"data-radix-scroll-area-viewport":"",...o,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:u.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Sre.displayName=Cre;var Qa="ScrollAreaScrollbar",Ere=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ms(Qa,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=e.orientation==="horizontal";return x.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?u.jsx(m7e,{...r,ref:t,forceMount:n}):i.type==="scroll"?u.jsx(g7e,{...r,ref:t,forceMount:n}):i.type==="auto"?u.jsx(kre,{...r,ref:t,forceMount:n}):i.type==="always"?u.jsx(oR,{...r,ref:t}):null});Ere.displayName=Qa;var m7e=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ms(Qa,e.__scopeScrollArea),[o,s]=x.useState(!1);return x.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),s(!0)},d=()=>{l=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),u.jsx(Ov,{present:n||o,children:u.jsx(kre,{"data-state":o?"visible":"hidden",...r,ref:t})})}),g7e=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ms(Qa,e.__scopeScrollArea),o=e.orientation==="horizontal",s=P5(()=>l("SCROLL_END"),100),[a,l]=h7e("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,i.scrollHideDelay,l]),x.useEffect(()=>{const c=i.viewport,d=o?"scrollLeft":"scrollTop";if(c){let f=c[d];const p=()=>{const m=c[d];f!==m&&(l("SCROLL"),s()),f=m};return c.addEventListener("scroll",p),()=>c.removeEventListener("scroll",p)}},[i.viewport,o,l,s]),u.jsx(Ov,{present:n||a!=="hidden",children:u.jsx(oR,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Tf(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Tf(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),kre=x.forwardRef((e,t)=>{const n=ms(Qa,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,s]=x.useState(!1),a=e.orientation==="horizontal",l=P5(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?c:d)}},10);return i0(n.viewport,l),i0(n.content,l),u.jsx(Ov,{present:r||o,children:u.jsx(oR,{"data-state":o?"visible":"hidden",...i,ref:t})})}),oR=x.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=ms(Qa,e.__scopeScrollArea),o=x.useRef(null),s=x.useRef(0),[a,l]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=jre(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:p=>o.current=p,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:p=>s.current=p};function f(p,m){return S7e(p,s.current,a,m)}return n==="horizontal"?u.jsx(y7e,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollLeft,m=bH(p,a,i.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollLeft=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollLeft=f(p,i.dir))}}):n==="vertical"?u.jsx(v7e,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const p=i.viewport.scrollTop,m=bH(p,a);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:p=>{i.viewport&&(i.viewport.scrollTop=p)},onDragScroll:p=>{i.viewport&&(i.viewport.scrollTop=f(p))}}):null}),y7e=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ms(Qa,e.__scopeScrollArea),[s,a]=x.useState(),l=x.useRef(null),c=uh(t,l,o.onScrollbarXChange);return x.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(Are,{"data-orientation":"horizontal",...i,ref:c,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":R5(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(o.viewport){const p=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(p),Mre(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Vw(s.paddingLeft),paddingEnd:Vw(s.paddingRight)}})}})}),v7e=x.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=ms(Qa,e.__scopeScrollArea),[s,a]=x.useState(),l=x.useRef(null),c=uh(t,l,o.onScrollbarYChange);return x.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),u.jsx(Are,{"data-orientation":"vertical",...i,ref:c,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":R5(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(o.viewport){const p=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(p),Mre(p,f)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Vw(s.paddingTop),paddingEnd:Vw(s.paddingBottom)}})}})}),[b7e,_re]=xre(Qa),Are=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...p}=e,m=ms(Qa,n),[y,v]=x.useState(null),b=uh(t,O=>v(O)),C=x.useRef(null),S=x.useRef(""),E=m.viewport,A=r.content-r.viewport,_=vi(d),N=vi(l),j=P5(f,10);function T(O){if(C.current){const D=O.clientX-C.current.left,R=O.clientY-C.current.top;c({x:D,y:R})}}return x.useEffect(()=>{const O=D=>{const R=D.target;(y==null?void 0:y.contains(R))&&_(D,A)};return document.addEventListener("wheel",O,{passive:!1}),()=>document.removeEventListener("wheel",O,{passive:!1})},[E,y,A,_]),x.useEffect(N,[r,N]),i0(y,j),i0(m.content,j),u.jsx(b7e,{scope:n,scrollbar:y,hasThumb:i,onThumbChange:vi(o),onThumbPointerUp:vi(s),onThumbPositionChange:N,onThumbPointerDown:vi(a),children:u.jsx(Mv.div,{...p,ref:b,style:{position:"absolute",...p.style},onPointerDown:Tf(e.onPointerDown,O=>{O.button===0&&(O.target.setPointerCapture(O.pointerId),C.current=y.getBoundingClientRect(),S.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),T(O))}),onPointerMove:Tf(e.onPointerMove,T),onPointerUp:Tf(e.onPointerUp,O=>{const D=O.target;D.hasPointerCapture(O.pointerId)&&D.releasePointerCapture(O.pointerId),document.body.style.webkitUserSelect=S.current,m.viewport&&(m.viewport.style.scrollBehavior=""),C.current=null})})})}),Hw="ScrollAreaThumb",Nre=x.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_re(Hw,e.__scopeScrollArea);return u.jsx(Ov,{present:n||i.hasThumb,children:u.jsx(x7e,{ref:t,...r})})}),x7e=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=ms(Hw,n),s=_re(Hw,n),{onThumbPositionChange:a}=s,l=uh(t,f=>s.onThumbChange(f)),c=x.useRef(void 0),d=P5(()=>{c.current&&(c.current(),c.current=void 0)},100);return x.useEffect(()=>{const f=o.viewport;if(f){const p=()=>{if(d(),!c.current){const m=E7e(f,a);c.current=m,a()}};return a(),f.addEventListener("scroll",p),()=>f.removeEventListener("scroll",p)}},[o.viewport,d,a]),u.jsx(Mv.div,{"data-state":s.hasThumb?"visible":"hidden",...i,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Tf(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),y=f.clientX-m.left,v=f.clientY-m.top;s.onThumbPointerDown({x:y,y:v})}),onPointerUp:Tf(e.onPointerUp,s.onThumbPointerUp)})});Nre.displayName=Hw;var sR="ScrollAreaCorner",w7e=x.forwardRef((e,t)=>{const n=ms(sR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?u.jsx(C7e,{...e,ref:t}):null});w7e.displayName=sR;var C7e=x.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=ms(sR,n),[o,s]=x.useState(0),[a,l]=x.useState(0),c=!!(o&&a);return i0(i.scrollbarX,()=>{var f;const d=((f=i.scrollbarX)==null?void 0:f.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),i0(i.scrollbarY,()=>{var f;const d=((f=i.scrollbarY)==null?void 0:f.offsetWidth)||0;i.onCornerWidthChange(d),s(d)}),c?u.jsx(Mv.div,{...r,ref:t,style:{width:o,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Vw(e){return e?parseInt(e,10):0}function jre(e,t){const n=e/t;return isNaN(n)?0:n}function R5(e){const t=jre(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function S7e(e,t,n,r="ltr"){const i=R5(n),o=i/2,s=t||o,a=i-s,l=n.scrollbar.paddingStart+s,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Tre([l,c],f)(e)}function bH(e,t,n="ltr"){const r=R5(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,s=t.content-t.viewport,a=o-r,l=n==="ltr"?[0,s]:[s*-1,0],c=oj(e,l);return Tre([0,s],[0,a])(c)}function Tre(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Mre(e,t){return e>0&&e<t}var E7e=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function P5(e,t){const n=vi(e),r=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),x.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function i0(e,t){const n=vi(t);wi(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var k7e=wre,_7e=Sre,A7e=Ere,N7e=Nre;function fr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function aR(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,j7e(i,...t)]}function j7e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function xH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ore(...e){return t=>{let n=!1;const r=e.map(i=>{const o=xH(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():xH(e[i],null)}}}}function oi(...e){return x.useCallback(Ore(...e),e)}var J1=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),o=i.find(M7e);if(o){const s=o.props.children,a=i.map(l=>l===o?x.Children.count(s)>1?x.Children.only(null):x.isValidElement(s)?s.props.children:null:l);return u.jsx(sj,{...r,ref:t,children:x.isValidElement(s)?x.cloneElement(s,void 0,a):null})}return u.jsx(sj,{...r,ref:t,children:n})});J1.displayName="Slot";var sj=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=R7e(n),o=O7e(r,n.props);return n.type!==x.Fragment&&(o.ref=t?Ore(t,i):i),x.cloneElement(n,o)}return x.Children.count(n)>1?x.Children.only(null):null});sj.displayName="SlotClone";var T7e=({children:e})=>u.jsx(u.Fragment,{children:e});function M7e(e){return x.isValidElement(e)&&e.type===T7e}function O7e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function R7e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function P7e(e){const t=e+"CollectionProvider",[n,r]=aR(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:y,children:v}=m,b=K.useRef(null),C=K.useRef(new Map).current;return u.jsx(i,{scope:y,itemMap:C,collectionRef:b,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=K.forwardRef((m,y)=>{const{scope:v,children:b}=m,C=o(a,v),S=oi(y,C.collectionRef);return u.jsx(J1,{ref:S,children:b})});l.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=K.forwardRef((m,y)=>{const{scope:v,children:b,...C}=m,S=K.useRef(null),E=oi(y,S),A=o(c,v);return K.useEffect(()=>(A.itemMap.set(S,{ref:S,...C}),()=>void A.itemMap.delete(S))),u.jsx(J1,{[d]:"",ref:E,children:b})});f.displayName=c;function p(m){const y=o(e+"CollectionConsumer",m);return K.useCallback(()=>{const b=y.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((A,_)=>C.indexOf(A.ref.current)-C.indexOf(_.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:l,ItemSlot:f},p,r]}var D7e=x.createContext(void 0);function I7e(e){const t=x.useContext(D7e);return e||t||"ltr"}var L7e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Tr=L7e.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?J1:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function $7e(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function z7e(e,t=globalThis==null?void 0:globalThis.document){const n=vi(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var F7e="DismissableLayer",aj="dismissableLayer.update",B7e="dismissableLayer.pointerDownOutside",H7e="dismissableLayer.focusOutside",wH,Rre=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pre=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,c=x.useContext(Rre),[d,f]=x.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),y=oi(t,j=>f(j)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),S=d?v.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,A=S>=C,_=q7e(j=>{const T=j.target,O=[...c.branches].some(D=>D.contains(T));!A||O||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},p),N=W7e(j=>{const T=j.target;[...c.branches].some(D=>D.contains(T))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},p);return z7e(j=>{S===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},p),x.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wH=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),CH(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=wH)}},[d,p,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),CH())},[d,c]),x.useEffect(()=>{const j=()=>m({});return document.addEventListener(aj,j),()=>document.removeEventListener(aj,j)},[]),u.jsx(Tr.div,{...l,ref:y,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:fr(e.onFocusCapture,N.onFocusCapture),onBlurCapture:fr(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:fr(e.onPointerDownCapture,_.onPointerDownCapture)})});Pre.displayName=F7e;var V7e="DismissableLayerBranch",U7e=x.forwardRef((e,t)=>{const n=x.useContext(Rre),r=x.useRef(null),i=oi(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(Tr.div,{...e,ref:i})});U7e.displayName=V7e;function q7e(e,t=globalThis==null?void 0:globalThis.document){const n=vi(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Dre(B7e,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function W7e(e,t=globalThis==null?void 0:globalThis.document){const n=vi(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&Dre(H7e,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function CH(){const e=new CustomEvent(aj);document.dispatchEvent(e)}function Dre(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?$7e(i,o):i.dispatchEvent(o)}var _7=0;function G7e(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??SH()),document.body.insertAdjacentElement("beforeend",e[1]??SH()),_7++,()=>{_7===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_7--}},[])}function SH(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var A7="focusScope.autoFocusOnMount",N7="focusScope.autoFocusOnUnmount",EH={bubbles:!1,cancelable:!0},K7e="FocusScope",Ire=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=x.useState(null),c=vi(i),d=vi(o),f=x.useRef(null),p=oi(t,v=>l(v)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let v=function(E){if(m.paused||!a)return;const A=E.target;a.contains(A)?f.current=A:du(f.current,{select:!0})},b=function(E){if(m.paused||!a)return;const A=E.relatedTarget;A!==null&&(a.contains(A)||du(f.current,{select:!0}))},C=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&du(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const S=new MutationObserver(C);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),S.disconnect()}}},[r,a,m.paused]),x.useEffect(()=>{if(a){_H.add(m);const v=document.activeElement;if(!a.contains(v)){const C=new CustomEvent(A7,EH);a.addEventListener(A7,c),a.dispatchEvent(C),C.defaultPrevented||(Y7e(eEe(Lre(a)),{select:!0}),document.activeElement===v&&du(a))}return()=>{a.removeEventListener(A7,c),setTimeout(()=>{const C=new CustomEvent(N7,EH);a.addEventListener(N7,d),a.dispatchEvent(C),C.defaultPrevented||du(v??document.body,{select:!0}),a.removeEventListener(N7,d),_H.remove(m)},0)}}},[a,c,d,m]);const y=x.useCallback(v=>{if(!n&&!r||m.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,C=document.activeElement;if(b&&C){const S=v.currentTarget,[E,A]=X7e(S);E&&A?!v.shiftKey&&C===A?(v.preventDefault(),n&&du(E,{select:!0})):v.shiftKey&&C===E&&(v.preventDefault(),n&&du(A,{select:!0})):C===S&&v.preventDefault()}},[n,r,m.paused]);return u.jsx(Tr.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});Ire.displayName=K7e;function Y7e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(du(r,{select:t}),document.activeElement!==n)return}function X7e(e){const t=Lre(e),n=kH(t,e),r=kH(t.reverse(),e);return[n,r]}function Lre(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function kH(e,t){for(const n of e)if(!Z7e(n,{upTo:t}))return n}function Z7e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Q7e(e){return e instanceof HTMLInputElement&&"select"in e}function du(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Q7e(e)&&t&&e.select()}}var _H=J7e();function J7e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=AH(e,t),e.unshift(t)},remove(t){var n;e=AH(e,t),(n=e[0])==null||n.resume()}}}function AH(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function eEe(e){return e.filter(t=>t.tagName!=="A")}var tEe=xi.useId||(()=>{}),nEe=0;function lR(e){const[t,n]=x.useState(tEe());return wi(()=>{n(r=>r??String(nEe++))},[e]),t?`radix-${t}`:""}const $re=["top","right","bottom","left"],NH=["start","end"],jH=$re.reduce((e,t)=>e.concat(t,t+"-"+NH[0],t+"-"+NH[1]),[]),oa=Math.min,mi=Math.max,Uw=Math.round,Jx=Math.floor,Fa=e=>({x:e,y:e}),rEe={left:"right",right:"left",bottom:"top",top:"bottom"};
vendor: 5,057 bytes, line 73
73function lj(e,t,n){return mi(e,oa(t,n))}function sa(e,t){return typeof e=="function"?e(t):e}function No(e){return e.split("-")[0]}function Js(e){return e.split("-")[1]}function cR(e){return e==="x"?"y":"x"}function uR(e){return e==="y"?"height":"width"}function Hs(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function dR(e){return cR(Hs(e))}function zre(e,t,n){n===void 0&&(n=!1);const r=Js(e),i=dR(e),o=uR(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(s=Ww(s)),[s,Ww(s)]}function iEe(e){const t=Ww(e);return[qw(e),t,qw(t)]}function qw(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const TH=["left","right"],MH=["right","left"],oEe=["top","bottom"],sEe=["bottom","top"];function aEe(e,t,n){switch(e){case"top":case"bottom":return n?t?MH:TH:t?TH:MH;case"left":case"right":return t?oEe:sEe;default:return[]}}function lEe(e,t,n,r){const i=Js(e);let o=aEe(No(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(qw)))),o}function Ww(e){const t=No(e);return rEe[t]+e.slice(t.length)}function cEe(e){return{top:0,right:0,bottom:0,left:0,...e}}function fR(e){return typeof e!="number"?cEe(e):{top:e,right:e,bottom:e,left:e}}function o0(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function OH(e,t,n){let{reference:r,floating:i}=e;const o=Hs(t),s=dR(t),a=uR(s),l=No(t),c=o==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,p=r[a]/2-i[a]/2;let m;switch(l){case"top":m={x:d,y:r.y-i.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-i.width,y:f};break;default:m={x:r.x,y:r.y}}switch(Js(t)){case"start":m[s]-=p*(n&&c?-1:1);break;case"end":m[s]+=p*(n&&c?-1:1);break}return m}async function uEe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=sa(t,e),y=fR(m),b=a[p?f==="floating"?"reference":"floating":f],C=o0(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),S=f==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),A=await(o.isElement==null?void 0:o.isElement(E))?await(o.getScale==null?void 0:o.getScale(E))||{x:1,y:1}:{x:1,y:1},_=o0(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:S,offsetParent:E,strategy:l}):S);return{top:(C.top-_.top+y.top)/A.y,bottom:(_.bottom-C.bottom+y.bottom)/A.y,left:(C.left-_.left+y.left)/A.x,right:(_.right-C.right+y.right)/A.x}}const dEe=50,fEe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:uEe},l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=OH(c,r,l),p=r,m=0;const y={};for(let v=0;v<o.length;v++){const b=o[v];if(!b)continue;const{name:C,fn:S}=b,{x:E,y:A,data:_,reset:N}=await S({x:d,y:f,initialPlacement:r,placement:p,strategy:i,middlewareData:y,rects:c,platform:a,elements:{reference:e,floating:t}});d=E??d,f=A??f,y[C]={...y[C],..._},N&&m<dEe&&(m++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(c=N.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:d,y:f}=OH(c,p,l)),v=-1)}return{x:d,y:f,placement:p,strategy:i,middlewareData:y}},hEe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=sa(e,t)||{};if(c==null)return{};const f=fR(d),p={x:n,y:r},m=dR(i),y=uR(m),v=await s.getDimensions(c),b=m==="y",C=b?"top":"left",S=b?"bottom":"right",E=b?"clientHeight":"clientWidth",A=o.reference[y]+o.reference[m]-p[m]-o.floating[y],_=p[m]-o.reference[m],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let j=N?N[E]:0;(!j||!await(s.isElement==null?void 0:s.isElement(N)))&&(j=a.floating[E]||o.floating[y]);const T=A/2-_/2,O=j/2-v[y]/2-1,D=oa(f[C],O),R=oa(f[S],O),I=D,F=j-v[y]-R,$=j/2-v[y]/2+T,H=lj(I,$,F),L=!l.arrow&&Js(i)!=null&&$!==H&&o.reference[y]/2-($<I?D:R)-v[y]/2<0,B=L?$<I?$-I:$-F:0;return{[m]:p[m]+B,data:{[m]:H,centerOffset:$-H-B,...L&&{alignmentOffset:B}},reset:L}}});function pEe(e,t,n){return(e?[...n.filter(i=>Js(i)===e),...n.filter(i=>Js(i)!==e)]:n.filter(i=>No(i)===i)).filter(i=>e?Js(i)===e||(t?qw(i)!==i:!1):!0)}const mEe=function(e){return e===void 0&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,i;const{rects:o,middlewareData:s,placement:a,platform:l,elements:c}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:p=jH,autoAlignment:m=!0,...y}=sa(e,t),v=f!==void 0||p===jH?pEe(f||null,m,p):p,b=await l.detectOverflow(t,y
73),C=((n=s.autoPlacement)==null?void 0:n.index)||0,S=v[C];if(S==null)return{};const E=zre(S,o,await(l.isRTL==null?void 0:l.isRTL(c.floating)));if(a!==S)return{reset:{placement:v[0]}};const A=[b[No(S)],b[E[0]],b[E[1]]],_=[...((r=s.autoPlacement)==null?void 0:r.overflows)||[],{placement:S,overflows:A}],N=v[C+1];if(N)return{data:{index:C+1,overflows:_},reset:{placement:N}};const j=_.map(D=>{const R=Js(D.placement);return[D.placement,R&&d?D.overflows.slice(0,2).reduce((I,F)=>I+F,0):D.overflows[0],D.overflows]}).sort((D,R)=>D[1]-R[1]),O=((i=j.filter(D=>D[2].slice(0,Js(D[0])?2:3).every(R=>R<=0))[0])==null?void 0:i[0])||j[0][0];return O!==a?{data:{index:C+1,overflows:_},reset:{placement:O}}:{}}}},gEe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...b}=sa(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const C=No(i),S=Hs(a),E=No(a)===a,A=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=p||(E||!v?[Ww(a)]:iEe(a)),N=y!=="none";!p&&N&&_.push(...lEe(a,v,y,A));const j=[a,..._],T=await l.detectOverflow(t,b),O=[];let D=((r=o.flip)==null?void 0:r.overflows)||[];if(d&&O.push(T[C]),f){const $=zre(i,s,A);O.push(T[$[0]],T[$[1]])}if(D=[...D,{placement:i,overflows:O}],!O.every($=>$<=0)){var R,I;const $=(((R=o.flip)==null?void 0:R.index)||0)+1,H=j[$];if(H&&(!(f==="alignment"?S!==Hs(H):!1)||D.every(z=>Hs(z.placement)===S?z.overflows[0]>0:!0)))return{data:{index:$,overflows:D},reset:{placement:H}};let L=(I=D.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:I.placement;if(!L)switch(m){case"bestFit":{var F;const B=(F=D.filter(z=>{if(N){const V=Hs(z.placement);return V===S||V==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(V=>V>0).reduce((V,U)=>V+U,0)]).sort((z,V)=>z[1]-V[1])[0])==null?void 0:F[0];B&&(L=B);break}case"initialPlacement":L=a;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function RH(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function PH(e){return $re.some(t=>e[t]>=0)}const yEe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=sa(e,t);switch(i){case"referenceHidden":{const s=await r.detectOverflow(t,{...o,elementContext:"reference"}),a=RH(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:PH(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...o,altBoundary:!0}),a=RH(s,n.floating);return{data:{escapedOffsets:a,escaped:PH(a)}}}default:return{}}}}};function Fre(e){const t=oa(...e.map(o=>o.left)),n=oa(...e.map(o=>o.top)),r=mi(...e.map(o=>o.right)),i=mi(...e.map(o=>o.bottom));return{x:t,y:n,width:r-t,height:i-n}}function vEe(e){const t=e.slice().sort((i,o)=>i.y-o.y),n=[];let r=null;for(let i=0;i<t.length;i++){const o=t[i];!r||o.y-r.y>r.height/2?n.push([o]):n[n.length-1].push(o),r=o}return n.map(i=>o0(Fre(i)))}const bEe=function(e){return e===void 0&&(e={}),{name:"inline",options:e,async fn(t){const{placement:n,elements:r,rects:i,platform:o,strategy:s}=t,{padding:a=2,x:l,y:c}=sa(e,t),d=Array.from(await(o.getClientRects==null?void 0:o.getClientRects(r.reference))||[]),f=vEe(d),p=o0(Fre(d)),m=fR(a);function y(){if(f.length===2&&f[0].left>f[1].right&&l!=null&&c!=null)return f.find(b=>l>b.left-m.left&&l<b.right+m.right&&c>b.top-m.top&&c<b.bottom+m.bottom)||p;if(f.length>=2){if(Hs(n)==="y"){const D=f[0],R=f[f.length-1],I=No(n)==="top",F=D.top,$=R.bottom,H=I?D.left:R.left,L=I?D.right:R.right,B=L-H,z=$-F;return{top:F,bottom:$,left:H,right:L,width:B,height:z,x:H,y:F}}const b=No(n)==="left",C=mi(...f.map(D=>D.right)),S=oa(...f.map(D=>D.left)),E=f.filter(D=>b?D.left===S:D.right===C),A=E[0].top,_=E[E.length-1].bottom,N=S,j=C,T=j-N,O=_-A;return{top:A,bottom:_,left:N,right:j,width:T,height:O,x:N,y:A}}return p}const v=await o.getElementRects({reference:{getBoundingClientRect:y},floating:r.floating,strategy:s});return i.reference.x!==v.reference.x||i.reference.y!==v.reference.y||i.reference.width!==v.reference.width||i.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},Bre=new Set(["left","top"]);async function xEe(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=No(n),a=Js(n),l=Hs(n)==="y",c=Bre.has(s)?-1:1,d=o&&l?-1:1,f=sa(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}
vendor: 4,873 bytes, line 73
73:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*d,y:p*c}:{x:p*c,y:m*d}}const wEe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:s,middlewareData:a}=t,l=await xEe(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:s}}}}},CEe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:C=>{let{x:S,y:E}=C;return{x:S,y:E}}},...c}=sa(e,t),d={x:n,y:r},f=await o.detectOverflow(t,c),p=Hs(No(i)),m=cR(p);let y=d[m],v=d[p];if(s){const C=m==="y"?"top":"left",S=m==="y"?"bottom":"right",E=y+f[C],A=y-f[S];y=lj(E,y,A)}if(a){const C=p==="y"?"top":"left",S=p==="y"?"bottom":"right",E=v+f[C],A=v-f[S];v=lj(E,v,A)}const b=l.fn({...t,[m]:y,[p]:v});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[m]:s,[p]:a}}}}}},SEe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=sa(e,t),d={x:n,y:r},f=Hs(i),p=cR(f);let m=d[p],y=d[f];const v=sa(a,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const E=p==="y"?"height":"width",A=o.reference[p]-o.floating[E]+b.mainAxis,_=o.reference[p]+o.reference[E]-b.mainAxis;m<A?m=A:m>_&&(m=_)}if(c){var C,S;const E=p==="y"?"width":"height",A=Bre.has(No(i)),_=o.reference[f]-o.floating[E]+(A&&((C=s.offset)==null?void 0:C[f])||0)+(A?0:b.crossAxis),N=o.reference[f]+o.reference[E]+(A?0:((S=s.offset)==null?void 0:S[f])||0)-(A?b.crossAxis:0);y<_?y=_:y>N&&(y=N)}return{[p]:m,[f]:y}}}},EEe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:s,elements:a}=t,{apply:l=()=>{},...c}=sa(e,t),d=await s.detectOverflow(t,c),f=No(i),p=Js(i),m=Hs(i)==="y",{width:y,height:v}=o.floating;let b,C;f==="top"||f==="bottom"?(b=f,C=p===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(C=f,b=p==="end"?"top":"bottom");const S=v-d.top-d.bottom,E=y-d.left-d.right,A=oa(v-d[b],S),_=oa(y-d[C],E),N=!t.middlewareData.shift;let j=A,T=_;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(j=S),N&&!p){const D=mi(d.left,0),R=mi(d.right,0),I=mi(d.top,0),F=mi(d.bottom,0);m?T=y-2*(D!==0||R!==0?D+R:mi(d.left,d.right)):j=v-2*(I!==0||F!==0?I+F:mi(d.top,d.bottom))}await l({...t,availableWidth:T,availableHeight:j});const O=await s.getDimensions(a.floating);return y!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function D5(){return typeof window<"u"}function lm(e){return hR(e)?(e.nodeName||"").toLowerCase():"#document"}function to(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ja(e){var t;return(t=(hR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hR(e){return D5()?e instanceof Node||e instanceof to(e).Node:!1}function jn(e){return D5()?e instanceof Element||e instanceof to(e).Element:!1}function gs(e){return D5()?e instanceof HTMLElement||e instanceof to(e).HTMLElement:!1}function cj(e){return!D5()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof to(e).ShadowRoot}function Rv(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=fs(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function kEe(e){return/^(table|td|th)$/.test(lm(e))}function I5(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const _Ee=/transform|translate|scale|rotate|perspective|filter/,AEe=/paint|layout|strict|content/,rf=e=>!!e&&e!=="none";let j7;function pR(e){const t=jn(e)?fs(e):e;return rf(t.transform)||rf(t.translate)||rf(t.scale)||rf(t.rotate)||rf(t.perspective)||!L5()&&(rf(t.backdropFilter)||rf(t.filter))||_Ee.test(t.willChange||"")||AEe.test(t.contain||"")}function NEe(e){let t=fc(e);for(;gs(t)&&!tc(t);){if(pR(t))return t;if(I5(t))return null;t=fc(t)}return null}function L5(){return j7==null&&(j7=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),j7}function tc(e){return/^(html|body|#document)$/.test(lm(e))}function fs(e){return to(e).getComputedStyle(e)}function $5(e){return jn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function fc(e){if(lm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||cj(e)&&e.host||Ja(e);return cj(t)?t.host:t}function Hre(e){const t=fc(e);return tc(t)?e.ownerDocument?e.ownerDocument.body:e.body:gs(t)&&Rv(t)?t:Hre(t)}function Bu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Hre(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=to(i);if(o){const a=uj(s);
vendor: 19,754 bytes, line 73
73return t.concat(s,s.visualViewport||[],Rv(i)?i:[],a&&n?Bu(a):[])}else return t.concat(i,Bu(i,[],n))}function uj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Vre(e){const t=fs(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=gs(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Uw(n)!==o||Uw(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function mR(e){return jn(e)?e:e.contextElement}function Hp(e){const t=mR(e);if(!gs(t))return Fa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Vre(t);let s=(o?Uw(n.width):n.width)/r,a=(o?Uw(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const jEe=Fa(0);function Ure(e){const t=to(e);return!L5()||!t.visualViewport?jEe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TEe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==to(e)?!1:t}function Vf(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=mR(e);let s=Fa(1);t&&(r?jn(r)&&(s=Hp(r)):s=Hp(e));const a=TEe(o,n,r)?Ure(o):Fa(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(o){const p=to(o),m=r&&jn(r)?to(r):r;let y=p,v=uj(y);for(;v&&r&&m!==y;){const b=Hp(v),C=v.getBoundingClientRect(),S=fs(v),E=C.left+(v.clientLeft+parseFloat(S.paddingLeft))*b.x,A=C.top+(v.clientTop+parseFloat(S.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=E,c+=A,y=to(v),v=uj(y)}}return o0({width:d,height:f,x:l,y:c})}function z5(e,t){const n=$5(e).scrollLeft;return t?t.left+n:Vf(Ja(e)).left+n}function qre(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-z5(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function MEe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Ja(r),a=t?I5(t.floating):!1;if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Fa(1);const d=Fa(0),f=gs(r);if((f||!f&&!o)&&((lm(r)!=="body"||Rv(s))&&(l=$5(r)),f)){const m=Vf(r);c=Hp(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const p=s&&!f&&!o?qre(s,l):Fa(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+p.x,y:n.y*c.y-l.scrollTop*c.y+d.y+p.y}}function OEe(e){return Array.from(e.getClientRects())}function REe(e){const t=Ja(e),n=$5(e),r=e.ownerDocument.body,i=mi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=mi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+z5(e);const a=-n.scrollTop;return fs(r).direction==="rtl"&&(s+=mi(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:s,y:a}}const DH=25;function PEe(e,t){const n=to(e),r=Ja(e),i=n.visualViewport;let o=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){o=i.width,s=i.height;const d=L5();(!d||d&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const c=z5(r);if(c<=0){const d=r.ownerDocument,f=d.body,p=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-m);y<=DH&&(o-=y)}else c<=DH&&(o+=c);return{width:o,height:s,x:a,y:l}}function DEe(e,t){const n=Vf(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=gs(e)?Hp(e):Fa(1),s=e.clientWidth*o.x,a=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:s,height:a,x:l,y:c}}function IH(e,t,n){let r;if(t==="viewport")r=PEe(e,n);else if(t==="document")r=REe(Ja(e));else if(jn(t))r=DEe(t,n);else{const i=Ure(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return o0(r)}function Wre(e,t){const n=fc(e);return n===t||!jn(n)||tc(n)?!1:fs(n).position==="fixed"||Wre(n,t)}function IEe(e,t){const n=t.get(e);if(n)return n;let r=Bu(e,[],!1).filter(a=>jn(a)&&lm(a)!=="body"),i=null;const o=fs(e).position==="fixed";let s=o?fc(e):e;for(;jn(s)&&!tc(s);){const a=fs(s),l=pR(s);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Rv(s)&&!l&&Wre(e,s))?r=r.filter(d=>d!==s):i=a,s=fc(s)}return t.set(e,r),r}function LEe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?I5(t)?[]:IEe(t,this._c):[].concat(n),r],a=IH(t,s[0],i);let l=a.top,c=a.right,d=a.bottom,f=a.left;for(let p=1;p<s.length;p++){const m=IH(t,s[p],i);l=mi(m.top,l),c=oa(m.right,c),d=oa(m.bottom,d),f=mi(m.left,f)}return{width:c-f,height:d-l,x:f,y:l}}function $Ee(e){const{width:t,height:n}=Vre(e);return{width:t,height:n}}function zEe(e,t,n){const r=gs(t),i=Ja(t),o=n==="fixed",s=Vf(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=Fa(0);function c(){l.x=z5(i)}if(r||!r&&!o)if((lm(t)!=="body"||Rv(i))&&(a=$5(t)),r){const m=Vf(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=i&&!r&&!o?qre(i,a):Fa(0),f=s.left+a.scrollLeft-l.x-d.x,p=s.top+a.scrollTop-l.y-d.y;return{x:f,y:p,width:s.width,height:s.height}}function T7(e){return fs(e).position==="static"}function LH(e,t){if(!gs(e)||fs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ja(e)===n&&(n=n.ownerDocument.body),n}function Gre(e,t){const n=to(e);if(I5(e))return n;if(!gs(e)){let i=fc(e);for(;i&&!tc(i);){if(jn(i)&&!T7(i))return i;i=fc(i)}return n}let r=LH(e,t);for(;r&&kEe(r)&&T7(r);)r=LH(r,t);return r&&tc(r)&&T7(r)&&!pR(r)?n:r||NEe(e)||n}const FEe=async function(e){const t=this.getOffsetParent||Gre,n=this.getDimensions,r=await n(e.floating);return{reference:zEe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function BEe(e){return fs(e).direction==="rtl"}const HEe={convertOffsetParentRelativeRectToViewportRelativeRect:MEe,getDocumentElement:Ja,getClippingRect:LEe,getOffsetParent:Gre,getElementRects:FEe,getClientRects:OEe,getDimensions:$Ee,getScale:Hp,isElement:jn,isRTL:BEe};function Kre(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function VEe(e,t){let n=null,r;const i=Ja(e);function o(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=c;if(a||t(),!p||!m)return;const y=Jx(f),v=Jx(i.clientWidth-(d+p)),b=Jx(i.clientHeight-(f+m)),C=Jx(d),E={rootMargin:-y+"px "+-v+"px "+-b+"px "+-C+"px",threshold:mi(0,oa(1,l))||1};let A=!0;function _(N){const j=N[0].intersectionRatio;if(j!==l){if(!A)return s();j?s(!1,j):r=setTimeout(()=>{s(!1,1e-7)},1e3)}j===1&&!Kre(c,e.getBoundingClientRect())&&s(),A=!1}try{n=new IntersectionObserver(_,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,E)}n.observe(e)}return s(!0),o}function cm(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=mR(e),d=i||o?[...c?Bu(c):[],...t?Bu(t):[]]:[];d.forEach(C=>{i&&C.addEventListener("scroll",n,{passive:!0}),o&&C.addEventListener("resize",n)});const f=c&&a?VEe(c,n):null;let p=-1,m=null;s&&(m=new ResizeObserver(C=>{let[S]=C;S&&S.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=m)==null||E.observe(t)})),n()}),c&&!l&&m.observe(c),t&&m.observe(t));let y,v=l?Vf(e):null;l&&b();function b(){const C=Vf(e);v&&!Kre(v,C)&&n(),v=C,y=requestAnimationFrame(b)}return n(),()=>{var C;d.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),f==null||f(),(C=m)==null||C.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const gR=wEe,Yre=mEe,yR=CEe,vR=gEe,bR=EEe,xR=yEe,Gw=hEe,Xre=bEe,UEe=SEe,wR=(e,t,n)=>{const r=new Map,i={platform:HEe,...n},o={...i.platform,_c:r};return fEe(e,t,{...i,platform:o})};var qEe=typeof document<"u",WEe=function(){},ow=qEe?x.useLayoutEffect:WEe;function Kw(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Kw(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Kw(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Zre(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $H(e,t){const n=Zre(e);return Math.round(t*n)/n}function M7(e){const t=x.useRef(e);return ow(()=>{t.current=e}),t}function Pv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=x.useState(r);Kw(p,r)||m(r);const[y,v]=x.useState(null),[b,C]=x.useState(null),S=x.useCallback(z=>{z!==N.current&&(N.current=z,v(z))},[]),E=x.useCallback(z=>{z!==j.current&&(j.current=z,C(z))},[]),A=o||y,_=s||b,N=x.useRef(null),j=x.useRef(null),T=x.useRef(d),O=l!=null,D=M7(l),R=M7(i),I=M7(c),F=x.useCallback(()=>{if(!N.current||!j.current)return;const z={placement:t,strategy:n,middleware:p};R.current&&(z.platform=R.current),wR(N.current,j.current,z).then(V=>{const U={...V,isPositioned:I.current!==!1};$.current&&!Kw(T.current,U)&&(T.current=U,Si.flushSync(()=>{f(U)}))})},[p,t,n,R,I]);ow(()=>{c===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[c]);const $=x.useRef(!1);ow(()=>($.current=!0,()=>{$.current=!1}),[]),ow(()=>{if(A&&(N.current=A),_&&(j.current=_),A&&_){if(D.current)return D.current(A,_,F);F()}},[A,_,F,D,O]);const H=x.useMemo(()=>({reference:N,floating:j,setReference:S,setFloating:E}),[S,E]),L=x.useMemo(()=>({reference:A,floating:_}),[A,_]),B=x.useMemo(()=>{const z={position:n,left:0,top:0};if(!L.floating)return z;const V=$H(L.floating,d.x),U=$H(L.floating,d.y);return a?{...z,transform:"translate("+V+"px, "+U+"px)",...Zre(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:U}},[n,a,L.floating,d.x,d.y]);return x.useMemo(()=>({...d,update:F,refs:H,elements:L,floatingStyles:B}),[d,F,H,L,B])}const GEe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Gw({element:r.current,padding:i}).fn(n):{}:r?Gw({element:r,padding:i}).fn(n):{}}}},Dv=(e,t)=>{const n=gR(e);return{name:n.name,fn:n.fn,options:[e,t]}},Iv=(e,t)=>{const n=yR(e);return{name:n.name,fn:n.fn,options:[e,t]}},F5=(e,t)=>({fn:UEe(e).fn,options:[e,t]}),Lv=(e,t)=>{const n=vR(e);return{name:n.name,fn:n.fn,options:[e,t]}},B5=(e,t)=>{const n=bR(e);return{name:n.name,fn:n.fn,options:[e,t]}},H5=(e,t)=>{const n=xR(e);return{name:n.name,fn:n.fn,options:[e,t]}},V5=(e,t)=>{const n=GEe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var KEe="Arrow",Qre=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.jsx(Tr.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Qre.displayName=KEe;var YEe=Qre;function XEe(e){const[t,n]=x.useState(void 0);return wi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var CR="Popper",[Jre,eie]=aR(CR),[ZEe,tie]=Jre(CR),nie=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return u.jsx(ZEe,{scope:t,anchor:r,onAnchorChange:i,children:n})};nie.displayName=CR;var rie="PopperAnchor",iie=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=tie(rie,n),s=x.useRef(null),a=oi(t,s);return x.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:u.jsx(Tr.div,{...i,ref:a})});iie.displayName=rie;var SR="PopperContent",[QEe,JEe]=Jre(SR),oie=x.forwardRef((e,t)=>{var ie,se,oe,J,ae,re;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...v}=e,b=tie(SR,n),[C,S]=x.useState(null),E=oi(t,pe=>S(pe)),[A,_]=x.useState(null),N=XEe(A),j=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,O=r+(o!=="center"?"-"+o:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(c)?c:[c],I=R.length>0,F={padding:D,boundary:R.filter(tke),altBoundary:I},{refs:$,floatingStyles:H,placement:L,isPositioned:B,middlewareData:z}=Pv({strategy:"fixed",placement:O,whileElementsMounted:(...pe)=>cm(...pe,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[Dv({mainAxis:i+T,alignmentAxis:s}),l&&Iv({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?F5():void 0,...F}),l&&Lv({...F}),B5({...F,apply:({elements:pe,rects:be,availableWidth:xe,availableHeight:ke})=>{const{width:Pe,height:it}=be.reference,qe=pe.floating.style;qe.setProperty("--radix-popper-available-width",`${xe}px`),qe.setProperty("--radix-popper-available-height",`${ke}px`),qe.setProperty("--radix-popper-anchor-width",`${Pe}px`),qe.setProperty("--radix-popper-anchor-height",`${it}px`)}}),A&&V5({element:A,padding:a}),nke({arrowWidth:j,arrowHeight:T}),p&&H5({strategy:"referenceHidden",...F})]}),[V,U]=lie(L),W=vi(y);wi(()=>{B&&(W==null||W())},[B,W]);const G=(ie=z.arrow)==null?void 0:ie.x,Y=(se=z.arrow)==null?void 0:se.y,X=((oe=z.arrow)==null?void 0:oe.centerOffset)!==0,[Q,ne]=x.useState();return wi(()=>{C&&ne(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(J=z.transformOrigin)==null?void 0:J.x,(ae=z.transformOrigin)==null?void 0:ae.y].join(" "),...((re=z.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(QEe,{scope:n,placedSide:V,onArrowChange:_,arrowX:G,arrowY:Y,shouldHideArrow:X,children:u.jsx(Tr.div,{"data-side":V,"data-align":U,...v,ref:E,style:{...v.style,animation:B?void 0:"none"}})})})});oie.displayName=SR;var sie="PopperArrow",eke={top:"bottom",right:"left",bottom:"top",left:"right"},aie=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=JEe(sie,r),s=eke[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(YEe,{...i,ref:n,style:{...i.style,display:"block"}})})});aie.displayName=sie;function tke(e){return e!==null}var nke=e=>({name:"transformOrigin",options:e,fn(t){var b,C,S;const{placement:n,rects:r,middlewareData:i}=t,s=((b=i.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=lie(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((C=i.arrow)==null?void 0:C.x)??0)+a/2,m=(((S=i.arrow)==null?void 0:S.y)??0)+l/2;let y="",v="";return c==="bottom"?(y=s?f:`${p}px`,v=`${-l}px`):c==="top"?(y=s?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,v=s?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,v=s?f:`${m}px`),{data:{x:y,y:v}}}});function lie(e){const[t,n="center"]=e.split("-");return[t,n]}var rke=nie,ike=iie,oke=oie,ske=aie,ake="Portal",cie=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=x.useState(!1);wi(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Fs.createPortal(u.jsx(Tr.div,{...r,ref:t}),s):null});cie.displayName=ake;function zH({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=lke({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=vi(n),l=x.useCallback(c=>{if(o){const f=typeof c=="function"?c(e):c;f!==e&&a(f)}else i(c)},[o,e,i,a]);return[s,l]}function lke({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,i=x.useRef(r),o=vi(t);return x.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function cke(e){const t=x.useRef({value:e,previous:e});return x.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function FH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uke(...e){return t=>{let n=!1;const r=e.map(i=>{const o=FH(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():FH(e[i],null)}}}}var uie=x.forwardRef((e,t)=>{const{children:n,...r}=e,i=x.Children.toArray(n),o=i.find(fke);if(o){const s=o.props.children,a=i.map(l=>l===o?x.Children.count(s)>1?x.Children.only(null):x.isValidElement(s)?s.props.children:null:l);return u.jsx(dj,{...r,ref:t,children:x.isValidElement(s)?x.cloneElement(s,void 0,a):null})}return u.jsx(dj,{...r,ref:t,children:n})});uie.displayName="Slot";var dj=x.forwardRef((e,t)=>{const{children:n,...r}=e;if(x.isValidElement(n)){const i=pke(n),o=hke(r,n.props);return n.type!==x.Fragment&&(o.ref=t?uke(t,i):i),x.cloneElement(n,o)}return x.Children.count(n)>1?x.Children.only(null):null});dj.displayName="SlotClone";var dke=({children:e})=>u.jsx(u.Fragment,{children:e});function fke(e){return x.isValidElement(e)&&e.type===dke}function hke(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function pke(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var mke=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],gke=mke.reduce((e,t)=>{const n=x.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?uie:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(a,{...s,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),yke="VisuallyHidden",die=x.forwardRef((e,t)=>u.jsx(gke.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));die.displayName=yke;var vke=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dp=new WeakMap,e2=new WeakMap,t2={},O7=0,fie=function(e){return e&&(e.host||fie(e.parentNode))},bke=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fie(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xke=function(e,t,n,r){var i=bke(t,Array.isArray(e)?e:[e]);t2[n]||(t2[n]=new WeakMap);var o=t2[n],s=[],a=new Set,l=new Set(i),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};i.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(a.has(p))d(p);else try{var m=p.getAttribute(r),y=m!==null&&m!=="false",v=(dp.get(p)||0)+1,b=(o.get(p)||0)+1;dp.set(p,v),o.set(p,b),s.push(p),v===1&&y&&e2.set(p,!0),b===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(C){console.error("aria-hidden: cannot operate on ",p,C)}})};
vendor: 6,079 bytes, lines 73-88
73return d(t),a.clear(),O7++,function(){s.forEach(function(f){var p=dp.get(f)-1,m=o.get(f)-1;dp.set(f,p),o.set(f,m),p||(e2.has(f)||f.removeAttribute(r),e2.delete(f)),m||f.removeAttribute(n)}),O7--,O7||(dp=new WeakMap,dp=new WeakMap,e2=new WeakMap,t2={})}},U5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=vke(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),xke(r,i,n,"aria-hidden")):function(){return null}},Ta=function(){return Ta=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ta.apply(this,arguments)};function hie(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function wke(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var sw="right-scroll-bar-position",aw="width-before-scroll-bar",Cke="with-scroll-bars-hidden",Ske="--removed-body-scroll-bar-size";function R7(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Eke(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var kke=typeof window<"u"?x.useLayoutEffect:x.useEffect,BH=new WeakMap;function _ke(e,t){var n=Eke(null,function(r){return e.forEach(function(i){return R7(i,r)})});return kke(function(){var r=BH.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;i.forEach(function(a){o.has(a)||R7(a,null)}),o.forEach(function(a){i.has(a)||R7(a,s)})}BH.set(n,e)},[e]),n}function Ake(e){return e}function Nke(e,t){t===void 0&&(t=Ake);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var d=s;s=[],d.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){s.push(d),c()},filter:function(d){return s=s.filter(d),n}}}};return i}function jke(e){e===void 0&&(e={});var t=Nke(null);return t.options=Ta({async:!0,ssr:!1},e),t}var pie=function(e){var t=e.sideCar,n=hie(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return x.createElement(r,Ta({},n))};pie.isSideCarExport=!0;function Tke(e,t){return e.useMedium(t),pie}var mie=jke(),P7=function(){},q5=x.forwardRef(function(e,t){var n=x.useRef(null),r=x.useState({onScrollCapture:P7,onWheelCapture:P7,onTouchMoveCapture:P7}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,y=e.inert,v=e.allowPinchZoom,b=e.as,C=b===void 0?"div":b,S=e.gapMode,E=hie(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=p,_=_ke([n,t]),N=Ta(Ta({},E),i);return x.createElement(x.Fragment,null,d&&x.createElement(A,{sideCar:mie,removeScrollBar:c,shards:f,noIsolation:m,inert:y,setCallbacks:o,allowPinchZoom:!!v,lockRef:n,gapMode:S}),s?x.cloneElement(x.Children.only(a),Ta(Ta({},N),{ref:_})):x.createElement(C,Ta({},N,{className:l,ref:_}),a))});q5.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};q5.classNames={fullWidth:aw,zeroRight:sw};var Mke=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Oke(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Mke();return t&&e.setAttribute("nonce",t),e}function Rke(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pke(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dke=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Oke())&&(Rke(t,n),Pke(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ike=function(){var e=Dke();return function(t,n){x.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gie=function(){var e=Ike(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Lke={left:0,top:0,right:0,gap:0},D7=function(e){return parseInt(e||"",10)||0},$ke=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[D7(n),D7(r),D7(i)]},zke=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Lke;var t=$ke(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Fke=gie(),Vp="data-scroll-locked",Bke=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),` 74 .`.concat(Cke,` { 75 overflow: hidden `).concat(r,`; 76 padding-right: `).concat(a,"px ").concat(r,`; 77 } 78 body[`).concat(Vp,`] { 79 overflow: hidden `).concat(r,`; 80 overscroll-behavior: contain; 81 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 82 padding-left: `.concat(i,`px; 83 padding-top: `).concat(o,`px; 84 padding-right: `).concat(s,`px; 85 margin-left:0; 86 margin-top:0; 87 margin-right: `).concat(a,"px ").concat(r,`; 88 `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";
88")].filter(Boolean).join(""),` 89 } 90 91 .`).concat(sw,` { 92 right: `).concat(a,"px ").concat(r,`; 93 } 94 95 .`).concat(aw,` { 96 margin-right: `).concat(a,"px ").concat(r,`; 97 } 98 99 .`).concat(sw," .").concat(sw,` { 100 right: 0 `).concat(r,`; 101 } 102 103 .`).concat(aw," .").concat(aw,` { 104 margin-right: 0 `).concat(r,`; 105 } 106 107 body[`).concat(Vp,`] { 108 `).concat(Ske,": ").concat(a,`px; 109 } 110`)},HH=function(){var e=parseInt(document.body.getAttribute(Vp)||"0",10);return isFinite(e)?e:0},Hke=function(){x.useEffect(function(){return document.body.setAttribute(Vp,(HH()+1).toString()),function(){var e=HH()-1;e<=0?document.body.removeAttribute(Vp):document.body.setAttribute(Vp,e.toString())}},[])},Vke=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Hke();var o=x.useMemo(function(){return zke(i)},[i]);return x.createElement(Fke,{styles:Bke(o,!t,i,n?"":"!important")})},fj=!1;if(typeof window<"u")try{var n2=Object.defineProperty({},"passive",{get:function(){return fj=!0,!0}});window.addEventListener("test",n2,n2),window.removeEventListener("test",n2,n2)}catch{fj=!1}var fp=fj?{passive:!1}:!1,Uke=function(e){return e.tagName==="TEXTAREA"},yie=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Uke(e)&&n[t]==="visible")},qke=function(e){return yie(e,"overflowY")},Wke=function(e){return yie(e,"overflowX")},VH=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=vie(e,r);if(i){var o=bie(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Gke=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Kke=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vie=function(e,t){return e==="v"?qke(t):Wke(t)},bie=function(e,t){return e==="v"?Gke(t):Kke(t)},Yke=function(e,t){return e==="h"&&t==="rtl"?-1:1},Xke=function(e,t,n,r,i){var o=Yke(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,l=t.contains(a),c=!1,d=s>0,f=0,p=0;do{var m=bie(e,a),y=m[0],v=m[1],b=m[2],C=v-b-o*y;(y||C)&&vie(e,a)&&(f+=C,p+=y),a instanceof ShadowRoot?a=a.host:a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(p)<1)&&(c=!0),c},r2=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},UH=function(e){return[e.deltaX,e.deltaY]},qH=function(e){return e&&"current"in e?e.current:e},Zke=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Qke=function(e){return` 111 .block-interactivity-`.concat(e,` {pointer-events: none;} 112 .allow-interactivity-`).concat(e,` {pointer-events: all;} 113`)},Jke=0,hp=[];function e9e(e){var t=x.useRef([]),n=x.useRef([0,0]),r=x.useRef(),i=x.useState(Jke++)[0],o=x.use
vendor: 4,275 bytes, line 113
113State(gie)[0],s=x.useRef(e);x.useEffect(function(){s.current=e},[e]),x.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=wke([e.lockRef.current],(e.shards||[]).map(qH),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=x.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var C=r2(v),S=n.current,E="deltaX"in v?v.deltaX:S[0]-C[0],A="deltaY"in v?v.deltaY:S[1]-C[1],_,N=v.target,j=Math.abs(E)>Math.abs(A)?"h":"v";if("touches"in v&&j==="h"&&N.type==="range")return!1;var T=VH(j,N);if(!T)return!0;if(T?_=j:(_=j==="v"?"h":"v",T=VH(j,N)),!T)return!1;if(!r.current&&"changedTouches"in v&&(E||A)&&(r.current=_),!_)return!0;var O=r.current||_;return Xke(O,b,v,O==="h"?E:A)},[]),l=x.useCallback(function(v){var b=v;if(!(!hp.length||hp[hp.length-1]!==o)){var C="deltaY"in b?UH(b):r2(b),S=t.current.filter(function(_){return _.name===b.type&&(_.target===b.target||b.target===_.shadowParent)&&Zke(_.delta,C)})[0];if(S&&S.should){b.cancelable&&b.preventDefault();return}if(!S){var E=(s.current.shards||[]).map(qH).filter(Boolean).filter(function(_){return _.contains(b.target)}),A=E.length>0?a(b,E[0]):!s.current.noIsolation;A&&b.cancelable&&b.preventDefault()}}},[]),c=x.useCallback(function(v,b,C,S){var E={name:v,delta:b,target:C,should:S,shadowParent:t9e(C)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(A){return A!==E})},1)},[]),d=x.useCallback(function(v){n.current=r2(v),r.current=void 0},[]),f=x.useCallback(function(v){c(v.type,UH(v),v.target,a(v,e.lockRef.current))},[]),p=x.useCallback(function(v){c(v.type,r2(v),v.target,a(v,e.lockRef.current))},[]);x.useEffect(function(){return hp.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,fp),document.addEventListener("touchmove",l,fp),document.addEventListener("touchstart",d,fp),function(){hp=hp.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,fp),document.removeEventListener("touchmove",l,fp),document.removeEventListener("touchstart",d,fp)}},[]);var m=e.removeScrollBar,y=e.inert;return x.createElement(x.Fragment,null,y?x.createElement(o,{styles:Qke(i)}):null,m?x.createElement(Vke,{gapMode:e.gapMode}):null)}function t9e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const n9e=Tke(mie,e9e);var $v=x.forwardRef(function(e,t){return x.createElement(q5,Ta({},e,{ref:t,sideCar:n9e}))});$v.classNames=q5.classNames;var r9e=[" ","Enter","ArrowUp","ArrowDown"],i9e=[" ","Enter"],zv="Select",[W5,G5,o9e]=P7e(zv),[um,ASt]=aR(zv,[o9e,eie]),K5=eie(),[s9e,md]=um(zv),[a9e,l9e]=um(zv),xie=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:s,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:p,required:m,form:y}=e,v=K5(t),[b,C]=x.useState(null),[S,E]=x.useState(null),[A,_]=x.useState(!1),N=I7e(c),[j=!1,T]=zH({prop:r,defaultProp:i,onChange:o}),[O,D]=zH({prop:s,defaultProp:a,onChange:l}),R=x.useRef(null),I=b?y||!!b.closest("form"):!0,[F,$]=x.useState(new Set),H=Array.from(F).map(L=>L.props.value).join(";");return u.jsx(rke,{...v,children:u.jsxs(s9e,{required:m,scope:t,trigger:b,onTriggerChange:C,valueNode:S,onValueNodeChange:E,valueNodeHasChildren:A,onValueNodeHasChildrenChange:_,contentId:lR(),value:O,onValueChange:D,open:j,onOpenChange:T,dir:N,triggerPointerDownPosRef:R,disabled:p,children:[u.jsx(W5.Provider,{scope:t,children:u.jsx(a9e,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(L=>{$(B=>new Set(B).add(L))},[]),onNativeOptionRemove:x.useCallback(L=>{$(B=>{const z=new Set(B);return z.delete(L),z})},[]),children:n})}),I?u.jsxs(Uie,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:O,onChange:L=>D(L.target.value),disabled:p,form:y,children:[O===void 0?u.jsx("option",{value:""}):null,Array.from(F)]},H):null]})})};xie.displayName=zv;var wie="SelectTrigger",Cie=x.forwardRef((e,t)=>
vendor: 14,329 bytes, line 113
113{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=K5(n),s=md(wie,n),a=s.disabled||r,l=oi(t,s.onTriggerChange),c=G5(n),d=x.useRef("touch"),[f,p,m]=qie(v=>{const b=c().filter(E=>!E.disabled),C=b.find(E=>E.value===s.value),S=Wie(b,v,C);S!==void 0&&s.onValueChange(S.value)}),y=v=>{a||(s.onOpenChange(!0),m()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return u.jsx(ike,{asChild:!0,...o,children:u.jsx(Tr.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Vie(s.value)?"":void 0,...i,ref:l,onClick:fr(i.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&y(v)}),onPointerDown:fr(i.onPointerDown,v=>{d.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:fr(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(b&&v.key===" ")&&r9e.includes(v.key)&&(y(),v.preventDefault())})})})});Cie.displayName=wie;var Sie="SelectValue",Eie=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:s="",...a}=e,l=md(Sie,n),{onValueNodeHasChildrenChange:c}=l,d=o!==void 0,f=oi(t,l.onValueNodeChange);return wi(()=>{c(d)},[c,d]),u.jsx(Tr.span,{...a,ref:f,style:{pointerEvents:"none"},children:Vie(l.value)?u.jsx(u.Fragment,{children:s}):o})});Eie.displayName=Sie;var c9e="SelectIcon",kie=x.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return u.jsx(Tr.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});kie.displayName=c9e;var u9e="SelectPortal",_ie=e=>u.jsx(cie,{asChild:!0,...e});_ie.displayName=u9e;var Uf="SelectContent",Aie=x.forwardRef((e,t)=>{const n=md(Uf,e.__scopeSelect),[r,i]=x.useState();if(wi(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Si.createPortal(u.jsx(Nie,{scope:e.__scopeSelect,children:u.jsx(W5.Slot,{scope:e.__scopeSelect,children:u.jsx("div",{children:e.children})})}),o):null}return u.jsx(jie,{...e,ref:t})});Aie.displayName=Uf;var Ts=10,[Nie,gd]=um(Uf),d9e="SelectContentImpl",jie=x.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:v,avoidCollisions:b,...C}=e,S=md(Uf,n),[E,A]=x.useState(null),[_,N]=x.useState(null),j=oi(t,ie=>A(ie)),[T,O]=x.useState(null),[D,R]=x.useState(null),I=G5(n),[F,$]=x.useState(!1),H=x.useRef(!1);x.useEffect(()=>{if(E)return U5(E)},[E]),G7e();const L=x.useCallback(ie=>{const[se,...oe]=I().map(re=>re.ref.current),[J]=oe.slice(-1),ae=document.activeElement;for(const re of ie)if(re===ae||(re==null||re.scrollIntoView({block:"nearest"}),re===se&&_&&(_.scrollTop=0),re===J&&_&&(_.scrollTop=_.scrollHeight),re==null||re.focus(),document.activeElement!==ae))return},[I,_]),B=x.useCallback(()=>L([T,E]),[L,T,E]);x.useEffect(()=>{F&&B()},[F,B]);const{onOpenChange:z,triggerPointerDownPosRef:V}=S;x.useEffect(()=>{if(E){let ie={x:0,y:0};const se=J=>{var ae,re;ie={x:Math.abs(Math.round(J.pageX)-(((ae=V.current)==null?void 0:ae.x)??0)),y:Math.abs(Math.round(J.pageY)-(((re=V.current)==null?void 0:re.y)??0))}},oe=J=>{ie.x<=10&&ie.y<=10?J.preventDefault():E.contains(J.target)||z(!1),document.removeEventListener("pointermove",se),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",oe,{capture:!0})}}},[E,z,V]),x.useEffect(()=>{const ie=()=>z(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[z]);const[U,W]=qie(ie=>{const se=I().filter(ae=>!ae.disabled),oe=se.find(ae=>ae.ref.current===document.activeElement),J=Wie(se,ie,oe);J&&setTimeout(()=>J.ref.current.focus())}),G=x.useCallback((ie,se,oe)=>{const J=!H.current&&!oe;(S.value!==void 0&&S.value===se||J)&&(O(ie),J&&(H.current=!0))},[S.value]),Y=x.useCallback(()=>E==null?void 0:E.focus(),[E]),X=x.useCallback((ie,se,oe)=>{const J=!H.current&&!oe;(S.value!==void 0&&S.value===se||J)&&R(ie)},[S.value]),Q=r==="popper"?hj:Tie,ne=Q===hj?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:y,hideWhenDetached:v,avoidCollisions:b}:{};return u.jsx(Nie,{scope:n,content:E,viewport:_,onViewportChange:N,itemRefCallback:G,selectedItem:T,onItemLeave:Y,itemTextRefCallback:X,focusSelectedItem:B,selectedItemText:D,position:r,isPositioned:F,searchRef:U,children:u.jsx($v,{as:J1,allowPinchZoom:!0,children:u.jsx(Ire,{asChild:!0,trapped:S.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:fr(i,ie=>{var se;(se=S.trigger)==null||se.focus({preventScroll:!0}),ie.preventDefault()}),children:u.jsx(Pre,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>S.onOpenChange(!1),children:u.jsx(Q,{role:"listbox",id:S.contentId,"data-state":S.open?"open":"closed",dir:S.dir,onContextMenu:ie=>ie.preventDefault(),...C,...ne,onPlaced:()=>$(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:fr(C.onKeyDown,ie=>{const se=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!se&&ie.key.length===1&&W(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let J=I().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const ae=ie.target,re=J.indexOf(ae);J=J.slice(re+1)}setTimeout(()=>L(J)),ie.preventDefault()}})})})})})})});jie.displayName=d9e;var f9e="SelectItemAlignedPosition",Tie=x.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=md(Uf,n),s=gd(Uf,n),[a,l]=x.useState(null),[c,d]=x.useState(null),f=oi(t,j=>d(j)),p=G5(n),m=x.useRef(!1),y=x.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:C,focusSelectedItem:S}=s,E=x.useCallback(()=>{if(o.trigger&&o.valueNode&&a&&c&&v&&b&&C){const j=o.trigger.getBoundingClientRect(),T=c.getBoundingClientRect(),O=o.valueNode.getBoundingClientRect(),D=C.getBoundingClientRect();if(o.dir!=="rtl"){const ae=D.left-T.left,re=O.left-ae,pe=j.left-re,be=j.width+pe,xe=Math.max(be,T.width),ke=window.innerWidth-Ts,Pe=oj(re,[Ts,Math.max(Ts,ke-xe)]);a.style.minWidth=be+"px",a.style.left=Pe+"px"}else{const ae=T.right-D.right,re=window.innerWidth-O.right-ae,pe=window.innerWidth-j.right-re,be=j.width+pe,xe=Math.max(be,T.width),ke=window.innerWidth-Ts,Pe=oj(re,[Ts,Math.max(Ts,ke-xe)]);a.style.minWidth=be+"px",a.style.right=Pe+"px"}const R=p(),I=window.innerHeight-Ts*2,F=v.scrollHeight,$=window.getComputedStyle(c),H=parseInt($.borderTopWidth,10),L=parseInt($.paddingTop,10),B=parseInt($.borderBottomWidth,10),z=parseInt($.paddingBottom,10),V=H+L+F+z+B,U=Math.min(b.offsetHeight*5,V),W=window.getComputedStyle(v),G=parseInt(W.paddingTop,10),Y=parseInt(W.paddingBottom,10),X=j.top+j.height/2-Ts,Q=I-X,ne=b.offsetHeight/2,ie=b.offsetTop+ne,se=H+L+ie,oe=V-se;if(se<=X){const ae=R.length>0&&b===R[R.length-1].ref.current;a.style.bottom="0px";const re=c.clientHeight-v.offsetTop-v.offsetHeight,pe=Math.max(Q,ne+(ae?Y:0)+re+B),be=se+pe;a.style.height=be+"px"}else{const ae=R.length>0&&b===R[0].ref.current;a.style.top="0px";const pe=Math.max(X,H+v.offsetTop+(ae?G:0)+ne)+oe;a.style.height=pe+"px",v.scrollTop=se-X+v.offsetTop}a.style.margin=`${Ts}px 0`,a.style.minHeight=U+"px",a.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,a,c,v,b,C,o.dir,r]);wi(()=>E(),[E]);const[A,_]=x.useState();wi(()=>{c&&_(window.getComputedStyle(c).zIndex)},[c]);const N=x.useCallback(j=>{j&&y.current===!0&&(E(),S==null||S(),y.current=!1)},[E,S]);return u.jsx(p9e,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:u.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:u.jsx(Tr.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Tie.displayName=f9e;var h9e="SelectPopperPosition",hj=x.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ts,...o}=e,s=K5(n);return u.jsx(oke,{...s,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});hj.displayName=h9e;var[p9e,ER]=um(Uf,{}),pj="SelectViewport",Mie=x.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=gd(pj,n),s=ER(pj,n),a=oi(t,o.onViewportChange),l=x.useRef(0);return u.jsxs(u.Fragment,{children:[u.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),u.jsx(W5.Slot,{scope:n,children:u.jsx(Tr.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:fr(i.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const y=window.innerHeight-Ts*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),C=Math.max(v,b);if(C<y){const S=C+m,E=Math.min(y,S),A=S-E;f.style.height=E+"px",f.style.bottom==="0px"&&(d.scrollTop=A>0?A:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});Mie.displayName=pj;var Oie="SelectGroup",[m9e,g9e]=um(Oie),Rie=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=lR();return u.jsx(m9e,{scope:n,id:i,children:u.jsx(Tr.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Rie.displayName=Oie;var Pie="SelectLabel",Die=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=g9e(Pie,n);return u.jsx(Tr.div,{id:i.id,...r,ref:t})});Die.displayName=Pie;var Yw="SelectItem",[y9e,Iie]=um(Yw),Lie=x.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...s}=e,a=md(Yw,n),l=gd(Yw,n),c=a.value===r,[d,f]=x.useState(o??""),[p,m]=x.useState(!1),y=oi(t,S=>{var E;return(E=l.itemRefCallback)==null?void 0:E.call(l,S,r,i)}),v=lR(),b=x.useRef("touch"),C=()=>{i||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return u.jsx(y9e,{scope:n,value:r,disabled:i,textId:v,isSelected:c,onItemTextChange:x.useCallback(S=>{f(E=>E||((S==null?void 0:S.textContent)??"").trim())},[]),children:u.jsx(W5.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:u.jsx(Tr.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:y,onFocus:fr(s.onFocus,()=>m(!0)),onBlur:fr(s.onBlur,()=>m(!1)),onClick:fr(s.onClick,()=>{b.current!=="mouse"&&C()}),onPointerUp:fr(s.onPointerUp,()=>{b.current==="mouse"&&C()}),onPointerDown:fr(s.onPointerDown,S=>{b.current=S.pointerType}),onPointerMove:fr(s.onPointerMove,S=>{var E;b.current=S.pointerType,i?(E=l.onItemLeave)==null||E.call(l):b.current==="mouse"&&S.currentTarget.focus({preventScroll:!0})}),onPointerLeave:fr(s.onPointerLeave,S=>{var E;S.currentTarget===document.activeElement&&((E=l.onItemLeave)==null||E.call(l))}),onKeyDown:fr(s.onKeyDown,S=>{var A;((A=l.searchRef)==null?void 0:A.current)!==""&&S.key===" "||(i9e.includes(S.key)&&C(),S.key===" "&&S.preventDefault())})})})})});Lie.displayName=Yw;var n1="SelectItemText",$ie=x.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,s=md(n1,n),a=gd(n1,n),l=Iie(n1,n),c=l9e(n1,n),[d,f]=x.useState(null),p=oi(t,C=>f(C),l.onItemTextChange,C=>{var S;return(S=a.itemTextRefCallback)==null?void 0:S.call(a,C,l.value,l.disabled)}),m=d==null?void 0:d.textContent,y=x.useMemo(()=>u.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=c;return wi(()=>(v(y),()=>b(y)),[v,b,y]),u.jsxs(u.Fragment,{children:[u.jsx(Tr.span,{id:l.textId,...o,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Si.createPortal(o.children,s.valueNode):null]})});$ie.displayName=n1;var zie="SelectItemIndicator",Fie=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Iie(zie,n).isSelected?u.jsx(Tr.span,{"aria-hidden":!0,...r,ref:t}):null});Fie.displayName=zie;var mj="SelectScrollUpButton",v9e=x.forwardRef((e,t)=>{const n=gd(mj,e.__scopeSelect),r=ER(mj,e.__scopeSelect),[i,o]=x.useState(!1),s=oi(t,r.onScrollButtonChange);return wi(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;o(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?u.jsx(Bie,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});v9e.displayName=mj;var gj="SelectScrollDownButton",b9e=x.forwardRef((e,t)=>{const n=gd(gj,e.__scopeSelect),r=ER(gj,e.__scopeSelect),[i,o]=x.useState(!1),s=oi(t,r.onScrollButtonChange);return wi(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;o(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),i?u.jsx(Bie,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});b9e.displayName=gj;var Bie=x.forwardRef((e,t)=>
113{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=gd("SelectScrollButton",n),s=x.useRef(null),a=G5(n),l=x.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return x.useEffect(()=>()=>l(),[l]),wi(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),u.jsx(Tr.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:fr(i.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:fr(i.onPointerMove,()=>{var c;(c=o.onItemLeave)==null||c.call(o),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:fr(i.onPointerLeave,()=>{l()})})}),x9e="SelectSeparator",Hie=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return u.jsx(Tr.div,{"aria-hidden":!0,...r,ref:t})});Hie.displayName=x9e;var yj="SelectArrow",w9e=x.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=K5(n),o=md(yj,n),s=gd(yj,n);return o.open&&s.position==="popper"?u.jsx(ske,{...i,...r,ref:t}):null});w9e.displayName=yj;function Vie(e){return e===""||e===void 0}var Uie=x.forwardRef((e,t)=>{const{value:n,...r}=e,i=x.useRef(null),o=oi(t,i),s=cke(n);return x.useEffect(()=>{const a=i.current,l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&d){const f=new Event("change",{bubbles:!0});d.call(a,n),a.dispatchEvent(f)}},[s,n]),u.jsx(die,{asChild:!0,children:u.jsx("select",{...r,ref:o,defaultValue:n})})});Uie.displayName="BubbleSelect";function qie(e){const t=vi(e),n=x.useRef(""),r=x.useRef(0),i=x.useCallback(s=>{const a=n.current+s;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),o=x.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Wie(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=C9e(e,Math.max(o,0));i.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function C9e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var S9e=xie,E9e=Cie,k9e=Eie,_9e=kie,A9e=_ie,N9e=Aie,j9e=Mie,T9e=Rie,M9e=Die,O9e=Lie,R9e=$ie,P9e=Fie,D9e=Hie;const I9e={title:["h1","h2","h3","h4","h5","h6"],label:["xl","lg","md","sm","xs"],paragraph:["xl","lg","md","sm","xs"],subheading:["md","sm","xs","2xs"],doc:["label","paragraph"]},L9e=Object.entries(I9e).flatMap(([e,t])=>t.map(n=>`${e}-${n}`)),Gie={extend:{classGroups:{"font-size":[{text:L9e}]}}},$9e=tR(Gie);function Et(...e){return $9e(Mt(...e))}const Nt=Et,el=fre({twMergeConfig:Gie}),kR=el({slots:{triggerRoot:["group/trigger min-w-0 shrink-0 bg-bg-white-0 shadow-regular-xs outline-none ring-1 ring-inset ring-stroke-soft-200","text-paragraph-sm text-text-strong-950","flex items-center text-left","transition duration-200 ease-out","hover:bg-bg-weak-50 hover:ring-transparent","focus:shadow-button-important-focus focus:outline-none focus:ring-stroke-strong-950","focus:text-text-strong-950 data-[placeholder]:focus:text-text-strong-950","disabled:pointer-events-none disabled:bg-bg-weak-50 disabled:text-text-disabled-300 disabled:shadow-none disabled:ring-transparent data-[placeholder]:disabled:text-text-disabled-300","data-[placeholder]:text-text-sub-600"],triggerArrow:["ml-auto size-5 shrink-0","transition duration-200 ease-out","group-data-[placeholder]/trigger:text-text-soft-400","text-text-sub-600","group-hover/trigger:text-text-sub-600 group-data-[placeholder]/trigger:group-hover:text-text-sub-600","group-focus/trigger:text-text-strong-950 group-data-[placeholder]/trigger:group-focus/trigger:text-text-strong-950","group-disabled/trigger:text-text-disabled-300 group-data-[placeholder]/trigger:group-disabled/trigger:text-text-disabled-300","group-data-[state=open]/trigger:rotate-180"],triggerIcon:["h-5 w-auto min-w-0 shrink-0 object-contain text-text-sub-600","transition duration-200 ease-out","group-data-[placeholder]/trigger:text-text-soft-400","group-hover/trigger:text-text-sub-600 group-data-[placeholder]/trigger:group-hover:text-text-sub-600","group-disabled/trigger:text-text-disabled-300 group-data-[placeholder]/trigger:group-disabled/trigger:text-text-disabled-300","group-disabled/trigger:[&:not(.remixicon)]:opacity-[.48]"],selectItemIcon:["size-5 shrink-0 bg-[length:1.25rem] text-text-sub-600","[[data-disabled]_&:not(.remixicon)]:opacity-[.48] [[data-disabled]_&]:text-text-disabled-300"]},variants:{size:{medium:{},small:{},xsmall:{}},variant:{default:{triggerRoot:"w-full"},compact:{triggerRoot:"w-auto"},compactForInput:{triggerRoot:["w-auto rounded-none shadow-none ring-0","focus:bg-bg-weak-50 focus:shadow-none focus:ring-0 focus:ring-transparent"]},inline:{triggerRoot:["h-5 min-h-5 w-auto gap-0 rounded-none bg-transparent p-0 text-text-sub-600 shadow-none ring-0","hover:bg-transparent hover:text-text-strong-950","focus:shadow-none","data-[state=open]:text-text-strong-950"],triggerIcon:["mr-1.5 text-text-soft-400","group-hover/trigger:text-text-sub-600","group-data-[state=open]/trigger:text-text-sub-600"],triggerArrow:["ml-0.5","group-hover/trigger:text-text-strong-950","group-data-[state=open]/trigger:text-text-strong-950"],selectItemIcon:"text-text-soft-400 group-hover/trigger:text-text-sub-600"}},hasError:{true:{triggerRoot:["ring-error-base","focus:shadow-button-error-focus focus:ring-error-base"]}}},compoundVariants:[{size:"medium",variant:"default",class:{triggerRoot:"h-10 min-h-10 gap-2 rounded-10 pl-3 pr-2.5"}},{size:"small",variant:"default",class:{triggerRoot:"h-9 min-h-9 gap-2 rounded-lg pl-2.5 pr-2"}},{size:"xsmall",variant:"default",class:{triggerRoot:"h-8 min-h-8 gap-1.5 rounded-lg pl-2 pr-1.5"}},{size:"medium",variant:"compact",class:{triggerRoot:"h-10 gap-1 rounded-10 pl-3 pr-2.5",triggerIcon:"-ml-0.5",selectItemIcon:"group-has-[&]/trigger:-ml-0.5"}},{size:"small",variant:"compact",class:{triggerRoot:"h-9 gap-1 rounded-lg pl-3 pr-2",triggerIcon:"-ml-0.5",selectItemIcon:"group-has-[&]/trigger:-ml-0.5"}},{size:"xsmall",variant:"compact",class:{triggerRoot:"h-8 gap-0.5 rounded-lg pl-2.5 pr-1.5",triggerIcon:"-ml-0.5 size-4",selectItemIcon:"size-4 bg-[length:1rem] group-has-[&]/trigger:-ml-0.5"}},{size:"medium",variant:"compactForInput",class:{triggerRoot:"pl-2.5 pr-2",triggerIcon:"mr-2",triggerArrow:"ml-0.5"}},{size:"small",variant:"compactForInput",class:{triggerRoot:"px-2",triggerIcon:"mr-2",triggerArrow:"ml-0.5"}},{size:"xsmall",variant:"compactForInput",class:{triggerRoot:"pl-2 pr-1.5",triggerIcon:"mr-1.5 size-4",triggerArrow:"ml-0.5",selectItemIcon:"size-4 bg-[length:1rem]"}}],defaultVariants:{variant:"default",size:"medium"}}),Kie=x.createContext({size:"medium",variant:"default",hasError:!1}),Y5=()=>x.useContext(Kie),Xi=({size:e="medium",variant:t="default",hasError:n,...r})=>u.jsx(Kie.Provider,{value:{size:e,variant:t,hasError:n},children:u.jsx(S9e,{...r})});Xi.displayName="SelectRoot";const z9e=T9e;z9e.displayName="SelectGroup";const Zi=k9e;Zi.displayName="SelectValue";
113const F9e=D9e;F9e.displayName="SelectSeparator";const B9e=M9e;B9e.displayName="SelectGroupLabel";const H9e="SelectTriggerIcon",Qi=x.forwardRef(({className:e,children:t,...n},r)=>{const{size:i,variant:o,hasError:s}=Y5(),{triggerRoot:a,triggerArrow:l}=kR({size:i,variant:o,hasError:s});return u.jsxs(E9e,{ref:r,className:a({class:e}),...n,children:[u.jsx(GO,{children:t}),u.jsx(_9e,{asChild:!0,children:u.jsx(kne,{className:l()})})]})});Qi.displayName="SelectTrigger";function Fv({as:e,className:t,...n}){const r=e||"div",{size:i,variant:o,hasError:s}=Y5(),{triggerIcon:a}=kR({size:i,variant:o,hasError:s});return u.jsx(r,{className:a({class:t}),...n})}Fv.displayName=H9e;const Ji=x.forwardRef(({className:e,position:t="popper",children:n,sideOffset:r=8,collisionPadding:i=8,...o},s)=>u.jsx(A9e,{children:u.jsx(N9e,{ref:s,className:Nt("relative z-50 overflow-hidden rounded-2xl bg-bg-white-0 shadow-regular-md ring-1 ring-inset ring-stroke-soft-200","min-w-[--radix-select-trigger-width] max-w-[max(var(--radix-select-trigger-width),320px)]","max-h-[--radix-select-content-available-height]","data-[state=open]:animate-in data-[state=open]:fade-in-0","data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",e),sideOffset:r,position:t,collisionPadding:i,...o,children:u.jsxs(k7e,{type:"auto",children:[u.jsx(j9e,{asChild:!0,children:u.jsx(_7e,{style:{overflowY:void 0},className:"max-h-[196px] w-full scroll-py-2 overflow-auto p-2",children:n})}),u.jsx(A7e,{orientation:"vertical",children:u.jsx(N7e,{className:"!w-1 rounded bg-bg-soft-200"})})]})})}));Ji.displayName="SelectContent";const Ft=x.forwardRef(({className:e,children:t,...n},r)=>{const{size:i}=Y5();return u.jsxs(O9e,{ref:r,className:Nt("group relative cursor-pointer select-none rounded-lg p-2 pr-9 text-paragraph-sm text-text-strong-950","flex items-center gap-2 transition duration-200 ease-out","data-[disabled]:pointer-events-none data-[disabled]:text-text-disabled-300","data-[highlighted]:bg-bg-weak-50 data-[highlighted]:outline-0",{"gap-1.5 pr-[34px]":i==="xsmall"},e),...n,children:[u.jsx(R9e,{asChild:!0,children:u.jsx("span",{className:Nt("flex flex-1 items-center gap-2","group-disabled:text-text-disabled-300",{"gap-1.5":i==="xsmall"}),children:typeof t=="string"?u.jsx("span",{className:"line-clamp-1",children:t}):t})}),u.jsx(P9e,{asChild:!0,children:u.jsx(zw,{className:"absolute right-2 top-1/2 size-5 shrink-0 -translate-y-1/2 text-text-sub-600"})})]})});Ft.displayName="SelectItem";function X5({as:e,className:t,...n}){const{size:r,variant:i}=Y5(),{selectItemIcon:o}=kR({size:r,variant:i}),s=e||"div";return u.jsx(s,{className:o({class:t}),...n})}const V9e=[{code:"US",label:"United States"},{code:"GB",label:"United Kingdom"},{code:"AU",label:"Australia"},{code:"CA",label:"Canada"},{code:"IE",label:"Ireland"},{code:"NZ",label:"New Zealand"},{code:"ZA",label:"South Africa"},{code:"DE",label:"Germany"},{code:"FR",label:"France"},{code:"ES",label:"Spain"},{code:"IT",label:"Italy"},{code:"NL",label:"Netherlands"},{code:"BE",label:"Belgium"},{code:"CH",label:"Switzerland"},{code:"AT",label:"Austria"},{code:"SE",label:"Sweden"},{code:"NO",label:"Norway"},{code:"DK",label:"Denmark"},{code:"FI",label:"Finland"},{code:"PL",label:"Poland"},{code:"PT",label:"Portugal"},{code:"BR",label:"Brazil"},{code:"MX",label:"Mexico"},{code:"AR",label:"Argentina"},{code:"IN",label:"India"},{code:"JP",label:"Japan"},{code:"SG",label:"Singapore"},{code:"HK",label:"Hong Kong"},{code:"AE",label:"United Arab Emirates"},{code:"SA",label:"Saudi Arabia"}],U9e=[{name:"Starter",price:29,description:"Perfect for individual creators",features:["50 articles per month","100 keyword reports per month","Basic keyword research","SEO optimization","AI Editor","WordPress export","Email support"],priceId:"price_1RPLosLyzWyQENzHLkN3S9Ss"},{name:"Pro",price:79,description:"Best for growing businesses",features:["200 articles per month","500 keyword reports per month","Advanced keyword research","SEO optimization","AI Editor","All export options","Priority support"],priceId:"price_1RPLpOLyzWyQENzHUlDAKw1X"}];
113function q9e(){const e=br(),t=am(),[n,{isLoading:r}]=SCe(),[i]=XCe(),{data:o}=rm(),[s,a]=x.useState(1),[l,c]=x.useState(null),[d,f]=x.useState(null),[p,m]=x.useState("US"),[y,{isLoading:v}]=pne(),b=async()=>{if(d)try{const{url:Y}=await y({priceId:d}).unwrap();window.location.href=Y}catch{ze.error("Failed to create checkout session. Please try again.")}},[C,S]=x.useState({website:""}),[E,A]=x.useState(null),[_,N]=x.useState(!1);x.useEffect(()=>{const Y=C.website.replace(/^https?:\/\//,"").split("/")[0];if(!Y||Y.length<4||!Y.includes(".")){A(null),N(!1);return}N(!0),A(null);const X=setTimeout(()=>{const Q=`https://www.google.com/s2/favicons?domain=${Y}&sz=32`,ne=new Image;ne.onload=()=>{A(Q),N(!1)},ne.onerror=()=>{A(null),N(!1)},ne.src=Q},600);return()=>clearTimeout(X)},[C.website]);const[j,T]=x.useState(null),[O,D]=x.useState(null),[R,I]=x.useState("pending"),[F,$]=x.useState(null),[H,L]=x.useState(null),B=Y=>Y?Y.includes("addEventListener")||Y.includes("undefined")||Y.includes("Cannot read properties")?"We encountered a technical issue while analyzing your website. Our team has been notified. Please try again or contact support if the problem persists.":Y.includes("timeout")||Y.includes("timed out")?"The analysis took longer than expected. This might be due to your website's size. Please try again.":Y.includes("network")||Y.includes("fetch failed")?"We couldn't connect to your website. Please check the URL and try again.":Y.includes("RabbitMQ")||Y.includes("queue")?"Our analysis service is temporarily unavailable. Please try again in a few moments.":Y.match(/\b(error|failed|exception|undefined|null|async|await|function|class)\b/i)?"Something went wrong while analyzing your website. Please try again or contact support if the issue persists.":Y:"An unexpected error occurred. Please try again.",z=[{id:1,label:"Website & Blog",completed:s>1},{id:2,label:"Blog Cover Details",completed:s>2},{id:3,label:"Summary",completed:s>3},{id:4,label:"Traffic Potential",completed:!1}],V=()=>{s<4&&(a(s+1),T(null))},U=()=>{s>1&&(a(s-1),T(null))},W=async Y=>{var X,Q,ne;Y.preventDefault(),T(null);try{const ie=((Q=(X=o==null?void 0:o.user)==null?void 0:X.user_metadata)==null?void 0:Q.full_name)||"",se=ie?ie.replace(/\s+/g,"")+"Organisation":"MyOrganisation",oe=C.website.startsWith("http")?C.website:`https://${C.website}`;console.log("[Onboarding] Submitting onboarding data:",{companyName:se,websiteUrl:oe,fullName:ie});const J=await n({companyName:se,website:oe,fullName:ie,blogTheme:l||void 0,targetCountry:p}).unwrap();if(console.log("[Onboarding] Onboarding result:",J),J.success&&J.organizationId){console.log("[Onboarding] Organization ID received:",J.organizationId),t(Yn.util.invalidateTags(["UserProfile"])),ze.success("Starting website analysis...");try{console.log("[Onboarding] Starting website analysis for:",{organizationId:J.organizationId,websiteUrl:oe});const ae=await i({organizationId:J.organizationId,websiteUrl:oe}).unwrap();if(console.log("[Onboarding] Website analysis response:",ae),ae.success&&ae.jobId)console.log("[Onboarding] Successfully started analysis job:",ae.jobId),D(ae.jobId),I("processing"),a(4),console.log("[Onboarding] Moved to step 4 - analysis in progress");else{console.error("[Onboarding] Failed to start analysis:",ae);const re=ae.error||"Failed to queue website analysis job";L(re);const pe=B(re);ze.error(pe)}}catch(ae){console.error("[Onboarding] Error starting website analysis:",ae);const re=((ne=ae==null?void 0:ae.data)==null?void 0:ne.error)||(ae==null?void 0:ae.message)||"Failed to start website analysis. Please try again.";L(re);const pe=B(re);ze.error(pe)}}else console.error("[Onboarding] Invalid result:",J),J.error?T(J.error):J.organizationId||(T("Organization ID not received from server"),ze.error("Failed to complete onboarding"))}catch(ie){console.error("[Onboarding] Error during onboarding:",ie),T(typeof ie=="string"?ie:"An error occurred during onboarding")}};x.useEffect(()=>{if(!O){console.log("[Onboarding] No analysisJobId, skipping polling");return}console.log("[Onboarding] Starting polling for job:",O);let Y,X,Q=!1;const ne=async()=>{var ie,se;if(!Q)try{console.log("[Onboarding] Polling status for job:",O);const oe=await fetch(`https://api.seio.so/api/website-analysis/status/${O}`);if(!oe.ok){console.error("[Onboarding] Poll request failed:",oe.status,oe.statusText);return}const J=await oe.json();if(console.log("[Onboarding] Poll response:",J),J){const{status:ae,data:re,errorMessage:pe}=J;if(console.log("[Onboarding] Current status:",ae),I(ae),ae==="completed"&&re){clearInterval(Y),clearTimeout(X),$(re),ze.success("Website analysis complete!"),console.log("[Onboarding] Analysis completed with data:",re);const be=5,xe=35,ke=((ie=re.keywords)==null?void 0:ie.filter(Pe=>{const it=Pe.competitionIndex??Pe.kd;return it>=be&&it<=xe}))??[];console.log(`[Onboarding] Keywords (difficulty ${be}-${xe}): ${ke.length} of ${((se=re.keywords)==null?void 0:se.length)??0}`),ke.length>0&&console.log("[Onboarding] Keywords in range:",ke.map(Pe=>({keyword:Pe.keyword,kd:Pe.competitionIndex??Pe.kd,traffic:Pe.traffic})))}else if(ae==="failed"){clearInterval(Y),clearTimeout(X);const be=pe||"Analysis failed";L(be);const xe=B(be);ze.error(xe),console.error("[Onboarding] Analysis failed:",pe)}}}catch(oe){console.error("[Onboarding] Error polling analysis status:",oe)}};return ne(),Y=setInterval(ne,2e3),X=setTimeout(()=>{Q=!0,clearInterval(Y),I("failed"),L("Analysis timed out after 2 minutes"),ze.error("The analysis took longer than expected. Please try again with a smaller website or contact support."),console.error("[Onboarding] Analysis timed out after 2 minutes")},12e4),()=>{console.log("[Onboarding] Cleaning up polling for job:",O),Q=!0,clearInterval(Y),clearTimeout(X)}},[O]);const G=()=>{var Y;switch(s){case 1:return u.jsxs("div",{className:"flex w-full max-w-[392px] flex-col items-center gap-6",children:[u.jsxs("div",{className:"flex w-full flex-col items-center gap-2",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center rounded-full backdrop-blur-xl lg:size-24 before:absolute before:inset-0 before:rounded-full before:bg-gradient-to-b before:from-neutral-500 before:to-transparent before:opacity-10",children:u.jsx("div",{className:"relative z-10 flex size-12 items-center justify-center rounded-full bg-bg-white-0 shadow-regular-xs ring-1 ring-inset ring-stroke-soft-200 lg:size-16",children:u.jsx(iw,{className:"size-6 text-text-sub-600 lg:size-8"})})}),u.jsxs("div",{className:"space-y-1 text-center w-full",children:[u.jsx("div",{className:"text-title-h6 lg:text-title-h5",children:"Website & Blog"}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:"Enter your Blog URL. If not available, enter your website URL."})]})]}),u.jsx("div",{className:"w-full h-px bg-stroke-soft-200"}),u.jsxs("div",{className:"w-full space-y-1",children:[u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsxs(It,{htmlFor:"website",children:["Website/Blog URL ",u.jsx(ss,{})]}),u.jsx("div",{className:"flex size-4 items-center justify-center rounded-full bg-bg-soft-200 text-text-soft-400",children:u.jsx("span",{className:"text-[10px]",children:"i"})})]}),u.jsxs("div",{className:"group relative flex w-full overflow-hidden bg-bg-white-0 text-text-strong-950 shadow-regular-xs transition duration-200 ease-out before:absolute before:inset-0 before:ring-1 before:ring-inset before:ring-stroke-soft-200 before:pointer-events-none before:rounded-[inherit] before:transition before:duration-200 before:ease-out hover:shadow-none has-[input
113:focus]:shadow-button-important-focus has-[input:focus]:before:ring-stroke-strong-950 rounded-10",children:[u.jsx("div",{className:"flex items-center gap-2 px-3 border-r border-stroke-soft-200",children:u.jsx("span",{className:"text-paragraph-sm text-text-sub-600",children:"https://"})}),u.jsxs("label",{className:"group/input-wrapper flex flex-1 cursor-text items-center bg-bg-white-0 transition duration-200 ease-out hover:[&:not(&:has(input:focus))]:bg-bg-weak-50 px-3",children:[u.jsx("input",{className:"w-full bg-transparent bg-none text-paragraph-sm text-text-strong-950 outline-none transition duration-200 ease-out placeholder:select-none placeholder:text-text-soft-400 h-10",id:"website",placeholder:"www.example.com",type:"text",value:C.website.replace(/^https?:\/\//,""),onChange:J=>S({...C,website:J.target.value.replace(/^https?:\/\//,"")}),required:!0}),_&&u.jsx("div",{className:"ml-2 size-5 shrink-0 animate-spin rounded-full border-2 border-stroke-soft-200 border-t-primary-base"}),E&&!_&&u.jsx("img",{src:E,alt:"Site favicon",className:"ml-2 size-5 shrink-0 rounded"})]})]}),u.jsxs("div",{className:"flex items-start gap-2 px-1 pt-1",children:[u.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center mt-0.5",children:u.jsx("div",{className:"size-3.5 rounded-full bg-text-soft-400 flex items-center justify-center",children:u.jsx("span",{className:"text-[8px] text-white font-bold",children:"i"})})}),u.jsx("p",{className:"text-paragraph-xs text-text-sub-600",children:"We will use your website to understand your content, audience, and overall goals."})]})]}),u.jsxs("div",{className:"w-full space-y-1",children:[u.jsx(It,{children:"Content Target Country"}),u.jsxs(Xi,{value:p,onValueChange:m,children:[u.jsx(Qi,{children:u.jsx(Zi,{placeholder:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Fv,{as:iw}),"Select a country..."]})})}),u.jsx(Ji,{className:"max-h-60",children:V9e.map(J=>u.jsxs(Ft,{value:J.code,children:[u.jsx(X5,{style:{backgroundImage:`url(/flags/${J.code}.svg)`}}),J.label]},J.code))})]}),u.jsxs("div",{className:"flex items-start gap-2 px-1 pt-1",children:[u.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center mt-0.5",children:u.jsx("div",{className:"size-3.5 rounded-full bg-text-soft-400 flex items-center justify-center",children:u.jsx("span",{className:"text-[8px] text-white font-bold",children:"i"})})}),u.jsx("p",{className:"text-paragraph-xs text-text-sub-600",children:"Select where your audience is located. This ensures keyword research matches local search terms. For example, 'football' in UK means 'soccer' in US. If your audience is global, we'll use US as the baseline for keyword data."})]})]}),u.jsxs("div",{className:"flex w-full flex-col gap-3",children:[u.jsx(ql,{variant:"primary",size:"medium",onClick:V,disabled:!C.website,className:"w-full",children:"Next"}),u.jsx("button",{type:"button",onClick:U,className:"w-full inline-flex items-center justify-center px-3.5 h-10 rounded-10 text-label-sm bg-transparent text-text-sub-600 ring-transparent hover:bg-bg-weak-50 hover:text-text-strong-950 transition duration-200 ease-out",children:"Back"})]})]});case 2:return u.jsxs("div",{className:"flex w-full max-w-[752px] flex-col items-center gap-6",children:[u.jsxs("div",{className:"flex w-full flex-col items-center gap-2",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center rounded-full backdrop-blur-xl lg:size-24 before:absolute before:inset-0 before:rounded-full before:bg-gradient-to-b before:from-neutral-500 before:to-transparent before:opacity-10",children:u.jsx("div",{className:"relative z-10 flex size-12 items-center justify-center rounded-full bg-bg-white-0 shadow-regular-xs ring-1 ring-inset ring-stroke-soft-200 lg:size-16",children:u.jsx(iw,{className:"size-6 text-text-sub-600 lg:size-8"})})}),u.jsxs("div",{className:"space-y-1 text-center w-full",children:[u.jsx("div",{className:"text-title-h6 lg:text-title-h5",children:"Blog Cover Details"}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:"Select your preferred style for blog cover generation. We'll use this style to create eye-catching covers for your articles with different variations. You can change this later in settings and even add your own."})]})]}),u.jsx("div",{className:"w-full h-px bg-stroke-soft-200"}),u.jsxs("div",{className:"grid w-full grid-cols-1 gap-3 lg:grid-cols-2",children:[u.jsxs("button",{type:"button",onClick:()=>c("light"),className:`flex flex-col items-start gap-3 rounded-xl p-4 text-left transition ${l==="light"?"bg-bg-white-0 ring-2 ring-primary-base":"bg-bg-white-0 ring-1 ring-stroke-soft-200 hover:ring-stroke-strong-950"}`,children:[u.jsxs("div",{className:"flex w-full items-center justify-between",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"text-label-md text-text-strong-950",children:"Light Theme"}),u.jsx("div",{className:"mt-1 text-paragraph-xs text-text-sub-600",children:"We will use our light blog cover theme"})]}),u.jsx("div",{className:"relative flex size-5 shrink-0 items-center justify-center ml-3",children:u.jsx("div",{className:`size-4 rounded-full ${l==="light"?"bg-primary-base":"bg-stroke-soft-200"} flex items-center justify-center`,children:l==="light"&&u.jsx("div",{className:"size-2 roun
113ded-full bg-static-white"})})})]}),u.jsx("div",{className:"w-full rounded-lg overflow-hidden",children:u.jsx("img",{src:"/images/how-to.png",alt:"Light theme preview",className:"w-full h-auto object-cover"})})]}),u.jsxs("button",{type:"button",onClick:()=>c("dark"),className:`flex flex-col items-start gap-3 rounded-xl p-4 text-left transition ${l==="dark"?"bg-bg-white-0 ring-2 ring-primary-base":"bg-bg-white-0 ring-1 ring-stroke-soft-200 hover:ring-stroke-strong-950"}`,children:[u.jsxs("div",{className:"flex w-full items-center justify-between",children:[u.jsxs("div",{className:"flex-1",children:[u.jsx("div",{className:"text-label-md text-text-strong-950",children:"Dark Theme"}),u.jsx("div",{className:"mt-1 text-paragraph-xs text-text-sub-600",children:"We will use our dark blog cover theme"})]}),u.jsx("div",{className:"relative flex size-5 shrink-0 items-center justify-center ml-3",children:u.jsx("div",{className:`size-4 rounded-full ${l==="dark"?"bg-primary-base":"bg-stroke-soft-200"} flex items-center justify-center`,children:l==="dark"&&u.jsx("div",{className:"size-2 rounded-full bg-static-white"})})})]}),u.jsx("div",{className:"w-full rounded-lg overflow-hidden",children:u.jsx("img",{src:"/images/general-solid.png",alt:"Dark theme preview",className:"w-full h-auto object-cover"})})]})]}),u.jsxs("div",{className:"w-full max-w-[392px] flex flex-col gap-3",children:[u.jsx(ql,{variant:"primary",size:"medium",onClick:V,disabled:!l,className:"w-full",children:"Continue"}),u.jsx("button",{type:"button",onClick:U,className:"w-full inline-flex items-center justify-center px-3.5 h-10 rounded-10 text-label-sm bg-transparent text-text-sub-600 ring-transparent hover:bg-bg-weak-50 hover:text-text-strong-950 transition duration-200 ease-out",children:"Back"})]})]});case 3:return u.jsxs("div",{className:"flex w-full max-w-[392px] flex-col items-center gap-6",children:[u.jsxs("div",{className:"flex w-full flex-col items-center gap-2",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center rounded-full backdrop-blur-xl lg:size-24 before:absolute before:inset-0 before:rounded-full before:bg-gradient-to-b before:from-neutral-500 before:to-transparent before:opacity-10",children:u.jsx("div",{className:"relative z-10 flex size-12 items-center justify-center rounded-full bg-bg-white-0 shadow-regular-xs ring-1 ring-inset ring-stroke-soft-200 lg:size-16",children:u.jsx(CSe,{className:"size-6 text-text-sub-600 lg:size-8"})})}),u.jsxs("div",{className:"space-y-1 text-center w-full",children:[u.jsx("div",{className:"text-title-h6 lg:text-title-h5",children:"Almost Done!"}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:"Review your information before completing setup"})]})]}),j&&u.jsx("div",{className:"w-full rounded-lg bg-error-lighter p-4 text-error-dark text-paragraph-sm",children:j}),u.jsxs("div",{className:"w-full space-y-3 rounded-xl bg-bg-weak-50 p-4",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-label-xs text-text-soft-400 uppercase",children:"Website"}),u.jsx("div",{className:"mt-1 text-paragraph-sm text-text-strong-950",children:C.website})]}),u.jsx("div",{className:"h-px bg-stroke-soft-200"}),u.jsxs("div",{children:[u.jsx("div",{className:"text-label-xs text-text-soft-400 uppercase",children:"Blog Theme"}),u.jsx("div",{className:"mt-1 text-paragraph-sm text-text-strong-950 capitalize",children:l})]})]}),u.jsxs("div",{className:"flex w-full flex-col gap-3",children:[u.jsx(ql,{variant:"primary",size:"medium",onClick:W,disabled:r,className:"w-full",children:r?"Completing...":"Complete Setup"}),u.jsx("button",{type:"button",onClick:U,className:"w-full inline-flex items-center justify-center px-3.5 h-10 rounded-10 text-label-sm bg-transparent text-text-sub-600 ring-transparent hover:bg-bg-weak-50 hover:text-text-strong-950 transition duration-200 ease-out",children:"Back"})]})]});case 4:const X=(F==null?void 0:F.totalKeywords)||0,Q=(F==null?void 0:F.trafficPotential)||0,ne=Math.round(Q*.046),ie=((F==null?void 0:F.easyKeywords)||0)+((F==null?void 0:F.mediumKeywords)||0)+((F==null?void 0:F.hardKeywords)||0),se={easy:ie>0?Math.round(((F==null?void 0:F.easyKeywords)||0)/ie*100):0,medium:ie>0?Math.round(((F==null?void 0:F.mediumKeywords)||0)/ie*100):0,hard:ie>0?Math.round(((F==null?void 0:F.hardKeywords)||0)/ie*100):0}
113,oe=((Y=F==null?void 0:F.keywords)==null?void 0:Y.slice(0,6).map(J=>({keyword:J.keyword,traffic:J.traffic,kd:J.competitionIndex})))||[];if(R!=="completed"&&!H){let J="Analyzing your website...",ae="This may take a few moments";return R==="researching_website"?(J="Researching Your Website",ae="Extracting content and understanding your business"):R==="summarising_content"?(J="Summarising Content",ae="Creating a summary of your website"):R==="seo_research"&&(J="Doing SEO Research",ae="Finding keywords and analyzing competition"),u.jsx("div",{className:"flex w-full max-w-[392px] flex-col items-center gap-6",children:u.jsxs("div",{className:"flex w-full flex-col items-center gap-4",children:[u.jsx("div",{className:"relative flex size-[68px] shrink-0 items-center justify-center",children:u.jsx("div",{className:"absolute inset-0 animate-spin rounded-full border-4 border-gray-200 border-t-primary-base"})}),u.jsxs("div",{className:"space-y-1 text-center w-full",children:[u.jsx("div",{className:"text-title-h6 lg:text-title-h5",children:J}),u.jsx("div",{className:"text-paragraph-sm text-text-sub-600 lg:text-paragraph-md",children:ae})]})]})})}if(H){const J=B(H);return u.jsx("div",{className:"flex w-full max-w-[392px] flex-col items-center gap-6",children:u.jsxs("div",{className:"flex w-full flex-col items-center gap-4",children:[u.jsx("div",{className:"text-title-h6 lg:text-title-h5",children:"Website Analysis Failed"}),u.jsx("div",{className:"w-full rounded-lg bg-error-lighter p-4 text-error-dark text-paragraph-sm",children:J}),u.jsxs("div",{className:"flex w-full flex-col gap-3",children:[u.jsx(ql,{variant:"primary",size:"medium",onClick:()=>e("/"),className:"w-full",children:"Continue to Dashboard"}),u.jsx(ql,{variant:"ghost",size:"medium",onClick:()=>{L(null),I("pending"),a(3)},className:"w-full",children:"Try Again"})]})]})})}return u.jsxs("div",{className:"flex w-full max-w-6xl flex-col items-center gap-6 px-4",children:[u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 w-full",children:[u.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-2xl border border-stroke-soft-200 dark:border-gray-800 p-6",children:[u.jsx("p",{className:"text-sm text-text-sub-600 dark:text-gray-400 mb-2",children:"Keywords Found"}),u.jsx("p",{className:"text-4xl font-semibold text-text-strong-950 dar
113k:text-gray-100 mb-4",children:X}),u.jsxs("div",{className:"h-2 w-full bg-neutral-soft-100 dark:bg-gray-800 rounded-full overflow-hidden flex mb-3",children:[u.jsx("div",{className:"bg-success-500 dark:bg-green-500",style:{width:`${se.easy}%`}}),u.jsx("div",{className:"bg-warning-500 dark:bg-orange-500",style:{width:`${se.medium}%`}}),u.jsx("div",{className:"bg-error-500 dark:bg-red-500",style:{width:`${se.hard}%`}})]}),u.jsxs("div",{className:"flex items-center gap-4 text-xs",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("div",{className:"size-2 rounded-full bg-success-500 dark:bg-green-500"}),u.jsx("span",{className:"text-text-sub-600 dark:text-gray-400",children:"Easy"})]}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("div",{className:"size-2 rounded-full bg-warning-500 dark:bg-orange-500"}),u.jsx("span",{className:"text-text-sub-600 dark:text-gray-400",children:"Medium"})]}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("div",{className:"size-2 rounded-full bg-error-500 dark:bg-red-500"}),u.jsx("span",{className:"text-text-sub-600 dark:text-gray-400",children:"Hard"})]})]})]}),u.jsxs("div",{className:"lg:col-span-2 bg-neutral-soft-50 dark:bg-gray-900 rounded-2xl border border-stroke-soft-200 dark:border-gray-800 p-6",children:[u.jsx("div",{className:"inline-block px-3 py-1 bg-white dark:bg-gray-800 rounded-lg border border-stroke-soft-200 dark:border-gray-700 mb-4",children:u.jsx("span",{className:"text-sm font-medium text-text-sub-600 dark:text-gray-400",children:"Traffic Potential"})}),u.jsxs("h2",{className:"text-4xl font-semibold text-text-strong-950 dar
113k:text-gray-100 mb-2",children:[Q.toLocaleString()," Per Month"]}),u.jsx("p",{className:"text-base text-text-sub-600 dark:text-gray-400 mb-4",children:"New visitors to your website"}),u.jsx("p",{className:"text-sm text-text-sub-600 dark:text-gray-400 mb-6",children:"Add new visitors to your website by letting Seio create, schedule and publish content to your websites blog."}),u.jsxs("div",{className:"pt-4 border-t border-stroke-soft-200 dark:border-gray-800",children:[u.jsxs("h3",{className:"text-lg font-semibold text-text-strong-950 dark:text-gray-100 mb-2",children:["That's ",ne," New Potential Customers Each Month"]}),u.jsx("p",{className:"text-sm text-text-sub-600 dark:text-gray-400",children:"Sounds like a good idea to us ð No effort from you required, drink coffee, sleep, get a beer, see friends, same result either way!"})]})]})]}),u.jsx("div",{className:"bg-white dark:bg-gray-900 rounded-2xl border border-stroke-soft-200 dark:border-gray-800 overflow-hidden w-full",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"border-b border-stroke-soft-200 dark:border-gray-800",children:[u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-sub-600 dark:text-gray-400 uppercase tracking-wider",children:"Keyword"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-sub-600 dark:text-gray-400 uppercase tracking-wider",children:"Traffic"}),u.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-text-sub-600 dark:text-gray-400 uppercase tracking-wider",children:"KD"})]})}),u.jsx("tbody",{className:"divide-y divide-stroke-soft-200 dark:divide-gray-800",children:oe.map((J,ae)=>u.jsxs("tr",{className:"hover:bg-neutral-soft-50 dark:hover:bg-gray-800/50",children:[u.jsx("td",{className:"px-6 py-4 text-sm text-text-strong-950 dar
113k:text-gray-100",children:J.keyword}),u.jsx("td",{className:"px-6 py-4 text-sm text-text-sub-600 dark:text-gray-400",children:J.traffic.toLocaleString()}),u.jsx("td",{className:"px-6 py-4 text-sm text-text-sub-600 dark:text-gray-400",children:J.kd})]},ae))})]})}),u.jsxs("div",{className:"w-full mt-8",children:[u.jsxs("div",{className:"text-center mb-8",children:[u.jsx("h2",{className:"text-3xl font-semibold text-text-strong-950 dark:text-gray-100 mb-2",children:"Choose Your Plan"}),u.jsx("p",{className:"text-base text-text-sub-600 dark:text-gray-400",children:"Select the plan that best fits your needs"})]}),u.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 max-w-5xl mx-auto",children:U9e.map(J=>u.jsxs("button",{type:"button",onClick:()=>f(J.priceId),className:`relative flex flex-col items-start gap-4 rounded-xl p-6 text-left transition bg-bg-white-0 dark:bg-gray-900 ${d===J.priceId?"ring-2 ring-primary-base":"ring-1 ring-stroke-soft-200 dark:ring-gray-800 hover:ring-stroke-strong-950 dark:hover:ring-gray-700"}`,children:[u.jsxs("div",{className:"flex w-full items-start justify-between gap-3",children:[u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("h3",{className:"text-2xl font-semibold text-text-strong-950 dar
113k:text-gray-100 mb-1",children:J.name}),u.jsx("p",{className:"text-sm text-text-sub-600 dark:text-gray-400",children:J.description})]}),u.jsx("div",{className:"relative flex size-5 shrink-0 items-center justify-center ml-3 mt-1",children:u.jsx("div",{className:`size-4 rounded-full flex items-center justify-center ${d===J.priceId?"bg-primary-base":"bg-stroke-soft-200 dark:bg-gray-700"}`,children:d===J.priceId&&u.jsx("div",{className:"size-2 rounded-full bg-static-white"})})})]}),u.jsxs("div",{className:"flex items-baseline",children:[u.jsxs("span",{className:"text-5xl font-semibold text-text-strong-950 dark:text-gray-100",children:["$",J.price]}),u.jsx("span",{className:"text-lg text-text-sub-600 dark:text-gray-400 ml-2",children:"/mo"})]}),u.jsx("div",{className:"space-y-4 w-full",children:J.features.map((ae,re)=>u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:"flex size-5 shrink-0 items-center justify-center rounded-full bg-primary-100 dark:bg-primary-900 text-primary-600 dark:text-primary-400 mt-0.5",children:u.jsx(zw,{size:14})}),u.jsx("span",{className:"text-sm text-text-sub-600 dark:text-gray-400",children:ae})]},re))})]},J.priceId))}),u.jsxs("div",{className:"mt-8 max-w-md mx-auto",children:[u.jsx("div",{className:"text-center mb-4",children:!d&&u.jsx("p",{className:"text-sm text-text-sub-600 dark:text-gray-400",children:"Select a plan to continue"})}),u.jsxs(ql,{variant:"primary",size:"medium",onClick:b,disabled:!d||v,className:"w-full",children:["Get More Traffic",v&&u.jsx("div",{className:"ml-2 h-5 w-5 animate-spin rounded-full border-2 border-current border-t-transparent","aria-hidden":!0})]})]})]})]});default:return null}};return u.jsxs("div",{className:"flex min-h-screen flex-col lg:grid lg:grid-cols-[auto,minmax(0,1fr)] lg:items-start bg-bg-white-0",children:[u.jsx("div",{className:"hidden flex-1 flex-col self-stretch p-2 lg:flex",children:u.jsxs("div",{className:"flex w-[268px] flex-1 shrink-0 flex-col gap-3 rounded-2xl bg-bg-weak-50 px-4 pb-4 pt-5",children:[u.jsxs("div",{className:"w-full flex-1",children:[u.jsx("div",{className:"mb-3 text-subheading-xs uppercase text-text-soft-400",children:"Transfer Sequence"}),u.jsx("div",{className:"space-y-2",children:z.map(Y=>Y.id===4&&s<4?null:u.jsxs("button",{type:"button",onClick:()=>Y.id<s&&a(Y.id),disabled:Y.id>s,className:`grid w-full auto-cols-auto grid-flow-col grid-cols-[auto,minmax(0,1fr)] items-center gap-2.5 rounded-10 p-2 text-left text-paragraph-sm transition ${s===Y.id?"bg-bg-white-0 text-text-strong-950 shadow-regular-xs":Y.completed?"bg-bg-weak-50 text-text-sub-600 hover:bg-bg-white-0":"bg-bg-weak-50 text-text-sub-600"}`,children:[Y.completed?u.jsx("div",{className:"flex size-5 shrink-0 items-center justify-center rounded-full text-label-xs bg-success-base text-static-white",children:u.jsx(zw,{className:"size-4"})}):u.jsx("div",{className:`flex size-5 shrink-0 items-center justify-center rounded-full text-label-xs ${s===Y.id?"bg-primary-base text-static-white":"bg-bg-white-0 text-text-sub-600 shadow-regular-xs"}`,children:Y.id}),Y.label,s===Y.id&&u.jsx(im,{className:"size-5 shrink-0 text-text-sub-600 ml-auto"})]},Y.id))})]}),u.jsx("div",{className:"text-center text-paragraph-xs text-text-soft-400",children:"© 2026 Seio"})]})}),u.jsx("div",{className:"relative isolate mx-auto flex w-full flex-1 flex-col",children:u.jsx("div",{className:"flex w-full justify-center py-12",children:G()})})]})}const W9e=({redirectPath:e="/sign-in"})=>{const t=lo(),{data:n,isLoading:r,isError:i}=rm(),{data:o,isLoading:s,error:a}=UO(void 0,{skip:!(n!=null&&n.user)});return K.useEffect(()=>{console.log("[ProtectedRoute] Session:",n),console.log("[ProtectedRoute] Profile:",o),console.log("[ProtectedRoute] Profile Loading:",s),console.log("[ProtectedRoute] Profile Error:",a)},[n,o,s,a]),r||n!=null&&n.user&&s?u.jsx("div",{className:"flex items-center justify-center h-screen",children:u.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-violet-500"})}):i||!n?u.jsx(Tw,{to:e,replace:!0}):t.pathname==="/onboarding"?u.jsx(U1,{}):!o||o&&!o.onboardingComplete?(console.log("[ProtectedRoute] Redirecting to onboarding - profile:",o),u.jsx(Tw,{to:"/onboarding",replace:!0})):u.jsx(U1,{})},Yie=x.createContext({user:null,isLoading:!0,isAuthenticated:!1}),G9e=()=>x.useContext(Yie),K9e=({children:e})=>{const{data:t,isLoading:n}=rm(),r={user:(t==null?void 0:t.user)||null,isLoading:n,isAuthenticated:!!(t!=null&&t.user)};return u.jsx(Yie.Provider,{value:r,children:e})};function yd(e,t,n,r,i){const o=x.Children.map(e,(s,a)=>{var f;if(!x.isValidElement(s))return s;const l=((f=s.type)==null?void 0:f.displayName)||"",c=n.includes(l)?t:{},d=s.props;return x.cloneElement(s,{...c,key:`${r}-${a}`},yd(d==null?void 0:d.children,t,n,r,d==null?void 0:d.asChild))});return i?o==null?void 0:o[0]:o}const Y9e="ButtonRoot",Xie="ButtonIcon",Zie=el({slots:{root:["group relative inline-flex items-center justify-center whitespace-nowrap outline-none","transition duration-200 ease-out","focus:outline-none","disabled:pointer-events-none disabled:bg-bg-weak-50 disabled:text-text-disabled-300 disabled:ring-transparent"],icon:["flex size-5 shrink-0 items-center justify-center"]},variants:{variant:{primary:{},neutral:{},error:{}},mode:{filled:{},stroke:{root:"ring-1 ring-inset"},lighter:{root:"ring-1 ring-inset"},ghost:{root:"ring-1 ring-inset"}},size:{medium:{root:"h-10 gap-3 rounded-10 px-3.5 text-label-sm",icon:"-mx-1"},small:{root:"h-9 gap-3 rounded-lg px-3 text-label-sm",icon:"-mx-1"},xsmall:{root:"h-8 gap-2.5 rounded-lg px-2.5 text-label-sm",icon:"-mx-1"},xxsmall:{root:"h-7 gap-2.5 rounded-lg px-2 text-label-sm",icon:"-mx-1"}}},compoundVariants:[{variant:"primary",mode:"filled",class:{root:["bg-primary-base text-static-white","hover:bg-primary-darker","focus-visible:shadow-button-primary-focus"]}},{variant:"primary",mode:"stroke",class:{root:["bg-bg-white-0 text-primary-base r
113ing-primary-base","hover:bg-primary-alpha-10 hover:ring-transparent","focus-visible:shadow-button-primary-focus"]}},{variant:"primary",mode:"lighter",class:{root:["bg-primary-alpha-10 text-primary-base ring-transparent","hover:bg-bg-white-0 hover:ring-primary-base","focus-visible:bg-bg-white-0 focus-visible:shadow-button-primary-focus focus-visible:ring-primary-base"]}},{variant:"primary",mode:"ghost",class:{root:["bg-transparent text-primary-base ring-transparent","hover:bg-primary-alpha-10","focus-visible:bg-bg-white-0 focus-visible:shadow-button-primary-focus focus-visible:ring-primary-base"]}},{variant:"neutral",mode:"filled",class:{root:["bg-bg-strong-950 text-text-white-0","hover:bg-bg-surface-800","focus-visible:shadow-button-important-focus"]}},{variant:"neutral",mode:"stroke",class:{root:["bg-bg-white-0 text-text-sub-600 shadow-regular-xs ring-stroke-soft-200","hover:bg-bg-weak-50 hover:text-text-strong-950 hover:shadow-none hover:ring-transparent","focus-visible:text-text-strong-950 focus-visible:shadow-button-important-focus focus-visible:ring-stroke-strong-950"]}},{variant:"neutral",mode:"lighter",class:{root:["bg-bg-weak-50 text-text-sub-600 ring-transparent","hover:bg-bg-white-0 hover:text-text-strong-950 hover:shadow-regular-xs hover:ring-stroke-soft-200","focus-visible:bg-bg-white-0 focus-visible:text-text-strong-950 focus-visible:shadow-button-important-focus focus-visible:ring-stroke-strong-950"]}},{variant:"neutral",mode:"ghost",class:{root:["bg-transparent text-text-sub-600 ring-transparent","hover:bg-bg-weak-50 hover:text-text-strong-950","focus-visible:bg-bg-white-0 focus-visible:text-text-strong-950 focus-visible:shadow-button-important-focus focus-visible:ring-stroke-strong-950"]}},{variant:"error",mode:"filled",class:{root:["bg-error-base text-static-white","hover:bg-red-700","focus-visible:shadow-button-error-focus"]}},{variant:"error",mode:"stroke",class:{root:["bg-bg-white-0 text-error-base ring-error-base","hover:bg-red-alpha-10 hover:ring-transparent","focus-visible:shadow-button-error-focus"]}},{variant:"error",mode:"lighter",class:{root:["bg-red-alpha-10 text-error-base ring-transparent","hover:bg-bg-white-0 hover:ring-error-base","focus-visible:bg-bg-white-0 focus-visible:shadow-button-error-focus focus-visible:ring-error-base"]}},{variant:"error",mode:"ghost",class:{root:["bg-transparent text-error-base ring-transparent","hover:bg-red-alpha-10","focus-visible:bg-bg-white-0 focus-visible:shadow-button-error-focus focus-visible:ring-error-base"]}}],defaultVariants:{variant:"primary",mode:"filled",size:"medium"}}),Re=x.forwardRef(({children:e,variant:t,mode:n,size:r,asChild:i,className:o,...s},a)=>{const l=x.useId(),c=i?Ei:"button",{root:d}=Zie({variant:t,mode:n,size:r}),p=yd(e,{variant:t,mode:n,size:r},[Xie],l,i);return u.jsx(c,{ref:a,className:d({class:o}),...s,children:p})});Re.displayName=Y9e;function wt({variant:e,mode:t,size:n,as:r,className:i,...o}){const s=r||"div",{icon:a}=Zie({mode:t,variant:e,size:n});return u.jsx(s,{className:a({class:i}),...o})}wt.displayName=Xie;function On(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function _R(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,X9e(i,...t)]}function X9e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c}
vendor: 43,270 bytes, line 113
113)=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function WH(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function AR(...e){return t=>{let n=!1;const r=e.map(i=>{const o=WH(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():WH(e[i],null)}}}}function jo(...e){return x.useCallback(AR(...e),e)}function Xw(e){const t=Z9e(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find(J9e);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Z9e(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=t_e(i),a=e_e(o,i.props);return i.type!==x.Fragment&&(a.ref=r?AR(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Q9e=Symbol("radix.slottable");function J9e(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Q9e}function e_e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function t_e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function n_e(e){const t=e+"CollectionProvider",[n,r]=_R(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:C}=v,S=K.useRef(null),E=K.useRef(new Map).current;return u.jsx(i,{scope:b,itemMap:E,collectionRef:S,children:C})};s.displayName=t;const a=e+"CollectionSlot",l=Xw(a),c=K.forwardRef((v,b)=>{const{scope:C,children:S}=v,E=o(a,C),A=jo(b,E.collectionRef);return u.jsx(l,{ref:A,children:S})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=Xw(d),m=K.forwardRef((v,b)=>{const{scope:C,children:S,...E}=v,A=K.useRef(null),_=jo(b,A),N=o(d,C);return K.useEffect(()=>(N.itemMap.set(A,{ref:A,...E}),()=>void N.itemMap.delete(A))),u.jsx(p,{[f]:"",ref:_,children:S})});m.displayName=d;function y(v){const b=o(e+"CollectionConsumer",v);return K.useCallback(()=>{const S=b.collectionRef.current;if(!S)return[];const E=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((N,j)=>E.indexOf(N.ref.current)-E.indexOf(j.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:m},y,r]}var r_e=x.createContext(void 0);function i_e(e){const t=x.useContext(r_e);return e||t||"ltr"}var o_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ys=o_e.reduce((e,t)=>{const n=Xw(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qie(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function id(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function s_e(e,t=globalThis==null?void 0:globalThis.document){const n=id(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var a_e="DismissableLayer",vj="dismissableLayer.update",l_e="dismissableLayer.pointerDownOutside",c_e="dismissableLayer.focusOutside",GH,Jie=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),eoe=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,c=x.useContext(Jie),[d,f]=x.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),y=jo(t,j=>f(j)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),S=d?v.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,A=S>=C,_=f_e(j=>{const T=j.target,O=[...c.branches].some(D=>D.contains(T));!A||O||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},p),N=h_e(j=>{const T=j.target;[...c.branches].some(D=>D.contains(T))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},p);return s_e(j=>{S===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},p),x.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(GH=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),KH(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=GH)}},[d,p,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),KH())},[d,c]),x.useEffect(()=>{const j=()=>m({});return document.addEventListener(vj,j),()=>document.removeEventListener(vj,j)},[]),u.jsx(ys.div,{...l,ref:y,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:On(e.onFocusCapture,N.onFocusCapture),onBlurCapture:On(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:On(e.onPointerDownCapture,_.onPointerDownCapture)})});eoe.displayName=a_e;var u_e="DismissableLayerBranch",d_e=x.forwardRef((e,t)=>{const n=x.useContext(Jie),r=x.useRef(null),i=jo(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(ys.div,{...e,ref:i})});d_e.displayName=u_e;function f_e(e,t=globalThis==null?void 0:globalThis.document){const n=id(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){toe(l_e,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function h_e(e,t=globalThis==null?void 0:globalThis.document){const n=id(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&toe(c_e,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function KH(){const e=new CustomEvent(vj);document.dispatchEvent(e)}function toe(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Qie(i,o):i.dispatchEvent(o)}var I7=0;function p_e(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??YH()),document.body.insertAdjacentElement("beforeend",e[1]??YH()),I7++,()=>{I7===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),I7--}},[])}function YH(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var L7="focusScope.autoFocusOnMount",$7="focusScope.autoFocusOnUnmount",XH={bubbles:!1,cancelable:!0},m_e="FocusScope",noe=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=x.useState(null),c=id(i),d=id(o),f=x.useRef(null),p=jo(t,v=>l(v)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let v=function(E){if(m.paused||!a)return;const A=E.target;a.contains(A)?f.current=A:fu(f.current,{select:!0})},b=function(E){if(m.paused||!a)return;const A=E.relatedTarget;A!==null&&(a.contains(A)||fu(f.current,{select:!0}))},C=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&fu(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const S=new MutationObserver(C);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),S.disconnect()}}},[r,a,m.paused]),x.useEffect(()=>{if(a){QH.add(m);const v=document.activeElement;if(!a.contains(v)){const C=new CustomEvent(L7,XH);a.addEventListener(L7,c),a.dispatchEvent(C),C.defaultPrevented||(g_e(w_e(roe(a)),{select:!0}),document.activeElement===v&&fu(a))}return()=>{a.removeEventListener(L7,c),setTimeout(()=>{const C=new CustomEvent($7,XH);a.addEventListener($7,d),a.dispatchEvent(C),C.defaultPrevented||fu(v??document.body,{select:!0}),a.removeEventListener($7,d),QH.remove(m)},0)}}},[a,c,d,m]);const y=x.useCallback(v=>{if(!n&&!r||m.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,C=document.activeElement;if(b&&C){const S=v.currentTarget,[E,A]=y_e(S);E&&A?!v.shiftKey&&C===A?(v.preventDefault(),n&&fu(E,{select:!0})):v.shiftKey&&C===E&&(v.preventDefault(),n&&fu(A,{select:!0})):C===S&&v.preventDefault()}},[n,r,m.paused]);return u.jsx(ys.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});noe.displayName=m_e;function g_e(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fu(r,{select:t}),document.activeElement!==n)return}function y_e(e){const t=roe(e),n=ZH(t,e),r=ZH(t.reverse(),e);return[n,r]}function roe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ZH(e,t){for(const n of e)if(!v_e(n,{upTo:t}))return n}function v_e(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function b_e(e){return e instanceof HTMLInputElement&&"select"in e}function fu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&b_e(e)&&t&&e.select()}}var QH=x_e();function x_e(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=JH(e,t),e.unshift(t)},remove(t){var n;e=JH(e,t),(n=e[0])==null||n.resume()}}}function JH(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function w_e(e){return e.filter(t=>t.tagName!=="A")}var s0=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},C_e="Arrow",ioe=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.jsx(ys.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});ioe.displayName=C_e;var S_e=ioe;function E_e(e){const[t,n]=x.useState(void 0);return s0(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var NR="Popper",[ooe,soe]=_R(NR),[k_e,aoe]=ooe(NR),loe=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return u.jsx(k_e,{scope:t,anchor:r,onAnchorChange:i,children:n})};loe.displayName=NR;var coe="PopperAnchor",uoe=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=aoe(coe,n),s=x.useRef(null),a=jo(t,s),l=x.useRef(null);return x.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||s.current,c!==l.current&&o.onAnchorChange(l.current)}),r?null:u.jsx(ys.div,{...i,ref:a})});uoe.displayName=coe;var jR="PopperContent",[__e,A_e]=ooe(jR),doe=x.forwardRef((e,t)=>{var ie,se,oe,J,ae,re;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...v}=e,b=aoe(jR,n),[C,S]=x.useState(null),E=jo(t,pe=>S(pe)),[A,_]=x.useState(null),N=E_e(A),j=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,O=r+(o!=="center"?"-"+o:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(c)?c:[c],I=R.length>0,F={padding:D,boundary:R.filter(j_e),altBoundary:I},{refs:$,floatingStyles:H,placement:L,isPositioned:B,middlewareData:z}=Pv({strategy:"fixed",placement:O,whileElementsMounted:(...pe)=>cm(...pe,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[Dv({mainAxis:i+T,alignmentAxis:s}),l&&Iv({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?F5():void 0,...F}),l&&Lv({...F}),B5({...F,apply:({elements:pe,rects:be,availableWidth:xe,availableHeight:ke})=>{const{width:Pe,height:it}=be.reference,qe=pe.floating.style;qe.setProperty("--radix-popper-available-width",`${xe}px`),qe.setProperty("--radix-popper-available-height",`${ke}px`),qe.setProperty("--radix-popper-anchor-width",`${Pe}px`),qe.setProperty("--radix-popper-anchor-height",`${it}px`)}}),A&&V5({element:A,padding:a}),T_e({arrowWidth:j,arrowHeight:T}),p&&H5({strategy:"referenceHidden",...F})]}),[V,U]=poe(L),W=id(y);s0(()=>{B&&(W==null||W())},[B,W]);const G=(ie=z.arrow)==null?void 0:ie.x,Y=(se=z.arrow)==null?void 0:se.y,X=((oe=z.arrow)==null?void 0:oe.centerOffset)!==0,[Q,ne]=x.useState();return s0(()=>{C&&ne(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(J=z.transformOrigin)==null?void 0:J.x,(ae=z.transformOrigin)==null?void 0:ae.y].join(" "),...((re=z.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(__e,{scope:n,placedSide:V,onArrowChange:_,arrowX:G,arrowY:Y,shouldHideArrow:X,children:u.jsx(ys.div,{"data-side":V,"data-align":U,...v,ref:E,style:{...v.style,animation:B?void 0:"none"}})})})});doe.displayName=jR;var foe="PopperArrow",N_e={top:"bottom",right:"left",bottom:"top",left:"right"},hoe=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=A_e(foe,r),s=N_e[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(S_e,{...i,ref:n,style:{...i.style,display:"block"}})})});hoe.displayName=foe;function j_e(e){return e!==null}var T_e=e=>({name:"transformOrigin",options:e,fn(t){var b,C,S;const{placement:n,rects:r,middlewareData:i}=t,s=((b=i.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=poe(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((C=i.arrow)==null?void 0:C.x)??0)+a/2,m=(((S=i.arrow)==null?void 0:S.y)??0)+l/2;let y="",v="";return c==="bottom"?(y=s?f:`${p}px`,v=`${-l}px`):c==="top"?(y=s?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,v=s?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,v=s?f:`${m}px`),{data:{x:y,y:v}}}});function poe(e){const[t,n="center"]=e.split("-");return[t,n]}var M_e=loe,O_e=uoe,R_e=doe,P_e=hoe,D_e="Portal",moe=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=x.useState(!1);s0(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Fs.createPortal(u.jsx(ys.div,{...r,ref:t}),s):null});moe.displayName=D_e;function I_e(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var Bv=e=>{const{present:t,children:n}=e,r=L_e(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=jo(r.ref,$_e(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};Bv.displayName="Presence";function L_e(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=I_e(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=i2(r.current);o.current=a==="mounted"?c:"none"},[a]),s0(()=>{const c=r.current,d=i.current;if(d!==e){const p=o.current,m=i2(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),s0(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const v=i2(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=m=>{m.target===t&&(o.current=i2(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function i2(e){return(e==null?void 0:e.animationName)||"none"}function $_e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Up(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function goe(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,z_e(i,...t)]}function z_e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function eV(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yoe(...e){return t=>{let n=!1;const r=e.map(i=>{const o=eV(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():eV(e[i],null)}}}}function bj(...e){return x.useCallback(yoe(...e),e)}function xj(e){const t=F_e(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find(H_e);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function F_e(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=U_e(i),a=V_e(o,i.props);return i.type!==x.Fragment&&(a.ref=r?yoe(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var B_e=Symbol("radix.slottable");function H_e(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===B_e}function V_e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function U_e(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function q_e(e){const t=e+"CollectionProvider",[n,r]=goe(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:b,children:C}=v,S=K.useRef(null),E=K.useRef(new Map).current;return u.jsx(i,{scope:b,itemMap:E,collectionRef:S,children:C})};s.displayName=t;const a=e+"CollectionSlot",l=xj(a),c=K.forwardRef((v,b)=>{const{scope:C,children:S}=v,E=o(a,C),A=bj(b,E.collectionRef);return u.jsx(l,{ref:A,children:S})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=xj(d),m=K.forwardRef((v,b)=>{const{scope:C,children:S,...E}=v,A=K.useRef(null),_=bj(b,A),N=o(d,C);return K.useEffect(()=>(N.itemMap.set(A,{ref:A,...E}),()=>void N.itemMap.delete(A))),u.jsx(p,{[f]:"",ref:_,children:S})});m.displayName=d;function y(v){const b=o(e+"CollectionConsumer",v);return K.useCallback(()=>{const S=b.collectionRef.current;if(!S)return[];const E=Array.from(S.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((N,j)=>E.indexOf(N.ref.current)-E.indexOf(j.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:c,ItemSlot:m},y,r]}var voe=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},W_e=xi[" useId ".trim().toString()]||(()=>{}),G_e=0;function K_e(e){const[t,n]=x.useState(W_e());return voe(()=>{n(r=>r??String(G_e++))},[e]),t?`radix-${t}`:""}var Y_e=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],boe=Y_e.reduce((e,t)=>{const n=xj(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function X_e(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Z_e=xi[" useInsertionEffect ".trim().toString()]||voe;function Q_e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=J_e({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=x.useCallback(d=>{var f;if(a){const p=eAe(d)?d(e):d;p!==e&&((f=s.current)==null||f.call(s,p))}else o(d)},[a,e,o,s]);return[l,c]}function J_e({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return Z_e(()=>{o.current=t},[t]),x.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function eAe(e){return typeof e=="function"}var tAe=x.createContext(void 0);function nAe(e){const t=x.useContext(tAe);return e||t||"ltr"}var z7="rovingFocusGroup.onEntryFocus",rAe={bubbles:!1,cancelable:!0},Hv="RovingFocusGroup",[wj,xoe,iAe]=q_e(Hv),[oAe,Z5]=goe(Hv,[iAe]),[sAe,aAe]=oAe(Hv),woe=x.forwardRef((e,t)=>u.jsx(wj.Provider,{scope:e.__scopeRovingFocusGroup,children:u.jsx(wj.Slot,{scope:e.__scopeRovingFocusGroup,children:u.jsx(lAe,{...e,ref:t})})}));woe.displayName=Hv;var lAe=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,p=x.useRef(null),m=bj(t,p),y=nAe(o),[v,b]=Q_e({prop:s,defaultProp:a??null,onChange:l,caller:Hv}),[C,S]=x.useState(!1),E=X_e(c),A=xoe(n),_=x.useRef(!1),[N,j]=x.useState(0);return x.useEffect(()=>{const T=p.current;if(T)return T.addEventListener(z7,E),()=>T.removeEventListener(z7,E)},[E]),u.jsx(sAe,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:v,onItemFocus:x.useCallback(T=>b(T),[b]),onItemShiftTab:x.useCallback(()=>S(!0),[]),onFocusableItemAdd:x.useCallback(()=>j(T=>T+1),[]),onFocusableItemRemove:x.useCallback(()=>j(T=>T-1),[]),children:u.jsx(boe.div,{tabIndex:C||N===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:Up(e.onMouseDown,()=>{_.current=!0}),onFocus:Up(e.onFocus,T=>{const O=!_.current;if(T.target===T.currentTarget&&O&&!C){const D=new CustomEvent(z7,rAe);if(T.currentTarget.dispatchEvent(D),!D.defaultPrevented){const R=A().filter(L=>L.focusable),I=R.find(L=>L.active),F=R.find(L=>L.id===v),H=[I,F,...R].filter(Boolean).map(L=>L.ref.current);Eoe(H,d)}}_.current=!1}),onBlur:Up(e.onBlur,()=>S(!1))})})}),Coe="RovingFocusGroupItem",Soe=x.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...a}=e,l=K_e(),c=o||l,d=aAe(Coe,n),f=d.currentTabStopId===c,p=xoe(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:v}=d;return x.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),u.jsx(wj.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:u.jsx(boe.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:Up(e.onMouseDown,b=>{r?d.onItemFocus(c):b.preventDefault()}),onFocus:Up(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:Up(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){d.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const C=dAe(b,d.orientation,d.dir);if(C!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let E=p().filter(A=>A.focusable).map(A=>A.ref.current);if(C==="last")E.reverse();else if(C==="prev"||C==="next"){C==="prev"&&E.reverse();const A=E.indexOf(b.currentTarget);E=d.loop?fAe(E,A+1):E.slice(A+1)}setTimeout(()=>Eoe(E))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:v!=null}):s})})});Soe.displayName=Coe;var cAe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uAe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function dAe(e,t,n){const r=uAe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return cAe[r]}function Eoe(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function fAe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var koe=woe,_oe=Soe,Cj=["Enter"," "],hAe=["ArrowDown","PageUp","Home"],Aoe=["ArrowUp","PageDown","End"],pAe=[...hAe,...Aoe],mAe={ltr:[...Cj,"ArrowRight"],rtl:[...Cj,"ArrowLeft"]},gAe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Vv="Menu",[ey,yAe,vAe]=n_e(Vv),[dh,Noe]=_R(Vv,[vAe,soe,Z5]),Q5=soe(),joe=Z5(),[bAe,fh]=dh(Vv),[xAe,Uv]=dh(Vv),Toe=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:s=!0}=e,a=Q5(t),[l,c]=x.useState(null),d=x.useRef(!1),f=id(o),p=i_e(i);return x.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),u.jsx(M_e,{...a,children:u.jsx(bAe,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:u.jsx(xAe,{scope:t,onClose:x.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:r})})})};Toe.displayName=Vv;var wAe="MenuAnchor",TR=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Q5(n);return u.jsx(O_e,{...i,...r,ref:t})});TR.displayName=wAe;var MR="MenuPortal",[CAe,Moe]=dh(MR,{forceMount:void 0}),Ooe=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=fh(MR,t);return u.jsx(CAe,{scope:t,forceMount:n,children:u.jsx(Bv,{present:n||o.open,children:u.jsx(moe,{asChild:!0,container:i,children:r})})})};Ooe.displayName=MR;var as="MenuContent",[SAe,OR]=dh(as),Roe=x.forwardRef((e,t)=>{const n=Moe(as,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=fh(as,e.__scopeMenu),s=Uv(as,e.__scopeMenu);return u.jsx(ey.Provider,{scope:e.__scopeMenu,children:u.jsx(Bv,{present:r||o.open,children:u.jsx(ey.Slot,{scope:e.__scopeMenu,children:s.modal?u.jsx(EAe,{...i,ref:t}):u.jsx(kAe,{...i,ref:t})})})})}),EAe=x.forwardRef((e,t)=>{const n=fh(as,e.__scopeMenu),r=x.useRef(null),i=jo(t,r);return x.useEffect(()=>{const o=r.current;if(o)return U5(o)},[]),u.jsx(RR,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:On(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),kAe=x.forwardRef((e,t)=>{const n=fh(as,e.__scopeMenu);return u.jsx(RR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_Ae=Xw("MenuContent.ScrollLock"),RR=x.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,disableOutsideScroll:y,...v}=e,b=fh(as,n),C=Uv(as,n),S=Q5(n),E=joe(n),A=yAe(n),[_,N]=x.useState(null),j=x.useRef(null),T=jo(t,j,b.onContentChange),O=x.useRef(0),D=x.useRef(""),R=x.useRef(0),I=x.useRef(null),F=x.useRef("right"),$=x.useRef(0),H=y?$v:x.Fragment,L=y?{as:_Ae,allowPinchZoom:!0}:void 0,B=V=>{var ie,se;const U=D.current+V,W=A().filter(oe=>!oe.disabled),G=document.activeElement,Y=(ie=W.find(oe=>oe.ref.current===G))==null?void 0:ie.textValue,X=W.map(oe=>oe.textValue),Q=$Ae(X,U,Y),ne=(se=W.find(oe=>oe.textValue===Q))==null?void 0:se.ref.current;(function oe(J){D.current=J,window.clearTimeout(O.current),J!==""&&(O.current=window.setTimeout(()=>oe(""),1e3))})(U),ne&&setTimeout(()=>ne.focus())};x.useEffect(()=>()=>window.clearTimeout(O.current),[]),p_e();const z=x.useCallback(V=>{var W,G;return F.current===((W=I.current)==null?void 0:W.side)&&FAe(V,(G=I.current)==null?void 0:G.area)},[]);return u.jsx(SAe,{scope:n,searchRef:D,onItemEnter:x.useCallback(V=>{z(V)&&V.preventDefault()},[z]),onItemLeave:x.useCallback(V=>{var U;z(V)||((U=j.current)==null||U.focus(),N(null))},[z]),onTriggerLeave:x.useCallback(V=>{z(V)&&V.preventDefault()},[z]),pointerGraceTimerRef:R,onPointerGraceIntentChange:x.useCallback(V=>{I.current=V},[]),children:u.jsx(H,{...L,children:u.jsx(noe,{asChild:!0,trapped:i,onMountAutoFocus:On(o,V=>{var U;V.preventDefault(),(U=j.current)==null||U.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:u.jsx(eoe,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:m,children:u.jsx(koe,{asChild:!0,...E,dir:C.dir,orientation:"vertical",loop:r,currentTabStopId:_,onCurrentTabStopIdChange:N,onEntryFocus:On(l,V=>{C.isUsingKeyboardRef.current||V.preventDefault()}),preventScrollOnEntryFocus:!0,children:u.jsx(R_e,{role:"menu","aria-orientation":"vertical","data-state":Yoe(b.open),"data-radix-menu-content":"",dir:C.dir,...S,...v,ref:T,style:{outline:"none",...v.style},onKeyDown:On(v.onKeyDown,V=>{const W=V.target.closest("[data-radix-menu-content]")===V.currentTarget,G=V.ctrlKey||V.altKey||V.metaKey,Y=V.key.length===1;W&&(V.key==="Tab"&&V.preventDefault(),!G&&Y&&B(V.key));const X=j.current;if(V.target!==X||!pAe.includes(V.key))return;V.preventDefault();const ne=A().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);Aoe.includes(V.key)&&ne.reverse(),IAe(ne)}),onBlur:On(e.onBlur,V=>{V.currentTarget.contains(V.target)||(window.clearTimeout(O.current),D.current="")}),onPointerMove:On(e.onPointerMove,ty(V=>{const U=V.target,W=$.current!==V.clientX;if(V.currentTarget.contains(U)&&W){const G=V.clientX>$.current?"right":"left";F.current=G,$.current=V.clientX}}))})})})})})})});Roe.displayName=as;var AAe="MenuGroup",PR=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(ys.div,{role:"group",...r,ref:t})});PR.displayName=AAe;var NAe="MenuLabel",Poe=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(ys.div,{...r,ref:t})});Poe.displayName=NAe;var Zw="MenuItem",tV="menu.itemSelect",J5=x.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=x.useRef(null),s=Uv(Zw,e.__scopeMenu),a=OR(Zw,e.__scopeMenu),l=jo(t,o),c=x.useRef(!1),d=()=>{const f=o.current;if(!n&&f){const p=new CustomEvent(tV,{bubbles:!0,cancelable:!0});f.addEventListener(tV,m=>r==null?void 0:r(m),{once:!0}),Qie(f,p),p.defaultPrevented?c.current=!1:s.onClose()}};return u.jsx(Doe,{...i,ref:l,disabled:n,onClick:On(e.onClick,d),onPointerDown:f=>{var p;(p=e.onPointerDown)==null||p.call(e,f),c.current=!0},onPointerUp:On(e.onPointerUp,f=>{var p;c.current||(p=f.currentTarget)==null||p.click()}),onKeyDown:On(e.onKeyDown,f=>{const p=a.searchRef.current!=="";n||p&&f.key===" "||Cj.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});J5.displayName=Zw;var Doe=x.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,s=OR(Zw,n),a=joe(n),l=x.useRef(null),c=jo(t,l),[d,f]=x.useState(!1),[p,m]=x.useState("");return x.useEffect(()=>{const y=l.current;y&&m((y.textContent??"").trim())},[o.children]),u.jsx(ey.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:u.jsx(_oe,{asChild:!0,...a,focusable:!r,children:u.jsx(ys.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:c,onPointerMove:On(e.onPointerMove,ty(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:On(e.onPointerLeave,ty(y=>s.onItemLeave(y))),onFocus:On(e.onFocus,()=>f(!0)),onBlur:On(e.onBlur,()=>f(!1))})})})}),jAe="MenuCheckboxItem",Ioe=x.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return u.jsx(Boe,{scope:e.__scopeMenu,checked:n,children:u.jsx(J5,{role:"menuitemcheckbox","aria-checked":Qw(n)?"mixed":n,...i,ref:t,"data-state":IR(n),onSelect:On(i.onSelect,()=>r==null?void 0:r(Qw(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ioe.displayName=jAe;var Loe="MenuRadioGroup",[TAe,MAe]=dh(Loe,{value:void 0,onValueChange:()=>{}}),$oe=x.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=id(r);return u.jsx(TAe,{scope:e.__scopeMenu,value:n,onValueChange:o,children:u.jsx(PR,{...i,ref:t})})});$oe.displayName=Loe;var zoe="MenuRadioItem",Foe=x.forwardRef((e,t)=>{const{value:n,...r}=e,i=MAe(zoe,e.__scopeMenu),o=n===i.value;return u.jsx(Boe,{scope:e.__scopeMenu,checked:o,children:u.jsx(J5,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":IR(o),onSelect:On(r.onSelect,()=>{var s;return(s=i.onValueChange)==null?void 0:s.call(i,n)},{checkForDefaultPrevented:!1})})})});Foe.displayName=zoe;var DR="MenuItemIndicator",[Boe,OAe]=dh(DR,{checked:!1}),Hoe=x.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=OAe(DR,n);return u.jsx(Bv,{present:r||Qw(o.checked)||o.checked===!0,children:u.jsx(ys.span,{...i,ref:t,"data-state":IR(o.checked)})})});Hoe.displayName=DR;var RAe="MenuSeparator",Voe=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return u.jsx(ys.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Voe.displayName=RAe;var PAe="MenuArrow",Uoe=x.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=Q5(n);return u.jsx(P_e,{...i,...r,ref:t})});Uoe.displayName=PAe;var DAe="MenuSub",[NSt,qoe]=dh(DAe),r1="MenuSubTrigger",Woe=x.forwardRef((e,t)=>{const n=fh(r1,e.__scopeMenu),r=Uv(r1,e.__scopeMenu),i=qoe(r1,e.__scopeMenu),o=OR(r1,e.__scopeMenu),s=x.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=o,c={__scopeMenu:e.__scopeMenu},d=x.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return x.useEffect(()=>d,[d]),x.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),u.jsx(TR,{asChild:!0,...c,children:u.jsx(Doe,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":Yoe(n.open),...e,ref:AR(t,i.onTriggerChange),onClick:f=>{var p;(p=e.onClick)==null||p.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:On(e.onPointerMove,ty(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(o.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:On(e.onPointerLeave,ty(f=>{var m,y;d();const p=(m=n.content)==null?void 0:m.getBoundingClientRect();if(p){const v=(y=n.content)==null?void 0:y.dataset.side,b=v==="right",C=b?-5:5,S=p[b?"left":"right"],E=p[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+C,y:f.clientY},{x:S,y:p.top},{x:E,y:p.top},{x:E,y:p.bottom},{x:S,y:p.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:On(e.onKeyDown,f=>{var m;const p=o.searchRef.current!=="";e.disabled||p&&f.key===" "||mAe[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});Woe.displayName=r1;var Goe="MenuSubContent",Koe=x.forwardRef((e,t)=>{const n=Moe(as,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=fh(as,e.__scopeMenu),s=Uv(as,e.__scopeMenu),a=qoe(Goe,e.__scopeMenu),l=x.useRef(null),c=jo(t,l);return u.jsx(ey.Provider,{scope:e.__scopeMenu,children:u.jsx(Bv,{present:r||o.open,children:u.jsx(ey.Slot,{scope:e.__scopeMenu,children:u.jsx(RR,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;s.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:On(e.onFocusOutside,d=>{d.target!==a.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:On(e.onEscapeKeyDown,d=>{s.onClose(),d.preventDefault()}),onKeyDown:On(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),p=gAe[s.dir].includes(d.key);f&&p&&(o.onOpenChange(!1),(m=a.trigger)==null||m.focus(),d.preventDefault())})})})})})});Koe.displayName=Goe;function Yoe(e){return e?"open":"closed"}function Qw(e){return e==="indeterminate"}function IR(e){return Qw(e)?"indeterminate":e?"checked":"unchecked"}function IAe(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function LAe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function $Ae(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let s=LAe(e,Math.max(o,0));i.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function zAe(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o],l=t[s],c=a.x,d=a.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-c)*(r-d)/(p-d)+c&&(i=!i)}return i}function FAe(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return zAe(n,t)}function ty(e){return t=>t.pointerType==="mouse"?e(t):void 0}var BAe=Toe,HAe=TR,VAe=Ooe,UAe=Roe,qAe=PR,WAe=Poe,GAe=J5,KAe=Ioe,YAe=$oe,XAe=Foe,ZAe=Hoe,QAe=Voe,JAe=Uoe,eNe=Woe,tNe=Koe,nNe=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},rNe=xi[" useId ".trim().toString()]||(()=>{}),iNe=0;function Sj(e){const[t,n]=x.useState(rNe());return nNe(()=>{n(r=>r??String(iNe++))},[e]),e||(t?`radix-${t}`:"")}var eC="DropdownMenu",[oNe,jSt]=j5(eC,[Noe]),$i=Noe(),[sNe,Xoe]=oNe(eC),Zoe=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,l=$i(t),c=x.useRef(null),[d,f]=T5({prop:i,defaultProp:o??!1,onChange:s,caller:eC});return u.jsx(sNe,{scope:t,triggerId:Sj(),triggerRef:c,contentId:Sj(),open:d,onOpenChange:f,onOpenToggle:x.useCallback(()=>f(p=>!p),[f]),modal:a,children:u.jsx(BAe,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};Zoe.displayName=eC;var Qoe="DropdownMenuTrigger",Joe=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=Xoe(Qoe,n),s=$i(n);return u.jsx(HAe,{asChild:!0,...s,children:u.jsx(Za.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:N5(t,o.triggerRef),onPointerDown:za(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(o.onOpenToggle(),o.open||a.preventDefault())}),onKeyDown:za(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&o.onOpenToggle(),a.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Joe.displayName=Qoe;var aNe="DropdownMenuPortal",ese=e=>{const{__scopeDropdownMenu:t,...n}=e,r=$i(t);return u.jsx(VAe,{...r,...n})};ese.displayName=aNe;var tse="DropdownMenuContent",nse=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Xoe(tse,n),o=$i(n),s=x.useRef(!1);return u.jsx(UAe,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:za(e.onCloseAutoFocus,a=>{var l;s.current||(l=i.triggerRef.current)==null||l.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:za(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!i.modal||d)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});nse.displayName=tse;var lNe="DropdownMenuGroup",rse=x.forwardRef((e,t)=>
113{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(qAe,{...i,...r,ref:t})});rse.displayName=lNe;var cNe="DropdownMenuLabel",ise=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(WAe,{...i,...r,ref:t})});ise.displayName=cNe;var uNe="DropdownMenuItem",ose=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(GAe,{...i,...r,ref:t})});ose.displayName=uNe;var dNe="DropdownMenuCheckboxItem",sse=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(KAe,{...i,...r,ref:t})});sse.displayName=dNe;var fNe="DropdownMenuRadioGroup",hNe=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(YAe,{...i,...r,ref:t})});hNe.displayName=fNe;var pNe="DropdownMenuRadioItem",mNe=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(XAe,{...i,...r,ref:t})});mNe.displayName=pNe;var gNe="DropdownMenuItemIndicator",yNe=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(ZAe,{...i,...r,ref:t})});yNe.displayName=gNe;var vNe="DropdownMenuSeparator",ase=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(QAe,{...i,...r,ref:t})});ase.displayName=vNe;var bNe="DropdownMenuArrow",xNe=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(JAe,{...i,...r,ref:t})});xNe.displayName=bNe;var wNe="DropdownMenuSubTrigger",lse=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(eNe,{...i,...r,ref:t})});lse.displayName=wNe;var CNe="DropdownMenuSubContent",cse=x.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=$i(n);return u.jsx(tNe,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});cse.displayName=CNe;var use=Zoe,dse=Joe,fse=ese,hse=nse,SNe=rse,ENe=ise,pse=ose,kNe=sse,_Ne=ase,ANe=lse,NNe=cse;const dm=use,qf=dse,jNe=fse,hh=x.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(jNe,{children:u.jsx(hse,{ref:r,sideOffset:t,className:Nt("z-50 min-w-[8rem] overflow-hidden rounded-xl border border-stroke-soft-200 bg-bg-white-0 p-1 shadow-regular-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));hh.displayName="DropdownContent";const Hu=x.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(pse,{ref:r,className:Nt("relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2 py-1.5","text-paragraph-sm text-text-strong-950","outline-none transition-colors","focus:bg-bg-weak-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Hu.displayName="DropdownItem";const TNe=x.forwardRef(({className:e,children:t,...n},r)=>u.jsx(kNe,{ref:r,className:Nt("relative flex cursor-pointer select-none items-center gap-2 rounded-lg px-2 py-1.5","text-paragraph-sm text-text-strong-950","outline-none transition-colors","focus:bg-bg-weak-50 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:t}));TNe.displayName="DropdownCheckboxItem";const MNe=x.forwardRef(({className:e,inset:t,...n},r)=>u.jsx(ENe,{ref:r,className:Nt("px-2 py-1.5 text-label-xs text-text-soft-400 uppercase tracking-wide",t&&"pl-8",e),...n}));MNe.displayName="DropdownLabel";const mse=x.forwardRef(({className:e,...t},n)=>u.jsx(_Ne,{ref:n,className:Nt("-mx-1 my-1 h-px bg-stroke-soft-200",e),...t}));mse.displayName="DropdownSeparator";const ONe=x.forwardRef(({className:e,inset:t,children:n,...r},i)=>u.jsxs(ANe,{ref:i,className:Nt("flex cursor-pointer select-none items-center gap-2 rounded-lg px-2 py-1.5","text-paragraph-sm text-text-strong-950","outline-none transition-colors","focus:bg-bg-weak-50 data-[state=open]:bg-bg-weak-50",t&&"pl-8",e),...r,children:[n,u.jsx(im,{className:"ml-auto size-4 text-text-soft-400"})]}));ONe.displayName="DropdownMenuSubTrigger";const RNe=x.forwardRef(({className:e,...t},n)=>u.jsx(NNe,{ref:n,className:Nt("z-50 min-w-[8rem] overflow-hidden rounded-xl border border-stroke-soft-200 bg-bg-white-0 p-1 shadow-regular-md","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...t}));RNe.displayName="DropdownMenuSubContent";function w1({as:e,className:t,...n}){const r=e??"div";return u.jsx(r,{className:Nt("size-4 shrink-0 text-text-sub-600",t),...n})}w1.displayName="DropdownItemIcon";function Wl(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function nV(e,t){if(typeof e=="function")return e(t);
vendor: 13,597 bytes, line 113
113e!=null&&(e.current=t)}function gse(...e){return t=>{let n=!1;const r=e.map(i=>{const o=nV(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():nV(e[i],null)}}}}function ph(...e){return x.useCallback(gse(...e),e)}function yse(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,PNe(i,...t)]}function PNe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function DNe(e){const t=INe(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find($Ne);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function INe(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=FNe(i),a=zNe(o,i.props);return i.type!==x.Fragment&&(a.ref=r?gse(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var vse=Symbol("radix.slottable");function LNe(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=vse,t}function $Ne(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vse}function zNe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function FNe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BNe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],vd=BNe.reduce((e,t)=>{const n=DNe(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function HNe(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function tC(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function VNe(e,t=globalThis==null?void 0:globalThis.document){const n=tC(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var UNe="DismissableLayer",Ej="dismissableLayer.update",qNe="dismissableLayer.pointerDownOutside",WNe="dismissableLayer.focusOutside",rV,bse=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),xse=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,c=x.useContext(bse),[d,f]=x.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),y=ph(t,j=>f(j)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),S=d?v.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,A=S>=C,_=YNe(j=>{const T=j.target,O=[...c.branches].some(D=>D.contains(T));!A||O||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},p),N=XNe(j=>{const T=j.target;[...c.branches].some(D=>D.contains(T))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},p);return VNe(j=>{S===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},p),x.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(rV=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),iV(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=rV)}},[d,p,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),iV())},[d,c]),x.useEffect(()=>{const j=()=>m({});return document.addEventListener(Ej,j),()=>document.removeEventListener(Ej,j)},[]),u.jsx(vd.div,{...l,ref:y,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:Wl(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Wl(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Wl(e.onPointerDownCapture,_.onPointerDownCapture)})});xse.displayName=UNe;var GNe="DismissableLayerBranch",KNe=x.forwardRef((e,t)=>{const n=x.useContext(bse),r=x.useRef(null),i=ph(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(vd.div,{...e,ref:i})});KNe.displayName=GNe;function YNe(e,t=globalThis==null?void 0:globalThis.document){const n=tC(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){wse(qNe,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function XNe(e,t=globalThis==null?void 0:globalThis.document){const n=tC(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&wse(WNe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function iV(){const e=new CustomEvent(Ej);document.dispatchEvent(e)}function wse(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?HNe(i,o):i.dispatchEvent(o)}var od=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},ZNe=xi[" useId ".trim().toString()]||(()=>{}),QNe=0;function JNe(e){const[t,n]=x.useState(ZNe());return od(()=>{n(r=>r??String(QNe++))},[e]),t?`radix-${t}`:""}var eje="Arrow",Cse=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.jsx(vd.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cse.displayName=eje;var tje=Cse;function nje(e){const[t,n]=x.useState(void 0);return od(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var LR="Popper",[Sse,Ese]=yse(LR),[rje,kse]=Sse(LR),_se=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return u.jsx(rje,{scope:t,anchor:r,onAnchorChange:i,children:n})};_se.displayName=LR;var Ase="PopperAnchor",Nse=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=kse(Ase,n),s=x.useRef(null),a=ph(t,s),l=x.useRef(null);return x.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||s.current,c!==l.current&&o.onAnchorChange(l.current)}),r?null:u.jsx(vd.div,{...i,ref:a})});Nse.displayName=Ase;var $R="PopperContent",[ije,oje]=Sse($R),jse=x.forwardRef((e,t)=>{var ie,se,oe,J,ae,re;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...v}=e,b=kse($R,n),[C,S]=x.useState(null),E=ph(t,pe=>S(pe)),[A,_]=x.useState(null),N=nje(A),j=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,O=r+(o!=="center"?"-"+o:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(c)?c:[c],I=R.length>0,F={padding:D,boundary:R.filter(aje),altBoundary:I},{refs:$,floatingStyles:H,placement:L,isPositioned:B,middlewareData:z}=Pv({strategy:"fixed",placement:O,whileElementsMounted:(...pe)=>cm(...pe,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[Dv({mainAxis:i+T,alignmentAxis:s}),l&&Iv({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?F5():void 0,...F}),l&&Lv({...F}),B5({...F,apply:({elements:pe,rects:be,availableWidth:xe,availableHeight:ke})=>{const{width:Pe,height:it}=be.reference,qe=pe.floating.style;qe.setProperty("--radix-popper-available-width",`${xe}px`),qe.setProperty("--radix-popper-available-height",`${ke}px`),qe.setProperty("--radix-popper-anchor-width",`${Pe}px`),qe.setProperty("--radix-popper-anchor-height",`${it}px`)}}),A&&V5({element:A,padding:a}),lje({arrowWidth:j,arrowHeight:T}),p&&H5({strategy:"referenceHidden",...F})]}),[V,U]=Ose(L),W=tC(y);od(()=>{B&&(W==null||W())},[B,W]);const G=(ie=z.arrow)==null?void 0:ie.x,Y=(se=z.arrow)==null?void 0:se.y,X=((oe=z.arrow)==null?void 0:oe.centerOffset)!==0,[Q,ne]=x.useState();return od(()=>{C&&ne(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(J=z.transformOrigin)==null?void 0:J.x,(ae=z.transformOrigin)==null?void 0:ae.y].join(" "),...((re=z.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(ije,{scope:n,placedSide:V,onArrowChange:_,arrowX:G,arrowY:Y,shouldHideArrow:X,children:u.jsx(vd.div,{"data-side":V,"data-align":U,...v,ref:E,style:{...v.style,animation:B?void 0:"none"}})})})});jse.displayName=$R;var Tse="PopperArrow",sje={top:"bottom",right:"left",bottom:"top",left:"right"},Mse=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=oje(Tse,r),s=sje[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(tje,{...i,ref:n,style:{...i.style,display:"block"}})})});Mse.displayName=Tse;function aje(e){return e!==null}var lje=e=>({name:"transformOrigin",options:e,fn(t){var b,C,S;const{placement:n,rects:r,middlewareData:i}=t,s=((b=i.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=Ose(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((C=i.arrow)==null?void 0:C.x)??0)+a/2,m=(((S=i.arrow)==null?void 0:S.y)??0)+l/2;let y="",v="";return c==="bottom"?(y=s?f:`${p}px`,v=`${-l}px`):c==="top"?(y=s?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,v=s?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,v=s?f:`${m}px`),{data:{x:y,y:v}}}});function Ose(e){const[t,n="center"]=e.split("-");return[t,n]}var cje=_se,uje=Nse,dje=jse,fje=Mse,hje="Portal",Rse=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=x.useState(!1);od(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Fs.createPortal(u.jsx(vd.div,{...r,ref:t}),s):null});Rse.displayName=hje;function pje(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var zR=e=>{const{present:t,children:n}=e,r=mje(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=ph(r.ref,gje(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};zR.displayName="Presence";function mje(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=pje(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=o2(r.current);o.current=a==="mounted"?c:"none"},[a]),od(()=>{const c=r.current,d=i.current;if(d!==e){const p=o.current,m=o2(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),od(()=>
vendor: 11,892 bytes, line 113
113{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const v=o2(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=m=>{m.target===t&&(o.current=o2(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function o2(e){return(e==null?void 0:e.animationName)||"none"}function gje(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yje=xi[" useInsertionEffect ".trim().toString()]||od;function vje({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=bje({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=x.useCallback(d=>{var f;if(a){const p=xje(d)?d(e):d;p!==e&&((f=s.current)==null||f.call(s,p))}else o(d)},[a,e,o,s]);return[l,c]}function bje({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return yje(()=>{o.current=t},[t]),x.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function xje(e){return typeof e=="function"}var wje=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Cje="VisuallyHidden",Pse=x.forwardRef((e,t)=>u.jsx(vd.span,{...e,ref:t,style:{...wje,...e.style}}));Pse.displayName=Cje;var Sje=Pse,[nC,TSt]=yse("Tooltip",[Ese]),rC=Ese(),Dse="TooltipProvider",Eje=700,kj="tooltip.open",[kje,FR]=nC(Dse),Ise=e=>{const{__scopeTooltip:t,delayDuration:n=Eje,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,s=x.useRef(!0),a=x.useRef(!1),l=x.useRef(0);return x.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(kje,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:x.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:x.useCallback(c=>{a.current=c},[]),disableHoverableContent:i,children:o})};Ise.displayName=Dse;var ny="Tooltip",[_je,qv]=nC(ny),Lse=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:o,disableHoverableContent:s,delayDuration:a}=e,l=FR(ny,e.__scopeTooltip),c=rC(t),[d,f]=x.useState(null),p=JNe(),m=x.useRef(0),y=s??l.disableHoverableContent,v=a??l.delayDuration,b=x.useRef(!1),[C,S]=vje({prop:r,defaultProp:i??!1,onChange:j=>{j?(l.onOpen(),document.dispatchEvent(new CustomEvent(kj))):l.onClose(),o==null||o(j)},caller:ny}),E=x.useMemo(()=>C?b.current?"delayed-open":"instant-open":"closed",[C]),A=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b.current=!1,S(!0)},[S]),_=x.useCallback(()=>{window.clearTimeout(m.current),m.current=0,S(!1)},[S]),N=x.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{b.current=!0,S(!0),m.current=0},v)},[v,S]);return x.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),u.jsx(cje,{...c,children:u.jsx(_je,{scope:t,contentId:p,open:C,stateAttribute:E,trigger:d,onTriggerChange:f,onTriggerEnter:x.useCallback(()=>{l.isOpenDelayedRef.current?N():A()},[l.isOpenDelayedRef,N,A]),onTriggerLeave:x.useCallback(()=>{y?_():(window.clearTimeout(m.current),m.current=0)},[_,y]),onOpen:A,onClose:_,disableHoverableContent:y,children:n})})};Lse.displayName=ny;var _j="TooltipTrigger",$se=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=qv(_j,n),o=FR(_j,n),s=rC(n),a=x.useRef(null),l=ph(t,a,i.onTriggerChange),c=x.useRef(!1),d=x.useRef(!1),f=x.useCallback(()=>c.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(uje,{asChild:!0,...s,children:u.jsx(vd.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Wl(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Wl(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Wl(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Wl(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Wl(e.onBlur,i.onClose),onClick:Wl(e.onClick,i.onClose)})})});$se.displayName=_j;var BR="TooltipPortal",[Aje,Nje]=nC(BR,{forceMount:void 0}),zse=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=qv(BR,t);return u.jsx(Aje,{scope:t,forceMount:n,children:u.jsx(zR,{present:n||o.open,children:u.jsx(Rse,{asChild:!0,container:i,children:r})})})};zse.displayName=BR;var a0="TooltipContent",Fse=x.forwardRef((e,t)=>{const n=Nje(a0,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,s=qv(a0,e.__scopeTooltip);return u.jsx(zR,{present:r||s.open,children:s.disableHoverableContent?u.jsx(Bse,{side:i,...o,ref:t}):u.jsx(jje,{side:i,...o,ref:t})})}),jje=x.forwardRef((e,t)=>{const n=qv(a0,e.__scopeTooltip),r=FR(a0,e.__scopeTooltip),i=x.useRef(null),o=ph(t,i),[s,a]=x.useState(null),{trigger:l,onClose:c}=n,d=i.current,{onPointerInTransitChange:f}=r,p=x.useCallback(()=>{a(null),f(!1)},[f]),m=x.useCallback((y,v)=>{const b=y.currentTarget,C={x:y.clientX,y:y.clientY},S=Rje(C,b.getBoundingClientRect()),E=Pje(C,S),A=Dje(v.getBoundingClientRect()),_=Lje([...E,...A]);a(_),f(!0)},[f]);return x.useEffect(()=>()=>p(),[p]),x.useEffect(()=>{if(l&&d){const y=b=>m(b,d),v=b=>m(b,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",v)}}},[l,d,m,p]),x.useEffect(()=>{if(s){const y=v=>{const b=v.target,C={x:v.clientX,y:v.clientY},S=(l==null?void 0:l.contains(b))||(d==null?void 0:d.contains(b)),E=!Ije(C,s);S?p():E&&(p(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,s,c,p]),u.jsx(Bse,{...e,ref:o})}),[Tje,Mje]=nC(ny,{isInside:!1}),Oje=LNe("TooltipContent"),Bse=x.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:s,...a}=e,l=qv(a0,n),c=rC(n),{onClose:d}=l;return x.useEffect(()=>(document.addEventListener(kj,d),()=>document.removeEventListener(kj,d)),[d]),x.useEffect(()=>{if(l.trigger){const f=p=>{const m=p.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(xse,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(dje,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(Oje,{children:r}),u.jsx(Tje,{scope:n,isInside:!0,children:u.jsx(Sje,{id:l.contentId,role:"tooltip",children:i||r})})]})})});Fse.displayName=a0;var Hse="TooltipArrow",Vse=x.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=rC(n);return Mje(Hse,n).isInside?null:u.jsx(fje,{...i,...r,ref:t})});Vse.displayName=Hse;function Rje(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Pje(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Dje(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ije(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,s=t.length-1;o<t.length;s=o++){const a=t[o],l=t[s],c=a.x,d=a.y,f=l.x,p=l.y;d>r!=p>r&&n<(f-c)*(r-d)/(p-d)+c&&(i=!i)}return i}function Lje(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),$je(t)}function $je(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const o=t[t.length-1],s=t[t.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],s=n[n.length-2];if((o.x-s.x)*(i.y-s.y)>=(o.y-s.y)*(i.x-s.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Jw=Ise,e3=Lse,t3=$se,n3=zse,ry=Fse,Use=Vse;const zje={sections:[{id:"main-navigation",title:null,items:[{id:"articles",label:"Articles",icon:()=>u.jsx("svg",{width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M0 0.625C0 0.279825 0.279825 0 0.625 0H11.875C12.2202 0 12.5 0.279825 12.5 0.625V10.625C12.5 10.9702 12.2202 11.25 11.875 11.25H0.625C0.279825 11.25 0 10.9702 0 10.625V0.625ZM1.25 1.25V10H11.25V1.25H1.25ZM2.5 2.5H6.25V6.25H2.5V2.5ZM3.75 3.75V5H5V3.75H3.75ZM7.5 3.75H10V2.5H7.5V3.75ZM10 6.25H7.5V5H10V6.25ZM2.5 7.5V8.75H10V7.5H2.5Z",fill:"currentColor"})}),href:"/articles"},{id:"content-map",label:"Content Map",icon:kSe,href:"/content-map"},{id:"keywords",label:"Keywords",icon:()=>u.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M7.11434 0L14.5386 1.06125L15.5991 8.48625L8.70509 15.3802C8.56444 15.5209 8.37371 15.5998 8.17484 15.5998C7.97597 15.5998 7.78524 15.5209 7.64459 15.3802L0.21959 7.95525C0.0789866 7.8146 0 7.62387 0 7.425C0 7.22613 0.0789866 7.0354 0.21959 6.89475L7.11434 0ZM7.64459 1.5915L1.81034 7.425L8.17484 13.7888L14.0083 7.95525L13.2133 2.3865L7.64459 1.5915V1.5915ZM9.23459 6.3645C8.95323 6.08304 8.7952 5.70134 8.79527 5.30336C8.79531 5.1063 8.83415 4.91118 8.9096 4.72914C8.98504 4.54709 9.0956 4.38169 9.23497 4.24237C9.37433 4.10306 9.53977 3.99256 9.72184 3.91718C9.90391 3.8418 10.099 3.80302 10.2961 3.80306C10.6941 3.80313 11.0757 3.96129 11.3571 4.24275C11.6385 4.52421 11.7965 4.90591 11.7964 5.30389C11.7963 5.70187 11.6382 6.08351 11.3567 6.36487C11.0753 6.64624 10.6936 6.80426 10.2956 6.80419C9.8976 6.80412 9.51595 6.64596 9.23459 6.3645V6.3645Z",fill:"currentColor"})}),href:"/keywords"},{id:"keyword-lists",label:"Keyword Lists",icon:ySe,href:"/keyword-lists"},{id:"integrations",label:"Integrations",icon:ASe,href:"/integrations"}]}]},HR=x.forwardRef((e,t)=>
113{var E,A,_;const r=lo().pathname,i=am(),o=br(),{user:s}=G9e(),[a]=wCe(),l=mH(N=>N.sidebar.isSidebarCollapsed),c=mH(N=>N.sidebar.isMobileSidebarOpen),d=((E=s==null?void 0:s.user_metadata)==null?void 0:E.full_name)||((A=s==null?void 0:s.email)==null?void 0:A.split("@")[0])||"User",f=(s==null?void 0:s.email)||"",p=d.split(" ").map(N=>N[0]).join("").toUpperCase().slice(0,2)||"U",m=!1,y=()=>{i(JCe())},v=()=>{i(eSe())};x.useImperativeHandle(t,()=>({toggleMobileSidebar:v}));const b=()=>{c&&i(tSe())},C=async()=>{await a(),o("/login")},S=({children:N,label:j,showTooltip:T})=>T?u.jsx(Jw,{delayDuration:0,children:u.jsxs(e3,{children:[u.jsx(t3,{asChild:!0,children:N}),u.jsx(n3,{children:u.jsxs(ry,{className:"bg-bg-strong-950 text-text-white-0 shadow-tooltip z-[100] rounded-md px-2 py-1 text-xs font-medium",side:"right",sideOffset:8,align:"center",children:[j,u.jsx(Use,{className:"fill-bg-strong-950"})]})})]})}):u.jsx(u.Fragment,{children:N});return u.jsx("aside",{className:Et("bg-bg-white-0 fixed z-60 h-full overflow-hidden transition-[width] duration-300 ease-in-out lg:relative lg:z-50 lg:translate-x-0",c?"translate-x-0":"-translate-x-full",l?"lg:w-[72px]":"w-full lg:w-[272px]"),children:u.jsxs("div",{className:"flex h-full flex-col",children:[u.jsxs("div",{className:Et("flex items-center justify-between p-5 transition-all duration-300",l&&"lg:justify-center lg:px-5"),children:[u.jsx(S,{label:"Expand sidebar",showTooltip:l,children:u.jsx("button",{onClick:y,className:"flex items-center",children:u.jsx(Nv,{className:"size-8 flex-shrink-0"})})}),u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:v,className:"group hover:bg-bg-weak-50 flex size-8 items-center justify-center p-0 lg:hidden",children:u.jsx(wt,{as:Hf,className:"text-text-soft-400 group-hover:text-text-sub-600 size-5"})}),u.jsx("div",{className:Et("transition-all duration-300 overflow-hidden",l?"w-0 opacity-0":"w-8 opacity-100"),children:u.jsx(Jw,{delayDuration:300,children:u.jsxs(e3,{children:[u.jsx(t3,{asChild:!0,children:u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:y,className:"group hover:bg-bg-weak-50 hidden cursor-w-resize lg:flex",children:u.jsx(wt,{as:jSe,className:"text-text-soft-400 group-hover:text-text-sub-600"})})}),u.jsx(n3,{children:u.jsx(ry,{className:"bg-bg-strong-950 text-text-white-0 shadow-tooltip z-50 rounded-lg px-2.5 py-1 text-xs",sideOffset:6,align:"center",children:"Collapse sidebar"})})]})})})]}),u.jsx("div",{className:Et("px-5 pb-4 transition-all duration-300",l&&"lg:px-5"),children:u.jsx("div",{className:"space-y-1",children:(_=zje.sections[0].items)==null?void 0:_.map(N=>{const j=N.icon,T=N.href.split("?")[0],O=r===T||r.startsWith(T+"/"),D=N.label||N.title;return u.jsx(S,{label:D,showTooltip:l,children:u.jsxs("div",{className:"relative",children:[O&&u.jsx("div",{className:"absolute -left-5 top-1.5 bottom-1.5 w-1 bg-[#7D52F4] rounded-r-full"}),u.jsxs(ra,{to:N.href,onClick:b,className:Et("group flex items-center rounded-lg p-2 transition-all duration-300 cursor-pointer",O?"text-text-sub-600 bg-bg-weak-50":"text-text-sub-600 hover:bg-bg-weak-50",l?"lg:justify-center":"gap-2"),children:[j&&u.jsx("span",{className:Et("flex-shrink-0 flex items-center justify-center",O?"text-[#7D52F4]":"text-text-soft-400"),style:{width:"20px",height:"20px"},children:u.jsx(j,{})}),u.jsx("span",{className:Et("whitespace-nowrap transition-all duration-300 overflow-hidden text-label-sm",l?"lg:w-0 lg:opacity-0":"w-auto opacity-100"),children:D})]})]})},N.id)})})}),u.jsx("div",{className:Et("bg-bg-white-0 before:bg-stroke-soft-200 relative sticky bottom-0 z-30 mt-auto p-5 before:absolute before:top-0 before:right-0 before:left-0 before:h-px transition-all duration-300",l?"lg:flex lg:justify-center lg:px-5 lg:before:right-5 lg:before:left-5":"lg:pt-4.5 lg:before:right-5 lg:before:left-5"),children:u.jsxs(dm,{children:[l?u.jsx(S,{label:d,showTooltip:!0,children:u.jsx(qf,{asChild:!0,children:u.jsx("button",{className:"flex size-12 flex-shrink-0 items-center justify-center rounded-full bg-gray-200 hover:ring-2 hover:ring-stroke-soft-200 transition-all cursor-pointer",children:u.jsx("div",{className:"text-static-black text-base font-medium",children:p})})})}):u.jsx(qf,{asChild:!0,children:u.jsxs("button",{className:"flex w-full items-center gap-3 rounded-lg p-1.5 -mx-1.5 hover:bg-bg-weak-50 transition-colors cursor-pointer text-left",children:[u.jsx("div",{className:"flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-gray-200",children:u.jsx("div",{className:"text-static-black text-sm font-medium",children:p})}),u.jsxs("div",{className:"flex flex-col min-w-0 flex-1 gap-0.5",children:[u.jsxs("div",{className:"flex items-center gap-1 min-w-0",children:[u.jsx("div",{className:"text-text-strong-950 text-sm font-medium tracking-[var(--letter-spacing-title-h4)] truncate",children:d}),m]}),u.jsx("div",{className:"text-text-soft-400 text-xs/snug font-medium truncate",children:f})]})]})}),u.jsx(hh,{side:l?"right":"top",align:"start",sideOffset:8,className:"min-w-[160px]",children:u.jsxs(Hu,{className:"text-error-base focus:bg-red-50",onSelect:C,children:[u.jsx(w1,{as:ESe,className:"text-error-base"}),"Log out"]})})]})})]})})});HR.displayName="MainSidebar";const Fje=["/content-map"],Bje=()=>{const e=lo(),t=Fje.includes(e.pathname);return u.jsxs("div",{className:"relative flex h-dvh lg:h-screen",children:[u.jsx(HR,{}),u.jsx("main",{className:"w-full flex-1 min-h-0 overflow-y-auto",children:u.jsx("div",{className:"flex flex-col lg:p-1.5 lg:pl-0",style:{minHeight:"100%"},children:u.jsx("div",{className:`bg-bg-white-0 lg:border-stroke-soft-200 relative flex flex-1 flex-col justify-between lg:rounded-3xl lg:border${t?"":" pb-4 lg:py-4 lg:pr-4 lg:pl-5"}`,children:u.jsx(U1,{})})})})]})},hc=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{className:Nt("w-full overflow-x-auto",e),children:u.jsx("table",{ref:n,className:"w-full",...t})}));hc.displayName="Table";const pc=x.forwardRef(({...e},t)=>u.jsx("thead",{ref:t,...e}));pc.displayName="TableHeader";const pt=x.forwardRef(({className:e,...t},n)=>u.jsx("th",{ref:n,className:Nt("bg-bg-weak-50 px-3 py-2 text-left text-paragraph-sm text-text-sub-600 first:rounded-l-lg last:rounded-r-lg",e),...t}));pt.displayName="TableHead";const mc=x.forwardRef(({spacing:e=8,...t},n)=>u.jsxs(u.Fragment,{children:[u.jsx("tbody",{"aria-hidden":"true",className:"table-row",style:{height:e}}),u.jsx("tbody",{ref:n,...t})]}));mc.displayName="TableBody";const ri=x.forwardRef(({className:e,...t},n)=>u.jsx("tr",{ref:n,className:Et("group/row",e),...t}));ri.displayName="TableRow";function gc({className:e,dividerClassName:t,...n}){return u.jsx("tr",{"aria-hidden":"true",className:e,children:u.jsx("td",{colSpan:999,className:"py-1",children:u.jsx(Yi,{variant:"line-spacing",className:t,...n})})})}gc.displayName="TableRowDivider";const mt=x.forwardRef(({className:e,...t},n)=>u.jsx("td",{ref:n,className:Nt("h-16 px-3 transition duration-200 ease-out first:rounded-l-xl last:rounded-r-xl group-hover/row:bg-bg-weak-50",e),...t}));mt.displayName="TableCell";const Hje=x.forwardRef(({className:e,...t},n)=>u.jsx("caption",{ref:n,className:Nt("mt-4 text-paragraph-sm text-text-sub-600",e),...t}));Hje.displayName="TableCaption";const ht=({className:e=""})=>u.jsx("div",{className:`animate-pulse bg-gray-200 dark:bg-gray-700 rounded ${e}`});function Vu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function oV(e,t){if(typeof e=="function")return e(t);
vendor: 24,543 bytes, line 113
113e!=null&&(e.current=t)}function qse(...e){return t=>{let n=!1;const r=e.map(i=>{const o=oV(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():oV(e[i],null)}}}}function bd(...e){return x.useCallback(qse(...e),e)}function Wse(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,Vje(i,...t)]}function Vje(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c})=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Gse(e){const t=Uje(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find(Wje);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Uje(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=Kje(i),a=Gje(o,i.props);return i.type!==x.Fragment&&(a.ref=r?qse(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qje=Symbol("radix.slottable");function Wje(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===qje}function Gje(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Kje(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yje=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Cc=Yje.reduce((e,t)=>{const n=Gse(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Xje(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function l0(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Zje(e,t=globalThis==null?void 0:globalThis.document){const n=l0(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Qje="DismissableLayer",Aj="dismissableLayer.update",Jje="dismissableLayer.pointerDownOutside",eTe="dismissableLayer.focusOutside",sV,Kse=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Yse=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,c=x.useContext(Kse),[d,f]=x.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),y=bd(t,j=>f(j)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),S=d?v.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,A=S>=C,_=rTe(j=>{const T=j.target,O=[...c.branches].some(D=>D.contains(T));!A||O||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},p),N=iTe(j=>{const T=j.target;[...c.branches].some(D=>D.contains(T))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},p);return Zje(j=>{S===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},p),x.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(sV=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),aV(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=sV)}},[d,p,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),aV())},[d,c]),x.useEffect(()=>{const j=()=>m({});return document.addEventListener(Aj,j),()=>document.removeEventListener(Aj,j)},[]),u.jsx(Cc.div,{...l,ref:y,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:Vu(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Vu(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Vu(e.onPointerDownCapture,_.onPointerDownCapture)})});Yse.displayName=Qje;var tTe="DismissableLayerBranch",nTe=x.forwardRef((e,t)=>{const n=x.useContext(Kse),r=x.useRef(null),i=bd(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(Cc.div,{...e,ref:i})});nTe.displayName=tTe;function rTe(e,t=globalThis==null?void 0:globalThis.document){const n=l0(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Xse(Jje,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function iTe(e,t=globalThis==null?void 0:globalThis.document){const n=l0(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&Xse(eTe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function aV(){const e=new CustomEvent(Aj);document.dispatchEvent(e)}function Xse(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Xje(i,o):i.dispatchEvent(o)}var F7=0;function oTe(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??lV()),document.body.insertAdjacentElement("beforeend",e[1]??lV()),F7++,()=>{F7===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),F7--}},[])}function lV(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var B7="focusScope.autoFocusOnMount",H7="focusScope.autoFocusOnUnmount",cV={bubbles:!1,cancelable:!0},sTe="FocusScope",Zse=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=x.useState(null),c=l0(i),d=l0(o),f=x.useRef(null),p=bd(t,v=>l(v)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let v=function(E){if(m.paused||!a)return;const A=E.target;a.contains(A)?f.current=A:hu(f.current,{select:!0})},b=function(E){if(m.paused||!a)return;const A=E.relatedTarget;A!==null&&(a.contains(A)||hu(f.current,{select:!0}))},C=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&hu(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const S=new MutationObserver(C);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),S.disconnect()}}},[r,a,m.paused]),x.useEffect(()=>{if(a){dV.add(m);const v=document.activeElement;if(!a.contains(v)){const C=new CustomEvent(B7,cV);a.addEventListener(B7,c),a.dispatchEvent(C),C.defaultPrevented||(aTe(fTe(Qse(a)),{select:!0}),document.activeElement===v&&hu(a))}return()=>{a.removeEventListener(B7,c),setTimeout(()=>{const C=new CustomEvent(H7,cV);a.addEventListener(H7,d),a.dispatchEvent(C),C.defaultPrevented||hu(v??document.body,{select:!0}),a.removeEventListener(H7,d),dV.remove(m)},0)}}},[a,c,d,m]);const y=x.useCallback(v=>{if(!n&&!r||m.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,C=document.activeElement;if(b&&C){const S=v.currentTarget,[E,A]=lTe(S);E&&A?!v.shiftKey&&C===A?(v.preventDefault(),n&&hu(E,{select:!0})):v.shiftKey&&C===E&&(v.preventDefault(),n&&hu(A,{select:!0})):C===S&&v.preventDefault()}},[n,r,m.paused]);return u.jsx(Cc.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});Zse.displayName=sTe;function aTe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(hu(r,{select:t}),document.activeElement!==n)return}function lTe(e){const t=Qse(e),n=uV(t,e),r=uV(t.reverse(),e);return[n,r]}function Qse(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function uV(e,t){for(const n of e)if(!cTe(n,{upTo:t}))return n}function cTe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function uTe(e){return e instanceof HTMLInputElement&&"select"in e}function hu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uTe(e)&&t&&e.select()}}var dV=dTe();function dTe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=fV(e,t),e.unshift(t)},remove(t){var n;e=fV(e,t),(n=e[0])==null||n.resume()}}}function fV(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fTe(e){return e.filter(t=>t.tagName!=="A")}var sd=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},hTe=xi[" useId ".trim().toString()]||(()=>{}),pTe=0;function mTe(e){const[t,n]=x.useState(hTe());return sd(()=>{n(r=>r??String(pTe++))},[e]),e||(t?`radix-${t}`:"")}var gTe="Arrow",Jse=x.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return u.jsx(Cc.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Jse.displayName=gTe;var yTe=Jse;function vTe(e){const[t,n]=x.useState(void 0);return sd(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let s,a;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var VR="Popper",[eae,tae]=Wse(VR),[bTe,nae]=eae(VR),rae=e=>{const{__scopePopper:t,children:n}=e,[r,i]=x.useState(null);return u.jsx(bTe,{scope:t,anchor:r,onAnchorChange:i,children:n})};rae.displayName=VR;var iae="PopperAnchor",oae=x.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=nae(iae,n),s=x.useRef(null),a=bd(t,s),l=x.useRef(null);return x.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||s.current,c!==l.current&&o.onAnchorChange(l.current)}),r?null:u.jsx(Cc.div,{...i,ref:a})});oae.displayName=iae;var UR="PopperContent",[xTe,wTe]=eae(UR),sae=x.forwardRef((e,t)=>{var ie,se,oe,J,ae,re;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:y,...v}=e,b=nae(UR,n),[C,S]=x.useState(null),E=bd(t,pe=>S(pe)),[A,_]=x.useState(null),N=vTe(A),j=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,O=r+(o!=="center"?"-"+o:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},R=Array.isArray(c)?c:[c],I=R.length>0,F={padding:D,boundary:R.filter(STe),altBoundary:I},{refs:$,floatingStyles:H,placement:L,isPositioned:B,middlewareData:z}=Pv({strategy:"fixed",placement:O,whileElementsMounted:(...pe)=>cm(...pe,{animationFrame:m==="always"}),elements:{reference:b.anchor},middleware:[Dv({mainAxis:i+T,alignmentAxis:s}),l&&Iv({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?F5():void 0,...F}),l&&Lv({...F}),B5({...F,apply:({elements:pe,rects:be,availableWidth:xe,availableHeight:ke})=>{const{width:Pe,height:it}=be.reference,qe=pe.floating.style;qe.setProperty("--radix-popper-available-width",`${xe}px`),qe.setProperty("--radix-popper-available-height",`${ke}px`),qe.setProperty("--radix-popper-anchor-width",`${Pe}px`),qe.setProperty("--radix-popper-anchor-height",`${it}px`)}}),A&&V5({element:A,padding:a}),ETe({arrowWidth:j,arrowHeight:T}),p&&H5({strategy:"referenceHidden",...F})]}),[V,U]=cae(L),W=l0(y);sd(()=>{B&&(W==null||W())},[B,W]);const G=(ie=z.arrow)==null?void 0:ie.x,Y=(se=z.arrow)==null?void 0:se.y,X=((oe=z.arrow)==null?void 0:oe.centerOffset)!==0,[Q,ne]=x.useState();return sd(()=>{C&&ne(window.getComputedStyle(C).zIndex)},[C]),u.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:B?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(J=z.transformOrigin)==null?void 0:J.x,(ae=z.transformOrigin)==null?void 0:ae.y].join(" "),...((re=z.hide)==null?void 0:re.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(xTe,{scope:n,placedSide:V,onArrowChange:_,arrowX:G,arrowY:Y,shouldHideArrow:X,children:u.jsx(Cc.div,{"data-side":V,"data-align":U,...v,ref:E,style:{...v.style,animation:B?void 0:"none"}})})})});sae.displayName=UR;var aae="PopperArrow",CTe={top:"bottom",right:"left",bottom:"top",left:"right"},lae=x.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=wTe(aae,r),s=CTe[o.placedSide];return u.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:u.jsx(yTe,{...i,ref:n,style:{...i.style,display:"block"}})})});lae.displayName=aae;function STe(e){return e!==null}var ETe=e=>({name:"transformOrigin",options:e,fn(t){var b,C,S;const{placement:n,rects:r,middlewareData:i}=t,s=((b=i.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,d]=cae(n),f={start:"0%",center:"50%",end:"100%"}[d],p=(((C=i.arrow)==null?void 0:C.x)??0)+a/2,m=(((S=i.arrow)==null?void 0:S.y)??0)+l/2;let y="",v="";return c==="bottom"?(y=s?f:`${p}px`,v=`${-l}px`):c==="top"?(y=s?f:`${p}px`,v=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,v=s?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,v=s?f:`${m}px`),{data:{x:y,y:v}}}});function cae(e){const[t,n="center"]=e.split("-");return[t,n]}var kTe=rae,uae=oae,_Te=sae,ATe=lae,NTe="Portal",dae=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=x.useState(!1);sd(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Fs.createPortal(u.jsx(Cc.div,{...r,ref:t}),s):null});dae.displayName=NTe;function jTe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var qR=e=>{const{present:t,children:n}=e,r=TTe(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=bd(r.ref,MTe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};qR.displayName="Presence";function TTe(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=jTe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=s2(r.current);o.current=a==="mounted"?c:"none"},[a]),sd(()=>{const c=r.current,d=i.current;if(d!==e){const p=o.current,m=s2(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),sd(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const v=s2(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=m=>{m.target===t&&(o.current=s2(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function s2(e){return(e==null?void 0:e.animationName)||"none"}function MTe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var OTe=xi[" useInsertionEffect ".trim().toString()]||sd;function RTe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=PTe({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=x.useCallback(d=>{var f;if(a){const p=DTe(d)?d(e):d;p!==e&&((f=s.current)==null||f.call(s,p))}else o(d)},[a,e,o,s]);return[l,c]}function PTe({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return OTe(()=>{o.current=t},[t]),x.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function DTe(e){return typeof e=="function"}var iC="Popover",[fae,MSt]=Wse(iC,[tae]),Wv=tae(),[ITe,xd]=fae(iC),hae=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!1}=e,a=Wv(t),l=x.useRef(null),[c,d]=x.useState(!1),[f,p]=RTe({prop:r,defaultProp:i??!1,onChange:o,caller:iC});return u.jsx(kTe,{...a,children:u.jsx(ITe,{scope:t,contentId:mTe(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:x.useCallback(()=>p(m=>!m),[p]),hasCustomAnchor:c,onCustomAnchorAdd:x.useCallback(()=>d(!0),[]),onCustomAnchorRemove:x.useCallback(()=>d(!1),[]),modal:s,children:n})})};hae.displayName=iC;var pae="PopoverAnchor",LTe=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=xd(pae,n),o=Wv(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=i;return x.useEffect(()=>(s(),()=>a()),[s,a]),u.jsx(uae,{...o,...r,ref:t})});LTe.displayName=pae;var mae="PopoverTrigger",gae=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=xd(mae,n),o=Wv(n),s=bd(t,i.triggerRef),a=u.jsx(Cc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":wae(i.open),...r,ref:s,onClick:Vu(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?a:u.jsx(uae,{asChild:!0,...o,children:a})});gae.displayName=mae;var WR="PopoverPortal",[$Te,zTe]=fae(WR,{forceMount:void 0}),yae=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=xd(WR,t);return u.jsx($Te,{scope:t,forceMount:n,children:u.jsx(qR,{present:n||o.open,children:u.jsx(dae,{asChild:!0,container:i,children:r})})})};yae.displayName=WR;var c0="PopoverContent",vae=x.forwardRef((e,t)=>{const n=zTe(c0,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=xd(c0,e.__scopePopover);return u.jsx(qR,{present:r||o.open,children:o.modal?u.jsx(BTe,{...i,ref:t}):u.jsx(HTe,{...i,ref:t})})});vae.displayName=c0;var FTe=Gse("PopoverContent.RemoveScroll"),BTe=x.forwardRef((e,t)=>{const n=xd(c0,e.__scopePopover),r=x.useRef(null),i=bd(t,r),o=x.useRef(!1);return x.useEffect(()=>{const s=r.current;if(s)return U5(s)},[]),u.jsx($v,{as:FTe,allowPinchZoom:!0,children:u.jsx(bae,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Vu(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),o.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Vu(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;o.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Vu(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),HTe=x.forwardRef((e,t)=>{const n=xd(c0,e.__scopePopover),r=x.useRef(!1),i=x.useRef(!1);return u.jsx(bae,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),bae=x.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=e,p=xd(c0,n),m=Wv(n);return oTe(),u.jsx(Zse,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:u.jsx(Yse,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1),children:u.jsx(_Te,{"data-state":wae(p.open),role:"dialog",id:p.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),xae="PopoverClose",VTe=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=xd(xae,n);return u.jsx(Cc.button,{type:"button",...r,ref:t,onClick:Vu(e.onClick,()=>i.onOpenChange(!1))})});VTe.displayName=xae;var UTe="PopoverArrow",qTe=x.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Wv(n);return u.jsx(ATe,{...i,...r,ref:t})});qTe.displayName=UTe;function wae(e){return e?"open":"closed"}var Cae=hae,Sae=gae,Eae=yae,GR=vae;function Ar(...e){return lre(Mt(e))}const KR=Cae,YR=Sae,oC=x.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>u.jsx(Eae,{children:u.jsx(GR,{ref:i,align:t,sideOffset:n,className:Ar("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
113de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));oC.displayName=GR.displayName;const kae="data:image/svg+xml,%3csvg%20width='148'%20height='148'%20viewBox='0%200%20148%20148'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_198600_14633)'%3e%3cpath%20d='M74%200V0C114.842%200%20148%2033.1583%20148%2074V74C148%20114.842%20114.842%20148%2074%20148V148C33.1583%20148%200%20114.842%200%2074V74C0%2033.1583%2033.1583%200%2074%200V0'%20fill='%23F5F5F5'/%3e%3cpath%20d='M124%2036C124%2036%20118%2036.02%20118%2042C118%2036.02%20112%2036%20112%2036C112%2036%20118%2035.98%20118%2030C118%2035.98%20124%2036%20124%2036V36'%20fill='white'/%3e%3cpath%20d='M124%2036C124%2036%20118%2036.02%20118%2042C118%2036.02%20112%2036%20112%2036C112%2036%20118%2035.98%20118%2030C118%2035.98%20124%2036%20124%2036V36'%20stroke='%23A4A4A4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M34%20116C34%20116%2028%20116.02%2028%20122C28%20116.02%2022%20116%2022%20116C22%20116%2028%20115.98%2028%20110C28%20115.98%2034%20116%2034%20116V116'%20fill='white'/%3e%3cpath%20d='M34%20116C34%20116%2028%20116.02%2028%20122C28%20116.02%2022%20116%2022%20116C22%20116%2028%20115.98%2028%20110C28%20115.98%2034%20116%2034%20116V116'%20stroke='%23A4A4A4'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M40%2044H108C110.208%2044%20112%2045.7923%20112%2048V100C112%20102.208%20110.208%20104%20108%20104H40C37.7923%20104%2036%20102.208%2036%20100V48C36%2045.7923%2037.7923%2044%2040%2044V44'%20fill='white'/%3e%3cpath%20d='M40%2044H108C110.208%2044%20112%2045.7923%20112%2048V100C112%20102.208%20110.208%20104%20108%20104H40C37.7923%20104%2036%20102.208%2036%20100V48C36%2045.7923%2037.7923%2044%2040%2044V44'%20stroke='%23A4A4A4'/%3e%3cpath%20d='M46%2056H72C73.1038%2056%2074%2056.8962%2074%2058V58C74%2059.1038%2073.1038%2060%2072%2060H46C44.8962%2060%2044%2059.1038%2044%2058V58C44%2056.8962%2044.8962%2056%2046%2056V56'%20fill='%23EBEBEB'/%3e%3cpath%20d='M46%2066H102C103.104%2066%20104%2066.8962%20104%2068V68C104%2069.1038%20103.104%2070%20102%2070H46C44.8962%2070%2044%2069.1038%2044%2068V68C44%2066.8962%2044.8962%2066%2046%2066V66'%20fill='%23EBEBEB'/%3e%3cpath%20d='M46%2076H87C88.1038%2076%2089%2076.8962%2089%2078V78C89%2079.1038%2088.1038%2080%2087%2080H46C44.8962%2080%2044%2079.1038%2044%2078V78C44%2076.8962%2044.8962%2076%2046%2076V76'%20fill='%23EBEBEB'/%3e%3cpath%20d='M46%2086H97C98.1038%2086%2099%2086.8962%2099%2088V88C99%2089.1038%2098.1038%2090%2097%2090H46C44.8962%2090%2044%2089.1038%2044%2088V88C44%2086.8962%2044.8962%2086%2046%2086V86'%20fill='%23EBEBEB'/%3e%3cpath%20d='M71%2075C71%2082.7268%2077.2732%2089%2085%2089C92.7268%2089%2099%2082.7268%2099%2075C99%2067.2732%2092.7268%2061%2085%2061C77.2732%2061%2071%2067.2732%2071%2075V75'%20fill='white'/%3e%3cpath%20d='M71%2075C71%2082.7268%2077.2732%2089%2085%2089C92.7268%2089%2099%2082.7268%2099%2075C99%2067.2732%2092.7268%2061%2085%2061C77.2732%2061%2071%2067.2732%2071%2075V75'%20stroke='%23A4A4A4'%20stroke-width='1.5'/%3e%3cpath%20d='M95%2085L103%2093'%20stroke='%23A4A4A4'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M81%2071L89%2079M89%2071L81%2079'%20stroke='%23A4A4A4'%20stroke-width='1.5'%20stroke-linecap='round'/%3e%3cpath%20d='M103%2040H121C125.415%2040%20129%2043.5847%20129%2048V48C129%2052.4153%20125.415%2056%20121%2056H103C98.5847%2056%2095%2052.4153%2095%2048V48C95%2043.5847%2098.5847%2040%20103%2040V40'%20fill='%23EBEBEB'/%3e%3cpath%20d='M103%2040H121C125.415%2040%20129%2043.5847%20129%2048V48C129%2052.4153%20125.415%2056%20121%2056H103C98.5847%2056%2095%2052.4153%2095%2048V48C95%2043.5847%2098.5847%2040%20103%2040V40'%20stroke='%23A4A4A4'/%3e%3cpath%20d='M103%2046H121C122.104%2046%20123%2046.8962%20123%2048V48C123%2049.1038%20122.104%2050%20121%2050H103C101.896%2050%20101%2049.1038%20101%2048V48C101%2046.8962%20101.896%2046%20103%2046V46'%20fill='%23A4A4A4'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_198600_14633'%3e%3crect%20width='148'%20height='148'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e";function WTe(e){return e<30?"#10b981":e<50?"#f59e0b":e<75?"#f97316":"#ef4444"}function GTe({monthlySearches:e}){const n=[...e??[]].sort((f,p)=>f.year!==p.year?f.year-p.year:f.month-p.month).map(f=>f.searchVolume??0);if(n.length<2)return u.jsx("span",{className:"text-text-soft-400",children:"â"});const r=88,i=32,o=2,s=Math.max(...n),a=Math.min(...n),l=s-a||1,d=n.map((f,p)=>({x:o+p/(n.length-1)*(r-o*2),y:i-o-(f-a)/l*(i-o*2)})).map((f,p)=>`${p===0?"M":"L"}${f.x.toFixed(1)},${f.y.toFixed(1)}`).join(" ");return u.jsx("svg",{width:r,height:i,viewBox:`0 0 ${r} ${i}`,className:"overflow-visible",children:u.jsx("path",{d,fill:"none",stroke:"#6366f1",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function KTe({report:e}
113){const t=br(),[n,r]=x.useState(!1);return u.jsxs(KR,{open:n,onOpenChange:r,children:[u.jsx(YR,{asChild:!0,children:u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:i=>i.stopPropagation(),children:u.jsx(wt,{as:Av})})}),u.jsx(oC,{align:"end",className:"w-40 bg-bg-white-0 p-1",onClick:i=>i.stopPropagation(),children:u.jsx("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-paragraph-sm text-text-strong-950 hover:bg-bg-weak-50",onClick:()=>{t(`/keywords/${e.id}`),r(!1)},children:"View report"})})]})}function YTe({rows:e,isLoading:t,isEmpty:n,onRowClick:r,onCreateReport:i}){return t?u.jsxs(hc,{className:"w-full",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{children:"Keyword"}),u.jsx(pt,{children:"Average KD"}),u.jsx(pt,{children:"Traffic"}),u.jsx(pt,{children:"Traffic Trend"}),u.jsx(pt,{className:"px-4"})]})}),u.jsx(mc,{children:[...Array(5)].map((o,s)=>u.jsxs(x.Fragment,{children:[u.jsxs(ri,{children:[u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-40"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(ht,{className:"h-3 w-3 rounded-full"}),u.jsx(ht,{className:"h-4 w-8"})]})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-12"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-8 w-20"})}),u.jsx(mt,{className:"px-4",children:u.jsx(ht,{className:"h-6 w-6 rounded-md"})})]}),s<4&&u.jsx(gc,{})]},s))})]}):n?u.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-12 text-center",children:[u.jsx("img",{src:kae,alt:"No keyword reports",className:"mb-6 w-32 h-32"}),u.jsx("h3",{className:"text-text-strong-950 text-lg font-medium mb-2",children:"No keyword reports found."}),u.jsx("p",{className:"text-text-sub-600 text-sm mb-5",children:"Create your first keyword report to get started."}),u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",onClick:i,children:[u.jsx(wt,{as:Pi}),"Create New Report"]})]}):u.jsxs(hc,{className:"w-full",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{children:"Keyword"}),u.jsx(pt,{children:"Average KD"}),u.jsx(pt,{children:"Traffic"}),u.jsx(pt,{children:"Traffic Trend"}),u.jsx(pt,{className:"px-4"})]})}),u.jsx(mc,{children:e.map((o,s)=>{var d;const a=o.report.mainKeyword,l=((d=a.keywordProperties)==null?void 0:d.keywordDifficulty)??a.difficulty??0,c=a.searchVolume??0;return u.jsxs(x.Fragment,{children:[u.jsxs(ri,{className:"cursor-pointer",onClick:()=>r(o.id),children:[u.jsx(mt,{children:u.jsx("span",{className:"text-label-sm text-text-strong-950",children:o.keyword})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"size-3 rounded-full flex-shrink-0",style:{backgroundColor:WTe(l)}}),u.jsx("span",{className:"text-label-sm text-text-strong-950",children:l})]})}),u.jsx(mt,{children:u.jsx("span",{className:"text-label-sm text-text-strong-950",children:c.toLocaleString()})}),u.jsx(mt,{children:u.jsx(GTe,{monthlySearches:a.monthlySearches})}),u.jsx(mt,{className:"px-4",onClick:f=>f.stopPropagation(),children:u.jsx(KTe,{report:o})})]}),s<e.length-1&&u.jsx(gc,{})]},o.id)})})]})}function Uu(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function hV(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _ae(...e){return t=>{let n=!1;const r=e.map(i=>{const o=hV(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():hV(e[i],null)}}}}function mh(...e){return x.useCallback(_ae(...e),e)}function XTe(e,t){const n=x.createContext(t),r=o=>{const{children:s,...a}=o,l=x.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function i(o){const s=x.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function ZTe(e,t=[]){let n=[];function r(o,s){const a=x.createContext(s),l=n.length;n=[...n,s];const c=f=>{var C;const{scope:p,children:m,...y}=f,v=((C=p==null?void 0:p[e])==null?void 0:C[l])||a,b=x.useMemo(()=>y,Object.values(y));return u.jsx(v.Provider,{value:b,children:m})};c.displayName=o+"Provider";function d(f,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[l])||a,y=x.useContext(m);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[c,d]}const i=()=>{const o=n.map(s=>x.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return x.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,QTe(i,...t)]}function QTe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:c}
vendor: 14,566 bytes, line 113
113)=>{const f=l(o)[`__scope${c}`];return{...a,...f}},{});return x.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var iy=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},JTe=xi[" useId ".trim().toString()]||(()=>{}),eMe=0;function V7(e){const[t,n]=x.useState(JTe());return iy(()=>{n(r=>r??String(eMe++))},[e]),e||(t?`radix-${t}`:"")}var tMe=xi[" useInsertionEffect ".trim().toString()]||iy;function nMe({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=rMe({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:i;{const d=x.useRef(e!==void 0);x.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=a},[a,r])}const c=x.useCallback(d=>{var f;if(a){const p=iMe(d)?d(e):d;p!==e&&((f=s.current)==null||f.call(s,p))}else o(d)},[a,e,o,s]);return[l,c]}function rMe({defaultProp:e,onChange:t}){const[n,r]=x.useState(e),i=x.useRef(n),o=x.useRef(t);return tMe(()=>{o.current=t},[t]),x.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function iMe(e){return typeof e=="function"}function Aae(e){const t=oMe(e),n=x.forwardRef((r,i)=>{const{children:o,...s}=r,a=x.Children.toArray(o),l=a.find(aMe);if(l){const c=l.props.children,d=a.map(f=>f===l?x.Children.count(c)>1?x.Children.only(null):x.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...s,ref:i,children:x.isValidElement(c)?x.cloneElement(c,void 0,d):null})}return u.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function oMe(e){const t=x.forwardRef((n,r)=>{const{children:i,...o}=n;if(x.isValidElement(i)){const s=cMe(i),a=lMe(o,i.props);return i.type!==x.Fragment&&(a.ref=r?_ae(r,s):s),x.cloneElement(i,a)}return x.Children.count(i)>1?x.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sMe=Symbol("radix.slottable");function aMe(e){return x.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sMe}function lMe(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const l=o(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function cMe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var uMe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Sc=uMe.reduce((e,t)=>{const n=Aae(`Primitive.${t}`),r=x.forwardRef((i,o)=>{const{asChild:s,...a}=i,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dMe(e,t){e&&Si.flushSync(()=>e.dispatchEvent(t))}function oy(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function fMe(e,t=globalThis==null?void 0:globalThis.document){const n=oy(e);x.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var hMe="DismissableLayer",Nj="dismissableLayer.update",pMe="dismissableLayer.pointerDownOutside",mMe="dismissableLayer.focusOutside",pV,Nae=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jae=x.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...l}=e,c=x.useContext(Nae),[d,f]=x.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=x.useState({}),y=mh(t,j=>f(j)),v=Array.from(c.layers),[b]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),C=v.indexOf(b),S=d?v.indexOf(d):-1,E=c.layersWithOutsidePointerEventsDisabled.size>0,A=S>=C,_=vMe(j=>{const T=j.target,O=[...c.branches].some(D=>D.contains(T));!A||O||(i==null||i(j),s==null||s(j),j.defaultPrevented||a==null||a())},p),N=bMe(j=>{const T=j.target;[...c.branches].some(D=>D.contains(T))||(o==null||o(j),s==null||s(j),j.defaultPrevented||a==null||a())},p);return fMe(j=>{S===c.layers.size-1&&(r==null||r(j),!j.defaultPrevented&&a&&(j.preventDefault(),a()))},p),x.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(pV=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),mV(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=pV)}},[d,p,n,c]),x.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),mV())},[d,c]),x.useEffect(()=>{const j=()=>m({});return document.addEventListener(Nj,j),()=>document.removeEventListener(Nj,j)},[]),u.jsx(Sc.div,{...l,ref:y,style:{pointerEvents:E?A?"auto":"none":void 0,...e.style},onFocusCapture:Uu(e.onFocusCapture,N.onFocusCapture),onBlurCapture:Uu(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:Uu(e.onPointerDownCapture,_.onPointerDownCapture)})});jae.displayName=hMe;var gMe="DismissableLayerBranch",yMe=x.forwardRef((e,t)=>{const n=x.useContext(Nae),r=x.useRef(null),i=mh(t,r);return x.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),u.jsx(Sc.div,{...e,ref:i})});yMe.displayName=gMe;function vMe(e,t=globalThis==null?void 0:globalThis.document){const n=oy(e),r=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let l=function(){Tae(pMe,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function bMe(e,t=globalThis==null?void 0:globalThis.document){const n=oy(e),r=x.useRef(!1);return x.useEffect(()=>{const i=o=>{o.target&&!r.current&&Tae(mMe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function mV(){const e=new CustomEvent(Nj);document.dispatchEvent(e)}function Tae(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?dMe(i,o):i.dispatchEvent(o)}var U7="focusScope.autoFocusOnMount",q7="focusScope.autoFocusOnUnmount",gV={bubbles:!1,cancelable:!0},xMe="FocusScope",Mae=x.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=x.useState(null),c=oy(i),d=oy(o),f=x.useRef(null),p=mh(t,v=>l(v)),m=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(r){let v=function(E){if(m.paused||!a)return;const A=E.target;a.contains(A)?f.current=A:pu(f.current,{select:!0})},b=function(E){if(m.paused||!a)return;const A=E.relatedTarget;A!==null&&(a.contains(A)||pu(f.current,{select:!0}))},C=function(E){if(document.activeElement===document.body)for(const _ of E)_.removedNodes.length>0&&pu(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const S=new MutationObserver(C);return a&&S.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),S.disconnect()}}},[r,a,m.paused]),x.useEffect(()=>{if(a){vV.add(m);const v=document.activeElement;if(!a.contains(v)){const C=new CustomEvent(U7,gV);a.addEventListener(U7,c),a.dispatchEvent(C),C.defaultPrevented||(wMe(_Me(Oae(a)),{select:!0}),document.activeElement===v&&pu(a))}return()=>{a.removeEventListener(U7,c),setTimeout(()=>{const C=new CustomEvent(q7,gV);a.addEventListener(q7,d),a.dispatchEvent(C),C.defaultPrevented||pu(v??document.body,{select:!0}),a.removeEventListener(q7,d),vV.remove(m)},0)}}},[a,c,d,m]);const y=x.useCallback(v=>{if(!n&&!r||m.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,C=document.activeElement;if(b&&C){const S=v.currentTarget,[E,A]=CMe(S);E&&A?!v.shiftKey&&C===A?(v.preventDefault(),n&&pu(E,{select:!0})):v.shiftKey&&C===E&&(v.preventDefault(),n&&pu(A,{select:!0})):C===S&&v.preventDefault()}},[n,r,m.paused]);return u.jsx(Sc.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});Mae.displayName=xMe;function wMe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(pu(r,{select:t}),document.activeElement!==n)return}function CMe(e){const t=Oae(e),n=yV(t,e),r=yV(t.reverse(),e);return[n,r]}function Oae(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yV(e,t){for(const n of e)if(!SMe(n,{upTo:t}))return n}function SMe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function EMe(e){return e instanceof HTMLInputElement&&"select"in e}function pu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&EMe(e)&&t&&e.select()}}var vV=kMe();function kMe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=bV(e,t),e.unshift(t)},remove(t){var n;e=bV(e,t),(n=e[0])==null||n.resume()}}}function bV(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _Me(e){return e.filter(t=>t.tagName!=="A")}var AMe="Portal",Rae=x.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=x.useState(!1);iy(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?Fs.createPortal(u.jsx(Sc.div,{...r,ref:t}),s):null});Rae.displayName=AMe;function NMe(e,t){return x.useReducer((n,r)=>t[n][r]??n,e)}var sC=e=>{const{present:t,children:n}=e,r=jMe(t),i=typeof n=="function"?n({present:r.isPresent}):x.Children.only(n),o=mh(r.ref,TMe(i));return typeof n=="function"||r.isPresent?x.cloneElement(i,{ref:o}):null};sC.displayName="Presence";function jMe(e){const[t,n]=x.useState(),r=x.useRef(null),i=x.useRef(e),o=x.useRef("none"),s=e?"mounted":"unmounted",[a,l]=NMe(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const c=a2(r.current);o.current=a==="mounted"?c:"none"},[a]),iy(()=>{const c=r.current,d=i.current;if(d!==e){const p=o.current,m=a2(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),iy(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const v=a2(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=m=>{m.target===t&&(o.current=a2(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:x.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function a2(e){return(e==null?void 0:e.animationName)||"none"}function TMe(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var W7=0;function MMe(){x.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??xV()),document.body.insertAdjacentElement("beforeend",e[1]??xV()),W7++,()=>{W7===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),W7--}},[])}function xV(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var aC="Dialog",[Pae,OSt]=ZTe(aC),[OMe,ca]=Pae(aC),Dae=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=x.useRef(null),l=x.useRef(null),[c,d]=nMe({prop:r,defaultProp:i??!1,onChange:o,caller:aC});return u.jsx(OMe,{scope:t,triggerRef:a,contentRef:l,contentId:V7(),titleId:V7(),descriptionId:V7(),open:c,onOpenChange:d,onOpenToggle:x.useCallback(()=>d(f=>!f),[d]),modal:s,children:n})};Dae.displayName=aC;var Iae="DialogTrigger",RMe=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ca(Iae,n),o=mh(t,i.triggerRef);return u.jsx(Sc.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":QR(i.open),...r,ref:o,onClick:Uu(e.onClick,i.onOpenToggle)})});RMe.displayName=Iae;var XR="DialogPortal",[PMe,Lae]=Pae(XR,{forceMount:void 0}),$ae=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ca(XR,t);return u.jsx(PMe,{scope:t,forceMount:n,children:x.Children.map(r,s=>u.jsx(sC,{present:n||o.open,children:u.jsx(Rae,{asChild:!0,container:i,children:s})}))})};$ae.displayName=XR;var r3="DialogOverlay",zae=x.forwardRef((e,t)=>{const n=Lae(r3,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ca(r3,e.__scopeDialog);return o.modal?u.jsx(sC,{present:r||o.open,children:u.jsx(IMe,{...i,ref:t})}):null});zae.displayName=r3;var DMe=Aae("DialogOverlay.RemoveScroll"),IMe=x.forwardRef((e,t)=>
113{const{__scopeDialog:n,...r}=e,i=ca(r3,n);return u.jsx($v,{as:DMe,allowPinchZoom:!0,shards:[i.contentRef],children:u.jsx(Sc.div,{"data-state":QR(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Wf="DialogContent",Fae=x.forwardRef((e,t)=>{const n=Lae(Wf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ca(Wf,e.__scopeDialog);return u.jsx(sC,{present:r||o.open,children:o.modal?u.jsx(LMe,{...i,ref:t}):u.jsx($Me,{...i,ref:t})})});Fae.displayName=Wf;var LMe=x.forwardRef((e,t)=>{const n=ca(Wf,e.__scopeDialog),r=x.useRef(null),i=mh(t,n.contentRef,r);return x.useEffect(()=>{const o=r.current;if(o)return U5(o)},[]),u.jsx(Bae,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Uu(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:Uu(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Uu(e.onFocusOutside,o=>o.preventDefault())})}),$Me=x.forwardRef((e,t)=>{const n=ca(Wf,e.__scopeDialog),r=x.useRef(!1),i=x.useRef(!1);return u.jsx(Bae,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),Bae=x.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=ca(Wf,n),l=x.useRef(null),c=mh(t,l);return MMe(),u.jsxs(u.Fragment,{children:[u.jsx(Mae,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:u.jsx(jae,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":QR(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(zMe,{titleId:a.titleId}),u.jsx(BMe,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ZR="DialogTitle",Hae=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ca(ZR,n);return u.jsx(Sc.h2,{id:i.titleId,...r,ref:t})});Hae.displayName=ZR;var Vae="DialogDescription",Uae=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ca(Vae,n);return u.jsx(Sc.p,{id:i.descriptionId,...r,ref:t})});Uae.displayName=Vae;var qae="DialogClose",Wae=x.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ca(qae,n);return u.jsx(Sc.button,{type:"button",...r,ref:t,onClick:Uu(e.onClick,()=>i.onOpenChange(!1))})});Wae.displayName=qae;function QR(e){return e?"open":"closed"}var Gae="DialogTitleWarning",[RSt,Kae]=XTe(Gae,{contentName:Wf,titleName:ZR,docsSlug:"dialog"}),zMe=({titleId:e})=>{const t=Kae(Gae),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 114 115If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 116 117For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},FMe="DialogDescriptionWarning",BMe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Kae(FMe).contentName}}.`;return x.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Yae=Dae,Xae=$ae,Zae=zae,Qae=Fae,Jae=Hae,ele=Uae,tle=Wae;const HMe="CompactButtonRoot",nle="CompactButtonIcon",rle=el({slots:{root:["relative flex shrink-0 items-center justify-center outline-none","transition duration-200 ease-out","disabled:pointer-events-none disabled:border-transparent disabled:bg-transparent disabled:text-text-disabled-300 disabled:shadow-none","focus:outline-none"],icon:""},variants:{variant:{stroke:{root:["border border-stroke-soft-200 bg-bg-white-0 text-text-sub-600 shadow-regular-xs","hover:border-transparent hover:bg-bg-weak-50 hover:text-text-strong-950 hover:shadow-none","focus-visible:border-transparent focus-visible:bg-bg-strong-950 focus-visible:text-text-white-0 focus-visible:shadow-none"]},ghost:{root:["bg-transparent text-text-sub-600","hover:bg-bg-weak-50 hover:text-text-strong-950","focus-visible:bg-bg-strong-950 focus-visible:text-text-white-0"]},white:{root:["bg-bg-white-0 text-text-sub-600 shadow-regular-xs","hover:bg-bg-weak-50 hover:text-text-strong-950","focus-visible:bg-bg-strong-950 focus-visible:text-text-white-0"]},modifiable:{}},size:{large:{root:"size-6",icon:"size-5"},medium:{root:"size-5",icon:"size-[18px]"}},fullRadius:{true:{root:"rounded-full"},false:{root:"rounded-md"}}},defaultVariants:{variant:"stroke",size:"large",fullRadius:!1}}),JR=x.forwardRef(({asChild:e,variant:t,size:n,fullRadius:r,children:i,className:o,...s},a)=>{const l=x.useId(),c=e?Ei:"button",{root:d}=rle({variant:t,size:n,fullRadius:r}),p=yd(i,{variant:t,size:n},[nle],l,e);return u.jsx(c,{ref:a,className:d({class:o}),...s,children:p})});JR.displayName=HMe;function eP({variant:e,size:t,as:n,className:r,...i}){const o=n||"div",{icon:s}=rle({variant:e,size:t});return u.jsx(o,{className:s({class:r}),...i})}eP.displayName=nle;const wd=Yae,ile=tle,VMe=Xae,ole=x.forwardRef(({className:e,...t},n)=>u.jsx(Zae,{ref:n,className:Nt("fixed inset-0 z-50 flex flex-col items-center justify-center overflow-y-auto bg-overlay p-4 backdrop-blur-[10px]","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ole.displayName="ModalOverlay";const Ec=x.forwardRef(({className:e,overlayClassName:t,children:n,showClose:r=!0,...i},o)=>u.jsx(VMe,{children:u.jsx(ole,{className:t,children:u.jsxs(Qae,{ref:o,className:Nt("relative w-full max-w-[400px]","rounded-20 bg-bg-white-0 shadow-regular-md","focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",e),...i,children:[n,r&&u.jsx(ile,{asChild:!0,children:u.jsx(JR,{variant:"ghost",size:"large",className:"absolute right-4 top-4",children:u.jsx(eP,{as:Hf})})})]})})}));Ec.displayName="ModalContent";
117function kc({className:e,children:t,icon:n,title:r,description:i,...o}){return u.jsx("div",{className:Nt("relative flex items-start gap-3.5 py-4 pl-5 pr-14 before:absolute before:inset-x-0 before:bottom-0 before:border-b before:border-stroke-soft-200",e),...o,children:t||u.jsxs(u.Fragment,{children:[n&&u.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-bg-white-0 ring-1 ring-inset ring-stroke-soft-200",children:u.jsx(n,{className:"size-5 text-text-sub-600"})}),(r||i)&&u.jsxs("div",{className:"flex-1 space-y-1",children:[r&&u.jsx(sle,{children:r}),i&&u.jsx(ale,{children:i})]})]})})}kc.displayName="ModalHeader";const sle=x.forwardRef(({className:e,...t},n)=>u.jsx(Jae,{ref:n,className:Nt("text-label-sm text-text-strong-950",e),...t}));sle.displayName="ModalTitle";const ale=x.forwardRef(({className:e,...t},n)=>u.jsx(ele,{ref:n,className:Nt("text-paragraph-xs text-text-sub-600",e),...t}));ale.displayName="ModalDescription";function fm({className:e,...t}){return u.jsx("div",{className:Nt("p-5",e),...t})}fm.displayName="ModalBody";function _c({className:e,...t}){return u.jsx("div",{className:Nt("flex items-center justify-between gap-3 border-t border-stroke-soft-200 px-5 py-4",e),...t})}_c.displayName="ModalFooter";const UMe=[{code:"US",label:"United States"},{code:"GB",label:"United Kingdom"},{code:"AU",label:"Australia"},{code:"CA",label:"Canada"},{code:"IE",label:"Ireland"},{code:"NZ",label:"New Zealand"},{code:"ZA",label:"South Africa"},{code:"DE",label:"Germany"},{code:"FR",label:"France"},{code:"ES",label:"Spain"},{code:"IT",label:"Italy"},{code:"NL",label:"Netherlands"},{code:"BE",label:"Belgium"},{code:"CH",label:"Switzerland"},{code:"AT",label:"Austria"},{code:"SE",label:"Sweden"},{code:"NO",label:"Norway"},{code:"DK",label:"Denmark"},{code:"FI",label:"Finland"},{code:"PL",label:"Poland"},{code:"PT",label:"Portugal"},{code:"BR",label:"Brazil"},{code:"MX",label:"Mexico"},{code:"AR",label:"Argentina"},{code:"IN",label:"India"},{code:"JP",label:"Japan"},{code:"SG",label:"Singapore"},{code:"HK",label:"Hong Kong"},{code:"AE",label:"United Arab Emirates"},{code:"SA",label:"Saudi Arabia"}],wV="seio:keyword-report:country",CV="seio:keyword-report:ai-enabled",qMe=["loans","movies","how to buy audible books"];function WMe({isOpen:e,onClose:t}){const[n,r]=x.useState(""),{data:i}=UO(),o=br(),[s,{isLoading:a}]=LCe(),c=localStorage.getItem(wV)??(i==null?void 0:i.targetCountry)??"US",[d,f]=x.useState(c),p=localStorage.getItem(CV),[m,y]=x.useState(p!==null?p==="true":!0),v=A=>{f(A),localStorage.setItem(wV,A)},b=A=>{y(A),localStorage.setItem(CV,String(A))},C=n.split(",").filter(A=>A.trim()!=="").length,S=100,E=async()=>{const A=n.trim();if(A)try{const _=await s({keyword:A,languageCode:"en",locationCode:d,...m?{aiEnabled:m}:{}}).unwrap();if(!_.id)throw new Error("No report returned");t(),o(`/keywords/${_.id}`)}catch(_){console.error("Failed to generate report:",_),ze.error("Failed to generate report")}};return u.jsx(wd,{open:e,onOpenChange:A=>!A&&t(),children:u.jsxs(Ec,{className:"max-w-[540px]",children:[u.jsx(kc,{title:"Create Keyword Report",description:"Enter keywords to analyse search volume, difficulty, and more."}),u.jsxs(fm,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(It,{htmlFor:"keywords",children:"Keywords"}),u.jsxs("span",{className:"text-paragraph-xs text-text-soft-400",children:[C,"/",S]})]}),u.jsx(Tn,{children:u.jsx(Vn,{children:u.jsx(Mn,{id:"keywords",placeholder:"Enter keywords separated by commas",value:n,onChange:A=>r(A.target.value),onKeyDown:A=>A.key==="Enter"&&E()})})}),u.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[u.jsx("span",{className:"text-paragraph-xs text-text-soft-400",children:"Examples:"}),qMe.map(A=>u.jsx("button",{type:"button",onClick:()=>r(_=>_?`${_}, ${A}`:A),className:"text-paragraph-xs text-text-sub-600 underline underline-offset-2 hover:text-text-strong-950 transition-colors",children:A},A))]})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{children:"Country"}),u.jsxs(Xi,{value:d,onValueChange:v,children:[u.jsx(Qi,{children:u.jsx(Zi,{placeholder:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Fv,{as:iw}),"Select a country..."]})})}),u.jsx(Ji,{className:"max-h-60",children:UMe.map(A=>
117u.jsxs(Ft,{value:A.code,children:[u.jsx(X5,{style:{backgroundImage:`url(/flags/${A.code}.svg)`}}),A.label]},A.code))})]})]}),u.jsxs("div",{role:"button",tabIndex:0,onClick:()=>b(!m),onKeyDown:A=>A.key==="Enter"||A.key===" "?b(!m):void 0,className:"w-full text-left rounded-xl bg-feature-lighter p-4 flex items-start gap-3 ring-1 ring-inset ring-feature-base/20 hover:ring-feature-base/40 transition-all cursor-pointer",children:[u.jsx(r0,{checked:m,onCheckedChange:A=>b(!!A),className:"mt-0.5 shrink-0",onClick:A=>A.stopPropagation()}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[u.jsx(MSe,{className:"size-4 text-feature-base shrink-0"}),u.jsx("span",{className:"text-label-sm font-semibold text-feature-base",children:"AI Report Enabled"})]}),u.jsx("p",{className:"text-paragraph-xs text-feature-base/70",children:"Related search terms across multiple dimensions. Uses 5 credits per keyword."})]})]})]}),u.jsxs(_c,{children:[u.jsx(Re,{variant:"neutral",mode:"stroke",onClick:t,disabled:a,children:"Cancel"}),u.jsx(Re,{variant:"primary",mode:"filled",onClick:E,disabled:a||!n.trim(),children:a?"Generating...":u.jsxs(u.Fragment,{children:[u.jsx(wt,{as:Pi}),"Create Report"]})})]})]})})}const GMe="PaginationRoot",lle="PaginationItem",cle="PaginationNavButton",ule="PaginationNavIcon",lC=el({slots:{root:"flex flex-wrap items-center justify-center",item:"flex items-center justify-center text-center text-label-sm text-text-sub-600 transition duration-200 ease-out",n
117avButton:"flex items-center justify-center text-text-sub-600 transition duration-200 ease-out",navIcon:"size-5"},variants:{variant:{basic:{root:"gap-2",item:["h-8 min-w-8 rounded-lg px-1.5 ring-1 ring-inset ring-stroke-soft-200","hover:bg-bg-weak-50 hover:ring-transparent"],navButton:["size-8 rounded-lg","hover:bg-bg-weak-50"]},rounded:{root:"gap-2",item:["h-8 min-w-8 rounded-full px-1.5 ring-1 ring-inset ring-stroke-soft-200","hover:bg-bg-weak-50 hover:ring-transparent"],navButton:["size-8 rounded-full","hover:bg-bg-weak-50"]},group:{root:"divide-x divide-stroke-soft-200 overflow-hidden rounded-lg border border-stroke-soft-200",item:["h-8 min-w-10 px-1.5","hover:bg-bg-weak-50"],navButton:["h-8 w-10 px-1.5","hover:bg-bg-weak-50"]}}},defaultVariants:{variant:"basic"}});function cC({asChild:e,children:t,className:n,variant:r,...i}){const o=x.useId(),s=e?Ei:"div",{root:a}=lC({variant:r}),c=yd(t,{variant:r},[lle,cle,ule],o,e);return u.jsx(s,{className:a({class:n}),...i,children:c})}cC.displayName=GMe;const u0=x.forwardRef(({asChild:e,children:t,className:n,variant:r,current:i,...o},s)=>{const a=e?Ei:"button",{item:l}=lC({variant:r});return u.jsx(a,{ref:s,className:Nt(l({class:n}),{"text-text-strong-950":i}),...o,children:t})});u0.displayName=lle;const Vs=x.forwardRef(({asChild:e,children:t,className:n,variant:r,...i},o)=>{const s=e?Ei:"button",{navButton:a}=lC({variant:r});return u.jsx(s,{ref:o,className:a({class:n}),...i,children:t})});Vs.displayName=cle;function Us({variant:e,className:t,as:n,...r}){const i=n||"div",{navIcon:o}=lC({variant:e});return u.jsx(i,{className:o({class:t}),...r})}Us.displayName=ule;const dle=[7,10,15,25],fle="seio:keyword-reports:page-size";function KMe(){try{const e=localStorage.getItem(fle);if(e==null)return 7;const t=parseInt(e,10);return dle.includes(t)?t:7}catch{return 7}}function YMe(e){return e<30?"#10b981":e<50?"#f59e0b":e<75?"#f97316":"#ef4444"}function XMe(){const e=br(),[t,n]=x.useState(""),[r,i]=x.useState("traffic"),[o,s]=x.useState("desc"),[a,l]=x.useState(0),[c,d]=x.useState(KMe),[f,p]=x.useState(!1),{data:m=[],isLoading:y}=zCe(),v=!y&&m.length===0,b=x.useMemo(()=>{if(!m.length)return{count:0,traffic:0,avgKd:0};const _=m.reduce((T,O)=>T+(O.report.mainKeyword.searchVolume??0),0),N=m.map(T=>{var O;return((O=T.report.mainKeyword.keywordProperties)==null?void 0:O.keywordDifficulty)??T.report.mainKeyword.difficulty??0}),j=Math.round(N.reduce((T,O)=>T+O,0)/N.length);return{count:m.length,traffic:_,avgKd:j}},[m]),C=x.useMemo(()=>{let _=m.filter(N=>N.keyword.toLowerCase().includes(t.toLowerCase()));return _=[..._].sort((N,j)=>{var D,R;let T=0,O=0;return r==="keyword"&&(T=N.keyword,O=j.keyword),r==="kd"&&(T=((D=N.report.mainKeyword.keywordProperties)==null?void 0:D.keywordDifficulty)??N.report.mainKeyword.difficulty??0,O=((R=j.report.mainKeyword.keywordProperties)==null?void 0:R.keywordDifficulty)??j.report.mainKeyword.difficulty??0),r==="traffic"&&(T=N.report.mainKeyword.searchVolume??0,O=j.report.mainKeyword.searchVolume??0),T<O?o==="asc"?-1:1:T>O?o==="asc"?1:-1:0}),_},[m,t,r,o]),S=Math.max(1,Math.ceil(C.length/c)),E=C.slice(a*c,(a+1)*c),A=_=>{const[N,j]=_.split("-");i(N),s(j),l(0)};return u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[!v&&u.jsxs("div",{className:"pt-6 pb-4",children:[u.jsx("h1",{className:"text-display-xs font-semibold text-text-strong-950 mb-1",children:"Keyword Searches"}),u.jsx("p",{className:"text-text-sub-600 text-sm font-normal",children:"View all past keyword searches or start a new search"})]}),!v&&!y&&u.jsxs("div",{className:"flex items-center gap-8 py-6",style:{borderBottom:"1px dashed transparent",backgroundImage:"linear-gradient(to right, #e5e5e5 4px, transparent 4px)",backgroundSize:"8px 1px",backgroundRepeat:"repeat-x",backgroundPosition:"bottom"},children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-0.5",children:"Keyword Searches"}),u.jsx("p",{className:"text-title-h5 font-semibold text-text-strong-950",children:b.count})]}),u.jsx("div",{className:"w-px h-8 bg-stroke-soft-200"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-0.5",children:"Traffic Potential"}),u.jsx("p",{className:"text-title-h5 font-semibold text-text-strong-950",children:b.traffic.toLocaleStr
117ing()})]}),u.jsx("div",{className:"w-px h-8 bg-stroke-soft-200"}),u.jsx("div",{className:"flex items-center gap-2",children:u.jsxs("div",{children:[u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-0.5",children:"Average KD"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("p",{className:"text-title-h5 font-semibold text-text-strong-950",children:[b.avgKd,"%"]}),u.jsx("span",{className:"size-3 rounded-full flex-shrink-0",style:{backgroundColor:YMe(b.avgKd)}})]})]})})]}),!v&&u.jsxs("div",{className:"flex items-center justify-between gap-3 py-6",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(Tn,{size:"small",className:"w-[220px]",children:u.jsxs(Vn,{children:[u.jsx(dc,{as:ZN}),u.jsx(Mn,{placeholder:"Search...",value:t,onChange:_=>{n(_.target.value),l(0)}})]})}),u.jsxs(Xi,{variant:"compact",onValueChange:_=>{A(_),l(0)},children:[u.jsxs(Qi,{children:[u.jsx(Fv,{as:Ine}),u.jsx(Zi,{placeholder:"Sort by"})]}),u.jsxs(Ji,{align:"start",children:[u.jsx(Ft,{value:"traffic-desc",children:"Traffic â"}),u.jsx(Ft,{value:"traffic-asc",children:"Traffic â"}),u.jsx(Ft,{value:"kd-asc",children:"KD (easiest first)"}),u.jsx(Ft,{value:"kd-desc",children:"KD (hardest first)"}),u.jsx(Ft,{value:"keyword-asc",children:"Keyword AâZ"}),u.jsx(Ft,{value:"keyword-desc",children:"Keyword ZâA"})]})]})]}),u.jsxs(Re,{variant:"primary",mode:"filled",size:"small",onClick:()=>p(!0),children:[u.jsx(wt,{as:Pi}),"New Report"]})]}),u.jsx("div",{className:"flex flex-col flex-1",children:u.jsx(YTe,{rows:E,isLoading:y,isEmpty:v,onRowClick:_=>e(`/keywords/${_}`),onCreateReport:()=>p(!0)})}),!v&&!y&&C.length>0&&u.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[u.jsxs("span",{className:"flex-1 whitespace-nowrap text-paragraph-sm text-text-sub-600",children:["Page ",a+1," of ",S]}),u.jsxs(cC,{children:[u.jsx(Vs,{onClick:()=>l(0),disabled:a===0,children:u.jsx(Us,{as:Lne})}),u.jsx(Vs,{onClick:()=>l(a-1),disabled:a===0,children:u.jsx(Us,{as:Qs})}),Array.from({length:S},(_,N)=>N).map(_=>_===0||_===S-1||_>=a-1&&_<=a+1?u.jsx(u0,{current:_===a,onClick:()=>l(_),children:_+1},_):_===a-2||_===a+2?u.jsx(u0,{children:"..."},_):null),u.jsx(Vs,{onClick:()=>l(a+1),disabled:a>=S-1,children:u.jsx(Us,{as:im})}),u.jsx(Vs,{onClick:()=>l(S-1),disabled:a>=S-1,children:u.jsx(Us,{as:$ne})})]}),u.jsx("div",{className:"flex flex-1 justify-end",children:u.jsxs(Xi,{size:"xsmall",value:String(c),onValueChange:_=>{const N=Number(_);d(N),localStorage.setItem(fle,_),l(0)},children:[u.jsx(Qi,{className:"w-auto",children:u.jsx(Zi,{})}),u.jsx(Ji,{children:dle.map(_=>u.jsxs(Ft,{value:String(_),children:[_," / page"]},_))})]})})]}),u.jsx(WMe,{isOpen:f,onClose:()=>p(!1)})]})}function Wa({className:e,...t}){return u.jsx("div",{role:"status","aria-label":"Loading",className:Ar("border-stroke-soft-200 border-t-primary-base inline-block animate-spin rounded-full border-2 motion-reduce:animate-none",e),...t})}const ZMe="BadgeRoot",QMe="BadgeIcon",hle="BadgeDot",ple=el({slots:{root:"inline-flex items-center justify-center rounded-full leading-none transition duration-200 ease-out",icon:"shrink-0",dot:["dot","flex items-center justify-center","before:size-1 before:rounded-full before:bg-current"]},variants:{size:{small:{root:"h-4 gap-1.5 px-2 text-subheading-2xs uppercase has-[>.dot]:gap-2",icon:"-mx-1 size-3",dot:"-mx-2 size-4"},medium:{root:"h-5 gap-1.5 px-2 text-label-xs",icon:"-mx-1 size-4",dot:"-mx-1.5 size-4"}},variant:{filled:{root:"text-static-white"},light:{},lighter:{},stroke:{root:"ring-1 ring-inset ring-current"}},color:{gray:{},blue:{},orange:{},red:{},green:{},yellow:{},purple:{},sky:{},pink:{},teal:{}},disabled:{true:{root:"pointer-events-none"}},square:{true:{}}},compoundVariants:[{variant:"filled",color:"gray",class:{root:"bg-faded-base"}},{variant:"filled",color:"blue",class:{root:"bg-information-base"}},{variant:"filled",color:"orange",class:{root:"bg-warning-base"}},{variant:"filled",color:"red",class:{root:"bg-error-base"}},{variant:"filled",color:"green",class:{root:"bg-success-base"}}
117,{variant:"filled",color:"yellow",class:{root:"bg-away-base"}},{variant:"filled",color:"purple",class:{root:"bg-feature-base"}},{variant:"filled",color:"sky",class:{root:"bg-verified-base"}},{variant:"filled",color:"pink",class:{root:"bg-highlighted-base"}},{variant:"filled",color:"teal",class:{root:"bg-stable-base"}},{variant:"light",color:"gray",class:{root:"bg-faded-light text-faded-dark"}},{variant:"light",color:"blue",class:{root:"bg-information-light text-information-dark"}},{variant:"light",color:"orange",class:{root:"bg-warning-light text-warning-dark"}},{variant:"light",color:"red",class:{root:"bg-error-light text-error-dark"}},{variant:"light",color:"green",class:{root:"bg-success-light text-success-dark"}},{variant:"light",color:"yellow",class:{root:"bg-away-light text-away-dark"}},{variant:"light",color:"purple",class:{root:"bg-feature-light text-feature-dark"}},{variant:"light",color:"sky",class:{root:"bg-verified-light text-verified-dark"}},{variant:"light",color:"pink",class:{root:"bg-highlighted-light text-highlighted-dark"}},{variant:"light",color:"teal",class:{root:"bg-stable-light text-stable-dark"}},{variant:"lighter",color:"gray",class:{root:"bg-faded-lighter text-faded-base"}},{variant:"lighter",color:"blue",class:{root:"bg-information-lighter text-information-base"}},{variant:"lighter",color:"orange",class:{root:"bg-warning-lighter text-warning-base"}},{variant:"lighter",color:"red",class:{root:"bg-error-lighter text-error-base"}},{variant:"lighter",color:"green",class:{root:"bg-success-lighter text-success-base"}},{variant:"lighter",color:"yellow",class:{root:"bg-away-lighter text-away-base"}},{variant:"lighter",color:"purple",class:{root:"bg-feature-lighter text-feature-base"}},{variant:"lighter",color:"sky",class:{root:"bg-verified-lighter text-verified-base"}},{variant:"lighter",color:"pink",class:{root:"bg-highlighted-lighter text-highlighted-base"}},{variant:"lighter",color:"teal",class:{root:"bg-stable-lighter text-stable-base"}},{variant:"stroke",color:"gray",class:{root:"text-faded-base"}},{variant:"stroke",color:"blue",class:{root:"text-information-base"}},{variant:"stroke",color:"orange",class:{root:"text-warning-base"}},{variant:"stroke",color:"red",class:{root:"text-error-base"}},{variant:"stroke",color:"green",class:{root:"text-success-base"}},{variant:"stroke",color:"yellow",class:{root:"text-away-base"}},{variant:"stroke",color:"purple",class:{root:"text-feature-base"}},{variant:"stroke",color:"sky",class:{root:"text-verified-base"}},{variant:"stroke",color:"pink",class:{root:"text-highlighted-base"}},{variant:"stroke",color:"teal",class:{root:"text-stable-base"}},{size:"small",square:!0,class:{root:"min-w-4 px-1"}},{size:"medium",square:!0,class:{root:"min-w-5 px-1"}},{disabled:!0,variant:["stroke","filled","light","lighter"],color:["red","gray","blue","orange","green","yellow","purple","sky","pink","teal"],class:{root:["ring-1 ring-inset ring-stroke-soft-200","bg-transparent text-text-disabled-300"]}}],defaultVariants:{variant:"filled",size:"small",color:"gray"}}),Ri=x.forwardRef(({asChild:e,size:t,variant:n,color:r,disabled:i,square:o,children:s,className:a,...l},c)=>{const d=x.useId(),f=e?Ei:"div",{root:p}=ple({size:t,variant:n,color:r,disabled:i,square:o}),y=yd(s,{size:t,variant:n,color:r},[QMe,hle],d,e);return u.jsx(f,{ref:c,className:p({class:a}),...l,children:y})});Ri.displayName=ZMe;function tP({size:e,variant:t,color:n,className:r,...i}){const{dot:o}=ple({size:e,variant:t,color:n});return u.jsx("div",{className:o({class:r}),...i})}tP.displayName=hle;const qu=Jw,qs=e3,Ws=t3,JMe=el({slots:{content:["z-50 shadow-tooltip","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"],arrow:"-translate-y-1/2 -rotate-45 border [clip-path:polygon(0_100%,0_0,100%_100%)]"},variants:{size:{xsmall:{content:"rounded px-1.5 py-0.5 text-paragraph-xs",arrow:"rounded-bl-sm"},small:{content:"rounded-md px-2.5 py-1 text-paragraph-sm",arrow:"rounded-bl-[3px]"},medium:{content:"rounded-xl p-3 text-label-sm",arrow:"rounded-bl-sm"}},variant:{dark:{content:"bg-bg-strong-950 text-text-white-0",arrow:"border-stroke-strong-950 bg-bg-strong-950"},light:{content:"bg-bg-white-0 text-text-strong-950 ring-1 ring-stroke-soft-200",arrow:"border-stroke-soft-200 bg-bg-white-0"}}},compoundVariants:[{size:"xsmall",variant:"dark",class:{arrow:"size-1.5"}},{size:"xsmall",variant:"light",class:{arrow:"size-2"}},{size:["small","medium"],variant:"dark",class:{arrow:"size-2"}},{size:["small","medium"],variant:"light",class:{arrow:"size-2.5"}}],defaultVariants:{size:"small",variant:"dark"}}),ns=x.forwardRef(({size:e,variant:t,className:n,children:r,sideOffset:i=4,...o},s)=>{const{content:a,arrow:l}=JMe({size:e,variant:t});return u.jsx(n3,{children:u.jsxs(ry,{ref:s,sideOffset:i,className:a({class:n}),...o,children:[r,u.jsx(Use,{asChild:!0,children:u.jsx("div",{className:l()})})]})})});ns.displayName=ry.displayName;var G7,SV;function co(){if(SV)return G7;SV=1;var e=Array.isArray;return G7=e,G7}var K7,EV;function mle(){if(EV)return K7;EV=1;var e=typeof Rx=="object"&&Rx&&Rx.Object===Object&&Rx;return K7=e,K7}var Y7,kV;function tl(){if(kV)return Y7;kV=1;var e=mle(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Y7=n,Y7}var X7,_V;function Gv(){if(_V)return X7;_V=1;var e=tl(),t=e.Symbol;return X7=t,X7}var Z7,AV;function eOe(){if(AV)return Z7;AV=1;var e=Gv(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(s){var a=n.call(s,i),l=s[i];try{s[i]=void 0;var c=!0}catch{}var d=r.call(s);return c&&(a?s[i]=l:delete s[i]),d}return Z7=o,Z7}var Q7,NV;function tOe(){if(NV)return Q7;NV=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Q7=n,Q7}var J7,jV;function Ac(){if(jV)return J7;jV=1;
vendor: 1,270 bytes, line 117
117var e=Gv(),t=eOe(),n=tOe(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function s(a){return a==null?a===void 0?i:r:o&&o in Object(a)?t(a):n(a)}return J7=s,J7}var eE,TV;function Nc(){if(TV)return eE;TV=1;function e(t){return t!=null&&typeof t=="object"}return eE=e,eE}var tE,MV;function hm(){if(MV)return tE;MV=1;var e=Ac(),t=Nc(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return tE=r,tE}var nE,OV;function nP(){if(OV)return nE;OV=1;var e=co(),t=hm(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,s){if(e(o))return!1;var a=typeof o;return a=="number"||a=="symbol"||a=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||s!=null&&o in Object(s)}return nE=i,nE}var rE,RV;function Cd(){if(RV)return rE;RV=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return rE=e,rE}var iE,PV;function rP(){if(PV)return iE;PV=1;var e=Ac(),t=Cd(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function s(a){if(!t(a))return!1;var l=e(a);return l==r||l==i||l==n||l==o}return iE=s,iE}var oE,DV;function nOe(){if(DV)return oE;DV=1;var e=tl(),t=e["__core-js_shared__"];return oE=t,oE}var sE,IV;function rOe(){if(IV)return sE;IV=1;
vendor: 5,740 bytes, line 117
117var e=nOe(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return sE=n,sE}var aE,LV;function gle(){if(LV)return aE;LV=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return aE=n,aE}var lE,$V;function iOe(){if($V)return lE;$V=1;var e=rP(),t=rOe(),n=Cd(),r=gle(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,d=RegExp("^"+l.call(c).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||t(p))return!1;var m=e(p)?d:o;return m.test(r(p))}return lE=f,lE}var cE,zV;function oOe(){if(zV)return cE;zV=1;function e(t,n){return t==null?void 0:t[n]}return cE=e,cE}var uE,FV;function gh(){if(FV)return uE;FV=1;var e=iOe(),t=oOe();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return uE=n,uE}var dE,BV;function uC(){if(BV)return dE;BV=1;var e=gh(),t=e(Object,"create");return dE=t,dE}var fE,HV;function sOe(){if(HV)return fE;HV=1;var e=uC();function t(){this.__data__=e?e(null):{},this.size=0}return fE=t,fE}var hE,VV;function aOe(){if(VV)return hE;VV=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return hE=e,hE}var pE,UV;function lOe(){if(UV)return pE;UV=1;var e=uC(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var s=this.__data__;if(e){var a=s[o];return a===t?void 0:a}return r.call(s,o)?s[o]:void 0}return pE=i,pE}var mE,qV;function cOe(){if(qV)return mE;qV=1;var e=uC(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return mE=r,mE}var gE,WV;function uOe(){if(WV)return gE;WV=1;var e=uC(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return gE=n,gE}var yE,GV;function dOe(){if(GV)return yE;GV=1;var e=sOe(),t=aOe(),n=lOe(),r=cOe(),i=uOe();function o(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,yE=o,yE}var vE,KV;function fOe(){if(KV)return vE;KV=1;function e(){this.__data__=[],this.size=0}return vE=e,vE}var bE,YV;function iP(){if(YV)return bE;YV=1;function e(t,n){return t===n||t!==t&&n!==n}return bE=e,bE}var xE,XV;function dC(){if(XV)return xE;XV=1;var e=iP();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return xE=t,xE}var wE,ZV;function hOe(){if(ZV)return wE;ZV=1;var e=dC(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,s=e(o,i);if(s<0)return!1;var a=o.length-1;return s==a?o.pop():n.call(o,s,1),--this.size,!0}return wE=r,wE}var CE,QV;function pOe(){if(QV)return CE;QV=1;var e=dC();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return CE=t,CE}var SE,JV;function mOe(){if(JV)return SE;JV=1;var e=dC();function t(n){return e(this.__data__,n)>-1}return SE=t,SE}var EE,eU;function gOe(){if(eU)return EE;eU=1;var e=dC();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return EE=t,EE}var kE,tU;function fC(){if(tU)return kE;tU=1;var e=fOe(),t=hOe(),n=pOe(),r=mOe(),i=gOe();function o(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,kE=o,kE}var _E,nU;function oP(){if(nU)return _E;nU=1;var e=gh(),t=tl(),n=e(t,"Map");return _E=n,_E}var AE,rU;function yOe(){if(rU)return AE;rU=1;var e=dOe(),t=fC(),n=oP();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return AE=r,AE}var NE,iU;function vOe(){if(iU)return NE;iU=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return NE=e,NE}var jE,oU;function hC(){if(oU)return jE;oU=1;var e=vOe();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return jE=t,jE}var TE,sU;function bOe(){if(sU)return TE;sU=1;var e=hC();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return TE=t,TE}var ME,aU;function xOe(){if(aU)return ME;aU=1;var e=hC();function t(n){return e(this,n).get(n)}return ME=t,ME}var OE,lU;function wOe(){if(lU)return OE;lU=1;var e=hC();function t(n){return e(this,n).has(n)}return OE=t,OE}var RE,cU;function COe(){if(cU)return RE;cU=1;var e=hC();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return RE=t,RE}var PE,uU;function sP(){if(uU)return PE;uU=1;var e=yOe(),t=bOe(),n=xOe(),r=wOe(),i=COe();function o(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var c=s[a];this.set(c[0],c[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,PE=o,PE}var DE,dU;function yle(){if(dU)return DE;dU=1;var e=sP(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var s=arguments,a=i?i.apply(this,s):s[0],l=o.cache;if(l.has(a))return l.get(a);var c=r.apply(this,s);return o.cache=l.set(a,c)||l,c};return o.cache=new(n.Cache||e),o}return n.Cache=e,DE=n,DE}var IE,fU;function SOe(){if(fU)return IE;fU=1;var e=yle(),t=500;function n(r){var i=e(r,function(s){return o.size===t&&o.clear(),s}),o=i.cache;return i}return IE=n,IE}var LE,hU;function EOe(){if(hU)return LE;hU=1;var e=SOe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];
vendor: 10,070 bytes, lines 117-125
117return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(s,a,l,c){o.push(l?c.replace(n,"$1"):a||s)}),o});return LE=r,LE}var $E,pU;function aP(){if(pU)return $E;pU=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return $E=e,$E}var zE,mU;function kOe(){if(mU)return zE;mU=1;var e=Gv(),t=aP(),n=co(),r=hm(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function s(a){if(typeof a=="string")return a;if(n(a))return t(a,s)+"";if(r(a))return o?o.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return zE=s,zE}var FE,gU;function vle(){if(gU)return FE;gU=1;var e=kOe();function t(n){return n==null?"":e(n)}return FE=t,FE}var BE,yU;function ble(){if(yU)return BE;yU=1;var e=co(),t=nP(),n=EOe(),r=vle();function i(o,s){return e(o)?o:t(o,s)?[o]:n(r(o))}return BE=i,BE}var HE,vU;function pC(){if(vU)return HE;vU=1;var e=hm();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return HE=t,HE}var VE,bU;function lP(){if(bU)return VE;bU=1;var e=ble(),t=pC();function n(r,i){i=e(i,r);for(var o=0,s=i.length;r!=null&&o<s;)r=r[t(i[o++])];return o&&o==s?r:void 0}return VE=n,VE}var UE,xU;function xle(){if(xU)return UE;xU=1;var e=lP();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return UE=t,UE}var _Oe=xle();const ls=Ht(_Oe);var qE,wU;function AOe(){if(wU)return qE;wU=1;function e(t){return t==null}return qE=e,qE}var NOe=AOe();const Lt=Ht(NOe);var WE,CU;function jOe(){if(CU)return WE;CU=1;var e=Ac(),t=co(),n=Nc(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return WE=i,WE}var TOe=jOe();const Gf=Ht(TOe);var MOe=rP();const yt=Ht(MOe);var OOe=Cd();const pm=Ht(OOe);var GE={exports:{}},tn={};/** 118 * @license React 119 * react-is.production.min.js 120 * 121 * Copyright (c) Facebook, Inc. and its affiliates. 122 * 123 * This source code is licensed under the MIT license found in the 124 * LICENSE file in the root directory of this source tree. 125 */var SU;function ROe(){if(SU)return tn;SU=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y;y=Symbol.for("react.module.reference");function v(b){if(typeof b=="object"&&b!==null){var C=b.$$typeof;switch(C){case e:switch(b=b.type,b){case n:case i:case r:case c:case d:return b;default:switch(b=b&&b.$$typeof,b){case a:case s:case l:case p:case f:case o:return b;default:return C}}case t:return C}}}return tn.ContextConsumer=s,tn.ContextProvider=o,tn.Element=e,tn.ForwardRef=l,tn.Fragment=n,tn.Lazy=p,tn.Memo=f,tn.Portal=t,tn.Profiler=i,tn.StrictMode=r,tn.Suspense=c,tn.SuspenseList=d,tn.isAsyncMode=function(){return!1},tn.isConcurrentMode=function(){return!1},tn.isContextConsumer=function(b){return v(b)===s},tn.isContextProvider=function(b){return v(b)===o},tn.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},tn.isForwardRef=function(b){return v(b)===l},tn.isFragment=function(b){return v(b)===n},tn.isLazy=function(b){return v(b)===p},tn.isMemo=function(b){return v(b)===f},tn.isPortal=function(b){return v(b)===t},tn.isProfiler=function(b){return v(b)===i},tn.isStrictMode=function(b){return v(b)===r},tn.isSuspense=function(b){return v(b)===c},tn.isSuspenseList=function(b){return v(b)===d},tn.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===c||b===d||b===m||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===f||b.$$typeof===o||b.$$typeof===s||b.$$typeof===l||b.$$typeof===y||b.getModuleId!==void 0)},tn.typeOf=v,tn}var EU;function POe(){return EU||(EU=1,GE.exports=ROe()),GE.exports}var DOe=POe(),KE,kU;function wle(){if(kU)return KE;kU=1;var e=Ac(),t=Nc(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return KE=r,KE}var YE,_U;function IOe(){if(_U)return YE;_U=1;var e=wle();function t(n){return e(n)&&n!=+n}return YE=t,YE}var LOe=IOe();const mm=Ht(LOe);var $Oe=wle();const zOe=Ht($Oe);var Gs=function(t){return t===0?0:t>0?1:-1},vf=function(t){return Gf(t)&&t.indexOf("%")===t.length-1},Me=function(t){return zOe(t)&&!mm(t)},Nr=function(t){return Me(t)||Gf(t)},FOe=0,Kv=function(t){var n=++FOe;return"".concat(t||"").concat(n)},Kf=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Me(t)&&!Gf(t))return r;var o;if(vf(t)){var s=t.indexOf("%");o=n*parseFloat(t.slice(0,s))/100}else o=+t;return mm(o)&&(o=r),i&&o>n&&(o=n),o},_u=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},BOe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Qo=function(t,n){return Me(t)&&Me(n)?function(r){return t+r*(n-t)}:function(){return n}};function i3(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ls(r,t))===n})}var HOe=function(t,n){return Me(t)&&Me(n)?t-n:Gf(t)&&Gf(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function qp(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function jj(e){"@babel/helpers - typeof";return jj=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},jj(e)}var VOe=["viewBox","children"],UOe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],AU=["points","pathLength"],XE={svg:VOe,polygon:AU,polyline:AU},cP=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
125ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],o3=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(x.isValidElement(t)&&(r=t.props),!pm(r))return null;var i={};return Object.keys(r).forEach(function(o){cP.includes(o)&&(i[o]=n||function(s){return r[o](r,s)})}),i},qOe=function(t,n,r){return function(i){return t(n,r,i),null}},s3=function(t,n,r){if(!pm(t)||jj(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var s=t[o];cP.includes(o)&&typeof s=="function"&&(i||(i={}),i[o]=qOe(s,n,r))}),i},WOe=["children"],GOe=["children"];function NU(e,t){if(e==null)return{};var n=KOe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Tj(e){"@babel/helpers - typeof";return Tj=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},Tj(e)}var jU={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"}
vendor: 5,033 bytes, line 125
125,nc=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},TU=null,ZE=null,uP=function e(t){if(t===TU&&Array.isArray(ZE))return ZE;var n=[];return x.Children.forEach(t,function(r){Lt(r)||(DOe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),ZE=n,TU=t,n};function ea(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return nc(i)}):r=[nc(t)],uP(e).forEach(function(i){var o=ls(i,"type.displayName")||ls(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function xo(e,t){var n=ea(e,t);return n&&n[0]}var MU=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Me(r)||r<=0||!Me(i)||i<=0)},YOe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],XOe=function(t){return t&&t.type&&Gf(t.type)&&YOe.indexOf(t.type)>=0},ZOe=function(t){return t&&Tj(t)==="object"&&"clipDot"in t},QOe=function(t,n,r,i){var o,s=(o=XE==null?void 0:XE[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!yt(t)&&(i&&s.includes(n)||UOe.includes(n))||r&&cP.includes(n)},At=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(x.isValidElement(t)&&(i=t.props),!pm(i))return null;var o={};return Object.keys(i).forEach(function(s){var a;QOe((a=i)===null||a===void 0?void 0:a[s],s,n,r)&&(o[s]=i[s])}),o},Mj=function e(t,n){if(t===n)return!0;var r=x.Children.count(t);if(r!==x.Children.count(n))return!1;if(r===0)return!0;if(r===1)return OU(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],s=n[i];if(Array.isArray(o)||Array.isArray(s)){if(!e(o,s))return!1}else if(!OU(o,s))return!1}return!0},OU=function(t,n){if(Lt(t)&&Lt(n))return!0;if(!Lt(t)&&!Lt(n)){var r=t.props||{},i=r.children,o=NU(r,WOe),s=n.props||{},a=s.children,l=NU(s,GOe);return i&&a?qp(o,l)&&Mj(i,a):!i&&!a?qp(o,l):!1}return!1},RU=function(t,n){var r=[],i={};return uP(t).forEach(function(o,s){if(XOe(o))r.push(o);else if(o){var a=nc(o.type),l=n[a]||{},c=l.handler,d=l.once;if(c&&(!d||!i[a])){var f=c(o,a,s);r.push(f),i[a]=!0}}}),r},JOe=function(t){var n=t&&t.type;return n&&jU[n]?jU[n]:null},eRe=function(t,n){return uP(n).indexOf(t)},tRe=["children","width","height","viewBox","className","style","title","desc"];function Oj(){return Oj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oj.apply(this,arguments)}function nRe(e,t){if(e==null)return{};var n=rRe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rj(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,s=e.style,a=e.title,l=e.desc,c=nRe(e,tRe),d=i||{width:n,height:r,x:0,y:0},f=Mt("recharts-surface",o);return K.createElement("svg",Oj({},At(c,!0,"svg"),{className:f,width:n,height:r,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),K.createElement("title",null,a),K.createElement("desc",null,l),t)}var iRe=["children","className"];function Pj(){return Pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pj.apply(this,arguments)}function oRe(e,t){if(e==null)return{};var n=sRe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Hn=K.forwardRef(function(e,t){var n=e.children,r=e.className,i=oRe(e,iRe),o=Mt("recharts-layer",r);return K.createElement("g",Pj({className:o},At(i,!0),{ref:t}),n)}),rc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},QE,PU;
125function aRe(){if(PU)return QE;PU=1;function e(t,n,r){var i=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var s=Array(o);++i<o;)s[i]=t[i+n];return s}return QE=e,QE}var JE,DU;function lRe(){if(DU)return JE;DU=1;var e=aRe();function t(n,r,i){var o=n.length;return i=i===void 0?o:i,!r&&i>=o?n:e(n,r,i)}return JE=t,JE}var ek,IU;function Cle(){if(IU)return ek;IU=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",s="\\u200d",a=RegExp("["+s+e+i+o+"]");function l(c){return a.test(c)}return ek=l,ek}var tk,LU;function cRe(){if(LU)return tk;LU=1;function e(t){return t.split("")}return tk=e,tk}var nk,$U;function uRe(){if($U)return nk;$U=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",s="["+e+"]",a="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",c="(?:"+a+"|"+l+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",y=c+"?",v="["+o+"]?",b="(?:"+m+"(?:"+[d,f,p].join("|")+")"+v+y+")*",C=v+y+b,S="(?:"+[d+a+"?",a,f,p,s].join("|")+")",E=RegExp(l+"(?="+l+")|"+S+C,"g");function A(_){return _.match(E)||[]}return nk=A,nk}var rk,zU;function dRe(){if(zU)return rk;zU=1;var e=cRe(),t=Cle(),n=uRe();function r(i){return t(i)?n(i):e(i)}return rk=r,rk}var ik,FU;function fRe(){if(FU)return ik;FU=1;var e=lRe(),t=Cle(),n=dRe(),r=vle();function i(o){return function(s){s=r(s);var a=t(s)?n(s):void 0,l=a?a[0]:s.charAt(0),c=a?e(a,1).join(""):s.slice(1);return l[o]()+c}}return ik=i,ik}var ok,BU;function hRe(){if(BU)return ok;BU=1;var e=fRe(),t=e("toUpperCase");return ok=t,ok}var pRe=hRe();const mC=Ht(pRe);function Sn(e){return function(){return e}}const Sle=Math.cos,a3=Math.sin,ua=Math.sqrt,l3=Math.PI,gC=2*l3,Dj=Math.PI,Ij=2*Dj,uf=1e-6,mRe=Ij-uf;function Ele(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function gRe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Ele;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class yRe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?Ele:gRe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-t,c=i-n,d=s-t,f=a-n,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>uf)if(!(Math.abs(f*l-c*d)>uf)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-s,y=i-a,v=l*l+c*c,b=m*m+y*y,C=Math.sqrt(v),S=Math.sqrt(p),E=o*Math.tan((Dj-Math.acos((v+p-b)/(2*C*S)))/2),A=E/S,_=E/C;Math.abs(A-1)>uf&&this._append`L${t+A*d},${n+A*f}`,this._append`A${o},${o},0,0,${+(f*m>d*y)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,o,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),c=t+a,d=n+l,f=1^s,p=s?i-o:o-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>uf||Math.abs(this._y1-d)>uf)&&this._append`L${c},${d}`,r&&(p<0&&(p=p%Ij+Ij),p>mRe?this._append`A${r},${r},0,1,${f},${t-a},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=d}`:p>uf&&this._append`A${r},${r},0,${+(p>=Dj)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function dP(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new yRe(t)}function fP(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kle(e){this._context=e}kle.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function yC(e){return new kle(e)}function _le(e){return e[0]}function Ale(e){return e[1]}function Nle(e,t){var n=Sn(!0),r=null,i=yC,o=null,s=dP(a);e=typeof e=="function"?e:e===void 0?_le:Sn(e),t=typeof t=="function"?t:t===void 0?Ale:Sn(t);function a(l){var c,d=(l=fP(l)).length,f,p=!1,m;
125for(r==null&&(o=i(m=s())),c=0;c<=d;++c)!(c<d&&n(f=l[c],c,l))===p&&((p=!p)?o.lineStart():o.lineEnd()),p&&o.point(+e(f,c,l),+t(f,c,l));if(m)return o=null,m+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:Sn(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:Sn(+l),a):t},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Sn(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}function l2(e,t,n){var r=null,i=Sn(!0),o=null,s=yC,a=null,l=dP(c);e=typeof e=="function"?e:e===void 0?_le:Sn(+e),t=typeof t=="function"?t:Sn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?Ale:Sn(+n);function c(f){var p,m,y,v=(f=fP(f)).length,b,C=!1,S,E=new Array(v),A=new Array(v);for(o==null&&(a=s(S=l())),p=0;p<=v;++p){if(!(p<v&&i(b=f[p],p,f))===C)if(C=!C)m=p,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),y=p-1;y>=m;--y)a.point(E[y],A[y]);a.lineEnd(),a.areaEnd()}C&&(E[p]=+e(b,p,f),A[p]=+t(b,p,f),a.point(r?+r(b,p,f):E[p],n?+n(b,p,f):A[p]))}if(S)return a=null,S+""||null}function d(){return Nle().defined(i).curve(s).context(o)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Sn(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Sn(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Sn(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Sn(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Sn(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Sn(+f),c):n},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(n)},c.lineX1=function(){return d().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Sn(!!f),c):i},c.curve=function(f){return arguments.length?(s=f,o!=null&&(a=s(o)),c):s},c.context=function(f){return arguments.length?(f==null?o=a=null:a=s(o=f),c):o},c}class jle{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function vRe(e){return new jle(e,!0)}function bRe(e){return new jle(e,!1)}const hP={draw(e,t){const n=ua(t/l3);e.moveTo(n,0),e.arc(0,0,n,0,gC)}},xRe={draw(e,t){const n=ua(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Tle=ua(1/3),wRe=Tle*2,CRe={draw(e,t){const n=ua(t/wRe),r=n*Tle;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},SRe={draw(e,t){const n=ua(t),r=-n/2;e.rect(r,r,n,n)}},ERe=.8908130915292852,Mle=a3(l3/10)/a3(7*l3/10),kRe=a3(gC/10)*Mle,_Re=-Sle(gC/10)*Mle,ARe={draw(e,t){const n=ua(t*ERe),r=kRe*n,i=_Re*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const s=gC*o/5,a=Sle(s),l=a3(s);e.lineTo(l*n,-a*n),e.lineTo(a*r-l*i,l*r+a*i)}e.closePath()}},sk=ua(3),NRe={draw(e,t){const n=-ua(t/(sk*3));e.moveTo(0,n*2),e.lineTo(-sk*n,-n),e.lineTo(sk*n,-n),e.closePath()}},Wo=-.5,Go=ua(3)/2,Lj=1/ua(12),jRe=(Lj/2+1)*3,TRe={draw(e,t){const n=ua(t/jRe),r=n/2,i=n*Lj,o=r,s=n*Lj+n,a=-o,l=s;e.moveTo(r,i),e.lineTo(o,s),e.lineTo(a,l),e.lineTo(Wo*r-Go*i,Go*r+Wo*i),e.lineTo(Wo*o-Go*s,Go*o+Wo*s),e.lineTo(Wo*a-Go*l,Go*a+Wo*l),e.lineTo(Wo*r+Go*i,Wo*i-Go*r),e.lineTo(Wo*o+Go*s,Wo*s-Go*o),e.lineTo(Wo*a+Go*l,Wo*l-Go*a),e.closePath()}};function MRe(e,t){let n=null,r=dP(i);e=typeof e=="function"?e:Sn(e||hP),t=typeof t=="function"?t:Sn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Sn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Sn(+o),i):t}
vendor: 6,389 bytes, line 125
125,i.context=function(o){return arguments.length?(n=o??null,i):n},i}function c3(){}function u3(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Ole(e){this._context=e}Ole.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:u3(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:u3(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ORe(e){return new Ole(e)}function Rle(e){this._context=e}Rle.prototype={areaStart:c3,areaEnd:c3,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:u3(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RRe(e){return new Rle(e)}function Ple(e){this._context=e}Ple.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:u3(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function PRe(e){return new Ple(e)}function Dle(e){this._context=e}Dle.prototype={areaStart:c3,areaEnd:c3,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function DRe(e){return new Dle(e)}function HU(e){return e<0?-1:1}function VU(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),a=(o*i+s*r)/(r+i);return(HU(o)+HU(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function UU(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function ak(e,t,n){var r=e._x0,i=e._y0,o=e._x1,s=e._y1,a=(o-r)/3;e._context.bezierCurveTo(r+a,i+a*t,o-a,s-a*n,o,s)}function d3(e){this._context=e}d3.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ak(this,this._t0,UU(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,ak(this,UU(this,n=VU(this,e,t)),n);break;default:ak(this,this._t0,n=VU(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Ile(e){this._context=new Lle(e)}(Ile.prototype=Object.create(d3.prototype)).point=function(e,t){d3.prototype.point.call(this,t,e)};function Lle(e){this._context=e}Lle.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function IRe(e){return new d3(e)}function LRe(e){return new Ile(e)}function $le(e){this._context=e}$le.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=qU(e),i=qU(t),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function qU(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function $Re(e){return new $le(e)}function vC(e,t){this._context=e,this._t=t}vC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 14,264 bytes, lines 125-128
125default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function zRe(e){return new vC(e,.5)}function FRe(e){return new vC(e,0)}function BRe(e){return new vC(e,1)}function d0(e,t){if((s=e.length)>1)for(var n=1,r,i,o=e[t[0]],s,a=o.length;n<s;++n)for(i=o,o=e[t[n]],r=0;r<a;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function $j(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function HRe(e,t){return e[t]}function VRe(e){const t=[];return t.key=e,t}function URe(){var e=Sn([]),t=$j,n=d0,r=HRe;function i(o){var s=Array.from(e.apply(this,arguments),VRe),a,l=s.length,c=-1,d;for(const f of o)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(f,s[a].key,c,o)]).data=f;for(a=0,d=fP(t(s));a<l;++a)s[d[a]].index=a;return n(s,d),s}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Sn(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:Sn(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?$j:typeof o=="function"?o:Sn(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??d0,i):n},i}function qRe(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,s;i<o;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}d0(e,t)}}function WRe(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var s=0,a=0;s<i;++s)a+=e[s][n][1]||0;r[n][1]+=r[n][0]=-a/2}d0(e,t)}}function GRe(e,t){if(!(!((s=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,s;r<o;++r){for(var a=0,l=0,c=0;a<s;++a){for(var d=e[t[a]],f=d[r][1]||0,p=d[r-1][1]||0,m=(f-p)/2,y=0;y<a;++y){var v=e[t[y]],b=v[r][1]||0,C=v[r-1][1]||0;m+=b-C}l+=f,c+=m*f}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,d0(e,t)}}function sy(e){"@babel/helpers - typeof";return sy=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},sy(e)}var KRe=["type","size","sizeType"];function zj(){return zj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zj.apply(this,arguments)}function WU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function GU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WU(Object(n),!0).forEach(function(r){YRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function YRe(e,t,n){return t=XRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XRe(e){var t=ZRe(e,"string");return sy(t)=="symbol"?t:t+""}function ZRe(e,t){if(sy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function QRe(e,t){if(e==null)return{};var n=JRe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function JRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var zle={symbolCircle:hP,symbolCross:xRe,symbolDiamond:CRe,symbolSquare:SRe,symbolStar:ARe,symbolTriangle:NRe,symbolWye:TRe},ePe=Math.PI/180,tPe=function(t){var n="symbol".concat(mC(t));return zle[n]||hP},nPe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*ePe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},rPe=function(t,n){zle["symbol".concat(mC(t))]=n},pP=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,s=t.sizeType,a=s===void 0?"area":s,l=QRe(t,KRe),c=GU(GU({},l),{},{type:r,size:o,sizeType:a}),d=function(){var b=tPe(r),C=MRe().type(b).size(nPe(o,a,r));return C()},f=c.className,p=c.cx,m=c.cy,y=At(c,!0);return p===+p&&m===+m&&o===+o?K.createElement("path",zj({},y,{className:Mt("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(m,")"),d:d()})):null};pP.registerSymbol=rPe;function f0(e){"@babel/helpers - typeof";return f0=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},f0(e)}function Fj(){return Fj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fj.apply(this,arguments)}function KU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iPe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KU(Object(n),!0).forEach(function(r){ay(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sPe(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,Ble(r.key),r)}}function aPe(e,t,n){return t&&sPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lPe(e,t,n){return t=f3(t),cPe(e,Fle()?Reflect.construct(t,n||[],f3(e).constructor):t.apply(e,n))}function cPe(e,t){if(t&&(f0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uPe(e)}function uPe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fle(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fle=function(){return!!e})()}function f3(e){return f3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},f3(e)}function dPe(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&&Bj(e,t)}function Bj(e,t){return Bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bj(e,t)}function ay(e,t,n){return t=Ble(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ble(e){var t=fPe(e,"string");return f0(t)=="symbol"?t:t+""}function fPe(e,t){if(f0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(f0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ns=32,mP=function(e){function t(){return oPe(this,t),lPe(this,t,arguments)}return dPe(t,e),aPe(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=Ns/2,s=Ns/6,a=Ns/3,l=r.inactive?i:r.color;if(r.type==="plainline")return K.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:Ns,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return K.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(o,"h").concat(a,` 126 A`).concat(s,",").concat(s,",0,1,1,").concat(2*a,",").concat(o,` 127 H`).concat(Ns,"M").concat(2*a,",").concat(o,` 128 A`).concat(s,",").concat(s,",0,1,1,").concat(a,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return K.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Ns/8,"h").concat(Ns,"v").concat(Ns*3/4,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(K.isValidElement(r.legendIcon)){var c=iPe({},r);return delete c.legendIcon,K.cloneElement(r.legendIcon,c)}return K.createElement(pP,{fill:l,cx:o,cy:o,size:Ns,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,s=i.iconSize,a=i.layout,l=i.formatter,c=i.inactiveColor,d={x:0,y:0,width:Ns,height:Ns},f={display:a==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(m,y){var v=m.formatter||l,b=Mt(ay(ay({"recharts-legend-item":!0},"legend-item-".concat(y),!0),"inactive",m.inactive));if(m.type==="none")return null;var C=yt(m.value)?null:m.value;rc(!yt(m.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var S=m.inactive?c:m.color;return K.createElement("li",Fj({className:b,style:f,key:"legend-item-".concat(y)},s3(r.props,m,y)),K.createElement(Rj,{width:s,height:s,viewBox:d,style:p},r.renderIcon(m)),K.createElement("span",{className:"recharts-legend-item-text",style:{color:S}},v?v(C,m,y):C))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,s=r.align;if(!i||!i.length)return null;var a={padding:0,margin:0,textAlign:o==="horizontal"?s:"left"};return K.createElement("ul",{className:"recharts-default-legend",style:a},this.renderItems())}}])}(x.PureComponent);ay(mP,"displayName","Legend");ay(mP,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var lk,YU;function hPe(){if(YU)return lk;YU=1;var e=fC();function t(){this.__data__=new e,this.size=0}return lk=t,lk}var ck,XU;function pPe(){if(XU)return ck;XU=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ck=e,ck}var uk,ZU;function mPe(){if(ZU)return uk;ZU=1;function e(t){return this.__data__.get(t)}return uk=e,uk}var dk,QU;function gPe(){if(QU)return dk;QU=1;function e(t){return this.__data__.has(t)}return dk=e,dk}var fk,JU;function yPe(){if(JU)return fk;JU=1;var e=fC(),t=oP(),n=sP(),r=200;function i(o,s){var a=this.__data__;if(a instanceof e){var l=a.__data__;if(!t||l.length<r-1)return l.push([o,s]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(o,s),this.size=a.size,this}return fk=i,fk}var hk,eq;function Hle(){if(eq)return hk;eq=1;var e=fC(),t=hPe(),n=pPe(),r=mPe(),i=gPe(),o=yPe();function s(a){var l=this.__data__=new e(a);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=i,s.prototype.set=o,hk=s,hk}var pk,tq;function vPe(){if(tq)return pk;tq=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return pk=t,pk}var mk,nq;function bPe(){if(nq)return mk;nq=1;function e(t){return this.__data__.has(t)}return mk=e,mk}var gk,rq;function Vle(){if(rq)return gk;rq=1;var e=sP(),t=vPe(),n=bPe();function r(i){var o=-1,s=i==null?0:i.length;for(this.__data__=new e;++o<s;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,gk=r,gk}var yk,iq;function Ule(){if(iq)return yk;iq=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return yk=e,yk}var vk,oq;function qle(){if(oq)return vk;oq=1;function e(t,n){return t.has(n)}return vk=e,vk}var bk,sq;function Wle(){if(sq)return bk;sq=1;var e=Vle(),t=Ule(),n=qle(),r=1,i=2;function o(s,a,l,c,d,f){var p=l&r,m=s.length,y=a.length;if(m!=y&&!(p&&y>m))return!1;var v=f.get(s),b=f.get(a);if(v&&b)return v==a&&b==s;var C=-1,S=!0,E=l&i?new e:void 0;for(f.set(s,a),f.set(a,s);++C<m;){var A=s[C],_=a[C];if(c)var N=p?c(_,A,C,a,s,f):c(A,_,C,s,a,f);if(N!==void 0){if(N)continue;S=!1;break}if(E){if(!t(a,function(j,T){if(!n(E,T)&&(A===j||d(A,j,l,c,f)))return E.push(T)})){S=!1;break}}else if(!(A===_||d(A,_,l,c,f))){S=!1;break}}return f.delete(s),f.delete(a),S}return bk=o,bk}var xk,aq;function xPe(){if(aq)return xk;aq=1;var e=tl(),t=e.Uint8Array;return xk=t,xk}var wk,lq;function wPe(){if(lq)return wk;lq=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return wk=e,wk}var Ck,cq;function gP(){if(cq)return Ck;cq=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Ck=e,Ck}var Sk,uq;function CPe(){if(uq)return Sk;uq=1;var e=Gv(),t=xPe(),n=iP(),r=Wle(),i=wPe(),o=gP(),s=1,a=2,l="[object Boolean]",c="[object Date]",d="[object Error]",f="[object Map]",p="[object Number]",m="[object RegExp]",y="[object Set]",v="[object String]",b="[object Symbol]",C="[object ArrayBuffer]",S="[object DataView]",E=e?e.prototype:void 0,A=E?E.valueOf:void 0;function _(N,j,T,O,D,R,I){switch(T){case S:if(N.byteLength!=j.byteLength||N.byteOffset!=j.byteOffset)return!1;N=N.buffer,j=j.buffer;case C:return!(N.byteLength!=j.byteLength||!R(new t(N),new t(j)));case l:case c:case p:return n(+N,+j);case d:return N.name==j.name&&N.message==j.message;case m:case v:return N==j+"";case f:var F=i;case y:var $=O&s;if(F||(F=o),N.size!=j.size&&!$)return!1;var H=I.get(N);if(H)return H==j;O|=a,I.set(N,j);var L=r(F(N),F(j),O,D,R,I);return I.delete(N),L;case b:if(A)return A.call(N)==A.call(j)}return!1}return Sk=_,Sk}var Ek,dq;function Gle(){if(dq)return Ek;dq=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return Ek=e,Ek}var kk,fq;function SPe(){if(fq)return kk;fq=1;var e=Gle(),t=co();function n(r,i,o){var s=i(r);return t(r)?s:e(s,o(r))}return kk=n,kk}var _k,hq;
vendor: 4,452 bytes, line 128
128function EPe(){if(hq)return _k;hq=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,s=[];++r<i;){var a=t[r];n(a,r,t)&&(s[o++]=a)}return s}return _k=e,_k}var Ak,pq;function kPe(){if(pq)return Ak;pq=1;function e(){return[]}return Ak=e,Ak}var Nk,mq;function _Pe(){if(mq)return Nk;mq=1;var e=EPe(),t=kPe(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(s){return s==null?[]:(s=Object(s),e(i(s),function(a){return r.call(s,a)}))}:t;return Nk=o,Nk}var jk,gq;function APe(){if(gq)return jk;gq=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return jk=e,jk}var Tk,yq;function NPe(){if(yq)return Tk;yq=1;var e=Ac(),t=Nc(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Tk=r,Tk}var Mk,vq;function yP(){if(vq)return Mk;vq=1;var e=NPe(),t=Nc(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(s){return t(s)&&r.call(s,"callee")&&!i.call(s,"callee")};return Mk=o,Mk}var i1={exports:{}},Ok,bq;function jPe(){if(bq)return Ok;bq=1;function e(){return!1}return Ok=e,Ok}i1.exports;var xq;function Kle(){return xq||(xq=1,function(e,t){var n=tl(),r=jPe(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||r;e.exports=c}(i1,i1.exports)),i1.exports}var Rk,wq;function vP(){if(wq)return Rk;wq=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Rk=n,Rk}var Pk,Cq;function bP(){if(Cq)return Pk;Cq=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Pk=t,Pk}var Dk,Sq;function TPe(){if(Sq)return Dk;Sq=1;var e=Ac(),t=bP(),n=Nc(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",c="[object Map]",d="[object Number]",f="[object Object]",p="[object RegExp]",m="[object Set]",y="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",C="[object DataView]",S="[object Float32Array]",E="[object Float64Array]",A="[object Int8Array]",_="[object Int16Array]",N="[object Int32Array]",j="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",D="[object Uint32Array]",R={};R[S]=R[E]=R[A]=R[_]=R[N]=R[j]=R[T]=R[O]=R[D]=!0,R[r]=R[i]=R[b]=R[o]=R[C]=R[s]=R[a]=R[l]=R[c]=R[d]=R[f]=R[p]=R[m]=R[y]=R[v]=!1;function I(F){return n(F)&&t(F.length)&&!!R[e(F)]}return Dk=I,Dk}var Ik,Eq;function Yle(){if(Eq)return Ik;Eq=1;function e(t){return function(n){return t(n)}}return Ik=e,Ik}var o1={exports:{}};o1.exports;var kq;function MPe(){return kq||(kq=1,function(e,t){var n=mle(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,s=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a}(o1,o1.exports)),o1.exports}var Lk,_q;function Xle(){if(_q)return Lk;_q=1;var e=TPe(),t=Yle(),n=MPe(),r=n&&n.isTypedArray,i=r?t(r):e;return Lk=i,Lk}var $k,Aq;function OPe(){if(Aq)return $k;Aq=1;var e=APe(),t=yP(),n=co(),r=Kle(),i=vP(),o=Xle(),s=Object.prototype,a=s.hasOwnProperty;function l(c,d){var f=n(c),p=!f&&t(c),m=!f&&!p&&r(c),y=!f&&!p&&!m&&o(c),v=f||p||m||y,b=v?e(c.length,String):[],C=b.length;for(var S in c)(d||a.call(c,S))&&!(v&&(S=="length"||m&&(S=="offset"||S=="parent")||y&&(S=="buffer"||S=="byteLength"||S=="byteOffset")||i(S,C)))&&b.push(S);return b}return $k=l,$k}var zk,Nq;function RPe(){if(Nq)return zk;Nq=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return zk=t,zk}var Fk,jq;function Zle(){if(jq)return Fk;jq=1;function e(t,n){return function(r){return t(n(r))}}return Fk=e,Fk}var Bk,Tq;function PPe(){if(Tq)return Bk;Tq=1;var e=Zle(),t=e(Object.keys,Object);return Bk=t,Bk}var Hk,Mq;function DPe(){if(Mq)return Hk;Mq=1;var e=RPe(),t=PPe(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var s=[];for(var a in Object(o))r.call(o,a)&&a!="constructor"&&s.push(a);return s}return Hk=i,Hk}var Vk,Oq;function Yv(){if(Oq)return Vk;Oq=1;var e=rP(),t=bP();function n(r){return r!=null&&t(r.length)&&!e(r)}return Vk=n,Vk}var Uk,Rq;function bC(){if(Rq)return Uk;Rq=1;var e=OPe(),t=DPe(),n=Yv();function r(i){return n(i)?e(i):t(i)}return Uk=r,Uk}var qk,Pq;function IPe(){if(Pq)return qk;Pq=1;var e=SPe(),t=_Pe(),n=bC();function r(i){return e(i,n,t)}
vendor: 4,982 bytes, line 128
128return qk=r,qk}var Wk,Dq;function LPe(){if(Dq)return Wk;Dq=1;var e=IPe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,s,a,l,c,d){var f=a&t,p=e(o),m=p.length,y=e(s),v=y.length;if(m!=v&&!f)return!1;for(var b=m;b--;){var C=p[b];if(!(f?C in s:r.call(s,C)))return!1}var S=d.get(o),E=d.get(s);if(S&&E)return S==s&&E==o;var A=!0;d.set(o,s),d.set(s,o);for(var _=f;++b<m;){C=p[b];var N=o[C],j=s[C];if(l)var T=f?l(j,N,C,s,o,d):l(N,j,C,o,s,d);if(!(T===void 0?N===j||c(N,j,a,l,d):T)){A=!1;break}_||(_=C=="constructor")}if(A&&!_){var O=o.constructor,D=s.constructor;O!=D&&"constructor"in o&&"constructor"in s&&!(typeof O=="function"&&O instanceof O&&typeof D=="function"&&D instanceof D)&&(A=!1)}return d.delete(o),d.delete(s),A}return Wk=i,Wk}var Gk,Iq;function $Pe(){if(Iq)return Gk;Iq=1;var e=gh(),t=tl(),n=e(t,"DataView");return Gk=n,Gk}var Kk,Lq;function zPe(){if(Lq)return Kk;Lq=1;var e=gh(),t=tl(),n=e(t,"Promise");return Kk=n,Kk}var Yk,$q;function Qle(){if($q)return Yk;$q=1;var e=gh(),t=tl(),n=e(t,"Set");return Yk=n,Yk}var Xk,zq;function FPe(){if(zq)return Xk;zq=1;var e=gh(),t=tl(),n=e(t,"WeakMap");return Xk=n,Xk}var Zk,Fq;function BPe(){if(Fq)return Zk;Fq=1;var e=$Pe(),t=oP(),n=zPe(),r=Qle(),i=FPe(),o=Ac(),s=gle(),a="[object Map]",l="[object Object]",c="[object Promise]",d="[object Set]",f="[object WeakMap]",p="[object DataView]",m=s(e),y=s(t),v=s(n),b=s(r),C=s(i),S=o;return(e&&S(new e(new ArrayBuffer(1)))!=p||t&&S(new t)!=a||n&&S(n.resolve())!=c||r&&S(new r)!=d||i&&S(new i)!=f)&&(S=function(E){var A=o(E),_=A==l?E.constructor:void 0,N=_?s(_):"";if(N)switch(N){case m:return p;case y:return a;case v:return c;case b:return d;case C:return f}return A}),Zk=S,Zk}var Qk,Bq;function HPe(){if(Bq)return Qk;Bq=1;var e=Hle(),t=Wle(),n=CPe(),r=LPe(),i=BPe(),o=co(),s=Kle(),a=Xle(),l=1,c="[object Arguments]",d="[object Array]",f="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function y(v,b,C,S,E,A){var _=o(v),N=o(b),j=_?d:i(v),T=N?d:i(b);j=j==c?f:j,T=T==c?f:T;var O=j==f,D=T==f,R=j==T;if(R&&s(v)){if(!s(b))return!1;_=!0,O=!1}if(R&&!O)return A||(A=new e),_||a(v)?t(v,b,C,S,E,A):n(v,b,j,C,S,E,A);if(!(C&l)){var I=O&&m.call(v,"__wrapped__"),F=D&&m.call(b,"__wrapped__");if(I||F){var $=I?v.value():v,H=F?b.value():b;return A||(A=new e),E($,H,C,S,A)}}return R?(A||(A=new e),r(v,b,C,S,E,A)):!1}return Qk=y,Qk}var Jk,Hq;function xP(){if(Hq)return Jk;Hq=1;var e=HPe(),t=Nc();function n(r,i,o,s,a){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,s,n,a)}return Jk=n,Jk}var e9,Vq;function VPe(){if(Vq)return e9;Vq=1;var e=Hle(),t=xP(),n=1,r=2;function i(o,s,a,l){var c=a.length,d=c,f=!l;if(o==null)return!d;for(o=Object(o);c--;){var p=a[c];if(f&&p[2]?p[1]!==o[p[0]]:!(p[0]in o))return!1}for(;++c<d;){p=a[c];var m=p[0],y=o[m],v=p[1];if(f&&p[2]){if(y===void 0&&!(m in o))return!1}else{var b=new e;if(l)var C=l(y,v,m,o,s,b);if(!(C===void 0?t(v,y,n|r,l,b):C))return!1}}return!0}return e9=i,e9}var t9,Uq;function Jle(){if(Uq)return t9;Uq=1;var e=Cd();function t(n){return n===n&&!e(n)}return t9=t,t9}var n9,qq;function UPe(){if(qq)return n9;qq=1;var e=Jle(),t=bC();function n(r){for(var i=t(r),o=i.length;o--;){var s=i[o],a=r[s];i[o]=[s,a,e(a)]}return i}return n9=n,n9}var r9,Wq;function ece(){if(Wq)return r9;Wq=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return r9=e,r9}var i9,Gq;function qPe(){if(Gq)return i9;Gq=1;var e=VPe(),t=UPe(),n=ece();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(s){return s===i||e(s,i,o)}}return i9=r,i9}var o9,Kq;function WPe(){if(Kq)return o9;Kq=1;function e(t,n){return t!=null&&n in Object(t)}return o9=e,o9}var s9,Yq;function GPe(){if(Yq)return s9;Yq=1;var e=ble(),t=yP(),n=co(),r=vP(),i=bP(),o=pC();function s(a,l,c){l=e(l,a);for(var d=-1,f=l.length,p=!1;++d<f;){var m=o(l[d]);if(!(p=a!=null&&c(a,m)))break;a=a[m]}return p||++d!=f?p:(f=a==null?0:a.length,!!f&&i(f)&&r(m,f)&&(n(a)||t(a)))}return s9=s,s9}var a9,Xq;function KPe(){if(Xq)return a9;Xq=1;var e=WPe(),t=GPe();function n(r,i){return r!=null&&t(r,i,e)}return a9=n,a9}var l9,Zq;function YPe(){if(Zq)return l9;Zq=1;var e=xP(),t=xle(),n=KPe(),r=nP(),i=Jle(),o=ece(),s=pC(),a=1,l=2;function c(d,f){return r(d)&&i(f)?o(s(d),f):function(p){var m=t(p,d);return m===void 0&&m===f?n(p,d):e(f,m,a|l)}}return l9=c,l9}var c9,Qq;function gm(){if(Qq)return c9;Qq=1;function e(t){return t}return c9=e,c9}var u9,Jq;function XPe(){if(Jq)return u9;Jq=1;function e(t){return function(n){return n==null?void 0:n[t]}}return u9=e,u9}var d9,eW;function ZPe(){if(eW)return d9;eW=1;var e=lP();function t(n){return function(r){return e(r,n)}}return d9=t,d9}var f9,tW;function QPe(){if(tW)return f9;tW=1;var e=XPe(),t=ZPe(),n=nP(),r=pC();function i(o){return n(o)?e(r(o)):t(o)}return f9=i,f9}var h9,nW;function Sd(){if(nW)return h9;nW=1;var e=qPe(),t=YPe(),n=gm(),r=co(),i=QPe();function o(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):i(s)}return h9=o,h9}var p9,rW;
vendor: 44,005 bytes, lines 128-136
128function tce(){if(rW)return p9;rW=1;function e(t,n,r,i){for(var o=t.length,s=r+(i?1:-1);i?s--:++s<o;)if(n(t[s],s,t))return s;return-1}return p9=e,p9}var m9,iW;function JPe(){if(iW)return m9;iW=1;function e(t){return t!==t}return m9=e,m9}var g9,oW;function eDe(){if(oW)return g9;oW=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return g9=e,g9}var y9,sW;function tDe(){if(sW)return y9;sW=1;var e=tce(),t=JPe(),n=eDe();function r(i,o,s){return o===o?n(i,o,s):e(i,t,s)}return y9=r,y9}var v9,aW;function nDe(){if(aW)return v9;aW=1;var e=tDe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return v9=t,v9}var b9,lW;function rDe(){if(lW)return b9;lW=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return b9=e,b9}var x9,cW;function iDe(){if(cW)return x9;cW=1;function e(){}return x9=e,x9}var w9,uW;function oDe(){if(uW)return w9;uW=1;var e=Qle(),t=iDe(),n=gP(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return w9=i,w9}var C9,dW;function sDe(){if(dW)return C9;dW=1;var e=Vle(),t=nDe(),n=rDe(),r=qle(),i=oDe(),o=gP(),s=200;function a(l,c,d){var f=-1,p=t,m=l.length,y=!0,v=[],b=v;if(d)y=!1,p=n;else if(m>=s){var C=c?null:i(l);if(C)return o(C);y=!1,p=r,b=new e}else b=c?[]:v;e:for(;++f<m;){var S=l[f],E=c?c(S):S;if(S=d||S!==0?S:0,y&&E===E){for(var A=b.length;A--;)if(b[A]===E)continue e;c&&b.push(E),v.push(S)}else p(b,E,d)||(b!==v&&b.push(E),v.push(S))}return v}return C9=a,C9}var S9,fW;function aDe(){if(fW)return S9;fW=1;var e=Sd(),t=sDe();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return S9=n,S9}var lDe=aDe();const hW=Ht(lDe);function nce(e,t,n){return t===!0?hW(e,n):yt(t)?hW(e,t):e}function h0(e){"@babel/helpers - typeof";return h0=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},h0(e)}var cDe=["ref"];function pW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ol(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pW(Object(n),!0).forEach(function(r){xC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mW(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,ice(r.key),r)}}function dDe(e,t,n){return t&&mW(e.prototype,t),n&&mW(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fDe(e,t,n){return t=h3(t),hDe(e,rce()?Reflect.construct(t,n||[],h3(e).constructor):t.apply(e,n))}function hDe(e,t){if(t&&(h0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pDe(e)}function pDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rce=function(){return!!e})()}function h3(e){return h3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},h3(e)}function mDe(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&&Hj(e,t)}function Hj(e,t){return Hj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hj(e,t)}function xC(e,t,n){return t=ice(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ice(e){var t=gDe(e,"string");return h0(t)=="symbol"?t:t+""}function gDe(e,t){if(h0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(h0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function yDe(e,t){if(e==null)return{};var n=vDe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bDe(e){return e.value}function xDe(e,t){if(K.isValidElement(e))return K.cloneElement(e,t);if(typeof e=="function")return K.createElement(e,t);t.ref;var n=yDe(t,cDe);return K.createElement(mP,n)}var gW=1,Wp=function(e){function t(){var n;uDe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=fDe(this,t,[].concat(i)),xC(n,"lastBoundingBox",{width:-1,height:-1}),n}return mDe(t,e),dDe(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>gW||Math.abs(i.height-this.lastBoundingBox.height)>gW)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ol({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,s=i.align,a=i.verticalAlign,l=i.margin,c=i.chartWidth,d=i.chartHeight,f,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(s==="center"&&o==="vertical"){var m=this.getBBoxSnapshot();f={left:((c||0)-m.width)/2}}else f=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(a==="middle"){var y=this.getBBoxSnapshot();p={top:((d||0)-y.height)/2}}else p=a==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Ol(Ol({},f),p)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,s=i.width,a=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,d=i.payload,f=Ol(Ol({position:"absolute",width:s||"auto",height:a||"auto"},this.getDefaultPosition(l)),l);return K.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(m){r.wrapperNode=m}},xDe(o,Ol(Ol({},this.props),{},{payload:nce(d,c,bDe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Ol(Ol({},this.defaultProps),r.props),s=o.layout;return s==="vertical"&&Me(r.props.height)?{height:r.props.height}:s==="horizontal"?{width:r.props.width||i}:null}}])}(x.PureComponent);xC(Wp,"displayName","Legend");xC(Wp,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var E9,yW;function wDe(){if(yW)return E9;yW=1;var e=Gv(),t=yP(),n=co(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return E9=i,E9}var k9,vW;function oce(){if(vW)return k9;vW=1;var e=Gle(),t=wDe();function n(r,i,o,s,a){var l=-1,c=r.length;for(o||(o=t),a||(a=[]);++l<c;){var d=r[l];i>0&&o(d)?i>1?n(d,i-1,o,s,a):e(a,d):s||(a[a.length]=d)}return a}return k9=n,k9}var _9,bW;function CDe(){if(bW)return _9;bW=1;function e(t){return function(n,r,i){for(var o=-1,s=Object(n),a=i(n),l=a.length;l--;){var c=a[t?l:++o];if(r(s[c],c,s)===!1)break}return n}}return _9=e,_9}var A9,xW;function SDe(){if(xW)return A9;xW=1;var e=CDe(),t=e();return A9=t,A9}var N9,wW;function sce(){if(wW)return N9;wW=1;var e=SDe(),t=bC();function n(r,i){return r&&e(r,i,t)}return N9=n,N9}var j9,CW;function EDe(){if(CW)return j9;CW=1;var e=Yv();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var s=i.length,a=r?s:-1,l=Object(i);(r?a--:++a<s)&&o(l[a],a,l)!==!1;);return i}}return j9=t,j9}var T9,SW;function wP(){if(SW)return T9;SW=1;var e=sce(),t=EDe(),n=t(e);return T9=n,T9}var M9,EW;function ace(){if(EW)return M9;EW=1;var e=wP(),t=Yv();function n(r,i){var o=-1,s=t(r)?Array(r.length):[];return e(r,function(a,l,c){s[++o]=i(a,l,c)}),s}return M9=n,M9}var O9,kW;function kDe(){if(kW)return O9;kW=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return O9=e,O9}var R9,_W;function _De(){if(_W)return R9;_W=1;var e=hm();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,s=n===n,a=e(n),l=r!==void 0,c=r===null,d=r===r,f=e(r);if(!c&&!f&&!a&&n>r||a&&l&&d&&!c&&!f||o&&l&&d||!i&&d||!s)return 1;if(!o&&!a&&!f&&n<r||f&&i&&s&&!o&&!a||c&&i&&s||!l&&s||!d)return-1}return 0}return R9=t,R9}var P9,AW;function ADe(){if(AW)return P9;AW=1;var e=_De();function t(n,r,i){for(var o=-1,s=n.criteria,a=r.criteria,l=s.length,c=i.length;++o<l;){var d=e(s[o],a[o]);if(d){if(o>=c)return d;var f=i[o];return d*(f=="desc"?-1:1)}}return n.index-r.index}return P9=t,P9}var D9,NW;function NDe(){if(NW)return D9;NW=1;var e=aP(),t=lP(),n=Sd(),r=ace(),i=kDe(),o=Yle(),s=ADe(),a=gm(),l=co();function c(d,f,p){f.length?f=e(f,function(v){return l(v)?function(b){return t(b,v.length===1?v[0]:v)}:v}):f=[a];var m=-1;f=e(f,o(n));var y=r(d,function(v,b,C){var S=e(f,function(E){return E(v)});return{criteria:S,index:++m,value:v}});return i(y,function(v,b){return s(v,b,p)})}return D9=c,D9}var I9,jW;function jDe(){if(jW)return I9;jW=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return I9=e,I9}var L9,TW;function TDe(){if(TW)return L9;TW=1;var e=jDe(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var s=arguments,a=-1,l=t(s.length-i,0),c=Array(l);++a<l;)c[a]=s[i+a];a=-1;for(var d=Array(i+1);++a<i;)d[a]=s[a];return d[i]=o(c),e(r,this,d)}}return L9=n,L9}var $9,MW;function MDe(){if(MW)return $9;MW=1;function e(t){return function(){return t}}return $9=e,$9}var z9,OW;function lce(){if(OW)return z9;OW=1;var e=gh(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return z9=t,z9}var F9,RW;function ODe(){if(RW)return F9;RW=1;var e=MDe(),t=lce(),n=gm(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return F9=r,F9}var B9,PW;function RDe(){if(PW)return B9;PW=1;var e=800,t=16,n=Date.now;function r(i){var o=0,s=0;return function(){var a=n(),l=t-(a-s);if(s=a,l>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return B9=r,B9}var H9,DW;function PDe(){if(DW)return H9;DW=1;var e=ODe(),t=RDe(),n=t(e);return H9=n,H9}var V9,IW;function DDe(){if(IW)return V9;IW=1;var e=gm(),t=TDe(),n=PDe();function r(i,o){return n(t(i,o,e),i+"")}return V9=r,V9}var U9,LW;function wC(){if(LW)return U9;LW=1;var e=iP(),t=Yv(),n=vP(),r=Cd();function i(o,s,a){if(!r(a))return!1;var l=typeof s;return(l=="number"?t(a)&&n(s,a.length):l=="string"&&s in a)?e(a[s],o):!1}return U9=i,U9}var q9,$W;function IDe(){if($W)return q9;$W=1;var e=oce(),t=NDe(),n=DDe(),r=wC(),i=n(function(o,s){if(o==null)return[];var a=s.length;return a>1&&r(o,s[0],s[1])?s=[]:a>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(o,e(s,1),[])});return q9=i,q9}var LDe=IDe();const CP=Ht(LDe);function ly(e){"@babel/helpers - typeof";return ly=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},ly(e)}function Vj(){return Vj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vj.apply(this,arguments)}function $De(e,t){return HDe(e)||BDe(e,t)||FDe(e,t)||zDe()}function zDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 129In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FDe(e,t){if(e){if(typeof e=="string")return zW(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 zW(e,t)}}function zW(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 BDe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function HDe(e){if(Array.isArray(e))return e}function FW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function W9(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FW(Object(n),!0).forEach(function(r){VDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VDe(e,t,n){return t=UDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UDe(e){var t=qDe(e,"string");return ly(t)=="symbol"?t:t+""}function qDe(e,t){if(ly(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ly(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function WDe(e){return Array.isArray(e)&&Nr(e[0])&&Nr(e[1])?e.join(" ~ "):e}var GDe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,s=t.itemStyle,a=s===void 0?{}:s,l=t.labelStyle,c=l===void 0?{}:l,d=t.payload,f=t.formatter,p=t.itemSorter,m=t.wrapperClassName,y=t.labelClassName,v=t.label,b=t.labelFormatter,C=t.accessibilityLayer,S=C===void 0?!1:C,E=function(){if(d&&d.length){var I={padding:0,margin:0},F=(p?CP(d,p):d).map(function($,H){if($.type==="none")return null;var L=W9({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},a),B=$.formatter||f||WDe,z=$.value,V=$.name,U=z,W=V;if(B&&U!=null&&W!=null){var G=B(z,V,$,H,d);if(Array.isArray(G)){var Y=$De(G,2);U=Y[0],W=Y[1]}else U=G}return K.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(H),style:L},Nr(W)?K.createElement("span",{className:"recharts-tooltip-item-name"},W):null,Nr(W)?K.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,K.createElement("span",{className:"recharts-tooltip-item-value"},U),K.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return K.createElement("ul",{className:"recharts-tooltip-item-list",style:I},F)}return null},A=W9({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),_=W9({margin:0},c),N=!Lt(v),j=N?v:"",T=Mt("recharts-default-tooltip",m),O=Mt("recharts-tooltip-label",y);N&&b&&d!==void 0&&d!==null&&(j=b(v,d));var D=S?{role:"status","aria-live":"assertive"}:{};return K.createElement("div",Vj({className:T,style:A},D),K.createElement("p",{className:O,style:_},K.isValidElement(j)?j:"".concat(j)),E())};function cy(e){"@babel/helpers - typeof";return cy=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},cy(e)}function c2(e,t,n){return t=KDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KDe(e){var t=YDe(e,"string");return cy(t)=="symbol"?t:t+""}function YDe(e,t){if(cy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tg="recharts-tooltip-wrapper",XDe={visibility:"hidden"};function ZDe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Mt(Tg,c2(c2(c2(c2({},"".concat(Tg,"-right"),Me(n)&&t&&Me(t.x)&&n>=t.x),"".concat(Tg,"-left"),Me(n)&&t&&Me(t.x)&&n<t.x),"".concat(Tg,"-bottom"),Me(r)&&t&&Me(t.y)&&r>=t.y),"".concat(Tg,"-top"),Me(r)&&t&&Me(t.y)&&r<t.y))}function BW(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,s=e.reverseDirection,a=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(o&&Me(o[r]))return o[r];var d=n[r]-a-i,f=n[r]+i;if(t[r])return s[r]?d:f;if(s[r]){var p=d,m=l[r];return p<m?Math.max(f,l[r]):Math.max(d,l[r])}var y=f+a,v=l[r]+c;return y>v?Math.max(d,l[r]):Math.max(f,l[r])}function QDe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function JDe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,s=e.tooltipBox,a=e.useTranslate3d,l=e.viewBox,c,d,f;return s.height>0&&s.width>0&&n?(d=BW({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=BW({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),c=QDe({translateX:d,translateY:f,useTranslate3d:a})):c=XDe,{cssProperties:c,cssClasses:ZDe({translateX:d,translateY:f,coordinate:n})}}function p0(e){"@babel/helpers - typeof";return p0=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},p0(e)}function HW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HW(Object(n),!0).forEach(function(r){qj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tIe(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,uce(r.key),r)}}function nIe(e,t,n){return t&&tIe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function rIe(e,t,n){return t=p3(t),iIe(e,cce()?Reflect.construct(t,n||[],p3(e).constructor):t.apply(e,n))}function iIe(e,t){if(t&&(p0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oIe(e)}function oIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cce=function(){return!!e})()}function p3(e){return p3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},p3(e)}function sIe(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&&Uj(e,t)}function Uj(e,t){return Uj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uj(e,t)}function qj(e,t,n){return t=uce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uce(e){var t=aIe(e,"string");return p0(t)=="symbol"?t:t+""}function aIe(e,t){if(p0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(p0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UW=1,lIe=function(e){function t(){var n;eIe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=rIe(this,t,[].concat(i)),qj(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),qj(n,"handleKeyDown",function(s){if(s.key==="Escape"){var a,l,c,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(a=(l=n.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&a!==void 0?a:0,y:(c=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&c!==void 0?c:0}})}}),n}return sIe(t,e),nIe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>UW||Math.abs(r.height-this.state.lastBoundingBox.height)>UW)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,a=i.animationDuration,l=i.animationEasing,c=i.children,d=i.coordinate,f=i.hasPayload,p=i.isAnimationActive,m=i.offset,y=i.position,v=i.reverseDirection,b=i.useTranslate3d,C=i.viewBox,S=i.wrapperStyle,E=JDe({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:m,position:y,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:C}),A=E.cssClasses,_=E.cssProperties,N=VW(VW({transition:p&&o?"transform ".concat(a,"ms ").concat(l):void 0},_),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},S);return K.createElement("div",{tabIndex:-1,className:A,style:N,ref:function(T){r.wrapperNode=T}},c)}}])}(x.PureComponent),cIe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ym={isSsr:cIe()};function m0(e){"@babel/helpers - typeof";return m0=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},m0(e)}function qW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function WW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qW(Object(n),!0).forEach(function(r){SP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dIe(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,fce(r.key),r)}}function fIe(e,t,n){return t&&dIe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hIe(e,t,n){return t=m3(t),pIe(e,dce()?Reflect.construct(t,n||[],m3(e).constructor):t.apply(e,n))}function pIe(e,t){if(t&&(m0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mIe(e)}function mIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dce(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dce=function(){return!!e})()}function m3(e){return m3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},m3(e)}function gIe(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&&Wj(e,t)}function Wj(e,t){return Wj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Wj(e,t)}function SP(e,t,n){return t=fce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fce(e){var t=yIe(e,"string");return m0(t)=="symbol"?t:t+""}function yIe(e,t){if(m0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(m0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function vIe(e){return e.dataKey}function bIe(e,t){return K.isValidElement(e)?K.cloneElement(e,t):typeof e=="function"?K.createElement(e,t):K.createElement(GDe,t)}var _a=function(e){function t(){return uIe(this,t),hIe(this,t,arguments)}return gIe(t,e),fIe(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,s=i.allowEscapeViewBox,a=i.animationDuration,l=i.animationEasing,c=i.content,d=i.coordinate,f=i.filterNull,p=i.isAnimationActive,m=i.offset,y=i.payload,v=i.payloadUniqBy,b=i.position,C=i.reverseDirection,S=i.useTranslate3d,E=i.viewBox,A=i.wrapperStyle,_=y??[];f&&_.length&&(_=nce(y.filter(function(j){return j.value!=null&&(j.hide!==!0||r.props.includeHidden)}),v,vIe));var N=_.length>0;return K.createElement(lIe,{allowEscapeViewBox:s,animationDuration:a,animationEasing:l,isAnimationActive:p,active:o,coordinate:d,hasPayload:N,offset:m,position:b,reverseDirection:C,useTranslate3d:S,viewBox:E,wrapperStyle:A},bIe(c,WW(WW({},this.props),{},{payload:_})))}}])}(x.PureComponent);SP(_a,"displayName","Tooltip");SP(_a,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ym.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var G9,GW;function xIe(){if(GW)return G9;GW=1;var e=tl(),t=function(){return e.Date.now()};return G9=t,G9}var K9,KW;function wIe(){if(KW)return K9;KW=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return K9=t,K9}var Y9,YW;function CIe(){if(YW)return Y9;YW=1;var e=wIe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Y9=n,Y9}var X9,XW;function hce(){if(XW)return X9;XW=1;var e=CIe(),t=Cd(),n=hm(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(c){if(typeof c=="number")return c;if(n(c))return r;if(t(c)){var d=typeof c.valueOf=="function"?c.valueOf():c;c=t(d)?d+"":d}if(typeof c!="string")return c===0?c:+c;c=e(c);var f=o.test(c);return f||s.test(c)?a(c.slice(2),f?2:8):i.test(c)?r:+c}return X9=l,X9}var Z9,ZW;function SIe(){if(ZW)return Z9;ZW=1;var e=Cd(),t=xIe(),n=hce(),r="Expected a function",i=Math.max,o=Math.min;function s(a,l,c){var d,f,p,m,y,v,b=0,C=!1,S=!1,E=!0;if(typeof a!="function")throw new TypeError(r);l=n(l)||0,e(c)&&(C=!!c.leading,S="maxWait"in c,p=S?i(n(c.maxWait)||0,l):p,E="trailing"in c?!!c.trailing:E);function A(F){var $=d,H=f;return d=f=void 0,b=F,m=a.apply(H,$),m}function _(F){return b=F,y=setTimeout(T,l),C?A(F):m}function N(F){var $=F-v,H=F-b,L=l-$;return S?o(L,p-H):L}function j(F){var $=F-v,H=F-b;return v===void 0||$>=l||$<0||S&&H>=p}function T(){var F=t();if(j(F))return O(F);y=setTimeout(T,N(F))}function O(F){return y=void 0,E&&d?A(F):(d=f=void 0,m)}function D(){y!==void 0&&clearTimeout(y),b=0,d=v=f=y=void 0}function R(){return y===void 0?m:O(t())}function I(){var F=t(),$=j(F);if(d=arguments,f=this,v=F,$){if(y===void 0)return _(v);if(S)return clearTimeout(y),y=setTimeout(T,l),A(v)}return y===void 0&&(y=setTimeout(T,l)),m}return I.cancel=D,I.flush=R,I}return Z9=s,Z9}var Q9,QW;function EIe(){if(QW)return Q9;QW=1;var e=SIe(),t=Cd(),n="Expected a function";function r(i,o,s){var a=!0,l=!0;if(typeof i!="function")throw new TypeError(n);return t(s)&&(a="leading"in s?!!s.leading:a,l="trailing"in s?!!s.trailing:l),e(i,o,{leading:a,maxWait:o,trailing:l})}return Q9=r,Q9}var kIe=EIe();const pce=Ht(kIe);function uy(e){"@babel/helpers - typeof";return uy=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},uy(e)}function JW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function u2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JW(Object(n),!0).forEach(function(r){_Ie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JW(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Ie(e,t,n){return t=AIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AIe(e){var t=NIe(e,"string");return uy(t)=="symbol"?t:t+""}function NIe(e,t){if(uy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jIe(e,t){return RIe(e)||OIe(e,t)||MIe(e,t)||TIe()}function TIe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 130In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MIe(e,t){if(e){if(typeof e=="string")return eG(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 eG(e,t)}}function eG(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 OIe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function RIe(e){if(Array.isArray(e))return e}var PIe=x.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,s=o===void 0?"100%":o,a=e.height,l=a===void 0?"100%":a,c=e.minWidth,d=c===void 0?0:c,f=e.minHeight,p=e.maxHeight,m=e.children,y=e.debounce,v=y===void 0?0:y,b=e.id,C=e.className,S=e.onResize,E=e.style,A=E===void 0?{}:E,_=x.useRef(null),N=x.useRef();N.current=S,x.useImperativeHandle(t,function(){return Object.defineProperty(_.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),_.current},configurable:!0})});var j=x.useState({containerWidth:i.width,containerHeight:i.height}),T=jIe(j,2),O=T[0],D=T[1],R=x.useCallback(function(F,$){D(function(H){var L=Math.round(F),B=Math.round($);return H.containerWidth===L&&H.containerHeight===B?H:{containerWidth:L,containerHeight:B}})},[]);x.useEffect(function(){var F=function(V){var U,W=V[0].contentRect,G=W.width,Y=W.height;R(G,Y),(U=N.current)===null||U===void 0||U.call(N,G,Y)};v>0&&(F=pce(F,v,{trailing:!0,leading:!1}));var $=new ResizeObserver(F),H=_.current.getBoundingClientRect(),L=H.width,B=H.height;return R(L,B),$.observe(_.current),function(){$.disconnect()}},[R,v]);var I=x.useMemo(function(){var F=O.containerWidth,$=O.containerHeight;if(F<0||$<0)return null;rc(vf(s)||vf(l),`The width(%s) and height(%s) are both fixed numbers, 131 maybe you don't need to use a ResponsiveContainer.`,s,l),rc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var H=vf(s)?F:s,L=vf(l)?$:l;n&&n>0&&(H?L=H/n:L&&(H=L*n),p&&L>p&&(L=p)),rc(H>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0, 132 please check the style of container, or the props width(%s) and height(%s), 133 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 134 height and width.`,H,L,s,l,d,f,n);var B=!Array.isArray(m)&&nc(m.type).endsWith("Chart");return K.Children.map(m,function(z){return K.isValidElement(z)?x.cloneElement(z,u2({width:H,height:L},B?{style:u2({height:"100%",width:"100%",maxHeight:L,maxWidth:H},z.props.style)}:{})):z})},[n,m,l,p,f,d,O,s]);return K.createElement("div",{id:b?"".concat(b):void 0,className:Mt("recharts-responsive-container",C),style:u2(u2({},A),{},{width:s,height:l,minWidth:d,minHeight:f,maxHeight:p}),ref:_},I)}),mce=function(t){return null};mce.displayName="Cell";function dy(e){"@babel/helpers - typeof";return dy=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},dy(e)}function tG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tG(Object(n),!0).forEach(function(r){DIe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tG(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DIe(e,t,n){return t=IIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IIe(e){var t=LIe(e,"string");return dy(t)=="symbol"?t:t+""}function LIe(e,t){if(dy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(dy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pp={widthCache:{},cacheCount:0},$Ie=2e3,zIe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},nG="recharts_measurement_span";function FIe(e){var t=Gj({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var C1=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ym.isSsr)return{width:0,height:0};var r=FIe(n),i=JSON.stringify({text:t,copyStyle:r});if(pp.widthCache[i])return pp.widthCache[i];try{var o=document.getElementById(nG);o||(o=document.createElement("span"),o.setAttribute("id",nG),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var s=Gj(Gj({},zIe),r);Object.assign(o.style,s),o.textContent="".concat(t);var a=o.getBoundingClientRect(),l={width:a.width,height:a.height};return pp.widthCache[i]=l,++pp.cacheCount>$Ie&&(pp.cacheCount=0,pp.widthCache={}),l}catch{return{width:0,height:0}}},BIe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function fy(e){"@babel/helpers - typeof";return fy=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},fy(e)}function g3(e,t){return qIe(e)||UIe(e,t)||VIe(e,t)||HIe()}function HIe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 135In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VIe(e,t){if(e){if(typeof e=="string")return rG(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 rG(e,t)}}function rG(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 UIe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function qIe(e){if(Array.isArray(e))return e}function WIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iG(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,KIe(r.key),r)}}function GIe(e,t,n){return t&&iG(e.prototype,t),n&&iG(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function KIe(e){var t=YIe(e,"string");return fy(t)=="symbol"?t:t+""}function YIe(e,t){if(fy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oG=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sG=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,XIe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ZIe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,gce={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},QIe=Object.keys(gce),Rp="NaN";function JIe(e,t){return e*gce[t]}var d2=function(){function e(t,n){WIe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!XIe.test(n)&&(this.num=NaN,this.unit=""),QIe.includes(n)&&(this.num=JIe(t,n),this.unit="px")}return GIe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=ZIe.exec(n))!==null&&r!==void 0?r:[],o=g3(i,3),s=o[1],a=o[2];return new e(parseFloat(s),a??"")}}])}();function yce(e){if(e.includes(Rp))return Rp;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=oG.exec(t))!==null&&n!==void 0?n:[],i=g3(r,4),o=i[1],s=i[2],a=i[3],l=d2.parse(o??""),c=d2.parse(a??""),d=s==="*"?l.multiply(c):l.divide(c);if(d.isNaN())return Rp;t=t.replace(oG,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,p=(f=sG.exec(t))!==null&&f!==void 0?f:[],m=g3(p,4),y=m[1],v=m[2],b=m[3],C=d2.parse(y??""),S=d2.parse(b??""),E=v==="+"?C.add(S):C.subtract(S);if(E.isNaN())return Rp;t=t.replace(sG,E.toString())}return t}var aG=/\(([^()]*)\)/;function eLe(e){for(var t=e;t.includes("(");){var n=aG.exec(t),r=g3(n,2),i=r[1];t=t.replace(aG,yce(i))}return t}function tLe(e){var t=e.replace(/\s+/g,"");return t=eLe(t),t=yce(t),t}function nLe(e){try{return tLe(e)}catch{return Rp}}function J9(e){var t=nLe(e.slice(5,-1));return t===Rp?"":t}var rLe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],iLe=["dx","dy","angle","className","breakAll"];function Kj(){return Kj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kj.apply(this,arguments)}function lG(e,t){if(e==null)return{};var n=oLe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cG(e,t){return cLe(e)||lLe(e,t)||aLe(e,t)||sLe()}function sLe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 136In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aLe(e,t){if(e){if(typeof e=="string")return uG(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 uG(e,t)}}function uG(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 lLe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function cLe(e){if(Array.isArray(e))return e}var vce=/[ \f\n\r\t\v\u2028\u2029]+/,bce=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Lt(n)||(r?o=n.toString().split(""):o=n.toString().split(vce));var s=o.map(function(l){return{word:l,width:C1(l,i).width}}),a=r?0:C1(" ",i).width;return{wordsWithComputedWidth:s,spaceWidth:a}}catch{return null}},uLe=function(t,n,r,i,o){var s=t.maxLines,a=t.children,l=t.style,c=t.breakAll,d=Me(s),f=a,p=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return H.reduce(function(L,B){var z=B.word,V=B.width,U=L[L.length-1];if(U&&(i==null||o||U.width+V+r<Number(i)))U.words.push(z),U.width+=V+r;else{var W={words:[z],width:V};L.push(W)}return L},[])},m=p(n),y=function(H){return H.reduce(function(L,B){return L.width>B.width?L:B})};if(!d)return m;for(var v="â¦",b=function(H){var L=f.slice(0,H),B=bce({breakAll:c,style:l,children:L+v}).wordsWithComputedWidth,z=p(B),V=z.length>s||y(z).width>Number(i);return[V,z]}
136,C=0,S=f.length-1,E=0,A;C<=S&&E<=f.length-1;){var _=Math.floor((C+S)/2),N=_-1,j=b(N),T=cG(j,2),O=T[0],D=T[1],R=b(_),I=cG(R,1),F=I[0];if(!O&&!F&&(C=_+1),O&&F&&(S=_-1),!O&&F){A=D;break}E++}return A||m},dG=function(t){var n=Lt(t)?[]:t.toString().split(vce);return[{words:n}]},dLe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,s=t.breakAll,a=t.maxLines;if((n||r)&&!ym.isSsr){var l,c,d=bce({breakAll:s,children:i,style:o});if(d){var f=d.wordsWithComputedWidth,p=d.spaceWidth;l=f,c=p}else return dG(i);return uLe({breakAll:s,children:i,maxLines:a,style:o},l,c,n,r)}return dG(i)},fG="#808080",y3=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,s=t.lineHeight,a=s===void 0?"1em":s,l=t.capHeight,c=l===void 0?"0.71em":l,d=t.scaleToFit,f=d===void 0?!1:d,p=t.textAnchor,m=p===void 0?"start":p,y=t.verticalAnchor,v=y===void 0?"end":y,b=t.fill,C=b===void 0?fG:b,S=lG(t,rLe),E=x.useMemo(function(){return dLe({breakAll:S.breakAll,children:S.children,maxLines:S.maxLines,scaleToFit:f,style:S.style,width:S.width})},[S.breakAll,S.children,S.maxLines,f,S.style,S.width]),A=S.dx,_=S.dy,N=S.angle,j=S.className,T=S.breakAll,O=lG(S,iLe);if(!Nr(r)||!Nr(o))return null;var D=r+(Me(A)?A:0),R=o+(Me(_)?_:0),I;switch(v){case"start":I=J9("calc(".concat(c,")"));break;case"middle":I=J9("calc(".concat((E.length-1)/2," * -").concat(a," + (").concat(c," / 2))"));break;default:I=J9("calc(".concat(E.length-1," * -").concat(a,")"));break}var F=[];if(f){var $=E[0].width,H=S.width;F.push("scale(".concat((Me(H)?H/$:1)/$,")"))}return N&&F.push("rotate(".concat(N,", ").concat(D,", ").concat(R,")")),F.length&&(O.transform=F.join(" ")),K.createElement("text",Kj({},At(O,!0),{x:D,y:R,className:Mt("recharts-text",j),textAnchor:m,fill:C.includes("url")?fG:C}),E.map(function(L,B){var z=L.words.join(T?"":" ");return K.createElement("tspan",{x:D,dy:B===0?I:a,key:"".concat(z,"-").concat(B)},z)}))};function Wu(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function fLe(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function EP(e){let t,n,r;e.length!==2?(t=Wu,n=(a,l)=>Wu(e(a),l),r=(a,l)=>e(a)-l):(t=e===Wu||e===fLe?e:hLe,n=e,r=e);function i(a,l,c=0,d=a.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(a[f],l)<0?c=f+1:d=f}while(c<d)}return c}function o(a,l,c=0,d=a.length){if(c<d){if(t(l,l)!==0)return d;do{const f=c+d>>>1;n(a[f],l)<=0?c=f+1:d=f}while(c<d)}return c}function s(a,l,c=0,d=a.length){const f=i(a,l,c,d-1);return f>c&&r(a[f-1],l)>-r(a[f],l)?f-1:f}return{left:i,center:s,right:o}}function hLe(){return 0}function xce(e){return e===null?NaN:+e}function*pLe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const mLe=EP(Wu),Xv=mLe.right;EP(xce).center;class hG extends Map{constructor(t,n=vLe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(pG(this,t))}has(t){return super.has(pG(this,t))}set(t,n){return super.set(gLe(this,t),n)}delete(t){return super.delete(yLe(this,t))}}function pG({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function gLe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function yLe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function vLe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function bLe(e=Wu){if(e===Wu)return wce;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function wce(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const xLe=Math.sqrt(50),wLe=Math.sqrt(10),CLe=Math.sqrt(2);function v3(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=xLe?10:o>=wLe?5:o>=CLe?2:1;let a,l,c;return i<0?(c=Math.pow(10,-i)/s,a=Math.round(e*c),l=Math.round(t*c),a/c<e&&++a,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*s,a=Math.round(e/c),l=Math.round(t/c),a*c<e&&++a,l*c>t&&--l),l<a&&.5<=n&&n<2?v3(e,t,n*2):[a,l,c]}function Yj(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,s]=r?v3(t,e,n):v3(e,t,n);if(!(o>=i))return[];const a=o-i+1,l=new Array(a);if(r)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(i+c)/-s;else for(let c=0;c<a;++c)l[c]=(i+c)*s;return l}function Xj(e,t,n){return t=+t,e=+e,n=+n,v3(e,t,n)[2]}function Zj(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?Xj(t,e,n):Xj(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function mG(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function gG(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}
136function Cce(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?wce:bLe(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,d=Math.log(l),f=.5*Math.exp(2*d/3),p=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),m=Math.max(n,Math.floor(t-c*f/l+p)),y=Math.min(r,Math.floor(t+(l-c)*f/l+p));Cce(e,t,m,y,i)}const o=e[t];let s=n,a=r;for(Mg(e,n,t),i(e[r],o)>0&&Mg(e,n,r);s<a;){for(Mg(e,s,a),++s,--a;i(e[s],o)<0;)++s;for(;i(e[a],o)>0;)--a}i(e[n],o)===0?Mg(e,n,a):(++a,Mg(e,a,r)),a<=t&&(n=a+1),t<=a&&(r=a-1)}return e}function Mg(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function SLe(e,t,n){if(e=Float64Array.from(pLe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return gG(e);if(t>=1)return mG(e);var r,i=(r-1)*t,o=Math.floor(i),s=mG(Cce(e,o).subarray(0,o+1)),a=gG(e.subarray(o+1));return s+(a-s)*(i-o)}}function ELe(e,t,n=xce){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),s=+n(e[o],o,e),a=+n(e[o+1],o+1,e);return s+(a-s)*(i-o)}}function kLe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function vs(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function jc(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Qj=Symbol("implicit");function kP(){var e=new hG,t=[],n=[],r=Qj;function i(o){let s=e.get(o);if(s===void 0){if(r!==Qj)return r;e.set(o,s=t.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new hG;for(const s of o)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return kP(t,n).unknown(r)},vs.apply(i,arguments),i}function hy(){var e=kP().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,s,a=!1,l=0,c=0,d=.5;delete e.unknown;function f(){var p=t().length,m=i<r,y=m?i:r,v=m?r:i;o=(v-y)/Math.max(1,p-l+c*2),a&&(o=Math.floor(o)),y+=(v-y-o*(p-l))*d,s=o*(1-l),a&&(y=Math.round(y),s=Math.round(s));var b=kLe(p).map(function(C){return y+o*C});return n(m?b.reverse():b)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,a=!0,f()},e.bandwidth=function(){return s},e.step=function(){return o},e.round=function(p){return arguments.length?(a=!!p,f()):a},e.padding=function(p){return arguments.length?(l=Math.min(1,c=+p),f()):l},e.paddingInner=function(p){return arguments.length?(l=Math.min(1,p),f()):l},e.paddingOuter=function(p){return arguments.length?(c=+p,f()):c},e.align=function(p){return arguments.length?(d=Math.max(0,Math.min(1,p)),f()):d},e.copy=function(){return hy(t(),[r,i]).round(a).paddingInner(l).paddingOuter(c).align(d)},vs.apply(f(),arguments)}function Sce(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Sce(t())},e}function S1(){return Sce(hy.apply(null,arguments).paddingInner(1))}function _P(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ece(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Zv(){}var py=.7,b3=1/py,Gp="\\s*([+-]?\\d+)\\s*",my="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ba="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_Le=/^#([0-9a-f]{3,8})$/,ALe=new RegExp(`^rgb\\(${Gp},${Gp},${Gp}\\)$`),NLe=new RegExp(`^rgb\\(${Ba},${Ba},${Ba}\\)$`),jLe=new RegExp(`^rgba\\(${Gp},${Gp},${Gp},${my}\\)$`),TLe=new RegExp(`^rgba\\(${Ba},${Ba},${Ba},${my}\\)$`),MLe=new RegExp(`^hsl\\(${my},${Ba},${Ba}\\)$`),OLe=new RegExp(`^hsla\\(${my},${Ba},${Ba},${my}\\)$`),yG={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};_P(Zv,Yf,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vG,formatHex:vG,formatHex8:RLe,formatHsl:PLe,formatRgb:bG,toString:bG});function vG(){return this.rgb().formatHex()}function RLe(){return this.rgb().formatHex8()}function PLe(){return kce(this).formatHsl()}function bG(){return this.rgb().formatRgb()}function Yf(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=_Le.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?xG(t):n===3?new eo(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?f2(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?f2(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=ALe.exec(e))?new eo(t[1],t[2],t[3],1):(t=NLe.exec(e))?new eo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jLe.exec(e))?f2(t[1],t[2],t[3],t[4]):(t=TLe.exec(e))?f2(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=MLe.exec(e))?
vendor: 17,585 bytes, line 136
136SG(t[1],t[2]/100,t[3]/100,1):(t=OLe.exec(e))?SG(t[1],t[2]/100,t[3]/100,t[4]):yG.hasOwnProperty(e)?xG(yG[e]):e==="transparent"?new eo(NaN,NaN,NaN,0):null}function xG(e){return new eo(e>>16&255,e>>8&255,e&255,1)}function f2(e,t,n,r){return r<=0&&(e=t=n=NaN),new eo(e,t,n,r)}function DLe(e){return e instanceof Zv||(e=Yf(e)),e?(e=e.rgb(),new eo(e.r,e.g,e.b,e.opacity)):new eo}function Jj(e,t,n,r){return arguments.length===1?DLe(e):new eo(e,t,n,r??1)}function eo(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}_P(eo,Jj,Ece(Zv,{brighter(e){return e=e==null?b3:Math.pow(b3,e),new eo(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?py:Math.pow(py,e),new eo(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new eo(Mf(this.r),Mf(this.g),Mf(this.b),x3(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:wG,formatHex:wG,formatHex8:ILe,formatRgb:CG,toString:CG}));function wG(){return`#${bf(this.r)}${bf(this.g)}${bf(this.b)}`}function ILe(){return`#${bf(this.r)}${bf(this.g)}${bf(this.b)}${bf((isNaN(this.opacity)?1:this.opacity)*255)}`}function CG(){const e=x3(this.opacity);return`${e===1?"rgb(":"rgba("}${Mf(this.r)}, ${Mf(this.g)}, ${Mf(this.b)}${e===1?")":`, ${e})`}`}function x3(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Mf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function bf(e){return e=Mf(e),(e<16?"0":"")+e.toString(16)}function SG(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Is(e,t,n,r)}function kce(e){if(e instanceof Is)return new Is(e.h,e.s,e.l,e.opacity);if(e instanceof Zv||(e=Yf(e)),!e)return new Is;if(e instanceof Is)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),s=NaN,a=o-i,l=(o+i)/2;return a?(t===o?s=(n-r)/a+(n<r)*6:n===o?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?o+i:2-o-i,s*=60):a=l>0&&l<1?0:s,new Is(s,a,l,e.opacity)}function LLe(e,t,n,r){return arguments.length===1?kce(e):new Is(e,t,n,r??1)}function Is(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}_P(Is,LLe,Ece(Zv,{brighter(e){return e=e==null?b3:Math.pow(b3,e),new Is(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?py:Math.pow(py,e),new Is(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new eo(e_(e>=240?e-240:e+120,i,r),e_(e,i,r),e_(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Is(EG(this.h),h2(this.s),h2(this.l),x3(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=x3(this.opacity);return`${e===1?"hsl(":"hsla("}${EG(this.h)}, ${h2(this.s)*100}%, ${h2(this.l)*100}%${e===1?")":`, ${e})`}`}}));function EG(e){return e=(e||0)%360,e<0?e+360:e}function h2(e){return Math.max(0,Math.min(1,e||0))}function e_(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 AP=e=>()=>e;function $Le(e,t){return function(n){return e+n*t}}function zLe(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 FLe(e){return(e=+e)==1?_ce:function(t,n){return n-t?zLe(t,n,e):AP(isNaN(t)?n:t)}}function _ce(e,t){var n=t-e;return n?$Le(e,n):AP(isNaN(e)?t:e)}const w3=function e(t){var n=FLe(t);function r(i,o){var s=n((i=Jj(i)).r,(o=Jj(o)).r),a=n(i.g,o.g),l=n(i.b,o.b),c=_ce(i.opacity,o.opacity);return function(d){return i.r=s(d),i.g=a(d),i.b=l(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function BLe(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function HLe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function VLe(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=ic(e[s],t[s]);for(;s<n;++s)o[s]=t[s];return function(a){for(s=0;s<r;++s)o[s]=i[s](a);return o}}function ULe(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ps(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function qLe(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ic(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var eT=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,t_=new RegExp(eT.source,"g");function WLe(e){return function(){return e}}function GLe(e){return function(t){return e(t)+""}}function Ace(e,t){var n=eT.lastIndex=t_.lastIndex=0,r,i,o,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=eT.exec(e))&&(i=t_.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(r=r[0])===(i=i[0])?a[s]?a[s]+=i:a[++s]=i:(a[++s]=null,l.push({i:s,x:Ps(r,i)})),n=t_.lastIndex;return n<t.length&&(o=t.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?GLe(l[0].x):WLe(t):(t=l.length,function(c){for(var d=0,f;d<t;++d)a[(f=l[d]).i]=f.x(c);return a.join("")})}function ic(e,t){var n=typeof t,r;return t==null||n==="boolean"?AP(t):(n==="number"?Ps:n==="string"?(r=Yf(t))?(t=r,w3):Ace:t instanceof Yf?w3:t instanceof Date?ULe:HLe(t)?BLe:Array.isArray(t)?VLe:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?qLe:Ps)(e,t)}function NP(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var kG=180/Math.PI,tT={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Nce(e,t,n,r,i,o){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*kG,skewX:Math.atan(l)*kG,scaleX:s,scaleY:a}}var p2;function KLe(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?tT:Nce(t.a,t.b,t.c,t.d,t.e,t.f)}function YLe(e){return e==null||(p2||(p2=document.createElementNS("http://www.w3.org/2000/svg","g")),p2.setAttribute("transform",e),!(e=p2.transform.baseVal.consolidate()))?tT:(e=e.matrix,Nce(e.a,e.b,e.c,e.d,e.e,e.f))}function jce(e,t,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,d,f,p,m,y){if(c!==f||d!==p){var v=m.push("translate(",null,t,null,n);y.push({i:v-4,x:Ps(c,f)},{i:v-2,x:Ps(d,p)})}else(f||p)&&m.push("translate("+f+t+p+n)}function s(c,d,f,p){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),p.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Ps(c,d)})):d&&f.push(i(f)+"rotate("+d+r)}function a(c,d,f,p){c!==d?p.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Ps(c,d)}):d&&f.push(i(f)+"skewX("+d+r)}function l(c,d,f,p,m,y){if(c!==f||d!==p){var v=m.push(i(m)+"scale(",null,",",null,")");y.push({i:v-4,x:Ps(c,f)},{i:v-2,x:Ps(d,p)})}else(f!==1||p!==1)&&m.push(i(m)+"scale("+f+","+p+")")}return function(c,d){var f=[],p=[];return c=e(c),d=e(d),o(c.translateX,c.translateY,d.translateX,d.translateY,f,p),s(c.rotate,d.rotate,f,p),a(c.skewX,d.skewX,f,p),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,f,p),c=d=null,function(m){for(var y=-1,v=p.length,b;++y<v;)f[(b=p[y]).i]=b.x(m);return f.join("")}}}var XLe=jce(KLe,"px, ","px)","deg)"),ZLe=jce(YLe,", ",")",")"),QLe=1e-12;function _G(e){return((e=Math.exp(e))+1/e)/2}function JLe(e){return((e=Math.exp(e))-1/e)/2}function e$e(e){return((e=Math.exp(2*e))-1)/(e+1)}const lw=function e(t,n,r){function i(o,s){var a=o[0],l=o[1],c=o[2],d=s[0],f=s[1],p=s[2],m=d-a,y=f-l,v=m*m+y*y,b,C;if(v<QLe)C=Math.log(p/c)/t,b=function(j){return[a+j*m,l+j*y,c*Math.exp(t*j*C)]};else{var S=Math.sqrt(v),E=(p*p-c*c+r*v)/(2*c*n*S),A=(p*p-c*c-r*v)/(2*p*n*S),_=Math.log(Math.sqrt(E*E+1)-E),N=Math.log(Math.sqrt(A*A+1)-A);C=(N-_)/t,b=function(j){var T=j*C,O=_G(_),D=c/(n*S)*(O*e$e(t*T+_)-JLe(_));return[a+D*m,l+D*y,c*O/_G(t*T+_)]}}return b.duration=C*1e3*t/Math.SQRT2,b}return i.rho=function(o){var s=Math.max(.001,+o),a=s*s,l=a*a;return e(s,a,l)},i}(Math.SQRT2,2,4);function t$e(e,t){t===void 0&&(t=e,e=ic);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(s){var a=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return o[a](s-a)}}function n$e(e){return function(){return e}}function C3(e){return+e}var AG=[0,1];function Oi(e){return e}function nT(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:n$e(isNaN(t)?NaN:.5)}function r$e(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function i$e(e,t,n){var r=e[0],i=e[1],o=t[0],s=t[1];return i<r?(r=nT(i,r),o=n(s,o)):(r=nT(r,i),o=n(o,s)),function(a){return o(r(a))}}function o$e(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=nT(e[s],e[s+1]),o[s]=n(t[s],t[s+1]);return function(a){var l=Xv(e,a,1,r)-1;return o[l](i[l](a))}}function Qv(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function CC(){var e=AG,t=AG,n=ic,r,i,o,s=Oi,a,l,c;function d(){var p=Math.min(e.length,t.length);return s!==Oi&&(s=r$e(e[0],e[p-1])),a=p>2?o$e:i$e,l=c=null,f}function f(p){return p==null||isNaN(p=+p)?o:(l||(l=a(e.map(r),t,n)))(r(s(p)))}return f.invert=function(p){return s(i((c||(c=a(t,e.map(r),Ps)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,C3),d()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),d()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=NP,d()},f.clamp=function(p){return arguments.length?(s=p?!0:Oi,d()):s!==Oi},f.interpolate=function(p){return arguments.length?(n=p,d()):n},f.unknown=function(p){return arguments.length?(o=p,f):o},function(p,m){return r=p,i=m,d()}}function jP(){return CC()(Oi,Oi)}function s$e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function S3(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function g0(e){return e=S3(Math.abs(e)),e?e[1]:NaN}function a$e(e,t){return function(n,r){for(var i=n.length,o=[],s=0,a=e[0],l=0;i>0&&a>0&&(l+a+1>r&&(a=Math.max(1,r-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(t)}}function l$e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var c$e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gy(e){if(!(t=c$e.exec(e)))throw new Error("invalid format: "+e);var t;return new TP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}gy.prototype=TP.prototype;function TP(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}TP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u$e(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Tce;function d$e(e,t){var n=S3(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(Tce=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+S3(e,Math.max(0,t+o-1))[0]}function NG(e,t){var n=S3(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const jG={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:s$e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>NG(e*100,t),r:NG,s:d$e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function TG(e){return e}var MG=Array.prototype.map,OG=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function f$e(e){var t=e.grouping===void 0||e.thousands===void 0?TG:a$e(MG.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?TG:l$e(MG.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",a=e.minus===void 0?"â":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=gy(f);var p=f.fill,m=f.align,y=f.sign,v=f.symbol,b=f.zero,C=f.width,S=f.comma,E=f.precision,A=f.trim,_=f.type;_==="n"?(S=!0,_="g"):jG[_]||(E===void 0&&(E=12),A=!0,_="g"),(b||p==="0"&&m==="=")&&(b=!0,p="0",m="=");var N=v==="$"?n:v==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",j=v==="$"?r:/[%p]/.test(_)?s:"",T=jG[_],O=/[defgprs%]/.test(_);E=E===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function D(R){var I=N,F=j,$,H,L;if(_==="c")F=T(R)+F,R="";else{R=+R;var B=R<0||1/R<0;if(R=isNaN(R)?l:T(Math.abs(R),E),A&&(R=u$e(R)),B&&+R==0&&y!=="+"&&(B=!1),I=(B?y==="("?y:a:y==="-"||y==="("?"":y)+I,F=(_==="s"?OG[8+Tce/3]:"")+F+(B&&y==="("?")":""),O){for($=-1,H=R.length;++$<H;)if(L=R.charCodeAt($),48>L||L>57){F=(L===46?i+R.slice($+1):R.slice($))+F,R=R.slice(0,$);break}}}S&&!b&&(R=t(R,1/0));var z=I.length+R.length+F.length,V=z<C?new Array(C-z+1).join(p):"";switch(S&&b&&(R=t(V+R,V.length?C-F.length:1/0),V=""),m){case"<":R=I+R+F+V;break;case"=":R=I+V+R+F;break;case"^":R=V.slice(0,z=V.length>>1)+I+R+F+V.slice(z);break;default:R=V+I+R+F;break}return o(R)}return D.toString=function(){return f+""},D}function d(f,p){var m=c((f=gy(f),f.type="f",f)),y=Math.max(-8,Math.min(8,Math.floor(g0(p)/3)))*3,v=Math.pow(10,-y),b=OG[8+y/3];return function(C){return m(v*C)+b}}return{format:c,formatPrefix:d}}var m2,MP,Mce;h$e({thousands:",",grouping:[3],currency:["$",""]});function h$e(e){return m2=f$e(e),MP=m2.format,Mce=m2.formatPrefix,m2}function p$e(e){return Math.max(0,-g0(Math.abs(e)))}function m$e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(g0(t)/3)))*3-g0(Math.abs(e)))}function g$e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,g0(t)-g0(e))+1}function Oce(e,t,n,r){var i=Zj(e,t,n),o;switch(r=gy(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=m$e(i,s))&&(r.precision=o),Mce(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=g$e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=p$e(i))&&(r.precision=o-(r.type==="%")*2);break}}return MP(r)}function Ed(e){var t=e.domain;return e.ticks=function(n){var r=t();return Yj(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return Oce(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,s=r[i],a=r[o],l,c,d=10;for(a<s&&(c=s,s=a,a=c,c=i,i=o,o=c);d-- >0;){if(c=Xj(s,a,n),c===l)return r[i]=s,r[o]=a,t(r);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return e},e}function E3(){var e=jP();return e.copy=function(){return Qv(e,E3())},vs.apply(e,arguments),Ed(e)}function Rce(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,C3),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return Rce(e).unknown(t)},e=arguments.length?Array.from(e,C3):[0,1],Ed(n)}function Pce(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),e[n]=t.floor(i),e[r]=t.ceil(o),e}function RG(e){return Math.log(e)}function PG(e){return Math.exp(e)}function y$e(e){return-Math.log(-e)}function v$e(e){return-Math.exp(-e)}function b$e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function x$e(e){return e===10?b$e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function w$e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function DG(e){return(t,n)=>-e(-t,n)}function OP(e){const t=e(RG,PG),n=t.domain;let r=10,i,o;function s(){return i=w$e(r),o=x$e(r),n()[0]<0?(i=DG(i),o=DG(o),e(y$e,v$e)):e(RG,PG),t}return t.base=function(a){return arguments.length?(r=+a,s()):r},t.domain=function(a){return arguments.length?(n(a),s()):n()},t.ticks=a=>{const l=n();let c=l[0],d=l[l.length-1];const f=d<c;f&&([c,d]=[d,c]);let p=i(c),m=i(d),y,v;const b=a==null?10:+a;let C=[];if(!(r%1)&&m-p<b){if(p=Math.floor(p),m=Math.ceil(m),c>0){for(;p<=m;++p)for(y=1;y<r;++y)if(v=p<0?y/o(-p):y*o(p),!(v<c)){if(v>d)break;C.push(v)}}else for(;p<=m;++p)for(y=r-1;y>=1;--y)if(v=p>0?y/o(-p):y*o(p),!(v<c)){if(v>d)break;C.push(v)}C.length*2<b&&(C=Yj(c,d,b))}else C=Yj(p,m,Math.min(m-p,b)).map(o);return f?C.reverse():C},t.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=gy(l)).precision==null&&(l.trim=!0),l=MP(l)),a===1/0)return l;const c=Math.max(1,r*a/t.ticks().length);return d=>{let f=d/o(Math.round(i(d)));return f*r<r-.5&&(f*=r),f<=c?l(d):""}},t.nice=()=>n(Pce(n(),{floor:a=>o(Math.floor(i(a))),ceil:a=>o(Math.ceil(i(a)))})),t}function Dce(){const e=OP(CC()).domain([1,10]);return e.copy=()=>Qv(e,Dce()).base(e.base()),vs.apply(e,arguments),e}
136function IG(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function LG(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function RP(e){var t=1,n=e(IG(t),LG(t));return n.constant=function(r){return arguments.length?e(IG(t=+r),LG(t)):t},Ed(n)}function Ice(){var e=RP(CC());return e.copy=function(){return Qv(e,Ice()).constant(e.constant())},vs.apply(e,arguments)}function $G(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function C$e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function S$e(e){return e<0?-e*e:e*e}function PP(e){var t=e(Oi,Oi),n=1;function r(){return n===1?e(Oi,Oi):n===.5?e(C$e,S$e):e($G(n),$G(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ed(t)}function DP(){var e=PP(CC());return e.copy=function(){return Qv(e,DP()).exponent(e.exponent())},vs.apply(e,arguments),e}function E$e(){return DP.apply(null,arguments).exponent(.5)}function zG(e){return Math.sign(e)*e*e}function k$e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Lce(){var e=jP(),t=[0,1],n=!1,r;function i(o){var s=k$e(e(o));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(o){return e.invert(zG(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,C3)).map(zG)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Lce(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},vs.apply(i,arguments),Ed(i)}function $ce(){var e=[],t=[],n=[],r;function i(){var s=0,a=Math.max(1,t.length);for(n=new Array(a-1);++s<a;)n[s-1]=ELe(e,s/a);return o}function o(s){return s==null||isNaN(s=+s)?r:t[Xv(n,s)]}return o.invertExtent=function(s){var a=t.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:e[0],a<n.length?n[a]:e[e.length-1]]},o.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let a of s)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(Wu),i()},o.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},o.unknown=function(s){return arguments.length?(r=s,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return $ce().domain(e).range(t).unknown(r)},vs.apply(o,arguments)}function zce(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function s(l){return l!=null&&l<=l?i[Xv(r,l,0,n)]:o}function a(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,a()):[e,t]},s.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,a()):i.slice()},s.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return zce().domain([e,t]).range(i).unknown(o)},vs.apply(Ed(s),arguments)}function Fce(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Xv(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var s=t.indexOf(o);return[e[s-1],e[s]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return Fce().domain(e).range(t).unknown(n)},vs.apply(i,arguments)}const n_=new Date,r_=new Date;function Mr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const s=i(o),a=i.ceil(o);return o-s<a-o?s:a},i.offset=(o,s)=>(t(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,a)=>{const l=[];if(o=i.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),t(o,a),e(o);while(c<o&&o<s);return l},i.filter=o=>Mr(s=>{if(s>=s)for(;e(s),!o(s);)s.setTime(s-1)},(s,a)=>
vendor: 6,699 bytes, line 136
136{if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););}),n&&(i.count=(o,s)=>(n_.setTime(+o),r_.setTime(+s),e(n_),e(r_),Math.floor(n(n_,r_))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const k3=Mr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);k3.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Mr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):k3);k3.range;const Gl=1e3,rs=Gl*60,Kl=rs*60,yc=Kl*24,IP=yc*7,FG=yc*30,i_=yc*365,xf=Mr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Gl)},(e,t)=>(t-e)/Gl,e=>e.getUTCSeconds());xf.range;const LP=Mr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gl)},(e,t)=>{e.setTime(+e+t*rs)},(e,t)=>(t-e)/rs,e=>e.getMinutes());LP.range;const $P=Mr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*rs)},(e,t)=>(t-e)/rs,e=>e.getUTCMinutes());$P.range;const zP=Mr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Gl-e.getMinutes()*rs)},(e,t)=>{e.setTime(+e+t*Kl)},(e,t)=>(t-e)/Kl,e=>e.getHours());zP.range;const FP=Mr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Kl)},(e,t)=>(t-e)/Kl,e=>e.getUTCHours());FP.range;const Jv=Mr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*rs)/yc,e=>e.getDate()-1);Jv.range;const SC=Mr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yc,e=>e.getUTCDate()-1);SC.range;const Bce=Mr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/yc,e=>Math.floor(e/yc));Bce.range;function yh(e){return Mr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*rs)/IP)}const EC=yh(0),_3=yh(1),_$e=yh(2),A$e=yh(3),y0=yh(4),N$e=yh(5),j$e=yh(6);EC.range;_3.range;_$e.range;A$e.range;y0.range;N$e.range;j$e.range;function vh(e){return Mr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/IP)}const kC=vh(0),A3=vh(1),T$e=vh(2),M$e=vh(3),v0=vh(4),O$e=vh(5),R$e=vh(6);kC.range;A3.range;T$e.range;M$e.range;v0.range;O$e.range;R$e.range;const BP=Mr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());BP.range;const HP=Mr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());HP.range;const vc=Mr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());vc.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});vc.range;const bc=Mr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());bc.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Mr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});bc.range;function Hce(e,t,n,r,i,o){const s=[[xf,1,Gl],[xf,5,5*Gl],[xf,15,15*Gl],[xf,30,30*Gl],[o,1,rs],[o,5,5*rs],[o,15,15*rs],[o,30,30*rs],[i,1,Kl],[i,3,3*Kl],[i,6,6*Kl],[i,12,12*Kl],[r,1,yc],[r,2,2*yc],[n,1,IP],[t,1,FG],[t,3,3*FG],[e,1,i_]];function a(c,d,f){const p=d<c;p&&([c,d]=[d,c]);const m=f&&typeof f.range=="function"?f:l(c,d,f),y=m?m.range(c,+d+1):[];return p?y.reverse():y}function l(c,d,f){const p=Math.abs(d-c)/f,m=EP(([,,b])=>b).right(s,p);if(m===s.length)return e.every(Zj(c/i_,d/i_,f));if(m===0)return k3.every(Math.max(Zj(c,d,f),1));const[y,v]=s[p/s[m-1][2]<s[m][2]/p?m-1:m];return y.every(v)}return[a,l]}const[P$e,D$e]=Hce(bc,HP,kC,Bce,FP,$P),[I$e,L$e]=Hce(vc,BP,EC,Jv,zP,LP);function o_(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function s_(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Og(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function $$e(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,s=e.shortDays,a=e.months,l=e.shortMonths,c=Rg(i),d=Pg(i),f=Rg(o),p=Pg(o),m=Rg(s),y=Pg(s),v=Rg(a),b=Pg(a),C=Rg(l),S=Pg(l),E={a:B,A:z,b:V,B:U,c:null,d:WG,e:WG,f:aze,g:yze,G:bze,H:ize,I:oze,j:sze,L:Vce,m:lze,M:cze,p:W,q:G,Q:YG,s:XG,S:uze,u:dze,U:fze,V:hze,w:pze,W:mze,x:null,X:null,y:gze,Y:vze,Z:xze,"%":KG},A={a:Y,A:X,b:Q,B:ne,c:null,d:GG,e:GG,f:Eze,g:Pze,G:Ize,H:wze,I:Cze,j:Sze,L:qce,m:kze,M:_ze,p:ie,q:se,Q:YG,s:XG,S:Aze,u:Nze,U:jze,V:Tze,w:Mze,W:Oze,x:null,X:null,y:Rze,Y:Dze,Z:Lze,"%":KG},_={a:D,A:R,b:I,B:F,c:$,d:UG,e:UG,f:eze,g:VG,G:HG,H:qG,I:qG,j:X$e,L:J$e,m:Y$e,M:Z$e,p:O,q:K$e,Q:nze,s:rze,S:Q$e,u:V$e,U:U$e,V:q$e,w:H$e,W:W$e,x:H,X:L,y:VG,Y:HG,Z:G$e,"%":tze};E.x=N(n,E),E.X=N(r,E),E.c=N(t,E),A.x=N(n,A),A.X=N(r,A),A.c=N(t,A);function N(oe,J){return function(ae){var re=[],pe=-1,be=0,xe=oe.length,ke,Pe,it;for(ae instanceof Date||(ae=new Date(+ae));++pe<xe;)oe.charCodeAt(pe)===37&&(re.push(oe.slice(be,pe)),(Pe=BG[ke=oe.charAt(++pe)])!=null?ke=oe.charAt(++pe):Pe=ke==="e"?" ":"0",(it=J[ke])&&(ke=it(ae,Pe)),re.push(ke),be=pe+1);return re.push(oe.slice(be,pe)),re.join("")}}function j(oe,J){return function(ae){var re=Og(1900,void 0,1),pe=T(re,oe,ae+="",0),be,xe;if(pe!=ae.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(J&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(be=s_(Og(re.y,0,1)),xe=be.getUTCDay(),be=xe>4||xe===0?A3.ceil(be):A3(be),be=SC.offset(be,(re.V-1)*7),re.y=be.getUTCFullYear(),re.m=be.getUTCMonth(),re.d=be.getUTCDate()+(re.w+6)%7):(be=o_(Og(re.y,0,1)),xe=be.getDay(),be=xe>4||xe===0?_3.ceil(be):_3(be),be=Jv.offset(be,(re.V-1)*7),re.y=be.getFullYear(),re.m=be.getMonth(),re.d=be.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),xe="Z"in re?s_(Og(re.y,0,1)).getUTCDay():o_(Og(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(xe+5)%7:re.w+re.U*7-(xe+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,s_(re)):o_(re)}}function T(oe,J,ae,re){for(var pe=0,be=J.length,xe=ae.length,ke,Pe;pe<be;){if(re>=xe)return-1;
vendor: 6,192 bytes, line 136
136if(ke=J.charCodeAt(pe++),ke===37){if(ke=J.charAt(pe++),Pe=_[ke in BG?J.charAt(pe++):ke],!Pe||(re=Pe(oe,ae,re))<0)return-1}else if(ke!=ae.charCodeAt(re++))return-1}return re}function O(oe,J,ae){var re=c.exec(J.slice(ae));return re?(oe.p=d.get(re[0].toLowerCase()),ae+re[0].length):-1}function D(oe,J,ae){var re=m.exec(J.slice(ae));return re?(oe.w=y.get(re[0].toLowerCase()),ae+re[0].length):-1}function R(oe,J,ae){var re=f.exec(J.slice(ae));return re?(oe.w=p.get(re[0].toLowerCase()),ae+re[0].length):-1}function I(oe,J,ae){var re=C.exec(J.slice(ae));return re?(oe.m=S.get(re[0].toLowerCase()),ae+re[0].length):-1}function F(oe,J,ae){var re=v.exec(J.slice(ae));return re?(oe.m=b.get(re[0].toLowerCase()),ae+re[0].length):-1}function $(oe,J,ae){return T(oe,t,J,ae)}function H(oe,J,ae){return T(oe,n,J,ae)}function L(oe,J,ae){return T(oe,r,J,ae)}function B(oe){return s[oe.getDay()]}function z(oe){return o[oe.getDay()]}function V(oe){return l[oe.getMonth()]}function U(oe){return a[oe.getMonth()]}function W(oe){return i[+(oe.getHours()>=12)]}function G(oe){return 1+~~(oe.getMonth()/3)}function Y(oe){return s[oe.getUTCDay()]}function X(oe){return o[oe.getUTCDay()]}function Q(oe){return l[oe.getUTCMonth()]}function ne(oe){return a[oe.getUTCMonth()]}function ie(oe){return i[+(oe.getUTCHours()>=12)]}function se(oe){return 1+~~(oe.getUTCMonth()/3)}return{format:function(oe){var J=N(oe+="",E);return J.toString=function(){return oe},J},parse:function(oe){var J=j(oe+="",!1);return J.toString=function(){return oe},J},utcFormat:function(oe){var J=N(oe+="",A);return J.toString=function(){return oe},J},utcParse:function(oe){var J=j(oe+="",!0);return J.toString=function(){return oe},J}}}var BG={"-":"",_:" ",0:"0"},Wr=/^\s*\d+/,z$e=/^%/,F$e=/[\\^$*+?|[\]().{}]/g;function Gt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function B$e(e){return e.replace(F$e,"\\$&")}function Rg(e){return new RegExp("^(?:"+e.map(B$e).join("|")+")","i")}function Pg(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function H$e(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function V$e(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function U$e(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function q$e(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function W$e(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function HG(e,t,n){var r=Wr.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function VG(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function G$e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function K$e(e,t,n){var r=Wr.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Y$e(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function UG(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function X$e(e,t,n){var r=Wr.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function qG(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Z$e(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Q$e(e,t,n){var r=Wr.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function J$e(e,t,n){var r=Wr.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function eze(e,t,n){var r=Wr.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function tze(e,t,n){var r=z$e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function nze(e,t,n){var r=Wr.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function rze(e,t,n){var r=Wr.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function WG(e,t){return Gt(e.getDate(),t,2)}function ize(e,t){return Gt(e.getHours(),t,2)}function oze(e,t){return Gt(e.getHours()%12||12,t,2)}function sze(e,t){return Gt(1+Jv.count(vc(e),e),t,3)}function Vce(e,t){return Gt(e.getMilliseconds(),t,3)}function aze(e,t){return Vce(e,t)+"000"}function lze(e,t){return Gt(e.getMonth()+1,t,2)}function cze(e,t){return Gt(e.getMinutes(),t,2)}function uze(e,t){return Gt(e.getSeconds(),t,2)}function dze(e){var t=e.getDay();return t===0?7:t}function fze(e,t){return Gt(EC.count(vc(e)-1,e),t,2)}function Uce(e){var t=e.getDay();return t>=4||t===0?y0(e):y0.ceil(e)}function hze(e,t){return e=Uce(e),Gt(y0.count(vc(e),e)+(vc(e).getDay()===4),t,2)}function pze(e){return e.getDay()}function mze(e,t){return Gt(_3.count(vc(e)-1,e),t,2)}function gze(e,t){return Gt(e.getFullYear()%100,t,2)}function yze(e,t){return e=Uce(e),Gt(e.getFullYear()%100,t,2)}function vze(e,t){return Gt(e.getFullYear()%1e4,t,4)}function bze(e,t){var n=e.getDay();return e=n>=4||n===0?y0(e):y0.ceil(e),Gt(e.getFullYear()%1e4,t,4)}function xze(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gt(t/60|0,"0",2)+Gt(t%60,"0",2)}function GG(e,t){return Gt(e.getUTCDate(),t,2)}function wze(e,t){return Gt(e.getUTCHours(),t,2)}function Cze(e,t){return Gt(e.getUTCHours()%12||12,t,2)}function Sze(e,t){return Gt(1+SC.count(bc(e),e),t,3)}function qce(e,t){return Gt(e.getUTCMilliseconds(),t,3)}function Eze(e,t){return qce(e,t)+"000"}function kze(e,t){return Gt(e.getUTCMonth()+1,t,2)}function _ze(e,t){return Gt(e.getUTCMinutes(),t,2)}function Aze(e,t){return Gt(e.getUTCSeconds(),t,2)}function Nze(e){var t=e.getUTCDay();return t===0?7:t}function jze(e,t){return Gt(kC.count(bc(e)-1,e),t,2)}function Wce(e){var t=e.getUTCDay();return t>=4||t===0?v0(e):v0.ceil(e)}function Tze(e,t){return e=Wce(e),Gt(v0.count(bc(e),e)+(bc(e).getUTCDay()===4),t,2)}function Mze(e){return e.getUTCDay()}function Oze(e,t){return Gt(A3.count(bc(e)-1,e),t,2)}function Rze(e,t){return Gt(e.getUTCFullYear()%100,t,2)}function Pze(e,t){return e=Wce(e),Gt(e.getUTCFullYear()%100,t,2)}function Dze(e,t){return Gt(e.getUTCFullYear()%1e4,t,4)}function Ize(e,t){var n=e.getUTCDay();return e=n>=4||n===0?v0(e):v0.ceil(e),Gt(e.getUTCFullYear()%1e4,t,4)}function Lze(){return"+0000"}function KG(){return"%"}function YG(e){return+e}
136function XG(e){return Math.floor(+e/1e3)}var mp,Gce,Kce;$ze({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function $ze(e){return mp=$$e(e),Gce=mp.format,mp.parse,Kce=mp.utcFormat,mp.utcParse,mp}function zze(e){return new Date(e)}function Fze(e){return e instanceof Date?+e:+new Date(+e)}function VP(e,t,n,r,i,o,s,a,l,c){var d=jP(),f=d.invert,p=d.domain,m=c(".%L"),y=c(":%S"),v=c("%I:%M"),b=c("%I %p"),C=c("%a %d"),S=c("%b %d"),E=c("%B"),A=c("%Y");function _(N){return(l(N)<N?m:a(N)<N?y:s(N)<N?v:o(N)<N?b:r(N)<N?i(N)<N?C:S:n(N)<N?E:A)(N)}return d.invert=function(N){return new Date(f(N))},d.domain=function(N){return arguments.length?p(Array.from(N,Fze)):p().map(zze)},d.ticks=function(N){var j=p();return e(j[0],j[j.length-1],N??10)},d.tickFormat=function(N,j){return j==null?_:c(j)},d.nice=function(N){var j=p();return(!N||typeof N.range!="function")&&(N=t(j[0],j[j.length-1],N??10)),N?p(Pce(j,N)):d},d.copy=function(){return Qv(d,VP(e,t,n,r,i,o,s,a,l,c))},d}function Bze(){return vs.apply(VP(I$e,L$e,vc,BP,EC,Jv,zP,LP,xf,Gce).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Hze(){return vs.apply(VP(P$e,D$e,bc,HP,kC,SC,FP,$P,xf,Kce).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function _C(){var e=0,t=1,n,r,i,o,s=Oi,a=!1,l;function c(f){return f==null||isNaN(f=+f)?l:s(i===0?.5:(f=(o(f)-n)*i,a?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(f){return arguments.length?(a=!!f,c):a},c.interpolator=function(f){return arguments.length?(s=f,c):s};function d(f){return function(p){var m,y;return arguments.length?([m,y]=p,s=f(m,y),c):[s(0),s(1)]}}return c.range=d(ic),c.rangeRound=d(NP),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return o=f,n=f(e),r=f(t),i=n===r?0:1/(r-n),c}}function kd(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Yce(){var e=Ed(_C()(Oi));return e.copy=function(){return kd(e,Yce())},jc.apply(e,arguments)}function Xce(){var e=OP(_C()).domain([1,10]);return e.copy=function(){return kd(e,Xce()).base(e.base())},jc.apply(e,arguments)}function Zce(){var e=RP(_C());return e.copy=function(){return kd(e,Zce()).constant(e.constant())},jc.apply(e,arguments)}function UP(){var e=PP(_C());return e.copy=function(){return kd(e,UP()).exponent(e.exponent())},jc.apply(e,arguments)}function Vze(){return UP.apply(null,arguments).exponent(.5)}function Qce(){var e=[],t=Oi;function n(r){if(r!=null&&!isNaN(r=+r))return t((Xv(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Wu),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>SLe(e,o/r))},n.copy=function(){return Qce(t).domain(e)},jc.apply(n,arguments)}function AC(){var e=0,t=.5,n=1,r=1,i,o,s,a,l,c=Oi,d,f=!1,p;function m(v){return isNaN(v=+v)?p:(v=.5+((v=+d(v))-o)*(r*v<r*o?a:l),c(f?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,i=d(e=+e),o=d(t=+t),s=d(n=+n),a=i===o?0:.5/(o-i),l=o===s?0:.5/(s-o),r=o<i?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(f=!!v,m):f},m.interpolator=function(v){return arguments.length?(c=v,m):c};function y(v){return function(b){var C,S,E;return arguments.length?([C,S,E]=b,c=t$e(v,[C,S,E]),m):[c(0),c(.5),c(1)]}}return m.range=y(ic),m.rangeRound=y(NP),m.unknown=function(v){return arguments.length?(p=v,m):p},function(v){return d=v,i=v(e),o=v(t),s=v(n),a=i===o?0:.5/(o-i),l=o===s?0:.5/(s-o),r=o<i?-1:1,m}}
vendor: 90,873 bytes, lines 136-168
136function Jce(){var e=Ed(AC()(Oi));return e.copy=function(){return kd(e,Jce())},jc.apply(e,arguments)}function eue(){var e=OP(AC()).domain([.1,1,10]);return e.copy=function(){return kd(e,eue()).base(e.base())},jc.apply(e,arguments)}function tue(){var e=RP(AC());return e.copy=function(){return kd(e,tue()).constant(e.constant())},jc.apply(e,arguments)}function qP(){var e=PP(AC());return e.copy=function(){return kd(e,qP()).exponent(e.exponent())},jc.apply(e,arguments)}function Uze(){return qP.apply(null,arguments).exponent(.5)}const ZG=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:hy,scaleDiverging:Jce,scaleDivergingLog:eue,scaleDivergingPow:qP,scaleDivergingSqrt:Uze,scaleDivergingSymlog:tue,scaleIdentity:Rce,scaleImplicit:Qj,scaleLinear:E3,scaleLog:Dce,scaleOrdinal:kP,scalePoint:S1,scalePow:DP,scaleQuantile:$ce,scaleQuantize:zce,scaleRadial:Lce,scaleSequential:Yce,scaleSequentialLog:Xce,scaleSequentialPow:UP,scaleSequentialQuantile:Qce,scaleSequentialSqrt:Vze,scaleSequentialSymlog:Zce,scaleSqrt:E$e,scaleSymlog:Ice,scaleThreshold:Fce,scaleTime:Bze,scaleUtc:Hze,tickFormat:Oce},Symbol.toStringTag,{value:"Module"}));var a_,QG;function nue(){if(QG)return a_;QG=1;var e=hm();function t(n,r,i){for(var o=-1,s=n.length;++o<s;){var a=n[o],l=r(a);if(l!=null&&(c===void 0?l===l&&!e(l):i(l,c)))var c=l,d=a}return d}return a_=t,a_}var l_,JG;function qze(){if(JG)return l_;JG=1;function e(t,n){return t>n}return l_=e,l_}var c_,eK;function Wze(){if(eK)return c_;eK=1;var e=nue(),t=qze(),n=gm();function r(i){return i&&i.length?e(i,n,t):void 0}return c_=r,c_}var Gze=Wze();const Ru=Ht(Gze);var u_,tK;function Kze(){if(tK)return u_;tK=1;function e(t,n){return t<n}return u_=e,u_}var d_,nK;function Yze(){if(nK)return d_;nK=1;var e=nue(),t=Kze(),n=gm();function r(i){return i&&i.length?e(i,n,t):void 0}return d_=r,d_}var Xze=Yze();const NC=Ht(Xze);var f_,rK;function Zze(){if(rK)return f_;rK=1;var e=aP(),t=Sd(),n=ace(),r=co();function i(o,s){var a=r(o)?e:n;return a(o,t(s,3))}return f_=i,f_}var h_,iK;function Qze(){if(iK)return h_;iK=1;var e=oce(),t=Zze();function n(r,i){return e(t(r,i),1)}return h_=n,h_}var Jze=Qze();const eFe=Ht(Jze);var p_,oK;function tFe(){if(oK)return p_;oK=1;var e=xP();function t(n,r){return e(n,r)}return p_=t,p_}var nFe=tFe();const yy=Ht(nFe);var vm=1e9,rFe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},GP,Rn=!0,hs="[DecimalError] ",Of=hs+"Invalid argument: ",WP=hs+"Exponent out of range: ",bm=Math.floor,df=Math.pow,iFe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Co,Br=1e7,Nn=7,rue=9007199254740991,N3=bm(rue/Nn),Fe={};Fe.absoluteValue=Fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Fe.comparedTo=Fe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};Fe.decimalPlaces=Fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Nn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Fe.dividedBy=Fe.div=function(e){return oc(this,new this.constructor(e))};Fe.dividedToIntegerBy=Fe.idiv=function(e){var t=this,n=t.constructor;return yn(oc(t,new n(e),0,1),n.precision)};Fe.equals=Fe.eq=function(e){return!this.cmp(e)};Fe.exponent=function(){return gr(this)};Fe.greaterThan=Fe.gt=function(e){return this.cmp(e)>0};Fe.greaterThanOrEqualTo=Fe.gte=function(e){return this.cmp(e)>=0};Fe.isInteger=Fe.isint=function(){return this.e>this.d.length-2};Fe.isNegative=Fe.isneg=function(){return this.s<0};Fe.isPositive=Fe.ispos=function(){return this.s>0};Fe.isZero=function(){return this.s===0};Fe.lessThan=Fe.lt=function(e){return this.cmp(e)<0};Fe.lessThanOrEqualTo=Fe.lte=function(e){return this.cmp(e)<1};Fe.logarithm=Fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Co))throw Error(hs+"NaN");if(n.s<1)throw Error(hs+(n.s?"NaN":"-Infinity"));return n.eq(Co)?new r(0):(Rn=!1,t=oc(vy(n,o),vy(e,o),o),Rn=!0,yn(t,i))};Fe.minus=Fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?sue(t,e):iue(t,(e.s=-e.s,e))};Fe.modulo=Fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(hs+"NaN");return n.s?(Rn=!1,t=oc(n,e,0,1).times(e),Rn=!0,n.minus(t)):yn(new r(n),i)};Fe.naturalExponential=Fe.exp=function(){return oue(this)};Fe.naturalLogarithm=Fe.ln=function(){return vy(this)};Fe.negated=Fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Fe.plus=Fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?iue(t,e):sue(t,(e.s=-e.s,e))};Fe.precision=Fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Of+e);if(t=gr(i)+1,r=i.d.length-1,n=r*Nn+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Fe.squareRoot=Fe.sqrt=function(){var e,t,n,r,i,o,s,a=this,l=a.constructor;if(a.s<1){if(!a.s)return new l(0);throw Error(hs+"NaN")}for(e=gr(a),Rn=!1,i=Math.sqrt(+a),i==0||i==1/0?(t=Ra(a.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=bm((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=s=n+3;;)if(o=r,r=o.plus(oc(a,o,s+2)).times(.5),Ra(o.d).slice(0,s)===(t=Ra(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(yn(o,n+1,0),o.times(o).eq(a)){r=o;break}}else if(t!="9999")break;s+=4}return Rn=!0,yn(r,n)};Fe.times=Fe.mul=function(e){var t,n,r,i,o,s,a,l,c,d=this,f=d.constructor,p=d.d,m=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,l=p.length,c=m.length,l<c&&(o=p,p=m,m=o,s=l,l=c,c=s),o=[],s=l+c,r=s;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)a=o[i]+m[r]*p[i-r-1]+t,o[i--]=a%Br|0,t=a/Br|0;o[i]=(o[i]+t)%Br|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Rn?yn(e,f.precision):e};Fe.toDecimalPlaces=Fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ga(e,0,vm),t===void 0?t=r.rounding:Ga(t,0,8),yn(n,e+gr(n)+1,t))};Fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xf(r,!0):(Ga(e,0,vm),t===void 0?t=i.rounding:Ga(t,0,8),r=yn(new i(r),e+1,t),n=Xf(r,!0,e+1)),n};Fe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xf(i):(Ga(e,0,vm),t===void 0?t=o.rounding:Ga(t,0,8),r=yn(new o(i),e+gr(i)+1,t),n=Xf(r.abs(),!1,e+gr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Fe.toInteger=Fe.toint=function(){var e=this,t=e.constructor;return yn(new t(e),gr(e)+1,t.rounding)};Fe.toNumber=function(){return+this};Fe.toPower=Fe.pow=function(e){var t,n,r,i,o,s,a=this,l=a.constructor,c=12,d=+(e=new l(e));if(!e.s)return new l(Co);if(a=new l(a),!a.s){if(e.s<1)throw Error(hs+"Infinity");return a}if(a.eq(Co))return a;if(r=l.precision,e.eq(Co))return yn(a,r);if(t=e.e,n=e.d.length-1,s=t>=n,o=a.s,s){if((n=d<0?-d:d)<=rue){for(i=new l(Co),t=Math.ceil(r/Nn+4),Rn=!1;n%2&&(i=i.times(a),aK(i.d,t)),n=bm(n/2),n!==0;)a=a.times(a),aK(a.d,t);return Rn=!0,e.s<0?new l(Co).div(i):yn(i,r)}}else if(o<0)throw Error(hs+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,a.s=1,Rn=!1,i=e.times(vy(a,r+c)),Rn=!0,i=oue(i),i.s=o,i};Fe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=gr(i),r=Xf(i,n<=o.toExpNeg||n>=o.toExpPos)):(Ga(e,1,vm),t===void 0?t=o.rounding:Ga(t,0,8),i=yn(new o(i),e,t),n=gr(i),r=Xf(i,e<=n||n<=o.toExpNeg,e)),r};Fe.toSignificantDigits=Fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ga(e,1,vm),t===void 0?t=r.rounding:Ga(t,0,8)),yn(new r(n),e,t)};Fe.toString=Fe.valueOf=Fe.val=Fe.toJSON=Fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=gr(e),n=e.constructor;return Xf(e,t<=n.toExpNeg||t>=n.toExpPos)};function iue(e,t){var n,r,i,o,s,a,l,c,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Rn?yn(t,f):t;if(l=e.d,c=t.d,s=e.e,i=t.e,l=l.slice(),o=s-i,o){for(o<0?(r=l,o=-o,a=c.length):(r=c,i=s,a=l.length),s=Math.ceil(f/Nn),a=s>a?s+1:a+1,o>a&&(o=a,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(a=l.length,o=c.length,a-o<0&&(o=a,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/Br|0,l[o]%=Br;for(n&&(l.unshift(n),++i),a=l.length;l[--a]==0;)l.pop();return t.d=l,t.e=i,Rn?yn(t,f):t}function Ga(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Of+e)}function Ra(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)r=e[t]+"",n=Nn-r.length,n&&(o+=bu(n)),o+=r;s=e[t],r=s+"",n=Nn-r.length,n&&(o+=bu(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var oc=function(){function e(r,i){var o,s=0,a=r.length;for(r=r.slice();a--;)o=r[a]*i+s,r[a]=o%Br|0,s=o/Br|0;return s&&r.unshift(s),r}function t(r,i,o,s){var a,l;if(o!=s)l=o>s?1:-1;else for(a=l=0;a<o;a++)if(r[a]!=i[a]){l=r[a]>i[a]?1:-1;break}return l}function n(r,i,o){for(var s=0;o--;)r[o]-=s,s=r[o]<i[o]?1:0,r[o]=s*Br+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,s){var a,l,c,d,f,p,m,y,v,b,C,S,E,A,_,N,j,T,O=r.constructor,D=r.s==i.s?1:-1,R=r.d,I=i.d;if(!r.s)return new O(r);if(!i.s)throw Error(hs+"Division by zero");for(l=r.e-i.e,j=I.length,_=R.length,m=new O(D),y=m.d=[],c=0;I[c]==(R[c]||0);)++c;if(I[c]>(R[c]||0)&&--l,o==null?S=o=O.precision:s?S=o+(gr(r)-gr(i))+1:S=o,S<0)return new O(0);if(S=S/Nn+2|0,c=0,j==1)for(d=0,I=I[0],S++;(c<_||d)&&S--;c++)E=d*Br+(R[c]||0),y[c]=E/I|0,d=E%I|0;else{for(d=Br/(I[0]+1)|0,d>1&&(I=e(I,d),R=e(R,d),j=I.length,_=R.length),A=j,v=R.slice(0,j),b=v.length;b<j;)v[b++]=0;T=I.slice(),T.unshift(0),N=I[0],I[1]>=Br/2&&++N;do d=0,a=t(I,v,j,b),a<0?(C=v[0],j!=b&&(C=C*Br+(v[1]||0)),d=C/N|0,d>1?(d>=Br&&(d=Br-1),f=e(I,d),p=f.length,b=v.length,a=t(f,v,p,b),a==1&&(d--,n(f,j<p?T:I,p))):(d==0&&(a=d=1),f=I.slice()),p=f.length,p<b&&f.unshift(0),n(v,f,b),a==-1&&(b=v.length,a=t(I,v,j,b),a<1&&(d++,n(v,j<b?T:I,b))),b=v.length):a===0&&(d++,v=[0]),y[c++]=d,a&&v[0]?v[b++]=R[A]||0:(v=[R[A]],b=1);while((A++<_||v[0]!==void 0)&&S--)}return y[0]||y.shift(),m.e=l,yn(m,s?o+gr(m)+1:o)}}();function oue(e,t){var n,r,i,o,s,a,l=0,c=0,d=e.constructor,f=d.precision;if(gr(e)>16)throw Error(WP+gr(e));if(!e.s)return new d(Co);for(Rn=!1,a=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),c+=5;for(r=Math.log(df(2,c))/Math.LN10*2+5|0,a+=r,n=i=o=new d(Co),d.precision=a;;){if(i=yn(i.times(e),a),n=n.times(++l),s=o.plus(oc(i,n,a)),Ra(s.d).slice(0,a)===Ra(o.d).slice(0,a)){for(;c--;)o=yn(o.times(o),a);return d.precision=f,t==null?(Rn=!0,yn(o,f)):o}o=s}}function gr(e){for(var t=e.e*Nn,n=e.d[0];n>=10;n/=10)t++;return t}function m_(e,t,n){if(t>e.LN10.sd())throw Rn=!0,n&&(e.precision=n),Error(hs+"LN10 precision limit exceeded");return yn(new e(e.LN10),t)}function bu(e){for(var t="";e--;)t+="0";return t}function vy(e,t){var n,r,i,o,s,a,l,c,d,f=1,p=10,m=e,y=m.d,v=m.constructor,b=v.precision;if(m.s<1)throw Error(hs+(m.s?"NaN":"-Infinity"));if(m.eq(Co))return new v(0);if(t==null?(Rn=!1,c=b):c=t,m.eq(10))return t==null&&(Rn=!0),m_(v,c);if(c+=p,v.precision=c,n=Ra(y),r=n.charAt(0),o=gr(m),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=Ra(m.d),r=n.charAt(0),f++;o=gr(m),r>1?(m=new v("0."+n),o++):m=new v(r+"."+n.slice(1))}else return l=m_(v,c+2,b).times(o+""),m=vy(new v(r+"."+n.slice(1)),c-p).plus(l),v.precision=b,t==null?(Rn=!0,yn(m,b)):m;for(a=s=m=oc(m.minus(Co),m.plus(Co),c),d=yn(m.times(m),c),i=3;;){if(s=yn(s.times(d),c),l=a.plus(oc(s,new v(i),c)),Ra(l.d).slice(0,c)===Ra(a.d).slice(0,c))return a=a.times(2),o!==0&&(a=a.plus(m_(v,c+2,b).times(o+""))),a=oc(a,new v(f),c),v.precision=b,t==null?(Rn=!0,yn(a,b)):a;a=l,i+=2}}function sK(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=bm(n/Nn),e.d=[],r=(n+1)%Nn,n<0&&(r+=Nn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Nn;r<i;)e.d.push(+t.slice(r,r+=Nn));t=t.slice(r),r=Nn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Rn&&(e.e>N3||e.e<-N3))throw Error(WP+n)}else e.s=0,e.e=0,e.d=[0];return e}function yn(e,t,n){var r,i,o,s,a,l,c,d,f=e.d;for(s=1,o=f[0];o>=10;o/=10)s++;if(r=t-s,r<0)r+=Nn,i=t,c=f[d=0];else{if(d=Math.ceil((r+1)/Nn),o=f.length,d>=o)return e;for(c=o=f[d],s=1;o>=10;o/=10)s++;r%=Nn,i=r-Nn+s}if(n!==void 0&&(o=df(10,s-i-1),a=c/o%10|0,l=t<0||f[d+1]!==void 0||c%o,l=n<4?(a||l)&&(n==0||n==(e.s<0?3:2)):a>5||a==5&&(n==4||l||n==6&&(r>0?i>0?c/df(10,s-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(o=gr(e),f.length=1,t=t-o-1,f[0]=df(10,(Nn-t%Nn)%Nn),e.e=bm(-t/Nn)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,o=1,d--):(f.length=d+1,o=df(10,Nn-r),f[d]=i>0?(c/df(10,s-i)%df(10,i)|0)*o:0),l)for(;;)if(d==0){(f[0]+=o)==Br&&(f[0]=1,++e.e);break}else{if(f[d]+=o,f[d]!=Br)break;f[d--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(Rn&&(e.e>N3||e.e<-N3))throw Error(WP+gr(e));return e}function sue(e,t){var n,r,i,o,s,a,l,c,d,f,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),Rn?yn(t,m):t;if(l=e.d,f=t.d,r=t.e,c=e.e,l=l.slice(),s=c-r,s){for(d=s<0,d?(n=l,s=-s,a=f.length):(n=f,r=c,a=l.length),i=Math.max(Math.ceil(m/Nn),a)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=l.length,a=f.length,d=i<a,d&&(a=i),i=0;i<a;i++)if(l[i]!=f[i]){d=l[i]<f[i];break}s=0}for(d&&(n=l,l=f,f=n,t.s=-t.s),a=l.length,i=f.length-a;i>0;--i)l[a++]=0;for(i=f.length;i>s;){if(l[--i]<f[i]){for(o=i;o&&l[--o]===0;)l[o]=Br-1;--l[o],l[i]+=Br}l[i]-=f[i]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,Rn?yn(t,m):t):new p(0)}function Xf(e,t,n){var r,i=gr(e),o=Ra(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+bu(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+bu(-i-1)+o,n&&(r=n-s)>0&&(o+=bu(r))):i>=s?(o+=bu(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+bu(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=bu(r))),e.s<0?"-"+o:o}function aK(e,t){if(e.length>t)return e.length=t,!0}function aue(e){var t,n,r;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Of+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return sK(s,o.toString())}else if(typeof o!="string")throw Error(Of+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,iFe.test(o))sK(s,o);else throw Error(Of+o)}if(i.prototype=Fe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=aue,i.config=i.set=oFe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function oFe(e){if(!e||typeof e!="object")throw Error(hs+"Object expected");var t,n,r,i=["precision",1,vm,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(bm(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Of+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Of+n+": "+r);return this}var GP=aue(rFe);Co=new GP(1);const hn=GP;function sFe(e){return uFe(e)||cFe(e)||lFe(e)||aFe()}function aFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 137In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lFe(e,t){if(e){if(typeof e=="string")return rT(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 rT(e,t)}}function cFe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function uFe(e){if(Array.isArray(e))return rT(e)}function rT(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}var dFe=function(t){return t},lue={},cue=function(t){return t===lue},lK=function(t){return function n(){return arguments.length===0||arguments.length===1&&cue(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},fFe=function e(t,n){return t===1?n:lK(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var s=i.filter(function(a){return a!==lue}).length;return s>=t?n.apply(void 0,i):e(t-s,lK(function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var d=i.map(function(f){return cue(f)?l.shift():f});return n.apply(void 0,sFe(d).concat(l))}))})},jC=function(t){return fFe(t.length,t)},iT=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},hFe=jC(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),pFe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return dFe;var i=n.reverse(),o=i[0],s=i.slice(1);return function(){return s.reduce(function(a,l){return l(a)},o.apply(void 0,arguments))}},oT=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},uue=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return n&&o.every(function(a,l){return a===n[l]})||(n=o,r=t.apply(void 0,o)),r}};function mFe(e){var t;return e===0?t=1:t=Math.floor(new hn(e).abs().log(10).toNumber())+1,t}function gFe(e,t,n){for(var r=new hn(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var yFe=jC(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),vFe=jC(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),bFe=jC(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const TC={rangeStep:gFe,getDigitCount:mFe,interpolateNumber:yFe,uninterpolateNumber:vFe,uninterpolateTruncation:bFe};function sT(e){return CFe(e)||wFe(e)||due(e)||xFe()}function xFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 138In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wFe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function CFe(e){if(Array.isArray(e))return aT(e)}function by(e,t){return kFe(e)||EFe(e,t)||due(e,t)||SFe()}function SFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 139In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function due(e,t){if(e){if(typeof e=="string")return aT(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 aT(e,t)}}function aT(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 EFe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var s=e[Symbol.iterator](),a;!(r=(a=s.next()).done)&&(n.push(a.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&s.return!=null&&s.return()}finally{if(i)throw o}}return n}}function kFe(e){if(Array.isArray(e))return e}function fue(e){var t=by(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function hue(e,t,n){if(e.lte(0))return new hn(0);var r=TC.getDigitCount(e.toNumber()),i=new hn(10).pow(r),o=e.div(i),s=r!==1?.05:.1,a=new hn(Math.ceil(o.div(s).toNumber())).add(n).mul(s),l=a.mul(i);return t?l:new hn(Math.ceil(l))}function _Fe(e,t,n){var r=1,i=new hn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new hn(10).pow(TC.getDigitCount(e)-1),i=new hn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new hn(Math.floor(e)))}else e===0?i=new hn(Math.floor((t-1)/2)):n||(i=new hn(Math.floor(e)));var s=Math.floor((t-1)/2),a=pFe(hFe(function(l){return i.add(new hn(l-s).mul(r)).toNumber()}),iT);return a(0,t)}function pue(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new hn(0),tickMin:new hn(0),tickMax:new hn(0)};var o=hue(new hn(t).sub(e).div(n-1),r,i),s;e<=0&&t>=0?s=new hn(0):(s=new hn(e).add(t).div(2),s=s.sub(new hn(s).mod(o)));var a=Math.ceil(s.sub(e).div(o).toNumber()),l=Math.ceil(new hn(t).sub(s).div(o).toNumber()),c=a+l+1;return c>n?pue(e,t,n,r,i+1):(c<n&&(l=t>0?l+(n-c):l,a=t>0?a:a+(n-c)),{step:o,tickMin:s.sub(new hn(a).mul(o)),tickMax:s.add(new hn(l).mul(o))})}function AFe(e){var t=by(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(i,2),a=fue([n,r]),l=by(a,2),c=l[0],d=l[1];if(c===-1/0||d===1/0){var f=d===1/0?[c].concat(sT(iT(0,i-1).map(function(){return 1/0}))):[].concat(sT(iT(0,i-1).map(function(){return-1/0})),[d]);return n>r?oT(f):f}if(c===d)return _Fe(c,i,o);var p=pue(c,d,s,o),m=p.step,y=p.tickMin,v=p.tickMax,b=TC.rangeStep(y,v.add(new hn(.1).mul(m)),m);return n>r?oT(b):b}function NFe(e,t){var n=by(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=fue([r,i]),a=by(s,2),l=a[0],c=a[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var d=Math.max(t,2),f=hue(new hn(c).sub(l).div(d-1),o,0),p=[].concat(sT(TC.rangeStep(new hn(l),new hn(c).sub(new hn(.99).mul(f)),f)),[c]);return r>i?oT(p):p}var jFe=uue(AFe),TFe=uue(NFe),MFe="Invariant failed";function Zf(e,t){throw new Error(MFe)}var OFe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function b0(e){"@babel/helpers - typeof";return b0=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},b0(e)}function j3(){return j3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j3.apply(this,arguments)}function RFe(e,t){return LFe(e)||IFe(e,t)||DFe(e,t)||PFe()}function PFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 140In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DFe(e,t){if(e){if(typeof e=="string")return cK(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 cK(e,t)}}function cK(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 IFe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function LFe(e){if(Array.isArray(e))return e}function $Fe(e,t){if(e==null)return{};var n=zFe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function FFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function BFe(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,yue(r.key),r)}}function HFe(e,t,n){return t&&BFe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function VFe(e,t,n){return t=T3(t),UFe(e,mue()?Reflect.construct(t,n||[],T3(e).constructor):t.apply(e,n))}function UFe(e,t){if(t&&(b0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qFe(e)}function qFe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mue=function(){return!!e})()}function T3(e){return T3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},T3(e)}function WFe(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&&lT(e,t)}function lT(e,t){return lT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lT(e,t)}function gue(e,t,n){return t=yue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yue(e){var t=GFe(e,"string");return b0(t)=="symbol"?t:t+""}function GFe(e,t){if(b0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(b0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var MC=function(e){function t(){return FFe(this,t),VFe(this,t,arguments)}return WFe(t,e),HFe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,s=r.width,a=r.dataKey,l=r.data,c=r.dataPointFormatter,d=r.xAxis,f=r.yAxis,p=$Fe(r,OFe),m=At(p,!1);this.props.direction==="x"&&d.type!=="number"&&Zf();var y=l.map(function(v){var b=c(v,a),C=b.x,S=b.y,E=b.value,A=b.errorVal;if(!A)return null;var _=[],N,j;if(Array.isArray(A)){var T=RFe(A,2);N=T[0],j=T[1]}else N=j=A;if(o==="vertical"){var O=d.scale,D=S+i,R=D+s,I=D-s,F=O(E-N),$=O(E+j);_.push({x1:$,y1:R,x2:$,y2:I}),_.push({x1:F,y1:D,x2:$,y2:D}),_.push({x1:F,y1:R,x2:F,y2:I})}else if(o==="horizontal"){var H=f.scale,L=C+i,B=L-s,z=L+s,V=H(E-N),U=H(E+j);_.push({x1:B,y1:U,x2:z,y2:U}),_.push({x1:L,y1:V,x2:L,y2:U}),_.push({x1:B,y1:V,x2:z,y2:V})}return K.createElement(Hn,j3({className:"recharts-errorBar",key:"bar-".concat(_.map(function(W){return"".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))},m),_.map(function(W){return K.createElement("line",j3({},W,{key:"line-".concat(W.x1,"-").concat(W.x2,"-").concat(W.y1,"-").concat(W.y2)}))}))});return K.createElement(Hn,{className:"recharts-errorBars"},y)}}])}(K.Component);gue(MC,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});gue(MC,"displayName","ErrorBar");function xy(e){"@babel/helpers - typeof";return xy=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},xy(e)}function uK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function of(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uK(Object(n),!0).forEach(function(r){KFe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KFe(e,t,n){return t=YFe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YFe(e){var t=XFe(e,"string");return xy(t)=="symbol"?t:t+""}function XFe(e,t){if(xy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vue=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,s=xo(n,Wp);if(!s)return null;var a=Wp.defaultProps,l=a!==void 0?of(of({},a),s.props):{},c;return s.props&&s.props.payload?c=s.props&&s.props.payload:o==="children"?c=(r||[]).reduce(function(d,f){var p=f.item,m=f.props,y=m.sectors||m.data||[];return d.concat(y.map(function(v){return{type:s.props.iconType||p.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):c=(r||[]).map(function(d){var f=d.item,p=f.type.defaultProps,m=p!==void 0?of(of({},p),f.props):{},y=m.dataKey,v=m.name,b=m.legendType,C=m.hide;return{inactive:C,dataKey:y,type:l.iconType||b||"square",color:KP(f),value:v||y,payload:m}}),of(of(of({},l),Wp.getWithHeight(s,i)),{},{payload:c,item:s})};function wy(e){"@babel/helpers - typeof";return wy=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},wy(e)}function dK(e){return eBe(e)||JFe(e)||QFe(e)||ZFe()}function ZFe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 141In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QFe(e,t){if(e){if(typeof e=="string")return cT(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 cT(e,t)}}function JFe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eBe(e){if(Array.isArray(e))return cT(e)}function cT(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 fK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fK(Object(n),!0).forEach(function(r){Kp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Kp(e,t,n){return t=tBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tBe(e){var t=nBe(e,"string");return wy(t)=="symbol"?t:t+""}function nBe(e,t){if(wy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function To(e,t,n){return Lt(e)||Lt(t)?n:Nr(t)?ls(e,t,n):yt(t)?t(e):n}function E1(e,t,n,r){var i=eFe(e,function(a){return To(a,t)});if(n==="number"){var o=i.filter(function(a){return Me(a)||parseFloat(a)});return o.length?[NC(o),Ru(o)]:[1/0,-1/0]}var s=r?i.filter(function(a){return!Lt(a)}):i;return s.map(function(a){return Nr(a)||a instanceof Date?a:""})}var rBe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,s=-1,a=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(a<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var l=o.range,c=0;c<a;c++){var d=c>0?i[c-1].coordinate:i[a-1].coordinate,f=i[c].coordinate,p=c>=a-1?i[0].coordinate:i[c+1].coordinate,m=void 0;if(Gs(f-d)!==Gs(p-f)){var y=[];if(Gs(p-f)===Gs(l[1]-l[0])){m=p;var v=f+l[1]-l[0];y[0]=Math.min(v,(v+d)/2),y[1]=Math.max(v,(v+d)/2)}else{m=d;var b=p+l[1]-l[0];y[0]=Math.min(f,(b+f)/2),y[1]=Math.max(f,(b+f)/2)}var C=[Math.min(f,(m+f)/2),Math.max(f,(m+f)/2)];if(t>C[0]&&t<=C[1]||t>=y[0]&&t<=y[1]){s=i[c].index;break}}else{var S=Math.min(d,p),E=Math.max(d,p);if(t>(S+f)/2&&t<=(E+f)/2){s=i[c].index;break}}}else for(var A=0;A<a;A++)if(A===0&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A>0&&A<a-1&&t>(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===a-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){s=r[A].index;break}return s},KP=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Xn(Xn({},t.type.defaultProps),t.props):t.props,s=o.stroke,a=o.fill,l;switch(i){case"Line":l=s;break;case"Area":case"Radar":l=s&&s!=="none"?s:a;break;default:l=a;break}return l},iBe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var s={},a=Object.keys(o),l=0,c=a.length;l<c;l++)for(var d=o[a[l]].stackGroups,f=Object.keys(d),p=0,m=f.length;p<m;p++){var y=d[f[p]],v=y.items,b=y.cateAxisId,C=v.filter(function(j){return nc(j.type).indexOf("Bar")>=0});if(C&&C.length){var S=C[0].type.defaultProps,E=S!==void 0?Xn(Xn({},S),C[0].props):C[0].props,A=E.barSize,_=E[b];s[_]||(s[_]=[]);var N=Lt(A)?n:A;s[_].push({item:C[0],stackList:C.slice(1),barSize:Lt(N)?void 0:Kf(N,r,0)})}}return s},oBe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,s=o===void 0?[]:o,a=t.maxBarSize,l=s.length;if(l<1)return null;var c=Kf(n,i,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var p=!1,m=i/l,y=s.reduce(function(A,_){return A+_.barSize||0},0);y+=(l-1)*c,y>=i&&(y-=(l-1)*c,c=0),y>=i&&m>0&&(p=!0,m*=.9,y=l*m);var v=(i-y)/2>>0,b={offset:v-c,size:0};d=s.reduce(function(A,_){var N={item:_.item,position:{offset:b.offset+b.size+c,size:p?m:_.barSize}},j=[].concat(dK(A),[N]);return b=j[j.length-1].position,_.stackList&&_.stackList.length&&_.stackList.forEach(function(T){j.push({item:T,position:b})}),j},f)}else{var C=Kf(r,i,0,!0);i-2*C-(l-1)*c<=0&&(c=0);var S=(i-2*C-(l-1)*c)/l;S>1&&(S>>=0);var E=a===+a?Math.min(S,a):S;d=s.reduce(function(A,_,N){var j=[].concat(dK(A),[{item:_.item,position:{offset:C+(S+c)*N+(S-E)/2,size:E}}]);return _.stackList&&_.stackList.length&&_.stackList.forEach(function(T){j.push({item:T,position:j[j.length-1].position})}),j},f)}return d},sBe=function(t,n,r,i){var o=r.children,s=r.width,a=r.margin,l=s-(a.left||0)-(a.right||0),c=vue({children:o,legendWidth:l});if(c){var d=i||{},f=d.width,p=d.height,m=c.align,y=c.verticalAlign,v=c.layout;if((v==="vertical"||v==="horizontal"&&y==="middle")&&m!=="center"&&Me(t[m]))return Xn(Xn({},t),{},Kp({},m,t[m]+(f||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&y!=="middle"&&Me(t[y]))return Xn(Xn({},t),{},Kp({},y,t[y]+(p||0)))}return t},aBe=function(t,n,r){return Lt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},bue=function(t,n,r,i,o){var s=n.props.children,a=ea(s,MC).filter(function(c){return aBe(i,o,c.props.direction)});if(a&&a.length){var l=a.map(function(c){return c.props.dataKey});return t.reduce(function(c,d){var f=To(d,r);if(Lt(f))return c;var p=Array.isArray(f)?[NC(f),Ru(f)]:[f,f],m=l.reduce(function(y,v){var b=To(d,v,0),C=p[0]-Math.abs(Array.isArray(b)?b[0]:b),S=p[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(C,y[0]),Math.max(S,y[1])]},[1/0,-1/0]);return[Math.min(m[0],c[0]),Math.max(m[1],c[1])]},[1/0,-1/0])}return null},lBe=function(t,n,r,i,o){var s=n.map(function(a){return bue(t,a,r,o,i)}).filter(function(a){return!Lt(a)});return s&&s.length?s.reduce(function(a,l){return[Math.min(a[0],l[0]),Math.max(a[1],l[1])]},[1/0,-1/0]):null},xue=function(t,n,r,i,o){var s=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&bue(t,l,c,i)||E1(t,c,r,o)});if(r==="number")return s.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var a={};return s.reduce(function(l,c){for(var d=0,f=c.length;d<f;d++)a[c[d]]||(a[c[d]]=!0,l.push(c[d]));return l},[])},wue=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},Cue=function(t,n,r,i){if(i)return t.map(function(l){return l.coordinate});var o,s,a=t.map(function(l){return l.coordinate===n&&(o=!0),l.coordinate===r&&(s=!0),l.coordinate});return o||a.push(n),s||a.push(r),a},Yl=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,s=t.type,a=t.range,l=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,c=(n||r)&&s==="category"&&i.bandwidth?i.bandwidth()/l:0;if(c=t.axisType==="angleAxis"&&(a==null?void 0:a.length)>=2?Gs(a[0]-a[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var p=o?o.indexOf(f):f;return{coordinate:i(p)+c,value:f,offset:c}});return d.filter(function(f){return!mm(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,p){return{coordinate:i(f)+c,value:f,index:p,offset:c}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+c,value:f,offset:c}}):i.domain().map(function(f,p){return{coordinate:i(f)+c,value:o?o[f]:f,index:p,offset:c}})},g_=new WeakMap,g2=function(t,n){if(typeof n!="function")return t;g_.has(t)||g_.set(t,new WeakMap);var r=g_.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},cBe=function(t,n,r){var i=t.scale,o=t.type,s=t.layout,a=t.axisType;if(i==="auto")return s==="radial"&&a==="radiusAxis"?{scale:hy(),realScaleType:"band"}:s==="radial"&&a==="angleAxis"?{scale:E3(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:S1(),realScaleType:"point"}:o==="category"?{scale:hy(),realScaleType:"band"}:{scale:E3(),realScaleType:"linear"};if(Gf(i)){var l="scale".concat(mC(i));return{scale:(ZG[l]||S1)(),realScaleType:ZG[l]?l:"point"}}return yt(i)?{scale:i}:{scale:S1(),realScaleType:"point"}},hK=1e-4,uBe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-hK,s=Math.max(i[0],i[1])+hK,a=t(n[0]),l=t(n[r-1]);(a<o||a>s||l<o||l>s)&&t.domain([n[0],n[r-1]])}},dBe=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},fBe=function(t,n){if(!n||n.length!==2||!Me(n[0])||!Me(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!Me(t[0])||t[0]<r)&&(o[0]=r),(!Me(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},hBe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,s=0,a=0;a<n;++a){var l=mm(t[a][r][1])?t[a][r][0]:t[a][r][1];l>=0?(t[a][r][0]=o,t[a][r][1]=o+l,o=t[a][r][1]):(t[a][r][0]=s,t[a][r][1]=s+l,s=t[a][r][1])}},pBe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,s=0;s<n;++s){var a=mm(t[s][r][1])?t[s][r][0]:t[s][r][1];a>=0?(t[s][r][0]=o,t[s][r][1]=o+a,o=t[s][r][1]):(t[s][r][0]=0,t[s][r][1]=0)}},mBe={sign:hBe,expand:qRe,none:d0,silhouette:WRe,wiggle:GRe,positive:pBe},gBe=function(t,n,r){var i=n.map(function(a){return a.props.dataKey}),o=mBe[r],s=URe().keys(i).value(function(a,l){return+To(a,l,0)}).order($j).offset(o);return s(t)},yBe=function(t,n,r,i,o,s){if(!t)return null;var a=s?n.reverse():n,l={},c=a.reduce(function(f,p){var m,y=(m=p.type)!==null&&m!==void 0&&m.defaultProps?Xn(Xn({},p.type.defaultProps),p.props):p.props,v=y.stackId,b=y.hide;if(b)return f;var C=y[r],S=f[C]||{hasStack:!1,stackGroups:{}};if(Nr(v)){var E=S.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};E.items.push(p),S.hasStack=!0,S.stackGroups[v]=E}else S.stackGroups[Kv("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return Xn(Xn({},f),{},Kp({},C,S))},l),d={};return Object.keys(c).reduce(function(f,p){var m=c[p];if(m.hasStack){var y={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,b){var C=m.stackGroups[b];return Xn(Xn({},v),{},Kp({},b,{numericAxisId:r,cateAxisId:i,items:C.items,stackedData:gBe(t,C.items,o)}))},y)}return Xn(Xn({},f),{},Kp({},p,m))},d)},vBe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,s=n.originalDomain,a=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(o&&i==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var c=t.domain();if(!c.length)return null;var d=jFe(c,o,a);return t.domain([NC(d),Ru(d)]),{niceTicks:d}}if(o&&i==="number"){var f=t.domain(),p=TFe(f,o,a);return{niceTicks:p}}return null};function pK(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Lt(i[t.dataKey])){var a=i3(n,"value",i[t.dataKey]);if(a)return a.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=To(i,Lt(s)?t.dataKey:s);return Lt(l)?null:t.scale(l)}var mK=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,s=t.entry,a=t.index;if(n.type==="category")return r[a]?r[a].coordinate+i:null;var l=To(s,n.dataKey,n.domain[a]);return Lt(l)?null:n.scale(l)-o/2+i},bBe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},xBe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Xn(Xn({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Nr(o)){var s=n[o];if(s){var a=s.items.indexOf(t);return a>=0?s.stackedData[a]:null}}return null},wBe=function(t){return t.reduce(function(n,r){return[NC(r.concat([n[0]]).filter(Me)),Ru(r.concat([n[1]]).filter(Me))]},[1/0,-1/0])},Sue=function(t,n,r){return Object.keys(t).reduce(function(i,o){var s=t[o],a=s.stackedData,l=a.reduce(function(c,d){var f=wBe(d.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},gK=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yK=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,uT=function(t,n,r){if(yt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Me(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(gK.test(t[0])){var o=+gK.exec(t[0])[1];i[0]=n[0]-o}else yt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Me(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(yK.test(t[1])){var s=+yK.exec(t[1])[1];i[1]=n[1]+s}else yt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},M3=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=CP(n,function(f){return f.coordinate}),s=1/0,a=1,l=o.length;a<l;a++){var c=o[a],d=o[a-1];s=Math.min((c.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return r?void 0:0},vK=function(t,n,r){return!t||!t.length||yy(t,ls(r,"type.defaultProps.domain"))?n:t},Eue=function(t,n){var r=t.type.defaultProps?Xn(Xn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,s=r.unit,a=r.formatter,l=r.tooltipType,c=r.chartType,d=r.hide;return Xn(Xn({},At(t,!1)),{},{dataKey:i,unit:s,formatter:a,name:o||i,color:KP(t),value:To(n,i),type:l,payload:n,chartType:c,hide:d})};function Cy(e){"@babel/helpers - typeof";return Cy=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},Cy(e)}function bK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bK(Object(n),!0).forEach(function(r){CBe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CBe(e,t,n){return t=SBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SBe(e){var t=EBe(e,"string");return Cy(t)=="symbol"?t:t+""}function EBe(e,t){if(Cy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O3=Math.PI/180,kBe=function(t){return t*180/Math.PI},ii=function(t,n,r,i){return{x:t+Math.cos(-O3*i)*r,y:n+Math.sin(-O3*i)*r}},_Be=function(t,n){var r=t.x,i=t.y,o=n.x,s=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-s,2))},ABe=function(t,n){var r=t.x,i=t.y,o=n.cx,s=n.cy,a=_Be({x:r,y:i},{x:o,y:s});if(a<=0)return{radius:a};var l=(r-o)/a,c=Math.acos(l);return i>s&&(c=2*Math.PI-c),{radius:a,angle:kBe(c),angleInRadian:c}},NBe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),s=Math.min(i,o);return{startAngle:n-s*360,endAngle:r-s*360}},jBe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),s=Math.floor(i/360),a=Math.min(o,s);return t+a*360},wK=function(t,n){var r=t.x,i=t.y,o=ABe({x:r,y:i},n),s=o.radius,a=o.angle,l=n.innerRadius,c=n.outerRadius;if(s<l||s>c)return!1;if(s===0)return!0;var d=NBe(n),f=d.startAngle,p=d.endAngle,m=a,y;if(f<=p){for(;m>p;)m-=360;for(;m<f;)m+=360;y=m>=f&&m<=p}else{for(;m>f;)m-=360;for(;m<p;)m+=360;y=m>=p&&m<=f}return y?xK(xK({},n),{},{radius:s,angle:jBe(m,n)}):null};function Sy(e){"@babel/helpers - typeof";return Sy=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},Sy(e)}var TBe=["offset"];function MBe(e){return DBe(e)||PBe(e)||RBe(e)||OBe()}function OBe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 142In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RBe(e,t){if(e){if(typeof e=="string")return dT(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 dT(e,t)}}function PBe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function DBe(e){if(Array.isArray(e))return dT(e)}function dT(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 IBe(e,t){if(e==null)return{};var n=LBe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function LBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function CK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CK(Object(n),!0).forEach(function(r){$Be(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Be(e,t,n){return t=zBe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zBe(e){var t=FBe(e,"string");return Sy(t)=="symbol"?t:t+""}function FBe(e,t){if(Sy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ey.apply(this,arguments)}var BBe=function(t){var n=t.value,r=t.formatter,i=Lt(t.children)?n:t.children;return yt(r)?r(i):i},HBe=function(t,n){var r=Gs(n-t),i=Math.min(Math.abs(n-t),360);return r*i},VBe=function(t,n,r){var i=t.position,o=t.viewBox,s=t.offset,a=t.className,l=o,c=l.cx,d=l.cy,f=l.innerRadius,p=l.outerRadius,m=l.startAngle,y=l.endAngle,v=l.clockWise,b=(f+p)/2,C=HBe(m,y),S=C>=0?1:-1,E,A;i==="insideStart"?(E=m+S*s,A=v):i==="insideEnd"?(E=y-S*s,A=!v):i==="end"&&(E=y+S*s,A=v),A=C<=0?A:!A;var _=ii(c,d,b,E),N=ii(c,d,b,E+(A?1:-1)*359),j="M".concat(_.x,",").concat(_.y,` 143 A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`, 144 `).concat(N.x,",").concat(N.y),T=Lt(t.id)?Kv("recharts-radial-line-"):t.id;return K.createElement("text",Ey({},r,{dominantBaseline:"central",className:Mt("recharts-radial-bar-label",a)}),K.createElement("defs",null,K.createElement("path",{id:T,d:j})),K.createElement("textPath",{xlinkHref:"#".concat(T)},n))},UBe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,s=o.cx,a=o.cy,l=o.innerRadius,c=o.outerRadius,d=o.startAngle,f=o.endAngle,p=(d+f)/2;if(i==="outside"){var m=ii(s,a,c+r,p),y=m.x,v=m.y;return{x:y,y:v,textAnchor:y>=s?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:s,y:a,textAnchor:"middle",verticalAnchor:"end"};var b=(l+c)/2,C=ii(s,a,b,p),S=C.x,E=C.y;return{x:S,y:E,textAnchor:"middle",verticalAnchor:"middle"}},qBe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,s=n,a=s.x,l=s.y,c=s.width,d=s.height,f=d>=0?1:-1,p=f*i,m=f>0?"end":"start",y=f>0?"start":"end",v=c>=0?1:-1,b=v*i,C=v>0?"end":"start",S=v>0?"start":"end";if(o==="top"){var E={x:a+c/2,y:l-f*i,textAnchor:"middle",verticalAnchor:m};return kr(kr({},E),r?{height:Math.max(l-r.y,0),width:c}:{})}if(o==="bottom"){var A={x:a+c/2,y:l+d+p,textAnchor:"middle",verticalAnchor:y};return kr(kr({},A),r?{height:Math.max(r.y+r.height-(l+d),0),width:c}:{})}if(o==="left"){var _={x:a-b,y:l+d/2,textAnchor:C,verticalAnchor:"middle"};return kr(kr({},_),r?{width:Math.max(_.x-r.x,0),height:d}:{})}if(o==="right"){var N={x:a+c+b,y:l+d/2,textAnchor:S,verticalAnchor:"middle"};return kr(kr({},N),r?{width:Math.max(r.x+r.width-N.x,0),height:d}:{})}var j=r?{width:c,height:d}:{};return o==="insideLeft"?kr({x:a+b,y:l+d/2,textAnchor:S,verticalAnchor:"middle"},j):o==="insideRight"?kr({x:a+c-b,y:l+d/2,textAnchor:C,verticalAnchor:"middle"},j):o==="insideTop"?kr({x:a+c/2,y:l+p,textAnchor:"middle",verticalAnchor:y},j):o==="insideBottom"?kr({x:a+c/2,y:l+d-p,textAnchor:"middle",verticalAnchor:m},j):o==="insideTopLeft"?kr({x:a+b,y:l+p,textAnchor:S,verticalAnchor:y},j):o==="insideTopRight"?kr({x:a+c-b,y:l+p,textAnchor:C,verticalAnchor:y},j):o==="insideBottomLeft"?kr({x:a+b,y:l+d-p,textAnchor:S,verticalAnchor:m},j):o==="insideBottomRight"?kr({x:a+c-b,y:l+d-p,textAnchor:C,verticalAnchor:m},j):pm(o)&&(Me(o.x)||vf(o.x))&&(Me(o.y)||vf(o.y))?kr({x:a+Kf(o.x,c),y:l+Kf(o.y,d),textAnchor:"end",verticalAnchor:"end"},j):kr({x:a+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},j)},WBe=function(t){return"cx"in t&&Me(t.cx)};function gi(e){var t=e.offset,n=t===void 0?5:t,r=IBe(e,TBe),i=kr({offset:n},r),o=i.viewBox,s=i.position,a=i.value,l=i.children,c=i.content,d=i.className,f=d===void 0?"":d,p=i.textBreakAll;if(!o||Lt(a)&&Lt(l)&&!x.isValidElement(c)&&!yt(c))return null;if(x.isValidElement(c))return x.cloneElement(c,i);var m;if(yt(c)){if(m=x.createElement(c,i),x.isValidElement(m))return m}else m=BBe(i);var y=WBe(o),v=At(i,!0);if(y&&(s==="insideStart"||s==="insideEnd"||s==="end"))return VBe(i,m,v);var b=y?UBe(i):qBe(i);return K.createElement(y3,Ey({className:Mt("recharts-label",f)},v,b,{breakAll:p}),m)}gi.displayName="Label";var kue=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,s=t.endAngle,a=t.r,l=t.radius,c=t.innerRadius,d=t.outerRadius,f=t.x,p=t.y,m=t.top,y=t.left,v=t.width,b=t.height,C=t.clockWise,S=t.labelViewBox;if(S)return S;if(Me(v)&&Me(b)){if(Me(f)&&Me(p))return{x:f,y:p,width:v,height:b};if(Me(m)&&Me(y))return{x:m,y,width:v,height:b}}return Me(f)&&Me(p)?{x:f,y:p,width:0,height:0}:Me(n)&&Me(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:s||i||0,innerRadius:c||0,outerRadius:d||l||a||0,clockWise:C}:t.viewBox?t.viewBox:{}},GBe=function(t,n){return t?t===!0?K.createElement(gi,{key:"label-implicit",viewBox:n}):Nr(t)?K.createElement(gi,{key:"label-implicit",viewBox:n,value:t}):x.isValidElement(t)?t.type===gi?x.cloneElement(t,{key:"label-implicit",viewBox:n}):K.createElement(gi,{key:"label-implicit",content:t,viewBox:n}):yt(t)?K.createElement(gi,{key:"label-implicit",content:t,viewBox:n}):pm(t)?K.createElement(gi,Ey({viewBox:n},t,{key:"label-implicit"})):null:null},KBe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=kue(t),s=ea(i,gi).map(function(l,c){return x.cloneElement(l,{viewBox:n||o,key:"label-".concat(c)})});if(!r)return s;var a=GBe(t.label,n||o);return[a].concat(MBe(s))};gi.parseViewBox=kue;gi.renderCallByParent=KBe;var y_,SK;function YBe(){if(SK)return y_;SK=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return y_=e,y_}var XBe=YBe();const ZBe=Ht(XBe);function ky(e){"@babel/helpers - typeof";return ky=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},ky(e)}var QBe=["valueAccessor"],JBe=["data","dataKey","clockWise","id","textBreakAll"];function eHe(e){return iHe(e)||rHe(e)||nHe(e)||tHe()}function tHe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 145In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nHe(e,t){if(e){if(typeof e=="string")return fT(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 fT(e,t)}}function rHe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iHe(e){if(Array.isArray(e))return fT(e)}function fT(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 R3(){return R3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R3.apply(this,arguments)}function EK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?EK(Object(n),!0).forEach(function(r){oHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oHe(e,t,n){return t=sHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sHe(e){var t=aHe(e,"string");return ky(t)=="symbol"?t:t+""}function aHe(e,t){if(ky(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ky(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _K(e,t){if(e==null)return{};var n=lHe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lHe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var cHe=function(t){return Array.isArray(t.value)?ZBe(t.value):t.value};function Gu(e){var t=e.valueAccessor,n=t===void 0?cHe:t,r=_K(e,QBe),i=r.data,o=r.dataKey,s=r.clockWise,a=r.id,l=r.textBreakAll,c=_K(r,JBe);return!i||!i.length?null:K.createElement(Hn,{className:"recharts-label-list"},i.map(function(d,f){var p=Lt(o)?n(d,f):To(d&&d.payload,o),m=Lt(a)?{}:{id:"".concat(a,"-").concat(f)};return K.createElement(gi,R3({},At(d,!0),c,m,{parentViewBox:d.parentViewBox,value:p,textBreakAll:l,viewBox:gi.parseViewBox(Lt(s)?d:kK(kK({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}Gu.displayName="LabelList";function uHe(e,t){return e?e===!0?K.createElement(Gu,{key:"labelList-implicit",data:t}):K.isValidElement(e)||yt(e)?K.createElement(Gu,{key:"labelList-implicit",data:t,content:e}):pm(e)?K.createElement(Gu,R3({data:t},e,{key:"labelList-implicit"})):null:null}function dHe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=ea(r,Gu).map(function(s,a){return x.cloneElement(s,{data:t,key:"labelList-".concat(a)})});if(!n)return i;var o=uHe(e.label,t);return[o].concat(eHe(i))}Gu.renderCallByParent=dHe;function _y(e){"@babel/helpers - typeof";return _y=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},_y(e)}function hT(){return hT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hT.apply(this,arguments)}function AK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AK(Object(n),!0).forEach(function(r){fHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fHe(e,t,n){return t=hHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hHe(e){var t=pHe(e,"string");return _y(t)=="symbol"?t:t+""}function pHe(e,t){if(_y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mHe=function(t,n){var r=Gs(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},y2=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,s=t.sign,a=t.isExternal,l=t.cornerRadius,c=t.cornerIsExternal,d=l*(a?1:-1)+i,f=Math.asin(l/d)/O3,p=c?o:o+s*f,m=ii(n,r,d,p),y=ii(n,r,i,p),v=c?o-s*f:o,b=ii(n,r,d*Math.cos(f*O3),v);return{center:m,circleTangency:y,lineTangency:b,theta:f}},_ue=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.startAngle,a=t.endAngle,l=mHe(s,a),c=s+l,d=ii(n,r,o,s),f=ii(n,r,o,c),p="M ".concat(d.x,",").concat(d.y,` 146 A `).concat(o,",").concat(o,`,0, 147 `).concat(+(Math.abs(l)>180),",").concat(+(s>c),`, 148 `).concat(f.x,",").concat(f.y,` 149 `);if(i>0){var m=ii(n,r,i,s),y=ii(n,r,i,c);p+="L ".concat(y.x,",").concat(y.y,` 150 A `).concat(i,",").concat(i,`,0, 151 `).concat(+(Math.abs(l)>180),",").concat(+(s<=c),`, 152 `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},gHe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,s=t.cornerRadius,a=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,f=Gs(d-c),p=y2({cx:n,cy:r,radius:o,angle:c,sign:f,cornerRadius:s,cornerIsExternal:l}),m=p.circleTangency,y=p.lineTangency,v=p.theta,b=y2({cx:n,cy:r,radius:o,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:l}),C=b.circleTangency,S=b.lineTangency,E=b.theta,A=l?Math.abs(c-d):Math.abs(c-d)-v-E;if(A<0)return a?"M ".concat(y.x,",").concat(y.y,` 153 a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0 154 a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0 155 `):_ue({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:d});var _="M ".concat(y.x,",").concat(y.y,` 156 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(m.x,",").concat(m.y,` 157 A`).concat(o,",").concat(o,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(C.x,",").concat(C.y,` 158 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(S.x,",").concat(S.y,` 159 `);if(i>0){var N=y2({cx:n,cy:r,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),j=N.circleTangency,T=N.lineTangency,O=N.theta,D=y2({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),R=D.circleTangency,I=D.lineTangency,F=D.theta,$=l?Math.abs(c-d):Math.abs(c-d)-O-F;if($<0&&s===0)return"".concat(_,"L").concat(n,",").concat(r,"Z");_+="L".concat(I.x,",").concat(I.y,` 160 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(R.x,",").concat(R.y,` 161 A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(f>0),",").concat(j.x,",").concat(j.y,` 162 A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,"Z")}else _+="L".concat(n,",").concat(r,"Z");return _},yHe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Aue=function(t){var n=NK(NK({},yHe),t),r=n.cx,i=n.cy,o=n.innerRadius,s=n.outerRadius,a=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,p=n.className;if(s<o||d===f)return null;var m=Mt("recharts-sector",p),y=s-o,v=Kf(a,y,0,!0),b;return v>0&&Math.abs(d-f)<360?b=gHe({cx:r,cy:i,innerRadius:o,outerRadius:s,cornerRadius:Math.min(v,y/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:f}):b=_ue({cx:r,cy:i,innerRadius:o,outerRadius:s,startAngle:d,endAngle:f}),K.createElement("path",hT({},At(n,!0),{className:m,d:b,role:"img"}))};function Ay(e){"@babel/helpers - typeof";return Ay=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},Ay(e)}function pT(){return pT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pT.apply(this,arguments)}function jK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jK(Object(n),!0).forEach(function(r){vHe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vHe(e,t,n){return t=bHe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bHe(e){var t=xHe(e,"string");return Ay(t)=="symbol"?t:t+""}function xHe(e,t){if(Ay(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ay(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var MK={curveBasisClosed:RRe,curveBasisOpen:PRe,curveBasis:ORe,curveBumpX:vRe,curveBumpY:bRe,curveLinearClosed:DRe,curveLinear:yC,curveMonotoneX:IRe,curveMonotoneY:LRe,curveNatural:$Re,curveStep:zRe,curveStepAfter:BRe,curveStepBefore:FRe},v2=function(t){return t.x===+t.x&&t.y===+t.y},Dg=function(t){return t.x},Ig=function(t){return t.y},wHe=function(t,n){if(yt(t))return t;var r="curve".concat(mC(t));return(r==="curveMonotone"||r==="curveBump")&&n?MK["".concat(r).concat(n==="vertical"?"Y":"X")]:MK[r]||yC},CHe=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,s=t.baseLine,a=t.layout,l=t.connectNulls,c=l===void 0?!1:l,d=wHe(r,a),f=c?o.filter(function(v){return v2(v)}):o,p;if(Array.isArray(s)){var m=c?s.filter(function(v){return v2(v)}):s,y=f.map(function(v,b){return TK(TK({},v),{},{base:m[b]})});return a==="vertical"?p=l2().y(Ig).x1(Dg).x0(function(v){return v.base.x}):p=l2().x(Dg).y1(Ig).y0(function(v){return v.base.y}),p.defined(v2).curve(d),p(y)}return a==="vertical"&&Me(s)?p=l2().y(Ig).x1(Dg).x0(s):Me(s)?p=l2().x(Dg).y1(Ig).y0(s):p=Nle().x(Dg).y(Ig),p.defined(v2).curve(d),p(f)},k1=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var s=r&&r.length?CHe(t):i;return K.createElement("path",pT({},At(t,!1),o3(t),{className:Mt("recharts-curve",n),d:s,ref:o}))},v_={exports:{}},b_,OK;function SHe(){if(OK)return b_;OK=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return b_=e,b_}var x_,RK;function EHe(){if(RK)return x_;RK=1;var e=SHe();function t(){}function n(){}return n.resetWarningCache=t,x_=function(){function r(s,a,l,c,d,f){if(f!==e){var p=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 p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},x_}var PK;function kHe(){return PK||(PK=1,v_.exports=EHe()()),v_.exports}var _He=kHe();const nn=Ht(_He),{getOwnPropertyNames:AHe,getOwnPropertySymbols:NHe}=Object,{hasOwnProperty:jHe}=Object.prototype;function w_(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function b2(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:o}=i,s=o.get(n),a=o.get(r);if(s&&a)return s===r&&a===n;o.set(n,r),o.set(r,n);const l=e(n,r,i);return o.delete(n),o.delete(r),l}}function THe(e){return e!=null?e[Symbol.toStringTag]:void 0}function DK(e){return AHe(e).concat(NHe(e))}const MHe=Object.hasOwn||((e,t)=>jHe.call(e,t));function bh(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const OHe="__v",RHe="__o",PHe="_owner",{getOwnPropertyDescriptor:IK,keys:LK}=Object;function DHe(e,t){return e.byteLength===t.byteLength&&P3(new Uint8Array(e),new Uint8Array(t))}function IHe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function LHe(e,t){return e.byteLength===t.byteLength&&P3(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function $He(e,t){return bh(e.getTime(),t.getTime())}function zHe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function FHe(e,t){return e===t}function $K(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let s,a,l=0;for(;(s=o.next())&&!s.done;){const c=t.entries();let d=!1,f=0;for(;(a=c.next())&&!a.done;){if(i[f]){f++;continue}const p=s.value,m=a.value;if(n.equals(p[0],m[0],l,f,e,t,n)&&n.equals(p[1],m[1],p[0],m[0],e,t,n)){d=i[f]=!0;break}f++}if(!d)return!1;l++}return!0}const BHe=bh;function HHe(e,t,n){const r=LK(e);let i=r.length;if(LK(t).length!==i)return!1;for(;i-- >0;)if(!Nue(e,t,n,r[i]))return!1;return!0}function Lg(e,t,n){const r=DK(e);let i=r.length;if(DK(t).length!==i)return!1;let o,s,a;for(;i-- >0;)if(o=r[i],!Nue(e,t,n,o)||(s=IK(e,o),a=IK(t,o),(s||a)&&(!s||!a||s.configurable!==a.configurable||s.enumerable!==a.enumerable||s.writable!==a.writable)))return!1;return!0}function VHe(e,t){return bh(e.valueOf(),t.valueOf())}function UHe(e,t){return e.source===t.source&&e.flags===t.flags}function zK(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let s,a;for(;(s=o.next())&&!s.done;){const l=t.values();let c=!1,d=0;for(;(a=l.next())&&!a.done;){if(!i[d]&&n.equals(s.value,a.value,s.value,a.value,e,t,n)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function P3(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function qHe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function Nue(e,t,n,r){return(r===PHe||r===RHe||r===OHe)&&(e.$$typeof||t.$$typeof)?!0:MHe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const WHe="[object ArrayBuffer]",GHe="[object Arguments]",KHe="[object Boolean]",YHe="[object DataView]",XHe="[object Date]",ZHe="[object Error]",QHe="[object Map]",JHe="[object Number]",eVe="[object Object]",tVe="[object RegExp]",nVe="[object Set]",rVe="[object String]",iVe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},oVe="[object URL]",sVe=Object.prototype.toString;function aVe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:s,areNumbersEqual:a,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:d,areSetsEqual:f,areTypedArraysEqual:p,areUrlsEqual:m,unknownTagComparators:y}){return function(b,C,S){if(b===C)return!0;if(b==null||C==null)return!1;const E=typeof b;if(E!==typeof C)return!1;if(E!=="object")return E==="number"?a(b,C,S):E==="function"?o(b,C,S):!1;const A=b.constructor;if(A!==C.constructor)return!1;if(A===Object)return l(b,C,S);if(Array.isArray(b))return t(b,C,S);if(A===Date)return r(b,C,S);if(A===RegExp)return d(b,C,S);if(A===Map)return s(b,C,S);if(A===Set)return f(b,C,S);const _=sVe.call(b);if(_===XHe)return r(b,C,S);if(_===tVe)return d(b,C,S);if(_===QHe)return s(b,C,S);if(_===nVe)return f(b,C,S);if(_===eVe)return typeof b.then!="function"&&typeof C.then!="function"&&l(b,C,S);if(_===oVe)return m(b,C,S);if(_===ZHe)return i(b,C,S);if(_===GHe)return l(b,C,S);if(iVe[_])return p(b,C,S);if(_===WHe)return e(b,C,S);if(_===YHe)return n(b,C,S);if(_===KHe||_===JHe||_===rVe)return c(b,C,S);if(y){let N=y[_];if(!N){const j=THe(b);j&&(N=y[j])}if(N)return N(b,C,S)}return!1}}function lVe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:DHe,areArraysEqual:n?Lg:IHe,areDataViewsEqual:LHe,areDatesEqual:$He,areErrorsEqual:zHe,areFunctionsEqual:FHe,areMapsEqual:n?w_($K,Lg):$K,areNumbersEqual:BHe,areObjectsEqual:n?Lg:HHe,arePrimitiveWrappersEqual:VHe,areRegExpsEqual:UHe,areSetsEqual:n?w_(zK,Lg):zK,areTypedArraysEqual:n?w_(P3,Lg):P3,areUrlsEqual:qHe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=b2(r.areArraysEqual),o=b2(r.areMapsEqual),s=b2(r.areObjectsEqual),a=b2(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:a})}return r}function cVe(e){return function(t,n,r,i,o,s,a){return e(t,n,a)}}function uVe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,l){const{cache:c=e?new WeakMap:void 0,meta:d}=n();return t(a,l,{cache:c,equals:r,meta:d,strict:i})};if(e)return function(a,l){return t(a,l,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(a,l){return t(a,l,o)}}const jue=_d();_d({strict:!0});_d({circular:!0});_d({circular:!0,strict:!0});_d({createInternalComparator:()=>bh});_d({strict:!0,createInternalComparator:()=>bh});_d({circular:!0,createInternalComparator:()=>bh});_d({circular:!0,createInternalComparator:()=>bh,strict:!0});function _d(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=lVe(e),s=aVe(o),a=n?n(s):cVe(s);return uVe({circular:t,comparator:s,createState:r,equals:a,strict:i})}function dVe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function FK(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):dVe(i)};requestAnimationFrame(r)}function mT(e){"@babel/helpers - typeof";return mT=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},mT(e)}function fVe(e){return gVe(e)||mVe(e)||pVe(e)||hVe()}function hVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 163In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pVe(e,t){if(e){if(typeof e=="string")return BK(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 BK(e,t)}}function BK(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 mVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gVe(e){if(Array.isArray(e))return e}function yVe(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,a=fVe(s),l=a[0],c=a.slice(1);if(typeof l=="number"){FK(i.bind(null,c),l);return}i(l),FK(i.bind(null,c));return}mT(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function Ny(e){"@babel/helpers - typeof";return Ny=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},Ny(e)}function HK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HK(Object(n),!0).forEach(function(r){Tue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tue(e,t,n){return t=vVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vVe(e){var t=bVe(e,"string");return Ny(t)==="symbol"?t:String(t)}function bVe(e,t){if(Ny(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ny(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xVe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},wVe=function(t){return t},CVe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},_1=function(t,n){return Object.keys(n).reduce(function(r,i){return VK(VK({},r),{},Tue({},i,t(i,n[i])))},{})},UK=function(t,n,r){return t.map(function(i){return"".concat(CVe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function SVe(e,t){return _Ve(e)||kVe(e,t)||Mue(e,t)||EVe()}function EVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 164In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function _Ve(e){if(Array.isArray(e))return e}function AVe(e){return TVe(e)||jVe(e)||Mue(e)||NVe()}function NVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 165In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mue(e,t){if(e){if(typeof e=="string")return gT(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 gT(e,t)}}function jVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function TVe(e){if(Array.isArray(e))return gT(e)}function gT(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}var D3=1e-4,Oue=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Rue=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},qK=function(t,n){return function(r){var i=Oue(t,n);return Rue(i,r)}},MVe=function(t,n){return function(r){var i=Oue(t,n),o=[].concat(AVe(i.map(function(s,a){return s*a}).slice(1)),[0]);return Rue(o,r)}},WK=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],s=n[2],a=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,s=1,a=1;break;case"ease":i=.25,o=.1,s=.25,a=1;break;case"ease-in":i=.42,o=0,s=1,a=1;break;case"ease-out":i=.42,o=0,s=.58,a=1;break;case"ease-in-out":i=0,o=0,s=.58,a=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),d=SVe(c,4);i=d[0],o=d[1],s=d[2],a=d[3]}}}var f=qK(i,s),p=qK(o,a),m=MVe(i,s),y=function(C){return C>1?1:C<0?0:C},v=function(C){for(var S=C>1?1:C,E=S,A=0;A<8;++A){var _=f(E)-S,N=m(E);if(Math.abs(_-S)<D3||N<D3)return p(E);E=y(E-_/N)}return p(E)};return v.isStepper=!1,v},OVe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,s=t.dt,a=s===void 0?17:s,l=function(d,f,p){var m=-(d-f)*r,y=p*o,v=p+(m-y)*a/1e3,b=p*a/1e3+d;return Math.abs(b-f)<D3&&Math.abs(v)<D3?[f,0]:[b,v]};return l.isStepper=!0,l.dt=a,l},RVe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return WK(i);case"spring":return OVe();default:if(i.split("(")[0]==="cubic-bezier")return WK(i)}return typeof i=="function"?i:null};function jy(e){"@babel/helpers - typeof";return jy=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},jy(e)}function GK(e){return IVe(e)||DVe(e)||Pue(e)||PVe()}function PVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 166In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IVe(e){if(Array.isArray(e))return vT(e)}function KK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KK(Object(n),!0).forEach(function(r){yT(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yT(e,t,n){return t=LVe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LVe(e){var t=$Ve(e,"string");return jy(t)==="symbol"?t:String(t)}function $Ve(e,t){if(jy(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jy(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zVe(e,t){return HVe(e)||BVe(e,t)||Pue(e,t)||FVe()}function FVe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 167In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pue(e,t){if(e){if(typeof e=="string")return vT(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 vT(e,t)}}function vT(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 BVe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function HVe(e){if(Array.isArray(e))return e}var I3=function(t,n,r){return t+(n-t)*r},bT=function(t){var n=t.from,r=t.to;return n!==r},VVe=function e(t,n,r){var i=_1(function(o,s){if(bT(s)){var a=t(s.from,s.to,s.velocity),l=zVe(a,2),c=l[0],d=l[1];return Zr(Zr({},s),{},{from:c,velocity:d})}return s},n);return r<1?_1(function(o,s){return bT(s)?Zr(Zr({},s),{},{velocity:I3(s.velocity,i[o].velocity,r),from:I3(s.from,i[o].from,r)}):s},n):e(t,i,r-1)};const UVe=function(e,t,n,r,i){var o=xVe(e,t),s=o.reduce(function(b,C){return Zr(Zr({},b),{},yT({},C,[e[C],t[C]]))},{}),a=o.reduce(function(b,C){return Zr(Zr({},b),{},yT({},C,{from:e[C],velocity:0,to:t[C]}))},{}),l=-1,c,d,f=function(){return null},p=function(){return _1(function(C,S){return S.from},a)},m=function(){return!Object.values(a).filter(bT).length},y=function(C){c||(c=C);var S=C-c,E=S/n.dt;a=VVe(n,a,E),i(Zr(Zr(Zr({},e),t),p())),c=C,m()||(l=requestAnimationFrame(f))},v=function(C){d||(d=C);var S=(C-d)/r,E=_1(function(_,N){return I3.apply(void 0,GK(N).concat([n(S)]))},s);if(i(Zr(Zr(Zr({},e),t),E)),S<1)l=requestAnimationFrame(f);else{var A=_1(function(_,N){return I3.apply(void 0,GK(N).concat([n(1)]))},s);i(Zr(Zr(Zr({},e),t),A))}};return f=n.isStepper?y:v,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function x0(e){"@babel/helpers - typeof";return x0=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},x0(e)}var qVe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function WVe(e,t){if(e==null)return{};var n=GVe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GVe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function C_(e){return ZVe(e)||XVe(e)||YVe(e)||KVe()}function KVe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 168In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YVe(e,t){if(e){if(typeof e=="string")return xT(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 xT(e,t)}}function XVe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZVe(e){if(Array.isArray(e))return xT(e)}function xT(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 YK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function js(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YK(Object(n),!0).forEach(function(r){s1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function s1(e,t,n){return t=Due(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QVe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JVe(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,Due(r.key),r)}}function eUe(e,t,n){return t&&JVe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Due(e){var t=tUe(e,"string");return x0(t)==="symbol"?t:String(t)}function tUe(e,t){if(x0(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(x0(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nUe(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&&wT(e,t)}function wT(e,t){return wT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wT(e,t)}function rUe(e){var t=iUe();return function(){var r=L3(e),i;if(t){var o=L3(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return CT(this,i)}}function CT(e,t){if(t&&(x0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ST(e)}function ST(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iUe(){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 L3(e){return L3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},L3(e)}var xc=function(e){nUe(n,e);var t=rUe(n);function n(r,i){var o;QVe(this,n),o=t.call(this,r,i);var s=o.props,a=s.isActive,l=s.attributeName,c=s.from,d=s.to,f=s.steps,p=s.children,m=s.duration;if(o.handleStyleChange=o.handleStyleChange.bind(ST(o)),o.changeStyle=o.changeStyle.bind(ST(o)),!a||m<=0)return o.state={style:{}},typeof p=="function"&&(o.state={style:d}),CT(o);if(f&&f.length)o.state={style:f[0].style};else if(c){if(typeof p=="function")return o.state={style:c},CT(o);o.state={style:l?s1({},l,c):c}}else o.state={style:{}};return o}return eUe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,s=i.canBegin;this.mounted=!0,!(!o||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isActive,a=o.canBegin,l=o.attributeName,c=o.shouldReAnimate,d=o.to,f=o.from,p=this.state.style;if(a){if(!s){var m={style:l?s1({},l,d):d};this.state&&p&&(l&&p[l]!==d||!l&&p!==d)&&this.setState(m);return}if(!(jue(i.to,d)&&i.canBegin&&i.isActive)){var y=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=y||c?f:i.to;if(this.state&&p){var b={style:l?s1({},l,v):v};(l&&p[l]!==v||!l&&p!==v)&&this.setState(b)}this.runAnimation(js(js({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,s=i.from,a=i.to,l=i.duration,c=i.easing,d=i.begin,f=i.onAnimationEnd,p=i.onAnimationStart,m=UVe(s,a,RVe(c),l,this.changeStyle),y=function(){o.stopJSAnimation=m()};this.manager.start([p,d,y,l,f])}},{key:"runStepAnimation",value:function(i){var o=this,s=i.steps,a=i.begin,l=i.onAnimationStart,c=s[0],d=c.style,f=c.duration,p=f===void 0?0:f,m=function(v,b,C){if(C===0)return v;var S=b.duration,E=b.easing,A=E===void 0?"ease":E,_=b.style,N=b.properties,j=b.onAnimationEnd,T=C>0?s[C-1]:b,O=N||Object.keys(_);if(typeof A=="function"||A==="spring")return[].concat(C_(v),[o.runJSAnimation.bind(o,{from:T.style,to:_,duration:S,easing:A}),S]);var D=UK(O,S,A),R=js(js(js({},T.style),_),{},{transition:D});return[].concat(C_(v),[R,S,j]).filter(wVe)};return this.manager.start([l].concat(C_(s.reduce(m,[d,Math.max(p,a)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=yVe());var o=i.begin,s=i.duration,a=i.attributeName,l=i.to,c=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,p=i.steps,m=i.children,y=this.manager;if(this.unSubscribe=y.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var v=a?s1({},a,l):l,b=UK(Object.keys(v),s,c);y.start([d,o,js(js({},v),{},{transition:b}),s,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var s=i.duration;i.attributeName,i.easing;var a=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=WVe(i,qVe),c=x.Children.count(o),d=this.state.style;if(typeof o=="function")return o(d);if(!a||c===0||s<=0)return o;var f=function(m){var y=m.props,v=y.style,b=v===void 0?{}:v,C=y.className,S=x.cloneElement(m,js(js({},l),{},{style:js(js({},b),d),className:C}));return S};return c===1?f(x.Children.only(o)):K.createElement("div",null,x.Children.map(o,function(p){return f(p)}))}}]),n}
vendor: 5,034 bytes, line 168
168(x.PureComponent);xc.displayName="Animate";xc.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};xc.propTypes={from:nn.oneOfType([nn.object,nn.string]),to:nn.oneOfType([nn.object,nn.string]),attributeName:nn.string,duration:nn.number,begin:nn.number,easing:nn.oneOfType([nn.string,nn.func]),steps:nn.arrayOf(nn.shape({duration:nn.number.isRequired,style:nn.object.isRequired,easing:nn.oneOfType([nn.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),nn.func]),properties:nn.arrayOf("string"),onAnimationEnd:nn.func})),children:nn.oneOfType([nn.node,nn.func]),isActive:nn.bool,canBegin:nn.bool,onAnimationEnd:nn.func,shouldReAnimate:nn.bool,onAnimationStart:nn.func,onAnimationReStart:nn.func};function Xe(){return Xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xe.apply(null,arguments)}function YP(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $3(e,t){return $3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},$3(e,t)}function Iue(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$3(e,t)}const XK={disabled:!1},z3=K.createContext(null);var oUe=function(t){return t.scrollTop},a1="unmounted",ff="exited",hf="entering",Np="entered",ET="exiting",nl=function(e){Iue(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=ff,o.appearStatus=hf):l=Np:r.unmountOnExit||r.mountOnEnter?l=a1:l=ff,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===a1?{status:ff}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==hf&&s!==Np&&(o=hf):(s===hf||s===Np)&&(o=ET)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===hf){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Fs.findDOMNode(this);s&&oUe(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ff&&this.setState({status:a1})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[Fs.findDOMNode(this),a],c=l[0],d=l[1],f=this.getTimeouts(),p=a?f.appear:f.enter;if(!i&&!s||XK.disabled){this.safeSetState({status:Np},function(){o.props.onEntered(c)});return}this.props.onEnter(c,d),this.safeSetState({status:hf},function(){o.props.onEntering(c,d),o.onTransitionEnd(p,function(){o.safeSetState({status:Np},function(){o.props.onEntered(c,d)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Fs.findDOMNode(this);if(!o||XK.disabled){this.safeSetState({status:ff},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:ET},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ff},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:Fs.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],c=l[0],d=l[1];this.props.addEndListener(c,d)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===a1)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=YP(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return K.createElement(z3.Provider,{value:null},typeof s=="function"?s(i,a):K.cloneElement(K.Children.only(s),a))},t}(K.Component);nl.contextType=z3;
vendor: 1,158 bytes, line 168
168nl.propTypes={};function gp(){}nl.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gp,onEntering:gp,onEntered:gp,onExit:gp,onExiting:gp,onExited:gp};nl.UNMOUNTED=a1;nl.EXITED=ff;nl.ENTERING=hf;nl.ENTERED=Np;nl.EXITING=ET;function Lue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XP(e,t){var n=function(o){return t&&x.isValidElement(o)?t(o):o},r=Object.create(null);return e&&x.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function sUe(e,t){e=e||{},t=t||{};function n(d){return d in t?t[d]:e[d]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;s<r[l].length;s++){var c=r[l][s];a[r[l][s]]=n(c)}a[l]=n(l)}for(s=0;s<i.length;s++)a[i[s]]=n(i[s]);return a}function wf(e,t,n){return n[t]!=null?n[t]:e.props[t]}function aUe(e,t){return XP(e.children,function(n){return x.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:wf(n,"appear",e),enter:wf(n,"enter",e),exit:wf(n,"exit",e)})})}function lUe(e,t,n){var r=XP(e.children),i=sUe(t,r);
168return Object.keys(i).forEach(function(o){var s=i[o];if(x.isValidElement(s)){var a=o in t,l=o in r,c=t[o],d=x.isValidElement(c)&&!c.props.in;l&&(!a||d)?i[o]=x.cloneElement(s,{onExited:n.bind(null,s),in:!0,exit:wf(s,"exit",e),enter:wf(s,"enter",e)}):!l&&a&&!d?i[o]=x.cloneElement(s,{in:!1}):l&&a&&x.isValidElement(c)&&(i[o]=x.cloneElement(s,{onExited:n.bind(null,s),in:c.props.in,exit:wf(s,"exit",e),enter:wf(s,"enter",e)}))}}),i}var cUe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},uUe={component:"div",childFactory:function(t){return t}},OC=function(e){Iue(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=o.handleExited.bind(Lue(o));return o.state={contextValue:{isMounting:!0},handleExited:s,firstRender:!0},o}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(i,o){var s=o.children,a=o.handleExited,l=o.firstRender;return{children:l?aUe(i,a):lUe(i,s,a),firstRender:!1}},n.handleExited=function(i,o){var s=XP(this.props.children);i.key in s||(i.props.onExited&&i.props.onExited(o),this.mounted&&this.setState(function(a){var l=Xe({},a.children);return delete l[i.key],{children:l}}))},n.render=function(){var i=this.props,o=i.component,s=i.childFactory,a=YP(i,["component","childFactory"]),l=this.state.contextValue,c=cUe(this.state.children).map(s);return delete a.appear,delete a.enter,delete a.exit,o===null?K.createElement(z3.Provider,{value:l},c):K.createElement(z3.Provider,{value:l},K.createElement(o,a,c))},t}(K.Component);OC.propTypes={};OC.defaultProps=uUe;function Ty(e){"@babel/helpers - typeof";return Ty=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},Ty(e)}function F3(){return F3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F3.apply(this,arguments)}function dUe(e,t){return mUe(e)||pUe(e,t)||hUe(e,t)||fUe()}function fUe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 169In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hUe(e,t){if(e){if(typeof e=="string")return ZK(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 ZK(e,t)}}function ZK(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 pUe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function mUe(e){if(Array.isArray(e))return e}function QK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function JK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QK(Object(n),!0).forEach(function(r){gUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QK(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gUe(e,t,n){return t=yUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yUe(e){var t=vUe(e,"string");return Ty(t)=="symbol"?t:t+""}function vUe(e,t){if(Ty(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ty(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eY=function(t,n,r,i,o){var s=Math.min(Math.abs(r)/2,Math.abs(i)/2),a=i>
vendor: 138,351 bytes, lines 169-184
169=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,d;if(s>0&&o instanceof Array){for(var f=[0,0,0,0],p=0,m=4;p<m;p++)f[p]=o[p]>s?s:o[p];d="M".concat(t,",").concat(n+a*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(n)),d+="L ".concat(t+r-l*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`, 170 `).concat(t+r,",").concat(n+a*f[1])),d+="L ".concat(t+r,",").concat(n+i-a*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`, 171 `).concat(t+r-l*f[2],",").concat(n+i)),d+="L ".concat(t+l*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`, 172 `).concat(t,",").concat(n+i-a*f[3])),d+="Z"}else if(s>0&&o===+o&&o>0){var y=Math.min(s,o);d="M ".concat(t,",").concat(n+a*y,` 173 A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+l*y,",").concat(n,` 174 L `).concat(t+r-l*y,",").concat(n,` 175 A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+r,",").concat(n+a*y,` 176 L `).concat(t+r,",").concat(n+i-a*y,` 177 A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t+r-l*y,",").concat(n+i,` 178 L `).concat(t+l*y,",").concat(n+i,` 179 A `).concat(y,",").concat(y,",0,0,").concat(c,",").concat(t,",").concat(n+i-a*y," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},bUe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,s=n.y,a=n.width,l=n.height;if(Math.abs(a)>0&&Math.abs(l)>0){var c=Math.min(o,o+a),d=Math.max(o,o+a),f=Math.min(s,s+l),p=Math.max(s,s+l);return r>=c&&r<=d&&i>=f&&i<=p}return!1},xUe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ZP=function(t){var n=JK(JK({},xUe),t),r=x.useRef(),i=x.useState(-1),o=dUe(i,2),s=o[0],a=o[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&a(A)}catch{}},[]);var l=n.x,c=n.y,d=n.width,f=n.height,p=n.radius,m=n.className,y=n.animationEasing,v=n.animationDuration,b=n.animationBegin,C=n.isAnimationActive,S=n.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||d===0||f===0)return null;var E=Mt("recharts-rectangle",m);return S?K.createElement(xc,{canBegin:s>0,from:{width:d,height:f,x:l,y:c},to:{width:d,height:f,x:l,y:c},duration:v,animationEasing:y,isActive:S},function(A){var _=A.width,N=A.height,j=A.x,T=A.y;return K.createElement(xc,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:C,easing:y},K.createElement("path",F3({},At(n,!0),{className:E,d:eY(j,T,_,N,p),ref:r})))}):K.createElement("path",F3({},At(n,!0),{className:E,d:eY(l,c,d,f,p)}))};function kT(){return kT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kT.apply(this,arguments)}var QP=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,s=Mt("recharts-dot",o);return n===+n&&r===+r&&i===+i?K.createElement("circle",kT({},At(t,!1),o3(t),{className:s,cx:n,cy:r,r:i})):null};function My(e){"@babel/helpers - typeof";return My=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},My(e)}var wUe=["x","y","top","left","width","height","className"];function _T(){return _T=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_T.apply(this,arguments)}function tY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CUe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tY(Object(n),!0).forEach(function(r){SUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SUe(e,t,n){return t=EUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EUe(e){var t=kUe(e,"string");return My(t)=="symbol"?t:t+""}function kUe(e,t){if(My(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(My(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _Ue(e,t){if(e==null)return{};var n=AUe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var NUe=function(t,n,r,i,o,s){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(s,",").concat(n,"h").concat(r)},jUe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,s=t.top,a=s===void 0?0:s,l=t.left,c=l===void 0?0:l,d=t.width,f=d===void 0?0:d,p=t.height,m=p===void 0?0:p,y=t.className,v=_Ue(t,wUe),b=CUe({x:r,y:o,top:a,left:c,width:f,height:m},v);return!Me(r)||!Me(o)||!Me(f)||!Me(m)||!Me(a)||!Me(c)?null:K.createElement("path",_T({},At(b,!0),{className:Mt("recharts-cross",y),d:NUe(r,o,f,m,a,c)}))},S_,nY;function TUe(){if(nY)return S_;nY=1;var e=Zle(),t=e(Object.getPrototypeOf,Object);return S_=t,S_}var E_,rY;function MUe(){if(rY)return E_;rY=1;var e=Ac(),t=TUe(),n=Nc(),r="[object Object]",i=Function.prototype,o=Object.prototype,s=i.toString,a=o.hasOwnProperty,l=s.call(Object);function c(d){if(!n(d)||e(d)!=r)return!1;var f=t(d);if(f===null)return!0;var p=a.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&s.call(p)==l}return E_=c,E_}var OUe=MUe();const RUe=Ht(OUe);var k_,iY;function PUe(){if(iY)return k_;iY=1;var e=Ac(),t=Nc(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return k_=r,k_}var DUe=PUe();const IUe=Ht(DUe);function Oy(e){"@babel/helpers - typeof";return Oy=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},Oy(e)}function B3(){return B3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B3.apply(this,arguments)}function LUe(e,t){return BUe(e)||FUe(e,t)||zUe(e,t)||$Ue()}function $Ue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 180In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zUe(e,t){if(e){if(typeof e=="string")return oY(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 oY(e,t)}}function oY(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 FUe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function BUe(e){if(Array.isArray(e))return e}function sY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function aY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sY(Object(n),!0).forEach(function(r){HUe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HUe(e,t,n){return t=VUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VUe(e){var t=UUe(e,"string");return Oy(t)=="symbol"?t:t+""}function UUe(e,t){if(Oy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Oy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var lY=function(t,n,r,i,o){var s=r-i,a;return a="M ".concat(t,",").concat(n),a+="L ".concat(t+r,",").concat(n),a+="L ".concat(t+r-s/2,",").concat(n+o),a+="L ".concat(t+r-s/2-i,",").concat(n+o),a+="L ".concat(t,",").concat(n," Z"),a},qUe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},WUe=function(t){var n=aY(aY({},qUe),t),r=x.useRef(),i=x.useState(-1),o=LUe(i,2),s=o[0],a=o[1];x.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&a(E)}catch{}},[]);var l=n.x,c=n.y,d=n.upperWidth,f=n.lowerWidth,p=n.height,m=n.className,y=n.animationEasing,v=n.animationDuration,b=n.animationBegin,C=n.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||p!==+p||d===0&&f===0||p===0)return null;var S=Mt("recharts-trapezoid",m);return C?K.createElement(xc,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:p,x:l,y:c},to:{upperWidth:d,lowerWidth:f,height:p,x:l,y:c},duration:v,animationEasing:y,isActive:C},function(E){var A=E.upperWidth,_=E.lowerWidth,N=E.height,j=E.x,T=E.y;return K.createElement(xc,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:y},K.createElement("path",B3({},At(n,!0),{className:S,d:lY(j,T,A,_,N),ref:r})))}):K.createElement("g",null,K.createElement("path",B3({},At(n,!0),{className:S,d:lY(l,c,d,f,p)})))},GUe=["option","shapeType","propTransformer","activeClassName","isActive"];function Ry(e){"@babel/helpers - typeof";return Ry=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},Ry(e)}function KUe(e,t){if(e==null)return{};var n=YUe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function cY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function H3(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){XUe(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 XUe(e,t,n){return t=ZUe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZUe(e){var t=QUe(e,"string");return Ry(t)=="symbol"?t:t+""}function QUe(e,t){if(Ry(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ry(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function JUe(e,t){return H3(H3({},t),e)}function eqe(e,t){return e==="symbols"}function uY(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return K.createElement(ZP,n);case"trapezoid":return K.createElement(WUe,n);case"sector":return K.createElement(Aue,n);case"symbols":if(eqe(t))return K.createElement(pP,n);break;default:return null}}function tqe(e){return x.isValidElement(e)?e.props:e}function nqe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?JUe:r,o=e.activeClassName,s=o===void 0?"recharts-active-shape":o,a=e.isActive,l=KUe(e,GUe),c;if(x.isValidElement(t))c=x.cloneElement(t,H3(H3({},l),tqe(t)));else if(yt(t))c=t(l);else if(RUe(t)&&!IUe(t)){var d=i(t,l);c=K.createElement(uY,{shapeType:n,elementProps:d})}else{var f=l;c=K.createElement(uY,{shapeType:n,elementProps:f})}return a?K.createElement(Hn,{className:s},c):c}function RC(e,t){return t!=null&&"trapezoids"in e.props}function PC(e,t){return t!=null&&"sectors"in e.props}function Py(e,t){return t!=null&&"points"in e.props}function rqe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function iqe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function oqe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function sqe(e,t){var n;return RC(e,t)?n=rqe:PC(e,t)?n=iqe:Py(e,t)&&(n=oqe),n}function aqe(e,t){var n;return RC(e,t)?n="trapezoids":PC(e,t)?n="sectors":Py(e,t)&&(n="points"),n}function lqe(e,t){if(RC(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(PC(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return Py(e,t)?t.payload:{}}function cqe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=aqe(n,t),o=lqe(n,t),s=r.filter(function(l,c){var d=yy(o,l),f=n.props[i].filter(function(y){var v=sqe(n,t);return v(y,t)}),p=n.props[i].indexOf(f[f.length-1]),m=c===p;return d&&m}),a=r.indexOf(s[s.length-1]);return a}var __,dY;function uqe(){if(dY)return __;dY=1;var e=Math.ceil,t=Math.max;function n(r,i,o,s){for(var a=-1,l=t(e((i-r)/(o||1)),0),c=Array(l);l--;)c[s?l:++a]=r,r+=o;return c}return __=n,__}var A_,fY;function $ue(){if(fY)return A_;fY=1;var e=hce(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-1/0){var o=i<0?-1:1;return o*n}return i===i?i:0}return A_=r,A_}var N_,hY;function dqe(){if(hY)return N_;hY=1;var e=uqe(),t=wC(),n=$ue();function r(i){return function(o,s,a){return a&&typeof a!="number"&&t(o,s,a)&&(s=a=void 0),o=n(o),s===void 0?(s=o,o=0):s=n(s),a=a===void 0?o<s?1:-1:n(a),e(o,s,a,i)}}return N_=r,N_}var j_,pY;function fqe(){if(pY)return j_;pY=1;var e=dqe(),t=e();return j_=t,j_}var hqe=fqe();const V3=Ht(hqe);function Dy(e){"@babel/helpers - typeof";return Dy=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},Dy(e)}function mY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mY(Object(n),!0).forEach(function(r){zue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zue(e,t,n){return t=pqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pqe(e){var t=mqe(e,"string");return Dy(t)=="symbol"?t:t+""}function mqe(e,t){if(Dy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gqe=["Webkit","Moz","O","ms"],yqe=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=gqe.reduce(function(o,s){return gY(gY({},o),{},zue({},s+r,n))},{});return i[t]=n,i};function w0(e){"@babel/helpers - typeof";return w0=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},w0(e)}function U3(){return U3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},U3.apply(this,arguments)}function yY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function T_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yY(Object(n),!0).forEach(function(r){bo(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vY(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,Bue(r.key),r)}}function bqe(e,t,n){return t&&vY(e.prototype,t),n&&vY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xqe(e,t,n){return t=q3(t),wqe(e,Fue()?Reflect.construct(t,n||[],q3(e).constructor):t.apply(e,n))}function wqe(e,t){if(t&&(w0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cqe(e)}function Cqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Fue=function(){return!!e})()}function q3(e){return q3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},q3(e)}function Sqe(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&&AT(e,t)}function AT(e,t){return AT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AT(e,t)}function bo(e,t,n){return t=Bue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bue(e){var t=Eqe(e,"string");return w0(t)=="symbol"?t:t+""}function Eqe(e,t){if(w0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(w0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var kqe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,s=t.width,a=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=S1().domain(V3(0,l)).range([o,o+s-a]),d=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(i),scale:c,scaleValues:d}},bY=function(t){return t.changedTouches&&!!t.changedTouches.length},C0=function(e){function t(n){var r;return vqe(this,t),r=xqe(this,t,[n]),bo(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),bo(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),bo(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,s=i.onDragEnd,a=i.startIndex;s==null||s({endIndex:o,startIndex:a})}),r.detachDragEndListener()}),bo(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),bo(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),bo(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),bo(r,"handleSlideDragStart",function(i){var o=bY(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Sqe(t,e),bqe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,s=this.state.scaleValues,a=this.props,l=a.gap,c=a.data,d=c.length-1,f=Math.min(i,o),p=Math.max(i,o),m=t.getIndexInRange(s,f),y=t.getIndexInRange(s,p);return{startIndex:m-m%l,endIndex:y===d?d:y-y%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,s=i.tickFormatter,a=i.dataKey,l=To(o[r],a,r);return yt(s)?s(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,s=i.startX,a=i.endX,l=this.props,c=l.x,d=l.width,f=l.travellerWidth,p=l.startIndex,m=l.endIndex,y=l.onChange,v=r.pageX-o;v>0?v=Math.min(v,c+d-f-a,c+d-f-s):v<0&&(v=Math.max(v,c-s,c-a));var b=this.getIndex({startX:s+v,endX:a+v});(b.startIndex!==p||b.endIndex!==m)&&y&&y(b),this.setState({startX:s+v,endX:a+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=bY(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,s=i.movingTravellerId,a=i.endX,l=i.startX,c=this.state[s],d=this.props,f=d.x,p=d.width,m=d.travellerWidth,y=d.onChange,v=d.gap,b=d.data,C={startX:this.state.startX,endX:this.state.endX},S=r.pageX-o;S>0?S=Math.min(S,f+p-m-c):S<0&&(S=Math.max(S,f-c)),C[s]=c+S;var E=this.getIndex(C),A=E.startIndex,_=E.endIndex,N=function(){var T=b.length-1;return s==="startX"&&(a>l?A%v===0:_%v===0)||a<l&&_===T||s==="endX"&&(a>l?_%v===0:A%v===0)||a>l&&_===T};this.setState(bo(bo({},s,c+S),"brushMoveStartX",r.pageX),function(){y&&N()&&y(E)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,s=this.state,a=s.scaleValues,l=s.startX,c=s.endX,d=this.state[i],f=a.indexOf(d);if(f!==-1){var p=f+r;if(!(p===-1||p>=a.length)){var m=a[p];i==="startX"&&m>=c||i==="endX"&&m<=l||this.setState(bo({},i,m),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,l=r.fill,c=r.stroke;return K.createElement("rect",{stroke:c,fill:l,x:i,y:o,width:s,height:a})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,l=r.data,c=r.children,d=r.padding,f=x.Children.only(c);return f?K.cloneElement(f,{x:i,y:o,width:s,height:a,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,s,a=this,l=this.props,c=l.y,d=l.travellerWidth,f=l.height,p=l.traveller,m=l.ariaLabel,y=l.data,v=l.startIndex,b=l.endIndex,C=Math.max(r,this.props.x),S=T_(T_({},At(this.props,!1)),{},{x:C,y:c,width:d,height:f}),E=m||"Min value: ".concat((o=y[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((s=y[b])===null||s===void 0?void 0:s.name);return K.createElement(Hn,{tabIndex:0,role:"slider","aria-label":E,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(_){["ArrowLeft","ArrowRight"].includes(_.key)&&(_.preventDefault(),_.stopPropagation(),a.handleTravellerMoveKeyboard(_.key==="ArrowRight"?1:-1,i))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,S))}},{key:"renderSlide",value:function(r,i){var o=this.props,s=o.y,a=o.height,l=o.stroke,c=o.travellerWidth,d=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return K.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:s,width:f,height:a})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,s=r.y,a=r.height,l=r.travellerWidth,c=r.stroke,d=this.state,f=d.startX,p=d.endX,m=5,y={pointerEvents:"none",fill:c};return K.createElement(Hn,{className:"recharts-brush-texts"},K.createElement(y3,U3({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-m,y:s+a/2},y),this.getTextOfTick(i)),K.createElement(y3,U3({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+l+m,y:s+a/2},y),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,s=r.children,a=r.x,l=r.y,c=r.width,d=r.height,f=r.alwaysShowText,p=this.state,m=p.startX,y=p.endX,v=p.isTextActive,b=p.isSlideMoving,C=p.isTravellerMoving,S=p.isTravellerFocused;if(!i||!i.length||!Me(a)||!Me(l)||!Me(c)||!Me(d)||c<=0||d<=0)return null;var E=Mt("recharts-brush",o),A=K.Children.count(s)===1,_=yqe("userSelect","none");return K.createElement(Hn,{className:E,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:_},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(m,y),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(y,"endX"),(v||b||C||S||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,s=r.width,a=r.height,l=r.stroke,c=Math.floor(o+a/2)-1;return K.createElement(K.Fragment,null,K.createElement("rect",{x:i,y:o,width:s,height:a,fill:l,stroke:"none"}),K.createElement("line",{x1:i+1,y1:c,x2:i+s-1,y2:c,fill:"none",stroke:"#fff"}),K.createElement("line",{x1:i+1,y1:c+2,x2:i+s-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return K.isValidElement(r)?o=K.cloneElement(r,i):yt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,s=r.width,a=r.x,l=r.travellerWidth,c=r.updateId,d=r.startIndex,f=r.endIndex;if(o!==i.prevData||c!==i.prevUpdateId)return T_({prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:s},o&&o.length?kqe({data:o,width:s,x:a,travellerWidth:l,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(s!==i.prevWidth||a!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([a,a+s-l]);var p=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:o,prevTravellerWidth:l,prevUpdateId:c,prevX:a,prevWidth:s,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,s=0,a=o-1;a-s>1;){var l=Math.floor((s+a)/2);r[l]>i?a=l:s=l}return i>=r[a]?a:s}}])}(x.PureComponent);bo(C0,"displayName","Brush");bo(C0,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var M_,xY;function _qe(){if(xY)return M_;xY=1;var e=wP();function t(n,r){var i;return e(n,function(o,s,a){return i=r(o,s,a),!i}),!!i}return M_=t,M_}var O_,wY;function Aqe(){if(wY)return O_;wY=1;var e=Ule(),t=Sd(),n=_qe(),r=co(),i=wC();function o(s,a,l){var c=r(s)?e:n;return l&&i(s,a,l)&&(a=void 0),c(s,t(a,3))}return O_=o,O_}var Nqe=Aqe();const jqe=Ht(Nqe);var Ha=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},R_,CY;function Tqe(){if(CY)return R_;CY=1;var e=lce();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return R_=t,R_}var P_,SY;function Mqe(){if(SY)return P_;SY=1;var e=Tqe(),t=sce(),n=Sd();function r(i,o){var s={};return o=n(o,3),t(i,function(a,l,c){e(s,l,o(a,l,c))}),s}return P_=r,P_}var Oqe=Mqe();const Rqe=Ht(Oqe);var D_,EY;function Pqe(){if(EY)return D_;EY=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return D_=e,D_}var I_,kY;function Dqe(){if(kY)return I_;kY=1;var e=wP();function t(n,r){var i=!0;return e(n,function(o,s,a){return i=!!r(o,s,a),i}),i}return I_=t,I_}var L_,_Y;function Iqe(){if(_Y)return L_;_Y=1;var e=Pqe(),t=Dqe(),n=Sd(),r=co(),i=wC();function o(s,a,l){var c=r(s)?e:t;return l&&i(s,a,l)&&(a=void 0),c(s,n(a,3))}return L_=o,L_}var Lqe=Iqe();const Hue=Ht(Lqe);var $qe=["x","y"];function Iy(e){"@babel/helpers - typeof";return Iy=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},Iy(e)}function NT(){return NT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NT.apply(this,arguments)}function AY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AY(Object(n),!0).forEach(function(r){zqe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zqe(e,t,n){return t=Fqe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fqe(e){var t=Bqe(e,"string");return Iy(t)=="symbol"?t:t+""}function Bqe(e,t){if(Iy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hqe(e,t){if(e==null)return{};var n=Vqe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Uqe(e,t){var n=e.x,r=e.y,i=Hqe(e,$qe),o="".concat(n),s=parseInt(o,10),a="".concat(r),l=parseInt(a,10),c="".concat(t.height||i.height),d=parseInt(c,10),f="".concat(t.width||i.width),p=parseInt(f,10);return $g($g($g($g($g({},t),i),s?{x:s}:{}),l?{y:l}:{}),{},{height:d,width:p,name:t.name,radius:t.radius})}function NY(e){return K.createElement(nqe,NT({shapeType:"rectangle",propTransformer:Uqe,activeClassName:"recharts-active-bar"},e))}var qqe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||Zf(),n)}},Wqe=["value","background"],Vue;function S0(e){"@babel/helpers - typeof";return S0=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},S0(e)}function Gqe(e,t){if(e==null)return{};var n=Kqe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function W3(){return W3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},W3.apply(this,arguments)}function jY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jY(Object(n),!0).forEach(function(r){Pu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TY(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,que(r.key),r)}}function Xqe(e,t,n){return t&&TY(e.prototype,t),n&&TY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zqe(e,t,n){return t=G3(t),Qqe(e,Uue()?Reflect.construct(t,n||[],G3(e).constructor):t.apply(e,n))}function Qqe(e,t){if(t&&(S0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jqe(e)}function Jqe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uue(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Uue=function(){return!!e})()}function G3(e){return G3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},G3(e)}function eWe(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&&jT(e,t)}function jT(e,t){return jT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jT(e,t)}function Pu(e,t,n){return t=que(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function que(e){var t=tWe(e,"string");return S0(t)=="symbol"?t:t+""}function tWe(e,t){if(S0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(S0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var eb=function(e){function t(){var n;Yqe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Zqe(this,t,[].concat(i)),Pu(n,"state",{isAnimationFinished:!1}),Pu(n,"id",Kv("recharts-bar-")),Pu(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),s&&s()}),Pu(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),s&&s()}),n}return eWe(t,e),Xqe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,s=o.shape,a=o.dataKey,l=o.activeIndex,c=o.activeBar,d=At(this.props,!1);return r&&r.map(function(f,p){var m=p===l,y=m?c:s,v=dr(dr(dr({},d),f),{},{isActive:m,option:y,index:p,dataKey:a,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return K.createElement(Hn,W3({className:"recharts-bar-rectangle"},s3(i.props,f,p),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(p)}),K.createElement(NY,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,s=i.layout,a=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,d=i.animationEasing,f=i.animationId,p=this.state.prevData;return K.createElement(xc,{begin:l,duration:c,isActive:a,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var y=m.t,v=o.map(function(b,C){var S=p&&p[C];if(S){var E=Qo(S.x,b.x),A=Qo(S.y,b.y),_=Qo(S.width,b.width),N=Qo(S.height,b.height);return dr(dr({},b),{},{x:E(y),y:A(y),width:_(y),height:N(y)})}if(s==="horizontal"){var j=Qo(0,b.height),T=j(y);return dr(dr({},b),{},{y:b.y+b.height-T,height:T})}var O=Qo(0,b.width),D=O(y);return dr(dr({},b),{},{width:D})});return K.createElement(Hn,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,s=this.state.prevData;return o&&i&&i.length&&(!s||!yy(s,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,s=i.dataKey,a=i.activeIndex,l=At(this.props.background,!1);return o.map(function(c,d){c.value;var f=c.background,p=Gqe(c,Wqe);if(!f)return null;var m=dr(dr(dr(dr(dr({},p),{},{fill:"#eee"},f),l),s3(r.props,c,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return K.createElement(NY,W3({key:"background-bar-".concat(d),option:r.props.background,isActive:d===a},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,s=o.data,a=o.xAxis,l=o.yAxis,c=o.layout,d=o.children,f=ea(d,MC);if(!f)return null;var p=c==="vertical"?s[0].height/2:s[0].width/2,m=function(b,C){var S=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:S,errorVal:To(b,C)}},y={clipPath:r?"url(#clipPath-".concat(i,")"):null};return K.createElement(Hn,y,f.map(function(v){return K.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:s,xAxis:a,yAxis:l,layout:c,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,s=r.className,a=r.xAxis,l=r.yAxis,c=r.left,d=r.top,f=r.width,p=r.height,m=r.isAnimationActive,y=r.background,v=r.id;if(i||!o||!o.length)return null;var b=this.state.isAnimationFinished,C=Mt("recharts-bar",s),S=a&&a.allowDataOverflow,E=l&&l.allowDataOverflow,A=S||E,_=Lt(v)?this.id:v;return K.createElement(Hn,{className:C},S||E?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(_)},K.createElement("rect",{x:S?c:c-f/2,y:E?d:d-p/2,width:S?f:f*2,height:E?p:p*2}))):null,K.createElement(Hn,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(_,")"):null},y?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,_),(!m||b)&&Gu.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])}(x.PureComponent);Vue=eb;Pu(eb,"displayName","Bar");Pu(eb,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ym.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Pu(eb,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,s=e.yAxis,a=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,m=dBe(r,n);if(!m)return null;var y=t.layout,v=n.type.defaultProps,b=v!==void 0?dr(dr({},v),n.props):n.props,C=b.dataKey,S=b.children,E=b.minPointSize,A=y==="horizontal"?s:o,_=c?A.scale.domain():null,N=bBe({numericAxis:A}),j=ea(S,mce),T=f.map(function(O,D){var R,I,F,$,H,L;c?R=fBe(c[d+D],_):(R=To(O,C),Array.isArray(R)||(R=[N,R]));var B=qqe(E,Vue.defaultProps.minPointSize)(R[1],D);if(y==="horizontal"){var z,V=[s.scale(R[0]),s.scale(R[1])],U=V[0],W=V[1];I=mK({axis:o,ticks:a,bandSize:i,offset:m.offset,entry:O,index:D}),F=(z=W??U)!==null&&z!==void 0?z:void 0,$=m.size;var G=U-W;if(H=Number.isNaN(G)?0:G,L={x:I,y:s.y,width:$,height:s.height},Math.abs(B)>0&&Math.abs(H)<Math.abs(B)){var Y=Gs(H||B)*(Math.abs(B)-Math.abs(H));F-=Y,H+=Y}}else{var X=[o.scale(R[0]),o.scale(R[1])],Q=X[0],ne=X[1];if(I=Q,F=mK({axis:s,ticks:l,bandSize:i,offset:m.offset,entry:O,index:D}),$=ne-Q,H=m.size,L={x:o.x,y:F,width:o.width,height:H},Math.abs(B)>0&&Math.abs($)<Math.abs(B)){var ie=Gs($||B)*(Math.abs(B)-Math.abs($));$+=ie}}return dr(dr(dr({},O),{},{x:I,y:F,width:$,height:H,value:c?R:R[1],payload:O,background:L},j&&j[D]&&j[D].props),{},{tooltipPayload:[Eue(n,O)],tooltipPosition:{x:I+$/2,y:F+H/2}})});return dr({data:T,layout:y},p)});function Ly(e){"@babel/helpers - typeof";return Ly=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},Ly(e)}function nWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MY(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,Wue(r.key),r)}}function rWe(e,t,n){return t&&MY(e.prototype,t),n&&MY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function OY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Os(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OY(Object(n),!0).forEach(function(r){DC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DC(e,t,n){return t=Wue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wue(e){var t=iWe(e,"string");return Ly(t)=="symbol"?t:t+""}function iWe(e,t){if(Ly(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ly(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var oWe=function(t,n,r,i,o){var s=t.width,a=t.height,l=t.layout,c=t.children,d=Object.keys(n),f={left:r.left,leftMirror:r.left,right:s-r.right,rightMirror:s-r.right,top:r.top,topMirror:r.top,bottom:a-r.bottom,bottomMirror:a-r.bottom},p=!!xo(c,eb);return d.reduce(function(m,y){var v=n[y],b=v.orientation,C=v.domain,S=v.padding,E=S===void 0?{}:S,A=v.mirror,_=v.reversed,N="".concat(b).concat(A?"Mirror":""),j,T,O,D,R;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var I=C[1]-C[0],F=1/0,$=v.categoricalDomain.sort(HOe);if($.forEach(function(X,Q){Q>0&&(F=Math.min((X||0)-($[Q-1]||0),F))}),Number.isFinite(F)){var H=F/I,L=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(j=H*L/2),v.padding==="no-gap"){var B=Kf(t.barCategoryGap,H*L),z=H*L/2;j=z-B-(z-B)/L*B}}}i==="xAxis"?T=[r.left+(E.left||0)+(j||0),r.left+r.width-(E.right||0)-(j||0)]:i==="yAxis"?T=l==="horizontal"?[r.top+r.height-(E.bottom||0),r.top+(E.top||0)]:[r.top+(E.top||0)+(j||0),r.top+r.height-(E.bottom||0)-(j||0)]:T=v.range,_&&(T=[T[1],T[0]]);var V=cBe(v,o,p),U=V.scale,W=V.realScaleType;U.domain(C).range(T),uBe(U);var G=vBe(U,Os(Os({},v),{},{realScaleType:W}));i==="xAxis"?(R=b==="top"&&!A||b==="bottom"&&A,O=r.left,D=f[N]-R*v.height):i==="yAxis"&&(R=b==="left"&&!A||b==="right"&&A,O=f[N]-R*v.width,D=r.top);var Y=Os(Os(Os({},v),G),{},{realScaleType:W,x:O,y:D,scale:U,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return Y.bandSize=M3(Y,G),!v.hide&&i==="xAxis"?f[N]+=(R?-1:1)*Y.height:v.hide||(f[N]+=(R?-1:1)*Y.width),Os(Os({},m),{},DC({},y,Y))},{})},Gue=function(t,n){var r=t.x,i=t.y,o=n.x,s=n.y;return{x:Math.min(r,o),y:Math.min(i,s),width:Math.abs(o-r),height:Math.abs(s-i)}},sWe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return Gue({x:n,y:r},{x:i,y:o})},Kue=function(){function e(t){nWe(this,e),this.scale=t}return rWe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+s}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(n)+a}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();DC(Kue,"EPS",1e-4);var JP=function(t){var n=Object.keys(t).reduce(function(r,i){return Os(Os({},r),{},DC({},i,Kue.create(t[i])))},{});return Os(Os({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=o.bandAware,a=o.position;return Rqe(i,function(l,c){return n[c].apply(l,{bandAware:s,position:a})})},isInRange:function(i){return Hue(i,function(o,s){return n[s].isInRange(o)})}})};function aWe(e){return(e%180+180)%180}var lWe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=aWe(i),s=o*Math.PI/180,a=Math.atan(r/n),l=s>a&&s<Math.PI-a?r/Math.sin(s):n/Math.cos(s);return Math.abs(l)},$_,RY;function cWe(){if(RY)return $_;RY=1;var e=Sd(),t=Yv(),n=bC();function r(i){return function(o,s,a){var l=Object(o);if(!t(o)){var c=e(s,3);o=n(o),s=function(f){return c(l[f],f,l)}}var d=i(o,s,a);return d>-1?l[c?o[d]:d]:void 0}}return $_=r,$_}var z_,PY;function uWe(){if(PY)return z_;PY=1;var e=$ue();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return z_=t,z_}var F_,DY;function dWe(){if(DY)return F_;DY=1;var e=tce(),t=Sd(),n=uWe(),r=Math.max;function i(o,s,a){var l=o==null?0:o.length;if(!l)return-1;var c=a==null?0:n(a);return c<0&&(c=r(l+c,0)),e(o,t(s,3),c)}return F_=i,F_}var B_,IY;function fWe(){if(IY)return B_;IY=1;var e=cWe(),t=dWe(),n=e(t);return B_=n,B_}var hWe=fWe();const pWe=Ht(hWe);var mWe=yle();const gWe=Ht(mWe);var yWe=gWe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),eD=x.createContext(void 0),tD=x.createContext(void 0),Yue=x.createContext(void 0),Xue=x.createContext({}),Zue=x.createContext(void 0),Que=x.createContext(0),Jue=x.createContext(0),LY=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,s=t.clipPathId,a=t.children,l=t.width,c=t.height,d=yWe(o);return K.createElement(eD.Provider,{value:r},K.createElement(tD.Provider,{value:i},K.createElement(Xue.Provider,{value:o},K.createElement(Yue.Provider,{value:d},K.createElement(Zue.Provider,{value:s},K.createElement(Que.Provider,{value:c},K.createElement(Jue.Provider,{value:l},a)))))))},vWe=function(){return x.useContext(Zue)},ede=function(t){var n=x.useContext(eD);n==null&&Zf();var r=n[t];return r==null&&Zf(),r},bWe=function(){var t=x.useContext(eD);return _u(t)},xWe=function(){var t=x.useContext(tD),n=pWe(t,function(r){return Hue(r.domain,Number.isFinite)});return n||_u(t)},tde=function(t){var n=x.useContext(tD);n==null&&Zf();var r=n[t];return r==null&&Zf(),r},wWe=function(){var t=x.useContext(Yue);return t},CWe=function(){return x.useContext(Xue)},nD=function(){return x.useContext(Jue)},rD=function(){return x.useContext(Que)};function E0(e){"@babel/helpers - typeof";return E0=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},E0(e)}function SWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EWe(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,rde(r.key),r)}}function kWe(e,t,n){return t&&EWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _We(e,t,n){return t=K3(t),AWe(e,nde()?Reflect.construct(t,n||[],K3(e).constructor):t.apply(e,n))}function AWe(e,t){if(t&&(E0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NWe(e)}function NWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nde=function(){return!!e})()}function K3(e){return K3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},K3(e)}function jWe(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&&TT(e,t)}function TT(e,t){return TT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TT(e,t)}function $Y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$Y(Object(n),!0).forEach(function(r){iD(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Y(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function iD(e,t,n){return t=rde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rde(e){var t=TWe(e,"string");return E0(t)=="symbol"?t:t+""}function TWe(e,t){if(E0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(E0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MWe(e,t){return DWe(e)||PWe(e,t)||RWe(e,t)||OWe()}function OWe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 181In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RWe(e,t){if(e){if(typeof e=="string")return FY(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 FY(e,t)}}function FY(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 PWe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function DWe(e){if(Array.isArray(e))return e}function MT(){return MT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MT.apply(this,arguments)}var IWe=function(t,n){var r;return K.isValidElement(t)?r=K.cloneElement(t,n):yt(t)?r=t(n):r=K.createElement("line",MT({},n,{className:"recharts-reference-line-line"})),r},LWe=function(t,n,r,i,o,s,a,l,c){var d=o.x,f=o.y,p=o.width,m=o.height;if(r){var y=c.y,v=t.y.apply(y,{position:s});if(Ha(c,"discard")&&!t.y.isInRange(v))return null;var b=[{x:d+p,y:v},{x:d,y:v}];return l==="left"?b.reverse():b}if(n){var C=c.x,S=t.x.apply(C,{position:s});if(Ha(c,"discard")&&!t.x.isInRange(S))return null;var E=[{x:S,y:f+m},{x:S,y:f}];return a==="top"?E.reverse():E}if(i){var A=c.segment,_=A.map(function(N){return t.apply(N,{position:s})});return Ha(c,"discard")&&jqe(_,function(N){return!t.isInRange(N)})?null:_}return null};function $We(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,s=e.shape,a=e.className,l=e.alwaysShow,c=vWe(),d=ede(i),f=tde(o),p=wWe();if(!c||!p)return null;rc(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=JP({x:d.scale,y:f.scale}),y=Nr(t),v=Nr(n),b=r&&r.length===2,C=LWe(m,y,v,b,p,e.position,d.orientation,f.orientation,e);if(!C)return null;var S=MWe(C,2),E=S[0],A=E.x,_=E.y,N=S[1],j=N.x,T=N.y,O=Ha(e,"hidden")?"url(#".concat(c,")"):void 0,D=zY(zY({clipPath:O},At(e,!0)),{},{x1:A,y1:_,x2:j,y2:T});return K.createElement(Hn,{className:Mt("recharts-reference-line",a)},IWe(s,D),gi.renderCallByParent(e,sWe({x1:A,y1:_,x2:j,y2:T})))}var oD=function(e){function t(){return SWe(this,t),_We(this,t,arguments)}return jWe(t,e),kWe(t,[{key:"render",value:function(){return K.createElement($We,this.props)}}])}(K.Component);iD(oD,"displayName","ReferenceLine");iD(oD,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function OT(){return OT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OT.apply(this,arguments)}function k0(e){"@babel/helpers - typeof";return k0=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},k0(e)}function BY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HY(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BY(Object(n),!0).forEach(function(r){IC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FWe(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,ode(r.key),r)}}function BWe(e,t,n){return t&&FWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HWe(e,t,n){return t=Y3(t),VWe(e,ide()?Reflect.construct(t,n||[],Y3(e).constructor):t.apply(e,n))}function VWe(e,t){if(t&&(k0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UWe(e)}function UWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ide(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ide=function(){return!!e})()}function Y3(e){return Y3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Y3(e)}function qWe(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&&RT(e,t)}function RT(e,t){return RT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},RT(e,t)}function IC(e,t,n){return t=ode(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ode(e){var t=WWe(e,"string");return k0(t)=="symbol"?t:t+""}function WWe(e,t){if(k0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(k0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GWe=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,s=JP({x:i.scale,y:o.scale}),a=s.apply({x:n,y:r},{bandAware:!0});return Ha(t,"discard")&&!s.isInRange(a)?null:a},LC=function(e){function t(){return zWe(this,t),HWe(this,t,arguments)}return qWe(t,e),BWe(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,s=r.r,a=r.alwaysShow,l=r.clipPathId,c=Nr(i),d=Nr(o);if(rc(a===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!d)return null;var f=GWe(this.props);if(!f)return null;var p=f.x,m=f.y,y=this.props,v=y.shape,b=y.className,C=Ha(this.props,"hidden")?"url(#".concat(l,")"):void 0,S=HY(HY({clipPath:C},At(this.props,!0)),{},{cx:p,cy:m});return K.createElement(Hn,{className:Mt("recharts-reference-dot",b)},t.renderDot(v,S),gi.renderCallByParent(this.props,{x:p-s,y:m-s,width:2*s,height:2*s}))}}])}(K.Component);IC(LC,"displayName","ReferenceDot");IC(LC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});IC(LC,"renderDot",function(e,t){var n;return K.isValidElement(e)?n=K.cloneElement(e,t):yt(e)?n=e(t):n=K.createElement(QP,OT({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function PT(){return PT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PT.apply(this,arguments)}function _0(e){"@babel/helpers - typeof";return _0=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},_0(e)}function VY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UY(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){$C(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 KWe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YWe(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,ade(r.key),r)}}function XWe(e,t,n){return t&&YWe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZWe(e,t,n){return t=X3(t),QWe(e,sde()?Reflect.construct(t,n||[],X3(e).constructor):t.apply(e,n))}function QWe(e,t){if(t&&(_0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return JWe(e)}function JWe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sde=function(){return!!e})()}function X3(e){return X3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},X3(e)}function eGe(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&&DT(e,t)}function DT(e,t){return DT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DT(e,t)}function $C(e,t,n){return t=ade(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ade(e){var t=tGe(e,"string");return _0(t)=="symbol"?t:t+""}function tGe(e,t){if(_0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nGe=function(t,n,r,i,o){var s=o.x1,a=o.x2,l=o.y1,c=o.y2,d=o.xAxis,f=o.yAxis;if(!d||!f)return null;var p=JP({x:d.scale,y:f.scale}),m={x:t?p.x.apply(s,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(l,{position:"start"}):p.y.rangeMin},y={x:n?p.x.apply(a,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(c,{position:"end"}):p.y.rangeMax};return Ha(o,"discard")&&(!p.isInRange(m)||!p.isInRange(y))?null:Gue(m,y)},zC=function(e){function t(){return KWe(this,t),ZWe(this,t,arguments)}return eGe(t,e),XWe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,s=r.y1,a=r.y2,l=r.className,c=r.alwaysShow,d=r.clipPathId;rc(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Nr(i),p=Nr(o),m=Nr(s),y=Nr(a),v=this.props.shape;if(!f&&!p&&!m&&!y&&!v)return null;var b=nGe(f,p,m,y,this.props);if(!b&&!v)return null;var C=Ha(this.props,"hidden")?"url(#".concat(d,")"):void 0;return K.createElement(Hn,{className:Mt("recharts-reference-area",l)},t.renderRect(v,UY(UY({clipPath:C},At(this.props,!0)),b)),gi.renderCallByParent(this.props,b))}}])}(K.Component);$C(zC,"displayName","ReferenceArea");$C(zC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});$C(zC,"renderRect",function(e,t){var n;return K.isValidElement(e)?n=K.cloneElement(e,t):yt(e)?n=e(t):n=K.createElement(ZP,PT({},t,{className:"recharts-reference-area-rect"})),n});function lde(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function rGe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return lWe(r,n)}function iGe(e,t,n){var r=n==="width",i=e.x,o=e.y,s=e.width,a=e.height;return t===1?{start:r?i:o,end:r?i+s:o+a}:{start:r?i+s:o+a,end:r?i:o}}function Z3(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function oGe(e,t){return lde(e,t+1)}function sGe(e,t,n,r,i){for(var o=(r||[]).slice(),s=t.start,a=t.end,l=0,c=1,d=s,f=function(){var y=r==null?void 0:r[l];if(y===void 0)return{v:lde(r,c)};var v=l,b,C=function(){return b===void 0&&(b=n(y,v)),b},S=y.coordinate,E=l===0||Z3(e,S,C,d,a);E||(l=0,d=s,c+=1),E&&(d=S+e*(C()/2+i),l+=c)},p;c<=o.length;)if(p=f(),p)return p.v;return[]}function $y(e){"@babel/helpers - typeof";return $y=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},$y(e)}function qY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function hi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qY(Object(n),!0).forEach(function(r){aGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aGe(e,t,n){return t=lGe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lGe(e){var t=cGe(e,"string");return $y(t)=="symbol"?t:t+""}function cGe(e,t){if($y(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($y(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uGe(e,t,n,r,i){for(var o=(r||[]).slice(),s=o.length,a=t.start,l=t.end,c=function(p){var m=o[p],y,v=function(){return y===void 0&&(y=n(m,p)),y};if(p===s-1){var b=e*(m.coordinate+e*v()/2-l);o[p]=m=hi(hi({},m),{},{tickCoord:b>0?m.coordinate-b*e:m.coordinate})}else o[p]=m=hi(hi({},m),{},{tickCoord:m.coordinate});var C=Z3(e,m.tickCoord,v,a,l);C&&(l=m.tickCoord-e*(v()/2+i),o[p]=hi(hi({},m),{},{isShow:!0}))},d=s-1;d>=0;d--)c(d);return o}function dGe(e,t,n,r,i,o){var s=(r||[]).slice(),a=s.length,l=t.start,c=t.end;if(o){var d=r[a-1],f=n(d,a-1),p=e*(d.coordinate+e*f/2-c);s[a-1]=d=hi(hi({},d),{},{tickCoord:p>0?d.coordinate-p*e:d.coordinate});var m=Z3(e,d.tickCoord,function(){return f},l,c);m&&(c=d.tickCoord-e*(f/2+i),s[a-1]=hi(hi({},d),{},{isShow:!0}))}for(var y=o?a-1:a,v=function(S){var E=s[S],A,_=function(){return A===void 0&&(A=n(E,S)),A};if(S===0){var N=e*(E.coordinate-e*_()/2-l);s[S]=E=hi(hi({},E),{},{tickCoord:N<0?E.coordinate-N*e:E.coordinate})}else s[S]=E=hi(hi({},E),{},{tickCoord:E.coordinate});var j=Z3(e,E.tickCoord,_,l,c);j&&(l=E.tickCoord+e*(_()/2+i),s[S]=hi(hi({},E),{},{isShow:!0}))},b=0;b<y;b++)v(b);return s}function sD(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,s=e.minTickGap,a=e.orientation,l=e.interval,c=e.tickFormatter,d=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if(Me(l)||ym.isSsr)return oGe(i,typeof l=="number"&&Me(l)?l:0);var p=[],m=a==="top"||a==="bottom"?"width":"height",y=d&&m==="width"?C1(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(E,A){var _=yt(c)?c(E.value,A):E.value;return m==="width"?rGe(C1(_,{fontSize:t,letterSpacing:n}),y,f):C1(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?Gs(i[1].coordinate-i[0].coordinate):1,C=iGe(o,b,m);return l==="equidistantPreserveStart"?sGe(b,C,v,i,s):(l==="preserveStart"||l==="preserveStartEnd"?p=dGe(b,C,v,i,s,l==="preserveStartEnd"):p=uGe(b,C,v,i,s),p.filter(function(S){return S.isShow}))}var fGe=["viewBox"],hGe=["viewBox"],pGe=["ticks"];function A0(e){"@babel/helpers - typeof";return A0=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},A0(e)}function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pp.apply(this,arguments)}function WY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ni(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WY(Object(n),!0).forEach(function(r){aD(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}function H_(e,t){if(e==null)return{};var n=mGe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GY(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,ude(r.key),r)}}function yGe(e,t,n){return t&&GY(e.prototype,t),n&&GY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function vGe(e,t,n){return t=Q3(t),bGe(e,cde()?Reflect.construct(t,n||[],Q3(e).constructor):t.apply(e,n))}function bGe(e,t){if(t&&(A0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xGe(e)}function xGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cde=function(){return!!e})()}function Q3(e){return Q3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q3(e)}function wGe(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&&IT(e,t)}function IT(e,t){return IT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},IT(e,t)}function aD(e,t,n){return t=ude(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ude(e){var t=CGe(e,"string");return A0(t)=="symbol"?t:t+""}function CGe(e,t){if(A0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(A0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xm=function(e){function t(n){var r;return gGe(this,t),r=vGe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return wGe(t,e),yGe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,s=H_(r,fGe),a=this.props,l=a.viewBox,c=H_(a,hGe);return!qp(o,l)||!qp(s,c)||!qp(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.x,s=i.y,a=i.width,l=i.height,c=i.orientation,d=i.tickSize,f=i.mirror,p=i.tickMargin,m,y,v,b,C,S,E=f?-1:1,A=r.tickSize||d,_=Me(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=y=r.coordinate,b=s+ +!f*l,v=b-E*A,S=v-E*p,C=_;break;case"left":v=b=r.coordinate,y=o+ +!f*a,m=y-E*A,C=m-E*p,S=_;break;case"right":v=b=r.coordinate,y=o+ +f*a,m=y+E*A,C=m+E*p,S=_;break;default:m=y=r.coordinate,b=s+ +f*l,v=b+E*A,S=v+E*p,C=_;break}return{line:{x1:m,y1:v,x2:y,y2:b},tick:{x:C,y:S}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,s;switch(i){case"left":s=o?"start":"end";break;case"right":s=o?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,s="end";switch(i){case"left":case"right":s="middle";break;case"top":s=o?"start":"end";break;default:s=o?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,s=r.width,a=r.height,l=r.orientation,c=r.mirror,d=r.axisLine,f=Ni(Ni(Ni({},At(this.props,!1)),At(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!c||l==="bottom"&&c);f=Ni(Ni({},f),{},{x1:i,y1:o+p*a,x2:i+s,y2:o+p*a})}else{var m=+(l==="left"&&!c||l==="right"&&c);f=Ni(Ni({},f),{},{x1:i+m*s,y1:o,x2:i+m*s,y2:o+a})}return K.createElement("line",Pp({},f,{className:Mt("recharts-cartesian-axis-line",ls(d,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var s=this,a=this.props,l=a.tickLine,c=a.stroke,d=a.tick,f=a.tickFormatter,p=a.unit,m=sD(Ni(Ni({},this.props),{},{ticks:r}),i,o),y=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),b=At(this.props,!1),C=At(d,!1),S=Ni(Ni({},b),{},{fill:"none"},At(l,!1)),E=m.map(function(A,_){var N=s.getTickLineCoord(A),j=N.line,T=N.tick,O=Ni(Ni(Ni(Ni({textAnchor:y,verticalAnchor:v},b),{},{stroke:"none",fill:c},C),T),{},{index:_,payload:A,visibleTicksCount:m.length,tickFormatter:f});return K.createElement(Hn,Pp({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},s3(s.props,A,_)),l&&K.createElement("line",Pp({},S,j,{className:Mt("recharts-cartesian-axis-tick-line",ls(l,"className"))})),d&&t.renderTickItem(d,O,"".concat(yt(f)?f(A.value,_):A.value).concat(p||"")))});return K.createElement("g",{className:"recharts-cartesian-axis-ticks"},E)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,s=i.width,a=i.height,l=i.ticksGenerator,c=i.className,d=i.hide;if(d)return null;var f=this.props,p=f.ticks,m=H_(f,pGe),y=p;return yt(l)&&(y=p&&p.length>0?l(this.props):l(m)),s<=0||a<=0||!y||!y.length?null:K.createElement(Hn,{className:Mt("recharts-cartesian-axis",c),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(y,this.state.fontSize,this.state.letterSpacing),gi.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var s;return K.isValidElement(r)?s=K.cloneElement(r,i):yt(r)?s=r(i):s=K.createElement(y3,Pp({},i,{className:"recharts-cartesian-axis-tick-value"}),o),s}}])}(x.Component);aD(xm,"displayName","CartesianAxis");aD(xm,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var SGe=["x1","y1","x2","y2","key"],EGe=["offset"];function Qf(e){"@babel/helpers - typeof";return Qf=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},Qf(e)}function KY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KY(Object(n),!0).forEach(function(r){kGe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kGe(e,t,n){return t=_Ge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ge(e){var t=AGe(e,"string");return Qf(t)=="symbol"?t:t+""}function AGe(e,t){if(Qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cf(){return Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cf.apply(this,arguments)}function YY(e,t){if(e==null)return{};var n=NGe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var jGe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,s=t.width,a=t.height,l=t.ry;return K.createElement("rect",{x:i,y:o,ry:l,width:s,height:a,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function dde(e,t){var n;if(K.isValidElement(e))n=K.cloneElement(e,t);else if(yt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,s=t.y2,a=t.key,l=YY(t,SGe),c=At(l,!1);c.offset;var d=YY(c,EGe);n=K.createElement("line",Cf({},d,{x1:r,y1:i,x2:o,y2:s,fill:"none",key:a}))}return n}function TGe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var s=o.map(function(a,l){var c=yi(yi({},e),{},{x1:t,y1:a,x2:t+n,y2:a,key:"line-".concat(l),index:l});return dde(i,c)});return K.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function MGe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var s=o.map(function(a,l){var c=yi(yi({},e),{},{x1:a,y1:t,x2:a,y2:t+n,key:"line-".concat(l),index:l});return dde(i,c)});return K.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function OGe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,s=e.height,a=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var d=a.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==d[0]&&d.unshift(0);var f=d.map(function(p,m){var y=!d[m+1],v=y?i+s-p:d[m+1]-p;if(v<=0)return null;var b=m%t.length;return K.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return K.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function RGe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,s=e.y,a=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var d=c.map(function(p){return Math.round(p+o-o)}).sort(function(p,m){return p-m});o!==d[0]&&d.unshift(0);var f=d.map(function(p,m){var y=!d[m+1],v=y?o+a-p:d[m+1]-p;if(v<=0)return null;var b=m%r.length;return K.createElement("rect",{key:"react-".concat(m),x:p,y:s,width:v,height:l,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return K.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var PGe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,s=t.offset;return Cue(sD(yi(yi(yi({},xm.defaultProps),r),{},{ticks:Yl(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),s.left,s.left+s.width,n)},DGe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,s=t.offset;return Cue(sD(yi(yi(yi({},xm.defaultProps),r),{},{ticks:Yl(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),s.top,s.top+s.height,n)},yp={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function fde(e){var t,n,r,i,o,s,a=nD(),l=rD(),c=CWe(),d=yi(yi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:yp.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:yp.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:yp.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:yp.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:yp.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:yp.verticalFill,x:Me(e.x)?e.x:c.left,y:Me(e.y)?e.y:c.top,width:Me(e.width)?e.width:c.width,height:Me(e.height)?e.height:c.height}),f=d.x,p=d.y,m=d.width,y=d.height,v=d.syncWithTicks,b=d.horizontalValues,C=d.verticalValues,S=bWe(),E=xWe();if(!Me(m)||m<=0||!Me(y)||y<=0||!Me(f)||f!==+f||!Me(p)||p!==+p)return null;var A=d.verticalCoordinatesGenerator||PGe,_=d.horizontalCoordinatesGenerator||DGe,N=d.horizontalPoints,j=d.verticalPoints;if((!N||!N.length)&&yt(_)){var T=b&&b.length,O=_({yAxis:E?yi(yi({},E),{},{ticks:T?b:E.ticks}):void 0,width:a,height:l,offset:c},T?!0:v);rc(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Qf(O),"]")),Array.isArray(O)&&(N=O)}if((!j||!j.length)&&yt(A)){var D=C&&C.length,R=A({xAxis:S?yi(yi({},S),{},{ticks:D?C:S.ticks}):void 0,width:a,height:l,offset:c},D?!0:v);rc(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Qf(R),"]")),Array.isArray(R)&&(j=R)}return K.createElement("g",{className:"recharts-cartesian-grid"},K.createElement(jGe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),K.createElement(TGe,Cf({},d,{offset:c,horizontalPoints:N,xAxis:S,yAxis:E})),K.createElement(MGe,Cf({},d,{offset:c,verticalPoints:j,xAxis:S,yAxis:E})),K.createElement(OGe,Cf({},d,{horizontalPoints:N})),K.createElement(RGe,Cf({},d,{verticalPoints:j})))}fde.displayName="CartesianGrid";var IGe=["layout","type","stroke","connectNulls","isRange","ref"],LGe=["key"],hde;function N0(e){"@babel/helpers - typeof";return N0=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},N0(e)}function pde(e,t){if(e==null)return{};var n=$Ge(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Ge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sf(){return Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sf.apply(this,arguments)}function XY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XY(Object(n),!0).forEach(function(r){Pa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XY(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZY(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,gde(r.key),r)}}function FGe(e,t,n){return t&&ZY(e.prototype,t),n&&ZY(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BGe(e,t,n){return t=J3(t),HGe(e,mde()?Reflect.construct(t,n||[],J3(e).constructor):t.apply(e,n))}function HGe(e,t){if(t&&(N0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VGe(e)}function VGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(mde=function(){return!!e})()}function J3(e){return J3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},J3(e)}function UGe(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&<(e,t)}function LT(e,t){return LT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LT(e,t)}function Pa(e,t,n){return t=gde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gde(e){var t=qGe(e,"string");return N0(t)=="symbol"?t:t+""}function qGe(e,t){if(N0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(N0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ad=function(e){function t(){var n;zGe(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=BGe(this,t,[].concat(i)),Pa(n,"state",{isAnimationFinished:!0}),Pa(n,"id",Kv("recharts-area-")),Pa(n,"handleAnimationEnd",function(){var s=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),yt(s)&&s()}),Pa(n,"handleAnimationStart",function(){var s=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),yt(s)&&s()}),n}return UGe(t,e),FGe(t,[{key:"renderDots",value:function(r,i,o){var s=this.props.isAnimationActive,a=this.state.isAnimationFinished;if(s&&!a)return null;var l=this.props,c=l.dot,d=l.points,f=l.dataKey,p=At(this.props,!1),m=At(c,!0),y=d.map(function(b,C){var S=mu(mu(mu({key:"dot-".concat(C),r:3},p),m),{},{index:C,cx:b.x,cy:b.y,dataKey:f,value:b.value,payload:b.payload,points:d});return t.renderDotItem(c,S)}),v={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return K.createElement(Hn,Sf({className:"recharts-area-dots"},v),y)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,o=i.baseLine,s=i.points,a=i.strokeWidth,l=s[0].x,c=s[s.length-1].x,d=r*Math.abs(l-c),f=Ru(s.map(function(p){return p.y||0}));return Me(o)&&typeof o=="number"?f=Math.max(o,f):o&&Array.isArray(o)&&o.length&&(f=Math.max(Ru(o.map(function(p){return p.y||0})),f)),Me(f)?K.createElement("rect",{x:l<c?l:l-d,y:0,width:d,height:Math.floor(f+(a?parseInt("".concat(a),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,o=i.baseLine,s=i.points,a=i.strokeWidth,l=s[0].y,c=s[s.length-1].y,d=r*Math.abs(l-c),f=Ru(s.map(function(p){return p.x||0}));return Me(o)&&typeof o=="number"?f=Math.max(o,f):o&&Array.isArray(o)&&o.length&&(f=Math.max(Ru(o.map(function(p){return p.x||0})),f)),Me(f)?K.createElement("rect",{x:0,y:l<c?l:l-d,width:f+(a?parseInt("".concat(a),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,o,s){var a=this.props,l=a.layout,c=a.type,d=a.stroke,f=a.connectNulls,p=a.isRange;a.ref;var m=pde(a,IGe);return K.createElement(Hn,{clipPath:o?"url(#clipPath-".concat(s,")"):null},K.createElement(k1,Sf({},At(m,!0),{points:r,connectNulls:f,type:c,baseLine:i,layout:l,stroke:"none",className:"recharts-area-area"})),d!=="none"&&K.createElement(k1,Sf({},At(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:r})),d!=="none"&&p&&K.createElement(k1,Sf({},At(this.props,!1),{className:"recharts-area-curve",layout:l,type:c,connectNulls:f,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var o=this,s=this.props,a=s.points,l=s.baseLine,c=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,p=s.animationEasing,m=s.animationId,y=this.state,v=y.prevPoints,b=y.prevBaseLine;return K.createElement(xc,{begin:d,duration:f,isActive:c,easing:p,from:{t:0},to:{t:1},key:"area-".concat(m),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(C){var S=C.t;if(v){var E=v.length/a.length,A=a.map(function(T,O){var D=Math.floor(O*E);if(v[D]){var R=v[D],I=Qo(R.x,T.x),F=Qo(R.y,T.y);return mu(mu({},T),{},{x:I(S),y:F(S)})}return T}),_;if(Me(l)&&typeof l=="number"){var N=Qo(b,l);_=N(S)}else if(Lt(l)||mm(l)){var j=Qo(b,0);_=j(S)}else _=l.map(function(T,O){var D=Math.floor(O*E);if(b[D]){var R=b[D],I=Qo(R.x,T.x),F=Qo(R.y,T.y);return mu(mu({},T),{},{x:I(S),y:F(S)})}return T});return o.renderAreaStatically(A,_,r,i)}return K.createElement(Hn,null,K.createElement("defs",null,K.createElement("clipPath",{id:"animationClipPath-".concat(i)},o.renderClipRect(S))),K.createElement(Hn,{clipPath:"url(#animationClipPath-".concat(i,")")},o.renderAreaStatically(a,l,r,i)))})}},{key:"renderArea",value:function(r,i){var o=this.props,s=o.points,a=o.baseLine,l=o.isAnimationActive,c=this.state,d=c.prevPoints,f=c.prevBaseLine,p=c.totalLength;return l&&s&&s.length&&(!d&&p>0||!yy(d,s)||!yy(f,a))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(s,a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,s=i.dot,a=i.points,l=i.className,c=i.top,d=i.left,f=i.xAxis,p=i.yAxis,m=i.width,y=i.height,v=i.isAnimationActive,b=i.id;if(o||!a||!a.length)return null;var C=this.state.isAnimationFinished,S=a.length===1,E=Mt("recharts-area",l),A=f&&f.allowDataOverflow,_=p&&p.allowDataOverflow,N=A||_,j=Lt(b)?this.id:b,T=(r=At(s,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},O=T.r,D=O===void 0?3:O,R=T.strokeWidth,I=R===void 0?2:R,F=ZOe(s)?s:{},$=F.clipDot,H=$===void 0?!0:$,L=D*2+I;return K.createElement(Hn,{className:E},A||_?K.createElement("defs",null,K.createElement("clipPath",{id:"clipPath-".concat(j)},K.createElement("rect",{x:A?d:d-m/2,y:_?c:c-y/2,width:A?m:m*2,height:_?y:y*2})),!H&&K.createElement("clipPath",{id:"clipPath-dots-".concat(j)},K.createElement("rect",{x:d-L/2,y:c-L/2,width:m+L,height:y+L}))):null,S?null:this.renderArea(N,j),(s||S)&&this.renderDots(N,H,j),(!v||C)&&Gu.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(x.PureComponent);hde=Ad;Pa(Ad,"displayName","Area");Pa(Ad,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!ym.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Pa(Ad,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,s=t.props.baseValue,a=s??o;if(Me(a)&&typeof a=="number")return a;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var d=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return a==="dataMin"?f:a==="dataMax"||d<0?d:Math.max(Math.min(c[0],c[1]),0)}return a==="dataMin"?c[0]:a==="dataMax"?c[1]:c[0]});Pa(Ad,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,s=e.yAxisTicks,a=e.bandSize,l=e.dataKey,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,p=e.offset,m=t.layout,y=c&&c.length,v=hde.getBaseValue(t,n,r,i),b=m==="horizontal",C=!1,S=f.map(function(A,_){var N;y?N=c[d+_]:(N=To(A,l),Array.isArray(N)?C=!0:N=[v,N]);var j=N[1]==null||y&&To(A,l)==null;return b?{x:pK({axis:r,ticks:o,bandSize:a,entry:A,index:_}),y:j?null:i.scale(N[1]),value:N,payload:A}:{x:j?null:r.scale(N[1]),y:pK({axis:i,ticks:s,bandSize:a,entry:A,index:_}),value:N,payload:A}}),E;return y||C?E=S.map(function(A){var _=Array.isArray(A.value)?A.value[0]:null;return b?{x:A.x,y:_!=null&&A.y!=null?i.scale(_):null}:{x:_!=null?r.scale(_):null,y:A.y}}):E=b?i.scale(v):r.scale(v),mu({points:S,baseLine:E,layout:m,isRange:C},p)});Pa(Ad,"renderDotItem",function(e,t){var n;if(K.isValidElement(e))n=K.cloneElement(e,t);else if(yt(e))n=e(t);else{var r=Mt("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=pde(t,LGe);n=K.createElement(QP,Sf({},o,{key:i,className:r}))}return n});function j0(e){"@babel/helpers - typeof";return j0=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},j0(e)}function WGe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GGe(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,bde(r.key),r)}}function KGe(e,t,n){return t&&GGe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function YGe(e,t,n){return t=e4(t),XGe(e,yde()?Reflect.construct(t,n||[],e4(e).constructor):t.apply(e,n))}function XGe(e,t){if(t&&(j0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZGe(e)}function ZGe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yde=function(){return!!e})()}function e4(e){return e4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},e4(e)}function QGe(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&&$T(e,t)}function $T(e,t){return $T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$T(e,t)}function vde(e,t,n){return t=bde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bde(e){var t=JGe(e,"string");return j0(t)=="symbol"?t:t+""}function JGe(e,t){if(j0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(j0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function zT(){return zT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zT.apply(this,arguments)}function eKe(e){var t=e.xAxisId,n=nD(),r=rD(),i=ede(t);return i==null?null:K.createElement(xm,zT({},i,{className:Mt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(s){return Yl(s,!0)}}))}var FC=function(e){function t(){return WGe(this,t),YGe(this,t,arguments)}return QGe(t,e),KGe(t,[{key:"render",value:function(){return K.createElement(eKe,this.props)}}])}(K.Component);vde(FC,"displayName","XAxis");vde(FC,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function T0(e){"@babel/helpers - typeof";return T0=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},T0(e)}function tKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nKe(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,Cde(r.key),r)}}function rKe(e,t,n){return t&&nKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iKe(e,t,n){return t=t4(t),oKe(e,xde()?Reflect.construct(t,n||[],t4(e).constructor):t.apply(e,n))}function oKe(e,t){if(t&&(T0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sKe(e)}function sKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xde=function(){return!!e})()}function t4(e){return t4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},t4(e)}function aKe(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&&FT(e,t)}function FT(e,t){return FT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FT(e,t)}function wde(e,t,n){return t=Cde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cde(e){var t=lKe(e,"string");return T0(t)=="symbol"?t:t+""}function lKe(e,t){if(T0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(T0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function BT(){return BT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BT.apply(this,arguments)}var cKe=function(t){var n=t.yAxisId,r=nD(),i=rD(),o=tde(n);return o==null?null:K.createElement(xm,BT({},o,{className:Mt("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(a){return Yl(a,!0)}}))},BC=function(e){function t(){return tKe(this,t),iKe(this,t,arguments)}return aKe(t,e),rKe(t,[{key:"render",value:function(){return K.createElement(cKe,this.props)}}])}(K.Component);wde(BC,"displayName","YAxis");wde(BC,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function QY(e){return hKe(e)||fKe(e)||dKe(e)||uKe()}function uKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 182In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dKe(e,t){if(e){if(typeof e=="string")return HT(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 HT(e,t)}}function fKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hKe(e){if(Array.isArray(e))return HT(e)}function HT(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}var VT=function(t,n,r,i,o){var s=ea(t,oD),a=ea(t,LC),l=[].concat(QY(s),QY(a)),c=ea(t,zC),d="".concat(i,"Id"),f=i[0],p=n;if(l.length&&(p=l.reduce(function(v,b){if(b.props[d]===r&&Ha(b.props,"extendDomain")&&Me(b.props[f])){var C=b.props[f];return[Math.min(v[0],C),Math.max(v[1],C)]}return v},p)),c.length){var m="".concat(f,"1"),y="".concat(f,"2");p=c.reduce(function(v,b){if(b.props[d]===r&&Ha(b.props,"extendDomain")&&Me(b.props[m])&&Me(b.props[y])){var C=b.props[m],S=b.props[y];return[Math.min(v[0],C,S),Math.max(v[1],C,S)]}return v},p)}return o&&o.length&&(p=o.reduce(function(v,b){return Me(b)?[Math.min(v[0],b),Math.max(v[1],b)]:v},p)),p},V_={exports:{}},JY;function pKe(){return JY||(JY=1,function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,d){this.fn=l,this.context=c,this.once=d||!1}function o(l,c,d,f,p){if(typeof d!="function")throw new TypeError("The listener must be a function");var m=new i(d,f||l,p),y=n?n+c:c;return l._events[y]?l._events[y].fn?l._events[y]=[l._events[y],m]:l._events[y].push(m):(l._events[y]=m,l._eventsCount++),l}function s(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],d,f;if(this._eventsCount===0)return c;for(f in d=this._events)t.call(d,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(d)):c},a.prototype.listeners=function(c){var d=n?n+c:c,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,m=f.length,y=new Array(m);p<m;p++)y[p]=f[p].fn;return y},a.prototype.listenerCount=function(c){var d=n?n+c:c,f=this._events[d];return f?f.fn?1:f.length:0},a.prototype.emit=function(c,d,f,p,m,y){var v=n?n+c:c;if(!this._events[v])return!1;var b=this._events[v],C=arguments.length,S,E;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),C){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,f),!0;case 4:return b.fn.call(b.context,d,f,p),!0;case 5:return b.fn.call(b.context,d,f,p,m),!0;case 6:return b.fn.call(b.context,d,f,p,m,y),!0}for(E=1,S=new Array(C-1);E<C;E++)S[E-1]=arguments[E];b.fn.apply(b.context,S)}else{var A=b.length,_;for(E=0;E<A;E++)switch(b[E].once&&this.removeListener(c,b[E].fn,void 0,!0),C){case 1:b[E].fn.call(b[E].context);break;case 2:b[E].fn.call(b[E].context,d);break;case 3:b[E].fn.call(b[E].context,d,f);break;case 4:b[E].fn.call(b[E].context,d,f,p);break;default:if(!S)for(_=1,S=new Array(C-1);_<C;_++)S[_-1]=arguments[_];b[E].fn.apply(b[E].context,S)}}return!0},a.prototype.on=function(c,d,f){return o(this,c,d,f,!1)},a.prototype.once=function(c,d,f){return o(this,c,d,f,!0)},a.prototype.removeListener=function(c,d,f,p){var m=n?n+c:c;if(!this._events[m])return this;if(!d)return s(this,m),this;var y=this._events[m];if(y.fn)y.fn===d&&(!p||y.once)&&(!f||y.context===f)&&s(this,m);else{for(var v=0,b=[],C=y.length;v<C;v++)(y[v].fn!==d||p&&!y[v].once||f&&y[v].context!==f)&&b.push(y[v]);b.length?this._events[m]=b.length===1?b[0]:b:s(this,m)}return this},a.prototype.removeAllListeners=function(c){var d;return c?(d=n?n+c:c,this._events[d]&&s(this,d)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,e.exports=a}(V_)),V_.exports}var mKe=pKe();const gKe=Ht(mKe);var U_=new gKe,q_="recharts.syncMouseEvents";function zy(e){"@babel/helpers - typeof";return zy=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},zy(e)}function yKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vKe(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,Sde(r.key),r)}}function bKe(e,t,n){return t&&vKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function W_(e,t,n){return t=Sde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sde(e){var t=xKe(e,"string");return zy(t)=="symbol"?t:t+""}function xKe(e,t){if(zy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wKe=function(){function e(){yKe(this,e),W_(this,"activeIndex",0),W_(this,"coordinateList",[]),W_(this,"layout","horizontal")}return bKe(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,s=n.container,a=s===void 0?null:s,l=n.layout,c=l===void 0?null:l,d=n.offset,f=d===void 0?null:d,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=a??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),o=i.x,s=i.y,a=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=o+l+c,p=s+this.offset.top+a/2+d;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])}();function CKe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&Me(r)&&Me(i))return!0}return!1}function SKe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function Ede(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,s=ii(t,n,r,i),a=ii(t,n,r,o);return{points:[s,a],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function EKe(e,t,n){var r,i,o,s;if(e==="horizontal")r=t.x,o=r,i=n.top,s=n.top+n.height;else if(e==="vertical")i=t.y,s=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var a=t.cx,l=t.cy,c=t.innerRadius,d=t.outerRadius,f=t.angle,p=ii(a,l,c,f),m=ii(a,l,d,f);r=p.x,i=p.y,o=m.x,s=m.y}else return Ede(t);return[{x:r,y:i},{x:o,y:s}]}function Fy(e){"@babel/helpers - typeof";return Fy=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},Fy(e)}function eX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function x2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eX(Object(n),!0).forEach(function(r){kKe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eX(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kKe(e,t,n){return t=_Ke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _Ke(e){var t=AKe(e,"string");return Fy(t)=="symbol"?t:t+""}function AKe(e,t){if(Fy(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fy(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NKe(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,s=e.activeCoordinate,a=e.activePayload,l=e.offset,c=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!o||!s||p!=="ScatterChart"&&i!=="axis")return null;var y,v=k1;if(p==="ScatterChart")y=s,v=jUe;else if(p==="BarChart")y=SKe(f,s,l,d),v=ZP;else if(f==="radial"){var b=Ede(s),C=b.cx,S=b.cy,E=b.radius,A=b.startAngle,_=b.endAngle;y={cx:C,cy:S,startAngle:A,endAngle:_,innerRadius:E,outerRadius:E},v=Aue}else y={points:EKe(f,s,l)},v=k1;var N=x2(x2(x2(x2({stroke:"#ccc",pointerEvents:"none"},l),y),At(m,!1)),{},{payload:a,payloadIndex:c,className:Mt("recharts-tooltip-cursor",m.className)});return x.isValidElement(m)?x.cloneElement(m,N):x.createElement(v,N)}var jKe=["item"],TKe=["children","className","width","height","style","compact","title","desc"];function M0(e){"@babel/helpers - typeof";return M0=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},M0(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dp.apply(this,arguments)}function tX(e,t){return RKe(e)||OKe(e,t)||_de(e,t)||MKe()}function MKe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 183In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OKe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function RKe(e){if(Array.isArray(e))return e}function nX(e,t){if(e==null)return{};var n=PKe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DKe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IKe(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,Ade(r.key),r)}}function LKe(e,t,n){return t&&IKe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Ke(e,t,n){return t=n4(t),zKe(e,kde()?Reflect.construct(t,n||[],n4(e).constructor):t.apply(e,n))}function zKe(e,t){if(t&&(M0(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FKe(e)}function FKe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kde(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kde=function(){return!!e})()}function n4(e){return n4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},n4(e)}function BKe(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&&UT(e,t)}function UT(e,t){return UT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UT(e,t)}function O0(e){return UKe(e)||VKe(e)||_de(e)||HKe()}function HKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 184In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _de(e,t){if(e){if(typeof e=="string")return qT(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 qT(e,t)}}function VKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UKe(e){if(Array.isArray(e))return qT(e)}function qT(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 rX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rX(Object(n),!0).forEach(function(r){rt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rX(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rt(e,t,n){return t=Ade(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ade(e){var t=qKe(e,"string");return M0(t)=="symbol"?t:t+""}function qKe(e,t){if(M0(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(M0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var WKe={xAxis:["bottom","top"],yAxis:["left","right"]},GKe={width:"100%",height:"100%"},Nde={x:0,y:0};function w2(e){return e}var KKe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},YKe=function(t,n,r,i){var o=n.find(function(d){return d&&d.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var s=o.coordinate,a=i.radius;return ye(ye(ye({},i),ii(i.cx,i.cy,a,s)),{},{angle:s,radius:a})}var l=o.coordinate,c=i.angle;return ye(ye(ye({},i),ii(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return Nde},HC=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,s=(r??[]).reduce(function(a,l){var c=l.props.data;return c&&c.length?[].concat(O0(a),O0(c)):a},[]);return s.length>0?s:t&&t.length&&Me(i)&&Me(o)?t.slice(i,o+1):[]};function jde(e){return e==="number"?[0,"auto"]:void 0}var WT=function(t,n,r,i){var o=t.graphicalItems,s=t.tooltipAxis,a=HC(n,t);return r<0||!o||!o.length||r>=a.length?null:o.reduce(function(l,c){var d,f=(d=c.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(s.dataKey&&!s.allowDuplicatedCategory){var m=f===void 0?a:f;p=i3(m,s.dataKey,i)}else p=f&&f[r]||a[r];return p?[].concat(O0(l),[Eue(c,p)]):l},[])},iX=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},s=KKe(o,r),a=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,d=rBe(s,a,c,l);if(d>=0&&c){var f=c[d]&&c[d].value,p=WT(t,n,d,f),m=YKe(r,a,d,o);return{activeTooltipIndex:d,activeLabel:f,activePayload:p,activeCoordinate:m}}return null},XKe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=t.layout,f=t.children,p=t.stackOffset,m=wue(d,o);return r.reduce(function(y,v){var b,C=v.type.defaultProps!==void 0?ye(ye({},v.type.defaultProps),v.props):v.props,S=C.type,E=C.dataKey,A=C.allowDataOverflow,_=C.allowDuplicatedCategory,N=C.scale,j=C.ticks,T=C.includeHidden,O=C[s];if(y[O])return y;var D=HC(t.data,{graphicalItems:i.filter(function(G){var Y,X=s in G.props?G.props[s]:(Y=G.type.defaultProps)===null||Y===void 0?void 0:Y[s];return X===O}),dataStartIndex:l,dataEndIndex:c}),R=D.length,I,F,$;CKe(C.domain,A,S)&&(I=uT(C.domain,null,A),m&&(S==="number"||N!=="auto")&&($=E1(D,E,"category")));var H=jde(S);if(!I||I.length===0){var L,B=(L=C.domain)!==null&&L!==void 0?L:H;if(E){if(I=E1(D,E,S),S==="category"&&m){var z=BOe(I);_&&z?(F=I,I=V3(0,R)):_||(I=vK(B,I,v).reduce(function(G,Y){return G.indexOf(Y)>=0?G:[].concat(O0(G),[Y])},[]))}else if(S==="category")_?I=I.filter(function(G){return G!==""&&!Lt(G)}):I=vK(B,I,v).reduce(function(G,Y){return G.indexOf(Y)>=0||Y===""||Lt(Y)?G:[].concat(O0(G),[Y])},[]);else if(S==="number"){var V=lBe(D,i.filter(function(G){var Y,X,Q=s in G.props?G.props[s]:(Y=G.type.defaultProps)===null||Y===void 0?void 0:Y[s],ne="hide"in G.props?G.props.hide:(X=G.type.defaultProps)===null||X===void 0?void 0:X.hide;return Q===O&&(T||!ne)}),E,o,d);V&&(I=V)}m&&(S==="number"||N!=="auto")&&($=E1(D,E,"category"))}else m?I=V3(0,R):a&&a[O]&&a[O].hasStack&&S==="number"?I=p==="expand"?[0,1]:Sue(a[O].stackGroups,l,c):I=xue(D,i.filter(function(G){var Y=s in G.props?G.props[s]:G.type.defaultProps[s],X="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return Y===O&&(T||!X)}),S,d,!0);if(S==="number")I=VT(f,I,O,o,j),B&&(I=uT(B,I,A));else if(S==="category"&&B){var U=B,W=I.every(function(G){return U.indexOf(G)>=0});W&&(I=U)}}return ye(ye({},y),{},rt({},O,ye(ye({},C),{},{axisType:o,domain:I,categoricalDomain:$,duplicateDomain:F,originalDomain:(b=C.domain)!==null&&b!==void 0?b:H,isCategorical:m,layout:d})))},{})},ZKe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,s=n.axisIdKey,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=t.layout,f=t.children,p=HC(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=p.length,y=wue(d,o),v=-1;return r.reduce(function(b,C){var S=C.type.defaultProps!==void 0?ye(ye({},C.type.defaultProps),C.props):C.props,E=S[s],A=jde("number");if(!b[E]){v++;var _;return y?_=V3(0,m):a&&a[E]&&a[E].hasStack?(_=Sue(a[E].stackGroups,l,c),_=VT(f,_,E,o)):(_=uT(A,xue(p,r.filter(function(N){var j,T,O=s in N.props?N.props[s]:(j=N.type.defaultProps)===null||j===void 0?void 0:j[s],D="hide"in N.props?N.props.hide:(T=N.type.defaultProps)===null||T===void 0?void 0:T.hide;return O===E&&!D}),"number",d),i.defaultProps.allowDataOverflow),_=VT(f,_,E,o)),ye(ye({},b),{},rt({},E,ye(ye({axisType:o},i.defaultProps),{},{hide:!0,orientation:ls(WKe,"".concat(o,".").concat(v%2),null),domain:_,originalDomain:A,isCategorical:y,layout:d})))}return b},{})},QKe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,s=n.graphicalItems,a=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=t.children,f="".concat(i,"Id"),p=ea(d,o),m={};return p&&p.length?m=XKe(t,{axes:p,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:l,dataEndIndex:c}):s&&s.length&&(m=ZKe(t,{Axis:o,graphicalItems:s,axisType:i,axisIdKey:f,stackGroups:a,dataStartIndex:l,dataEndIndex:c})),m},JKe=function(t){var n=_u(t),r=Yl(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:CP(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:M3(n,r)}},oX=function(t){var n=t.children,r=t.defaultShowTooltip,i=xo(n,C0),o=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(s=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!r}},eYe=function(t){return!t||!t.length?!1:t.some(function(n){var r=nc(n&&n.type);return r&&r.indexOf("Bar")>=0})},sX=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},tYe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,s=o===void 0?{}:o,a=t.yAxisMap,l=a===void 0?{}:a,c=r.width,d=r.height,f=r.children,p=r.margin||{},m=xo(f,C0),y=xo(f,Wp),v=Object.keys(l).reduce(function(_,N){var j=l[N],T=j.orientation;return!j.mirror&&!j.hide?ye(ye({},_),{},rt({},T,_[T]+j.width)):_},{left:p.left||0,right:p.right||0}),b=Object.keys(s).reduce(function(_,N){var j=s[N],T=j.orientation;return!j.mirror&&!j.hide?ye(ye({},_),{},rt({},T,ls(_,"".concat(T))+j.height)):_},{top:p.top||0,bottom:p.bottom||0}),C=ye(ye({},b),v),S=C.bottom;m&&(C.bottom+=m.props.height||C0.defaultProps.height),y&&n&&(C=sBe(C,i,r,n));var E=c-C.left-C.right,A=d-C.top-C.bottom;return ye(ye({brushBottom:S},C),{},{width:Math.max(E,0),height:Math.max(A,0)})},nYe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},rYe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,s=t.validateTooltipEventTypes,a=s===void 0?["axis"]:s,l=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,p=function(C,S){var E=S.graphicalItems,A=S.stackGroups,_=S.offset,N=S.updateId,j=S.dataStartIndex,T=S.dataEndIndex,O=C.barSize,D=C.layout,R=C.barGap,I=C.barCategoryGap,F=C.maxBarSize,$=sX(D),H=$.numericAxisName,L=$.cateAxisName,B=eYe(E),z=[];return E.forEach(function(V,U){var W=HC(C.data,{graphicalItems:[V],dataStartIndex:j,dataEndIndex:T}),G=V.type.defaultProps!==void 0?ye(ye({},V.type.defaultProps),V.props):V.props,Y=G.dataKey,X=G.maxBarSize,Q=G["".concat(H,"Id")],ne=G["".concat(L,"Id")],ie={},se=l.reduce(function(Vt,ee){var ue=S["".concat(ee.axisType,"Map")],me=G["".concat(ee.axisType,"Id")];ue&&ue[me]||ee.axisType==="zAxis"||Zf();var je=ue[me];return ye(ye({},Vt),{},rt(rt({},ee.axisType,je),"".concat(ee.axisType,"Ticks"),Yl(je)))},ie),oe=se[L],J=se["".concat(L,"Ticks")],ae=A&&A[Q]&&A[Q].hasStack&&xBe(V,A[Q].stackGroups),re=nc(V.type).indexOf("Bar")>=0,pe=M3(oe,J),be=[],xe=B&&iBe({barSize:O,stackGroups:A,totalSize:nYe(se,L)});if(re){var ke,Pe,it=Lt(X)?F:X,qe=(ke=(Pe=M3(oe,J,!0))!==null&&Pe!==void 0?Pe:it)!==null&&ke!==void 0?ke:0;be=oBe({barGap:R,barCategoryGap:I,bandSize:qe!==pe?qe:pe,sizeList:xe[ne],maxBarSize:it}),qe!==pe&&(be=be.map(function(Vt){return ye(ye({},Vt),{},{position:ye(ye({},Vt.position),{},{offset:Vt.position.offset-qe/2})})}))}var $n=V&&V.type&&V.type.getComposedData;$n&&z.push({props:ye(ye({},$n(ye(ye({},se),{},{displayedData:W,props:C,dataKey:Y,item:V,bandSize:pe,barPosition:be,offset:_,stackedData:ae,layout:D,dataStartIndex:j,dataEndIndex:T}))),{},rt(rt(rt({key:V.key||"item-".concat(U)},H,se[H]),L,se[L]),"animationId",N)),childIndex:eRe(V,C.children),item:V})}),z},m=function(C,S){var E=C.props,A=C.dataStartIndex,_=C.dataEndIndex,N=C.updateId;if(!MU({props:E}))return null;var j=E.children,T=E.layout,O=E.stackOffset,D=E.data,R=E.reverseStackOrder,I=sX(T),F=I.numericAxisName,$=I.cateAxisName,H=ea(j,r),L=yBe(D,H,"".concat(F,"Id"),"".concat($,"Id"),O,R),B=l.reduce(function(G,Y){var X="".concat(Y.axisType,"Map");return ye(ye({},G),{},rt({},X,QKe(E,ye(ye({},Y),{},{graphicalItems:H,stackGroups:Y.axisType===F&&L,dataStartIndex:A,dataEndIndex:_}))))},{}),z=tYe(ye(ye({},B),{},{props:E,graphicalItems:H}),S==null?void 0:S.legendBBox);Object.keys(B).forEach(function(G){B[G]=d(E,B[G],z,G.replace("Map",""),n)});var V=B["".concat($,"Map")],U=JKe(V),W=p(E,ye(ye({},B),{},{dataStartIndex:A,dataEndIndex:_,updateId:N,graphicalItems:H,stackGroups:L,offset:z}));return ye(ye({formattedGraphicalItems:W,graphicalItems:H,offset:z,stackGroups:L},U),B)},y=function(b){function C(S){var E,A,_;return DKe(this,C),_=$Ke(this,C,[S]),rt(_,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),rt(_,"accessibilityManager",new wKe),rt(_,"handleLegendBBoxUpdate",function(N){if(N){var j=_.state,T=j.dataStartIndex,O=j.dataEndIndex,D=j.updateId;_.setState(ye({legendBBox:N},m({props:_.props,dataStartIndex:T,dataEndIndex:O,updateId:D},ye(ye({},_.state),{},{legendBBox:N}))))}}),rt(_,"handleReceiveSyncEvent",function(N,j,T){if(_.props.syncId===N){if(T===_.eventEmitterSymbol&&typeof _.props.syncMethod!="function")return;_.applySyncEvent(j)}}),rt(_,"handleBrushChange",function(N){var j=N.startIndex,T=N.endIndex;if(j!==_.state.dataStartIndex||T!==_.state.dataEndIndex){var O=_.state.updateId;_.setState(function(){return ye({dataStartIndex:j,dataEndIndex:T},m({props:_.props,dataStartIndex:j,dataEndIndex:T,updateId:O},_.state))}),_.triggerSyncEvent({dataStartIndex:j,dataEndIndex:T})}}),rt(_,"handleMouseEnter",function(N){var j=_.getMouseInfo(N);if(j){var T=ye(ye({},j),{},{isTooltipActive:!0});_.setState(T),_.triggerSyncEvent(T);var O=_.props.onMouseEnter;yt(O)&&O(T,N)}}),rt(_,"triggeredAfterMouseMove",function(N){var j=_.getMouseInfo(N),T=j?ye(ye({},j),{},{isTooltipActive:!0}):{isTooltipActive:!1};_.setState(T),_.triggerSyncEvent(T);var O=_.props.onMouseMove;yt(O)&&O(T,N)}),rt(_,"handleItemMouseEnter",function(N){_.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),rt(_,"handleItemMouseLeave",function(){_.setState(function(){return{isTooltipActive:!1}})}),rt(_,"handleMouseMove",function(N){N.persist(),_.throttleTriggeredAfterMouseMove(N)}),rt(_,"handleMouseLeave",function(N){_.throttleTriggeredAfterMouseMove.cancel();var j={isTooltipActive:!1};_.setState(j),_.triggerSyncEvent(j);var T=_.props.onMouseLeave;yt(T)&&T(j,N)}),rt(_,"handleOuterEvent",function(N){var j=JOe(N),T=ls(_.props,"".concat(j));if(j&&yt(T)){var O,D;/.*touch.*/i.test(j)?D=_.getMouseInfo(N.changedTouches[0]):D=_.getMouseInfo(N),T((O=D)!==null&&O!==void 0?O:{},N)}}),rt(_,"handleClick",function(N){var j=_.getMouseInfo(N);if(j){var T=ye(ye({},j),{},{isTooltipActive:!0});_.setState(T),_.triggerSyncEvent(T);var O=_.props.onClick;yt(O)&&O(T,N)}}),rt(_,"handleMouseDown",function(N){var j=_.props.onMouseDown;if(yt(j)){var T=_.getMouseInfo(N);j(T,N)}}),rt(_,"handleMouseUp",function(N){var j=_.props.onMouseUp;if(yt(j)){var T=_.getMouseInfo(N);j(T,N)}}),rt(_,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&_.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),rt(_,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&_.handleMouseDown(N.changedTouches[0])}),rt(_,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&_.handleMouseUp(N.changedTouches[0])}),rt(_,"handleDoubleClick",function(N){var j=_.props.onDoubleClick;if(yt(j)){var T=_.getMouseInfo(N);j(T,N)}}),rt(_,"handleContextMenu",function(N){var j=_.props.onContextMenu;if(yt(j)){var T=_.getMouseInfo(N);j(T,N)}}),rt(_,"triggerSyncEvent",function(N){_.props.syncId!==void 0&&U_.emit(q_,_.props.syncId,N,_.eventEmitterSymbol)}),rt(_,"applySyncEvent",function(N){var j=_.props,T=j.layout,O=j.syncMethod,D=_.state.updateId,R=N.dataStartIndex,I=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)_.setState(ye({dataStartIndex:R,dataEndIndex:I},m({props:_.props,dataStartIndex:R,dataEndIndex:I,updateId:D},_.state)));else if(N.activeTooltipIndex!==void 0){var F=N.chartX,$=N.chartY,H=N.activeTooltipIndex,L=_.state,B=L.offset,z=L.tooltipTicks;if(!B)return;if(typeof O=="function")H=O(z,N);else if(O==="value"){H=-1;for(var V=0;V<z.length;V++)if(z[V].value===N.activeLabel){H=V;break}}var U=ye(ye({},B),{},{x:B.left,y:B.top}),W=Math.min(F,U.x+U.width),G=Math.min($,U.y+U.height),Y=z[H]&&z[H].value,X=WT(_.state,_.props.data,H),Q=z[H]?{x:T==="horizontal"?z[H].coordinate:W,y:T==="horizontal"?G:z[H].coordinate}:Nde;_.setState(ye(ye({},N),{},{activeLabel:Y,activeCoordinate:Q,activePayload:X,activeTooltipIndex:H}))}else _.setState(N)}),rt(_,"renderCursor",function(N){var j,T=_.state,O=T.isTooltipActive,D=T.activeCoordinate,R=T.activePayload,I=T.offset,F=T.activeTooltipIndex,$=T.tooltipAxisBandSize,H=_.getTooltipEventType(),L=(j=N.props.active)!==null&&j!==void 0?j:O,B=_.props.layout,z=N.key||"_recharts-cursor";return K.createElement(NKe,{key:z,activeCoordinate:D,activePayload:R,activeTooltipIndex:F,chartName:n,element:N,isActive:L,layout:B,offset:I,tooltipAxisBandSize:$,tooltipEventType:H})}),rt(_,"renderPolarAxis",function(N,j,T){var O=ls(N,"type.axisType"),D=ls(_.state,"".concat(O,"Map")),R=N.type.defaultProps,I=R!==void 0?ye(ye({},R),N.props):N.props,F=D&&D[I["".concat(O,"Id")]];return x.cloneElement(N,ye(ye({},F),{},{className:Mt(O,F.className),key:N.key||"".concat(j,"-").concat(T),ticks:Yl(F,!0)}))}),rt(_,"renderPolarGrid",function(N){var j=N.props,T=j.radialLines,O=j.polarAngles,D=j.polarRadius,R=_.state,I=R.radiusAxisMap,F=R.angleAxisMap,$=_u(I),H=_u(F),L=H.cx,B=H.cy,z=H.innerRadius,V=H.outerRadius;return x.cloneElement(N,{polarAngles:Array.isArray(O)?O:Yl(H,!0).map(function(U){return U.coordinate}),polarRadius:Array.isArray(D)?D:Yl($,!0).map(function(U){return U.coordinate}),cx:L,cy:B,innerRadius:z,outerRadius:V,key:N.key||"polar-grid",radialLines:T})}),rt(_,"renderLegend",function(){var N=_.state.formattedGraphicalItems,j=_.props,T=j.children,O=j.width,D=j.height,R=_.props.margin||{},I=O-(R.left||0)-(R.right||0),F=vue({children:T,formattedGraphicalItems:N,legendWidth:I,legendContent:c});if(!F)return null;var $=F.item,H=nX(F,jKe);return x.cloneElement($,ye(ye({},H),{},{chartWidth:O,chartHeight:D,margin:R,onBBoxUpdate:_.handleLegendBBoxUpdate}))}),rt(_,"renderTooltip",function(){var N,j=_.props,T=j.children,O=j.accessibilityLayer,D=xo(T,_a);if(!D)return null;var R=_.state,I=R.isTooltipActive,F=R.activeCoordinate,$=R.activePayload,H=R.activeLabel,L=R.offset,B=(N=D.props.active)!==null&&N!==void 0?N:I;return x.cloneElement(D,{viewBox:ye(ye({},L),{},{x:L.left,y:L.top}),active:B,label:H,payload:B?$:[],coordinate:F,accessibilityLayer:O})}),rt(_,"renderBrush",function(N){var j=_.props,T=j.margin,O=j.data,D=_.state,R=D.offset,I=D.dataStartIndex,F=D.dataEndIndex,$=D.updateId;return x.cloneElement(N,{key:N.key||"_recharts-brush",onChange:g2(_.handleBrushChange,N.props.onChange),data:O,x:Me(N.props.x)?N.props.x:R.left,y:Me(N.props.y)?N.props.y:R.top+R.height+R.brushBottom-(T.bottom||0),width:Me(N.props.width)?N.props.width:R.width,startIndex:I,endIndex:F,updateId:"brush-".concat($)})}),rt(_,"renderReferenceElement",function(N,j,T){if(!N)return null;var O=_,D=O.clipPathId,R=_.state,I=R.xAxisMap,F=R.yAxisMap,$=R.offset,H=N.type.defaultProps||{},L=N.props,B=L.xAxisId,z=B===void 0?H.xAxisId:B,V=L.yAxisId,U=V===void 0?H.yAxisId:V;return x.cloneElement(N,{key:N.key||"".concat(j,"-").concat(T),xAxis:I[z],yAxis:F[U],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:D})}),rt(_,"renderActivePoints",function(N){var j=N.item,T=N.activePoint,O=N.basePoint,D=N.childIndex,R=N.isRange,I=[],F=j.props.key,$=j.item.type.defaultProps!==void 0?ye(ye({},j.item.type.defaultProps),j.item.props):j.item.props,H=$.activeDot,L=$.dataKey,B=ye(ye({index:D,dataKey:L,cx:T.x,cy:T.y,r:4,fill:KP(j.item),strokeWidth:2,stroke:"#fff",payload:T.payload,value:T.value},At(H,!1)),o3(H));return I.push(C.renderActiveDot(H,B,"".concat(F,"-activePoint-").concat(D))),O?I.push(C.renderActiveDot(H,ye(ye({},B),{},{cx:O.x,cy:O.y}),"".concat(F,"-basePoint-").concat(D))):R&&I.push(null),I}),rt(_,"renderGraphicChild",function(N,j,T){var O=_.filterFormatItem(N,j,T);if(!O)return null;var D=_.getTooltipEventType(),R=_.state,I=R.isTooltipActive,F=R.tooltipAxis,$=R.activeTooltipIndex,H=R.activeLabel,L=_.props.children,B=xo(L,_a),z=O.props,V=z.points,U=z.isRange,W=z.baseLine,G=O.item.type.defaultProps!==void 0?ye(ye({},O.item.type.defaultProps),O.item.props):O.item.props,Y=G.activeDot,X=G.hide,Q=G.activeBar,ne=G.activeShape,ie=!!(!X&&I&&B&&(Y||Q||ne)),se={};D!=="axis"&&B&&B.props.trigger==="click"?se={onClick:g2(_.handleItemMouseEnter,N.props.onClick)}:D!=="axis"&&(se={onMouseLeave:g2(_.handleItemMouseLeave,N.props.onMouseLeave),onMouseEnter:g2(_.handleItemMouseEnter,N.props.onMouseEnter)});var oe=x.cloneElement(N,ye(ye({},O.props),se));function J(ee){return typeof F.dataKey=="function"?F.dataKey(ee.payload):null}if(ie)if($>=0){var ae,re;if(F.dataKey&&!F.allowDuplicatedCategory){var pe=typeof F.dataKey=="function"?J:"payload.".concat(F.dataKey.toString());ae=i3(V,pe,H),re=U&&W&&i3(W,pe,H)}else ae=V==null?void 0:V[$],re=U&&W&&W[$];if(ne||Q){var be=N.props.activeIndex!==void 0?N.props.activeIndex:$;return[x.cloneElement(N,ye(ye(ye({},O.props),se),{},{activeIndex:be})),null,null]}if(!Lt(ae))return[oe].concat(O0(_.renderActivePoints({item:O,activePoint:ae,basePoint:re,childIndex:$,isRange:U})))}else{var xe,ke=(xe=_.getItemByXY(_.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:oe},Pe=ke.graphicalItem,it=Pe.item,qe=it===void 0?N:it,$n=Pe.childIndex,Vt=ye(ye(ye({},O.props),se),{},{activeIndex:$n});return[x.cloneElement(qe,Vt),null,null]}return U?[oe,null,null]:[oe,null]}),rt(_,"renderCustomized",function(N,j,T){return x.cloneElement(N,ye(ye({key:"recharts-customized-".concat(T)},_.props),_.state))}),rt(_,"renderMap",{CartesianGrid:{handler:w2,once:!0},ReferenceArea:{handler:_.renderReferenceElement},ReferenceLine:{handler:w2},ReferenceDot:{handler:_.renderReferenceElement},XAxis:{handler:w2},YAxis:{handler:w2},Brush:{handler:_.renderBrush,once:!0},Bar:{handler:_.renderGraphicChild},Line:{handler:_.renderGraphicChild},Area:{handler:_.renderGraphicChild},Radar:{handler:_.renderGraphicChild},RadialBar:{handler:_.renderGraphicChild},Scatter:{handler:_.renderGraphicChild},Pie:{handler:_.renderGraphicChild},Funnel:{handler:_.renderGraphicChild},Tooltip:{handler:_.renderCursor,once:!0},PolarGrid:{handler:_.renderPolarGrid,once:!0},PolarAngleAxis:{handler:_.renderPolarAxis},PolarRadiusAxis:{handler:_.renderPolarAxis},Customized:{handler:_.renderCustomized}}),_.clipPathId="".concat((E=S.id)!==null&&E!==void 0?E:Kv("recharts"),"-clip"),_.throttleTriggeredAfterMouseMove=pce(_.triggeredAfterMouseMove,(A=S.throttleDelay)!==null&&A!==void 0?A:1e3/60),_.state={},_}return BKe(C,b),LKe(C,[{key:"componentDidMount",value:function(){var E,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var E=this.props,A=E.children,_=E.data,N=E.height,j=E.layout,T=xo(A,_a);if(T){var O=T.props.defaultIndex;if(!(typeof O!="number"||O<0||O>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[O]&&this.state.tooltipTicks[O].value,R=WT(this.state,_,O,D),I=this.state.tooltipTicks[O].coordinate,F=(this.state.offset.top+N)/2,$=j==="horizontal",H=$?{x:I,y:F}:{y:I,x:F},L=this.state.formattedGraphicalItems.find(function(z){var V=z.item;return V.type.name==="Scatter"});L&&(H=ye(ye({},H),L.props.points[O].tooltipPosition),R=L.props.points[O].tooltipPayload);var B={activeTooltipIndex:O,isTooltipActive:!0,activeLabel:D,activePayload:R,activeCoordinate:H};this.setState(B),this.renderCursor(T),this.accessibilityManager.setIndex(O)}}}},{key:"getSnapshotBeforeUpdate",value:function(E,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==E.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==E.margin){var _,N;this.accessibilityManager.setDetails({offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(E){Mj([xo(E.children,_a)],[xo(this.props.children,_a)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var E=xo(this.props.children,_a);if(E&&typeof E.props.shared=="boolean"){var A=E.props.shared?"axis":"item";return a.indexOf(A)>=0?A:o}return o}},{key:"getMouseInfo",value:function(E){if(!this.container)return null;var A=this.container,_=A.getBoundingClientRect(),N=BIe(_),j={chartX:Math.round(E.pageX-N.left),chartY:Math.round(E.pageY-N.top)},T=_.width/A.offsetWidth||1,O=this.inRange(j.chartX,j.chartY,T);if(!O)return null;var D=this.state,R=D.xAxisMap,I=D.yAxisMap,F=this.getTooltipEventType(),$=iX(this.state,this.props.data,this.props.layout,O);if(F!=="axis"&&R&&I){var H=_u(R).scale,L=_u(I).scale,B=H&&H.invert?H.invert(j.chartX):null,z=L&&L.invert?L.invert(j.chartY):null;return ye(ye({},j),{},{xValue:B,yValue:z},$)}return $?ye(ye({},j),$):null}},{key:"inRange",value:function(E,A){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,j=E/_,T=A/_;if(N==="horizontal"||N==="vertical"){var O=this.state.offset,D=j>=O.left&&j<=O.left+O.width&&T>=O.top&&T<=O.top+O.height;return D?{x:j,y:T}:null}var R=this.state,I=R.angleAxisMap,F=R.radiusAxisMap;if(I&&F){var $=_u(I);return wK({x:j,y:T},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var E=this.props.children,A=this.getTooltipEventType(),_=xo(E,_a),N={};_&&A==="axis"&&(_.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var j=o3(this.props,this.handleOuterEvent);return ye(ye({},j),N)}},{key:"addListener",value:function(){U_.on(q_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){U_.removeListener(q_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(E,A,_){for(var N=this.state.formattedGraphicalItems,j=0,T=N.length;j<T;j++){var O=N[j];if(O.item===E||O.props.key===E.key||A===nc(O.item.type)&&_===O.childIndex)return O}return null}},{key:"renderClipPath",value:function(){var E=this.clipPathId,A=this.state.offset,_=A.left,N=A.top,j=A.height,T=A.width;return K.createElement("defs",null,K.createElement("clipPath",{id:E},K.createElement("rect",{x:_,y:N,height:j,width:T})))}},{key:"getXScales",value:function(){var E=this.state.xAxisMap;return E?Object.entries(E).reduce(function(A,_){var N=tX(_,2),j=N[0],T=N[1];return ye(ye({},A),{},rt({},j,T.scale))},{}):null}},{key:"getYScales",value:function(){var E=this.state.yAxisMap;return E?Object.entries(E).reduce(function(A,_){var N=tX(_,2),j=N[0],T=N[1];return ye(ye({},A),{},rt({},j,T.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(E){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[E])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(E){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[E])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(E){var A=this.state,_=A.formattedGraphicalItems,N=A.activeItem;if(_&&_.length)for(var j=0,T=_.length;j<T;j++){var O=_[j],D=O.props,R=O.item,I=R.type.defaultProps!==void 0?ye(ye({},R.type.defaultProps),R.props):R.props,F=nc(R.type);if(F==="Bar"){var $=(D.data||[]).find(function(z){return bUe(E,z)}
184);if($)return{graphicalItem:O,payload:$}}else if(F==="RadialBar"){var H=(D.data||[]).find(function(z){return wK(E,z)});if(H)return{graphicalItem:O,payload:H}}else if(RC(O,N)||PC(O,N)||Py(O,N)){var L=cqe({graphicalItem:O,activeTooltipItem:N,itemData:I.data}),B=I.activeIndex===void 0?L:I.activeIndex;return{graphicalItem:ye(ye({},O),{},{childIndex:B}),payload:Py(O,N)?I.data[L]:O.props.data[L]}}}return null}},{key:"render",value:function(){var E=this;if(!MU(this))return null;var A=this.props,_=A.children,N=A.className,j=A.width,T=A.height,O=A.style,D=A.compact,R=A.title,I=A.desc,F=nX(A,TKe),$=At(F,!1);if(D)return K.createElement(LY,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},K.createElement(Rj,Dp({},$,{width:j,height:T,title:R,desc:I}),this.renderClipPath(),RU(_,this.renderMap)));if(this.props.accessibilityLayer){var H,L;$.tabIndex=(H=this.props.tabIndex)!==null&&H!==void 0?H:0,$.role=(L=this.props.role)!==null&&L!==void 0?L:"application",$.onKeyDown=function(z){E.accessibilityManager.keyboardEvent(z)},$.onFocus=function(){E.accessibilityManager.focus()}}var B=this.parseEventsOfWrapper();return K.createElement(LY,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},K.createElement("div",Dp({className:Mt("recharts-wrapper",N),style:ye({position:"relative",cursor:"default",width:j,height:T},O)},B,{ref:function(V){E.container=V}}),K.createElement(Rj,Dp({},$,{width:j,height:T,title:R,desc:I,style:GKe}),this.renderClipPath(),RU(_,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(x.Component);rt(y,"displayName",n),rt(y,"defaultProps",ye({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),rt(y,"getDerivedStateFromProps",function(b,C){var S=b.dataKey,E=b.data,A=b.children,_=b.width,N=b.height,j=b.layout,T=b.stackOffset,O=b.margin,D=C.dataStartIndex,R=C.dataEndIndex;if(C.updateId===void 0){var I=oX(b);return ye(ye(ye({},I),{},{updateId:0},m(ye(ye({props:b},I),{},{updateId:0}),C)),{},{prevDataKey:S,prevData:E,prevWidth:_,prevHeight:N,prevLayout:j,prevStackOffset:T,prevMargin:O,prevChildren:A})}if(S!==C.prevDataKey||E!==C.prevData||_!==C.prevWidth||N!==C.prevHeight||j!==C.prevLayout||T!==C.prevStackOffset||!qp(O,C.prevMargin)){var F=oX(b),$={chartX:C.chartX,chartY:C.chartY,isTooltipActive:C.isTooltipActive},H=ye(ye({},iX(C,E,j)),{},{updateId:C.updateId+1}),L=ye(ye(ye({},F),$),H);return ye(ye(ye({},L),m(ye({props:b},L),C)),{},{prevDataKey:S,prevData:E,prevWidth:_,prevHeight:N,prevLayout:j,prevStackOffset:T,prevMargin:O,prevChildren:A})}if(!Mj(A,C.prevChildren)){var B,z,V,U,W=xo(A,C0),G=W&&(B=(z=W.props)===null||z===void 0?void 0:z.startIndex)!==null&&B!==void 0?B:D,Y=W&&(V=(U=W.props)===null||U===void 0?void 0:U.endIndex)!==null&&V!==void 0?V:R,X=G!==D||Y!==R,Q=!Lt(E),ne=Q&&!X?C.updateId:C.updateId+1;return ye(ye({updateId:ne},m(ye(ye({props:b},C),{},{updateId:ne,dataStartIndex:G,dataEndIndex:Y}),C)),{},{prevChildren:A,dataStartIndex:G,dataEndIndex:Y})}return null}),rt(y,"renderActiveDot",function(b,C,S){var E;return x.isValidElement(b)?E=x.cloneElement(b,C):yt(b)?E=b(C):E=K.createElement(QP,C),K.createElement(Hn,{className:"recharts-active-dot",key:S},E)});var v=x.forwardRef(function(C,S){return K.createElement(y,Dp({},C,{ref:S}))});return v.displayName=y.displayName,v},iYe=rYe({chartName:"AreaChart",GraphicalChild:Ad,axisComponents:[{axisType:"xAxis",AxisComp:FC},{axisType:"yAxis",AxisComp:BC}],formatAxisMap:oWe});const oYe=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"],sYe=["January","February","March","April","May","June","July","August","September","October","November","December"];function aYe(e){const[t,n]=e.split("-");return`${sYe[parseInt(n,10)-1]??e} ${t}`}function lYe({data:e,height:t=180}){const n=[...e].reverse(),r=n.length%2===0?n.length-2:n.length-1,i=({x:o,y:s,payload:a,index:l})=>{const[,c]=a.value.split("-"),d=oYe[parseInt(c,10)-1]??a.value,f=l===0?"start":l===r?"end":"middle";return u.jsx("text",{x:o,y:s+12,textAnchor:f,fill:"#9ca3af",fontSize:11,children:d},`tick-${l}`)};return u.jsx(PIe,{width:"100%",height:t,children:u.jsxs(iYe,{data:n,margin:{top:5,right:0,left:0,bottom:0},children:[u.jsx("defs",{children:u.jsxs("linearGradient",{id:"trendGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[u.jsx("stop",{offset:"5%",
184stopColor:"hsl(227.94 100% 60%)",stopOpacity:.2}),u.jsx("stop",{offset:"95%",stopColor:"hsl(227.94 100% 60%)",stopOpacity:0})]})}),u.jsx(fde,{horizontal:!0,vertical:!1,strokeDasharray:"4 4",stroke:"#e2e8f0"}),u.jsx(FC,{dataKey:"month",tick:i,tickLine:!1,axisLine:!1,interval:1,padding:{left:0,right:0}}),u.jsx(BC,{hide:!0,domain:[0,"auto"]}),u.jsx(_a,{labelFormatter:aYe,separator:"",contentStyle:{backgroundColor:"white",border:"1px solid #f0f0f0",borderRadius:"8px",boxShadow:"0 2px 8px rgba(0,0,0,0.08)",fontSize:12},formatter:o=>[`${o.toLocaleString()} Searches`,""],itemStyle:{color:"hsl(227.94 100% 60%)"},labelStyle:{color:"#0f172a",fontWeight:600,marginBottom:2}}),u.jsx(Ad,{type:"monotone",dataKey:"value",stroke:"hsl(227.94 100% 60%)",strokeWidth:2,fill:"url(#trendGradient)",dot:!1,activeDot:{r:4,fill:"hsl(227.94 100% 60%)",stroke:"white",strokeWidth:2}})]})})}const cYe={2004:{code:"AO",name:"Angola"},2008:{code:"AL",name:"Albania"},2012:{code:"DZ",name:"Algeria"},2024:{code:"AO",name:"Angola"},2032:{code:"AR",name:"Argentina"},2036:{code:"AU",name:"Australia"},2040:{code:"AT",name:"Austria"},2050:{code:"BD",name:"Bangladesh"},2056:{code:"BE",name:"Belgium"},2068:{code:"BO",name:"Bolivia"},2076:{code:"BR",name:"Brazil"},2100:{code:"BG",name:"Bulgaria"},2116:{code:"KH",name:"Cambodia"},2120:{code:"CM",name:"Cameroon"},2124:{code:"CA",name:"Canada"},2144:{code:"LK",name:"Sri Lanka"},2152:{code:"CL",name:"Chile"},2156:{code:"CN",name:"China"},2170:{code:"CO",name:"Colombia"},2188:{code:"CR",name:"Costa Rica"},2191:{code:"HR",name:"Croatia"},2192:{code:"CU",name:"Cuba"},2196:{code:"CY",name:"Cyprus"},2203:{code:"CZ",name:"Czech Republic"},2208:{code:"DK",name:"Denmark"},2218:{code:"EC",name:"Ecuador"},2818:{code:"EG",name:"Egypt"},2222:{code:"SV",name:"El Salvador"},2231:{code:"ET",name:"Ethiopia"},2246:{code:"FI",name:"Finland"},2250:{code:"FR",name:"France"},2276:{code:"DE",name:"Germany"},2288:{code:"GH",name:"Ghana"},2300:{code:"GR",name:"Greece"},2320:{code:"GT",name:"Guatemala"},2344:{code:"HK",name:"Hong Kong"},2348:{code:"HU",name:"Hungary"},2356:{code:"IN",name:"India"},2360:{code:"ID",name:"Indonesia"},2368:{code:"IQ",name:"Iraq"},2376:{code:"IL",name:"Israel"},2380:{code:"IT",name:"Italy"},2388:{code:"JM",name:"Jamaica"},2392:{code:"JP",name:"Japan"},2400:{code:"JO",name:"Jordan"},2404:{code:"KE",name:"Kenya"},2410:{code:"KR",name:"South Korea"},2414:{code:"KW",name:"Kuwait"},2422:{code:"LB",name:"Lebanon"},2434:{code:"LY",name:"Libya"},2458:{code:"MY",name:"Malaysia"},2484:{code:"MX",name:"Mexico"},2504:{code:"MA",name:"Morocco"},2528:{code:"NL",name:"Netherlands"},2554:{code:"NZ",name:"New Zealand"},2566:{code:"NG",name:"Nigeria"},2578:{code:"NO",name:"Norway"},2586:{code:"PK",name:"Pakistan"},2591:{code:"PA",name:"Panama"},2600:{code:"PY",name:"Paraguay"},2604:{code:"PE",name:"Peru"},2608:{code:"PH",name:"Philippines"},2616:{code:"PL",name:"Poland"},2620:{code:"PT",name:"Portugal"},2630:{code:"PR",name:"Puerto Rico"},2634:{code:"QA",name:"Qatar"},2642:{code:"RO",name:"Romania"},2643:{code:"RU",name:"Russia"},2682:{code:"SA",name:"Saudi Arabia"},2686:{code:"SN",name:"Senegal"},2702:{code:"SG",name:"Singapore"},2703:{code:"SK",name:"Slovakia"},2710:{code:"ZA",name:"South Africa"},2724:{code:"ES",name:"Spain"},2752:{code:"SE",name:"Sweden"},2756:{code:"CH",name:"Switzerland"},2764:{code:"TH",name:"Thailand"},2780:{code:"TT",name:"Trinidad & Tobago"},2788:{code:"TN",name:"Tunisia"},2792:{code:"TR",name:"Turkey"},2784:{code:"AE",name:"United Arab Emirates"},2800:{code:"UG",name:"Uganda"},2804:{code:"UA",name:"Ukraine"},2826:{code:"GB",name:"United Kingdom"},2840:{code:"US",name:"United States"},2858:{code:"UY",name:"Uruguay"},2862:{code:"VE",name:"Venezuela"},2704:{code:"VN",name:"Vietnam"},2887:{code:"YE",name:"Yemen"},2716:{code:"ZW",name:"Zimbabwe"}};function uYe(e){return cYe[e]??{code:"US",name:"United States"}}function C2({content:e}){return u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("button",{type:"button",className:"inline-flex items-center cursor-default",children:u.jsx(Tne,{className:"size-4 text-text-disabled-300 hover:text-text-soft-400 transition-colors"})})}),u.jsx(ns,{side:"top",size:"medium",className:"max-w-64",children:e})]})}function dYe({code:e,name:t,className:n="size-10"}){return u.jsx("img",{src:`/flags/${e.toUpperCase()}.svg`,alt:t,title:t,className:`${n} object-cover rounded-full`})}function fYe(e){return e<=10?{label:"Very Easy",textClass:"text-success-base",strokeColor:"hsl(171.86 72.24% 48.04%)",emoji:"ð",description:"Low competition makes this easy to rank for. All you should need is good content."}:e<=30?{label:"Easy",textClass:"text-success-base",strokeColor:"hsl(142.1 70.6% 45.3%)",emoji:"ð",description:"Low competition makes this easy to rank for. All you should need is good content."}:e<=55?{label:"Possible",textClass:"text-warning-base",strokeColor:"hsl(47.9 95.8% 53.1%)",emoji:"ðª",description:"Challenging but possible. A well-optimised page with quality content can rank."}:e<=75?{label:"Difficult",textClass:"text-away-base",strokeColor:"hsl(24.6 95% 53.1%)",emoji:"â¡",de
184scription:"Difficult to rank for. You will need good content and a strong backlink profile."}:{label:"Very Hard",textClass:"text-error-base",strokeColor:"hsl(0 72.2% 50.6%)",emoji:"ð¥",description:"Very hard. Requires a lot of backlinks and potentially years of consistent work."}}function hYe({percentage:e,strokeColor:t}){const r=2*Math.PI*34,i=Math.min(100,Math.max(0,e)),o=r-i/100*r;return u.jsxs("div",{className:"relative flex items-center justify-center shrink-0",style:{width:84,height:84},children:[u.jsxs("svg",{width:"84",height:"84",viewBox:"0 0 84 84",children:[u.jsx("circle",{cx:"42",cy:"42",r:34,fill:"none",stroke:"#E4E4E7",strokeWidth:"7"}),u.jsx("circle",{cx:"42",cy:"42",r:34,fill:"none",stroke:t,strokeWidth:"7",strokeDasharray:r,strokeDashoffset:o,strokeLinecap:"round",transform:"rotate(-90 42 42)"})]}),u.jsx("span",{className:"absolute text-label-sm font-semibold text-text-strong-950",children:i})]})}const aX={commercial:"c",informational:"i",navigational:"n",transactional:"t"},lX={c:{label:"Commercial",bgColor:"bg-information-base"},i:{label:"Informational",bgColor:"bg-feature-base"},n:{label:"Navigational",bgColor:"bg-verified-base"},t:{label:"Transactional",bgColor:"bg-success-base"}};function pYe(e,t){const n=aX[e.toLowerCase()]??e,r=(t??[]).map(a=>aX[a.toLowerCase()]??a).filter(a=>a!==n),i=new Set([n]),o=[];for(const a of r)i.has(a)||(i.add(a),o.push(a));const s=[n,...o];if(s.length===1){const a=lX[n]??{label:n,bgColor:"bg-text-soft-400"};return[{label:a.label,color:a.bgColor,flex:1}]}return s.map((a,l)=>{const c=lX[a]??{label:a,bgColor:"bg-text-soft-400"};return{label:c.label,color:c.bgColor,flex:l===0?4:1}})}const mYe={c:{label:"Commercial",color:"blue"},i:{label:"Informational",color:"purple"},n:{label:"Navigational",color:"teal"},t:{label:"Transactional",color:"green"}},gYe={LOW:{label:"Easy",color:"green"},MEDIUM:{label:"Medium",color:"orange"},HIGH:{label:"Hard",color:"red"}};function yYe({volume:e,difficulty:t,intent:n,foreignIntent:r,cpc:i,competition:o,competitionLevel:s,locationCode:a,trend:l}){const c=fYe(t),d=uYe(a),f=mYe[n]??{label:n,color:"gray"},p=pYe(n,r),m="-",y="-",v="-",b="-",C=(s==null?void 0:s.toUpperCase())??"",S=gYe[C]??{label:s??"n/a",color:"gray"};return u.jsxs("div",{className:"grid grid-cols-3 divide-x divide-stroke-soft-200",children:[u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"flex items-center gap-1 mb-5",children:[u.jsx("span",{className:"text-label-sm text-text-sub-600",children:"Traffic Overview"}),u.jsx(C2,{content:"Average number of searches per month over the last 12 months for this keyword in the selected location."})]}),u.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[u.jsx(dYe,{code:d.code,name:d.name,className:"size-10 ring-4 ring-stroke-soft-200"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-label-xs text-text-soft-400 uppercase tracking-widest mb-0.5",children:"VOLUME"}),u.jsx("p",{className:"text-title-h4 font-bold text-text-strong-950",children:(e==null?void 0:e.toLocaleString())??"â"})]})]}),u.jsx(lYe,{data:l,height:180}),u.jsx("p",{className:"text-paragraph-xs text-text-disabled-300 mt-3",children:"Traffic trends for the last 12 months"})]}),u.jsxs("div",{className:"p-6 flex flex-col gap-5",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-1 mb-4",children:[u.jsx("span",{className:"text-label-sm text-text-sub-600",children:"Keyword Difficulty"}),u.jsx(C2,{content:"A score from 0â100 indicating how hard it is to rank on the first page of Google. Higher scores mean more competition, requiring stronger content and a solid backlink profile."})]}),u.jsxs("div",{className:"flex items-start gap-4",children:[u.jsx(hYe,{percentage:Math.max(1,t),strokeColor:c.strokeColor}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[u.jsx("span",{className:"text-base leading-none",children:c.emoji}),u.jsx("span",{className:"text-label-md font-semibold text-text-strong-950",children:c.label})]}),u.jsx("p",{className:"text-paragraph-xs text-text-sub-600 leading-relaxed mb-2",children:c.description}),u.jsx("button",{className:"text-paragraph-xs text-information-base hover:underline",children:"Content Requirements"})]})]})]}),u.jsx("div",{className:"h-px bg-stroke-soft-200"}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-1 mb-3",children:[u.jsx("span",{className:"text-label-sm text-text-sub-600",children:"Intent"}),u.jsx(C2,{content:u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{children:"The dominant reason people search for this keyword. The bar shows the weight of each intent present."}),u.jsxs("ul",{className:"space-y-1 text-paragraph-xs text-text-white-0/80",children:[u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-text-white-0",children:"Informational"})," â users want to learn something"]}),u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-text-white-0",children:"Commercial"})," â users are researching before buying"]}),u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-text-white-0",children:"Transactional"})," â users want to complete a purchase"]}),u.jsxs("li",{children:[u.jsx("span",{className:"font-medium text-text-white-0",children:"Navigational"})," â users are looking for a specific site"]})]})]})})]}),u.jsx(Ri,{variant:"lighter",color:f.color,size:"medium",className:"mb-3",children:f.label}),u.jsx("div",{className:"flex h-3 rounded-full overflow-hidden gap-px",children:p.map(E=>u.jsx("div",{className:`${E.color}`,style:{flex:E.flex}},E.label))}),u.jsx("div",{className:"flex items-center gap-4 mt-2.5 flex-wrap",children:p.map(E=>u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx("span",{className:`size-2 roun
184ded-full ${E.color}`}),u.jsx("span",{className:"text-label-xs text-text-sub-600",children:E.label})]},E.label))})]})]}),u.jsxs("div",{className:"p-6",children:[u.jsxs("div",{className:"flex items-center gap-1 mb-5",children:[u.jsx("span",{className:"text-label-sm text-text-sub-600",children:"CPC & Ads"}),u.jsx(C2,{content:"Google Ads data for this keyword. CPC (cost-per-click) is the average amount advertisers pay per click. A higher CPC signals stronger commercial value. Competition level reflects how many advertisers are bidding."})]}),u.jsxs("div",{className:"mb-5",children:[u.jsx("p",{className:"text-label-sm text-text-soft-400 mb-1",children:"CPC"}),u.jsxs("p",{className:"text-title-h4 font-bold text-text-strong-950",children:["$",(i==null?void 0:i.toFixed(2))??"0.00"]})]}),u.jsx("div",{className:"h-px bg-stroke-soft-200 mb-4"}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-paragraph-sm text-text-sub-600",children:"Competition Level"}),u.jsx(Ri,{variant:"lighter",color:S.color,size:"small",children:S.label})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-paragraph-sm text-text-sub-600",children:"Bid Range"}),u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 tabular-nums",children:m})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-paragraph-sm text-text-sub-600",children:"Daily Impressions"}),u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 tabular-nums",children:y.toLocaleString()})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-paragraph-sm text-text-sub-600",children:"Daily Clicks"}),u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 tabular-nums",children:v.toLocaleString()})]}),u.jsxs("div",{className:"flex items-center justify-between gap-2",children:[u.jsx("span",{className:"text-paragraph-sm text-text-sub-600",children:"Est Daily Cost"}),u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 tabular-nums",children:b})]})]})]})]})}var vYe=x.createContext(void 0);function bYe(e){const t=x.useContext(vYe);return e||t||"ltr"}var VC="Tabs",[xYe,PSt]=j5(VC,[Z5]),Tde=Z5(),[wYe,lD]=xYe(VC),Mde=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,d=bYe(a),[f,p]=T5({prop:r,onChange:i,defaultProp:o??"",caller:VC});return u.jsx(wYe,{scope:n,baseId:Sj(),value:f,onValueChange:p,orientation:s,dir:d,activationMode:l,children:u.jsx(Za.div,{dir:d,"data-orientation":s,...c,ref:t})})});Mde.displayName=VC;var Ode="TabsList",Rde=x.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=lD(Ode,n),s=Tde(n);return u.jsx(koe,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:r,children:u.jsx(Za.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});Rde.displayName=Ode;var Pde="TabsTrigger",Dde=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=lD(Pde,n),a=Tde(n),l=$de(s.baseId,r),c=zde(s.baseId,r),d=r===s.value;return u.jsx(_oe,{asChild:!0,...a,focusable:!i,active:d,children:u.jsx(Za.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...o,ref:t,onMouseDown:za(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?s.onValueChange(r):f.preventDefault()}),onKeyDown:za(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&s.onValueChange(r)}),onFocus:za(e.onFocus,()=>{const f=s.activationMode!=="manual";!d&&!i&&f&&s.onValueChange(r)})})})});Dde.displayName=Pde;var Ide="TabsContent",Lde=x.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...s}=e,a=lD(Ide,n),l=$de(a.baseId,r),c=zde(a.baseId,r),d=r===a.value,f=x.useRef(d);return x.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),u.jsx(ZO,{present:i||d,children:({present:p})=>u.jsx(Za.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&o})})});
184Lde.displayName=Ide;function $de(e,t){return`${e}-trigger-${t}`}function zde(e,t){return`${e}-content-${t}`}var Fde=Mde,Bde=Rde,Hde=Dde,Vde=Lde;function Ude(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(Boolean);if(n.length<=1){var r=n[0];return r||null}return function(o){for(var s=0,a=n;s<a.length;s++){var l=a[s];typeof l=="function"?l(o):l&&(l.current=o)}}}function qde({onActiveTabChange:e}={}){const[t,n]=x.useState(!1),r=x.useRef(null),i=x.useRef(e);x.useEffect(()=>{i.current=e},[e]);const o=x.useCallback(()=>{r.current&&r.current.querySelectorAll('[role="tab"]').forEach((a,l)=>{var c;a.getAttribute("data-state")==="active"&&((c=i.current)==null||c.call(i,l,a))})},[]);return x.useEffect(()=>{n(!0);const s=new ResizeObserver(o),a=new MutationObserver(o);return r.current&&(s.observe(r.current),a.observe(r.current,{childList:!0,subtree:!0,attributes:!0})),o(),()=>{s.disconnect(),a.disconnect()}},[]),{mounted:t,listRef:r}}const Wde=Vde;Wde.displayName="TabMenuHorizontalContent";const Gde=x.forwardRef(({className:e,...t},n)=>u.jsx(Fde,{ref:n,orientation:"horizontal",className:Nt("w-full",e),...t}));Gde.displayName="TabMenuHorizontalRoot";const Kde=x.forwardRef(({children:e,className:t,wrapperClassName:n,...r},i)=>{const[o,s]=x.useState({width:0,left:0}),a=x.useRef(null),{mounted:l,listRef:c}=qde({onActiveTabChange:(d,f)=>{const{offsetWidth:p,offsetLeft:m}=f;s({width:p,left:m});const y=a.current;if(y){const v=y.clientWidth,b=m-v/2+p/2;y.scrollTo({left:b,behavior:"smooth"})}}});return u.jsx("div",{ref:a,className:Et("relative grid overflow-x-auto overflow-y-hidden overscroll-contain",n),children:u.jsxs(Bde,{ref:Ude(i,c),className:Nt("group/tab-list relative flex h-12 items-center gap-6 whitespace-nowrap border-y border-stroke-soft-200",t),...r,children:[u.jsx(GO,{children:e}),u.jsx("div",{className:Et("absolute -bottom-px left-0 h-0.5 bg-primary-base opacity-0 transition-all duration-300 group-has-[[data-state=active]]/tab-list:opacity-100",{hidden:!l}),style:{transform:`translate3d(${o.left}px, 0, 0)`,width:`${o.width}px`,transitionTimingFunction:"cubic-bezier(0.65, 0, 0.35, 1)"},"aria-hidden":"true"})]})})});Kde.displayName="TabMenuHorizontalList";const Yde=x.forwardRef(({className:e,...t},n)=>u.jsx(Hde,{ref:n,className:Nt("group/tab-item h-12 py-3.5 text-label-sm text-text-sub-600 outline-none","flex items-center justify-center gap-1.5","transition duration-200 ease-out","focus:outline-none","data-[state=active]:text-text-strong-950",e),...t}));Yde.displayName="TabMenuHorizontalTrigger";const cX="__create_new__";function Xde({isOpen:e,onClose:t,keywords:n,lists:r}){const[i,o]=x.useState(""),[s,a]=x.useState(""),[l,{isLoading:c}]=VCe(),[d,{isLoading:f}]=mne(),p=c||f,m=i===cX,y=n.length>1,v=()=>{o(""),a(""),t()},b=j=>n.filter(T=>j.keywords.some(O=>O.keyword.toLowerCase()===T.keyword.toLowerCase())).length,C=j=>b(j)===n.length,S=m?void 0:r.find(j=>j.id===i),E=!p&&n.length>0&&(m?!!s.trim():!!i&&(!S||!C(S))),A=async()=>{if(E)try{let j=i;m&&(j=(await d({name:s.trim()}).unwrap()).id);const T=r.find(R=>R.id===j),O=n.filter(R=>!(T!=null&&T.keywords.some(I=>I.keyword.toLowerCase()===R.keyword.toLowerCase())));await Promise.all(O.map(R=>{var I;return l({listId:j,keyword:R.keyword,searchVolume:R.searchVolume??0,difficulty:((I=R.keywordProperties)==null?void 0:I.keywordDifficulty)??R.difficulty??0,cpc:R.cpc??0,intent:R.intent??"i"}).unwrap()}));const D=n.length-O.length;y?D>0?ze.success(`Added ${O.length} of ${n.length} keywords to list (${D} already existed)`):ze.success(`Added ${O.length} keyword${O.length!==1?"s":""} to list`):ze.success(`Added "${n[0].keyword}" to list`),v()}catch{ze.error("Failed to add keywords")}},_=y?`Add ${n.length} Keywords to List`:"Add to List",N=y?`Add ${n.length} selected keywords to a keyword list.`:n.length===1?`Add "${n[0].keyword}" to a keyword list.`:"Add keyword to a list.";return u.jsx(wd,{open:e,onOpenChange:j=>!j&&v(),children:u.jsxs(Ec,{className:"max-w-[400px]",children:[u.jsx(kc,{title:_,description:N}),u.jsxs(fm,{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{children:"Select List"}),u.jsxs(Xi,{value:i,onValueChange:o,children:[u.jsx(Qi,{children:u.jsx(Zi,{placeholder:"Choose a list..."})}),u.jsxs(Ji,{children:[r.map(j=>{const T=b(j),O=T===n.length,D=T>0&&!O&&y;return u.jsxs(Ft,{value:j.id,disabled:O,children:[j.name,O?" (all already added)":D?` (${T} already added)`:""]},j.id)}),u.jsx(Ft,{value:cX,children:"+ Create new list"})]})]})]}),m&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"new-list-name",children:"New List Name"}),u.jsx(Tn,{children:u.jsx(Vn,{children:u.jsx(Mn,{id:"new-list-name",placeholder:"e.g. Bath products",value:s,onChange:j=>a(j.target.value),onKeyDown:j=>j.key==="Enter"&&A(),autoFocus:!0})})})]})]}),u.jsxs(_c,{children:[u.jsx(Re,{variant:"neutral",mode:"stroke",onClick:v,disabled:p,children:"Cancel"}),u.jsx(Re,{variant:"primary",mode:"filled",onClick:A,disabled:!E,children:p?"Adding...":u.jsxs(u.Fragment,{children:[u.jsx(wt,{as:Pi}),"Add to List"]})})]})]})})}
184const Zde=[50,100,200,500],Qde="seio:keyword-ideas:page-size";function CYe(){try{const e=localStorage.getItem(Qde);if(e==null)return 50;const t=parseInt(e,10);return Zde.includes(t)?t:50}catch{return 50}}const SYe={c:{label:"Commercial",color:"blue"},i:{label:"Informational",color:"purple"},n:{label:"Navigational",color:"teal"},t:{label:"Transactional",color:"green"}};function G_(e){return e?e.length===1?e.toLowerCase():{informational:"i",commercial:"c",navigational:"n",transactional:"t"}[e.toLowerCase()]??"i":"i"}function EYe(e){return e<=10?"hsl(171.86 72.24% 48.04%)":e<=30?"hsl(142.1 70.6% 45.3%)":e<=55?"hsl(47.9 95.8% 53.1%)":e<=75?"hsl(24.6 95% 53.1%)":"hsl(0 72.2% 50.6%)"}function zg(e){var t;return((t=e.keywordProperties)==null?void 0:t.keywordDifficulty)??e.difficulty??0}function kYe(e){return e.replace(/\b\w/g,t=>t.toUpperCase())}function _Ye({data:e,onAddToList:t,onBulkAdd:n}){const[r,i]=x.useState("all"),[o,s]=x.useState(new Set),[a,l]=x.useState("all"),[c,d]=x.useState("all"),[f,p]=x.useState("volume"),[m,y]=x.useState("desc"),[v,b]=x.useState(1),[C,S]=x.useState(CYe),E=x.useMemo(()=>e.filter(V=>{const U=zg(V);return!(r==="easy"&&U>30||r==="medium"&&(U<31||U>55)||r==="hard"&&U<56||a!=="all"&&(V.competitionLevel??"").toUpperCase()!==a||c==="under1"&&(V.cpc??0)>=1||c==="1to5"&&((V.cpc??0)<1||(V.cpc??0)>5)||c==="over5"&&(V.cpc??0)<=5)}),[e,r,a,c]),A=x.useMemo(()=>[...E].sort((V,U)=>{let W,G;switch(f){case"keyword":W=V.keyword,G=U.keyword;break;case"volume":W=V.searchVolume??0,G=U.searchVolume??0;break;case"kd":W=zg(V),G=zg(U);break;case"cpc":W=V.cpc??0,G=U.cpc??0;break;case"intent":W=G_(V.intent),G=G_(U.intent);break;default:W=V.searchVolume??0,G=U.searchVolume??0}return typeof W=="string"?m==="asc"?W.localeCompare(G):G.localeCompare(W):m==="asc"?W-G:G-W}),[E,f,m]),_=E.length,N=E.reduce((V,U)=>V+(U.searchVolume??0),0),j=_>0?Math.round(E.reduce((V,U)=>V+zg(U),0)/_):0,T=Math.max(1,Math.ceil(A.length/C)),O=A.slice((v-1)*C,v*C),D=x.useMemo(()=>{const V=Math.max(1,Math.min(v-2,T-4)),U=Math.min(T,V+4),W=[];for(let G=V;G<=U;G++)W.push(G);return W},[v,T]),R=V=>{f===V?y(U=>U==="asc"?"desc":"asc"):(p(V),y("desc")),b(1)},I=O.length>0&&O.every(V=>o.has(V.keyword)),F=!I&&O.some(V=>o.has(V.keyword)),$=V=>{s(U=>{const W=new Set(U);return V?O.forEach(G=>W.add(G.keyword)):O.forEach(G=>W.delete(G.keyword)),W})},H=(V,U)=>{s(W=>{const G=new Set(W);return U?G.add(V):G.delete(V),G})},L=()=>{const V=e.filter(U=>o.has(U.keyword));n(V),s(new Set)},B=({field:V})=>f!==V?u.jsx(pSe,{className:"size-3.5 opacity-40"}):m==="asc"?u.jsx(gSe,{className:"size-3.5"}):u.jsx(kne,{className:"size-3.5"}),z=[{field:"keyword",label:"KEYWORD",align:"left"},{field:"volume",label:"VOLUME",align:"right"}
184,{field:"kd",label:"KD",align:"center"},{field:"cpc",label:"CPC",align:"right"},{field:"intent",label:"INTENT",align:"center"}];return u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"pt-4 pb-3 flex items-center gap-2.5 flex-wrap border-b border-stroke-soft-200",children:[u.jsxs(Xi,{value:r,onValueChange:V=>{i(V),b(1)},children:[u.jsx(Qi,{className:"h-8 w-36 text-paragraph-sm",children:u.jsx(Zi,{})}),u.jsxs(Ji,{children:[u.jsx(Ft,{value:"all",children:"All KD"}),u.jsx(Ft,{value:"easy",children:"Easy (0â30)"}),u.jsx(Ft,{value:"medium",children:"Medium (31â55)"}),u.jsx(Ft,{value:"hard",children:"Hard (56+)"})]})]}),u.jsxs(Xi,{value:a,onValueChange:V=>{l(V),b(1)},children:[u.jsx(Qi,{className:"h-8 w-44 text-paragraph-sm",children:u.jsx(Zi,{})}),u.jsxs(Ji,{children:[u.jsx(Ft,{value:"all",children:"All Competition"}),u.jsx(Ft,{value:"LOW",children:"Low"}),u.jsx(Ft,{value:"MEDIUM",children:"Medium"}),u.jsx(Ft,{value:"HIGH",children:"High"})]})]}),u.jsxs(Xi,{value:c,onValueChange:V=>{d(V),b(1)},children:[u.jsx(Qi,{className:"h-8 w-32 text-paragraph-sm",children:u.jsx(Zi,{})}),u.jsxs(Ji,{children:[u.jsx(Ft,{value:"all",children:"All CPC"}),u.jsx(Ft,{value:"under1",children:"Under $1"}),u.jsx(Ft,{value:"1to5",children:"$1 â $5"}),u.jsx(Ft,{value:"over5",children:"Over $5"})]})]}),o.size>0&&u.jsxs(Re,{variant:"primary",mode:"filled",size:"small",onClick:L,children:[u.jsx(wt,{as:Pi}),"Add ",o.size," item",o.size!==1?"s":""," to list"]}),u.jsxs("div",{className:"ml-auto flex items-center gap-4 flex-wrap",children:[u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400",children:["All keywords: ",u.jsx("span",{className:"text-text-sub-600 font-medium",children:_})]}),u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400",children:["Total Volume: ",u.jsx("span",{className:"text-text-sub-600 font-medium",children:N.toLocaleString()})]}),u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400",children:["Avg KD: ",u.jsxs("span",{className:"text-text-sub-600 font-medium",children:[j,"%"]})]})]})]}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"border-b border-stroke-soft-200",children:[u.jsx("th",{className:"pl-4 pr-2 py-3 w-10",children:u.jsx(r0,{checked:I?!0:F?"indeterminate":!1,onCheckedChange:$})}),z.map(V=>u.jsx("th",{className:"px-4 py-3 text-label-xs font-medium text-text-soft-400 uppercase tracking-wide cursor-pointer select-none hover:text-text-sub-600 transition-colors",onClick:()=>R(V.field),children:u.jsxs("div",{className:`flex items-center gap-1 ${V.align==="right"?"justify-end":V.align==="center"?"justify-center":""}`,children:[V.label,u.jsx(B,{field:V.field})]})},V.field)),u.jsx("th",{className:"px-4 py-3 text-right text-label-xs font-medium text-text-soft-400 uppercase tracking-wide",children:"ACTIONS"})]})}),u.jsx("tbody",{className:"divide-y divide-stroke-soft-200",children:O.length===0?u.jsx("tr",{children:u.jsx("td",{colSpan:6,className:"px-4 py-10 text-center text-paragraph-sm text-text-soft-400",children:"No keywords match the selected filters"})}):O.map((V,U)=>{const W=zg(V),G=G_(V.intent),Y=SYe[G];return u.jsxs("tr",{className:"hover:bg-bg-weak-50 transition-colors",onContextMenu:X=>{X.preventDefault(),t(V)},children:[u.jsx("td",{className:"pl-4 pr-2 py-3 w-10",children:u.jsx(r0,{checked:o.has(V.keyword),onCheckedChange:X=>H(V.keyword,!!X),onClick:X=>X.stopPropagation()})}),u.jsx("td",{className:"px-4 py-3",children:u.jsx("span",{className:"font-mono text-label-xs uppercase tracking-wide text-text-sub-600",children:V.keyword})}),u.jsx("td",{className:"px-4 py-3 text-right",children:u.jsx("span",{className:"text-label-sm font-semibold text-text-strong-950 tabular-nums",children:(V.searchVolume??0).toLocaleString()})}),u.jsx("td",{className:"px-4 py-3",children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[u.jsx("span",{className:"size-2 rounded-full shrink-0 inline-block",style:{backgroundColor:EYe(W)}}),u.jsx("span",{className:"text-label-sm text-text-strong-950 tabular-nums",children:W})]})}),u.jsx("td",{className:"px-4 py-3 text-right",children:u.jsxs("span",{className:"text-paragraph-sm text-text-sub-600 tabular-nums",children:["$",(V.cpc??0).toFixed(2)]})}),u.jsx("td",{className:"px-4 py-3",children:u.jsx("div",{className:"flex justify-center",children:Y?u.jsx(Ri,{variant:"lighter",color:Y.color,size:"small",children:Y.label}):u.jsx("span",{className:"text-paragraph-xs text-text-soft-400",children:"â"})})}),u.jsx("td",{className:"px-4 py-3 text-right",children:u.jsxs(dm,{modal:!1,children:[u.jsx(qf,{asChild:!0,children:u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:X=>X.stopPropagation(),children:u.jsx(wt,{as:Av})})}),u.jsx(hh,{align:"end",children:u.jsx(Hu,{onSelect:()=>t(V),children:"Add to list"})})]})})]},`${V.keyword}-${U}`)})})]})}),T>1&&u.jsxs("div",{className:"px-6 py-4 flex items-center justify-between border-t border-stroke-soft-200 gap-4 flex-wrap",children:[u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400 shrink-0",children:["Page ",v," of ",T]}
184),u.jsxs(cC,{children:[u.jsx(Vs,{onClick:()=>b(V=>Math.max(1,V-1)),disabled:v===1,children:u.jsx(Us,{as:Qs})}),D.map(V=>u.jsx(u0,{current:V===v,onClick:()=>b(V),children:V},V)),u.jsx(Vs,{onClick:()=>b(V=>Math.min(T,V+1)),disabled:v===T,children:u.jsx(Us,{as:im})})]}),u.jsxs(Xi,{value:String(C),onValueChange:V=>{const U=Number(V);S(U),localStorage.setItem(Qde,V),b(1)},children:[u.jsx(Qi,{className:"h-8 w-36 text-paragraph-sm shrink-0",children:u.jsx(Zi,{})}),u.jsx(Ji,{children:Zde.map(V=>u.jsxs(Ft,{value:String(V),children:[V," / page"]},V))})]})]})]})}function AYe({keyword:e,similarKeywords:t,keywordDimensions:n}){const[r,i]=x.useState([]),{data:o=[]}=kv(),s=[{id:"main",label:kYe(e),data:t},...n?[{id:"specificity",label:"Specificity",data:n.specificity},{id:"audience",label:"Audience",data:n.audience},{id:"modifiers",label:"Modifiers",data:n.modifiers},{id:"related",label:"Related",data:n.related},{id:"temporal",label:"Temporal",data:n.temporal}]:[]];return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"bg-bg-white-0 rounded-2xl overflow-hidden",children:u.jsxs(Gde,{defaultValue:"main",children:[u.jsx(Kde,{className:"px-0 [border-top-width:0px]",children:s.map(a=>u.jsx(Yde,{value:a.id,className:"text-text-soft-400",children:a.label},a.id))}),s.map(a=>u.jsx(Wde,{value:a.id,children:u.jsx(_Ye,{data:a.data,onAddToList:l=>i([l]),onBulkAdd:i})},a.id))]})}),u.jsx(Xde,{isOpen:r.length>0,onClose:()=>i([]),keywords:r,lists:o})]})}const NYe={1:.2768,2:.1491,3:.1021,4:.0751,5:.0567,6:.0389,7:.0283,8:.0196,9:.0148,10:.0111};function jYe(e){let t=1;return e.hasAnswerBox&&(t-=.1),e.hasKnowledgeGraph&&(t-=.08),e.hasLocalResults&&(t-=.12),e.hasShopping&&(t-=.05),Math.max(t,.5)}function TYe(e){try{return new URL(e).hostname.replace(/^www\./,"")}catch{return e}}function MYe(e,t=45){try{const n=new URL(e),r=n.hostname.replace(/^www\./,""),i=n.pathname.split("/").filter(Boolean),o=i.length>0?`${r}/${i[0]}${i.length>1?"/...":""}`:r;return o.length>t?o.slice(0,t-3)+"...":o}catch{return e.length>t?e.slice(0,t-3)+"...":e}}function OYe(e,t,n){var s;const r=jYe(n),i=e.map(a=>{const c=(NYe[a.position]??0)*r,d=Math.round(t*c),f=Math.round(c*1e3)/10;return{...a,estimatedMonthlyTraffic:d,trafficShare:f,barWidth:0,domain:TYe(a.link),truncatedUrl:MYe(a.link)}}),o=((s=i[0])==null?void 0:s.estimatedMonthlyTraffic)??1;return i.map(a=>({...a,barWidth:o>0?a.estimatedMonthlyTraffic/o*100:0}))}function uX(e){return e<1?"<1%":`${Math.round(e)}%`}function RYe({serpData:e,monthlyVolume:t}){var r;if(!((r=e==null?void 0:e.organic)!=null&&r.length))return null;const n=OYe(e.organic,t,e.features);return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"bg-bg-white-0 rounded-2xl ",children:[u.jsxs("div",{className:"flex items-center gap-3 px-6 py-5",children:[u.jsxs("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0",children:[u.jsx("path",{d:"M12.2144 10.091V14.1574H17.9806C17.7274 15.4651 16.9676 16.5724 15.828 17.3169L19.3053 19.961C21.3313 18.1284 22.5001 15.4365 22.5001 12.2388C22.5001 11.4943 22.432 10.7783 22.3053 10.0911L12.2144 10.091Z",fill:"#335CFF"}),u.jsx("path",{d:"M6.20973 13.9985L5.42547 14.5869L2.64941 16.7059C4.41242 20.1327 8.02583 22.5 12.2142 22.5C15.107 22.5 17.5323 21.5645 19.3051 19.9609L15.8278 17.3168C14.8732 17.9468 13.6557 18.3287 12.2142 18.3287C9.42842 18.3287 7.06158 16.4864 6.21411 14.0046L6.20973 13.9985Z",fill:"#34A853"}),u.jsx("path",{d:"M2.64928 7.29425C1.91879 8.70691 1.5 10.301 1.5 12.0001C1.5 13.6991 1.91879 15.2932 2.64928 16.7059C2.64928 16.7154 6.21432 13.995 6.21432 13.995C6.00003 13.365 5.87337 12.6969 5.87337 12C5.87337 11.3031 6.00003 10.6349 6.21432 10.0049L2.64928 7.29425Z",fill:"#FBBC05"}),u.jsx("path",{d:"M12.2144 5.68089C13.7923 5.68089 15.1949 6.21542 16.3151 7.24634L19.3833 4.23957C17.5228 2.54052 15.1073 1.5 12.2144 1.5C8.02605 1.5 4.41242 3.85772 2.64941 7.29408L6.21434 10.005C7.0617 7.52315 9.42864 5.68089 12.2144 5.68089Z",fill:"#EA4335"})]}),u.jsx("h2",{className:"text-label-md font-medium text-text-strong-950",children:"SERP Overview"})]}),u.jsx("div",{className:"h-px bg-stroke-soft-200 mx-[22px]"}),u.jsxs("div",{className:"px-6 pt-5 pb-6",children:[u.jsx("h3",{className:"text-label-lg font-semibold text-text-strong-950 mb-1",children:"Traffic Share By Position"}),u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-4",children:"Estimated traffic for top 10 results"}),u.jsx("div",{className:"space-y-2.5",children:n.map(i=>u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"w-6 text-paragraph-sm text-text-soft-400 text-right shrink-0",children:i.position}),u.jsx("span",{className:"w-44 text-paragraph-sm text-text-sub-600 truncate shrink-0",children:i.truncatedUrl}),u.jsx("div",{className:"flex-1 h-2.5 bg-bg-soft-200 rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full bg-information-base rounded-full",style:{width:`${i.barWidth}%`}})}),u.jsx("span",{className:"w-10 text-right text-paragraph-xs text-text-sub-600 tabular-nums shrink-0",children:uX(i.trafficShare)})]},i.position))})]})]}),u.jsx("div",{className:"bg-bg-white-0 rounded-2xl divide-y divide-stroke-soft-200",children:n.map(i=>u.jsxs("div",{className:"flex items-start gap-4 p-5",children:[u.jsx("div",{className:"flex items-center justify-center shrink-0 size-10 rounded-full ring-1 ring-stroke-soft-200",children:i.position===1?u.jsx("span",{className:"text-xl leading-none",children:"ð"}):u.jsx("span",{className:"text-title-h6 font-semibold text-text-strong-950",children:i.position})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsx("div",{className:"flex items-center mb-1",children:u.jsx("span",{className:"text-label-sm text-text-strong-950 truncate",children:i.title})}),u.jsx("a",{href:i.link,target:"_blank",rel:"noopener noreferrer",className:"text-paragraph-xs text-information-base truncate block mb-1.5 hover:underline cursor-pointer",children:i.link}),u.jsx("p",{className:"text-paragraph-sm text-text-sub-600 line-clamp-2 leading-relaxed",children:i.snippet})]}),u.jsxs("div",{className:"shrink-0 text-right",children:[u.jsx("p",{className:"text-label-lg font-semibold text-text-strong-950",children:uX(i.trafficShare)}),u.jsx("p",{className:"text-paragraph-xs text-text-soft-400",children:"traffic share"}),u.jsxs("p",{className:"text-paragraph-xs text-text-sub-600 mt-1 tabular-nums",children:["~",i.estimatedMonthlyTraffic.toLocaleStr
184ing()," visits/mo"]})]})]},i.position))})]})}const PYe={c:{label:"Commercial",color:"blue"},i:{label:"Informational",color:"purple"},n:{label:"Navigational",color:"teal"},t:{label:"Transactional",color:"green"}};function DYe(){var v;const{reportId:e}=v5(),t=br(),{data:n,isLoading:r,error:i}=$Ce(e),{data:o=[]}=kv(),[s,a]=x.useState(!1),[l,c]=x.useState(!1),[d,{isLoading:f}]=FCe(),p=async()=>{try{await d(e).unwrap(),ze.success("Report deleted"),t("/keywords")}catch{ze.error("Failed to delete report")}};if(r)return u.jsx("div",{className:"flex items-center justify-center min-h-screen",children:u.jsx(Wa,{className:"w-8 h-8"})});if(i)return u.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen gap-4",children:[u.jsx("p",{className:"text-label-md text-error-base",children:"Error loading report"}),u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:()=>t("/keywords"),children:[u.jsx(wt,{as:Qs}),"Back to Keywords"]})]});if(!n)return u.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen gap-4",children:[u.jsx("p",{className:"text-label-md text-text-sub-600",children:"Report not found"}),u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:()=>t("/keywords"),children:[u.jsx(wt,{as:Qs}),"Back to Keywords"]})]});const m=()=>{var T;if(!n)return;const b=["Keyword","Search Volume","Difficulty","CPC","Competition","Intent","Competition Level","Core Keyword","Detected Language","Main Intent","Foreign Intent"].join(","),C=n.report.mainKeyword,S=[`"${n.keyword}"`,C.searchVolume,C.difficulty,C.cpc,C.competition,`"${C.intent}"`,`"${C.competitionLevel}"`,`"${C.keywordProperties.coreKeyword||""}"`,`"${C.keywordProperties.detectedLanguage}"`,`"${C.searchIntent.mainIntent}"`,`"${((T=C.searchIntent.foreignIntent)==null?void 0:T.join("; "))||""}"`].join(","),E=n.report.similarKeywords.map(O=>{var D;return[`"${O.keyword}"`,O.searchVolume,O.difficulty,O.cpc,O.competition,`"${O.intent}"`,`"${O.competitionLevel}"`,`"${O.keywordProperties.coreKeyword||""}"`,`"${O.keywordProperties.detectedLanguage}"`,`"${O.searchIntent.mainIntent}"`,`"${((D=O.searchIntent.foreignIntent)==null?void 0:D.join("; "))||""}"`].join(",")}),A=[b,S,...E].join(` 185`),_=new Blob([A],{type:"text/csv;charset=utf-8;"}),N=document.createElement("a"),j=URL.createObjectURL(_);N.setAttribute("href",j),N.setAttribute("download",`keyword-report-${n.keyword}-${new Date().toISOString().split("T")[0]}.csv`),N.style.visibility="hidden",document.body.appendChild(N),N.click(),document.body.removeChild(N)},y=PYe[n.report.mainKeyword.intent]??{label:String(n.report.mainKeyword.intent),color:"gray"};return u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[u.jsx("div",{className:"pt-5 pb-4",children:u.jsxs(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:()=>t("/keywords"),children:[u.jsx(wt,{as:Qs}),"Keywords"]})}),u.jsxs("div",{className:"pb-6 flex items-center justify-between gap-4 border-b border-stroke-soft-200",children:[u.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[u.jsx("h1",{className:"text-title-h5 font-semibold text-text-strong-950 truncate capitalize",children:n.keyword}),u.jsx(Ri,{variant:"lighter",color:y.color,size:"medium",children:y.label})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:m,children:[u.jsx(wt,{as:xSe}),"Export CSV"]}),u.jsxs(dm,{modal:!1,children:[u.jsx(qf,{asChild:!0,children:u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"small",children:[u.jsx(wt,{as:Av}),"Actions"]})}),u.jsxs(hh,{align:"end",children:[u.jsxs(Hu,{onSelect:()=>a(!0),children:['Add "',n.keyword,'" to list']}),u.jsx(mse,{}),u.jsx(Hu,{className:"text-error-base focus:bg-error-lighter focus:text-error-base",onSelect:()=>c(!0),children:"Delete report"})]})]})]})]}),u.jsxs("div",{className:"mt-6 space-y-6",children:[u.jsx(yYe,{keyword:n.keyword,volume:n.report.mainKeyword.searchVolume,difficulty:n.report.mainKeyword.keywordProperties.keywordDifficulty??n.report.mainKeyword.difficulty,intent:n.report.mainKeyword.intent,foreignIntent:(v=n.report.mainKeyword.searchIntent)==null?void 0:v.foreignIntent,cpc:n.report.mainKeyword.cpc,competition:n.report.mainKeyword.competition,competitionLevel:n.report.mainKeyword.competitionLevel,locationCode:n.locationCode,trend:n.report.mainKeyword.monthlySearches.map(b=>({month:`${b.year}-${b.month.toString().padStart(2,"0")}`,value:b.searchVolume}))}),u.jsx(AYe,{keyword:n.keyword,similarKeywords:n.report.similarKeywords,keywordDimensions:n.report.keywordDimensions}),n.report.serpData&&u.jsx(RYe,{serpData:n.report.serpData,monthlyVolume:n.report.mainKeyword.searchVolume})]}),u.jsx(wd,{open:l,onOpenChange:b=>!b&&c(!1),children:u.jsxs(Ec,{className:"max-w-[400px]",children:[u.jsx(kc,{icon:Bs,title:"Delete Report",description:`Are you sure you want to delete the report for "${n.keyword}"? This cannot be undone.`}),u.jsxs(_c,{children:[u.jsx(Re,{variant:"neutral",mode:"stroke",onClick:()=>c(!1),disabled:f,children:"Cancel"}),u.jsx(Re,{variant:"error",mode:"filled",onClick:p,disabled:f,children:f?"Deleting...":"Delete Report"})]})]})}),u.jsx(Xde,{isOpen:s,onClose:()=>a(!1),keywords:[{keyword:n.keyword,searchVolume:n.report.mainKeyword.searchVolume,difficulty:n.report.mainKeyword.keywordProperties.keywordDifficulty??n.report.mainKeyword.difficulty,cpc:n.report.mainKeyword.cpc,intent:n.report.mainKeyword.intent}],lists:o})]})}function IYe(){return u.jsxs(EO,{children:[u.jsx(on,{index:!0,element:u.jsx(XMe,{})}),u.jsx(on,{path:":reportId",element:u.jsx(DYe,{})})]})}function LYe({isOpen:e,onClose:t}
185){const[n,r]=x.useState(""),[i,{isLoading:o}]=mne(),s=async()=>{if(n.trim())try{await i({name:n.trim()}).unwrap(),ze.success(`List "${n.trim()}" created`),r(""),t()}catch{ze.error("Failed to create list")}},a=()=>{r(""),t()};return u.jsx(wd,{open:e,onOpenChange:l=>!l&&a(),children:u.jsxs(Ec,{className:"max-w-[400px]",children:[u.jsx(kc,{title:"Create Keyword List",description:"Give your list a name to get started."}),u.jsx(fm,{className:"space-y-4",children:u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"list-name",children:"List Name"}),u.jsx(Tn,{children:u.jsx(Vn,{children:u.jsx(Mn,{id:"list-name",placeholder:"e.g. Bath products",value:n,onChange:l=>r(l.target.value),onKeyDown:l=>l.key==="Enter"&&s(),autoFocus:!0})})})]})}),u.jsxs(_c,{children:[u.jsx(Re,{variant:"neutral",mode:"stroke",onClick:a,disabled:o,children:"Cancel"}),u.jsx(Re,{variant:"primary",mode:"filled",onClick:s,disabled:o||!n.trim(),children:o?"Creating...":u.jsxs(u.Fragment,{children:[u.jsx(wt,{as:Pi}),"Create List"]})})]})]})})}function dX(e){return e<30?"#10b981":e<50?"#f59e0b":e<75?"#f97316":"#ef4444"}function $Ye(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(0)}k`:e.toLocaleString()}function zYe({list:e}){const[t,n]=x.useState(!1),[r]=HCe(),i=async o=>{o.stopPropagation(),n(!1);try{await r(e.id).unwrap(),ze.success(`"${e.name}" deleted`)}catch{ze.error("Failed to delete list")}};return u.jsxs(KR,{open:t,onOpenChange:n,children:[u.jsx(YR,{asChild:!0,children:u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:o=>o.stopPropagation(),children:u.jsx(wt,{as:Av})})}),u.jsx(oC,{align:"end",className:"w-40 bg-bg-white-0 p-1",onClick:o=>o.stopPropagation(),children:u.jsx("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-paragraph-sm text-error-base hover:bg-bg-weak-50",onClick:i,children:"Delete"})})]})}function FYe(){const e=br(),[t,n]=x.useState(!1),{data:r=[],isLoading:i}=kv(),o=!i&&r.length===0,s=x.useMemo(()=>{if(!r.length)return{count:0,totalTraffic:0,avgKd:0};const a=r.flatMap(d=>d.keywords),l=a.reduce((d,f)=>d+(f.searchVolume??0),0),c=a.length>0?Math.round(a.reduce((d,f)=>d+(f.difficulty??0),0)/a.length):0;return{count:r.length,totalTraffic:l,avgKd:c}},[r]);return i?u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[u.jsxs("div",{className:"pt-6 pb-4",children:[u.jsx(ht,{className:"h-8 w-48 mb-2"}),u.jsx(ht,{className:"h-4 w-72"})]}),u.jsxs(hc,{className:"w-full",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{children:"Name"}),u.jsx(pt,{children:"Keywords"}),u.jsx(pt,{children:"Traffic Potential"}),u.jsx(pt,{children:"Avg KD"}),u.jsx(pt,{children:"Created"}),u.jsx(pt,{className:"px-4"})]})}),u.jsx(mc,{children:[...Array(3)].map((a,l)=>u.jsxs(x.Fragment,{children:[u.jsxs(ri,{children:[u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-32"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-8"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-16"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-12"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-20"})}),u.jsx(mt,{className:"px-4",children:u.jsx(ht,{className:"h-6 w-6 rounded-md"})})]}),l<2&&u.jsx(gc,{})]},l))})]})]}):u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[!o&&u.jsxs("div",{className:"pt-6 pb-4",children:[u.jsx("h1",{className:"text-display-xs font-semibold text-text-strong-950 mb-1",children:"Keyword Lists"}),u.jsx("p",{className:"text-text-sub-600 text-sm font-normal",children:"Organise keywords from your reports into named lists"})]}),!o&&u.jsxs("div",{className:"flex items-center gap-8 py-6",style:{backgroundImage:"linear-gradient(to right, #e5e5e5 4px, transparent 4px)",backgroundSize:"8px 1px",backgroundRepeat:"repeat-x",backgroundPosition:"bottom"},children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-0.5",children:"Created Lists"}),u.jsx("p",{className:"text-title-h5 font-semibold text-text-strong-950",children:s.count})]}),u.jsx("div",{className:"w-px h-8 bg-stroke-soft-200"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-0.5",children:"Total Traffic Potential"}),u.jsx("p",{className:"text-title-h5 font-semibold text-text-strong-950",children:s.totalTraffic.toLocaleStr
185ing()})]}),u.jsx("div",{className:"w-px h-8 bg-stroke-soft-200"}),u.jsxs("div",{children:[u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-0.5",children:"Average KD"}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsxs("p",{className:"text-title-h5 font-semibold text-text-strong-950",children:[s.avgKd,"%"]}),u.jsx("span",{className:"size-3 rounded-full flex-shrink-0",style:{backgroundColor:dX(s.avgKd)}})]})]})]}),!o&&u.jsx("div",{className:"flex items-center justify-end py-6",children:u.jsxs(Re,{variant:"primary",mode:"filled",size:"small",onClick:()=>n(!0),children:[u.jsx(wt,{as:Pi}),"New List"]})}),o?u.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-12 text-center",children:[u.jsx("img",{src:kae,alt:"No keyword lists",className:"mb-6 w-32 h-32"}),u.jsx("h3",{className:"text-text-strong-950 text-lg font-medium mb-2",children:"No keyword lists yet."}),u.jsx("p",{className:"text-text-sub-600 text-sm mb-5",children:"Create a list and add keywords from your keyword reports."}),u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",onClick:()=>n(!0),children:[u.jsx(wt,{as:Pi}),"New List"]})]}):u.jsx("div",{className:"flex flex-col flex-1",children:u.jsxs(hc,{className:"w-full",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{children:"Name"}),u.jsx(pt,{children:"Keywords"}),u.jsx(pt,{children:"Traffic Potential"}),u.jsx(pt,{children:"Avg KD"}),u.jsx(pt,{children:"Created"}),u.jsx(pt,{className:"px-4"})]})}),u.jsx(mc,{children:r.map((a,l)=>{const c=a.keywords.reduce((f,p)=>f+(p.searchVolume??0),0),d=a.keywords.length>0?Math.round(a.keywords.reduce((f,p)=>f+(p.difficulty??0),0)/a.keywords.length):0;return u.jsxs(x.Fragment,{children:[u.jsxs(ri,{className:"cursor-pointer",onClick:()=>e(`/keyword-lists/${a.id}`),children:[u.jsx(mt,{children:u.jsx("span",{className:"text-label-sm text-text-strong-950",children:a.name})}),u.jsx(mt,{children:u.jsx("span",{className:"text-label-sm text-text-strong-950",children:a.keywords.length})}),u.jsx(mt,{children:u.jsx("span",{className:"text-label-sm text-text-strong-950",children:$Ye(c)})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"size-3 rounded-full flex-shrink-0",style:{backgroundColor:dX(d)}}),u.jsxs("span",{className:"text-label-sm text-text-strong-950",children:[d,"%"]})]})}),u.jsx(mt,{children:u.jsx("span",{className:"text-label-sm text-text-sub-600",children:new Date(a.createdAt).toLocaleDateString()})}),u.jsx(mt,{className:"px-4",onClick:f=>f.stopPropagation(),children:u.jsx(zYe,{list:a})})]}),l<r.length-1&&u.jsx(gc,{})]},a.id)})})]})}),u.jsx(LYe,{isOpen:t,onClose:()=>n(!1)})]})}const BYe={c:{label:"Commercial",color:"blue"},i:{label:"Informational",color:"purple"},n:{label:"Navigational",color:"teal"},t:{label:"Transactional",color:"green"}};function HYe(e){return e<=10?"hsl(171.86 72.24% 48.04%)":e<=30?"hsl(142.1 70.6% 45.3%)":e<=55?"hsl(47.9 95.8% 53.1%)":e<=75?"hsl(24.6 95% 53.1%)":"hsl(0 72.2% 50.6%)"}function VYe(e){return e?e.length===1?e.toLowerCase():{informational:"i",commercial:"c",navigational:"n",transactional:"t"}[e.toLowerCase()]??"i":"i"}function UYe(){const{listId:e}=v5(),t=br(),{data:n,isLoading:r,error:i}=BCe(e),[o]=UCe(),s=async a=>{try{await o({listId:e,keyword:a}).unwrap(),ze.success(`Removed "${a}"`)}catch{ze.error("Failed to remove keyword")}};return r?u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[u.jsx("div",{className:"pt-5 pb-4",children:u.jsx(ht,{className:"h-6 w-32"})}),u.jsx("div",{className:"pb-6 border-b border-stroke-soft-200",children:u.jsx(ht,{className:"h-8 w-48"})}),u.jsx("div",{className:"mt-6",children:u.jsxs(hc,{className:"w-full",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{children:"Keyword"}),u.jsx(pt,{children:"Volume"}),u.jsx(pt,{children:"KD"}),u.jsx(pt,{children:"CPC"}),u.jsx(pt,{children:"Intent"}),u.jsx(pt,{className:"px-4"})]})}),u.jsx(mc,{children:[...Array(4)].map((a,l)=>u.jsxs(x.Fragment,{children:[u.jsxs(ri,{children:[u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-40"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-16"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-10"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-12"})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-5 w-20 rounded-full"})}),u.jsx(mt,{className:"px-4",children:u.jsx(ht,{className:"h-6 w-6 rounded-md"})})]}),l<3&&u.jsx(gc,{})]},l))})]})})]}):i||!n?u.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen gap-4",children:[u.jsx("p",{className:"text-label-md text-error-base",children:"List not found"}),u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:()=>t("/keyword-lists"),children:[u.jsx(wt,{as:Qs}),"Back to Keyword Lists"]})]}):u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[u.jsx("div",{className:"pt-5 pb-4",children:u.jsxs(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:()=>t("/keyword-lists"),children:[u.jsx(wt,{as:Qs}),"Keyword Lists"]})}),u.jsxs("div",{className:"pb-6 flex items-center justify-between gap-4 border-b border-stroke-soft-200",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("h1",{className:"text-title-h5 font-semibold text-text-strong-950",children:n.name}),u.jsxs(Ri,{variant:"lighter",color:"gray",size:"medium",children:[n.keywords.length," ",n.keywords.length===1?"keyword":"keywords"]})]}),n.keywords.length>0&&(()=>{const a=n.keywords.reduce((c,d)=>c+(d.searchVolume??0),0),l=Math.round(n.keywords.reduce((c,d)=>c+(d.difficulty??0),0)/n.keywords.length);return u.jsxs("div",{className:"flex items-center gap-6",children:[u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400",children:["All keywords: ",u.jsx("span",{className:"font-semibold text-text-strong-950",children:n.keywords.length})]}),u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400",children:["Total Volume: ",u.jsx("span",{className:"font-semibold text-text-strong-950",children:a.toLocaleStr
vendor: 15,075 bytes, line 185
185ing()})]}),u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400",children:["Avg KD: ",u.jsxs("span",{className:"font-semibold text-text-strong-950",children:[l,"%"]})]})]})})()]}),u.jsx("div",{className:"mt-6 flex flex-col flex-1",children:n.keywords.length===0?u.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[u.jsx("p",{className:"text-text-sub-600 text-sm",children:"No keywords in this list yet."}),u.jsx("p",{className:"text-text-soft-400 text-sm mt-1",children:"Add keywords from a keyword report by right-clicking or using the actions menu."})]}):u.jsxs(hc,{className:"w-full",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{children:"Keyword"}),u.jsx(pt,{className:"text-right",children:"Volume"}),u.jsx(pt,{className:"text-center",children:"KD"}),u.jsx(pt,{className:"text-right",children:"CPC"}),u.jsx(pt,{className:"text-center",children:"Intent"}),u.jsx(pt,{className:"px-4"})]})}),u.jsx(mc,{children:n.keywords.map((a,l)=>{const c=VYe(a.intent),d=BYe[c];return u.jsxs(x.Fragment,{children:[u.jsxs(ri,{children:[u.jsx(mt,{children:u.jsx("span",{className:"font-mono text-label-xs uppercase tracking-wide text-text-sub-600",children:a.keyword})}),u.jsx(mt,{className:"text-right",children:u.jsx("span",{className:"text-label-sm font-semibold text-text-strong-950 tabular-nums",children:(a.searchVolume??0).toLocaleString()})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[u.jsx("span",{className:"size-2 rounded-full shrink-0 inline-block",style:{backgroundColor:HYe(a.difficulty??0)}}),u.jsx("span",{className:"text-label-sm text-text-strong-950 tabular-nums",children:a.difficulty??0})]})}),u.jsx(mt,{className:"text-right",children:u.jsxs("span",{className:"text-paragraph-sm text-text-sub-600 tabular-nums",children:["$",(a.cpc??0).toFixed(2)]})}),u.jsx(mt,{children:u.jsx("div",{className:"flex justify-center",children:d?u.jsx(Ri,{variant:"lighter",color:d.color,size:"small",children:d.label}):u.jsx("span",{className:"text-paragraph-xs text-text-soft-400",children:"â"})})}),u.jsx(mt,{className:"px-4",children:u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:()=>s(a.keyword),children:u.jsx(wt,{as:Bs})})})]}),l<n.keywords.length-1&&u.jsx(gc,{})]},`${a.keyword}-${l}`)})})]})})]})}function qYe(){return u.jsxs(EO,{children:[u.jsx(on,{index:!0,element:u.jsx(FYe,{})}),u.jsx(on,{path:":listId",element:u.jsx(UYe,{})})]})}var tb=e=>e.type==="checkbox",Ef=e=>e instanceof Date,Mi=e=>e==null;const Jde=e=>typeof e=="object";var rr=e=>!Mi(e)&&!Array.isArray(e)&&Jde(e)&&!Ef(e),WYe=e=>rr(e)&&e.target?tb(e.target)?e.target.checked:e.target.value:e,GYe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,KYe=(e,t)=>e.has(GYe(t)),YYe=e=>{const t=e.constructor&&e.constructor.prototype;return rr(t)&&t.hasOwnProperty("isPrototypeOf")},cD=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function di(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(cD&&(e instanceof Blob||r))&&(n||rr(e)))if(t=n?[]:{},!n&&!YYe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=di(e[i]));else return e;return t}var UC=e=>Array.isArray(e)?e.filter(Boolean):[],hr=e=>e===void 0,We=(e,t,n)=>{if(!t||!rr(e))return n;const r=UC(t.split(/[,[\].]+?/)).reduce((i,o)=>Mi(i)?i:i[o],e);return hr(r)||r===e?hr(e[t])?n:e[t]:r},Aa=e=>typeof e=="boolean",uD=e=>/^\w*$/.test(e),efe=e=>UC(e.replace(/["|']|\]/g,"").split(/\.|\[/)),_n=(e,t,n)=>{let r=-1;const i=uD(t)?[t]:efe(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let l=n;if(r!==s){const c=e[a];l=rr(c)||Array.isArray(c)?c:isNaN(+i[r+1])?{}:[]}if(a==="__proto__"||a==="constructor"||a==="prototype")return;e[a]=l,e=e[a]}};const fX={BLUR:"blur",FOCUS_OUT:"focusout"},Ls={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Rl={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};K.createContext(null);var XYe=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Ls.all&&(t._proxyFormState[s]=!r||Ls.all),e[s]}});return i},Da=e=>typeof e=="string",ZYe=(e,t,n,r,i)=>Da(e)?(r&&t.watch.add(e),We(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),We(n,o))):(r&&(t.watchAll=!0),n),QYe=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},A1=e=>Array.isArray(e)?e:[e],hX=()=>{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},GT=e=>Mi(e)||!Jde(e);function Au(e,t){if(GT(e)||GT(t))return e===t;if(Ef(e)&&Ef(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Ef(o)&&Ef(s)||rr(o)&&rr(s)||Array.isArray(o)&&Array.isArray(s)?!Au(o,s):o!==s)return!1}}return!0}var Ti=e=>rr(e)&&!Object.keys(e).length,dD=e=>e.type==="file",$s=e=>typeof e=="function",r4=e=>{if(!cD)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},tfe=e=>e.type==="select-multiple",fD=e=>e.type==="radio",JYe=e=>fD(e)||tb(e),K_=e=>r4(e)&&e.isConnected;function eXe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=hr(e)?r++:e[t[r++]];return e}function tXe(e){for(const t in e)if(e.hasOwnProperty(t)&&!hr(e[t]))return!1;return!0}function _r(e,t){const n=Array.isArray(t)?t:uD(t)?[t]:efe(t),r=n.length===1?e:eXe(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(rr(r)&&Ti(r)||Array.isArray(r)&&tXe(r))&&_r(e,n.slice(0,-1)),e}var nfe=e=>{for(const t in e)if($s(e[t]))return!0;return!1};function i4(e,t={}){const n=Array.isArray(e);if(rr(e)||n)for(const r in e)Array.isArray(e[r])||rr(e[r])&&!nfe(e[r])?(t[r]=Array.isArray(e[r])?[]:{},i4(e[r],t[r])):Mi(e[r])||(t[r]=!0);return t}function rfe(e,t,n){const r=Array.isArray(e);if(rr(e)||r)for(const i in e)Array.isArray(e[i])||rr(e[i])&&!nfe(e[i])?hr(t)||GT(n[i])?n[i]=Array.isArray(e[i])?i4(e[i],[]):{...i4(e[i])}:rfe(e[i],Mi(t)?{}:t[i],n[i]):n[i]=!Au(e[i],t[i]);return n}var Fg=(e,t)=>rfe(e,t,i4(t));const pX={value:!1,isValid:!1},mX={value:!0,isValid:!0};var ife=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!hr(e[0].attributes.value)?hr(e[0].value)||e[0].value===""?mX:{value:e[0].value,isValid:!0}:mX:pX}return pX},ofe=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>hr(e)?e:t?e===""?NaN:e&&+e:n&&Da(e)?new Date(e):r?r(e):e;const gX={isValid:!1,value:null};var sfe=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,gX):gX;function yX(e){const t=e.ref;return dD(t)?t.files:fD(t)?sfe(e.refs).value:tfe(t)?[...t.selectedOptions].map(({value:n})=>n):tb(t)?ife(e.refs).value:ofe(hr(t.value)?e.ref.value:t.value,e)}var nXe=(e,t,n,r)=>{const i={};for(const o of e){const s=We(t,o);s&&_n(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},o4=e=>e instanceof RegExp,Bg=e=>hr(e)?e:o4(e)?e.source:rr(e)?o4(e.value)?e.value.source:e.value:e,vX=e=>({isOnSubmit:!e||e===Ls.onSubmit,isOnBlur:e===Ls.onBlur,isOnChange:e===Ls.onChange,isOnAll:e===Ls.all,isOnTouch:e===Ls.onTouched});const bX="AsyncFunction";var rXe=e=>!!e&&!!e.validate&&!!($s(e.validate)&&e.validate.constructor.name===bX||rr(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===bX)),iXe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),xX=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const N1=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=We(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)return!0;if(s.ref&&t(s.ref,s.name)&&!r)return!0;if(N1(a,t))break}else if(rr(a)&&N1(a,t))break}}};function wX(e,t,n){const r=We(e,n);if(r||uD(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=We(t,o),a=We(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var oXe=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Ti(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Ls.all))},sXe=(e,t,n)=>!e||!t||e===t||A1(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),aXe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,lXe=(e,t)=>!UC(We(e,t)).length&&_r(e,t),cXe=(e,t,n)=>{const r=A1(We(e,n));return _n(r,"root",t[n]),_n(e,n,r),e},cw=e=>Da(e);function CX(e,t,n="validate"){if(cw(e)||Array.isArray(e)&&e.every(cw)||Aa(e)&&!e)return{type:n,message:cw(e)?e:"",ref:t}}var vp=e=>rr(e)&&!o4(e)?e:{value:e,message:""},SX=async(e,t,n,r,i,o)=>{const{ref:s,refs:a,required:l,maxLength:c,minLength:d,min:f,max:p,pattern:m,validate:y,name:v,valueAsNumber:b,mount:C}=e._f,S=We(n,v);if(!C||t.has(v))return{};const E=a?a[0]:s,A=I=>{i&&E.reportValidity&&(E.setCustomValidity(Aa(I)?"":I||""),E.reportValidity())},_={},N=fD(s),j=tb(s),T=N||j,O=(b||dD(s))&&hr(s.value)&&hr(S)||r4(s)&&s.value===""||S===""||Array.isArray(S)&&!S.length,D=QYe.bind(null,v,r,_),R=(I,F,$,H=Rl.maxLength,L=Rl.minLength)=>{const B=I?F:$;_[v]={type:I?H:L,message:B,ref:s,...D(I?H:L,B)}};if(o?!Array.isArray(S)||!S.length:l&&(!T&&(O||Mi(S))||Aa(S)&&!S||j&&!ife(a).isValid||N&&!sfe(a).isValid)){const{value:I,message:F}=cw(l)?{value:!!l,message:l}:vp(l);if(I&&(_[v]={type:Rl.required,message:F,ref:E,...D(Rl.required,F)},!r))return A(F),_}if(!O&&(!Mi(f)||!Mi(p))){let I,F;const $=vp(p),H=vp(f);if(!Mi(S)&&!isNaN(S)){const L=s.valueAsNumber||S&&+S;Mi($.value)||(I=L>$.value),Mi(H.value)||(F=L<H.value)}else{const L=s.valueAsDate||new Date(S),B=U=>new Date(new Date().toDateString()+" "+U),z=s.type=="time",V=s.type=="week";Da($.value)&&S&&(I=z?B(S)>B($.value):V?S>$.value:L>new Date($.value)),Da(H.value)&&S&&(F=z?B(S)<B(H.value):V?S<H.value:L<new Date(H.value))}if((I||F)&&(R(!!I,$.message,H.message,Rl.max,Rl.min),!r))return A(_[v].message),_}if((c||d)&&!O&&(Da(S)||o&&Array.isArray(S))){const I=vp(c),F=vp(d),$=!Mi(I.value)&&S.length>+I.value,H=!Mi(F.value)&&S.length<+F.value;if(($||H)&&(R($,I.message,F.message),!r))return A(_[v].message),_}if(m&&!O&&Da(S)){const{value:I,message:F}=vp(m);if(o4(I)&&!S.match(I)&&(_[v]={type:Rl.pattern,message:F,ref:s,...D(Rl.pattern,F)},!r))return A(F),_}if(y){if($s(y)){const I=await y(S,n),F=CX(I,E);if(F&&(_[v]={...F,...D(Rl.validate,F.message)},!r))return A(F.message),_}else if(rr(y)){let I={};for(const F in y){if(!Ti(I)&&!r)break;const $=CX(await y[F](S,n),E,F);$&&(I={...$,...D(F,$.message)},A($.message),r&&(_[v]=I))}if(!Ti(I)&&(_[v]={ref:E,...I},!r))return _}}return A(!0),_};const uXe={mode:Ls.onSubmit,reValidateMode:Ls.onChange,shouldFocusError:!0};function dXe(e={}){let t={...uXe,...e},n={submitCount:0,isDirty:!1,isLoading:$s(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1};const r={};let i=rr(t.defaultValues)||rr(t.values)?di(t.values||t.defaultValues)||{}:{},o=t.shouldUnregister?{}:di(i),s={action:!1,mount:!1,watch:!1},a={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},l,c=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let f={...d};const p={array:hX(),state:hX()},m=vX(t.mode),y=vX(t.reValidateMode),v=t.criteriaMode===Ls.all,b=ee=>ue=>{clearTimeout(c),c=setTimeout(ee,ue)},C=async ee=>{if(!t.disabled&&(d.isValid||f.isValid||ee)){const ue=t.resolver?Ti((await O()).errors):await R(r,!0);ue!==n.isValid&&p.state.next({isValid:ue})}},S=(ee,ue)=>{!t.disabled&&(d.isValidating||d.validatingFields||f.isValidating||f.validatingFields)&&((ee||Array.from(a.mount)).forEach(me=>{me&&(ue?_n(n.validatingFields,me,ue):_r(n.validatingFields,me))}),p.state.next({validatingFields:n.validatingFields,isValidating:!Ti(n.validatingFields)}))},E=(ee,ue=[],me,je,Ae=!0,_e=!0)=>{if(je&&me&&!t.disabled){if(s.action=!0,_e&&Array.isArray(We(r,ee))){const Oe=me(We(r,ee),je.argA,je.argB);Ae&&_n(r,ee,Oe)}if(_e&&Array.isArray(We(n.errors,ee))){const Oe=me(We(n.errors,ee),je.argA,je.argB);Ae&&_n(n.errors,ee,Oe),lXe(n.errors,ee)}if((d.touchedFields||f.touchedFields)&&_e&&Array.isArray(We(n.touchedFields,ee))){const Oe=me(We(n.touchedFields,ee),je.argA,je.argB);Ae&&_n(n.touchedFields,ee,Oe)}(d.dirtyFields||f.dirtyFields)&&(n.dirtyFields=Fg(i,o)),p.state.next({name:ee,isDirty:F(ee,ue),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else _n(o,ee,ue)},A=(ee,ue)=>{_n(n.errors,ee,ue),p.state.next({errors:n.errors})},_=ee=>{n.errors=ee,p.state.next({errors:n.errors,isValid:!1})},N=(ee,ue,me,je)=>{const Ae=We(r,ee);if(Ae){const _e=We(o,ee,hr(me)?We(i,ee):me);hr(_e)||je&&je.defaultChecked||ue?_n(o,ee,ue?_e:yX(Ae._f)):L(ee,_e),s.mount&&C()}},j=(ee,ue,me,je,Ae)=>{let _e=!1,Oe=!1;const dt={name:ee};if(!t.disabled){if(!me||je){(d.isDirty||f.isDirty)&&(Oe=n.isDirty,n.isDirty=dt.isDirty=F(),_e=Oe!==dt.isDirty);const vt=Au(We(i,ee),ue);Oe=!!We(n.dirtyFields,ee),vt?_r(n.dirtyFields,ee):_n(n.dirtyFields,ee,!0),dt.dirtyFields=n.dirtyFields,_e=_e||(d.dirtyFields||f.dirtyFields)&&Oe!==!vt}if(me){const vt=We(n.touchedFields,ee);vt||(_n(n.touchedFields,ee,me),dt.touchedFields=n.touchedFields,_e=_e||(d.touchedFields||f.touchedFields)&&vt!==me)}_e&&Ae&&p.state.next(dt)}return _e?dt:{}},T=(ee,ue,me,je)=>{const Ae=We(n.errors,ee),_e=(d.isValid||f.isValid)&&Aa(ue)&&n.isValid!==ue;if(t.delayError&&me?(l=b(()=>A(ee,me)),l(t.delayError)):(clearTimeout(c),l=null,me?_n(n.errors,ee,me):_r(n.errors,ee)),(me?!Au(Ae,me):Ae)||!Ti(je)||_e){const Oe={...je,..._e&&Aa(ue)?{isValid:ue}:{},errors:n.errors,name:ee};n={...n,...Oe},p.state.next(Oe)}},O=async ee=>{S(ee,!0);const ue=await t.resolver(o,t.context,nXe(ee||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return S(ee),ue},D=async ee=>{const{errors:ue}=await O(ee);if(ee)for(const me of ee){const je=We(ue,me);je?_n(n.errors,me,je):_r(n.errors,me)}else n.errors=ue;return ue},R=async(ee,ue,me={valid:!0})=>{for(const je in ee){const Ae=ee[je];if(Ae){const{_f:_e,...Oe}=Ae;if(_e){const dt=a.array.has(_e.name),vt=Ae._f&&rXe(Ae._f);vt&&d.validatingFields&&S([je],!0);const Kt=await SX(Ae,a.disabled,o,v,t.shouldUseNativeValidation&&!ue,dt);if(vt&&d.validatingFields&&S([je]),Kt[_e.name]&&(me.valid=!1,ue))break;!ue&&(We(Kt,_e.name)?dt?cXe(n.errors,Kt,_e.name):_n(n.errors,_e.name,Kt[_e.name]):_r(n.errors,_e.name))}!Ti(Oe)&&await R(Oe,ue,me)}}return me.valid},I=()=>{for(const ee of a.unMount){const ue=We(r,ee);ue&&(ue._f.refs?ue._f.refs.every(me=>!K_(me)):!K_(ue._f.ref))&&oe(ee)}
vendor: 9,731 bytes, line 185
185a.unMount=new Set},F=(ee,ue)=>!t.disabled&&(ee&&ue&&_n(o,ee,ue),!Au(G(),i)),$=(ee,ue,me)=>ZYe(ee,a,{...s.mount?o:hr(ue)?i:Da(ee)?{[ee]:ue}:ue},me,ue),H=ee=>UC(We(s.mount?o:i,ee,t.shouldUnregister?We(i,ee,[]):[])),L=(ee,ue,me={})=>{const je=We(r,ee);let Ae=ue;if(je){const _e=je._f;_e&&(!_e.disabled&&_n(o,ee,ofe(ue,_e)),Ae=r4(_e.ref)&&Mi(ue)?"":ue,tfe(_e.ref)?[..._e.ref.options].forEach(Oe=>Oe.selected=Ae.includes(Oe.value)):_e.refs?tb(_e.ref)?_e.refs.length>1?_e.refs.forEach(Oe=>(!Oe.defaultChecked||!Oe.disabled)&&(Oe.checked=Array.isArray(Ae)?!!Ae.find(dt=>dt===Oe.value):Ae===Oe.value)):_e.refs[0]&&(_e.refs[0].checked=!!Ae):_e.refs.forEach(Oe=>Oe.checked=Oe.value===Ae):dD(_e.ref)?_e.ref.value="":(_e.ref.value=Ae,_e.ref.type||p.state.next({name:ee,values:di(o)})))}(me.shouldDirty||me.shouldTouch)&&j(ee,Ae,me.shouldTouch,me.shouldDirty,!0),me.shouldValidate&&W(ee)},B=(ee,ue,me)=>{for(const je in ue){const Ae=ue[je],_e=`${ee}.${je}`,Oe=We(r,_e);(a.array.has(ee)||rr(Ae)||Oe&&!Oe._f)&&!Ef(Ae)?B(_e,Ae,me):L(_e,Ae,me)}},z=(ee,ue,me={})=>{const je=We(r,ee),Ae=a.array.has(ee),_e=di(ue);_n(o,ee,_e),Ae?(p.array.next({name:ee,values:di(o)}),(d.isDirty||d.dirtyFields||f.isDirty||f.dirtyFields)&&me.shouldDirty&&p.state.next({name:ee,dirtyFields:Fg(i,o),isDirty:F(ee,_e)})):je&&!je._f&&!Mi(_e)?B(ee,_e,me):L(ee,_e,me),xX(ee,a)&&p.state.next({...n}),p.state.next({name:s.mount?ee:void 0,values:di(o)})},V=async ee=>{s.mount=!0;const ue=ee.target;let me=ue.name,je=!0;const Ae=We(r,me),_e=Oe=>{je=Number.isNaN(Oe)||Ef(Oe)&&isNaN(Oe.getTime())||Au(Oe,We(o,me,Oe))};if(Ae){let Oe,dt;const vt=ue.type?yX(Ae._f):WYe(ee),Kt=ee.type===fX.BLUR||ee.type===fX.FOCUS_OUT,Or=!iXe(Ae._f)&&!t.resolver&&!We(n.errors,me)&&!Ae._f.deps||aXe(Kt,We(n.touchedFields,me),n.isSubmitted,y,m),wr=xX(me,a,Kt);_n(o,me,vt),Kt?(Ae._f.onBlur&&Ae._f.onBlur(ee),l&&l(0)):Ae._f.onChange&&Ae._f.onChange(ee);const en=j(me,vt,Kt),Rr=!Ti(en)||wr;if(!Kt&&p.state.next({name:me,type:ee.type,values:di(o)}),Or)return(d.isValid||f.isValid)&&(t.mode==="onBlur"?Kt&&C():Kt||C()),Rr&&p.state.next({name:me,...wr?{}:en});if(!Kt&&wr&&p.state.next({...n}),t.resolver){const{errors:tr}=await O([me]);if(_e(vt),je){const De=wX(n.errors,r,me),Yt=wX(tr,r,De.name||me);Oe=Yt.error,me=Yt.name,dt=Ti(tr)}}else S([me],!0),Oe=(await SX(Ae,a.disabled,o,v,t.shouldUseNativeValidation))[me],S([me]),_e(vt),je&&(Oe?dt=!1:(d.isValid||f.isValid)&&(dt=await R(r,!0)));je&&(Ae._f.deps&&W(Ae._f.deps),T(me,dt,Oe,en))}},U=(ee,ue)=>{if(We(n.errors,ue)&&ee.focus)return ee.focus(),1},W=async(ee,ue={})=>{let me,je;const Ae=A1(ee);if(t.resolver){const _e=await D(hr(ee)?ee:Ae);me=Ti(_e),je=ee?!Ae.some(Oe=>We(_e,Oe)):me}else ee?(je=(await Promise.all(Ae.map(async _e=>{const Oe=We(r,_e);return await R(Oe&&Oe._f?{[_e]:Oe}:Oe)}))).every(Boolean),!(!je&&!n.isValid)&&C()):je=me=await R(r);return p.state.next({...!Da(ee)||(d.isValid||f.isValid)&&me!==n.isValid?{}:{name:ee},...t.resolver||!ee?{isValid:me}:{},errors:n.errors}),ue.shouldFocus&&!je&&N1(r,U,ee?Ae:a.mount),je},G=ee=>{const ue={...s.mount?o:i};return hr(ee)?ue:Da(ee)?We(ue,ee):ee.map(me=>We(ue,me))},Y=(ee,ue)=>({invalid:!!We((ue||n).errors,ee),isDirty:!!We((ue||n).dirtyFields,ee),error:We((ue||n).errors,ee),isValidating:!!We(n.validatingFields,ee),isTouched:!!We((ue||n).touchedFields,ee)}),X=ee=>{ee&&A1(ee).forEach(ue=>_r(n.errors,ue)),p.state.next({errors:ee?n.errors:{}})},Q=(ee,ue,me)=>{const je=(We(r,ee,{_f:{}})._f||{}).ref,Ae=We(n.errors,ee)||{},{ref:_e,message:Oe,type:dt,...vt}=Ae;_n(n.errors,ee,{...vt,...ue,ref:je}),p.state.next({name:ee,errors:n.errors,isValid:!1}),me&&me.shouldFocus&&je&&je.focus&&je.focus()},ne=(ee,ue)=>$s(ee)?p.state.subscribe({next:me=>ee($(void 0,ue),me)}):$(ee,ue,!0),ie=ee=>p.state.subscribe({next:ue=>{sXe(ee.name,ue.name,ee.exact)&&oXe(ue,ee.formState||d,qe,ee.reRenderRoot)&&ee.callback({values:{...o},...n,...ue})}}).unsubscribe,se=ee=>(s.mount=!0,f={...f,...ee.formState},ie({...ee,formState:f})),oe=(ee,ue={})=>{for(const me of ee?A1(ee):a.mount)a.mount.delete(me),a.array.delete(me),ue.keepValue||(_r(r,me),_r(o,me)),!ue.keepError&&_r(n.errors,me),!ue.keepDirty&&_r(n.dirtyFields,me),!ue.keepTouched&&_r(n.touchedFields,me),!ue.keepIsValidating&&_r(n.validatingFields,me),!t.shouldUnregister&&!ue.keepDefaultValue&&_r(i,me);p.state.next({values:di(o)}),p.state.next({...n,...ue.keepDirty?{isDirty:F()}:{}}),!ue.keepIsValid&&C()},J=({disabled:ee,name:ue})=>{(Aa(ee)&&s.mount||ee||a.disabled.has(ue))&&(ee?a.disabled.add(ue):a.disabled.delete(ue))},ae=(ee,ue={})=>{let me=We(r,ee);const je=Aa(ue.disabled)||Aa(t.disabled);return _n(r,ee,{...me||{},_f:{...me&&me._f?me._f:{ref:{name:ee}},name:ee,mount:!0,...ue}}),a.mount.add(ee),me?J({disabled:Aa(ue.disabled)?ue.disabled:t.disabled,name:ee}):N(ee,!0,ue.value),{...je?{disabled:ue.disabled||t.disabled}:{},...t.progressive?{required:!!ue.required,min:Bg(ue.min),max:Bg(ue.max),minLength:Bg(ue.minLength),maxLength:Bg(ue.maxLength),pattern:Bg(ue.pattern)}:{},name:ee,onChange:V,onBlur:V,ref:Ae=>{if(Ae){ae(ee,ue),me=We(r,ee);const _e=hr(Ae.value)&&Ae.querySelectorAll&&Ae.querySelectorAll("input,select,textarea")[0]||Ae,Oe=JYe(_e),dt=me._f.refs||[];if(Oe?dt.find(vt=>vt===_e):_e===me._f.ref)return;_n(r,ee,{_f:{...me._f,...Oe?{refs:[...dt.filter(K_),_e,...Array.isArray(We(i,ee))?[{}]:[]],ref:{type:_e.type,name:ee}}:{ref:_e}}}),N(ee,!1,void 0,_e)}else me=We(r,ee,{}),me._f&&(me._f.mount=!1),(t.shouldUnregister||ue.shouldUnregister)&&!(KYe(a.array,ee)&&s.action)&&a.unMount.add(ee)}}},re=()=>t.shouldFocusError&&N1(r,U,a.mount),pe=ee=>{Aa(ee)&&(p.state.next({disabled:ee}),N1(r,(ue,me)=>{const je=We(r,me);je&&(ue.disabled=je._f.disabled||ee,Array.isArray(je._f.refs)&&je._f.refs.forEach(Ae=>{Ae.disabled=je._f.disabled||ee}))},0,!1))},be=(ee,ue)=>async me=>{let je;me&&(me.preventDefault&&me.preventDefault(),me.persist&&me.persist());let Ae=di(o);if(p.state.next({isSubmitting:!0}),t.resolver){const{errors:_e,values:Oe}=await O();n.errors=_e,Ae=Oe}else await R(r);if(a.disabled.size)for(const _e of a.disabled)_n(Ae,_e,void 0);if(_r(n.errors,"root"),Ti(n.errors)){p.state.next({errors:{}});try{await ee(Ae,me)}catch(_e){je=_e}}else ue&&await ue({...n.errors},me),re(),setTimeout(re);if(p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ti(n.errors)&&!je,submitCount:n.submitCount+1,errors:n.errors}),je)throw je},xe=(ee,ue={})=>{We(r,ee)&&(hr(ue.defaultValue)?z(ee,di(We(i,ee))):(z(ee,ue.defaultValue),_n(i,ee,di(ue.defaultValue))),ue.keepTouched||_r(n.touchedFields,ee),ue.keepDirty||(_r(n.dirtyFields,ee),n.isDirty=ue.defaultValue?F(ee,di(We(i,ee))):F()),ue.keepError||(_r(n.errors,ee),d.isValid&&C()),p.state.next({...n}))},ke=(ee,ue={})=>{const me=ee?di(ee):i,je=di(me),Ae=Ti(ee),_e=Ae?i:je;if(ue.keepDefaultValues||(i=me),!ue.keepValues){if(ue.keepDirtyValues){const Oe=new Set([...a.mount,...Object.keys(Fg(i,o))]);for(const dt of Array.from(Oe))We(n.dirtyFields,dt)?_n(_e,dt,We(o,dt)):z(dt,We(_e,dt))}else{if(cD&&hr(ee))for(const Oe of a.mount){const dt=We(r,Oe);if(dt&&dt._f){const vt=Array.isArray(dt._f.refs)?dt._f.refs[0]:dt._f.ref;if(r4(vt)){const Kt=vt.closest("form");if(Kt){Kt.reset();break}}}}for(const Oe of a.mount)z(Oe,We(_e,Oe))}o=di(_e),p.array.next({values:{..._e}}),p.state.next({values:{..._e}})}a={mount:ue.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!d.isValid||!!ue.keepIsValid||!!ue.keepDirtyValues,s.watch=!!t.shouldUnregister,p.state.next({submitCount:ue.keepSubmitCount?n.submitCount:0,isDirty:Ae?!1:ue.keepDirty?n.isDirty:!!(ue.keepDefaultValues&&!Au(ee,i)),isSubmitted:ue.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Ae?{}:ue.keepDirtyValues?ue.keepDefaultValues&&o?Fg(i,o):n.dirtyFields:ue.keepDefaultValues&&ee?Fg(i,ee):ue.keepDirty?n.dirtyFields:{},touchedFields:ue.keepTouched?n.touchedFields:{},errors:ue.keepErrors?n.errors:{},isSubmitSuccessful:ue.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Pe=(ee,ue)=>ke($s(ee)?ee(o):ee,ue),it=(ee,ue={})=>{const me=We(r,ee),je=me&&me._f;if(je){const Ae=je.refs?je.refs[0]:je.ref;Ae.focus&&(Ae.focus(),ue.shouldSelect&&$s(Ae.select)&&Ae.select())}},qe=ee=>{n={...n,...ee}},Vt={control:{register:ae,unregister:oe,getFieldState:Y,handleSubmit:be,setError:Q,_subscribe:ie,_runSchema:O,_getWatch:$,_getDirty:F,_setValid:C,_setFieldArray:E,_setDisabledField:J,_setErrors:_,_getFieldArray:H,_reset:ke,_resetDefaultValues:()=>$s(t.defaultValues)&&t.defaultValues().then(ee=>{Pe(ee,t.resetOptions),p.state.next({isLoading:!1})}),_removeUnmounted:I,_disableForm:pe,_subjects:p,_proxyFormState:d,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(ee){s=ee},get _defaultValues(){return i},get _names(){return a},set _names(ee){a=ee},get _formState(){return n},get _options(){return t},set _options(ee){t={...t,...ee}}},subscribe:se,trigger:W,register:ae,handleSubmit:be,watch:ne,setValue:z,getValues:G,reset:Pe,resetField:xe,clearErrors:X,unregister:oe,setError:Q,setFocus:it,getFieldState:Y};return{...Vt,formControl:Vt}}function afe(e={}){const t=K.useRef(void 0),n=K.useRef(void 0),[r,i]=K.useState({isDirty:!1,isValidating:!1,isLoading:$s(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:$s(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...e.formControl?e.formControl:dXe(e),formState:r},e.formControl&&e.defaultValues&&!$s(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions));const o=t.current.control;return o._options=e,K.useLayoutEffect(()=>o._subscribe({formState:o._proxyFormState,callback:()=>i({...o._formState}
185),reRenderRoot:!0}),[o]),K.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),K.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),K.useEffect(()=>{e.values&&!Au(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[e.values,o]),K.useEffect(()=>{e.errors&&!Ti(e.errors)&&o._setErrors(e.errors)},[e.errors,o]),K.useEffect(()=>{o._state.mount||(o._setValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),K.useEffect(()=>{e.shouldUnregister&&o._subjects.state.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=XYe(r,o),t.current}var Y_={exports:{}},X_={};/** 186 * @license React 187 * use-sync-external-store-shim.production.js 188 * 189 * Copyright (c) Meta Platforms, Inc. and affiliates. 190 * 191 * This source code is licensed under the MIT license found in the 192 * LICENSE file in the root directory of this source tree. 193 */var EX;function fXe(){if(EX)return X_;EX=1;var e=pd();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(f,p){var m=p(),y=r({inst:{value:m,getSnapshot:p}}),v=y[0].inst,b=y[1];return o(function(){v.value=m,v.getSnapshot=p,l(v)&&b({inst:v})},[f,m,p]),i(function(){return l(v)&&b({inst:v}),f(function(){l(v)&&b({inst:v})})},[f]),s(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function c(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return X_.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,X_}var kX;function lfe(){return kX||(kX=1,Y_.exports=fXe()),Y_.exports}var cfe=lfe();function Qr(e){this.content=e}Qr.prototype={constructor:Qr,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new Qr(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new Qr(n)},addToStart:function(e,t){return new Qr([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new Qr(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new Qr(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=Qr.from(e),e.size?new Qr(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=Qr.from(e),e.size?new Qr(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=Qr.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}};Qr.from=function(e){if(e instanceof Qr)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new Qr(t)};function ufe(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=ufe(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}function dfe(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s==a){n-=l,r-=l;continue}if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,d=Math.min(s.text.length,a.text.length);for(;c<d&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=dfe(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}}class we{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let d=a+1;l.nodesBetween(Math.max(0,t-d),Math.min(l.content.size,n-d),r,i+d)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}
vendor: 11,334 bytes, line 193
193textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new we(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a.isText?a=a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a=a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new we(r,i)}cutByIndex(t,n){return t==n?we.empty:t==0&&n==this.content.length?this:new we(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new we(i,o)}addToStart(t){return new we([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new we(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return ufe(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return dfe(this,t,n,r)}findIndex(t,n=-1){if(t==0)return S2(0,t);if(t==this.size)return S2(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let r=0,i=0;;r++){let o=this.child(r),s=i+o.nodeSize;if(s>=t)return s==t||n>0?S2(r+1,s):S2(r,i);i=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return we.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new we(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return we.empty;let n,r=0;for(let i=0;i<t.length;i++){let o=t[i];r+=o.nodeSize,i&&o.isText&&t[i-1].sameMarkup(o)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new we(n||t,r)}static from(t){if(!t)return we.empty;if(t instanceof we)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new we([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}we.empty=new we([],0);const Z_={index:0,offset:0};function S2(e,t){return Z_.index=e,Z_.offset=t,Z_}function s4(e,t){if(e===t)return!0;if(!(e&&typeof e=="object")||!(t&&typeof t=="object"))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!s4(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!s4(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}let sn=class KT{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,r=!1;for(let i=0;i<t.length;i++){let o=t[i];if(this.eq(o))return t;if(this.type.excludes(o.type))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&s4(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return KT.none;if(t instanceof KT)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}};sn.none=[];class a4 extends Error{}class Ie{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=hfe(this.content,t+this.openStart,n);return r&&new Ie(r,this.openStart,this.openEnd)}removeBetween(t,n){return new Ie(ffe(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(t){return this.content.eq(t.content)&&this.openStart==t.openStart&&this.openEnd==t.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let t={content:this.content.toJSON()};return this.openStart>0&&(t.openStart=this.openStart),this.openEnd>0&&(t.openEnd=this.openEnd),t}static fromJSON(t,n){if(!n)return Ie.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new Ie(we.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new Ie(t,r,i)}}Ie.empty=new Ie(we.empty,0,0);function ffe(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(ffe(o.content,t-i-1,n-i-1)))}function hfe(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return e.cut(0,t).append(n).append(e.cut(t));let a=hfe(s.content,t-o-1,n);return a&&e.replaceChild(i,s.copy(a))}function hXe(e,t,n){if(n.openStart>e.depth)throw new a4("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new a4("Inconsistent open depths");return pfe(e,t,n,0)}function pfe(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=pfe(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let s=e.parent,a=s.content;return Pf(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}else{let{start:s,end:a}=pXe(n,e);return Pf(o,gfe(e,s,a,t,r))}else return Pf(o,l4(e,t,r))}function mfe(e,t){if(!t.type.compatibleContent(e.type))throw new a4("Cannot join "+t.type.name+" onto "+e.type.name)}function YT(e,t,n){let r=e.node(n);return mfe(r,t.node(n)),r}function Rf(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function j1(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Rf(e.nodeAfter,r),o++));for(let a=o;a<s;a++)Rf(i.child(a),r);t&&t.depth==n&&t.textOffset&&Rf(t.nodeBefore,r)}function Pf(e,t){return e.type.checkContent(t),e.copy(t)}function gfe(e,t,n,r,i){let o=e.depth>i&&YT(e,t,i+1),s=r.depth>i&&YT(n,r,i+1),a=[];return j1(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(mfe(o,s),Rf(Pf(o,gfe(e,t,n,r,i+1)),a)):(o&&Rf(Pf(o,l4(e,t,i+1)),a),j1(t,n,i,a),s&&Rf(Pf(s,l4(n,r,i+1)),a)),j1(r,null,i,a),new we(a)}function l4(e,t,n){let r=[];if(j1(null,e,n,r),e.depth>n){let i=YT(e,t,n+1);Rf(Pf(i,l4(e,t,n+1)),r)}return j1(t,null,n,r),new we(r)}function pXe(e,t){let n=t.depth-e.openStart,i=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)i=t.node(o).copy(we.from(i));return{start:i.resolveNoCache(e.openStart+n),end:i.resolveNoCache(i.content.size-e.openEnd-n)}}class By{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(t){return t==null?this.depth:t<0?this.depth+t:t}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(t){return this.path[this.resolveDepth(t)*3]}index(t){return this.path[this.resolveDepth(t)*3+1]}indexAfter(t){return t=this.resolveDepth(t),this.index(t)+(t==this.depth&&!this.textOffset?0:1)}start(t){return t=this.resolveDepth(t),t==0?0:this.path[t*3-1]+1}end(t){return t=this.resolveDepth(t),this.start(t)+this.node(t).content.size}before(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position before the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]}after(t){if(t=this.resolveDepth(t),!t)throw new RangeError("There is no position after the top-level node");return t==this.depth+1?this.pos:this.path[t*3-1]+this.path[t*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let t=this.parent,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return sn.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=t.parent.maybeChild(t.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(t){for(let n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){if(t.pos<this.pos)return t.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==t.pos?1:0);r>=0;r--)if(t.pos<=this.end(r)&&(!n||n(this.node(r))))return new c4(this,t,r);return null}sameParent(t){return this.pos-this.parentOffset==t.pos-t.parentOffset}max(t){return t.pos>this.pos?t:this}min(t){return t.pos<this.pos?t:this}toString(){let t="";for(let n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new By(n,r,o)}
vendor: 4,393 bytes, line 193
193static resolveCached(t,n){let r=_X.get(t);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else _X.set(t,r=new mXe);let i=r.elts[r.i]=By.resolve(t,n);return r.i=(r.i+1)%gXe,i}}class mXe{constructor(){this.elts=[],this.i=0}}const gXe=12,_X=new WeakMap;class c4{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const yXe=Object.create(null);let Ku=class XT{constructor(t,n,r,i=sn.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||we.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,r,i,this)}descendants(t){this.nodesBetween(0,this.content.size,t)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(t,n,r,i){return this.content.textBetween(t,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(t){return this==t||this.sameMarkup(t)&&this.content.eq(t.content)}sameMarkup(t){return this.hasMarkup(t.type,t.attrs,t.marks)}hasMarkup(t,n,r){return this.type==t&&s4(this.attrs,n||t.defaultAttrs||yXe)&&sn.sameSet(this.marks,r||sn.none)}copy(t=null){return t==this.content?this:new XT(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new XT(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return Ie.empty;let i=this.resolve(t),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),c=i.node(s).content.cut(i.pos-a,o.pos-a);return new Ie(c,i.depth-s,o.depth-s)}replace(t,n,r){return hXe(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return By.resolveCached(this,t)}resolveNoCache(t){return By.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),yfe(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=we.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(t){return t.content.size?this.canReplace(this.childCount,this.childCount,t.content):this.type.compatibleContent(t.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let t=sn.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!sn.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}
193`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return this.content.size&&(t.content=this.content.toJSON()),this.marks.length&&(t.marks=this.marks.map(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=we.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};Ku.prototype.text=void 0;class u4 extends Ku{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):yfe(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new u4(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new u4(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function yfe(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Jf{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new vXe(t,n);if(r.next==null)return Jf.empty;let i=vfe(r);r.next&&r.err("Unexpected trailing text");let o=kXe(EXe(i));return _Xe(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(t.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let t=0;t<this.next.length;t++){let{type:n}=this.next[t];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];function o(s,a){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return we.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,a.concat(d));if(p)return p}}return null}return o(this,[])}findWrapping(t){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==t)return this.wrapCache[r+1];let n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(t)){let s=[];for(let a=i;a.type;a=a.via)s.push(a.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:a,next:l}=o.next[s];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!i.type||l.validEnd)&&(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(t){if(t>=this.next.length)throw new RangeError(`There's no ${t}th edge in this content match`);return this.next[t]}toString(){let t=[];function n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return n(this),t.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+t.indexOf(r.next[s].next);return o}).join(` 194`)}}Jf.empty=new Jf(!0);class vXe{constructor(t,n){this.string=t,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=t.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(t){return this.next==t&&(this.pos++||!0)}err(t){throw new SyntaxError(t+" (in content expression '"+this.string+"')")}}function vfe(e){let t=[];do t.push(bXe(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function bXe(e){let t=[];do t.push(xXe(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function xXe(e){let t=SXe(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else if(e.eat("{"))t=wXe(e,t);else break;return t}function AX(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function wXe(e,t){let n=AX(e),r=n;return e.eat(",")&&(e.next!="}"?r=AX(e):r=-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function CXe(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(t)&&i.push(s)}return i.length==0&&e.err("No node type or group '"+t+"' found"),i}function SXe(e){if(e.eat("(")){let t=vfe(e);return e.eat(")")||e.err("Missing closing paren"),t}else if(/\W/.test(e.next))e.err("Unexpected token '"+e.next+"'");else{let t=CXe(e,e.next).map(n=>(e.inline==null?e.inline=n.isInline:e.inline!=n.isInline&&e.err("Mixing inline and block content"),{type:"name",value:n}));return e.pos++,t.length==1?t[0]:{type:"choice",exprs:t}}}function EXe(e){let t=[[]];return i(o(e,0),n()),t;function n(){return t.push([])-1}function r(s,a,l){let c={term:l,to:a};return t[s].push(c),c}
vendor: 54,619 bytes, lines 194-197
194function i(s,a){s.forEach(l=>l.to=a)}function o(s,a){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],a);if(l==s.exprs.length-1)return c;i(c,a=n())}else if(s.type=="star"){let l=n();return r(a,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,a),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(a)].concat(o(s.expr,a));if(s.type=="range"){let l=a;for(let c=0;c<s.min;c++){let d=n();i(o(s.expr,l),d),l=d}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let d=n();r(l,d),i(o(s.expr,l),d),l=d}return[r(l)]}else{if(s.type=="name")return[r(a,void 0,s.value)];throw new Error("Unknown expr type")}}}}function bfe(e,t){return t-e}function NX(e,t){let n=[];return r(t),n.sort(bfe);function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];!a&&n.indexOf(l)==-1&&r(l)}}}function kXe(e){let t=Object.create(null);return n(NX(e,0));function n(r){let i=[];r.forEach(s=>{e[s].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let d=0;d<i.length;d++)i[d][0]==a&&(c=i[d][1]);NX(e,l).forEach(d=>{c||i.push([a,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let o=t[r.join(",")]=new Jf(r.indexOf(e.length-1)>-1);for(let s=0;s<i.length;s++){let a=i[s][1].sort(bfe);o.next.push({type:i[s][0],next:t[a.join(",")]||n(a)})}return o}}function _Xe(e,t){for(let n=0,r=[e];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function xfe(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function wfe(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function Cfe(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function Sfe(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new NXe(e,r,t[r]);return n}let jX=class Efe{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Sfe(t,r.attrs),this.defaultAttrs=xfe(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||t=="text"),this.isText=t=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Jf.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:wfe(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ku(this,this.computeAttrs(t),we.from(n),sn.setFrom(r))}createChecked(t=null,n,r){return n=we.from(n),this.checkContent(n),new Ku(this,this.computeAttrs(t),n,sn.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),n=we.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(we.empty,!0);return o?new Ku(this,t,n.append(o),sn.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.validEnd)return!1;for(let r=0;r<t.childCount;r++)if(!this.allowsMarks(t.child(r).marks))return!1;return!0}checkContent(t){if(!this.validContent(t))throw new RangeError(`Invalid content for node ${this.name}: ${t.toString().slice(0,50)}`)}checkAttrs(t){Cfe(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:sn.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new Efe(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function AXe(e,t,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${o}`)}}class NXe{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?AXe(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class qC{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Sfe(t,i.attrs),this.excluded=null;let o=xfe(this.attrs);this.instance=o?new sn(this,o):null}create(t=null){return!t&&this.instance?this.instance:new sn(this,wfe(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new qC(o,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){Cfe(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}class hD{constructor(t){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in t)n[i]=t[i];n.nodes=Qr.from(t.nodes),n.marks=Qr.from(t.marks||{}),this.nodes=jX.compile(this.spec.nodes,this),this.marks=qC.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=Jf.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?TX(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:TX(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(t,n=null,r,i){if(typeof t=="string")t=this.nodeType(t);else if(t instanceof jX){if(t.schema!=this)throw new RangeError("Node type from different schema used ("+t.name+")")}else throw new RangeError("Invalid node type: "+t);return t.createChecked(n,r,i)}text(t,n){let r=this.nodes.text;return new u4(r,r.defaultAttrs,t,sn.setFrom(n))}mark(t,n){return typeof t=="string"&&(t=this.marks[t]),t.create(n)}nodeFromJSON(t){return Ku.fromJSON(this,t)}markFromJSON(t){return sn.fromJSON(this,t)}nodeType(t){let n=this.nodes[t];if(!n)throw new RangeError("Unknown node type: "+t);return n}}function TX(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let a in e.marks){let l=e.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}function jXe(e){return e.tag!=null}function TXe(e){return e.style!=null}class sc{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(jXe(i))this.tags.push(i);else if(TXe(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=t.nodes[i.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new OX(this,n,!1);return r.addAll(t,sn.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new OX(this,n,!0);return r.addAll(t,sn.none,n.from,n.to),Ie.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(RXe(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=RX(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in t.nodes){let o=t.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=RX(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new sc(t,sc.schemaRules(t)))}}const kfe={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},MXe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},_fe={ol:!0,ul:!0},Hy=1,ZT=2,uw=4;function MX(e,t,n){return t!=null?(t?Hy:0)|(t==="full"?ZT:0):e&&e.whitespace=="pre"?Hy|ZT:n&-5}class E2{constructor(t,n,r,i,o,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=sn.none,this.match=o||(s&uw?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(we.from(t));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(t.type))?(this.match=r,i):null}}return this.match.findWrapping(t.type)}finish(t){if(!(this.options&Hy)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=we.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(we.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!kfe.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class OX{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,s=MX(null,n.preserveWhitespace,0)|(r?uw:0);i?o=new E2(i.type,i.attrs,sn.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new E2(null,null,sn.none,!0,null,s):o=new E2(t.schema.topNodeType,null,sn.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,o=i.options&ZT?"full":this.localPreserveWS||(i.options&Hy)>0;if(o==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(o)o!=="full"?r=r.replace(/\r?\n|\r/g," "):r=r.replace(/\r\n?/g,` 195`);else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let s=i.content[i.content.length-1],a=t.previousSibling;(!s||a&&a.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(r=r.slice(1))}r&&this.insertNode(this.parser.schema.text(r),n),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s=t.nodeName.toLowerCase(),a;_fe.hasOwnProperty(s)&&this.parser.normalizeLists&&OXe(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(a=this.parser.matchTag(t,this,r));e:if(l?l.ignore:MXe.hasOwnProperty(s))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,d=this.needsBlock;if(kfe.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break e}let f=l&&l.skip?n:this.readStyles(t,n);f&&this.addAll(t,f),c&&this.sync(o),this.needsBlock=d}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?a:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(` 196`),n)}ignoreFallback(t,n){t.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a=void 0;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r)||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n){let r,i;for(let o=this.open;o>=0;o--){let s=this.nodes[o],a=s.findWrapping(t);if(a&&(!r||r.length>a.length)&&(r=a,i=s,!a.length)||s.solid)break}if(!r)return null;this.sync(i);for(let o=0;o<r.length;o++)n=this.enterInner(r[o],null,n,!1);return n}insertNode(t,n){if(t.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let r=this.findPlace(t,n);if(r){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(t.type));let o=sn.none;for(let s of r.concat(t.marks))(i.type?i.type.allowsMarkType(s.type):PX(s.type,t.type))&&(o=s.addToSet(o));return i.content.push(t.mark(o)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=MX(t,o,s.options);s.options&uw&&s.content.length==0&&(a|=uw);let l=sn.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):PX(c.type,t))?(l=c.addToSet(l),!1):!0),this.nodes.push(new E2(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(t));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(t){for(let n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=Hy)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&t.nodeType==1&&t.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=t.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function OXe(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let r=t.nodeType==1?t.nodeName.toLowerCase():null;r&&_fe.hasOwnProperty(r)&&n?(n.appendChild(t),t=n):r=="li"?n=t:r&&(n=null)}}function RXe(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function RX(e){let t={};for(let n in e)t[n]=e[n];return t}function PX(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:d}=a.edge(l);if(c==t||o.indexOf(d)<0&&s(d))return!0}};if(s(i.contentMatch))return!0}}class xh{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Q_(n).createDocumentFragment());let i=r,o=[];return t.forEach(s=>{if(o.length||s.marks.length){let a=0,l=0;for(;a<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],d=this.serializeMark(c,s.isInline,n);d&&(o.push([c,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=dw(Q_(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&dw(Q_(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return dw(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new xh(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=DX(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return DX(t.marks)}}function DX(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Q_(e){return e.document||window.document}const IX=new WeakMap;function PXe(e){let t=IX.get(e);return t===void 0&&IX.set(e,t=DXe(e)),t}function DXe(e){let t=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")t||(t=[]),t.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return n(e),t}function dw(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=PXe(r))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let a,l=n?e.createElementNS(n,i):e.createElement(i),c=t[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let p=f.indexOf(" ");p>0?l.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):l.setAttribute(f,c[f])}}for(let f=d;f<t.length;f++){let p=t[f];if(p===0){if(f<t.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:m,contentDOM:y}=dw(e,p,n,r);if(l.appendChild(m),y){if(a)throw new RangeError("Multiple content holes");a=y}}}return{dom:l,contentDOM:a}}const Afe=65535,Nfe=Math.pow(2,16);function IXe(e,t){return e+t*Nfe}function LX(e){return e&Afe}function LXe(e){return(e-(e&Afe))/Nfe}const jfe=1,Tfe=2,fw=4,Mfe=8;class QT{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Mfe)>0}get deletedBefore(){return(this.delInfo&(jfe|fw))>0}get deletedAfter(){return(this.delInfo&(Tfe|fw))>0}get deletedAcross(){return(this.delInfo&fw)>0}}class So{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&So.empty)return So.empty}recover(t){let n=0,r=LX(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+LXe(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let c=this.ranges[a+o],d=this.ranges[a+s],f=l+c;if(t<=f){let p=c?t==l?-1:t==f?1:n:n,m=l+i+(p<0?0:d);if(r)return m;let y=t==(n<0?l:f)?null:IXe(a/3,t-l),v=t==l?Tfe:t==f?jfe:fw;return(n<0?t!=l:t!=f)&&(v|=Mfe),new QT(m,v,y)}i+=d-c}return r?t+i:new QT(t+i,0,null)}touches(t,n){let r=0,i=LX(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[a+o],d=l+c;if(t<=d&&a==i*3)return!0;r+=this.ranges[a+s]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],d=this.ranges[i+r];t(a,a+c,l,l+d),o+=d-c}}invert(){return new So(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?So.empty:new So(t<0?[0,-t,0]:[0,0,t])}}So.empty=new So([]);class Vy{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Vy(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Vy;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],a=s.mapResult(t,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,t=this._maps[l].recover(a.recover);continue}}i|=a.delInfo,t=a.pos}return r?t:new QT(t,i,null)}}const J_=Object.create(null);class ki{getMap(){return So.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=J_[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in J_)throw new RangeError("Duplicate use of step JSON ID "+t);return J_[t]=n,n.prototype.jsonID=t,n}}class mr{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new mr(t,null)}static fail(t){return new mr(null,t)}static fromReplace(t,n,r,i){try{return mr.ok(t.replace(n,r,i))}catch(o){if(o instanceof a4)return mr.fail(o.message);throw o}}}function pD(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(pD(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return we.fromArray(r)}class Du extends ki{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new Ie(pD(n.content,(s,a)=>!s.isAtom||!a.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return mr.fromReplace(t,this.from,this.to,o)}invert(){return new Ks(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Du(n.pos,r.pos,this.mark)}merge(t){return t instanceof Du&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Du(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Du(n.from,n.to,t.markFromJSON(n.mark))}}ki.jsonID("addMark",Du);class Ks extends ki{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new Ie(pD(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return mr.fromReplace(t,this.from,this.to,r)}invert(){return new Du(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ks(n.pos,r.pos,this.mark)}merge(t){return t instanceof Ks&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new Ks(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ks(n.from,n.to,t.markFromJSON(n.mark))}}ki.jsonID("removeMark",Ks);class Iu extends ki{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return mr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return mr.fromReplace(t,this.pos,this.pos+1,new Ie(we.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Iu(this.pos,n.marks[i]);return new Iu(this.pos,this.mark)}}return new R0(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Iu(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Iu(n.pos,t.markFromJSON(n.mark))}}ki.jsonID("addNodeMark",Iu);class R0 extends ki{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return mr.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return mr.fromReplace(t,this.pos,this.pos+1,new Ie(we.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new Iu(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new R0(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new R0(n.pos,t.markFromJSON(n.mark))}}ki.jsonID("removeNodeMark",R0);class Hr extends ki{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&JT(t,this.from,this.to)?mr.fail("Structure replace would overwrite content"):mr.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new So([this.from,this.to-this.from,this.slice.size])}invert(t){return new Hr(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new Hr(n.pos,Math.max(n.pos,r.pos),this.slice)}merge(t){if(!(t instanceof Hr)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?Ie.empty:new Ie(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new Hr(this.from,this.to+(t.to-t.from),n,this.structure)}else if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?Ie.empty:new Ie(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new Hr(t.from,this.to,n,this.structure)}else return null}toJSON(){let t={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Hr(n.from,n.to,Ie.fromJSON(t,n.slice),!!n.structure)}}ki.jsonID("replace",Hr);class Ur extends ki{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(JT(t,this.from,this.gapFrom)||JT(t,this.gapTo,this.to)))return mr.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return mr.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?mr.fromReplace(t,this.from,this.to,r):mr.fail("Content does not fit in gap")}getMap(){return new So([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Ur(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Ur(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let t={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(t.slice=this.slice.toJSON()),this.structure&&(t.structure=!0),t}static fromJSON(t,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Ur(n.from,n.to,n.gapFrom,n.gapTo,Ie.fromJSON(t,n.slice),n.insert,!!n.structure)}}ki.jsonID("replaceAround",Ur);function JT(e,t,n){let r=e.resolve(t),i=n-t,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}function $Xe(e,t,n,r){let i=[],o=[],s,a;e.doc.nodesBetween(t,n,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let p=Math.max(c,t),m=Math.min(c+l.nodeSize,n),y=r.addToSet(f);for(let v=0;v<f.length;v++)f[v].isInSet(y)||(s&&s.to==p&&s.mark.eq(f[v])?s.to=m:i.push(s=new Ks(p,m,f[v])));a&&a.to==p?a.to=m:o.push(a=new Du(p,m,r))}}),i.forEach(l=>e.step(l)),o.forEach(l=>e.step(l))}function zXe(e,t,n,r){let i=[],o=0;e.doc.nodesBetween(t,n,(s,a)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof qC){let c=s.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(a+s.nodeSize,n);for(let d=0;d<l.length;d++){let f=l[d],p;for(let m=0;m<i.length;m++){let y=i[m];y.step==o-1&&f.eq(i[m].style)&&(p=y)}p?(p.to=c,p.step=o):i.push({style:f,from:Math.max(a,t),to:c,step:o})}}}),i.forEach(s=>e.step(new Ks(s.from,s.to,s.style)))}function mD(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),d=a+c.nodeSize,f=r.matchType(c.type);if(!f)s.push(new Hr(a,d,Ie.empty));else{r=f;for(let p=0;p<c.marks.length;p++)n.allowsMarkType(c.marks[p].type)||e.step(new Ks(a,d,c.marks[p]));if(i&&c.isText&&n.whitespace!="pre"){let p,m=/\r?\n|\r/g,y;for(;p=m.exec(c.text);)y||(y=new Ie(we.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new Hr(a+p.index,a+p.index+p[0].length,y))}}a=d}if(!r.validEnd){let l=r.fillBefore(we.empty,!0);e.replace(a,a,new Ie(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function FXe(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function wm(e){let n=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let r=e.depth;;--r){let i=e.$from.node(r),o=e.$from.index(r),s=e.$to.indexAfter(r);if(r<e.depth&&i.canReplace(o,s,n))return r;if(r==0||i.type.spec.isolating||!FXe(i,o,s))break}return null}function BXe(e,t,n){let{$from:r,$to:i,depth:o}=t,s=r.before(o+1),a=i.after(o+1),l=s,c=a,d=we.empty,f=0;for(let y=o,v=!1;y>n;y--)v||r.index(y)>0?(v=!0,d=we.from(r.node(y).copy(d)),f++):l--;let p=we.empty,m=0;for(let y=o,v=!1;y>n;y--)v||i.after(y+1)<i.end(y)?(v=!0,p=we.from(i.node(y).copy(p)),m++):c++;e.step(new Ur(l,c,s,a,new Ie(d.append(p),f,m),d.size-f,!0))}function gD(e,t,n=null,r=e){let i=HXe(e,t),o=i&&VXe(r,t);return o?i.map($X).concat({type:t,attrs:n}).concat(o.map($X)):null}function $X(e){return{type:e,attrs:null}}function HXe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.contentMatchAt(r).findWrapping(t);if(!o)return null;let s=o.length?o[0]:t;return n.canReplaceWith(r,i,s)?o:null}function VXe(e,t){let{parent:n,startIndex:r,endIndex:i}=e,o=n.child(r),s=t.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:t).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:s}function UXe(e,t,n){let r=we.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let a=n[s].type.contentMatch.matchFragment(r);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=we.from(n[s].type.create(n[s].attrs,r))}let i=t.start,o=t.end;e.step(new Ur(i,o,i,o,new Ie(r,0,0),n.length,!0))}function qXe(e,t,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=e.steps.length;e.doc.nodesBetween(t,n,(s,a)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&WXe(e.doc,e.mapping.slice(o).map(a),r)){let c=null;if(r.schema.linebreakReplacement){let m=r.whitespace=="pre",y=!!r.contentMatch.matchType(r.schema.linebreakReplacement);m&&!y?c=!1:!m&&y&&(c=!0)}c===!1&&Rfe(e,s,a,o),mD(e,e.mapping.slice(o).map(a,1),r,void 0,c===null);let d=e.mapping.slice(o),f=d.map(a,1),p=d.map(a+s.nodeSize,1);return e.step(new Ur(f,p,f+1,p-1,new Ie(we.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&Ofe(e,s,a,o),!1}})}function Ofe(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function Rfe(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(` 197`))}})}function WXe(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function GXe(e,t,n,r,i){let o=e.doc.nodeAt(t);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let s=n.create(r,null,i||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,s);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new Ur(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new Ie(we.from(s),0,0),1,!0))}function ac(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,d=n-2;c>o;c--,d--){let f=i.node(c),p=i.index(c);if(f.type.spec.isolating)return!1;let m=f.content.cutByIndex(p,f.childCount),y=r&&r[d+1];y&&(m=m.replaceChild(0,y.type.create(y.attrs)));let v=r&&r[d]||f;if(!f.canReplace(p+1,f.childCount)||!v.type.validContent(m))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function KXe(e,t,n=1,r){let i=e.doc.resolve(t),o=we.empty,s=we.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=we.from(i.node(a).copy(o));let d=r&&r[c];s=we.from(d?d.type.create(d.attrs,s):i.node(a).copy(s))}e.step(new Hr(t,t,new Ie(o.append(s),n,n),!0))}function Nd(e,t){let n=e.resolve(t),r=n.index();return Pfe(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function YXe(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let o=t.child(i),s=o.type==r?e.type.schema.nodes.text:o.type;if(n=n.matchType(s),!n||!e.type.allowsMarks(o.marks))return!1}return n.validEnd}function Pfe(e,t){return!!(e&&t&&!e.isLeaf&&YXe(e,t))}function WC(e,t,n=-1){let r=e.resolve(t);for(let i=r.depth;;i--){let o,s,a=r.index(i);if(i==r.depth?(o=r.nodeBefore,s=r.nodeAfter):n>0?(o=r.node(i+1),a++,s=r.node(i).maybeChild(a)):(o=r.node(i).maybeChild(a-1),s=r.node(i+1)),o&&!o.isTextblock&&Pfe(o,s)&&r.node(i).canReplace(a,a+1))return t;if(i==0)break;t=n<0?r.before(i):r.after(i)}}function XXe(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,o=e.doc.resolve(t-n),s=o.node().type;if(i&&s.inlineContent){let d=s.whitespace=="pre",f=!!s.contentMatch.matchType(i);d&&!f?r=!1:!d&&f&&(r=!0)}let a=e.steps.length;if(r===!1){let d=e.doc.resolve(t+n);Rfe(e,d.node(),d.before(),a)}s.inlineContent&&mD(e,t+n-1,s,o.node().contentMatchAt(o.index()),r==null);let l=e.mapping.slice(a),c=l.map(t-n);if(e.step(new Hr(c,l.map(t+n,-1),Ie.empty,!0)),r===!0){let d=e.doc.resolve(c);Ofe(e,d.node(),d.before(),e.steps.length)}return e}function ZXe(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let o=r.index(i);if(r.node(i).canReplaceWith(o,o,n))return r.before(i+1);if(o>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let o=r.indexAfter(i);if(r.node(i).canReplaceWith(o,o,n))return r.after(i+1);if(o<r.node(i).childCount)return null}return null}function Dfe(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let s=r.depth;s>=0;s--){let a=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(a>0?1:0),c=r.node(s),d=!1;if(o==1)d=c.canReplace(l,l,i);else{let f=c.contentMatchAt(l).findWrapping(i.firstChild.type);d=f&&c.canReplaceWith(l,l,f[0])}if(d)return a==0?r.pos:a<0?r.before(s+1):r.after(s+1)}return null}function GC(e,t,n=t,r=Ie.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return Ife(i,o,r)?new Hr(t,n,r):new QXe(i,o,r).fit()}function Ife(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}class QXe{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=we.empty;for(let i=0;i<=t.depth;i++){let o=t.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(t.indexAfter(i))})}for(let i=t.depth;i>0;i--)this.placed=we.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(t<0?this.$to:r.doc.resolve(t));if(!i)return null;let o=this.placed,s=r.depth,a=i.depth;for(;s&&a&&o.childCount==1;)o=o.firstChild.content,s--,a--;let l=new Ie(o,s,a);return t>-1?new Ur(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new Hr(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=eA(this.unplaced.content,r-1).firstChild,i=o.content):i=this.unplaced.content;let s=i.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],d,f=null;if(n==1&&(s?c.matchType(s.type)||(f=c.fillBefore(we.from(s),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:f};if(n==2&&s&&(d=c.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:d};if(o&&c.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=eA(t,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new Ie(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=eA(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new Ie(l1(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new Ie(l1(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let v=0;v<o.length;v++)this.openFrontierNode(o[v]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,c=0,d=[],{match:f,type:p}=this.frontier[n];if(i){for(let v=0;v<i.childCount;v++)d.push(i.child(v));f=f.matchFragment(i)}let m=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let v=a.child(c),b=f.matchType(v.type);if(!b)break;c++,(c>1||l==0||v.content.size)&&(f=b,d.push(Lfe(v.mark(p.allowedMarks(v.marks)),c==1?l:0,c==a.childCount?m:-1)))}let y=c==a.childCount;y||(m=-1),this.placed=c1(this.placed,n,we.from(d)),this.frontier[n].match=f,y&&m<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let v=0,b=a;v<m;v++){let C=b.lastChild;this.frontier.push({type:C.type,match:C.contentMatchAt(C.childCount)}),b=C.content}this.unplaced=y?t==0?Ie.empty:new Ie(l1(s.content,t-1,1),t-1,m<0?s.openEnd:t-1):new Ie(l1(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t=this.frontier[this.depth],n;if(!t.type.isTextblock||!tA(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(t){e:for(let n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=tA(t,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],d=tA(t,a,c,l,!0);if(!d||d.childCount)continue e}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=c1(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.depth+1;r<=t.depth;r++){let i=t.node(r),o=i.type.contentMatch.fillBefore(i.content,!0,t.index(r));this.openFrontierNode(i.type,i.attrs,o)}return t}openFrontierNode(t,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=c1(this.placed,this.depth,we.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(we.empty,!0);n.childCount&&(this.placed=c1(this.placed,this.frontier.length,n))}}function l1(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(l1(e.firstChild.content,t-1,n)))}function c1(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(c1(e.lastChild.content,t-1,n)))}function eA(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Lfe(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Lfe(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(we.empty,!0)))),e.copy(r)}function tA(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!JXe(n,o.content,s)?a:null}function JXe(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function eZe(e){return e.spec.defining||e.spec.definingForContent}function tZe(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),o=e.doc.resolve(n);if(Ife(i,o,r))return e.step(new Hr(t,n,r));let s=zfe(i,e.doc.resolve(n));s[s.length-1]==0&&s.pop();let a=-(i.depth+1);s.unshift(a);for(let p=i.depth,m=i.pos-1;p>0;p--,m--){let y=i.node(p).type.spec;if(y.defining||y.definingAsContext||y.isolating)break;s.indexOf(p)>-1?a=p:i.before(p)==m&&s.splice(1,0,-p)}let l=s.indexOf(a),c=[],d=r.openStart;for(let p=r.content,m=0;;m++){let y=p.firstChild;if(c.push(y),m==r.openStart)break;p=y.content}for(let p=d-1;p>=0;p--){let m=c[p],y=eZe(m.type);if(y&&!m.sameMarkup(i.node(Math.abs(a)-1)))d=p;else if(y||!m.type.isTextblock)break}for(let p=r.openStart;p>=0;p--){let m=(p+d+1)%(r.openStart+1),y=c[m];if(y)for(let v=0;v<s.length;v++){let b=s[(v+l)%s.length],C=!0;b<0&&(C=!1,b=-b);let S=i.node(b-1),E=i.index(b-1);if(S.canReplaceWith(E,E,y.type,y.marks))return e.replace(i.before(b),C?o.after(b):n,new Ie($fe(r.content,0,r.openStart,m),m,r.openEnd))}}let f=e.steps.length;for(let p=s.length-1;p>=0&&(e.replace(t,n,r),!(e.steps.length>f));p--){let m=s[p];m<0||(t=i.before(m),n=o.after(m))}}function $fe(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy($fe(o.content,t+1,n,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(we.empty,!0))}return e}function nZe(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=ZXe(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new Ie(we.from(r),0,0))}function rZe(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n),o=zfe(r,i);for(let s=0;s<o.length;s++){let a=o[s],l=s==o.length-1;if(l&&a==0||r.node(a).type.contentMatch.validEnd)return e.delete(r.start(a),i.end(a));if(a>0&&(l||r.node(a-1).canReplace(r.index(a-1),i.indexAfter(a-1))))return e.delete(r.before(a),i.after(a))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}function zfe(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let o=e.start(i);if(o<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(o==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==o-1)&&n.push(i)}return n}class Yp extends ki{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return mr.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return mr.fromReplace(t,this.pos,this.pos+1,new Ie(we.from(i),0,n.isLeaf?0:1))}getMap(){return So.empty}invert(t){return new Yp(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Yp(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Yp(n.pos,n.attr,n.value)}}ki.jsonID("attr",Yp);class Uy extends ki{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return mr.ok(r)}getMap(){return So.empty}invert(t){return new Uy(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Uy(n.attr,n.value)}}ki.jsonID("docAttr",Uy);let P0=class extends Error{};P0=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n};P0.prototype=Object.create(Error.prototype);P0.prototype.constructor=P0;P0.prototype.name="TransformError";let yD=class{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Vy}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new P0(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=Ie.empty){let i=GC(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new Ie(we.from(r),0,0))}delete(t,n){return this.replace(t,n,Ie.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return tZe(this,t,n,r),this}replaceRangeWith(t,n,r){return nZe(this,t,n,r),this}deleteRange(t,n){return rZe(this,t,n),this}lift(t,n){return BXe(this,t,n),this}join(t,n=1){return XXe(this,t,n),this}wrap(t,n){return UXe(this,t,n),this}setBlockType(t,n=t,r,i=null){return qXe(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return GXe(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new Yp(t,n,r)),this}setDocAttribute(t,n){return this.step(new Uy(t,n)),this}addNodeMark(t,n){return this.step(new Iu(t,n)),this}removeNodeMark(t,n){if(!(n instanceof sn)){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n=n.isInSet(r.marks),!n)return this}return this.step(new R0(t,n)),this}split(t,n=1,r){return KXe(this,t,n,r),this}addMark(t,n,r){return $Xe(this,t,n,r),this}removeMark(t,n,r){return zXe(this,t,n,r),this}clearIncompatible(t,n,r){return mD(this,t,n,r),this}};const nA=Object.create(null);let et=class{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Ffe(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=Ie.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],d=t.mapping.slice(o);t.replaceRange(d.map(l.pos),d.map(c.pos),a?Ie.empty:n),a==0&&BX(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){let r=t.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:s,$to:a}=i[o],l=t.mapping.slice(r),c=l.map(s.pos),d=l.map(a.pos);o?t.deleteRange(c,d):(t.replaceRangeWith(c,d,n),BX(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Ue(t):jp(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=n<0?jp(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):jp(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new no(t.node(0))}static atStart(t){return jp(t,t,0,0,1)||new no(t)}static atEnd(t){return jp(t,t,t.content.size,t.childCount,-1)||new no(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=nA[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in nA)throw new RangeError("Duplicate use of selection JSON ID "+t);return nA[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Ue.between(this.$anchor,this.$head).getBookmark()}};et.prototype.visible=!0;class Ffe{constructor(t,n){this.$from=t,this.$to=n}}let zX=!1;function FX(e){!zX&&!e.parent.inlineContent&&(zX=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Ue extends et{constructor(t,n=t){FX(t),FX(n),super(t,n)}
vendor: 6,232 bytes, line 197
197get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return et.near(r);let i=t.resolve(n.map(this.anchor));return new Ue(i.parent.inlineContent?i:r,r)}replace(t,n=Ie.empty){if(super.replace(t,n),n==Ie.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Ue&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new KC(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ue(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let o=et.findFrom(n,r,!0)||et.findFrom(n,-r,!0);if(o)n=o.$head;else return et.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(et.findFrom(t,-r,!0)||et.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new Ue(t,n)}}et.jsonID("text",Ue);class KC{constructor(t,n){this.anchor=t,this.head=n}map(t){return new KC(t.map(this.anchor),t.map(this.head))}resolve(t){return Ue.between(t.resolve(this.anchor),t.resolve(this.head))}}class $e extends et{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?et.near(o):new $e(o)}content(){return new Ie(we.from(this.node),0,0)}eq(t){return t instanceof $e&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new vD(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new $e(t.resolve(n.anchor))}static create(t,n){return new $e(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}$e.prototype.visible=!1;et.jsonID("node",$e);class vD{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new KC(r,r):new vD(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&$e.isSelectable(r)?new $e(n):et.near(n)}}class no extends et{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=Ie.empty){if(n==Ie.empty){t.delete(0,t.doc.content.size);let r=et.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new no(t)}map(t){return new no(t)}eq(t){return t instanceof no}getBookmark(){return iZe}}et.jsonID("all",no);const iZe={map(){return this},resolve(e){return new no(e)}};function jp(e,t,n,r,i,o=!1){if(t.inlineContent)return Ue.create(e,n);for(let s=r-(i>0?0:1);i>0?s<t.childCount:s>=0;s+=i){let a=t.child(s);if(a.isAtom){if(!o&&$e.isSelectable(a))return $e.create(e,n-(i<0?a.nodeSize:0))}else{let l=jp(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function BX(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof Hr||i instanceof Ur))return;let o=e.mapping.maps[r],s;o.forEach((a,l,c,d)=>{s==null&&(s=d)}),e.setSelection(et.near(e.doc.resolve(s),n))}const HX=1,VX=2,UX=4;class oZe extends yD{constructor(t){super(t.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=t.selection,this.storedMarks=t.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(t){if(t.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=t,this.curSelectionFor=this.steps.length,this.updated=(this.updated|HX)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&HX)>0}setStoredMarks(t){return this.storedMarks=t,this.updated|=VX,this}ensureMarks(t){return sn.sameSet(this.storedMarks||this.selection.$from.marks(),t)||this.setStoredMarks(t),this}addStoredMark(t){return this.ensureMarks(t.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(t){return this.ensureMarks(t.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&VX)>0}addStep(t,n){super.addStep(t,n),this.updated=this.updated&-3,this.storedMarks=null}setTime(t){return this.time=t,this}replaceSelection(t){return this.selection.replace(this,t),this}replaceSelectionWith(t,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||sn.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r??n,!t)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,o)),this.selection.empty||this.setSelection(et.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,this}getMeta(t){return this.meta[typeof t=="string"?t:t.key]}get isGeneric(){for(let t in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=UX,this}get scrolledIntoView(){return(this.updated&UX)>0}}function qX(e,t){return!t||!e?e:e.bind(t)}class u1{constructor(t,n,r){this.name=t,this.init=qX(n.init,r),this.apply=qX(n.apply,r)}}const sZe=[new u1("doc",{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new u1("selection",{init(e,t){return e.selection||et.atStart(t.doc)},apply(e){return e.selection}}),new u1("storedMarks",{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new u1("scrollToSelection",{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})];class rA{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=sZe.slice(),n&&n.forEac
vendor: 4,989 bytes, line 197
197h(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new u1(r.key,r.spec.state,r))})}}class Ip{constructor(t){this.config=t}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(t){return this.applyTransaction(t).state}filterTransaction(t,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[t],r=this.applyInner(t),i=null;for(;;){let o=!1;for(let s=0;s<this.config.plugins.length;s++){let a=this.config.plugins[s];if(a.spec.appendTransaction){let l=i?i[s].n:0,c=i?i[s].state:this,d=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(d&&r.filterTransaction(d,s)){if(d.setMeta("appendedTransaction",t),!i){i=[];for(let f=0;f<this.config.plugins.length;f++)i.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(d),r=r.applyInner(d),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Ip(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new oZe(this)}static create(t){let n=new rA(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new Ip(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new rA(this.schema,t.plugins),r=n.fields,i=new Ip(n);for(let o=0;o<r.length;o++){let s=r[o].name;i[s]=this.hasOwnProperty(s)?this[s]:r[o].init(t,i)}return i}toJSON(t){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),t&&typeof t=="object")for(let r in t){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=t[r],o=i.spec.state;o&&o.toJSON&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new rA(t.schema,t.plugins),o=new Ip(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=Ku.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=et.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[s.name]=c.fromJSON.call(l,t,n[a],o);return}}o[s.name]=s.init(t,o)}}),o}}function Bfe(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=Bfe(i,t,{})),n[r]=i}return n}class an{constructor(t){this.spec=t,this.props={},t.props&&Bfe(t.props,this,this.props),this.key=t.key?t.key.key:Hfe("plugin")}getState(t){return t[this.key]}}const iA=Object.create(null);function Hfe(e){return e in iA?e+"$"+ ++iA[e]:(iA[e]=0,e+"$")}class pn{constructor(t="key"){this.key=Hfe(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const bD=(e,t)=>e.selection.empty?!1:(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Vfe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}const Ufe=(e,t,n)=>{let r=Vfe(e,n);if(!r)return!1;let i=xD(r);if(!i){let s=r.blockRange(),a=s&&wm(s);return a==null?!1:(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(Jfe(e,i,t,-1))return!0;if(r.parent.content.size==0&&(D0(o,"end")||$e.isSelectable(o)))for(let s=r.depth;;s--){let a=GC(e.doc,r.before(s),r.after(s),Ie.empty);if(a&&a.slice.size<a.to-a.from){if(t){let l=e.tr.step(a);l.setSelection(D0(o,"end")?et.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):$e.create(l.doc,i.pos-o.nodeSize)),t(l.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return o.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1},aZe=(e,t,n)=>{let r=Vfe(e,n);if(!r)return!1;let i=xD(r);return i?qfe(e,i,t):!1},lZe=(e,t,n)=>{let r=Gfe(e,n);if(!r)return!1;let i=wD(r);return i?qfe(e,i,t):!1};function qfe(e,t,n){let r=t.nodeBefore,i=r,o=t.pos-1;for(;!i.isTextblock;o--){if(i.type.spec.isolating)return!1;let d=i.lastChild;if(!d)return!1;i=d}let s=t.nodeAfter,a=s,l=t.pos+1;for(;!a.isTextblock;l++){if(a.type.spec.isolating)return!1;let d=a.firstChild;if(!d)return!1;a=d}let c=GC(e.doc,o,l,Ie.empty);if(!c||c.from!=o||c instanceof Hr&&c.slice.size>=l-o)return!1;if(n){let d=e.tr.step(c);d.setSelection(Ue.create(d.doc,o)),n(d.scrollIntoView())}return!0}function D0(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;
vendor: 5,974 bytes, lines 197-198
197if(n&&r.childCount!=1)return!1}return!1}const Wfe=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=xD(r)}let s=o&&o.nodeBefore;return!s||!$e.isSelectable(s)?!1:(t&&t(e.tr.setSelection($e.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)};function xD(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Gfe(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}const Kfe=(e,t,n)=>{let r=Gfe(e,n);if(!r)return!1;let i=wD(r);if(!i)return!1;let o=i.nodeAfter;if(Jfe(e,i,t,1))return!0;if(r.parent.content.size==0&&(D0(o,"start")||$e.isSelectable(o))){let s=GC(e.doc,r.before(),r.after(),Ie.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(D0(o,"start")?et.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):$e.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},Yfe=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=wD(r)}let s=o&&o.nodeAfter;return!s||!$e.isSelectable(s)?!1:(t&&t(e.tr.setSelection($e.create(e.doc,o.pos)).scrollIntoView()),!0)};function wD(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}const cZe=(e,t)=>{let n=e.selection,r=n instanceof $e,i;if(r){if(n.node.isTextblock||!Nd(e.doc,n.from))return!1;i=n.from}else if(i=WC(e.doc,n.from,-1),i==null)return!1;if(t){let o=e.tr.join(i);r&&o.setSelection($e.create(o.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(o.scrollIntoView())}return!0},uZe=(e,t)=>{let n=e.selection,r;if(n instanceof $e){if(n.node.isTextblock||!Nd(e.doc,n.to))return!1;r=n.to}else if(r=WC(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},dZe=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),o=i&&wm(i);return o==null?!1:(t&&t(e.tr.lift(i,o).scrollIntoView()),!0)},Xfe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(` 198`).scrollIntoView()),!0)};function CD(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const fZe=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=CD(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(et.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Zfe=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof no||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=CD(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let s=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(s,o.createAndFill());a.setSelection(Ue.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},Qfe=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(ac(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&wm(r);return i==null?!1:(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function hZe(e){return(t,n)=>{let{$from:r,$to:i}=t.selection;if(t.selection instanceof $e&&t.selection.node.isBlock)return!r.parentOffset||!ac(t.doc,r.pos)?!1:(n&&n(t.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let o=[],s,a,l=!1,c=!1;for(let m=r.depth;;m--)if(r.node(m).isBlock){l=r.end(m)==r.pos+(r.depth-m),c=r.start(m)==r.pos-(r.depth-m),a=CD(r.node(m-1).contentMatchAt(r.indexAfter(m-1))),o.unshift(l&&a?{type:a}:null),s=m;break}else{if(m==1)return!1;o.unshift(null)}let d=t.tr;(t.selection instanceof Ue||t.selection instanceof no)&&d.deleteSelection();let f=d.mapping.map(r.pos),p=ac(d.doc,f,o.length,o);if(p||(o[0]=a?{type:a}:null,p=ac(d.doc,f,o.length,o)),d.split(f,o.length,o),!l&&c&&r.node(s).type!=a){let m=d.mapping.map(r.before(s)),y=d.doc.resolve(m);a&&r.node(s-1).canReplaceWith(y.index(),y.index()+1,a)&&d.setNodeMarkup(d.mapping.map(r.before(s)),a)}return n&&n(d.scrollIntoView()),!0}}const pZe=hZe(),mZe=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return o==0?!1:(i=n.before(o),t&&t(e.tr.setSelection($e.create(e.doc,i))),!0)};function gZe(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,o=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(o,o+1)||!(i.isTextblock||Nd(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function Jfe(e,t,n,r){let i=t.nodeBefore,o=t.nodeAfter,s,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&gZe(e,t,n))return!0;let c=!l&&t.parent.canReplace(t.index(),t.index()+1);if(c&&(s=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(s[0]||o.type).validEnd){if(n){let m=t.pos+o.nodeSize,y=we.empty;for(let C=s.length-1;C>=0;C--)y=we.from(s[C].create(null,y));y=we.from(i.copy(y));let v=e.tr.step(new Ur(t.pos-1,m,t.pos,m,new Ie(y,1,0),s.length,!0)),b=v.doc.resolve(m+2*s.length);b.nodeAfter&&b.nodeAfter.type==i.type&&Nd(v.doc,b.pos)&&v.join(b.pos),n(v.scrollIntoView())}return!0}let d=o.type.spec.isolating||r>0&&l?null:et.findFrom(t,1),f=d&&d.$from.blockRange(d.$to),p=f&&wm(f);if(p!=null&&p>=t.depth)return n&&n(e.tr.lift(f,p).scrollIntoView()),!0;if(c&&D0(o,"start",!0)&&D0(i,"end")){let m=i,y=[];for(;y.push(m),!m.isTextblock;)m=m.lastChild;let v=o,b=1;for(;!v.isTextblock;v=v.firstChild)b++;
vendor: 119,553 bytes, lines 198-202
198if(m.canReplace(m.childCount,m.childCount,v.content)){if(n){let C=we.empty;for(let E=y.length-1;E>=0;E--)C=we.from(y[E].copy(C));let S=e.tr.step(new Ur(t.pos-y.length,t.pos+o.nodeSize,t.pos+b,t.pos+o.nodeSize-b,new Ie(C,y.length,0),0,!0));n(S.scrollIntoView())}return!0}}return!1}function ehe(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(t.tr.setSelection(Ue.create(t.doc,e<0?i.start(o):i.end(o)))),!0):!1}}const yZe=ehe(-1),vZe=ehe(1);function bZe(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o),a=s&&gD(s,e,t);return a?(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0):!1}}function WX(e,t=null){return function(n,r){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:s},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(s,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(e,t)))if(l.type==e)i=!0;else{let d=n.doc.resolve(c),f=d.index();i=d.parent.canReplaceWith(f,f+1,e)}})}if(!i)return!1;if(r){let o=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[s];o.setBlockType(a,l,e,t)}r(o.scrollIntoView())}return!0}}function SD(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}SD(bD,Ufe,Wfe);SD(bD,Kfe,Yfe);SD(Xfe,Zfe,Qfe,pZe);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function xZe(e,t=null){return function(n,r){let{$from:i,$to:o}=n.selection,s=i.blockRange(o);if(!s)return!1;let a=r?n.tr:null;return wZe(a,s,e,t)?(r&&r(a.scrollIntoView()),!0):!1}}function wZe(e,t,n,r=null){let i=!1,o=t,s=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let l=s.resolve(t.start-2);o=new c4(l,l,t.depth),t.endIndex<t.parent.childCount&&(t=new c4(t.$from,s.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let a=gD(o,n,r,t);return a?(e&&CZe(e,t,a,i,n),!0):!1}function CZe(e,t,n,r,i){let o=we.empty;for(let d=n.length-1;d>=0;d--)o=we.from(n[d].type.create(n[d].attrs,o));e.step(new Ur(t.start-(r?2:0),t.end,t.start,t.end,new Ie(o,0,0),n.length,!0));let s=0;for(let d=0;d<n.length;d++)n[d].type==i&&(s=d+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let d=t.startIndex,f=t.endIndex,p=!0;d<f;d++,p=!1)!p&&ac(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(d).nodeSize;return e}function SZe(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,s=>s.childCount>0&&s.firstChild.type==e);return o?n?r.node(o.depth-1).type==e?EZe(t,n,e,o):kZe(t,n,o):!0:!1}}function EZe(e,t,n,r){let i=e.tr,o=r.end,s=r.$to.end(r.depth);o<s&&(i.step(new Ur(o-1,s,o,s,new Ie(we.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new c4(i.doc.resolve(r.$from.pos),i.doc.resolve(s),r.depth));const a=wm(r);if(a==null)return!1;i.lift(r,a);let l=i.doc.resolve(i.mapping.map(o,-1)-1);return Nd(i.doc,l.pos)&&l.nodeBefore.type==l.nodeAfter.type&&i.join(l.pos),t(i.scrollIntoView()),!0}function kZe(e,t,n){let r=e.tr,i=n.parent;for(let m=n.end,y=n.endIndex-1,v=n.startIndex;y>v;y--)m-=i.child(y).nodeSize,r.delete(m-1,m+1);let o=r.doc.resolve(n.start),s=o.nodeAfter;if(r.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),d=o.index(-1);if(!c.canReplace(d+(a?0:1),d+1,s.content.append(l?we.empty:we.from(i))))return!1;let f=o.pos,p=f+s.nodeSize;return r.step(new Ur(f-(a?1:0),p+(l?1:0),f+1,p-1,new Ie((a?we.empty:we.from(i.copy(we.empty))).append(l?we.empty:we.from(i.copy(we.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}function _Ze(e){return function(t,n){let{$from:r,$to:i}=t.selection,o=r.blockRange(i,c=>c.childCount>0&&c.firstChild.type==e);if(!o)return!1;let s=o.startIndex;if(s==0)return!1;let a=o.parent,l=a.child(s-1);if(l.type!=e)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,d=we.from(c?e.create():null),f=new Ie(we.from(e.create(null,we.from(a.type.create(null,d)))),c?3:1,0),p=o.start,m=o.end;n(t.tr.step(new Ur(p-(c?3:1),m,p,m,f,1,!0)).scrollIntoView())}return!0}}const ei=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},I0=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let eM=null;const Bl=function(e,t,n){let r=eM||(eM=document.createRange());return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},AZe=function(){eM=null},eh=function(e,t,n,r){return n&&(GX(e,t,n,r,-1)||GX(e,t,n,r,1))},NZe=/^(img|br|input|textarea|hr)$/i;function GX(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:ts(e))){let o=e.parentNode;if(!o||o.nodeType!=1||nb(e)||NZe.test(e.nodeName)||e.contentEditable=="false")return!1;t=ei(e)+(i<0?0:1),e=o}else if(e.nodeType==1){if(e=e.childNodes[t+(i<0?-1:0)],e.contentEditable=="false")return!1;t=i<0?ts(e):0}else return!1}}function ts(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function jZe(e,t){for(;;){if(e.nodeType==3&&t)return e;if(e.nodeType==1&&t>0){if(e.contentEditable=="false")return null;e=e.childNodes[t-1],t=ts(e)}else if(e.parentNode&&!nb(e))t=ei(e),e=e.parentNode;else return null}}function TZe(e,t){for(;;){if(e.nodeType==3&&t<e.nodeValue.length)return e;if(e.nodeType==1&&t<e.childNodes.length){if(e.contentEditable=="false")return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!nb(e))t=ei(e)+1,e=e.parentNode;else return null}}function MZe(e,t,n){for(let r=t==0,i=t==ts(e);r||i;){if(e==n)return!0;let o=ei(e);if(e=e.parentNode,!e)return!1;r=r&&o==0,i=i&&o==ts(e)}}function nb(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const YC=function(e){return e.focusNode&&eh(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function yf(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function OZe(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function RZe(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(ts(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(ts(r.startContainer),r.startOffset)}}}const Ka=typeof navigator<"u"?navigator:null,KX=typeof document<"u"?document:null,jd=Ka&&Ka.userAgent||"",tM=/Edge\/(\d+)/.exec(jd),the=/MSIE \d/.exec(jd),nM=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jd),ro=!!(the||nM||tM),Yu=the?document.documentMode:nM?+nM[1]:tM?+tM[1]:0,aa=!ro&&/gecko\/(\d+)/i.test(jd);aa&&+(/Firefox\/(\d+)/.exec(jd)||[0,0])[1];const rM=!ro&&/Chrome\/(\d+)/.exec(jd),bi=!!rM,nhe=rM?+rM[1]:0,Di=!ro&&!!Ka&&/Apple Computer/.test(Ka.vendor),L0=Di&&(/Mobile\/\w+/.test(jd)||!!Ka&&Ka.maxTouchPoints>2),Zo=L0||(Ka?/Mac/.test(Ka.platform):!1),PZe=Ka?/Win/.test(Ka.platform):!1,Xl=/Android \d/.test(jd),rb=!!KX&&"webkitFontSmoothing"in KX.documentElement.style,DZe=rb?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function IZe(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Pl(e,t){return typeof e=="number"?e:e[t]}function LZe(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function YX(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=I0(s);continue}let a=s,l=a==o.body,c=l?IZe(o):LZe(a),d=0,f=0;if(t.top<c.top+Pl(r,"top")?f=-(c.top-t.top+Pl(i,"top")):t.bottom>c.bottom-Pl(r,"bottom")&&(f=t.bottom-t.top>c.bottom-c.top?t.top+Pl(i,"top")-c.top:t.bottom-c.bottom+Pl(i,"bottom")),t.left<c.left+Pl(r,"left")?d=-(c.left-t.left+Pl(i,"left")):t.right>c.right-Pl(r,"right")&&(d=t.right-c.right+Pl(i,"right")),d||f)if(l)o.defaultView.scrollBy(d,f);else{let m=a.scrollLeft,y=a.scrollTop;f&&(a.scrollTop+=f),d&&(a.scrollLeft+=d);let v=a.scrollLeft-m,b=a.scrollTop-y;t={left:t.left-v,top:t.top-b,right:t.right-v,bottom:t.bottom-b}}let p=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(p))break;s=p=="absolute"?s.offsetParent:I0(s)}}function $Ze(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let o=(t.left+t.right)/2,s=n+1;s<Math.min(innerHeight,t.bottom);s+=5){let a=e.root.elementFromPoint(o,s);if(!a||a==e.dom||!e.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){r=a,i=l.top;break}}return{refDOM:r,refTop:i,stack:rhe(e.dom)}}function rhe(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=I0(r));return t}function zZe({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;ihe(n,r==0?0:r-t)}function ihe(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let bp=null;function FZe(e){if(e.setActive)return e.setActive();if(bp)return e.focus(bp);let t=rhe(e);e.focus(bp==null?{get preventScroll(){return bp={preventScroll:!0},!0}}:void 0),bp||(bp=!1,ihe(t,0))}function ohe(e,t){let n,r=2e8,i,o=0,s=t.top,a=t.top,l,c;for(let d=e.firstChild,f=0;d;d=d.nextSibling,f++){let p;if(d.nodeType==1)p=d.getClientRects();else if(d.nodeType==3)p=Bl(d).getClientRects();else continue;for(let m=0;m<p.length;m++){let y=p[m];if(y.top<=s&&y.bottom>=a){s=Math.max(y.bottom,s),a=Math.min(y.top,a);let v=y.left>t.left?y.left-t.left:y.right<t.left?t.left-y.right:0;if(v<r){n=d,r=v,i=v&&n.nodeType==3?{left:y.right<t.left?y.right:y.left,top:t.top}:t,d.nodeType==1&&v&&(o=f+(t.left>=(y.left+y.right)/2?1:0));continue}}else y.top>t.top&&!l&&y.left<=t.left&&y.right>=t.left&&(l=d,c={left:Math.max(y.left,Math.min(y.right,t.left)),top:y.top});!n&&(t.left>=y.right&&t.top>=y.top||t.left>=y.left&&t.top>=y.bottom)&&(o=f+1)}}return!n&&l&&(n=l,i=c,r=0),n&&n.nodeType==3?BZe(n,i):!n||r&&n.nodeType==1?{node:e,offset:o}:ohe(n,i)}function BZe(e,t){let n=e.nodeValue.length,r=document.createRange();for(let i=0;i<n;i++){r.setEnd(e,i+1),r.setStart(e,i);let o=gu(r,1);if(o.top!=o.bottom&&ED(t,o))return{node:e,offset:i+(t.left>=(o.left+o.right)/2?1:0)}}return{node:e,offset:0}}function ED(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function HZe(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function VZe(e,t,n){let{node:r,offset:i}=ohe(t,n),o=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();o=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(r,i,o)}function UZe(e,t,n,r){let i=-1;for(let o=t,s=!1;o!=e.dom;){let a=e.docView.nearestDesc(o,!0),l;if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)&&((l=a.dom.getBoundingClientRect()).width||l.height)&&(a.node.isBlock&&a.parent&&(!s&&l.left>r.left||l.top>r.top?i=a.posBefore:(!s&&l.right<r.left||l.bottom<r.top)&&(i=a.posAfter),s=!0),!a.contentDOM&&i<0&&!a.node.isText))return(a.node.isBlock?r.top<(l.top+l.bottom)/2:r.left<(l.left+l.right)/2)?a.posBefore:a.posAfter;o=a.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function she(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(ED(t,c))return she(s,t,c)}}if((o=(o+1)%r)==i)break}return e}function qZe(e,t){let n=e.dom.ownerDocument,r,i=0,o=RZe(n,t.left,t.top);o&&({node:r,offset:i}=o);let s=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),a;if(!s||!e.dom.contains(s.nodeType!=1?s.parentNode:s)){let c=e.dom.getBoundingClientRect();if(!ED(t,c)||(s=she(e.dom,t,c),!s))return null}if(Di)for(let c=s;r&&c;c=I0(c))c.draggable&&(r=void 0);if(s=HZe(s,t),r){if(aa&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let d=r.childNodes[i],f;d.nodeName=="IMG"&&(f=d.getBoundingClientRect()).right<=t.left&&f.bottom>t.top&&i++}let c;rb&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&t.top>r.lastChild.getBoundingClientRect().bottom?a=e.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(a=UZe(e,r,i,t))}a==null&&(a=VZe(e,s,t));let l=e.docView.nearestDesc(s,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function XX(e){return e.top<e.bottom||e.left<e.right}function gu(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(XX(r))return r}return Array.prototype.find.call(n,XX)||e.getBoundingClientRect()}const WZe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function ahe(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=rb||aa;if(r.nodeType==3)if(s&&(WZe.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let l=gu(Bl(r,i,i),n);if(aa&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=gu(Bl(r,i-1,i-1),-1);if(c.top==l.top){let d=gu(Bl(r,i,i+1),-1);if(d.top!=l.top)return Hg(d,d.left<c.left)}}return l}else{let l=i,c=i,d=n<0?1:-1;return n<0&&!i?(c++,d=-1):n>=0&&i==r.nodeValue.length?(l--,d=1):n<0?l--:c++,Hg(gu(Bl(r,l,c),d),d<0)}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==ts(r))){let l=r.childNodes[i-1];if(l.nodeType==1)return oA(l.getBoundingClientRect(),!1)}if(o==null&&i<ts(r)){let l=r.childNodes[i];if(l.nodeType==1)return oA(l.getBoundingClientRect(),!0)}return oA(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==ts(r))){let l=r.childNodes[i-1],c=l.nodeType==3?Bl(l,ts(l)-(s?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Hg(gu(c,1),!1)}if(o==null&&i<ts(r)){let l=r.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Bl(l,0,s?0:1):l.nodeType==1?l:null:null;if(c)return Hg(gu(c,-1),!0)}return Hg(gu(r.nodeType==3?Bl(r):r,-n),n>=0)}function Hg(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function oA(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function lhe(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function GZe(e,t,n){let r=t.selection,i=n=="up"?r.$from:r.$to;return lhe(e,t,()=>{let{node:o}=e.docView.domFromPos(i.pos,n=="up"?-1:1);for(;;){let a=e.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let s=ahe(e,i.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=Bl(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let d=l[c];if(d.bottom>d.top+1&&(n=="up"?s.top-d.top>(d.bottom-s.top)*2:d.bottom-s.bottom>(s.bottom-d.top)*2))return!1}}return!0})}const KZe=/[\u0590-\u08ac]/;function YZe(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,o=!i,s=i==r.parent.content.size,a=e.domSelection();return a?!KZe.test(r.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:s:lhe(e,t,()=>{let{focusNode:l,focusOffset:c,anchorNode:d,anchorOffset:f}=e.domSelectionRange(),p=a.caretBidiLevel;a.modify("move",n,"character");let m=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:y,focusOffset:v}=e.domSelectionRange(),b=y&&!m.contains(y.nodeType==1?y:y.parentNode)||l==y&&c==v;try{a.collapse(d,f),l&&(l!=d||c!=f)&&a.extend&&a.extend(l,c)}catch{}return p!=null&&(a.caretBidiLevel=p),b}):r.pos==r.start()||r.pos==r.end()}let ZX=null,QX=null,JX=!1;function XZe(e,t,n){return ZX==t&&QX==n?JX:(ZX=t,QX=n,JX=n=="up"||n=="down"?GZe(e,t,n):YZe(e,t,n))}const cs=0,eZ=1,kf=2,Ya=3;class ib{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=cs,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].size;return t}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let t=0;t<this.children.length;t++)this.children[t].destroy()}posBeforeChild(t){for(let n=0,r=this.posAtStart;;n++){let i=this.children[n];if(i==t)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(t,n,r){if(this.contentDOM&&this.contentDOM.contains(t.nodeType==1?t:t.parentNode))if(r<0){let o,s;if(t==this.contentDOM)o=t.childNodes[n-1];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.previousSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(s)+s.size:this.posAtStart}else{let o,s;if(t==this.contentDOM)o=t.childNodes[n];else{for(;t.parentNode!=this.contentDOM;)t=t.parentNode;o=t.nextSibling}for(;o&&!((s=o.pmViewDesc)&&s.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(s):this.posAtEnd}let i;if(t==this.dom&&this.contentDOM)i=n>ei(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=t.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==t.childNodes.length)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(t,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let o=this.getDesc(i),s;if(o&&(!n||o.node))if(r&&(s=o.nodeDOM)&&!(s.nodeType==1?s.contains(t.nodeType==1?t:t.parentNode):s==t))r=!1;else return o}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==t&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<o)return i.descAt(t-r-i.border);r=o}}domFromPos(t,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:t+1};let r=0,i=0;for(let o=0;r<this.children.length;r++){let s=this.children[r],a=o+s.size;if(a>t||s instanceof uhe){i=t-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof che&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,!(!o||o.dom.parentNode==this.contentDOM);r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?ei(o.dom)+1:0}}else{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,!(!o||o.dom.parentNode==this.contentDOM);r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?ei(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&t<=c){let d=s+l.border;if(t>=d&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,d);t=s;for(let f=a;f>0;f--){let p=this.children[f-1];if(p.size&&p.dom.parentNode==this.contentDOM&&!p.emptyChildAt(1)){i=ei(p.dom)+1;break}t-=p.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let d=a+1;d<this.children.length;d++){let f=this.children[d];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){o=ei(f.dom);break}n+=f.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let m=0,y=0;m<this.children.length;m++){let v=this.children[m],b=y+v.size;if(o>y&&s<b)return v.setSelection(t-y-v.border,n-y-v.border,r,i);y=b}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),d=r.domSelectionRange(),f=!1;if((aa||Di)&&t==n){let{node:m,offset:y}=a;if(m.nodeType==3){if(f=!!(y&&m.nodeValue[y-1]==` 199`),f&&y==m.nodeValue.length)for(let v=m,b;v;v=v.parentNode){if(b=v.nextSibling){b.nodeName=="BR"&&(a=l={node:b.parentNode,offset:ei(b)+1});break}let C=v.pmViewDesc;if(C&&C.node&&C.node.isBlock)break}}else{let v=m.childNodes[y-1];f=v&&(v.nodeName=="BR"||v.contentEditable=="false")}}if(aa&&d.focusNode&&d.focusNode!=l.node&&d.focusNode.nodeType==1){let m=d.focusNode.childNodes[d.focusOffset];m&&m.contentEditable=="false"&&(i=!0)}if(!(i||f&&Di)&&eh(a.node,a.offset,d.anchorNode,d.anchorOffset)&&eh(l.node,l.offset,d.focusNode,d.focusOffset))return;let p=!1;if((c.extend||t==n)&&!f){c.collapse(a.node,a.offset);try{t!=n&&c.extend(l.node,l.offset),p=!0}catch{}}if(!p){if(t>n){let y=a;a=l,l=y}let m=document.createRange();m.setEnd(l.node,l.offset),m.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(m)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){for(let r=0,i=0;i<this.children.length;i++){let o=this.children[i],s=r+o.size;if(r==s?t<=s&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l){this.dirty=t==r||n==s?kf:eZ,t==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ya:o.markDirty(t-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?kf:Ya}r=s}this.dirty=kf}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?kf:eZ;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(t){return!1}}class che extends ib{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!o)return i;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==cs&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return n?n(t):!1}ignoreMutation(t){return t.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class ZZe extends ib{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class th extends ib{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return(!s||!s.dom)&&(s=xh.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new th(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Ya||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=Ya&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=cs){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=cs}}slice(t,n,r){let i=th.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=oM(o,n,s,r)),t>0&&(o=oM(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class Xu extends ib{constructor(t,n,r,i,o,s,a,l,c){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return s;if(l.parent)return l.parent.posBeforeChild(l)},r,i),d=c&&c.dom,f=c&&c.contentDOM;if(n.isText){if(!d)d=document.createTextNode(n.text);else if(d.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else d||({dom:d,contentDOM:f}=xh.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&d.nodeName!="BR"&&(d.hasAttribute("contenteditable")||(d.contentEditable="false"),n.type.spec.draggable&&(d.draggable=!0));let p=d;return d=hhe(d,r,n),c?l=new QZe(t,n,r,i,d,f||null,p,c,o,s+1):n.isText?new XC(t,n,r,i,d,p,o):new Xu(t,n,r,i,d,f||null,p,o,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(t.preserveWhitespace="full"),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>we.empty)}return t}matchesNode(t,n,r){return this.dirty==cs&&t.eq(this.node)&&d4(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new eQe(this,s&&s.node,t);rQe(this.node,this.innerDeco,(c,d,f)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t):c.type.side>=0&&!f&&l.syncToMarks(d==this.node.childCount?sn.none:this.node.child(d).marks,r,t),l.placeWidget(c,t,i)},(c,d,f,p)=>{l.syncToMarks(c.marks,r,t);let m;l.findNodeMatch(c,d,f,p)||a&&t.state.selection.from>i&&t.state.selection.to<i+c.nodeSize&&(m=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,d,f,m,t)||l.updateNextNode(c,d,f,t,p,i)||l.addNode(c,d,f,t,i),i+=c.nodeSize}),l.syncToMarks([],r,t),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==kf)&&(s&&this.protectLocalComposition(t,s),dhe(this.contentDOM,this.children,t),L0&&iQe(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof Ue)||r<n||i>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=oQe(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}else return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new ZZe(this,o,n,i);t.input.compositionNodes.push(s),this.children=oM(this.children,r,r+i.length,t,s)}update(t,n,r,i){return this.dirty==Ya||!t.sameMarkup(this.node)?!1:(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=cs}updateOuterDeco(t){if(d4(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=fhe(this.dom,this.nodeDOM,iM(this.outerDeco,this.node,n),iM(t,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=t}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function tZ(e,t,n,r,i){hhe(r,t,e);let o=new Xu(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class XC extends Xu{constructor(t,n,r,i,o,s,a){super(t,n,r,i,o,null,s,a,0)}parseRule(){let t=this.nodeDOM.parentNode;for(;t&&t!=this.dom&&!t.pmIsDeco;)t=t.parentNode;return{skip:t||!0}}update(t,n,r,i){return this.dirty==Ya||this.dirty!=cs&&!this.inParent()||!t.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=cs||t.text!=this.node.text)&&t.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=t.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=t,this.dirty=cs,!0)}inParent(){let t=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),o=document.createTextNode(i.text);return new XC(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(t,n){super.markDirty(t,n),this.dom!=this.nodeDOM&&(t==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ya)}get domAtom(){return!1}isText(t){return this.node.text==t}}class uhe extends ib{parseRule(){return{ignore:!0}}matchesHack(t){return this.dirty==cs&&this.dom.nodeName==t}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class QZe extends Xu{constructor(t,n,r,i,o,s,a,l,c,d){super(t,n,r,i,o,s,a,c,d),this.spec=l}update(t,n,r,i){if(this.dirty==Ya)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,n,r);return o&&this.updateInner(t,n,r,i),o}else return!this.contentDOM&&!t.isLeaf?!1:super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,r,i)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(t){return this.spec.stopEvent?this.spec.stopEvent(t):!1}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}}function dhe(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=nZ(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof th){let l=r?r.previousSibling:e.lastChild;dhe(s.contentDOM,s.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=nZ(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const T1=function(e){e&&(this.nodeName=e)};T1.prototype=Object.create(null);const _f=[new T1];function iM(e,t,n){if(e.length==0)return _f;let r=n?_f[0]:new T1,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new T1(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new T1(t.isInline?"span":"div")),a=="class"?r.class=(r.class?r.class+" ":"")+l:a=="style"?r.style=(r.style?r.style+";":"")+l:a!="nodeName"&&(r[a]=l))}}}return i}function fhe(e,t,n,r){if(n==_f&&r==_f)return t;let i=t;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=e&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=_f[0]),i=l}JZe(i,a||_f[0],s)}return i}function JZe(e,t,n){for(let r in t)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.add(i[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=r.exec(t.style);)e.style.removeProperty(i[1])}n.style&&(e.style.cssText+=n.style)}}function hhe(e,t,n){return fhe(e,e,_f,iM(t,n,e.nodeType!=1))}function d4(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function nZ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class eQe{constructor(t,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=t,this.preMatch=tQe(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r){let i=0,o=this.stack.length>>1,s=Math.min(o,t.length);for(;i<s&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(t[i])&&t[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=cs,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<t.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(t[o])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=th.create(this.top,t[o],n,r);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(t,n,r,i){let o=-1,s;if(i>=this.preMatch.index&&(s=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&s.matchesNode(t,n,r))o=this.top.children.indexOf(s,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(t,n,r)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(t,n,r,i,o){let s=this.top.children[i];return s.dirty==Ya&&s.dom==s.contentDOM&&(s.dirty=kf),s.update(t,n,r,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=t.pmViewDesc;if(r){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==r)return i}return-1}t=n}}updateNextNode(t,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof Xu){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let d=l.dom,f,p=this.isLocked(d)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=Ya&&d4(n,l.outerDeco));if(!p&&l.update(t,n,r,i))return this.destroyBetween(this.index,a),l.dom!=d&&(this.changed=!0),this.index++,!0;if(!p&&(f=this.recreateWrapper(l,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=kf,f.updateChildren(i,s+1),f.dirty=cs),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!d4(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=Xu.create(this.top,n,r,i,o,s);if(a.contentDOM){a.children=t.children,t.children=[];for(let l of a.children)l.parent=a}return t.destroy(),a}addNode(t,n,r,i,o){let s=Xu.create(this.top,t,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,r){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(t)&&(t==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new che(this.top,t,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof th;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof XC)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((Di||bi)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(t))this.index++;else{let r=document.createElement(t);t=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),t=="BR"&&(r.className="ProseMirror-trailingBreak");let i=new uhe(this.top,[],r,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(t){return this.lock&&(t==this.lock||t.nodeType==1&&t.contains(this.lock.parentNode))}}function tQe(e,t){let n=t,r=n.children.length,i=e.childCount,o=new Map,s=[];e:for(;i>0;){let a;for(;;)if(r){let c=n.children[r-1];if(c instanceof th)n=c,r=c.children.length;else{a=c,r--;break}}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=e.child(i-1))break;--i,o.set(a,i),s.push(a)}}return{index:i,matched:o,matches:s.reverse()}}function nQe(e,t){return e.type.side-t.type.side}function rQe(e,t,n,r){let i=t.locals(e),o=0;if(i.length==0){for(let c=0;c<e.childCount;c++){let d=e.child(c);r(d,i,t.forChild(o,d),c),o+=d.nodeSize}return}let s=0,a=[],l=null;for(let c=0;;){let d,f;for(;s<i.length&&i[s].to==o;){let b=i[s++];b.widget&&(d?(f||(f=[d])).push(b):d=b)}if(d)if(f){f.sort(nQe);for(let b=0;b<f.length;b++)n(f[b],c,!!l)}else n(d,c,!!l);let p,m;if(l)m=-1,p=l,l=null;else if(c<e.childCount)m=c,p=e.child(c++);else break;for(let b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;s<i.length&&i[s].from<=o&&i[s].to>o;)a.push(i[s++]);let y=o+p.nodeSize;if(p.isText){let b=y;s<i.length&&i[s].from<b&&(b=i[s].from);for(let C=0;C<a.length;C++)a[C].to<b&&(b=a[C].to);b<y&&(l=p.cut(b-o),p=p.cut(0,b-o),y=b,m=-1)}else for(;s<i.length&&i[s].to<y;)s++;let v=p.isInline&&!p.isLeaf?a.filter(b=>!b.inline):a.slice();r(p,v,t.forChild(o,p),m),o=y}}function iQe(e){if(e.nodeName=="UL"||e.nodeName=="OL"){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}function oQe(e,t,n,r){for(let i=0,o=0;i<e.childCount&&o<=r;){let s=e.child(i++),a=o;if(o+=s.nodeSize,!s.isText)continue;let l=s.text;for(;i<e.childCount;){let c=e.child(i++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=r&&l.slice(r-t.length-a,r-a)==t)return r-t.length;let c=a<r?l.lastIndexOf(t,r-a-1):-1;if(c>=0&&c+t.length+a>=n)return a+c;if(n==r&&l.length>=r+t.length-a&&l.slice(r-a,r-a+t.length)==t)return r}}return-1}function oM(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,d=a+=l.size;c>=n||d<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),d>n&&o.push(l.slice(n-c,l.size,r)))}return o}function kD(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a=r.resolve(s),l,c;if(YC(n)){for(l=s;i&&!i.node;)i=i.parent;let f=i.node;if(i&&f.isAtom&&$e.isSelectable(f)&&i.parent&&!(f.isInline&&MZe(n.focusNode,n.focusOffset,i.dom))){let p=i.posBefore;c=new $e(s==p?a:r.resolve(p))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,p=s;for(let m=0;m<n.rangeCount;m++){let y=n.getRangeAt(m);f=Math.min(f,e.docView.posFromDOM(y.startContainer,y.startOffset,1)),p=Math.max(p,e.docView.posFromDOM(y.endContainer,y.endOffset,-1))}if(f<0)return null;[l,s]=p==e.state.selection.anchor?[p,f]:[f,p],a=r.resolve(s)}else l=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(l<0)return null}let d=r.resolve(l);if(!c){let f=t=="pointer"||e.state.selection.head<a.pos&&!o?1:-1;c=_D(e,d,a,f)}return c}function phe(e){return e.editable?e.hasFocus():ghe(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function lc(e,t=!1){let n=e.state.selection;if(mhe(e,n),!!phe(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&bi){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&eh(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset)){e.input.mouseDown.delayedSelectionSync=!0,e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)aQe(e);else{let{anchor:r,head:i}=n,o,s;rZ&&!(n instanceof Ue)&&(n.$from.parent.inlineContent||(o=iZ(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=iZ(e,n.to))),e.docView.setSelection(r,i,e,t),rZ&&(o&&oZ(o),s&&oZ(s)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&sQe(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const rZ=Di||bi&&nhe<63;function iZ(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(Di&&i&&i.contentEditable=="false")return sA(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return sA(i);if(o)return sA(o)}}function sA(e){return e.contentEditable="true",Di&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function oZ(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function sQe(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout(()=>{(!phe(e)||e.state.selection.visible)&&e.dom.classList.remove("ProseMirror-hideselection")},20))})}function aQe(e){let t=e.domSelection(),n=document.createRange();if(!t)return;let r=e.cursorWrapper.dom,i=r.nodeName=="IMG";i?n.setStart(r.parentNode,ei(r)+1):n.setStart(r,0),n.collapse(!0),t.removeAllRanges(),t.addRange(n),!i&&!e.state.selection.visible&&ro&&Yu<=11&&(r.disabled=!0,r.disabled=!1)}function mhe(e,t){if(t instanceof $e){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(sZ(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else sZ(e)}function sZ(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function _D(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Ue.between(t,n,r)}function aZ(e){return e.editable&&!e.hasFocus()?!1:ghe(e)}function ghe(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch{return!1}}function lQe(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return eh(t.node,t.offset,n.anchorNode,n.anchorOffset)}function sM(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&et.findFrom(o,t)}function xu(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function lZ(e,t,n){let r=e.state.selection;if(r instanceof Ue)if(n.indexOf("s")>-1){let{$head:i}=r,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let s=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return xu(e,new Ue(r.$anchor,s))}else if(r.empty){if(e.endOfTextblock(t>0?"forward":"backward")){let i=sM(e.state,t);return i&&i instanceof $e?xu(e,i):!1}else if(!(Zo&&n.indexOf("m")>-1)){let i=r.$head,o=i.textOffset?null:t<0?i.nodeBefore:i.nodeAfter,s;if(!o||o.isText)return!1;let a=t<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(s=e.docView.descAt(a))&&!s.contentDOM?$e.isSelectable(o)?xu(e,new $e(t<0?e.state.doc.resolve(i.pos-o.nodeSize):i)):rb?xu(e,new Ue(e.state.doc.resolve(t<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(r instanceof $e&&r.node.isInline)return xu(e,new Ue(t>0?r.$to:r.$from));{let i=sM(e.state,t);return i?xu(e,i):!1}}}function f4(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function M1(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function xp(e,t){return t<0?cQe(e):uQe(e)}function cQe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,o,s=!1;for(aa&&n.nodeType==1&&r<f4(n)&&M1(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let a=n.childNodes[r-1];if(M1(a,-1))i=n,o=--r;else if(a.nodeType==3)n=a,r=n.nodeValue.length;else break}}else{if(yhe(n))break;{let a=n.previousSibling;for(;a&&M1(a,-1);)i=n.parentNode,o=ei(a),a=a.previousSibling;if(a)n=a,r=f4(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?aM(e,n,r):i&&aM(e,i,o)}function uQe(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=f4(n),o,s;for(;;)if(r<i){if(n.nodeType!=1)break;let a=n.childNodes[r];if(M1(a,1))o=n,s=++r;else break}else{if(yhe(n))break;{let a=n.nextSibling;for(;a&&M1(a,1);)o=a.parentNode,s=ei(a)+1,a=a.nextSibling;if(a)n=a,r=0,i=f4(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&aM(e,o,s)}function yhe(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function dQe(e,t){for(;e&&t==e.childNodes.length&&!nb(e);)t=ei(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=0}}function fQe(e,t){for(;e&&!t&&!nb(e);)t=ei(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;e=n,t=e.childNodes.length}}function aM(e,t,n){if(t.nodeType!=3){let o,s;(s=dQe(t,n))?(t=s,n=0):(o=fQe(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(YC(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&lc(e)},50)}function cZ(e,t){let n=e.state.doc.resolve(t);if(!(bi||PZe)&&n.parent.inlineContent){let i=e.coordsAtPos(t);if(t>n.start()){let o=e.coordsAtPos(t-1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(t<n.end()){let o=e.coordsAtPos(t+1),s=(o.top+o.bottom)/2;if(s>i.top&&s<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(e.dom).direction=="rtl"?"rtl":"ltr"}function uZ(e,t,n){let r=e.state.selection;if(r instanceof Ue&&!r.empty||n.indexOf("s")>-1||Zo&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=sM(e.state,t);if(s&&s instanceof $e)return xu(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof no?et.near(s,t):et.findFrom(s,t);return a?xu(e,a):!1}return!1}function dZ(e,t){if(!(e.state.selection instanceof Ue))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function fZ(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function hQe(e){if(!Di||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&t.nodeType==1&&n==0&&t.firstChild&&t.firstChild.contentEditable=="false"){let r=t.firstChild;fZ(e,r,"true"),setTimeout(()=>fZ(e,r,"false"),20)}return!1}function pQe(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}function mQe(e,t){let n=t.keyCode,r=pQe(t);if(n==8||Zo&&n==72&&r=="c")return dZ(e,-1)||xp(e,-1);if(n==46&&!t.shiftKey||Zo&&n==68&&r=="c")return dZ(e,1)||xp(e,1);if(n==13||n==27)return!0;if(n==37||Zo&&n==66&&r=="c"){let i=n==37?cZ(e,e.state.selection.from)=="ltr"?-1:1:-1;return lZ(e,i,r)||xp(e,i)}else if(n==39||Zo&&n==70&&r=="c"){let i=n==39?cZ(e,e.state.selection.from)=="ltr"?1:-1:1;return lZ(e,i,r)||xp(e,i)}else{if(n==38||Zo&&n==80&&r=="c")return uZ(e,-1,r)||xp(e,-1);if(n==40||Zo&&n==78&&r=="c")return hQe(e)||uZ(e,1,r)||xp(e,1);if(r==(Zo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function AD(e,t){e.someProp("transformCopied",m=>{t=m(t,e)});let n=[],{content:r,openStart:i,openEnd:o}=t;for(;i>1&&o>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,o--;let m=r.firstChild;n.push(m.type.name,m.attrs!=m.type.defaultAttrs?m.attrs:null),r=m.content}let s=e.someProp("clipboardSerializer")||xh.fromSchema(e.state.schema),a=She(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c=l.firstChild,d,f=0;for(;c&&c.nodeType==1&&(d=Che[c.nodeName.toLowerCase()]);){for(let m=d.length-1;m>=0;m--){let y=a.createElement(d[m]);for(;l.firstChild;)y.appendChild(l.firstChild);l.appendChild(y),f++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${i} ${o}${f?` -${f}`:""} ${JSON.stringify(n)}`);let p=e.someProp("clipboardTextSerializer",m=>m(t,e))||t.content.textBetween(0,t.content.size,` 200 201`);return{dom:l,text:p,slice:t}}function vhe(e,t,n,r,i){let o=i.parent.type.spec.code,s,a;if(!n&&!t)return null;let l=t&&(r||o||!n);if(l){if(e.someProp("transformPastedText",p=>{t=p(t,o||r,e)}),o)return t?new Ie(we.from(e.state.schema.text(t.replace(/\r\n?/g,` 202`))),0,0):Ie.empty;let f=e.someProp("clipboardTextParser",p=>p(t,i,r,e));if(f)a=f;else{let p=i.marks(),{schema:m}=e.state,y=xh.fromSchema(m);s=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach(v=>{let b=s.appendChild(document.createElement("p"));v&&b.appendChild(y.serializeNode(m.text(v,p)))})}}else e.someProp("transformPastedHTML",f=>{n=f(n,e)}),s=bQe(n),rb&&xQe(s);let c=s&&s.querySelector("[data-pm-slice]"),d=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(d&&d[3])for(let f=+d[3];f>0;f--){let p=s.firstChild;for(;p&&p.nodeType!=1;)p=p.nextSibling;if(!p)break;s=p}if(a||(a=(e.someProp("clipboardParser")||e.someProp("domParser")||sc.fromSchema(e.state.schema)).parseSlice(s,{preserveWhitespace:!!(l||d),context:i,ruleFromNode(p){return p.nodeName=="BR"&&!p.nextSibling&&p.parentNode&&!gQe.test(p.parentNode.nodeName)?{ignore:!0}:null}})),d)a=wQe(hZ(a,+d[1],+d[2]),d[4]);else if(a=Ie.maxOpen(yQe(a.content,i),!0),a.openStart||a.openEnd){let f=0,p=0;for(let m=a.content.firstChild;f<a.openStart&&!m.type.spec.isolating;f++,m=m.firstChild);for(let m=a.content.lastChild;p<a.openEnd&&!m.type.spec.isolating;p++,m=m.lastChild);a=hZ(a,f,p)}return e.someProp("transformPasted",f=>{a=f(a,e)}),a}const gQe=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function yQe(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let i=t.node(n).contentMatchAt(t.index(n)),o,s=[];if(e.forEach(a=>{if(!s)return;let l=i.findWrapping(a.type),c;if(!l)return s=null;if(c=s.length&&o.length&&xhe(l,o,a,s[s.length-1],0))s[s.length-1]=c;else{s.length&&(s[s.length-1]=whe(s[s.length-1],o.length));let d=bhe(a,l);s.push(d),i=i.matchType(d.type),o=l}}),s)return we.from(s)}return e}function bhe(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,we.from(e));return e}function xhe(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=xhe(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(we.from(bhe(n,e,i+1))))}}function whe(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,whe(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(we.empty,!0);return e.copy(n.append(r))}function lM(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=lM(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(we.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function hZ(e,t,n){return t<e.openStart&&(e=new Ie(lM(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Ie(lM(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const Che={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let pZ=null;function She(){return pZ||(pZ=document.implementation.createHTMLDocument("title"))}let aA=null;function vQe(e){let t=window.trustedTypes;return t?(aA||(aA=t.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),aA.createHTML(e)):e}function bQe(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=She().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(e),i;if((i=r&&Che[r[1].toLowerCase()])&&(e=i.map(o=>"<"+o+">").join("")+e+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=vQe(e),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function xQe(e){let t=e.querySelectorAll(bi?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent=="Â "&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}function wQe(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:o,openEnd:s}=e;for(let a=r.length-2;a>=0;a-=2){let l=n.nodes[r[a]];if(!l||l.hasRequiredAttrs())break;i=we.from(l.create(r[a+1],i)),o++,s++}return new Ie(i,o,s)}const Ii={},Li={},CQe={touchstart:!0,touchmove:!0};class SQe{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function EQe(e){for(let t in Ii){let n=Ii[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=r=>{_Qe(e,r)&&!ND(e,r)&&(e.editable||!(r.type in Li))&&n(e,r)},CQe[t]?{passive:!0}:void 0)}Di&&e.dom.addEventListener("input",()=>null),cM(e)}function Lu(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function kQe(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function cM(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>ND(e,r))})}function ND(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function _Qe(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function AQe(e,t){!ND(e,t)&&Ii[t.type]&&(e.editable||!(t.type in Li))&&Ii[t.type](e,t)}Li.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!khe(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!(Xl&&bi&&n.keyCode==13)))if(n.keyCode!=229&&e.domObserver.forceFlush(),L0&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,yf(13,"Enter"))),e.input.lastIOSEnter=0)},200)}else e.someProp("handleKeyDown",r=>r(e,n))||mQe(e,n)?n.preventDefault():Lu(e,"key")};Li.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)};Li.keypress=(e,t)=>{let n=t;if(khe(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Zo&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof Ue)||!r.$from.sameParent(r.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!e.someProp("handleTextInput",o=>o(e,r.$from.pos,r.$to.pos,i))&&e.dispatch(e.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function ZC(e){return{left:e.clientX,top:e.clientY}}function NQe(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function jD(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function Xp(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function jQe(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&$e.isSelectable(r)?(Xp(e,new $e(n)),!0):!1}function TQe(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof $e&&(r=n.node);let o=e.state.doc.resolve(t);for(let s=o.depth+1;s>0;s--){let a=s>o.depth?o.nodeAfter:o.node(s);if($e.isSelectable(a)){r&&n.$from.depth>0&&s>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(s);break}}return i!=null?(Xp(e,$e.create(e.state.doc,i)),!0):!1}function MQe(e,t,n,r,i){return jD(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?TQe(e,n):jQe(e,n))}function OQe(e,t,n,r){return jD(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function RQe(e,t,n,r){return jD(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||PQe(e,n,r)}function PQe(e,t,n){if(n.button!=0)return!1;let r=e.state.doc;if(t==-1)return r.inlineContent?(Xp(e,Ue.create(r,0,r.content.size)),!0):!1;let i=r.resolve(t);for(let o=i.depth+1;o>0;o--){let s=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(s.inlineContent)Xp(e,Ue.create(r,a+1,a+1+s.content.size));else if($e.isSelectable(s))Xp(e,$e.create(r,a));else continue;return!0}}function TD(e){return h4(e)}const Ehe=Zo?"metaKey":"ctrlKey";Ii.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=TD(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&NQe(n,e.input.lastClick)&&!n[Ehe]&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let s=e.posAtCoords(ZC(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new DQe(e,s,n,!!r)):(o=="doubleClick"?OQe:RQe)(e,s.pos,s.inside,n)?n.preventDefault():Lu(e,"pointer"))};class DQe{constructor(t,n,r,i){this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[Ehe],this.allowDefault=r.shiftKey;let o,s;if(n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let d=t.state.doc.resolve(n.pos);o=d.parent,s=d.depth?d.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof $e&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&aa&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),t.root.addEventListener("mouseup",this.up=this.up.bind(this)),t.root.addEventListener("mousemove",this.move=this.move.bind(this)),Lu(t,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>lc(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ZC(t))),this.updateAllowDefault(t),this.allowDefault||!n?Lu(this.view,"pointer"):MQe(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||Di&&this.mightDrag&&!this.mightDrag.node.isAtom||bi&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Xp(this.view,et.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Lu(this.view,"pointer")}move(t){this.updateAllowDefault(t),Lu(this.view,"pointer"),t.buttons==0&&this.done()}updateAllowDefault(t){!this.allowDefault&&(Math.abs(this.event.x-t.clientX)>4||Math.abs(this.event.y-t.clientY)>4)&&(this.allowDefault=!0)}}Ii.touchstart=e=>{e.input.lastTouch=Date.now(),TD(e),Lu(e,"pointer")};Ii.touchmove=e=>{e.input.lastTouch=Date.now(),Lu(e,"pointer")};Ii.contextmenu=e=>TD(e);function khe(e,t){return e.composing?!0:Di&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}const IQe=Xl?5e3:-1;Li.compositionstart=Li.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Ue&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)))e.markCursor=e.state.storedMarks||n.marks(),h4(e,!0),e.markCursor=null;else if(h4(e,!t.selection.empty),aa&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}else i=s,o=-1}}e.input.composing=!0}_he(e,IQe)};Li.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,_he(e,20))};function _he(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>h4(e),t))}function Ahe(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=$Qe());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function LQe(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=jZe(t.focusNode,t.focusOffset),r=TZe(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function $Qe(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}function h4(e,t=!1){if(!(Xl&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Ahe(e),t||e.docView&&e.docView.dirty){let n=kD(e);return n&&!n.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!e.state.selection.empty?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function zQe(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}const qy=ro&&Yu<15||L0&&DZe<604;Ii.copy=Li.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=qy?null:n.clipboardData,s=r.content(),{dom:a,text:l}=AD(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):zQe(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function FQe(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function BQe(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Wy(e,r.value,null,i,t):Wy(e,r.textContent,r.innerHTML,i,t)},50)}function Wy(e,t,n,r,i){let o=vhe(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,o||Ie.empty)))return!0;if(!o)return!1;let s=FQe(o),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Nhe(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Li.paste=(e,t)=>{let n=t;if(e.composing&&!Xl)return;let r=qy?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Wy(e,Nhe(r),r.getData("text/html"),i,n)?n.preventDefault():BQe(e,n)};class jhe{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const The=Zo?"altKey":"ctrlKey";Ii.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,o=i.empty?null:e.posAtCoords(ZC(n)),s;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof $e?i.to-1:i.to))){if(r&&r.mightDrag)s=$e.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=e.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=e.docView&&(s=$e.create(e.state.doc,f.posBefore))}}let a=(s||e.state.selection).content(),{dom:l,text:c,slice:d}=AD(e,a);(!n.dataTransfer.files.length||!bi||nhe>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(qy?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",qy||n.dataTransfer.setData("text/plain",c),e.dragging=new jhe(d,!n[The],s)};Ii.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)};Li.dragover=Li.dragenter=(e,t)=>t.preventDefault();Li.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let i=e.posAtCoords(ZC(n));if(!i)return;let o=e.state.doc.resolve(i.pos),s=r&&r.slice;s?e.someProp("transformPasted",y=>{s=y(s,e)}):s=vhe(e,Nhe(n.dataTransfer),qy?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(r&&!n[The]);if(e.someProp("handleDrop",y=>y(e,n,s||Ie.empty,a))){n.preventDefault();return}if(!s)return;n.preventDefault();let l=s?Dfe(e.state.doc,o.pos,s):o.pos;l==null&&(l=o.pos);let c=e.state.tr;if(a){let{node:y}=r;y?y.replace(c):c.deleteSelection()}let d=c.mapping.map(l),f=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,p=c.doc;if(f?c.replaceRangeWith(d,d,s.content.firstChild):c.replaceRange(d,d,s),c.doc.eq(p))return;let m=c.doc.resolve(d);if(f&&$e.isSelectable(s.content.firstChild)&&m.nodeAfter&&m.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new $e(m));else{let y=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((v,b,C,S)=>y=S),c.setSelection(_D(e,m,c.doc.resolve(y)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))};Ii.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&lc(e)},20))};Ii.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)};Ii.beforeinput=(e,t)=>{if(bi&&Xl&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:r}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=r||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",o=>o(e,yf(8,"Backspace")))))return;let{$cursor:i}=e.state.selection;i&&i.pos>0&&e.dispatch(e.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let e in Li)Ii[e]=Li[e];function Gy(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class p4{constructor(t,n){this.toDOM=t,this.spec=n||Df,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new jr(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof p4&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Gy(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class Zu{constructor(t,n){this.attrs=t,this.spec=n||Df}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new jr(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof Zu&&Gy(this.attrs,t.attrs)&&Gy(this.spec,t.spec)}static is(t){return t.type instanceof Zu}destroy(){}}class MD{constructor(t,n){this.attrs=t,this.spec=n||Df}map(t,n,r,i){let o=t.mapResult(n.from+i,1);if(o.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new jr(o.pos-r,s.pos-r,this)}valid(t,n){let{index:r,offset:i}=t.content.findIndex(n.from),o;return i==n.from&&!(o=t.child(r)).isText&&i+o.nodeSize==n.to}eq(t){return this==t||t instanceof MD&&Gy(this.attrs,t.attrs)&&Gy(this.spec,t.spec)}destroy(){}}class jr{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new jr(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new jr(t,t,new p4(n,r))}static inline(t,n,r,i){return new jr(t,n,new Zu(r,i))}static node(t,n,r,i){return new jr(t,n,new MD(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof Zu}get widget(){return this.type instanceof p4}}const Tp=[],Df={};class gn{constructor(t,n){this.local=t.length?t:Tp,this.children=n.length?n:Tp}static create(t,n){return n.length?m4(n,t,0,Df):pi}find(t,n,r){let i=[];return this.findInner(t??0,n??1e9,i,0,r),i}findInner(t,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&a.to>=t&&(!o||o(a.spec))&&r.push(a.copy(a.from+i,a.to+i))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==pi||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Df)}mapInner(t,n,r,i,o){let s;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(t,r,i);l&&l.type.valid(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?HQe(this.children,s||[],t,n,r,i,o):s?new gn(s.sort(If),Tp):pi}add(t,n){return n.length?this==pi?gn.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,o=0;t.forEach((a,l)=>{let c=l+r,d;if(d=Ohe(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,d,c+1):i.splice(o,0,l,l+a.nodeSize,m4(d,a,c+1,Df)),o+=3}});let s=Mhe(o?Rhe(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new gn(s.length?this.local.concat(s).sort(If):this.local,i||this.children)}remove(t){return t.length==0||this==pi?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let d=0,f;d<t.length;d++)(f=t[d])&&f.from>a&&f.to<l&&(t[d]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=pi?r[o+2]=c:(r.splice(o,3),o-=3)}if(i.length){for(let o=0,s;o<t.length;o++)if(s=t[o])for(let a=0;a<i.length;a++)i[a].eq(s,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new gn(i,r):pi}forChild(t,n){if(this==pi)return this;if(n.isLeaf)return gn.empty;let r,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=t){this.children[a]==t&&(r=this.children[a+2]);break}let o=t+1,s=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof Zu){let c=Math.max(o,l.from)-o,d=Math.min(s,l.to)-o;c<d&&(i||(i=[])).push(l.copy(c,d))}}if(i){let a=new gn(i.sort(If),Tp);return r?new Nu([a,r]):a}return r||pi}eq(t){if(this==t)return!0;if(!(t instanceof gn)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return OD(this.localsInner(t))}localsInner(t){if(this==pi)return Tp;if(t.inlineContent||!this.local.some(Zu.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof Zu||n.push(this.local[r]);return n}forEachSet(t){t(this)}}gn.empty=new gn([],[]);gn.removeOverlap=OD;const pi=gn.empty;class Nu{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,Df));return Nu.from(r)}forChild(t,n){if(n.isLeaf)return gn.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=pi&&(o instanceof Nu?r=r.concat(o.members):r.push(o))}return Nu.from(r)}eq(t){if(!(t instanceof Nu)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(o.length)if(!n)n=o;else{r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}}return n?OD(r?n:n.sort(If)):Tp}static from(t){switch(t.length){case 0:return pi;case 1:return t[0];default:return new Nu(t.every(n=>n instanceof gn)?t:t.reduce((n,r)=>n.concat(r instanceof gn?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function HQe(e,t,n,r,i,o,s){let a=e.slice();for(let c=0,d=o;c<n.maps.length;c++){let f=0;n.maps[c].forEach((p,m,y,v)=>{let b=v-y-(m-p);for(let C=0;C<a.length;C+=3){let S=a[C+1];if(S<0||p>S+d-f)continue;let E=a[C]+d-f;m>=E?a[C+1]=p<=E?-2:-1:p>=d&&b&&(a[C]+=b,a[C+1]+=b)}f+=b}),d=n.maps[c].map(d,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let d=n.map(e[c]+o),f=d-i;if(f<0||f>=r.content.size){l=!0;continue}let p=n.map(e[c+1]+o,-1),m=p-i,{index:y,offset:v}=r.content.findIndex(f),b=r.maybeChild(y);if(b&&v==f&&v+b.nodeSize==m){let C=a[c+2].mapInner(n,b,d+1,e[c]+o+1,s);C!=pi?(a[c]=f,a[c+1]=m,a[c+2]=C):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=VQe(a,e,t,n,i,o,s),d=m4(c,r,0,s);t=d.local;for(let f=0;f<a.length;f+=3)a[f+1]<0&&(a.splice(f,3),f-=3);for(let f=0,p=0;f<d.children.length;f+=3){let m=d.children[f];for(;p<a.length&&a[p]<m;)p+=3;a.splice(p,0,d.children[f],d.children[f+1],d.children[f+2])}}return new gn(t.sort(If),a)}function Mhe(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new jr(i.from+t,i.to+t,i.type))}return n}function VQe(e,t,n,r,i,o,s){function a(l,c){for(let d=0;d<l.local.length;d++){let f=l.local[d].map(r,i,c);f?n.push(f):s.onRemove&&s.onRemove(l.local[d].spec)}for(let d=0;d<l.children.length;d+=3)a(l.children[d+2],l.children[d]+c+1)}for(let l=0;l<e.length;l+=3)e[l+1]==-1&&a(e[l+2],t[l]+o+1);return n}function Ohe(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o=0,s;o<e.length;o++)(s=e[o])&&s.from>n&&s.to<r&&((i||(i=[])).push(s),e[o]=null);return i}function Rhe(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function m4(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=Ohe(e,a,l+n);if(c){o=!0;let d=m4(c,a,n+l+1,r);d!=pi&&i.push(l,l+a.nodeSize,d)}});let s=Mhe(o?Rhe(e):e,-n).sort(If);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||(r.onRemove&&r.onRemove(s[a].spec),s.splice(a--,1));return s.length||i.length?new gn(s,i):pi}function If(e,t){return e.from-t.from||e.to-t.to}function OD(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from==r.from){o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),mZ(t,i+1,o.copy(r.to,o.to)));continue}else{o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),mZ(t,i,r.copy(o.from,r.to)));break}}}return t}function mZ(e,t,n){for(;t<e.length&&If(n,e[t])>0;)t++;e.splice(t,0,n)}function lA(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=pi&&t.push(r)}),e.cursorWrapper&&t.push(gn.create(e.state.doc,[e.cursorWrapper.deco])),Nu.from(t)}const UQe={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},qQe=ro&&Yu<=11;class WQe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(t){this.anchorNode=t.anchorNode,this.anchorOffset=t.anchorOffset,this.focusNode=t.focusNode,this.focusOffset=t.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(t){return t.anchorNode==this.anchorNode&&t.anchorOffset==this.anchorOffset&&t.focusNode==this.focusNode&&t.focusOffset==this.focusOffset}}class GQe{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new WQe,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);ro&&Yu<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),qQe&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,UQe)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let t=this.observer.takeRecords();if(t.length){for(let n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(aZ(this.view)){if(this.suppressingSelectionUpdates)return lc(this.view);if(ro&&Yu<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&eh(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(t){if(!t.focusNode)return!0;let n=new Set,r;for(let o=t.focusNode;o;o=I0(o))n.add(o);for(let o=t.anchorNode;o;o=I0(o))if(n.has(o)){r=o;break}let i=r&&this.view.docView.nearestDesc(r);if(i&&i.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}flush(){let{view:t}=this;if(!t.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&aZ(t)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let d=0;d<n.length;d++){let f=this.registerMutation(n[d],l);f&&(o=o<0?f.from:Math.min(f.from,o),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(a=!0))}if(aa&&l.length){let d=l.filter(f=>f.nodeName=="BR");if(d.length==2){let[f,p]=d;f.parentNode&&f.parentNode.parentNode==p.parentNode?p.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let p of d){let m=p.parentNode;m&&m.nodeName=="LI"&&(!f||XQe(t,f)!=m)&&p.remove()}}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&YC(r)&&(c=kD(t))&&c.eq(et.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,lc(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),KQe(t)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||lc(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.indexOf(t.target)>-1)return null;let r=this.view.docView.nearestDesc(t.target);if(t.type=="attributes"&&(r==this.view.docView||t.attributeName=="contenteditable"||t.attributeName=="style"&&!t.oldValue&&!t.target.getAttribute("style"))||!r||r.ignoreMutation(t))return null;if(t.type=="childList"){for(let d=0;d<t.addedNodes.length;d++){let f=t.addedNodes[d];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(t.target))return{from:r.posBefore,to:r.posAfter};let i=t.previousSibling,o=t.nextSibling;if(ro&&Yu<=11&&t.addedNodes.length)for(let d=0;d<t.addedNodes.length;d++){let{previousSibling:f,nextSibling:p}=t.addedNodes[d];(!f||Array.prototype.indexOf.call(t.addedNodes,f)<0)&&(i=f),(!p||Array.prototype.indexOf.call(t.addedNodes,p)<0)&&(o=p)}let s=i&&i.parentNode==t.target?ei(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?ei(o):t.target.childNodes.length,c=r.localPosFromDOM(t.target,l,1);return{from:a,to:c}}else return t.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let gZ=new WeakMap,yZ=!1;function KQe(e){if(!gZ.has(e)&&(gZ.set(e,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=aa,yZ)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),yZ=!0}}function vZ(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return eh(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function YQe(e,t){if(t.getComposedRanges){let i=t.getComposedRanges(e.root)[0];if(i)return vZ(e,i)}let n;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?vZ(e,n):null}function XQe(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function ZQe(e,t,n){let{node:r,fromOffset:i,toOffset:o,from:s,to:a}=e.docView.parseRange(t,n),l=e.domSelectionRange(),c,d=l.anchorNode;if(d&&e.dom.contains(d.nodeType==1?d:d.parentNode)&&(c=[{node:d,offset:l.anchorOffset}],YC(l)||c.push({node:l.focusNode,offset:l.focusOffset})),bi&&e.input.lastKeyCode===8)for(let b=o;b>i;b--){let C=r.childNodes[b-1],S=C.pmViewDesc;if(C.nodeName=="BR"&&!S){o=b;break}if(!S||S.size)break}let f=e.state.doc,p=e.someProp("domParser")||sc.fromSchema(e.state.schema),m=f.resolve(s),y=null,v=p.parse(r,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:i,to:o,preserveWhitespace:m.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:QQe,context:m});if(c&&c[0].pos!=null){let b=c[0].pos,C=c[1]&&c[1].pos;C==null&&(C=b),y={anchor:b+s,head:C+s}}return{doc:v,sel:y,from:s,to:a}}function QQe(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(Di&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(e.parentNode.lastChild==e||Di&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const JQe=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function eJe(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let O=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,D=kD(e,O);if(D&&!e.state.selection.eq(D)){if(bi&&Xl&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",I=>I(e,yf(13,"Enter"))))return;let R=e.state.tr.setSelection(D);O=="pointer"?R.setMeta("pointer",!0):O=="key"&&R.scrollIntoView(),o&&R.setMeta("composition",o),e.dispatch(R)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l=e.state.selection,c=ZQe(e,t,n),d=e.state.doc,f=d.slice(c.from,c.to),p,m;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(p=e.state.selection.to,m="end"):(p=e.state.selection.from,m="start"),e.input.lastKeyCode=null;let y=rJe(f.content,c.doc.content,c.from,p,m);if(y&&e.input.domChangeCount++,(L0&&e.input.lastIOSEnter>Date.now()-225||Xl)&&i.some(O=>O.nodeType==1&&!JQe.test(O.nodeName))&&(!y||y.endA>=y.endB)&&e.someProp("handleKeyDown",O=>O(e,yf(13,"Enter")))){e.input.lastIOSEnter=0;return}if(!y)if(r&&l instanceof Ue&&!l.empty&&l.$head.sameParent(l.$anchor)&&!e.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))y={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let O=bZ(e,e.state.doc,c.sel);if(O&&!O.eq(e.state.selection)){let D=e.state.tr.setSelection(O);o&&D.setMeta("composition",o),e.dispatch(D)}}return}e.state.selection.from<e.state.selection.to&&y.start==y.endB&&e.state.selection instanceof Ue&&(y.start>e.state.selection.from&&y.start<=e.state.selection.from+2&&e.state.selection.from>=c.from?y.start=e.state.selection.from:y.endA<e.state.selection.to&&y.endA>=e.state.selection.to-2&&e.state.selection.to<=c.to&&(y.endB+=e.state.selection.to-y.endA,y.endA=e.state.selection.to)),ro&&Yu<=11&&y.endB==y.start+1&&y.endA==y.start&&y.start>c.from&&c.doc.textBetween(y.start-c.from-1,y.start-c.from+1)==" Â "&&(y.start--,y.endA--,y.endB--);let v=c.doc.resolveNoCache(y.start-c.from),b=c.doc.resolveNoCache(y.endB-c.from),C=d.resolve(y.start),S=v.sameParent(b)&&v.parent.inlineContent&&C.end()>=y.endA,E;if((L0&&e.input.lastIOSEnter>Date.now()-225&&(!S||i.some(O=>O.nodeName=="DIV"||O.nodeName=="P"))||!S&&v.pos<c.doc.content.size&&!v.sameParent(b)&&(E=et.findFrom(c.doc.resolve(v.pos+1),1,!0))&&E.head==b.pos)&&e.someProp("handleKeyDown",O=>O(e,yf(13,"Enter")))){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>y.start&&nJe(d,y.start,y.endA,v,b)&&e.someProp("handleKeyDown",O=>O(e,yf(8,"Backspace")))){Xl&&bi&&e.domObserver.suppressSelectionUpdates();return}bi&&y.endB==y.start&&(e.input.lastChromeDelete=Date.now()),Xl&&!S&&v.start()!=b.start()&&b.parentOffset==0&&v.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==y.endA&&(y.endB-=2,b=c.doc.resolveNoCache(y.endB-c.from),setTimeout(()=>{e.someProp("handleKeyDown",function(O){return O(e,yf(13,"Enter"))})},20));let A=y.start,_=y.endA,N,j,T;if(S){if(v.pos==b.pos)ro&&Yu<=11&&v.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>lc(e),20)),N=e.state.tr.delete(A,_),j=d.resolve(y.start).marksAcross(d.resolve(y.endA));else if(y.endA==y.endB&&(T=tJe(v.parent.content.cut(v.parentOffset,b.parentOffset),C.parent.content.cut(C.parentOffset,y.endA-C.start()))))N=e.state.tr,T.type=="add"?N.addMark(A,_,T.mark):N.removeMark(A,_,T.mark);else if(v.parent.child(v.index()).isText&&v.index()==b.index()-(b.textOffset?0:1)){let O=v.parent.textBetween(v.parentOffset,b.parentOffset);if(e.someProp("handleTextInput",D=>D(e,A,_,O)))return;N=e.state.tr.insertText(O,A,_)}}if(N||(N=e.state.tr.replace(A,_,c.doc.slice(y.start-c.from,y.endB-c.from))),c.sel){let O=bZ(e,N.doc,c.sel);O&&!(bi&&e.composing&&O.empty&&(y.start!=y.endB||e.input.lastChromeDelete<Date.now()-100)&&(O.head==A||O.head==N.mapping.map(_)-1)||ro&&O.empty&&O.head==A)&&N.setSelection(O)}j&&N.ensureMarks(j),o&&N.setMeta("composition",o),e.dispatch(N.scrollIntoView())}function bZ(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:_D(e,t.resolve(n.anchor),t.resolve(n.head))}function tJe(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,o=r,s,a,l;for(let d=0;d<r.length;d++)i=r[d].removeFromSet(i);for(let d=0;d<n.length;d++)o=n[d].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],s="add",l=d=>d.mark(a.addToSet(d.marks));else if(i.length==0&&o.length==1)a=o[0],s="remove",l=d=>d.mark(a.removeFromSet(d.marks));else return null;let c=[];for(let d=0;d<t.childCount;d++)c.push(l(t.child(d)));if(we.from(c).eq(e))return{mark:a,type:s}}function nJe(e,t,n,r,i){if(n-t<=i.pos-r.pos||cA(r,!0,!1)<i.pos)return!1;let o=e.resolve(t);if(!r.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==t+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let s=e.resolve(cA(o,!0,!0));return!s.parent.isTextblock||s.pos>n||cA(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function cA(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let o=e.node(r).maybeChild(e.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function rJe(e,t,n,r,i){let o=e.findDiffStart(t,n);if(o==null)return null;let{a:s,b:a}=e.findDiffEnd(t,n+e.size,n+t.size);if(i=="end"){let l=Math.max(0,o-Math.min(s,a));r-=s+l-o}if(s<o&&e.size<t.size){let l=r<=o&&r>=s?o-r:0;o-=l,o&&o<t.size&&xZ(t.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-s),s=o}else if(a<o){let l=r<=o&&r>=a?o-r:0;o-=l,o&&o<e.size&&xZ(e.textBetween(o-1,o+1))&&(o+=l?1:-1),s=o+(s-a),a=o}return{start:o,endA:s,endB:a}}function xZ(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class iJe{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new SQe,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(kZ),this.dispatch=this.dispatch.bind(this),this.dom=t&&t.mount||document.createElement("div"),t&&(t.appendChild?t.appendChild(this.dom):typeof t=="function"?t(this.dom):t.mount&&(this.mounted=!0)),this.editable=SZ(this),CZ(this),this.nodeViews=EZ(this),this.docView=tZ(this.state.doc,wZ(this),lA(this),this.dom,this),this.domObserver=new GQe(this,(r,i,o,s)=>eJe(this,r,i,o,s)),this.domObserver.start(),EQe(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let t=this._props;this._props={};for(let n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&cM(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(kZ),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(Ahe(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let m=EZ(this);sJe(m,this.nodeViews)&&(this.nodeViews=m,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&cM(this),this.editable=SZ(this),CZ(this);let l=lA(this),c=wZ(this),d=i.plugins!=t.plugins&&!i.doc.eq(t.doc)?"reset":t.scrollToSelection>i.scrollToSelection?"to selection":"preserve",f=o||!this.docView.matchesNode(t.doc,c,l);(f||!t.selection.eq(i.selection))&&(s=!0);let p=d=="preserve"&&s&&this.dom.style.overflowAnchor==null&&$Ze(this);if(s){this.domObserver.stop();let m=f&&(ro||bi)&&!this.composing&&!i.selection.empty&&!t.selection.empty&&oJe(i.selection,t.selection);if(f){let y=bi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=LQe(this)),(o||!this.docView.update(t.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=tZ(t.doc,c,l,this.dom,this)),y&&!this.trackWrites&&(m=!0)}m||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&lQe(this))?lc(this,m):(mhe(this,t.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((r=this.dragging)===null||r===void 0)&&r.node&&!i.doc.eq(t.doc)&&this.updateDraggedNode(this.dragging,i),d=="reset"?this.dom.scrollTop=0:d=="to selection"?this.scrollToSelection():p&&zZe(p)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(!(!t||!this.dom.contains(t.nodeType==1?t:t.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof $e){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&YX(this,n.getBoundingClientRect(),t)}else YX(this,this.coordsAtPos(this.state.selection.head,1),t)}}destroyPluginViews(){let t;for(;t=this.pluginViews.pop();)t.destroy&&t.destroy()}updatePluginViews(t){if(!t||t.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}}updateDraggedNode(t,n){let r=t.node,i=-1;if(this.state.doc.nodeAt(r.from)==r.node)i=r.from;else{let o=r.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new jhe(t.slice,t.move,i<0?void 0:$e.create(this.state.doc,i))}someProp(t,n){let r=this._props&&this._props[t],i;if(r!=null&&(i=n?n(r):r))return i;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(i=n?n(a):a))return i}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(ro){let t=this.root.activeElement;if(t==this.dom)return!0;if(!t||!this.dom.contains(t))return!1;for(;t&&this.dom!=t&&this.dom.contains(t);){if(t.contentEditable=="false")return!1;t=t.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&FZe(this.dom),lc(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return qZe(this,t)}coordsAtPos(t,n=1){return ahe(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return XZe(this,n||this.state,t)}pasteHTML(t,n){return Wy(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return Wy(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return AD(this,t)}destroy(){this.docView&&(kQe(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],lA(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,AZe())}get isDestroyed(){return this.docView==null}dispatchEvent(t){return AQe(this,t)}dispatch(t){let n=this._props.dispatchTransaction;n?n.call(this,t):this.updateState(this.state.apply(t))}domSelectionRange(){let t=this.domSelection();return t?Di&&this.root.nodeType===11&&OZe(this.dom.ownerDocument)==this.dom&&YQe(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function wZ(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:!t[r]&&r!="contenteditable"&&r!="nodeName"&&(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[jr.node(0,e.state.doc.content.size,t)]}function CZ(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:jr.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function SZ(e){return!e.someProp("editable",t=>t(e.state)===!1)}function oJe(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function EZ(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function sJe(e,t){let n=0,r=0;for(let i in e){if(e[i]!=t[i])return!0;n++}for(let i in t)r++;return n!=r}function kZ(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var ad={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},g4={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},aJe=typeof navigator<"u"&&/Mac/.test(navigator.platform),lJe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ti=0;ti<10;ti++)ad[48+ti]=ad[96+ti]=String(ti);for(var ti=1;ti<=24;ti++)ad[ti+111]="F"+ti;for(var ti=65;ti<=90;ti++)ad[ti]=String.fromCharCode(ti+32),g4[ti]=String.fromCharCode(ti);for(var uA in ad)g4.hasOwnProperty(uA)||(g4[uA]=ad[uA]);function cJe(e){var t=aJe&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||lJe&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?g4:ad)[e.keyCode]||e.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const uJe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function dJe(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n=="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;a++){let l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))uJe?s=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return r&&(n="Alt-"+n),i&&(n="Ctrl-"+n),s&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function fJe(e){let t=Object.create(null);for(let n in e)t[dJe(n)]=e[n];return t}function dA(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function hJe(e){return new an({props:{handleKeyDown:RD(e)}})}function RD(e){let t=fJe(e);return function(n,r){let i=cJe(r),o,s=t[dA(i,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(r.shiftKey){let a=t[dA(i,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||i.charCodeAt(0)>127)&&(o=ad[r.keyCode])&&o!=i){let a=t[dA(o,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var pJe=Object.defineProperty,PD=(e,t)=>{for(var n in t)pJe(e,n,{get:t[n],enumerable:!0})};function QC(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:i}=n,{storedMarks:o}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return o},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,o=n.storedMarks,n}}}var JC=class{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,o=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([s,a])=>[s,(...c)=>{const d=a(...c)(o);return!i.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(i),d}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s=[],a=!!e,l=e||i.tr,c=()=>(!a&&t&&!l.getMeta("preventDispatch")&&!this.hasCustomState&&o.dispatch(l),s.every(f=>f===!0)),d={...Object.fromEntries(Object.entries(n).map(([f,p])=>[f,(...y)=>{const v=this.buildProps(l,t),b=p(...y)(v);return s.push(b),d}])),run:c};return d}createCan(e){const{rawCommands:t,state:n}=this,r=!1,i=e||n.tr,o=this.buildProps(i,r);return{...Object.fromEntries(Object.entries(t).map(([a,l])=>[a,(...c)=>l(...c)({...o,dispatch:void 0})])),chain:()=>this.createChain(i,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:i}=this,{view:o}=r,s={tr:e,editor:r,view:o,state:QC({state:i,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([a,l])=>[a,(...c)=>l(...c)(s)]))}};return s}},Phe={};PD(Phe,{blur:()=>mJe,clearContent:()=>gJe,clearNodes:()=>yJe,command:()=>vJe,createParagraphNear:()=>bJe,cut:()=>xJe,deleteCurrentNode:()=>wJe,deleteNode:()=>CJe,deleteRange:()=>SJe,deleteSelection:()=>EJe,enter:()=>kJe,exitCode:()=>_Je,extendMarkRange:()=>AJe,first:()=>NJe,focus:()=>TJe,forEach:()=>MJe,insertContent:()=>OJe,insertContentAt:()=>DJe,joinBackward:()=>$Je,joinDown:()=>LJe,joinForward:()=>zJe,joinItemBackward:()=>FJe,joinItemForward:()=>BJe,joinTextblockBackward:()=>HJe,joinTextblockForward:()=>VJe,joinUp:()=>IJe,keyboardShortcut:()=>qJe,lift:()=>WJe,liftEmptyBlock:()=>GJe,liftListItem:()=>KJe,newlineInCode:()=>YJe,resetAttributes:()=>XJe,scrollIntoView:()=>ZJe,selectAll:()=>QJe,selectNodeBackward:()=>JJe,selectNodeForward:()=>eet,selectParentNode:()=>tet,selectTextblockEnd:()=>net,selectTextblockStart:()=>ret,setContent:()=>iet,setMark:()=>ket,setMeta:()=>_et,setNode:()=>Aet,setNodeSelection:()=>Net,setTextDirection:()=>jet,setTextSelection:()=>Tet,sinkListItem:()=>Met,splitBlock:()=>Oet,splitListItem:()=>Ret,toggleList:()=>Pet,toggleMark:()=>Det,toggleNode:()=>Iet,toggleWrap:()=>Let,undoInputRule:()=>$et,unsetAllMarks:()=>zet,unsetMark:()=>Fet,unsetTextDirection:()=>Bet,updateAttributes:()=>Het,wrapIn:()=>Vet,wrapInList:()=>Uet});var mJe=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{var n;e.isDestroyed||(t.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),gJe=(e=!0)=>({commands:t})=>t.setContent("",{emitUpdate:e}),yJe=()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:i}=r;return n&&i.forEach(({$from:o,$to:s})=>{e.doc.nodesBetween(o.pos,s.pos,(a,l)=>{if(a.type.isText)return;const{doc:c,mapping:d}=t,f=c.resolve(d.map(l)),p=c.resolve(d.map(l+a.nodeSize)),m=f.blockRange(p);if(!m)return;const y=wm(m);if(a.type.isTextblock){const{defaultType:v}=f.parent.contentMatchAt(f.index());t.setNodeMarkup(m.start,v)}(y||y===0)&&t.lift(m,y)})}),!0},vJe=e=>t=>e(t),bJe=()=>({state:e,dispatch:t})=>Zfe(e,t),xJe=(e,t)=>({editor:n,tr:r})=>{const{state:i}=n,o=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const s=r.mapping.map(t);return r.insert(s,o.content),r.setSelection(new Ue(r.doc.resolve(Math.max(s-1,0)))),!0},wJe=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const i=e.selection.$anchor;for(let o=i.depth;o>0;o-=1)if(i.node(o).type===r.type){if(t){const a=i.before(o),l=i.after(o);e.delete(a,l).scrollIntoView()}return!0}return!1};function vr(e,t){if(typeof e=="string"){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var CJe=e=>({tr:t,state:n,dispatch:r})=>{const i=vr(e,n.schema),o=t.selection.$anchor;for(let s=o.depth;s>0;s-=1)if(o.node(s).type===i){if(r){const l=o.before(s),c=o.after(s);t.delete(l,c).scrollIntoView()}return!0}return!1},SJe=e=>({tr:t,dispatch:n})=>{const{from:r,to:i}=e;return n&&t.delete(r,i),!0},EJe=()=>({state:e,dispatch:t})=>bD(e,t),kJe=()=>({commands:e})=>e.keyboardShortcut("Enter"),_Je=()=>({state:e,dispatch:t})=>fZe(e,t);function DD(e){return Object.prototype.toString.call(e)==="[object RegExp]"}function y4(e,t,n={strict:!0}){const r=Object.keys(t);return r.length?r.every(i=>n.strict?t[i]===e[i]:DD(t[i])?t[i].test(e[i]):t[i]===e[i]):!0}function Dhe(e,t,n={}){return e.find(r=>r.type===t&&y4(Object.fromEntries(Object.keys(n).map(i=>[i,r.attrs[i]])),n))}function _Z(e,t,n={}){return!!Dhe(e,t,n)}function ID(e,t,n){var r;if(!e||!t)return;let i=e.parent.childAfter(e.parentOffset);if((!i.node||!i.node.marks.some(d=>d.type===t))&&(i=e.parent.childBefore(e.parentOffset)),!i.node||!i.node.marks.some(d=>d.type===t)||(n=n||((r=i.node.marks[0])==null?void 0:r.attrs),!Dhe([...i.node.marks],t,n)))return;let s=i.index,a=e.start()+i.offset,l=s+1,c=a+i.node.nodeSize;for(;s>0&&_Z([...e.parent.child(s-1).marks],t,n);)s-=1,a-=e.parent.child(s).nodeSize;for(;l<e.parent.childCount&&_Z([...e.parent.child(l).marks],t,n);)c+=e.parent.child(l).nodeSize,l+=1;return{from:a,to:c}}function Tc(e,t){if(typeof e=="string"){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var AJe=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const o=Tc(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:d}=a;if(i){const f=ID(l,o,t);if(f&&f.from<=c&&f.to>=d){const p=Ue.create(s,f.from,f.to);n.setSelection(p)}}return!0},NJe=e=>t=>{const n=typeof e=="function"?e(t):e;for(let r=0;r<n.length;r+=1)if(n[r](t))return!0;return!1};function eS(e){return e instanceof Ue}function Zl(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Ihe(e,t=null){if(!t)return null;const n=et.atStart(e),r=et.atEnd(e);if(t==="start"||t===!0)return n;if(t==="end")return r;const i=n.from,o=r.to;return t==="all"?Ue.create(e,Zl(0,i,o),Zl(e.content.size,i,o)):Ue.create(e,Zl(t,i,o),Zl(t,i,o))}function uM(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Ky(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function jJe(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var TJe=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:o})=>{t={scrollIntoView:!0,...t};const s=()=>{(Ky()||uM())&&r.dom.focus(),jJe()&&!Ky()&&!uM()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t!=null&&t.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(o&&e===null&&!eS(n.state.selection))return s(),!0;const a=Ihe(i.doc,e)||n.state.selection,l=n.state.selection.eq(a);return o&&(l||i.setSelection(a),l&&i.storedMarks&&i.setStoredMarks(i.storedMarks),s()),!0},MJe=(e,t)=>n=>e.every((r,i)=>t(r,{...n,index:i})),OJe=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),Lhe=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&Lhe(r)}return e};function k2(e){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,"text/html").body;return Lhe(n)}function Yy(e,t,n){if(e instanceof Ku||e instanceof we)return e;n={slice:!0,parseOptions:{},...n};const r=typeof e=="object"&&e!==null,i=typeof e=="string";if(r)try{if(Array.isArray(e)&&e.length>0)return we.fromArray(e.map(a=>t.nodeFromJSON(a)));const s=t.nodeFromJSON(e);return n.errorOnInvalidContent&&s.check(),s}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),Yy("",t,n)}if(i){if(n.errorOnInvalidContent){let s=!1,a="";const l=new hD({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:c=>(s=!0,a=typeof c=="string"?c:c.outerHTML,null)}]}})});if(n.slice?sc.fromSchema(l).parseSlice(k2(e),n.parseOptions):sc.fromSchema(l).parse(k2(e),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)})}const o=sc.fromSchema(t);return n.slice?o.parseSlice(k2(e),n.parseOptions).content:o.parse(k2(e),n.parseOptions)}return Yy("",t,n)}function RJe(e,t,n){const r=e.steps.length-1;if(r<t)return;const i=e.steps[r];if(!(i instanceof Hr||i instanceof Ur))return;const o=e.mapping.maps[r];let s=0;o.forEach((a,l,c,d)=>{s===0&&(s=d)}),e.setSelection(et.near(e.doc.resolve(s),n))}var PJe=e=>!("type"in e),DJe=(e,t,n)=>({tr:r,dispatch:i,editor:o})=>{var s;if(i){n={parseOptions:o.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let a;const l=b=>{o.emit("contentError",{editor:o,error:b,disableCollaboration:()=>{"collaboration"in o.storage&&typeof o.storage.collaboration=="object"&&o.storage.collaboration&&(o.storage.collaboration.isDisabled=!0)}})},c={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!o.options.enableContentCheck&&o.options.emitContentError)try{Yy(t,o.schema,{parseOptions:c,errorOnInvalidContent:!0})}catch(b){l(b)}try{a=Yy(t,o.schema,{parseOptions:c,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:o.options.enableContentCheck})}catch(b){return l(b),!1}let{from:d,to:f}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},p=!0,m=!0;if((PJe(a)?a:[a]).forEach(b=>{b.check(),p=p?b.isText&&b.marks.length===0:!1,m=m?b.isBlock:!1}),d===f&&m){const{parent:b}=r.doc.resolve(d);b.isTextblock&&!b.type.spec.code&&!b.childCount&&(d-=1,f+=1)}let v;if(p){if(Array.isArray(t))v=t.map(b=>b.text||"").join("");else if(t instanceof we){let b="";t.forEach(C=>{C.text&&(b+=C.text)}),v=b}else typeof t=="object"&&t&&t.text?v=t.text:v=t;r.insertText(v,d,f)}else{v=a;const b=r.doc.resolve(d),C=b.node(),S=b.parentOffset===0,E=C.isText||C.isTextblock,A=C.content.size>0;S&&E&&A&&(d=Math.max(0,d-1)),r.replaceWith(d,f,v)}n.updateSelection&&RJe(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:d,text:v}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:d,text:v})}return!0},IJe=()=>({state:e,dispatch:t})=>cZe(e,t),LJe=()=>({state:e,dispatch:t})=>uZe(e,t),$Je=()=>({state:e,dispatch:t})=>Ufe(e,t),zJe=()=>({state:e,dispatch:t})=>Kfe(e,t),FJe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=WC(e.doc,e.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},BJe=()=>({state:e,dispatch:t,tr:n})=>{try{const r=WC(e.doc,e.selection.$from.pos,1);return r==null?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},HJe=()=>({state:e,dispatch:t})=>aZe(e,t),VJe=()=>({state:e,dispatch:t})=>lZe(e,t);function $he(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function UJe(e){const t=e.split(/-(?!$)/);let n=t[t.length-1];n==="Space"&&(n=" ");let r,i,o,s;for(let a=0;a<t.length-1;a+=1){const l=t[a];if(/^(cmd|meta|m)$/i.test(l))s=!0;else if(/^a(lt)?$/i.test(l))r=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))Ky()||$he()?s=!0:i=!0;else throw new Error(`Unrecognized modifier name: ${l}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),o&&(n=`Shift-${n}`),n}var qJe=e=>({editor:t,view:n,tr:r,dispatch:i})=>{const o=UJe(e).split(/-(?!$)/),s=o.find(c=>!["Alt","Ctrl","Meta","Shift"].includes(c)),a=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:o.includes("Alt"),ctrlKey:o.includes("Ctrl"),metaKey:o.includes("Meta"),shiftKey:o.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction(()=>{n.someProp("handleKeyDown",c=>c(n,a))});return l==null||l.steps.forEach(c=>{const d=c.map(r.mapping);d&&i&&r.maybeStep(d)}),!0};function ld(e,t,n={}){const{from:r,to:i,empty:o}=e.selection,s=t?vr(t,e.schema):null,a=[];e.doc.nodesBetween(r,i,(f,p)=>{if(f.isText)return;const m=Math.max(r,p),y=Math.min(i,p+f.nodeSize);a.push({node:f,from:m,to:y})});const l=i-r,c=a.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>y4(f.node.attrs,n,{strict:!1}));return o?!!c.length:c.reduce((f,p)=>f+p.to-p.from,0)>=l}var WJe=(e,t={})=>({state:n,dispatch:r})=>{const i=vr(e,n.schema);return ld(n,i,t)?dZe(n,r):!1},GJe=()=>({state:e,dispatch:t})=>Qfe(e,t),KJe=e=>({state:t,dispatch:n})=>{const r=vr(e,t.schema);return SZe(r)(t,n)},YJe=()=>({state:e,dispatch:t})=>Xfe(e,t);function tS(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function AZ(e,t){const n=typeof t=="string"?[t]:t;return Object.keys(e).reduce((r,i)=>(n.includes(i)||(r[i]=e[i]),r),{})}var XJe=(e,t)=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=tS(typeof e=="string"?e:e.name,r.schema);if(!a)return!1;a==="node"&&(o=vr(e,r.schema)),a==="mark"&&(s=Tc(e,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{r.doc.nodesBetween(c.$from.pos,c.$to.pos,(d,f)=>{o&&o===d.type&&(l=!0,i&&n.setNodeMarkup(f,void 0,AZ(d.attrs,t))),s&&d.marks.length&&d.marks.forEach(p=>{s===p.type&&(l=!0,i&&n.addMark(f,f+d.nodeSize,s.create(AZ(p.attrs,t))))})})}),l},ZJe=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),QJe=()=>({tr:e,dispatch:t})=>{if(t){const n=new no(e.doc);e.setSelection(n)}return!0},JJe=()=>({state:e,dispatch:t})=>Wfe(e,t),eet=()=>({state:e,dispatch:t})=>Yfe(e,t),tet=()=>({state:e,dispatch:t})=>mZe(e,t),net=()=>({state:e,dispatch:t})=>vZe(e,t),ret=()=>({state:e,dispatch:t})=>yZe(e,t);function dM(e,t,n={},r={}){return Yy(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var iet=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:o,dispatch:s,commands:a})=>{const{doc:l}=o;if(r.preserveWhitespace!=="full"){const c=dM(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});return s&&o.replaceWith(0,l.content.size,c).setMeta("preventUpdate",!n),!0}return s&&o.setMeta("preventUpdate",!n),a.insertContentAt({from:0,to:l.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function zhe(e,t){const n=Tc(t,e.schema),{from:r,to:i,empty:o}=e.selection,s=[];o?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,l=>{s.push(...l.marks)});const a=s.find(l=>l.type.name===n.name);return a?{...a.attrs}:{}}function Fhe(e,t){const n=new yD(e);return t.forEach(r=>{r.steps.forEach(i=>{n.step(i)})}),n}function oet(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function set(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,(i,o)=>{n(i)&&r.push({node:i,pos:o})}),r}function Bhe(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function nS(e){return t=>Bhe(t.$from,e)}function Ye(e,t,n){return e.config[t]===void 0&&e.parent?Ye(e.parent,t,n):typeof e.config[t]=="function"?e.config[t].bind({...n,parent:e.parent?Ye(e.parent,t,n):null}):e.config[t]}function LD(e){return e.map(t=>{const n={name:t.name,options:t.options,storage:t.storage},r=Ye(t,"addExtensions",n);return r?[t,...LD(r())]:t}).flat(10)}function ob(e,t){const n=xh.fromSchema(t).serializeFragment(e),i=document.implementation.createHTMLDocument().createElement("div");return i.appendChild(n),i.innerHTML}function Hhe(e){return typeof e=="function"}function Wt(e,t=void 0,...n){return Hhe(e)?t?e.bind(t)(...n):e(...n):e}function aet(e={}){return Object.keys(e).length===0&&e.constructor===Object}function $0(e){const t=e.filter(i=>i.type==="extension"),n=e.filter(i=>i.type==="node"),r=e.filter(i=>i.type==="mark");return{baseExtensions:t,nodeExtensions:n,markExtensions:r}}function Vhe(e){const t=[],{nodeExtensions:n,markExtensions:r}=$0(e),i=[...n,...r],o={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(c=>c.name!=="text").map(c=>c.name),a=r.map(c=>c.name),l=[...s,...a];return e.forEach(c=>{const d={name:c.name,options:c.options,storage:c.storage,extensions:i},f=Ye(c,"addGlobalAttributes",d);if(!f)return;f().forEach(m=>{let y;Array.isArray(m.types)?y=m.types:m.types==="*"?y=l:m.types==="nodes"?y=s:m.types==="marks"?y=a:y=[],y.forEach(v=>{Object.entries(m.attributes).forEach(([b,C])=>{t.push({type:v,name:b,attribute:{...o,...C}})})})})}
202),i.forEach(c=>{const d={name:c.name,options:c.options,storage:c.storage},f=Ye(c,"addAttributes",d);if(!f)return;const p=f();Object.entries(p).forEach(([m,y])=>{const v={...o,...y};typeof(v==null?void 0:v.default)=="function"&&(v.default=v.default()),v!=null&&v.isRequired&&(v==null?void 0:v.default)===void 0&&delete v.default,t.push({type:c.name,name:m,attribute:v})})}),t}function cet(e){const t=[];let n="",r=!1,i=!1,o=0;const s=e.length;for(let a=0;a<s;a+=1){const l=e[a];if(l==="'"&&!i){r=!r,n+=l;continue}if(l==='"'&&!r){i=!i,n+=l;continue}if(!r&&!i){if(l==="("){o+=1,n+=l;continue}if(l===")"&&o>0){o-=1,n+=l;continue}if(l===";"&&o===0){t.push(n),n="";continue}}n+=l}return n&&t.push(n),t}function NZ(e){const t=[],n=cet(e||""),r=n.length;for(let i=0;i<r;i+=1){const o=n[i],s=o.indexOf(":");if(s===-1)continue;const a=o.slice(0,s).trim(),l=o.slice(s+1).trim();a&&l&&t.push([a,l])}return t}function Bt(...e){return e.filter(t=>!!t).reduce((t,n)=>{const r={...t};return Object.entries(n).forEach(([i,o])=>{if(!r[i]){r[i]=o;return}if(i==="class"){const a=o?String(o).split(" "):[],l=r[i]?r[i].split(" "):[],c=a.filter(d=>!l.includes(d));r[i]=[...l,...c].join(" ")}else if(i==="style"){const a=new Map([...NZ(r[i]),...NZ(o)]);r[i]=Array.from(a.entries()).map(([l,c])=>`${l}: ${c}`).join("; ")}else r[i]=o}),r},{})}function z0(e,t){return t.filter(n=>n.type===e.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(e.attrs)||{}:{[n.name]:e.attrs[n.name]}).reduce((n,r)=>Bt(n,r),{})}function uet(e){return typeof e!="string"?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e==="true"?!0:e==="false"?!1:e}function jZ(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;const i=t.reduce((o,s)=>{const a=s.attribute.parseHTML?s.attribute.parseHTML(n):uet(n.getAttribute(s.name));return a==null?o:{...o,[s.name]:a}},{});return{...r,...i}}}}function TZ(e){return Object.fromEntries(Object.entries(e).filter(([t,n])=>t==="attrs"&&aet(n)?!1:n!=null))}function MZ(e){var t,n;const r={};return!((t=e==null?void 0:e.attribute)!=null&&t.isRequired)&&"default"in((e==null?void 0:e.attribute)||{})&&(r.default=e.attribute.default),((n=e==null?void 0:e.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function det(e,t){var n;const r=Vhe(e),{nodeExtensions:i,markExtensions:o}=$0(e),s=(n=i.find(c=>Ye(c,"topNode")))==null?void 0:n.name,a=Object.fromEntries(i.map(c=>{const d=r.filter(C=>C.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((C,S)=>{const E=Ye(S,"extendNodeSchema",f);return{...C,...E?E(c):{}}},{}),m=TZ({...p,content:Wt(Ye(c,"content",f)),marks:Wt(Ye(c,"marks",f)),group:Wt(Ye(c,"group",f)),inline:Wt(Ye(c,"inline",f)),atom:Wt(Ye(c,"atom",f)),selectable:Wt(Ye(c,"selectable",f)),draggable:Wt(Ye(c,"draggable",f)),code:Wt(Ye(c,"code",f)),whitespace:Wt(Ye(c,"whitespace",f)),linebreakReplacement:Wt(Ye(c,"linebreakReplacement",f)),defining:Wt(Ye(c,"defining",f)),isolating:Wt(Ye(c,"isolating",f)),attrs:Object.fromEntries(d.map(MZ))}),y=Wt(Ye(c,"parseHTML",f));y&&(m.parseDOM=y.map(C=>jZ(C,d)));const v=Ye(c,"renderHTML",f);v&&(m.toDOM=C=>v({node:C,HTMLAttributes:z0(C,d)}));const b=Ye(c,"renderText",f);return b&&(m.toText=b),[c.name,m]})),l=Object.fromEntries(o.map(c=>{const d=r.filter(b=>b.type===c.name),f={name:c.name,options:c.options,storage:c.storage,editor:t},p=e.reduce((b,C)=>{const S=Ye(C,"extendMarkSchema",f);return{...b,...S?S(c):{}}},{}),m=TZ({...p,inclusive:Wt(Ye(c,"inclusive",f)),excludes:Wt(Ye(c,"excludes",f)),group:Wt(Ye(c,"group",f)),spanning:Wt(Ye(c,"spanning",f)),code:Wt(Ye(c,"code",f)),attrs:Object.fromEntries(d.map(MZ))}),y=Wt(Ye(c,"parseHTML",f));y&&(m.parseDOM=y.map(b=>jZ(b,d)));const v=Ye(c,"renderHTML",f);return v&&(m.toDOM=b=>v({mark:b,HTMLAttributes:z0(b,d)})),[c.name,m]}));return new hD({topNode:s,nodes:a,marks:l})}function fet(e){const t=e.filter((n,r)=>e.indexOf(n)!==r);return Array.from(new Set(t))}function O1(e){return e.sort((n,r)=>{const i=Ye(n,"priority")||100,o=Ye(r,"priority")||100;return i>o?-1:i<o?1:0})}function Uhe(e){const t=O1(LD(e)),n=fet(t.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),t}function qhe(e,t,n){const{from:r,to:i}=t,{blockSeparator:o=` 203
204`,textSerializers:s={}}=n||{};let a="";return e.nodesBetween(r,i,(l,c,d,f)=>{var p;l.isBlock&&c>r&&(a+=o);const m=s==null?void 0:s[l.type.name];if(m)return d&&(a+=m({node:l,pos:c,parent:d,index:f,range:t})),!1;l.isText&&(a+=(p=l==null?void 0:l.text)==null?void 0:p.slice(Math.max(r,c)-c,i-c))}),a}function Whe(e,t){const n={from:0,to:e.content.size};return qhe(e,n,t)}function $D(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,t])=>t.spec.toText).map(([t,n])=>[t,n.spec.toText]))}function het(e,t){const n=vr(t,e.schema),{from:r,to:i}=e.selection,o=[];e.doc.nodesBetween(r,i,a=>{o.push(a)});const s=o.reverse().find(a=>a.type.name===n.name);return s?{...s.attrs}:{}}function Ghe(e,t){const n=tS(typeof t=="string"?t:t.name,e.schema);return n==="node"?het(e,t):n==="mark"?zhe(e,t):{}}function pet(e,t=JSON.stringify){const n={};return e.filter(r=>{const i=t(r);return Object.prototype.hasOwnProperty.call(n,i)?!1:n[i]=!0})}function met(e){const t=pet(e);return t.length===1?t:t.filter((n,r)=>!t.filter((o,s)=>s!==r).some(o=>n.oldRange.from>=o.oldRange.from&&n.oldRange.to<=o.oldRange.to&&n.newRange.from>=o.newRange.from&&n.newRange.to<=o.newRange.to))}function Khe(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach((i,o)=>{const s=[];if(i.ranges.length)i.forEach((a,l)=>{s.push({from:a,to:l})});else{const{from:a,to:l}=n[o];if(a===void 0||l===void 0)return;s.push({from:a,to:l})}s.forEach(({from:a,to:l})=>{const c=t.slice(o).map(a,-1),d=t.slice(o).map(l),f=t.invert().map(c,-1),p=t.invert().map(d);r.push({oldRange:{from:f,to:p},newRange:{from:c,to:d}})})}),met(r)}function zD(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach(i=>{const o=n.resolve(e),s=ID(o,i.type);s&&r.push({mark:i,...s})}):n.nodesBetween(e,t,(i,o)=>{!i||(i==null?void 0:i.nodeSize)===void 0||r.push(...i.marks.map(s=>({from:o,to:o+i.nodeSize,mark:s})))}),r}var get=(e,t,n,r=20)=>{const i=e.doc.resolve(n);let o=r,s=null;for(;o>0&&s===null;){const a=i.node(o);(a==null?void 0:a.type.name)===t?s=a:o-=1}return[s,o]};function Vg(e,t){return t.nodes[e]||t.marks[e]||null}function hw(e,t,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=e.find(o=>o.type===t&&o.name===r);return i?i.attribute.keepOnSplit:!1}))}var yet=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(i,o,s,a)=>{var l,c;const d=((c=(l=i.type.spec).toText)==null?void 0:c.call(l,{node:i,pos:o,parent:s,index:a}))||i.textContent||"%leaf%";n+=i.isAtom&&!i.isText?d:d.slice(0,Math.max(0,r-o))}),n};function fM(e,t,n={}){const{empty:r,ranges:i}=e.selection,o=t?Tc(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(f=>o?o.name===f.type.name:!0).find(f=>y4(f.attrs,n,{strict:!1}));let s=0;const a=[];if(i.forEach(({$from:f,$to:p})=>{const m=f.pos,y=p.pos;e.doc.nodesBetween(m,y,(v,b)=>{if(o&&v.inlineContent&&!v.type.allowsMarkType(o))return!1;if(!v.isText&&!v.marks.length)return;const C=Math.max(m,b),S=Math.min(y,b+v.nodeSize),E=S-C;s+=E,a.push(...v.marks.map(A=>({mark:A,from:C,to:S})))})}),s===0)return!1;const l=a.filter(f=>o?o.name===f.mark.type.name:!0).filter(f=>y4(f.mark.attrs,n,{strict:!1})).reduce((f,p)=>f+p.to-p.from,0),c=a.filter(f=>o?f.mark.type!==o&&f.mark.type.excludes(o):!0).reduce((f,p)=>f+p.to-p.from,0);return(l>0?l+c:l)>=s}function vet(e,t,n={}){if(!t)return ld(e,null,n)||fM(e,null,n);const r=tS(t,e.schema);return r==="node"?ld(e,t,n):r==="mark"?fM(e,t,n):!1}var bet=(e,t)=>{const{$from:n,$to:r,$anchor:i}=e.selection;if(t){const o=nS(a=>a.type.name===t)(e.selection);if(!o)return!1;const s=e.doc.resolve(o.pos+1);return i.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},xet=e=>{const{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function OZ(e,t){return Array.isArray(t)?t.some(n=>(typeof n=="string"?n:n.name)===e.name):t}function RZ(e,t){const{nodeExtensions:n}=$0(t),r=n.find(s=>s.name===e);if(!r)return!1;const i={name:r.name,options:r.options,storage:r.storage},o=Wt(Ye(r,"group",i));return typeof o!="string"?!1:o.split(" ").includes("list")}function rS(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){var r;
vendor: 30,517 bytes, lines 204-245
204if(n){if(e.type.name==="hardBreak")return!0;if(e.isText)return!/\S/.test((r=e.text)!=null?r:"")}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let i=!0;return e.content.forEach(o=>{i!==!1&&(rS(o,{ignoreWhitespace:n,checkChildren:t})||(i=!1))}),i}return!1}function FD(e){return e instanceof $e}var Yhe=class Xhe{constructor(t){this.position=t}static fromJSON(t){return new Xhe(t.position)}toJSON(){return{position:this.position}}};function wet(e,t){const n=t.mapping.mapResult(e.position);return{position:new Yhe(n.pos),mapResult:n}}function Cet(e){return new Yhe(e)}function Zhe(e,t,n){const i=e.state.doc.content.size,o=Zl(t,0,i),s=Zl(n,0,i),a=e.coordsAtPos(o),l=e.coordsAtPos(s,-1),c=Math.min(a.top,l.top),d=Math.max(a.bottom,l.bottom),f=Math.min(a.left,l.left),p=Math.max(a.right,l.right),m=p-f,y=d-c,C={top:c,bottom:d,left:f,right:p,width:m,height:y,x:f,y:c};return{...C,toJSON:()=>C}}function Eet(e,t,n){var r;const{selection:i}=t;let o=null;if(eS(i)&&(o=i.$cursor),o){const a=(r=e.storedMarks)!=null?r:o.marks();return o.parent.type.allowsMarkType(n)&&(!!n.isInSet(a)||!a.some(c=>c.type.excludes(n)))}const{ranges:s}=i;return s.some(({$from:a,$to:l})=>{let c=a.depth===0?e.doc.inlineContent&&e.doc.type.allowsMarkType(n):!1;return e.doc.nodesBetween(a.pos,l.pos,(d,f,p)=>{if(c)return!1;if(d.isInline){const m=!p||p.type.allowsMarkType(n),y=!!n.isInSet(d.marks)||!d.marks.some(v=>v.type.excludes(n));c=m&&y}return!c}),c})}var ket=(e,t={})=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=n,{empty:s,ranges:a}=o,l=Tc(e,r.schema);if(i)if(s){const c=zhe(r,l);n.addStoredMark(l.create({...c,...t}))}else a.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;r.doc.nodesBetween(d,f,(p,m)=>{const y=Math.max(m,d),v=Math.min(m+p.nodeSize,f);p.marks.find(C=>C.type===l)?p.marks.forEach(C=>{l===C.type&&n.addMark(y,v,l.create({...C.attrs,...t}))}):n.addMark(y,v,l.create(t))})});return Eet(r,n,l)},_et=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),Aet=(e,t={})=>({state:n,dispatch:r,chain:i})=>{const o=vr(e,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),o.isTextblock?i().command(({commands:a})=>WX(o,{...s,...t})(n)?!0:a.clearNodes()).command(({state:a})=>WX(o,{...s,...t})(a,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},Net=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,i=Zl(e,0,r.content.size),o=$e.create(r,i);t.setSelection(o)}return!0},jet=(e,t)=>({tr:n,state:r,dispatch:i})=>{const{selection:o}=r;let s,a;return typeof t=="number"?(s=t,a=t):t&&"from"in t&&"to"in t?(s=t.from,a=t.to):(s=o.from,a=o.to),i&&n.doc.nodesBetween(s,a,(l,c)=>{l.isText||n.setNodeMarkup(c,void 0,{...l.attrs,dir:e})}),!0},Tet=e=>({tr:t,dispatch:n})=>{if(n){const{doc:r}=t,{from:i,to:o}=typeof e=="number"?{from:e,to:e}:e,s=Ue.atStart(r).from,a=Ue.atEnd(r).to,l=Zl(i,s,a),c=Zl(o,s,a),d=Ue.create(r,l,c);t.setSelection(d)}return!0},Met=e=>({state:t,dispatch:n})=>{const r=vr(e,t.schema);return _Ze(r)(t,n)};function PZ(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter(i=>t==null?void 0:t.includes(i.type.name));e.tr.ensureMarks(r)}}var Oet=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{const{selection:o,doc:s}=t,{$from:a,$to:l}=o,c=i.extensionManager.attributes,d=hw(c,a.node().type.name,a.node().attrs);if(o instanceof $e&&o.node.isBlock)return!a.parentOffset||!ac(s,a.pos)?!1:(r&&(e&&PZ(n,i.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;const f=l.parentOffset===l.parent.content.size,p=a.depth===0?void 0:oet(a.node(-1).contentMatchAt(a.indexAfter(-1)));let m=f&&p?[{type:p,attrs:d}]:void 0,y=ac(t.doc,t.mapping.map(a.pos),1,m);if(!m&&!y&&ac(t.doc,t.mapping.map(a.pos),1,p?[{type:p}]:void 0)&&(y=!0,m=p?[{type:p,attrs:d}]:void 0),r){if(y&&(o instanceof Ue&&t.deleteSelection(),t.split(t.mapping.map(a.pos),1,m),p&&!f&&!a.parentOffset&&a.parent.type!==p)){const v=t.mapping.map(a.before()),b=t.doc.resolve(v);a.node(-1).canReplaceWith(b.index(),b.index()+1,p)&&t.setNodeMarkup(t.mapping.map(a.before()),p)}e&&PZ(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return y},Ret=(e,t={})=>({tr:n,state:r,dispatch:i,editor:o})=>{var s;const a=vr(e,r.schema),{$from:l,$to:c}=r.selection,d=r.selection.node;if(d&&d.isBlock||l.depth<2||!l.sameParent(c))return!1;const f=l.node(-1);if(f.type!==a)return!1;const p=o.extensionManager.attributes;if(l.parent.content.size===0&&l.node(-1).childCount===l.indexAfter(-1)){if(l.depth===2||l.node(-3).type!==a||l.index(-2)!==l.node(-2).childCount-1)return!1;if(i){let C=we.empty;const S=l.index(-1)?1:l.index(-2)?2:3;for(let T=l.depth-S;T>=l.depth-3;T-=1)C=we.from(l.node(T).copy(C));const E=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,A={...hw(p,l.node().type.name,l.node().attrs),...t},_=((s=a.contentMatch.defaultType)==null?void 0:s.createAndFill(A))||void 0;C=C.append(we.from(a.createAndFill(null,_)||void 0));const N=l.before(l.depth-(S-1));n.replace(N,l.after(-E),new Ie(C,4-S,0));let j=-1;n.doc.nodesBetween(N,n.doc.content.size,(T,O)=>{if(j>-1)return!1;T.isTextblock&&T.content.size===0&&(j=O+1)}),j>-1&&n.setSelection(Ue.near(n.doc.resolve(j))),n.scrollIntoView()}return!0}const m=c.pos===l.end()?f.contentMatchAt(0).defaultType:null,y={...hw(p,f.type.name,f.attrs),...t},v={...hw(p,l.node().type.name,l.node().attrs),...t};n.delete(l.pos,c.pos);const b=m?[{type:a,attrs:y},{type:m,attrs:v}]:[{type:a,attrs:y}];if(!ac(n.doc,l.pos,2))return!1;if(i){const{selection:C,storedMarks:S}=r,{splittableMarks:E}=o.extensionManager,A=S||C.$to.parentOffset&&C.$from.marks();if(n.split(l.pos,2,b).scrollIntoView(),!A||!i)return!0;const _=A.filter(N=>E.includes(N.type.name));n.ensureMarks(_)}return!0},fA=(e,t)=>{const n=nS(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Nd(e.doc,n.pos)&&e.join(n.pos),!0},hA=(e,t)=>{const n=nS(s=>s.type===t)(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const i=e.doc.nodeAt(r);return n.node.type===(i==null?void 0:i.type)&&Nd(e.doc,r)&&e.join(r),!0},Pet=(e,t,n,r={})=>({editor:i,tr:o,state:s,dispatch:a,chain:l,commands:c,can:d})=>{const{extensions:f,splittableMarks:p}=i.extensionManager,m=vr(e,s.schema),y=vr(t,s.schema),{selection:v,storedMarks:b}=s,{$from:C,$to:S}=v,E=C.blockRange(S),A=b||v.$to.parentOffset&&v.$from.marks();if(!E)return!1;const _=nS(N=>RZ(N.type.name,f))(v);if(E.depth>=1&&_&&E.depth-_.depth<=1){if(_.node.type===m)return c.liftListItem(y);if(RZ(_.node.type.name,f)&&m.validContent(_.node.content)&&a)return l().command(()=>(o.setNodeMarkup(_.pos,m),!0)).command(()=>fA(o,m)).command(()=>hA(o,m)).run()}return!n||!A||!a?l().command(()=>d().wrapInList(m,r)?!0:c.clearNodes()).wrapInList(m,r).command(()=>fA(o,m)).command(()=>hA(o,m)).run():l().command(()=>{const N=d().wrapInList(m,r),j=A.filter(T=>p.includes(T.type.name));return o.ensureMarks(j),N?!0:c.clearNodes()}).wrapInList(m,r).command(()=>fA(o,m)).command(()=>hA(o,m)).run()},Det=(e,t={},n={})=>({state:r,commands:i})=>{const{extendEmptyMarkRange:o=!1}=n,s=Tc(e,r.schema);return fM(r,s,t)?i.unsetMark(s,{extendEmptyMarkRange:o}):i.setMark(s,t)},Iet=(e,t,n={})=>({state:r,commands:i})=>{const o=vr(e,r.schema),s=vr(t,r.schema),a=ld(r,o,n);let l;return r.selection.$anchor.sameParent(r.selection.$head)&&(l=r.selection.$anchor.parent.attrs),a?i.setNode(s,l):i.setNode(o,{...l,...n})},Let=(e,t={})=>({state:n,commands:r})=>{const i=vr(e,n.schema);return ld(n,i,t)?r.lift(i):r.wrapIn(i,t)},$et=()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const i=n[r];let o;if(i.spec.isInputRules&&(o=i.getState(e))){if(t){const s=e.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l-=1)s.step(a.steps[l].invert(a.docs[l]));if(o.text){const l=s.doc.resolve(o.from).marks();s.replaceWith(o.from,o.to,e.schema.text(o.text,l))}else s.delete(o.from,o.to)}return!0}}return!1},zet=()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:i}=n;return r||t&&i.forEach(o=>{e.removeMark(o.$from.pos,o.$to.pos)}),!0},Fet=(e,t={})=>({tr:n,state:r,dispatch:i})=>{var o;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Tc(e,r.schema),{$from:c,empty:d,ranges:f}=a;if(!i)return!0;if(d&&s){let{from:p,to:m}=a;const y=(o=c.marks().find(b=>b.type===l))==null?void 0:o.attrs,v=ID(c,l,y);v&&(p=v.from,m=v.to),n.removeMark(p,m,l)}else f.forEach(p=>{n.removeMark(p.$from.pos,p.$to.pos,l)});return n.removeStoredMark(l),!0},Bet=e=>({tr:t,state:n,dispatch:r})=>{const{selection:i}=n;let o,s;return typeof e=="number"?(o=e,s=e):e&&"from"in e&&"to"in e?(o=e.from,s=e.to):(o=i.from,s=i.to),r&&t.doc.nodesBetween(o,s,(a,l)=>{if(a.isText)return;const c={...a.attrs};delete c.dir,t.setNodeMarkup(l,void 0,c)}),!0},Het=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let o=null,s=null;const a=tS(typeof e=="string"?e:e.name,r.schema);if(!a)return!1;a==="node"&&(o=vr(e,r.schema)),a==="mark"&&(s=Tc(e,r.schema));let l=!1;return n.selection.ranges.forEach(c=>{const d=c.$from.pos,f=c.$to.pos;let p,m,y,v;n.selection.empty?r.doc.nodesBetween(d,f,(b,C)=>{o&&o===b.type&&(l=!0,y=Math.max(C,d),v=Math.min(C+b.nodeSize,f),p=C,m=b)}):r.doc.nodesBetween(d,f,(b,C)=>{C<d&&o&&o===b.type&&(l=!0,y=Math.max(C,d),v=Math.min(C+b.nodeSize,f),p=C,m=b),C>=d&&C<=f&&(o&&o===b.type&&(l=!0,i&&n.setNodeMarkup(C,void 0,{...b.attrs,...t})),s&&b.marks.length&&b.marks.forEach(S=>{if(s===S.type&&(l=!0,i)){const E=Math.max(C,d),A=Math.min(C+b.nodeSize,f);n.addMark(E,A,s.create({...S.attrs,...t}))}}))}),m&&(p!==void 0&&i&&n.setNodeMarkup(p,void 0,{...m.attrs,...t}),s&&m.marks.length&&m.marks.forEach(b=>{s===b.type&&i&&n.addMark(y,v,s.create({...b.attrs,...t}))}))}),l},Vet=(e,t={})=>({state:n,dispatch:r})=>{const i=vr(e,n.schema);return bZe(i,t)(n,r)},Uet=(e,t={})=>({state:n,dispatch:r})=>{const i=vr(e,n.schema);return xZe(i,t)(n,r)},qet=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach(r=>r.apply(this,t)),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(r=>r!==t):delete this.callbacks[e]),this}once(e,t){const n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},sb=class{constructor(e){var t;this.find=e.find,this.handler=e.handler,this.undoable=(t=e.undoable)!=null?t:!0}},Wet=(e,t)=>{if(DD(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function _2(e){var t;const{editor:n,from:r,to:i,text:o,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(t=c.nodeBefore||c.nodeAfter)!=null&&t.marks.find(p=>p.type.spec.code))return!1;let d=!1;const f=yet(c)+o;return s.forEach(p=>{if(d)return;const m=Wet(f,p.find);if(!m)return;const y=l.state.tr,v=QC({state:l.state,transaction:y}),b={from:r-(m[0].length-o.length),to:i},{commands:C,chain:S,can:E}=new JC({editor:n,state:v});p.handler({state:v,range:b,match:m,commands:C,chain:S,can:E})===null||!y.steps.length||(p.undoable&&y.setMeta(a,{transform:y,from:r,to:i,text:o}),l.dispatch(y),d=!0)}),d}function Get(e){const{editor:t,rules:n}=e,r=new an({state:{init(){return null},apply(i,o,s){const a=i.getMeta(r);if(a)return a;const l=i.getMeta("applyInputRules");return!!l&&setTimeout(()=>{let{text:d}=l;typeof d=="string"?d=d:d=ob(we.from(d),s.schema);const{from:f}=l,p=f+d.length;_2({editor:t,from:f,to:p,text:d,rules:n,plugin:r})}),i.selectionSet||i.docChanged?null:o}},props:{handleTextInput(i,o,s,a){return _2({editor:t,from:o,to:s,text:a,rules:n,plugin:r})},handleDOMEvents:{compositionend:i=>(setTimeout(()=>{const{$cursor:o}=i.state.selection;o&&_2({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(i,o){if(o.key!=="Enter")return!1;const{$cursor:s}=i.state.selection;return s?_2({editor:t,from:s.pos,to:s.pos,text:` 205`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function Ket(e){return Object.prototype.toString.call(e).slice(8,-1)}function A2(e){return Ket(e)!=="Object"?!1:e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function Qhe(e,t){const n={...e};return A2(e)&&A2(t)&&Object.keys(t).forEach(r=>{A2(t[r])&&A2(e[r])?n[r]=Qhe(e[r],t[r]):n[r]=t[r]}),n}var BD=class{constructor(e={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...Wt(Ye(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Wt(Ye(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(e={}){const t=this.extend({...this.config,addOptions:()=>Qhe(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name="name"in e?e.name:t.parent.name,t}},ai=class Jhe extends BD{constructor(){super(...arguments),this.type="mark"}static create(t={}){const n=typeof t=="function"?t():t;return new Jhe(n)}static handleExit({editor:t,mark:n}){const{tr:r}=t.state,i=t.state.selection.$from;if(i.pos===i.end()){const s=i.marks();if(!!!s.find(c=>(c==null?void 0:c.type.name)===n.name))return!1;const l=s.find(c=>(c==null?void 0:c.type.name)===n.name);return l&&r.removeStoredMark(l),r.insertText(" ",i.pos),t.view.dispatch(r),!0}return!1}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}};function Yet(e){return typeof e=="number"}var epe=class{constructor(e){this.find=e.find,this.handler=e.handler}},Xet=(e,t,n)=>{if(DD(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map(i=>{const o=[i.text];return o.index=i.index,o.input=e,o.data=i.data,i.replaceWith&&(i.text.includes(i.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),o.push(i.replaceWith)),o}):[]};function Zet(e){const{editor:t,state:n,from:r,to:i,rule:o,pasteEvent:s,dropEvent:a}=e,{commands:l,chain:c,can:d}=new JC({editor:t,state:n}),f=[];return n.doc.nodesBetween(r,i,(m,y)=>{var v,b,C,S,E;if((b=(v=m.type)==null?void 0:v.spec)!=null&&b.code||!(m.isText||m.isTextblock||m.isInline))return;const A=(E=(S=(C=m.content)==null?void 0:C.size)!=null?S:m.nodeSize)!=null?E:0,_=Math.max(r,y),N=Math.min(i,y+A);if(_>=N)return;const j=m.isText?m.text||"":m.textBetween(_-y,N-y,void 0,"");Xet(j,o.find,s).forEach(O=>{if(O.index===void 0)return;const D=_+O.index+1,R=D+O[0].length,I={from:n.tr.mapping.map(D),to:n.tr.mapping.map(R)},F=o.handler({state:n,range:I,match:O,commands:l,chain:c,can:d,pasteEvent:s,dropEvent:a});f.push(F)})}),f.every(m=>m!==null)}var N2=null,Qet=e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData("text/html",e),n};function Jet(e){const{editor:t,rules:n}=e;let r=null,i=!1,o=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,a;try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}const l=({state:d,from:f,to:p,rule:m,pasteEvt:y})=>{const v=d.tr,b=QC({state:d,transaction:v});if(!(!Zet({editor:t,state:b,from:Math.max(f-1,0),to:p.b-1,rule:m,pasteEvent:y,dropEvent:a})||!v.steps.length)){try{a=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{a=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,v}};return n.map(d=>new an({view(f){const p=y=>{var v;r=(v=f.dom.parentElement)!=null&&v.contains(y.target)?f.dom.parentElement:null,r&&(N2=t)},m=()=>{N2&&(N2=null)};return window.addEventListener("dragstart",p),window.addEventListener("dragend",m),{destroy(){window.removeEventListener("dragstart",p),window.removeEventListener("dragend",m)}}},props:{handleDOMEvents:{drop:(f,p)=>{if(o=r===f.dom.parentElement,a=p,!o){const m=N2;m!=null&&m.isEditable&&setTimeout(()=>{const y=m.state.selection;y&&m.commands.deleteRange({from:y.from,to:y.to})},10)}return!1},paste:(f,p)=>{var m;const y=(m=p.clipboardData)==null?void 0:m.getData("text/html");return s=p,i=!!(y!=null&&y.includes("data-pm-slice")),!1}}},appendTransaction:(f,p,m)=>{const y=f[0],v=y.getMeta("uiEvent")==="paste"&&!i,b=y.getMeta("uiEvent")==="drop"&&!o,C=y.getMeta("applyPasteRules"),S=!!C;if(!v&&!b&&!S)return;if(S){let{text:_}=C;typeof _=="string"?_=_:_=ob(we.from(_),m.schema);const{from:N}=C,j=N+_.length,T=Qet(_);return l({rule:d,state:m,from:N,to:{b:j},pasteEvt:T})}const E=p.doc.content.findDiffStart(m.doc.content),A=p.doc.content.findDiffEnd(m.doc.content);if(!(!Yet(E)||!A||E===A.b))return l({rule:d,state:m,from:E,to:A,pasteEvt:s})}}))}var iS=class{constructor(e,t){this.splittableMarks=[],this.editor=t,this.baseExtensions=e,this.extensions=Uhe(e),this.schema=det(this.extensions,t),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{const n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Vg(t.name,this.schema)},r=Ye(t,"addCommands",n);return r?{...e,...r()}:e},{})}get plugins(){const{editor:e}=this;return O1([...this.extensions].reverse()).flatMap(r=>{const i={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:e,type:Vg(r.name,this.schema)},o=[],s=Ye(r,"addKeyboardShortcuts",i);let a={};if(r.type==="mark"&&Ye(r,"exitable",i)&&(a.ArrowRight=()=>ai.handleExit({editor:e,mark:r})),s){const p=Object.fromEntries(Object.entries(s()).map(([m,y])=>[m,()=>y({editor:e})]));a={...a,...p}}const l=hJe(a);o.push(l);const c=Ye(r,"addInputRules",i);if(OZ(r,e.options.enableInputRules)&&c){const p=c();if(p&&p.length){const m=Get({editor:e,rules:p}),y=Array.isArray(m)?m:[m];o.push(...y)}}const d=Ye(r,"addPasteRules",i);if(OZ(r,e.options.enablePasteRules)&&d){const p=d();if(p&&p.length){const m=Jet({editor:e,rules:p});o.push(...m)}}const f=Ye(r,"addProseMirrorPlugins",i);if(f){const p=f();o.push(...p)}return o})}get attributes(){return Vhe(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=$0(this.extensions);return Object.fromEntries(t.filter(n=>!!Ye(n,"addNodeView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:vr(n.name,this.schema)},o=Ye(n,"addNodeView",i);if(!o)return[];const s=o();if(!s)return[];const a=(l,c,d,f,p)=>{const m=z0(l,r);return s({node:l,view:c,getPos:d,decorations:f,innerDecorations:p,editor:e,extension:n,HTMLAttributes:m})};return[n.name,a]}))}dispatchTransaction(e){const{editor:t}=this;return O1([...this.extensions].reverse()).reduceRight((r,i)=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:Vg(i.name,this.schema)},s=Ye(i,"dispatchTransaction",o);return s?a=>{s.call(o,{transaction:a,next:r})}:r},e)}transformPastedHTML(e){const{editor:t}=this;return O1([...this.extensions]).reduce((r,i)=>{const o={name:i.name,options:i.options,storage:this.editor.extensionStorage[i.name],editor:t,type:Vg(i.name,this.schema)},s=Ye(i,"transformPastedHTML",o);return s?(a,l)=>{const c=r(a,l);return s.call(o,c)}:r},e||(r=>r))}get markViews(){const{editor:e}=this,{markExtensions:t}=$0(this.extensions);return Object.fromEntries(t.filter(n=>!!Ye(n,"addMarkView")).map(n=>{const r=this.attributes.filter(a=>a.type===n.name),i={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:e,type:Tc(n.name,this.schema)},o=Ye(n,"addMarkView",i);if(!o)return[];const s=(a,l,c)=>{const d=z0(a,r);return o()({mark:a,view:l,inline:c,editor:e,extension:n,HTMLAttributes:d,updateAttributes:f=>{htt(a,e,f)}})};return[n.name,s]}))}setupExtensions(){const e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(t=>[t.name,t.storage])),e.forEach(t=>{var n;const r={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Vg(t.name,this.schema)};t.type==="mark"&&((n=Wt(Ye(t,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(t.name);const i=Ye(t,"onBeforeCreate",r),o=Ye(t,"onCreate",r),s=Ye(t,"onUpdate",r),a=Ye(t,"onSelectionUpdate",r),l=Ye(t,"onTransaction",r),c=Ye(t,"onFocus",r),d=Ye(t,"onBlur",r),f=Ye(t,"onDestroy",r);i&&this.editor.on("beforeCreate",i),o&&this.editor.on("create",o),s&&this.editor.on("update",s),a&&this.editor.on("selectionUpdate",a),l&&this.editor.on("transaction",l),c&&this.editor.on("focus",c),d&&this.editor.on("blur",d),f&&this.editor.on("destroy",f)})}};iS.resolve=Uhe;iS.sort=O1;iS.flatten=LD;var tpe={};PD(tpe,{ClipboardTextSerializer:()=>rpe,Commands:()=>ipe,Delete:()=>ope,Drop:()=>spe,Editable:()=>ape,FocusEvents:()=>cpe,Keymap:()=>upe,Paste:()=>dpe,Tabindex:()=>fpe,TextDirection:()=>hpe,focusEventsPluginKey:()=>lpe});var jt=class npe extends BD{constructor(){super(...arguments),this.type="extension"}static create(t={}){const n=typeof t=="function"?t():t;return new npe(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}},rpe=jt.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new an({key:new pn("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,{ranges:o}=i,s=Math.min(...o.map(d=>d.$from.pos)),a=Math.max(...o.map(d=>d.$to.pos)),l=$D(n);return qhe(r,{from:s,to:a},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:l})}}})]}}),ipe=jt.create({name:"commands",addCommands(){return{...Phe}}}),ope=jt.create({name:"delete",onUpdate({transaction:e,appendedTransactions:t}){var n,r,i;const o=()=>{var s,a,l,c;if((c=(l=(a=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:a.filterTransaction)==null?void 0:l.call(a,e))!=null?c:e.getMeta("y-sync$"))return;const d=Fhe(e.before,[e,...t]);Khe(d).forEach(m=>{d.mapping.mapResult(m.oldRange.from).deletedAfter&&d.mapping.mapResult(m.oldRange.to).deletedBefore&&d.before.nodesBetween(m.oldRange.from,m.oldRange.to,(y,v)=>{const b=v+y.nodeSize-2,C=m.oldRange.from<=v&&b<=m.oldRange.to;this.editor.emit("delete",{type:"node",node:y,from:v,to:b,newFrom:d.mapping.map(v),newTo:d.mapping.map(b),deletedRange:m.oldRange,newRange:m.newRange,partial:!C,editor:this.editor,transaction:e,combinedTransform:d})})});const p=d.mapping;d.steps.forEach((m,y)=>{var v,b;if(m instanceof Ks){const C=p.slice(y).map(m.from,-1),S=p.slice(y).map(m.to),E=p.invert().map(C,-1),A=p.invert().map(S),_=(v=d.doc.nodeAt(C-1))==null?void 0:v.marks.some(j=>j.eq(m.mark)),N=(b=d.doc.nodeAt(S))==null?void 0:b.marks.some(j=>j.eq(m.mark));this.editor.emit("delete",{type:"mark",mark:m.mark,from:m.from,to:m.to,deletedRange:{from:E,to:A},newRange:{from:C,to:S},partial:!!(N||_),editor:this.editor,transaction:e,combinedTransform:d})}})};(i=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||i?setTimeout(o,0):o()}}),spe=jt.create({name:"drop",addProseMirrorPlugins(){return[new an({key:new pn("tiptapDrop"),props:{handleDrop:(e,t,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),ape=jt.create({name:"editable",addProseMirrorPlugins(){return[new an({key:new pn("editable"),props:{editable:()=>this.editor.options.editable}})]}}),lpe=new pn("focusEvents"),cpe=jt.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new an({key:lpe,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),upe=jt.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:a})=>{const{selection:l,doc:c}=a,{empty:d,$anchor:f}=l,{pos:p,parent:m}=f,y=f.parent.isTextblock&&p>0?a.doc.resolve(p-1):f,v=y.parent.type.spec.isolating,b=f.pos-f.parentOffset,C=v&&y.parent.childCount===1?b===f.pos:et.atStart(c).from===p;return!d||!m.type.isTextblock||m.textContent.length||!C||C&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},i={...r},o={...r,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Ky()||$he()?o:i},addProseMirrorPlugins(){return[new an({key:new pn("clearDocument"),appendTransaction:(e,t,n)=>{if(e.some(v=>v.getMeta("composition")))return;const r=e.some(v=>v.docChanged)&&!t.doc.eq(n.doc),i=e.some(v=>v.getMeta("preventClearDocument"));if(!r||i)return;const{empty:o,from:s,to:a}=t.selection,l=et.atStart(t.doc).from,c=et.atEnd(t.doc).to;if(o||!(s===l&&a===c)||!rS(n.doc))return;const p=n.tr,m=QC({state:n,transaction:p}),{commands:y}=new JC({editor:this.editor,state:m});if(y.clearNodes(),!!p.steps.length)return p}})]}}),dpe=jt.create({name:"paste",addProseMirrorPlugins(){return[new an({key:new pn("tiptapPaste"),props:{handlePaste:(e,t,n)=>{this.editor.emit("paste",{editor:this.editor,event:t,slice:n})}}})]}}),fpe=jt.create({name:"tabindex",addProseMirrorPlugins(){return[new an({key:new pn("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),hpe=jt.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:e}=$0(this.extensions);return[{types:e.filter(t=>t.name!=="text").map(t=>t.name),attributes:{dir:{default:this.options.direction,parseHTML:t=>{const n=t.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:t=>t.dir?{dir:t.dir}:{}}}}]},addProseMirrorPlugins(){return[new an({key:new pn("textDirection"),props:{attributes:()=>{const e=this.options.direction;return e?{dir:e}:{}}}})]}}),ett=class d1{constructor(t,n,r=!1,i=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=t,this.editor=n,this.currentNode=i}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var t;return(t=this.actualDepth)!=null?t:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(t){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You canât set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},t)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new d1(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new d1(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new d1(t,this.editor)}get children(){const t=[];return this.node.content.forEach((n,r)=>{const i=n.isBlock&&!n.isTextblock,o=n.isAtom&&!n.isText,s=n.isInline,a=this.pos+r+(o?0:1);if(a<0||a>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(a);if(!i&&!s&&l.depth<=this.depth)return;const c=new d1(l,this.editor,i,i||s?n:null);i&&(c.actualDepth=this.depth+1),t.push(c)}),t}get firstChild(){return this.children[0]||null}get lastChild(){const t=this.children;return t[t.length-1]||null}closest(t,n={}){let r=null,i=this.parent;for(;i&&!r;){if(i.node.type.name===t)if(Object.keys(n).length>0){const o=i.node.attrs,s=Object.keys(n);for(let a=0;a<s.length;a+=1){const l=s[a];if(o[l]!==n[l])break}}else r=i;i=i.parent}return r}querySelector(t,n={}){return this.querySelectorAll(t,n,!0)[0]||null}querySelectorAll(t,n={},r=!1){let i=[];if(!this.children||this.children.length===0)return i;const o=Object.keys(n);return this.children.forEach(s=>{r&&i.length>0||(s.node.type.name===t&&o.every(l=>n[l]===s.node.attrs[l])&&i.push(s),!(r&&i.length>0)&&(i=i.concat(s.querySelectorAll(t,n,r))))}),i}setAttribute(t){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...t}),this.editor.view.dispatch(n)}},ttt=`.ProseMirror { 206 position: relative; 207} 208 209.ProseMirror { 210 word-wrap: break-word; 211 white-space: pre-wrap; 212 white-space: break-spaces; 213 -webkit-font-variant-ligatures: none; 214 font-variant-ligatures: none; 215 font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */ 216} 217 218.ProseMirror [contenteditable="false"] { 219 white-space: normal; 220} 221 222.ProseMirror [contenteditable="false"] [contenteditable="true"] { 223 white-space: pre-wrap; 224} 225 226.ProseMirror pre { 227 white-space: pre-wrap; 228} 229 230img.ProseMirror-separator { 231 display: inline !important; 232 border: none !important; 233 margin: 0 !important; 234 width: 0 !important; 235 height: 0 !important; 236} 237 238.ProseMirror-gapcursor { 239 display: none; 240 pointer-events: none; 241 position: absolute; 242 margin: 0; 243} 244 245.ProseMirror-gapcursor:after {
246 content: ""; 247 display: block; 248 position: absolute; 249 top: -2px; 250 width: 20px; 251 border-top: 1px solid black; 252 animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite; 253} 254 255@keyframes ProseMirror-cursor-blink { 256 to { 257 visibility: hidden; 258 } 259} 260 261.ProseMirror-hideselection *::selection { 262 background: transparent; 263} 264 265.ProseMirror-hideselection *::-moz-selection { 266 background: transparent; 267} 268 269.ProseMirror-hideselection * { 270 caret-color: transparent; 271} 272 273.ProseMirror-focused .ProseMirror-gapcursor { 274 display: block; 275}`;function ntt(e,t,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const i=document.createElement("style");return t&&i.setAttribute("nonce",t),i.setAttribute("data-tiptap-style",""),i.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(i),i}var rtt=class extends qet{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:r})=>{throw r},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:wet,createMappablePosition:Cet},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:r,slice:i,moved:o})=>this.options.onDrop(r,i,o)),this.on("paste",({event:r,slice:i})=>this.options.onPaste(r,i)),this.on("delete",this.options.onDelete);const t=this.createDoc(),n=Ihe(t,this.options.autofocus);this.editorState=Ip.create({doc:t,schema:this.schema,selection:n||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e!=null&&e.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=ntt(ttt,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}
vendor: 5,957 bytes, lines 275-277
275),t&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t==="state")return this.editorState;if(t in e)return Reflect.get(e,t);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){const n=Hhe(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let n=t;if([].concat(e).forEach(i=>{const o=typeof i=="string"?`${i}$`:i.key;n=n.filter(s=>!s.key.startsWith(o))}),t.length===n.length)return;const r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;const r=[...this.options.enableCoreExtensions?[ape,rpe.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:t.blockSeparator}),ipe,cpe,upe,fpe,spe,dpe,ope,hpe.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new iS(r,this)}createCommandManager(){this.commandManager=new JC({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=dM(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(t){if(!(t instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(t.message))throw t;this.emit("contentError",{editor:this,error:t,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(n=>n.name!=="collaboration"),this.createExtensionManager()}}),e=dM(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){const{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,o=t.transformPastedHTML,s=this.extensionManager.transformPastedHTML(o);this.editorView=new iJe(e,{...t,attributes:{role:"textbox",...t==null?void 0:t.attributes},dispatchTransaction:i,transformPastedHTML:s,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const a=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(a),this.prependClass(),this.injectCSS();const l=this.view.dom;l.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(c=>{var d;return(d=this.capturedTransaction)==null?void 0:d.step(c)});return}const{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),o=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit("selectionUpdate",{editor:this,transaction:e});const s=n.findLast(c=>c.getMeta("focus")||c.getMeta("blur")),a=s==null?void 0:s.getMeta("focus"),l=s==null?void 0:s.getMeta("blur");a&&this.emit("focus",{editor:this,event:a.event,transaction:s}),l&&this.emit("blur",{editor:this,event:l.event,transaction:s}),!(e.getMeta("preventUpdate")||!n.some(c=>c.docChanged)||o.doc.eq(t.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Ghe(this.state,e)}isActive(e,t){const n=typeof e=="string"?e:null,r=typeof e=="string"?t:e;return vet(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return ob(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=` 276 277`,textSerializers:n={}}=e||{};return Whe(this.state.doc,{blockSeparator:t,textSerializers:{...$D(this.schema),...n}})}get isEmpty(){return rS(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,t;return(t=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?t:!0}$node(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return((n=this.$doc)==null?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new ett(t,this)}get $doc(){return this.$pos(0)}};function nh(e){return new sb({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Wt(e.getAttributes,void 0,r);if(i===!1||i===null)return null;const{tr:o}=t,s=r[r.length-1],a=r[0];if(s){const l=a.search(/\S/),c=n.from+a.indexOf(s),d=c+s.length;if(zD(n.from,n.to,t.doc).filter(m=>m.mark.type.excluded.find(v=>v===e.type&&v!==m.mark.type)).filter(m=>m.to>c).length)return null;
277d<n.to&&o.delete(d,n.to),c>n.from&&o.delete(n.from+l,c);const p=n.from+l+s.length;o.addMark(n.from+l,p,e.type.create(i||{})),o.removeStoredMark(e.type)}},undoable:e.undoable})}function ppe(e){return new sb({find:e.find,handler:({state:t,range:n,match:r})=>{const i=Wt(e.getAttributes,void 0,r)||{},{tr:o}=t,s=n.from;let a=n.to;const l=e.type.create(i);if(r[1]){const c=r[0].lastIndexOf(r[1]);let d=s+c;d>a?d=a:a=d+r[1].length;const f=r[0][r[0].length-1];o.insertText(f,s+r[0].length-1),o.replaceWith(d,a,l)}else if(r[0]){const c=e.type.isInline?s:s-1;o.insert(c,e.type.create(i)).delete(o.mapping.map(s),o.mapping.map(a))}o.scrollIntoView()},undoable:e.undoable})}function hM(e){return new sb({find:e.find,handler:({state:t,range:n,match:r})=>{const i=t.doc.resolve(n.from),o=Wt(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,o)},undoable:e.undoable})}function er(e){return new sb({find:e.find,handler:({state:t,range:n,match:r})=>{let i=e.replace,o=n.from;const s=n.to;if(r[1]){const a=r[0].lastIndexOf(r[1]);i+=r[0].slice(a+r[1].length),o+=a;const l=o-s;l>0&&(i=r[0].slice(a-l,a)+i,o=s)}t.tr.insertText(i,o,s)},undoable:e.undoable})}function F0(e){return new sb({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{const o=Wt(e.getAttributes,void 0,r)||{},s=t.tr.delete(n.from,n.to),l=s.doc.resolve(n.from).blockRange(),c=l&&gD(l,e.type,o);if(!c)return null;if(s.wrap(l,c),e.keepMarks&&e.editor){const{selection:f,storedMarks:p}=t,{splittableMarks:m}=e.editor.extensionManager,y=p||f.$to.parentOffset&&f.$from.marks();if(y){const v=y.filter(b=>m.includes(b.type.name));s.ensureMarks(v)}}if(e.keepAttributes){const f=e.type.name==="bulletList"||e.type.name==="orderedList"?"listItem":"taskList";i().updateAttributes(f,o).run()}const d=s.doc.resolve(n.from-1).nodeBefore;d&&d.type===e.type&&Nd(s.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,d))&&s.join(n.from-1)},undoable:e.undoable})}var itt=e=>"touches"in e,ott=class{constructor(e){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.clientX-this.startX,c=a.clientY-this.startY;this.handleResize(l,c)},this.handleTouchMove=a=>{if(!this.isResizing||!this.activeHandle)return;const l=a.touches[0];if(!l)return;const c=l.clientX-this.startX,d=l.clientY-this.startY;this.handleResize(c,d)},this.handleMouseUp=()=>{if(!this.isResizing)return;const a=this.element.offsetWidth,l=this.element.offsetHeight;this.onCommit(a,l),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=a=>{a.key==="Shift"&&(this.isShiftKeyPressed=!1)};var t,n,r,i,o,s;this.node=e.node,this.editor=e.editor,this.element=e.element,this.contentElement=e.contentElement,this.getPos=e.getPos,this.onResize=e.onResize,this.onCommit=e.onCommit,this.onUpdate=e.onUpdate,(t=e.options)!=null&&t.min&&(this.minSize={...this.minSize,...e.options.min}),(n=e.options)!=null&&n.max&&(this.maxSize=e.options.max),(r=e==null?void 0:e.options)!=null&&r.directions&&(this.directions=e.options.directions),(i=e.options)!=null&&i.preserveAspectRatio&&(this.preserveAspectRatio=e.options.preserveAspectRatio),(o=e.options)!=null&&o.className&&(this.classNames={container:e.options.className.container||"",wrapper:e.options.className.wrapper||"",handle:e.options.className.handle||"",resizing:e.options.className.resizing||""}),(s=e.options)!=null&&s.createCustomHandle&&(this.createCustomHandle=e.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var e;return(e=this.contentElement)!=null?e:null}handleEditorUpdate(){const e=this.editor.isEditable;e!==this.lastEditableState&&(this.lastEditableState=e,e?e&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(e,t,n){return e.type!==this.node.type?!1:(this.node=e,this.onUpdate?this.onUpdate(e,t,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const e=document.createElement("div");return e.dataset.resizeContainer="",e.dataset.node=this.node.type.n
277ame,e.style.display="flex",this.classNames.container&&(e.className=this.classNames.container),e.appendChild(this.wrapper),e}createWrapper(){const e=document.createElement("div");return e.style.position="relative",e.style.display="block",e.dataset.resizeWrapper="",this.classNames.wrapper&&(e.className=this.classNames.wrapper),e.appendChild(this.element),e}createHandle(e){const t=document.createElement("div");return t.dataset.resizeHandle=e,t.style.position="absolute",this.classNames.handle&&(t.className=this.classNames.handle),t}positionHandle(e,t){const n=t.includes("top"),r=t.includes("bottom"),i=t.includes("left"),o=t.includes("right");n&&(e.style.top="0"),r&&(e.style.bottom="0"),i&&(e.style.left="0"),o&&(e.style.right="0"),(t==="top"||t==="bottom")&&(e.style.left="0",e.style.right="0"),(t==="left"||t==="right")&&(e.style.top="0",e.style.bottom="0")}attachHandles(){this.directions.forEach(e=>{let t;this.createCustomHandle?t=this.createCustomHandle(e):t=this.createHandle(e),t instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${e}") did not return an HTMLElement. Falling back to default handle.`),t=this.createHandle(e)),this.createCustomHandle||this.positionHandle(t,e),t.addEventListener("mousedown",n=>this.handleResizeStart(n,e)),t.addEventListener("touchstart",n=>this.handleResizeStart(n,e)),this.handleMap.set(e,t),this.wrapper.appendChild(t)})}removeHandles(){this.handleMap.forEach(e=>e.remove()),this.handleMap.clear()}applyInitialSize(){const e=this.node.attrs.width,t=this.node.attrs.height;e?(this.element.style.width=`${e}px`,this.initialWidth=e):this.initialWidth=this.element.offsetWidth,t?(this.element.style.height=`${t}px`,this.initialHeight=t):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(e,t){e.preventDefault(),e.stopPropagation(),this.isResizing=!0,this.activeHandle=t,itt(e)?(this.startX=e.touches[0].clientX,this.startY=e.touches[0].clientY):(this.startX=e.clientX,this.startY=e.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(e,t){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:i}=this.calculateNewDimensions(this.activeHandle,e,t),o=this.applyConstraints(r,i,n);this.element.style.width=`${o.width}px`,this.element.style.height=`${o.height}px`,this.onResize&&this.onResize(o.width,o.height)}calculateNewDimensions(e,t,n){let r=this.startWidth,i=this.startHeight;const o=e.includes("right"),s=e.includes("left"),a=e.includes("bottom"),l=e.includes("top");return o?r=this.startWidth+t:s&&(r=this.startWidth-t),a?i=this.startHeight+n:l&&(i=this.startHeight-n),(e==="right"||e==="left")&&(r=this.startWidth+(o?t:-t)),(e==="top"||e==="bottom")&&(i=this.startHeight+(a?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,i,e):{width:r,height:i}}applyConstraints(e,t,n){var r,i,o,s;if(!n){let c=Math.max(this.minSize.width,e),d=Math.max(this.minSize.height,t);return(r=this.maxSize)!=null&&r.width&&(c=Math.min(this.maxSize.width,c)),(i=this.maxSize)!=null&&i.height&&(d=Math.min(this.maxSize.height,d)),{width:c,height:d}}let a=e,l=t;return a<this.minSize.width&&(a=this.minSize.width,l=a/this.aspectRatio),l<this.minSize.height&&(l=this.minSize.height,a=l*this.aspectRatio),(o=this.maxSize)!=null&&o.width&&a>this.maxSize.width&&(a=this.maxSize.width,l=a/this.aspectRatio),(s=this.maxSize)!=null&&s.height&&l>this.maxSize.height&&(l=this.maxSize.height,a=l*this.aspectRatio),{width:a,height:l}}applyAspectRatio(e,t,n){const r=n==="left"||n==="right",i=n==="top"||n==="bottom";return r?{width:e,height:e/this.aspectRatio}:i?{width:t*this.aspectRatio,height:t}:{width:e,height:e/this.aspectRatio}}};function stt(e,t){const{selection:n}=e,{$from:r}=n;if(n instanceof $e){const o=r.index();return r.parent.canReplaceWith(o,o+1,t)}let i=r.depth;for(;i>=0;){const o=r.index(i);if(r.node(i).contentMatchAt(o).matchType(t))return!0;
vendor: 5,332 bytes, lines 277-283
277i-=1}return!1}function att(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}var ltt={};PD(ltt,{createAtomBlockMarkdownSpec:()=>mpe,createBlockMarkdownSpec:()=>ctt,createInlineMarkdownSpec:()=>ftt,parseAttributes:()=>HD,parseIndentedBlocks:()=>pM,renderNestedMarkdownContent:()=>UD,serializeAttributes:()=>VD});function HD(e){if(!(e!=null&&e.trim()))return{};const t={},n=[],r=e.replace(/["']([^"']*)["']/g,c=>(n.push(c),`__QUOTED_${n.length-1}__`)),i=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(i){const c=i.map(d=>d.trim().slice(1));t.class=c.join(" ")}const o=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);o&&(t.id=o[1]);const s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,c,d])=>{var f;const p=parseInt(((f=d.match(/__QUOTED_(\d+)__/))==null?void 0:f[1])||"0",10),m=n[p];m&&(t[c]=m.slice(1,-1))});const l=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return l&&l.split(/\s+/).filter(Boolean).forEach(d=>{d.match(/^[a-zA-Z][\w-]*$/)&&(t[d]=!0)}),t}function VD(e){if(!e||Object.keys(e).length===0)return"";const t=[];return e.class&&String(e.class).split(/\s+/).filter(Boolean).forEach(r=>t.push(`.${r}`)),e.id&&t.push(`#${e.id}`),Object.entries(e).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?t.push(n):r!==!1&&r!=null&&t.push(`${n}="${String(r)}"`))}),t.join(" ")}function mpe(e){const{nodeName:t,name:n,parseAttributes:r=HD,serializeAttributes:i=VD,defaultAttributes:o={},requiredAttributes:s=[],allowedAttributes:a}=e,l=n||t,c=d=>{if(!a)return d;const f={};return a.forEach(p=>{p in d&&(f[p]=d[p])}),f};return{parseMarkdown:(d,f)=>{const p={...o,...d.attributes};return f.createNode(t,p,[])},markdownTokenizer:{name:t,level:"block",start(d){var f;const p=new RegExp(`^:::${l}(?:\\s|$)`,"m"),m=(f=d.match(p))==null?void 0:f.index;return m!==void 0?m:-1},tokenize(d,f,p){const m=new RegExp(`^:::${l}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),y=d.match(m);if(!y)return;const v=y[1]||"",b=r(v);if(!s.find(S=>!(S in b)))return{type:t,raw:y[0],attributes:b}}},renderMarkdown:d=>{const f=c(d.attrs||{}),p=i(f),m=p?` {${p}}`:"";return`:::${l}${m} :::`}}}function ctt(e){const{nodeName:t,name:n,getContent:r,parseAttributes:i=HD,serializeAttributes:o=VD,defaultAttributes:s={},content:a="block",allowedAttributes:l}=e,c=n||t,d=f=>{if(!l)return f;const p={};return l.forEach(m=>{m in f&&(p[m]=f[m])}),p};return{parseMarkdown:(f,p)=>{let m;if(r){const v=r(f);m=typeof v=="string"?[{type:"text",text:v}]:v}else a==="block"?m=p.parseChildren(f.tokens||[]):m=p.parseInline(f.tokens||[]);const y={...s,...f.attributes};return p.createNode(t,y,m)},markdownTokenizer:{name:t,level:"block",start(f){var p;const m=new RegExp(`^:::${c}`,"m"),y=(p=f.match(m))==null?void 0:p.index;return y!==void 0?y:-1},tokenize(f,p,m){var y;const v=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),b=f.match(v);if(!b)return;const[C,S=""]=b,E=i(S);let A=1;const _=C.length;let N="";const j=/^:::([\w-]*)(\s.*)?/gm,T=f.slice(_);for(j.lastIndex=0;;){const O=j.exec(T);if(O===null)break;const D=O.index,R=O[1];if(!((y=O[2])!=null&&y.endsWith(":::"))){if(R)A+=1;else if(A-=1,A===0){const I=T.slice(0,D);N=I.trim();const F=f.slice(0,_+D+O[0].length);let $=[];if(N)if(a==="block")for($=m.blockTokens(I),$.forEach(H=>{H.text&&(!H.tokens||H.tokens.length===0)&&(H.tokens=m.inlineTokens(H.text))});$.length>0;){const H=$[$.length-1];if(H.type==="paragraph"&&(!H.text||H.text.trim()===""))$.pop();else break}else $=m.inlineTokens(N);return{type:t,raw:F,attributes:E,content:N,tokens:$}}}}}},renderMarkdown:(f,p)=>{const m=d(f.attrs||{}),y=o(m),v=y?` {${y}}`:"",b=p.renderChildren(f.content||[],` 278 279`);return`:::${c}${v} 280 281${b} 282 283:::`}}}function utt(e){if(!e.trim())return{};const t={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(e);for(;r!==null;){const[,i,o,s]=r;t[i]=o||s,r=n.exec(e)}return t}function dtt(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}="${n}"`).join(" ")}function ftt(e){const{nodeName:t,name:n,getContent:r,parseAttributes:i=utt,serializeAttributes:o=dtt,defaultAttributes:s={},selfClosing:a=!1,allowedAttributes:l}=e,c=n||t,d=p=>{if(!l)return p;const m={};return l.forEach(y=>{const v=typeof y=="string"?y:y.name,b=typeof y=="string"?void 0:y.skipIfDefault;if(v in p){const C=p[v];if(b!==void 0&&C===b)return;m[v]=C}}),m},f=c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(p,m)=>{const y={...s,...p.attributes};if(a)return m.createNode(t,y);const v=r?r(p):p.content||"";return v?m.createNode(t,y,[m.createTextNode(v)]):m.createNode(t,y,[])},markdownTokenizer:{name:t,level:"inline",start(p){const m=a?new RegExp(`\\[${f}\\s*[^\\]]*\\]`):new RegExp(`\\[${f}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${f}\\]`),y=p.match(m),v=y==null?void 0:y.index;return v!==void 0?v:-1},tokenize(p,m,y){const v=a?new RegExp(`^\\[${f}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${f}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${f}\\]`),b=p.match(v);if(!b)return;let C="",S="";if(a){const[,A]=b;S=A}else{const[,A,_]=b;S=A,C=_||""}const E=i(S.trim());return{type:t,raw:b[0],content:C.trim(),attributes:E}}},renderMarkdown:p=>{let m="";r?m=r(p):p.content&&p.content.length>0&&(m=p.content.filter(C=>C.type==="text").map(C=>C.text).join(""));const y=d(p.attrs||{}),v=o(y),b=v?` ${v}`:"";return a?`[${c}${b}]`:`[${c}${b}]${m}[/${c}]`}}}
283function pM(e,t,n){var r,i,o,s;const a=e.split(` 284`),l=[];let c="",d=0;const f=t.baseIndentSize||2;for(;d<a.length;){const p=a[d],m=p.match(t.itemPattern);if(!m){if(l.length>0)break;if(p.trim()===""){d+=1,c=`${c}${p} 285`;continue}else return}const y=t.extractItemData(m),{indentLevel:v,mainContent:b}=y;c=`${c}${p} 286`;const C=[b];for(d+=1;d<a.length;){const _=a[d];if(_.trim()===""){const j=a.slice(d+1).findIndex(D=>D.trim()!=="");if(j===-1)break;if((((i=(r=a[d+1+j].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:i.length)||0)>v){C.push(_),c=`${c}${_} 287`,d+=1;continue}else break}if((((s=(o=_.match(/^(\s*)/))==null?void 0:o[1])==null?void 0:s.length)||0)>v)C.push(_),c=`${c}${_} 288`,d+=1;else break}let S;const E=C.slice(1);if(E.length>0){const _=E.map(N=>N.slice(v+f)).join(` 289`);_.trim()&&(t.customNestedParser?S=t.customNestedParser(_):S=n.blockTokens(_))}const A=t.createToken(y,S);l.push(A)}if(l.length!==0)return{items:l,raw:c}}function UD(e,t,n,r){if(!e||!Array.isArray(e.content))return"";const i=typeof n=="function"?n(r):n,[o,...s]=e.content,a=t.renderChildren([o]);let l=`${i}${a}`;return s&&s.length>0&&s.forEach((c,d)=>{var f,p;const m=(p=(f=t.renderChild)==null?void 0:f.call(t,c,d+1))!=null?p:t.renderChildren([c]);if(m!=null){const y=m.split(` 290`).map(v=>v?t.indent(v):t.indent("")).join(` 291`);l+=c.type==="paragraph"?` 292 293${y}`:` 294${y}`}}),l}function htt(e,t,n={}){const{state:r}=t,{doc:i,tr:o}=r,s=e;i.descendants((a,l)=>{const c=o.mapping.map(l),d=o.mapping.map(l)+a.nodeSize;let f=null;if(a.marks.forEach(m=>{if(m!==s)return!1;f=m}),!f)return;let p=!1;if(Object.keys(n).forEach(m=>{n[m]!==f.attrs[m]&&(p=!0)}),p){const m=e.type.create({...e.attrs,...n});o.removeMark(c,d,e.type),o.addMark(c,d,m)}}),o.docChanged&&t.view.dispatch(o)}var Ot=class gpe extends BD{constructor(){super(...arguments),this.type="node"}static create(t={}){const n=typeof t=="function"?t():t;return new gpe(n)}configure(t){return super.configure(t)}extend(t){const n=typeof t=="function"?t():t;return super.extend(n)}},ptt=class{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.innerDecorations=t.innerDecorations,this.view=t.view,this.HTMLAttributes=t.HTMLAttributes,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,i,o,s,a;const{view:l}=this.editor,c=e.target,d=c.nodeType===3?(t=c.parentElement)==null?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(n=this.contentDOM)!=null&&n.contains(c)||!d)return;let f=0,p=0;if(this.dom!==d){const S=this.dom.getBoundingClientRect(),E=d.getBoundingClientRect(),A=(i=e.offsetX)!=null?i:(r=e.nativeEvent)==null?void 0:r.offsetX,_=(s=e.offsetY)!=null?s:(o=e.nativeEvent)==null?void 0:o.offsetY;f=E.x-S.x+A,p=E.y-S.y+_}const m=this.dom.cloneNode(!0);try{const S=this.dom.getBoundingClientRect();m.style.width=`${Math.round(S.width)}px`,m.style.height=`${Math.round(S.height)}px`,m.style.boxSizing="border-box",m.style.pointerEvents="none"}catch{}let y=null;try{y=document.createElement("div"),y.style.position="absolute",y.style.top="-9999px",y.style.left="-9999px",y.style.pointerEvents="none",y.appendChild(m),document.body.appendChild(y),(a=e.dataTransfer)==null||a.setDragImage(m,f,p)}finally{y&&setTimeout(()=>{try{y==null||y.remove()}catch{}},0)}const v=this.getPos();if(typeof v!="number")return;const b=$e.create(l.state.doc,v),C=l.state.tr.setSelection(b);l.dispatch(C)}stopEvent(e){var t;if(!this.dom)return!1;if(typeof this.options.stopEvent=="function")return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!((t=this.contentDOM)!=null&&t.contains(n))))return!1;const i=e.type.startsWith("drag"),o=e.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!i)return!0;const{isEditable:a}=this.editor,{isDragging:l}=this,c=!!this.node.type.spec.draggable,d=$e.isSelectable(this.node),f=e.type==="copy",p=e.type==="paste",m=e.type==="cut",y=e.type==="mousedown";if(!c&&d&&i&&e.target===this.dom&&e.preventDefault(),c&&i&&!l&&e.target===this.dom)return e.preventDefault(),!1;if(c&&a&&!l&&y){const v=n.closest("[data-drag-handle]");v&&(this.dom===v||this.dom.contains(v))&&(this.isDragging=!0,document.addEventListener("dragend",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("drop",()=>{this.isDragging=!1},{once:!0}),document.addEventListener("mouseup",()=>{this.isDragging=!1},{once:!0}))}return!(l||o||f||p||m||y&&d)}ignoreMutation(e){return!this.dom||!this.contentDOM?!0:typeof this.options.ignoreMutation=="function"?this.options.ignoreMutation({mutation:e}):this.node.isLeaf||this.node.isAtom?!0:e.type==="selection"||this.dom.contains(e.target)&&e.type==="childList"&&(Ky()||uM())&&this.editor.isFocused&&[...Array.from(e.addedNodes),...Array.from(e.removedNodes
294)].every(n=>n.isContentEditable)?!1:this.contentDOM===e.target&&e.type==="attributes"?!0:!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command(({tr:t})=>{const n=this.getPos();return typeof n!="number"?!1:(t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0)})}deleteNode(){const e=this.getPos();if(typeof e!="number")return;const t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}};function cd(e){return new epe({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{const o=Wt(e.getAttributes,void 0,r,i);if(o===!1||o===null)return null;const{tr:s}=t,a=r[r.length-1],l=r[0];let c=n.to;if(a){const d=l.search(/\S/),f=n.from+l.indexOf(a),p=f+a.length;if(zD(n.from,n.to,t.doc).filter(y=>y.mark.type.excluded.find(b=>b===e.type&&b!==y.mark.type)).filter(y=>y.to>f).length)return null;p<n.to&&s.delete(p,n.to),f>n.from&&s.delete(n.from+d,f),c=n.from+d+a.length,s.addMark(n.from+d,c,e.type.create(o||{})),s.removeStoredMark(e.type)}}})}function mtt(e){return new epe({find:e.find,handler({match:t,chain:n,range:r,pasteEvent:i}){const o=Wt(e.getAttributes,void 0,t,i),s=Wt(e.getContent,void 0,o);if(o===!1||o===null)return null;const a={type:e.type.name,attrs:o};s&&(a.content=s),t.input&&n().deleteRange(r).insertContentAt(r.from,a)}})}var pA={exports:{}},mA={};/** 295 * @license React 296 * use-sync-external-store-shim/with-selector.production.js 297 * 298 * Copyright (c) Meta Platforms, Inc. and affiliates. 299 * 300 * This source code is licensed under the MIT license found in the 301 * LICENSE file in the root directory of this source tree. 302 */var DZ;function gtt(){if(DZ)return mA;DZ=1;var e=pd(),t=lfe();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return mA.useSyncExternalStoreWithSelector=function(c,d,f,p,m){var y=o(null);if(y.current===null){var v={hasValue:!1,value:null};y.current=v}else v=y.current;y=a(function(){function C(N){if(!S){if(S=!0,E=N,N=p(N),m!==void 0&&v.hasValue){var j=v.value;if(m(j,N))return A=j}return A=N}
302if(j=A,r(E,N))return j;var T=p(N);return m!==void 0&&m(j,T)?(E=N,j):(E=N,A=T)}var S=!1,E,A,_=f===void 0?null:f;return[function(){return C(d())},_===null?void 0:function(){return C(_())}]},[d,f,p,m]);var b=i(c,y[0],y[1]);return s(function(){v.hasValue=!0,v.value=b},[b]),l(b),b},mA}var IZ;function ytt(){return IZ||(IZ=1,pA.exports=gtt()),pA.exports}var vtt=ytt(),btt=(...e)=>t=>{e.forEach(n=>{typeof n=="function"?n(t):n&&(n.current=t)})},xtt=({contentComponent:e})=>{const t=cfe.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getServerSnapshot);return u.jsx(u.Fragment,{children:Object.values(t)})};function wtt(){const e=new Set;let t={};return{subscribe(n){return e.add(n),()=>{e.delete(n)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(n,r){t={...t,[n]:Fs.createPortal(r.reactElement,r.element,n)},e.forEach(i=>i())},removeRenderer(n){const r={...t};delete r[n],t=r,e.forEach(i=>i())}}}var Ctt=class extends K.Component{constructor(e){var t;super(e),this.editorContentRef=K.createRef(),this.initialized=!1,this.state={hasContentComponentInitialized:!!((t=e.editor)!=null&&t.contentComponent)}}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;const t=this.props.editor;if(t&&!t.isDestroyed&&((e=t.view.dom)!=null&&e.parentNode)){if(t.contentComponent)return;const n=this.editorContentRef.current;n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n}),t.contentComponent=wtt(),this.state.hasContentComponentInitialized||(this.unsubscribeToContentComponent=t.contentComponent.subscribe(()=>{this.setState(r=>r.hasContentComponentInitialized?r:{hasContentComponentInitialized:!0}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent()})),t.createNodeViews(),this.initialized=!0}}componentWillUnmount(){var e;const t=this.props.editor;if(t){this.initialized=!1,t.isDestroyed||t.view.setProps({nodeViews:{}}),this.unsubscribeToContentComponent&&this.unsubscribeToContentComponent(),t.contentComponent=null;try{if(!((e=t.view.dom)!=null&&e.parentNode))return;const n=document.createElement("div");n.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:n})}catch{}}}render(){const{editor:e,innerRef:t,...n}=this.props;return u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:btt(t,this.editorContentRef),...n}),(e==null?void 0:e.contentComponent)&&u.jsx(xtt,{contentComponent:e.contentComponent})]})}},Stt=x.forwardRef((e,t)=>{const n=K.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return K.createElement(Ctt,{key:n,innerRef:t,...e})}),ype=K.memo(Stt),Ett=typeof window<"u"?x.useLayoutEffect:x.useEffect,ktt=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber?this.lastSnapshot:(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber},this.lastSnapshot)}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){const t=()=>{this.transactionNumber+=1,this.subscribers.forEach(r=>r())},n=this.editor;return n.on("transaction",t),()=>{n.off("transaction",t)}}}};function vpe(e){var t;const[n]=x.useState(()=>new ktt(e.editor)),r=vtt.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,(t=e.equalityFn)!=null?t:jue);return Ett(()=>n.watch(e.editor),[e.editor,n]),x.useDebugValue(r),r}var _tt=!1,mM=typeof window>"u",Att=mM||!!(typeof window<"u"&&window.next),Ntt=class bpe{constructor(t){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=t,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.get
302ServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(t){this.editor=t,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(n=>n())}getInitialEditor(){return this.options.current.immediatelyRender===void 0?mM||Att?null:this.createEditor():(this.options.current.immediatelyRender,this.options.current.immediatelyRender?this.createEditor():null)}createEditor(){const t={...this.options.current,onBeforeCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onBeforeCreate)==null?void 0:o.call(i,...r)},onBlur:(...r)=>{var i,o;return(o=(i=this.options.current).onBlur)==null?void 0:o.call(i,...r)},onCreate:(...r)=>{var i,o;return(o=(i=this.options.current).onCreate)==null?void 0:o.call(i,...r)},onDestroy:(...r)=>{var i,o;return(o=(i=this.options.current).onDestroy)==null?void 0:o.call(i,...r)},onFocus:(...r)=>{var i,o;return(o=(i=this.options.current).onFocus)==null?void 0:o.call(i,...r)},onSelectionUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onSelectionUpdate)==null?void 0:o.call(i,...r)},onTransaction:(...r)=>{var i,o;return(o=(i=this.options.current).onTransaction)==null?void 0:o.call(i,...r)},onUpdate:(...r)=>{var i,o;return(o=(i=this.options.current).onUpdate)==null?void 0:o.call(i,...r)},onContentError:(...r)=>{var i,o;return(o=(i=this.options.current).onContentError)==null?void 0:o.call(i,...r)},onDrop:(...r)=>{var i,o;return(o=(i=this.options.current).onDrop)==null?void 0:o.call(i,...r)},onPaste:(...r)=>{var i,o;return(o=(i=this.options.current).onPaste)==null?void 0:o.call(i,...r)},onDelete:(...r)=>{var i,o;return(o=(i=this.options.current).onDelete)==null?void 0:o.call(i,...r)}};return new rtt(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(t){return this.subscriptions.add(t),()=>{this.subscriptions.delete(t)}}static compareOptions(t,n){return Object.keys(t).every(r=>["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(r)?!0:r==="extensions"&&t.extensions&&n.extensions?t.extensions.length!==n.extensions.length?!1:t.extensions.every((i,o)=>{var s;return i===((s=n.extensions)==null?void 0:s[o])}):t[r]===n[r])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?bpe.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(t){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=t;return}if(this.previousDeps.length===t.length&&this.previousDeps.every((r,i)=>r===t[i]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=t}scheduleDestroy(){const t=this.instanceId,n=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===t){n&&n.setOptions(this.options.current);return}n&&!n.isDestroyed&&(n.destroy(),this.instanceId===t&&this.setEditor(null))},1)}};function jtt(e={},t=[]){const n=x.useRef(e);n.current=e;const[r]=x.useState(()=>new Ntt(n)),i=cfe.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return x.useDebugValue(i),x.useEffect(r.onRender(t)),vpe({editor:i,selector:({transactionNumber:o})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&o===0?0:o+1}),i}var ab=x.createContext({editor:null});ab.Consumer;var wh=()=>x.useContext(ab),xpe=x.createContext({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Ttt=()=>x.useContext(xpe),oS=K.forwardRef((e,t)=>{const{onDragStart:n}=Ttt(),r=e.as||"div";return u.jsx(r,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function LZ(e){return!!(typeof e=="function"&&e.prototype&&e.prototype.isReactComponent)}function $Z(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.forward_ref)"||e.$$typeof.description==="react.forward_ref"))}function Mtt(e){return!!(typeof e=="object"&&e.$$typeof&&(e.$$typeof.toString()==="Symbol(react.memo)"||e.$$typeof.description==="react.memo"))}function Ott(e){if(LZ(e)||$Z(e))return!0;
302if(Mtt(e)){const t=e.type;if(t)return LZ(t)||$Z(t)}return!1}function Rtt(){try{if(x.version)return parseInt(x.version.split(".")[0],10)>=19}catch{}return!1}var Ptt=class{constructor(e,{editor:t,props:n={},as:r="div",className:i=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(Math.random()*4294967295).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),i&&this.element.classList.add(...i.split(" ")),this.editor.isInitialized?Si.flushSync(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}render(){var e;if(this.destroyed)return;const t=this.component,n=this.props,r=this.editor,i=Rtt(),o=Ott(t),s={...n};s.ref&&!(i||o)&&delete s.ref,!s.ref&&(i||o)&&(s.ref=a=>{this.ref=a}),this.reactElement=u.jsx(t,{...s}),(e=r==null?void 0:r.contentComponent)==null||e.setRenderer(this.id,this)}updateProps(e={}){this.destroyed||(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;const t=this.editor;(e=t==null?void 0:t.contentComponent)==null||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch{}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}};K.createContext({markViewContentRef:()=>{}});var Dtt=class extends ptt{constructor(e,t,n){if(super(e,t,n),this.selectionRafId=null,this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";const r=this.dom.querySelector("[data-node-view-content]");if(!r)return;r.appendChild(this.contentDOMElement)}}get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){const e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){var o;return r==="storage"?(o=e.storage[t.name])!=null?o:{}:Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(l={})=>this.updateAttributes(l),deleteNode:()=>this.deleteNode(),ref:x.createRef()};if(!this.component.displayName){const l=c=>c.charAt(0).toUpperCase()+c.substring(1);this.component.displayName=l(this.extension.name)}const r={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:l=>{l&&this.contentDOMElement&&l.firstChild!==this.contentDOMElement&&(l.hasAttribute("data-node-view-wrapper")&&l.removeAttribute("data-node-view-wrapper"),l.appendChild(this.contentDOMElement))}},i=this.component,o=x.memo(l=>u.jsx(xpe.Provider,{value:r,children:x.createElement(i,l)}));o.displayName="ReactNodeView";let s=this.node.isInline?"span":"div";this.options.as&&(s=this.options.as);const{className:a=""}=this.options;this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.renderer=new Ptt(o,{editor:this.editor,props:e,as:s,className:`node-${this.node.type.name} ${a}`.trim()}),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.updateElementAttributes()}get dom(){var e;if(this.renderer.element.firstElementChild&&!((e=this.renderer.element.firstElementChild)!=null&&e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}handleSelectionUpdate(){this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null),this.selectionRafId=requestAnimationFrame(()=>{this.selectionRafId=null;const{from:e,to:t}=this.editor.state.selection,n=this.getPos();if(typeof n=="number")if(e<=n&&t>=n+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}})}update(e,t,n){const r=i=>{this.renderer.updateProps(i),typeof this.options.attrs=="function"&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if(typeof this.options.update=="function"){const i=this.node,o=this.decorations,s=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.options.update({oldNode:i,oldDecorations:o,newNode:e,newDecorations:t,oldInnerDecorations:s,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}return e===this.node&&this.decorations===t&&this.innerDecorations===n||(this.node=e,this.decorations=t,this.innerDecorations=n,r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})),!0}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate),this.contentDOMElement=null,this.selectionRafId&&(cancelAnimationFrame(this.selectionRafId),this.selectionRafId=null)}updateElementAttributes(){if(this.options.attrs){let e={};if(typeof this.options.attrs=="function"){const t=this.editor.extensionManager.attributes,n=z0(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n}
302)}else e=this.options.attrs;this.renderer.updateAttributes(e)}}};function sS(e,t){return n=>n.editor.contentComponent?new Dtt(e,n,t):{}}var qD=x.createContext({get editor(){throw new Error("useTiptap must be used within a <Tiptap> provider")}});qD.displayName="TiptapContext";var Itt=()=>x.useContext(qD);function wpe({editor:e,instance:t,children:n}){const r=e??t;if(!r)throw new Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");const i=x.useMemo(()=>({editor:r}),[r]),o=x.useMemo(()=>({editor:r}),[r]);return u.jsx(ab.Provider,{value:o,children:u.jsx(qD.Provider,{value:i,children:n})})}wpe.displayName="Tiptap";function Cpe({...e}){const{editor:t}=Itt();return u.jsx(ype,{editor:t,...e})}Cpe.displayName="Tiptap.Content";Object.assign(wpe,{Content:Cpe});var v4=(e,t)=>{if(e==="slot")return 0;if(e instanceof Function)return e(t);const{children:n,...r}=t??{};if(e==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[e,r,n]},Ltt=/^\s*>\s$/,$tt=Ot.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:e}){return v4("blockquote",{...Bt(this.options.HTMLAttributes,e),children:v4("slot",{})})},parseMarkdown:(e,t)=>{var n;const r=(n=t.parseBlockChildren)!=null?n:t.parseChildren;return t.createNode("blockquote",void 0,r(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return"";const n=">",r=[];return e.content.forEach((i,o)=>{var s,a;const d=((a=(s=t.renderChild)==null?void 0:s.call(t,i,o))!=null?a:t.renderChildren([i])).split(` 303`).map(f=>f.trim()===""?n:`${n} ${f}`);r.push(d.join(` 304`))}),r.join(` 305${n} 306`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[F0({find:Ltt,type:this.type})]}}),ztt=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Ftt=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Btt=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Htt=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Vtt=ai.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name===this.name},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return v4("strong",{...Bt(this.options.HTMLAttributes,e),children:v4("slot",{})})},markdownTokenName:"strong",parseMarkdown:(e,t)=>t.applyMark("bold",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<strong>",close:"</strong>"}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[nh({find:ztt,type:this.type}),nh({find:Btt,type:this.type})]},addPasteRules(){return[cd({find:Ftt,type:this.type}),cd({find:Htt,type:this.type})]}}),Utt=/(^|[^`])`([^`]+)`(?!`)$/,qtt=/(^|[^`])`([^`]+)`(?!`)/g,Wtt=ai.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:e}){return["code",Bt(this.options.HTMLAttributes,e),0]},markdownTokenName:"codespan",parseMarkdown:(e,t)=>t.applyMark("code",[{type:"text",text:e.text||""}]),renderMarkdown:(e,t)=>e.content?`\`${t.renderChildren(e.content)}\``:"",addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}}
vendor: 6,986 bytes, lines 306-327
306,addInputRules(){return[nh({find:Utt,type:this.type})]},addPasteRules(){return[cd({find:qtt,type:this.type})]}}),gA=4,Gtt=/^```([a-z]+)?[\s\n]$/,Ktt=/^~~~([a-z]+)?[\s\n]$/,Ytt=Ot.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:gA,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options;if(!n)return null;const o=[...((t=e.firstElementChild)==null?void 0:t.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return o||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:e,HTMLAttributes:t}){return["pre",Bt(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(e,t)=>{var n,r;return((n=e.raw)==null?void 0:n.startsWith("```"))===!1&&((r=e.raw)==null?void 0:r.startsWith("~~~"))===!1&&e.codeBlockStyle!=="indented"?[]:t.createNode("codeBlock",{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[])},renderMarkdown:(e,t)=>{var n;let r="";const i=((n=e.attrs)==null?void 0:n.language)||"";return e.content?r=[`\`\`\`${i}`,t.renderChildren(e.content),"```"].join(` 307`):r=`\`\`\`${i} 308 309\`\`\``,r},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;const n=(t=this.options.tabSize)!=null?t:gA,{state:r}=e,{selection:i}=r,{$from:o,empty:s}=i;if(o.parent.type!==this.type)return!1;const a=" ".repeat(n);return s?e.commands.insertContent(a):e.commands.command(({tr:l})=>{const{from:c,to:d}=i,m=r.doc.textBetween(c,d,` 310`,` 311`).split(` 312`).map(y=>a+y).join(` 313`);return l.replaceWith(c,d,r.schema.text(m)),!0})},"Shift-Tab":({editor:e})=>{var t;if(!this.options.enableTabIndentation)return!1;const n=(t=this.options.tabSize)!=null?t:gA,{state:r}=e,{selection:i}=r,{$from:o,empty:s}=i;return o.parent.type!==this.type?!1:s?e.commands.command(({tr:a})=>{var l;const{pos:c}=o,d=o.start(),f=o.end(),m=r.doc.textBetween(d,f,` 314`,` 315`).split(` 316`);let y=0,v=0;const b=c-d;for(let N=0;N<m.length;N+=1){if(v+m[N].length>=b){y=N;break}v+=m[N].length+1}const S=((l=m[y].match(/^ */))==null?void 0:l[0])||"",E=Math.min(S.length,n);if(E===0)return!0;let A=d;for(let N=0;N<y;N+=1)A+=m[N].length+1;return a.delete(A,A+E),c-A<=E&&a.setSelection(Ue.create(a.doc,A)),!0}):e.commands.command(({tr:a})=>{const{from:l,to:c}=i,p=r.doc.textBetween(l,c,` 317`,` 318`).split(` 319`).map(m=>{var y;const v=((y=m.match(/^ */))==null?void 0:y[0])||"",b=Math.min(v.length,n);return m.slice(b)}).join(` 320`);return a.replaceWith(l,c,r.schema.text(p)),!0})},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;const o=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(` 321 322`);return!o||!s?!1:e.chain().command(({tr:a})=>(a.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:o}=n;if(!o||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const a=i.after();return a===void 0?!1:r.nodeAt(a)?e.commands.command(({tr:c})=>(c.setSelection(et.near(r.resolve(a))),!0)):e.commands.exitCode()}}},addInputRules(){return[hM({find:Gtt,type:this.type,getAttributes:e=>({language:e[1]})}),hM({find:Ktt,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new an({key:new pn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,o=i==null?void 0:i.mode;if(!n||!o)return!1;const{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,` 323`));return s.replaceSelectionWith(this.type.create({language:o},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(Ue.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}}),Xtt=Ot.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 324 325`):""}),Ztt=Ot.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:e}){return["br",Bt(this.options.HTMLAttributes,e)]},renderText(){return` 326`},renderMarkdown:()=>` 327`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{const{selection:i,storedMarks:o}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:a}=r.extensionManager,l=o||i.$to.parentOffset&&i.$from.marks();return t().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&l&&s){const f=l.filter(p=>a.includes(p.type.name));c.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Qtt=Ot.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Bt(this.options.HTMLAttributes,t),0]},parseMarkdown:(e,t)=>t.createNode("heading",{level:e.depth||1},t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>{var n;const r=(n=e.attrs)!=null&&n.level?parseInt(e.attrs.level,10):1,i="#".repeat(r);return e.content?`${i} ${t.renderChildren(e.content)}`:""},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,"paragraph",e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>hM({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}}
327)\\s$`),type:this.type,getAttributes:{level:e}}))}}),Spe=Ot.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:e}){return["hr",Bt(this.options.HTMLAttributes,e)]},markdownTokenName:"hr",parseMarkdown:(e,t)=>t.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!stt(t,t.schema.nodes[this.name]))return!1;const{selection:n}=t,{$to:r}=n,i=e();return FD(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:o,tr:s,dispatch:a})=>{if(a){const{$to:l}=s.selection,c=l.end();if(l.nodeAfter)l.nodeAfter.isTextblock?s.setSelection(Ue.create(s.doc,l.pos+1)):l.nodeAfter.isBlock?s.setSelection($e.create(s.doc,l.pos)):s.setSelection(Ue.create(s.doc,l.pos));else{const d=o.schema.nodes[this.options.nextNodeType]||l.parent.type.contentMatch.defaultType,f=d==null?void 0:d.create();f&&(s.insert(c,f),s.setSelection(Ue.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[ppe({find:/^(?:---|â-|___\s|\*\*\*\s)$/,type:this.t
vendor: 4,528 bytes, line 327
327ype})]}}),Jtt=Spe,ent=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,tnt=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,nnt=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,rnt=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,int=ai.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:e=>e.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:e=>e.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:e}){return["em",Bt(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(e,t)=>t.applyMark("italic",t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:"<em>",close:"</em>"}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[nh({find:ent,type:this.type}),nh({find:nnt,type:this.type})]},addPasteRules(){return[cd({find:tnt,type:this.type}),cd({find:rnt,type:this.type})]}});const ont="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2
327ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",snt="ελ1Ï
2бг1ел3деÑи4еÑ2каÑолик6ом3мÐ
327ºÐ´2он1Ñква6онлайн5Ñг3ÑÑÑ2Ñ2ÑайÑ3Ñб3ÑкÑ3Òаз3Õ°Õ¡Õµ3×שר××5×§××3Ø§Ø¨ÙØ¸Ø¨Ù5را٠ÙÙ5ÙØ§Ø±Ø¯Ù4Ø¨ØØ±ÙÙ5جزائر5Ø³Ø¹ÙØ¯ÙØ©6عÙÙØ§Ù5٠غرب5٠ارات5ÛØ±Ø§Ù5بارت2زار4ÙØªÙ3ھارت5تÙÙØ³4Ø³ÙØ¯Ø§Ù3Ø±ÙØ©5Ø´Ø¨ÙØ©4عراÙ2ب2٠اÙ4ÙÙØ³Ø·ÙÙ6ÙØ·Ø±3ÙØ§Ø«ÙÙÙÙ6ÙÙ 3٠صر2ÙÙØ³Ùا5ÙØ±ÙتاÙÙØ§7ÙØ¹4Ù٠راÙ5پاکستاÙ7ÚØ§Ø±Øª4à¤à¥à¤®3नà¥à¤3à¤à¤¾à¤°à¤¤0मà¥3à¥à¤¤5सà¤à¤à¤ न5বাà¦à¦²à¦¾5à¦à¦¾à¦°à¦¤2ৰত4à¨à¨¾à¨°à¨¤4àªàª¾àª°àª¤4à¬à¬¾à¬°à¬¤4à®à®¨à¯à®¤à®¿à®¯à®¾6லà®à¯à®à¯6à®à®¿à®à¯à®à®ªà¯à®ªà¯à®°à¯11à°à°¾à°°à°¤à±5à²à²¾à²°à²¤4à´à´¾à´°à´¤à´5à¶½à¶à¶à·4à¸à¸à¸¡3à¹à¸à¸¢3ລາວ3áá2ã¿ããª3ã¢ãã¾ã³4ã¯ã©ã¦ã4ã°ã¼ã°ã«4ã³ã 2ã¹ãã¢3ã»ã¼ã«3ãã¡ãã·ã§ã³6ãã¤ã³ã4ä¸ç2ä¸ä¿¡1å½1å1æç½3äºé©¬é3ä¼ä¸2ä½å±±2ä¿¡æ¯2å¥åº·2å «å¦2å ¬å¸1ç2å°æ¹¾1ç£2åå1åº1æ 2åé0大é åº5å¨çº¿2大æ¿2天主æ3娱ä¹2å®¶é»2广ä¸2å¾®å2æ å2æç±ä½ 3ææº2æè2æ¿å¡1åº2æ°å å¡2é»2æ¶å°2æ¸ç±2æºæ2淡马é¡3游æ2æ¾³é2ç¹ç2ç§»å¨2ç»ç»æºæ4ç½å1åº1ç«1ç»2èé2è°·æ2è´ç©2é販2éå¢2é»è¨çç§4é£å©æµ¦3é£å2é¤å 2馿 ¼éæ3港2ë·ë·1ì»´2ì¼ì±2íêµ2",gM="numeric",yM="ascii",vM="alpha",R1="asciinumeric",f1="alphanumeric",bM="domain",Epe="emoji",ant="scheme",lnt="slashscheme",yA="whitespace";function cnt(e,t){return e in t||(t[e]=[]),t[e]}function Af(e,t,n){t[gM]&&(t[R1]=!0,t[f1]=!0),t[yM]&&(t[R1]=!0,t[vM]=!0),t[R1]&&(t[f1]=!0),t[vM]&&(t[f1]=!0),t[f1]&&(t[bM]=!0),t[Epe]&&(t[bM]=!0);for(const r in t){const i=cnt(r,n);i.indexOf(e)<0&&i.push(e)}}function unt(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function Ki(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}Ki.groups={};Ki.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const i=t.jr[r][0],o=t.jr[r][1];if(o&&i.test(e))return o}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r=r||Ki.groups;let i;return t&&t.j?i=t:(i=new Ki(t),n&&r&&Af(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this;const o=e.length;if(!o)return i;for(let s=0;s<o-1;s++)i=i.tt(e[s]);return i.tt(e[o-1],t,n,r)},tt(e,t,n,r){r=r||Ki.groups;const i=this;if(t&&t.j)return i.j[e]=t,t;const o=t;let s,a=i.go(e);if(a?(s=new Ki,Object.assign(s.j,a.j),s.jr.push.apply(s.jr,a.jr),s.jd=a.jd,s.t=a.t):s=new Ki,o){if(r)if(s.t&&typeof s.t=="string"){const l=Object.assign(unt(s.t,r),n);Af(o,l,r)}else n&&Af(o,n,r);s.t=o}return i.j[e]=s,s}};const bt=(e,t,n,r,i)=>e.ta(t,n,r,i),Kn=(e,t,n,r,i)=>e.tr(t,n,r,i),zZ=(e,t,n,r,i)=>e.ts(t,n,r,i),Ne=(e,t,n,r,i)=>e.tt(t,n,r,i),$l="WORD",xM="UWORD",kpe="ASCIINUMERICAL",_pe="ALPHANUMERICAL",Xy="LOCALHOST",wM="TLD",CM="UTLD",pw="SCHEME",Mp="SLASH_SCHEME",WD="NUM",SM="WS",GD="NL",P1="OPENBRACE",D1="CLOSEBRACE",b4="OPENBRACKET",x4="CLOSEBRACKET",w4="OPENPAREN",C4="CLOSEPAREN",S4="OPENANGLEBRACKET",E4="CLOSEANGLEBRACKET",k4="FULLWIDTHLEFTPAREN",_4="FULLWIDTHRIGHTPAREN",A4="LEFTCORNERBRACKET",N4="RIGHTCORNERBRACKET",j4="LEFTWHITECORNERBRACKET",T4="RIGHTWHITECORNERBRACKET",M4="FULLWIDTHLESSTHAN",O4="FULLWIDTHGREATERTHAN",R4="AMPERSAND",P4="APOSTROPHE",D4="ASTERISK",wu="AT",I4="BACKSLASH",L4="BACKTICK",$4="CARET",ju="COLON",KD="COMMA",z4="DOLLAR",Sa="DOT",F4="EQUALS",YD="EXCLAMATION",Xo="HYPHEN",I1="PERCENT",B4="PIPE",H4="PLUS",V4="POUND",L1="QUERY",XD="QUOTE",Ape="FULLWIDTHMIDDLEDOT",ZD="SEMI",Ea="SLASH",$1="TILDE",U4="UNDERSCORE",Npe="EMOJI",q4="SYM";var jpe=Object.freeze({__proto__:null,ALPHANUMERICAL:_pe,AMPERSAND:R4,APOSTROPHE:P4,ASCIINUMERICAL:kpe,ASTERISK:D4,AT:wu,BACKSLASH:I4,BACKTICK:L4,CARET:$4,CLOSEANGLEBRACKET:E4,CLOSEBRACE:D1,CLOSEBRACKET:x4,CLOSEPAREN:C4,COLON:ju,COMMA:KD,DOLLAR:z4,DOT:Sa,EMOJI:Npe,EQUALS:F4,EXCLAMATION:YD,FULLWIDTHGREATERTHAN:O4,FULLWIDTHLEFTPAREN:k4,FULLWIDTHLESSTHAN:M4,FULLWIDTHMIDDLEDOT:Ape,FULLWIDTHRIGHTPAREN:_4,HYPHEN:Xo,LEFTCORNERBRACKET:A4,LEFTWHITECORNERBRACKET:j4,LOCALHOST:Xy,NL:GD,NUM:WD,OPENANGLEBRACKET:S4,OPENBRACE:P1,OPENBRACKET:b4,OPENPAREN:w4,PERCENT:I1,PIPE:B4,PLUS:H4,POUND:V4,QUERY:L1,QUOTE:XD,RIGHTCORNERBRACKET:N4,RIGHTWHITECORNERBRACKET:T4,SCHEME:pw,SEMI:ZD,SLASH:Ea,SLASH_SCHEME:Mp,SYM:q4,TILDE:$1,TLD:wM,UNDERSCORE:U4,UTLD:CM,UWORD:xM,WORD:$l,WS:SM});const Dl=/[a-z]/,Ug=new RegExp("\\p{L}","u"),vA=new RegExp("\\p{Emoji}","u"),Il=/\d/,bA=/\s/,FZ="\r",xA=` 328`,dnt="ï¸",fnt="â",wA="";let j2=null,T2=null;function hnt(e=[]){const t={};Ki.groups=t;const n=new Ki;j2==null&&(j2=BZ(ont)),T2==null&&(T2=BZ(snt)),Ne(n,"'",P4),Ne(n,"{",P1),Ne(n,"}",D1),Ne(n,"[",b4),Ne(n,"]",x4),Ne(n,"(",w4),Ne(n,")",C4),Ne(n,"<",S4),Ne(n,">",E4),Ne(n,"ï¼",k4),Ne(n,"ï¼",_4),Ne(n,"ã",A4),Ne(n,"ã",N4),Ne(n,"ã",j4),Ne(n,"ã",T4),Ne(n,"ï¼",M4),Ne(n,"ï¼",O4),Ne(n,"&",R4),Ne(n,"*",D4),Ne(n,"@",wu),Ne(n,"`",L4),Ne(n,"^",$4),Ne(n,":",ju),Ne(n,",",KD),Ne(n,"$",z4),Ne(n,".",Sa),Ne(n,"=",F4),Ne(n,"!",YD),Ne(n,"-",Xo),Ne(n,"%",I1),Ne(n,"|",B4),Ne(n,"+",H4),Ne(n,"#",V4),Ne(n,"?",L1),Ne(n,'"',XD),Ne(n,"/",Ea),Ne(n,";",ZD),Ne(n,"~",$1),Ne(n,"_",U4),Ne(n,"\\",I4),Ne(n,"ã»",Ape);const r=Kn(n,Il,WD,{[gM]:!0});Kn(r,Il,r);const i=Kn(r,Dl,kpe,{[R1]:!0}),o=Kn(r,Ug,_pe,{[f1]:!0}),s=Kn(n,Dl,$l,{[yM]:!0});Kn(s,Il,i),Kn(s,Dl,s),Kn(i,Il,i),Kn(i,Dl,i);const a=Kn(n,Ug,xM,{[vM]:!0});Kn(a,Dl),Kn(a,Il,o),Kn(a,Ug,a),Kn(o,Il,o),Kn(o,Dl),Kn(o,Ug,o);const l=Ne(n,xA,GD,{[yA]:!0}),c=Ne(n,FZ,SM,{[yA]:!0}),d=Kn(n,bA,SM,{[yA]:!0});Ne(n,wA,d),Ne(c,xA,l),Ne(c,wA,d),Kn(c,bA,d),Ne(d,FZ),Ne(d,xA),Kn(d,bA,d),Ne(d,wA,d);const f=Kn(n,vA,Npe,{[Epe]:!0});Ne(f,"#"),Kn(f,vA,f),Ne(f,dnt,f);const p=Ne(f,fnt);Ne(p,"#"),Kn(p,vA,f);const m=[[Dl,s],[Il,i]],y=[[Dl,null],[Ug,a],[Il,o]];for(let v=0;v<j2.length;v++)ou(n,j2[v],wM,$l,m);for(let v=0;v<T2.length;v++)ou(n,T2[v],CM,xM,y);Af(wM,{tld:!0,ascii:!0},t),Af(CM,{utld:!0,alpha:!0},t),ou(n,"file",pw,$l,m),ou(n,"mailto",pw,$l,m),ou(n,"http",Mp,$l,m),ou(n,"https",Mp,$l,m),ou(n,"ftp",Mp,$l,m),ou(n,"ftps",Mp,$l,m),Af(pw,{scheme:!0,ascii:!0},t),Af(Mp,{slashscheme:!0,ascii:!0},t),e=e.sort((v,b)=>v[0]>b[0]?1:-1);for(let v=0;v<e.length;v++){const b=e[v][0],S=e[v][1]?{[ant]:!0}:{[lnt]:!0};b.indexOf("-")>=0?S[bM]=!0:Dl.test(b)?Il.test(b)?S[R1]=!0:S[yM]=!0:S[gM]=!0,zZ(n,b,b,S)}return zZ(n,"localhost",Xy,{ascii:!0}),n.jd=new Ki(q4),{start:n,tokens:Object.assign({groups:t},jpe)}}function Tpe(e,t){const n=pnt(t.replace(/[A-Z]/g,a=>a.toLowerCase())),r=n.length,i=[];let o=0,s=0;for(;s<r;){let a=e,l=null,c=0,d=null,f=-1,p=-1;for(;s<r&&(l=a.go(n[s]));)a=l,a.accepts()?(f=0,p=0,d=a):f>=0&&(f+=n[s].length,p++),c+=n[s].length,o+=n[s].length,s++;o-=f,s-=p,c-=f,i.push({t:d.t,v:t.slice(o-c,o),s:o-c,e:o})}return i}function pnt(e){const t=[],n=e.length;let r=0;for(;r<n;
vendor: 26,621 bytes, lines 328-342
328){let i=e.charCodeAt(r),o,s=i<55296||i>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}function ou(e,t,n,r,i){let o;const s=t.length;for(let a=0;a<s-1;a++){const l=t[a];e.j[l]?o=e.j[l]:(o=new Ki(r),o.jr=i.slice(),e.j[l]=o),e=o}return o=new Ki(n),o.jr=i.slice(),e.j[t[s-1]]=o,o}function BZ(e){const t=[],n=[];let r=0,i="0123456789";for(;r<e.length;){let o=0;for(;i.indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let s=parseInt(e.substring(r,r+o),10);s>0;s--)n.pop();r+=o}else n.push(e[r]),r++}return t}const Zy={defaultProtocol:"http",events:null,format:HZ,formatHref:HZ,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function QD(e,t=null){let n=Object.assign({},Zy);e&&(n=Object.assign(n,e instanceof QD?e.o:e));const r=n.ignoreTags,i=[];for(let o=0;o<r.length;o++)i.push(r[o].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i}QD.prototype={o:Zy,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=t!=null;let i=this.o[e];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Zy[e],typeof i=="function"&&r&&(i=i(t,n))):typeof i=="function"&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r=="function"&&t!=null&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function HZ(e){return e}function Mpe(e,t){this.t="token",this.v=e,this.tk=t}Mpe.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"â¦":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=Zy.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),i=e.get("tagName",n,t),o=this.toFormattedString(e),s={},a=e.get("className",n,t),l=e.get("target",n,t),c=e.get("rel",n,t),d=e.getObj("attributes",n,t),f=e.getObj("events",n,t);return s.href=r,a&&(s.class=a),l&&(s.target=l),c&&(s.rel=c),d&&Object.assign(s,d),{tagName:i,attributes:s,content:o,eventListeners:f}}};function aS(e,t){class n extends Mpe{constructor(i,o){super(i,o),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}const VZ=aS("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),UZ=aS("text"),mnt=aS("nl"),M2=aS("url",{isLink:!0,toHref(e=Zy.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Xy&&e[1].t===ju}}),Ko=e=>new Ki(e);function gnt({groups:e}){const t=e.domain.concat([R4,D4,wu,I4,L4,$4,z4,F4,Xo,WD,I1,B4,H4,V4,Ea,q4,$1,U4]),n=[P4,ju,KD,Sa,YD,I1,L1,XD,ZD,S4,E4,P1,D1,x4,b4,w4,C4,k4,_4,A4,N4,j4,T4,M4,O4],r=[R4,P4,D4,I4,L4,$4,z4,F4,Xo,P1,D1,I1,B4,H4,V4,L1,Ea,q4,$1,U4],i=Ko(),o=Ne(i,$1);bt(o,r,o),bt(o,e.domain,o);const s=Ko(),a=Ko(),l=Ko();bt(i,e.domain,s),bt(i,e.scheme,a),bt(i,e.slashscheme,l),bt(s,r,o),bt(s,e.domain,s);const c=Ne(s,wu);Ne(o,wu,c),Ne(a,wu,c),Ne(l,wu,c);const d=Ne(o,Sa);bt(d,r,o),bt(d,e.domain,o);const f=Ko();bt(c,e.domain,f),bt(f,e.domain,f);const p=Ne(f,Sa);bt(p,e.domain,f);const m=Ko(VZ);bt(p,e.tld,m),bt(p,e.utld,m),Ne(c,Xy,m);const y=Ne(f,Xo);Ne(y,Xo,y),bt(y,e.domain,f),bt(m,e.domain,f),Ne(m,Sa,p),Ne(m,Xo,y);const v=Ne(m,ju);bt(v,e.numeric,VZ);const b=Ne(s,Xo),C=Ne(s,Sa);Ne(b,Xo,b),bt(b,e.domain,s),bt(C,r,o),bt(C,e.domain,s);const S=Ko(M2);bt(C,e.tld,S),bt(C,e.utld,S),bt(S,e.domain,s),bt(S,r,o),Ne(S,Sa,C),Ne(S,Xo,b),Ne(S,wu,c);const E=Ne(S,ju),A=Ko(M2);bt(E,e.numeric,A);const _=Ko(M2),N=Ko();bt(_,t,_),bt(_,n,N),bt(N,t,_),bt(N,n,N),Ne(S,Ea,_),Ne(A,Ea,_);const j=Ne(a,ju),T=Ne(l,ju),O=Ne(T,Ea),D=Ne(O,Ea);bt(a,e.domain,s),Ne(a,Sa,C),Ne(a,Xo,b),bt(l,e.domain,s),Ne(l,Sa,C),Ne(l,Xo,b),bt(j,e.domain,_),Ne(j,Ea,_),Ne(j,L1,_),bt(D,e.domain,_),bt(D,t,_),Ne(D,Ea,_);const R=[[P1,D1],[b4,x4],[w4,C4],[S4,E4],[k4,_4],[A4,N4],[j4,T4],[M4,O4]];for(let I=0;I<R.length;I++){const[F,$]=R[I],H=Ne(_,F);Ne(N,F,H),Ne(H,$,_);const L=Ko(M2);bt(H,t,L);const B=Ko();bt(H,n),bt(L,t,L),bt(L,n,B),bt(B,t,L),bt(B,n,B),Ne(L,$,_),Ne(B,$,_)}return Ne(i,Xy,S),Ne(i,GD,mnt),{start:i,tokens:jpe}}function ynt(e,t,n){let r=n.length,i=0,o=[],s=[];for(;i<r;){let a=e,l=null,c=null,d=0,f=null,p=-1;for(;i<r&&!(l=a.go(n[i].t));)s.push(n[i++]);for(;i<r&&(c=l||a.go(n[i].t));)l=null,a=c,a.accepts()?(p=0,f=a):p>=0&&p++,i++,d++;if(p<0)i-=d,i<r&&(s.push(n[i]),i++);else{s.length>0&&(o.push(CA(UZ,t,s)),s=[]),i-=p,d-=p;const m=f.t,y=n.slice(i-d,i);o.push(CA(m,t,y))}}return s.length>0&&o.push(CA(UZ,t,s)),o}function CA(e,t,n){const r=n[0].s,i=n[n.length-1].e,o=t.slice(r,i);return new e(o,n)}const vnt=typeof console<"u"&&console&&console.warn||(()=>{}),bnt="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",An={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function xnt(){return Ki.groups={},An.scanner=null,An.parser=null,An.tokenQueue=[],An.pluginQueue=[],An.customSchemes=[],An.initialized=!1,An}function qZ(e,t=!1){if(An.initialized&&vnt(`linkifyjs: already initialized - will not register custom scheme "${e}" ${bnt}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error(`linkifyjs: incorrect scheme format. 3291. Must only contain digits, lowercase ASCII letters or "-" 3302. Cannot start or end with "-" 3313. "-" cannot repeat`);An.customSchemes.push([e,t])}function wnt(){An.scanner=hnt(An.customSchemes);for(let e=0;e<An.tokenQueue.length;e++)An.tokenQueue[e][1]({scanner:An.scanner});An.parser=gnt(An.scanner.tokens);for(let e=0;e<An.pluginQueue.length;e++)An.pluginQueue[e][1]({scanner:An.scanner,parser:An.parser});return An.initialized=!0,An}function JD(e){return An.initialized||wnt(),ynt(An.parser.start,e,Tpe(An.scanner.start,e))}JD.scan=Tpe;function Ope(e,t=null,n=null){if(t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new QD(n),i=JD(e),o=[];for(let s=0;s<i.length;s++){const a=i[s];a.isLink&&(!t||a.t===t)&&r.check(a)&&o.push(a.toFormattedObject(r))}return o}var eI="[\0-  áá â-\u2029âã]",Cnt=new RegExp(eI),Snt=new RegExp(`${eI}$`),Ent=new RegExp(eI,"g");function knt(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?["()","[]"].includes(e[0].value+e[2].value):!1}function _nt(e){return new an({key:new pn("autolink"),appendTransaction:(t,n,r)=>{const i=t.some(c=>c.docChanged)&&!n.doc.eq(r.doc),o=t.some(c=>c.getMeta("preventAutolink"));if(!i||o)return;const{tr:s}=r,a=Fhe(n.doc,[...t]);if(Khe(a).forEach(({newRange:c})=>{const d=set(r.doc,c,m=>m.isTextblock);let f,p;if(d.length>1)f=d[0],p=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(d.length){const m=r.doc.textBetween(c.from,c.to," "," ");if(!Snt.test(m))return;f=d[0],p=r.doc.textBetween(f.pos,c.to,void 0," ")}if(f&&p){const m=p.split(Cnt).filter(Boolean);if(m.length<=0)return!1;const y=m[m.length-1],v=f.pos+p.lastIndexOf(y);if(!y)return!1;const b=JD(y).map(C=>C.toObject(e.defaultProtocol));if(!knt(b))return!1;b.filter(C=>C.isLink).map(C=>({...C,from:v+C.start+1,to:v+C.end+1})).filter(C=>r.schema.marks.code?!r.doc.rangeHasMark(C.from,C.to,r.schema.marks.code):!0).filter(C=>e.validate(C.value)).filter(C=>e.shouldAutoLink(C.value)).forEach(C=>{zD(C.from,C.to,r.doc).some(S=>S.mark.type===e.type)||s.addMark(C.from,C.to,e.type.create({href:C.href}))})}}),!!s.steps.length)return s}})}function Ant(e){return new an({key:new pn("handleClickLink"),props:{handleClick:(t,n,r)=>{var i,o;if(r.button!==0||!t.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{const l=r.target;if(!l)return!1;const c=e.editor.view.dom;s=l.closest("a"),s&&!c.contains(s)&&(s=null)}if(!s)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){const l=Ghe(t.state,e.type.name),c=(i=s.href)!=null?i:l.href,d=(o=s.target)!=null?o:l.target;c&&(window.open(c,d),a=!0)}return a}}})}function Nnt(e){return new an({key:new pn("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{shouldAutoLink:i}=e,{state:o}=t,{selection:s}=o,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(d=>{l+=d.textContent});const c=Ope(l,{defaultProtocol:e.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!c||i!==void 0&&!i(c.value)?!1:e.editor.commands.setMark(e.type,{href:c.href})}}})}function sf(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!e||e.replace(Ent,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var jnt=ai.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{if(typeof e=="string"){qZ(e);return}qZ(e.scheme,e.optionalSlashes)})},onDestroy(){xnt()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!sf(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{const t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;const i=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(i)||!/\./.test(i))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!t||!this.options.isAllowedUri(t,{defaultValidate:n=>!!sf(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:t=>!!sf(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Bt(this.options.HTMLAttributes,e),0]:["a",Bt(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,o;const s=(r=(n=e.attrs)==null?void 0:n.href)!=null?r:"",a=(o=(i=e.attrs)==null?void 0:i.title)!=null?o:"",l=t.renderChildren(e);return a?`[${l}](${s} "${a}")`:`[${l}](${s})`},addCommands(){return{setLink:e=>({chain:t})=>{const{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:r=>!!sf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta("preventAutolink",!0).run():!1},toggleLink:e=>({chain:t})=>{const{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!sf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[cd({find:e=>{const t=[];if(e){const{protocols:n,defaultProtocol:r}=this.options,i=Ope(e).filter(o=>o.isLink&&this.options.isAllowedUri(o.value,{defaultValidate:s=>!!sf(s,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(o=>{this.options.shouldAutoLink(o.value)&&t.push({text:o.value,data:{href:o.href},index:o.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:(t=e.data)==null?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(_nt({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!sf(i,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(Ant({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(Nnt({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),Tnt=Object.defineProperty,Mnt=(e,t)=>{for(var n in t)Tnt(e,n,{get:t[n],enumerable:!0})},Ont="listItem",WZ="textStyle",GZ=/^\s*([-+*])\s$/,Rpe=Ot.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:e}){return["ul",Bt(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>e.type!=="list"||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 332`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(Ont,this.editor.getAttributes(WZ)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=F0({find:GZ,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=F0({find:GZ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(WZ),editor:this.editor})),[e]}}),Ppe=Ot.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:e}){return["li",Bt(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if(e.type!=="list_item")return[];const r=(n=t.parseBlockChildren)!=null?n:t.parseChildren;let i=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(s=>s.type==="paragraph"))i=r(e.tokens);else{const s=e.tokens[0];if(s&&s.type==="text"&&s.tokens&&s.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(s.tokens)}],e.tokens.length>1){const l=e.tokens.slice(1),c=r(l);i.push(...c)}}else i=r(e.tokens)}return i.length===0&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>UD(e,t,r=>{var i,o;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((o=(i=r.meta)==null?void 0:i.parentAttrs)==null?void 0:o.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),Rnt={};Mnt(Rnt,{findListItemPos:()=>lb,getNextListDepth:()=>tI,handleBackspace:()=>EM,handleDelete:()=>kM,hasListBefore:()=>Dpe,hasListItemAfter:()=>Pnt,hasListItemBefore:()=>Ipe,listItemHasSubList:()=>Lpe,nextListIsDeeper:()=>$pe,nextListIsHigher:()=>zpe});var lb=(e,t)=>{const{$from:n}=t.selection,r=vr(e,t.schema);let i=null,o=n.depth,s=n.pos,a=null;for(;o>0&&a===null;)i=n.node(o),i.type===r?a=o:(o-=1,s-=1);return a===null?null:{$pos:t.doc.resolve(s),depth:a}},tI=(e,t)=>{const n=lb(e,t);if(!n)return!1;const[,r]=get(t,e,n.$pos.pos+4);return r},Dpe=(e,t,n)=>{const{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),o=e.doc.resolve(i).node();return!(!o||!n.includes(o.type.name))},Ipe=(e,t)=>{var n;const{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return!(i.index()===0||((n=i.nodeBefore)==null?void 0:n.type.name)!==e)},Lpe=(e,t,n)=>{if(!n)return!1;const r=vr(e,t.schema);let i=!1;return n.descendants(o=>{o.type===r&&(i=!0)}),i},EM=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!ld(e.state,t)&&Dpe(e.state,t,n)){const{$anchor:a}=e.state.selection,l=e.state.doc.resolve(a.before()-1),c=[];l.node().descendants((p,m)=>{p.type.name===t&&c.push({node:p,pos:m})});const d=c.at(-1);if(!d)return!1;const f=e.state.doc.resolve(l.start()+d.pos+1);return e.chain().cut({from:a.start()-1,to:a.end()+1},f.end()).joinForward().run()}if(!ld(e.state,t)||!xet(e.state))return!1;const r=lb(t,e.state);if(!r)return!1;const o=e.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=Lpe(t,e.state,o);return Ipe(t,e.state)&&!s?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},$pe=(e,t)=>{const n=tI(e,t),r=lb(e,t);return!r||!n?!1:n>r.depth},zpe=(e,t)=>{const n=tI(e,t),r=lb(e,t);return!r||!n?!1:n<r.depth},kM=(e,t)=>{if(!ld(e.state,t)||!bet(e.state,t))return!1;const{selection:n}=e.state,{$from:r,$to:i}=n;return!n.empty&&r.sameParent(i)?!1:$pe(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():zpe(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward()},Pnt=(e,t)=>{var n;const{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return!(i.index()===i.parent.childCount-1||((n=i.nodeAfter)==null?void 0:n.type.name)!==e)},Fpe=jt.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&kM(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&kM(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&EM(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&EM(e,n,r)&&(t=!0)}),t}}}}),KZ=/^(\s*)(\d+)\.\s+(.*)$/,Dnt=/^\s/;function Int(e){const t=[];let n=0,r=0;for(;n<e.length;){const i=e[n],o=i.match(KZ);if(!o)break;const[,s,a,l]=o,c=s.length;let d=l,f=n+1;const p=[i];for(;f<e.length;){const m=e[f];if(m.match(KZ))break;if(m.trim()==="")p.push(m),d+=` 333`,f+=1;else if(m.match(Dnt))p.push(m),d+=` 334${m.slice(c+2)}`,f+=1;else break}t.push({indent:c,number:parseInt(a,10),content:d.trim(),raw:p.join(` 335`)}),r=f,n=f}return[t,r]}function Bpe(e,t,n){var r;const i=[];let o=0;for(;o<e.length;){const s=e[o];if(s.indent===t){const a=s.content.split(` 336`),l=((r=a[0])==null?void 0:r.trim())||"",c=[];l&&c.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});const d=a.slice(1).join(` 337`).trim();if(d){const m=n.blockTokens(d);c.push(...m)}let f=o+1;const p=[];for(;f<e.length&&e[f].indent>t;)p.push(e[f]),f+=1;if(p.length>0){const m=Math.min(...p.map(v=>v.indent)),y=Bpe(p,m,n);c.push({type:"list",ordered:!0,start:p[0].number,items:y,raw:p.map(v=>v.raw).join(` 338`)})}i.push({type:"list_item",raw:s.raw,tokens:c}),o=f}else o+=1}return i}function Lnt(e,t){return e.map(n=>{if(n.type!=="list_item")return t.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(i=>{if(i.type==="paragraph"||i.type==="list"||i.type==="blockquote"||i.type==="code")r.push(...t.parseChildren([i]));else if(i.type==="text"&&i.tokens){const o=t.parseChildren([i]);r.push({type:"paragraph",content:o})}else{const o=t.parseChildren([i]);o.length>0&&r.push(...o)}}),{type:"listItem",content:r}})}var $nt="listItem",YZ="textStyle",XZ=/^(\d+)\.\s$/,Hpe=Ot.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return t===1?["ol",Bt(this.options.HTMLAttributes,n),0]:["ol",Bt(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if(e.type!=="list"||!e.ordered)return[];const n=e.start||1,r=e.items?Lnt(e.items,t):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 339`):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{const t=e.match(/^(\s*)(\d+)\.\s+/),n=t==null?void 0:t.index;return n!==void 0?n:-1},tokenize:(e,t,n)=>{var r;const i=e.split(` 340`),[o,s]=Int(i);if(o.length===0)return;const a=Bpe(o,0,n);return a.length===0?void 0:{type:"list",ordered:!0,start:((r=o[0])==null?void 0:r.number)||1,items:a,raw:i.slice(0,s).join(` 341`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes($nt,this.editor.getAttributes(YZ)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=F0({find:XZ,type:this.type,getAttributes:t=>({start:+t[1]}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=F0({find:XZ,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:t=>({start:+t[1],...this.editor.getAttributes(YZ)}),joinPredicate:(t,n)=>n.childCount+n.attrs.start===+t[1],editor:this.editor})),[e]}}),znt=/^\s*(\[([( |x])?\])\s$/,Vpe=Ot.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{const t=e.getAttribute("data-checked");return t===""||t==="true"},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",Bt(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{const n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){const r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;const i=`- [${(n=e.attrs)!=null&&n.checked?"x":" "}] `;return UD(e,t,i)},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const i=document.createElement("li"),o=document.createElement("label"),s=document.createElement("span"),a=document.createElement("input"),l=document.createElement("div"),c=f=>{var p,m;a.ariaLabel=((m=(p=this.options.a11y)==null?void 0:p.checkboxLabel)==null?void 0:m.call(p,f,a.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};c(e),o.contentEditable="false",a.type="checkbox",a.addEventListener("mousedown",f=>f.preventDefault()),a.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){a.checked=!a.checked;return}const{checked:p}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:m})=>{const y=n();if(typeof y!="number")return!1;const v=m.doc.nodeAt(y);return m.setNodeMarkup(y,void 0,{...v==null?void 0:v.attrs,checked:p}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,p)||(a.checked=!a.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,p])=>{i.setAttribute(f,p)}),i.dataset.checked=e.attrs.checked,a.checked=e.attrs.checked,o.append(a,s),i.append(o,l),Object.entries(t).forEach(([f,p])=>{i.setAttribute(f,p)});let d=new Set(Object.keys(t));return{dom:i,contentDOM:l,update:f=>{if(f.type!==this.type)return!1;i.dataset.checked=f.attrs.checked,a.checked=f.attrs.checked,c(f);const p=r.extensionManager.attributes,m=z0(f,p),y=new Set(Object.keys(m)),v=this.options.HTMLAttributes;return d.forEach(b=>{y.has(b)||(b in v?i.setAttribute(b,v[b]):i.removeAttribute(b))}),Object.entries(m).forEach(([b,C])=>{C==null?b in v?i.setAttribute(b,v[b]):i.removeAttribute(b):i.setAttribute(b,C)}),d=y,!0}}}},addInputRules(){return[F0({find:znt,type:this.type,getAttributes:e=>({checked:e[e.length-1]==="x"})})]}}),Upe=Ot.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",Bt(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,` 342`):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;const n=(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:t.index;return n!==void 0?n:-1},tokenize(e,t,n){const r=o=>{const s=pM(o,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:a=>
342({indentLevel:a[1].length,mainContent:a[4],checked:a[3].toLowerCase()==="x"}),createToken:(a,l)=>({type:"taskItem",raw:"",mainContent:a.mainContent,indentLevel:a.indentLevel,checked:a.checked,text:a.mainContent,tokens:n.inlineTokens(a.mainContent),nestedTokens:l}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(o)},i=pM(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:o=>({indentLevel:o[1].length,mainContent:o[4],checked:o[3].toLowerCase()==="x"}),createToken:(o,s)=>({type:"taskItem",raw:"",mainContent:o.mainContent,indentLevel:o.indentLevel,checked:o.checked,text:o.mainContent,tokens:n.inlineTokens(o.mainContent),nestedTokens:s}),customNestedParser:r},n);if(i)return{type:"taskList",raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});jt.create({name:"listKit",addExtensions(){const e=[];return this.options.bulletList!==!1&&e.push(Rpe.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(Ppe.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(Fpe.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(Hpe.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(Vpe.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(Upe.configure(this.options.taskList)),e}});var ZZ=" ",Fnt="Â ",Bnt=Ot.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:e}){return["p",Bt(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{const n=e.tokens||[];if(n.length===1&&n[0].type==="image")return t.parseChildren([n[0]]);const r=t.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===ZZ||r[0].text===Fnt)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{var r,i;if(!e)return"";const o=Array.isArray(e.content)?e.content:[];if(o.length===0){const s=Array.isArray((r=n==null?void 0:n.previousNode)==null?void 0:r.content)?n.previousNode.content:[];return((i=n==null?void 0:n.previousNode)==null?void 0:i.type)==="paragraph"&&s.length===0?ZZ:""}return t.renderChildren(o)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Hnt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Vnt=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Unt=ai.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["s",Bt(this.options.HTMLAttributes,e),0]},markdownTokenName:"del",parseMarkdown:(e,t)=>t.applyMark("strike",t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[nh({find:Hnt,type:this.type})]},addPasteRules(){return[cd({find:Vnt,type:this.type})]}}),qnt=Ot.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""}),Wnt=ai.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",Bt(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||"underline",t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`++${t.renderChildren(e)}++`},markdownTokenizer:{name:"underline",level:"inline",start(e){return e.indexOf("++")},tokenize(e,t,n){const i=/^(\+\+)([\s\S]+?)(\+\+)/.exec(e);if(!i)return;const o=i[2].trim();return{type:"underline",raw:i[0],text:o,tokens:n.inlineTokens(o)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function Gnt(e={}){return new an({view(t){return new Knt(t,e)}})}class Knt{constructor(t,n){var r;this.editorView=t,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let o=s=>
vendor: 16,533 bytes, line 342
342{this[i](s)};return t.dom.addEventListener(i,o),{name:i,handler:o}})}destroy(){this.handlers.forEach(({name:t,handler:n})=>this.editorView.dom.removeEventListener(t,n))}update(t,n){this.cursorPos!=null&&n.doc!=t.state.doc&&(this.cursorPos>t.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(t){t!=this.cursorPos&&(this.cursorPos=t,t==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r;if(n){let a=t.nodeBefore,l=t.nodeAfter;if(a||l){let c=this.editorView.nodeDOM(this.cursorPos-(a?a.nodeSize:0));if(c){let d=c.getBoundingClientRect(),f=a?d.bottom:d.top;a&&l&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:d.left,right:d.right,top:f-this.width/2,bottom:f+this.width/2}}}}if(!r){let a=this.editorView.coordsAtPos(this.cursorPos);r={left:a.left-this.width/2,right:a.left+this.width/2,top:a.top,bottom:a.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let o,s;if(!i||i==document.body&&getComputedStyle(i).position=="static")o=-pageXOffset,s=-pageYOffset;else{let a=i.getBoundingClientRect();o=a.left-i.scrollLeft,s=a.top-i.scrollTop}this.element.style.left=r.left-o+"px",this.element.style.top=r.top-s+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(t){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),t)}dragover(t){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:t.clientX,top:t.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,o=typeof i=="function"?i(this.editorView,n,t):i;if(n&&!o){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let a=Dfe(this.editorView.state.doc,s,this.editorView.dragging.slice);a!=null&&(s=a)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(t){(t.target==this.editorView.dom||!this.editorView.dom.contains(t.relatedTarget))&&this.setCursor(null)}}class Zn extends et{constructor(t){super(t,t)}map(t,n){let r=t.resolve(n.map(this.head));return Zn.valid(r)?new Zn(r):et.near(r)}content(){return Ie.empty}eq(t){return t instanceof Zn&&t.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new Zn(t.resolve(n.pos))}getBookmark(){return new nI(this.anchor)}static valid(t){let n=t.parent;if(n.isTextblock||!Ynt(t)||!Xnt(t))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(t.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(t,n,r=!1){e:for(;;){if(!r&&Zn.valid(t))return t;let i=t.pos,o=null;for(let s=t.depth;;s--){let a=t.node(s);if(n>0?t.indexAfter(s)<a.childCount:t.index(s)>0){o=a.child(n>0?t.indexAfter(s):t.index(s)-1);break}else if(s==0)return null;i+=n;let l=t.doc.resolve(i);if(Zn.valid(l))return l}for(;;){let s=n>0?o.firstChild:o.lastChild;if(!s){if(o.isAtom&&!o.isText&&!$e.isSelectable(o)){t=t.doc.resolve(i+o.nodeSize*n),r=!1;continue e}break}o=s,i+=n;let a=t.doc.resolve(i);if(Zn.valid(a))return a}return null}}}Zn.prototype.visible=!1;Zn.findFrom=Zn.findGapCursorFrom;et.jsonID("gapcursor",Zn);class nI{constructor(t){this.pos=t}map(t){return new nI(t.map(this.pos))}resolve(t){let n=t.resolve(this.pos);return Zn.valid(n)?new Zn(n):et.near(n)}}function Ynt(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function Xnt(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function Znt(){return new an({props:{decorations:trt,createSelectionBetween(e,t,n){return t.pos==n.pos&&Zn.valid(n)?new Zn(n):null},handleClick:Jnt,handleKeyDown:Qnt,handleDOMEvents:{beforeinput:ert}}})}const Qnt=RD({ArrowLeft:O2("horiz",-1),ArrowRight:O2("horiz",1),ArrowUp:O2("vert",-1),ArrowDown:O2("vert",1)});function O2(e,t){const n=e=="vert"?t>0?"down":"up":t>0?"right":"left";return function(r,i,o){let s=r.selection,a=t>0?s.$to:s.$from,l=s.empty;if(s instanceof Ue){if(!o.endOfTextblock(n)||a.depth==0)return!1;l=!1,a=r.doc.resolve(t>0?a.after():a.before())}let c=Zn.findGapCursorFrom(a,t,l);return c?(i&&i(r.tr.setSelection(new Zn(c))),!0):!1}}function Jnt(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!Zn.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&$e.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new Zn(r))),!0)}function ert(e,t){if(t.inputType!="insertCompositionText"||!(e.state.selection instanceof Zn))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=we.empty;for(let s=r.length-1;s>=0;s--)i=we.from(r[s].createAndFill(null,i));let o=e.state.tr.replace(n.pos,n.pos,new Ie(i,0,0));return o.setSelection(Ue.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function trt(e){if(!(e.selection instanceof Zn))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",gn.create(e.doc,[jr.widget(e.selection.head,t,{key:"gapcursor"})])}var W4=200,qr=function(){};qr.prototype.append=function(t){return t.length?(t=qr.from(t),!this.length&&t||t.length<W4&&this.leafAppend(t)||this.length<W4&&t.leafPrepend(this)||this.appendInner(t)):this};qr.prototype.prepend=function(t){return t.length?qr.from(t).append(this):this};qr.prototype.appendInner=function(t){return new nrt(this,t)};qr.prototype.slice=function(t,n){return t===void 0&&(t=0),n===void 0&&(n=this.length),t>=n?qr.empty:this.sliceInner(Math.max(0,t),Math.min(this.length,n))};qr.prototype.get=function(t){if(!(t<0||t>=this.length))return this.getInner(t)};qr.prototype.forEach=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(t,n,r,0):this.forEachInvertedInner(t,n,r,0)};qr.prototype.map=function(t,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(o,s){return i.push(t(o,s))},n,r),i};qr.from=function(t){return t instanceof qr?t:t&&t.length?new qpe(t):qr.empty};var qpe=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(i,o){return i==0&&o==this.length?this:new t(this.values.slice(i,o))},t.prototype.getInner=function(i){return this.values[i]},t.prototype.forEachInner=function(i,o,s,a){for(var l=o;l<s;l++)if(i(this.values[l],a+l)===!1)return!1},t.prototype.forEachInvertedInner=function(i,o,s,a){for(var l=o-1;l>=s;l--)if(i(this.values[l],a+l)===!1)return!1},t.prototype.leafAppend=function(i){if(this.length+i.length<=W4)return new t(this.values.concat(i.flatten()))},t.prototype.leafPrepend=function(i){if(this.length+i.length<=W4)return new t(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(qr);qr.empty=new qpe([]);var nrt=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},t.prototype.forEachInner=function(r,i,o,s){var a=this.left.length;if(i<a&&this.left.forEachInner(r,i,Math.min(o,a),s)===!1||o>a&&this.right.forEachInner(r,Math.max(i-a,0),Math.min(this.length,o)-a,s+a)===!1)return!1},t.prototype.forEachInvertedInner=function(r,i,o,s){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(r,i-a,Math.max(o,a)-a,s+a)===!1||o<a&&this.left.forEachInvertedInner(r,Math.min(i,a),o,s)===!1)return!1},t.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(r,i):r>=o?this.right.slice(r-o,i-o):this.left.slice(r,o).append(this.right.slice(0,i-o))},t.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new t(this.left,i)},t.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new t(i,this.right)},t.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new t(this.left,new t(this.right,r)):new t(this,r)},t}(qr);const rrt=500;class zs{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,o;n&&(i=this.remapping(r,this.items.length),o=i.maps.length);let s=t.tr,a,l,c=[],d=[];return this.items.forEach((f,p)=>{if(!f.step){i||(i=this.remapping(r,p+1),o=i.maps.length),o--,d.push(f);return}if(i){d.push(new ka(f.map));let m=f.step.map(i.slice(o)),y;m&&s.maybeStep(m).doc&&(y=s.mapping.maps[s.mapping.maps.length-1],c.push(new ka(y,void 0,void 0,c.length+d.length))),o--,y&&i.appendMap(y,o)}else s.maybeStep(f.step);if(f.selection)return a=i?f.selection.map(i.slice(o)):f.selection,l=new zs(this.items.slice(0,r).append(d.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:s,selection:a}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let d=0;d<t.steps.length;d++){let f=t.steps[d].invert(t.docs[d]),p=new ka(t.mapping.maps[d],f,n),m;(m=l&&l.merge(p))&&(p=m,d?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(s++,n=void 0),i||(l=p)}let c=s-r.depth;return c>ort&&(a=irt(a,c),s-=c),new zs(a.append(o),s)}remapping(t,n){let r=new Vy;return this.items.forEach((i,o)=>{let s=i.mirrorOffset!=null&&o-i.mirrorOffset>=t?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,s)},t,n),r}addMaps(t){return this.eventCount==0?this:new zs(this.items.append(t.map(n=>new ka(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(p=>{p.selection&&a--},i);let l=n;this.items.forEach(p=>{let m=o.getMirror(--l);if(m==null)return;s=Math.min(s,m);let y=o.maps[m];if(p.step){let v=t.steps[m].invert(t.docs[m]),b=p.selection&&p.selection.map(o.slice(l+1,m));b&&a++,r.push(new ka(y,v,b))}else r.push(new ka(y))},i);let c=[];for(let p=n;p<s;p++)c.push(new ka(o.maps[p]));let d=this.items.slice(0,i).append(c).append(r),f=new zs(d,a);return f.emptyItemCount()>rrt&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],o=0;return this.items.forEach((s,a)=>{if(a>=t)i.push(s),s.selection&&o++;else if(s.step){let l=s.step.map(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let d=s.selection&&s.selection.map(n.slice(r));d&&o++;let f=new ka(c.invert(),l,d),p,m=i.length-1;(p=i.length&&i[m].merge(f))?i[m]=p:i.push(f)}}else s.map&&r--},this.items.length,0),new zs(qr.from(i.reverse()),o)}}zs.empty=new zs(qr.empty,0);function irt(e,t){let n;return e.forEach((r,i)=>{if(r.selection&&t--==0)return n=i,!1}),e.slice(n)}class ka{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new ka(n.getMap().invert(),n,this.selection)}}}class Cu{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const ort=20;function srt(e,t,n,r){let i=n.getMeta(Lf),o;if(i)return i.historyState;n.getMeta(crt)&&(e=new Cu(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return e;if(s&&s.getMeta(Lf))return s.getMeta(Lf).redo?new Cu(e.done.addTransform(n,void 0,r,mw(t)),e.undone,QZ(n.mapping.maps),e.prevTime,e.prevComposition):new Cu(e.done,e.undone.addTransform(n,void 0,r,mw(t)),null,e.prevTime,e.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=e.prevTime==0||!s&&e.prevComposition!=a&&(e.prevTime<(n.time||0)-r.newGroupDelay||!art(n,e.prevRanges)),c=s?SA(e.prevRanges,n.mapping):QZ(n.mapping.maps);return new Cu(e.done.addTransform(n,l?t.selection.getBookmark():void 0,r,mw(t)),zs.empty,c,n.time,a??e.prevComposition)}else return(o=n.getMeta("rebased"))?new Cu(e.done.rebased(n,o),e.undone.rebased(n,o),SA(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new Cu(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),SA(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function art(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((r,i)=>{for(let o=0;o<t.length;o+=2)r<=t[o+1]&&i>=t[o]&&(n=!0)}),n}function QZ(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,s)=>t.push(o,s));return t}function SA(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}function lrt(e,t,n){let r=mw(t),i=Lf.get(t).spec.config,o=(n?e.undone:e.done).popEvent(t,r);if(!o)return null;let s=o.selection.resolve(o.transform.doc),a=(n?e.done:e.undone).addTransform(o.transform,t.selection.getBookmark(),i,r),l=new Cu(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(s).setMeta(Lf,{redo:n,historyState:l})}let EA=!1,JZ=null;function mw(e){let t=e.plugins;if(JZ!=t){EA=!1,JZ=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){EA=!0;break}}return EA}const Lf=new pn("history"),crt=new pn("closeHistory");function urt(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new an({key:Lf,state:{init(){return new Cu(zs.empty,zs.empty,null,0,-1)},apply(t,n,r){return srt(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?Gpe:r=="historyRedo"?Kpe:null;return i?(n.preventDefault(),i(t.state,t.dispatch)):!1}}}})}function Wpe(e,t){return(n,r)=>{let i=Lf.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=lrt(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const Gpe=Wpe(!1,!0),Kpe=Wpe(!0,!0);jt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new an({key:new pn("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const i=this.options.limit;if(i==null||i===0){e=!0;return}const o=this.storage.characters({node:r.doc});if(o>i){const s=o-i,a=0,l=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return e=!0,c}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=r||i>r&&o>r&&o<=i)return!0;
342if(i>r&&o>r&&o>i||!t.getMeta("paste"))return!1;const a=t.selection.$head.pos,l=o-r,c=a-l,d=a;return t.deleteRange(c,d),!(this.storage.characters({node:t.doc})>r)}})]}});var drt=jt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[Gnt(this.options)]}});jt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new an({key:new pn("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,o=[];if(!n||!r)return gn.create(e,[]);let s=0;this.options.mode==="deepest"&&e.descendants((l,c)=>{if(l.isText)return;if(!(i>=c&&i<=c+l.nodeSize-1))return!1;s+=1});let a=0;return e.descendants((l,c)=>{if(l.isText||!(i>=c&&i<=c+l.nodeSize-1))return!1;if(a+=1,this.options.mode==="deepest"&&s-a>0||this.options.mode==="shallowest"&&a>1)return this.options.mode==="deepest";o.push(jr.node(c,c+l.nodeSize,{class:this.options.className}))}),gn.create(e,o)}}})]}});var frt=jt.create({name:"gapCursor",addProseMirrorPlugins(){return[Znt()]},extendNodeSchema(e){var t;const n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:(t=Wt(Ye(e,"allowGapCursor",n)))!=null?t:null}}}),eQ="placeholder";function hrt(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var prt=jt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:eQ,placeholder:"Write something â¦",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const e=this.options.dataAttribute?`data-${hrt(this.options.dataAttribute)}`:`data-${eQ}`;return[new an({key:new pn("placeholder"),props:{decorations:({doc:t,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:i}=n,o=[];if(!r)return null;const s=this.editor.isEmpty;return t.descendants((a,l)=>{const c=i>=l&&i<=l+a.nodeSize,d=!a.isLeaf&&rS(a);if(!a.type.isTextblock)return this.options.includeChildren;if((c||!this.options.showOnlyCurrent)&&d){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=jr.node(l,l+a.nodeSize,{class:f.join(" "),[e]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:c}):this.options.placeholder});o.push(p)}return this.options.includeChildren}),gn.create(t,o)}}})]}}),mrt=jt.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:e,options:t}=this;return[new an({key:new pn("selection"),props:{decorations(n){return n.selection.empty||e.isFocused||!e.isEditable||FD(n.selection)||e.view.dragging?null:gn.create(n.doc,[jr.inline(n.selection.from,n.selection.to,{class:t.className})])}}})]}}),grt="skipTrailingNode";function tQ({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(t==null?void 0:t.type)===e}var yrt=jt.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var e;const t=new pn(this.name),n=this.options.node||((e=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,i])=>i).filter(i=>(this.options.notAfter||[]).concat(n).includes(i.name));return[new an({key:t,appendTransaction:(i,o,s)=>{const{doc:a,tr:l,schema:c}=s,d=t.getState(s),f=a.content.size,p=c.nodes[n];if(!i.some(m=>m.getMeta(grt))&&d)return l.insert(f,p.create())},state:{init:(i,o)=>{const s=o.tr.doc.lastChild;return!tQ({node:s,types:r})},apply:(i,o)=>{if(!i.docChanged||i.getMeta("__uniqueIDTransaction"))return o;const s=i.doc.lastChild;return!tQ({node:s,types:r})}}})]}}),vrt=jt.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Gpe(e,t),redo:()=>({state:e,dispatch:t})=>Kpe(e,t)}},addProseMirrorPlugins(){return[urt(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-Ñ":()=>this.editor.commands.undo(),"Shift-Mod-Ñ":()=>this.editor.commands.redo()}}}),brt=jt.create({name:"starterKit",addExtensions(){var e,t,n,r;const i=[];return this.options.bold!==!1&&i.push(Vtt.configure(this.options.bold)),this.options.blockquote!==!1&&i.push($tt.configure(this.options.blockquote)),this.options.bulletList!==!1&&i.push(Rpe.configure(this.options.bulletList)),this.options.code!==!1&&i.push(Wtt.configure(this.options.code)),this.options.codeBlock!==!1&&i.push(Ytt.configure(this.options.codeBlock)),this.options.document!==!1&&i.push(Xtt.configure(this.options.document)),this.options.dropcursor!==!1&&i.push(drt.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&i.push(frt.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&i.push(Ztt.configure(this.options.hardBreak)),this.options.heading!==!1&&i.push(Qtt.configure(this.options.heading)),this.options.undoRedo!==!1&&i.push(vrt.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&i.push(Spe.configure(this.options.horizontalRule)),this.options.italic!==!1&&i.push(int.configure(this.options.italic)),this.options.listItem!==!1&&i.push(Ppe.configure(this.options.listItem)),this.options.listKeymap!==!1&&i.push(Fpe.configure((e=this.options)==null?void 0:e.listKeymap)),this.options.link!==!1&&i.push(jnt.configure((t=this.options)==null?void 0:t.link)),this.options.orderedList!==!1&&i.push(Hpe.configure(this.options.orderedList)),this.options.paragraph!==!1&&i.push(Bnt.configure(this.options.paragraph)),this.options.strike!==!1&&i.push(Unt.configure(this.options.strike)),this.options.text!==!1&&i.push(qnt.configure(this.options.text)),this.options.underline!==!1&&i.push(Wnt.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&i.push(yrt.configure((r=this.options)==null?void 0:r.trailingNode)),i}});const nQ={};function xrt(e){let t=nQ[e];if(t)return t;t=nQ[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);t.push(r)}for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);t[r]="%"+("0"+r.toString(16).toUpperCase()).slice(-2)}return t}function B0(e,t){typeof t!="string"&&(t=B0.defaultChars);const n=xrt(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(r){let i="";for(let o=0,s=r.length;o<s;o+=3){const a=parseInt(r.slice(o+1,o+3),16);if(a<128){i+=n[a];continue}if((a&224)===192&&o+3<s){const l=parseInt(r.slice(o+4,o+6),16);if((l&192)===128){const c=a<<6&1984|l&63;c<128?i+="��":i+=String.fromCharCode(c),o+=3;continue}}if((a&240)===224&&o+6<s){const l=parseInt(r.slice(o+4,o+6),16),c=parseInt(r.slice(o+7,o+9),16);if((l&192)===128&&(c&192)===128){const d=a<<12&61440|l<<6&4032|c&63;d<2048||d>=55296&&d<=57343?i+="���":i+=String.fromCharCode(d),o+=6;continue}}if((a&248)===240&&o+9<s){const l=parseInt(r.slice(o+4,o+6),16),c=parseInt(r.slice(o+7,o+9),16),d=parseInt(r.slice(o+10,o+12),16);if((l&192)===128&&(c&192)===128&&(d&192)===128){let f=a<<18&1835008|l<<12&258048|c<<6&4032|d&63;f<65536||f>1114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}B0.defaultChars=";/?:@&=+$,#";B0.componentChars="";const rQ={};function wrt(e){let t=rQ[e];if(t)return t;t=rQ[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n<e.length;n++)t[e.charCodeAt(n)]=e[n];return t}function cb(e,t,n){typeof t!="string"&&(n=t,t=cb.defaultChars),typeof n>"u"&&(n=!0);const r=wrt(t);let i="";for(let o=0,s=e.length;o<s;o++){const a=e.charCodeAt(o);if(n&&a===37&&o+2<s&&/^[0-9a-f]{2}$/i.test(e.slice(o+1,o+3))){i+=e.slice(o,o+3),o+=2;continue}if(a<128){i+=r[a];continue}if(a>=55296&&a<=57343){if(a>=55296&&a<=56319&&o+1<s){const l=e.charCodeAt(o+1);if(l>=56320&&l<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}cb.defaultChars=";/?:@&=+$,-_.!~*'()#";cb.componentChars="-_.!~*'()";function rI(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function G4(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const Crt=/^([a-z0-9.+-]+:)/i,Srt=/:[0-9]*$/,Ert=/^(\/\/?(?!\/)[^\?\s]
342*)(\?[^\s]*)?$/,krt=["<",">",'"',"`"," ","\r",` 343`," "],_rt=["{","}","|","\\","^","`"].concat(krt),Art=["'"].concat(_rt),iQ=["%","/","?",";","#"].concat(Art),oQ=["/","?","#"],Nrt=255,sQ=/^[+a-z0-9A-Z_-]{0,63}$/,jrt=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,aQ={javascript:!0,"javascript:":!0},lQ={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function iI(e,t){if(e&&e instanceof G4)return e;const n=new G4;return n.parse(e,t),n}G4.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const c=Ert.exec(o);if(c)return this.pathname=c[1],c[2]&&(this.search=c[2]),this}let s=Crt.exec(o);if(s&&(s=s[0],n=s.toLowerCase(),this.protocol=s,o=o.substr(s.length)),(t||s||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(s&&aQ[s])&&(o=o.substr(2),this.slashes=!0)),!aQ[s]&&(i||s&&!lQ[s])){let c=-1;for(let y=0;y<oQ.length;y++)r=o.indexOf(oQ[y]),r!==-1&&(c===-1||r<c)&&(c=r);let d,f;c===-1?f=o.lastIndexOf("@"):f=o.lastIndexOf("@",c),f!==-1&&(d=o.slice(0,f),o=o.slice(f+1),this.auth=d),c=-1;for(let y=0;y<iQ.length;y++)r=o.indexOf(iQ[y]),r!==-1&&(c===-1||r<c)&&(c=r);c===-1&&(c=o.length),o[c-1]===":"&&c--;const p=o.slice(0,c);o=o.slice(c),this.parseHost(p),this.hostname=this.hostname||"";const m=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!m){const y=this.hostname.split(/\./);for(let v=0,b=y.length;v<b;v++){const C=y[v];if(C&&!C.match(sQ)){let S="";for(let E=0,A=C.length;E<A;E++)C.charCodeAt(E)>127?S+="x":S+=C[E];if(!S.match(sQ)){const E=y.slice(0,v),A=y.slice(v+1),_=C.match(jrt);_&&(E.push(_[1]),A.unshift(_[2])),A.length&&(o=A.join(".")+o),this.hostname=E.join(".");break}}}}this.hostname.length>Nrt&&(this.hostname=""),m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const a=o.indexOf("#");a!==-1&&(this.hash=o.substr(a),o=o.slice(0,a));const l=o.indexOf("?");return l!==-1&&(this.search=o.substr(l),o=o.slice(0,l)),o&&(this.pathname=o),lQ[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};G4.prototype.parseHost=function(e){let t=Srt.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const Trt=Object.freeze(Object.defineProperty({__proto__:null,decode:B0,encode:cb,format:rI,parse:iI},Symbol.toStringTag,{value:"Module"})),Ype=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Xpe=/[\0-\x1F\x7F-\x9F]/,Mrt=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,oI=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,Zpe=/[\$\+<->
343\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Qpe=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Ort=Object.freeze(Object.defineProperty({__proto__:null,Any:Ype,Cc:Xpe,Cf:Mrt,P:oI,S:Zpe,Z:Qpe},Symbol.toStringTag,{value:"Module"})),Rrt
vendor: 8,319 bytes, line 343
343=new Uint16Array('áµ<ÃıÊÒÕ»×ÙµÛÞ¢ßà à©àªà¶¡à¹à¼à¼¦áá¨á¡ááááá¥\0\0\0\0\0\0á«áá¦á°á·á½¾â â°âââ»ââ ¤â¤â´â¹â¿ããºã¹ã¬ã£¾ã¨¨ã©±ã« 㬮à EMabcfglmnoprstu\\bfms�¦³¹ÃÃligè»ÃäPè»&ä¦cuteè»Ãäreve;äÄiyx}rcè»Ãä;är;ìðraveè»Ãäpha;äacr;äd;æ©Ägp¡on;äf;ìð¸plyFunction;æ¡ingè»Ã
ä
Äcs¾Ãr;ìðign;æildeè»Ãämlè»ÃäÐaceforsuåûþÄÄĢħĪÄcrêòkslash;æÅ¶Ã¶Ã¸;æ«§ed;æy;äÆcrtÄ
ÄÄause;æµnoullis;æ¬a;är;ìð
pf;ìð¹eve;äcòÄmpeq;æÜHOacdefhilorsuÅÅÅÆÆÆ¢ÆµÆ·ÆºÇÈɳɸɾcy;ä§PYè»Â©ä©ÆcpyÅŢźute;äÄ;iŧŨætalDifferentialD;æ
leys;æÈaeioÆÆÆÆron;ädilè»Ãärc;änint;æ°ot;äÄdnƧÆilla;ä¸terDot;ä·Ã²Å¿i;ä§rcleÈDMPTÇÇÇÇot;æinus;ælus;æimes;æoÄcsǢǸkwiseContourIntegral;æ²eCurlyÄDQÈÈoubleQuote;æuote;æÈlnpuÈȨÉÉonÄ;eȥȦæ·;æ©´ÆgitȯȶȺruent;æ¡nt;æ¯ourIntegral;æ®ÄfrÉÉ;æoduct;ænterClockwiseContourIntegral;æ³oss;樯cr;ìðpÄ;CÊÊ
æap;æÖDJSZacefiosÊ Ê¬Ê°Ê´Ê¸ËËˡ˦̳ÒÄ;oŹʥtrahd;æ¤cy;äcy;ä
cy;äÆgrsÊ¿ËËger;æ¡r;æ¡hv;櫤ÄayËËron;ä;älÄ;tËËæa;är;ìðÄaf˫̧Äcm˰̢riticalÈADGTÌÌÌÌcute;ä´oÅ´ÌÌ;äbleAcute;ärave;ä ilde;äond;æferentialD;æ
Ѱ̽\0\0\0ÍÍ\0Ð
f;ìð»Æ;DEÍÍÍä¨ot;æqual;æbleÌCDLRUVͣͲÎÏϢϸontourIntegraìȹoɴ͹\0\0ͻ»ÍnArrow;æÄeoÎΤftÆARTÎÎΡrrow;æightArrow;æeÃ¥ËngÄLRΫÏeftÄARγιrrow;æ¸ightArrow;æºightArrow;æ¹ightÄATÏÏrrow;æee;æ¨pÉÏ©\0\0ϯrrow;æownArrow;æerticalBar;æ¥nÌABLRTaÐЪаÑѿͼrrowÆ;BUÐÐТæar;æ¤pArrow;æµreve;äeftËк\0Ñ\0ÑightVector;æ¥eeVector;æ¥ectorÄ;BÑÑæ½ar;æ¥ightÇѧ\0ѱeeVector;æ¥ectorÄ;BѺѻæar;æ¥eeÄ;AÒÒæ¤rrow;æ§ÄctÒÒr;ìðrok;äà NTacdfglmopqstuxÒ½ÓÓÓÓÓ¢Ó§Ó®ÓµÔ¡Ô¯Ô¶ÕÕÕ Õ¥G;ä
Hè»Ãäcuteè»ÃäÆaiyÓÓÓron;ärcè»Ãä;äot;är;ìðraveè»Ãäement;æÄapÓºÓ¾cr;ätyÉÔ\0\0ÔmallSquare;æ»erySmallSquare;æ«ÄgpÔ¦Ôªon;äf;ìð¼silon;äuÄaiÔ¼ÕlÄ;TÕÕæ©µilde;ælibrium;æÄciÕÕr;æ°m;橳a;ämlè»ÃäÄipÕªÕ¯sts;æonentialE;æ
ÊcfiosÖ
ÖÖÖ²×y;ä¤r;ìðlledÉÖ\0\0Ö£mallSquare;æ¼erySmallSquare;æªÍ°Öº\0Ö¿\0\0×f;ìð½All;æriertrf;æ±cÃ²×ØJTabcdfgorst×¨×¬×¯×ºØØØØØØ£Ù¬Ù²cy;äè»>ä¾mmaÄ;d׷׸ä;äreve;äÆeiyØØØdil;ä¢rc;ä;äot;ä r;ìð;æpf;ìð¾eaterÌEFGLSTصÙÙÙÙÙ¦qualÄ;Lؾؿæ¥ess;æullEqual;æ§reater;檢ess;æ·lantEqual;橾ilde;æ³cr;ìð¢;æ«ÐAacfiosuÚ
ÚÚÚÚÚªÚ¾ÛRDcy;äªÄctÚÚek;ä;äirc;ä¤r;ælbertSpace;æÇ°Ú¯\0Ú²f;æizontalLine;æÄctÛÛ
òکrok;ä¦mpÅÛÛownHumðįqual;æÜEJOacdfgmnostuÛºÛ¾ÜÜÜÜÜܡܨÝݸÞÞÞcy;älig;ä²cy;äcuteè»ÃäÄiyÜÜrcè»Ãä;äot;ä°r;æraveè»ÃäÆ;apÜ Ü¯Ü¿ÄcgÜ´Ü·r;äªinaryI;æ
lieóÏÇ´Ý\0Ý¢Ä;eÝÝæ¬ÄgrÝÝral;æ«section;æisibleÄCTݬݲomma;æ£imes;æ¢ÆgptÝ¿ÞÞon;ä®f;ìða;äcr;æilde;ä¨Ç«Þ\0Þcy;älè»ÃäÊcfosuÞ¬Þ·Þ¼ßßÄiyÞ±Þµrc;ä´;är;ìðpf;ìðÇ£ß\0ßr;ìð¥rcy;äkcy;äÎHJacfosߤߨ߽߬߱à à cy;ä¥cy;äppa;äÄeyß¶ß»dil;ä¶;är;ìðpf;ìðcr;ìð¦ÖJTaceflmostà ¥à ©à ¬à¡à¡£à¦³à¦¸à§à§à¨·à©cy;äè»<ä¼Êcmnprà ·à ¼à¡à¡à¡ute;ä¹bda;äg;æªlacetrf;ær;æÆaeyà¡à¡à¡¡ron;ä½dil;ä»;äÄfsࡨ॰tÔACDFRTUVarࡾࢩࢱࣦ࣠ࣼयà¥Î४Änrà¢à¢gleBracket;æ¨rowÆ;BRà¢à¢à¢æar;æ¤ightArrow;æeiling;æoǵࢷ\0à£bleBracket;æ¦nÇà£\0à£eeVector;楡ectorÄ;Bà£à£æar;æ¥loor;æightÄAV࣯ࣵrrow;æector;æ¥Äerà¤à¤eÆ;AVà¤à¤à¤æ£rrow;æ¤ector;æ¥iangleÆ;BEतथऩæ²ar;æ§qual;æ´pÆDTVषà¥à¥ownVector;æ¥eeVector;æ¥ ectorÄ;Bà¥à¥æ¿ar;æ¥ectorÄ;B॥०æ¼ar;æ¥ightáÎsÌEFGLSTॾà¦à¦à¦à¦¢à¦qualGreater;æullEqual;æ¦reater;æ¶ess;檡lantEqual;橽ilde;æ²r;ìðÄ;eঽাæftarrow;æidot;ä¿Ænpwà§à¨à¨gÈLRlrà§à§·à¨à¨eftÄAR০৬rrow;æµightArrow;æ·ightArrow;æ¶eftÄarγà¨ightáοightáÏf;ìðerÄLRਢਬeftArrow;æightArrow;æÆchtਾà©à©Ã²à¡;æ°rok;ä
;æªÐacefiosuà©à©à© ੷੼àª
àªàªp;æ¤
y;äÄdl੥੯iumSpace;ælintrf;æ³r;ìðnusPlus;æpf;ìðcò੶;äÒJacefostuણધàªà«à¬à¬à¶à¶à¶cy;äcute;ä
Æaey઴હાron;ä
dil;ä
;äÆgswà«à«°à¬ativeÆMTVà«à«à«¨ediumSpace;æhiÄcn૦à«Ã«à«eryThiîà«tedÄGL૸à¬reaterGreateòٳessLesóà©Line;är;ìðÈBnptଢନଷ଺reak;æ BreakingSpace;ä f;æÚ;CDEGHLNPRSTVàààªà¼à®¡à¯«à°à±à²à²¦à³àµ¡à¶
櫬Äouàà¤ngruent;æ¢pCap;æoubleVerticalBar;æ¦Ælqxà®à®à®ement;æualÄ;Tà®à®æ ilde;ìâ̸ists;æreaterÎ;EFGLSTஶஷ஽à¯à¯à¯à¯¥æ¯qual;æ±ullEqual;ìâ§Ì¸reater;ìâ«Ì¸ess;æ¹lantEqual;ì⩾̸ilde;æµumpÅ௲௽ownHump;ìâ̸qual;ìâ̸eÄfsà°à°§tTriangleÆ;BEà°à°à°¡æªar;ìâ§Ì¸qual;æ¬sÌ;EGLSTవశ఼à±à±à±æ®qual;æ°reater;æ¸ess;ìâªÌ¸lantEqual;ì⩽̸ilde;æ´estedÄGL౨౹reaterGreater;ì⪢̸essLess;ì⪡̸recedesÆ;ESà²à²à²æqual;ì⪯̸lantEqual;æ ÄeiಫಹverseElement;æghtTriangleÆ;BEà³à³à³æ«ar;ìâ§Ì¸qual;æÄquà³à´uareSuÄbp೨೹setÄ;Eà³°à³³ìâ̸qual;æ¢ersetÄ;Eà´à´ìâ̸qual;æ£Æbcpà´à´¤àµsetÄ;Eà´à´ìââqual;æceedsÈ;ESTà´²à´³à´»àµæqual;ì⪰̸lantEqual;æ¡ilde;ìâ¿Ì¸ersetÄ;Eàµàµìââqual;æildeÈ;EFT൮൯൵ൿæqual;æullEqual;æilde;æerticalBar;æ¤cr;ìð©ildeè»Ãä;äÜEacdfgmoprstuvà¶½à·à·à·à·à· à·§à·¼à¸à¸ ยา฿à¹lig;ä
cuteè»ÃäÄiyà·à·rcè»Ãä;äblac;ä
r;ìðraveè»ÃäÆaei෮ෲ෶cr;ä
ga;ä©cron;äpf;ìðenCurlyÄDQà¸à¸oubleQuote;æuote;æ;æ©Äclวฬr;ìðªashè»ÃäiŬื฼deè»Ãäes;樷mlè»ÃäerÄBPà¹à¹ Äarà¹à¹r;æ¾acÄekà¹à¹;æet;æ´arenthesis;æÒacfhilors๿àºàºàºàºàºàºàº°à»¼rtialD;æy;är;ìði;ä¦;ä usMinus;ä±ÄipຢàºncareplanÃ¥Úf;æÈ;eio຺ູ໠໤檻cedesÈ;ESTà»à»à»à»æºqual;檯lantEqual;æ¼ilde;æ¾me;æ³Ädp໩໮uct;æortionÄ;aȥ໹l;æÄcià¼à¼r;ìð«;ä¨ÈUfosà¼à¼à¼à¼OTè»"ä¢r;ìðpf;æcr;ìð¬ØBEacefhiorsu༾à½à½à½ ཱིྦྷྪà¾áá©á´á¾arr;æ¤Gè»Â®ä®Æcnrà½à½à½ute;ä
g;æ«rÄ;tà½à½æ l;æ¤Æaeyཧཬཱron;ä
dil;ä
;ä Ä;vླྀཹæerseÄEUà¾à¾Älqà¾à¾ement;æuilibrium;æpEquilibrium;楯r»ཹo;ä¡ghtÐACDFTUVaà¿à¿«à¿³á¢á¨ááÏÄnrà¿à¿gleBracket;æ©rowÆ;BLà¿à¿à¿¡æar;æ¥eftArrow;æeiling;æoǵ࿹\0á
bleBracket;æ§nÇá\0áeeVector;æ¥ectorÄ;Bááæar;æ¥loor;æÄerááeÆ;AVáµá¶á¼æ¢rrow;æ¦ector;æ¥iangleÆ;BEáááæ³ar;æ§qual;æµpÆDTVá£á®á¸ownVector;æ¥eeVector;æ¥ectorÄ;Bááæ¾ar;æ¥ectorÄ;Bááæar;æ¥Äpuááf;ændImplies;楰ightarrow;æÄchá¹á¼r;æ;æ±leDelayed;æ§´ÚHOacfhimoqstuá¤á±á·á½ááá
á
á
¡á
§áµá»á¿ÄCcá©á®Hcy;ä©y;ä¨FTcy;ä¬cute;ä
Ê;aeiyáááááæª¼ron;ä
dil;ä
rc;ä
;ä¡r;ìðortÈDLRUáªá´á¾á
ownArrow»ÐeftArrow»à¢ightArrow»à¿pArrow;ægma;ä£allCircle;æpf;ìðɲá
\0\0á
°t;æareÈ;ISUá
ȇ
¼áá¯æ¡ntersection;æuÄbpáásetÄ;Eááæqual;æersetÄ;Eá¨á©æqual;ænion;æcr;ìð®ar;æÈbcmpááááÄ;sááæetÄ;Eááqual;æÄchá á
eedsÈ;ESTáá®á´á¿æ»qual;檰lantEqual;æ½ilde;æ¿Tháà¾;æÆ;esááá£ærsetÄ;Eááæqual;æet»áÖHRSacfhiorsá¾ááááá±á¶ááááORNè»ÃäADE;æ¢ÄHcáácy;äy;ä¦Äbuáá;ä;䤯aeyá¥áªá¯ron;ä
¤dil;ä
¢;ä¢r;ìðÄeiá»áDzá\0áefore;æ´a;äÄcnáákSpace;ìââSpace;ældeÈ;EFTá«á¬á²á¼æ¼qual;æullEqual;æ
ilde;æpf;ìðipleDot;æÄctáár;ìð¯rok;ä
¦à«¡á·ááá¦\0á¬á±\0\0\0\0\0á¸á½á·á
\0á¿áááÄcrá»áuteè»ÃärÄ;oááæcir;æ¥rÇ£á\0áy;äve;ä
¬Äiyáá£rcè»Ãä;ä£blac;ä
°r;ìðraveè»Ãäacr;ä
ªÄdiáá©erÄBPááÄaráár;äacÄekáá;æet;æµarenthesis;æonÄ;Pá°á±ælus;æÄgpá»á¿on;ä
²f;ìðÐADETadpsáá®á¸áϨááá³rrowÆ;BDá
á á¤ar;æ¤ownArrow;æ
ownArrow;æquilibrium;楮eeÄ;Aááæ¥rrow;æ¥ownáϳerÄLRáá¨eftArrow;æightArrow;æiÄ;lá¹áºäon;ä¥ing;ä
®cr;ìð°ilde;ä
¨mlè»ÃäÒDbcdefosvá§á¬á°á³á¾á
áááash;æ«ar;æ««y;äashÄ;lá»á¼æ©;櫦Äeráá
;æÆbtyáááºar;æÄ;iáácalÈBLSTá¡á¥áªá´ar;æ£ine;ä¼eparator;æilde;æThinSpace;ær;ìðpf;ìðcr;ìð±dash;æªÊcefosá§á¬á±á¶á¼irc;ä
´dge;ær;
vendor: 7,828 bytes, line 343
343ìðpf;ìðcr;ìð²Èfiosáááár;ìð;äpf;ìðcr;ìð³ÒAIUacfosuá±áµá¹á½ááááá cy;ä¯cy;äcy;ä®cuteè»ÃäÄiyáárc;ä
¶;ä«r;ìðpf;ìðcr;ìð´ml;ä
¸ÐHacdefosáµá¹á¿áááá á¤cy;äcute;ä
¹Äayááron;ä
½;äot;ä
»Ç²á\0áoWidtèà«a;är;æ¨pf;æ¤cr;ìðµà¯¡ááá\0á°á¶á¿\0\0\0\0ááá«áá\0ááá²á¹\0á¾cuteè»Ã¡ä¡reve;äÌ;Ediuyááá¡á£á¨áæ¾;ìâ¾Ì³;æ¿rcè»Ã¢ä¢teè»Â´Ì;ä°ligè»Ã¦ä¦Ä;r²áº;ìðraveè»Ã ä ÄepááÄfpáásym;æµÃ¨áha;ä±ÄapácÄclá¤á§r;äg;樿ɤá°\0\0áÊ;adsváºá»á¿ááæ§nd;æ©;æ©lope;æ©;æ©Î;elmrszááááá¿ááæ ;榤e»ásdÄ;aá¥á¦æ¡Ñ¡á°á²á´á¶á¸áºá¼á¾;榨;榩;榪;榫;榬;æ¦;榮;榯tÄ;vá
áæbÄ;dááæ¾;æ¦Äptááh;æ¢Â»Â¹arr;æ¼Ägpá£á§on;ä
f;ìðÎ;Eaeiopáá»á½áááá;æ©°cir;橯;æd;æs;ä§roxÄ;eááñáingè»Ã¥ä¥Æctyá¡á¦á¨r;ìð¶;äªmpÄ;eáá¯Ã±Êildeè»Ã£ä£mlè»Ã¤ä¤Äciááoninôɲnt;æ¨à Nabcdefiklnoprsuáá±á°á¼ááá¸á½á á¦á ¹á¡á᤽á¥á¥°ot;æ«Äcrá¶ákÈcepsáá
ááong;æpsilon;ä¶rime;æµimÄ;eááæ½q;æÅ¶á¢á¦ee;æ½edÄ;gá¬áæ
e»árkÄ;táá·brk;æ¶Äoyáá;ä±quo;æÊcmprtááá¡á¤á¨ausÄ;eÄÄptyv;榰séánoÃµÄÆahwá¯á±á³;ä²;æ¶een;æ¬r;ìðgÎcostuvwááá³ááááÆaiuáááÃ°Ý rc;æ¯pÂ»á±Ædptá¤á¨áot;æ¨lus;æ¨imes;æ¨É±á¹\0\0á¾cup;æ¨ar;æ
riangleÄduááown;æ½p;æ³plus;æ¨eÃ¥áÃ¥áarow;æ¤Æakoáá ¦á µÄcná²á £kÆlstáºÖ«á ozenge;æ§«riangleÈ;dlrá á á á æ´own;æ¾eft;æight;æ¸k;æ£Æ±á «\0á ³Æ²á ¯\0á ±;æ;æ4;æck;æÄeoá ¾á¡Ä;qá¡á¡ì=â¥uiv;ìâ¡â¥t;æÈptwxá¡á¡á¡§á¡¬f;ìðÄ;táá¡£om»átie;æØDHUVbdhmptuvá¢
á¢á¢ªá¢»á£á£á£¬á£¿á¤
á¤á¤á¤¡ÈLRlrá¢á¢á¢á¢;æ;æ;æ;æÊ;DUduᢡᢢᢤᢦᢨæ;æ¦;æ©;æ¤;æ§ÈLRlrᢳᢵᢷᢹ;æ;æ;æ;æÎ;HLRhlrá£á£á£á£á£á£á£æ;æ¬;æ£;æ ;æ«;æ¢;æox;æ§ÈLRlrᣤᣦᣨᣪ;æ;æ;æ;æÊ;DUduڽ᣷᣹᣻᣽;æ¥;æ¨;æ¬;æ´inus;ælus;æimes;æ ÈLRlrá¤á¤á¤á¤;æ;æ;æ;æÎ;HLRhlrᤰᤱᤳᤵᤷ᤻᤹æ;æª;æ¡;æ;æ¼;æ¤;æÄevÄ£á¥barè»Â¦ä¦Èceioá¥á¥á¥á¥ r;ìð·mi;æmÄ;eáálÆ;bhᥨᥩᥫä;æ§
sub;æÅ¬á¥´á¥¾lÄ;e᥹᥺æ¢t»᥺pÆ;Eeįá¦
á¦;檮Ä;qÛÛೡᦧ\0᧨á¨á¨á¨²\0ᨷá©\0\0᪴\0\0á«\0\0ᬡᬮáá\0᯽\0á°Æcprá¦á¦²á§ute;äÌ;abcdsᦿá§á§á§á§á§æ©nd;æ©rcup;æ©Äauá§á§p;æ©p;æ©ot;æ©;ìâ©ï¸Äeo᧢᧥t;æÃ®ÚÈaeiuá§°á§»á¨á¨
ǰ᧵\0᧸s;æ©on;ädilè»Ã§ä§rc;äpsÄ;sá¨á¨æ©m;æ©ot;äÆdmná¨á¨ ᨦilè»Â¸Æptyv;榲tè¢;eá¨á¨®ä¢räƲr;ìð Æceiᨽá©á©y;äckÄ;má©á©æark»á©;ärÎ;Ecefmsá©á© ᩢᩫ᪤᪪᪮æ;æ§Æ;elᩩᩪá©äq;æeɡᩴ\0\0áªrrowÄlr᩼áªeft;æºight;æ»ÊRSacdáªáªáªáªáªÂ»à½;æst;æirc;æash;ænint;æ¨id;櫯cir;æ§ubsÄ;u᪻᪼æ£it»᪼ˬá«á«á«º\0á¬onÄ;eá«á«äºÄ;qÃÃÉá«\0\0á«¢aÄ;tá«á«ä¬;äÆ;fl᫨᫩᫫æÃ®á
eÄmx᫱᫶ent»᫩eóÉǧ᫾\0á¬Ä;dá»á¬ot;æ©nÃ´ÉÆfryá¬á¬á¬;ìðoäÉè©;sÅá¬r;æÄaoᬥᬩrr;æµss;æÄcuᬲᬷr;ìð¸ÄbpᬼáÄ;eááæ«;æ«Ä;eááæ«;æ«dot;æ¯Îdelprvwá á¬á·á®á®¬á¯á¯¹arrÄlrá¨áª;椸;椵ɰá²\0\0áµr;æc;æarrÄ;pá¿á®æ¶;椽Ì;bcdosá®á®á®á®¡á®¥á®¨æªrcap;æ©Äauá®á®p;æ©p;æ©ot;ær;æ©
;ìâªï¸Èalrv᮵ᮿá¯á¯£rrÄ;mᮼᮽæ·;椼yÆevwá¯á¯á¯qɰá¯\0\0á¯reãá³uãáµee;æedge;æenè»Â¤ä¤earrowÄlrᯮ᯳eft»á®ight»ᮽeäá¯Äciá°á°oninôǷnt;æ±lcty;æà¦AHabcdefhijlorstuwz᰸᰻᰿á±á±©á±µá²á²á²¬á²·á³»á³¿á´áµ»á¶á¶«á¶»á·á·ròÎar;楥Èglrsá±á±á±á±ger;æ eth;æ¸Ã²á³hÄ;vá±á±æÂ»à¤Å«á±¡á±§arow;æ¤aãÌÄayᱮᱳron;ä;ä´Æ;ao̲ᱼá²ÄgrÊ¿á²r;ætseq;æ©·Æglmá²á²á²è»Â°ä°ta;ä´ptyv;榱ÄirᲣᲨsht;楿;ìð¡arÄlrᲳᲵ»à£Â»áÊaegsvá³Í¸á³á³á³ mÆ;oșá³á³ndÄ;șá³uit;æ¦amma;äin;æ²Æ;io᳧᳨᳸ä·deè÷;oá³§á³°ntimes;ænø᳷cy;äcɯá´\0\0á´rn;æop;æÊlptuwá´á´á´¢áµáµlar;ä¤f;ìðÊ;empsÌá´á´·á´½áµqÄ;dÍá´³ot;æinus;æ¸lus;æquare;æ¡blebarwedgåúnÆadhá®áµáµ§ownarrowóá²arpoonÄlrᵲᵶefôᲴighôᲶŢᵿá¶
karo÷à½É¯á¶\0\0á¶rn;æop;æÆcotá¶á¶£á¶¦Äryá¶á¶¡;ìð¹;äl;æ§¶rok;äÄdrá¶°á¶´ot;æ±iÄ;fá¶ºá æ¿Äahá·á·ròЩaòྦangle;榦Äciá·á·y;ägrarr;æ¿à¤Dacdefglmnopqrstuxá¸á¸á¸á¸¸Õ¸á¸¼á¹á¹¡á¹¾áº¥áº¯áº½á»¡á¼ªá¼·á½á½á½ÄDoá¸á´´oôá²Äcsá¸á¸uteè»Ã©ä©ter;æ©®ÈaioyḢḧḱḶron;ärÄ;cá¸á¸®æè»Ãªäªlon;æ;äot;äÄDrá¹á¹
ot;æ;ìð¢Æ;rsá¹á¹á¹æªaveè»Ã¨ä¨Ä;dá¹á¹æªot;æªÈ;ilsṪṫṲṴæªnters;æ§;æÄ;dṹṺæªot;æªÆapsáº
áºáºcr;ätyÆ;sváºáºáºæ
et»áºpÄ1;áºáº¤Ä³áº¡áº£;æ;æ
æÄgsẪẬ;ä
p;æÄgpẴẸon;äf;ìðÆalsá»á»á»rÄ;sá»á»æl;æ§£us;橱iÆ;lvá»á»á»äµon»á»;äµÈcsuvỪỳá¼á¼£Äioữḱrc»Ḯɩỹ\0\0á»»ÃÕantÄglá¼á¼tr»á¹ess»ṺÆaeiá¼á¼á¼ls;ä½st;ævÄ;DȵἠD;橸parsl;æ§¥ÄDaἯἳot;ærr;楱Æcdiá¼¾á½á»¸r;æ¯oôÍÄahá½á½;ä·è»Ã°ä°Ämrá½á½lè»Ã«ä«o;æ¬Æcipὡὤὧl;ä¡sôծÄeoὬὴctatioîÕnentialåչৡá¾\0á¾\0ᾡᾧ\0\0á¿á¿\0á¿\0ῦῪâ\0ââllingdotseñá¹y;ämale;æÆilrá¾á¾³á¿lig;èï¬É©á¾¹\0\0á¾½g;èï¬ig;èï¬;ìð£lig;èï¬lig;ìfjÆaltá¿á¿á¿¡t;æig;èï¬ns;æ±of;äǰ΅\0ῳf;ìðÄakÖ¿á¿·Ä;vῼ´æ;æ«artint;æ¨ÄaoââÄcsââαââ°â¸â
â\0âβâ¢â¥â§âªâ¬\0â®è»Â½ä½;æ
è»Â¼ä¼;æ
;æ
;æ
Ƴâ´\0â¶;æ
;æ
Ê´â¾â\0\0âè»Â¾ä¾;æ
;æ
5;æ
ƶâ\0â;æ
;æ
8;æ
l;æwn;æ¢cr;ìð»à¢Eabcdefgijlnorstvââââ¥â°â´â°âµâºâ¿âââ¸Ìâ¾â
âÄ;lÙâ;æªÆcmpâââute;äµmaÄ;dâá³ä³;æªreve;äÄiyâªâ®rc;ä;ä³ot;ä¡È;lqsؾÙâ½âÆ;qsؾÙâlanô٥È;cdlÙ¥âââ¥c;檩otÄ;oââæªÄ;lâ¢â£æª;æªÄ;eâªâìâï¸s;æªr;ìð¤Ä;gÙ³Ømel;æ·cy;äÈ;EajÙâââ;æª;檥;檤ÈEaesâââ©â´;æ©pÄ;pâ£â¤æªrox»â¤Ä;qâ®â¯æªÄ;qâ®âim;æ§pf;ìðÄciâ
â
r;æmÆ;elÙ«â
â
;æª;æªè>;cdlqr×®â
â
ªâ
®â
³â
¹Äciâ
¥â
§;檧r;橺ot;æPar;æ¦uest;橼Êadelsââ
ªâÙâǰâ\0âproøâr;楸qÄlqØ¿âlesóâiÃÙ«Äenâ£ârtneqq;ìâ©ï¸Ã
âªÔAabcefkosyâââ±âµâºâââ¯â¨â½ròΠÈilmrâââârsðáf»â¤ilôکÄdrâ â¤cy;äÆ;cwࣴâ«â¯ir;æ¥;æar;æirc;䥯alrââârtsÄ;uââæ¥it»âlip;æ¦con;æ¹r;ìð¥sÄewâ£â©arow;椥arow;椦Êamoprâºâ¾âââ£rr;æ¿tht;æ»kÄlrââeftarrow;æ©ightarrow;æªf;ìðbar;æÆcltâ¯â´â¸r;ìð½asèâ´rok;ä§Äbpââull;æhen»á±à«¡â£\0âª\0â¸â
â\0ââ³\0\0â¸â¢â§â¢â¿\0ââªâ´cuteè»ÃäÆ;iyݱâ°âµrcè»Ã®ä®;ä¸Äcxâ¼â¿y;äµclè»Â¡ä¡ÄfrÎâ;ìð¦raveè»Ã¬ä¬È;inoܾââ©â®Äinâ¢â¦nt;æ¨t;æfin;æ§ta;æ©lig;䳯aopâ¾ââÆcgtâ
ââr;䫯elpÜââinÃ¥ÞarÃ´Ü h;ä±f;æ·ed;äµÊ;cfotÓ´â¬â±â½âare;æ
inÄ;tâ¸â¹æie;æ§doôâÊ;celpÝââââ¡al;æºÄgrââeróá£Ã£âarhk;æ¨rod;樼Ècgptâ¯â²â¶â»y;äon;ä¯f;ìða;ä¹uestè»Â¿ä¿Äciââr;ìð¾nÊ;EdsvÓ´âââ¡Ó³;æ¹ot;æµÄ;vâ¦â§æ´;æ³Ä;iÝ·â®lde;ä©Ç«â¸\0â¼cy;älè»Ã¯ä¯Ìcfmosuââââ¡â§âµÄiyâârc;äµ;ä¹r;ìð§ath;ä·pf;ìðÇ£â¬\0â±r;ìð¿rcy;äkcy;äÐacfghjosâââ¢â§ââ±âµâ»ppaÄ;vââäº;ä°Äeyââ dil;ä·;äºr;ìð¨reen;ä¸cy;ä
cy;äpf;ìðcr;ìðà®ABEHabcdefghjlmnoprstuvâ°ââââââ½âââââ¥â¹â½ââ²âââ¨âââ â Æartâ·âºâ¼ròà§Ã²Îail;æ¤arr;æ¤Ä;gà¦â;æªar;楢ॣâ¥\0âª\0â±\0\0\0\0\0âµâº\0âââ\0â¹ute;äºmptyv;榴raîà¡bda;ä»gÆ;dlà¢ââ;æ¦Ã¥à¢;æª
uoè»Â«ä«rÐ;bfhlpstà¢ââ¦â©â«â®â±âµÄ;fà¢â£s;æ¤s;æ¤Ã«âp;æ«l;椹im;楳l;æ¢Æ;aeâ¿ââæª«il;æ¤Ä;sââæª;ìâªï¸Æabrââârr;æ¤rk;æ²Äakâ¢â¬cÄekâ¨âª;ä»;äÄesâ±â³;æ¦lÄduâ¹â»;æ¦;æ¦Èaeuyââââron;ä¾Ädiââil;ä¼Ã¬à¢°Ã¢â©;
vendor: 4,294 bytes, line 343
343ä»Ècqrsâ£â¦ââ½a;椶uoÄ;rà¸áÄduâ²â·har;楧shar;æ¥h;æ²Ê;fgqsââà¦â³â¿æ¤tÊahlrtââ¤â·ââ¨rrowÄ;tà¢â¡aéâ¶arpoonÄduâ¯â´own»Ñp»०eftarrows;æightÆahsââârrowÄ;sࣴࢧarpoonóà¾quigarro÷â°hreetimes;æÆ;qsâà¦âºlanôবÊ;cdgsবââââ¨c;檨otÄ;oââæ©¿Ä;rââæª;æªÄ;eâ¢â¥ìâï¸s;æªÊadegsâ³â¹â½ââpproøâot;æqÄgqââ
ôà¦gtòâôà¦iÃলÆilrâ࣡âsht;楼;ìð©Ä;Eà¦â£;æªÅ¡â©â¶rÄduâ²â®Ä;l॥â³;楪lk;æcy;äÊ;achtà©ââââròâorneòá´ard;楫ri;æºÄioââ¤dot;ä
ustÄ;aâ¬âæ°che»âÈEaesâ»â½ââ;æ¨pÄ;pââæªrox»âÄ;qââæªÄ;qââ»im;æ¦Ðabnoptwzâ©â´â·ââ¯âââÄnrâ®â±g;æ¬r;æ½rëà£gÆlmrâ¿ââeftÄar০âightá৲apsto;æ¼ightá৽parrowÄlrâ¥â©efôâight;æ¬Æaflâ¶â¹â½r;æ¦
;ìðus;æ¨imes;樴šââst;æÃ¡áÆ;efââá ænge»âarÄ;lâ¤â¥ä¨t;æ¦Êachmtâ³â¶â¼â
âròࢨorneòá¶arÄ;dà¾â;æ¥;æri;æ¿Ìachiqtââà©â¢â®â»quo;æ¹r;ìðmÆ;egলâªâ¬;æª;æªÄbuâªâ³oÄ;rà¸â¹;ærok;ä
è<;cdhilqrà «ââ¹ââ â¥âªâ°Äciââ;檦r;橹reÃ¥â²mes;æarr;楶uest;æ©»ÄPiâµâ¹ar;æ¦Æ;efâ à¤á ærÄduâ â shar;æ¥har;楦Äenâ â ¡rtneqq;ìâ¨ï¸Ã
â ÜDacdefhilnopsuâ¡â¡
â¢â¢â¢â¢ ⢥⢨â£â£¢â£¤àªâ£³â¤Dot;æºÈclprâ¡â¡â¡£â¡½rè»Â¯ä¯Äetâ¡â¡;æÄ;eâ¡â¡æ se»â¡Ä;sá»â¡¨toÈ;dluá»â¡³â¡·â¡»owîÒefôà¤Ã°áker;æ®Äoyâ¢â¢mma;権;ä¼ash;æasuredangle»á¦r;ìðªo;æ§Æcdn⢯⢴â£roè»ÂµäµÈ;acdá¤â¢½â£â£sôá§ir;æ«°otè»Â·ÆµusÆ;bdâ£á¤â£æÄ;uá´¼â£;横ţâ£â£¡p;æ«Ã²âðàªÄdp⣩⣮els;æ§f;ìðÄct⣸⣽r;ìðpos»áÆ;lmâ¤â¤â¤ä¼timap;æ¸à°GLRVabcdefghijlmoprstuvwâ¥â¥â¥¾â¦â¦â§â§©â¨â¨â©â©âªâªâª¤âª¨â¬â¬ââ¿â®®â°´â±§â±¼â³©Ägtâ¥â¥;ìâ̸Ä;vâ¥à¯ìâ«âÆeltâ¥â¥²â¥¶ftÄar⥡⥧rrow;æightarrow;æ;ìâ̸Ä;v⥻à±ìâªâightarrow;æÄDdâ¦â¦ash;æ¯ash;æ®Êbcnpt⦣⦧⦬⦱â§la»Ëute;ä
g;ìâ âÊ;Eiopà¶â¦¼â§â§
â§;ì⩰̸d;ìâ̸s;ä
roøà¶urÄ;aâ§â§æ®lÄ;sâ§à¬¸Ç³â§\0â§£pè»Â ଷmpÄ;e௹à°Êaeouyâ§´â§¾â¨â¨â¨Ç°â§¹\0â§»;æ©on;ä
dil;ä
ngÄ;dൾâ¨ot;ìâ©Ì¸p;æ©;ä½ash;æÎ;Aadqsxà®â¨©â¨â¨»â©â©
â©rr;ærÄhr⨳⨶k;椤Ä;oá²á°ot;ìâ̸uiöà£Äeiâ©â©ar;椨Ãà®istÄ;sà® à®r;ìð«ÈEestà¯
⩦⩹⩼Æ;qs஼â©à¯¡Æ;qs஼à¯
â©´lanô௢iÃ௪Ä;rà®¶âªÂ»à®·ÆAapâªâªâªrò⥱rr;æ®ar;櫲Æ;svà¾âªà¾Ä;d⪡⪢æ¼;æºcy;äÎAEadest⪷⪺⪾â«â«
⫶⫹rò⥦;ìâ¦Ì¸rr;ær;æ¥È;fqsà°»â«â«£â«¯tÄarâ«â«rro÷â«ightarroÃ·âªÆ;qs఻⪺⫪lanôà±Ä;sà±â«´Â»à°¶iÃà±Ä;rవ⫾iÄ;eà°à°¥iäà¶Äptâ¬â¬f;ìðè¬;inâ¬â¬â¬¶ä¬nÈ;Edvà®â¬¤â¬¨â¬®;ìâ¹Ì¸ot;ìâµÌ¸Ç¡à®â¬³â¬µ;æ·;æ¶iÄ;vಸ⬼ǡಸââ;æ¾;æ½Æaorââ£â©rÈ;astà»âââlleìà»l;ì⫽â¥;ìâ̸lint;æ¨Æ;ceà²â°â³uåಥÄ;cà²â¸Ä;eà²â½Ã±à²ÈAaitâ®â®â®â®§ròâ¦rrÆ;cwâ®â®â®æ;ì⤳̸;ìâ̸ghtarrow»â®riÄ;eà³à³Îchimpqu⮽â¯â¯â¬à¸â¯¤â¯¯È;cerà´²â¯à´·â¯uÃ¥àµ
;ìðortÉâ¬
\0\0â¯aráâmÄ;e൮â¯Ä;q൴൳suÄbp⯫â¯Ã¥à³¸Ã¥à´Æbcp⯶â°â°È;Ees⯿â°à´¢â°æ;ìâ«
̸etÄ;eà´â°qÄ;qà´£â°cÄ;eà´²â°Ã±à´¸È;EesⰢⰣàµâ°§æ
;ìâ«Ì¸etÄ;eàµâ°®qÄ;qൠⰣÈgilrⰽⰿâ±
â±Ã¬à¯ldeè»Ã±ä±Ã§à±iangleÄlrâ±â±eftÄ;eà°â±Ã±à°¦ightÄ;eà³â±¥Ã±à³Ä;mⱬâ±ä½Æ;esⱴⱵⱹä£ro;æp;æÒDHadgilrsâ²â²â²â²â²£â²°â²¶â³â³£ash;æarr;æ¤p;ìââash;æ¬ÄetⲨⲬ;ìâ¥â;ì>ânfin;æ§ÆAetâ²½â³â³
rr;æ¤;ìâ¤âÄ;râ³â³ì<âie;ìâ´âÄAtâ³â³rr;æ¤rie;ìâµâim;ìâ¼âÆAanâ³°â³´â´rr;ærÄhr⳺⳽k;椣Ä;oá§á¥ear;椧ááª\0\0\0\0\0\0\0\0\0\0\0\0\0â´\0â´¸âµâµ ⵥ⵲â¶á¬\0\0â¶â¶«\0â·â·\0â·â¸â¸«â¸¾â¹Äcsâ´±áªuteè»Ã³ä³Äiyâ´¼âµ
rÄ;cáªâµè»Ã´ä´;ä¾Êabios᪠âµâµÇâµlac;ä
v;樸old;榼lig;ä
Äcr⵩âµir;榿;ìð¬Í¯âµ¹\0\0âµ¼\0â¶n;äaveè»Ã²ä²;æ§Äbmâ¶à·´ar;榵Èacitâ¶â¶â¶¥â¶¨ròáªÄirâ¶â¶ r;榾oss;榻nÃ¥à¹;æ§Æaeiⶱⶵⶹcr;ä
ga;äÆcdnâ·â·
Çron;ä¿;榶pf;ìð Æaelâ·â·Çr;榷rp;榹Î;adiosvⷪⷫⷮâ¸â¸â¸â¸æ¨ròáªÈ;efmâ··â·¸â¸â¸
æ©rÄ;oⷾⷿæ´f»ⷿè»Âªäªè»Âºäºgof;æ¶r;æ©lope;æ©;æ©Æcloâ¸â¸¡â¸§Ã²â¸ashè»Ã¸ä¸l;æiŬⸯ⸴deè»ÃµäµesÄ;aÇ⸺s;樶mlè»Ã¶ä¶bar;æ½à«¡â¹\0â¹½\0âºâº\0⺢⺹\0\0â»àº\0â¼\0\0⼫⾼\0â¿rÈ;
vendor: 6,210 bytes, line 343
343astÐâ¹§â¹²àº
è¶;lâ¹â¹®ä¶leìÐɩ⹸\0\0â¹»m;櫳;櫽y;ä¿rÊcimptâºâºâºá¡¥âºnt;ä¥od;ä®il;æ°enk;æ±r;ìðÆimo⺨⺰⺴Ä;vâºâº®ä;ämaô੶ne;æÆ;tv⺿â»â»ächfork»´;äÄauâ»â»nÄckâ»â»kÄ;hâ´â»;æÃ¶â´sÒ;abcdemst⻳⻴á¤â»¹â»½â¼â¼â¼â¼ä«cir;樣ir;樢Äouáµâ¼;樥;橲nè»Â±àºim;樦wo;樧Æipuâ¼â¼ â¼¥ntint;æ¨f;ìð¡ndè»Â£ä£Ô;Eaceinosuà»â¼¿â½â½â½â¾â¾â¾â½¾â¾¶;檳p;檷uÃ¥à»Ä;cà»â½Ì;acensà»â½â½â½¦â½¨â½¾pproøâ½urlyeñà»Ã±à»Æaes⽯⽶⽺pprox;檹qq;檵im;æ¨iÃà»meÄ;sâ¾àº®æ²ÆEas⽸â¾â½ºÃ°â½µÆdfp໬â¾â¾¯Æals⾠⾥⾪lar;æ®ine;æurf;æÄ;t໻⾴ï໻rel;æ°Äciâ¿â¿
r;ìð
;äncsp;æÌfiopsuâ¿â¢â¿â¿¥â¿«â¿±r;ìð®pf;ìð¢rime;æcr;ìðÆaeo⿸ããtÄei⿾ã
rnionóڰnt;æ¨stÄ;eããä¿Ã±á¼Ã´à¼àªABHabcdefhilmnoprstuxããããã ãã«ã
ã
¢ã
²ãããã¤ã©ãã®ã²ãã°ã·Æartãããròá³Ã²Ïail;æ¤aròᱥar;楤Îcdenqrtã¨ãµã¸ã¿ãããÄeuãã±;ìâ½Ì±te;ä
iãá
®mptyv;榳gÈ;delà¿ããã;æ¦;榥åà¿uoè»Â»ä»rÖ;abcfhlpstwà¿ã¬ã¯ã·ã¹ã¼ã¾ããããp;極Ä;fà¿ ã´s;æ¤ ;椳s;æ¤Ã«âðâ®l;æ¥
im;楴l;æ£;æÄaiããil;æ¤oÄ;nããæ¶alÃ³à¼Æabrã§ãªã®ròá¥rk;æ³Äakã³ã½cÄekã¹ã»;ä½;äÄesãã;æ¦lÄduãã;æ¦;æ¦Èaeuyããã§ã©ron;ä
Ädiã¡ã¥il;ä
ì࿲âãº;äÈclqsã´ã·ã½ã
a;椷dhar;楩uoÄ;rÈÈh;æ³Æacgã
ã
à½lÈ;ipsླྀã
ã
ánÃ¥á»arôྩt;æÆilrã
©á£ã
®sht;楽;ìð¯Äaoã
·ãrÄduã
½ã
¿Â»Ñ»Ä;láã;楬Ä;vããä;䱯gnsãã¹ã¼htÌahlrstã¤ã°ããã¤ã®rrowÄ;tà¿ãaéãarpoonÄduã»ã¿owîã
¾p»áeftÄahããrrowó࿪arpoonóÕightarrows;æquigarro÷ãhreetimes;æg;äingdotseñἲÆahmãããrò࿪aòÕ;æoustÄ;aããæ±che»ãmid;æ«®Èabptã²ã½ããÄnrã·ãºg;ær;æ¾rëáÆaflãããr;æ¦;ìð£us;樮imes;樵Äapãã§rÄ;gã£ã¤ä©t;æ¦olint;æ¨aròã£Èachqã»ãá¼ã
quo;æºr;ìðÄbuã»ãoÄ;rÈÈÆhirããã reÃ¥ã¸mes;æiÈ;eflãªáá ¡ã«æ¹tri;æ§luhar;楨;æàµ¡ãããã¬ã¸ã±\0ãºã¤\0\0ã¬ã°\0ã¨ãããã±ãã±\0ã\0\0ã³cute;ä
quïâºÔ;Eaceinpsyáã³ãµã¿ããããã¦ã©;檴ǰãº\0ã¼;檸on;ä
¡uÃ¥á¾Ä;dá³ãil;ä
rc;ä
ÆEasããã;檶p;檺im;æ©olint;æ¨iÃá;äotÆ;beã´áµãµæ
;橦ÎAacmstxãããããã£ãrr;ærÄhrããëâ¨Ä;oਸ਼਴tè»Â§ä§i;ä»war;椩mÄinã©Ã°nuóñt;æ¶rÄ;oã¶âìð°Èacoyãããã rp;æ¯Ähyããcy;ä;ärtÉã\0\0ãiäá¤araì⹯è»ÂäÄgmã¨ã´maÆ;fvã±ã²ã²ä;äÐ;deglnprá«ã
ããããã¡ã¦ot;橪Ä;qá±á°Ä;Eããæª;æª Ä;Eããæª;æªe;ælus;樤arr;楲aròá½Èaeitã¸ãããÄlsã½ãlsetméãªhp;樳parsl;槤Ädlá£ãe;æ£Ä;eããæªªÄ;sã¢ã£æª¬;ìâª¬ï¸Æflpã®ã³ãtcy;äÄ;bã¸ã¹ä¯Ä;aã¾ã¿æ§r;æ¿f;ìð¤aÄdrãÐesÄ;uããæ it»ãÆcsuã ã¹ãÄauã¥ã¯pÄ;sáã«;ìâï¸pÄ;sá´ãµ;ìâï¸uÄbpã¿ãÆ;esááãetÄ;eáãñáÆ;esá¨áãetÄ;eá¨ãÃ±á®Æ;afá
»ã¦Ö°rÅ¥ã«Ö±Â»á
¼aròá
Ècemtã¹ã¾ãã
r;ìðtmîñiìãaræá¾ÄarããrÄ;fãá¿æÄanããightÄepã£ãªpsiloîỠhé⺯s»â¡Êbcmnpã»ãáããÒ;Edemnprsãããããã£ã¬ã±ã¶æ;æ«
ot;檽Ä;dáãot;æ«ult;æ«ÄEeã¨ãª;æ«;ælus;檿arr;楹Æeiuã½ããtÆ;enãã
ãqÄ;qáãeqÄ;qã«ã¨m;æ«Äbpãã;æ«;æ«cÌ;acensáã¬ã²ã¹ã»ã¦pproøãºurlyeñá¾Ã±á³Æaesãããpproøãqñãg;æªÚ123;Edehlmnpsã©ã¬ã¯áã²ã´ãããããã¨ãè»Â¹ä¹è»Â²ä²è»Â³ä³;æ«Äosã¹ã¼t;檾ub;æ«Ä;dá¢ã
ot;æ«sÄouããl;æb;æ«arr;楻ult;æ«ÄEeã¤ã¦;æ«;ælus;æ«Æeiuã´ããtÆ;enáã¼ãqÄ;qá¢ã²eqÄ;qã§ã¤m;æ«Äbpãã;æ«;æ«ÆAanãã ãrr;ærÄhrã¦ã¨Ã«â®Ä;oਫ਩war;椪ligè»Ãä௡ããã áã³ã¹\0ã¾ã\0\0\0\0\0ãã\0ãã¬\0\0\0ãɲã\0\0ãget;æ;ärÃ«à¹Æaeyã¦ã«ã°ron;ä
¥dil;ä
£;älrec;ær;ìð±Èeikoãããµã¼Ç²ã\0ãeÄ4fááaÆ;svãããä¸ym;äÄcnã¢ã²kÄasã¨ã®pproøáim»á¬sðáÄasãºã®Ã°árnè»Ã¾ä¾Ç¬Ìãâ§esèÃ;bdãããäÄ;aá¤ãr;樱;樰Æepsã¡ã£ãáâ©È;bcfÒã¬ã°ã´ot;æ¶ir;櫱Ä;oã¹ã¼ìð¥rk;æ«Ã¡ã¢rime;æ´Æaipããã¤dÃ¥áÎadempstã¡ããããããngleÊ;dlqrã°ã±ã¶ããæµown»ᶻeftÄ;eâ ã¾Ã±à¤®;æightÄ;eãªãñáot;æ¬inus;樺lus;樹b;æ§ime;樻ezium;æ¢Æchtã²ã½ãÄryã·ã»;ìð;äcy;ärok;ä
§Äioããxôá·headÄlrãã eftarro÷à¡ightarrow»à½à¤AHabcdfghlmoprstuwãããã¤ã°ã¼ã ã 㠣㠴ã¡ã¡ã¡«ã¢©ã£ã£ã£ªã£¶ròÏar;楣Äcrãã¢uteè»ÃºäºÃ²á
rÇ£ãª\0ãy;äve;ä
Äiyãµãºrcè»Ã»ä»;äÆabhã ã ã ròálac;ä
±aòáÄirã ã sht;楾;ìð²raveè»Ã¹ä¹Å¡ã §ã ±rÄlr㠬㠮»à¥Â»álk;æÄctã ¹ã¡É¯ã ¿\0\0ã¡rnÄ;eã¡
ã¡ær»ã¡op;æri;æ¸Äalã¡ã¡cr;ä
«è»Â¨ÍÄgp㡢㡦on;ä
³f;ìð¦Ìadhlsuá
㡸㡽á²ã¢ã¢ ownáá³arpoonÄlrã¢ã¢efôã ighô㠯iÆ;hlã¢ã¢ã¢ä
»áºon»ã¢parrows;æÆcit㢰ã£ã£É¯ã¢¶\0\0ã£rnÄ;e㢼㢽ær»㢽op;æng;ä
¯ri;æ¹cr;ìðÆdirã£ã£ã£¢ot;æ°lde;ä
©iÄ;fã°ã£¨Â»á Äam㣯㣲rò㢨lè»Ã¼ä¼angle;榧ÞABDacdeflnoprszã¤ã¤ã¤©ã¤ã¦µã¦¸ã¦½ã§ã§¤ã§¨ã§³ã§¹ã§½ã¨ã¨ ròϷarÄ;v㤦㤧櫨;æ«©asèϡÄnr㤲㤷grt;æ¦Îeknprstã£ã¥ã¥ã¥ã¥ã¥¤ã¦appáâothinÃ§áºÆhirã«â»ã¥opô⾵Ä;há·ã¥¢Ã¯ãÄiu㥩ã¥gmáã³Äbp㥲ã¦setneqÄ;q㥽ã¦ìâï¸;ìâ«ï¸setneqÄ;qã¦ã¦ìâï¸;ìâ«ï¸Ährã¦ã¦etáãiangleÄlr㦪㦯eft»थight»áy;ä²ashÂ»á¶Æelrã§ã§ã§Æ;beâ·ªã§ã§ar;æ»q;ælip;æ®Äbtã§á¨aòá©r;ìð³tré㦮suÄbp㧯㧱»à´Â»àµpf;ìð§roð໻tré㦴Äcuã¨ã¨r;ìðÄbpã¨ã¨nÄEeã¦ã¨Â»ã¥¾nÄEeã¦ã¨Â»ã¦igzag;æ¦Îcefoprs㨶㨻ã©ã©ã©ã©¡ã©ªirc;ä
µÄdiã©ã©Äbgã©
ã©ar;æ©eÄ;qáºã©;æerp;ær;ìð´pf;ìð¨Ä;eá¹ã©¦atèá¹cr;ìðà«£áãª\0ãª\0ãªãª\0\0ãªãª¨ãª«ãª¯\0\0ã«ã«\0ã«áátréár;ìðµÄAaãªãªròÏrò৶;ä¾ÄAa㪡㪤ròθrò৫aðâis;æ»Ædptá¤ãªµãª¾Äfl㪺á©;ìð©imÃ¥á²ÄAaã«ã«ròÏròà¨Äcqã«á¸r;ìðÄptáã«réáÐacefiosu㫰㫽ã¬ã¬ã¬ã¬ã¬ã¬¡cÄuyã«¶ã«»teè»Ã½ä½;äÄiyã¬ã¬rc;ä
·;änè»Â¥ä¥r;ìð¶cy;äpf;ìðªcr;ìðÄcm㬦㬩y;älè»Ã¿ä¿Ôacdefhioswããããã¤ã©ãã´ãºã®cute;ä
ºÄayããron;ä
¾;ä·ot;ä
¼Äetãã¡træáa;ä¶r;ìð·cy;ä¶grarr;æpf;ìð«cr;ìðÄjnã®
ã®;æj;æ
343'.split("").map(e=>e.charCodeAt(0))),Prt=new Uint16Array("Èaglq ��\x1BÉ�\0\0�p;ä¦os;ä§t;ä¾t;ä¼uot;ä¢".split("").map(e=>e.charCodeAt(0)));var kA;const Drt=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),Irt=(kA=String.fromCodePoint)!==null&&kA!==void 0?kA:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function Lrt(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=Drt.get(e))!==null&&t!==void 0?t:e}var Vr;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Vr||(Vr={}));const $rt=32;var $u;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})($u||($u={}));function _M(e){return e>=Vr.ZERO&&e<=Vr.NINE}function zrt(e){return e>=Vr.UPPER_A&&e<=Vr.UPPER_F||e>=Vr.LOWER_A&&e<=Vr.LOWER_F}function Frt(e){return e>=Vr.UPPER_A&&e<=Vr.UPPER_Z||e>=Vr.LOWER_A&&e<=Vr.LOWER_Z||_M(e)}function Brt(e){return e===Vr.EQUALS||Frt(e)}var zr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(zr||(zr={}));var Tu;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Tu||(Tu={}));class Hrt{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=zr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Tu.Strict}startEntity(t){this.decodeMode=t,this.state=zr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case zr.EntityStart:return t.charCodeAt(n)===Vr.NUM?(this.state=zr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=zr.NamedEntity,this.stateNamedEntity(t,n));case zr.NumericStart:return this.stateNumericStart(t,n);case zr.NumericDecimal:return this.stateNumericDecimal(t,n);case zr.NumericHex:return this.stateNumericHex(t,n);case zr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|$rt)===Vr.LOWER_X?(this.state=zr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=zr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(_M(i)||zrt(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(_M(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Vr.SEMI)this.consumed+=1;else if(this.decodeMode===Tu.Strict)return 0;return this.emitCodePoint(Lrt(this.result),this.consumed),this.errors&&(t!==Vr.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&$u.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const s=t.charCodeAt(n);if(this.treeIndex=Vrt(r,i,this.treeIndex+Math.max(1,o),s),this.treeIndex<0)return this.result===0||this.decodeMode===Tu.Attribute&&(o===0||Brt(s))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],o=(i&$u.VALUE_LENGTH)>>14,o!==0){if(s===Vr.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==Tu.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&$u.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~$u.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case zr.NamedEntity:return this.result!==0&&(this.decodeMode!==Tu.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case zr.NumericDecimal:return this.emitNumericEntity(0,2);case zr.NumericHex:return this.emitNumericEntity(0,3);case zr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case zr.EntityStart:return 0}}}function Jpe(e){let t="";const n=new Hrt(e,r=>t+=Irt(r));return function(i,o){let s=0,a=0;for(;(a=i.indexOf("&",a))>=0;){t+=i.slice(s,a),n.startEntity(o);const c=n.write(i,a+1);if(c<0){s=a+n.end();break}s=a+c,a=c===0?s+1:s}const l=t+i.slice(s);return t="",l}}function Vrt(e,t,n,r){const i=(t&$u.BRANCH_LENGTH)>>7,o=t&$u.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const l=r-o;return l<0||l>=i?-1:e[n+l]-1}let s=n,a=s+i-1;for(;s<=a;){const l=s+a>>>1,c=e[l];
343if(c<r)s=l+1;else if(c>r)a=l-1;else return e[l+i]}return-1}const Urt=Jpe(Rrt);Jpe(Prt);function e0e(e,t=Tu.Legacy){return Urt(e,t)}function qrt(e){return Object.prototype.toString.call(e)}function sI(e){return qrt(e)==="[object String]"}const Wrt=Object.prototype.hasOwnProperty;function Grt(e,t){return Wrt.call(e,t)}function lS(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function t0e(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function aI(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function K4(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const n0e=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,Krt=/&([a-z#][a-z0-9]{1,31});/gi,Yrt=new RegExp(n0e.source+"|"+Krt.source,"gi"),Xrt=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function Zrt(e,t){if(t.charCodeAt(0)===35&&Xrt.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return aI(r)?K4(r):e}const n=e0e(e);return n!==e?n:e}function Qrt(e){return e.indexOf("\\")<0?e:e.replace(n0e,"$1")}function H0(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(Yrt,function(t,n,r){return n||Zrt(t,r)})}const Jrt=/[&<>"]/,eit=/[&<>"]/g,tit={"&":"&","<":"<",">":">",'"':"""};function nit(e){return tit[e]}function ud(e){return Jrt.test(e)?e.replace(eit,nit):e}const rit=/[.?*+^$[\]\\(){}|-]/g;function iit(e){return e.replace(rit,"\\$&")}function En(e){switch(e){case 9:case 32:return!0}return!1}function Qy(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function Jy(e){return oI.test(e)||Zpe.test(e)}function ev(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function cS(e){return e=e.trim().replace(/\s+/g," "),"áº".toLowerCase()==="á¹¾"&&(e=e.replace(/áº/g,"Ã")),e.toLowerCase().toUpperCase()}const oit={mdurl:Trt,ucmicro:Ort},sit=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:t0e,assign:lS,escapeHtml:ud,escapeRE:iit,fromCodePoint:K4,has:Grt,isMdAsciiPunct:ev,isPunctChar:Jy,isSpace:En,isString:sI,isValidEntityCode:aI,isWhiteSpace:Qy,lib:oit,normalizeReference:cS,unescapeAll:H0,unescapeMd:Qrt},Symbol.toStringTag,{value:"Module"}));function ait(e,t,n){let r,i,o,s;const a=e.posMax,l=e.pos;for(e.pos=t+1,r=1;e.pos<a;){if(o=e.src.charCodeAt(e.pos),o===93&&(r--,r===0)){i=!0;break}if(s=e.pos,e.md.inline.skipToken(e),o===91){if(s===e.pos-1)r++;else if(n)return e.pos=l,-1}}let c=-1;return i&&(c=e.pos),e.pos=l,c}function lit(e,t,n){let r,i=t;const o={ok:!1,pos:0,str:""};if(e.charCodeAt(i)===60){for(i++;i<n;){if(r=e.charCodeAt(i),r===10||r===60)return o;if(r===62)return o.pos=i+1,o.str=H0(e.slice(t+1,i)),o.ok=!0,o;if(r===92&&i+1<n){i+=2;continue}i++}return o}let s=0;for(;i<n&&(r=e.charCodeAt(i),!(r===32||r<32||r===127));){if(r===92&&i+1<n){if(e.charCodeAt(i+1)===32)break;i+=2;continue}if(r===40&&(s++,s>32))return o;if(r===41){if(s===0)break;s--}i++}return t===i||s!==0||(o.str=H0(e.slice(t,i)),o.pos=i,o.ok=!0),o}function cit(e,t,n,r){let i,o=t;const s={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)s.str=r.str,s.marker=r.marker;else{if(o>=n)return s;let a=e.charCodeAt(o);if(a!==34&&a!==39&&a!==40)return s;t++,o++,a===40&&(a=41),s.marker=a}for(;o<n;){if(i=e.charCodeAt(o),i===s.marker)return s.pos=o+1,s.str+=H0(e.slice(t,o)),s.ok=!0,s;if(i===40&&s.marker===41)return s;i===92&&o+1<n&&o++,o++}return s.can_continue=!0,s.str+=H0(e.slice(t,o)),s}const uit=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination:lit,parseLinkLabel:ait,parseLinkTitle:cit},Symbol.toStringTag,{value:"Module"})),rl={};rl.code_inline=function(e,t,n,r,i){const o=e[t];return"<code"+i.renderAttrs(o)+">"+ud(o.content)+"</code>"};rl.code_block=function(e,t,n,r,i){const o=e[t];return"<pre"+i.renderAttrs(o)+"><code>"+ud(e[t].content)+`</code></pre> 344`};rl.fence=function(e,t,n,r,i){const o=e[t],s=o.info?H0(o.info).trim():"";let a="",l="";if(s){const d=s.split(/(\s+)/g);a=d[0],l=d.slice(2).join("")}let c;if(n.highlight?c=n.highlight(o.content,a,l)||ud(o.content):c=ud(o.content),c.indexOf("<pre")===0)return c+` 345`;if(s){const d=o.attrIndex("class"),f=o.attrs?o.attrs.slice():[];d<0?f.push(["class",n.langPrefix+a]):(f[d]=f[d].slice(),f[d][1]+=" "+n.langPrefix+a);const p={attrs:f};return`<pre><code${i.renderAttrs(p)}>${c}</code></pre> 346`}return`<pre><code${i.renderAttrs(o)}>${c}</code></pre> 347`};rl.image=function(e,t,n,r,i){const o=e[t];return o.attrs[o.attrIndex("alt")][1]=i.renderInlineAsText(o.children,n,r),i.renderToken(e,t,n)};rl.hardbreak=function(e,t,n){return n.xhtmlOut?`<br /> 348`:`<br> 349`};rl.softbreak=function(e,t,n){return n.breaks?n.xhtmlOut?`<br /> 350`:`<br> 351`:` 352`};rl.text=function(e,t){return ud(e[t].content)};rl.html_block=function(e,t){return e[t].content};rl.html_inline=function(e,t){return e[t].content};function Cm(){this.rules=lS({},rl)}Cm.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n<r;n++)i+=" "+ud(t.attrs[n][0])+'="'+ud(t.attrs[n][1])+'"';return i};Cm.prototype.renderToken=function(t,n,r){const i=t[n];let o="";if(i.hidden)return"";i.block&&i.nesting!==-1&&n&&t[n-1].hidden&&(o+=` 353`),o+=(i.nesting===-1?"</":"<")+i.tag,o+=this.renderAttrs(i),i.nesting===0&&r.xhtmlOut&&(o+=" /");let s=!1;if(i.block&&(s=!0,i.nesting===1&&n+1<t.length)){const a=t[n+1];(a.type==="inline"||a.hidden||a.nesting===-1&&a.tag===i.tag)&&(s=!1)}return o+=s?`> 354`:">",o};Cm.prototype.renderInline=function(e,t,n){let r="";
354const i=this.rules;for(let o=0,s=e.length;o<s;o++){const a=e[o].type;typeof i[a]<"u"?r+=i[a](e,o,t,n,this):r+=this.renderToken(e,o,t)}return r};Cm.prototype.renderInlineAsText=function(e,t,n){let r="";for(let i=0,o=e.length;i<o;i++)switch(e[i].type){case"text":r+=e[i].content;break;case"image":r+=this.renderInlineAsText(e[i].children,t,n);break;case"html_inline":case"html_block":r+=e[i].content;break;case"softbreak":case"hardbreak":r+=` 355`;break}return r};Cm.prototype.render=function(e,t,n){let r="";const i=this.rules;for(let o=0,s=e.length;o<s;o++){const a=e[o].type;a==="inline"?r+=this.renderInline(e[o].children,t,n):typeof i[a]<"u"?r+=i[a](e,o,t,n,this):r+=this.renderToken(e,o,t,n)}return r};function oo(){this.__rules__=[],this.__cache__=null}oo.prototype.__find__=function(e){for(let t=0;t<this.__rules__.length;t++)if(this.__rules__[t].name===e)return t;return-1};oo.prototype.__compile__=function(){const e=this,t=[""];e.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){t.indexOf(r)<0&&t.push(r)})}),e.__cache__={},t.forEach(function(n){e.__cache__[n]=[],e.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||e.__cache__[n].push(r.fn))})})};oo.prototype.at=function(e,t,n){const r=this.__find__(e),i=n||{};if(r===-1)throw new Error("Parser rule not found: "+e);this.__rules__[r].fn=t,this.__rules__[r].alt=i.alt||[],this.__cache__=null};oo.prototype.before=function(e,t,n,r){const i=this.__find__(e),o=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};oo.prototype.after=function(e,t,n,r){const i=this.__find__(e),o=r||{};if(i===-1)throw new Error("Parser rule not found: "+e);this.__rules__.splice(i+1,0,{name:t,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};oo.prototype.push=function(e,t,n){const r=n||{};this.__rules__.push({name:e,enabled:!0,fn:t,alt:r.alt||[]}),this.__cache__=null};oo.prototype.enable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const i=this.__find__(r);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!0,n.push(r)},this),this.__cache__=null,n};oo.prototype.enableOnly=function(e,t){Array.isArray(e)||(e=[e]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(e,t)};oo.prototype.disable=function(e,t){Array.isArray(e)||(e=[e]);const n=[];return e.forEach(function(r){const i=this.__find__(r);if(i<0){if(t)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[i].enabled=!1,n.push(r)},this),this.__cache__=null,n};oo.prototype.getRules=function(e){return this.__cache__===null&&this.__compile__(),this.__cache__[e]||[]};function da(e,t,n){this.type=e,this.tag=t,this.attrs=null,this.map=null,this.nesting=n,this.level=0,this.children=null,this.content="",this.markup="",this.info="",this.meta=null,this.block=!1,this.hidden=!1}da.prototype.attrIndex=function(t){if(!this.attrs)return-1;const n=this.attrs;for(let r=0,i=n.length;r<i;r++)if(n[r][0]===t)return r;return-1};da.prototype.attrPush=function(t){this.attrs?this.attrs.push(t):this.attrs=[t]};da.prototype.attrSet=function(t,n){const r=this.attrIndex(t),i=[t,n];r<0?this.attrPush(i):this.attrs[r]=i};da.prototype.attrGet=function(t){const n=this.attrIndex(t);let r=null;return n>=0&&(r=this.attrs[n][1]),r};da.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function r0e(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}r0e.prototype.Token=da;const dit=/\r\n?|\n/g,fit=/\0/g;function hit(e){let t;t=e.src.replace(dit,` 356`),t=t.replace(fit,"�"),e.src=t}function pit(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function mit(e){const t=e.tokens;for(let n=0,r=t.length;n<r;n++){const i=t[n];i.type==="inline"&&e.md.inline.parse(i.content,e.md,e.env,i.children)}}function git(e){return/^<a[>\s]/i.test(e)}function yit(e){return/^<\/a\s*>/i.test(e)}function vit(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n<r;n++){if(t[n].type!=="inline"||!e.md.linkify.pretest(t[n].content))continue;let i=t[n].children,o=0;for(let s=i.length-1;s>=0;s--){const a=i[s];if(a.type==="link_close"){for(s--;i[s].level!==a.level&&i[s].type!=="link_open";)s--;continue}if(a.type==="html_inline"&&(git(a.content)&&o>0&&o--,yit(a.content)&&o++),!(o>0)&&a.type==="text"&&e.md.linkify.test(a.content)){const l=a.content;let c=e.md.linkify.match(l);const d=[];let f=a.level,p=0;c.length>0&&c[0].index===0&&s>0&&i[s-1].type==="text_special"&&(c=c.slice(1));for(let m=0;m<c.length;m++){const y=c[m].url,v=e.md.normalizeLink(y);if(!e.md.validateLink(v))continue;let b=c[m].text;c[m].schema?c[m].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http:\/\//,"");const C=c[m].index;if(C>p){const _=new e.Token("text","",0);_.content=l.slice(p,C),_.level=f,d.push(_)}const S=new e.Token("link_open","a",1);S.attrs=[["href",v]],S.level=f++,S.markup="linkify",S.info="auto",d.push(S);const E=new e.Token("text","",0);E.content=b,E.level=f,d.push(E);const A=new e.Token("link_close","a",-1);A.level=--f,A.markup="linkify",A.info="auto",d.push(A),p=c[m].lastIndex}if(p<l.length){const m=new e.Token("text","",0);m.content=l.slice(p),m.level=f,d.push(m)}t[n].children=i=t0e(i,s,d)}}}}const i0e=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,bit=/\((c|tm|r)\)/i,xit=/\((c|tm|r)\)/ig,wit={c:"©",r:"®",tm:"â¢"};function Cit(e,t){return wit[t.toLowerCase()]}function Sit(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(xit,Cit)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function Eit(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&i0e.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"â¦").replace(/([?!])â¦/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1â").replace(/(^|\s)--(?=\s|$)/mg,"$1â").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1â")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function kit(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(bit.test(e.tokens[t].content)&&Sit(e.tokens[t].children),i0e.test(e.tokens[t].content)&&Eit(e.tokens[t].children))}const _it=/['"]/,cQ=/['"]/g,uQ="â";function R2(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function Ait(e,t){let n;const r=[];for(let i=0;i<e.length;i++){const o=e[i],s=e[i].level;for(n=r.length-1;n>=0&&!(r[n].level<=s);n--);if(r.length=n+1,o.type!=="text")continue;let a=o.content,l=0,c=a.length;e:for(;l<c;){cQ.lastIndex=l;const d=cQ.exec(a);if(!d)break;let f=!0,p=!0;l=d.index+1;const m=d[0]==="'";let y=32;if(d.index-1>
356=0)y=a.charCodeAt(d.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){y=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(l<c)v=a.charCodeAt(l);else for(n=i+1;n<e.length&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n++)if(e[n].content){v=e[n].content.charCodeAt(0);break}const b=ev(y)||Jy(String.fromCharCode(y)),C=ev(v)||Jy(String.fromCharCode(v)),S=Qy(y),E=Qy(v);if(E?f=!1:C&&(S||b||(f=!1)),S?p=!1:b&&(E||C||(p=!1)),v===34&&d[0]==='"'&&y>=48&&y<=57&&(p=f=!1),f&&p&&(f=b,p=C),!f&&!p){m&&(o.content=R2(o.content,d.index,uQ));continue}if(p)for(n=r.length-1;n>=0;n--){let A=r[n];if(r[n].level<s)break;if(A.single===m&&r[n].level===s){A=r[n];let _,N;m?(_=t.md.options.quotes[2],N=t.md.options.quotes[3]):(_=t.md.options.quotes[0],N=t.md.options.quotes[1]),o.content=R2(o.content,d.index,N),e[A.token].content=R2(e[A.token].content,A.pos,_),l+=N.length-1,A.token===i&&(l+=_.length-1),a=o.content,c=a.length,r.length=n;continue e}}f?r.push({token:i,pos:d.index,single:m,level:s}):p&&m&&(o.content=R2(o.content,d.index,uQ))}}}function Nit(e){if(e.md.options.typographer)for(let t=e.tokens.length-1;t>=0;t--)e.tokens[t].type!=="inline"||!_it.test(e.tokens[t].content)||Ait(e.tokens[t].children,e)}function jit(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o<i;o++){if(r[o].type!=="inline")continue;const s=r[o].children,a=s.length;for(t=0;t<a;t++)s[t].type==="text_special"&&(s[t].type="text");for(t=n=0;t<a;t++)s[t].type==="text"&&t+1<a&&s[t+1].type==="text"?s[t+1].content=s[t].content+s[t+1].content:(t!==n&&(s[n]=s[t]),n++);t!==n&&(s.length=n)}}const _A=[["normalize",hit],["block",pit],["inline",mit],["linkify",vit],["replacements",kit],["smartquotes",Nit],["text_join",jit]];function lI(){this.ruler=new oo;for(let e=0;e<_A.length;e++)this.ruler.push(_A[e][0],_A[e][1])}lI.prototype.process=function(e){const t=this.ruler.getRules("");for(let n=0,r=t.length;n<r;n++)t[n](e)};lI.prototype.State=r0e;function il(e,t,n,r){this.src=e,this.md=t,this.env=n,this.tokens=r,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const i=this.src;for(let o=0,s=0,a=0,l=0,c=i.length,d=!1;s<c;s++){const f=i.charCodeAt(s);if(!d)if(En(f)){a++,f===9?l+=4-l%4:l++;continue}else d=!0;(f===10||s===c-1)&&(f!==10&&s++,this.bMarks.push(o),this.eMarks.push(s),this.tShift.push(a),this.sCount.push(l),this.bsCount.push(0),d=!1,a=0,l=0,o=s+1)}this.bMarks.push(i.length),this.eMarks.push(i.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}il.prototype.push=function(e,t,n){const r=new da(e,t,n);return r.block=!0,n<0&&this.level--,r.level=this.level,n>0&&this.level++,this.tokens.push(r),r};il.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};il.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;t<n&&!(this.bMarks[t]+this.tShift[t]<this.eMarks[t]);t++);return t};il.prototype.skipSpaces=function(t){for(let n=this.src.length;t<n;t++){const r=this.src.charCodeAt(t);if(!En(r))break}return t};il.prototype.skipSpacesBack=function(t,n){if(t<=n)return t;for(;t>n;)if(!En(this.src.charCodeAt(--t)))return t+1;return t};il.prototype.skipChars=function(t,n){for(let r=this.src.length;t<r&&this.src.charCodeAt(t)===n;t++);return t};il.prototype.skipCharsBack=function(t,n,r){if(t<=r)return t;for(;t>r;)if(n!==this.src.charCodeAt(--t))return t+1;return t};il.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let s=0,a=t;a<n;a++,s++){let l=0;const c=this.bMarks[a];let d=c,f;for(a+1<n||i?f=this.eMarks[a]+1:f=this.eMarks[a];d<f&&l<r;){const p=this.src.charCodeAt(d);if(En(p))p===9?l+=4-(l+this.bsCount[a])%4:l++;else if(d-c<this.tShift[a])l++;else break;d++}l>r?o[s]=new Array(l-r+1).join(" ")+this.src.slice(d,f):o[s]=this.src.slice(d,f)}return o.join("")};il.prototype.Token=da;const Tit=65536;function AA(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function dQ(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,s=0,a="";for(;r<n;)i===124&&(o?(a+=e.substring(s,r-1),s=r):(t.push(a+e.substring(s,r)),a="",s=r+1)),o=i===92,r++,i=e.charCodeAt(r);return t.push(a+e.substring(s)),t}function Mit(e,t,n,r){if(t+2>n)return!1;let i=t+1;if(e.sCount[i]<e.blkIndent||e.sCount[i]-e.blkIndent>=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;
vendor: 4,715 bytes, lines 356-357
356const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58||o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58&&!En(a)||s===45&&En(a))return!1;for(;o<e.eMarks[i];){const A=e.src.charCodeAt(o);if(A!==124&&A!==45&&A!==58&&!En(A))return!1;o++}let l=AA(e,t+1),c=l.split("|");const d=[];for(let A=0;A<c.length;A++){const _=c[A].trim();if(!_){if(A===0||A===c.length-1)continue;return!1}if(!/^:?-+:?$/.test(_))return!1;_.charCodeAt(_.length-1)===58?d.push(_.charCodeAt(0)===58?"center":"right"):_.charCodeAt(0)===58?d.push("left"):d.push("")}if(l=AA(e,t).trim(),l.indexOf("|")===-1||e.sCount[t]-e.blkIndent>=4)return!1;c=dQ(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop();const f=c.length;if(f===0||f!==d.length)return!1;if(r)return!0;const p=e.parentType;e.parentType="table";const m=e.md.block.ruler.getRules("blockquote"),y=e.push("table_open","table",1),v=[t,0];y.map=v;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const C=e.push("tr_open","tr",1);C.map=[t,t+1];for(let A=0;A<c.length;A++){const _=e.push("th_open","th",1);d[A]&&(_.attrs=[["style","text-align:"+d[A]]]);const N=e.push("inline","",0);N.content=c[A].trim(),N.children=[],e.push("th_close","th",-1)}e.push("tr_close","tr",-1),e.push("thead_close","thead",-1);let S,E=0;for(i=t+2;i<n&&!(e.sCount[i]<e.blkIndent);i++){let A=!1;for(let N=0,j=m.length;N<j;N++)if(m[N](e,i,n,!0)){A=!0;break}if(A||(l=AA(e,i).trim(),!l)||e.sCount[i]-e.blkIndent>=4||(c=dQ(l),c.length&&c[0]===""&&c.shift(),c.length&&c[c.length-1]===""&&c.pop(),E+=f-c.length,E>Tit))break;if(i===t+2){const N=e.push("tbody_open","tbody",1);N.map=S=[t+2,0]}const _=e.push("tr_open","tr",1);_.map=[i,i+1];for(let N=0;N<f;N++){const j=e.push("td_open","td",1);d[N]&&(j.attrs=[["style","text-align:"+d[N]]]);const T=e.push("inline","",0);T.content=c[N]?c[N].trim():"",T.children=[],e.push("td_close","td",-1)}e.push("tr_close","tr",-1)}return S&&(e.push("tbody_close","tbody",-1),S[1]=i),e.push("table_close","table",-1),v[1]=i,e.parentType=p,e.line=i,!0}function Oit(e,t,n){if(e.sCount[t]-e.blkIndent<4)return!1;let r=t+1,i=r;for(;r<n;){if(e.isEmpty(r)){r++;continue}if(e.sCount[r]-e.blkIndent>=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` 357`,o.map=[t,e.line],!0}function Rit(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const s=e.src.charCodeAt(i);if(s!==126&&s!==96)return!1;let a=i;i=e.skipChars(i,s);let l=i-a;if(l<3)return!1;const c=e.src.slice(a,i),d=e.src.slice(i,o);if(s===96&&d.indexOf(String.fromCharCode(s))>=0)return!1;if(r)return!0;let f=t,p=!1;for(;f++,!(f>=n||(i=a=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i<o&&e.sCount[f]<e.blkIndent));)if(e.src.charCodeAt(i)===s&&!(e.sCount[f]-e.blkIndent>=4)&&(i=e.skipChars(i,s),!(i-a<l)&&(i=e.skipSpaces(i),!(i<o)))){p=!0;break}l=e.sCount[t],e.line=f+(p?1:0);const m=e.push("fence","code",0);return m.info=d,m.content=e.getLines(t+1,f,l,!0),m.markup=c,m.map=[t,e.line],!0}function Pit(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];const s=e.lineMax;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const a=[],l=[],c=[],d=[],f=e.md.block.ruler.getRules("blockquote"),p=e.parentType;e.parentType="blockquote";let m=!1,y;for(y=t;y<n;y++){const E=e.sCount[y]<e.blkIndent;if(i=e.bMarks[y]+e.tShift[y],o=e.eMarks[y],i>=o)break;if(e.src.charCodeAt(i++)===62&&!E){let _=e.sCount[y]+1,N,j;e.src.charCodeAt(i)===32?(i++,_++,j=!1,N=!0):e.src.charCodeAt(i)===9?(N=!0,(e.bsCount[y]+_)%4===3?(i++,_++,j=!1):j=!0):N=!1;let T=_;for(a.push(e.bMarks[y]),e.bMarks[y]=i;i<o;){const O=e.src.charCodeAt(i);if(En(O))O===9?T+=4-(T+e.bsCount[y]+(j?1:0))%4:T++;else break;i++}m=i>=o,l.push(e.bsCount[y]),e.bsCount[y]=e.sCount[y]+1+(N?1:0),c.push(e.sCount[y]),e.sCount[y]=T-_,d.push(e.tShift[y]),e.tShift[y]=i-e.bMarks[y];continue}if(m)break;let A=!1;for(let _=0,N=f.length;_<N;_++)if(f[_](e,y,n,!0)){A=!0;break}if(A){e.lineMax=y,e.blkIndent!==0&&(a.push(e.bMarks[y]),l.push(e.bsCount[y]),d.push(e.tShift[y]),c.push(e.sCount[y]),e.sCount[y]-=e.blkIndent);break}a.push(e.bMarks[y]),l.push(e.bsCount[y]),d.push(e.tShift[y]),c.push(e.sCount[y]),e.sCount[y]=-1}const v=e.blkIndent;e.blkIndent=0;const b=e.push("blockquote_open","blockquote",1);b.markup=">";const C=[t,0];b.map=C,e.md.block.tokenize(e,t,y);const S=e.push("blockquote_close","blockquote",-1);S.markup=">",e.lineMax=s,e.parentType=p,C[1]=e.line;for(let E=0;E<d.length;E++)e.bMarks[E+t]=a[E],e.tShift[E+t]=d[E],e.sCount[E+t]=c[E],e.bsCount[E+t]=l[E];return e.blkIndent=v,!0}function Dit(e,t,n,r){const i=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let o=e.bMarks[t]+e.tShift[t];
357const s=e.src.charCodeAt(o++);if(s!==42&&s!==45&&s!==95)return!1;let a=1;for(;o<i;){const c=e.src.charCodeAt(o++);if(c!==s&&!En(c))return!1;c===s&&a++}if(a<3)return!1;if(r)return!0;e.line=t+1;const l=e.push("hr","hr",0);return l.map=[t,e.line],l.markup=Array(a+1).join(String.fromCharCode(s)),!0}function fQ(e,t){const n=e.eMarks[t];let r=e.bMarks[t]+e.tShift[t];const i=e.src.charCodeAt(r++);if(i!==42&&i!==45&&i!==43)return-1;if(r<n){const o=e.src.charCodeAt(r);if(!En(o))return-1}return r}function hQ(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];let i=n;if(i+1>=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i<r&&(o=e.src.charCodeAt(i),!En(o))?-1:i}function Iit(e,t){const n=e.level+2;for(let r=t+2,i=e.tokens.length-2;r<i;r++)e.tokens[r].level===n&&e.tokens[r].type==="paragraph_open"&&(e.tokens[r+2].hidden=!0,e.tokens[r].hidden=!0,r+=2)}function Lit(e,t,n,r){let i,o,s,a,l=t,c=!0;if(e.sCount[l]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[l]-e.listIndent>=4&&e.sCount[l]<e.blkIndent)return!1;let d=!1;r&&e.parentType==="paragraph"&&e.sCount[l]>=e.blkIndent&&(d=!0);let f,p,m;if((m=hQ(e,l))>=0){if(f=!0,s=e.bMarks[l]+e.tShift[l],p=Number(e.src.slice(s,m-1)),d&&p!==1)return!1}else if((m=fQ(e,l))>=0)f=!1;else return!1;if(d&&e.skipSpaces(m)>=e.eMarks[l])return!1;if(r)return!0;const y=e.src.charCodeAt(m-1),v=e.tokens.length;f?(a=e.push("ordered_list_open","ol",1),p!==1&&(a.attrs=[["start",p]])):a=e.push("bullet_list_open","ul",1);const b=[l,0];a.map=b,a.markup=String.fromCharCode(y);let C=!1;const S=e.md.block.ruler.getRules("list"),E=e.parentType;for(e.parentType="list";l<n;){o=m,i=e.eMarks[l];const A=e.sCount[l]+m-(e.bMarks[l]+e.tShift[l]);let _=A;for(;o<i;){const H=e.src.charCodeAt(o);if(H===9)_+=4-(_+e.bsCount[l])%4;else if(H===32)_++;else break;o++}const N=o;let j;N>=i?j=1:j=_-A,j>4&&(j=1);const T=A+j;a=e.push("list_item_open","li",1),a.markup=String.fromCharCode(y);const O=[l,0];a.map=O,f&&(a.info=e.src.slice(s,m-1));const D=e.tight,R=e.tShift[l],I=e.sCount[l],F=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=T,e.tight=!0,e.tShift[l]=N-e.bMarks[l],e.sCount[l]=_,N>=i&&e.isEmpty(l+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,l,n,!0),(!e.tight||C)&&(c=!1),C=e.line-l>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=F,e.tShift[l]=R,e.sCount[l]=I,e.tight=D,a=e.push("list_item_close","li",-1),a.markup=String.fromCharCode(y),l=e.line,O[1]=l,l>=n||e.sCount[l]<e.blkIndent||e.sCount[l]-e.blkIndent>=4)break;let $=!1;for(let H=0,L=S.length;H<L;H++)if(S[H](e,l,n,!0)){$=!0;break}if($)break;if(f){if(m=hQ(e,l),m<0)break;s=e.bMarks[l]+e.tShift[l]}else if(m=fQ(e,l),m<0)break;if(y!==e.src.charCodeAt(m-1))break}return f?a=e.push("ordered_list_close","ol",-1):a=e.push("bullet_list_close","ul",-1),a.markup=String.fromCharCode(y),b[1]=l,e.line=l,e.parentType=E,c&&Iit(e,v),!0}function $it(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t],s=t+1;if(e.sCount[t]-e.blkIndent>=4||e.src.charCodeAt(i)!==91)return!1;function a(S){const E=e.lineMax;if(S>=E||e.isEmpty(S))return null;let A=!1;if(e.sCount[S]-e.blkIndent>3&&(A=!0),e.sCount[S]<0&&(A=!0),!A){const j=e.md.block.ruler.getRules("reference"),T=e.parentType;e.parentType="reference";let O=!1;for(let D=0,R=j.length;D<R;D++)if(j[D](e,S,E,!0)){O=!0;break}if(e.parentType=T,O)return null}const _=e.bMarks[S]+e.tShift[S],N=e.eMarks[S];return e.src.slice(_,N+1)}let l=e.src.slice(i,o+1);o=l.length;let c=-1;for(i=1;i<o;i++){const S=l.charCodeAt(i);if(S===91)return!1;if(S===93){c=i;break}else if(S===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(S===92&&(i++,i<o&&l.charCodeAt(i)===10)){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}}if(c<0||l.charCodeAt(c+1)!==58)return!1;for(i=c+2;i<o;i++){const S=l.charCodeAt(i);if(S===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(!En(S))break}const d=e.md.helpers.parseLinkDestination(l,i,o);if(!d.ok)return!1;const f=e.md.normalizeLink(d.str);if(!e.md.validateLink(f))return!1;i=d.pos;const p=i,m=s,y=i;for(;i<o;i++){const S=l.charCodeAt(i);if(S===10){const E=a(s);E!==null&&(l+=E,o=l.length,s++)}else if(!En(S))break}let v=e.md.helpers.parseLinkTitle(l,i,o);for(;v.can_continue;){const S=a(s);if(S===null)break;l+=S,i=o,o=l.length,s++,v=e.md.helpers.parseLinkTitle(l,i,o,v)}let b;for(i<o&&y!==i&&v.ok?(b=v.str,i=v.pos):(b="",i=p,s=m);i<o;){const S=l.charCodeAt(i);if(!En(S))break;i++}if(i<o&&l.charCodeAt(i)!==10&&b)for(b="",i=p,s=m;i<o;){const S=l.charCodeAt(i);if(!En(S))break;i++}if(i<o&&l.charCodeAt(i)!==10)return!1;const C=cS(l.slice(1,c));return C?(r||(typeof e.env.references>"u"&&(e.env.references={}),typeof e.env.references[C]>"u"&&(e.env.references[C]={title:b,href:f}),e.line=s),!0):!1}const zit=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Fit="[a-zA-Z_:][a-zA-Z0-9:._-]*",Bit="[^\"'=<>`\\x00-\\x20]+",Hit="'[^']*'",Vit='"[^"]*"',Uit="(?:"+Bit+"|"+Hit
357+"|"+Vit+")",qit="(?:\\s+"+Fit+"(?:\\s*=\\s*"+Uit+")?)",o0e="<[A-Za-z][A-Za-z0-9\\-]*"+qit+"*\\s*\\/?>",s0e="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Wit="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Git="<[?][\\s\\S]*?[?]>",Kit="<![A-Za-z][^>]*>",Yit="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Xit=new RegExp("^(?:"+o0e+"|"+s0e+"|"+Wit+"|"+Git+"|"+Kit+"|"+Yit+")"),Zit=new RegExp("^(?:"+o0e+"|"+s0e+")"),wp=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+zit.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Zit.source+"\\s*$"),/^$/,!1]];function Qit(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let s=e.src.slice(i,o),a=0;for(;a<wp.length&&!wp[a][0].test(s);a++);if(a===wp.length)return!1;if(r)return wp[a][2];let l=t+1;if(!wp[a][1].test(s)){for(;l<n&&!(e.sCount[l]<e.blkIndent);l++)if(i=e.bMarks[l]+e.tShift[l],o=e.eMarks[l],s=e.src.slice(i,o),wp[a][1].test(s)){s.length!==0&&l++;break}}e.line=l;const c=e.push("html_block","",0);return c.map=[t,l],c.content=e.getLines(t,l,e.blkIndent,!0),!0}function Jit(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4)return!1;let s=e.src.charCodeAt(i);if(s!==35||i>=o)return!1;let a=1;for(s=e.src.charCodeAt(++i);s===35&&i<o&&a<=6;)a++,s=e.src.charCodeAt(++i);if(a>6||i<o&&!En(s))return!1;if(r)return!0;o=e.skipSpacesBack(o,i);const l=e.skipCharsBack(o,35,i);l>i&&En(e.src.charCodeAt(l-1))&&(o=l),e.line=t+1;const c=e.push("heading_open","h"+String(a),1);c.markup="########".slice(0,a),c.map=[t,e.line];const d=e.push("inline","",0);d.content=e.src.slice(i,o).trim(),d.map=[t,e.line],d.children=[];const f=e.push("heading_close","h"+String(a),-1);return f.markup="########".slice(0,a),!0}function eot(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,s,a=t+1;for(;a<n&&!e.isEmpty(a);a++){if(e.sCount[a]-e.blkIndent>3)continue;if(e.sCount[a]>=e.blkIndent){let m=e.bMarks[a]+e.tShift[a];const y=e.eMarks[a];if(m<y&&(s=e.src.charCodeAt(m),(s===45||s===61)&&(m=e.skipChars(m,s),m=e.skipSpaces(m),m>=y))){o=s===61?1:2;break}}if(e.sCount[a]<0)continue;let p=!1;for(let m=0,y=r.length;m<y;m++)if(r[m](e,a,n,!0)){p=!0;break}if(p)break}if(!o)return!1;const l=e.getLines(t,a,e.blkIndent,!1).trim();e.line=a+1;const c=e.push("heading_open","h"+String(o),1);c.markup=String.fromCharCode(s),c.map=[t,e.line];const d=e.push("inline","",0);d.content=l,d.map=[t,e.line-1],d.children=[];const f=e.push("heading_close","h"+String(o),-1);return f.markup=String.fromCharCode(s),e.parentType=i,!0}function tot(e,t,n){const r=e.md.block.ruler.getRules("paragraph"),i=e.parentType;let o=t+1;for(e.parentType="paragraph";o<n&&!e.isEmpty(o);o++){if(e.sCount[o]-e.blkIndent>3||e.sCount[o]<0)continue;let c=!1;for(let d=0,f=r.length;d<f;d++)if(r[d](e,o,n,!0)){c=!0;break}if(c)break}const s=e.getLines(t,o,e.blkIndent,!1).trim();e.line=o;const a=e.push("paragraph_open","p",1);a.map=[t,e.line];const l=e.push("inline","",0);return l.content=s,l.map=[t,e.line],l.children=[],e.push("paragraph_close","p",-1),e.parentType=i,!0}const P2=[["table",Mit,["paragraph","reference"]],["code",Oit],["fence",Rit,["paragraph","reference","blockquote","list"]],["blockquote",Pit,["paragraph","reference","blockquote","list"]],["hr",Dit,["paragraph","reference","blockquote","list"]],["list",Lit,["paragraph","reference","blockquote"]],["reference",$it],["html_block",Qit,["paragraph","reference","blockquote"]],["heading",Jit,["paragraph","reference","blockquote"]],["lheading",eot],["paragraph",tot]];function uS(){this.ruler=new oo;for(let e=0;e<P2.length;e++)this.ruler.push(P2[e][0],P2[e][1],{alt:(P2[e][2]||[]).slice()})}uS.prototype.tokenize=function(e,t,n){const r=this.ruler.getRules(""),i=r.length,o=e.md.options.maxNesting;let s=t,a=!1;for(;s<n&&(e.line=s=e.skipEmptyLines(s),!(s>=n||e.sCount[s]<e.blkIndent));){if(e.level>=o){e.line=n;break}const l=e.line;let c=!1;for(let d=0;d<i;d++)if(c=r[d](e,s,n,!1),c){if(l>=e.line)throw new Error("block rule didn't increment state.line");break}if(!c)throw new Error("none of the block rules matched");e.tight=!a,e.isEmpty(e.line-1)&&(a=!0),s=e.line,s<n&&e.isEmpty(s)&&(a=!0,s++,e.line=s)}};uS.prototype.parse=function(e,t,n,r){if(!e)return;const i=new this.State(e,t,n,r);this.tokenize(i,i.line,i.lineMax)};uS.prototype.State=il;function ub(e,t,n,r){this.src=e,this.env=n,this.md=t,this.tokens=r,this.tokens_meta=Array(r.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}ub.prototype.pushPending=function(){const e=new da("text","",0);return e.content=this.pending,e.level=this.pendingLevel,this.tokens.push(e),this.pending="",e};ub.prototype.push=function(e,t,n){this.pending&&this.pushPending();
357const r=new da(e,t,n);let i=null;return n<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),r.level=this.level,n>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};ub.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o<n&&this.src.charCodeAt(o)===r;)o++;const s=o-e,a=o<n?this.src.charCodeAt(o):32,l=ev(i)||Jy(String.fromCharCode(i)),c=ev(a)||Jy(String.fromCharCode(a)),d=Qy(i),f=Qy(a),p=!f&&(!c||d||l),m=!d&&(!l||f||c);return{can_open:p&&(t||!m||l),can_close:m&&(t||!p||c),length:s}};ub.prototype.Token=da;function not(e){switch(e){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function rot(e,t){let n=e.pos;for(;n<e.posMax&&!not(e.src.charCodeAt(n));)n++;return n===e.pos?!1:(t||(e.pending+=e.src.slice(e.pos,n)),e.pos=n,!0)}const iot=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function oot(e,t){if(!e.md.options.linkify||e.linkLevel>0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(iot);if(!i)return!1;const o=i[1],s=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!s)return!1;let a=s.url;if(a.length<=o.length)return!1;a=a.replace(/\*+$/,"");const l=e.md.normalizeLink(a);if(!e.md.validateLink(l))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const c=e.push("link_open","a",1);c.attrs=[["href",l]],c.markup="linkify",c.info="auto";const d=e.push("text","",0);d.content=e.md.normalizeLinkText(a);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=a.length-o.length,!0}function sot(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n<i&&En(e.src.charCodeAt(n));)n++;return e.pos=n,!0}const cI=[];for(let e=0;e<256;e++)cI.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(e){cI[e.charCodeAt(0)]=1});function aot(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n<r&&(i=e.src.charCodeAt(n),!!En(i));)n++;return e.pos=n,!0}let o=e.src[n];if(i>=55296&&i<=56319&&n+1<r){const a=e.src.charCodeAt(n+1);a>=56320&&a<=57343&&(o+=e.src[n+1],n++)}const s="\\"+o;if(!t){const a=e.push("text_special","",0);i<256&&cI[i]!==0?a.content=o:a.content=s,a.markup=s,a.info="escape"}return e.pos=n+1,!0}function lot(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n<o&&e.src.charCodeAt(n)===96;)n++;const s=e.src.slice(i,n),a=s.length;if(e.backticksScanned&&(e.backticks[a]||0)<=i)return t||(e.pending+=s),e.pos+=a,!0;let l=n,c;for(;(c=e.src.indexOf("`",l))!==-1;){for(l=c+1;l<o&&e.src.charCodeAt(l)===96;)l++;const d=l-c;if(d===a){if(!t){const f=e.push("code_inline","code",0);f.markup=s,f.content=e.src.slice(n,c).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return e.pos=l,!0}e.backticks[d]=c}return e.backticksScanned=!0,t||(e.pending+=s),e.pos+=a,!0}function cot(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==126)return!1;const i=e.scanDelims(e.pos,!0);let o=i.length;const s=String.fromCharCode(r);if(o<2)return!1;let a;o%2&&(a=e.push("text","",0),a.content=s,o--);for(let l=0;l<o;l+=2)a=e.push("text","",0),a.content=s+s,e.delimiters.push({marker:r,length:0,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close});return e.pos+=i.length,!0}function pQ(e,t){let n;const r=[],i=t.length;for(let o=0;o<i;o++){const s=t[o];if(s.marker!==126||s.end===-1)continue;const a=t[s.end];n=e.tokens[s.token],n.type="s_open",n.tag="s",n.nesting=1,n.markup="~~",n.content="",n=e.tokens[a.token],n.type="s_close",n.tag="s",n.nesting=-1,n.markup="~~",n.content="",e.tokens[a.token-1].type==="text"&&e.tokens[a.token-1].content==="~"&&r.push(a.token-1)}for(;r.length;){const o=r.pop();let s=o+1;for(;s<e.tokens.length&&e.tokens[s].type==="s_close";)s++;s--,o!==s&&(n=e.tokens[s],e.tokens[s]=e.tokens[o],e.tokens[o]=n)}}function uot(e){const t=e.tokens_meta,n=e.tokens_meta.length;pQ(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&pQ(e,t[r].delimiters)}const a0e={tokenize:cot,postProcess:uot};
357function dot(e,t){const n=e.pos,r=e.src.charCodeAt(n);if(t||r!==95&&r!==42)return!1;const i=e.scanDelims(e.pos,r===42);for(let o=0;o<i.length;o++){const s=e.push("text","",0);s.content=String.fromCharCode(r),e.delimiters.push({marker:r,length:i.length,token:e.tokens.length-1,end:-1,open:i.can_open,close:i.can_close})}return e.pos+=i.length,!0}function mQ(e,t){const n=t.length;for(let r=n-1;r>=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],s=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,a=String.fromCharCode(i.marker),l=e.tokens[i.token];l.type=s?"strong_open":"em_open",l.tag=s?"strong":"em",l.nesting=1,l.markup=s?a+a:a,l.content="";const c=e.tokens[o.token];c.type=s?"strong_close":"em_close",c.tag=s?"strong":"em",c.nesting=-1,c.markup=s?a+a:a,c.content="",s&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function fot(e){const t=e.tokens_meta,n=e.tokens_meta.length;mQ(e,e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&mQ(e,t[r].delimiters)}const l0e={tokenize:dot,postProcess:fot};function hot(e,t){let n,r,i,o,s="",a="",l=e.pos,c=!0;if(e.src.charCodeAt(e.pos)!==91)return!1;const d=e.pos,f=e.posMax,p=e.pos+1,m=e.md.helpers.parseLinkLabel(e,e.pos,!0);if(m<0)return!1;let y=m+1;if(y<f&&e.src.charCodeAt(y)===40){for(c=!1,y++;y<f&&(n=e.src.charCodeAt(y),!(!En(n)&&n!==10));y++);if(y>=f)return!1;if(l=y,i=e.md.helpers.parseLinkDestination(e.src,y,e.posMax),i.ok){for(s=e.md.normalizeLink(i.str),e.md.validateLink(s)?y=i.pos:s="",l=y;y<f&&(n=e.src.charCodeAt(y),!(!En(n)&&n!==10));y++);if(i=e.md.helpers.parseLinkTitle(e.src,y,e.posMax),y<f&&l!==y&&i.ok)for(a=i.str,y=i.pos;y<f&&(n=e.src.charCodeAt(y),!(!En(n)&&n!==10));y++);}(y>=f||e.src.charCodeAt(y)!==41)&&(c=!0),y++}if(c){if(typeof e.env.references>"u")return!1;if(y<f&&e.src.charCodeAt(y)===91?(l=y+1,y=e.md.helpers.parseLinkLabel(e,y),y>=0?r=e.src.slice(l,y++):y=m+1):y=m+1,r||(r=e.src.slice(p,m)),o=e.env.references[cS(r)],!o)return e.pos=d,!1;s=o.href,a=o.title}if(!t){e.pos=p,e.posMax=m;const v=e.push("link_open","a",1),b=[["href",s]];v.attrs=b,a&&b.push(["title",a]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=y,e.posMax=f,!0}function pot(e,t){let n,r,i,o,s,a,l,c,d="";const f=e.pos,p=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const m=e.pos+2,y=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(y<0)return!1;if(o=y+1,o<p&&e.src.charCodeAt(o)===40){for(o++;o<p&&(n=e.src.charCodeAt(o),!(!En(n)&&n!==10));o++);if(o>=p)return!1;for(c=o,a=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),a.ok&&(d=e.md.normalizeLink(a.str),e.md.validateLink(d)?o=a.pos:d=""),c=o;o<p&&(n=e.src.charCodeAt(o),!(!En(n)&&n!==10));o++);if(a=e.md.helpers.parseLinkTitle(e.src,o,e.posMax),o<p&&c!==o&&a.ok)for(l=a.str,o=a.pos;o<p&&(n=e.src.charCodeAt(o),!(!En(n)&&n!==10));o++);else l="";if(o>=p||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o<p&&e.src.charCodeAt(o)===91?(c=o+1,o=e.md.helpers.parseLinkLabel(e,o),o>=0?i=e.src.slice(c,o++):o=y+1):o=y+1,i||(i=e.src.slice(m,y)),s=e.env.references[cS(i)],!s)return e.pos=f,!1;d=s.href,l=s.title}if(!t){r=e.src.slice(m,y);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),C=[["src",d],["alt",""]];b.attrs=C,b.children=v,b.content=r,l&&C.push(["title",l])}return e.pos=o,e.posMax=p,!0}const mot=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,got=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function yot(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const s=e.src.charCodeAt(n);if(s===60)return!1;if(s===62)break}const o=e.src.slice(r+1,n);if(got.test(o)){const s=e.md.normalizeLink(o);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}if(mot.test(o)){const s=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(s))return!1;if(!t){const a=e.push("link_open","a",1);a.attrs=[["href",s]],a.markup="autolink",a.info="auto";const l=e.push("text","",0);l.content=e.md.normalizeLinkText(o);const c=e.push("link_close","a",-1);c.markup="autolink",c.info="auto"}return e.pos+=o.length+2,!0}return!1}function vot(e){return/^<a[>\s]/i.test(e)}function bot(e){return/^<\/a\s*>/i.test(e)}function xot(e){const t=e|32;return t>=97&&t<=122}function wot(e,t){if(!e.md.options.html)return!1;
357const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!xot(i))return!1;const o=e.src.slice(r).match(Xit);if(!o)return!1;if(!t){const s=e.push("html_inline","",0);s.content=o[0],vot(s.content)&&e.linkLevel++,bot(s.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Cot=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Sot=/^&([a-z][a-z0-9]{1,31});/i;function Eot(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(Cot);if(o){if(!t){const s=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),a=e.push("text_special","",0);a.content=aI(s)?K4(s):K4(65533),a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(Sot);if(o){const s=e0e(o[0]);if(s!==o[0]){if(!t){const a=e.push("text_special","",0);a.content=s,a.markup=o[0],a.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function gQ(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let s=0;s<n;s++){const a=e[s];if(o.push(0),(e[r].marker!==a.marker||i!==a.token-1)&&(r=s),i=a.token,a.length=a.length||0,!a.close)continue;t.hasOwnProperty(a.marker)||(t[a.marker]=[-1,-1,-1,-1,-1,-1]);const l=t[a.marker][(a.open?3:0)+a.length%3];let c=r-o[r]-1,d=c;for(;c>l;c-=o[c]+1){const f=e[c];if(f.marker===a.marker&&f.open&&f.end<0){let p=!1;if((f.close||a.open)&&(f.length+a.length)%3===0&&(f.length%3!==0||a.length%3!==0)&&(p=!0),!p){const m=c>0&&!e[c-1].open?o[c-1]+1:0;o[s]=s-c+m,o[c]=m,a.open=!1,f.end=s,f.close=!1,d=-1,i=-2;break}}}d!==-1&&(t[a.marker][(a.open?3:0)+(a.length||0)%3]=d)}}function kot(e){const t=e.tokens_meta,n=e.tokens_meta.length;gQ(e.delimiters);for(let r=0;r<n;r++)t[r]&&t[r].delimiters&&gQ(t[r].delimiters)}function _ot(e){let t,n,r=0;const i=e.tokens,o=e.tokens.length;for(t=n=0;t<o;t++)i[t].nesting<0&&r--,i[t].level=r,i[t].nesting>0&&r++,i[t].type==="text"&&t+1<o&&i[t+1].type==="text"?i[t+1].content=i[t].content+i[t+1].content:(t!==n&&(i[n]=i[t]),n++);t!==n&&(i.length=n)}const NA=[["text",rot],["linkify",oot],["newline",sot],["escape",aot],["backticks",lot],["strikethrough",a0e.tokenize],["emphasis",l0e.tokenize],["link",hot],["image",pot],["autolink",yot],["html_inline",wot],["entity",Eot]],jA=[["balance_pairs",kot],["strikethrough",a0e.postProcess],["emphasis",l0e.postProcess],["fragments_join",_ot]];function db(){this.ruler=new oo;for(let e=0;e<NA.length;e++)this.ruler.push(NA[e][0],NA[e][1]);this.ruler2=new oo;for(let e=0;e<jA.length;e++)this.ruler2.push(jA[e][0],jA[e][1])}db.prototype.skipToken=function(e){const t=e.pos,n=this.ruler.getRules(""),r=n.length,i=e.md.options.maxNesting,o=e.cache;if(typeof o[t]<"u"){e.pos=o[t];return}let s=!1;if(e.level<i){for(let a=0;a<r;
vendor: 2,966 bytes, line 357
357a++)if(e.level++,s=n[a](e,!0),e.level--,s){if(t>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;s||e.pos++,o[t]=e.pos};db.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos<r;){const o=e.pos;let s=!1;if(e.level<i){for(let a=0;a<n;a++)if(s=t[a](e,!1),s){if(o>=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(s){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};db.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),s=o.length;for(let a=0;a<s;a++)o[a](i)};db.prototype.State=ub;function Aot(e){const t={};e=e||{},t.src_Any=Ype.source,t.src_Cc=Xpe.source,t.src_Z=Qpe.source,t.src_P=oI.source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");const n="[><ï½]";return t.src_pseudo_letter="(?:(?!"+n+"|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|"+n+"|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|"+n+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:
357/\\-_@])(?:[$+<=>^`|ï½]|"+t.src_ZPCc+"))((?![$+<=>^`|ï½])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|ï½]|"+t.src_ZPCc+"))((?![$+<=>^`|ï½])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function AM(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function dS(e){return Object.prototype.toString.call(e)}function Not(e){return dS(e)==="[object String]"}function jot(e){return dS(e)==="[object Object]"}function Tot(e){return dS(e)==="[object RegExp]"}function yQ(e){return dS(e)==="[object Function]"}function Mot(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const c0e={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function Oot(e){return Object.keys(e||{}).reduce(function(t,n){return t||c0e.hasOwnProperty(n)},!1)}const Rot={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},Pot="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",Dot="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|ÑÑ".split("|");function Iot(e){e.__index__=-1,e.__text_cache__=""}function Lot(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function vQ(){return function(e,t){t.normalize(e)}}function Y4(e){const t=e.re=Aot(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(Pot),n.push(t.src_xn),t.src_tlds=n.join("|");function r(a){return a.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(a,l){throw new Error('(LinkifyIt) Invalid schema "'+a+'": '+l)}Object.keys(e.__schemas__).forEach(function(a){const l=e.__schemas__[a];if(l===null)return;const c={validate:null,link:null};if(e.__compiled__[a]=c,jot(l)){Tot(l.validate)?c.validate=Lot(l.validate):yQ(l.validate)?c.validate=l.validate:o(a,l),yQ(l.normalize)?c.normalize=l.normalize:l.normalize?o(a,l):c.normalize=vQ();return}if(Not(l)){i.push(a);return}o(a,l)}),i.forEach(function(a){e.__compiled__[e.__schemas__[a]]&&(e.__compiled__[a].validate=e.__compiled__[e.__schemas__[a]].validate,e.__compiled__[a].normalize=e.__compiled__[e.__schemas__[a]].normalize)}),e.__compiled__[""]={validate:null,normalize:vQ()};const s=Object.keys(e.__compiled__).filter(function(a){return a.length>0&&e.__compiled__[a]}).map(Mot).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><ï½]|"+t.src_ZPCc+"))("+s+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><ï½]|"+t.src_ZPCc+"))("+s+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),Iot(e)}function $ot(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function NM(e,t){const n=new $ot(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Mo(e,t){if(!(this instanceof Mo))return new Mo(e,t);t||Oot(e)&&(t=e,e={}),this.__opts__=AM({},c0e,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=AM({},Rot,e),this.__compiled__={},this.__tlds__=Dot,this.__tlds_replaced__=!1,this.re={},Y4(this)}Mo.prototype.add=function(t,n){return this.__schemas__[t]=n,Y4(this),this};Mo.prototype.set=function(t){return this.__opts__=AM(this.__opts__,t),this};Mo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,s,a,l,c,d;if(this.re.schema_test.test(t)){for(l=this.re.schema_search,l.lastIndex=0;(n=l.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],l.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(c=t.search(this.re.host_fuzzy_test),c>=0&&(this.__index__<0||c<this.__index__)&&(r=t.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(s=r.index+r[1].length,(this.__index__<0||s<this.__index__)&&(this.__schema__="",this.__index__=s,this.__last_index__=r.index+r[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(d=t.indexOf("@"),d>=0&&(i=t.match(this.re.email_fuzzy))!==null&&(s=i.index+i[1].length,a=i.index+i[0].length,(this.__index__<0||s<this.__index__||s===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=s,this.__last_index__=a))),this.__index__>=0};Mo.prototype.pretest=function(t){return this.re.pretest.test(t)};Mo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Mo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(NM(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(NM(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Mo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,NM(this,0)):null};Mo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),Y4(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,Y4(this),this)};Mo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Mo.prototype.onCompile=function(){};const Zp=2147483647,Ia=36,uI=1,tv=26,zot=38,Fot=700,u0e=72,d0e=128,f0e="-",Bot=/^xn--/,Hot=/[^\0-\x7F]/,Vot=/[\x2E\u3002\uFF0E\uFF61]/g,Uot={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >
357= 0x80 (not a basic code point)","invalid-input":"Invalid input"},TA=Ia-uI,La=Math.floor,MA=String.fromCharCode;function Su(e){throw new RangeError(Uot[e])}function qot(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function h0e(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(Vot,".");const i=e.split("."),o=qot(i,t).join(".");return r+o}function p0e(e){const t=[];let n=0;const r=e.length;for(;n<r;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){const o=e.charCodeAt(n++);(o&64512)==56320?t.push(((i&1023)<<10)+(o&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}const Wot=e=>String.fromCodePoint(...e),Got=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ia},bQ=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},m0e=function(e,t,n){let r=0;for(e=n?La(e/Fot):e>>1,e+=La(e/t);e>TA*tv>>1;r+=Ia)e=La(e/TA);return La(r+(TA+1)*e/(e+zot))},g0e=function(e){const t=[],n=e.length;let r=0,i=d0e,o=u0e,s=e.lastIndexOf(f0e);s<0&&(s=0);for(let a=0;a<s;++a)e.charCodeAt(a)>=128&&Su("not-basic"),t.push(e.charCodeAt(a));for(let a=s>0?s+1:0;a<n;){const l=r;for(let d=1,f=Ia;;f+=Ia){a>=n&&Su("invalid-input");const p=Got(e.charCodeAt(a++));p>=Ia&&Su("invalid-input"),p>La((Zp-r)/d)&&Su("overflow"),r+=p*d;const m=f<=o?uI:f>=o+tv?tv:f-o;if(p<m)break;const y=Ia-m;d>La(Zp/y)&&Su("overflow"),d*=y}const c=t.length+1;o=m0e(r-l,c,l==0),La(r/c)>Zp-i&&Su("overflow"),i+=La(r/c),r%=c,t.splice(r++,0,i)}return String.fromCodePoint(...t)},y0e=function(e){const t=[];e=p0e(e);const n=e.length;let r=d0e,i=0,o=u0e;for(const l of e)l<128&&t.push(MA(l));const s=t.length;let a=s;for(s&&t.push(f0e);a<n;){let l=Zp;for(const d of e)d>=r&&d<l&&(l=d);const c=a+1;l-r>La((Zp-i)/c)&&Su("overflow"),i+=(l-r)*c,r=l;for(const d of e)if(d<r&&++i>Zp&&Su("overflow"),d===r){let f=i;for(let p=Ia;;p+=Ia){const m=p<=o?uI:p>=o+tv?tv:p-o;if(f<m)break;const y=f-m,v=Ia-m;t.push(MA(bQ(m+y%v,0))),f=La(y/v)}t.push(MA(bQ(f,0))),o=m0e(i,c,a===s),i=0,++a}++i,++r}return t.join("")},Kot=function(e){return h0e(e,function(t){return Bot.test(t)?g0e(t.slice(4).toLowerCase()):t})},Yot=function(e){return h0e(e,function(t){return Hot.test(t)?"xn--"+y0e(t):t})},v0e={version:"2.3.1",ucs2:{decode:p0e,encode:Wot},decode:g0e,encode:y0e,toASCII:Yot,toUnicode:Kot},Xot={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},Zot={options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},Qot={options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"ââââ",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}},Jot={default:Xot,zero:Zot,commonmark:Qot},est=/^(vbscript|javascript|file|data):/,tst=/^data:image\/(gif|png|jpeg|webp);/;function nst(e){const t=e.trim().toLowerCase();return est.test(t)?tst.test(t):!0}const b0e=["http:","https:","mailto:"];function rst(e){const t=iI(e,!0);if(t.hostname&&(!t.protocol||b0e.indexOf(t.protocol)>=0))try{t.hostname=v0e.toASCII(t.hostname)}catch{}return cb(rI(t))}function ist(e){const t=iI(e,!0);if(t.hostname&&(!t.protocol||b0e.indexOf(t.protocol)>=0))try{t.hostname=v0e.toUnicode(t.hostname)}catch{}return B0(rI(t),B0.defaultChars+"%")}function so(e,t){if(!(this instanceof so))return new so(e,t);t||sI(e)||(t=e||{},e="default"),this.inline=new db,this.block=new uS,this.core=new lI,this.renderer=new Cm,this.linkify=new Mo,this.validateLink=nst,this.normalizeLink=rst,this.normalizeLinkText=ist,this.utils=sit,this.helpers=lS({},uit),this.options={},this.configure(e),t&&this.set(t)}so.prototype.set=function(e){return lS(this.options,e),this};so.prototype.configure=function(e){const t=this;if(sI(e)){const n=e;if(e=Jot[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEac
357h(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};so.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};so.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};so.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};so.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};so.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};so.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};so.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};const ost=new hD({nodes:{doc:{content:"block+"},paragraph:{content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM(){return["p",0]}},blockquote:{content:"block+",group:"block",parseDOM:[{tag:"blockquote"}],toDOM(){return["blockquote",0]}},horizontal_rule:{group:"block",parseDOM:[{tag:"hr"}],toDOM(){return["div",["hr"]]}},heading:{attrs:{level:{default:1}},content:"(text | image)*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}],toDOM(e){return["h"+e.attrs.level,0]}},code_block:{content:"text*",group:"block",code:!0,defining:!0,marks:"",attrs:{params:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>({params:e.getAttribute("data-params")||""})}],toDOM(e){return["pre",e.attrs.params?{"data-params":e.attrs.params}:{},["code",0]]}},ordered_list:{content:"list_item+",group:"block",attrs:{order:{default:1},tight:{default:!1}},parseDOM:[{tag:"ol",getAttrs(e){return{order:e.hasAttribute("start")?+e.getAttribute("start"):1,tight:e.hasAttribute("data-tight")}}}],toDOM(e){return["ol",{start:e.attrs.order==1?null:e.attrs.order,"data-tight":e.attrs.tight?"true":null},0]}},bullet_list:{content:"list_item+",group:"block",attrs:{tight:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>({tight:e.hasAttribute("data-tight")})}],toDOM(e){return["ul",{"data-tight":e.attrs.tight?"true":null},0]}},list_item:{content:"block+",defining:!0,parseDOM:[{tag:"li"}],toDOM(){return["li",0]}},text:{group:"inline"},image:{inline:!0,attrs:{src:{},alt:{default:null},title:{default:null}},group:"inline",draggable:!0,parseDOM:[{tag:"img[src]",getAttrs(e){return{src:e.getAttribute("src"),title:e.getAttribute("title"),alt:e.getAttribute("alt")}}}],toDOM(e){return["img",e.attrs]}},hard_break:{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}],toDOM(){return["br"]}}},marks:{em:{parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"},{style:"font-style=normal",clearMark:e=>e.type.name=="em"}],toDOM(){return["em"]}},strong:{parseDOM:[{tag:"strong"},{tag:"b",getAttrs:e=>e.style.fontWeight!="normal"&&null},{style:"font-weight=400",clearMark:e=>e.type.name=="strong"},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],toDOM(){return["strong"]}},link:{attrs:{href:{},title:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs(e){return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM(e){return["a",e.attrs]}},code:{code:!0,parseDOM:[{tag:"code"}],toDOM(){return["code"]}}}});function sst(e,t){if(e.isText&&t.isText&&sn.sameSet(e.marks,t.marks))return e.withText(e.text+t.text)}class ast{constructor(t,n){this.schema=t,this.tokenHandlers=n,this.stack=[{type:t.topNodeType,attrs:null,content:[],marks:sn.none}]}top(){return this.stack[this.stack.length-1]}push(t){this.stack.length&&this.top().content.push(t)}addText(t){if(!t)return;let n=this.top(),r=n.content,i=r[r.length-1],o=this.schema.text(t,n.marks),s;i&&(s=sst(i,o))?r[r.length-1]=s:r.push(o)}openMark(t){let n=this.top();n.marks=t.addToSet(n.marks)}closeMark(t){let n=this.top();n.marks=t.removeFromSet(n.marks)}parseTokens(t){for(let n=0;n<t.length;n++){let r=t[n],i=this.tokenHandlers[r.type];if(!i)throw new Error("Token type `"+r.type+"` not supported by Markdown parser");i(this,r,t,n)}}addNode(t,n,r){let i=this.top(),o=t.createAndFill(n,r,i?i.marks:[]);return o?(this.push(o),o):null}openNode(t,n){this.stack.push({type:t,attrs:n,content:[],marks:sn.none})}closeNode(){let t=this.stack.pop();return this.addNode(t.type,t.attrs,t.content)}}function qg(e,t,n,r){return e.getAttrs?e.getAttrs(t,n,r):e.attrs instanceof Function?e.attrs(t):e.attrs}function OA(e,t){return e.noCloseToken||t=="code_inline"||t=="code_block"||t=="fence"}function xQ(e){return e[e.length-1]==` 358`?e.slice(0,e.length-1):e}function RA(){}function lst(e,t){let n=Object.create(null);for(let r in t){let i=t[r];
vendor: 4,816 bytes, lines 358-363
358if(i.block){let o=e.nodeType(i.block);OA(i,r)?n[r]=(s,a,l,c)=>{s.openNode(o,qg(i,a,l,c)),s.addText(xQ(a.content)),s.closeNode()}:(n[r+"_open"]=(s,a,l,c)=>s.openNode(o,qg(i,a,l,c)),n[r+"_close"]=s=>s.closeNode())}else if(i.node){let o=e.nodeType(i.node);n[r]=(s,a,l,c)=>s.addNode(o,qg(i,a,l,c))}else if(i.mark){let o=e.marks[i.mark];OA(i,r)?n[r]=(s,a,l,c)=>{s.openMark(o.create(qg(i,a,l,c))),s.addText(xQ(a.content)),s.closeMark(o)}:(n[r+"_open"]=(s,a,l,c)=>s.openMark(o.create(qg(i,a,l,c))),n[r+"_close"]=s=>s.closeMark(o))}else if(i.ignore)OA(i,r)?n[r]=RA:(n[r+"_open"]=RA,n[r+"_close"]=RA);else throw new RangeError("Unrecognized parsing spec "+JSON.stringify(i))}return n.text=(r,i)=>r.addText(i.content),n.inline=(r,i)=>r.parseTokens(i.children),n.softbreak=n.softbreak||(r=>r.addText(" ")),n}let cst=class{constructor(t,n,r){this.schema=t,this.tokenizer=n,this.tokens=r,this.tokenHandlers=lst(t,r)}parse(t,n={}){let r=new ast(this.schema,this.tokenHandlers),i;r.parseTokens(this.tokenizer.parse(t,n));do i=r.closeNode();while(r.stack.length);return i||this.schema.topNodeType.createAndFill()}};function wQ(e,t){for(;++t<e.length;)if(e[t].type!="list_item_open")return e[t].hidden;return!1}new cst(ost,so("commonmark",{html:!1}),{blockquote:{block:"blockquote"},paragraph:{block:"paragraph"},list_item:{block:"list_item"},bullet_list:{block:"bullet_list",getAttrs:(e,t,n)=>({tight:wQ(t,n)})},ordered_list:{block:"ordered_list",getAttrs:(e,t,n)=>({order:+e.attrGet("start")||1,tight:wQ(t,n)})},heading:{block:"heading",getAttrs:e=>({level:+e.tag.slice(1)})},code_block:{block:"code_block",noCloseToken:!0},fence:{block:"code_block",getAttrs:e=>({params:e.info||""}),noCloseToken:!0},hr:{node:"horizontal_rule"},image:{node:"image",getAttrs:e=>({src:e.attrGet("src"),title:e.attrGet("title")||null,alt:e.children[0]&&e.children[0].content||null})},hardbreak:{node:"hard_break"},em:{mark:"em"},strong:{mark:"strong"},link:{mark:"link",getAttrs:e=>({href:e.attrGet("href"),title:e.attrGet("title")||null})},code_inline:{mark:"code",noCloseToken:!0}});const ust={open:"",close:"",mixable:!0};let dst=class{constructor(t,n,r={}){this.nodes=t,this.marks=n,this.options=r}serialize(t,n={}){n=Object.assign({},this.options,n);let r=new x0e(this.nodes,this.marks,n);return r.renderContent(t),r.out}};const ol=new dst({blockquote(e,t){e.wrapBlock("> ",null,t,()=>e.renderContent(t))},code_block(e,t){const n=t.textContent.match(/`{3,}/gm),r=n?n.sort().slice(-1)[0]+"`":"```";e.write(r+(t.attrs.params||"")+` 359`),e.text(t.textContent,!1),e.write(` 360`),e.write(r),e.closeBlock(t)},heading(e,t){e.write(e.repeat("#",t.attrs.level)+" "),e.renderInline(t,!1),e.closeBlock(t)},horizontal_rule(e,t){e.write(t.attrs.markup||"---"),e.closeBlock(t)},bullet_list(e,t){e.renderList(t," ",()=>(t.attrs.bullet||"*")+" ")},ordered_list(e,t){let n=t.attrs.order||1,r=String(n+t.childCount-1).length,i=e.repeat(" ",r+2);e.renderList(t,i,o=>{let s=String(n+o);return e.repeat(" ",r-s.length)+s+". "})},list_item(e,t){e.renderContent(t)},paragraph(e,t){e.renderInline(t),e.closeBlock(t)},image(e,t){e.write("]/g,"\\$&")+(t.attrs.title?' "'+t.attrs.title.replace(/"/g,'\\"')+'"':"")+")")},hard_break(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type){e.write(`\\ 361`);return}},text(e,t){e.text(t.text,!e.inAutolink)}},{em:{open:"*",close:"*",mixable:!0,expelEnclosingWhitespace:!0},strong:{open:"**",close:"**",mixable:!0,expelEnclosingWhitespace:!0},link:{open(e,t,n,r){return e.inAutolink=fst(t,n,r),e.inAutolink?"<":"["},close(e,t,n,r){let{inAutolink:i}=e;return e.inAutolink=void 0,i?">":"]("+t.attrs.href.replace(/[\(\)"]/g,"\\$&")+(t.attrs.title?` "${t.attrs.title.replace(/"/g,'\\"')}"`:"")+")"},mixable:!0},code:{open(e,t,n,r){return CQ(n.child(r),-1)},close(e,t,n,r){return CQ(n.child(r-1),1)},escape:!1}});function CQ(e,t){let n=/`+/g,r,i=0;if(e.isText)for(;r=n.exec(e.text);)i=Math.max(i,r[0].length);let o=i>0&&t>0?" `":"`";for(let s=0;s<i;s++)o+="`";return i>0&&t<0&&(o+=" "),o}function fst(e,t,n){if(e.attrs.title||!/^\w+:/.test(e.attrs.href))return!1;let r=t.child(n);return!r.isText||r.text!=e.attrs.href||r.marks[r.marks.length-1]!=e?!1:n==t.childCount-1||!e.isInSet(t.child(n+1).marks)}let x0e=class{constructor(t,n,r){this.nodes=t,this.marks=n,this.options=r,this.delim="",this.out="",this.closed=null,this.inAutolink=void 0,this.atBlockStart=!1,this.inTightList=!1,typeof this.options.tightLists>"u"&&(this.options.tightLists=!1),typeof this.options.hardBreakNodeName>"u"&&(this.options.hardBreakNodeName="hard_break")}flushClose(t=2){if(this.closed){if(this.atBlank()||(this.out+=` 362`),t>1){let n=this.delim,r=/\s+$/.exec(n);r&&(n=n.slice(0,n.length-r[0].length));for(let i=1;i<t;i++)this.out+=n+` 363`}this.closed=null}}getMark(t){let n=this.marks[t];
363if(!n){if(this.options.strict!==!1)throw new Error(`Mark type \`${t}\` not supported by Markdown renderer`);n=ust}return n}wrapBlock(t,n,r,i){let o=this.delim;this.write(n??t),this.delim+=t,i(),this.delim=o,this.closeBlock(r)}atBlank(){return/(^|\n)$/.test(this.out)}ensureNewLine(){this.atBlank()||(this.out+=` 364`)}write(t){this.flushClose(),this.delim&&this.atBlank()&&(this.out+=this.delim),t&&(this.out+=t)}closeBlock(t){this.closed=t}text(t,n=!0){let r=t.split(` 365`);for(let i=0;i<r.length;i++)this.write(),!n&&r[i][0]=="["&&/(^|[^\\])\!$/.test(this.out)&&(this.out=this.out.slice(0,this.out.length-1)+"\\!"),this.out+=n?this.esc(r[i],this.atBlockStart):r[i],i!=r.length-1&&(this.out+=` 366`)}render(t,n,r){if(this.nodes[t.type.name])this.nodes[t.type.name](this,t,n,r);else{if(this.options.strict!==!1)throw new Error("Token type `"+t.type.name+"` not supported by Markdown renderer");t.type.isLeaf||(t.type.inlineContent?this.renderInline(t):this.renderContent(t),t.isBlock&&this.closeBlock(t))}}renderContent(t){t.forEach((n,r,i)=>
366this.render(n,t,i))}renderInline(t,n=!0){this.atBlockStart=n;let r=[],i="",o=(s,a,l)=>{let c=s?s.marks:[];s&&s.type.name===this.options.hardBreakNodeName&&(c=c.filter(v=>{if(l+1==t.childCount)return!1;let b=t.child(l+1);return v.isInSet(b.marks)&&(!b.isText||/\S/.test(b.text))}));let d=i;if(i="",s&&s.isText&&c.some(v=>{let b=this.getMark(v.type.name);return b&&b.expelEnclosingWhitespace&&!v.isInSet(r)})){let[v,b,C]=/^(\s*)(.*)$/m.exec(s.text);b&&(d+=b,s=C?s.withText(C):null,s||(c=r))}if(s&&s.isText&&c.some(v=>{let b=this.getMark(v.type.name);return b&&b.expelEnclosingWhitespace&&(l==t.childCount-1||!v.isInSet(t.child(l+1).marks))})){let[v,b,C]=/^(.*?)(\s*)$/m.exec(s.text);C&&(i=C,s=b?s.withText(b):null,s||(c=r))}let f=c.length?c[c.length-1]:null,p=f&&this.getMark(f.type.name).escape===!1,m=c.length-(p?1:0);e:for(let v=0;v<m;v++){let b=c[v];if(!this.getMark(b.type.name).mixable)break;for(let C=0;C<r.length;C++){let S=r[C];if(!this.getMark(S.type.name).mixable)break;if(b.eq(S)){v>C?c=c.slice(0,C).concat(b).concat(c.slice(C,v)).concat(c.slice(v+1,m)):C>v&&(c=c.slice(0,v).concat(c.slice(v+1,C)).concat(b).concat(c.slice(C,m)));continue e}}}let y=0;for(;y<Math.min(r.length,m)&&c[y].eq(r[y]);)++y;for(;y<r.length;)this.text(this.markString(r.pop(),!1,t,l),!1);if(d&&this.text(d),s){for(;r.length<m;){let v=c[r.length];r.push(v),this.text(this.markString(v,!0,t,l),!1),this.atBlockStart=!1}p&&s.isText?this.text(this.markString(f,!0,t,l)+s.text+this.markString(f,!1,t,l+1),!1):this.render(s,t,l),this.atBlockStart=!1}s!=null&&s.isText&&s.nodeSize>0&&(this.atBlockStart=!1)};t.forEach(o),o(null,0,t.childCount),this.atBlockStart=!1}renderList(t,n,r){this.closed&&this.closed.type==t.type?this.flushClose(3):this.inTightList&&this.flushClose(1);let i=typeof t.attrs.tight<"u"?t.attrs.tight:this.options.tightLists,o=this.inTightList;this.inTightList=i,t.forEach((s,a,l)=>{l&&i&&this.flushClose(1),this.wrapBlock(n,r(l),t,()=>this.render(s,t,l))}),this.inTightList=o}esc(t,n=!1){return t=t.replace(/[`*\\~\[\]_]/g,(r,i)=>r=="_"&&i>0&&i+1<t.length&&t[i-1].match(/\w/)&&t[i+1].match(/\w/)?r:"\\"+r),n&&(t=t.replace(/^(\+[ ]|[\-*>])/,"\\$&").replace(/^(\s*)(#{1,6})(\s|$)/,"$1\\$2$3").replace(/^(\s*\d+)\.\s/,"$1\\. ")),this.options.escapeExtraCharacters&&(t=t.replace(this.options.escapeExtraCharacters,"\\$&")),t}quote(t){let n=t.indexOf('"')==-1?'""':t.indexOf("'")==-1?"''":"()";return n[0]+t+n[1]}repeat(t,n){let r="";for(let i=0;i<n;i++)r+=t;return r}markString(t,n,r,i){let o=this.getMark(t.type.name),s=n?o.open:o.close;return typeof s=="string"?s:s(this,t,r,i)}getEnclosingWhitespace(t){return{leading:(t.match(/^(\s+)/)||[void 0])[0],trailing:(t.match(/(\s+)$/)||[void 0])[0]}}};var PA,SQ;function hst(){if(SQ)return PA;SQ=1;var e=!0,t=!1,n=!1;PA=function(v,b){b&&(e=!b.enabled,t=!!b.label,n=!!b.labelAfter),v.core.ruler.after("inline","github-task-lists",function(C){for(var S=C.tokens,E=2;E<S.length;E++)o(S,E)&&(s(S[E],C.Token),r(S[E-2],"class","task-list-item"+(e?"":" enabled")),r(S[i(S,E-2)],"class","contains-task-list"))})};function r(v,b,C){var S=v.attrIndex(b),E=[b,C];S<0?v.attrPush(E):v.attrs[S]=E}function i(v,b){for(var C=v[b].level-1,S=b-1;S>=0;S--)if(v[S].level===C)return S;return-1}function o(v,b){return f(v[b])&&p(v[b-1])&&m(v[b-2])&&y(v[b])}function s(v,b){if(v.children.unshift(a(v,b)),v.children[1].content=v.children[1].content.slice(3),v.content=v.content.slice(3),t)if(n){v.children.pop();var C="task-item-"+Math.ceil(Math.random()*(1e4*1e3)-1e3);v.children[0].content=v.children[0].content.slice(0,-1)+' id="'+C+'">',v.children.push(d(v.content,C,b))}else v.children.unshift(l(b)),v.children.push(c(b))}function a(v,b){var C=new b("html_inline","",0),S=e?' disabled="" ':"";return v.content.indexOf("[ ] ")===0?C.content='<input class="task-list-item-checkbox"'+S+'type="checkbox">':(v.content.indexOf("[x] ")===0||v.content.indexOf("[X] ")===0)&&(C.content='<input class="task-list-item-checkbox" checked=""'+S+'type="checkbox">'),C}function l(v){var b=new v("html_inline","",0);return b.content="<label>",b}function c(v){var b=new v("html_inline","",0);return b.content="</label>",b}function d(v,b,C){var S=new C("html_inline","",0);return S.content='<label class="task-list-item-label" for="'+b+'">'+v+"</label>",S.attrs=[{for:b}],S}function f(v){return v.type==="inline"}function p(v){return v.type==="paragraph_open"}function m(v){return v.type==="list_item_open"}function y(v){return v.content.indexOf("[ ] ")===0||v.content.indexOf("[x] ")===0||v.content.indexOf("[X] ")===0}return PA}var pst=hst();const mst=Ht(pst);
366var gst=Object.defineProperty,yst=(e,t,n)=>t in e?gst(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X4=(e,t,n)=>(yst(e,typeof t!="symbol"?t+"":t,n),n);const vst=jt.create({name:"markdownTightLists",addOptions:()=>({tight:!0,tightClass:"tight",listTypes:["bulletList","orderedList"]}),addGlobalAttributes(){return[{types:this.options.listTypes,attributes:{tight:{default:this.options.tight,parseHTML:e=>e.getAttribute("data-tight")==="true"||!e.querySelector("p"),renderHTML:e=>({class:e.tight?this.options.tightClass:null,"data-tight":e.tight?"true":null})}}}]},addCommands(){var e=this;return{toggleTight:function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return n=>{let{editor:r,commands:i}=n;function o(s){if(!r.isActive(s))return!1;const a=r.getAttributes(s);return i.updateAttributes(s,{tight:t??!(a!=null&&a.tight)})}return e.options.listTypes.some(s=>o(s))}}}}}),EQ=so();function w0e(e,t){return EQ.inline.State.prototype.scanDelims.call({src:e,posMax:e.length}),new EQ.inline.State(e,null,null,[]).scanDelims(t,!0)}function C0e(e,t,n,r){let i=e.substring(0,n)+e.substring(n+t.length);return i=i.substring(0,n+r)+t+i.substring(n+r),i}function bst(e,t,n,r){let i=n,o=e;for(;i<r&&!w0e(o,i).can_open;)o=C0e(o,t,i,1),i++;return{text:o,from:i,to:r}}function xst(e,t,n,r){let i=r,o=e;for(;i>n&&!w0e(o,i).can_close;)o=C0e(o,t,i,-1),i--;return{text:o,from:n,to:i}}function wst(e,t,n,r){let i={text:e,from:n,to:r};return i=bst(i.text,t,i.from,i.to),i=xst(i.text,t,i.from,i.to),i.to-i.from<t.length+1&&(i.text=i.text.substring(0,i.from)+i.text.substring(i.to+t.length)),i.text}class Cst extends x0e{constructor(t,n,r){super(t,n,r??{}),X4(this,"inTable",!1),this.inlines=[]}render(t,n,r){super.render(t,n,r);const i=this.inlines[this.inlines.length-1];if(i!=null&&i.start&&i!==null&&i!==void 0&&i.end){const{delimiter:o,start:s,end:a}=this.normalizeInline(i);this.out=wst(this.out,o,s,a),this.inlines.pop()}}markString(t,n,r,i){const o=this.marks[t.type.name];if(o.expelEnclosingWhitespace)if(n)this.inlines.push({start:this.out.length,delimiter:o.open});else{const s=this.inlines.pop();this.inlines.push({...s,end:this.out.length})}return super.markString(t,n,r,i)}normalizeInline(t){let{start:n,end:r}=t;for(;this.out.charAt(n).match(/\s/);)n++;return{...t,start:n}}}const S0e=ai.create({name:"markdownHTMLMark",addStorage(){return{markdown:{serialize:{open(e,t){var n,r;return this.editor.storage.markdown.options.html?(n=(r=kQ(t))===null||r===void 0?void 0:r[0])!==null&&n!==void 0?n:"":(console.warn(`Tiptap Markdown: "${t.type.name}" mark is only available in html mode`),"")},close(e,t){var n,r;return this.editor.storage.markdown.options.html&&(n=(r=kQ(t))===null||r===void 0?void 0:r[1])!==null&&n!==void 0?n:""}},parse:{}}}}});function kQ(e){const t=e.type.schema,n=t.text(" ",[e]),i=ob(we.from(n),t).match(/^(<.*?>) (<\/.*?>)$/);return i?[i[1],i[2]]:null}function dI(e){const t=`<body>${e}</body>`;return new window.DOMParser().parseFromString(t,"text/html").body}function Sst(e){return e==null?void 0:e.replace(/</g,"<").replace(/>/g,">")}function Est(e){const t=e.parentElement,n=t.cloneNode();for(;t.firstChild&&t.firstChild!==e;)n.appendChild(t.firstChild);n.childNodes.length>0&&t.parentElement.insertBefore(n,t),t.parentElement.insertBefore(e,t),t.childNodes.length===0&&t.remove()}function kst(e){const t=e.parentNode;for(;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)}const fS=Ot.create({name:"markdownHTMLNode",addStorage(){return{markdown:{serialize(e,t,n){this.editor.storage.markdown.options.html?e.write(_st(t,n)):(console.warn(`Tiptap Markdown: "${t.type.name}" node is only available in html mode`),e.write(`[${t.type.name}]`)),t.isBlock&&e.closeBlock(t)},parse:{}}}}});function _st(e,t){const n=e.type.schema,r=ob(we.from(e),n);return e.isBlock&&(t instanceof we||t.type.name===n.topNodeType.name)?Ast(r):r}function Ast(e){const n=dI(e).firstElementChild;return n.innerHTML=n.innerHTML.trim()?` 367${n.innerHTML} 368`:` 369`,n.outerHTML}const Nst=Ot.create({name:"blockquote"}),jst=Nst.extend({addStorage(){return{markdown:{serialize:ol.nodes.blockquote,parse:{}}}}}),Tst=Ot.create({name:"bulletList"}),E0e=Tst.extend({addStorage(){return{markdown:{serialize(e,t){return e.renderList(t," ",()=>(this.editor.storage.markdown.options.bulletListMarker||"-")+" ")},parse:{}}}}}),Mst=Ot.create({name:"codeBlock"}),Ost=Mst.extend({addStorage(){return{markdown:{serialize(e,t){e.write("```"+(t.attrs.language||"")+` 370`),e.text(t.textContent,!1),e.ensureNewLine(),e.write("```"),e.closeBlock(t)},parse:{setup(e){var t;e.set({langPrefix:(t=this.options.languageClassPrefix)!==null&&t!==void 0?t:"language-"})},updateDOM(e){e.innerHTML=e.innerHTML.replace(/\n<\/code><\/pre>/g,"</code></pre>")}}}}}}),Rst=Ot.create({name:"hardBreak"}),k0e=Rst.extend({addStorage(){return{markdown:{serialize(e,t,n,r){for(let i=r+1;i<n.childCount;i++)if(n.child(i).type!=t.type){e.write(e.inTable?fS.storage.markdown.serialize.call(this,e,t,n):`\\ 371`);return}},parse:{}}}}}),Pst=Ot.create({name:"heading"}),Dst=Pst.extend({addStorage(){return{markdown:{serialize:ol.nodes.heading,parse:{}}}}}),Ist=Ot.create({name:"horizontalRule"}),Lst=Ist.extend({addStorage(){return{markdown:{serialize:ol.nodes.horizontal_rule,parse:{}}}}}),$st=Ot.create({name:"image"}),zst=$st.extend({addStorage(){return{markdown:{serialize:ol.nodes.image,parse:{}}}}}),Fst=Ot.create({name:"listItem"}),Bst=Fst.extend({addStorage(){return{markdown:{serialize:ol.nodes.list_item,parse:{}}}}}),Hst=Ot.create({name:"orderedList"});function Vst(e,t,n){let r=0;for(;n-r>
3710&&t.child(n-r-1).type.name===e.type.name;r++);return r}const Ust=Hst.extend({addStorage(){return{markdown:{serialize(e,t,n,r){const i=t.attrs.start||1,o=String(i+t.childCount-1).length,s=e.repeat(" ",o+2),l=Vst(t,n,r)%2?") ":". ";e.renderList(t,s,c=>{const d=String(i+c);return e.repeat(" ",o-d.length)+d+l})},parse:{}}}}}),qst=Ot.create({name:"paragraph"}),Wst=qst.extend({addStorage(){return{markdown:{serialize:ol.nodes.paragraph,parse:{}}}}});function DA(e){var t,n;return(t=e==null||(n=e.content)===null||n===void 0?void 0:n.content)!==null&&t!==void 0?t:[]}const Gst=Ot.create({name:"table"}),Kst=Gst.extend({addStorage(){return{markdown:{serialize(e,t,n){if(!Yst(t)){fS.storage.markdown.serialize.call(this,e,t,n);return}e.inTable=!0,t.forEach((r,i,o)=>{if(e.write("| "),r.forEach((s,a,l)=>{l&&e.write(" | ");const c=s.firstChild;c.textContent.trim()&&e.renderInline(c)}),e.write(" |"),e.ensureNewLine(),!o){const s=Array.from({length:r.childCount}).map(()=>"---").join(" | ");e.write(`| ${s} |`),e.ensureNewLine()}}),e.closeBlock(t),e.inTable=!1},parse:{}}}}});function _Q(e){return e.attrs.colspan>1||e.attrs.rowspan>1}function Yst(e){const t=DA(e),n=t[0],r=t.slice(1);return!(DA(n).some(i=>i.type.name!=="tableHeader"||_Q(i)||i.childCount>1)||r.some(i=>DA(i).some(o=>o.type.name==="tableHeader"||_Q(o)||o.childCount>1)))}const Xst=Ot.create({name:"taskItem"}),Zst=Xst.extend({addStorage(){return{markdown:{serialize(e,t){const n=t.attrs.checked?"[x]":"[ ]";e.write(`${n} `),e.renderContent(t)},parse:{updateDOM(e){[...e.querySelectorAll(".task-list-item")].forEach(t=>{const n=t.querySelector("input");t.setAttribute("data-type","taskItem"),n&&(t.setAttribute("data-checked",n.checked),n.remove())})}}}}}}),Qst=Ot.create({name:"taskList"}),Jst=Qst.extend({addStorage(){return{markdown:{serialize:E0e.storage.markdown.serialize,parse:{setup(e){e.use(mst)},updateDOM(e){[...e.querySelectorAll(".contains-task-list")].forEach(t=>{t.setAttribute("data-type","taskList")})}}}}}}),eat=Ot.create({name:"text"}),tat=eat.extend({addStorage(){return{markdown:{serialize(e,t){e.text(Sst(t.text))},parse:{}}}}}),nat=ai.create({name:"bold"}),rat=nat.extend({addStorage(){return{markdown:{serialize:ol.marks.strong,parse:{}}}}}),iat=ai.create({name:"code"}),oat=iat.extend({addStorage(){return{markdown:{serialize:ol.marks.code,parse:{}}}}}),sat=ai.create({name:"italic"}),aat=sat.extend({addStorage(){return{markdown:{serialize:ol.marks.em,parse:{}}}}}),lat=ai.create({name:"link"}),cat=lat.extend({addStorage(){return{markdown:{serialize:ol.marks.link,parse:{}}}}}),uat=ai.create({name:"strike"}),dat=uat.extend({addStorage(){return{markdown:{serialize:{open:"~~",close:"~~",expelEnclosingWhitespace:!0},parse:{}}}}}),fat=[jst,E0e,Ost,k0e,Dst,Lst,fS,zst,Bst,Ust,Wst,Kst,Zst,Jst,tat,rat,oat,S0e,aat,cat,dat];function Z4(e){var t,n;const r=(t=e.storage)===null||t===void 0?void 0:t.markdown,i=(n=fat.find(o=>o.name===e.name))===null||n===void 0?void 0:n.storage.markdown;return r||i?{...i,...r}:null}class hat{constructor(t){X4(this,"editor",null),this.editor=t}serialize(t){const n=new Cst(this.nodes,this.marks,{hardBreakNodeName:k0e.name});return n.renderContent(t),n.out}get nodes(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.nodes).map(n=>[n,this.serializeNode(fS)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="node"&&this.serializeNode(n)).map(n=>[n.name,this.serializeNode(n)]))!==null&&t!==void 0?t:[])}}get marks(){var t;return{...Object.fromEntries(Object.keys(this.editor.schema.marks).map(n=>[n,this.serializeMark(S0e)])),...Object.fromEntries((t=this.editor.extensionManager.extensions.filter(n=>n.type==="mark"&&this.serializeMark(n)).map(n=>[n.name,this.serializeMark(n)]))!==null&&t!==void 0?t:[])}}serializeNode(t){var n;return(n=Z4(t))===null||n===void 0||(n=n.serialize)===null||n===void 0?void 0:n.bind({editor:this.editor,options:t.options})}serializeMark(t){var n;const r=(n=Z4(t))===null||n===void 0?void 0:n.serialize;return r?{...r,open:typeof r.open=="function"?r.open.bind({editor:this.editor,options:t.options}):r.open,close:typeof r.close=="function"?r.close.bind({editor:this.editor,options:t.options}):r.close}:null}}class pat{constructor(t,n){X4(this,"editor",null),X4(this,"md",null);let{html:r,linkify:i,breaks:o}=n;this.editor=t,this.md=this.withPatchedRenderer(so({html:r,linkify:i,breaks:o}))}parse(t){let{inline:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"){this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=Z4(o))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.setup)===null||s===void 0?void 0:s.call({editor:this.editor,options:o.options},this.md)});const r=this.md.render(t),i=dI(r);return this.editor.extensionManager.extensions.forEach(o=>{var s;return(s=Z4(o))===null||s===void 0||(s=s.parse)===null||s===void 0||(s=s.updateDOM)===null||s===void 0?void 0:s.call({editor:this.editor,options:o.options},i)}),this.normalizeDOM(i,{inline:n,content:t}),i.innerHTML}return t}normalizeDOM(t,n){let{inline:r,content:i}=n;return this.normalizeBlocks(t),t.querySelectorAll("*").forEach(o=>{var s;((s=o.nextSibling)===null||s===void 0?void 0:s.nodeType)===Node.TEXT_NODE&&!o.closest("pre")&&(o.nextSibling.textContent=o.nextSibling.textContent.replace(/^\n/,""))}
371),r&&this.normalizeInline(t,i),t}normalizeBlocks(t){const r=Object.values(this.editor.schema.nodes).filter(i=>i.isBlock).map(i=>{var o;return(o=i.spec.parseDOM)===null||o===void 0?void 0:o.map(s=>s.tag)}).flat().filter(Boolean).join(",");r&&[...t.querySelectorAll(r)].forEach(i=>{i.parentElement.matches("p")&&Est(i)})}normalizeInline(t,n){var r;if((r=t.firstElementChild)!==null&&r!==void 0&&r.matches("p")){var i,o,s,a;const l=t.firstElementChild,{nextElementSibling:c}=l,d=(i=(o=n.match(/^\s+/))===null||o===void 0?void 0:o[0])!==null&&i!==void 0?i:"",f=c?"":(s=(a=n.match(/\s+$/))===null||a===void 0?void 0:a[0])!==null&&s!==void 0?s:"";if(n.match(/^\n\n/)){l.innerHTML=`${l.innerHTML}${f}`;return}kst(l),t.innerHTML=`${d}${t.innerHTML}${f}`}}withPatchedRenderer(t){const n=r=>function(){const i=r(...arguments);return i===` 372`?i:i[i.length-1]===` 373`?i.slice(0,-1):i};return t.renderer.rules.hardbreak=n(t.renderer.rules.hardbreak),t.renderer.rules.softbreak=n(t.renderer.rules.softbreak),t.renderer.rules.fence=n(t.renderer.rules.fence),t.renderer.rules.code_block=n(t.renderer.rules.code_block),t.renderer.renderToken=n(t.renderer.renderToken.bind(t.renderer)),t}}const mat=jt.create({name:"markdownClipboard",addOptions(){return{transformPastedText:!1,transformCopiedText:!1}},addProseMirrorPlugins(){return[new an({key:new pn("markdownClipboard"),props:{clipboardTextParser:(e,t,n)=>{if(n||!this.options.transformPastedText)return null;const r=this.editor.storage.markdown.parser.parse(e,{inline:!0});return sc.fromSchema(this.editor.schema).parseSlice(dI(r),{preserveWhitespace:!0,context:t})},clipboardTextSerializer:e=>this.options.transformCopiedText?this.editor.storage.markdown.serializer.serialize(e.content):null}})]}}),gat=jt.create({name:"markdown",priority:50,addOptions(){return{html:!0,tightLists:!0,tightListClass:"tight",bulletListMarker:"-",linkify:!1,breaks:!1,transformPastedText:!1,transformCopiedText:!1}},addCommands(){const e=tpe.Commands.config.addCommands();return{setContent:(t,n,r)=>i=>e.setContent(i.editor.storage.markdown.parser.parse(t),n,r)(i),insertContentAt:(t,n,r)=>i=>e.insertContentAt(t,i.editor.storage.markdown.parser.parse(n,{inline:!0}),r)(i)}},onBeforeCreate(){this.editor.storage.markdown={options:{...this.options},parser:new pat(this.editor,this.options),serializer:new hat(this.editor),getMarkdown:()=>this.editor.storage.markdown.serializer.serialize(this.editor.state.doc)},this.editor.options.initialContent=this.editor.options.content,this.editor.options.content=this.editor.storage.markdown.parser.parse(this.editor.options.content)},onCreate(){this.editor.options.content=this.editor.options.initialContent,delete this.editor.options.initialContent},addStorage(){return{}},addExtensions(){return[vst.configure({tight:this.options.tightLists,tightClass:this.options.tightListClass}),mat.configure({transformPastedText:this.options.transformPastedText,transformCopiedText:this.options.transformCopiedText})]}});var yat=20,_0e=(e,t=0)=>{const n=[];return!e.children.length||t>yat||Array.from(e.children).forEach(r=>{r.tagName==="SPAN"?n.push(r):r.children.length&&n.push(..._0e(r,t+1))}),n},vat=e=>{if(!e.children.length)return;const t=_0e(e);t&&t.forEach(n=>{var r,i;const o=n.getAttribute("style"),s=(i=(r=n.parentElement)==null?void 0:r.closest("span"))==null?void 0:i.getAttribute("style");n.setAttribute("style",`${s};${o}`)})},A0e=ai.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!0}},parseHTML(){return[{tag:"span",consuming:!1,getAttrs:e=>e.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&vat(e),{}):!1}]},renderHTML({HTMLAttributes:e}){return["span",Bt(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleTextStyle:e=>({commands:t})=>t.toggleMark(this.name,e),removeEmptyTextStyle:()=>({tr:e})=>{const{selection:t}=e;return e.doc.nodesBetween(t.from,t.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(o=>!!o))||e.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),bat=jt.create({name:"backgroundColor",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{default:null,parseHTML:e=>{var t;const n=e.getAttribute("style");if(n){const r=n.split(";").map(i=>
373i.trim()).filter(Boolean);for(let i=r.length-1;i>=0;i-=1){const o=r[i].split(":");if(o.length>=2){const s=o[0].trim().toLowerCase(),a=o.slice(1).join(":").trim();if(s==="background-color")return a.replace(/['"]+/g,"")}}}return(t=e.style.backgroundColor)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.backgroundColor?{style:`background-color: ${e.backgroundColor}`}:{}}}}]},addCommands(){return{setBackgroundColor:e=>({chain:t})=>t().setMark("textStyle",{backgroundColor:e}).run(),unsetBackgroundColor:()=>({chain:e})=>e().setMark("textStyle",{backgroundColor:null}).removeEmptyTextStyle().run()}}}),N0e=jt.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;const n=e.getAttribute("style");if(n){const r=n.split(";").map(i=>i.trim()).filter(Boolean);for(let i=r.length-1;i>=0;i-=1){const o=r[i].split(":");if(o.length>=2){const s=o[0].trim().toLowerCase(),a=o.slice(1).join(":").trim();if(s==="color")return a.replace(/['"]+/g,"")}}}return(t=e.style.color)==null?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),xat=jt.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>e.style.fontFamily,renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),wat=jt.create({name:"fontSize",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:null,parseHTML:e=>e.style.fontSize,renderHTML:e=>e.fontSize?{style:`font-size: ${e.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}}}),Cat=jt.create({name:"lineHeight",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:e=>e.style.lineHeight,renderHTML:e=>e.lineHeight?{style:`line-height: ${e.lineHeight}`}:{}}}}]},addCommands(){return{setLineHeight:e=>({chain:t})=>t().setMark("textStyle",{lineHeight:e}).run(),unsetLineHeight:()=>({chain:e})=>e().setMark("textStyle",{lineHeight:null}).removeEmptyTextStyle().run()}}});jt.create({name:"textStyleKit",addExtensions(){const e=[];return this.options.backgroundColor!==!1&&e.push(bat.configure(this.options.backgroundColor)),this.options.color!==!1&&e.push(N0e.configure(this.options.color)),this.options.fontFamily!==!1&&e.push(xat.configure(this.options.fontFamily)),this.options.fontSize!==!1&&e.push(wat.configure(this.options.fontSize)),this.options.lineHeight!==!1&&e.push(Cat.configure(this.options.lineHeight)),this.options.textStyle!==!1&&e.push(A0e.configure(this.options.textStyle)),e}});var Sat=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Eat=Ot.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",Bt(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,r,i,o,s;const a=(n=(t=e.attrs)==null?void 0:t.src)!=null?n:"",l=(i=(r=e.attrs)==null?void 0:r.alt)!=null?i:"",c=(s=(o=e.attrs)==null?void 0:o.title)!=null?s:"";return c?``:``}
373,addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:i,getPos:o,HTMLAttributes:s,editor:a})=>{const l=document.createElement("img");Object.entries(s).forEach(([f,p])=>{if(p!=null)switch(f){case"width":case"height":break;default:l.setAttribute(f,p);break}}),l.src=s.src;const c=new ott({element:l,editor:a,node:i,getPos:o,onResize:(f,p)=>{l.style.width=`${f}px`,l.style.height=`${p}px`},onCommit:(f,p)=>{const m=o();m!==void 0&&this.editor.chain().setNodeSelection(m).updateAttributes(this.name,{width:f,height:p}).run()},onUpdate:(f,p,m)=>f.type===i.type,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:r===!0}}),d=c.dom;return d.style.visibility="hidden",d.style.pointerEvents="none",l.onload=()=>{d.style.visibility="",d.style.pointerEvents=""},c}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[ppe({find:Sat,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}});/** 374 * @license lucide-react v0.484.0 - ISC 375 * 376 * This source code is licensed under the ISC license. 377 * See the LICENSE file in the root directory of this source tree. 378 */const kat=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),_at=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),AQ=e=>{const t=_at(e);return t.charAt(0).toUpperCase()+t.slice(1)},j0e=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 379 * @license lucide-react v0.484.0 - ISC 380 * 381 * This source code is licensed under the ISC license. 382 * See the LICENSE file in the root directory of this source tree. 383 */var Aat={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 384 * @license lucide-react v0.484.0 - ISC 385 * 386 * This source code is licensed under the ISC license. 387 * See the LICENSE file in the root directory of this source tree. 388 */const Nat=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>x.createElement("svg",{ref:l,...Aat,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:j0e("lucide",i),...a},[...s.map(([c,d])=>x.createElement(c,d)),...Array.isArray(o)?o:[o]]));/** 389 * @license lucide-react v0.484.0 - ISC 390 * 391 * This source code is licensed under the ISC license. 392 * See the LICENSE file in the root directory of this source tree. 393 */const ct=(e,t)=>{const n=x.forwardRef(({className:r,...i},o)=>x.createElement(Nat,{ref:o,iconNode:t,className:j0e(`lucide-${kat(AQ(e))}`,`lucide-${e}`,r),...i}));return n.displayName=AQ(e),n};/** 394 * @license lucide-react v0.484.0 - ISC 395 * 396 * This source code is licensed under the ISC license. 397 * See the LICENSE file in the root directory of this source tree. 398 */const jat=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Tat=ct("align-left",jat);/** 399 * @license lucide-react v0.484.0 - ISC 400 * 401 * This source code is licensed under the ISC license. 402 * See the LICENSE file in the root directory of this source tree. 403 */const Mat=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],Oat=ct("arrow-down-wide-narrow",Mat);/** 404 * @license lucide-react v0.484.0 - ISC 405 * 406 * This source code is licensed under the ISC license. 407 * See the LICENSE file in the root directory of this source tree. 408 */const Rat=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]],Pat=ct("arrow-up-narrow-wide",Rat);/** 409 * @license lucide-react v0.484.0 - ISC 410 * 411 * This source code is licensed under the ISC license. 412 * See the LICENSE file in the root directory of this source tree. 413 */const Dat=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Iat=ct("arrow-up",Dat);/** 414 * @license lucide-react v0.484.0 - ISC 415 * 416 * This source code is licensed under the ISC license. 417 * See the LICENSE file in the root directory of this source tree. 418 */const Lat=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],$at=ct("calendar-days",Lat);/** 419 * @license lucide-react v0.484.0 - ISC 420 * 421 * This source code is licensed under the ISC license. 422 * See the LICENSE file in the root directory of this source tree. 423 */const zat=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Fat=ct("calendar",zat);/** 424 * @license lucide-react v0.484.0 - ISC 425 * 426 * This source code is licensed under the ISC license. 427 * See the LICENSE file in the root directory of this source tree. 428 */const Bat=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Cn=ct("check",Bat);/** 429 * @license lucide-react v0.484.0 - ISC 430 * 431 * This source code is licensed under the ISC license. 432 * See the LICENSE file in the root directory of this source tree. 433 */const Hat=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],fb=ct("chevron-down",Hat);/** 434 * @license lucide-react v0.484.0 - ISC 435 * 436 * This source code is licensed under the ISC license. 437 * See the LICENSE file in the root directory of this source tree. 438 */const Vat=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],T0e=ct("chevron-left",Vat);/** 439 * @license lucide-react v0.484.0 - ISC 440 * 441 * This source code is licensed under the ISC license. 442 * See the LICENSE file in the root directory of this source tree. 443 */const Uat=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],NQ=ct("chevron-right",Uat);/** 444 * @license lucide-react v0.484.0 - ISC 445 * 446 * This source code is licensed under the ISC license. 447 * See the LICENSE file in the root directory of this source tree. 448 */const qat=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Wat=ct("chevron-up",qat);/** 449 * @license lucide-react v0.484.0 - ISC 450 * 451 * This source code is licensed under the ISC license. 452 * See the LICENSE file in the root directory of this source tree. 453 */const Gat=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Kat=ct("circle-help",Gat);/** 454 * @license lucide-react v0.484.0 - ISC 455 * 456 * This source code is licensed under the ISC license. 457 * See the LICENSE file in the root directory of this source tree. 458 */const Yat=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],Xat=ct("code-xml",Yat);/** 459 * @license lucide-react v0.484.0 - ISC 460 * 461 * This source code is licensed under the ISC license. 462 * See the LICENSE file in the root directory of this source tree. 463 */const Zat=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Qat=ct("external-link",Zat);/** 464 * @license lucide-react v0.484.0 - ISC 465 * 466 * This source code is licensed under the ISC license. 467 * See the LICENSE file in the root directory of this source tree. 468 */const Jat=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],jQ=ct("eye-off",Jat);
468/** 469 * @license lucide-react v0.484.0 - ISC 470 * 471 * This source code is licensed under the ISC license. 472 * See the LICENSE file in the root directory of this source tree. 473 */const elt=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],TQ=ct("eye",elt);/** 474 * @license lucide-react v0.484.0 - ISC 475 * 476 * This source code is licensed under the ISC license. 477 * See the LICENSE file in the root directory of this source tree. 478 */const tlt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],nlt=ct("globe",tlt);/** 479 * @license lucide-react v0.484.0 - ISC 480 * 481 * This source code is licensed under the ISC license. 482 * See the LICENSE file in the root directory of this source tree. 483 */const rlt=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"m17 12 3-2v8",key:"1hhhft"}]],ilt=ct("heading-1",rlt);/** 484 * @license lucide-react v0.484.0 - ISC 485 * 486 * This source code is licensed under the ISC license. 487 * See the LICENSE file in the root directory of this source tree. 488 */const olt=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1",key:"9jr5yi"}]],slt=ct("heading-2",olt);/** 489 * @license lucide-react v0.484.0 - ISC 490 * 491 * This source code is licensed under the ISC license. 492 * See the LICENSE file in the root directory of this source tree. 493 */const alt=[["path",{d:"M4 12h8",key:"17cfdx"}],["path",{d:"M4 18V6",key:"1rz3zl"}],["path",{d:"M12 18V6",key:"zqpxq5"}],["path",{d:"M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2",key:"68ncm8"}],["path",{d:"M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2",key:"1ejuhz"}]],llt=ct("heading-3",alt);/** 494 * @license lucide-react v0.484.0 - ISC 495 * 496 * This source code is licensed under the ISC license. 497 * See the LICENSE file in the root directory of this source tree. 498 */const clt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],fI=ct("image",clt);/** 499 * @license lucide-react v0.484.0 - ISC 500 * 501 * This source code is licensed under the ISC license. 502 * See the LICENSE file in the root directory of this source tree. 503 */const ult=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],dlt=ct("info",ult);/** 504 * @license lucide-react v0.484.0 - ISC 505 * 506 * This source code is licensed under the ISC license. 507 * See the LICENSE file in the root directory of this source tree. 508 */const flt=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],hlt=ct("key-round",flt);/** 509 * @license lucide-react v0.484.0 - ISC 510 * 511 * This source code is licensed under the ISC license. 512 * See the LICENSE file in the root directory of this source tree. 513 */const plt=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],mlt=ct("list-ordered",plt);/** 514 * @license lucide-react v0.484.0 - ISC 515 * 516 * This source code is licensed under the ISC license. 517 * See the LICENSE file in the root directory of this source tree. 518 */const glt=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],ylt=ct("list",glt);/** 519 * @license lucide-react v0.484.0 - ISC 520 * 521 * This source code is licensed under the ISC license. 522 * See the LICENSE file in the root directory of this source tree. 523 */const vlt=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],nv=ct("loader-circle",vlt);/** 524 * @license lucide-react v0.484.0 - ISC 525 * 526 * This source code is licensed under the ISC license. 527 * See the LICENSE file in the root directory of this source tree. 528 */const blt=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M9 10h6",key:"9gxzsh"}]],xlt=ct("message-square-plus",blt);/** 529 * @license lucide-react v0.484.0 - ISC 530 * 531 * This source code is licensed under the ISC license. 532 * See the LICENSE file in the root directory of this source tree. 533 */const wlt=[["path",{d:"M5 12h14",key:"1ays0h"}]],Clt=ct("minus",wlt);/** 534 * @license lucide-react v0.484.0 - ISC 535 * 536 * This source code is licensed under the ISC license. 537 * See the LICENSE file in the root directory of this source tree. 538 */const Slt=[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}
538]],Elt=ct("move",Slt);/** 539 * @license lucide-react v0.484.0 - ISC 540 * 541 * This source code is licensed under the ISC license. 542 * See the LICENSE file in the root directory of this source tree. 543 */const klt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],_lt=ct("panel-right",klt);/** 544 * @license lucide-react v0.484.0 - ISC 545 * 546 * This source code is licensed under the ISC license. 547 * See the LICENSE file in the root directory of this source tree. 548 */const Alt=[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]],Nlt=ct("pen-line",Alt);/** 549 * @license lucide-react v0.484.0 - ISC 550 * 551 * This source code is licensed under the ISC license. 552 * See the LICENSE file in the root directory of this source tree. 553 */const jlt=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],M0e=ct("pencil",jlt);/** 554 * @license lucide-react v0.484.0 - ISC 555 * 556 * This source code is licensed under the ISC license. 557 * See the LICENSE file in the root directory of this source tree. 558 */const Tlt=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Mlt=ct("quote",Tlt);/** 559 * @license lucide-react v0.484.0 - ISC 560 * 561 * This source code is licensed under the ISC license. 562 * See the LICENSE file in the root directory of this source tree. 563 */const Olt=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],hI=ct("refresh-cw",Olt);/** 564 * @license lucide-react v0.484.0 - ISC 565 * 566 * This source code is licensed under the ISC license. 567 * See the LICENSE file in the root directory of this source tree. 568 */const Rlt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]],Plt=ct("smile",Rlt);/** 569 * @license lucide-react v0.484.0 - ISC 570 * 571 * This source code is licensed under the ISC license. 572 * See the LICENSE file in the root directory of this source tree. 573 */const Dlt=[["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m16 20 2 2 4-4",key:"13tcca"}]],Ilt=ct("spell-check",Dlt);/** 574 * @license lucide-react v0.484.0 - ISC 575 * 576 * This source code is licensed under the ISC license. 577 * See the LICENSE file in the root directory of this source tree. 578 */const Llt=[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],$lt=ct("square-check-big",Llt);/** 579 * @license lucide-react v0.484.0 - ISC 580 * 581 * This source code is licensed under the ISC license. 582 * See the LICENSE file in the root directory of this source tree. 583 */const zlt=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Flt=ct("square",zlt);/** 584 * @license lucide-react v0.484.0 - ISC 585 * 586 * This source code is licensed under the ISC license. 587 * See the LICENSE file in the root directory of this source tree. 588 */const Blt=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],Hlt=ct("table",Blt);/** 589 * @license lucide-react v0.484.0 - ISC 590 * 591 * This source code is licensed under the ISC license. 592 * See the LICENSE file in the root directory of this source tree. 593 */const Vlt=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
593],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],O0e=ct("trash-2",Vlt);/** 594 * @license lucide-react v0.484.0 - ISC 595 * 596 * This source code is licensed under the ISC license. 597 * See the LICENSE file in the root directory of this source tree. 598 */const Ult=[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]],qlt=ct("type",Ult);/** 599 * @license lucide-react v0.484.0 - ISC 600 * 601 * This source code is licensed under the ISC license. 602 * See the LICENSE file in the root directory of this source tree. 603 */const Wlt=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Glt=ct("user-round",Wlt);/** 604 * @license lucide-react v0.484.0 - ISC 605 * 606 * This source code is licensed under the ISC license. 607 * See the LICENSE file in the root directory of this source tree. 608 */const Klt=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Ylt=ct("user",Klt);/** 609 * @license lucide-react v0.484.0 - ISC 610 * 611 * This source code is licensed under the ISC license. 612 * See the LICENSE file in the root directory of this source tree. 613 */const Xlt=[["path",{d:"M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17",key:"1q2vi4"}],["path",{d:"m10 15 5-3-5-3z",key:"1jp15x"}]],R0e=ct("youtube",Xlt);/** 614 * @license lucide-react v0.484.0 - ISC 615 * 616 * This source code is licensed under the ISC license. 617 * See the LICENSE file in the root directory of this source tree. 618 */const Zlt=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],P0e=ct("x",Zlt);/** 619 * @license lucide-react v0.484.0 - ISC 620 * 621 * This source code is licensed under the ISC license. 622 * See the LICENSE file in the root directory of this source tree. 623 */const Qlt=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Jlt=ct("zap",Qlt);function ect({node:e,updateAttributes:t,selected:n,deleteNode:r}){const{src:i,alt:o,title:s,width:a,caption:l=""}=e.attrs,[c,d]=x.useState(!1),[f,p]=x.useState(!1),[m,y]=x.useState(l??""),v=x.useRef(l??"");x.useEffect(()=>{const N=l??"";N!==v.current&&(v.current=N,y(N))},[l]);const b=x.useRef(0),C=x.useRef(0),S=x.useRef(null),E=x.useCallback(N=>{var D;N.preventDefault(),N.stopPropagation();const j=((D=S.current)==null?void 0:D.offsetWidth)??400;b.current=N.clientX,C.current=j,d(!0);const T=R=>{const I=R.clientX-b.current,F=Math.round(Math.max(80,C.current+I));t({width:F})},O=()=>{d(!1),window.removeEventListener("mousemove",T),window.removeEventListener("mouseup",O)};window.addEventListener("mousemove",T),window.addEventListener("mouseup",O)},[t]),A=N=>{v.current=N.target.value,y(N.target.value)},_=()=>{t({caption:v.current})};return u.jsx(oS,{children:u.jsx("div",{className:"image-node-outer","data-drag-handle":!0,children:u.jsxs("div",{className:["image-node-inner",n&&!f?"selected":"",c?"resizing":""].filter(Boolean).join(" "),style:{width:a?`${a}px`:"auto"},children:[n&&!f&&u.jsx("div",{className:"image-node-toolbar",contentEditable:!1,children:u.jsx("button",{className:"image-node-toolbar-btn danger",onMouseDown:N=>{N.preventDefault(),r()},title:"Delete image",children:u.jsx(O0e,{size:14})})}),u.jsx("img",{ref:S,src:i,alt:o??"",title:s??void 0,draggable:!1,style:{width:"100%",display:"block"}}),n&&u.jsx("div",{className:"image-resize-handle",onMouseDown:E,contentEditable:!1}),u.jsx("div",{className:"image-node-caption-wrapper",contentEditable:!1,children:u.jsx("input",{className:["image-node-caption",m?"":"empty"].filter(Boolean).join(" "),type:"text",value:m,placeholder:"Add a captionâ¦",onChange:A,onFocus:()=>p(!0),onBlur:()=>{p(!1),_()},onKeyDown:N=>{N.stopPropagation(),(N.key==="Enter"||N.key==="Escape")&&N.currentTarget.blur()},onClick:N=>N.stopPropagation()})})]})})})}const tct=Eat.extend({addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),width:{default:null,parseHTML:t=>t.getAttribute("width"),renderHTML:t=>t.width?{width:t.width}:{}},caption:{default:"",parseHTML:t=>t.getAttribute("data-caption")??"",renderHTML:t=>t.caption?{"data-caption":t.caption}:{}}}},addNodeView(){return sS(ect)}});var nct=jt.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign?{style:`text-align: ${e.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>this.options.alignments.includes(e)?this.options.types.map(n=>t.updateAttributes(n,{textAlign:e})).some(n=>n):!1,unsetTextAlign:()=>({commands:e})=>this.options.types.map(t=>e.resetAttributes(t,"textAlign")).some(t=>t),toggleTextAlign:e=>({editor:t,commands:n})=>this.options.alignments.includes(e)?t.isActive({textAlign:e})?n.unsetTextAlign():n.setTextAlign(e):!1}}
623,addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),rct=e=>er({find:/--$/,replace:e??"â"}),ict=e=>er({find:/\.\.\.$/,replace:e??"â¦"}),oct=e=>er({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:e??"â"}),sct=e=>er({find:/"$/,replace:e??"â"}),act=e=>er({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:e??"â"}),lct=e=>er({find:/'$/,replace:e??"â"}),cct=e=>er({find:/<-$/,replace:e??"â"}),uct=e=>er({find:/->$/,replace:e??"â"}),dct=e=>er({find:/\(c\)$/,replace:e??"©"}),fct=e=>er({find:/\(tm\)$/,replace:e??"â¢"}),hct=e=>er({find:/\(sm\)$/,replace:e??"â "}),pct=e=>er({find:/\(r\)$/,replace:e??"®"}),mct=e=>er({find:/(?:^|\s)(1\/2)\s$/,replace:e??"½"}),gct=e=>er({find:/\+\/-$/,replace:e??"±"}),yct=e=>er({find:/!=$/,replace:e??"â "}),vct=e=>er({find:/<<$/,replace:e??"«"}),bct=e=>er({find:/>>$/,replace:e??"»"}),xct=e=>er({find:/\d+\s?([*x])\s?\d+$/,replace:e??"Ã"}),wct=e=>er({find:/\^2$/,replace:e??"²"}),Cct=e=>er({find:/\^3$/,replace:e??"³"}),Sct=e=>er({find:/(?:^|\s)(1\/4)\s$/,replace:e??"¼"}),Ect=e=>er({find:/(?:^|\s)(3\/4)\s$/,replace:e??"¾"}),kct=jt.create({name:"typography",addOptions(){return{closeDoubleQuote:"â",closeSingleQuote:"â",copyright:"©",ellipsis:"â¦",emDash:"â",laquo:"«",leftArrow:"â",multiplication:"Ã",notEqual:"â ",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"â",openSingleQuote:"â",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"â",servicemark:"â ",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"â¢"}},addInputRules(){const e=[];return this.options.emDash!==!1&&e.push(rct(this.options.emDash)),this.options.ellipsis!==!1&&e.push(ict(this.options.ellipsis)),this.options.openDoubleQuote!==!1&&e.push(oct(this.options.openDoubleQuote)),this.options.closeDoubleQuote!==!1&&e.push(sct(this.options.closeDoubleQuote)),this.options.openSingleQuote!==!1&&e.push(act(this.options.openSingleQuote)),this.options.closeSingleQuote!==!1&&e.push(lct(this.options.closeSingleQuote)),this.options.leftArrow!==!1&&e.push(cct(this.options.leftArrow)),this.options.rightArrow!==!1&&e.push(uct(this.options.rightArrow)),this.options.copyright!==!1&&e.push(dct(this.options.copyright)),this.options.trademark!==!1&&e.push(fct(this.options.trademark)),this.options.servicemark!==!1&&e.push(hct(this.options.servicemark)),this.options.registeredTrademark!==!1&&e.push(pct(this.options.registeredTrademark)),this.options.oneHalf!==!1&&e.push(mct(this.options.oneHalf)),this.options.plusMinus!==!1&&e.push(gct(this.options.plusMinus)),this.options.notEqual!==!1&&e.push(yct(this.options.notEqual)),this.options.laquo!==!1&&e.push(vct(this.options.laquo)),this.options.raquo!==!1&&e.push(bct(this.options.raquo)),this.options.multiplication!==!1&&e.push(xct(this.options.multiplication)),this.options.superscriptTwo!==!1&&e.push(wct(this.options.superscriptTwo)),this.options.superscriptThree!==!1&&e.push(Cct(this.options.superscriptThree)),this.options.oneQuarter!==!1&&e.push(Sct(this.options.oneQuarter)),this.options.threeQuarters!==!1&&e.push(Ect(this.options.threeQuarters)),e}}),_ct=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,Act=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,Nct=ai.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:e}){return["mark",Bt(this.options.HTMLAttributes,e),0]},renderMarkdown:(e,t)=>`==${t.renderChildren(e)}==`,parseMarkdown:(e,t)=>t.applyMark("highlight",t.parseInline(e.tokens||[])),markdownTokenizer:{name:"highlight",level:"inline",start:e=>e.indexOf("=="),tokenize(e,t,n){const i=/^(==)([^=]+)(==)/.exec(e);if(i){const o=i[2].trim(),s=n.inlineTokens(o);return{type:"highlight",raw:i[0],text:o,tokens:s}}}},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}}
623,addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[nh({find:_ct,type:this.type})]},addPasteRules(){return[cd({find:Act,type:this.type})]}}),jct=ai.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(e){return e!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sub",Bt(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),Tct=ai.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(e){return e!=="super"?!1:null}}]},renderHTML({HTMLAttributes:e}){return["sup",Bt(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}});const Mct=jt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(t=>t!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc;if(((e==null?void 0:e.mode)||this.options.mode)==="textSize"){const r=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(r)}return t.nodeSize},this.storage.words=e=>{const t=(e==null?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new an({key:new pn("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;const i=this.options.limit;if(i==null||i===0){e=!0;return}const o=this.storage.characters({node:r.doc});if(o>i){const s=o-i,a=0,l=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(a,l);return e=!0,c}e=!0},filterTransaction:(t,n)=>{const r=this.options.limit;if(!t.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),o=this.storage.characters({node:t.doc});if(o<=r||i>r&&o>r&&o<=i)return!0;if(i>r&&o>r&&o>i||!t.getMeta("paste"))return!1;const a=t.selection.$head.pos,l=o-r,c=a-l,d=a;return t.deleteRange(c,d),!(this.storage.characters({node:t.doc})>r)}})]}});var Oct=prt,jM,TM;if(typeof WeakMap<"u"){let e=new WeakMap;jM=t=>e.get(t),TM=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;jM=r=>{for(let i=0;i<e.length;i+=2)if(e[i]==r)return e[i+1]},TM=(r,i)=>(n==10&&(n=0),e[n++]=r,e[n++]=i)}var Qn=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,i=t/this.width|0;let o=r+1,s=i+1;for(let a=1;o<this.width&&this.map[t+a]==n;a++)o++;for(let a=1;s<this.height&&this.map[t+this.width*a]==n;a++)s++;return{left:r,top:i,right:o,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:i,top:o,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?r==0:i==this.width)?null:this.map[o*this.width+(n<0?r-1:i)]:(n<0?o==0:s==this.height)?null:this.map[r+this.width*(n<0?o-1:s)]}rectBetween(e,t){const{left:n,right:r,top:i,bottom:o}=this.findCell(e),{left:s,right:a,top:l,bottom:c}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(i,l),right:Math.max(r,a),bottom:Math.max(o,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){const o=r*this.width+i,s=this.map[o];n[s]||(n[s]=!0,!(i==e.left&&i&&this.map[o-1]==s||r==e.top&&r&&this.map[o-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){const o=i+n.child(r).nodeSize;if(r==e){let s=t+e*this.width;const a=(e+1)*this.width;for(;s<a&&this.map[s]<i;)s++;return s==a?o-1:this.map[s]}i=o}}static get(e){return jM(e)||TM(e,Rct(e))}};function Rct(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.n
623ame);const t=Pct(e),n=e.childCount,r=[];let i=0,o=null;const s=[];for(let c=0,d=t*n;c<d;c++)r[c]=0;for(let c=0,d=0;c<n;c++){const f=e.child(c);d++;for(let y=0;;y++){for(;i<r.length&&r[i]!=0;)i++;if(y==f.childCount)break;const v=f.child(y),{colspan:b,rowspan:C,colwidth:S}=v.attrs;for(let E=0;E<C;E++){if(E+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:d,n:C-E});break}const A=i+E*t;for(let _=0;_<b;_++){r[A+_]==0?r[A+_]=d:(o||(o=[])).push({type:"collision",row:c,pos:d,n:b-_});const N=S&&S[_];if(N){const j=(A+_)%t*2,T=s[j];T==null||T!=N&&s[j+1]==1?(s[j]=N,s[j+1]=1):T==N&&s[j+1]++}}}i+=b,d+=v.nodeSize}const p=(c+1)*t;let m=0;for(;i<p;)r[i++]==0&&m++;m&&(o||(o=[])).push({type:"missing",row:c,n:m}),d++}(t===0||n===0)&&(o||(o=[])).push({type:"zero_sized"});const a=new Qn(t,n,r,o);let l=!1;for(let c=0;!l&&c<s.length;c+=2)s[c]!=null&&s[c+1]<n&&(l=!0);return l&&Dct(a,s,e),a}function Pct(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const i=e.child(r);let o=0;if(n)for(let s=0;s<r;s++){const a=e.child(s);for(let l=0;l<a.childCount;l++){const c=a.child(l);s+c.attrs.rowspan>r&&(o+=c.attrs.colspan)}}for(let s=0;s<i.childCount;s++){const a=i.child(s);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}t==-1?t=o:t!=o&&(t=Math.max(t,o))}return t}function Dct(e,t,n){e.problems||(e.problems=[]);const r={};for(let i=0;i<e.map.length;i++){const o=e.map[i];if(r[o])continue;r[o]=!0;const s=n.nodeAt(o);if(!s)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=s.attrs;for(let c=0;c<l.colspan;c++){const d=(i+c)%e.width,f=t[d*2];f!=null&&(!l.colwidth||l.colwidth[c]!=f)&&((a||(a=Ict(l)))[c]=f)}a&&e.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function Ict(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function Ci(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var Mu=new pn("selectingCells");function Sm(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Lct(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function fa(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function hS(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=Sm(t.$head)||$ct(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function $ct(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if(r=="cell"||r=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function MM(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function zct(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function pI(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function D0e(e,t,n){const r=e.node(-1),i=Qn.get(r),o=e.start(-1),s=i.nextCell(e.pos-o,t,n);return s==null?null:e.node(0).resolve(o+s)}function rh(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function I0e(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(t,0,0)}return r}function Fct(e,t,n){const r=Ci(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var vn=class zl extends et{constructor(t,n=t){const r=t.node(-1),i=Qn.get(r),o=t.start(-1),s=i.rectBetween(t.pos-o,n.pos-o),a=t.node(0),l=i.cellsInRect(s).filter(d=>d!=n.pos-o);l.unshift(n.pos-o);const c=l.map(d=>{const f=r.nodeAt(d);if(!f)throw RangeError(`No cell with offset ${d} found`);const p=o+d+1;return new Ffe(a.resolve(p),a.resolve(p+f.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=t,this.$headCell=n}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(MM(r)&&MM(i)&&pI(r,i)){const o=this.$anchorCell.node(-1)!=r.node(-1);return o&&this.isRowSelection()?zl.rowSelection(r,i):o&&this.isColSelection()?zl.colSelection(r,i):new zl(r,i)}return Ue.between(r,i)}content(){const t=this.$anchorCell.node(-1),n=Qn.get(t),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),o={},s=[];for(let l=i.top;l<i.bottom;l++){const c=[];for(let d=l*n.width+i.left,f=i.left;f<i.right;f++,d++){const p=n.map[d];if(o[p])continue;o[p]=!0;const m=n.findCell(p);let y=t.nodeAt(p);if(!y)throw RangeError(`No cell with offset ${p} found`);const v=i.left-m.left,b=m.right-i.right;if(v>0||b>0){let C=y.attrs;if(v>0&&(C=rh(C,0,v)),b>0&&(C=rh(C,C.colspan-b,b)),m.left<i.left){if(y=y.type.createAndFill(C),!y)throw RangeError(`Could not create cell with attrs ${JSON.stringify(C)}`)}
vendor: 5,139 bytes, line 623
623else y=y.type.create(C,y.content)}if(m.top<i.top||m.bottom>i.bottom){const C={...y.attrs,rowspan:Math.min(m.bottom,i.bottom)-Math.max(m.top,i.top)};m.top<i.top?y=y.type.createAndFill(C):y=y.type.create(C,y.content)}c.push(y)}s.push(t.child(l).copy(we.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?t:s;return new Ie(we.from(a),1,1)}replace(t,n=Ie.empty){const r=t.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){const{$from:a,$to:l}=i[s],c=t.mapping.slice(r);t.replace(c.map(a.pos),c.map(l.pos),s?Ie.empty:n)}const o=et.findFrom(t.doc.resolve(t.mapping.slice(r).map(this.to)),-1);o&&t.setSelection(o)}replaceWith(t,n){this.replace(t,new Ie(we.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),r=Qn.get(n),i=this.$anchorCell.start(-1),o=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let s=0;s<o.length;s++)t(n.nodeAt(o[s]),i+o[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const r=t+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),i=Qn.get(r),o=t.start(-1),s=i.findCell(t.pos-o),a=i.findCell(n.pos-o),l=t.node(0);return s.top<=a.top?(s.top>0&&(t=l.resolve(o+i.map[s.left])),a.bottom<i.height&&(n=l.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+i.map[a.left])),s.bottom<i.height&&(t=l.resolve(o+i.map[i.width*(i.height-1)+s.right-1]))),new zl(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=Qn.get(t),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),o=n.colCount(this.$headCell.pos-r);if(Math.min(i,o)>0)return!1;const s=i+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,a)==n.width}eq(t){return t instanceof zl&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),i=Qn.get(r),o=t.start(-1),s=i.findCell(t.pos-o),a=i.findCell(n.pos-o),l=t.node(0);return s.left<=a.left?(s.left>0&&(t=l.resolve(o+i.map[s.top*i.width])),a.right<i.width&&(n=l.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+i.map[a.top*i.width])),s.right<i.width&&(t=l.resolve(o+i.map[i.width*(s.top+1)-1]))),new zl(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new zl(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new zl(t.resolve(n),t.resolve(r))}getBookmark(){return new Bct(this.$anchorCell.pos,this.$headCell.pos)}};vn.prototype.visible=!1;et.jsonID("cell",vn);var Bct=class L0e{constructor(t,n){this.anchor=t,this.head=n}map(t){return new L0e(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),r=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&pI(n,r)?new vn(n,r):et.near(r,1)}};function Hct(e){if(!(e.selection instanceof vn))return null;const t=[];return e.selection.forEachCell((n,r)=>{t.push(jr.node(r,r+n.nodeSize,{class:"selectedCell"}))}),gn.create(e.doc,t)}function Vct({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let o=t.depth;o>=0&&!(t.before(o+1)>t.start(o));o--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function Uct({$from:e,$to:t}){let n,r;for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){r=o;break}}return n!==r&&t.parentOffset===0}function qct(e,t,n){const r=(t||e).selection,i=(t||e).doc;let o,s;if(r instanceof $e&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")o=vn.create(i,r.from);else if(s=="row"){const a=i.resolve(r.from+1);o=vn.rowSelection(a,a)}else if(!n){const a=Qn.get(r.node),l=r.from+1,c=l+a.map[a.width*a.height-1];o=vn.create(i,l+1,c)}}else r instanceof Ue&&Vct(r)?o=Ue.create(i,r.from):r instanceof Ue&&Uct(r)&&(o=Ue.create(i,r.$from.start(),r.$from.end()));return o&&(t||(t=e.tr)).setSelection(o),t}var Wct=new pn("fix-tables");function $0e(e,t,n,r){const i=e.childCount,o=t.childCount;e:for(let s=0,a=0;s<o;s++){const l=t.child(s);for(let c=a,d=Math.min(i,s+3);c<d;c++)if(e.child(c)==l){a=c+1,n+=l.nodeSize;continue e}r(l,n),a<i&&e.child(a).sameMarkup(l)?$0e(e.child(a),l,n+1,r):l.nodesBetween(0,l.content.size,r,n+1),n+=l.nodeSize}}function z0e(e,t){let n;const r=(i,o)=>{i.type.spec.tableRole=="table"&&(n=Gct(e,i,o,n))};return t?t.doc!=e.doc&&$0e(t.doc,e.doc,0,r):e.doc.descendants(r),n}function Gct(e,t,n,r){const i=Qn.get(t);if(!i.problems)return r;r||(r=e.tr);const o=[];for(let l=0;l<i.height;l++)o.push(0);for(let l=0;l<i.problems.length;l++){const c=i.problems[l];if(c.type=="collision"){const d=t.nodeAt(c.pos);if(!d)continue;const f=d.attrs;for(let p=0;p<f.rowspan;p++)o[c.row+p]+=c.n;
623r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,rh(f,f.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const d=t.nodeAt(c.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const d=t.nodeAt(c.pos);if(!d)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...d.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const d=r.mapping.map(n);r.delete(d,d+t.nodeSize)}}let s,a;for(let l=0;l<o.length;l++)o[l]&&(s==null&&(s=l),a=l);for(let l=0,c=n+1;l<i.height;l++){const d=t.child(l),f=c+d.nodeSize,p=o[l];if(p>0){let m="cell";d.firstChild&&(m=d.firstChild.type.spec.tableRole);const y=[];for(let b=0;b<p;b++){const C=Ci(e.schema)[m].createAndFill();C&&y.push(C)}const v=(l==0||s==l-1)&&a==l?c+1:f-1;r.insert(r.mapping.map(v),y)}c=f}return r.setMeta(Wct,{fixTables:!0})}function sl(e){const t=e.selection,n=hS(e),r=n.node(-1),i=n.start(-1),o=Qn.get(r);return{...t instanceof vn?o.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:r}}function F0e(e,{map:t,tableStart:n,table:r},i){let o=i>0?-1:0;Fct(t,r,i+o)&&(o=i==0||i==t.width?null:0);for(let s=0;s<t.height;s++){const a=s*t.width+i;if(i>0&&i<t.width&&t.map[a-1]==t.map[a]){const l=t.map[a],c=r.nodeAt(l);e.setNodeMarkup(e.mapping.map(n+l),null,I0e(c.attrs,i-t.colCount(l))),s+=c.attrs.rowspan-1}else{const l=o==null?Ci(r.type.schema).cell:r.nodeAt(t.map[a+o]).type,c=t.positionAt(s,i,r);e.insert(e.mapping.map(n+c),l.createAndFill())}}return e}function Kct(e,t){if(!fa(e))return!1;if(t){const n=sl(e);t(F0e(e.tr,n,n.left))}return!0}function Yct(e,t){if(!fa(e))return!1;if(t){const n=sl(e);t(F0e(e.tr,n,n.right))}return!0}function Xct(e,{map:t,table:n,tableStart:r},i){const o=e.mapping.maps.length;for(let s=0;s<t.height;){const a=s*t.width+i,l=t.map[a],c=n.nodeAt(l),d=c.attrs;if(i>0&&t.map[a-1]==l||i<t.width-1&&t.map[a+1]==l)e.setNodeMarkup(e.mapping.slice(o).map(r+l),null,rh(d,i-t.colCount(l)));else{const f=e.mapping.slice(o).map(r+l);e.delete(f,f+c.nodeSize)}s+=d.rowspan}}function Zct(e,t){if(!fa(e))return!1;if(t){const n=sl(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;Xct(r,n,i),i!=n.left;i--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Qn.get(o)}t(r)}return!0}function Qct(e,t,n){var r;const i=Ci(t.type.schema).header_cell;for(let o=0;o<e.width;o++)if(((r=t.nodeAt(e.map[o+n*e.width]))==null?void 0:r.type)!=i)return!1;return!0}function B0e(e,{map:t,tableStart:n,table:r},i){var o;let s=n;for(let c=0;c<i;c++)s+=r.child(c).nodeSize;const a=[];let l=i>0?-1:0;Qct(t,r,i+l)&&(l=i==0||i==t.height?null:0);for(let c=0,d=t.width*i;c<t.width;c++,d++)if(i>0&&i<t.height&&t.map[d]==t.map[d-t.width]){const f=t.map[d],p=r.nodeAt(f).attrs;e.setNodeMarkup(n+f,null,{...p,rowspan:p.rowspan+1}),c+=p.colspan-1}else{const f=l==null?Ci(r.type.schema).cell:(o=r.nodeAt(t.map[d+l*t.width]))==null?void 0:o.type,p=f==null?void 0:f.createAndFill();p&&a.push(p)}return e.insert(s,Ci(r.type.schema).row.create(null,a)),e}function Jct(e,t){if(!fa(e))return!1;if(t){const n=sl(e);t(B0e(e.tr,n,n.top))}return!0}function eut(e,t){if(!fa(e))return!1;if(t){const n=sl(e);t(B0e(e.tr,n,n.bottom))}return!0}function tut(e,{map:t,table:n,tableStart:r},i){let o=0;for(let c=0;c<i;c++)o+=n.child(c).nodeSize;const s=o+n.child(i).nodeSize,a=e.mapping.maps.length;e.delete(o+r,s+r);const l=new Set;for(let c=0,d=i*t.width;c<t.width;c++,d++){const f=t.map[d];if(!l.has(f)){if(l.add(f),i>0&&f==t.map[d-t.width]){const p=n.nodeAt(f).attrs;e.setNodeMarkup(e.mapping.slice(a).map(f+r),null,{...p,rowspan:p.rowspan-1}),c+=p.colspan-1}else if(i<t.height&&f==t.map[d+t.width]){const p=n.nodeAt(f),m=p.attrs,y=p.type.create({...m,rowspan:p.attrs.rowspan-1},p.content),v=t.positionAt(i+1,c,n);e.insert(e.mapping.slice(a).map(r+v),y),c+=m.colspan-1}}}}function nut(e,t){if(!fa(e))return!1;if(t){const n=sl(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;tut(r,n,i),i!=n.top;i--){const o=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Qn.get(n.table)}t(r)}return!0}function MQ(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function rut({width:e,height:t,map:n},r){let i=r.top*e+r.left,o=i,s=(r.bottom-1)*e+r.left,a=i+(r.right-r.left-1);for(let l=r.top;
623l<r.bottom;l++){if(r.left>0&&n[o]==n[o-1]||r.right<e&&n[a]==n[a+1])return!0;o+=e,a+=e}for(let l=r.left;l<r.right;l++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[s]==n[s+e])return!0;i++,s++}return!1}function OQ(e,t){const n=e.selection;if(!(n instanceof vn)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=sl(e),{map:i}=r;if(rut(i,r))return!1;if(t){const o=e.tr,s={};let a=we.empty,l,c;for(let d=r.top;d<r.bottom;d++)for(let f=r.left;f<r.right;f++){const p=i.map[d*i.width+f],m=r.table.nodeAt(p);if(!(s[p]||!m))if(s[p]=!0,l==null)l=p,c=m;else{MQ(m)||(a=a.append(m.content));const y=o.mapping.map(p+r.tableStart);o.delete(y,y+m.nodeSize)}}if(l==null||c==null)return!0;if(o.setNodeMarkup(l+r.tableStart,null,{...I0e(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),a.size){const d=l+1+c.content.size,f=MQ(c)?l+1:d;o.replaceWith(f+r.tableStart,d+r.tableStart,a)}o.setSelection(new vn(o.doc.resolve(l+r.tableStart))),t(o)}return!0}function RQ(e,t){const n=Ci(e.schema);return iut(({node:r})=>n[r.type.spec.tableRole])(e,t)}function iut(e){return(t,n)=>{var r;const i=t.selection;let o,s;if(i instanceof vn){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;o=i.$anchorCell.nodeAfter,s=i.$anchorCell.pos}else{if(o=Lct(i.$from),!o)return!1;s=(r=Sm(i.$from))==null?void 0:r.pos}if(o==null||s==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let a=o.attrs;const l=[],c=a.colwidth;a.rowspan>1&&(a={...a,rowspan:1}),a.colspan>1&&(a={...a,colspan:1});const d=sl(t),f=t.tr;for(let m=0;m<d.right-d.left;m++)l.push(c?{...a,colwidth:c&&c[m]?[c[m]]:null}:a);let p;for(let m=d.top;m<d.bottom;m++){let y=d.map.positionAt(m,d.left,d.table);m==d.top&&(y+=o.nodeSize);for(let v=d.left,b=0;v<d.right;v++,b++)v==d.left&&m==d.top||f.insert(p=f.mapping.map(y+d.tableStart,1),e({node:o,row:m,col:v}).createAndFill(l[b]))}f.setNodeMarkup(s,e({node:o,row:d.top,col:d.left}),l[0]),i instanceof vn&&f.setSelection(new vn(f.doc.resolve(i.$anchorCell.pos),p?f.doc.resolve(p):void 0)),n(f)}return!0}}function out(e,t){return function(n,r){if(!fa(n))return!1;const i=hS(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){const o=n.tr;n.selection instanceof vn?n.selection.forEachCell((s,a)=>{s.attrs[e]!==t&&o.setNodeMarkup(a,null,{...s.attrs,[e]:t})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(o)}return!0}}function sut(e){return function(t,n){if(!fa(t))return!1;if(n){const r=Ci(t.schema),i=sl(t),o=t.tr,s=i.map.cellsInRect(e=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=s.map(l=>i.table.nodeAt(l));for(let l=0;l<s.length;l++)a[l].type==r.header_cell&&o.setNodeMarkup(i.tableStart+s[l],r.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<s.length;l++)o.setNodeMarkup(i.tableStart+s[l],r.header_cell,a[l].attrs);n(o)}return!0}}function PQ(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let i=0;i<r.length;i++){const o=t.table.nodeAt(r[i]);if(o&&o.type!==n.header_cell)return!1}return!0}function rv(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?sut(e):function(n,r){if(!fa(n))return!1;if(r){const i=Ci(n.schema),o=sl(n),s=n.tr,a=PQ("row",o,i),l=PQ("column",o,i),d=(e==="column"?a:e==="row"?l:!1)?1:0,f=e=="column"?{left:0,top:d,right:1,bottom:o.map.height}:e=="row"?{left:d,top:0,right:o.map.width,bottom:1}
623:o,p=e=="column"?l?i.cell:i.header_cell:e=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(f).forEach(m=>{const y=m+o.tableStart,v=s.doc.nodeAt(y);v&&s.setNodeMarkup(y,p,v.attrs)}),r(s)}return!0}}rv("row",{useDeprecatedLogic:!0});rv("column",{useDeprecatedLogic:!0});var aut=rv("cell",{useDeprecatedLogic:!0});function lut(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let r=e.index(-1)-1,i=e.before();r>=0;r--){const o=e.node(-1).child(r),s=o.lastChild;if(s)return i-1-s.nodeSize;i-=o.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let r=e.indexAfter(-1),i=e.after();r<n.childCount;r++){const o=n.child(r);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function DQ(e){return function(t,n){if(!fa(t))return!1;const r=lut(hS(t),e);if(r==null)return!1;if(n){const i=t.doc.resolve(r);n(t.tr.setSelection(Ue.between(i,zct(i))).scrollIntoView())}return!0}}function cut(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function D2(e,t){const n=e.selection;if(!(n instanceof vn))return!1;if(t){const r=e.tr,i=Ci(e.schema).cell.createAndFill().content;n.forEachCell((o,s)=>{o.content.eq(i)||r.replace(r.mapping.map(s+1),r.mapping.map(s+o.nodeSize-1),new Ie(i,0,0))}),r.docChanged&&t(r)}return!0}function uut(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole=="table");)n--,r--,t=t.child(0).content;const i=t.child(0),o=i.type.spec.tableRole,s=i.type.schema,a=[];if(o=="row")for(let l=0;l<t.childCount;l++){let c=t.child(l).content;const d=l?0:Math.max(0,n-1),f=l<t.childCount-1?0:Math.max(0,r-1);(d||f)&&(c=OM(Ci(s).row,new Ie(c,d,f)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||r?OM(Ci(s).row,new Ie(t,n,r)).content:t);else return null;return dut(s,a)}function dut(e,t){const n=[];for(let i=0;i<t.length;i++){const o=t[i];for(let s=o.childCount-1;s>=0;s--){const{rowspan:a,colspan:l}=o.child(s).attrs;for(let c=i;c<i+a;c++)n[c]=(n[c]||0)+l}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(we.empty),n[i]<r){const o=Ci(e).cell.createAndFill(),s=[];for(let a=n[i];a<r;a++)s.push(o);t[i]=t[i].append(we.from(s))}return{height:t.length,width:r,rows:t}}function OM(e,t){const n=e.createAndFill();return new yD(n).replace(0,n.content.size,t).doc}function fut({width:e,height:t,rows:n},r,i){if(e!=r){const o=[],s=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let d=o[a]||0,f=0;d<r;f++){let p=l.child(f%l.childCount);d+p.attrs.colspan>r&&(p=p.type.createChecked(rh(p.attrs,p.attrs.colspan,d+p.attrs.colspan-r),p.content)),c.push(p),d+=p.attrs.colspan;for(let m=1;m<p.attrs.rowspan;m++)o[a+m]=(o[a+m]||0)+p.attrs.colspan}s.push(we.from(c))}n=s,e=r}if(t!=i){const o=[];for(let s=0,a=0;s<i;s++,a++){const l=[],c=n[a%t];for(let d=0;d<c.childCount;d++){let f=c.child(d);s+f.attrs.rowspan>i&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),l.push(f)}o.push(we.from(l))}n=o,t=i}return{width:e,height:t,rows:n}}function hut(e,t,n,r,i,o,s){const a=e.doc.type.schema,l=Ci(a);let c,d;if(i>t.width)for(let f=0,p=0;f<t.height;f++){const m=n.child(f);p+=m.nodeSize;const y=[];let v;m.lastChild==null||m.lastChild.type==l.cell?v=c||(c=l.cell.createAndFill()):v=d||(d=l.header_cell.createAndFill());for(let b=t.width;b<i;b++)y.push(v);e.insert(e.mapping.slice(s).map(p-1+r),y)}if(o>t.height){const f=[];for(let y=0,v=(t.height-1)*t.width;y<Math.max(t.width,i);y++){const b=y>=t.width?!1:n.nodeAt(t.map[v+y]).type==l.header_cell;f.push(b?d||(d=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const p=l.row.create(null,we.from(f)),m=[];for(let y=t.height;y<o;y++)m.push(p);e.insert(e.mapping.slice(s).map(r+n.nodeSize-2),m)}return!!(c||d)}function IQ(e,t,n,r,i,o,s,a){if(s==0||s==t.height)return!1;let l=!1;for(let c=i;c<o;c++){const d=s*t.width+c,f=t.map[d];if(t.map[d-t.width]==f){l=!0;const p=n.nodeAt(f),{top:m,left:y}=t.findCell(f);e.setNodeMarkup(e.mapping.slice(a).map(f+r),null,{...p.attrs,rowspan:s-m}),e.insert(e.mapping.slice(a).map(t.positionAt(s,y,n)),p.type.createAndFill({...p.attrs,rowspan:m+p.attrs.rowspan-s})),c+=p.attrs.colspan-1}}return l}function LQ(e,t,n,r,i,o,s,a){if(s==0||s==t.width)return!1;let l=!1;for(let c=i;c<o;c++){const d=c*t.width+s,f=t.map[d];if(t.map[d-1]==f){l=!0;const p=n.nodeAt(f),m=t.colCount(f),y=e.mapping.slice(a).map(f+r);
623e.setNodeMarkup(y,null,rh(p.attrs,s-m,p.attrs.colspan-(s-m))),e.insert(y+p.nodeSize,p.type.createAndFill(rh(p.attrs,0,s-m))),c+=p.attrs.rowspan-1}}return l}function $Q(e,t,n,r,i){let o=n?e.doc.nodeAt(n-1):e.doc;if(!o)throw new Error("No table found");let s=Qn.get(o);const{top:a,left:l}=r,c=l+i.width,d=a+i.height,f=e.tr;let p=0;function m(){if(o=n?f.doc.nodeAt(n-1):f.doc,!o)throw new Error("No table found");s=Qn.get(o),p=f.mapping.maps.length}hut(f,s,o,n,c,d,p)&&m(),IQ(f,s,o,n,l,c,a,p)&&m(),IQ(f,s,o,n,l,c,d,p)&&m(),LQ(f,s,o,n,a,d,l,p)&&m(),LQ(f,s,o,n,a,d,c,p)&&m();for(let y=a;y<d;y++){const v=s.positionAt(y,l,o),b=s.positionAt(y,c,o);f.replace(f.mapping.slice(p).map(v+n),f.mapping.slice(p).map(b+n),new Ie(i.rows[y-a],0,0))}m(),f.setSelection(new vn(f.doc.resolve(n+s.positionAt(a,l,o)),f.doc.resolve(n+s.positionAt(d-1,c-1,o)))),t(f)}var put=RD({ArrowLeft:I2("horiz",-1),ArrowRight:I2("horiz",1),ArrowUp:I2("vert",-1),ArrowDown:I2("vert",1),"Shift-ArrowLeft":L2("horiz",-1),"Shift-ArrowRight":L2("horiz",1),"Shift-ArrowUp":L2("vert",-1),"Shift-ArrowDown":L2("vert",1),Backspace:D2,"Mod-Backspace":D2,Delete:D2,"Mod-Delete":D2});function gw(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function I2(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof vn)return gw(n,r,et.near(o.$headCell,t));if(e!="horiz"&&!o.empty)return!1;const s=H0e(i,e,t);if(s==null)return!1;if(e=="horiz")return gw(n,r,et.near(n.doc.resolve(o.head+t),t));{const a=n.doc.resolve(s),l=D0e(a,e,t);let c;return l?c=et.near(l,1):t<0?c=et.near(n.doc.resolve(a.before(-1)),-1):c=et.near(n.doc.resolve(a.after(-1)),1),gw(n,r,c)}}}function L2(e,t){return(n,r,i)=>{if(!i)return!1;const o=n.selection;let s;if(o instanceof vn)s=o;else{const l=H0e(i,e,t);if(l==null)return!1;s=new vn(n.doc.resolve(l))}const a=D0e(s.$headCell,e,t);return a?gw(n,r,new vn(s.$anchorCell,a)):!1}}function mut(e,t){const n=e.state.doc,r=Sm(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new vn(r))),!0):!1}function gut(e,t,n){if(!fa(e.state))return!1;let r=uut(n);const i=e.state.selection;if(i instanceof vn){r||(r={width:1,height:1,rows:[we.from(OM(Ci(e.state.schema).cell,n))]});const o=i.$anchorCell.node(-1),s=i.$anchorCell.start(-1),a=Qn.get(o).rectBetween(i.$anchorCell.pos-s,i.$headCell.pos-s);return r=fut(r,a.right-a.left,a.bottom-a.top),$Q(e.state,e.dispatch,s,a,r),!0}else if(r){const o=hS(e.state),s=o.start(-1);return $Q(e.state,e.dispatch,s,Qn.get(o.node(-1)).findCell(o.pos-s),r),!0}else return!1}function yut(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=zQ(e,t.target);let i;if(t.shiftKey&&e.state.selection instanceof vn)o(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&(i=Sm(e.state.selection.$anchor))!=null&&((n=IA(e,t))==null?void 0:n.pos)!=i.pos)o(i,t),t.preventDefault();else if(!r)return;function o(l,c){let d=IA(e,c);const f=Mu.getState(e.state)==null;
623if(!d||!pI(l,d))if(f)d=l;else return;const p=new vn(l,d);if(f||!e.state.selection.eq(p)){const m=e.state.tr.setSelection(p);f&&m.setMeta(Mu,l.pos),e.dispatch(m)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",a),Mu.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(Mu,-1))}function a(l){const c=l,d=Mu.getState(e.state);let f;if(d!=null)f=e.state.doc.resolve(d);else if(zQ(e,c.target)!=r&&(f=IA(e,t),!f))return s();f&&o(f,c)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",a)}function H0e(e,t,n){if(!(e.state.selection instanceof Ue))return null;const{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){const o=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=r.before(i),l=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(l)?a:null}}return null}function zQ(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function IA(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Sm(e.state.doc.resolve(n.pos)):null}var vut=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),RM(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,RM(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function RM(e,t,n,r,i,o){var s;let a=0,l=!0,c=t.firstChild;const d=e.firstChild;if(d){for(let f=0,p=0;f<d.childCount;f++){const{colspan:m,colwidth:y}=d.child(f).attrs;for(let v=0;v<m;v++,p++){const b=i==p?o:y&&y[v],C=b?b+"px":"";if(a+=b||r,b||(l=!1),c)c.style.width!=C&&(c.style.width=C),c=c.nextSibling;else{const S=document.createElement("col");S.style.width=C,t.appendChild(S)}}}for(;c;){const f=c.nextSibling;(s=c.parentNode)==null||s.removeChild(c),c=f}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var Eo=new pn("tableColumnResizing");function but({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=vut,lastColumnResizable:i=!0}={}){const o=new an({key:Eo,state:{init(s,a){var l,c;const d=(c=(l=o.spec)==null?void 0:l.props)==null?void 0:c.nodeViews,f=Ci(a.schema).table.name;return r&&d&&(d[f]=(p,m)=>new r(p,n,m)),new xut(-1,!1)},apply(s,a){return a.apply(s)}},props:{attributes:s=>{const a=Eo.getState(s);return a&&a.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,a)=>{wut(s,a,e,i)},mouseleave:s=>{Cut(s)},mousedown:(s,a)=>{Sut(s,a,t,n)}},decorations:s=>{const a=Eo.getState(s);if(a&&a.activeHandle>-1)return Nut(s,a.activeHandle)},nodeViews:{}}});return o}var xut=class yw{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,r=t.getMeta(Eo);if(r&&r.setHandle!=null)return new yw(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new yw(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let i=t.mapping.map(n.activeHandle,-1);return MM(t.doc.resolve(i))||(i=-1),new yw(i,n.dragging)}return n}};function wut(e,t,n,r){if(!e.editable)return;const i=Eo.getState(e.state);if(i&&!i.dragging){const o=kut(t.target);let s=-1;if(o){const{left:a,right:l}=o.getBoundingClientRect();t.clientX-a<=n?s=FQ(e,t,"left",n):l-t.clientX<=n&&(s=FQ(e,t,"right",n))}if(s!=i.activeHandle){if(!r&&s!==-1){const a=e.state.doc.resolve(s),l=a.node(-1),c=Qn.get(l),d=a.start(-1);if(c.colCount(a.pos-d)+a.nodeAfter.attrs.colspan-1==c.width-1)return}V0e(e,s)}}}function Cut(e){if(!e.editable)return;const t=Eo.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&V0e(e,-1)}function Sut(e,t,n,r){var i;if(!e.editable)return!1;const o=(i=e.dom.ownerDocument.defaultView)!=null?i:window,s=Eo.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const a=e.state.doc.nodeAt(s.activeHandle),l=Eut(e,s.activeHandle,a.attrs);e.dispatch(e.state.tr.setMeta(Eo,{setDragging:{startX:t.clientX,startWidth:l}}));function c(f){o.removeEventListener("mouseup",c),o.removeEventListener("mousemove",d);const p=Eo.getState(e.state);p!=null&&p.dragging&&(_ut(e,p.activeHandle,BQ(p.dragging,f,n)),e.dispatch(e.state.tr.setMeta(Eo,{setDragging:null})))}function d(f){if(!f.which)return c(f);const p=Eo.getState(e.state);
623if(p&&p.dragging){const m=BQ(p.dragging,f,n);HQ(e,p.activeHandle,m,r)}}return HQ(e,s.activeHandle,l,r),o.addEventListener("mouseup",c),o.addEventListener("mousemove",d),t.preventDefault(),!0}function Eut(e,t,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const o=e.domAtPos(t);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(a-=r[c],l--);return a/l}function kut(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function FQ(e,t,n,r){const i=n=="right"?-r:r,o=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!o)return-1;const{pos:s}=o,a=Sm(e.state.doc.resolve(s));if(!a)return-1;if(n=="right")return a.pos;const l=Qn.get(a.node(-1)),c=a.start(-1),d=l.map.indexOf(a.pos-c);return d%l.width==0?-1:c+l.map[d-1]}function BQ(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function V0e(e,t){e.dispatch(e.state.tr.setMeta(Eo,{setHandle:t}))}function _ut(e,t,n){const r=e.state.doc.resolve(t),i=r.node(-1),o=Qn.get(i),s=r.start(-1),a=o.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,l=e.state.tr;for(let c=0;c<o.height;c++){const d=c*o.width+a;if(c&&o.map[d]==o.map[d-o.width])continue;const f=o.map[d],p=i.nodeAt(f).attrs,m=p.colspan==1?0:a-o.colCount(f);if(p.colwidth&&p.colwidth[m]==n)continue;const y=p.colwidth?p.colwidth.slice():Aut(p.colspan);y[m]=n,l.setNodeMarkup(s+f,null,{...p,colwidth:y})}l.docChanged&&e.dispatch(l)}function HQ(e,t,n,r){const i=e.state.doc.resolve(t),o=i.node(-1),s=i.start(-1),a=Qn.get(o).colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;let l=e.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&RM(o,l.firstChild,l,r,a,n)}function Aut(e){return Array(e).fill(0)}function Nut(e,t){var n;const r=[],i=e.doc.resolve(t),o=i.node(-1);if(!o)return gn.empty;const s=Qn.get(o),a=i.start(-1),l=s.colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<s.height;c++){const d=l+c*s.width;if((l==s.width-1||s.map[d]!=s.map[d+1])&&(c==0||s.map[d]!=s.map[d-s.width])){const f=s.map[d],p=a+f+o.nodeAt(f).nodeSize-1,m=document.createElement("div");m.className="column-resize-handle",(n=Eo.getState(e))!=null&&n.dragging&&r.push(jr.node(a+f,a+f+o.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),r.push(jr.widget(p,m))}}return gn.create(e.doc,r)}function jut({allowTableNodeSelection:e=!1}={}){return new an({key:Mu,state:{init(){return null},apply(t,n){const r=t.getMeta(Mu);if(r!=null)return r==-1?null:r;if(n==null||!t.docChanged)return n;const{deleted:i,pos:o}=t.mapping.mapResult(n);return i?null:o}},props:{decorations:Hct,handleDOMEvents:{mousedown:yut},createSelectionBetween(t){return Mu.getState(t.state)!=null?t.state.selection:null},handleTripleClick:mut,handleKeyDown:put,handlePaste:gut},appendTransaction(t,n,r){return qct(r,z0e(r,n),e)}})}function Q4(e){return e==="left"||e==="right"||e==="center"?e:null}function Tut(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return Q4(t||n)}function Mut(e){return Q4(e==null?void 0:e.align)}function U0e(){return{default:null,parseHTML:e=>Tut(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}var q0e=Ot.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{var t,n;const r=e.getAttribute("colwidth"),i=r?r.split(",").map(o=>parseInt(o,10)):null;if(!i){const o=(t=e.closest("table"))==null?void 0:t.querySelectorAll("colgroup > col"),s=Array.from(((n=e.parentElement)==null?void 0:n.children)||[]).indexOf(e);if(s&&s>-1&&o&&o[s]){const a=o[s].getAttribute("width");return a?[parseInt(a,10)]:null}}return i}},align:U0e()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",Bt(this.options.HTMLAttributes,e),0]}}),W0e=Ot.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?t.split(",").map(r=>parseInt(r,10)):null}},align:U0e()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",Bt(this.options.HTMLAttributes,e),0]}}),G0e=Ot.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",Bt(this.options.HTMLAttributes,e),0]}});function PM(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function VQ(e,t,n,r,i,o){var s;let a=0,l=!0,c=t.firstChild;const d=e.firstChild;if(d!==null)for(let p=0,m=0;p<d.childCount;p+=1){const{colspan:y,colwidth:v}=d.child(p).attrs;for(let b=0;b<y;b+=1,m+=1){const C=i===m?o:v&&v[b],S=C?`${C}px`:"";if(a+=C||r,C||(l=!1),c){if(c.style.width!==S){const[E,A]=PM(r,C);c.style.setProperty(E,A)}c=c.nextSibling}else{const E=document.createElement("col"),[A,_]=PM(r,C);E.style.setProperty(A,_),t.appendChild(E)}}}for(;c;){const p=c.nextSibling;(s=c.parentNode)==null||s.removeChild(c),c=p}const f=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);l&&!f?(n.style.width=`${a}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${a}px`)}var Out=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),VQ(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,VQ(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!!(n&&!r&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function Rut(e,t,n,r){let i=0,o=!0;const s=[],a=e.firstChild;if(!a)return{};for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:m,colwidth:y}=a.child(f).attrs;for(let v=0;v<m;v+=1,p+=1){const b=n===p?r:y&&y[v];i+=b||t,b||(o=!1);const[C,S]=PM(t,b);s.push(["col",{style:`${C}: ${S}`}])}}const l=o?`${i}px`:"",c=o?"":`${i}px`;return{colgroup:["colgroup",{},...s],tableWidth:l,tableMinWidth:c}}function UQ(e,t){return e.createAndFill()}
623function Put(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function Dut(e,t,n,r,i){const o=Put(e),s=[],a=[];for(let c=0;c<n;c+=1){const d=UQ(o.cell);if(d&&a.push(d),r){const f=UQ(o.header_cell);f&&s.push(f)}}const l=[];for(let c=0;c<t;c+=1)l.push(o.row.createChecked(null,r&&c===0?s:a));return o.table.createChecked(null,l)}function Iut(e){return e instanceof vn}var $2=({editor:e})=>{const{selection:t}=e.state;if(!Iut(t))return!1;let n=0;const r=Bhe(t.ranges[0].$from,o=>o.type.name==="table");return r==null||r.node.descendants(o=>{if(o.type.name==="table")return!1;["tableCell","tableHeader"].includes(o.type.name)&&(n+=1)}),n===t.ranges.length?(e.commands.deleteTable(),!0):!1},Lut="�";function $ut(e){return(e||"").replace(/\s+/g," ").trim()}function zut(e,t,n={}){var r;const i=(r=n.cellLineSeparator)!=null?r:Lut;if(!e||!e.content||e.content.length===0)return"";const o=[];e.content.forEach(v=>{const b=[];v.content&&v.content.forEach(C=>{let S="";C.content&&Array.isArray(C.content)&&C.content.length>1?S=C.content.map(j=>t.renderChildren(j)).join(i):S=C.content?t.renderChildren(C.content):"";const E=$ut(S),A=C.type==="tableHeader",_=Mut(C.attrs);b.push({text:E,isHeader:A,align:_})}),o.push(b)});const s=o.reduce((v,b)=>Math.max(v,b.length),0);if(s===0)return"";const a=new Array(s).fill(0);o.forEach(v=>{var b;for(let C=0;C<s;C+=1){const E=(((b=v[C])==null?void 0:b.text)||"").length;E>a[C]&&(a[C]=E),a[C]<3&&(a[C]=3)}});const l=(v,b)=>v+" ".repeat(Math.max(0,b-v.length)),c=o[0],d=c.some(v=>v.isHeader),f=new Array(s).fill(null);o.forEach(v=>{var b;for(let C=0;C<s;C+=1)!f[C]&&((b=v[C])!=null&&b.align)&&(f[C]=v[C].align)});let p=` 624`;const m=new Array(s).fill(0).map((v,b)=>d&&c[b]&&c[b].text||"");return p+=`| ${m.map((v,b)=>l(v,a[b])).join(" | ")} | 625`,p+=`| ${a.map((v,b)=>{const C=Math.max(3,v),S=f[b];return S==="left"?`:${"-".repeat(C)}`:S==="right"?`${"-".repeat(C)}:`:S==="center"?`:${"-".repeat(C)}:`:"-".repeat(C)}).join(" | ")} | 626`,(d?o.slice(1):o).forEach(v=>{p+=`| ${new Array(s).fill(0).map((b,C)=>l(v[C]&&v[C].text||"",a[C])).join(" | ")} | 627`}),p}var Fut=zut,K0e=Ot.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Out,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=Rut(e,this.options.cellMinWidth),o=t.style;function s(){return o||(r?`width: ${r}`:`min-width: ${i}`)}const a=["table",Bt(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},a]:a},parseMarkdown:(e,t)=>{const n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){const i=[];e.header.forEach((o,s)=>{var a;const l=Q4((a=r[s])!=null?a:o.align),c=l?{align:l}:{};i.push(t.createNode("tableHeader",c,[{type:"paragraph",content:t.parseInline(o.tokens)}]))}),n.push(t.createNode("tableRow",{},i))}return e.rows&&e.rows.forEach(i=>{const o=[];i.forEach((s,a)=>{var l;const c=Q4((l=r[a])!=null?l:s.align),d=c?{align:c}:{};o.push(t.createNode("tableCell",d,[{type:"paragraph",content:t.parseInline(s.tokens)}]))}),n.push(t.createNode("tableRow",{},o))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>Fut(e,t),addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:o})=>{const s=Dut(o.schema,e,t,n);if(i){const a=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(Ue.near(r.doc.resolve(a)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>Kct(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>Yct(e,t),deleteColumn:()=>({state:e,dispatch:t})=>Zct(e,t),addRowBefore:()=>({state:e,dispatch:t})=>Jct(e,t),addRowAfter:()=>({state:e,dispatch:t})=>eut(e,t),deleteRow:()=>({state:e,dispatch:t})=>nut(e,t),deleteTable:()=>({state:e,dispatch:t})=>cut(e,t),mergeCells:()=>({state:e,dispatch:t})=>OQ(e,t),splitCell:()=>({state:e,dispatch:t})=>RQ(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>rv("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>rv("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>aut(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>OQ(e,t)?!0:RQ(e,t),setCellAttribute:(e,t)=>
vendor: 5,752 bytes, lines 627-630
627({state:n,dispatch:r})=>out(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>DQ(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>DQ(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&z0e(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const r=vn.create(t.doc,e.anchorCell,e.headCell);t.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:$2,"Mod-Backspace":$2,Delete:$2,"Mod-Delete":$2}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[but({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],jut({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Wt(Ye(e,"tableRole",t))}}});jt.create({name:"tableKit",addExtensions(){const e=[];return this.options.table!==!1&&e.push(K0e.configure(this.options.table)),this.options.tableCell!==!1&&e.push(q0e.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(W0e.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(G0e.configure(this.options.tableRow)),e}});/*! 628* tabbable 6.4.0 629* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 630*/var But=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],DM=But.join(","),Y0e=typeof Element>"u",iv=Y0e?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J4=!Y0e&&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},e5=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",s=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):e5(t.parentNode));return s},Hut=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Vut=function(t,n,r){if(e5(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(DM));return n&&iv.call(t,DM)&&i.unshift(t),i=i.filter(r),i},IM=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var s=o.shift();if(!e5(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),l=a.length?a:s.children,c=IM(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:s,candidates:c})}else{var d=iv.call(s,DM);d&&r.filter(s)&&(n||!t.includes(s))&&i.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!e5(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&p){var m=IM(f===!0?s.children:f.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:s,candidates:m})}else o.unshift.apply(o,s.children)}}return i},X0e=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Z0e=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Hut(t))&&!X0e(t)?0:t.tabIndex},Uut=function(t,n){var r=Z0e(t);return r<0&&n&&!X0e(t)?0:r},qut=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Q0e=function(t){return t.tagName==="INPUT"},Wut=function(t){return Q0e(t)&&t.type==="hidden"},Gut=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},Kut=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},Yut=function(t){if(!t.name)return!0;var n=t.form||J4(t),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=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 o=Kut(i,t.form);return!o||o===t},Xut=function(t){return Q0e(t)&&t.type==="radio"},Zut=function(t){return Xut(t)&&!Yut(t)},Qut=function(t){var n,r=t&&J4(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var s,a,l;for(o=!!((s=i)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var c,d,f;r=J4(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((d=i)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return o},qQ=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},Jut=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var s=iv.call(t,"details>summary:first-of-type"),a=s?t.parentElement:t;if(iv.call(a,"details:not([open]) *"))return!0;
vendor: 1,808 bytes, line 630
630if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var l=t;t;){var c=t.parentElement,d=J4(t);if(c&&!c.shadowRoot&&i(c)===!0)return qQ(t);t.assignedSlot?t=t.assignedSlot:!c&&d!==t.ownerDocument?t=d.host:t=c}t=l}if(Qut(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qQ(t);return!1},edt=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 i=n.children.item(r);if(i.tagName==="LEGEND")return iv.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},tdt=function(t,n){return!(n.disabled||Wut(n)||Jut(n,t)||Gut(n)||edt(n))},WQ=function(t,n){return!(Zut(n)||Z0e(n)<0||!tdt(t,n))},ndt=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},J0e=function(t){var n=[],r=[];return t.forEach(function(i,o){var s=!!i.scopeParent,a=s?i.scopeParent:i,l=Uut(a,s),c=s?J0e(i.candidates):a;l===0?s?n.push.apply(n,c):n.push(a):r.push({documentOrder:o,tabIndex:l,item:i,isScope:s,content:c})}),r.sort(qut).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},eme=function(t,n){n=n||{};var r;return n.getShadowRoot?r=IM([t],n.includeContainer,{filter:WQ.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:ndt}):r=Vut(t,n.includeContainer,WQ.bind(null,n)),J0e(r)};function rdt(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function idt(){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 tme(){return/apple/i.test(navigator.vendor)}
630function odt(){return rdt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function sdt(){return idt().includes("jsdom/")}const GQ="data-floating-ui-focusable",adt="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function LM(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function V0(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&cj(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Op(e){return"composedPath"in e?e.composedPath()[0]:e.target}function LA(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)}function ldt(e){return e.matches("html,body")}function $a(e){return(e==null?void 0:e.ownerDocument)||document}function cdt(e){return gs(e)&&e.matches(adt)}function udt(e){if(!e||sdt())return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ddt(e){return e?e.hasAttribute(GQ)?e:e.querySelector("["+GQ+"]")||e:null}function vw(e,t,n){return n===void 0&&(n=!0),e.filter(i=>{var o;return i.parentId===t&&(!n||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...vw(e,i.id,n)])}function fdt(e){return"nativeEvent"in e}function $M(e,t){const n=["mouse","pen"];return n.push("",void 0),n.includes(e)}var hdt=typeof document<"u",pdt=function(){},ta=hdt?x.useLayoutEffect:pdt;const mdt={...xi};function z2(e){const t=x.useRef(e);return ta(()=>{t.current=e}),t}const gdt=mdt.useInsertionEffect,ydt=gdt||(e=>e());function Ma(e){const t=x.useRef(()=>{});return ydt(()=>{t.current=e}),x.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const nme=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function rme(e,t){const n=eme(e,nme()),r=n.length;if(r===0)return;const i=LM($a(e)),o=n.indexOf(i),s=o===-1?t===1?0:r-1:o+t;return n[s]}function vdt(e){return rme($a(e).body,1)||e}function bdt(e){return rme($a(e).body,-1)||e}function $A(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!V0(n,r)}function xdt(e){eme(e,nme()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function KQ(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function ime(e){const t=x.useRef(void 0),n=x.useCallback(r=>{const i=e.map(o=>{if(o!=null){if(typeof o=="function"){const s=o,a=s(r);return typeof a=="function"?a:()=>{s(null)}}return o.current=r,()=>{o.current=null}}});return()=>{i.forEach(o=>o==null?void 0:o())}},e);return x.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}const wdt="data-floating-ui-focusable",YQ="active",XQ="selected",Cdt={...xi};let ZQ=!1,Sdt=0;const QQ=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Sdt++;function Edt(){const[e,t]=x.useState(()=>ZQ?QQ():void 0);return ta(()=>{e==null&&t(QQ())},[]),x.useEffect(()=>{ZQ=!0},[]),e}const kdt=Cdt.useId,mI=kdt||Edt;function _dt(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const Adt=x.createContext(null),Ndt=x.createContext(null),gI=()=>{var e;return((e=x.useContext(Adt))==null?void 0:e.id)||null},yI=()=>x.useContext(Ndt);function hb(e){return"data-floating-ui-"+e}function Yo(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const JQ=hb("safe-polygon");function zA(e,t,n){if(n&&!$M(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}function FA(e){return typeof e=="function"?e():e}
630function jdt(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:o,elements:s}=e,{enabled:a=!0,delay:l=0,handleClose:c=null,mouseOnly:d=!1,restMs:f=0,move:p=!0}=t,m=yI(),y=gI(),v=z2(c),b=z2(l),C=z2(n),S=z2(f),E=x.useRef(),A=x.useRef(-1),_=x.useRef(),N=x.useRef(-1),j=x.useRef(!0),T=x.useRef(!1),O=x.useRef(()=>{}),D=x.useRef(!1),R=Ma(()=>{var B;const z=(B=i.current.openEvent)==null?void 0:B.type;return(z==null?void 0:z.includes("mouse"))&&z!=="mousedown"});x.useEffect(()=>{if(!a)return;function B(z){let{open:V}=z;V||(Yo(A),Yo(N),j.current=!0,D.current=!1)}return o.on("openchange",B),()=>{o.off("openchange",B)}},[a,o]),x.useEffect(()=>{if(!a||!v.current||!n)return;function B(V){R()&&r(!1,V,"hover")}const z=$a(s.floating).documentElement;return z.addEventListener("mouseleave",B),()=>{z.removeEventListener("mouseleave",B)}},[s.floating,n,r,a,v,R]);const I=x.useCallback(function(B,z,V){z===void 0&&(z=!0),V===void 0&&(V="hover");const U=zA(b.current,"close",E.current);U&&!_.current?(Yo(A),A.current=window.setTimeout(()=>r(!1,B,V),U)):z&&(Yo(A),r(!1,B,V))},[b,r]),F=Ma(()=>{O.current(),_.current=void 0}),$=Ma(()=>{if(T.current){const B=$a(s.floating).body;B.style.pointerEvents="",B.removeAttribute(JQ),T.current=!1}}),H=Ma(()=>i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1);x.useEffect(()=>{if(!a)return;function B(G){if(Yo(A),j.current=!1,d&&!$M(E.current)||FA(S.current)>0&&!zA(b.current,"open"))return;const Y=zA(b.current,"open",E.current);Y?A.current=window.setTimeout(()=>{C.current||r(!0,G,"hover")},Y):n||r(!0,G,"hover")}function z(G){if(H()){$();return}O.current();const Y=$a(s.floating);if(Yo(N),D.current=!1,v.current&&i.current.floatingContext){n||Yo(A),_.current=v.current({...i.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){$(),F(),H()||I(G,!0,"safe-polygon")}});const Q=_.current;Y.addEventListener("mousemove",Q),O.current=()=>{Y.removeEventListener("mousemove",Q)};return}(E.current==="touch"?!V0(s.floating,G.relatedTarget):!0)&&I(G)}function V(G){H()||i.current.floatingContext&&(v.current==null||v.current({...i.current.floatingContext,tree:m,x:G.clientX,y:G.clientY,onClose(){$(),F(),H()||I(G)}})(G))}function U(){Yo(A)}function W(G){H()||I(G,!1)}if(jn(s.domReference)){const G=s.domReference,Y=s.floating;return n&&G.addEventListener("mouseleave",V),p&&G.addEventListener("mousemove",B,{once:!0}),G.addEventListener("mouseenter",B),G.addEventListener("mouseleave",z),Y&&(Y.addEventListener("mouseleave",V),Y.addEventListener("mouseenter",U),Y.addEventListener("mouseleave",W)),()=>{n&&G.removeEventListener("mouseleave",V),p&&G.removeEventListener("mousemove",B),G.removeEventListener("mouseenter",B),G.removeEventListener("mouseleave",z),Y&&(Y.removeEventListener("mouseleave",V),Y.removeEventListener("mouseenter",U),Y.removeEventListener("mouseleave",W))}}},[s,a,e,d,p,I,F,$,r,n,C,m,b,v,i,H,S]),ta(()=>{var B;if(a&&n&&(B=v.current)!=null&&(B=B.__options)!=null&&B.blockPointerEvents&&R()){T.current=!0;const V=s.floating;if(jn(s.domReference)&&V){var z;const U=$a(s.floating).body;U.setAttribute(JQ,"");const W=s.domReference,G=m==null||(z=m.nodesRef.current.find(Y=>Y.id===y))==null||(z=z.context)==null?void 0:z.elements.floating;return G&&(G.style.pointerEvents=""),U.style.pointerEvents="none",W.style.pointerEvents="auto",V.style.pointerEvents="auto",()=>{U.style.pointerEvents="",W.style.pointerEvents="",V.style.pointerEvents=""}}}},[a,n,y,s,m,v,R]),ta(()=>{n||(E.current=void 0,D.current=!1,F(),$())},[n,F,$]),x.useEffect(()=>()=>{F(),Yo(A),Yo(N),$()},[a,s.domReference,F,$]);const L=x.useMemo(()=>{function B(z){E.current=z.pointerType}return{onPointerDown:B,onPointerEnter:B,onMouseMove(z){const{nativeEvent:V}=z;function U(){!j.current&&!C.current&&r(!0,V,"hover")}d&&!$M(E.current)||n||FA(S.current)===0||D.current&&z.movementX**2+z.movementY**2<2||(Yo(N),E.current==="touch"?U():(D.current=!0,N.current=window.setTimeout(U,FA(S.current))))}}},[d,r,n,C,S]);return x.useMemo(()=>a?{reference:L}:{},[a,L])}const eJ=()=>{},Tdt=x.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:eJ,setState:eJ,isInstantPhase:!1});function Mdt(e){const{children:t,delay:n,timeoutMs:r=0}=e,[i,o]=x.useReducer((l,c)=>({...l,...c}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),s=x.useRef(null),a=x.useCallback(l=>{o({currentId:l})},[]);return ta(()=>{i.currentId?s.current===null?s.current=i.currentId:i.isInstantPhase||o({isInstantPhase:!0}):(i.isInstantPhase&&o({isInstantPhase:!1}),s.current=null)},[i.currentId,i.isInstantPhase]),u.jsx(Tdt.Provider,{value:x.useMemo(()=>({...i,setState:o,setCurrentId:a}),[i,a]),children:t})}const Odt={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},tJ=x.forwardRef(function(t,n){const[r,i]=x.useState();ta(()=>{tme()&&i("button")},[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[hb("focus-guard")]:"",style:Odt};return u.jsx("span",{...t,...o})}),Rdt={clipPath:"inset(50%)",position:"fixed",top:0,left:0},ome=x.createContext(null),nJ=hb("portal");function Pdt(e){e===void 0&&(e={});const{id:t,root:n}=e,r=mI(),i=Idt(),[o,s]=x.useState(null),a=x.useRef(null);return ta(()=>()=>{o==null||o.remove(),queueMicrotask(()=>{a.current=null})},[o]),ta(()=>
630{if(!r||a.current)return;const l=t?document.getElementById(t):null;if(!l)return;const c=document.createElement("div");c.id=r,c.setAttribute(nJ,""),l.appendChild(c),a.current=c,s(c)},[t,r]),ta(()=>{if(n===null||!r||a.current)return;let l=n||(i==null?void 0:i.portalNode);l&&!hR(l)&&(l=l.current),l=l||document.body;let c=null;t&&(c=document.createElement("div"),c.id=t,l.appendChild(c));const d=document.createElement("div");d.id=r,d.setAttribute(nJ,""),l=c||l,l.appendChild(d),a.current=d,s(d)},[t,n,r,i]),o}function Ddt(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,o=Pdt({id:n,root:r}),[s,a]=x.useState(null),l=x.useRef(null),c=x.useRef(null),d=x.useRef(null),f=x.useRef(null),p=s==null?void 0:s.modal,m=s==null?void 0:s.open,y=!!s&&!s.modal&&s.open&&i&&!!(r||o);return x.useEffect(()=>{if(!o||!i||p)return;function v(b){o&&$A(b)&&(b.type==="focusin"?KQ:xdt)(o)}return o.addEventListener("focusin",v,!0),o.addEventListener("focusout",v,!0),()=>{o.removeEventListener("focusin",v,!0),o.removeEventListener("focusout",v,!0)}},[o,i,p]),x.useEffect(()=>{o&&(m||KQ(o))},[m,o]),u.jsxs(ome.Provider,{value:x.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:f,portalNode:o,setFocusManagerState:a}),[i,o]),children:[y&&o&&u.jsx(tJ,{"data-type":"outside",ref:l,onFocus:v=>{if($A(v,o)){var b;(b=d.current)==null||b.focus()}else{const C=s?s.domReference:null,S=bdt(C);S==null||S.focus()}}}),y&&o&&u.jsx("span",{"aria-owns":o.id,style:Rdt}),o&&Si.createPortal(t,o),y&&o&&u.jsx(tJ,{"data-type":"outside",ref:c,onFocus:v=>{if($A(v,o)){var b;(b=f.current)==null||b.focus()}else{const C=s?s.domReference:null,S=vdt(C);S==null||S.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,v.nativeEvent,"focus-out"))}}})]})}const Idt=()=>x.useContext(ome),Ldt={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},$dt={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},rJ=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function zdt(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:i,dataRef:o}=e,{enabled:s=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:y}=t,v=yI(),b=Ma(typeof l=="function"?l:()=>!1),C=typeof l=="function"?b:l,S=x.useRef(!1),{escapeKey:E,outsidePress:A}=rJ(m),{escapeKey:_,outsidePress:N}=rJ(y),j=x.useRef(!1),T=Ma($=>{var H;if(!n||!s||!a||$.key!=="Escape"||j.current)return;const L=(H=o.current.floatingContext)==null?void 0:H.nodeId,B=v?vw(v.nodesRef.current,L):[];if(!E&&($.stopPropagation(),B.length>0)){let z=!0;if(B.forEach(V=>{var U;if((U=V.context)!=null&&U.open&&!V.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}r(!1,fdt($)?$.nativeEvent:$,"escape-key")}),O=Ma($=>{var H;const L=()=>{var B;T($),(B=Op($))==null||B.removeEventListener("keydown",L)};(H=Op($))==null||H.addEventListener("keydown",L)}),D=Ma($=>{var H;const L=o.current.insideReactTree;o.current.insideReactTree=!1;const B=S.current;if(S.current=!1,c==="click"&&B||L||typeof C=="function"&&!C($))return;const z=Op($),V="["+hb("inert")+"]",U=$a(i.floating).querySelectorAll(V);let W=jn(z)?z:null;for(;W&&!tc(W);){const Q=fc(W);if(tc(Q)||!jn(Q))break;W=Q}if(U.length&&jn(z)&&!ldt(z)&&!V0(z,i.floating)&&Array.from(U).every(Q=>!V0(W,Q)))return;if(gs(z)&&F){const Q=tc(z),ne=fs(z),ie=/auto|scroll/,se=Q||ie.test(ne.overflowX),oe=Q||ie.test(ne.overflowY),J=se&&z.clientWidth>0&&z.scrollWidth>z.clientWidth,ae=oe&&z.clientHeight>0&&z.scrollHeight>z.clientHeight,re=ne.direction==="rtl",pe=ae&&(re?$.offsetX<=z.offsetWidth-z.clientWidth:$.offsetX>z.clientWidth),be=J&&$.offsetY>z.clientHeight;if(pe||be)return}const G=(H=o.current.floatingContext)==null?void 0:H.nodeId,Y=v&&vw(v.nodesRef.current,G).some(Q=>{var ne;return LA($,(ne=Q.context)==null?void 0:ne.elements.floating)});if(LA($,i.floating)||LA($,i.domReference)||Y)return;const X=v?vw(v.nodesRef.current,G):[];if(X.length>0){let Q=!0;if(X.forEach(ne=>{var ie;if((ie=ne.context)!=null&&ie.open&&!ne.context.dataRef.current.__outsidePressBubbles){Q=!1;return}}),!Q)return}r(!1,$,"outside-press")}),R=Ma($=>{var H;const L=()=>{var B;D($),(B=Op($))==null||B.removeEventListener(c,L)};(H=Op($))==null||H.addEventListener(c,L)});x.useEffect(()=>{if(!n||!s)return;o.current.__escapeKeyBubbles=E,o.current.__outsidePressBubbles=A;let $=-1;function H(U){r(!1,U,"ancestor-scroll")}function L(){window.clearTimeout($),j.current=!0}function B(){$=window.setTimeout(()=>{j.current=!1},L5()?5:0)}const z=$a(i.floating);a&&(z.addEventListener("keydown",_?O:T,_),z.addEventListener("compositionstart",L),z.addEventListener("compositionend",B)),C&&z.addEventListener(c,N?R:D,N);let V=[];return p&&(jn(i.domReference)&&(V=Bu(i.domReference)),jn(i.floating)&&(V=V.concat(Bu(i.floating))),!jn(i.reference)&&i.reference&&i.reference.contextElement&&(V=V.concat(Bu(i.reference.contextElement)))),V=V.filter(U=>{var W;
630return U!==((W=z.defaultView)==null?void 0:W.visualViewport)}),V.forEach(U=>{U.addEventListener("scroll",H,{passive:!0})}),()=>{a&&(z.removeEventListener("keydown",_?O:T,_),z.removeEventListener("compositionstart",L),z.removeEventListener("compositionend",B)),C&&z.removeEventListener(c,N?R:D,N),V.forEach(U=>{U.removeEventListener("scroll",H)}),window.clearTimeout($)}},[o,i,a,C,c,n,r,p,s,E,A,T,_,O,D,N,R]),x.useEffect(()=>{o.current.insideReactTree=!1},[o,C,c]);const I=x.useMemo(()=>({onKeyDown:T,...d&&{[Ldt[f]]:$=>{r(!1,$.nativeEvent,"reference-press")},...f!=="click"&&{onClick($){r(!1,$.nativeEvent,"reference-press")}}}}),[T,r,d,f]),F=x.useMemo(()=>{function $(H){H.button===0&&(S.current=!0)}return{onKeyDown:T,onMouseDown:$,onMouseUp:$,[$dt[c]]:()=>{o.current.insideReactTree=!0}}},[T,c,o]);return x.useMemo(()=>s?{reference:I,floating:F}:{},[s,I,F])}function Fdt(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=mI(),o=x.useRef({}),[s]=x.useState(()=>_dt()),a=gI()!=null,[l,c]=x.useState(r.reference),d=Ma((m,y,v)=>{o.current.openEvent=m?y:void 0,s.emit("openchange",{open:m,event:y,reason:v,nested:a}),n==null||n(m,y,v)}),f=x.useMemo(()=>({setPositionReference:c}),[]),p=x.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return x.useMemo(()=>({dataRef:o,open:t,onOpenChange:d,elements:p,events:s,floatingId:i,refs:f}),[t,d,p,s,i,f])}function Bdt(e){e===void 0&&(e={});const{nodeId:t}=e,n=Fdt({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,s]=x.useState(null),[a,l]=x.useState(null),d=(i==null?void 0:i.domReference)||o,f=x.useRef(null),p=yI();ta(()=>{d&&(f.current=d)},[d]);const m=Pv({...e,elements:{...i,...a&&{reference:a}}}),y=x.useCallback(E=>{const A=jn(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;l(A),m.refs.setReference(A)},[m.refs]),v=x.useCallback(E=>{(jn(E)||E===null)&&(f.current=E,s(E)),(jn(m.refs.reference.current)||m.refs.reference.current===null||E!==null&&!jn(E))&&m.refs.setReference(E)},[m.refs]),b=x.useMemo(()=>({...m.refs,setReference:v,setPositionReference:y,domReference:f}),[m.refs,v,y]),C=x.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),S=x.useMemo(()=>({...m,...r,refs:b,elements:C,nodeId:t}),[m,b,C,t,r]);return ta(()=>{r.dataRef.current.floatingContext=S;const E=p==null?void 0:p.nodesRef.current.find(A=>A.id===t);E&&(E.context=S)}),x.useMemo(()=>({...m,context:S,refs:b,elements:C}),[m,b,C,S])}function BA(){return odt()&&tme()}function Hdt(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,dataRef:o,elements:s}=e,{enabled:a=!0,visibleOnly:l=!0}=t,c=x.useRef(!1),d=x.useRef(-1),f=x.useRef(!0);x.useEffect(()=>{if(!a)return;const m=to(s.domReference);function y(){!n&&gs(s.domReference)&&s.domReference===LM($a(s.domReference))&&(c.current=!0)}function v(){f.current=!0}function b(){f.current=!1}return m.addEventListener("blur",y),BA()&&(m.addEventListener("keydown",v,!0),m.addEventListener("pointerdown",b,!0)),()=>{m.removeEventListener("blur",y),BA()&&(m.removeEventListener("keydown",v,!0),m.removeEventListener("pointerdown",b,!0))}},[s.domReference,n,a]),x.useEffect(()=>{if(!a)return;function m(y){let{reason:v}=y;(v==="reference-press"||v==="escape-key")&&(c.current=!0)}return i.on("openchange",m),()=>{i.off("openchange",m)}},[i,a]),x.useEffect(()=>()=>{Yo(d)},[]);const p=x.useMemo(()=>({onMouseLeave(){c.current=!1},onFocus(m){if(c.current)return;const y=Op(m.nativeEvent);if(l&&jn(y)){if(BA()&&!m.relatedTarget){if(!f.current&&!cdt(y))return}else if(!udt(y))return}r(!0,m.nativeEvent,"focus")},onBlur(m){c.current=!1;const y=m.relatedTarget,v=m.nativeEvent,b=jn(y)&&y.hasAttribute(hb("focus-guard"))&&y.getAttribute("data-type")==="outside";d.current=window.setTimeout(()=>{var C;const S=LM(s.domReference?s.domReference.ownerDocument:document);!y&&S===s.domReference||V0((C=o.current.floatingContext)==null?void 0:C.refs.floating.current,S)||V0(s.domReference,S)||b||r(!1,v,"focus")})}}),[o,s.domReference,r,l]);return x.useMemo(()=>a?{reference:p}:{},[a,p])}function HA(e,t,n){const r=new Map,i=n==="item";let o=e;if(i&&e){const{[YQ]:s,[XQ]:a,...l}=e;o=l}return{...n==="floating"&&{tabIndex:-1,[wdt]:""},...o,...t.map(s=>{const a=s?s[n]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>
630(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(i&&[YQ,XQ].includes(c)))if(c.indexOf("on")===0){if(r.has(c)||r.set(c,[]),typeof d=="function"){var f;(f=r.get(c))==null||f.push(d),s[c]=function(){for(var p,m=arguments.length,y=new Array(m),v=0;v<m;v++)y[v]=arguments[v];return(p=r.get(c))==null?void 0:p.map(b=>b(...y)).find(b=>b!==void 0)}}}else s[c]=d}),s),{})}}function Vdt(e){e===void 0&&(e=[]);const t=e.map(a=>a==null?void 0:a.reference),n=e.map(a=>a==null?void 0:a.floating),r=e.map(a=>a==null?void 0:a.item),i=x.useCallback(a=>HA(a,e,"reference"),t),o=x.useCallback(a=>HA(a,e,"floating"),n),s=x.useCallback(a=>HA(a,e,"item"),r);return x.useMemo(()=>({getReferenceProps:i,getFloatingProps:o,getItemProps:s}),[i,o,s])}const Udt=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function qdt(e,t){var n,r;t===void 0&&(t={});const{open:i,elements:o,floatingId:s}=e,{enabled:a=!0,role:l="dialog"}=t,c=mI(),d=((n=o.domReference)==null?void 0:n.id)||c,f=x.useMemo(()=>{var S;return((S=ddt(o.floating))==null?void 0:S.id)||s},[o.floating,s]),p=(r=Udt.get(l))!=null?r:l,y=gI()!=null,v=x.useMemo(()=>p==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:i?f:void 0}:{"aria-expanded":i?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":i?f:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:d},...p==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[p,f,y,i,d,l]),b=x.useMemo(()=>{const S={id:f,...p&&{role:p}};return p==="tooltip"||l==="label"?S:{...S,...p==="menu"&&{"aria-labelledby":d}}},[p,f,d,l]),C=x.useCallback(S=>{let{active:E,selected:A}=S;const _={role:"option",...E&&{id:f+"-fui-option"}};switch(l){case"select":case"combobox":return{..._,"aria-selected":A}}return{}},[f,l]);return x.useMemo(()=>a?{reference:v,floating:b,item:C}:{},[a,v,b,C])}function Wdt({initialOpen:e=!1,placement:t="top",open:n,onOpenChange:r,delay:i=600,closeDelay:o=0}={}){const[s,a]=x.useState(e),l=n??s,c=r??a,d=Bdt({placement:t,open:l,onOpenChange:c,whileElementsMounted:cm,middleware:[Dv(4),Lv({crossAxis:t.includes("-"),fallbackAxisSideDirection:"start",padding:4}),Iv({padding:4})]}),f=d.context,p=jdt(f,{mouseOnly:!0,move:!1,restMs:i,enabled:n==null,delay:{close:o}}),m=Hdt(f,{enabled:n==null}),y=zdt(f),v=qdt(f,{role:"tooltip"}),b=Vdt([p,m,y,v]);return x.useMemo(()=>({open:l,setOpen:c,...b,...d}),[l,c,b,d])}const zM=x.createContext(null);function sme(){const e=x.useContext(zM);if(e==null)throw new Error("Tooltip components must be wrapped in <TooltipProvider />");return e}function ame({children:e,...t}){const n=Wdt(t);return t.useDelayGroup?u.jsx(Mdt,{delay:{open:t.delay??0,close:t.closeDelay??0},timeoutMs:t.timeout,children:u.jsx(zM.Provider,{value:n,children:e})}):u.jsx(zM.Provider,{value:n,children:e})}const lme=x.forwardRef(function({children:t,asChild:n=!1,...r},i){const o=sme(),s=x.isValidElement(t)?parseInt(x.version,10)>=19?t.props.ref:t.ref:void 0,a=ime([o.refs.setReference,i,s]);if(n&&x.isValidElement(t)){const l={"data-tooltip-state":o.open?"open":"closed"};return x.cloneElement(t,o.getReferenceProps({ref:a,...r,...typeof t.props=="object"?t.props:{},...l}))}return u.jsx("button",{ref:a,"data-tooltip-state":o.open?"open":"closed",...o.getReferenceProps(r),children:t})}),cme=x.forwardRef(function({style:t,children:n,portal:r=!0,portalProps:i={},...o},s){const a=sme(),l=ime([a.refs.setFloating,s]);if(!a.open)return null;const c=u.jsx("div",{ref:l,style:{...a.floatingStyles,...t},...a.getFloatingProps(o),className:"tiptap-tooltip",children:n});return r?u.jsx(Ddt,{...i,children:c}):c});ame.displayName="Tooltip";lme.displayName="TooltipTrigger";cme.displayName="TooltipContent";const vI=async e=>{try{const t=Date.now(),n=e.name.split(".").pop(),r=`editor-images/${t}-${Math.random().toString(36).substring(2)}.${n}`,{error:i}=await Ds.storage.from("editor-images").upload(r,e,{cacheControl:"3600",upsert:!1});if(i)throw new Error(`Upload failed: ${i.message}`);const{data:{publicUrl:o}}=Ds.storage.from("editor-images").getPublicUrl(r);return{url:o,fileName:r,size:e.size,uploadedAt:new Date}}catch(t){throw console.error("Image upload error:",t),t}},Gdt=e=>e.type.includes("image/")?e.size/1024/1024>20?{isValid:!1,error:"File size too big (max 20MB)."}:{isValid:!0}:{isValid:!1,error:"File type not supported. Please upload an image file."},FM=5*1024*1024,Kdt={mod:"â",command:"â",meta:"â",ctrl:"â",control:"â",alt:"â¥",option:"â¥",shift:"â§",backspace:"Del",delete:"â¦",enter:"â",escape:"â",capslock:"âª"};function si(...e){return e.filter(Boolean).join(" ")}function Ydt(){return typeof navigator<"u"&&navigator.platform.toLowerCase().includes("mac")}const Xdt=(e,t,n=!0)=>
630{if(t){const r=e.toLowerCase();return Kdt[r]||(n?e.toUpperCase():e)}return n?e.charAt(0).toUpperCase()+e.slice(1):e},Mc=e=>{const{shortcutKeys:t,delimiter:n="+",capitalize:r=!0}=e;return t?t.split(n).map(i=>i.trim()).map(i=>Xdt(i,Ydt(),r)):[]},pb=(e,t)=>t!=null&&t.schema?t.schema.spec.marks.get(e)!==void 0:!1,Oc=(e,t)=>t!=null&&t.schema?t.schema.spec.nodes.get(e)!==void 0:!1;function Zdt(e){const{state:t,view:n}=e,{doc:r,selection:i}=t,o=et.findFrom(i.$to,1,!0);if(o)return n.dispatch(t.tr.setSelection(o).scrollIntoView()),!0;const s=t.schema.nodes.paragraph;if(!s)return console.warn("No paragraph node type found in schema."),!1;const a=r.content.size,l=s.create();let c=t.tr.insert(a,l);const d=c.doc.resolve(a+1);return c=c.setSelection(Ue.near(d)).scrollIntoView(),n.dispatch(c),!0}function Em(e){return typeof e=="number"&&e>=0}function pS(e,t){if(!e)return!1;const n=Array.isArray(t)?t:[t],r=n.some(i=>e.extensionManager.extensions.some(o=>o.name===i));return r||console.warn(`None of the extensions [${n.join(", ")}] were found in the editor schema. Ensure they are included in the editor configuration.`),r}function Qdt(e,t){try{const n=e.state.doc.nodeAt(t);return n||(console.warn(`No node found at position ${t}`),null)}catch(n){return console.error(`Error getting node at position ${t}:`,n),null}}function mS(e){var s;const{editor:t,node:n,nodePos:r}=e;if(!t||!((s=t.state)!=null&&s.doc))return null;const i=n!=null,o=Em(r);if(!i&&!o)return null;if(i){let a=-1,l=null;if(t.state.doc.descendants((c,d)=>c===n?(a=d,l=c,!1):!0),a!==-1&&l!==null)return{pos:a,node:l}}if(o){const a=Qdt(t,r);
630if(a)return{pos:r,node:a}}return null}function Td(e,t=[],n=!1){if(!e||!e.state.selection)return!1;const{selection:r}=e.state;if(r.empty)return!1;if(r instanceof $e){const i=r.node;return i?t.includes(i.type.name):!1}if(n){const{$from:i}=r;for(let o=i.depth;o>0;o--){const s=i.node(o);if(t.includes(s.type.name))return!0}}return!1}function Md(e,t=[]){var o,s;if(!e||t.length===0)return!1;const{state:n}=e,{selection:r}=n,i=new Set(t);if(r instanceof $e){const a=(s=(o=r.node)==null?void 0:o.type)==null?void 0:s.name;return!!a&&i.has(a)}if(r instanceof Ue||r instanceof no){let a=!0;return n.doc.nodesBetween(r.from,r.to,l=>l.isTextblock&&!i.has(l.type.name)?(a=!1,!1):a),a}return!1}const Jdt=async(e,t,n)=>{if(!e)throw new Error("No file provided");if(e.size>FM)throw new Error(`File size exceeds maximum allowed (${FM/(1024*1024)}MB)`);const r=Gdt(e);if(!r.isValid)throw new Error(r.error??"Invalid image file");if(n!=null&&n.aborted)throw new Error("Upload cancelled");t==null||t({progress:0});const i=await vI(e);if(n!=null&&n.aborted)throw new Error("Upload cancelled");return t==null||t({progress:100}),i.url},eft=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function tft(e,t){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return!e||e.replace(eft,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}function nft(e,t,n){try{const r=new URL(e,t);if(tft(r.href,n))return r.href}catch{}return"#"}function gS(e){const{doc:t}=e.state,{from:n,to:r}=e.state.selection,i=[],o=new Set;return t.nodesBetween(n,r,(s,a)=>{if(s.isBlock)return o.has(a)||(o.add(a),i.push(s)),!1}),i}const rft=({shortcuts:e})=>e.length===0?null:u.jsx("div",{children:e.map((t,n)=>u.jsxs(x.Fragment,{children:[n>0&&u.jsx("kbd",{children:"+"}),u.jsx("kbd",{children:t})]},n))}),yr=x.forwardRef(({className:e,children:t,tooltip:n,showTooltip:r=!0,shortcutKeys:i,variant:o,size:s,...a},l)=>{const c=x.useMemo(()=>Mc({shortcutKeys:i}),[i]);return!n||!r?u.jsx("button",{"data-slot":"tiptap-button",className:si("tiptap-button",e),ref:l,"data-style":o,"data-size":s,...a,children:t}):u.jsxs(ame,{delay:200,children:[u.jsx(lme,{"data-slot":"tiptap-button",className:si("tiptap-button",e),ref:l,"data-style":o,"data-size":s,...a,children:t}),u.jsxs(cme,{children:[n,u.jsx(rft,{shortcuts:c})]})]})});yr.displayName="Button";const ume=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{d:"M18.7071 6.70711C19.0976 6.31658 19.0976 5.68342 18.7071 5.29289C18.3166 4.90237 17.6834 4.90237 17.2929 5.29289L12 10.5858L6.70711 5.29289C6.31658 4.90237 5.68342 4.90237 5.29289 5.29289C4.90237 5.68342 4.90237 6.31658 5.29289 6.70711L10.5858 12L5.29289 17.2929C4.90237 17.6834 4.90237 18.3166 5.29289 18.7071C5.68342 19.0976 6.31658 19.0976 6.70711 18.7071L12 13.4142L17.2929 18.7071C17.6834 19.0976 18.3166 19.0976 18.7071 18.7071C19.0976 18.3166 19.0976 17.6834 18.7071 17.2929L13.4142 12L18.7071 6.70711Z",fill:"currentColor"})}));ume.displayName="CloseIcon";function ift(e){const[t,n]=x.useState([]),r=async a=>{var f,p,m;if(a.size>e.maxSize){const y=new Error(`File size exceeds maximum allowed (${e.maxSize/1024/1024}MB)`);return(f=e.onError)==null||f.call(e,y),null}const l=new AbortController,c=crypto.randomUUID(),d={id:c,file:a,progress:0,status:"uploading",abortController:l};n(y=>[...y,d]);try{if(!e.upload)throw new Error("Upload function is not defined");const y=await e.upload(a,v=>{n(b=>b.map(C=>C.id===c?{...C,progress:v.progress}:C))},l.signal);if(!y)throw new Error("Upload failed: No URL returned");return l.signal.aborted?null:(n(v=>v.map(b=>b.id===c?{...b,status:"success",url:y,progress:100}:b)),(p=e.onSuccess)==null||p.call(e,y),y)}catch(y){return l.signal.aborted||(n(v=>v.map(b=>b.id===c?{...b,status:"error",progress:0}:b)),(m=e.onError)==null||m.call(e,y instanceof Error?y:new Error("Upload failed"))),null}};return{fileItems:t,uploadFiles:async a=>{var d,f;if(!a||a.length===0)return(d=e.onError)==null||d.call(e,new Error("No files to upload")),[];if(e.limit&&a.length>e.limit)return(f=e.onError)==null||f.call(e,new Error(`Maximum ${e.limit} file${e.limit===1?"":"s"} allowed`)),[];const l=a.map(p=>r(p));return(await Promise.all(l)).filter(p=>p!==null)},removeFileItem:a=>{n(l=>{const c=l.find(d=>d.id===a);return c!=null&&c.abortController&&c.abortController.abort(),c!=null&&c.url&&URL.revokeObjectURL(c.url),l.filter(d=>d.id!==a)})},clearAllFiles:()=>{t.forEach(a=>{a.abortController&&a.abortController.abort(),a.url&&URL.revokeObjectURL(a.url)}),n([])}}}const dme=()=>u.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",className:"tiptap-image-upload-icon",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[u.jsx("path",{d:"M11.1953 4.41771C10.3478 4.08499 9.435
63078 3.94949 8.5282 4.02147C7.62062 4.09345 6.74133 4.37102 5.95691 4.83316C5.1725 5.2953 4.50354 5.92989 4.00071 6.68886C3.49788 7.44783 3.17436 8.31128 3.05465 9.2138C2.93495 10.1163 3.0222 11.0343 3.3098 11.8981C3.5974 12.7619 4.07781 13.5489 4.71463 14.1995C5.10094 14.5942 5.09414 15.2274 4.69945 15.6137C4.30476 16 3.67163 15.9932 3.28532 15.5985C2.43622 14.731 1.79568 13.6816 1.41221 12.5299C1.02875 11.3781 0.91241 10.1542 1.07201 8.95084C1.23162 7.74748 1.66298 6.59621 2.33343 5.58425C3.00387 4.57229 3.89581 3.72617 4.9417 3.10998C5.98758 2.4938 7.15998 2.1237 8.37008 2.02773C9.58018 1.93176 10.7963 2.11243 11.9262 2.55605C13.0561 2.99968 14.0703 3.69462 14.8919 4.58825C15.5423 5.29573 16.0585 6.11304 16.4177 7.00002H17.4999C18.6799 6.99991 19.8288 7.37933 20.7766 8.08222C21.7245 8.78515 22.4212 9.7743 22.7637 10.9036C23.1062 12.0328 23.0765 13.2423 22.6788 14.3534C22.2812 15.4644 21.5367 16.4181 20.5554 17.0736C20.0962 17.3803 19.4752 17.2567 19.1684 16.7975C18.8617 16.3382 18.9853 15.7172 19.4445 15.4105C20.069 14.9934 20.5427 14.3865 20.7958 13.6794C21.0488 12.9724 21.0678 12.2027 20.8498 11.4841C20.6318 10.7655 20.1885 10.136 19.5853 9.6887C18.9821 9.24138 18.251 8.99993 17.5001 9.00002H15.71C15.2679 9.00002 14.8783 8.70973 14.7518 8.28611C14.4913 7.41374 14.0357 6.61208 13.4195 5.94186C12.8034 5.27164 12.0427 4.75043 11.1953 4.41771Z",fill:"currentColor"}),u.jsx("path",{d:"M11 14.4142V21C11 21.5523 11.4477 22 12 22C12.5523 22 13 21.5523 13 21V14.4142L15.2929 16.7071C15.6834 17.0976 16.3166 17.0976 16.7071 16.7071C17.0976 16.3166 17.0976 15.6834 16.7071 15.2929L12.7078 11.2936C12.7054 11.2912 12.703 11.2888 12.7005 11.2864C12.5208 11.1099 12.2746 11.0008 12.003 11L12 11L11.997 11C11.8625 11.0004 11.7343 11.0273 11.6172 11.0759C11.502 11.1236 11.3938 11.1937 11.2995 11.2864C11.297 11.2888 11.2946 11.2912 11.2922 11.2936L7.29289 15.2929C6.90237 15.6834 6.90237 16.3166 7.29289 16.7071C7.68342 17.0976 8.31658 17.0976 8.70711 16.7071L11 14.4142Z",fill:"currentColor"})]}),oft=()=>u.jsx("svg",{width:"43",height:"57",viewBox:"0 0 43 57",fill:"currentColor",className:"tiptap-image-upload-dropzone-rect-primary",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M0.75 10.75C0.75 5.64137 4.89137 1.5 10 1.5H32.3431C33.2051 1.5 34.0317 1.84241 34.6412 2.4519L40.2981 8.10876C40.9076 8.71825 41.25 9.5449 41.25 10.4069V46.75C41.25 51.8586 37.1086 56 32 56H10C4.89137 56 0.75 51.8586 0.75 46.75V10.75Z",fill:"currentColor",fillOpacity:"0.11",stroke:"currentColor",strokeWidth:"1.5"})}),sft=()=>u.jsx("svg",{width:"10",height:"10",className:"tiptap-image-upload-dropzone-rect-secondary",viewBox:"0 0 10 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M0 0.75H0.343146C1.40401 0.75 2.42143 1.17143 3.17157 1.92157L8.82843 7.57843C9.57857 8.32857 10 9.34599 10 10.4069V10.75H4C1.79086 10.75 0 8.95914 0 6.75V0.75Z",fill:"currentColor"})}),aft=({onFile:e,children:t})=>{const[n,r]=x.useState(!1),[i,o]=x.useState(!1),s=d=>{d.preventDefault(),d.stopPropagation(),o(!0)},a=d=>{d.preventDefault(),d.stopPropagation(),d.currentTarget.contains(d.relatedTarget)||(o(!1),r(!1))},l=d=>{d.preventDefault(),d.stopPropagation(),r(!0)},c=d=>{d.preventDefault(),d.stopPropagation(),o(!1),r(!1);const f=Array.from(d.dataTransfer.files);f.length>0&&e(f)};return u.jsx("div",{className:`tiptap-image-upload-drag-area ${i?"drag-active":""} ${n?"drag-over":""}`,onDragEnter:s,onDragLeave:a,onDragOver:l,onDrop:c,children:t})},lft=({fileItem:e,onRemove:t})=>{const n=r=>{if(r===0)return"0 Bytes";const i=1024,o=["Bytes","KB","MB","GB"],s=Math.floor(Math.log(r)/Math.log(i));return`${parseFloat((r/Math.pow(i,s)).toFixed(2))} ${o[s]}`};return u.jsxs("div",{className:"tiptap-image-upload-preview",children:[e.status==="uploading"&&u.jsx("div",{className:"tiptap-image-upload-progress",style:{width:`${e.progress}%`}}),u.jsxs("div",{className:"tiptap-image-upload-preview-content",children:[u.jsxs("div",{className:"tiptap-image-upload-file-info",children:[u.jsx("div",{className:"tiptap-image-upload-file-icon",children:u.jsx(dme,{})}),u.jsxs("div",{className:"tiptap-image-upload-details",children:[u.jsx("span",{className:"tiptap-image-upload-text",children:e.file.name}),u.jsx("span",{className:"tiptap-image-upload-subtext",children:n(e.file.size)})]})]}),u.jsxs("div",{className:"tiptap-image-upload-actions",children:[e.status==="uploading"&&u.jsx(nv,{size:16,className:"tiptap-image-upload-spinner","aria-label":"Uploadingâ¦"}),u.jsx(yr,{type:"button",variant:"ghost",onClick:r=>{r.stopPropagation(),t()},children:u.jsx(ume,{className:"tiptap-button-icon"})})]})]})]})},cft=({maxSize:e,limit:t})=>u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"tiptap-image-upload-dropzone",children:[u.jsx(oft,{}),u.jsx(sft,{}),u.jsx("div",{className:"tiptap-image-upload-icon-container",children:u.jsx(dme,{})})]}),u.jsxs("div",{className:"tiptap-image-upload-content",children:[u.jsxs("span",{className:"tiptap-image-upload-text",children:[u.jsx("em",{children:"Click to upload"})," or drag and drop"]}),u.jsxs("span",{className:"tiptap-image-upload-subtext",children:["Maximum ",t," file",t===1?"":"s",", ",e/1024/1024,"MB each."]})]})]}),uft=e=>{const{accept:t,limit:n,maxSize:r}=e.node.attrs,i=x.useRef(null),o=e.extension,s={maxSize:r,limit:n,accept:t,upload:o.options.upload,onSuccess:o.options.onSuccess,onError:o.options.onError},{fileItems:a,uploadFiles:l,removeFileItem:c,clearAllFiles:d}=ift(s),f=async v=>{const b=await l(v);if(b.length>0){const C=e.getPos();if(Em(C)){const S=b.map((E,A)=>{var N;const _=((N=v[A])==null?void 0:N.name.replace(/\.[^/.]+$/,""))||"unknown";return{type:o.options.type,attrs:{...o.options,src:E,alt:_,title:_}}});e.editor.chain().focus().deleteRange({from:C,to:C+e.node.nodeSize}
630).insertContentAt(C,S).run(),Zdt(e.editor)}}},p=v=>{var C,S;const b=v.target.files;if(!b||b.length===0){(S=(C=o.options).onError)==null||S.call(C,new Error("No file selected"));return}f(Array.from(b))},m=()=>{i.current&&a.length===0&&(i.current.value="",i.current.click())},y=a.length>0;return u.jsxs(oS,{className:"tiptap-image-upload",tabIndex:0,onClick:m,children:[!y&&u.jsx(aft,{onFile:f,children:u.jsx(cft,{maxSize:r,limit:n})}),y&&u.jsxs("div",{className:"tiptap-image-upload-previews",children:[a.length>1&&u.jsxs("div",{className:"tiptap-image-upload-header",children:[u.jsxs("span",{children:["Uploading ",a.length," files"]}),u.jsx(yr,{type:"button",variant:"ghost",onClick:v=>{v.stopPropagation(),d()},children:"Clear All"})]}),a.map(v=>u.jsx(lft,{fileItem:v,onRemove:()=>c(v.id)},v.id))]}),u.jsx("input",{ref:i,name:"file",accept:t,type:"file",multiple:n>1,onChange:p,onClick:v=>v.stopPropagation()})]})},dft=Ot.create({name:"imageUpload",group:"block",draggable:!0,selectable:!0,atom:!0,addOptions(){return{type:"image",accept:"image/*",limit:1,maxSize:0,upload:void 0,onError:void 0,onSuccess:void 0,HTMLAttributes:{}}},addAttributes(){return{accept:{default:this.options.accept},limit:{default:this.options.limit},maxSize:{default:this.options.maxSize}}},parseHTML(){return[{tag:'div[data-type="image-upload"]'}]},renderHTML({HTMLAttributes:e}){return["div",Bt({"data-type":"image-upload"},e)]},addNodeView(){return sS(uft)},addCommands(){return{setImageUploadNode:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addKeyboardShortcuts(){return{Enter:({editor:e})=>{const{selection:t}=e.state,{nodeAfter:n}=t.$from;if(n&&n.type.name==="imageUpload"&&e.isActive("imageUpload")){const r=e.view.nodeDOM(t.$from.pos);if(r&&r instanceof HTMLElement){const i=r.firstChild;if(i&&i instanceof HTMLElement)return i.click(),!0}}return!1}}}}),fft=Jtt.extend({renderHTML(){return["div",Bt(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]}}),hft=({selected:e,editor:t,getPos:n,node:r})=>{const i=x.useRef(null),[o,s]=x.useState(""),[a,l]=x.useState(null);x.useEffect(()=>{const p=window.setTimeout(()=>{var m;return(m=i.current)==null?void 0:m.focus()},0);return()=>window.clearTimeout(p)},[]);const c=x.useCallback(()=>{const p=o.trim();if(!p){l("Paste a YouTube URL");return}if(!fme(p)){l("That doesn't look like a YouTube link â try youtube.com/watch?v=⦠or youtu.be/â¦");return}if(typeof t.commands.setYoutubeVideo!="function"){l("YouTube extension is not installed â please check the editor configuration.");return}const v=typeof n=="function"?n():null,b=typeof v=="number"?v:null,C=typeof v=="number"?v+r.nodeSize:null;b!==null&&C!==null?t.chain().focus().deleteRange({from:b,to:C}).setYoutubeVideo({src:p}).run():t.chain().focus().setYoutubeVideo({src:p}).run()},[t,n,r.nodeSize,o]),d=x.useCallback(()=>{const p=typeof n=="function"?n():null;typeof p=="number"&&t.chain().focus().deleteRange({from:p,to:p+r.nodeSize}).run()},[t,n,r.nodeSize]),f=p=>{p.key==="Enter"&&(p.preventDefault(),p.stopPropagation(),c()),p.key==="Escape"&&(p.preventDefault(),p.stopPropagation(),d())};return u.jsx(oS,{className:"tiptap-youtube-embed-placeholder","data-type":"youtube-embed-placeholder","data-selected":e?"true":"false",children:u.jsxs("div",{className:"tiptap-youtube-embed-placeholder-inner",children:[u.jsx("div",{className:"tiptap-youtube-embed-placeholder-icon","aria-hidden":!0,children:u.jsx(R0e,{size:20})}),u.jsxs("div",{className:"tiptap-youtube-embed-placeholder-body",children:[u.jsx("div",{className:"tiptap-youtube-embed-placeholder-label",children:"Embed YouTube video"}),u.jsxs("div",{className:"tiptap-youtube-embed-placeholder-row",children:[u.jsx("input",{ref:i,type:"url",value:o,onChange:p=>{s(p.target.value),a&&l(null)},onKeyDown:f,onPaste:p=>{p.stopPropagation()},placeholder:"Paste a YouTube link and press Enter",autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:!1,className:"tiptap-youtube-embed-placeholder-input"}),u.jsx("button",{type:"button",onClick:c,disabled:!o.trim(),className:"tiptap-youtube-embed-placeholder-submit",children:"Embed"}),u.jsx("button",{type:"button",onClick:d,className:"tiptap-youtube-embed-
630placeholder-cancel","aria-label":"Cancel embed",children:"Cancel"})]}),a&&u.jsx("div",{className:"tiptap-youtube-embed-placeholder-error",role:"alert",children:a})]})]})})};function fme(e){if(!e)return null;try{const t=e.trim(),n=t.startsWith("//")?`https:${t}`:t,r=new URL(n),i=r.hostname.replace(/^www\./,"").replace(/^m\./,"");if(i==="youtu.be")return r.pathname.replace(/^\//,"").split("/")[0]||null;if(i==="youtube.com"||i==="youtube-nocookie.com"){if(r.pathname==="/watch")return r.searchParams.get("v");const o=r.pathname.match(/^\/(?:embed|v|shorts)\/([\w-]+)/);if(o)return o[1]}return null}catch{return null}}const pft=Ot.create({name:"youtubeEmbedPlaceholder",group:"block",atom:!0,selectable:!0,draggable:!1,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:'div[data-type="youtube-embed-placeholder"]'}]},renderHTML({HTMLAttributes:e}){return["div",Bt({"data-type":"youtube-embed-placeholder"},this.options.HTMLAttributes,e)]},addNodeView(){return sS(hft)},addCommands(){return{setYoutubeEmbedPlaceholder:()=>({commands:e})=>e.insertContent({type:this.name})}}});var mft=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/,gft=/^((?:https?:)?\/\/)?((?:www|m|music)\.)?((?:youtube\.com|youtu\.be|youtube-nocookie\.com))(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/g,hme=e=>e.match(mft),iJ=(e,t)=>t?"https://www.youtube-nocookie.com/embed/videoseries?list=":e?"https://www.youtube-nocookie.com/embed/":"https://www.youtube.com/embed/",yft=e=>{const{url:t,allowFullscreen:n,autoplay:r,ccLanguage:i,ccLoadPolicy:o,controls:s,disableKBcontrols:a,enableIFrameApi:l,endTime:c,interfaceLanguage:d,ivLoadPolicy:f,loop:p,modestBranding:m,nocookie:y,origin:v,playlist:b,progressBarColor:C,startAt:S,rel:E}=e;if(!hme(t))return null;if(t.includes("/embed/"))return t;if(t.includes("youtu.be")){const T=t.split("/").pop();return T?`${iJ(y)}${T}`:null}const _=/(?:(v|list)=|shorts\/)([-\w]+)/gm.exec(t);if(!_||!_[2])return null;let N=`${iJ(y,_[1]==="list")}${_[2]}`;const j=[];return n===!1&&j.push("fs=0"),r&&j.push("autoplay=1"),i&&j.push(`cc_lang_pref=${i}`),o&&j.push("cc_load_policy=1"),s||j.push("controls=0"),a&&j.push("disablekb=1"),l&&j.push("enablejsapi=1"),c&&j.push(`end=${c}`),d&&j.push(`hl=${d}`),f&&j.push(`iv_load_policy=${f}`),p&&j.push("loop=1"),m&&j.push("modestbranding=1"),v&&j.push(`origin=${v}`),b&&j.push(`playlist=${b}`),S&&j.push(`start=${S}`),C&&j.push(`color=${C}`),E!==void 0&&j.push(`rel=${E}`),j.length&&(N+=`${_[1]==="list"?"&":"?"}${j.join("&")}`),N},vft=Ot.create({name:"youtube",addOptions(){return{addPasteHandler:!0,allowFullscreen:!0,autoplay:!1,ccLanguage:void 0,ccLoadPolicy:void 0,controls:!0,disableKBcontrols:!1,enableIFrameApi:!1,endTime:0,height:480,interfaceLanguage:void 0,ivLoadPolicy:0,loop:!1,modestBranding:!1,HTMLAttributes:{},inline:!1,nocookie:!1,origin:"",playlist:"",progressBarColor:void 0,width:640,rel:1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},start:{default:0},width:{default:this.options.width},height:{default:this.options.height}}},parseHTML(){return[{tag:"div[data-youtube-video] iframe"}]},addCommands(){return{setYoutubeVideo:e=>({commands:t})=>hme(e.src)?t.insertContent({type:this.name,attrs:e}):!1}},addPasteRules(){return this.options.addPasteHandler?[mtt({find:gft,type:this.type,getAttributes:e=>({src:e.input})})]:[]},renderHTML({HTMLAttributes:e}){const t=yft({url:e.src,allowFullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,controls:this.options.controls,disableKBcontrols:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,nocookie:this.options.nocookie,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,startAt:e.start||0,rel:this.options.rel});return e.src=t,["div",{"data-youtube-video":""},["iframe",Bt(this.options.HTMLAttributes,{width:this.options.width,height:this.options.height,allowfullscreen:this.options.allowFullscreen,autoplay:this.options.autoplay,ccLanguage:this.options.ccLanguage,ccLoadPolicy:this.options.ccLoadPolicy,disableKBcontrol
630s:this.options.disableKBcontrols,enableIFrameApi:this.options.enableIFrameApi,endTime:this.options.endTime,interfaceLanguage:this.options.interfaceLanguage,ivLoadPolicy:this.options.ivLoadPolicy,loop:this.options.loop,modestBranding:this.options.modestBranding,origin:this.options.origin,playlist:this.options.playlist,progressBarColor:this.options.progressBarColor,rel:this.options.rel},e)]]},...mpe({nodeName:"youtube",allowedAttributes:["src","width","height","start"]})}),bft=vft;function xft({node:e,updateAttributes:t,selected:n,deleteNode:r,editor:i,getPos:o}){const{src:s,caption:a=""}=e.attrs,l=fme(s??""),c=l?`https://www.youtube.com/embed/${l}?feature=oembed`:s,[d,f]=x.useState(!1),[p,m]=x.useState(a??""),y=x.useRef(a??"");x.useEffect(()=>{const N=a??"";N!==y.current&&(y.current=N,m(N))},[a]);const v=N=>{y.current=N.target.value,m(N.target.value)},b=()=>{t({caption:y.current})},C=n&&!d,S=x.useCallback(()=>{const N=typeof o=="function"?o():null;typeof N=="number"&&i.commands.setNodeSelection(N)},[i,o]),E=x.useRef(null),A=N=>{E.current={x:N.clientX,y:N.clientY}},_=N=>{const j=E.current;if(E.current=null,!j)return;const T=Math.abs(N.clientX-j.x),O=Math.abs(N.clientY-j.y);T<=4&&O<=4&&S()};return u.jsx(oS,{children:u.jsx("div",{className:"youtube-node-outer","data-drag-handle":!0,children:u.jsxs("div",{className:["youtube-node-inner",n&&!d?"selected":""].filter(Boolean).join(" "),children:[C&&u.jsxs("div",{className:"youtube-node-toolbar",contentEditable:!1,children:[l&&u.jsx("a",{className:"youtube-node-toolbar-btn",href:`https://www.youtube.com/watch?v=${l}`,target:"_blank",rel:"noopener noreferrer",title:"Open on YouTube",onMouseDown:N=>N.preventDefault(),children:u.jsx(Qat,{size:14})}),u.jsx("button",{type:"button",className:"youtube-node-toolbar-btn drag-handle","data-drag-handle":!0,draggable:!0,title:"Drag to move","aria-label":"Drag to move video",onClick:N=>N.preventDefault(),children:u.jsx(Elt,{size:14})}),u.jsx("button",{type:"button",className:"youtube-node-toolbar-btn danger",onMouseDown:N=>{N.preventDefault(),r()},title:"Delete video",children:u.jsx(O0e,{size:14})})]}),u.jsxs("div",{className:"youtube-node-frame",contentEditable:!1,children:[c?u.jsx("iframe",{src:c,title:a||"YouTube video",frameBorder:0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0}):u.jsx("div",{className:"youtube-node-frame-missing",children:"Unable to load video"}),!n&&u.jsx("div",{className:"youtube-node-click-shield",onMouseDown:A,onMouseUp:_,"aria-hidden":!0})]}),u.jsx("div",{className:"youtube-node-caption-wrapper",contentEditable:!1,children:u.jsx("input",{className:["youtube-node-caption",p?"":"empty"].filter(Boolean).join(" "),type:"text",value:p,placeholder:"Add a captionâ¦",onChange:v,onFocus:()=>f(!0),onBlur:()=>{f(!1),b()},onKeyDown:N=>{N.stopPropagation(),(N.key==="Enter"||N.key==="Escape")&&N.currentTarget.blur()},onClick:N=>N.stopPropagation()})})]})})})}const wft=bft.extend({draggable:!0,addAttributes(){var e;return{...(e=this.parent)==null?void 0:e.call(this),caption:{default:"",parseHTML:t=>t.getAttribute("data-caption")??"",renderHTML:t=>t.caption?{"data-caption":t.caption}:{}}}},addNodeView(){return sS(xft)}});function Cft(e,t){const n=Math.min(e.top,t.top),r=Math.max(e.bottom,t.bottom),i=Math.min(e.left,t.left),s=Math.max(e.right,t.right)-i,a=r-n,l=i,c=n;return new DOMRect(l,c,s,a)}var Sft=class{constructor({editor:e,element:t,view:n,pluginKey:r="bubbleMenu",updateDelay:i=250,resizeDelay:o=60,shouldShow:s,appendTo:a,getReferencedVirtualElement:l,options:c}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:f,state:p,from:m,to:y})=>{const{doc:v,selection:b}=p,{empty:C}=b,S=!v.textBetween(m,y).length&&eS(p.selection),E=this.element.contains(document.activeElement);return!(!(f.hasFocus()||E)||C||S||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:f})=>{var p;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}f!=null&&f.relatedTarget&&((p=this.element.parentNode)!=null&&p.contains(f.relatedTarget))||(f==null?void 0:f.relatedTarget)!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(f,p)=>{const m=!(p!=null&&p.selection.eq(f.state.selection)),y=!(p!=null&&p.doc.eq(f.state.doc));!m&&!y||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(f,m,y,p)},this.updateDelay))},this.updateHandler=(f,p,m,y)=>{const{composing:v}=f;
630if(v||!p&&!m)return;if(!this.getShouldShow(y)){this.hide();return}this.updatePosition(),this.show()},this.transactionHandler=({transaction:f})=>{const p=f.getMeta(this.pluginKey);p==="updatePosition"?this.updatePosition():p&&typeof p=="object"&&p.type==="updateOptions"&&this.updateOptions(p.options)};var d;this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=o,this.appendTo=a,this.scrollTarget=(d=c==null?void 0:c.scrollTarget)!=null?d:window,this.getReferencedVirtualElement=l,this.floatingUIOptions={...this.floatingUIOptions,...c},this.element.tabIndex=0,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.getShouldShow()&&(this.show(),this.updatePosition())}get middlewares(){const e=[];return this.floatingUIOptions.flip&&e.push(vR(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(yR(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(gR(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Gw(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(bR(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(Yre(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(xR(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Xre(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}get virtualElement(){var e,t,n;const{selection:r}=this.editor.state,i=(e=this.getReferencedVirtualElement)==null?void 0:e.call(this);if(i)return i;if(!((n=(t=this.view)==null?void 0:t.dom)!=null&&n.parentNode))return;const o=Zhe(this.view,r.from,r.to);let s={getBoundingClientRect:()=>o,getClientRects:()=>[o]};if(r instanceof $e){let a=this.view.nodeDOM(r.from);const l=a.dataset.nodeViewWrapper?a:a.querySelector("[data-node-view-wrapper]");l&&(a=l),a&&(s={getBoundingClientRect:()=>a.getBoundingClientRect(),getClientRects:()=>[a.getBoundingClientRect()]})}if(r instanceof vn){const{$anchorCell:a,$headCell:l}=r,c=a?a.pos:l.pos,d=l?l.pos:a.pos,f=this.view.nodeDOM(c),p=this.view.nodeDOM(d);if(!f||!p)return;const m=f===p?f.getBoundingClientRect():Cft(f.getBoundingClientRect(),p.getBoundingClientRect());s={getBoundingClientRect:()=>m,getClientRects:()=>[m]}}return s}updatePosition(){const e=this.virtualElement;e&&wR(e,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:t,y:n,strategy:r,middlewareData:i})=>{var o,s;if((o=i.hide)!=null&&o.referenceHidden||(s=i.hide)!=null&&s.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${t}px`,this.element.style.top=`${n}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){const{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r){this.handleDebouncedUpdate(e,t);return}const i=!(t!=null&&t.selection.eq(e.state.selection)),o=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,i,o,t)}getShouldShow(e){var t;const{state:n}=this.view,{selection:r}=n,{ranges:i}=r,o=Math.min(...i.map(l=>l.$from.pos)),s=Math.max(...i.map(l=>l.$to.pos));return((t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,element:this.element,view:this.view,state:n,oldState:e,from:o,to:s}))||!1}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(e){var t;if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=e.getReferencedVirtualElement),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){const n=(t=e.options.scrollTarget)!=null?t:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},pme=e=>new an({key:typeof e.pluginKey=="string"?new pn(e.pluginKey):e.pluginKey,view:t=>new Sft({view:t,...e})});jt.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[pme({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var Eft=class{constructor({editor:e,element:t,view:n,pluginKey:r="floatingMenu",updateDelay:i=250,resizeDelay:o=60,options:s,appendTo:a,shouldShow:l}){this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:d,state:f})=>{const{selection:p}=f,{$anchor:m,empty:y}=p,v=m.depth===1,b=m.parent.isTextblock&&!m.parent.type.spec.code&&!m.parent.textContent&&m.parent.childCount===0&&!this.getTextContent(m.parent);return!(!d.hasFocus()||!y||!v||!b||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(d,f,p,m)=>{const{composing:y}=d;if(y||!f&&!p)return;if(!this.getShouldShow(m)){this.hide();return}this.updatePosition(),this.show()},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:d})=>{var f;if(this.preventHide){this.preventHide=!1;return}d!=null&&d.relatedTarget&&((f=this.element.parentNode)!=null&&f.contains(d.relatedTarget))||(d==null?void 0:d.relatedTarget)!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:d})=>{const f=d.getMeta(this.pluginKey);f==="updatePosition"?this.updatePosition():f&&typeof f=="object"&&f.type==="updateOptions"&&this.updateOptions(f.options)},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)};var c;this.editor=e,this.element=t,this.view=n,this.pluginKey=r,this.updateDelay=i,this.resizeDelay=o,this.appendTo=a,this.scrollTarget=(c=s==null?void 0:s.scrollTarget)!=null?c:window,this.floatingUIOptions={...this.floatingUIOptions,...s},this.element.tabIndex=0,l&&(this.shouldShow=l),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(n,n.state),this.get
630ShouldShow()&&(this.show(),this.updatePosition())}getTextContent(e){return Whe(e,{textSerializers:$D(this.editor.schema)})}get middlewares(){const e=[];return this.floatingUIOptions.flip&&e.push(vR(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&e.push(yR(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&e.push(gR(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&e.push(Gw(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&e.push(bR(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&e.push(Yre(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&e.push(xR(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&e.push(Xre(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),e}getShouldShow(e){var t;const{state:n}=this.view,{selection:r}=n,{ranges:i}=r,o=Math.min(...i.map(l=>l.$from.pos)),s=Math.max(...i.map(l=>l.$to.pos));return(t=this.shouldShow)==null?void 0:t.call(this,{editor:this.editor,view:this.view,state:n,oldState:e,from:o,to:s})}updateOptions(e){var t;if(e.updateDelay!==void 0&&(this.updateDelay=e.updateDelay),e.resizeDelay!==void 0&&(this.resizeDelay=e.resizeDelay),e.appendTo!==void 0&&(this.appendTo=e.appendTo),e.shouldShow!==void 0&&e.shouldShow&&(this.shouldShow=e.shouldShow),e.options!==void 0){const n=(t=e.options.scrollTarget)!=null?t:window;n!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=n,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...e.options}}}updatePosition(){const{selection:e}=this.editor.state,t=Zhe(this.view,e.from,e.to);wR({getBoundingClientRect:()=>t,getClientRects:()=>[t]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:r,y:i,strategy:o,middlewareData:s})=>{var a,l;if((a=s.hide)!=null&&a.referenceHidden||(l=s.hide)!=null&&l.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=o,this.element.style.left=`${r}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(e,t){const n=!(t!=null&&t.selection.eq(e.state.selection)),r=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,n,r,t)}show(){var e;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const t=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(e=t??this.view.dom.parentElement)==null||e.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}},mme=e=>new an({key:typeof e.pluginKey=="string"?new pn(e.pluginKey):e.pluginKey,view:t=>new Eft({view:t,...e})});jt.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:e,dispatch:t})=>(t&&e.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[mme({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function gme(e,t){return e??new pn(t)}var kft=typeof window<"u"?x.useLayoutEffect:x.useEffect,yme=new Set(["left","opacity","position","top","visibility","width"]),_ft=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","o
630pacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),Aft=new Set(["children","className","style"]),Nft=new Set(["tabIndex"]),jft=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),Tft={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function BM(e,t){return/^on[A-Z]/.test(e)&&typeof t=="function"}function Mft(e){return e.startsWith("aria-")||e.startsWith("data-"),e}function Oft(e){return e.startsWith("aria-")||e.startsWith("data-")||jft.has(e)}function vme(e){return e.startsWith("--")?e:e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function Rft(e){var t;const n=e.endsWith("Capture"),i=(n?e.slice(0,-7):e).slice(2);return{eventName:(t=Tft[i])!=null?t:i.toLowerCase(),options:n?{capture:!0}:void 0}}function Pft(e,t){let n=t.defaultPrevented,r=!1;const i=Object.create(t);return Object.defineProperties(i,{nativeEvent:{value:t},currentTarget:{value:e},target:{value:t.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>n},isPropagationStopped:{value:()=>r},preventDefault:{value:()=>{n=!0,t.preventDefault()}},stopPropagation:{value:()=>{r=!0,t.stopPropagation()}}}),i}function VA(e){return Nft.has(e)}function oJ(e,t,n){if(t==="tabIndex"){e.tabIndex=Number(n);return}e[t]=n}function Dft(e,t){if(t==="tabIndex"){e.removeAttribute("tabindex");return}const n=e[t];if(typeof n=="boolean"){e[t]=!1;return}if(typeof n=="number"){e[t]=0;return}e[t]=""}function Ift(e,t){return typeof t!="number"||t===0||e.startsWith("--")||_ft.has(e)?String(t):`${t}px`}function Lft(e,t){yme.has(t)||e.style.removeProperty(vme(t))}function $ft(e,t,n){yme.has(t)||e.style.setProperty(vme(t),Ift(t,n))}function zft(e,t,n){new Set([...Object.keys(t),...Object.keys(n)]).forEach(i=>{if(Aft.has(i)||!Oft(i)||BM(i,t[i])||BM(i,n[i]))return;const o=t[i],s=n[i];if(o===s)return;const a=Mft(i);if(s==null||s===!1){VA(i)&&Dft(e,i),e.removeAttribute(a);return}if(s===!0){VA(i)&&oJ(e,i,!0),e.setAttribute(a,"");return}if(VA(i)){oJ(e,i,s);return}e.setAttribute(a,String(s))})}function Fft(e,t,n){if(t!==n){if(n){e.className=n;return}e.removeAttribute("class")}}function Bft(e,t,n){const r=t??{},i=n??{};new Set([...Object.keys(r),...Object.keys(i)]).forEach(s=>{const a=r[s],l=i[s];if(a!==l){if(l==null){Lft(e,s);return}$ft(e,s,l)}})}function Hft(e,t,n){t.forEach(({eventName:i,listener:o,options:s})=>{e.removeEventListener(i,o,s)});const r=[];return Object.entries(n).forEach(([i,o])=>{if(!BM(i,o))return;const{eventName:s,options:a}=Rft(i),l=c=>{o(Pft(e,c))};e.addEventListener(s,l,a),r.push({eventName:s,listener:l,options:a})}),r}function bme(e,t){const n=x.useRef({}),r=x.useRef([]);kft(()=>{const i=n.current;return Fft(e,i.className,t.className),Bft(e,i.style,t.style),zft(e,i,t),r.current=Hft(e,r.current,t),n.current=t,()=>{r.current.forEach(({eventName:o,listener:s,options:a})=>{e.removeEventListener(o,s,a)}),r.current=[]}},[e,t])}var Vft=K.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:o=null,getReferencedVirtualElement:s,options:a,children:l,...c},d)=>{const f=x.useRef(document.createElement("div")),p=x.useRef(gme(e,"bubbleMenu")).current;bme(f.current,c),typeof d=="function"?d(f.current):d&&(d.current=f.current);const{editor:m}=wh(),y=t||m,v={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:p,shouldShow:o,getReferencedVirtualElement:s,options:a},b=x.useRef(v);b.current=v;const[C,S]=x.useState(!1),E=x.useRef(!0);return x.useEffect(()=>{if(y!=null&&y.isDestroyed)return;if(!y){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const A=f.current;A.style.visibility="hidden",A.style.position="absolute";const _=pme({...b.current,editor:y,element:A});y.registerPlugin(_);const N=b.current.pluginKey;return E.current=!0,S(!0),()=>{S(!1),y.unregisterPlugin(N),window.requestAnimationFrame(()=>{A.parentNode&&A.parentNode.removeChild(A)})}},[y]),x.useEffect(()=>{if(!(!C||!y||y.isDestroyed)){if(E.current){E.current=!1;return}y.view.dispatch(y.state.tr.setMeta(p,{type:"updateOptions",options:b.current}))}},[C,y,n,r,o,a,i,s,p]),Si.createPortal(l,f.current)});K.forwardRef(({pluginKey:e,editor:t,updateDelay:n,resizeDelay:r,appendTo:i,shouldShow:o=null,options:s,children:a,...l},c)=>{const d=x.useRef(document.createElement("div")),f=x.useRef(gme(e,"floatingMenu")).current;bme(d.current,l),typeof c=="function"?c(d.current):c&&(c.current=d.current);const{editor:p}=wh(),m=t||p,y={updateDelay:n,resizeDelay:r,appendTo:i,pluginKey:f,shouldShow:o,options:s},v=x.useRef(y);v.current=y;const[b,C]=x.useState(!1),S=x.useRef(!0);return x.useEffect(()=>{if(m!=null&&m.isDestroyed)return;if(!m){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const E=d.current;E.style.visibility="hidden",E.style.position="absolute";const A=mme({...v.current,editor:m,element:E});m.registerPlugin(A);const _=v.current.pluginKey;return S.current=!0,C(!0),()=>{C(!1),m.unregisterPlugin(_),window.requestAnimationFrame(()=>{E.parentNode&&E.parentNode.removeChild(E)})}},[m]),x.useEffect(()=>{if(!(!b||!m||m.isDestroyed)){if(S.current){S.current=!1;return}m.view.dispatch(m.state.tr.setMeta(f,{type:"updateOptions",options:v.current}))}},[b,m,n,r,o,s,i,f]),Si.createPortal(a,d.current)});function ov({size:e=15,className:t}){return u.jsx("svg",{width:e,height:e*(14/15),viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,children:u.jsx("path",{d:"M10.4167 0L11.2409 1.54551L12.7864 2.36979L11.2409 3.19407L10.4167 4.73958L9.59239 3.19407L8.04689 2.36979L9.59239 1.54551L10.4167 0ZM4.79167 1.95313L6.45832 5.07812L9.58332 6.74481L6.45832 8.41143L4.79167 11.5364L3.125 8.41143L0 6.74481L3.125 5.07812L4.79167 1.95313ZM12.0833 9.45312L11.0417 7.49999L10 9.45312L8.04689 10.4948L10 11.5364L11.0417 13.4896L12.0833 11.5364L14.0364 10.4948L12.0833 9.45312Z",fill:"#E6A819"})})}function Uft(e){const n=e.storage.pages;return!n||!("activeEditor"in n)?null:n.activeEditor??null}function In(e){const{editor:t}=wh(),n=e??t,[r,i]=x.useState(null);return x.useEffect(()=>
630{if(!n){i(null);return}const s=()=>i(Uft(n));return s(),n.on("update",s),n.on("selectionUpdate",s),()=>{n.off("update",s),n.off("selectionUpdate",s)}},[n]),x.useEffect(()=>{if(!r)return;const s=()=>i(null);return r.on("destroy",s),()=>{r.off("destroy",s)}},[r]),vpe({editor:r??n,selector(s){return s.editor?{editor:s.editor,editorState:s.editor.state,canCommand:s.editor.can}:{editor:null,editorState:void 0,canCommand:void 0}}})??{editor:null}}const Rc=x.forwardRef(({variant:e,size:t="default",appearance:n="default",trimText:r=!1,className:i,children:o,...s},a)=>u.jsx("div",{ref:a,className:`tiptap-badge ${i||""}`,"data-style":e,"data-size":t,"data-appearance":n,"data-text-trim":r?"on":"off",...s,children:o}));Rc.displayName="Badge";function qft({type:e,shortcutKeys:t=Ame[e]}){return u.jsx(Rc,{children:Mc({shortcutKeys:t})})}const wo=x.forwardRef(({editor:e,type:t,text:n,hideWhenUnavailable:r=!1,onToggled:i,showShortcut:o=!1,onClick:s,children:a,...l},c)=>{const{editor:d}=In(e),{isVisible:f,handleMark:p,label:m,canToggle:y,isActive:v,Icon:b,shortcutKeys:C}=Zft({editor:d,type:t,hideWhenUnavailable:r,onToggled:i}),S=x.useCallback(E=>{s==null||s(E),!E.defaultPrevented&&p()},[p,s]);return f?u.jsx(yr,{type:"button",disabled:!y,variant:"ghost","data-active-state":v?"on":"off","data-disabled":!y,role:"button",tabIndex:-1,"aria-label":m,"aria-pressed":v,tooltip:m,onClick:S,...l,ref:c,children:a??u.jsxs(u.Fragment,{children:[u.jsx(b,{className:"tiptap-button-icon"}),n&&u.jsx("span",{className:"tiptap-button-text",children:n}),o&&u.jsx(qft,{type:t,shortcutKeys:C})]})}):null});wo.displayName="MarkButton";const xme=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 2.5C5.17157 2.5 4.5 3.17157 4.5 4V20C4.5 20.8284 5.17157 21.5 6 21.5H15C16.4587 21.5 17.8576 20.9205 18.8891 19.8891C19.9205 18.8576 20.5 17.4587 20.5 16C20.5 14.5413 19.9205 13.1424 18.8891 12.1109C18.6781 11.9 18.4518 11.7079 18.2128 11.5359C19.041 10.5492 19.5 9.29829 19.5 8C19.5 6.54131 18.9205 5.14236 17.8891 4.11091C16.8576 3.07946 15.4587 2.5 14 2.5H6ZM14 10.5C14.663 10.5 15.2989 10.2366 15.7678 9.76777C16.2366 9.29893 16.5 8.66304 16.5 8C16.5 7.33696 16.2366 6.70107 15.7678 6.23223C15.2989 5.76339 14.663 5.5 14 5.5H7.5V10.5H14ZM7.5 18.5V13.5H15C15.663 13.5 16.2989 13.7634 16.7678 14.2322C17.2366 14.7011 17.5 15.337 17.5 16C17.5 16.663 17.2366 17.2989 16.7678 17.7678C16.2989 18.2366 15.663 18.5 15 18.5H7.5Z",fill:"currentColor"})}));xme.displayName="BoldIcon";const wme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M15.4545 4.2983C15.6192 3.77115 15.3254 3.21028 14.7983 3.04554C14.2712 2.88081 13.7103 3.1746 13.5455 3.70175L8.54554 19.7017C8.38081 20.2289 8.6746 20.7898 9.20175 20.9545C9.72889 21.1192 10.2898 20.8254 10.4545 20.2983L15.4545 4.2983Z",fill:"currentColor"}),u.jsx("path",{d:"M6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.70711L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289Z",fill:"currentColor"}),u.jsx("path",{d:"M17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z",fill:"currentColor"})]}));wme.displayName="Code2Icon";const Cme=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{d:"M15.0222 3H19C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H15.693L10.443 19H14C14.5523 19 15 19.4477 15 20C15 20.5523 14.5523 21 14 21H9.02418C9.00802 21.0004 8.99181 21.0004 8.97557 21H5C4.44772 21 4 20.5523 4 20C4 19.4477 4.44772 19 5 19H8.30704L13.557 5H10C9.44772 5 9 4.55228 9 4C9 3.44772 9.44772 3 10 3H14.9782C14.9928 2.99968 15.00
63075 2.99967 15.0222 3Z",fill:"currentColor"})}));Cme.displayName="ItalicIcon";const Sme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M9.00039 3H16.0001C16.5524 3 17.0001 3.44772 17.0001 4C17.0001 4.55229 16.5524 5 16.0001 5H9.00011C8.68006 4.99983 8.36412 5.07648 8.07983 5.22349C7.79555 5.37051 7.55069 5.5836 7.36585 5.84487C7.181 6.10614 7.06155 6.40796 7.01754 6.72497C6.97352 7.04198 7.00623 7.36492 7.11292 7.66667C7.29701 8.18737 7.02414 8.75872 6.50344 8.94281C5.98274 9.1269 5.4114 8.85403 5.2273 8.33333C5.01393 7.72984 4.94851 7.08396 5.03654 6.44994C5.12456 5.81592 5.36346 5.21229 5.73316 4.68974C6.10285 4.1672 6.59256 3.74101 7.16113 3.44698C7.72955 3.15303 8.36047 2.99975 9.00039 3Z",fill:"currentColor"}),u.jsx("path",{d:"M18 13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H4C3.44772 11 3 11.4477 3 12C3 12.5523 3.44772 13 4 13H14C14.7956 13 15.5587 13.3161 16.1213 13.8787C16.6839 14.4413 17 15.2044 17 16C17 16.7956 16.6839 17.5587 16.1213 18.1213C15.5587 18.6839 14.7956 19 14 19H6C5.44772 19 5 19.4477 5 20C5 20.5523 5.44772 21 6 21H14C15.3261 21 16.5979 20.4732 17.5355 19.5355C18.4732 18.5979 19 17.3261 19 16C19 14.9119 18.6453 13.8604 18 13Z",fill:"currentColor"})]}));Sme.displayName="StrikeIcon";const Eme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.29289 7.29289C3.68342 6.90237 4.31658 6.90237 4.70711 7.29289L12.7071 15.2929C13.0976 15.6834 13.0976 16.3166 12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L3.29289 8.70711C2.90237 8.31658 2.90237 7.68342 3.29289 7.29289Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 7.29289C13.0976 7.68342 13.0976 8.31658 12.7071 8.70711L4.70711 16.7071C4.31658 17.0976 3.68342 17.0976 3.29289 16.7071C2.90237 16.3166 2.90237 15.6834 3.29289 15.2929L11.2929 7.29289C11.6834 6.90237 12.3166 6.90237 12.7071 7.29289Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4079 14.3995C18.0284 14.0487 18.7506 13.9217 19.4536 14.0397C20.1566 14.1578 20.7977 14.5138 21.2696 15.0481L21.2779 15.0574L21.2778 15.0575C21.7439 15.5988 22 16.2903 22 17C22 18.0823 21.3962 18.8401 20.7744 19.3404C20.194 19.8073 19.4858 20.141 18.9828 20.378C18.9638 20.387 18.9451 20.3958 18.9266 20.4045C18.4473 20.6306 18.2804 20.7817 18.1922 20.918C18.1773 20.9412 18.1619 20.9681 18.1467 21H21C21.5523 21 22 21.4477 22 22C22 22.5523 21.5523 23 21 23H17C16.4477 23 16 22.5523 16 22C16 21.1708 16.1176 20.4431 16.5128 19.832C16.9096 19.2184 17.4928 18.8695 18.0734 18.5956C18.6279 18.334 19.138 18.0901 19.5207 17.7821C19.8838 17.49 20 17.2477 20 17C20 16.7718 19.9176 16.5452 19.7663 16.3672C19.5983 16.1792 19.3712 16.0539 19.1224 16.0121C18.8722 15.9701 18.6152 16.015 18.3942 16.1394C18.1794 16.2628 18.0205 16.4549 17.9422 16.675C17.7572 17.1954 17.1854 17.4673 16.665 17.2822C16.1446 17.0972 15.8728 16.5254 16.0578 16.005C16.2993 15.3259 16.7797 14.7584 17.4039 14.4018L17.4079 14.3995L17.4079 14.3995Z",fill:"currentColor"})]}));Eme.displayName="SubscriptIcon";const kme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.7071 7.29289C13.0976 7.68342 13.0976 8.31658 12.7071 8.70711L4.70711 16.7071C4.31658 17.0976 3.68342 17.0976 3.29289 16.7071C2.90237 16.3166 2.90237 15.6834 3.29289 15.2929L11.2929 7.29289C11.6834 6.90237 12.3166 6.90237 12.7071 7.29289Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.29289 7.29289C3.68342 6.90237 4.31658 6.90237 4.70711 7.29289L12.7071 15.2929C13.0976 15.6834 13.0976 16.3166 12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L3.29289 8.70711C2.90237 8.31658 2.90237 7.68342 3.29289 7.29289Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.405 1.40657C18.0246 1.05456 18.7463 0.92634 19.4492 1.04344C20.1521 1.16054 20.7933 1.51583 21.2652 2.0497L21.2697 2.05469L21.2696 2.05471C21.7431 2.5975 22 3.28922 22 4.00203C22 5.08579 21.3952 5.84326 20.7727 6.34289C20.1966 6.80531 19.4941 7.13675 18.9941 7.37261C18.9714 7.38332 18.9491 7.39383 18.9273 7.40415C18.4487 7.63034 18.2814 7.78152 18.1927 7.91844C18.1778 7.94155 18.1625 7.96834 18.1473 8.00003H21C21.5523 8.00003 22 8.44774 22 9.00003C22 9.55231 21.5523 10 21 10H17C16.4477 10 16 9.55231 16 9.00003C16 8.17007 16.1183 7.44255 16.5138 6.83161C16.9107 6.21854 17.4934 5.86971 18.0728 5.59591C18.6281 5.33347 19.1376 5.09075 19.5208 4.78316C19.8838 4.49179 20 4.25026 20 4.00203C20 3.77192 19.9178 3.54865 19.7646 3.37182C19.5968 3.18324 19.3696 3.05774 19.1205 3.01625C18.8705 2.97459 18.6137 3.02017 18.3933 3.14533C18.1762 3.26898 18.0191 3.45826 17.9406 3.67557C17.7531 4.19504 17.18 4.46414 16.6605 4.27662C16.141 4.0891 15.8719 3.51596 16.0594 2.99649C16.303 2.3219 16.7817 1.76125 17.4045 1.40689L17.405 1.40657Z",fill:"currentColor"})]}));kme.displayName="SuperscriptIcon";const _me=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"
630currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4V10C5 11.8565 5.7375 13.637 7.05025 14.9497C8.36301 16.2625 10.1435 17 12 17C13.8565 17 15.637 16.2625 16.9497 14.9497C18.2625 13.637 19 11.8565 19 10V4C19 3.44772 18.5523 3 18 3C17.4477 3 17 3.44772 17 4V10C17 11.3261 16.4732 12.5979 15.5355 13.5355C14.5979 14.4732 13.3261 15 12 15C10.6739 15 9.40215 14.4732 8.46447 13.5355C7.52678 12.5979 7 11.3261 7 10V4ZM4 19C3.44772 19 3 19.4477 3 20C3 20.5523 3.44772 21 4 21H20C20.5523 21 21 20.5523 21 20C21 19.4477 20.5523 19 20 19H4Z",fill:"currentColor"})}));_me.displayName="UnderlineIcon";const Wft={bold:xme,italic:Cme,underline:_me,strike:Sme,code:wme,superscript:kme,subscript:Eme},Ame={bold:"mod+b",italic:"mod+i",underline:"mod+u",strike:"mod+shift+s",code:"mod+e",superscript:"mod+.",subscript:"mod+,"};function bI(e,t){return!e||!e.isEditable||!pb(t,e)||Td(e,["image"])?!1:e.can().toggleMark(t)}function Gft(e,t){return!e||!e.isEditable?!1:e.isActive(t)}function Kft(e,t){return!e||!e.isEditable||!bI(e,t)?!1:e.chain().focus().toggleMark(t).run()}function Yft(e){const{editor:t,type:n,hideWhenUnavailable:r}=e;return t?r?!t.isEditable||!pb(n,t)?!1:t.isActive("code")?!0:bI(t,n):!0:!1}function Xft(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Zft(e){const{editor:t,type:n,hideWhenUnavailable:r=!1,onToggled:i}=e,{editor:o}=In(t),[s,a]=x.useState(!0),l=bI(o,n),c=Gft(o,n);x.useEffect(()=>{if(!o)return;const f=()=>{a(Yft({editor:o,type:n,hideWhenUnavailable:r}))};return f(),o.on("selectionUpdate",f),()=>{o.off("selectionUpdate",f)}},[o,n,r]);const d=x.useCallback(()=>{if(!o)return!1;const f=Kft(o,n);return f&&(i==null||i()),f},[o,n,i]);return{isVisible:s,isActive:c,handleMark:d,canToggle:l,label:Xft(n),shortcutKeys:Ame[n],Icon:Wft[n]}}function yS(e="max",t=768){const[n,r]=x.useState(void 0);return x.useEffect(()=>{const i=e==="min"?`(min-width: ${t}px)`:`(max-width: ${t-1}px)`,o=window.matchMedia(i),s=a=>r(a.matches);return r(o.matches),o.addEventListener("change",s),()=>o.removeEventListener("change",s)},[e,t]),!!n}const Nme=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 4C21 3.44772 20.5523 3 20 3C19.4477 3 19 3.44772 19 4V11C19 11.7956 18.6839 12.5587 18.1213 13.1213C17.5587 13.6839 16.7956 14 16 14H6.41421L9.70711 10.7071C10.0976 10.3166 10.0976 9.68342 9.70711 9.29289C9.31658 8.90237 8.68342 8.90237 8.29289 9.29289L3.29289 14.2929C2.90237 14.6834 2.90237 15.3166 3.29289 15.7071L8.29289 20.7071C8.68342 21.0976 9.31658 21.0976 9.70711 20.7071C10.0976 20.3166 10.0976 19.6834 9.70711 19.2929L6.41421 16H16C17.3261 16 18.5979 15.4732 19.5355 14.5355C20.4732 13.5979 21 12.3261 21 11V4Z",fill:"currentColor"})}));Nme.displayName="CornerDownLeftIcon";const jme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L18.5858 4H15C14.4477 4 14 3.55228 14 3Z",fill:"currentColor"}),u.jsx("path",{d:"M4.29289 7.29289C4.48043 7.10536 4.73478 7 5 7H11C11.5523 7 12 6.55228 12 6C12 5.44772 11.5523 5 11 5H5C4.20435 5 3.44129 5.31607 2.87868 5.87868C2.31607 6.44129 2 7.20435 2 8V19C2 19.7957 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H16C16.7957 22 17.5587 21.6839 18.1213 21.1213C18.6839 20.5587 19 19.7957 19 19V13C19 12.4477 18.5523 12 18 12C17.4477 12 17 12.4477 17 13V19C17 19.2652 16.8946 19.5196 16.7071 19.7071C16.5196 19.8946 16.2652 20 16 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V8C4 7.73478 4.10536 7.48043 4.29289 7.29289Z",fill:"currentColor"})]}));jme.displayName="ExternalLinkIcon";const xI=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"
630currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M16.9958 1.06669C15.4226 1.05302 13.907 1.65779 12.7753 2.75074L12.765 2.76086L11.045 4.47086C10.6534 4.86024 10.6515 5.49341 11.0409 5.88507C11.4303 6.27673 12.0634 6.27858 12.4551 5.88919L14.1697 4.18456C14.9236 3.45893 15.9319 3.05752 16.9784 3.06662C18.0272 3.07573 19.0304 3.49641 19.772 4.23804C20.5137 4.97967 20.9344 5.98292 20.9435 7.03171C20.9526 8.07776 20.5515 9.08563 19.8265 9.83941L16.833 12.8329C16.4274 13.2386 15.9393 13.5524 15.4019 13.7529C14.8645 13.9533 14.2903 14.0359 13.7181 13.9949C13.146 13.9539 12.5894 13.7904 12.0861 13.5154C11.5827 13.2404 11.1444 12.8604 10.8008 12.401C10.47 11.9588 9.84333 11.8685 9.40108 12.1993C8.95883 12.5301 8.86849 13.1568 9.1993 13.599C9.71464 14.288 10.3721 14.858 11.1272 15.2705C11.8822 15.683 12.7171 15.9283 13.5753 15.9898C14.4334 16.0513 15.2948 15.9274 16.1009 15.6267C16.907 15.326 17.639 14.8555 18.2473 14.247L21.2472 11.2471L21.2593 11.2347C22.3523 10.1031 22.9571 8.58751 22.9434 7.01433C22.9297 5.44115 22.2987 3.93628 21.1863 2.82383C20.0738 1.71138 18.5689 1.08036 16.9958 1.06669Z",fill:"currentColor"}),u.jsx("path",{d:"M10.4247 8.0102C9.56657 7.94874 8.70522 8.07256 7.89911 8.37326C7.09305 8.67395 6.36096 9.14458 5.75272 9.753L2.75285 12.7529L2.74067 12.7653C1.64772 13.8969 1.04295 15.4125 1.05662 16.9857C1.07029 18.5589 1.70131 20.0637 2.81376 21.1762C3.9262 22.2886 5.43108 22.9196 7.00426 22.9333C8.57744 22.947 10.0931 22.3422 11.2247 21.2493L11.2371 21.2371L12.9471 19.5271C13.3376 19.1366 13.3376 18.5034 12.9471 18.1129C12.5565 17.7223 11.9234 17.7223 11.5328 18.1129L9.82932 19.8164C9.07555 20.5414 8.06768 20.9425 7.02164 20.9334C5.97285 20.9243 4.9696 20.5036 4.22797 19.762C3.48634 19.0203 3.06566 18.0171 3.05655 16.9683C3.04746 15.9222 3.44851 14.9144 4.17355 14.1606L7.16719 11.167C7.5727 10.7613 8.06071 10.4476 8.59811 10.2471C9.13552 10.0467 9.70976 9.96412 10.2819 10.0051C10.854 10.0461 11.4106 10.2096 11.9139 10.4846C12.4173 10.7596 12.8556 11.1397 13.1992 11.599C13.53 12.0412 14.1567 12.1316 14.5989 11.8007C15.0412 11.4699 15.1315 10.8433 14.8007 10.401C14.2854 9.71205 13.6279 9.14198 12.8729 8.72948C12.1178 8.31697 11.2829 8.07166 10.4247 8.0102Z",fill:"currentColor"})]}));xI.displayName="LinkIcon";const Tme=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 5V4C7 3.17477 7.40255 2.43324 7.91789 1.91789C8.43324 1.40255 9.17477 1 10 1H14C14.8252 1 15.5668 1.40255 16.0821 1.91789C16.5975 2.43324 17 3.17477 17 4V5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H20V20C20 20.8252 19.5975 21.5668 19.0821 22.0821C18.5668 22.5975 17.8252 23 17 23H7C6.17477 23 5.43324 22.5975 4.91789 22.0821C4.40255 21.5668 4 20.8252 4 20V7H3C2.44772 7 2 6.55228 2 6C2 5.44772 2.44772 5 3 5H7ZM9 4C9 3.82523 9.09745 3.56676 9.33211 3.33211C9.56676 3.09745 9.82523 3 10 3H14C14.1748 3 14.4332 3.09745 14.6679 3.33211C14.9025 3.56676 15 3.82523 15 4V5H9V4ZM6 7V20C6 20.1748 6.09745 20.4332 6.33211 20.6679C6.56676 20.9025 6.82523 21 7 21H17C17.1748 21 17.4332 20.9025 17.6679 20.6679C17.9025 20.4332 18 20.1748 18 20V7H6Z",fill:"currentColor"})}));Tme.displayName="TrashIcon";function Mme({...e}){return u.jsx(Cae,{...e})}function Ome({...e}){return u.jsx(Sae,{...e})}function Rme({className:e,align:t="center",sideOffset:n=4,...r}){return u.jsx(Eae,{children:u.jsx(GR,{align:t,sideOffset:n,className:si("tiptap-popover",e),...r})})}function wI({decorative:e,orientation:t="vertical",className:n,...r}){const o=e?{role:"none"}:{"aria-orientation":t==="vertical"?t:void 0,role:"separator"};return u.jsx("div",{className:si("tiptap-separator",n),"data-orientation":t,...o,...r})}const CI=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:si("tiptap-card",e),...t}));CI.displayName="Card";const Qft=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:si("tiptap-card-header",e),...t}));Qft.displayName="CardHeader";const SI=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:si("tiptap-card-body",e),...t}));
630SI.displayName="CardBody";const EI=x.forwardRef(({className:e,orientation:t="vertical",...n},r)=>u.jsx("div",{ref:r,"data-orientation":t,className:si("tiptap-card-item-group",e),...n}));EI.displayName="CardItemGroup";const Jft=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:si("tiptap-card-group-label",e),...t}));Jft.displayName="CardGroupLabel";const eht=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:si("tiptap-card-footer",e),...t}));eht.displayName="CardFooter";function tht({className:e,type:t,...n}){return u.jsx("input",{type:t,"data-slot":"tiptap-input",className:si("tiptap-input",e),...n})}const sJ=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,aJ=Mt,nht=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return aJ(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],f=o==null?void 0:o[c];if(d===null)return null;const p=sJ(d)||sJ(f);return i[c][p]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,p]=d;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:p,...m}=d;return Object.entries(m).every(y=>{let[v,b]=y;return Array.isArray(b)?b.includes({...o,...a}[v]):{...o,...a}[v]===b})?[...c,f,p]:c},[]);return aJ(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},rht=nht("tiptap-button-group",{variants:{orientation:{horizontal:"tiptap-button-group-horizontal",vertical:"tiptap-button-group-vertical"}},defaultVariants:{orientation:"horizontal"}});function Nf({className:e,orientation:t,...n}){return u.jsx("div",{role:"group","data-slot":"tiptap-button-group","data-orientation":t,className:si(rht({orientation:t}),e),...n})}const Pme=x.forwardRef(({className:e,children:t,...n},r)=>u.jsx(yr,{type:"button",className:e,variant:"ghost",role:"button",tabIndex:-1,"aria-label":"Link",tooltip:"Link",ref:r,...n,children:t||u.jsx(xI,{className:"tiptap-button-icon"})}));Pme.displayName="LinkButton";const iht=({url:e,setUrl:t,setLink:n,removeLink:r,openLink:i,isActive:o})=>{const s=yS(),a=l=>{l.key==="Enter"&&(l.preventDefault(),n())};return u.jsx(CI,{style:{...s?{boxShadow:"none",border:0}:{}},children:u.jsx(SI,{style:{...s?{padding:0}:{}},children:u.jsxs(EI,{orientation:"horizontal",children:[u.jsx(tht,{type:"url",placeholder:"Paste a link...",value:e,onChange:l=>t(l.target.value),onKeyDown:a,autoFocus:!0,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:"tiptap-link-input"}),u.jsx(Nf,{children:u.jsx(yr,{type:"button",onClick:n,title:"Apply link",disabled:!e&&!o,variant:"ghost",children:u.jsx(Nme,{className:"tiptap-button-icon"})})}),u.jsx(wI,{}),u.jsxs(Nf,{children:[u.jsx(Nf,{children:u.jsx(yr,{type:"button",onClick:i,title:"Open in new window",disabled:!e&&!o,variant:"ghost",children:u.jsx(jme,{className:"tiptap-button-icon"})})}),u.jsx(Nf,{children:u.jsx(yr,{type:"button",onClick:r,title:"Remove link",disabled:!e&&!o,variant:"ghost",children:u.jsx(Tme,{className:"tiptap-button-icon"})})})]})]})})})},kI=x.forwardRef(({editor:e,hideWhenUnavailable:t=!1,onSetLink:n,onOpenChange:r,autoOpenOnLinkActive:i=!0,onClick:o,children:s,...a},l)=>{const{editor:c}=In(e),[d,f]=x.useState(!1),{isVisible:p,canSet:m,isActive:y,url:v,setUrl:b,setLink:C,removeLink:S,openLink:E,label:A,Icon:_}=lht({editor:c,hideWhenUnavailable:t,onSetLink:n}),N=x.useCallback(O=>{f(O),r==null||r(O)},[r]),j=x.useCallback(()=>{C(),f(!1)},[C]),T=x.useCallback(O=>{o==null||o(O),!O.defaultPrevented&&f(!d)},[o,d]);return x.useEffect(()=>{i&&y&&f(!0)},[i,y]),p?u.jsxs(Mme,{open:d,onOpenChange:N,children:[u.jsx(Ome,{asChild:!0,children:u.jsx(Pme,{disabled:!m,"data-active-state":y?"on":"off","data-disabled":!m,"aria-label":A,"aria-pressed":y,onClick:T,...a,ref:l,children:s??u.jsx(_,{className:"tiptap-button-icon"})})}),u.jsx(Rme,{children:u.jsx(iht,{url:v,setUrl:b,setLink:j,removeLink:S,openLink:E,isActive:y})})]}):null});kI.displayName="LinkPopover";function Dme(e){if(!e||!e.isEditable||Td(e,["image"],!0))return!1;try{return e.can().setMark("link")}catch{return!1}}function Ime(e){return!e||!e.isEditable?!1:e.isActive("link")}function oht(e){const{editor:t,hideWhenUnavailable:n}=e;if(!t||!t.isEditable)return!1;const r=pb("link",t);return n?r?t.isActive("code")?!0:Dme(t):!1:!0}function sht(e){const{editor:t,onSetLink:n}=e,[r,i]=x.useState(null);x.useEffect(()=>{if(!t)return;const{href:l}=t.getAttributes("link");Ime(t)&&r===null&&i(l||"")},[t,r]),x.useEffect(()=>{if(!t)return;const l=()=>{const{href:c}=t.getAttributes("link");i(c||"")};return t.on("selectionUpdate",l),()=>{t.off("selectionUpdate",l)}},[t]);const o=x.useCallback(()=>
630{if(!r||!t)return;const{selection:l}=t.state,c=l.empty;let d=t.chain().focus();d=d.extendMarkRange("link").setLink({href:r}),c&&(d=d.insertContent({type:"text",text:r})),d.run(),i(null),n==null||n()},[t,n,r]),s=x.useCallback(()=>{t&&(t.chain().focus().extendMarkRange("link").unsetLink().setMeta("preventAutolink",!0).run(),i(""))},[t]),a=x.useCallback((l="_blank",c="noopener,noreferrer")=>{if(!r)return;const d=nft(r,window.location.href);d!=="#"&&window.open(d,l,c)},[r]);return{url:r||"",setUrl:i,setLink:o,removeLink:s,openLink:a}}function aht(e){const{editor:t,hideWhenUnavailable:n=!1}=e,r=Dme(t),i=Ime(t),[o,s]=x.useState(!0);return x.useEffect(()=>{if(!t)return;const a=()=>{s(oht({editor:t,hideWhenUnavailable:n}))};return a(),t.on("selectionUpdate",a),()=>{t.off("selectionUpdate",a)}},[t,n]),{isVisible:o,canSet:r,isActive:i}}function lht(e){const{editor:t,hideWhenUnavailable:n=!1,onSetLink:r}=e||{},{editor:i}=In(t),{isVisible:o,canSet:s,isActive:a}=aht({editor:i,hideWhenUnavailable:n}),l=sht({editor:i,onSetLink:r});return{isVisible:o,canSet:s,isActive:a,label:"Link",Icon:xI,...l}}const cht=[{label:"Default",value:""},{label:"Stone",value:"#78716c"},{label:"Red",value:"#ef4444"},{label:"Orange",value:"#f97316"},{label:"Amber",value:"#f59e0b"},{label:"Green",value:"#22c55e"},{label:"Teal",value:"#14b8a6"},{label:"Blue",value:"#3b82f6"},{label:"Violet",value:"#8b5cf6"},{label:"Pink",value:"#ec4899"}],uht=[{label:"None",value:""},{label:"Stone",value:"#e7e5e4"},{label:"Red",value:"#fecaca"},{label:"Orange",value:"#fed7aa"},{label:"Amber",value:"#fef08a"},{label:"Green",value:"#bbf7d0"},{label:"Teal",value:"#99f6e4"},{label:"Blue",value:"#bfdbfe"},{label:"Violet",value:"#ddd6fe"},{label:"Pink",value:"#fbcfe8"}];function dht(){var l,c;const{editor:e}=wh(),[t,n]=x.useState(!1),r=x.useRef(null),i=((l=e==null?void 0:e.getAttributes("textStyle"))==null?void 0:l.color)??"",o=((c=e==null?void 0:e.getAttributes("highlight"))==null?void 0:c.color)??"";x.useEffect(()=>{if(!t)return;const d=f=>{r.current&&!r.current.contains(f.target)&&n(!1)};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[t]);const s=d=>{d?e==null||e.chain().focus().setColor(d).run():e==null||e.chain().focus().unsetColor().run()},a=d=>{d?e==null||e.chain().focus().setHighlight({color:d}).run():e==null||e.chain().focus().unsetHighlight().run()};return u.jsxs("div",{ref:r,className:"color-picker-wrapper",children:[u.jsxs("button",{className:"color-picker-trigger",onMouseDown:d=>{d.preventDefault(),n(f=>!f)},title:"Text & highlight color",children:[u.jsx("span",{className:"color-picker-a",style:{borderBottomColor:i||"currentColor"},children:"A"}),u.jsx(fb,{size:10,className:t?"rotated":""})]}),t&&u.jsxs("div",{className:"color-picker-panel",children:[u.jsx("p",{className:"color-picker-section-label",children:"Text Color"}),u.jsx("div",{className:"color-picker-swatches",children:cht.map(({label:d,value:f})=>u.jsxs("button",{className:["color-swatch-text",i===f?"active":""].filter(Boolean).join(" "),onMouseDown:p=>{p.preventDefault(),s(f)},title:d,style:{color:f||"inherit"},children:["A",i===f&&u.jsx("span",{className:"color-swatch-check"})]},d))}),u.jsx("p",{className:"color-picker-section-label",children:"Highlight Color"}),u.jsx("div",{className:"color-picker-swatches",children:uht.map(({label:d,value:f})=>u.jsx("button",{className:["color-swatch-bg",o===f?"active":""].filter(Boolean).join(" "),onMouseDown:p=>{p.preventDefault(),a(f)},title:d,style:{backgroundColor:f||"transparent"},children:o===f&&u.jsx("span",{className:"color-swatch-check"})},d))})]})]})}function Lme({editor:e,containerRef:t,query:n,items:r,onSelect:i,onClose:o,orientation:s="vertical",autoSelectFirstItem:a=!0}){const[l,c]=x.useState(a?0:-1);return x.useEffect(()=>{const d=p=>{if(!r.length)return!1;const m=()=>c(v=>v===-1?0:(v+1)%r.length),y=()=>c(v=>v===-1?r.length-1:(v-1+r.length)%r.length);switch(p.key){case"ArrowUp":return s==="horizontal"?!1:(p.preventDefault(),y(),!0);case"ArrowDown":return s==="horizontal"?!1:(p.preventDefault(),m(),!0);case"ArrowLeft":return s==="vertical"?!1:(p.preventDefault(),y(),!0);case"ArrowRight":return s==="vertical"?!1:(p.preventDefault(),m(),!0);case"Tab":return p.preventDefault(),p.shiftKey?y():m(),!0;case"Home":return p.preventDefault(),c(0),!0;case"End":return p.preventDefault(),c(r.length-1),!0;case"Enter":return p.isComposing?!1:(p.preventDefault(),l!==-1&&r[l]&&(i==null||i(r[l])),!0);case"Escape":return p.preventDefault(),o==null||o(),!0;default:return!1}};let f=null;if(e?f=e.view.dom:t!=null&&t.current&&(f=t.current),f)return f.addEventListener("keydown",d,!0),()=>{f==null||f.removeEventListener("keydown",d,!0)}},[e,t,r,l,i,o,s]),x.useEffect(()=>{n&&c(a?0:-1)},[n,a]),{selectedIndex:r.length?l:void 0,setSelectedIndex:c}}const lJ=(e,t)=>
630{typeof e=="function"?e(t):e&&typeof e=="object"&&"current"in e&&(e.current=t)},fht=(e,t)=>{const n=x.useRef(null);return x.useCallback(r=>{e&&"current"in e&&(e.current=r),n.current&&lJ(n.current,null),n.current=t,t&&lJ(t,r)},[e,t])},hht=e=>{const[t,n]=x.useState([]),r=x.useCallback(()=>e.current?Array.from(e.current.querySelectorAll('button:not([disabled]), [role="button"]:not([disabled]), [tabindex="0"]:not([disabled])')):[],[e]);x.useEffect(()=>{const o=e.current;if(!o)return;const s=()=>n(r());s();const a=new MutationObserver(s);return a.observe(o,{childList:!0,subtree:!0}),()=>a.disconnect()},[r,e]);const{selectedIndex:i}=Lme({containerRef:e,items:t,orientation:"horizontal",onSelect:o=>o.click(),autoSelectFirstItem:!1});x.useEffect(()=>{const o=e.current;if(!o)return;const s=l=>{const c=l.target;o.contains(c)&&c.setAttribute("data-focus-visible","true")},a=l=>{const c=l.target;o.contains(c)&&c.removeAttribute("data-focus-visible")};return o.addEventListener("focus",s,!0),o.addEventListener("blur",a,!0),()=>{o.removeEventListener("focus",s,!0),o.removeEventListener("blur",a,!0)}},[e]),x.useEffect(()=>{i!==void 0&&t[i]&&t[i].focus()},[i,t])},pht=x.forwardRef(({children:e,className:t,variant:n="fixed",...r},i)=>{const o=x.useRef(null),s=fht(o,i);return hht(o),u.jsx("div",{ref:s,role:"toolbar","aria-label":"toolbar","data-variant":n,className:si("tiptap-toolbar",t),...r,children:e})});pht.displayName="Toolbar";const Jo=x.forwardRef(({children:e,className:t,...n},r)=>u.jsx("div",{ref:r,role:"group",className:si("tiptap-toolbar-group",t),...n,children:e}));Jo.displayName="ToolbarGroup";const Oa=x.forwardRef(({...e},t)=>u.jsx(wI,{ref:t,orientation:"vertical",decorative:!0,...e}));Oa.displayName="ToolbarSeparator";const _I=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",fill:"currentColor"}),u.jsx("path",{d:"M21.0001 10C21.0001 9.63121 20.7971 9.29235 20.472 9.11833C20.1468 8.94431 19.7523 8.96338 19.4454 9.16795L16.4454 11.168C15.9859 11.4743 15.8617 12.0952 16.1681 12.5547C16.4744 13.0142 17.0953 13.1384 17.5548 12.8321L19.0001 11.8685V18C19.0001 18.5523 19.4478 19 20.0001 19C20.5524 19 21.0001 18.5523 21.0001 18V10Z",fill:"currentColor"})]}));_I.displayName="HeadingOneIcon";const AI=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",fill:"currentColor"}),u.jsx("path",{d:"M22.0001 12C22.0001 10.7611 21.1663 9.79297 20.0663 9.42632C18.9547 9.05578 17.6171 9.28724 16.4001 10.2C15.9582 10.5314 15.8687 11.1582 16.2001 11.6C16.5314 12.0418 17.1582 12.1314 17.6001 11.8C18.383 11.2128 19.0455 11.1942 19.4338 11.3237C19.8339 11.457 20.0001 11.7389 20.0001 12C20.0001 12.4839 19.8554 12.7379 19.6537 12.9481C19.4275 13.1837 19.1378 13.363 18.7055 13.6307C18.6313 13.6767 18.553 13.7252 18.4701 13.777C17.9572 14.0975 17.3128 14.5261 16.8163 15.2087C16.3007 15.9177 16.0001 16.8183 16.0001 18C16.0001 18.5523 16.4478 19 17.0001 19H21.0001C21.5523 19 22.0001 18.5523 22.0001 18C22.0001 17.4477 21.5523 17 21.0001 17H18.131C18.21 16.742 18.3176 16.5448 18.4338 16.385C18.6873 16.0364 19.0429 15.7775 19.5301 15.473C19.5898 15.4357 19.6536 15.3966 19.7205 15.3556C20.139 15.0992 20.6783 14.7687 21.0964 14.3332C21.6447 13.7621 22.0001 13.0161 22.0001 12Z",fill:"currentColor"})]}));AI.displayName="HeadingTwoIcon";const NI=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"
630currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.4608 11.2169C19.1135 11.0531 18.5876 11.0204 18.0069 11.3619C17.5309 11.642 16.918 11.4831 16.638 11.007C16.358 10.531 16.5169 9.91809 16.9929 9.63807C18.1123 8.97962 19.3364 8.94691 20.314 9.40808C21.2839 9.86558 21.9999 10.818 21.9999 12C21.9999 12.7957 21.6838 13.5587 21.1212 14.1213C20.5586 14.6839 19.7956 15 18.9999 15C18.4476 15 17.9999 14.5523 17.9999 14C17.9999 13.4477 18.4476 13 18.9999 13C19.2651 13 19.5195 12.8947 19.707 12.7071C19.8946 12.5196 19.9999 12.2652 19.9999 12C19.9999 11.6821 19.8159 11.3844 19.4608 11.2169Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.0001 14C18.0001 13.4477 18.4478 13 19.0001 13C19.7957 13 20.5588 13.3161 21.1214 13.8787C21.684 14.4413 22.0001 15.2043 22.0001 16C22.0001 17.2853 21.2767 18.3971 20.1604 18.8994C19.0257 19.41 17.642 19.2315 16.4001 18.3C15.9582 17.9686 15.8687 17.3418 16.2001 16.9C16.5314 16.4582 17.1582 16.3686 17.6001 16.7C18.3581 17.2685 18.9744 17.24 19.3397 17.0756C19.7234 16.9029 20.0001 16.5147 20.0001 16C20.0001 15.7348 19.8947 15.4804 19.7072 15.2929C19.5196 15.1054 19.2653 15 19.0001 15C18.4478 15 18.0001 14.5523 18.0001 14Z",fill:"currentColor"})]}));NI.displayName="HeadingThreeIcon";const mb=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 6C7 5.44772 7.44772 5 8 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H8C7.44772 7 7 6.55228 7 6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 12C7 11.4477 7.44772 11 8 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H8C7.44772 13 7 12.5523 7 12Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 18C7 17.4477 7.44772 17 8 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H8C7.44772 19 7 18.5523 7 18Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 6C2 5.44772 2.44772 5 3 5H3.01C3.56228 5 4.01 5.44772 4.01 6C4.01 6.55228 3.56228 7 3.01 7H3C2.44772 7 2 6.55228 2 6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 11.4477 2.44772 11 3 11H3.01C3.56228 11 4.01 11.4477 4.01 12C4.01 12.5523 3.56228 13 3.01 13H3C2.44772 13 2 12.5523 2 12Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 18C2 17.4477 2.44772 17 3 17H3.01C3.56228 17 4.01 17.4477 4.01 18C4.01 18.5523 3.56228 19 3.01 19H3C2.44772 19 2 18.5523 2 18Z",fill:"currentColor"})]}));mb.displayName="ListIcon";const vS=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 6C9 5.44772 9.44772 5 10 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H10C9.44772 7 9 6.55228 9 6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 12C9 11.4477 9.44772 11 10 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H10C9.44772 13 9 12.5523 9 12Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 18C9 17.4477 9.44772 17 10 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H10C9.44772 19 9 18.5523 9 18Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 6C3 5.44772 3.44772 5 4 5H5C5.55228 5 6 5.44772 6 6V10C6 10.5523 5.55228 11 5 11C4.44772 11 4 10.5523 4 10V7C3.44772 7 3 6.55228 3 6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3 10C3 9.44772 3.44772 9 4 9H6C6.55228 9 7 9.44772 7 10C7 10.5523 6.55228 11 6 11H4C3.44772 11 3 10.5523 3 10Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.82219 13.0431C6.54543 13.4047 6.99997 14.1319 6.99997 15C6.99997 15.5763 6.71806 16.0426 6.48747 16.35C6.31395 16.5814 6.1052 16.8044 5.91309 17H5.99997C6.55226 17 6.99997 17.4477 6.99997 18C6.99997 18.5523 6.55226 19 5.99997 19H3.99997C3.44769 19 2.99997 18.5523 2.99997 18C2.99997 17.4237 3.28189 16.9575 3.51247 16.65C3.74323 16.3424 4.03626 16.0494 4.26965 15.8161C4.27745 15.8083 4.2852 15.8006 4.29287 15.7929C4.55594 15.5298 4.75095 15.3321 4.88748 15.15C4.96287 15.0495 4.99021 14.9922 4.99911 14.9714C4.99535 14.9112 4.9803 14.882 4.9739 14.8715C4.96613 14.8588 4.95382 14.845 4.92776 14.8319C4.87723 14.8067 4.71156 14.7623 4.44719 14.8944C3.95321 15.1414 3.35254 14.9412 3.10555 14.4472C2.85856 13.9533 3.05878 13.3526 3.55276 13.1056C4.28839 12.7378 5.12272 12.6934 5.82219 13.0431Z",fill:"currentColor"})]}));vS.displayName="ListOrderedIcon";const bS=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"
630currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 6C2 4.89543 2.89543 4 4 4H8C9.10457 4 10 4.89543 10 6V10C10 11.1046 9.10457 12 8 12H4C2.89543 12 2 11.1046 2 10V6ZM8 6H4V10H8V6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071L2.29289 17.7071C1.90237 17.3166 1.90237 16.6834 2.29289 16.2929C2.68342 15.9024 3.31658 15.9024 3.70711 16.2929L5 17.5858L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 6C12 5.44772 12.4477 5 13 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H13C12.4477 7 12 6.55228 12 6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 12C12 11.4477 12.4477 11 13 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H13C12.4477 13 12 12.5523 12 12Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 18C12 17.4477 12.4477 17 13 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H13C12.4477 19 12 18.5523 12 18Z",fill:"currentColor"})]}));bS.displayName="ListTodoIcon";const jI=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 6C8 5.44772 8.44772 5 9 5H16C16.5523 5 17 5.44772 17 6C17 6.55228 16.5523 7 16 7H9C8.44772 7 8 6.55228 8 6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 3C4.55228 3 5 3.44772 5 4L5 20C5 20.5523 4.55229 21 4 21C3.44772 21 3 20.5523 3 20L3 4C3 3.44772 3.44772 3 4 3Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 12C8 11.4477 8.44772 11 9 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H9C8.44772 13 8 12.5523 8 12Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 18C8 17.4477 8.44772 17 9 17H16C16.5523 17 17 17.4477 17 18C17 18.5523 16.5523 19 16 19H9C8.44772 19 8 18.5523 8 18Z",fill:"currentColor"})]}));jI.displayName="BlockquoteIcon";const TI=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.70711 2.29289C7.09763 2.68342 7.09763 3.31658 6.70711 3.70711L4.41421 6L6.70711 8.29289C7.09763 8.68342 7.09763 9.31658 6.70711 9.70711C6.31658 10.0976 5.68342 10.0976 5.29289 9.70711L2.29289 6.70711C1.90237 6.31658 1.90237 5.68342 2.29289 5.29289L5.29289 2.29289C5.68342 1.90237 6.31658 1.90237 6.70711 2.29289Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2929 2.29289C10.6834 1.90237 11.3166 1.90237 11.7071 2.29289L14.7071 5.29289C15.0976 5.68342 15.0976 6.31658 14.7071 6.70711L11.7071 9.70711C11.3166 10.0976 10.6834 10.0976 10.2929 9.70711C9.90237 9.31658 9.90237 8.68342 10.2929 8.29289L12.5858 6L10.2929 3.70711C9.90237 3.31658 9.90237 2.68342 10.2929 2.29289Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 4C17 3.44772 17.4477 3 18 3H19C20.6569 3 22 4.34315 22 6V18C22 19.6569 20.6569 21 19 21H5C3.34315 21 2 19.6569 2 18V12C2 11.4477 2.44772 11 3 11C3.55228 11 4 11.4477 4 12V18C4 18.5523 4.44772 19 5 19H19C19.5523 19 20 18.5523 20 18V6C20 5.44772 19.5523 5 19 5H18C17.4477 5 17 4.55228 17 4Z",fill:"currentColor"})]}));TI.displayName="CodeBlockIcon";function $me({editor:e,aiState:t,onApply:n,onDiscard:r,onRetry:i,onStop:o,onCustomPrompt:s}){const[a,l]=x.useState(null),[c,d]=x.useState(""),f=x.useRef(null);if(x.useEffect(()=>{if(t.status==="idle"){l(null);return}const m=()=>{try{const v=t.to>t.from?t.to:t.from,b=Math.min(v,e.state.doc.content.size-1),C=e.view.coordsAtPos(Math.max(0,b)),E=e.view.dom.getBoundingClientRect();l({top:C.bottom+8,left:E.left,width:E.width})}catch{}};m();const y=e.view.dom.closest(".simple-editor-wrapper")??window;return y.addEventListener("scroll",m,{passive:!0}),window.addEventListener("resize",m,{passive:!0}),()=>{y.removeEventListener("scroll",m),window.removeEventListener("resize",m)}},[t.status,t.from,t.to,e]),x.useEffect(()=>{t.status==="review"&&(d(""),setTimeout(()=>{var m;return(m=f.current)==null?void 0:m.focus()},50))},[t.status]),!a||t.status==="idle")return null;
630const p={position:"fixed",top:a.top,left:a.left,width:a.width,maxWidth:a.width,zIndex:50,pointerEvents:"auto"};return Si.createPortal(u.jsx("div",{className:"ai-panel-container",style:p,children:u.jsxs("div",{className:"ai-panel",children:[t.status==="thinking"&&u.jsxs("div",{className:"ai-panel-status",children:[u.jsx(ov,{size:14,className:"ai-panel-sparkle thinking"}),u.jsx("span",{className:"ai-panel-status-text",children:"AI is thinking"}),u.jsxs("span",{className:"ai-panel-dots",children:[u.jsx("span",{}),u.jsx("span",{}),u.jsx("span",{})]})]}),t.status==="writing"&&u.jsxs("div",{className:"ai-panel-status",children:[u.jsx("span",{className:"ai-panel-status-text",children:"AI is writing"}),u.jsxs("span",{className:"ai-panel-dots",children:[u.jsx("span",{}),u.jsx("span",{}),u.jsx("span",{})]}),u.jsx("button",{className:"ai-panel-stop",onMouseDown:m=>{m.preventDefault(),o()},title:"Stop generating",children:u.jsx(Flt,{size:10,fill:"currentColor"})})]}),t.status==="review"&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"ai-panel-input-row",children:[u.jsx(ov,{size:14,className:"ai-panel-sparkle"}),u.jsx("input",{ref:f,className:"ai-panel-input",type:"text",value:c,onChange:m=>d(m.target.value),placeholder:"Tell AI what else needs to be changedâ¦",onKeyDown:m=>{m.stopPropagation(),m.key==="Enter"&&(m.preventDefault(),c.trim()&&s(c.trim()))},onClick:m=>m.stopPropagation()}),u.jsx("button",{className:["ai-panel-send",c.trim()?"active":""].filter(Boolean).join(" "),onMouseDown:m=>{m.preventDefault(),c.trim()&&s(c.trim())},title:"Send",children:u.jsx(Iat,{size:13})})]}),u.jsxs("div",{className:"ai-panel-actions",children:[u.jsxs("button",{className:"ai-panel-action-btn retry",onMouseDown:m=>{m.preventDefault(),i()},children:[u.jsx(hI,{size:13}),"Try again"]}),u.jsxs("div",{className:"ai-panel-actions-right",children:[u.jsxs("button",{className:"ai-panel-action-btn discard",onMouseDown:m=>{m.preventDefault(),r()},children:[u.jsx(P0e,{size:13}),"Discard"]}),u.jsxs("button",{className:"ai-panel-action-btn apply",onMouseDown:m=>{m.preventDefault(),n()},children:[u.jsx(Cn,{size:13}),"Apply"]})]})]})]})]})}),document.body)}const mht="#7c3aed",ght=[{key:"humanize",label:"Humanise",icon:Glt},{key:"fix-grammar",label:"Fix spelling & grammar",icon:Ilt},{key:"extend",label:"Make longer",icon:Oat},{key:"reduce",label:"Make shorter",icon:Pat},{key:"simplify",label:"Simplify language",icon:Jlt},{key:"emojify",label:"Add emojis",icon:Plt},{key:"complete",label:"Continue writing",icon:Nlt},{key:"summarize",label:"Summarize",icon:Tat},{key:"custom",label:"Custom promptâ¦",icon:xlt}];function yht(){const{editor:e}=wh(),[t,n]=x.useState(!1),r=x.useRef(null),i=[{label:"Text",icon:u.jsx("span",{className:"block-type-text-icon",children:"T"}),isActive:()=>!(e!=null&&e.isActive("heading"))&&!(e!=null&&e.isActive("bulletList"))&&!(e!=null&&e.isActive("orderedList"))&&!(e!=null&&e.isActive("taskList"))&&!(e!=null&&e.isActive("blockquote"))&&!(e!=null&&e.isActive("codeBlock"))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().run()},{label:"Heading 1",icon:u.jsx(_I,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("heading",{level:1}))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().setHeading({level:1}).run()},{label:"Heading 2",icon:u.jsx(AI,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("heading",{level:2}))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().setHeading({level:2}).run()},{label:"Heading 3",icon:u.jsx(NI,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("heading",{level:3}))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().setHeading({level:3}).run()},{label:"Bulleted list",icon:u.jsx(mb,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("bulletList"))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().toggleBulletList().run()},{label:"Numbered list",icon:u.jsx(vS,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("orderedList"))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().toggleOrderedList().run()},{label:"To-do list",icon:u.jsx(bS,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("taskList"))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().toggleTaskList().run()},{label:"Blockquote",icon:u.jsx(jI,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("blockquote"))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().setBlockquote().run()},{label:"Code block",icon:u.jsx(TI,{className:"block-type-icon"}),isActive:()=>(e==null?void 0:e.isActive("codeBlock"))||!1,run:()=>e==null?void 0:e.chain().focus().clearNodes().setCodeBlock().run()}],o=i.find(a=>a.isActive()),s=(o==null?void 0:o.label)??"Text";return x.useEffect(()=>{if(!t)return;const a=l=>{r.current&&!r.current.contains(l.target)&&n(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[t]),u.jsxs("div",{ref:r,className:"block-type-dropdown",children:[u.jsxs("button",{className:"block-type-trigger",onMouseDown:a=>{a.preventDefault(),n(l=>!l)},children:[u.jsx("span",{children:s}),u.jsx(fb,{size:11,className:t?"rotated":""})]}),t&&u.jsxs("div",{className:"block-type-menu",children:[u.jsx("p",{className:"block-type-menu-label",children:"Turn into"}),i.map(({label:a,icon:l,isActive:c,run:d})=>u.jsxs("button",{className:["block-type-item",c()?"active":""].filter(
630Boolean).join(" "),onMouseDown:f=>{f.preventDefault(),d(),n(!1)},children:[u.jsx("span",{className:"block-type-item-icon",children:l}),a]},a))]})]})}function vht({onAction:e}){const[t,n]=x.useState(!1),r=x.useRef(null);return x.useEffect(()=>{if(!t)return;const i=o=>{r.current&&!r.current.contains(o.target)&&n(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[t]),u.jsxs("div",{ref:r,className:"ai-dropdown",children:[u.jsxs("button",{className:"ai-dropdown-trigger",onMouseDown:i=>{i.preventDefault(),n(o=>!o)},children:[u.jsx(ov,{size:14,className:"ai-dropdown-sparkle"}),u.jsx("span",{children:"AI"}),u.jsx(fb,{size:10,className:t?"rotated":""})]}),t&&u.jsxs("div",{className:"ai-dropdown-menu",children:[u.jsx("p",{className:"ai-dropdown-label",children:"AI actions"}),ght.map(({key:i,label:o,icon:s})=>u.jsxs("button",{className:"ai-dropdown-item",onMouseDown:a=>{a.preventDefault(),n(!1),e(i)},children:[u.jsx("span",{className:"ai-dropdown-item-icon",children:u.jsx(s,{size:14})}),o]},i))]})]})}function bht({keyword:e,onAddKeyword:t,onGenerateFAQs:n}){const[r,i]=x.useState(!1),o=x.useRef(null);return x.useEffect(()=>{if(!r)return;const s=a=>{o.current&&!o.current.contains(a.target)&&i(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[r]),u.jsxs("div",{ref:o,className:"ai-dropdown",children:[u.jsxs("button",{className:"ai-dropdown-trigger",onMouseDown:s=>{s.preventDefault(),i(a=>!a)},children:[u.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"ai-dropdown-sparkle",children:[u.jsx("rect",{width:"20",height:"20",rx:"4",fill:"#185FA5"}),u.jsx("circle",{cx:"8.5",cy:"8.5",r:"5.5",fill:"none",stroke:"#fff",strokeWidth:"1.5"}),u.jsx("line",{x1:"12.8",y1:"12.8",x2:"16.5",y2:"16.5",stroke:"#fff",strokeWidth:"1.8",strokeLinecap:"round"}),u.jsx("line",{x1:"4",y1:"12",x2:"11.5",y2:"12",stroke:"#fff",strokeWidth:"1.1",strokeLinecap:"round",opacity:"0.7"}),u.jsx("line",{x1:"4",y1:"14.5",x2:"10.5",y2:"14.5",stroke:"#fff",strokeWidth:"1.1",strokeLinecap:"round",opacity:"0.5"})]}),u.jsx("span",{children:"SEO"}),u.jsx(fb,{size:10,className:r?"rotated":""})]}),r&&u.jsxs("div",{className:"ai-dropdown-menu",children:[u.jsx("p",{className:"ai-dropdown-label",children:"SEO actions"}),u.jsxs("button",{className:"ai-dropdown-item",onMouseDown:s=>{s.preventDefault(),i(!1),t()},children:[u.jsx("span",{className:"ai-dropdown-item-icon",children:u.jsx(hlt,{size:14})}),"Add keyword",e?` "${e}"`:""]}),u.jsxs("button",{className:"ai-dropdown-item",onMouseDown:s=>{s.preventDefault(),i(!1),n()},children:[u.jsx("span",{className:"ai-dropdown-item-icon",children:u.jsx(Kat,{size:14})}),"Generate FAQs"]})]})]})}const F2={status:"idle",from:0,to:0,originalText:"",streamedText:"",lastAction:"",lastInstruction:""};function xht({keyword:e}){const{editor:t}=wh(),[n,r]=x.useState(F2),i=x.useRef(null),o=x.useRef(null),s=x.useCallback(()=>{if(!t||!i.current)return;const{from:b,to:C}=i.current,S=Math.min(b,t.state.doc.content.size),E=Math.min(C,t.state.doc.content.size);S<E&&t.chain().focus().deleteRange({from:S,to:E}).run(),i.current=null},[t]),a=x.useCallback(async(b,C,S,E)=>{var N,j;if(!t)return;(N=o.current)==null||N.abort();const A=new AbortController;if(o.current=A,r(T=>({...T,status:"thinking"})),i.current){const{from:T,to:O}=i.current;t.chain().focus().deleteRange({from:T,to:O}).run(),i.current=null}let _=E;try{const O=await fetch("https://api.seio.so/api/ai/inline",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:b,action:C,instruction:S}),signal:A.signal});if(!O.ok||!O.body)throw new Error("Request failed");const D=O.body.getReader(),R=new TextDecoder;let I="",F="",$=!1;for(r(H=>({...H,status:"writing"}));!$;){const{done:H,value:L}=await D.read();if(H)break;I+=R.decode(L,{stream:!0});const B=I.split(` 631`);I=B.pop()??"";for(const z of B){if(!z.startsWith("data: "))continue;const V=z.slice(6).trim();if(V==="[DONE]"){$=!0;break}try{const{text:U}=JSON.parse(V);if(!U)continue;const W=(j=t.schema.marks.textStyle)==null?void 0:j.create({color:mht}),G=t.state.tr.insertText(U,_);W&&G.addMark(_,_+U.length,W),t.view.dispatch(G),F+=U,_+=U.length,r(Y=>({...Y,to:_}))}catch{}}}i.current={from:E,to:_},r(H=>({...H,status:"review",to:_,streamedText:F}))}catch(T){if(T instanceof Error&&T.name==="AbortError")return;console.error("[AI inline]",T),r(F2)}},[t]),l=x.useCallback(b=>{if(!t)return;const{from:C,to:S}=t.state.selection;if(C===S)return;const E=t.state.doc.textBetween(C,S,` 632`);
632if(E.trim()){if(b==="custom"){r({status:"review",from:C,to:C,originalText:E,streamedText:"",lastAction:"ask",lastInstruction:""});return}t.chain().focus().deleteRange({from:C,to:S}).run(),r({status:"thinking",from:C,to:C,originalText:E,streamedText:"",lastAction:b,lastInstruction:""}),a(E,b,"",C)}},[t,a]),c=x.useCallback(()=>{if(!t||!i.current)return;const{from:b,to:C}=i.current;t.chain().focus().setTextSelection({from:b,to:C}).unsetColor().run(),t.commands.setTextSelection(C),i.current=null,r(F2)},[t]),d=x.useCallback(()=>{var b;if((b=o.current)==null||b.abort(),!!t){if(s(),!n.insertMode){const{from:C,originalText:S}=n;S&&t.chain().focus().insertContentAt(C,S).run()}r(F2)}},[t,n,s]),f=x.useCallback(()=>{if(!t)return;const{from:b,originalText:C,lastAction:S,lastInstruction:E}=n;r(A=>({...A,streamedText:"",to:b})),a(C,S,E,b)},[t,n,a]),p=x.useCallback(()=>{var b;(b=o.current)==null||b.abort(),i.current=i.current?{...i.current}:null,r(C=>({...C,status:"review"}))},[]),m=x.useCallback(b=>{if(!t)return;const{from:C,originalText:S}=n;r(E=>({...E,lastInstruction:b,streamedText:""})),a(S,"ask",b,C)},[t,n,a]),y=x.useCallback(()=>{if(!t)return;const{from:b,to:C}=t.state.selection;if(b===C)return;const S=t.state.doc.textBetween(b,C,` 633`);if(!S.trim())return;const E=e==null?void 0:e.trim(),A=E?`Rewrite this text to naturally incorporate the keyword "${E}" or a close variant or semantically related term. Keep the same approximate length and quality â do not pad or shrink significantly. Return only the raw rewritten text with no surrounding quotes, labels, or explanation.`:"Rewrite this text to improve its SEO by incorporating relevant keywords and semantically related terms naturally. Keep the same approximate length and quality. Return only the raw rewritten text with no surrounding quotes, labels, or explanation.";t.chain().focus().deleteRange({from:b,to:C}).run(),r({status:"thinking",from:b,to:b,originalText:S,streamedText:"",lastAction:"ask",lastInstruction:A}),a(S,"ask",A,b)},[t,e,a]),v=x.useCallback(()=>{if(!t)return;const{from:b,to:C}=t.state.selection;if(b===C)return;const S=t.state.doc.textBetween(b,C,` 634`);if(!S.trim())return;const E=e==null?void 0:e.trim(),A=`Generate 3 to 5 "People Also Ask" style FAQ questions and answers based on this text${E?` about "${E}"`:""}. Format each item exactly like this: 635 636Q: [question] 637A: [2-3 sentence answer] 638 639Separate each Q&A pair with a blank line. Return only the Q&A pairs â no introduction, no conclusion, no markdown symbols, no bullet points, no quote marks.`;t.chain().focus().setTextSelection(C).run(),t.commands.splitBlock();const _=t.state.selection.from;r({status:"thinking",from:_,to:_,originalText:S,streamedText:"",lastAction:"ask",lastInstruction:A,insertMode:!0}),a(S,"ask",A,_)},[t,e,a]);return x.useEffect(()=>{if(n.status==="idle")return;const b=C=>{C.key==="Escape"&&(C.preventDefault(),d())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[n.status,d]),t?u.jsxs(u.Fragment,{children:[u.jsxs(Vft,{editor:t,shouldShow:({editor:b,state:C,from:S,to:E})=>{if(n.status!=="idle")return!1;const{selection:A}=C;return!(FD(A)||!eS(A)||S===E||b.isActive("code")||b.isActive("codeBlock"))},tippyOptions:{duration:[150,100],placement:"top",offset:[0,8],maxWidth:"none",zIndex:40,interactive:!0},className:"selection-toolbar",children:[u.jsx(Jo,{children:u.jsx(vht,{onAction:l})}),u.jsx(Oa,{}),u.jsx(Jo,{children:u.jsx(bht,{keyword:e,onAddKeyword:y,onGenerateFAQs:v})}),u.jsx(Oa,{}),u.jsx(Jo,{children:u.jsx(yht,{})}),u.jsx(Oa,{}),u.jsxs(Jo,{children:[u.jsx(wo,{type:"bold"}),u.jsx(wo,{type:"italic"}),u.jsx(wo,{type:"underline"}),u.jsx(wo,{type:"strike"}),u.jsx(wo,{type:"code"})]}),u.jsx(Oa,{}),u.jsx(Jo,{children:u.jsx(kI,{})}),u.jsx(Oa,{}),u.jsx(Jo,{children:u.jsx(dht,{})})]}),u.jsx($me,{editor:t,aiState:n,onApply:c,onDiscard:d,onRetry:f,onStop:p,onCustomPrompt:m})]}):null}function wht(e){var t;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:o,startOfLine:s,$position:a}=e,l=r&&!i,c=att(n),d=new RegExp(`\\s${c}$`),f=s?"^":"",p=i?"":c,m=l?new RegExp(`${f}${c}.*?(?=\\s${p}|$)`,"gm"):new RegExp(`${f}(?:^)?${c}[^\\s${p}]*`,"gm"),y=((t=a.nodeBefore)==null?void 0:t.isText)&&a.nodeBefore.text;if(!y)return null;const v=a.pos-y.length,b=Array.from(y.matchAll(m)).pop();if(!b||b.input===void 0||b.index===void 0)return null;const C=b.input.slice(Math.max(0,b.index-1),b.index),S=new RegExp(`^[${o==null?void 0:o.join("")}\0]?$`).test(C);if(o!==null&&!S)return null;const E=v+b.index;let A=E+b[0].length;return l&&d.test(y.slice(A-1,A+1))&&(b[0]+=" ",A+=1),E<a.pos&&A>=a.pos?{range:{from:E,to:A},query:b[0].slice(n.length),text:b[0]}:null}var Cht=new pn("suggestion");function Sht({pluginKey:e=Cht,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:o=[" "],startOfLine:s=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:f=()=>null,items:p=()=>[],render:m=()=>({}),allow:y=()=>!0,findSuggestionMatch:v=wht,shouldShow:b}){let C;const S=m==null?void 0:m(),E=()=>{const j=t.state.selection.$anchor.pos,T=t.view.coordsAtPos(j),{top:O,right:D,bottom:R,left
639:I}=T;try{return new DOMRect(I,O,D-I,R-O)}catch{return null}},A=(j,T)=>T?()=>{const O=e.getState(t.state),D=O==null?void 0:O.decorationId,R=j.dom.querySelector(`[data-decoration-id="${D}"]`);return(R==null?void 0:R.getBoundingClientRect())||null}:E;function _(j,T){var O;try{const R=e.getState(j.state),I=R!=null&&R.decorationId?j.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`):null,F={editor:t,range:(R==null?void 0:R.range)||{from:0,to:0},query:(R==null?void 0:R.query)||null,text:(R==null?void 0:R.text)||null,items:[],command:$=>f({editor:t,range:(R==null?void 0:R.range)||{from:0,to:0},props:$}),decorationNode:I,clientRect:A(j,I)};(O=S==null?void 0:S.onExit)==null||O.call(S,F)}catch{}const D=j.state.tr.setMeta(T,{exit:!0});j.dispatch(D)}const N=new an({key:e,view(){return{update:async(j,T)=>{var O,D,R,I,F,$,H;const L=(O=this.key)==null?void 0:O.getState(T),B=(D=this.key)==null?void 0:D.getState(j.state),z=L.active&&B.active&&L.range.from!==B.range.from,V=!L.active&&B.active,U=L.active&&!B.active,W=!V&&!U&&L.query!==B.query,G=V||z&&W,Y=W||z,X=U||z&&W;if(!G&&!Y&&!X)return;const Q=X&&!G?L:B,ne=j.dom.querySelector(`[data-decoration-id="${Q.decorationId}"]`);C={editor:t,range:Q.range,query:Q.query,text:Q.text,items:[],command:ie=>f({editor:t,range:Q.range,props:ie}),decorationNode:ne,clientRect:A(j,ne)},G&&((R=S==null?void 0:S.onBeforeStart)==null||R.call(S,C)),Y&&((I=S==null?void 0:S.onBeforeUpdate)==null||I.call(S,C)),(Y||G)&&(C.items=await p({editor:t,query:Q.query})),X&&((F=S==null?void 0:S.onExit)==null||F.call(S,C)),Y&&(($=S==null?void 0:S.onUpdate)==null||$.call(S,C)),G&&((H=S==null?void 0:S.onStart)==null||H.call(S,C))},destroy:()=>{var j;C&&((j=S==null?void 0:S.onExit)==null||j.call(S,C))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(j,T,O,D){const{isEditable:R}=t,{composing:I}=t.view,{selection:F}=j,{empty:$,from:H}=F,L={...T},B=j.getMeta(e);if(B&&B.exit)return L.active=!1,L.decorationId=null,L.range={from:0,to:0},L.query=null,L.text=null,L;if(L.composing=I,R&&($||t.view.composing)){(H<T.range.from||H>T.range.to)&&!I&&!T.composing&&(L.active=!1);const z=v({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:o,startOfLine:s,$position:F.$from}),V=`id_${Math.floor(Math.random()*4294967295)}`;z&&y({editor:t,state:D,range:z.range,isActive:T.active})&&(!b||b({editor:t,range:z.range,query:z.query,text:z.text,transaction:j}))?(L.active=!0,L.decorationId=T.decorationId?T.decorationId:V,L.range=z.range,L.query=z.query,L.text=z.text):L.active=!1}else L.active=!1;return L.active||(L.decorationId=null,L.range={from:0,to:0},L.query=null,L.text=null),L}},props:{handleKeyDown(j,T){var O,D,R,I;const{active:F,range:$}=N.getState(j.state);if(!F)return!1;
639if(T.key==="Escape"||T.key==="Esc"){const L=N.getState(j.state),B=(O=C==null?void 0:C.decorationNode)!=null?O:null,z=B??(L!=null&&L.decorationId?j.dom.querySelector(`[data-decoration-id="${L.decorationId}"]`):null);if(((D=S==null?void 0:S.onKeyDown)==null?void 0:D.call(S,{view:j,event:T,range:L.range}))||!1)return!0;const U={editor:t,range:L.range,query:L.query,text:L.text,items:[],command:W=>f({editor:t,range:L.range,props:W}),decorationNode:z,clientRect:z?()=>z.getBoundingClientRect()||null:null};return(R=S==null?void 0:S.onExit)==null||R.call(S,U),_(j,e),!0}return((I=S==null?void 0:S.onKeyDown)==null?void 0:I.call(S,{view:j,event:T,range:$}))||!1},decorations(j){const{active:T,range:O,decorationId:D,query:R}=N.getState(j);if(!T)return null;const I=!(R!=null&&R.length),F=[l];return I&&F.push(d),gn.create(j.doc,[jr.inline(O.from,O.to,{nodeName:a,class:F.join(" "),"data-decoration-id":D,"data-decoration-content":c})])}}});return N}var Eht=Sht;let HM=null;function cJ(e){HM=e}let UA={active:!1,query:"",clientRect:null,commandFn:null};const VM=new Set;function bw(e){UA={...UA,...e};for(const t of VM)t(UA)}function kht(e){return VM.add(e),()=>VM.delete(e)}const _ht=jt.create({name:"slashCommand",addProseMirrorPlugins(){return[Eht({editor:this.editor,char:"/",allowSpaces:!1,decorationClass:"slash-filter",command:({editor:e,range:t,props:n})=>{n.run(e,t)},render:()=>({onStart:e=>bw({active:!0,query:e.query,clientRect:e.clientRect??null,commandFn:e.command}
639),onUpdate:e=>bw({query:e.query,clientRect:e.clientRect??null,commandFn:e.command}),onKeyDown:({event:e})=>HM?HM(e):!1,onExit:()=>bw({active:!1,query:"",clientRect:null,commandFn:null})})})]}}),Aht="#7c3aed",Nht=()=>"https://api.seio.so";function jht(e,t){return[{id:"continue",title:"Continue Writing",section:"ai",keywords:["ai","continue","write","complete"],icon:u.jsx(ov,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).run();const i=r.from;e(n,i)}},{id:"ask-ai",title:"Ask AI",section:"ai",keywords:["ai","ask","prompt","custom"],icon:u.jsx(ov,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).run();const i=r.from;t(n,i)}},{id:"text",title:"Text",section:"style",keywords:["text","paragraph","normal","plain"],icon:u.jsx(qlt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().run()}},{id:"h1",title:"Heading 1",section:"style",keywords:["h1","heading","title"],icon:u.jsx(ilt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().setHeading({level:1}).run()}},{id:"h2",title:"Heading 2",section:"style",keywords:["h2","heading","subtitle"],icon:u.jsx(slt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().setHeading({level:2}).run()}},{id:"h3",title:"Heading 3",section:"style",keywords:["h3","heading"],icon:u.jsx(llt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().setHeading({level:3}).run()}},{id:"bullet",title:"Bullet List",section:"style",keywords:["bullet","list","unordered","ul"],icon:u.jsx(ylt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().toggleBulletList().run()}},{id:"numbered",title:"Numbered List",section:"style",keywords:["numbered","ordered","list","ol"],icon:u.jsx(mlt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().toggleOrderedList().run()}},{id:"todo",title:"To-do List",section:"style",keywords:["todo","task","checklist","checkbox"],icon:u.jsx($lt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().toggleTaskList().run()}},{id:"blockquote",title:"Blockquote",section:"style",keywords:["quote","blockquote"],icon:u.jsx(Mlt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().setBlockquote().run()}},{id:"code",title:"Code Block",section:"style",keywords:["code","codeblock","snippet"],icon:u.jsx(Xat,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).clearNodes().setCodeBlock().run()}},{id:"image",title:"Image",section:"insert",keywords:["image","photo","picture","upload"],icon:u.jsx(fI,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).setImageUploadNode().run()}},{id:"separator",title:"Separator",section:"insert",keywords:["separator","divider","hr","rule","line"],icon:u.jsx(Clt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).setHorizontalRule().run()}},{id:"table",title:"Table",section:"insert",keywords:["table","grid","spreadsheet","comparison"],icon:u.jsx(Hlt,{size:15}),command:(n,r)=>{n.chain().focus().deleteRange(r).insertTable({rows:3,cols:3,withHeaderRow:!0}).run()}}]}async function qA(e,t,n,r,i,o,s){var y;const a=await fetch(`${Nht()}/api/ai/inline`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({text:t,action:n,instruction:r}),signal:o});if(!a.ok||!a.body)throw new Error("AI request failed");const l=a.body.getReader(),c=new TextDecoder;let d="",f="",p=i,m=!1;for(;!m;){const{done:v,value:b}=await l.read();if(v)break;d+=c.decode(b,{stream:!0});const C=d.split(` 640`);d=C.pop()??"";for(const S of C){if(!S.startsWith("data: "))continue;const E=S.slice(6).trim();if(E==="[DONE]"){m=!0;break}try{const{text:A}=JSON.parse(E);if(!A)continue;const _=(y=e.schema.marks.textStyle)==null?void 0:y.create({color:Aht}),N=e.state.tr.insertText(A,p);_&&N.addMark(p,p+A.length,_),e.view.dispatch(N),f+=A,p+=A.length,s(p)}catch{}}}return{from:i,to:p,accumulated:f}}const Tht={ai:"AI",style:"Style",insert:"Insert"},Mht=["ai","style","insert"],Cp={status:"idle",from:0,to:0,originalText:"",streamedText:"",lastAction:"",lastInstruction:""};function Oht(){const{editor:e}=wh(),[t,n]=x.useState({active:!1,query:"",clientRect:null,commandFn:null}),[r,i]=x.useState(0),[o,s]=x.useState(null),[a,l]=x.useState(Cp),c=x.useRef(null),d=x.useRef(null),f=x.useRef(null);x.useEffect(()=>kht(n),[]);const p=x.useCallback((j,T)=>{var F;if(!j)return;const{$from:O}=j.state.selection,R=O.node(O.depth).textContent||"";(F=c.current)==null||F.abort();const I=new AbortController;c.current=I,l({status:"thinking",from:T,to:T,originalText:"",streamedText:"",lastAction:"complete",lastInstruction:""}),qA(j,R,"complete","",T,I.signal,$=>{l(H=>({...H,status:"writing",to:$}))}).then(({to:$,accumulated:H})=>{d.current={from:T,to:$},l(L=>({...L,status:"review",to:$,streamedText:H}))}).catch($=>{$ instanceof Error&&$.name==="AbortError"||(console.error("[SlashAI]",$),l(Cp))})},[]),m=x.useCallback((j,T)=>{l({status:"review",from:T,to:T,originalText:"",streamedText:"",lastAction:"ask",lastInstruction:""})},[]),y=jht(p,m),v=t.query?y.filter(j=>j.title.toLowerCase().includes(t.query.toLowerCase())||j.keywords.some(T=>T.includes(t.query.toLowerCase()))):y,b=Mht.map(j=>({key:j,label:Tht[j],items:v.filter(T=>T.section===j)})).filter(j=>j.items.length>0),C=b.flatMap(j=>j.items);x.useEffect(()=>i(0),[t.query]),x.useEffect(()=>{const j=requestAnimationFrame(()=>{const T=document.querySelector(".slash-filter");T&&(t.query===""?T.setAttribute("data-placeholder","filter options"):T.removeAttribute("data-placeholder"))});return()=>cancelAnimationFrame(j)},[t.active,t.query]),x.useEffect(()=>{if(!t.active||!t.clientRect){s(null);return}(()=>{var O;const T=(O=t.clientRect)==null?void 0:O.call(t);T&&s({top:T.bottom+8,left:T.left})})()},[t.active,t.clientRect]),x.useEffect(()=>{if(!t.active){cJ(null);return}cJ(j=>{if(j.key==="ArrowDown")return i(T=>Math.min(T+1,C.length-1)),!0;if(j.key==="ArrowUp")return i(T=>Math.max(T-1,0)),!0;if(j.key==="Enter"){const T=C[r];return T&&t.commandFn&&e&&t.commandFn({run:(O,D)=>T.command(O,D)}),!0}return!1})},[t.active,C,r,t.commandFn,e]),x.useEffect(()=>{var T;
640const j=(T=f.current)==null?void 0:T.querySelector(`[data-slash-index="${r}"]`);j==null||j.scrollIntoView({block:"nearest"})},[r]);const S=x.useCallback(()=>{if(!e||!d.current)return;const{from:j,to:T}=d.current;e.chain().focus().setTextSelection({from:j,to:T}).unsetColor().run(),e.commands.setTextSelection(T),d.current=null,l(Cp)},[e]),E=x.useCallback(()=>{var j;if((j=c.current)==null||j.abort(),!!e){if(d.current){const{from:T,to:O}=d.current,D=Math.min(T,e.state.doc.content.size),R=Math.min(O,e.state.doc.content.size);D<R&&e.chain().focus().deleteRange({from:D,to:R}).run(),d.current=null}l(Cp)}},[e]),A=x.useCallback(()=>{var I;if(!e)return;const{from:j,lastAction:T,lastInstruction:O,originalText:D}=a;l(F=>({...F,streamedText:"",to:j})),(I=c.current)==null||I.abort();const R=new AbortController;if(c.current=R,d.current){const{from:F,to:$}=d.current;e.chain().focus().deleteRange({from:F,to:$}).run(),d.current=null}l(F=>({...F,status:"thinking"})),qA(e,D||"",T,O,j,R.signal,F=>{l($=>({...$,status:"writing",to:F}))}).then(({to:F,accumulated:$})=>{d.current={from:j,to:F},l(H=>({...H,status:"review",to:F,streamedText:$}))}).catch(F=>{F instanceof Error&&F.name==="AbortError"||l(Cp)})},[e,a]),_=x.useCallback(()=>{var j;(j=c.current)==null||j.abort(),l(T=>({...T,status:"review"}))},[]),N=x.useCallback(j=>{var D;if(!e)return;const{from:T}=a;(D=c.current)==null||D.abort();const O=new AbortController;if(c.current=O,d.current){const{from:R,to:I}=d.current;e.chain().focus().deleteRange({from:R,to:I}).run(),d.current=null}l(R=>({...R,status:"thinking",lastInstruction:j,streamedText:"",to:T})),qA(e,"","ask",j,T,O.signal,R=>{l(I=>({...I,status:"writing",to:R}))}).then(({to:R,accumulated:I})=>{d.current={from:T,to:R},l(F=>({...F,status:"review",to:R,streamedText:I}))}).catch(R=>{R instanceof Error&&R.name==="AbortError"||l(Cp)})},[e,a]);return x.useEffect(()=>{if(a.status==="idle")return;const j=T=>{T.key==="Escape"&&(T.preventDefault(),E())};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[a.status,E]),x.useEffect(()=>{if(!t.active)return;const j=T=>{const O=T.target,D=document.querySelector(".slash-menu");D&&!D.contains(O)&&bw({active:!1,query:"",clientRect:null,commandFn:null})};return document.addEventListener("mousedown",j),()=>document.removeEventListener("mousedown",j)},[t.active]),e?u.jsxs(u.Fragment,{children:[t.active&&o&&Si.createPortal(u.jsx("div",{className:"slash-menu",style:{position:"fixed",top:o.top,left:o.left,zIndex:50},onMouseDown:j=>j.preventDefault(),children:u.jsxs("div",{className:"slash-menu-inner",ref:f,children:[b.length===0&&u.jsx("div",{className:"slash-menu-empty",children:"No results"}),b.map((j,T)=>u.jsxs("div",{className:"slash-section",children:[u.jsx("div",{className:"slash-section-label",children:j.label}),j.items.map(O=>{const D=C.indexOf(O);return u.jsxs("button",{"data-slash-index":D,className:["slash-item",D===r?"selected":""].filter(Boolean).join(" "),onMouseEnter:()=>i(D),onMouseDown:R=>{R.preventDefault(),t.commandFn&&t.commandFn({run:(I,F)=>O.command(I,F)})},children:[u.jsx("span",{className:"slash-item-icon",children:O.icon}),u.jsx("span",{className:"slash-item-title",children:O.title})]},O.id)}),T<b.length-1&&u.jsx("div",{className:"slash-section-divider"})]},j.key))]})}),document.body),u.jsx($me,{editor:e,aiState:a,onApply:S,onDiscard:E,onRetry:A,onStop:_,onCustomPrompt:N})]}):null}function Rht({content:e,onChange:t,editorRef:n,onEditorReady:r,title:i,onTitleChange:o,keyword:s}){const a=x.useRef(!1),l=x.useRef(null),c=()=>{const f=l.current;f&&(f.style.height="auto",f.style.height=f.scrollHeight+"px")};x.useEffect(()=>{c()},[i]);const d=jtt({immediatelyRender:!1,editorProps:{attributes:{autocomplete:"off",autocorrect:"off",autocapitalize:"off","aria-label":"Main content area, start typing to enter text."}},extensions:[brt.configure({horizontalRule:!1,link:{openOnClick:!1,enableClickSelection:!0}}),fft,nct.configure({types:["heading","paragraph"]}),Upe,Vpe.configure({nested:!0}),Nct.configure({multicolor:!0}),tct,kct,Tct,jct,mrt,A0e,N0e,Mct,dft.configure({accept:"image/*",maxSize:FM,limit:3,upload:Jdt,onError:f=>console.error("Upload failed:",f)}),K0e.configure({resizable:!1}),G0e,W0e,q0e,gat.configure({html:!0,tightLists:!0}),wft.configure({controls:!0,nocookie:!0,modestBranding:!0,inline:!1,width:640,height:360}),pft,_ht,Oct.configure({placeholder:"Write, type '/' for commandsâ¦"})],content:"",onUpdate:({editor:f})=>{t(f.getHTML(),f.storage.characterCount.words())}});return x.useEffect(()=>{d&&(n&&(n.current=d),r&&r(d))},[d,n,r]),x.useEffect(()=>{d&&e&&!a.current&&(!e.trimStart().startsWith("<")?d.commands.setContent(e):d.commands.setContent(e,!1,{preserveWhitespace:"full"}),a.current=!0,t(d.getHTML(),d.storage.characterCount.words()))},[d,e]),u.jsxs("div",{className:"simple-editor-wrapper",children:[o!==void 0&&u.jsx("div",{className:"article-title-area",children:u.jsx("textarea",{ref:l,className:"article-title-textarea",value:i??"",onChange:f=>{o(f.target.value),c()},placeholder:"Title",rows:1})}),u.jsxs(ab.Provider,{value:{editor:d},children:[u.jsx(xht,{keyword:s}),u.jsx(Oht,{}),u.jsx(ype,{editor:d,role:"presentation",className:"simple-editor-content"})]})]})}const MI=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"
640currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z",fill:"currentColor"})}));MI.displayName="ChevronDownIcon";function Pht({level:e,shortcutKeys:t=Ume[e]}){return u.jsx(Rc,{children:Mc({shortcutKeys:t})})}const zme=x.forwardRef(({editor:e,level:t,text:n,hideWhenUnavailable:r=!1,onToggled:i,showShortcut:o=!1,onClick:s,children:a,...l},c)=>{const{editor:d}=In(e),{isVisible:f,canToggle:p,isActive:m,handleToggle:y,label:v,Icon:b,shortcutKeys:C}=Iht({editor:d,level:t,hideWhenUnavailable:r,onToggled:i}),S=x.useCallback(E=>{s==null||s(E),!E.defaultPrevented&&y()},[y,s]);return f?u.jsx(yr,{type:"button",variant:"ghost","data-active-state":m?"on":"off",role:"button",tabIndex:-1,disabled:!p,"data-disabled":!p,"aria-label":v,"aria-pressed":m,tooltip:v,onClick:S,...l,ref:c,children:a??u.jsxs(u.Fragment,{children:[u.jsx(b,{className:"tiptap-button-icon"}),n&&u.jsx("span",{className:"tiptap-button-text",children:n}),o&&u.jsx(Pht,{level:t,shortcutKeys:C})]})}):null});zme.displayName="HeadingButton";const Fme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z",fill:"currentColor"}),u.jsx("path",{d:"M17 9C17.5523 9 18 9.44772 18 10V13H20V10C20 9.44772 20.4477 9 21 9C21.5523 9 22 9.44772 22 10V18C22 18.5523 21.5523 19 21 19C20.4477 19 20 18.5523 20 18V15H17C16.4477 15 16 14.5523 16 14V10C16 9.44772 16.4477 9 17 9Z",fill:"currentColor"})]}));Fme.displayName="HeadingFourIcon";const Bme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",fill:"currentColor"}),u.jsx("path",{d:"M16 10C16 9.44772 16.4477 9 17 9H21C21.5523 9 22 9.44772 22 10C22 10.5523 21.5523 11 21 11H18V12H18.3C20.2754 12 22 13.4739 22 15.5C22 17.5261 20.2754 19 18.3 19C17.6457 19 17.0925 18.8643 16.5528 18.5944C16.0588 18.3474 15.8586 17.7468 16.1055 17.2528C16.3525 16.7588 16.9532 16.5586 17.4472 16.8056C17.7074 16.9357 17.9542 17 18.3 17C19.3246 17 20 16.2739 20 15.5C20 14.7261 19.3246 14 18.3 14H17C16.4477 14 16 13.5523 16 13L16 12.9928V10Z",fill:"currentColor"})]}));Bme.displayName="HeadingFiveIcon";const Hme=x.memo(({className:e,...t})=>u.jsxs("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:[u.jsx("path",{d:"M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z",fill:"currentColor"}),u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.7071 9.29289C21.0976 9.68342 21.0976 10.3166 20.7071 10.7071C19.8392 11.575 19.2179 12.2949 18.7889 13.0073C18.8587 13.0025 18.929 13 19 13C20.6569 13 22 14.3431 22 16C22 17.6569 20.6569 19 19 19C17.3431 19 16 17.6569 16 16C16 14.6007 16.2837 13.4368 16.8676 12.3419C17.4384 11.2717 18.2728 10.3129 19.2929 9.29289C19.6834 8.90237 20.3166 8.90237 20.7071 9.29289ZM19 17C18.4477 17 18 16.5523 18 16C18 15.4477 18.4477 15 19 15C19.5523 15 20 15.4477 20 16C20 16.5523 19.5523 17 19 17Z",fill:"currentColor"})]}));Hme.displayName="HeadingSixIcon";const Vme={1:_I,2:AI,3:NI,4:Fme,5:Bme,6:Hme},Ume={1:"ctrl+alt+1",2:"ctrl+alt+2",3:"ctrl+alt+3",4:"ctrl+alt+4",5:"ctrl+
640alt+5",6:"ctrl+alt+6"};function sv(e,t,n=!0){return!e||!e.isEditable||!Oc("heading",e)||Td(e,["image"])?!1:n?Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])?t?e.can().setNode("heading",{level:t})||e.can().clearNodes():e.can().setNode("heading")||e.can().clearNodes():!1:t?e.can().setNode("heading",{level:t}):e.can().setNode("heading")}function OI(e,t){return!e||!e.isEditable?!1:Array.isArray(t)?t.some(n=>e.isActive("heading",{level:n})):t?e.isActive("heading",{level:t}):e.isActive("heading")}function Dht(e,t){var i,o,s;if(!e||!e.isEditable)return!1;const n=Array.isArray(t)?t:[t],r=n.find(a=>sv(e,a));if(!r)return!1;try{const a=e.view;let l=a.state,c=l.tr;const d=gS(e),f=Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])&&d.length===1;if((l.selection.empty||l.selection instanceof Ue)&&f){const b=(i=mS({editor:e,node:l.selection.$anchor.node(1)}))==null?void 0:i.pos;if(!Em(b))return!1;c=c.setSelection($e.create(l.doc,b)),a.dispatch(c),l=a.state}const p=l.selection;let m=e.chain().focus();if(p instanceof $e){const b=(o=p.node.firstChild)==null?void 0:o.firstChild,C=(s=p.node.lastChild)==null?void 0:s.lastChild,S=b?p.from+b.nodeSize:p.from+1,E=C?p.to-C.nodeSize:p.to-1,A=l.doc.resolve(S),_=l.doc.resolve(E);m=m.setTextSelection(Ue.between(A,_)).clearNodes()}return(n.some(b=>e.isActive("heading",{level:b}))?m.setNode("paragraph"):m.setNode("heading",{level:r})).run(),e.chain().focus().selectTextblockEnd().run(),!0}catch{return!1}}function qme(e){const{editor:t,level:n,hideWhenUnavailable:r}=e;return t?r?!t.isEditable||!Oc("heading",t)?!1:t.isActive("code")?!0:Array.isArray(n)?n.some(i=>sv(t,i)):sv(t,n):!0:!1}function Iht(e){const{editor:t,level:n,hideWhenUnavailable:r=!1,onToggled:i}=e,{editor:o}=In(t),[s,a]=x.useState(!0),l=sv(o,n),c=OI(o,n);x.useEffect(()=>{if(!o)return;const f=()=>{a(qme({editor:o,level:n,hideWhenUnavailable:r}))};return f(),o.on("selectionUpdate",f),()=>{o.off("selectionUpdate",f)}},[o,n,r]);const d=x.useCallback(()=>{if(!o)return!1;const f=Dht(o,n);return f&&(i==null||i()),f},[o,n,i]);return{isVisible:s,isActive:c,handleToggle:d,canToggle:l,label:`Heading ${n}`,shortcutKeys:Ume[n],Icon:Vme[n]}}const Lht=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.7071 5.29289C21.0976 5.68342 21.0976 6.31658 20.7071 6.70711L9.70711 17.7071C9.31658 18.0976 8.68342 18.0976 8.29289 17.7071L3.29289 12.7071C2.90237 12.3166 2.90237 11.6834 3.29289 11.2929C3.68342 10.9024 4.31658 10.9024 4.70711 11.2929L9 15.5858L19.2929 5.29289C19.6834 4.90237 20.3166 4.90237 20.7071 5.29289Z",fill:"currentColor"})}));Lht.displayName="CheckIcon";function Wme({...e}){return u.jsx(use,{"data-slot":"tiptap-dropdown-menu",...e})}function Gme({...e}){return u.jsx(dse,{"data-slot":"tiptap-dropdown-menu-trigger",...e})}function Kme({className:e,align:t="start",sideOffset:n=4,...r}){return u.jsx(fse,{children:u.jsx(hse,{"data-slot":"tiptap-dropdown-menu-content",sideOffset:n,align:t,className:si("tiptap-dropdown-menu-content",e),onCloseAutoFocus:i=>i.preventDefault(),...r})})}function Yme({className:e,...t}){return u.jsx(SNe,{"data-slot":"tiptap-dropdown-menu-group",className:si("tiptap-dropdown-menu-group",e),...t})}function Xme({className:e,inset:t,variant:n="default",...r}){return u.jsx(pse,{"data-slot":"tiptap-dropdown-menu-item","data-inset":t,"data-variant":n,className:si("tiptap-dropdown-menu-item",e),...r})}const Zme=x.forwardRef(({editor:e,levels:t=[1,2,3,4,5,6],hideWhenUnavailable:n=!1,onOpenChange:r,children:i,modal:o=!0,...s},a)=>{const{editor:l}=In(e),[c,d]=x.useState(!1),{isVisible:f,isActive:p,canToggle:m,Icon:y}=zht({editor:l,levels:t,hideWhenUnavailable:n}),v=x.useCallback(b=>{!l||!m||(d(b),r==null||r(b))},[m,l,r]);return f?u.jsxs(Wme,{modal:o,open:c,onOpenChange:v,children:[u.jsx(Gme,{asChild:!0,children:u.jsx(yr,{type:"button",variant:"ghost","data-active-state":p?"on":"off",role:"button",tabIndex:-1,disabled:!m,"data-disabled":!m,"aria-label":"Format text as heading","aria-pressed":p,tooltip:"Heading",...s,ref:a,children:i||u.jsxs(u.Fragment,{children:[u.jsx(y,{className:"tiptap-button-icon"}),u.jsx(MI,{className:"tiptap-button-dropdown-small"})]})})}
640),u.jsx(Kme,{align:"start",children:u.jsx(Yme,{children:t.map(b=>u.jsx(Xme,{asChild:!0,children:u.jsx(zme,{editor:l,level:b,text:`Heading ${b}`,showTooltip:!1})},`heading-${b}`))})})]}):null});Zme.displayName="HeadingDropdownMenu";const Qme=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{d:"M6 3C6.55228 3 7 3.44772 7 4V11H17V4C17 3.44772 17.4477 3 18 3C18.5523 3 19 3.44772 19 4V20C19 20.5523 18.5523 21 18 21C17.4477 21 17 20.5523 17 20V13H7V20C7 20.5523 6.55228 21 6 21C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3Z",fill:"currentColor"})}));Qme.displayName="HeadingIcon";function $ht(e,t=[1,2,3,4,5,6]){if(!(!e||!e.isEditable))return t.find(n=>OI(e,n))}function zht(e){const{editor:t,levels:n=[1,2,3,4,5,6],hideWhenUnavailable:r=!1}=e||{},{editor:i}=In(t),[o,s]=x.useState(!0),a=$ht(i,n),l=OI(i),c=sv(i);return x.useEffect(()=>{if(!i)return;const d=()=>{s(qme({editor:i,hideWhenUnavailable:r,level:n}))};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[i,r,n]),{isVisible:o,activeLevel:a,isActive:l,canToggle:c,levels:n,label:"Heading",Icon:a?Vme[a]:Qme}}function Fht({shortcutKeys:e=UM}){return u.jsx(Rc,{children:Mc({shortcutKeys:e})})}const Jme=x.forwardRef(({editor:e,text:t,hideWhenUnavailable:n=!1,onInserted:r,showShortcut:i=!1,onClick:o,icon:s,children:a,...l},c)=>{const{editor:d}=In(e),{isVisible:f,canInsert:p,handleImage:m,label:y,isActive:v,shortcutKeys:b,Icon:C}=opt({editor:d,hideWhenUnavailable:n,onInserted:r}),S=x.useCallback(A=>{o==null||o(A),!A.defaultPrevented&&m()},[m,o]);if(!f)return null;const E=s??C;return u.jsx(yr,{type:"button",variant:"ghost","data-active-state":v?"on":"off",role:"button",tabIndex:-1,disabled:!p,"data-disabled":!p,"aria-label":y,"aria-pressed":v,tooltip:y,onClick:S,...l,ref:c,children:a??u.jsxs(u.Fragment,{children:[u.jsx(E,{className:"tiptap-button-icon"}),t&&u.jsx("span",{className:"tiptap-button-text",children:t}),i&&u.jsx(Fht,{shortcutKeys:b})]})})});Jme.displayName="ImageUploadButton";const ege=["shift","alt","meta","mod","ctrl","control"],Bht={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function Qu(e){return(Bht[e.trim()]||e.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function tge(e){return ege.includes(e)}function WA(e,t=","){return e.toLowerCase().split(t)}function GA(e,t="+",n=">",r=!1,i,o){let s=[],a=!1;e=e.trim(),e.includes(n)?(a=!0,s=e.toLocaleLowerCase().split(n).map(d=>Qu(d))):s=e.toLocaleLowerCase().split(t).map(d=>Qu(d));const l={alt:s.includes("alt"),ctrl:s.includes("ctrl")||s.includes("control"),shift:s.includes("shift"),meta:s.includes("meta"),mod:s.includes("mod"),useKey:r},c=s.filter(d=>!ege.includes(d));return{...l,keys:c,description:i,isSequence:a,hotkey:e,metadata:o}}typeof document<"u"&&(document.addEventListener("keydown",e=>{e.code!==void 0&&nge([Qu(e.code)])}),document.addEventListener("keyup",e=>{e.code!==void 0&&rge([Qu(e.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{Ql.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{Ql.clear()},0)}));const Ql=new Set;function RI(e){return Array.isArray(e)}function Hht(e,t=","){return(RI(e)?e:e.split(t)).every(n=>Ql.has(n.trim().toLowerCase()))}function nge(e){const t=Array.isArray(e)?e:[e];Ql.has("meta")&&Ql.forEach(n=>{tge(n)||Ql.delete(n.toLowerCase())}),t.forEach(n=>{Ql.add(n.toLowerCase())})}function rge(e){const t=Array.isArray(e)?e:[e];e==="meta"?Ql.clear():t.forEach(n=>{Ql.delete(n.toLowerCase())})}function Vht(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Uht(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}const qht=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function Wht(e){return ige(e,qht)}function ige(e,t=!1){const{target:n,composed:r}=e;let i,o;return Ght(n)&&r?(i=e.composedPath()[0]&&e.composedPath()[0].tagName,o=e.composedPath()[0]&&e.composedPath()[0].role):(i=n&&n.tagName,o=n&&n.role),RI(t)?!!(i&&t&&t.some(s=>s.toLowerCase()===i.toLowerCase()||s===o)):!!(i&&t&&t)}function Ght(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Kht(e,t){return e.length===0&&t?!1:t?e.some(n=>t.includes(n))||e.includes("*"):!0}const Yht=(e,t,n=!1)=>{const{alt:r,meta:i,mod:o,shift:s,ctrl:a,keys:l,useKey:c}=t,{code:d,key:f,ctrlKey:p,metaKey:m,shiftKey:y,altKey:v}
640=e,b=Qu(d);if(c&&(l==null?void 0:l.length)===1&&l.includes(f.toLowerCase()))return!0;if(!(l!=null&&l.includes(b))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(b))return!1;if(!n){if(r!==v&&b!=="alt"||s!==y&&b!=="shift")return!1;if(o){if(!m&&!p)return!1}else if(i!==m&&b!=="meta"&&b!=="os"||a!==p&&b!=="ctrl"&&b!=="control")return!1}return l&&l.length===1&&l.includes(b)?!0:l&&l.length>0?l.includes(b)?Hht(l):!1:!l||l.length===0},Xht=x.createContext(void 0),Zht=()=>x.useContext(Xht);function oge(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce((n,r)=>n&&oge(e[r],t[r]),!0):e===t}const Qht=x.createContext({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Jht=()=>x.useContext(Qht);function ept(e){const t=x.useRef(void 0);return oge(t.current,e)||(t.current=e),t.current}const uJ=e=>{e.stopPropagation(),e.preventDefault(),e.stopImmediatePropagation()},tpt=typeof window<"u"?x.useLayoutEffect:x.useEffect;function sge(e,t,n,r){const i=x.useRef(null),o=x.useRef(!1),s=Array.isArray(n)?Array.isArray(r)?void 0:r:n,a=RI(e)?e.join(s==null?void 0:s.delimiter):e,l=Array.isArray(n)?n:Array.isArray(r)?r:void 0,c=x.useCallback(t,l??[]),d=x.useRef(c);l?d.current=c:d.current=t;const f=ept(s),{activeScopes:p}=Jht(),m=Zht();return tpt(()=>{if((f==null?void 0:f.enabled)===!1||!Kht(p,f==null?void 0:f.scopes))return;let y=[],v;const b=(A,_=!1)=>{var N;if(!(Wht(A)&&!ige(A,f==null?void 0:f.enableOnFormTags))){if(i.current!==null){const j=i.current.getRootNode();if((j instanceof Document||j instanceof ShadowRoot)&&j.activeElement!==i.current&&!i.current.contains(j.activeElement)){uJ(A);return}}(N=A.target)!=null&&N.isContentEditable&&!(f!=null&&f.enableOnContentEditable)||WA(a,f==null?void 0:f.delimiter).forEach(j=>{var O,D,R,I;if(j.includes((f==null?void 0:f.splitKey)??"+")&&j.includes((f==null?void 0:f.sequenceSplitKey)??">")){console.warn(`Hotkey ${j} contains both ${(f==null?void 0:f.splitKey)??"+"} and ${(f==null?void 0:f.sequenceSplitKey)??">"} which is not supported.`);return}const T=GA(j,f==null?void 0:f.splitKey,f==null?void 0:f.sequenceSplitKey,f==null?void 0:f.useKey,f==null?void 0:f.description,f==null?void 0:f.metadata);if(T.isSequence){v=setTimeout(()=>{y=[]},(f==null?void 0:f.sequenceTimeoutMs)??1e3);const F=T.useKey?A.key:Qu(A.code);if(tge(F.toLowerCase()))return;y.push(F);const $=(O=T.keys)==null?void 0:O[y.length-1];if(F!==$){y=[],v&&clearTimeout(v);return}y.length===((D=T.keys)==null?void 0:D.length)&&(d.current(A,T),v&&clearTimeout(v),y=[])}else if(Yht(A,T,f==null?void 0:f.ignoreModifiers)||(R=T.keys)!=null&&R.includes("*")){if((I=f==null?void 0:f.ignoreEventWhen)!=null&&I.call(f,A)||_&&o.current)return;if(Vht(A,T,f==null?void 0:f.preventDefault),!Uht(A,T,f==null?void 0:f.enabled)){uJ(A);return}d.current(A,T),_||(o.current=!0)}})}},C=A=>{A.code!==void 0&&(nge(Qu(A.code)),((f==null?void 0:f.keydown)===void 0&&(f==null?void 0:f.keyup)!==!0||f!=null&&f.keydown)&&b(A))},S=A=>{A.code!==void 0&&(rge(Qu(A.code)),o.current=!1,f!=null&&f.keyup&&b(A,!0))},E=i.current||(s==null?void 0:s.document)||document;return E.addEventListener("keyup",S,s==null?void 0:s.eventListenerOptions),E.addEventListener("keydown",C,s==null?void 0:s.eventListenerOptions),m&&WA(a,f==null?void 0:f.delimiter).forEach(A=>{m.addHotkey(GA(A,f==null?void 0:f.splitKey,f==null?void 0:f.sequenceSplitKey,f==null?void 0:f.useKey,f==null?void 0:f.description,f==null?void 0:f.metadata))}),()=>{E.removeEventListener("keyup",S,s==null?void 0:s.eventListenerOptions),E.removeEventListener("keydown",C,s==null?void 0:s.eventListenerOptions),m&&WA(a,f==null?void 0:f.delimiter).forEach(A=>{m.removeHotkey(GA(A,f==null?void 0:f.splitKey,f==null?void 0:f.sequenceSplitKey,f==null?void 0:f.useKey,f==null?void 0:f.description,f==null?void 0:f.metadata))}),y=[],v&&clearTimeout(v)}},[a,f,p]),i}const age=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20 2C20 1.44772 19.5523 1 19 1C18.4477 1 18 1.44772 18 2V4H16C15.4477 4 15 4.44772 15 5C15 5.55228 15.4477 6 16 6H18V8C18 8.55228 18.4477 9 19 9C19.5523 9 20 8.55228 20 8V6H22C22.5523 6 23 5.55228 23 5C23 4.44772 22.5523 4 22 4H20V2ZM5 4C4.73478 4 4.48043 4.10536 4.29289 4.29289C4.10536 4.48043 4 4.73478 4 5V19C4 19.2652 4.10536 19.5196 4.29289 19.7071C4.48043 19.8946 4.73478 20 5 20H5.58579L14.379 11.2068C14.9416 10.6444 15.7045 10.3284 16.5 10.3284C17.2955 10.3284 18.0584
64010.6444 18.621 11.2068L20 12.5858V12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12V14.998C22 14.9994 22 15.0007 22 15.002V19C22 19.7957 21.6839 20.5587 21.1213 21.1213C20.5587 21.6839 19.7957 22 19 22H6.00219C6.00073 22 5.99927 22 5.99781 22H5C4.20435 22 3.44129 21.6839 2.87868 21.1213C2.31607 20.5587 2 19.7957 2 19V5C2 4.20435 2.31607 3.44129 2.87868 2.87868C3.44129 2.31607 4.20435 2 5 2H12C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4H5ZM8.41422 20H19C19.2652 20 19.5196 19.8946 19.7071 19.7071C19.8946 19.5196 20 19.2652 20 19V15.4142L17.207 12.6212C17.0195 12.4338 16.7651 12.3284 16.5 12.3284C16.2349 12.3284 15.9806 12.4337 15.7931 12.6211L8.41422 20ZM6.87868 6.87868C7.44129 6.31607 8.20435 6 9 6C9.79565 6 10.5587 6.31607 11.1213 6.87868C11.6839 7.44129 12 8.20435 12 9C12 9.79565 11.6839 10.5587 11.1213 11.1213C10.5587 11.6839 9.79565 12 9 12C8.20435 12 7.44129 11.6839 6.87868 11.1213C6.31607 10.5587 6 9.79565 6 9C6 8.20435 6.31607 7.44129 6.87868 6.87868ZM9 8C8.73478 8 8.48043 8.10536 8.29289 8.29289C8.10536 8.48043 8 8.73478 8 9C8 9.26522 8.10536 9.51957 8.29289 9.70711C8.48043 9.89464 8.73478 10 9 10C9.26522 10 9.51957 9.89464 9.70711 9.70711C9.89464 9.51957 10 9.26522 10 9C10 8.73478 9.89464 8.48043 9.70711 8.29289C9.51957 8.10536 9.26522 8 9 8Z",fill:"currentColor"})}));age.displayName="ImagePlusIcon";const UM="mod+shift+i";function PI(e){return!e||!e.isEditable||!pS(e,"imageUpload")?!1:e.can().insertContent({type:"imageUpload"})}function npt(e){return!e||!e.isEditable?!1:e.isActive("imageUpload")}function rpt(e){if(!e||!e.isEditable||!PI(e))return!1;try{return e.chain().focus().insertContent({type:"imageUpload"}).run()}catch{return!1}}function ipt(e){const{editor:t,hideWhenUnavailable:n}=e;return!t||!t.isEditable?!1:n?pS(t,"imageUpload")?t.isActive("code")?!0:PI(t):!1:!0}function opt(e){const{editor:t,hideWhenUnavailable:n=!1,onInserted:r}=e||{},{editor:i}=In(t),o=yS(),[s,a]=x.useState(!0),l=PI(i),c=npt(i);x.useEffect(()=>{if(!i)return;const f=()=>{a(ipt({editor:i,hideWhenUnavailable:n}))};return f(),i.on("selectionUpdate",f),()=>{i.off("selectionUpdate",f)}},[i,n]);const d=x.useCallback(()=>{if(!i)return!1;const f=rpt(i);return f&&(r==null||r()),f},[i,r]);return sge(UM,f=>{f.preventDefault(),d()},{enabled:s&&l,enableOnContentEditable:!o,enableOnFormTags:!0}),{isVisible:s,isActive:c,handleImage:d,canInsert:l,label:"Add image",shortcutKeys:UM,Icon:age}}const lge=x.forwardRef(({editor:e,onClick:t,...n},r)=>{const{editor:i}=In(e),o=!!(i!=null&&i.isEditable),s=x.useCallback(a=>
640{if(t==null||t(a),a.defaultPrevented||!i)return;const l=i.commands;if(typeof l.setYoutubeEmbedPlaceholder=="function"){l.setYoutubeEmbedPlaceholder();return}i.chain().focus().insertContent({type:"youtubeEmbedPlaceholder"}).run()},[i,t]);return u.jsx(yr,{type:"button",variant:"ghost",role:"button",tabIndex:-1,disabled:!o,"data-disabled":!o,"aria-label":"Embed YouTube video",tooltip:"Embed YouTube video",onClick:s,ref:r,...n,children:u.jsx(R0e,{className:"tiptap-button-icon"})})});lge.displayName="YoutubeButton";function spt({type:e,shortcutKeys:t=dge[e]}){return u.jsx(Rc,{children:Mc({shortcutKeys:t})})}const cge=x.forwardRef(({editor:e,type:t,text:n,hideWhenUnavailable:r=!1,onToggled:i,showShortcut:o=!1,onClick:s,children:a,...l},c)=>{const{editor:d}=In(e),{isVisible:f,canToggle:p,isActive:m,handleToggle:y,label:v,shortcutKeys:b,Icon:C}=upt({editor:d,type:t,hideWhenUnavailable:r,onToggled:i}),S=x.useCallback(E=>{s==null||s(E),!E.defaultPrevented&&y()},[y,s]);return f?u.jsx(yr,{type:"button",variant:"ghost","data-active-state":m?"on":"off",role:"button",tabIndex:-1,disabled:!p,"data-disabled":!p,"aria-label":v,"aria-pressed":m,tooltip:v,onClick:S,...l,ref:c,children:a??u.jsxs(u.Fragment,{children:[u.jsx(C,{className:"tiptap-button-icon"}),n&&u.jsx("span",{className:"tiptap-button-text",children:n}),o&&u.jsx(spt,{type:t,shortcutKeys:b})]})}):null});cge.displayName="ListButton";const uge={bulletList:mb,orderedList:vS,taskList:bS},apt={bulletList:"Bullet List",orderedList:"Ordered List",taskList:"Task List"},dge={bulletList:"mod+shift+8",orderedList:"mod+shift+7",taskList:"mod+shift+9"};function xS(e,t,n=!0){if(!e||!e.isEditable||!Oc(t,e)||Td(e,["image"]))return!1;if(!n)switch(t){case"bulletList":return e.can().toggleBulletList();case"orderedList":return e.can().toggleOrderedList();case"taskList":return e.can().toggleList("taskList","taskItem");default:return!1}if(!Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"]))return!1;switch(t){case"bulletList":return e.can().toggleBulletList()||e.can().clearNodes();case"orderedList":return e.can().toggleOrderedList()||e.can().clearNodes();case"taskList":return e.can().toggleList("taskList","taskItem")||e.can().clearNodes();default:return!1}}function DI(e,t){if(!e||!e.isEditable)return!1;switch(t){case"bulletList":return e.isActive("bulletList");case"orderedList":return e.isActive("orderedList");case"taskList":return e.isActive("taskList");default:return!1}}function lpt(e,t){var n,r,i;if(!e||!e.isEditable||!xS(e,t))return!1;try{const o=e.view;let s=o.state,a=s.tr;const l=gS(e),c=Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])&&l.length===1;if((s.selection.empty||s.selection instanceof Ue)&&c){const p=(n=mS({editor:e,node:s.selection.$anchor.node(1)}))==null?void 0:n.pos;if(!Em(p))return!1;a=a.setSelection($e.create(s.doc,p)),o.dispatch(a),s=o.state}const d=s.selection;let f=e.chain().focus();if(d instanceof $e){const p=(r=d.node.firstChild)==null?void 0:r.firstChild,m=(i=d.node.lastChild)==null?void 0:i.lastChild,y=p?d.from+p.nodeSize:d.from+1,v=m?d.to-m.nodeSize:d.to-1,b=s.doc.resolve(y),C=s.doc.resolve(v);f=f.setTextSelection(Ue.between(b,C)).clearNodes()}if(e.isActive(t))f.liftListItem("listItem").lift("bulletList").lift("orderedList").lift("taskList").run();else{const m={bulletList:()=>f.toggleBulletList(),orderedList:()=>f.toggleOrderedList(),taskList:()=>f.toggleList("taskList","taskItem")}[t];if(!m)return!1;m().run()}return e.chain().focus().selectTextblockEnd().run(),!0}catch{return!1}}function cpt(e){const{editor:t,type:n,hideWhenUnavailable:r}=e;return t?r?!t.isEditable||!Oc(n,t)?!1:t.isActive("code")?!0:xS(t,n):!0:!1}function upt(e){const{editor:t,type:n,hideWhenUnavailable:r=!1,onToggled:i}=e,{editor:o}=In(t),[s,a]=x.useState(!0),l=xS(o,n),c=DI(o,n);x.useEffect(()=>{if(!o)return;const f=()=>{a(cpt({editor:o,type:n,hideWhenUnavailable:r}))};return f(),o.on("selectionUpdate",f),()=>{o.off("selectionUpdate",f)}},[o,n,r]);const d=x.useCallback(()=>{if(!o)return!1;const f=lpt(o,n);return f&&(i==null||i()),f},[o,n,i]);return{isVisible:s,isActive:c,handleToggle:d,canToggle:l,label:apt[n],shortcutKeys:dge[n],Icon:uge[n]}}const dpt=[{label:"Bullet List",type:"bulletList",icon:mb},{label:"Ordered List",type:"orderedList",icon:vS},{label:"Task List",type:"taskList",icon:bS}];function fpt(e,t){return!e||!e.isEditable?!1:t.some(n=>xS(e,n))}function hpt(e,t){return!e||!e.isEditable?!1:t.some(n=>DI(e,n))}function ppt(e){return dpt.filter(t=>!t.type||e.includes(t.type))}function mpt(e){const{editor:t,hideWhenUnavailable:n,listInSchema:r,canToggleAny:i}=e;return t?n?r?t.isActive("code")?!0:i:!1:!0:!1}function gpt(e,t){if(!(!e||!e.isEditable))return t.find(n=>DI(e,n))}function ypt(e){const{editor:t,types:n=["bulletList","orderedList","taskList"],hideWhenUnavailable:r=!1}=e||{},{editor:i}=In(t),[o,s]=x.useState(!0),a=n.some(m=>Oc(m,i)),l=x.useMemo(()=>ppt(n),[n]),c=fpt(i,n),d=hpt(i,n),f=gpt(i,n),p=l.find(m=>m.type===f);return x.useEffect(()=>{if(!i)return;const m=()=>{s(mpt({editor:i,hideWhenUnavailable:r,listInSchema:a,canToggleAny:c}))};return m(),i.on("selectionUpdate",m),()=>{i.off("selectionUpdate",m)}},[c,i,r,a,n]),{isVisible:o,activeType:f,isActive:d,canToggle:c,types:n,filteredLists:l,label:"List",Icon:p?uge[p.type]:mb}}function vpt({editor:e,types:t=["bulletList","orderedList","taskList"],hideWhenUnavailable:n=!1,onOpenChange:r,modal:i=!0,...o}){const{editor:s}=In(e),[a,l]=x.useState(!1),{filteredLists:c,canToggle:d,isActive:f,isVisible:p,Icon:m}=ypt({editor:s,types:t,hideWhenUnavailable:n}),y=x.useCallback(v=>{l(v),r==null||r(v)},[r]);return p?u.jsxs(Wme,{modal:i,open:a,onOpenChange:y,children:[u.jsx(Gme,{asChild:!0,children:u.jsxs(yr,{type:"button",variant:"ghost","data-active-state":f?"on":"off",role:"button",tabIndex:-1,disabled:!d,"data-disabled":!d,"aria-label":"List options",tooltip:"List",...o,children:[u.jsx(m,{className:"tiptap-button-icon"}),u.jsx(MI,{className:"tiptap-button-dropdown-small"})]})}
640),u.jsx(Kme,{align:"start",children:u.jsx(Yme,{children:c.map(v=>u.jsx(Xme,{asChild:!0,children:u.jsx(cge,{editor:s,type:v.type,text:v.label,showTooltip:!1})},v.type))})})]}):null}function bpt({shortcutKeys:e=hge}){return u.jsx(Rc,{children:Mc({shortcutKeys:e})})}const fge=x.forwardRef(({editor:e,text:t,hideWhenUnavailable:n=!1,onToggled:r,showShortcut:i=!1,onClick:o,children:s,...a},l)=>{const{editor:c}=In(e),{isVisible:d,canToggle:f,isActive:p,handleToggle:m,label:y,shortcutKeys:v,Icon:b}=Cpt({editor:c,hideWhenUnavailable:n,onToggled:r}),C=x.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&m()},[m,o]);return d?u.jsx(yr,{type:"button",variant:"ghost","data-active-state":p?"on":"off",role:"button",tabIndex:-1,disabled:!f,"data-disabled":!f,"aria-label":y,"aria-pressed":p,tooltip:"Blockquote",onClick:C,...a,ref:l,children:s??u.jsxs(u.Fragment,{children:[u.jsx(b,{className:"tiptap-button-icon"}),t&&u.jsx("span",{className:"tiptap-button-text",children:t}),i&&u.jsx(bpt,{shortcutKeys:v})]})}):null});fge.displayName="BlockquoteButton";const hge="mod+shift+b";function II(e,t=!0){return!e||!e.isEditable||!Oc("blockquote",e)||Td(e,["image"])?!1:t?Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])?e.can().toggleWrap("blockquote")||e.can().clearNodes():!1:e.can().toggleWrap("blockquote")}function xpt(e){var t,n,r;if(!e||!e.isEditable||!II(e))return!1;try{const i=e.view;let o=i.state,s=o.tr;const a=gS(e),l=Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])&&a.length===1;if((o.selection.empty||o.selection instanceof Ue)&&l){const p=(t=mS({editor:e,node:o.selection.$anchor.node(1)}))==null?void 0:t.pos;if(!Em(p))return!1;s=s.setSelection($e.create(o.doc,p)),i.dispatch(s),o=i.state}const c=o.selection;let d=e.chain().focus();if(c instanceof $e){const p=(n=c.node.firstChild)==null?void 0:n.firstChild,m=(r=c.node.lastChild)==null?void 0:r.lastChild,y=p?c.from+p.nodeSize:c.from+1,v=m?c.to-m.nodeSize:c.to-1,b=o.doc.resolve(y),C=o.doc.resolve(v);d=d.setTextSelection(Ue.between(b,C)).clearNodes()}return(e.isActive("blockquote")?d.lift("blockquote"):d.wrapIn("blockquote")).run(),e.chain().focus().selectTextblockEnd().run(),!0}catch{return!1}}function wpt(e){const{editor:t,hideWhenUnavailable:n}=e;return t?n?!t.isEditable||!Oc("blockquote",t)?!1:t.isActive("code")?!0:II(t):!0:!1}function Cpt(e){const{editor:t,hideWhenUnavailable:n=!1,onToggled:r}=e||{},{editor:i}=In(t),[o,s]=x.useState(!0),a=II(i),l=(i==null?void 0:i.isActive("blockquote"))||!1;x.useEffect(()=>{if(!i)return;const d=()=>{s(wpt({editor:i,hideWhenUnavailable:n}))};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[i,n]);const c=x.useCallback(()=>{if(!i)return!1;const d=xpt(i);return d&&(r==null||r()),d},[i,r]);return{isVisible:o,isActive:l,handleToggle:c,canToggle:a,label:"Blockquote",shortcutKeys:hge,Icon:jI}}function Spt({shortcutKeys:e=mge}){return u.jsx(Rc,{children:Mc({shortcutKeys:e})})}const pge=x.forwardRef(({editor:e,text:t,hideWhenUnavailable:n=!1,onToggled:r,showShortcut:i=!1,onClick:o,children:s,...a},l)=>{const{editor:c}=In(e),{isVisible:d,canToggle:f,isActive:p,handleToggle:m,label:y,shortcutKeys:v,Icon:b}=_pt({editor:c,hideWhenUnavailable:n,onToggled:r}),C=x.useCallback(S=>{o==null||o(S),!S.defaultPrevented&&m()},[m,o]);return d?u.jsx(yr,{type:"button",variant:"ghost","data-active-state":p?"on":"off",role:"button",disabled:!f,"data-disabled":!f,tabIndex:-1,"aria-label":y,"aria-pressed":p,tooltip:"Code Block",onClick:C,...a,ref:l,children:s??u.jsxs(u.Fragment,{children:[u.jsx(b,{className:"tiptap-button-icon"}),t&&u.jsx("span",{className:"tiptap-button-text",children:t}),i&&u.jsx(Spt,{shortcutKeys:v})]})}):null});pge.displayName="CodeBlockButton";const mge="mod+alt+c";function LI(e,t=!0){return!e||!e.isEditable||!Oc("codeBlock",e)||Td(e,["image"])?!1:t?Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])?e.can().toggleNode("codeBlock","paragraph")||e.can().clearNodes():!1:e.can().toggleNode("codeBlock","paragraph")}function Ept(e){var t,n,r;if(!e||!e.isEditable||!LI(e))return!1;try{const i=e.view;let o=i.state,s=o.tr;const a=gS(e),l=Md(e,["paragraph","heading","bulletList","orderedList","taskList","blockquote","codeBlock"])&&a.length===1;if((o.selection.empty||o.selection instanceof Ue)&&l){const p=(t=mS({editor:e,node:o.selection.$anchor.node(1)}))==null?void 0:t.pos;if(!Em(p))return!1;s=s.setSelection($e.create(o.doc,p)),i.dispatch(s),o=i.state}const c=o.selection;let d=e.chain().focus();if(c instanceof $e){const p=(n=c.node.firstChild)==null?void 0:n.firstChild,m=(r=c.node.lastChild)==null?void 0:r.lastChild,y=p?c.from+p.nodeSize:c.from+1,v=m?
640c.to-m.nodeSize:c.to-1,b=o.doc.resolve(y),C=o.doc.resolve(v);d=d.setTextSelection(Ue.between(b,C)).clearNodes()}return(e.isActive("codeBlock")?d.setNode("paragraph"):d.toggleNode("codeBlock","paragraph")).run(),e.chain().focus().selectTextblockEnd().run(),!0}catch{return!1}}function kpt(e){const{editor:t,hideWhenUnavailable:n}=e;return t?n?!t.isEditable||!Oc("codeBlock",t)?!1:t.isActive("code")?!0:LI(t):!0:!1}function _pt(e){const{editor:t,hideWhenUnavailable:n=!1,onToggled:r}=e||{},{editor:i}=In(t),[o,s]=x.useState(!0),a=LI(i),l=(i==null?void 0:i.isActive("codeBlock"))||!1;x.useEffect(()=>{if(!i)return;const d=()=>{s(kpt({editor:i,hideWhenUnavailable:n}))};return d(),i.on("selectionUpdate",d),()=>{i.off("selectionUpdate",d)}},[i,n]);const c=x.useCallback(()=>{if(!i)return!1;const d=Ept(i);return d&&(r==null||r()),d},[i,r]);return{isVisible:o,isActive:l,handleToggle:c,canToggle:a,label:"Code Block",shortcutKeys:mge,Icon:TI}}const gge=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.43471 4.01458C4.34773 4.06032 4.26607 4.11977 4.19292 4.19292C4.11977 4.26607 4.06032 4.34773 4.01458 4.43471C2.14611 6.40628 1 9.0693 1 12C1 18.0751 5.92487 23 12 23C14.9306 23 17.5936 21.854 19.5651 19.9856C19.6522 19.9398 19.7339 19.8803 19.8071 19.8071C19.8803 19.7339 19.9398 19.6522 19.9856 19.5651C21.854 17.5936 23 14.9306 23 12C23 5.92487 18.0751 1 12 1C9.0693 1 6.40628 2.14611 4.43471 4.01458ZM6.38231 4.9681C7.92199 3.73647 9.87499 3 12 3C16.9706 3 21 7.02944 21 12C21 14.125 20.2635 16.078 19.0319 17.6177L6.38231 4.9681ZM17.6177 19.0319C16.078 20.2635 14.125 21 12 21C7.02944 21 3 16.9706 3 12C3 9.87499 3.73647 7.92199 4.9681 6.38231L17.6177 19.0319Z",fill:"currentColor"})}));gge.displayName="BanIcon";const $I=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.7072 4.70711C15.0977 4.31658 15.0977 3.68342 14.7072 3.29289C14.3167 2.90237 13.6835 2.90237 13.293 3.29289L8.69294 7.89286L8.68594 7.9C8.13626 8.46079 7.82837 9.21474 7.82837 10C7.82837 10.2306 7.85491 10.4584 7.90631 10.6795L2.29289 16.2929C2.10536 16.4804 2 16.7348 2 17V20C2 20.5523 2.44772 21 3 21H12C12.2652 21 12.5196 20.8946 12.7071 20.7071L15.3205 18.0937C15.5416 18.1452 15.7695 18.1717 16.0001 18.1717C16.7853 18.1717 17.5393 17.8639 18.1001 17.3142L22.7072 12.7071C23.0977 12.3166 23.0977 11.6834 22.7072 11.2929C22.3167 10.9024 21.6835 10.9024 21.293 11.2929L16.6971 15.8887C16.5105 16.0702 16.2605 16.1717 16.0001 16.1717C15.7397 16.1717 15.4897 16.0702 15.303 15.8887L10.1113 10.697C9.92992 10.5104 9.82837 10.2604 9.82837 10C9.82837 9.73963 9.92992 9.48958 10.1113 9.30297L14.7072 4.70711ZM13.5858 17L9.00004 12.4142L4 17.4142V19H11.5858L13.5858 17Z",fill:"currentColor"})}));$I.displayName="HighlighterIcon";function Apt({shortcutKeys:e=qM}){return u.jsx(Rc,{children:Mc({shortcutKeys:e})})}const yge=x.forwardRef(({editor:e,highlightColor:t,text:n,hideWhenUnavailable:r=!1,mode:i="mark",onApplied:o,showShortcut:s=!1,onClick:a,children:l,style:c,useColorValue:d=!1,...f},p)=>{const{editor:m}=In(e),{isVisible:y,canColorHighlight:v,isActive:b,handleColorHighlight:C,label:S,shortcutKeys:E}=FI({editor:m,highlightColor:t,useColorValue:d,label:n||`Toggle highlight (${t})`,hideWhenUnavailable:r,mode:i,onApplied:o}),A=x.useCallback(N=>{a==null||a(N),!N.defaultPrevented&&C()},[C,a]),_=x.useMemo(()=>({...c,"--highlight-color":t}),[t,c]);return y?u.jsx(yr,{type:"button",variant:"ghost","data-active-state":b?"on":"off",role:"button",tabIndex:-1,disabled:!v,"data-disabled":!v,"aria-label":S,"aria-pressed":b,tooltip:S,onClick:A,style:_,...f,ref:p,children:l??u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"tiptap-button-highlight",style:{"--highlight-color":t}}),n&&u.jsx("span",{className:"tiptap-button-text",children:n}),s&&u.jsx(Apt,{shortcutKeys:E})]})}):null});yge.displayName="ColorHighlightButton";
640const qM="mod+shift+h",vge=[{label:"Default background",value:"var(--tt-bg-color)",colorValue:"#ffffff",border:"var(--tt-bg-color-contrast)"},{label:"Gray background",value:"var(--tt-color-highlight-gray)",colorValue:"#f8f8f7",border:"var(--tt-color-highlight-gray-contrast)"},{label:"Brown background",value:"var(--tt-color-highlight-brown)",colorValue:"#f4eeee",border:"var(--tt-color-highlight-brown-contrast)"},{label:"Orange background",value:"var(--tt-color-highlight-orange)",colorValue:"#fbecdd",border:"var(--tt-color-highlight-orange-contrast)"},{label:"Yellow background",value:"var(--tt-color-highlight-yellow)",colorValue:"#fef9c3",border:"var(--tt-color-highlight-yellow-contrast)"},{label:"Green background",value:"var(--tt-color-highlight-green)",colorValue:"#dcfce7",border:"var(--tt-color-highlight-green-contrast)"},{label:"Blue background",value:"var(--tt-color-highlight-blue)",colorValue:"#e0f2fe",border:"var(--tt-color-highlight-blue-contrast)"},{label:"Purple background",value:"var(--tt-color-highlight-purple)",colorValue:"#f3e8ff",border:"var(--tt-color-highlight-purple-contrast)"},{label:"Pink background",value:"var(--tt-color-highlight-pink)",colorValue:"#fcf1f6",border:"var(--tt-color-highlight-pink-contrast)"},{label:"Red background",value:"var(--tt-color-highlight-red)",colorValue:"#ffe4e6",border:"var(--tt-color-highlight-red-contrast)"}];function bge(e){const t=new Map(vge.map(n=>[n.value,n]));return e.map(n=>t.get(n)).filter(n=>!!n)}function Npt(e,t=!1){if(!t)return e;const n=vge.find(r=>r.value===e||r.colorValue===e);return(n==null?void 0:n.colorValue)||e}function zI(e,t="mark"){if(!e||!e.isEditable)return!1;if(t==="mark")return!pb("highlight",e)||Td(e,["image"])?!1:e.can().setMark("highlight");if(!pS(e,["nodeBackground"]))return!1;try{return e.can().toggleNodeBackgroundColor("test")}catch{return!1}}function jpt(e,t,n="mark"){var r;if(!e||!e.isEditable)return!1;if(n==="mark")return t?e.isActive("highlight",{color:t}):e.isActive("highlight");if(!t)return!1;try{const{state:i}=e,{selection:o}=i,s=o.$anchor;for(let a=s.depth;a>=0;a--){const l=s.node(a);if(l&&((r=l.attrs)==null?void 0:r.backgroundColor)===t)return!0}return!1}catch{return!1}}function Tpt(e,t="mark"){return!e||!e.isEditable||!zI(e,t)?!1:t==="mark"?e.chain().focus().unsetMark("highlight").run():e.chain().focus().unsetNodeBackgroundColor().run()}function Mpt(e){const{editor:t,hideWhenUnavailable:n,mode:r}=e;if(!t)return!1;if(!n)return!0;if(!t.isEditable)return!1;if(r==="mark"){if(!pb("highlight",t))return!1}else if(!pS(t,["nodeBackground"]))return!1;return t.isActive("code")?!0:zI(t,r)}function FI(e){const{editor:t,label:n,highlightColor:r,hideWhenUnavailable:i=!1,mode:o="mark",useColorValue:s=!1,onApplied:a}=e,{editor:l}=In(t),c=yS(),[d,f]=x.useState(!0),p=zI(l,o),m=r&&Npt(r,s),y=jpt(l,m,o);x.useEffect(()=>{if(!l)return;const C=()=>{f(Mpt({editor:l,hideWhenUnavailable:i,mode:o}))};return C(),l.on("selectionUpdate",C),()=>{l.off("selectionUpdate",C)}},[l,i,o]);const v=x.useCallback(()=>{if(!l||!p||!m||!n)return!1;if(o==="mark"){if(l.state.storedMarks){const C=l.schema.marks.highlight;C&&l.view.dispatch(l.state.tr.removeStoredMark(C))}return setTimeout(()=>{const C=l.chain().focus().toggleHighlight({color:m}).run();return C&&(a==null||a({color:m,label:n,mode:o})),C},0),!0}else{const C=l.chain().focus().toggleNodeBackgroundColor(m).run();return C&&(a==null||a({color:m,label:n,mode:o})),C}},[p,m,l,n,a,o]),b=x.useCallback(()=>{const C=Tpt(l,o);return C&&(a==null||a({color:"",label:"Remove highlight",mode:o})),C},[l,a,o]);return sge(qM,C=>{C.preventDefault(),v()},{enabled:d&&p,enableOnContentEditable:!c,enableOnFormTags:!0}),{isVisible:d,isActive:y,handleColorHighlight:v,handleRemoveHighlight:b,canColorHighlight:p,label:n||"Highlight",shortcutKeys:qM,Icon:$I,mode:o}}const xge=x.forwardRef(({className:e,children:t,...n},r)=>u.jsx(yr,{type:"button",className:e,variant:"ghost","data-appearance":"default",role:"button",tabIndex:-1,"aria-label":"Highlight text",tooltip:"Highlight",ref:r,...n,children:t??u.jsx($I,{className:"tiptap-button-icon"})}));xge.displayName="ColorHighlightPopoverButton";function Opt({editor:e,colors:t=bge(["var(--tt-color-highlight-green)","var(--tt-color-highlight-blue)","var(--tt-color-highlight-red)","var(--tt-color-highlight-purple)","var(--tt-color-highlight-yellow)"]),useColorValue:n=!1}){const{handleRemoveHighlight:r}=FI({editor:e}),i=yS(),o=x.useRef(null),s=x.useMemo(()=>[...t,{label:"Remove highlight",value:"none"}],[t]),{selectedIndex:a}=Lme({containerRef:o,items:s,orientation:"both",onSelect:l=>{if(!o.current)return!1;const c=o.current.querySelector('[data-highlighted="true"]');return c&&c.click(),l.value==="none"&&r(),!0},autoSelectFirstItem:!1});return u.jsx(CI,{ref:o,tabIndex:0,style:i?{boxShadow:"none",border:0}:{},children:u.jsx(SI,{style:i?{padding:0}:{},children:u.jsxs(EI,{orientation:"horizontal",children:[u.jsx(Nf,{children:t.map((l,c)=>u.jsx(Nf,{children:u.jsx(yge,{editor:e,highlightColor:n?l.colorValue:l.value,tooltip:l.label,"aria-label":`${l.label} highlight color`,tabIndex:c===a?0:-1,"data-highlighted":a===c,useColorValue:n})},l.value))}),u.jsx(wI,{}),u.jsx(Nf,{children:u.jsx(yr,{onClick:r,"aria-label":"Remove highlight",tooltip:"Remove highlight",tabIndex:a===t.length?0:-1,type:"button",role:"menuitem",variant:"ghost","data-highlighted":a===t.length,children:u.jsx(gge,{className:"tiptap-button-icon"})})})]})})})}function Rpt({editor:e,colors:t=bge(["var(--tt-color-highlight-green)","var(--tt-color-highlight-blue)","var(--tt-color-highlight-red)","var(--tt-color-highlight-purple)","var(--tt-color-highlight-yellow)"]),hideWhenUnavailable:n=!1,useColorValue:r=!1,onApplied:i,...o}){const{editor:s}=In(e),[a,l]=x.useState(!1),{isVisible:c,canColorHighlight:d,isActive:f,label:p,Icon:m}=FI({editor:s,hideWhenUnavailable:n,onApplied:i});return c?u.jsxs(Mme,{open:a,onOpenChange:l,children:[u.jsx(Ome,{asChild:!0,children:u.jsx(xge,{disabled:!d,"data-active-state":f?"on":"off","data-disabled":!d,"aria-pressed":f,"aria-label":p,tooltip:p,...o,children:u.jsx(m,{className:"tiptap-button-icon"})})}),u.jsx(Rme,{"aria-label":"Highlight colors",children:u.jsx(Opt,{editor:s,colors:t,useColorValue:r})})]}):null}function Ppt({action:e,shortcutKeys:t=Sge[e]}){return u.jsx(Rc,{children:Mc({shortcutKeys:t})})}const WM=x.forwardRef(({editor:e,action:t,text:n,hideWhenUnavailable:r=!1,onExecuted:i,showShortcut:o=!1,onClick:s,children:a,...l},c)=>{const{editor:d}=In(e),{isVisible:f,handleAction:p,label:m,canExecute:y,Icon:v,shortcutKeys:b}=zpt({editor:d,action:t,hideWhenUnavailable:r,onExecuted:i}),C=x.useCallback(S=>{s==null||s(S),!S.defaultPrevented&&p()},[p,s]);return f?u.jsx(yr,{type:"button",disabled:!y,variant:"ghost","data-disabled":!y,role:"button",tabIndex:-1,"aria-label":m,tooltip:m,onClick:C,...l,ref:c,children:a??u.jsxs(u.Fragment,{children:[u.jsx(v,{className:"tiptap-button-icon"}),n&&u.jsx("span",{className:"tiptap-button-text",children:n}),o&&u.jsx(Ppt,{action:t,shortcutKeys:b})]})}):null});WM.displayName="UndoRedoButton";const wge=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"
640currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7071 2.29289C15.3166 1.90237 14.6834 1.90237 14.2929 2.29289C13.9024 2.68342 13.9024 3.31658 14.2929 3.70711L17.5858 7H9.5C7.77609 7 6.12279 7.68482 4.90381 8.90381C3.68482 10.1228 3 11.7761 3 13.5C3 14.3536 3.16813 15.1988 3.49478 15.9874C3.82144 16.7761 4.30023 17.4926 4.90381 18.0962C6.12279 19.3152 7.77609 20 9.5 20H13C13.5523 20 14 19.5523 14 19C14 18.4477 13.5523 18 13 18H9.5C8.30653 18 7.16193 17.5259 6.31802 16.682C5.90016 16.2641 5.56869 15.768 5.34254 15.2221C5.1164 14.6761 5 14.0909 5 13.5C5 12.3065 5.47411 11.1619 6.31802 10.318C7.16193 9.47411 8.30653 9 9.5 9H17.5858L14.2929 12.2929C13.9024 12.6834 13.9024 13.3166 14.2929 13.7071C14.6834 14.0976 15.3166 14.0976 15.7071 13.7071L20.7071 8.70711C21.0976 8.31658 21.0976 7.68342 20.7071 7.29289L15.7071 2.29289Z",fill:"currentColor"})}));wge.displayName="Redo2Icon";const Cge=x.memo(({className:e,...t})=>u.jsx("svg",{width:"24",height:"24",className:e,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...t,children:u.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.70711 3.70711C10.0976 3.31658 10.0976 2.68342 9.70711 2.29289C9.31658 1.90237 8.68342 1.90237 8.29289 2.29289L3.29289 7.29289C2.90237 7.68342 2.90237 8.31658 3.29289 8.70711L8.29289 13.7071C8.68342 14.0976 9.31658 14.0976 9.70711 13.7071C10.0976 13.3166 10.0976 12.6834 9.70711 12.2929L6.41421 9H14.5C15.0909 9 15.6761 9.1164 16.2221 9.34254C16.768 9.56869 17.2641 9.90016 17.682 10.318C18.0998 10.7359 18.4313 11.232 18.6575 11.7779C18.8836 12.3239 19 12.9091 19 13.5C19 14.0909 18.8836 14.6761 18.6575 15.2221C18.4313 15.768 18.0998 16.2641 17.682 16.682C17.2641 17.0998 16.768 17.4313 16.2221 17.6575C15.6761 17.8836 15.0909 18 14.5 18H11C10.4477 18 10 18.4477 10 19C10 19.5523 10.4477 20 11 20H14.5C15.3536 20 16.1988 19.8319 16.9874 19.5052C17.7761 19.1786 18.4926 18.6998 19.0962 18.0962C19.6998 17.4926 20.1786 16.7761 20.5052 15.9874C20.8319 15.1988 21 14.3536 21 13.5C21 12.6464 20.8319 11.8012 20.5052 11.0126C20.1786 10.2239 19.6998 9.50739 19.0962 8.90381C18.4926 8.30022 17.7761 7.82144 16.9874 7.49478C16.1988 7.16813 15.3536 7 14.5 7H6.41421L9.70711 3.70711Z",fill:"currentColor"})}));Cge.displayName="Undo2Icon";const Sge={undo:"mod+z",redo:"mod+shift+z"},Dpt={undo:"Undo",redo:"Redo"},Ipt={undo:Cge,redo:wge};function BI(e,t){return!e||!e.isEditable||Td(e,["image"])?!1:t==="undo"?e.can().undo():e.can().redo()}function Lpt(e,t){if(!e||!e.isEditable||!BI(e,t))return!1;const n=e.chain().focus();return t==="undo"?n.undo().run():n.redo().run()}function $pt(e){const{editor:t,hideWhenUnavailable:n,action:r}=e;return t?n?t.isEditable?t.isActive("code")?!0:BI(t,r):!1:!0:!1}function zpt(e){const{editor:t,action:n,hideWhenUnavailable:r=!1,onExecuted:i}=e,{editor:o}=In(t),[s,a]=x.useState(!0),l=BI(o,n);x.useEffect(()=>{if(!o)return;const d=()=>{a($pt({editor:o,hideWhenUnavailable:r,action:n}))};return d(),o.on("transaction",d),()=>{o.off("transaction",d)}},[o,r,n]);const c=x.useCallback(()=>{if(!o)return!1;const d=Lpt(o,n);return d&&(i==null||i()),d},[o,n,i]);return{isVisible:s,handleAction:c,canExecute:l,label:Dpt[n],shortcutKeys:Sge[n],Icon:Ipt[n]}}function Fpt({editor:e,wordCount:t,onPublish:n,isPublished:r,hasChanges:i,saveStatus:o,isScrolled:s=!1,onSchedule:a,onOpenSettings:l}){const c=br(),d=r?"Publish Update":"Publish",f=r&&!i;return u.jsx(ab.Provider,{value:{editor:e},children:u.jsxs("div",{className:"tiptap-toolbar relative flex items-center h-14 bg-bg-white-0 flex-shrink-0 z-20",children:[u.jsx("div",{className:Ar("absolute left-0 right-0 top-full h-16 pointer-events-none transition-opacity duration-300 z-10",s?"opacity-100":"opacity-0"),style:{background:"linear-gradient(to bottom, rgba(255,255,255,0.85) 0%, transparent 100%)",backdropFilter:"blur(6px)",WebkitBackdropFilter:"blur(6px)",maskImage:"linear-gradient(to bottom, black 0%, transparent 100%)",WebkitMaskImage:"linear-gradient(to bottom, black 0%, transparent 100%)"}}),u.jsx("div",{className:"flex-1 flex items-center pl-2 min-w-0",children:u.jsxs(Re,{variant:"neutral",mode:"lighter",size:"xsmall",onClick:()=>c("/articles"),children:[u.jsx(wt,{as:T0e}),"Back"]})}),u.jsx("div",{className:"flex-shrink-0 overflow-x-auto flex items-center",style:{scrollbarWidth:"none"},children:u.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[u.jsxs(Jo,{children:[u.jsx(WM,{action:"undo"}),u.jsx(WM,{action:"redo"})]}),u.jsx(Oa,{}),u.jsxs(Jo,{children:[u.jsx(Zme,{modal:!1,levels:[1,2,3,4]}),u.jsx(vpt,{modal:!1,types:["bulletList","orderedList","taskList"]}),u.jsx(fge,{}),u.jsx(pge,{})]}),u.jsx(Oa,{}),u.jsxs(Jo,{children:[u.jsx(wo,{type:"bold"}),u.jsx(wo,{type:"italic"}),u.jsx(wo,{type:"strike"}),u.jsx(wo,{type:"code"}),u.jsx(wo,{type:"underline"}),u.jsx(Rpt,{}),u.jsx(kI,{})]}),u.jsx(Oa,{}),u.jsxs(Jo,{children:[u.jsx(wo,{type:"superscript"}),u.jsx(wo,{type:"subscript"})]}),u.jsx(Oa,{}),u.jsxs(Jo,{children:[u.jsx(Jme,{text:"Add"}),u.jsx(lge,{editor:e})]})]})}),u.jsxs("div",{className:"flex-1 flex items-center justify-end pr-2 gap-3",children:[u.jsxs("span",{className:"text-paragraph-sm text-text-soft-400 whitespace-nowrap",children:[t.toLocaleStr
640ing()," words"]}),u.jsx("div",{className:"h-4 w-px bg-stroke-soft-200"}),u.jsxs("div",{className:"flex items-center gap-0.5",children:[u.jsx("button",{onClick:a,className:Ar("flex items-center justify-center size-8 rounded-md transition-colors","text-text-soft-400 hover:text-text-sub-600 hover:bg-bg-weak-50"),title:"Schedule",children:u.jsx($at,{size:16})}),u.jsx("button",{onClick:l,className:Ar("flex items-center justify-center size-8 rounded-md transition-colors","text-text-soft-400 hover:text-text-sub-600 hover:bg-bg-weak-50"),title:"Article settings",children:u.jsx(_lt,{size:16})})]}),u.jsx("div",{className:"h-4 w-px bg-stroke-soft-200"}),u.jsxs("div",{className:Ar("flex items-center gap-1.5 transition-opacity duration-300",o==="idle"?"opacity-0 pointer-events-none":"opacity-100"),children:[o==="saving"&&u.jsxs(u.Fragment,{children:[u.jsxs("svg",{className:"animate-spin size-3.5 text-text-soft-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),u.jsx("span",{className:"text-paragraph-sm text-text-soft-400 whitespace-nowrap",children:"Saving..."})]}),o==="saved"&&u.jsxs(u.Fragment,{children:[u.jsx("svg",{className:"size-3.5 text-success-base",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M13.5 4.5L6.5 11.5L3 8",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})}),u.jsx("span",{className:"text-paragraph-sm text-success-base whitespace-nowrap",children:"Saved"})]})]}),u.jsx(Re,{variant:"primary",mode:"filled",size:"small",onClick:n,disabled:f,children:d})]})]})})}function Bpt(e,t){const n=x.useRef(void 0),r=x.useRef(e);x.useEffect(()=>{r.current=e},[e]);const i=x.useCallback((...o)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(async()=>{try{await r.current(...o)}catch(s){console.error("Error in debounced callback:",s)}},t)},[t]);return x.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),i}const Ege=e=>e?e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().split(/\s+/).length:0;function kge(e,t,n,r,i){const o=(t==null?void 0:t.toLowerCase().trim())||"",s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim().toLowerCase(),c=Ege(e),d=o&&c>0?(l.match(new RegExp(s,"g"))||[]).length:0,f=e.match(/<a\s[^>]*href="([^"]*)"[^>]*>/gi)||[],p=f.filter($=>{const H=$.match(/href="([^"]*)"/);return H&&(H[1].startsWith("/")||H[1].startsWith("#"))}).length,m=f.filter($=>{const H=$.match(/href="([^"]*)"/);return H&&/^https?:\/\//i.test(H[1])}).length,y=p+m,v=/<img\s[^>]*alt="([^"]+)"[^>]*>/i.test(e),b=(n||"").toLowerCase(),C=o?b.includes(o):!1,S=e.match(/<p[^>]*>(.*?)<\/p>/i),E=S?S[1].replace(/<[^>]*>/g," ").toLowerCase():l.slice(0,300),A=c>0?d/c*100:0,_=A>=.5&&A<=2.5,N=A>=.3&&A<.5||A>2.5&&A<=3.5,j=/<h[23][^>]*>/i.test(e),T=r.toLowerCase(),O=i.toLowerCase(),D=i.length;let R=0;o&&C&&(R+=12),o&&T.includes(o)&&(R+=8),o&&O.includes(o)&&(R+=6),o&&E.includes(o)&&(R+=10),R+=Math.min(15,Math.floor(c/1500*15)),p>0&&(R+=8),m>0&&(R+=5),v&&(R+=8),o&&c>0&&(_?R+=10:N&&(R+=5)),D>=140&&D<=260&&(R+=6),j&&(R+=10);const I=[{label:"Keyword in title",passed:!o||C,hint:o?C?`"${t}" found in title`:`Add "${t}" to the article title`:"No focus keyword set"},{label:"Keyword in meta title",passed:!o||T.includes(o),hint:o?T.includes(o)?`"${t}" found in meta title`:`Add "${t}" to the meta title`:"No focus keyword set"},{label:"Keyword in meta description",passed:!o||O.includes(o),hint:o?O.includes(o)?`"${t}" found in meta description`:`Add "${t}" to the meta description`:"No focus keyword set"},{label:"Keyword in intro",passed:!o||E.includes(o),hint:o?E.includes(o)?`"${t}" appears in the first paragraph`:`Mention "${t}" in your opening paragraph`:"No focus keyword set"},{label:"Word count",passed:c>=1500,hint:c>=1500?`${c.toLocaleString()} words â great length`:`${c.toLocaleString()} / 1,500 words â keep writing`},{label:"Internal links",passed:p>0,hint:p>0?`${p} internal link${p>1?"s":""}`:"Add at least one link to another page on your site"},{label:"External links",passed:m>0,hint:m>0?`${m} external link${m>1?"s":""}`:"Link to at least one authoritative external source"},{label:"Image with alt text",passed:v,hint:v?"Image with alt text found":"Add an image with descriptive alt text"},{label:"Keyword density",passed:!o||_,hint:o?_?`${A.toFixed(2)}% â ideal range (0.5â2.5%)`:A>2.5?`${A.toFixed(2)}% â too high, risks keyword stuffing`:`${A.toFixed(2)}
640% â too low, aim for 0.5â2.5%`:"No focus keyword set"},{label:"Meta description length",passed:D>=140&&D<=260,hint:D===0?"Write a meta description (140â260 chars)":D<140?`${D} chars â too short, aim for 140â260`:D<=260?`${D} chars â perfect length`:`${D} chars â too long, keep under 260`},{label:"Subheadings (H2/H3)",passed:j,hint:j?"Subheadings found â good structure":"Add H2 or H3 headings to structure your content"}],F=Math.min(10,parseFloat((c/1500*10).toFixed(1)));return{seoScore:Math.min(100,R),keywordCount:d,linkCount:y,contentScore:F,checks:I}}const al=()=>{var f;const{data:e,isLoading:t}=rm(),{data:n,isLoading:r}=UO(void 0,{skip:!(e!=null&&e.user)}),{data:i,isLoading:o}=DCe(void 0,{skip:!(e!=null&&e.user)}),{data:s,isLoading:a}=hne(void 0,{skip:!(e!=null&&e.user)}),{data:l,isLoading:c}=jCe(void 0,{skip:!(e!=null&&e.user)}),d=(i==null?void 0:i.filter(p=>!p.read).length)||0;return{auth:{user:(e==null?void 0:e.user)||null,isAuthenticated:!!e,isLoading:t,profile:n,profileLoading:r},notifications:{data:i,isLoading:o,unreadCount:d},billing:{subscription:(s==null?void 0:s.billing)||null,isLoading:a,plan:((f=s==null?void 0:s.billing)==null?void 0:f.plan)||"free"},integrations:{data:l,isLoading:c}}};var ll=(e=>(e.GHOST="ghost",e))(ll||{}),wS="Switch",[Hpt,BSt]=j5(wS),[Vpt,Upt]=Hpt(wS),_ge=x.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:s,disabled:a,value:l="on",onCheckedChange:c,form:d,...f}
640=e,[p,m]=x.useState(null),y=_v(t,E=>m(E)),v=x.useRef(!1),b=p?d||!!p.closest("form"):!0,[C,S]=T5({prop:i,defaultProp:o??!1,onChange:c,caller:wS});return u.jsxs(Vpt,{scope:n,checked:C,disabled:a,children:[u.jsx(Za.button,{type:"button",role:"switch","aria-checked":C,"aria-required":s,"data-state":Tge(C),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:y,onClick:za(e.onClick,E=>{S(A=>!A),b&&(v.current=E.isPropagationStopped(),v.current||E.stopPropagation())})}),b&&u.jsx(jge,{control:p,bubbles:!v.current,name:r,value:l,checked:C,required:s,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});_ge.displayName=wS;var Age="SwitchThumb",Nge=x.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Upt(Age,n);return u.jsx(Za.span,{"data-state":Tge(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});Nge.displayName=Age;var qpt="SwitchBubbleInput",jge=x.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},o)=>{const s=x.useRef(null),a=_v(s,o),l=zne(n),c=Fne(t);return x.useEffect(()=>{const d=s.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(y)}},[l,n,r]),u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:a,style:{...i.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jge.displayName=qpt;function Tge(e){return e?"checked":"unchecked"}var Mge=_ge,Wpt=Nge;const Oge=x.forwardRef(({className:e,disabled:t,...n},r)=>u.jsx(Mge,{className:Et("group/switch block h-5 w-8 shrink-0 p-0.5 outline-none focus:outline-none",e),ref:r,disabled:t,...n,children:u.jsx("div",{className:Et("bg-bg-soft-200 h-4 w-7 rounded-full p-0.5 outline-none","transition duration-200 ease-out",!t&&["group-hover/switch:bg-bg-sub-300","group-focus-visible/switch:bg-bg-sub-300","group-active/switch:bg-bg-soft-200","group-data-[state=checked]/switch:bg-primary-base","group-hover:data-[state=checked]/switch:bg-primary-darker","group-active:data-[state=checked]/switch:bg-primary-base","group-focus/switch:outline-none"],t&&["bg-bg-white-0 ring-stroke-soft-200 p-[3px] ring-1 ring-inset"]),children:u.jsx(Wpt,{className:Et("pointer-events-none relative block size-3","transition-transform duration-200 ease-out","data-[state=checked]:translate-x-3",!t&&["before:bg-static-white before:absolute before:inset-y-0 before:left-1/2 before:w-3 before:-translate-x-1/2 before:rounded-full","before:[-webkit-mask:var(--mask)] before:[mask:var(--mask)]","after:shadow-switch-thumb after:absolute after:inset-y-0 after:left-1/2 after:w-3 after:-translate-x-1/2 after:rounded-full","group-active/switch:scale-[.833]"],t&&["bg-bg-soft-200 size-2.5 rounded-full shadow-none"]),style:{"--mask":"radial-gradient(circle farthest-side at 50% 50%, transparent 1.95px, black 2.05px 100%) 50% 50%/100% 100% no-repeat"}})})}));Oge.displayName=Mge.displayName;function dJ({size:e=20}){return u.jsx("img",{src:"/icons/ghost-logo.png",alt:"Ghost CMS",className:"flex-shrink-0",style:{width:e,height:e,objectFit:"contain"}})}const Gpt=({open:e,onClose:t,onPublishSuccess:n,article:r})=>{const{integrations:{data:i}}=al(),o=i==null?void 0:i.reduce((C,S)=>(C[S.type]=S,C),{}),s=o==null?void 0:o[ll.GHOST],a=!!s,l=C=>{try{return new URL(C).hostname}catch{return C}},[c,d]=x.useState(a),[f,{isLoading:p}]=_Ce(),[m,{isLoading:y}]=ACe(),v=p||y,b=async()=>{var C;try{if(r.published)await m({id:r.id,articleUpdateData:{title:r.title,content:r.content,metaDescription:r.metaDescription,metaTitle:r.metaTitle,slug:r.slug,keyword:r.keyword},publishToGhost:c&&a,ghostTagIds:r.ghostTagIds,ghostAuthorId:r.ghostAuthorId}).unwrap(),ze.success("Article updated successfully");else{if(!(await f({id:r.id,publishToGhost:c&&a,ghostTagIds:r.ghostTagIds,ghostAuthorId:r.ghostAuthorId}).unwrap()).article)throw new Error("Failed to publish article");ze.success("Article published successfully")}n==null||n(),t()}catch(S){ze.error(((C=S==null?void 0:S.data)==null?void 0:C.error)||(S==null?void 0:S.message)||"Failed to publish")}};return u.jsx(wd,{open:e,onOpenChange:C=>!C&&t(),children:u.jsxs(Ec,{className:"max-w-[420px]",children:[u.jsx(kc,{title:r.published?"Update Article":"Publish Article",description:r.title}),u.jsx(fm,{className:"space-y-3",children:a?u.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-stroke-soft-200 bg-bg-weak-50 px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(dJ,{size:22}),u.jsxs("div",{children:[u.jsx("p",{className:"text-label-sm text-text-strong-950",children:"Ghost"}),u.jsx("p",{className:"text-paragraph-xs text-text-soft-400",children:l(s.config.ghostApiUrl)})]})]}),u.jsx(Oge,{checked:c,onCheckedChange:d})]}):u.jsxs("div",{className:"rounded-xl border border-stroke-soft-200 bg-bg-weak-50 px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-3 opacity-50",children:[u.jsx(dJ,{size:22}),u.jsxs("div",{children:[u.jsx("p",{className:"text-label-sm text-text-strong-950",children:"Ghost"}),u.jsx("p",{className:"text-paragraph-xs text-text-soft-400",children:"Not connected"})]})]}),u.jsxs("p",{className:"mt-2 text-paragraph-xs text-text-soft-400",children:["Connect Ghost in"," ",u.
640jsx("a",{href:"/integrations/ghost",className:"underline underline-offset-2 hover:text-text-sub-600",children:"Integrations"})," ","to publish there."]})]})}),u.jsxs(_c,{children:[u.jsx(Re,{variant:"neutral",mode:"stroke",onClick:t,disabled:v,children:"Cancel"}),u.jsx(Re,{variant:"primary",mode:"filled",onClick:b,disabled:v,children:v?r.published?"Updatingâ¦":"Publishingâ¦":r.published?"Update":"Publish"})]})]})})},Kpt=Yae,Ypt=tle,Xpt=Xae,Rge=x.forwardRef(({className:e,...t},n)=>u.jsx(Zae,{ref:n,className:Nt("fixed inset-0 z-50 bg-overlay backdrop-blur-[10px]","data-[state=open]:animate-overlay-in","data-[state=closed]:animate-overlay-out",e),...t}));Rge.displayName="DrawerOverlay";const Pge=x.forwardRef(({className:e,overlayClassName:t,children:n,side:r="right",...i},o)=>u.jsxs(Xpt,{children:[u.jsx(Rge,{className:t}),u.jsx(Qae,{ref:o,className:Nt("fixed top-0 z-50 h-full w-[420px] max-w-[calc(100vw-2rem)]","flex flex-col bg-bg-white-0 shadow-regular-xl","focus:outline-none",r==="right"?"right-0 data-[state=open]:animate-drawer-in data-[state=closed]:animate-drawer-out":"left-0",e),...i,children:n})]}));Pge.displayName="DrawerContent";const Dge=x.forwardRef(({className:e,children:t,...n},r)=>u.jsxs("div",{ref:r,className:Nt("flex flex-shrink-0 items-center justify-between gap-4 border-b border-stroke-soft-200 px-5 py-4",e),...n,children:[u.jsx("div",{className:"min-w-0 flex-1",children:t}),u.jsx(Ypt,{asChild:!0,children:u.jsx(JR,{variant:"ghost",size:"large",className:"flex-shrink-0",children:u.jsx(eP,{as:Hf})})})]}));Dge.displayName="DrawerHeader";const Ige=x.forwardRef(({className:e,...t},n)=>u.jsx(Jae,{ref:n,className:Nt("text-label-md font-semibold text-text-strong-950",e),...t}));Ige.displayName="DrawerTitle";const Lge=x.forwardRef(({className:e,...t},n)=>u.jsx(ele,{ref:n,className:Nt("mt-0.5 text-paragraph-xs text-text-soft-400",e),...t}));Lge.displayName="DrawerDescription";const $ge=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:Nt("flex-1 overflow-y-auto",e),...t}));$ge.displayName="DrawerBody";const zge=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:Nt("flex flex-shrink-0 items-center justify-end gap-3 border-t border-stroke-soft-200 px-5 py-4",e),...t}));zge.displayName="DrawerFooter";const Zpt="TextareaRoot",Qpt="Textarea",Jpt="TextareaResizeHandle",e0t="TextareaCounter",GM=x.forwardRef(({className:e,hasError:t,simple:n,disabled:r,...i},o)=>u.jsx("textarea",{className:Et(["block w-full resize-none text-paragraph-sm text-text-strong-950 outline-none",!n&&["pointer-events-auto h-full min-h-[82px] bg-transparent pl-3 pr-2.5 pt-2.5"],n&&["min-h-28 rounded-xl bg-bg-white-0 px-3 py-2.5 shadow-regular-xs","ring-1 ring-inset ring-stroke-soft-200","transition duration-200 ease-out","hover:[&:not(:focus)]:bg-bg-weak-50",!t&&["hover:[&:not(:focus)]:ring-transparent","focus:shadow-button-important-focus focus:ring-stroke-strong-950"],t&&["ring-error-base","focus:shadow-button-error-focus focus:ring-error-base"],r&&["bg-bg-weak-50 ring-transparent"]],!r&&["placeholder:select-none placeholder:text-text-soft-400 placeholder:transition placeholder:duration-200 placeholder:ease-out","group-hover/textarea:placeholder:text-text-sub-600","focus:outline-none","focus:placeholder:text-text-sub-600"],r&&["text-text-disabled-300 placeholder:text-text-disabled-300"]],e),ref:o,disabled:r,...i}));GM.displayName=Qpt;function Fge(){return u.jsx("div",{className:"pointer-events-none size-3 cursor-s-resize",children:u.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M9.11111 2L2 9.11111M10 6.44444L6.44444 10",className:"stroke-text-soft-400"})})})}Fge.displayName=Jpt;const HI=x.forwardRef(({containerClassName:e,children:t,hasError:n,simple:r,...i},o)=>r?u.jsx(GM,{ref:o,simple:!0,hasError:n,...i}):u.jsx("div",{className:Et(["group/textarea relative flex w-full flex-col rounded-xl bg-bg-white-0 pb-2.5 shadow-regular-xs","ring-1 ring-inset ring-stroke-soft-200","transition duration-200 ease-out","hover:[&:not(:focus-within)]:bg-bg-weak-50","has-[[disabled]]:pointer-events-none has-[[disabled]]:bg-bg-weak-50 has-[[disabled]]:ring-transparent"],!n&&["hover:[&:not(:focus-within)]:ring-transparent","focus-within:shadow-button-important-focus focus-within:ring-stroke-strong-950"],n&&["ring-error-base","focus-within:shadow-button-error-focus focus-within:ring-error-base"],e),
640children:u.jsxs("div",{className:"grid",children:[u.jsxs("div",{className:"pointer-events-none relative z-10 flex flex-col gap-2 [grid-area:1/1]",children:[u.jsx(GM,{ref:o,hasError:n,...i}),u.jsxs("div",{className:"pointer-events-none flex items-center justify-end gap-1.5 pl-3 pr-2.5",children:[t,u.jsx(Fge,{})]})]}),u.jsx("div",{className:"min-h-full resize-y overflow-hidden opacity-0 [grid-area:1/1]"})]})}));HI.displayName=Zpt;function VI({current:e,max:t,className:n}){if(e===void 0||t===void 0)return null;const r=e>t;return u.jsxs("span",{className:Et("text-subheading-2xs text-text-soft-400","group-has-[[disabled]]/textarea:text-text-disabled-300",{"text-error-base":r},n),children:[e,"/",t]})}VI.displayName=e0t;function t0t(e){const t=x.useId();return u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 80 80",...e,children:[u.jsxs("g",{fill:"#fff",clipPath:`url(#${t})`,children:[u.jsx("ellipse",{cx:40,cy:78,fillOpacity:.72,rx:32,ry:24}),u.jsx("circle",{cx:40,cy:32,r:16,opacity:.9})]}),u.jsx("defs",{children:u.jsx("clipPath",{id:t,children:u.jsx("rect",{width:80,height:80,fill:"#fff",rx:40})})})]})}function n0t(e){const t=x.useId(),n=x.useId(),r=x.useId();return u.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:56,height:56,fill:"none",viewBox:"0 0 56 56",...e,children:[u.jsxs("g",{clipPath:`url(#${t})`,children:[u.jsx("rect",{width:56,height:56,className:"fill-bg-soft-200",rx:28}),u.jsx("path",{className:"fill-bg-soft-200",d:"M0 0h56v56H0z"}),u.jsx("g",{filter:`url(#${n})`,opacity:.48,children:u.jsx("path",{fill:"#fff",d:"M7 24.9a2.8 2.8 0 012.8-2.8h21a2.8 2.8 0 012.8 2.8v49a2.8 2.8 0 01-2.8 2.8h-21A2.8 2.8 0 017 73.9v-49z"})}),u.jsx("path",{className:"fill-bg-soft-200",d:"M12.6 28.7a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2z"}),u.jsx("g",{filter:`url(#${r})`,children:u.jsx("path",{fill:"#fff",fillOpacity:.8,d:"M21 14a2.8 2.8 0 012.8-2.8h21a2.8 2.8 0 012.8 2.8v49a2.8 2.8 0 01-2.8 2.8h-21A2.8 2.8 0 0121 63V14z"})}),u.jsx("path",{className:"fill-bg-soft-200",d:"M26.6 17.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7V22a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm9.8-29.4a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7V22a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2zm0 9.8a.7.7 0 01.7-.7h4.2a.7.7 0 01.7.7v4.2a.7.7 0 01-.7.7h-4.2a.7.7 0 01-.7-.7v-4.2z"})]}),u.jsxs("defs",{children:[u.jsxs("filter",{id:n,width:34.6,height:62.6,x:3,y:18.1,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),u.jsx("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:2}),u.jsx("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_36237_4888"}),u.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_36237_4888",result:"shape"})]}),u.jsxs("filter",{id:r,width:42.6,height:70.6,x:13,y:3.2,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse",children:[u.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),u.jsx("feGaussianBlur",{in:"BackgroundImageFix",stdDeviation:4}),u.jsx("feComposite",{in2:"SourceAlpha",operator:"in",result:"effect1_backgroundBlur_36237_4888"}),u.jsx("feBlend",{in:"SourceGraphic",in2:"effect1_backgroundBlur_36237_4888",result:"shape"}),u.jsx("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),u.jsx("feOffset",{dy:4}),u.jsx("feGaussianBlur",{stdDeviation:2}),u.jsx("feComposite",{in2:"hardAlpha",k2:-1,k3:1,operator:"arithmetic"}),u.jsx("feColorMatrix",{values:"0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.25 0"}),u.jsx("feBlend",{in2:"shape",result:"effect2_innerShadow_36237_4888"})]}),u.jsx("clipPath",{id:t,children:u.jsx("rect",{width:56,height:56,fill:"#fff",rx:28})})]})]})}const r0t="AvatarRoot",Bge="AvatarImage",i0t="AvatarIndicator",o0t="AvatarBrandLogo",Hge=el({slots:{root:["relative flex shrink-0 items-center justify-center rounded-full","select-none text-center uppercase"],image:"size-full rounded-full object-cover",indicator:"absolute flex size-8 items-center justify-center drop-shadow-[0_2px_4px_#1b1c1d0a]"},variants:{size:{80:{root:"size-20 text-title-h5"},72:{root:"size-[72px] text-title-h5"},64:{root:"size-16 text-title-h5"},56:{root:"size-14 text-label-lg"},48:{root:"size-12 text-label-lg"},40:{root:"size-10 text-label-md"},32:{root:"size-8 text-label-sm"},24:{root:"size-6 text-label-xs"},20:{root:"size-5 text-label-xs"}},color:{gray:{root:"bg-bg-soft-200 text-static-black"},yellow:{root:"bg-yellow-200 text-yellow-950"},blue:{root:"bg-blue-200 text-blue-950"},sky:{root:"bg-sky-200 text-sky-950"},purple:{root:"bg-purple-200 text-purple-950"},red:{root:"bg-red-200 text-red-950"}}},compoundVariants:[{size:["80","72"],class:{indicator:"-right-2"}},{size:"64",class:{indicator:"-right-2 scale-[.875]"}},{size:"56",class:{indicator:"-right-1.5 scale-75"}},{size:"48",class:{indicator:"-right-1.5 scale-[.625]"}},{size:"40",class:{indicator:"-right-1.5 scale-[.5625]"}},{size:"32",class:{indicator:"-right-1.5 scale-50"}},{size:"24",class:{indicator:"-right-1 scale-[.375]"}},{size:"20",class:{indicator:"-right-1 scale-[.3125]"}}],defaultVariants:{size:"80",color:"gray"}}),UI=x.forwardRef(({asChild:e,children:t,size:n,color:r,className:i,placeholderType:o="user",...s},a)=>{const l=x.useId(),c=e?Ei:"div",{root:d}=Hge({size:n,color:r}),f={size:n,color:r};
640if(!t)return u.jsx("div",{className:d({class:i}),...s,children:u.jsx(CS,{asChild:!0,children:o==="company"?u.jsx(n0t,{}):u.jsx(t0t,{})})});const p=yd(t,f,[Bge,i0t],l,e);return u.jsx(c,{ref:a,className:d({class:i}),...s,children:p})});UI.displayName=r0t;const CS=x.forwardRef(({asChild:e,className:t,size:n,color:r,...i},o)=>{const s=e?Ei:"img",{image:a}=Hge({size:n,color:r});return u.jsx(s,{ref:o,className:a({class:t}),...i})});CS.displayName=Bge;el({base:"box-content size-3 rounded-full border-4 border-bg-white-0",variants:{status:{online:"bg-success-base",offline:"bg-faded-base",busy:"bg-error-base",away:"bg-away-base"}},defaultVariants:{status:"online"}});const s0t=x.forwardRef(({asChild:e,className:t,...n},r)=>{const i=e?Ei:"img";return u.jsx(i,{ref:r,className:Nt("box-content size-6 rounded-full border-2 border-bg-white-0",t),...n})});s0t.displayName=o0t;const a0t="AvatarFallback",l0t=x.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:e,...t}));l0t.displayName=a0t;function ih(e){"@babel/helpers - typeof";return ih=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},ih(e)}function c0t(e,t){if(ih(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ih(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vge(e){var t=c0t(e,"string");return ih(t)=="symbol"?t:t+""}function h1(e,t,n){return(t=Vge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fJ(Object(n),!0).forEach(function(r){h1(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fJ(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function u0t(e){if(Array.isArray(e))return e}function d0t(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(d){c=!0,i=d}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function KM(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Uge(e,t){if(e){if(typeof e=="string")return KM(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?KM(e,t):void 0}}function f0t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 641In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function us(e,t){return u0t(e)||d0t(e,t)||Uge(e,t)||f0t()}function zi(e,t){if(e==null)return{};var n,r,i=YP(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var h0t=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function p0t(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,s=o===void 0?null:o,a=e.inputValue,l=e.menuIsOpen,c=e.onChange,d=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,m=e.value,y=zi(e,h0t),v=x.useState(a!==void 0?a:n),b=us(v,2),C=b[0],S=b[1],E=x.useState(l!==void 0?l:i),A=us(E,2),_=A[0],N=A[1],j=x.useState(m!==void 0?m:s),T=us(j,2),O=T[0],D=T[1],R=x.useCallback(function(z,V){typeof c=="function"&&c(z,V),D(z)},[c]),I=x.useCallback(function(z,V){var U;
641typeof d=="function"&&(U=d(z,V)),S(U!==void 0?U:z)},[d]),F=x.useCallback(function(){typeof p=="function"&&p(),N(!0)},[p]),$=x.useCallback(function(){typeof f=="function"&&f(),N(!1)},[f]),H=a!==void 0?a:C,L=l!==void 0?l:_,B=m!==void 0?m:O;return Ge(Ge({},y),{},{inputValue:H,menuIsOpen:L,onChange:R,onInputChange:I,onMenuClose:$,onMenuOpen:F,value:B})}function m0t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hJ(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,Vge(r.key),r)}}function g0t(e,t,n){return t&&hJ(e.prototype,t),n&&hJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function y0t(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&&$3(e,t)}function t5(e){return t5=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},t5(e)}function qge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qge=function(){return!!e})()}function v0t(e,t){if(t&&(ih(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lue(e)}function b0t(e){var t=qge();return function(){var n,r=t5(e);if(t){var i=t5(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return v0t(this,n)}}function x0t(e){if(Array.isArray(e))return KM(e)}function w0t(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function C0t(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 642In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qI(e){return x0t(e)||w0t(e)||Uge(e)||C0t()}function S0t(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function E0t(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var k0t=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(E0t(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=S0t(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++}
vendor: 5,101 bytes, line 642
642,t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),fi="-ms-",n5="-moz-",Qt="-webkit-",Wge="comm",WI="rule",GI="decl",_0t="@import",Gge="@keyframes",A0t="@layer",N0t=Math.abs,SS=String.fromCharCode,j0t=Object.assign;function T0t(e,t){return Jr(e,0)^45?(((t<<2^Jr(e,0))<<2^Jr(e,1))<<2^Jr(e,2))<<2^Jr(e,3):0}function Kge(e){return e.trim()}function M0t(e,t){return(e=t.exec(e))?e[0]:e}function Jt(e,t,n){return e.replace(t,n)}function YM(e,t){return e.indexOf(t)}function Jr(e,t){return e.charCodeAt(t)|0}function av(e,t,n){return e.slice(t,n)}function Na(e){return e.length}function KI(e){return e.length}function B2(e,t){return t.push(e),e}function O0t(e,t){return e.map(t).join("")}var ES=1,U0=1,Yge=0,ao=0,pr=0,km="";function kS(e,t,n,r,i,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:ES,column:U0,length:s,return:""}}function Wg(e,t){return j0t(kS("",null,null,"",null,null,0),e,{length:-e.length},t)}function R0t(){return pr}function P0t(){return pr=ao>0?Jr(km,--ao):0,U0--,pr===10&&(U0=1,ES--),pr}function _o(){return pr=ao<Yge?Jr(km,ao++):0,U0++,pr===10&&(U0=1,ES++),pr}function Va(){return Jr(km,ao)}function xw(){return ao}function gb(e,t){return av(km,e,t)}function lv(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Xge(e){return ES=U0=1,Yge=Na(km=e),ao=0,[]}function Zge(e){return km="",e}function ww(e){return Kge(gb(ao-1,XM(e===91?e+2:e===40?e+1:e)))}function D0t(e){for(;(pr=Va())&&pr<33;)_o();return lv(e)>2||lv(pr)>3?"":" "}function I0t(e,t){for(;--t&&_o()&&!(pr<48||pr>102||pr>57&&pr<65||pr>70&&pr<97););return gb(e,xw()+(t<6&&Va()==32&&_o()==32))}function XM(e){for(;_o();)switch(pr){case e:return ao;case 34:case 39:e!==34&&e!==39&&XM(pr);break;case 40:e===41&&XM(e);break;case 92:_o();break}return ao}function L0t(e,t){for(;_o()&&e+pr!==57;)if(e+pr===84&&Va()===47)break;return"/*"+gb(t,ao-1)+"*"+SS(e===47?e:_o())}function $0t(e){for(;!lv(Va());)_o();return gb(e,ao)}function z0t(e){return Zge(Cw("",null,null,null,[""],e=Xge(e),0,[0],e))}function Cw(e,t,n,r,i,o,s,a,l){for(var c=0,d=0,f=s,p=0,m=0,y=0,v=1,b=1,C=1,S=0,E="",A=i,_=o,N=r,j=E;b;)switch(y=S,S=_o()){case 40:if(y!=108&&Jr(j,f-1)==58){YM(j+=Jt(ww(S),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:j+=ww(S);break;case 9:case 10:case 13:case 32:j+=D0t(y);break;case 92:j+=I0t(xw()-1,7);continue;case 47:switch(Va()){case 42:case 47:B2(F0t(L0t(_o(),xw()),t,n),l);break;default:j+="/"}break;case 123*v:a[c++]=Na(j)*C;case 125*v:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+d:C==-1&&(j=Jt(j,/\f/g,"")),m>0&&Na(j)-f&&B2(m>32?mJ(j+";",r,n,f-1):mJ(Jt(j," ","")+";",r,n,f-2),l);break;case 59:j+=";";default:if(B2(N=pJ(j,t,n,c,d,i,a,E,A=[],_=[],f),o),S===123)if(d===0)Cw(j,t,N,N,A,o,f,a,_);else switch(p===99&&Jr(j,3)===110?100:p){case 100:case 108:case 109:case 115:Cw(e,N,N,r&&B2(pJ(e,N,N,0,0,i,a,E,i,A=[],f),_),i,_,f,a,r?A:_);break;default:Cw(j,N,N,N,[""],_,0,a,_)}}c=d=m=0,v=C=1,E=j="",f=s;break;case 58:f=1+Na(j),m=y;default:if(v<1){if(S==123)--v;else if(S==125&&v++==0&&P0t()==125)continue}switch(j+=SS(S),S*v){case 38:C=d>0?1:(j+="\f",-1);break;case 44:a[c++]=(Na(j)-1)*C,C=1;break;case 64:Va()===45&&(j+=ww(_o())),p=Va(),d=f=Na(E=j+=$0t(xw())),S++;break;case 45:y===45&&Na(j)==2&&(v=0)}}return o}function pJ(e,t,n,r,i,o,s,a,l,c,d){for(var f=i-1,p=i===0?o:[""],m=KI(p),y=0,v=0,b=0;y<r;++y)for(var C=0,S=av(e,f+1,f=N0t(v=s[y])),E=e;C<m;++C)(E=Kge(v>0?p[C]+" "+S:Jt(S,/&\f/g,p[C])))&&(l[b++]=E);return kS(e,t,n,i===0?WI:a,l,c,d)}function F0t(e,t,n){return kS(e,t,n,Wge,SS(R0t()),av(e,2,-2),0)}function mJ(e,t,n,r){return kS(e,t,n,GI,av(e,0,r),av(e,r+1,-1),r)}function Qp(e,t){for(var n="",r=KI(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function B0t(e,t,n,r){switch(e.type){case A0t:if(e.children.length)break;case _0t:case GI:return e.return=e.return||e.value;case Wge:return"";case Gge:return e.return=e.value+"{"+Qp(e.children,r)+"}";case WI:e.value=e.props.join(",")}return Na(n=Qp(e.children,r))?e.return=e.value+"{"+n+"}":""}function H0t(e){var t=KI(e);return function(n,r,i,o){for(var s="",a=0;a<t;a++)s+=e[a](n,r,i,o)||"";return s}}function V0t(e){return function(t){t.root||(t=t.return)&&e(t)}}function U0t(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var q0t=function(t,n,r){for(var i=0,o=0;i=o,o=Va(),i===38&&o===12&&(n[r]=1),!lv(o);)_o();return gb(t,ao)},W0t=function(t,n){var r=-1,i=44;do switch(lv(i)){case 0:i===38&&Va()===12&&(n[r]=1),t[r]+=q0t(ao-1,n,r);break;case 2:t[r]+=ww(i);break;case 4:if(i===44){t[++r]=Va()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=SS(i)}while(i=_o());return t},G0t=function(t,n){return Zge(W0t(Xge(t),n))},gJ=new WeakMap,K0t=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;
vendor: 6,546 bytes, lines 642-649
642if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!gJ.get(r))&&!i){gJ.set(t,!0);for(var o=[],s=G0t(n,o),a=r.props,l=0,c=0;l<s.length;l++)for(var d=0;d<a.length;d++,c++)t.props[c]=o[l]?s[l].replace(/&\f/g,a[d]):a[d]+" "+s[l]}}},Y0t=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Qge(e,t){switch(T0t(e,t)){case 5103:return Qt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Qt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Qt+e+n5+e+fi+e+e;case 6828:case 4268:return Qt+e+fi+e+e;case 6165:return Qt+e+fi+"flex-"+e+e;case 5187:return Qt+e+Jt(e,/(\w+).+(:[^]+)/,Qt+"box-$1$2"+fi+"flex-$1$2")+e;case 5443:return Qt+e+fi+"flex-item-"+Jt(e,/flex-|-self/,"")+e;case 4675:return Qt+e+fi+"flex-line-pack"+Jt(e,/align-content|flex-|-self/,"")+e;case 5548:return Qt+e+fi+Jt(e,"shrink","negative")+e;case 5292:return Qt+e+fi+Jt(e,"basis","preferred-size")+e;case 6060:return Qt+"box-"+Jt(e,"-grow","")+Qt+e+fi+Jt(e,"grow","positive")+e;case 4554:return Qt+Jt(e,/([^-])(transform)/g,"$1"+Qt+"$2")+e;case 6187:return Jt(Jt(Jt(e,/(zoom-|grab)/,Qt+"$1"),/(image-set)/,Qt+"$1"),e,"")+e;case 5495:case 3959:return Jt(e,/(image-set\([^]*)/,Qt+"$1$`$1");case 4968:return Jt(Jt(e,/(.+:)(flex-)?(.*)/,Qt+"box-pack:$3"+fi+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Qt+e+e;case 4095:case 3583:case 4068:case 2532:return Jt(e,/(.+)-inline(.+)/,Qt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Na(e)-1-t>6)switch(Jr(e,t+1)){case 109:if(Jr(e,t+4)!==45)break;case 102:return Jt(e,/(.+:)(.+)-([^]+)/,"$1"+Qt+"$2-$3$1"+n5+(Jr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~YM(e,"stretch")?Qge(Jt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Jr(e,t+1)!==115)break;case 6444:switch(Jr(e,Na(e)-3-(~YM(e,"!important")&&10))){case 107:return Jt(e,":",":"+Qt)+e;case 101:return Jt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Qt+(Jr(e,14)===45?"inline-":"")+"box$3$1"+Qt+"$2$3$1"+fi+"$2box$3")+e}break;case 5936:switch(Jr(e,t+11)){case 114:return Qt+e+fi+Jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Qt+e+fi+Jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Qt+e+fi+Jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Qt+e+fi+e+e}return e}var X0t=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case GI:t.return=Qge(t.value,t.length);break;case Gge:return Qp([Wg(t,{value:Jt(t.value,"@","@"+Qt)})],i);case WI:if(t.length)return O0t(t.props,function(o){switch(M0t(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Qp([Wg(t,{props:[Jt(o,/:(read-\w+)/,":"+n5+"$1")]})],i);case"::placeholder":return Qp([Wg(t,{props:[Jt(o,/:(plac\w+)/,":"+Qt+"input-$1")]}),Wg(t,{props:[Jt(o,/:(plac\w+)/,":"+n5+"$1")]}),Wg(t,{props:[Jt(o,/:(plac\w+)/,fi+"input-$1")]})],i)}return""})}},Z0t=[X0t],Q0t=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(v){var b=v.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(v),v.setAttribute("data-s",""))})}var i=t.stylisPlugins||Z0t,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(v){for(var b=v.getAttribute("data-emotion").split(" "),C=1;C<b.length;C++)o[b[C]]=!0;a.push(v)});var l,c=[K0t,Y0t];{var d,f=[B0t,V0t(function(v){d.insert(v)})],p=H0t(c.concat(i,f)),m=function(b){return Qp(z0t(b),p)};l=function(b,C,S,E){d=S,m(b?b+"{"+C.styles+"}":C.styles),E&&(y.inserted[C.name]=!0)}}var y={key:n,sheet:new k0t({key:n,container:s,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return y.sheet.hydrate(a),y},KA={exports:{}},rn={};/** @license React v16.13.1 643 * react-is.production.min.js 644 * 645 * Copyright (c) Facebook, Inc. and its affiliates. 646 * 647 * This source code is licensed under the MIT license found in the 648 * LICENSE file in the root directory of this source tree. 649 */var yJ;function J0t(){if(yJ)return rn;yJ=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,v=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,C=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(_){if(typeof _=="object"&&_!==null){var N=_.$$typeof;switch(N){case t:switch(_=_.type,_){case l:case c:case r:case o:case i:case f:return _;default:switch(_=_&&_.$$typeof,_){case a:case d:case y:case m:case s:return _;default:return N}}case n:return N}}}function A(_){return E(_)===c}return rn.AsyncMode=l,rn.ConcurrentMode=c,rn.ContextConsumer=a,rn.ContextProvider=s,rn.Element=t,rn.ForwardRef=d,rn.Fragment=r,rn.Lazy=y,rn.Memo=m,rn.Portal=n,rn.Profiler=o,rn.StrictMode=i,rn.Suspense=f,rn.isAsyncMode=function(_){return A(_)||E(_)===l},rn.isConcurrentMode=A,rn.isContextConsumer=function(_){return E(_)===a},rn.isContextProvider=function(_){return E(_)===s},rn.isElement=function(_){return typeof _=="object"&&_!==null&&_.$$typeof===t},rn.isForwardRef=function(_){return E(_)===d},rn.isFragment=function(_){return E(_)===r},rn.isLazy=function(_){return E(_)===y},rn.isMemo=function(_){return E(_)===m},rn.isPortal=function(_){return E(_)===n},rn.isProfiler=function(_){return E(_)===o},rn.isStrictMode=function(_){return E(_)===i},rn.isSuspense=function(_){return E(_)===f},rn.isValidElementType=function(_){return typeof _=="string"||typeof _=="function"||_===r||_===c||_===o||_===i||_===f||_===p||typeof _=="object"&&_!==null&&(_.$$typeof===y||_.$$typeof===m||_.$$typeof===s||_.$$typeof===a||_.$$typeof===d||_.$$typeof===b||_.$$typeof===C||_.$$typeof===S||_.$$typeof===v)},rn.typeOf=E,rn}var vJ;function emt(){return vJ||(vJ=1,KA.exports=J0t()),KA.exports}var YA,bJ;
vendor: 6,385 bytes, line 649
649function tmt(){if(bJ)return YA;bJ=1;var e=emt(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[e.ForwardRef]=r,o[e.Memo]=i;function s(y){return e.isMemo(y)?i:o[y.$$typeof]||t}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,p=Object.prototype;function m(y,v,b){if(typeof v!="string"){if(p){var C=f(v);C&&C!==p&&m(y,C,b)}var S=l(v);c&&(S=S.concat(c(v)));for(var E=s(y),A=s(v),_=0;_<S.length;++_){var N=S[_];if(!n[N]&&!(b&&b[N])&&!(A&&A[N])&&!(E&&E[N])){var j=d(v,N);try{a(y,N,j)}catch{}}}}return y}return YA=m,YA}tmt();var nmt=!0;function rmt(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Jge=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||nmt===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},imt=function(t,n,r){Jge(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function omt(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var smt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},amt=/[A-Z]|^ms/g,lmt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,e1e=function(t){return t.charCodeAt(1)===45},xJ=function(t){return t!=null&&typeof t!="boolean"},XA=U0t(function(e){return e1e(e)?e:e.replace(amt,"-$&").toLowerCase()}),wJ=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lmt,function(r,i,o){return ja={name:i,styles:o,next:ja},i})}return smt[t]!==1&&!e1e(t)&&typeof n=="number"&&n!==0?n+"px":n};function cv(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ja={name:i.name,styles:i.styles,next:ja},i.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)ja={name:s.name,styles:s.styles,next:ja},s=s.next;var a=o.styles+";";return a}return cmt(e,t,n)}case"function":{if(e!==void 0){var l=ja,c=n(e);return ja=l,cv(e,t,c)}break}}var d=n;return d}function cmt(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=cv(e,t,n[i])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;xJ(a)&&(r+=XA(o)+":"+wJ(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&t==null)for(var l=0;l<s.length;l++)xJ(s[l])&&(r+=XA(o)+":"+wJ(o,s[l])+";");else{var c=cv(e,t,s);switch(o){case"animation":case"animationName":{r+=XA(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var CJ=/label:\s*([^\s;{]+)\s*(;|$)/g,ja;function t1e(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";ja=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=cv(n,t,o);else{var s=o;i+=s[0]}for(var a=1;a<e.length;a++)if(i+=cv(n,t,e[a]),r){var l=o;i+=l[a]}CJ.lastIndex=0;for(var c="",d;(d=CJ.exec(i))!==null;)c+="-"+d[1];var f=omt(i)+c;return{name:f,styles:i,next:ja}}var umt=function(t){return t()},dmt=xi.useInsertionEffect?xi.useInsertionEffect:!1,fmt=dmt||umt,n1e=x.createContext(typeof HTMLElement<"u"?Q0t({key:"css"}):null);n1e.Provider;var hmt=function(t){return x.forwardRef(function(n,r){var i=x.useContext(n1e);return t(n,i,r)})},pmt=x.createContext({}),YI={}.hasOwnProperty,ZM="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",mmt=function(t,n){var r={};for(var i in n)YI.call(n,i)&&(r[i]=n[i]);return r[ZM]=t,r},gmt=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return Jge(n,r,i),fmt(function(){return imt(n,r,i)}),null},ymt=hmt(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[ZM],o=[r],s="";typeof e.className=="string"?s=rmt(t.registered,o,e.className):e.className!=null&&(s=e.className+" ");var a=t1e(o,void 0,x.useContext(pmt));s+=t.key+"-"+a.name;var l={};for(var c in e)YI.call(e,c)&&c!=="css"&&c!==ZM&&(l[c]=e[c]);return l.className=s,n&&(l.ref=n),x.createElement(x.Fragment,null,x.createElement(gmt,{cache:t,serialized:a,isStringTag:typeof i=="string"}),x.createElement(i,l))}),vmt=ymt,Je=function(t,n){var r=arguments;if(n==null||!YI.call(n,"css"))return x.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=vmt,o[1]=mmt(t,n);for(var s=2;s<i;s++)o[s]=r[s];return x.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(Je||(Je={}));function XI(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t1e(t)}function bmt(){var e=XI.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function xmt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var QM=x.useLayoutEffect,wmt=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","
649setValue","theme"],r5=function(){};function Cmt(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function Smt(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var s in t)t.hasOwnProperty(s)&&t[s]&&o.push("".concat(Cmt(e,s)));return o.filter(function(a){return a}).map(function(a){return String(a).trim()}).join(" ")}var SJ=function(t){return Omt(t)?t.filter(Boolean):ih(t)==="object"&&t!==null?[t]:[]},r1e=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=zi(t,wmt);return Ge({},n)},Jn=function(t,n,r){var i=t.cx,o=t.getStyles,s=t.getClassNames,a=t.className;return{css:o(n,t),className:i(r??{},s(n,t),a)}};function _S(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Emt(e){return _S(e)?window.innerHeight:e.clientHeight}function i1e(e){return _S(e)?window.pageYOffset:e.scrollTop}function i5(e,t){if(_S(e)){window.scrollTo(0,t);return}e.scrollTop=t}function kmt(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function _mt(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function H2(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:r5,i=i1e(e),o=t-i,s=10,a=0;function l(){a+=s;var c=_mt(a,i,o,n);i5(e,c),a<n?window.requestAnimationFrame(l):r(e)}l()}function EJ(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?i5(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&i5(e,Math.max(t.offsetTop-i,0))}function Amt(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function kJ(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Nmt(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var o1e=!1,jmt={get passive(){return o1e=!0}},V2=typeof window<"u"?window:{};V2.addEventListener&&V2.removeEventListener&&(V2.addEventListener("p",r5,jmt),V2.removeEventListener("p",r5,!1));var Tmt=o1e;function Mmt(e){return e!=null}function Omt(e){return Array.isArray(e)}function U2(e,t,n){return e?t:n}var Rmt=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(s){var a=us(s,1),l=a[0];return!r.includes(l)});return o.reduce(function(s,a){var l=us(a,2),c=l[0],d=l[1];return s[c]=d,s},{})},Pmt=["children","innerProps"],Dmt=["children","innerProps"];function Imt(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,s=e.isFixedPosition,a=e.controlHeight,l=kmt(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var d=l.getBoundingClientRect(),f=d.height,p=n.getBoundingClientRect(),m=p.bottom,y=p.height,v=p.top,b=n.offsetParent.getBoundingClientRect(),C=b.top,S=s?window.innerHeight:Emt(l),E=i1e(l),A=parseInt(getComputedStyle(n).marginBottom,10),_=parseInt(getComputedStyle(n).marginTop,10),N=C-_,j=S-v,T=N+E,O=f-E-v,D=m-S+E+A,R=E+v-_,I=160;switch(i){case"auto":case"bottom":if(j>=y)return{placement:"bottom",maxHeight:t};if(O>=y&&!s)return o&&H2(l,D,I),{placement:"bottom",maxHeight:t};if(!s&&O>=r||s&&j>=r){o&&H2(l,D,I);var F=s?j-A:O-A;return{placement:"bottom",maxHeight:F}}if(i==="auto"||s){var $=t,H=s?N:T;return H>=r&&($=Math.min(H-A-a,t)),{placement:"top",maxHeight:$}}if(i==="bottom")return o&&i5(l,D),{placement:"bottom",maxHeight:t};break;case"top":if(N>=y)return{placement:"top",maxHeight:t};if(T>=y&&!s)return o&&H2(l,R,I),{placement:"top",maxHeight:t};if(!s&&T>=r||s&&N>=r){var L=t;return(!s&&T>=r||s&&N>=r)&&(L=s?N-_:T-_),o&&H2(l,R,I),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function Lmt(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var s1e=function(t){return t==="auto"?"bottom":t},$mt=function(t,n){var r,i=t.placement,o=t.theme,s=o.borderRadius,a=o.spacing,l=o.colors;return Ge((r={label:"menu"},h1(r,Lmt(i),"100%"),h1(r,"position","absolute"),h1(r,"width","100%"),h1(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:s,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},a1e=x.createContext(null),zmt=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,s=t.menuPosition,a=t.menuShouldScrollIntoView,l=t.theme,c=x.useContext(a1e)||{},d=c.setPortalPlacement,f=x.useRef(null),p=x.useState(i),m=us(p,2),y=m[0],v=m[1],b=x.useState(null),C=us(b,2),S=C[0],E=C[1],A=l.spacing.controlHeight;return QM(function(){var _=f.current;if(_){var N=s==="fixed",j=a&&!N,T=Imt({maxHeight:i,menuEl:_,minHeight:r,placement:o,shouldScroll:j,isFixedPosition:N,controlHeight:A});v(T.maxHeight),E(T.placement),d==null||d(T.placement)}},[i,o,s,a,r,d,A]),n({ref:f,placerProps:Ge(Ge({},t),{},{placement:S||s1e(o),maxHeight:y})})},Fmt=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return Je("div",Xe({},Jn(t,"menu",{menu:!0}),{ref:r},i),n)},Bmt=Fmt,Hmt=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Ge({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},Vmt=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return Je("div",Xe({},Jn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},l1e=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Ge({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},Umt=l1e,qmt=l1e,Wmt=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=zi(t,Pmt);return Je("div",Xe({},Jn(Ge(Ge({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},Gmt=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=zi(t,Dmt);return Je("div",Xe({},Jn(Ge(Ge({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},Kmt=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},Ymt=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,s=t.menuPlacement,a=t.menuPosition,l=x.useRef(null),c=x.useRef(null),d=x.use
649State(s1e(s)),f=us(d,2),p=f[0],m=f[1],y=x.useMemo(function(){return{setPortalPlacement:m}},[]),v=x.useState(null),b=us(v,2),C=b[0],S=b[1],E=x.useCallback(function(){if(i){var j=Amt(i),T=a==="fixed"?0:window.pageYOffset,O=j[p]+T;(O!==(C==null?void 0:C.offset)||j.left!==(C==null?void 0:C.rect.left)||j.width!==(C==null?void 0:C.rect.width))&&S({offset:O,rect:j})}},[i,a,p,C==null?void 0:C.offset,C==null?void 0:C.rect.left,C==null?void 0:C.rect.width]);QM(function(){E()},[E]);var A=x.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=cm(i,l.current,E,{elementResize:"ResizeObserver"in window}))},[i,E]);QM(function(){A()},[A]);var _=x.useCallback(function(j){l.current=j,A()},[A]);if(!n&&a!=="fixed"||!C)return null;var N=Je("div",Xe({ref:_},Jn(Ge(Ge({},t),{},{offset:C.offset,position:a,rect:C.rect}),"menuPortal",{"menu-portal":!0}),o),r);return Je(a1e.Provider,{value:y},n?Si.createPortal(N,n):N)},Xmt=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},Zmt=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return Je("div",Xe({},Jn(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},Qmt=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,s=t.selectProps.controlShouldRenderValue;return Ge({alignItems:"center",display:i&&o&&s?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},Jmt=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return Je("div",Xe({},Jn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},egt=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},tgt=function(t){var n=t.children,r=t.innerProps;return Je("div",Xe({},Jn(t,"indicatorsContainer",{indicators:!0}),r),n)},_J,ngt=["size"],rgt=["innerProps","isRtl","size"],igt={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},c1e=function(t){var n=t.size,r=zi(t,ngt);return Je("svg",Xe({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:igt},r))},ZI=function(t){return Je(c1e,Xe({size:20},t),Je("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},u1e=function(t){return Je(c1e,Xe({size:20},t),Je("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},d1e=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return Ge({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?s.neutral60:s.neutral20,padding:o*2,":hover":{color:r?s.neutral80:s.neutral40}})},ogt=d1e,sgt=function(t){var n=t.children,r=t.innerProps;return Je("div",Xe({},Jn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||Je(u1e,null))},agt=d1e,lgt=function(t){var n=t.children,r=t.innerProps;return Je("div",Xe({},Jn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||Je(ZI,null))},cgt=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,s=i.colors;return Ge({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?s.neutral10:s.neutral20,marginBottom:o*2,marginTop:o*2})},ugt=function(t){var n=t.innerProps;return Je("span",Xe({},n,Jn(t,"indicatorSeparator",{"indicator-separator":!0})))},dgt=bmt(_J||(_J=xmt([` 650 0%, 80%, 100% { opacity: 0; } 651 40% { opacity: 1; } 652`]))),fgt=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,s=o.colors,a=o.spacing.baseUnit;return Ge({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?s.neutral60:s.neutral20,padding:a*2})},ZA=function(t){var n=t.delay,r=t.offset;return Je("span",{css:XI({animation:"".concat(dgt," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},hgt=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,s=zi(t,rgt);return Je("div",Xe({},Jn(Ge(Ge({},s),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Je(ZA,{delay:0,offset:r}),Je(ZA,{delay:160,offset:!0}),Je(ZA,{delay:320,offset:!r}))},pgt=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,s=o.colors,a=o.borderRadius,l=o.spacing;return Ge({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?s.neutral5:s.neutral0,borderColor:r?s.neutral10:i?s.primary:s.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(s.primary):void 0,"&:hover":{borderColor:i?s.primary:s.neutral30}})},mgt=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,s=t.innerProps,a=t.menuIsOpen;return Je("div",Xe({ref:o}
652,Jn(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":a}),s,{"aria-disabled":r||void 0}),n)},ggt=mgt,ygt=["data"],vgt=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},bgt=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,s=t.Heading,a=t.headingProps,l=t.innerProps,c=t.label,d=t.theme,f=t.selectProps;return Je("div",Xe({},Jn(t,"group",{group:!0}),l),Je(s,Xe({},a,{selectProps:f,theme:d,getStyles:i,getClassNames:o,cx:r}),c),Je("div",null,n))},xgt=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Ge({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},wgt=function(t){var n=r1e(t);n.data;var r=zi(n,ygt);return Je("div",Xe({},Jn(t,"groupHeading",{"group-heading":!0}),r))},Cgt=bgt,Sgt=["innerRef","isDisabled","isHidden","inputClassName"],Egt=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,s=o.spacing,a=o.colors;return Ge(Ge({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},kgt),n?{}:{margin:s.baseUnit/2,paddingBottom:s.baseUnit/2,paddingTop:s.baseUnit/2,color:a.neutral80})},f1e={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},kgt={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ge({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},f1e)},_gt=function(t){return Ge({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},f1e)},Agt=function(t){var n=t.cx,r=t.value,i=r1e(t),o=i.innerRef,s=i.isDisabled,a=i.isHidden,l=i.inputClassName,c=zi(i,Sgt);return Je("div",Xe({},Jn(t,"input",{"input-container":!0}),{"data-value":r||""}),Je("input",Xe({className:n({input:!0},l),ref:o,style:_gt(a),disabled:s},c)))},Ngt=Agt,jgt=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors;return Ge({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:s.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},Tgt=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,s=t.cropWithEllipsis;return Ge({overflow:"hidden",textOverflow:s||s===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},Mgt=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,s=r.colors,a=t.isFocused;return Ge({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?s.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:s.dangerLight,color:s.danger}})},h1e=function(t){var n=t.children,r=t.innerProps;return Je("div",r,n)},Ogt=h1e,Rgt=h1e;function Pgt(e){var t=e.children,n=e.innerProps;return Je("div",Xe({role:"button"},n),t||Je(ZI,{size:14}))}var Dgt=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,s=t.isDisabled,a=t.removeProps,l=t.selectProps,c=r.Container,d=r.Label,f=r.Remove;return Je(c,{data:i,innerProps:Ge(Ge({},Jn(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":s})),o),selectProps:l},Je(d,{data:i,innerProps:Ge({},Jn(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Je(f,{data:i,innerProps:Ge(Ge({},Jn(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),selectProps:l}))},Igt=Dgt,Lgt=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.theme,a=s.spacing,l=s.colors;return Ge({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(a.baseUnit*2,"px ").concat(a.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},$gt=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,s=t.innerRef,a=t.innerProps;return Je("div",Xe({},Jn(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:s,"aria-disabled":r},a),n)},zgt=$gt,Fgt=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Ge({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},Bgt=function(t){var n=t.children,r=t.innerProps;return Je("div",Xe({},Jn(t,"placeholder",{placeholder:!0}),r),n)},Hgt=Bgt,Vgt=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,s=i.colors;return Ge({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?s.neutral40:s.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Ugt=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return Je("div",Xe({},Jn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},qgt=Ugt,Wgt={ClearIndicator:lgt,Control:ggt,DropdownIndicator:sgt,DownChevron:u1e,CrossIcon:ZI,Group:Cgt,GroupHeading:wgt,IndicatorsContainer:tgt,IndicatorSeparator:ugt,Input:Ngt,LoadingIndicator:hgt,Menu:Bmt,MenuList:Vmt,MenuPortal:Ymt,LoadingMessage:Gmt,NoOptionsMessage:Wmt,MultiValue:Igt,MultiValueContainer:Ogt,MultiValueLabel:Rgt,MultiValueRemove:Pgt,Option:zgt,Placeholder:Hgt,SelectContainer:Zmt,SingleValue:qgt,ValueContainer:Jmt},p1e=function(t){return Ge(Ge({},Wgt),t.components)},AJ=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Ggt(e,t){return!!(e===t||AJ(e)&&AJ(t))}function Kgt(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Ggt(e[n],t[n]))return!1;return!0}function m1e(e,t){t===void 0&&(t=Kgt);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var s=e.apply(this,i);return n={lastResult:s,lastArgs:i,lastThis:this},s}return r.clear=function(){n=null},r}var Ygt={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Xgt=function(t){return Je("span",Xe({css:Ygt},t))},NJ=Xgt,Zgt={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.tabSelectsValue,o=t.context,s=t.
vendor: 4,881 bytes, line 652
652isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(i?", press Tab to select the option and exit the menu":"",".");case"input":return s?"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,s=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return s?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,s=o===void 0?"":o,a=t.selectValue,l=t.isDisabled,c=t.isSelected,d=t.isAppleDevice,f=function(v,b){return v&&v.length?"".concat(v.indexOf(b)+1," of ").concat(v.length):""};if(n==="value"&&a)return"value ".concat(s," focused, ").concat(f(a,r),".");if(n==="menu"&&d){var p=l?" disabled":"",m="".concat(c?" selected":"").concat(p);return"".concat(s).concat(m,", ").concat(f(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},Qgt=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,s=t.isFocused,a=t.selectValue,l=t.selectProps,c=t.id,d=t.isAppleDevice,f=l.ariaLiveMessages,p=l.getOptionLabel,m=l.inputValue,y=l.isMulti,v=l.isOptionDisabled,b=l.isSearchable,C=l.menuIsOpen,S=l.options,E=l.screenReaderStatus,A=l.tabSelectsValue,_=l.isLoading,N=l["aria-label"],j=l["aria-live"],T=x.useMemo(function(){return Ge(Ge({},Zgt),f||{})},[f]),O=x.useMemo(function(){var H="";if(n&&T.onChange){var L=n.option,B=n.options,z=n.removedValue,V=n.removedValues,U=n.value,W=function(se){return Array.isArray(se)?null:se},G=z||L||W(U),Y=G?p(G):"",X=B||V||void 0,Q=X?X.map(p):[],ne=Ge({isDisabled:G&&v(G,a),label:Y,labels:Q},n);H=T.onChange(ne)}return H},[n,T,v,a,p]),D=x.useMemo(function(){var H="",L=r||i,B=!!(r&&a&&a.includes(r));if(L&&T.onFocus){var z={focused:L,label:p(L),isDisabled:v(L,a),isSelected:B,options:o,context:L===r?"menu":"value",selectValue:a,isAppleDevice:d};H=T.onFocus(z)}return H},[r,i,p,v,T,o,a,d]),R=x.useMemo(function(){var H="";if(C&&S.length&&!_&&T.onFilter){var L=E({count:o.length});H=T.onFilter({inputValue:m,resultsMessage:L})}return H},[o,m,C,T,S,E,_]),I=(n==null?void 0:n.action)==="initial-input-focus",F=x.useMemo(function(){var H="";if(T.guidance){var L=i?"value":C?"menu":"input";H=T.guidance({"aria-label":N,context:L,isDisabled:r&&v(r,a),isMulti:y,isSearchable:b,tabSelectsValue:A,isInitialFocus:I})}return H},[N,r,i,y,v,b,C,T,a,A,I]),$=Je(x.Fragment,null,Je("span",{id:"aria-selection"},O),Je("span",{id:"aria-focused"},D),Je("span",{id:"aria-results"},R),Je("span",{id:"aria-guidance"},F));return Je(x.Fragment,null,Je(NJ,{id:c},I&&$),Je(NJ,{"aria-live":j,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},s&&!I&&$))},Jgt=Qgt,JM=[{base:"A",letters:"Aâ¶ï¼¡ÃÃÃẦẤẪẨÃÄÄáº°áº®áº´áº²È¦Ç ÃÇẢÃ
ǺÇÈÈẠẬẶá¸ÄȺⱯ"},{base:"AA",letters:"ê²"},{base:"AE",letters:"ÃǼǢ"},{base:"AO",letters:"ê´"},{base:"AU",letters:"ê¶"},{base:"AV",letters:"ê¸êº"},{base:"AY",letters:"ê¼"},{base:"B",letters:"Bâ·ï¼¢á¸á¸á¸ÉÆÆ"},{base:"C",letters:"Câ¸ï¼£ÄÄÄÄÃá¸ÆÈ»ê¾"},{base:"D",letters:"Dâ¹ï¼¤á¸Äá¸á¸á¸á¸ÄÆÆÆê¹"},{base:"DZ",letters:"DZÇ"},{base:"Dz",letters:"DzÇ
"},{base:"E",letters:"Eâºï¼¥ÃÃÃá»áº¾á»á»áº¼Äá¸á¸ÄÄÃẺÄÈÈẸá»È¨á¸Äá¸á¸ÆÆ"},{base:"F",letters:"Fâ»ï¼¦á¸Æê»"},{base:"G",letters:"Gâ¼ï¼§Ç´ÄḠÄÄ Ç¦Ä¢Ç¤Æê ê½ê¾"},{base:"H",letters:"Hâ½ï¼¨Ä¤á¸¢á¸¦ÈḤḨḪĦⱧⱵê"},{base:"I",letters:"Iâ¾ï¼©ÃÃÃĨĪĬİÃḮá»ÇÈÈá»Ä®á¸¬Æ"},{base:"J",letters:"Jâ¿ï¼ªÄ´É"},{base:"K",letters:"KâKḰǨḲĶḴÆâ±©êêêê¢"},{base:"L",letters:"LâLĿĹĽḶḸĻḼḺÅȽⱢⱠêêê"},{base:"LJ",letters:"Ç"},{base:"Lj",letters:"Ç"},{base:"M",letters:"Mâï¼á¸¾á¹á¹â±®Æ"},{base:"N",letters:"NâNǸÅÃá¹Åá¹Å
á¹á¹È Æêê¤"},{base:"NJ",letters:"Ç"},{base:"Nj",letters:"Ç"},{base:"O",letters:"OâOÃÃÃá»á»á»á»Ãá¹È¬á¹Åá¹á¹ÅȮȰÃȪá»ÅÇÈÈÆ á»á»á» á»á»¢á»á»ÇªÇ¬ÃÇ¾ÆÆêê"},{base:"OI",letters:"Æ¢"},{base:"OO",letters:"ê"},{base:"OU",letters:"È¢"},{base:"P",letters:"Pâ
ï¼°á¹á¹Æ¤â±£êêê"},{base:"Q",letters:"Qâï¼±êêÉ"}
vendor: 3,873 bytes, line 652
652,{base:"R",letters:"Râï¼²Åá¹ÅÈÈá¹á¹Åá¹ÉⱤêê¦ê"},{base:"S",letters:"Sâï¼³áºÅṤÅṠŠṦṢṨÈÅâ±¾ê¨ê"},{base:"T",letters:"TâTṪŤṬÈŢṰṮŦƬƮȾê"},{base:"TZ",letters:"ê¨"},{base:"U",letters:"Uâï¼µÃÃÃŨṸŪṺŬÃÇÇÇÇỦŮŰÇÈÈÆ¯á»ªá»¨á»®á»¬á»°á»¤á¹²Å²á¹¶á¹´É"},{base:"V",letters:"VâVṼṾƲêÉ
"},{base:"VY",letters:"ê "},{base:"W",letters:"Wâï¼·áºáºÅ´áºáºáºâ±²"},{base:"X",letters:"XâXáºáº"},{base:"Y",letters:"YâYỲÃŶỸȲáºÅ¸á»¶á»´Æ³ÉỾ"},{base:"Z",letters:"ZâZŹáºÅ»Å½áºáºÆµÈ¤â±¿â±«ê¢"},{base:"a",letters:"aâï½áºÃ áâầấẫẩãÄÄằắẵẳȧǡäÇảåǻÇÈÈạáºáº·á¸Ä
â±¥É"},{base:"aa",letters:"ê³"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"êµ"},{base:"au",letters:"ê·"},{base:"av",letters:"ê¹ê»"},{base:"ay",letters:"ê½"},{base:"b",letters:"bâï½á¸á¸
á¸ÆÆÉ"},{base:"c",letters:"câï½ÄÄÄÄÃ§á¸ÆÈ¼ê¿â"},{base:"d",letters:"dâï½á¸Äá¸á¸á¸á¸ÄÆÉÉêº"},{base:"dz",letters:"dzÇ"},{base:"e",letters:"eâï½
èéêá»áº¿á»
á»áº½Äá¸á¸ÄÄëẻÄÈ
Èẹá»È©á¸Äá¸á¸ÉÉÇ"},{base:"f",letters:"fâï½á¸Æê¼"},{base:"g",letters:"gâï½ÇµÄḡÄÄ¡Ç§Ä£Ç¥É ê¡áµ¹ê¿"},{base:"h",letters:"hâï½Ä¥á¸£á¸§ÈḥḩḫáºÄ§â±¨â±¶É¥"},{base:"hv",letters:"Æ"},{base:"i",letters:"iâï½Ã¬ÃîĩīÄïḯá»ÇÈÈá»Ä¯á¸É¨Ä±"},{base:"j",letters:"jâï½ÄµÇ°É"},{base:"k",letters:"kâï½á¸±Ç©á¸³Ä·á¸µÆâ±ªêêê
ê£"},{base:"l",letters:"lâï½ÅÄºÄ¾á¸·á¸¹Ä¼á¸½á¸»Å¿ÅÆÉ«â±¡êêê"},{base:"lj",letters:"Ç"},{base:"m",letters:"mâï½á¸¿á¹á¹É±É¯"},{base:"n",letters:"nâï½Ç¹Åñá¹
Åá¹Åá¹á¹ÆÉ²Åêê¥"},{base:"nj",letters:"Ç"},{base:"o",letters:"oâï½Ã²Ã³Ã´á»á»á»á»Ãµá¹Èá¹Åá¹á¹Åȯȱöȫá»ÅÇÈÈÆ¡á»á»á»¡á»á»£á»á»Ç«ÇøǿÉêêɵ"},{base:"oi",letters:"Æ£"},{base:"ou",letters:"È£"},{base:"oo",letters:"ê"},{base:"p",letters:"pâï½á¹á¹Æ¥áµ½êêê"},{base:"q",letters:"qâ ï½Éêê"},{base:"r",letters:"râ¡ï½Åá¹ÅÈÈá¹á¹Åá¹Éɽêê§ê"},{base:"s",letters:"sâ¢ï½ÃÅá¹¥ÅṡšṧṣṩÈÅÈ¿ê©ê
áº"},{base:"t",letters:"tâ£ï½á¹«áºÅ¥á¹ÈţṱṯŧÆÊⱦê"},{base:"tz",letters:"ê©"},{base:"u",letters:"uâ¤ï½Ã¹ÃºÃ»Å©á¹¹Å«á¹»ÅüÇÇÇÇủůűÇÈÈÆ°á»«á»©á»¯á»á»±á»¥á¹³Å³á¹·á¹µÊ"},{base:"v",letters:"vâ¥ï½á¹½á¹¿ÊêÊ"},{base:"vy",letters:"ê¡"},{base:"w",letters:"wâ¦ï½áºáºÅµáºáº
áºáºâ±³"},{base:"x",letters:"xâ§ï½áºáº"},{base:"y",letters:"yâ¨ï½á»³Ã½Å·á»¹È³áºÃ¿á»·áºá»µÆ´Éỿ"},{base:"z",letters:"zâ©ï½ÅºáºÅ¼Å¾áºáºÆ¶È¥Éⱬê£"}],e1t=new RegExp("["+JM.map(function(e){return e.letters}).join("")+"]","g"),g1e={};for(var QA=0;QA<JM.length;QA++)for(var JA=JM[QA],eN=0;eN<JA.letters.length;eN++)g1e[JA.letters[eN]]=JA.base;var y1e=function(t){return t.replace(e1t,function(n){return g1e[n]})},t1t=m1e(y1e),jJ=function(t){return t.replace(/^\s+|\s+$/g,"")},n1t=function(t){return"".concat(t.label," ").concat(t.value)},r1t=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Ge({ignoreCase:!0,ignoreAccents:!0,stringify:n1t,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,s=i.ignoreAccents,a=i.stringify,l=i.trim,c=i.matchFrom,d=l?jJ(r):r,f=l?jJ(a(n)):a(n);return o&&(d=d.toLowerCase(),f=f.toLowerCase()),s&&(d=t1t(d),f=y1e(f)),c==="start"?f.substr(0,d.length)===d:f.indexOf(d)>-1}},i1t=["innerRef"];function o1t(e){var t=e.innerRef,n=zi(e,i1t),r=Rmt(n,"onExited","in","enter","exit","appear");return Je("input",Xe({ref:t},r,{css:XI({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var s1t=function(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function a1t(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,
652i=e.onTopArrive,o=e.onTopLeave,s=x.useRef(!1),a=x.useRef(!1),l=x.useRef(0),c=x.useRef(null),d=x.useCallback(function(b,C){if(c.current!==null){var S=c.current,E=S.scrollTop,A=S.scrollHeight,_=S.clientHeight,N=c.current,j=C>0,T=A-_-E,O=!1;T>C&&s.current&&(r&&r(b),s.current=!1),j&&a.current&&(o&&o(b),a.current=!1),j&&C>T?(n&&!s.current&&n(b),N.scrollTop=A,O=!0,s.current=!0):!j&&-C>E&&(i&&!a.current&&i(b),N.scrollTop=0,O=!0,a.current=!0),O&&s1t(b)}},[n,r,i,o]),f=x.useCallback(function(b){d(b,b.deltaY)},[d]),p=x.useCallback(function(b){l.current=b.changedTouches[0].clientY},[]),m=x.useCallback(function(b){var C=l.current-b.changedTouches[0].clientY;d(b,C)},[d]),y=x.useCallback(function(b){if(b){var C=Tmt?{passive:!1}:!1;b.addEventListener("wheel",f,C),b.addEventListener("touchstart",p,C),b.addEventListener("touchmove",m,C)}},[m,p,f]),v=x.useCallback(function(b){b&&(b.removeEventListener("wheel",f,!1),b.removeEventListener("touchstart",p,!1),b.removeEventListener("touchmove",m,!1))},[m,p,f]);return x.useEffect(function(){if(t){var b=c.current;return y(b),function(){v(b)}}},[t,y,v]),function(b){c.current=b}}var TJ=["boxSizing","height","overflow","paddingRight","position"],MJ={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function OJ(e){e.cancelable&&e.preventDefault()}function RJ(e){e.stopPropagation()}function PJ(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function DJ(){return"ontouchstart"in window||navigator.maxTouchPoints}var IJ=!!(typeof window<"u"&&window.document&&window.document.createElement),Gg=0,Sp={capture:!1,passive:!1};function l1t(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=x.useRef({}),o=x.useRef(null),s=x.useCallback(function(l){if(IJ){var c=document.body,d=c&&c.style;if(r&&TJ.forEach(function(y){var v=d&&d[y];i.current[y]=v}),r&&Gg<1){var f=parseInt(i.current.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,m=window.innerWidth-p+f||0;Object.keys(MJ).forEach(function(y){var v=MJ[y];d&&(d[y]=v)}),d&&(d.paddingRight="".concat(m,"px"))}c&&DJ()&&(c.addEventListener("touchmove",OJ,Sp),l&&(l.addEventListener("touchstart",PJ,Sp),l.addEventListener("touchmove",RJ,Sp))),Gg+=1}},[r]),a=x.useCallback(function(l){if(IJ){var c=document.body,d=c&&c.style;Gg=Math.max(Gg-1,0),r&&Gg<1&&TJ.forEach(function(f){var p=i.current[f];d&&(d[f]=p)}),c&&DJ()&&(c.removeEventListener("touchmove",OJ,Sp),l&&(l.removeEventListener("touchstart",PJ,Sp),l.removeEventListener("touchmove",RJ,Sp)))}},[r]);return x.useEffect(function(){if(t){var l=o.current;return s(l),function(){a(l)}}},[t,s,a]),function(l){o.current=l}}var c1t=function(t){var n=t.target;return n.ownerDocument.activeElement&&n.ownerDocument.activeElement.blur()},u1t={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function d1t(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,s=e.onBottomLeave,a=e.onTopArrive,l=e.onTopLeave,c=a1t({isEnabled:i,onBottomArrive:o,onBottomLeave:s,onTopArrive:a,onTopLeave:l}),d=l1t({isEnabled:n}),f=function(m){c(m),d(m)};return Je(x.Fragment,null,n&&Je("div",{onClick:c1t,css:u1t}),t(f))}var f1t={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},h1t=function(t){var n=t.name,r=t.onFocus;return Je("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:f1t,value:"",onChange:function(){}})},p1t=h1t;function QI(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function m1t(){return QI(/^iPhone/i)}function v1e(){return QI(/^Mac/i)}function g1t(){return QI(/^iPad/i)||v1e()&&navigator.maxTouchPoints>1}function y1t(){return m1t()||g1t()}function v1t(){return v1e()||y1t()}var b1t=function(t){return t.label},x1t=function(t){return t.label},w1t=function(t){return t.value},C1t=function(t){return!!t.isDisabled},S1t={clearIndicator:agt,container:Xmt,control:pgt,dropdownIndicator:ogt,group:vgt,groupHeading:xgt,indicatorsContainer:egt,indicatorSeparator:cgt,input:Egt,loadingIndicator:fgt,loadingMessage:qmt,menu:$mt,menuList:Hmt,menuPortal:Kmt,multiValue:jgt,multiValueLabel:Tgt,multiValueRemove:Mgt,noOptionsMessage:Umt,option:Lgt,placeholder:Fgt,singleValue:Vgt,valueContainer:Qmt},E1t={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},k1t=4,b1e=4,_1t=38,A1t=b1e*2,N1t={baseUnit:b1e,controlHeight:_1t,menuGutter:A1t},tN={borderRadius:k1t,colors:E1t,spacing:N1t},j1t={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:kJ(),captureMenuScroll:!kJ(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:r1t(),formatGroupLabel:b1t,getOptionLabel:x1t,getOptionValue:w1t,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:C1t,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Nmt(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function LJ(e,t,n,r){var i=C1e(e,t,n),o=S1e(e,t,n),s=w1e(e,t),a=o5(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:s,value:a,index:r}}function Sw(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(s,a){return LJ(e,s,t,a)}).filter(function(s){return zJ(e,s)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=LJ(e,n,t,r);return zJ(e,o)?o:void 0}).filter(Mmt)}function x1e(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,qI(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function $J(e,t){return e.reduce(function(n,r){return r.type==="group"?n.push.apply(n,qI(r.options.map(function(i){return{data:i.data,id:"".concat(t,"-").concat(r.index,"-").concat(i.index)}}))):n.push({data:r.data,id:"".concat(t,"-").concat(r.index)}),n},[])}function T1t(e,t){return x1e(Sw(e,t))}function zJ(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,s=t.label,a=t.value;return(!k1e(e)||!o)&&E1e(e,{label:s,value:a,data:i},r)}function M1t(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function O1t(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var nN=function(t,n){var r,i=(r=t.find(function(o){return o.data===n}))===null||r===void 0?void 0:r.id;return i||null},w1e=function(t,n){return t.getOptionLabel(n)},o5=function(t,n){return t.getOptionValue(n)};function C1e(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function S1e(e,t,n){if(n.indexOf(t)>-1)return!0;
652if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=o5(e,t);return n.some(function(i){return o5(e,i)===r})}function E1e(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var k1e=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},R1t=1,_1e=function(e){y0t(n,e);var t=b0t(n);function n(r){var i;if(m0t(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(l){i.controlRef=l},i.focusedOptionRef=null,i.getFocusedOptionRef=function(l){i.focusedOptionRef=l},i.menuListRef=null,i.getMenuListRef=function(l){i.menuListRef=l},i.inputRef=null,i.getInputRef=function(l){i.inputRef=l},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(l,c){var d=i.props,f=d.onChange,p=d.name;c.name=p,i.ariaOnChange(l,c),f(l,c)},i.setValue=function(l,c,d){var f=i.props,p=f.closeMenuOnSelect,m=f.isMulti,y=f.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:y}),p&&(i.setState({inputIsHiddenAfterUpdate:!m}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(l,{action:c,option:d})},i.selectOption=function(l){var c=i.props,d=c.blurInputOnSelect,f=c.isMulti,p=c.name,m=i.state.selectValue,y=f&&i.isOptionSelected(l,m),v=i.isOptionDisabled(l,m);if(y){var b=i.getOptionValue(l);i.setValue(m.filter(function(C){return i.getOptionValue(C)!==b}),"deselect-option",l)}else if(!v)f?i.setValue([].concat(qI(m),[l]),"select-option",l):i.setValue(l,"select-option");else{i.ariaOnChange(l,{action:"select-option",option:l,name:p});return}d&&i.blurInput()},i.removeValue=function(l){var c=i.props.isMulti,d=i.state.selectValue,f=i.getOptionValue(l),p=d.filter(function(y){return i.getOptionValue(y)!==f}),m=U2(c,p,p[0]||null);i.onChange(m,{action:"remove-value",removedValue:l}),i.focusInput()},i.clearValue=function(){var l=i.state.selectValue;i.onChange(U2(i.props.isMulti,[],null),{action:"clear",removedValues:l})},i.popValue=function(){var l=i.props.isMulti,c=i.state.selectValue,d=c[c.length-1],f=c.slice(0,c.length-1),p=U2(l,f,f[0]||null);d&&i.onChange(p,{action:"pop-value",removedValue:d})},i.getFocusedOptionId=function(l){return nN(i.state.focusableOptionsWithIds,l)},i.getFocusableOptionsWithIds=function(){return $J(Sw(i.props,i.state.selectValue),i.getElementId("option"))},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var l=arguments.length,c=new Array(l),d=0;d<l;d++)c[d]=arguments[d];return Smt.apply(void 0,[i.props.classNamePrefix].concat(c))},i.getOptionLabel=function(l){return w1e(i.props,l)},i.getOptionValue=function(l){return o5(i.props,l)},i.getStyles=function(l,c){var d=i.props.unstyled,f=S1t[l](c,d);f.boxSizing="border-box";var p=i.props.styles[l];return p?p(f,c):f},i.getClassNames=function(l,c){var d,f;return(d=(f=i.props.classNames)[l])===null||d===void 0?void 0:d.call(f,c)},i.getElementId=function(l){return"".concat(i.state.instancePrefix,"-").concat(l)},i.getComponents=function(){return p1e(i.props)},i.buildCategorizedOptions=function(){return Sw(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return x1e(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(l,c){i.setState({ariaSelection:Ge({value:l},c)})},i.onMenuMouseDown=function(l){l.button===0&&(l.stopPropagation(),l.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(l){i.blockOptionHover=!1},i.onControlMouseDown=function(l){if(!l.defaultPrevented){var c=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&i.onMenuClose():c&&i.openMenu("first"):(c&&(i.openAfterFocus=!0),i.focusInput()),l.target.tagName!=="INPUT"&&l.target.tagName!=="TEXTAREA"&&l.preventDefault()}},i.onDropdownIndicatorMouseDown=function(l){if(!(l&&l.type==="mousedown"&&l.button!==0)&&!i.props.isDisabled){var c=i.props,d=c.isMulti,f=c.menuIsOpen;i.focusInput(),f?(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()):i.openMenu("first"),l.preventDefault()}},i.onClearIndicatorMouseDown=function(l){l&&l.type==="mousedown"&&l.button!==0||(i.clearValue(),l.preventDefault(),i.openAfterFocus=!1,l.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(l){typeof i.props.closeMenuOnScroll=="boolean"?l.target instanceof HTMLElement&&_S(l.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(l)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(l){var c=l.touches,d=c&&c.item(0);d&&(i.initialTouchX=d.clientX,i.initialTouchY=d.clientY,i.userIsDragging=!1)},i.onTouchMove=function(l){var c=l.touches,d=c&&c.item(0);if(d){var f=Math.abs(d.clientX-i.initialTouchX),p=Math.abs(d.clientY-i.initialTouchY),m=5;i.userIsDragging=f>m||p>m}},i.onTouchEnd=function(l){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(l.target)&&i.menuListRef&&!i.menuListRef.contains(l.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(l){i.userIsDragging||i.onControlMouseDown(l)},i.onClearIndicatorTouchEnd=function(l){i.userIsDragging||i.onClearIndicatorMouseDown(l)},i.onDropdownIndicatorTouchEnd=function(l){i.userIsDragging||i.onDropdownIndicatorMouseDown(l)},i.handleInputChange=function(l){var c=i.props.inputValue,d=l.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(d,{action:"input-change",prevInputValue:c}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(l){i.props.onFocus&&i.props.onFocus(l),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(l){var c=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(l),i.onInputChange("",{action:"input-blur",prevInputValue:c}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(l){if(!(i.blockOptionHover||i.state.focusedOption===l)){var c=i.getFocusableOptions(),d=c.indexOf(l);
vendor: 14,032 bytes, line 652
652i.setState({focusedOption:l,focusedOptionId:d>-1?i.getFocusedOptionId(l):null})}},i.shouldHideSelectedOptions=function(){return k1e(i.props)},i.onValueInputFocus=function(l){l.preventDefault(),l.stopPropagation(),i.focus()},i.onKeyDown=function(l){var c=i.props,d=c.isMulti,f=c.backspaceRemovesValue,p=c.escapeClearsValue,m=c.inputValue,y=c.isClearable,v=c.isDisabled,b=c.menuIsOpen,C=c.onKeyDown,S=c.tabSelectsValue,E=c.openMenuOnFocus,A=i.state,_=A.focusedOption,N=A.focusedValue,j=A.selectValue;if(!v&&!(typeof C=="function"&&(C(l),l.defaultPrevented))){switch(i.blockOptionHover=!0,l.key){case"ArrowLeft":if(!d||m)return;i.focusValue("previous");break;case"ArrowRight":if(!d||m)return;i.focusValue("next");break;case"Delete":case"Backspace":if(m)return;if(N)i.removeValue(N);else{if(!f)return;d?i.popValue():y&&i.clearValue()}break;case"Tab":if(i.isComposing||l.shiftKey||!b||!S||!_||E&&i.isOptionSelected(_,j))return;i.selectOption(_);break;case"Enter":if(l.keyCode===229)break;if(b){if(!_||i.isComposing)return;i.selectOption(_);break}return;case"Escape":b?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:m}),i.onMenuClose()):y&&p&&i.clearValue();break;case" ":if(m)return;if(!b){i.openMenu("first");break}if(!_)return;i.selectOption(_);break;case"ArrowUp":b?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":b?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!b)return;i.focusOption("pageup");break;case"PageDown":if(!b)return;i.focusOption("pagedown");break;case"Home":if(!b)return;i.focusOption("first");break;case"End":if(!b)return;i.focusOption("last");break;default:return}l.preventDefault()}},i.state.instancePrefix="react-select-"+(i.props.instanceId||++R1t),i.state.selectValue=SJ(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.getFocusableOptionsWithIds(),s=i.buildFocusableOptions(),a=s.indexOf(i.state.selectValue[0]);i.state.focusableOptionsWithIds=o,i.state.focusedOption=s[a],i.state.focusedOptionId=nN(o,s[a])}return i}return g0t(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&EJ(this.menuListRef,this.focusedOptionRef),v1t()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(i){var o=this.props,s=o.isDisabled,a=o.menuIsOpen,l=this.state.isFocused;(l&&!s&&i.isDisabled||l&&a&&!i.menuIsOpen)&&this.focusInput(),l&&s&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!s&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(EJ(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,s=this.state,a=s.selectValue,l=s.isFocused,c=this.buildFocusableOptions(),d=i==="first"?0:c.length-1;if(!this.props.isMulti){var f=c.indexOf(a[0]);f>-1&&(d=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[d],focusedOptionId:this.getFocusedOptionId(c[d])},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,s=o.selectValue,a=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=s.indexOf(a);a||(l=-1);var c=s.length-1,d=-1;if(s.length){switch(i){case"previous":l===0?d=0:l===-1?d=c:d=l-1;break;case"next":l>-1&&l<c&&(d=l+1);break}this.setState({inputIsHidden:d!==-1,focusedValue:s[d]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,s=this.state.focusedOption,a=this.getFocusableOptions();if(a.length){var l=0,c=a.indexOf(s);s||(c=-1),i==="up"?l=c>0?c-1:a.length-1:i==="down"?l=(c+1)%a.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,l>a.length-1&&(l=a.length-1)):i==="last"&&(l=a.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:a[l],focusedValue:null,focusedOptionId:this.getFocusedOptionId(a[l])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(tN):Ge(Ge({},tN),this.props.theme):tN}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,s=this.getStyles,a=this.getClassNames,l=this.getValue,c=this.selectOption,d=this.setValue,f=this.props,p=f.isMulti,m=f.isRtl,y=f.options,v=this.hasValue();return{clearValue:i,cx:o,getStyles:s,getClassNames:a,getValue:l,hasValue:v,isMulti:p,isRtl:m,options:y,selectOption:c,selectProps:f,setValue:d,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,s=i.isMulti;return o===void 0?s:o}},{key:"isOptionDisabled",value:function(i,o){return C1e(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return S1e(this.props,i,o)}},{key:"filterOption",value:function(i,o){return E1e(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var s=this.props.inputValue,a=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:s,selectValue:a})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,s=i.isSearchable,a=i.inputId,l=i.inputValue,c=i.tabIndex,d=i.form,f=i.menuIsOpen,p=i.required,m=this.getComponents(),y=m.Input,v=this.state,b=v.inputIsHidden,C=v.ariaSelection,S=this.commonProps,E=a||this.getElementId("input"),A=Ge(Ge(Ge({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":p,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},f&&{"aria-controls":this.getElementId("listbox")}),!s&&{"aria-readonly":!0}),this.hasValue()?(C==null?void 0:C.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return s?x.createElement(y,Xe({},S,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:E,innerRef:this.getInputRef,isDisabled:o,isHidden:b,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:d,type:"text",value:l},A)):x.createElement(o1t,Xe({id:E,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:r5,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:d,value:""},A))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),s=o.MultiValue,a=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,d=o.SingleValue,f=o.Placeholder,p=this.commonProps,m=this.props,y=m.controlShouldRenderValue,v=m.isDisabled,b=m.isMulti,C=m.inputValue,S=m.placeholder,E=this.state,A=E.selectValue,_=E.focusedValue,N=E.isFocused;if(!this.hasValue()||!y)return C?null:x.createElement(f,Xe({},p,{key:"placeholder",isDisabled:v,isFocused:N,innerProps:{id:this.getElementId("placeholder")}}),S);if(b)return A.map(function(T,O){var D=T===_,R="".concat(i.getOptionLabel(T),"-").concat(i.getOptionValue(T));return x.createElement(s,Xe({},p,{components:{Container:a,Label:l,Remove:c},isFocused:D,isDisabled:v,key:R,index:O,removeProps:{onClick:function(){return i.removeValue(T)},onTouchEnd:function(){return i.removeValue(T)},onMouseDown:function(F){F.preventDefault()}},data:T}),i.formatOptionLabel(T,"value"))});if(C)return null;var j=A[0];return x.createElement(d,Xe({},p,{data:j,isDisabled:v}),this.formatOptionLabel(j,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,d=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(o,Xe({},s,{innerProps:f,isFocused:d}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,s=this.commonProps,a=this.props,l=a.isDisabled,c=a.isLoading,d=this.state.isFocused;if(!o||!c)return null;var f={"aria-hidden":"true"};return x.createElement(o,Xe({},s,{innerProps:f,isDisabled:l,isFocused:d}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,s=i.IndicatorSeparator;if(!o||!s)return null;var a=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return x.createElement(s,Xe({},a,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var s=this.commonProps,a=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return x.createElement(o,Xe({},s,{innerProps:c,isDisabled:a,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),s=o.Group,a=o.GroupHeading,l=o.Menu,c=o.MenuList,d=o.MenuPortal,f=o.LoadingMessage,p=o.NoOptionsMessage,m=o.Option,y=this.commonProps,v=this.state.focusedOption,b=this.props,C=b.captureMenuScroll,S=b.inputValue,E=b.isLoading,A=b.loadingMessage,_=b.minMenuHeight,N=b.maxMenuHeight,j=b.menuIsOpen,T=b.menuPlacement,O=b.menuPosition,D=b.menuPortalTarget,R=b.menuShouldBlockScroll,I=b.menuShouldScrollIntoView,F=b.noOptionsMessage,$=b.onMenuScrollToTop,H=b.onMenuScrollToBottom;if(!j)return null;var L=function(Y,X){var Q=Y.type,ne=Y.data,ie=Y.isDisabled,se=Y.isSelected,oe=Y.label,J=Y.value,ae=v===ne,re=ie?void 0:function(){return i.onOptionHover(ne)},pe=ie?void 0:function(){return i.selectOption(ne)},be="".concat(i.getElementId("option"),"-").concat(X),xe={id:be,onClick:pe,onMouseMove:re,onMouseOver:re,tabIndex:-1,role:"option","aria-selected":i.state.isAppleDevice?void 0:se};return x.createElement(m,Xe({},y,{innerProps:xe,data:ne,isDisabled:ie,isSelected:se,key:be,label:oe,type:Q,value:J,isFocused:ae,innerRef:ae?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(Y.data,"menu"))},B;if(this.hasOptions())B=this.getCategorizedOptions().map(function(G){if(G.type==="group"){var Y=G.data,X=G.options,Q=G.index,ne="".concat(i.getElementId("group"),"-").concat(Q),ie="".concat(ne,"-heading");return x.createElement(s,Xe({},y,{key:ne,data:Y,options:X,Heading:a,headingProps:{id:ie,data:G.data},label:i.formatGroupLabel(G.data)}),G.options.map(function(se){return L(se,"".concat(Q,"-").concat(se.index))}))}else if(G.type==="option")return L(G,"".concat(G.index))});else if(E){var z=A({inputValue:S});if(z===null)return null;B=x.createElement(f,y,z)}else{var V=F({inputValue:S});if(V===null)return null;B=x.createElement(p,y,V)}var U={minMenuHeight:_,maxMenuHeight:N,menuPlacement:T,menuPosition:O,menuShouldScrollIntoView:I},W=x.createElement(zmt,Xe({},y,U),function(G){var Y=G.ref,X=G.placerProps,Q=X.placement,ne=X.maxHeight;return x.createElement(l,Xe({},y,U,{innerRef:Y,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove},isLoading:E,placement:Q}),x.createElement(d1t,{captureEnabled:C,onTopArrive:$,onBottomArrive:H,lockEnabled:R},function(ie){return x.createElement(c,Xe({},y,{innerRef:function(oe){i.getMenuListRef(oe),ie(oe)},innerProps:{role:"listbox","aria-multiselectable":y.isMulti,id:i.getElementId("listbox")},isLoading:E,maxHeight:ne,focusedOption:v}),B)}))});return D||O==="fixed"?x.createElement(d,Xe({},y,{appendTo:D,controlElement:this.controlRef,menuPlacement:T,menuPosition:O}),W):W}},{key:"renderFormField",value:function(){var i=this,o=this.props,s=o.delimiter,a=o.isDisabled,l=o.isMulti,c=o.name,d=o.required,f=this.state.selectValue;if(d&&!this.hasValue()&&!a)return x.createElement(p1t,{name:c,onFocus:this.onValueInputFocus});if(!(!c||a))if(l)if(s){var p=f.map(function(v){return i.getOptionValue(v)}
652).join(s);return x.createElement("input",{name:c,type:"hidden",value:p})}else{var m=f.length>0?f.map(function(v,b){return x.createElement("input",{key:"i-".concat(b),name:c,type:"hidden",value:i.getOptionValue(v)})}):x.createElement("input",{name:c,type:"hidden",value:""});return x.createElement("div",null,m)}else{var y=f[0]?this.getOptionValue(f[0]):"";return x.createElement("input",{name:c,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,s=o.ariaSelection,a=o.focusedOption,l=o.focusedValue,c=o.isFocused,d=o.selectValue,f=this.getFocusableOptions();return x.createElement(Jgt,Xe({},i,{id:this.getElementId("live-region"),ariaSelection:s,focusedOption:a,focusedValue:l,isFocused:c,selectValue:d,focusableOptions:f,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,s=i.IndicatorsContainer,a=i.SelectContainer,l=i.ValueContainer,c=this.props,d=c.className,f=c.id,p=c.isDisabled,m=c.menuIsOpen,y=this.state.isFocused,v=this.commonProps=this.getCommonProps();return x.createElement(a,Xe({},v,{className:d,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:p,isFocused:y}),this.renderLiveRegion(),x.createElement(o,Xe({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:p,isFocused:y,menuIsOpen:m}),x.createElement(l,Xe({},v,{isDisabled:p}),this.renderPlaceholderOrValue(),this.renderInput()),x.createElement(s,Xe({},v,{isDisabled:p}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var s=o.prevProps,a=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,d=o.isFocused,f=o.prevWasFocused,p=o.instancePrefix,m=i.options,y=i.value,v=i.menuIsOpen,b=i.inputValue,C=i.isMulti,S=SJ(y),E={};if(s&&(y!==s.value||m!==s.options||v!==s.menuIsOpen||b!==s.inputValue)){var A=v?T1t(i,S):[],_=v?$J(Sw(i,S),"".concat(p,"-option")):[],N=a?M1t(o,S):null,j=O1t(o,A),T=nN(_,j);E={selectValue:S,focusedOption:j,focusedOptionId:T,focusableOptionsWithIds:_,focusedValue:N,clearFocusValueOnUpdate:!1}}var O=l!=null&&i!==s?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},D=c,R=d&&f;return d&&!R&&(D={value:U2(C,S,S[0]||null),options:S,action:"initial-input-focus"},R=!f),(c==null?void 0:c.action)==="initial-input-focus"&&(D=null),Ge(Ge(Ge({},E),O),{},{prevProps:i,ariaSelection:D,prevWasFocused:R})}}]),n}(x.Component);_1e.defaultProps=j1t;var P1t=x.forwardRef(function(e,t){var n=p0t(e);return x.createElement(_1e,Xe({ref:t},n))}),JI=P1t,D1t=["in","onExited","appear","enter","exit"],I1t=function(t){return function(n){n.in,n.onExited,n.appear,n.enter,n.exit;var r=zi(n,D1t);return x.createElement(t,r)}},L1t=I1t,$1t=["component","duration","in","onExited"],A1e=function(t){var n=t.component,r=t.duration,i=r===void 0?1:r,o=t.in;t.onExited;var s=zi(t,$1t),a=x.useRef(null),l={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(i,"ms")},exiting:{opacity:0},exited:{opacity:0}};return x.createElement(nl,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:i,nodeRef:a},function(c){var d={style:Ge({},l[c]),ref:a};return x.createElement(n,Xe({innerProps:d},s))})},eO=260,z1t=function(t){var n=t.children,r=t.in,i=t.onExited,o=x.useRef(null),s=x.useState("auto"),a=us(s,2),l=a[0],c=a[1];x.useEffect(function(){var f=o.current;if(f){var p=window.requestAnimationFrame(function(){return c(f.getBoundingClientRect().width)});return function(){return window.cancelAnimationFrame(p)}}},[]);var d=function(p){switch(p){default:return{width:l};case"exiting":return{width:0,transition:"width ".concat(eO,"ms ease-out")};case"exited":return{width:0}}};return x.createElement(nl,{enter:!1,mountOnEnter:!0,unmountOnExit:!0,in:r,onExited:function(){var p=o.current;p&&(i==null||i(p))},timeout:eO,nodeRef:o},function(f){return x.createElement("div",{ref:o,style:Ge({overflow:"hidden",whiteSpace:"nowrap"},d(f))},n)})},F1t=["in","onExited"],B1t=function(t){return function(n){var r=n.in,i=n.onExited,o=zi(n,F1t);return x.createElement(z1t,{in:r,onExited:i},x.createElement(t,Xe({cropWithEllipsis:r},o)))}},H1t=B1t,V1t=function(t){return function(n){return x.createElement(A1e,Xe({component:t,duration:n.isMulti?eO:1},n))}},U1t=V1t,q1t=function(t){return function(n){return x.createElement(A1e,Xe({component:t},n))}},W1t=q1t,G1t=["component"],K1t=["children"],Y1t=function(t){return function(n){return n.isMulti?x.createElement(X1t,Xe({component:t},n)):x.createElement(OC,Xe({component:t},n))}},X1t=function(t){var n=t.component,r=zi(t,G1t),i=Z1t(r);return x.createElement(OC,Xe({component:n},i))},Z1t=function(t){var n=t.children,r=zi(t,K1t),i=r.isMulti,o=r.hasValue,s=r.innerProps,a=r.selectProps,l=a.components,c=a.c
652ontrolShouldRenderValue,d=x.useState(i&&c&&o),f=us(d,2),p=f[0],m=f[1],y=x.useState(!1),v=us(y,2),b=v[0],C=v[1];x.useEffect(function(){o&&!p&&m(!0)},[o,p]),x.useEffect(function(){b&&!o&&p&&m(!1),C(!1)},[b,o,p]);var S=function(){return C(!0)},E=function(j){if(i&&x.isValidElement(j)){if(j.type===l.MultiValue)return x.cloneElement(j,{onExited:S});if(j.type===l.Placeholder&&p)return null}return j},A=Ge(Ge({},s),{},{style:Ge(Ge({},s==null?void 0:s.style),{},{display:i&&o||p?"flex":"grid"})}),_=Ge(Ge({},r),{},{innerProps:A,children:x.Children.toArray(n).map(E)});return _},Q1t=Y1t,J1t=["Input","MultiValue","Placeholder","SingleValue","ValueContainer"],N1e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=p1e({components:t}),r=n.Input,i=n.MultiValue,o=n.Placeholder,s=n.SingleValue,a=n.ValueContainer,l=zi(n,J1t);return Ge({Input:L1t(r),MultiValue:H1t(i),Placeholder:U1t(o),SingleValue:W1t(s),ValueContainer:Q1t(a)},l)},yb=N1e();yb.Input;yb.MultiValue;yb.Placeholder;yb.SingleValue;yb.ValueContainer;var j1e=m1e(N1e);const eyt=j1e(),cr={white:"#ffffff",weakBg:"#f5f5f5",softBorder:"#e5e5e5",softBg:"#e5e5e5",textStrong:"#0a0a0a",textSub:"#525252",textSoft:"#a3a3a3",focusRing:"#0a0a0a"},tyt={control:(e,t)=>({...e,minHeight:"36px",fontSize:"0.875rem",fontFamily:"inherit",backgroundColor:t.isDisabled?cr.weakBg:cr.white,borderRadius:"8px",border:"none",boxShadow:t.isFocused?`0 0 0 1.5px ${cr.focusRing}`:`0 0 0 1px ${cr.softBorder}, 0 1px 2px rgba(0,0,0,0.04)`,transition:"box-shadow 0.2s ease, background-color 0.2s ease","&:hover":{backgroundColor:cr.weakBg,boxShadow:"0 0 0 1px transparent"},cursor:"pointer"}),valueContainer:e=>({...e,padding:"3px 8px",gap:"4px",flexWrap:"wrap"}),multiValue:e=>({...e,backgroundColor:cr.weakBg,borderRadius:"6px",border:`1px solid ${cr.softBorder}`,margin:"2px 2px 2px 0"}),multiValueLabel:e=>({...e,fontSize:"0.75rem",fontWeight:500,fontFamily:"inherit",color:cr.textSub,padding:"1px 5px"}),multiValueRemove:e=>({...e,color:cr.textSoft,borderRadius:"0 6px 6px 0",paddingLeft:"2px",paddingRight:"4px","&:hover":{backgroundColor:cr.softBg,color:cr.textSub}}),menu:e=>({...e,borderRadius:"12px",border:`1px solid ${cr.softBorder}`,boxShadow:"0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04)",overflow:"hidden",zIndex:9999}),menuList:e=>({...e,padding:"6px"}),option:(e,t)=>({...e,fontSize:"0.875rem",fontFamily:"inherit",borderRadius:"8px",padding:"6px 8px",backgroundColor:t.isFocused?cr.weakBg:"transparent",color:cr.textStrong,cursor:"pointer","&:active":{backgroundColor:cr.softBg}}),placeholder:e=>({...e,color:cr.textSub,fontSize:"0.875rem",fontFamily:"inherit"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:cr.textSoft,padding:"0 6px","&:hover":{color:cr.textSub}}),clearIndicator:e=>({...e,color:cr.textSoft,padding:"0 4px","&:hover":{color:cr.textSub}})};function nyt({value:e,onChange:t}){const n=x.useRef(null),[r,i]=x.useState(!1),[o,s]=x.useState(!1),a=async l=>{if(!l.type.startsWith("image/")){ze.error("Please select an image file");return}s(!0);try{const{url:c}=await vI(l);t(c)}catch{ze.error("Failed to upload image")}finally{s(!1)}};return u.jsxs("div",{children:[u.jsx("input",{ref:n,type:"file",accept:"image/*",className:"hidden",onChange:l=>{var d;const c=(d=l.target.files)==null?void 0:d[0];c&&a(c),l.target.value=""}}),u.jsx("div",{className:"relative h-36 w-full overflow-hidden rounded-xl",onDragOver:l=>{l.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:l=>{var d;l.preventDefault(),i(!1);const c=(d=l.dataTransfer.files)==null?void 0:d[0];c&&a(c)},children:e?u.jsxs(u.Fragment,{children:[u.jsx("img",{src:e,alt:"Cover",className:"h-full w-full object-cover"}),o?u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:u.jsx(nv,{size:20,className:"animate-spin text-white"})}):u.jsxs("button",{className:"absolute right-2 top-2 flex items-center gap-1 rounded-full bg-black/60 px-2.5 py-1 text-label-xs font-medium text-white backdrop-blur-sm transition-colors hover:bg-black/75",onClick:()=>{var l;return(l=n.current)==null?void 0:l.click()},children:[u.jsx(M0e,{size:11})," Change"]})]}):u.jsx("button",{className:Ar("flex h-full w-full flex-col items-center justify-center gap-2 rounded-xl border-2 border-dashed bg-bg-weak-50 text-text-disabled-300 transition-colors",r?"border-primary-base bg-primary-alpha-10":"border-stroke-soft-200 hover:border-stroke-sub-300 hover:bg-bg-weak-100"),onClick:()=>{var l;return!o&&((l=n.current)==null?void 0:l.click())},disabled:o,children:o?u.jsx(nv,{size:20,className:"animate-spin text-primary-base"}):u.jsxs(u.Fragment,{children:[u.jsx(fI,{size:24}),u.jsx("span",{className:"text-paragraph-xs",children:"Drop image or click to upload"})]})})})]})}function ryt({selectedTagIds:e,onTagsChange:t,selectedAuthorId:n,onAuthorChange:r}){const{data:i=[],isLoading:o}=A5(),{data:s=[],isLoading:a}=WO(),l=i.map(d=>({value:d.id,label:d.name})),c=l.filter(d=>e.includes(d.value));return u.jsxs(u.Fragment,{children:[u.jsx(Yi,{variant:"solid-text",children:"Ghost Settings"}),u.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{children:"Tags"}),u.jsx(JI,{isMulti:!0,isLoading:o,options:l,value:c,onChange:d=>t(d.map(f=>f.value)),placeholder:"Select tagsâ¦",styles:tyt,components:eyt,menuPosition:"fixed",closeMenuOnSelect:!1})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{children:"Publish as"}),u.jsxs(Xi,{value:n,onValueChange:r,disabled:a,children:[u.jsx(Qi,{size:"small",children:u.jsx(Zi,{placeholder:"Select authorâ¦"})}),u.jsx(Ji,{children:s.map(d=>
652u.jsxs(Ft,{value:d.id,children:[u.jsx(X5,{as:UI,size:"20",color:"gray",children:d.profileImage?u.jsx(CS,{src:d.profileImage}):null}),d.name]},d.id))})]})]})]})]})}function iyt({open:e,onClose:t,article:n}){const{integrations:{data:r}}=al(),i=r==null?void 0:r.reduce((N,j)=>(N[j.type]=j,N),{}),o=!!(i!=null&&i[ll.GHOST]),[s,{isLoading:a}]=RCe(),[l,c]=x.useState(n.coverImageUrl??""),[d,f]=x.useState(n.slug??""),[p,m]=x.useState(n.metaTitle??""),[y,v]=x.useState(n.metaDescription??""),[b,C]=x.useState(n.ghostTagIds??[]),[S,E]=x.useState(n.ghostAuthorId??"");x.useEffect(()=>{e&&(c(n.coverImageUrl??""),f(n.slug??""),m(n.metaTitle??""),v(n.metaDescription??""),C(n.ghostTagIds??[]),E(n.ghostAuthorId??""))},[e,n.id]);const A=async()=>{try{await s({id:n.id,slug:d||void 0,metaTitle:p||void 0,metaDescription:y||void 0,coverImageUrl:l||void 0,ghostTagIds:o?b:void 0,ghostAuthorId:o&&S||void 0}).unwrap(),ze.success("Settings saved"),t()}catch{ze.error("Failed to save settings")}},_=y.length;return u.jsx(Kpt,{open:e,onOpenChange:N=>!N&&t(),children:u.jsxs(Pge,{children:[u.jsxs(Dge,{children:[u.jsx(Ige,{children:"General Settings"}),u.jsx(Lge,{children:n.title??n.keyword})]}),u.jsxs($ge,{children:[u.jsx(Yi,{variant:"solid-text",children:"Cover Image & Slug"}),u.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{children:"Cover Image"}),u.jsx(nyt,{value:l,onChange:c})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"ds-slug",children:"Slug"}),u.jsx(Tn,{size:"small",children:u.jsx(Vn,{children:u.jsx(Mn,{id:"ds-slug",value:d,onChange:N=>f(N.target.value),placeholder:"article-slug"})})})]})]}),o&&u.jsx(ryt,{selectedTagIds:b,onTagsChange:C,selectedAuthorId:S,onAuthorChange:E}),u.jsx(Yi,{variant:"solid-text",children:"Meta Info & Google"}),u.jsxs("div",{className:"flex flex-col gap-4 p-5",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"ds-meta-title",children:"Meta Title"}),u.jsx(Tn,{size:"small",children:u.jsx(Vn,{children:u.jsx(Mn,{id:"ds-meta-title",value:p,onChange:N=>m(N.target.value),placeholder:"Enter meta titleâ¦"})})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"ds-meta-desc",children:"Meta Description"}),u.jsx(HI,{id:"ds-meta-desc",value:y,onChange:N=>v(N.target.value),rows:4,placeholder:"Enter meta descriptionâ¦",hasError:_>260,children:u.jsx(VI,{current:_,max:260})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("p",{className:"text-label-xs font-medium uppercase tracking-wide text-text-soft-400",children:"Google Preview"}),u.jsxs("div",{className:"space-y-0.5 rounded-lg border border-stroke-soft-200 p-3",children:[u.jsxs("p",{className:"truncate text-[11px] text-text-soft-400",children:["seio.so ⺠blog ⺠",d||"article-slug"]}),u.jsx("p",{className:"line-clamp-1 text-[15px] font-medium leading-snug text-[#1a0dab]",children:p||"No title set"}),u.jsx("p",{className:"line-clamp-2 text-[12px] leading-relaxed text-text-sub-600",children:y||"No description set."})]})]})]})]}),u.jsxs(zge,{children:[u.jsx(Re,{variant:"neutral",mode:"stroke",onClick:t,disabled:a,children:"Cancel"}),u.jsx(Re,{variant:"primary",mode:"filled",onClick:A,disabled:a,children:a?"Savingâ¦":"Save Changes"})]})]})})}function oyt({score:e}){const n=2*Math.PI*38,r=e/100*n,i=e>=70?"#14b8a6":e>=40?"#f59e0b":"#ef4444",o=e>=70?"Well optimised":e>=40?"Needs improvement":"Needs work";return u.jsxs("div",{className:"flex items-center gap-4 p-4 border-b border-stroke-soft-200",children:[u.jsxs("div",{className:"relative flex-shrink-0 w-[72px] h-[72px]",children:[u.jsxs("svg",{viewBox:"0 0 100 100",className:"w-full h-full -rotate-90",children:[u.jsx("circle",{cx:"50",cy:"50",r:38,fill:"none",stroke:"#e5e7eb",strokeWidth:"9"}),u.jsx("circle",{cx:"50",cy:"50",r:38,fill:"none",stroke:i,strokeWidth:"9",strokeDasharray:`${r} ${n}`,strokeLinecap:"round"})]}),u.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:u.jsxs("span",{className:"text-base font-bold text-text-strong-950",children:[e,"%"]})})]}),u.jsxs("div",{children:[u.jsxs("p",{className:"text-label-sm font-semibold text-text-strong-950",children:["SEO Score: (",e,"%)"]}),u.jsx("p",{className:"text-paragraph-xs text-text-sub-600 mt-0.5",children:o})]})]})}function syt({check:e,isLast:t}){return u.jsxs("div",{className:"relative flex items-start gap-3 py-2.5",children:[!t&&u.jsx("div",{className:"absolute left-[9px] top-[22px] bottom-0 w-0.5 bg-stroke-soft-200"}),u.jsx("div",{className:"relative flex-shrink-0 mt-0.5",children:e.passed?u.jsx("div",{className:"flex h-[18px] w-[18px] items-center justify-center rounded-full bg-success-base",children:u.jsx(Cn,{size:10,strokeWidth:3,className:"text-white"})}):u.jsx("div",{className:"flex h-[18px] w-[18px] items-center justify-center rounded-full bg-error-base",children:u.jsx(P0e,{size:10,strokeWidth:3,className:"text-white"})})}),u.jsx("p",{className:"text-paragraph-xs text-text-sub-600 leading-relaxed pt-0.5",children:e.hint})]})}function ayt({title:e,checks:t,defaultOpen:n=!1}){const[r,i]=x.useState(n),o=t.filter(s=>s.passed).length;return u.jsxs("div",{className:"border-b border-stroke-soft-200",children:[u.jsxs("button",{className:"flex w-full items-center justify-between px-4 py-3 hover:bg-bg-weak-50 transition-colors text-left",onClick:()=>i(s=>!s),children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-label-sm font-semibold text-text-strong-950",children:e}),u.jsxs("span",{className:Ar("text-[10px] font-medium px-1.5 py-0.5 rounded-full",o===t.length?"bg-success-lighter text-success-base":"bg-error-lighter text-error-base"),children:[o,"/",t.length]})]}),r?u.jsx(Wat,{size:15,className:"text-text-soft-400 flex-shrink-0"}):u.jsx(fb,{size:15,className:"text-text-soft-400 flex-shrink-0"})]}),r&&u.jsx("div",{className:"px-4 pb-3 pt-1",children:t.map((s,a)=>u.jsx(syt,{check:s,isLast:a===t.length-1},s.label))})]})}const lyt=[{title:"Title",labels:["Keyword in title"]},{title:"Meta",labels:["Keyword in meta title","Keyword in meta de
652scription","Meta description length"]},{title:"Content",labels:["Keyword in intro","Word count","Internal links","External links","Image with alt text","Keyword density","Subheadings (H2/H3)"]}];function cyt({open:e,onClose:t,metrics:n}){const r=Object.fromEntries(n.checks.map(i=>[i.label,i]));return u.jsxs("div",{className:Ar("absolute right-0 top-0 h-full w-[300px] flex flex-col bg-bg-white-0 border-l border-stroke-soft-200 shadow-xl z-20 transition-transform duration-300",e?"translate-x-0":"translate-x-full"),children:[u.jsx(oyt,{score:n.seoScore}),u.jsx("div",{className:"flex-1 overflow-y-auto",children:lyt.map((i,o)=>{const s=i.labels.map(a=>r[a]).filter(Boolean);return u.jsx(ayt,{title:i.title,checks:s,defaultOpen:o===0},i.title)})}),u.jsx("div",{className:"flex-shrink-0 p-4 border-t border-stroke-soft-200",children:u.jsx("button",{onClick:t,className:"w-full rounded-xl bg-primary-base py-2.5 text-label-sm font-semibold text-white transition-colors hover:bg-primary-dark",children:"Hide SEO Assistant"})})]})}const uyt=()=>{const e=br(),{id:t}=v5(),{data:n,isLoading:r,isError:i,refetch:o}=cne(t||""),[s,{isLoading:a}]=une(),[l]=kCe(),[c,d]=x.useState(0),[f,p]=x.useState("idle"),m=x.useRef(null),{register:y,handleSubmit:v,formState:{errors:b},reset:C,watch:S,setValue:E}=afe({defaultValues:{title:"",slug:"",metaTitle:"",metaDescription:""}}),[A,_]=x.useState(""),[N,j]=x.useState(""),[T,O]=x.useState(null),D=x.useRef(null),R=x.useRef(!1),[I,F]=x.useState(!1),$=t||"",[H,L]=x.useState(!1),[B,z]=x.useState(!1),[V,U]=x.useState(!1),[W,G]=x.useState(!1),{sidebarOpen:Y,setSidebarOpen:X,setEditorContent:Q}=E2e(),ne=S(),ie=kge(N,n==null?void 0:n.keyword,A,ne.metaTitle,ne.metaDescription),{seoScore:se}=ie;x.useEffect(()=>{n&&(R.current=!1,C({title:n.title||"",slug:n.slug||"",metaTitle:n.metaTitle||"",metaDescription:n.metaDescription||""}),_(n.title||""),j(n.content||""),Q(n.content||""),setTimeout(()=>{R.current=!0},0))},[n,C]);const J=Bpt(async()=>{if(!$)return Promise.resolve();p("saving");try{await s({id:$,title:A,finalContent:N}).unwrap(),p("saved"),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>p("idle"),2500)}catch(xe){return console.error("Error saving article:",xe),p("idle"),Promise.reject(xe)}},1e3),ae=(xe,ke)=>{j(xe),d(ke),Q(xe),R.current&&(F(!0),J())},re=async(xe,ke)=>{try{if(D.current)D.current.commands.insertContent(ke);else{const Pe=N+` 653 654`+ke;j(Pe),d(Ege(Pe))}await l({articleId:$,suggestionId:xe}).unwrap()}catch(Pe){console.error("Failed to handle section drop:",Pe)}},pe=()=>L(!0),be=()=>L(!1);return r?u.jsx("div",{className:"flex items-center justify-center min-h-screen",children:u.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary-base"})}):i||!n?u.jsxs("div",{className:"flex flex-col items-center justify-center min-h-screen",children:[u.jsx("h2",{className:"text-xl text-error-base mb-4",children:"Failed to load article"}),u.jsx(Re,{variant:"primary",size:"medium",onClick:()=>e("/"),children:"Go Back"})]}):u.jsx("div",{className:"flex flex-col lg:p-1.5 lg:pl-0",style:{minHeight:"100%"},children:u.jsx("div",{className:"bg-bg-white-0 lg:border-stroke-soft-200 relative flex flex-1 flex-col justify-between pb-4 lg:rounded-3xl lg:border lg:py-4 lg:pr-4 lg:pl-5",children:u.jsxs("div",{className:"flex flex-col h-[calc(100vh-64px)]",children:[u.jsx(Fpt,{editor:T,wordCount:c,onPublish:pe,isPublished:n.published,hasChanges:I,saveStatus:f,isScrolled:W,onOpenSettings:()=>z(!0)}),u.jsxs("div",{className:"relative flex flex-1 overflow-hidden",children:[u.jsx(cyt,{open:V,onClose:()=>U(!1),metrics:ie,keyword:n==null?void 0:n.keyword}),u.jsx("div",{className:"flex-1 overflow-y-auto",onScroll:xe=>G(xe.currentTarget.scrollTop>0),onDragOver:xe=>{xe.dataTransfer.types.includes("section-id")&&(xe.preventDefault(),xe.currentTarget.classList.add("bg-primary-alpha-10"))},onDragLeave:xe=>{xe.currentTarget.classList.remove("bg-primary-alpha-10")},onDragEnd:xe=>{xe.currentTarget.classList.remove("bg-primary-alpha-10")},onDrop:xe=>{xe.currentTarget.classList.remove("bg-primary-alpha-10");const ke=xe.dataTransfer.getData("text/plain"),Pe=xe.dataTransfer.getData("section-id");ke&&Pe&&(xe.preventDefault(),re(Pe,ke))},children:u.jsx(Rht,{content:N,onChange:ae,editorRef:D,onEditorReady:O,title:A,onTitleChange:xe=>{_(xe),E("title",xe),R.current&&(F(!0),J())},keyword:n==null?void 0:n.keyword})})]}),u.jsx("div",{className:Ar("absolute bottom-4 right-4 z-10 transition-all duration-300",Y||V?"opacity-0 pointer-events-none translate-y-1":"opacity-100 translate-y-0"),children:u.jsxs("button",{onClick:()=>U(!0),className:"flex items-center gap-3 bg-bg-white-0 border border-stroke-soft-200 rounded-2xl px-4 py-3 shadow-md hover:shadow-lg transition-shadow",children:[u.jsxs("div",{className:"relative w-14 h-8 flex-shrink-0",children:[u.jsxs("svg",{viewBox:"0 0 56 30",className:"w-full h-full",children:[u.jsx("circle",{cx:"28",cy:"28",r:"22",fill:"none",stroke:"#e5e7eb",strokeWidth:"5",strokeDasharray:`${Math.PI*22} ${2*Math.PI*22}`,transform:"rotate(-180 28 28)",strokeLinecap:"round"}),u.jsx("circle",{cx:"28",cy:"28",r:"22",fill:"none",stroke:se>=70?"#22c55e":se>=40?"#f59e0b":"#ef4444",strokeWidth:"5",strokeDasharray:`${se/100*Math.PI*22} ${2*Math.PI*22}`,transform:"rotate(-180 28 28)",strokeLinecap:"round"})]}),u.jsx("div",{className:"absolute inset-0 flex items-end justify-center pb-0.5",children:u.jsx("span",{className:"text-[11px] font-bold text-text-strong-950 leading-none",children:se})})]}),u.jsxs("div",{className:"text-left",children:[u.jsx("p",{className:"text-label-xs font-semibold text-text-strong-950 uppercase tracking-wide leading-tight",children:"SEO Score"}),u.jsx("p",{className:"text-[11px] text-text-soft-400 mt-0.5",children:"Click for details"})]})]})}),u.jsx(Gpt,{open:H,onClose:be,onPublishSuccess:()=>F(!1),article:n}),u.jsx(iyt,{open:B,onClose:()=>z(!1),article:n})]})})})};function dyt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t}
654,e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const fyt=x.forwardRef(dyt);function hyt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const pyt=x.forwardRef(hyt);function myt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))}const gyt=x.forwardRef(myt);function yyt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const vyt=x.forwardRef(yyt);function byt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const xyt=x.forwardRef(byt);function wyt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t}
654,e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"}))}const Cyt=x.forwardRef(wyt);function Syt({title:e,titleId:t,...n},r){return x.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?x.createElement("title",{id:t},e):null,x.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Eyt=x.forwardRef(Syt);function kyt(){const e=lo(),{pathname:t}=e;return u.jsx("div",{className:"flex flex-nowrap overflow-x-scroll no-scrollbar md:block md:overflow-auto px-3 py-6 border-b md:border-b-0 md:border-r border-gray-200 dark:border-gray-700/60 min-w-[15rem] md:space-y-3",children:u.jsxs("div",{children:[u.jsx("div",{className:"text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase mb-3",children:"Account Settings"}),u.jsxs("ul",{className:"flex flex-nowrap md:block mr-3 md:mr-0",children:[u.jsx("li",{className:"mr-0.5 md:mr-0 md:mb-0.5",children:u.jsxs(_p,{end:!0,to:"/settings/profile",className:`flex items-center px-2.5 py-2 rounded-lg whitespace-nowrap ${t.includes("/settings/profile")&&"bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-violet-500/[0.12] dark:from-violet-500/[0.24] to-violet-500/[0.04]"}`,children:[u.jsx(Eyt,{className:`shrink-0 h-4 w-4 mr-2 ${t.includes("/settings/profile")?"text-violet-500 dark:text-violet-400":"text-gray-400 dark:text-gray-500"}`}),u.jsx("span",{className:`text-sm font-medium ${t.includes("/settings/profile")?"text-violet-500 dark:text-violet-400":"text-gray-600 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-200"}`,children:"Profile"})]})}),u.jsx("li",{className:"mr-0.5 md:mr-0 md:mb-0.5",children:u.jsxs(_p,{end:!0,to:"/settings/billing",className:`flex items-center px-2.5 py-2 rounded-lg whitespace-nowrap ${t.includes("/settings/billing")&&"bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-violet-500/[0.12] dark:from-violet-500/[0.24] to-violet-500/[0.04]"}`,children:[u.jsx(gyt,{className:`shrink-0 h-4 w-4 mr-2 ${t.includes("/settings/billing")?"text-violet-500 dark:text-violet-400":"text-gray-400 dark:text-gray-500"}`}),u.jsx("span",{className:`text-sm font-medium ${t.includes("/settings/billing")?"text-violet-500 dark:text-violet-400":"text-gray-600 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-200"}`,children:"Billing"})]})}),u.jsx("li",{className:"mr-0.5 md:mr-0 md:mb-0.5",children:u.jsxs(_p,{end:!0,to:"/settings/usage",className:`flex items-center px-2.5 py-2 rounded-lg whitespace-nowrap ${t.includes("/settings/usage")&&"bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-violet-500/[0.12] dark:from-violet-500/[0.24] to-violet-500/[0.04]"}`,children:[u.jsx(fyt,{className:`shrink-0 h-4 w-4 mr-2 ${t.includes("/settings/usage")?"text-violet-500 dark:text-violet-400":"text-gray-400 dark:text-gray-500"}`}),u.jsx("span",{className:`text-sm font-medium ${t.includes("/settings/usage")?"text-violet-500 dark:text-violet-400":"text-gray-600 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-200"}`,children:"Usage"})]})}),u.jsx("li",{className:"mr-0.5 md:mr-0 md:mb-0.5",children:u.jsxs(_p,{end:!0,to:"/settings/integrations",className:`flex items-center px-2.5 py-2 rounded-lg whitespace-nowrap ${t.includes("/settings/integrations")&&"bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-violet-500/[0.12] dark:from-violet-500/[0.24] to-violet-500/[0.04]"}`,children:[u.jsx(Cyt,{className:`shrink-0 h-4 w-4 mr-2 ${t.includes("/settings/integrations")?"text-violet-500 dark:text-violet-400":"text-gray-400 dark:text-gray-500"}`}),u.jsx("span",{className:`text-sm font-medium ${t.includes("/settings/integrations")?"text-violet-500 dark:text-violet-400":"text-gray-600 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-200"}`,children:"Integrations"})]})}),u.jsx("li",{className:"mr-0.5 md:mr-0 md:mb-0.5",children:u.jsxs(_p,{end:!0,to:"/settings/preferences",className:`flex items-center px-2.5 py-2 rounded-lg whitespace-nowrap ${t.includes("/settings/preferences")&&"bg-[linear-gradient(135deg,var(--tw-gradient-stops))] from-violet-500/[0.12] dark:from-violet-500/[0.24] to-violet-500/[0.04]"}`,children:[u.jsx(pyt,{className:`shrink-0 h-4 w-4 mr-2 ${t.includes("/settings/preferences")?"text-violet-500 dark:text-violet-400":"text-gray-400 dark:text-gray-500"}`}),u.jsx("span",{className:`text-sm font-medium ${t.includes("/settings/preferences")?"text-violet-500 dark:text-violet-400":"text-gray-600 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-200"}`,children:"Preferences"})]})})]})]})})}const _yt=()=>u.jsx("div",{className:"flex h-[100dvh] overflow-hidden",children:u.jsx("div",{className:"relative flex flex-col flex-1 overflow-y-auto overflow-x-hidden",children:u.jsx("main",{className:"grow",children:u.jsxs("div",{className:"px-4 sm:px-6 lg:px-8 py-8 w-full max-w-[96rem] mx-auto",children:[u.jsx("div",{className:"mb-8",children:u.jsx("h1",{className:"text-2xl md:text-3xl text-gray-800 dark:text-gray-100 font-bold",children:"Account Settings"})}),u.jsx("div",{className:"bg-white dark:bg-gray-800 shadow-xs rounded-xl mb-8",children:u.jsxs("div",{className:"flex flex-col md:flex-row md:-mr-px",children:[u.jsx(kyt,{}),u.jsx("div",{className:"grow",children:u.jsx(U1,{})})]})})]})})})});
654function Ju({title:e,children:t,footer:n}){return u.jsxs("div",{className:"grow",children:[u.jsxs("div",{className:"p-6 space-y-6",children:[u.jsx("h2",{className:"text-2xl text-gray-800 dark:text-gray-100 font-bold mb-5",children:e}),t]}),n&&u.jsx("footer",{children:u.jsx("div",{className:"flex flex-col px-6 py-5 border-t border-gray-200 dark:border-gray-700/60",children:u.jsx("div",{className:"flex self-end",children:n})})})]})}const FJ=()=>{const[e,t]=x.useState(!1),[n,r]=x.useState({name:"",email:"",avatar:null}),i=async a=>{a.preventDefault(),t(!0);try{await new Promise(l=>setTimeout(l,1e3)),t(!1)}catch(l){console.error("Failed to update profile:",l),t(!1)}},o=a=>{var f;const{name:l,value:c,type:d}=a.target;if(d==="file"){const p=(f=a.target.files)==null?void 0:f[0];r(m=>({...m,[l]:p||null}))}else r(p=>({...p,[l]:c}))},s=u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300",children:"Cancel"}),u.jsx("button",{className:"btn bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white ml-3",onClick:i,disabled:e,children:e?"Saving...":"Save Changes"})]});return u.jsx(Ju,{title:"My Account",footer:s,children:u.jsxs("div",{className:"space-y-6",children:[u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Profile Picture"}),u.jsxs("div",{className:"flex items-center space-x-4",children:[u.jsx("div",{className:"w-20 h-20 rounded-full bg-gray-200 dark:bg-gray-700 flex items-center justify-center",children:n.avatar?u.jsx("img",{src:URL.createObjectURL(n.avatar),alt:"Profile",className:"w-full h-full rounded-full object-cover"}):u.jsx("svg",{className:"w-10 h-10 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:u.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})})}),u.jsx("button",{type:"button",className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-xs",children:"Change Picture"})]})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Personal Information"}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Name"}),u.jsx("input",{type:"text",id:"name",name:"name",value:n.name,onChange:o,className:"form-input w-full",placeholder:"Enter your name"})]}),u.jsxs("div",{children:[u.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Email"}),u.jsx("input",{type:"email",id:"email",name:"email",value:n.email,onChange:o,className:"form-input w-full",placeholder:"[email protected]"})]})]})]})]})})},Ayt="HintRoot",Nyt="HintIcon",jyt=el({slots:{root:"group flex items-center gap-1.5 text-xs text-text-soft-400",icon:"size-3 shrink-0 text-text-disabled-300"},variants:{disabled:{true:{root:"text-text-disabled-300",icon:"text-text-disabled-300"}},hasError:{true:{root:"text-error-base",icon:"text-error-base"}}}});function es({children:e,hasError:t,disabled:n,className:r,...i}){const o=x.useId(),{root:s}=jyt({hasError:t,disabled:n}),l=yd(e,{hasError:t,disabled:n},[Nyt],o);return u.jsx("div",{className:s({class:r}),...i,children:l})}es.displayName=Ayt;const Tyt=({open:e,onClose:t,integrationName:n,integrationLogo:r,appName:i,appLogo:o,permissions:s,privacyPolicyUrl:a})=>{const{integrations:{data:l}}=al(),c=l==null?void 0:l.reduce((D,R)=>(D[R.type]=R,D),{}),d=c==null?void 0:c[ll.GHOST],[f,p]=x.useState(d?"form":"permissions"),[m,y]=x.useState((d==null?void 0:d.config.ghostAdminApiKey)||""),[v,b]=x.useState((d==null?void 0:d.config.ghostApiUrl)||""),[C,S]=x.useState({}),[E]=fne(),[A,{isLoading:_}]=TCe(),N=K.useMemo(()=>{if(!(d!=null&&d.config))return!0;const D=d.config.ghostAdminApiKey||"",R=d.config.ghostApiUrl||"";return m!==D||v!==R},[d,m,v]);K.useEffect(()=>{e&&(d?(p("form"),y(d.config.ghostAdminApiKey||""),b(d.config.ghostApiUrl||"")):(p("permissions"),y(""),b("")),S({}))},[e,d]);const j=()=>{p("form")},T=()=>{const D={};if(m||(D.apiKey="Admin API Key is required"),!v)D.apiUrl="Ghost API URL is required";else try{const R=v.trim().replace(/\/+$/,"");console.log("Validating URL:",R),new URL(R)}catch(R){console.error("URL validation error:",R),D.apiUrl="Please enter a valid URL"}return console.log("Validation errors:",D),S(D),Object.keys(D).length===0},O=async()=>
654{if(console.log("Form values:",{apiUrl:v,apiKey:m}),!!T())try{const D=v.trim().replace(/\/+$/,"");console.log("Sending request with:",{cleanUrl:D,apiKey:m}),d?(await A({ghostApiUrl:D,ghostAdminApiKey:m.trim()}).unwrap(),ze.success("Successfully updated Ghost CMS integration",{description:"Your Ghost integration has been updated."})):(await E({ghostApiUrl:D,ghostAdminApiKey:m.trim()}).unwrap(),ze.success("Successfully connected to Ghost CMS",{description:"You can now import and manage your Ghost content."})),t()}catch(D){console.error("Integration error:",D);const R=D instanceof Error?D.message:"Failed to connect to Ghost CMS. Please check your credentials and try again.";ze.error("Connection failed",{description:R}),R.includes("credentials")?S({apiKey:"Invalid API Key",apiUrl:"Invalid API URL"}):R.includes("network")&&S({apiUrl:"Could not connect to the Ghost API. Please check your URL and try again."})}};return e?u.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-30 !mt-0",children:u.jsxs("div",{className:"bg-white dark:bg-gray-900 rounded-xl shadow-lg max-w-md w-full p-6 relative",children:[u.jsx("button",{className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",onClick:t,"aria-label":"Close",children:u.jsx("svg",{width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M6 18L18 6M6 6l12 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),u.jsxs("div",{className:"mb-5 text-center",children:[u.jsxs("div",{className:"inline-flex items-center justify-center space-x-3 mb-4",children:[u.jsx("div",{className:"flex justify-center items-center w-12 h-12 rounded-full bg-gray-100 dark:bg-gray-700",children:o}),u.jsx("svg",{className:"fill-current text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",children:u.jsx("path",{d:"M5 3V0L0 4l5 4V5h8a1 1 0 000-2H5zM11 11H3a1 1 0 000 2h8v3l5-4-5-4v3z"})}),r]}),u.jsxs("div",{className:"text-lg font-semibold text-gray-800 dark:text-gray-100",children:[d?"Update":"Connect"," ",i," with your ",n," account"]})]}),f==="permissions"?u.jsxs("div",{className:"text-sm mb-5",children:[u.jsxs("div",{className:"font-medium text-gray-800 dark:text-gray-100 mb-3",children:[i," would like to:"]}),u.jsx("ul",{className:"space-y-2 mb-5",children:s.map((D,R)=>u.jsxs("li",{className:"flex items-center",children:[u.jsx("svg",{className:"w-3 h-3 shrink-0 fill-current text-green-500 mr-2",viewBox:"0 0 12 12",children:u.jsx("path",{d:"M10.28 1.28L3.989 7.575 1.695 5.28A1 1 0 00.28 6.695l3 3a1 1 0 001.414 0l7-7A1 1 0 0010.28 1.28z"})}),u.jsx("div",{children:D})]},R))}),u.jsxs("div",{className:"text-xs text-gray-500",children:["By clicking on Allow access, you authorize ",i," to use your information in accordance with its"," ",u.jsx("a",{className:"text-violet-500 hover:text-violet-600 dark:hover:text-violet-400",href:a,target:"_blank",rel:"noopener noreferrer",children:"Privacy Policy"}),". You can stop it at any time on the integrations page of your ",i," account."]})]}):u.jsxs("form",{className:"space-y-5 mb-5",onSubmit:D=>{D.preventDefault(),O()},children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(It,{htmlFor:"ghost-admin-api-key",children:"Admin API Key *"}),u.jsx(Tn,{children:u.jsx(Mn,{id:"ghost-admin-api-key",type:"password",value:m,onChange:D=>y(D.target.value),required:!0,autoFocus:!0,placeholder:"Enter your Ghost Admin API Key","aria-invalid":!!C.apiKey})}),C.apiKey?u.jsx(es,{variant:"error",children:C.apiKey}):u.jsx(es,{children:"You can find this in your Ghost Admin dashboard under Settings > Integrations"})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(It,{htmlFor:"ghost-api-url",children:"Ghost API URL *"}),u.jsx(Tn,{children:u.jsx(Mn,{id:"ghost-api-url",type:"url",value:v,onChange:D=>b(D.target.value),required:!0,placeholder:"https://your-ghost-blog.com","aria-invalid":!!C.apiUrl})}),C.apiUrl?u.jsx(es,{variant:"error",children:C.apiUrl}):u.jsx(es,{children:"Enter your Ghost blog URL (e.g., https://your-ghost-blog.com)"})]})]}),u.jsx("div",{className:"flex flex-wrap justify-end space-x-2",children:f==="permissions"?u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300",onClick:t,children:"Cancel"}),u.jsx("button",{className:"btn-sm bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white",onClick:j,children:"Allow Access"})]}):u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300",onClick:t,disabled:_,children:"Cancel"}),u.jsx("button",{className:"btn-sm bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white disabled:opacity-50 disabled:cursor-not-allowed",onClick:O,disabled:_||!N&&d,children:_?u.jsxs("span",{className:"flex items-center",children:[u.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[u.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),u.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),d?"Updating...":"Connecting..."]}):d?"Update":"Connect"})]})})]})}):null},Myt=()=>{const[e,t]=K.useState(!1),{integrations:{data:n}}
654=al(),r=n==null?void 0:n.reduce((a,l)=>(a[l.type]=l,a),{}),i=r==null?void 0:r[ll.GHOST],o=a=>{try{return new URL(a).hostname}catch{return a}},s=u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300",children:"Cancel"}),u.jsx("button",{className:"btn bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white ml-3",children:"Save Changes"})]});return u.jsxs(Ju,{title:"Connected Apps",footer:s,children:[u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"mb-6",children:u.jsx("div",{className:"mb-4 border-b border-gray-200 dark:border-gray-700/60",children:u.jsx("ul",{className:"text-sm font-medium flex flex-nowrap -mx-4 sm:-mx-6 lg:-mx-8 overflow-x-scroll no-scrollbar",children:u.jsx("li",{className:"pb-3 mr-6 last:mr-0 first:pl-4 sm:first:pl-6 lg:first:pl-8 last:pr-4 sm:last:pr-6 lg:last:pr-8",children:u.jsx("a",{className:"text-violet-500 whitespace-nowrap",href:"#0",children:"Publishing"})})})})}),u.jsxs("section",{className:"pb-6",children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-4",children:"Publishing Platforms"}),u.jsxs("div",{className:"grid grid-cols-12 gap-6",children:[u.jsx("div",{className:"col-span-full xl:col-span-6 2xl:col-span-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700/60 shadow-xs rounded-lg",children:u.jsxs("div",{className:"flex flex-col h-full p-5",children:[u.jsxs("div",{className:"grow",children:[u.jsxs("header",{className:"flex items-center mb-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-full shrink-0 bg-gray-900 mr-3",children:u.jsx("svg",{className:"w-10 h-10 fill-current text-white p-2",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 100 16 8 8 0 000-16zm0 3a5 5 0 110 10 5 5 0 010-10z"})})}),u.jsx("h3",{className:"text-lg text-gray-800 dark:text-gray-100 font-semibold",children:"Ghost"})]}),u.jsx("div",{className:"text-sm",children:"Publish your content directly to your Ghost blog."}),i&&u.jsxs("div",{className:"mt-2 text-sm text-gray-500",children:["Connected to: ",o(i.config.ghostApiUrl)]})]}),u.jsx("footer",{className:"mt-4",children:u.jsxs("div",{className:"flex flex-wrap justify-end items-center",children:[!i&&u.jsxs("div",{className:"flex space-x-3 mr-auto",children:[u.jsxs("div",{className:"flex items-center text-gray-400 dark:text-gray-500",children:[u.jsx("svg",{className:"shrink-0 fill-current mr-1.5",width:"16",height:"16",viewBox:"0 0 16 16",children:u.jsx("path",{d:"M14.14 9.585a2.5 2.5 0 00-3.522 3.194c-.845.63-1.87.97-2.924.971a4.979 4.979 0 01-1.113-.135 4.436 4.436 0 01-1.343 1.682 6.91 6.91 0 006.9-1.165 2.5 2.5 0 002-4.547h.002z"})}),u.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-300",children:"5K+"})]}),u.jsxs("div",{className:"flex items-center text-yellow-500",children:[u.jsx("svg",{className:"shrink-0 fill-current mr-1.5",width:"16",height:"16",viewBox:"0 0 16 16",children:u.jsx("path",{d:"M10 5.934L8 0 6 5.934H0l4.89 3.954L2.968 16 8 12.223 13.032 16 11.11 9.888 16 5.934z"})}),u.jsx("div",{className:"text-sm text-yellow-600",children:"4.7"})]})]}),i?u.jsxs("div",{className:"flex items-center space-x-2",children:[u.jsxs("button",{className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-xs flex items-center",children:[u.jsx("svg",{className:"w-3 h-3 shrink-0 fill-current text-green-500 mr-2",viewBox:"0 0 12 12",children:u.jsx("path",{d:"M10.28 1.28L3.989 7.575 1.695 5.28A1 1 0 00.28 6.695l3 3a1 1 0 001.414 0l7-7A1 1 0 0010.28 1.28z"})}),u.jsx("span",{children:"Connected"})]}),u.jsx("button",{className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-xs",onClick:()=>t(!0),children:"Edit"})]}):u.jsx("button",{className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-xs",onClick:()=>t(!0),children:"Connect"})]})})]})}),u.jsx("div",{className:"col-span-full xl:col-span-6 2xl:col-span-4 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700/60 shadow-xs rounded-lg",children:u.jsxs("div",{className:"flex flex-col h-full p-5",children:[u.jsxs("div",{className:"grow",children:[u.jsxs("header",{className:"flex items-center mb-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-full shrink-0 bg-gray-900 mr-3",children:u.jsx("svg",{className:"w-10 h-10 fill-current text-white p-2",viewBox:"0 0 24 24",children:u.jsx("path",{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})})}),u.jsx("h3",{className:"text-lg text-gray-800 dark:text-gray-100 font-semibold",children:"WordPress"})]}),u.jsx("div",{className:"text-sm",children:"Publish your content directly to your WordPress site."})]}),u.jsx("footer",{className:"mt-4",children:u.jsxs("div",{className:"flex flex-wrap justify-end items-center",children:[u.jsxs("div",{className:"flex space-x-3 mr-auto",children:[u.jsxs("div",{className:"flex items-center text-gray-400 dark:text-gray-500",children:[u.jsx("svg",{className:"shrink-0 fill-current mr-1.5",width:"16",height:"16",viewBox:"0 0 16 16",children:u.jsx("path",{d:"M14.14 9.585a2.5 2.5 0 00-3.522 3.194c-.845.63-1.87.97-2.924.971a4.979 4.979 0 01-1.113-.135 4.436 4.436 0 01-1.343 1.682 6.91 6.91 0 006.9-1.165 2.5 2.5 0 002-4.547h.002z"})}),u.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-300",children:"10K+"})]}),u.jsxs("div",{className:"flex items-center text-yellow-500",children:[u.jsx("svg",{className:"shrink-0 fill-current mr-1.5",width:"16",height:"16",viewBox:"0 0 16 16",children:u.jsx("path",{d:"M10 5.934L8 0 6 5.934H0l4.89 3.954L2.968 16 8 12.223 13.032 16 11.11 9.888 16 5.934z"})}),u.jsx("div",{className:"text-sm text-yellow-600",children:"4.8"})]})]}),u.jsx("button",{className:"btn-sm border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 shadow-xs",children:"Coming Soon"})]})})]})})]})]})]}),u.jsx(Tyt,{open:e,onClose:()=>t(!1),integrationName:"Ghost",integrationLogo:u.jsx("svg",{className:"w-12 h-12 rounded-full bg-gray-900 p-2",viewBox:"0 0 24 24",children:u.jsx("path",{fill:"white",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 2a8 8 0 100 16 8 8 0 000-16zm0 3a5 5 0 110 10 5 5 0 010-10z"})}),appName:"Seio",appLogo:u.jsx(Nv,{width:24,height:24}),permissions:["Publish articles to your Ghost blog","Read your Ghost posts","Manage Ghost integration"],privacyPolicyUrl:"https://seio.co/privacy"})]})},Oyt=()=>
654{const[e,t]=x.useState(!0),[n,r]=x.useState(!0),i=u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300",children:"Cancel"}),u.jsx("button",{className:"btn bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white ml-3",children:"Save Changes"})]});return u.jsx(Ju,{title:"Preferences",footer:i,children:u.jsxs("div",{className:"space-y-6",children:[u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Notifications"}),u.jsx("ul",{children:u.jsxs("li",{className:"flex justify-between items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-gray-800 dark:text-gray-100 font-semibold",children:"Email Notifications"}),u.jsx("div",{className:"text-sm",children:"Receive email notifications about your articles and research."})]}),u.jsxs("div",{className:"flex items-center ml-4",children:[u.jsx("div",{className:"text-sm text-gray-400 dark:text-gray-500 italic mr-2",children:e?"On":"Off"}),u.jsxs("div",{className:"form-switch",children:[u.jsx("input",{type:"checkbox",id:"email-notifications",className:"sr-only",checked:e,onChange:()=>t(!e)}),u.jsxs("label",{htmlFor:"email-notifications",children:[u.jsx("span",{className:"bg-white shadow-xs","aria-hidden":"true"}),u.jsx("span",{className:"sr-only",children:"Enable email notifications"})]})]})]})]})})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Editor Settings"}),u.jsx("ul",{children:u.jsxs("li",{className:"flex justify-between items-center py-3",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-gray-800 dark:text-gray-100 font-semibold",children:"Auto Save"}),u.jsx("div",{className:"text-sm",children:"Automatically save your work as you type."})]}),u.jsxs("div",{className:"flex items-center ml-4",children:[u.jsx("div",{className:"text-sm text-gray-400 dark:text-gray-500 italic mr-2",children:n?"On":"Off"}),u.jsxs("div",{className:"form-switch",children:[u.jsx("input",{type:"checkbox",id:"auto-save",className:"sr-only",checked:n,onChange:()=>r(!n)}),u.jsxs("label",{htmlFor:"auto-save",children:[u.jsx("span",{className:"bg-white shadow-xs","aria-hidden":"true"}),u.jsx("span",{className:"sr-only",children:"Enable auto save"})]})]})]})]})})]})]})})},Ryt=({billing:e,onEdit:t})=>{const n=s=>{const a=new Date(s),l=a.toLocaleString("en-US",{month:"long"}),c=a.getDate(),d=a.getFullYear();return`${l} ${c}${r(c)}, ${d}`},r=s=>{if(s>3&&s<21)return"th";switch(s%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},i=()=>{const s=e.plan;return s.charAt(0).toUpperCase()+s.slice(1)},o=()=>{var l;const s=i().toLowerCase();return`$${((l={starter:29,growth:79,pro:129}[s])==null?void 0:l.toFixed(2))||"0.00"}`};return u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Billing Information"}),u.jsxs("ul",{children:[u.jsxs("li",{className:"md:flex md:justify-between md:items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-100 font-medium",children:"Plan"}),u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 ml-4",children:u.jsx("span",{className:"mr-3",children:i()})})]}),u.jsxs("li",{className:"md:flex md:justify-between md:items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-100 font-medium",children:"Amount"}),u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 ml-4",children:u.jsxs("span",{className:"mr-3",children:[o(),"/month"]})})]}),u.jsxs("li",{className:"md:flex md:justify-between md:items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-100 font-medium",children:"Status"}),u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 ml-4",children:u.jsx("span",{className:"mr-3 capitalize",children:e.status})})]}),u.jsxs("li",{className:"md:flex md:justify-between md:items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-100 font-medium",children:"Current Period"}),u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 ml-4",children:u.jsx("span",{className:"mr-3",children:n("2025-06-16T11:33:08.894Z")})})]}),u.jsxs("li",{className:"md:flex md:justify-between md:items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm text-gray-800 dark:text-gray-100 font-medium",children:"Auto-Renew"}),u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400 ml-4",children:u.jsx("span",{className:"mr-3",children:e.cancelAtPeriodEnd?"No":"Yes"})})]})]}),u.jsx("div",{className:"mt-6 flex justify-end",children:u.jsx(Re,{onClick:t,className:"bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white",children:"Change Plan"})})]})},rN={STARTER:"price_1RPLosLyzWyQENzHLkN3S9Ss",GROWTH:"price_1RPLpOLyzWyQENzHUlDAKw1X",PRO:"price_1RPLplLyzWyQENzHoi2ceHoh"},Pyt=()=>{var m;const[e]=hwe(),[t]=pne(),{data:n,isLoading:r}=hne(),{billing:i}=al(),o=x.useRef(!1),[s,a]=x.useState(!1);x.useEffect(()=>{const y=e.get("success"),v=e.get("canceled");o.current||(y==="true"?(ze.success("Subscription successful! Welc
654ome to your new plan."),o.current=!0):v==="true"&&(ze.info("Subscription canceled. No changes were made."),o.current=!0))},[e]);const l=async y=>{try{const{url:v}=await t({priceId:y}).unwrap();window.location.href=v}catch{ze.error("Failed to create checkout session. Please try again.")}},c=()=>i.plan,d=()=>{var y;return(y=n==null?void 0:n.subscription)!=null&&y.current_period_end?new Date(n.subscription.current_period_end*1e3).toLocaleDateString():null},f=((m=n==null?void 0:n.subscription)==null?void 0:m.status)==="active",p=()=>{a(!0)};return u.jsx(Ju,{title:"Billing & Invoices",children:u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{children:u.jsx("div",{className:"text-sm",children:f?u.jsxs("div",{children:["Your current plan is set to ",u.jsx("strong",{className:"font-medium",children:c()}),".",d()&&u.jsxs("span",{children:[" Your next billing date is ",u.jsx("strong",{className:"font-medium",children:d()}),"."]})]}):u.jsxs("div",{children:["Your current plan is set to ",u.jsx("strong",{className:"font-medium",children:c()}),". Upgrade to unlock advanced features."]})})}),f&&n.subscription&&!s&&u.jsx(Ryt,{billing:n.billing,onEdit:p}),(!f||s)&&u.jsxs("section",{children:[u.jsxs("div",{className:"flex justify-between items-center mb-4",children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold",children:"Plans"}),s&&u.jsx(Re,{onClick:()=>a(!1),variant:"ghost",className:"text-sm text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-gray-100",children:"â Back to billing"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm overflow-hidden",children:[u.jsxs("div",{className:"p-4",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"flex-shrink-0 bg-green-50 dark:bg-green-900/20 rounded-full p-1.5",children:u.jsx("div",{className:"h-6 w-6 bg-green-300 text-white rounded-full flex items-center justify-center",children:u.jsx("span",{className:"text-xs",children:"ð"})})}),u.jsx("h3",{className:"ml-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Starter"}),f&&c().toLowerCase()==="starter"&&u.jsx("span",{className:"ml-2 text-xs font-medium text-green-600 dark:text-green-400",children:"Current Plan"})]}),u.jsx("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:"Perfect for solo creators and small businesses."}),u.jsx("div",{className:"mt-3",children:u.jsxs("p",{className:"text-3xl font-extrabold text-gray-900 dark:text-gray-100",children:["$29",u.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"/mo"})]})}),u.jsx("div",{className:"mt-3",children:u.jsx(Re,{className:"w-full text-sm py-1 h-8 bg-green-400 hover:bg-green-500 dark:bg-green-500 dark:hover:bg-green-600 disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>l(rN.STARTER),disabled:f&&c().toLowerCase()==="starter",children:f&&c().toLowerCase()==="starter"?"Current Plan":"Get Started"})})]}),u.jsxs("div",{className:"px-4 pt-3 pb-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50 h-full",children:[u.jsx("h4",{className:"text-xs font-medium text-gray-900 dark:text-gray-100 uppercase tracking-wide",children:"WHAT'S INCLUDED"}),u.jsxs("ul",{className:"mt-3 space-y-2",children:[u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Generate up to 15 SEO articles/month"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"50 keyword searches/month"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Access to basic keyword research tools"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Full AI editor to write, edit & optimize"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Schedule articles for publishing"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Connect 1 publication"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Email support"})]})]})]})]}),u.jsxs("div",{className:"bg-white dark:bg-gray-800 border-2 border-blue-200 dark:border-blue-800 rounded-lg shadow-md overflow-hidden relative",children:[u.jsx("div",{className:"absolute top-0 inset-x-0",children:u.jsx("div",{className:"h-1 w-full bg-blue-300 dark:bg-blue-600"})}),u.jsxs("div",{className:"p-4",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"flex-shrink-0 bg-blue-50 dark:bg-blue-900/20 rounded-full p-1.5",children:u.jsx("div",{className:"h-6 w-6 bg-blue-300 text-white rounded-full flex items-center justify-center",children:u.jsx("span",{className:"text-xs",children:"â¡ï¸"})})}),u.jsx("h3",{className:"ml-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Growth"}),f&&c().toLowerCase()==="growth"&&u.jsx("span",{className:"ml-2 text-xs font-medium text-green-600 dark:text-green-400",children:"Current Plan"})]}),u.jsx("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:"Built for teams and content marketers scaling their strategy."}),u.jsx("div",{className:"mt-3",children:u.jsxs("p",{className:"text-3xl font-extrabold text-gray-900 dark:text-gray-100",children:["$79",u.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"/mo"})]})}),u.jsx("div",{className:"mt-3",children:u.jsx(Re,{className:"w-full text-sm py-1 h-8 bg-blue-400 hover:bg-blue-500 dark:bg-blue-500 dark:hover:bg-blue-600 disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>l(rN.GROWTH),disabled:f&&c().toLowerCase()==="growth",children:f&&c().toLowerCase()==="growth"?"Current Plan":"Upgrade"})})]}),u.jsxs("div",{className:"px-4 pt-3 pb-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50 h-full",children:[u.jsx("h4",{className:"text-xs font-medium text-gray-900 dark:text-gray-100 uppercase tracking-wide",children:"WHAT'S INCLUDED"}),u.jsxs("ul",{className:"mt-3 space-y-2",children:[u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Generate up to 60 SEO articles/month"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"500 keyword searches/month"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Advanced keyword insights & analysis"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"AI editor with smart suggestions"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Connect up to 3 publications"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Full scheduling + auto-publishing"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Team access (up to 3 users)"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Priority support"})]})]})]})]}),u.jsxs("div",{className:"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-sm overflow-hidden",children:[u.jsxs("div",{className:"p-4",children:[u.jsxs("div",{className:"flex items-center",children:[u.jsx("div",{className:"flex-shrink-0 bg-purple-50 dark:bg-purple-900/20 rounded-full p-1.5",children:u.jsx("div",{className:"h-6 w-6 bg-purple-300 text-white rounded-full flex items-center justify-center",children:u.jsx("span",{className:"text-xs",children:"ð"})})}),u.jsx("h3",{className:"ml-2 text-lg font-semibold text-gray-900 dark:text-gray-100",children:"Pro Unlimited"}),f&&c().toLowerCase()==="pro"&&u.jsx("span",{className:"ml-2 text-xs font-medium text-green-600 dark:text-green-400",children:"Current Plan"})]}),u.jsx("p",{className:"mt-2 text-xs text-gray-600 dark:text-gray-400",children:"For agencies, high-volume publishers, and AI-native teams."}),u.jsx("div",{className:"mt-3",children:u.jsxs("p",{className:"text-3xl font-extrabold text-gray-900 dark:text-gray-100",children:["$129",u.jsx("span",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"/mo"})]})}),u.jsx("div",{className:"mt-3",children:u.jsx(Re,{className:"w-full text-sm py-1 h-8 bg-purple-400 hover:bg-purple-500 dark:bg-purple-500 dark:hover:bg-purple-600 disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>l(rN.PRO),disabled:f&&c().toLowerCase()==="pro",children:f&&c().toLowerCase()==="pro"?"Current Plan":"Upgrade"})})]}),u.jsxs("div",{className:"px-4 pt-3 pb-4 border-t border-gray-200 dark:border-gray-700 bg-gray-50 dark:bg-gray-800/50",children:[u.jsx("h4",{className:"text-xs font-medium text-gray-900 dark:text-gray-100 uppercase tracking-wide",children:"WHAT'S INCLUDED"}),u.jsxs("ul",{className:"mt-3 space-y-2",children:[u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Generate unlimited SEO articles"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"1500 keyword searches/month"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Enterprise-grade keyword research"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Full AI editor with advanced tools"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Connect unlimited publications"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Bulk scheduling & publishing"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"API access + advanced integrations"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Unlimited team access"})]}),u.jsxs("li",{className:"flex items-start",children:[u.jsx(Cn,{className:"flex-shrink-0 h-4 w-4 text-green-500 mt-0.5"}),u.jsx("span",{className:"ml-2 text-xs text-gray-600 dark:text-gray-400",children:"Dedicated support"})]})]})]})]})]}),u.jsxs("div",{className:"mt-6 bg-gray-100 dark:bg-gray-800 rounded-lg p-4 flex flex-col sm:flex-row items-center justify-between",children:[u.jsx("p",{className:"text-sm font-medium text-gray-900 dark:text-gray-100",children:"Looking for different c
654onfigurations?"}),u.jsx(Re,{className:"mt-2 sm:mt-0 text-sm py-1 h-8 bg-gray-900 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white",children:"Contact Sales"})]})]})]})})},Dyt=({percentage:e,color:t="bg-blue-500",className:n=""})=>{const r=Math.min(Math.max(e,0),100);return u.jsx("div",{className:`w-full bg-gray-200 dark:bg-gray-700 rounded-full h-2 ${n}`,children:u.jsx("div",{className:`h-2 rounded-full transition-all duration-300 ${t}`,style:{width:`${r}%`}})})},BJ=({title:e,used:t,total:n,icon:r,color:i="bg-blue-500"})=>{const o=n>0?Math.round(t/n*100):0,s=Math.max(0,n-t),a=n===-1;return u.jsxs("div",{className:"bg-white dark:bg-gray-800 rounded-lg border border-gray-200 dark:border-gray-700 p-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{className:"flex items-center space-x-3",children:[u.jsx("div",{className:`w-10 h-10 ${i} rounded-lg flex items-center justify-center text-white`,children:r}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100",children:e}),u.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Current usage"})]})]}),u.jsxs("div",{className:"text-right",children:[u.jsx("div",{className:"text-2xl font-bold text-gray-900 dark:text-gray-100",children:a?"â":t}),u.jsx("div",{className:"text-sm text-gray-500 dark:text-gray-400",children:a?"unlimited":`of ${n}`})]})]}),!a&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"space-y-2",children:[u.jsxs("div",{className:"flex justify-between text-sm",children:[u.jsxs("span",{className:"text-gray-600 dark:text-gray-400",children:["Used ",t," of ",n," ",e.toLowerCase()]}),u.jsxs("span",{className:"text-gray-900 dark:text-gray-100 font-medium",children:[o,"%"]})]}),u.jsx(Dyt,{percentage:o,color:i})]}),u.jsxs("div",{className:"mt-4 text-sm text-gray-500 dark:text-gray-400",children:[s," ",e.toLowerCase()," remaining"]})]}),a&&u.jsxs("div",{className:"mt-4 text-sm text-gray-500 dark:text-gray-400",children:["Unlimited ",e.toLowerCase()," available"]})]})},Iyt=()=>{const{data:e,isLoading:t,error:n}=ICe();return t?u.jsx(Ju,{title:"Usage",children:u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Track your monthly usage of articles and keyword reports."}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[u.jsx(ht,{className:"h-48 w-full"}),u.jsx(ht,{className:"h-48 w-full"})]})]})}):n?u.jsx(Ju,{title:"Usage",children:u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Track your monthly usage of articles and keyword reports."}),u.jsx("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:u.jsx("p",{className:"text-red-800 dark:text-red-200",children:"Failed to load usage data. Please try again later."})})]})}):u.jsx(Ju,{title:"Usage",children:u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Track your monthly usage of articles and keyword reports. Usage resets at the beginning of each billing period."}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[u.jsx(BJ,{title:"Articles",used:(e==null?void 0:e.articles.current)||0,total:(e==null?void 0:e.articles.limit)||0,icon:u.jsx(vyt,{className:"w-5 h-5"}),color:"bg-green-500"}),u.jsx(BJ,{title:"Keyword Reports",used:(e==null?void 0:e.keywordReports.current)||0,total:(e==null?void 0:e.keywordReports.limit)||0,icon:u.jsx(xyt,{className:"w-5 h-5"}),color:"bg-blue-500"})]}),u.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800/50 rounded-lg p-4",children:[u.jsx("h4",{className:"text-sm font-medium text-gray-900 dark:text-gray-100 mb-2",children:"Usage Information"}),u.jsxs("ul",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1",children:[u.jsx("li",{children:"⢠Usage is tracked monthly and resets at the beginning of each billing period"}),u.jsx("li",{children:"⢠Creating an article or generating a keyword report counts toward your monthly limit"}),u.jsx("li",{children:"⢠Upgrade your plan to increase your monthly limits"}),u.jsx("li",{children:"⢠Enterprise plans have unlimited usage"})]})]})]})})},Lyt=()=>
654{const[e,t]=x.useState(!0),[n,r]=x.useState(!0),[i,o]=x.useState(!0),[s,a]=x.useState("academic"),l=u.jsxs(u.Fragment,{children:[u.jsx("button",{className:"btn dark:bg-gray-800 border-gray-200 dark:border-gray-700/60 hover:border-gray-300 dark:hover:border-gray-600 text-gray-800 dark:text-gray-300",children:"Cancel"}),u.jsx("button",{className:"btn bg-gray-900 text-gray-100 hover:bg-gray-800 dark:bg-gray-100 dark:text-gray-800 dark:hover:bg-white ml-3",children:"Save Changes"})]});return u.jsx(Ju,{title:"AI Settings",footer:l,children:u.jsxs("div",{className:"space-y-6",children:[u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"AI Features"}),u.jsxs("ul",{children:[u.jsxs("li",{className:"flex justify-between items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-gray-800 dark:text-gray-100 font-semibold",children:"Auto Suggestions"}),u.jsx("div",{className:"text-sm",children:"Get real-time writing suggestions and improvements as you type."})]}),u.jsxs("div",{className:"flex items-center ml-4",children:[u.jsx("div",{className:"text-sm text-gray-400 dark:text-gray-500 italic mr-2",children:e?"On":"Off"}),u.jsxs("div",{className:"form-switch",children:[u.jsx("input",{type:"checkbox",id:"auto-suggestions",className:"sr-only",checked:e,onChange:()=>t(!e)}),u.jsxs("label",{htmlFor:"auto-suggestions",children:[u.jsx("span",{className:"bg-white shadow-xs","aria-hidden":"true"}),u.jsx("span",{className:"sr-only",children:"Enable auto suggestions"})]})]})]})]}),u.jsxs("li",{className:"flex justify-between items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-gray-800 dark:text-gray-100 font-semibold",children:"Citation Assistant"}),u.jsx("div",{className:"text-sm",children:"AI-powered citation formatting and management."})]}),u.jsxs("div",{className:"flex items-center ml-4",children:[u.jsx("div",{className:"text-sm text-gray-400 dark:text-gray-500 italic mr-2",children:n?"On":"Off"}),u.jsxs("div",{className:"form-switch",children:[u.jsx("input",{type:"checkbox",id:"citation-assistant",className:"sr-only",checked:n,onChange:()=>r(!n)}),u.jsxs("label",{htmlFor:"citation-assistant",children:[u.jsx("span",{className:"bg-white shadow-xs","aria-hidden":"true"}),u.jsx("span",{className:"sr-only",children:"Enable citation assistant"})]})]})]})]}),u.jsxs("li",{className:"flex justify-between items-center py-3 border-b border-gray-200 dark:border-gray-700/60",children:[u.jsxs("div",{children:[u.jsx("div",{className:"text-gray-800 dark:text-gray-100 font-semibold",children:"Research Assistant"}),u.jsx("div",{className:"text-sm",children:"AI-powered research suggestions and paper recommendations."})]}),u.jsxs("div",{className:"flex items-center ml-4",children:[u.jsx("div",{className:"text-sm text-gray-400 dark:text-gray-500 italic mr-2",children:i?"On":"Off"}),u.jsxs("div",{className:"form-switch",children:[u.jsx("input",{type:"checkbox",id:"research-assistant",className:"sr-only",checked:i,onChange:()=>o(!i)}),u.jsxs("label",{htmlFor:"research-assistant",children:[u.jsx("span",{className:"bg-white shadow-xs","aria-hidden":"true"}),u.jsx("span",{className:"sr-only",children:"Enable research assistant"})]})]})]})]})]})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Writing Style"}),u.jsx("div",{className:"text-sm mb-3",children:"Choose your preferred writing style for AI suggestions."}),u.jsxs("select",{id:"writing-style",value:s,onChange:c=>a(c.target.value),className:"form-select w-full",children:[u.jsx("option",{value:"academic",children:"Academic"}),u.jsx("option",{value:"technical",children:"Technical"}),u.jsx("option",{value:"casual",children:"Casual"}),u.jsx("option",{value:"journalistic",children:"Journalistic"})]})]}),u.jsxs("section",{children:[u.jsx("h3",{className:"text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1",children:"Usage Statistics"}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"AI Credits Used"}),u.jsx("div",{className:"text-2xl font-bold text-gray-800 dark:text-gray-100",children:"2,450"}),u.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"This month"})]}),u.jsxs("div",{className:"bg-white dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700/60",children:[u.jsx("div",{className:"text-sm font-medium text-gray-500 dark:text-gray-400",children:"AI Credits Remaining"}),u.jsx("div",{className:"text-2xl font-bold text-gray-800 dark:text-gray-100",children:"7,550"}),u.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Resets on July 1"})]})]})]})]})})},Ua="Your workspace already has 3 articles generating. Wait for one to finish or fail before starting another.";function s5(e){var n;if(typeof e!="object"||e===null)return!1;const t=e;return t.status===429&&((n=t.data)==null?void 0:n.code)==="PIPELINE_FULL"}function a5(e){var n;if(typeof e!="object"||e===null)return Ua;const t=(n=e.data)==null?void 0:n.error;return typeof t=="string"&&t.trim()?t:Ua}const T1e=6048e5,$yt=864e5,HJ=Symbol.for("constructDateFrom");function dd(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&HJ in e?e[HJ](t):e instanceof Date?new e.constructor(t):new Date(t)}function ha(e,t){return dd(t||e,e)}let zyt={};function AS(){return zyt}function uv(e,t){var a,l,c,d;const n=AS(),r=(t==null?void 0:t.weekStartsOn)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.weekStartsOn)??0,i=ha(e,t==null?void 0:t.in),o=i.getDay(),s=(o<r?7:0)+o-r;return i.setDate(i.getDate()-s),i.setHours(0,0,0,0),i}function l5(e,t){return uv(e,{...t,weekStartsOn:1}
vendor: 4,122 bytes, line 654
654)}function M1e(e,t){const n=ha(e,t==null?void 0:t.in),r=n.getFullYear(),i=dd(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=l5(i),s=dd(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const a=l5(s);return n.getTime()>=o.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function VJ(e){const t=ha(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Fyt(e,...t){const n=dd.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function UJ(e,t){const n=ha(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Byt(e,t,n){const[r,i]=Fyt(n==null?void 0:n.in,e,t),o=UJ(r),s=UJ(i),a=+o-VJ(o),l=+s-VJ(s);return Math.round((a-l)/$yt)}function Hyt(e,t){const n=M1e(e,t),r=dd(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),l5(r)}function Vyt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Uyt(e){return!(!Vyt(e)&&typeof e!="number"||isNaN(+ha(e)))}function qyt(e,t){const n=ha(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Wyt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gyt=(e,t,n)=>{let r;const i=Wyt[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function iN(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Kyt={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yyt={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xyt={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zyt={date:iN({formats:Kyt,defaultWidth:"full"}),time:iN({formats:Yyt,defaultWidth:"full"}),dateTime:iN({formats:Xyt,defaultWidth:"full"})},Qyt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Jyt=(e,t,n,r)=>Qyt[e];function Kg(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,a=n!=null&&n.width?String(n.width):s;i=e.formattingValues[a]||e.formattingValues[s]}else{const s=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[a]||e.values[s]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const evt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},tvt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},nvt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rvt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
654ay","Saturday"]},ivt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ovt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},svt=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},avt={ordinalNumber:svt,era:Kg({values:evt,defaultWidth:"wide"}),quarter:Kg({values:tvt,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Kg({values:nvt,defaultWidth:"wide"}),day:Kg({values:rvt,defaultWidth:"wide"}),dayPeriod:Kg({values:ivt,defaultWidth:"wide",formattingValues:ovt,defaultFormattingWidth:"wide"})};function Yg(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const s=o[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(a)?cvt(a,f=>f.test(s)):lvt(a,f=>f.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;const d=t.slice(s.length);return{value:c,rest:d}}}function lvt(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function cvt(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function uvt(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let s=e.valueCallback?e.valueCallback(o[0]):o[0];s=n.valueCallback?n.valueCallback(s):s;const a=t.slice(i.length);return{value:s,rest:a}}}const dvt=/^(\d+)(th|st|nd|rd)?/i,fvt=/\d+/i,hvt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pvt={any:[/^b/i,/^(a|c)/i]},mvt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gvt={any:[/1/i,/2/i,/3/i,/4/i]},yvt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},vvt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},bvt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},xvt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},wvt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Cvt={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Svt={ordinalNumber:uvt({matchPattern:dvt,parsePattern:fvt,valueCallback:e=>parseInt(e,10)}),era:Yg({matchPatterns:hvt,defaultMatchWidth:"wide",parsePatterns:pvt,defaultParseWidth:"any"}),quarter:Yg({matchPatterns:mvt,defaultMatchWidth:"wide",parsePatterns:gvt,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Yg({matchPatterns:yvt,defaultMatchWidth:"wide",parsePatterns:vvt,defaultParseWidth:"any"}),day:Yg({matchPatterns:bvt,defaultMatchWidth:"wide",parsePatterns:xvt,defaultParseWidth:"any"}),dayPeriod:Yg({matchPatterns:wvt,defaultMatchWidth:"any",parsePatterns:Cvt,defaultParseWidth:"any"})},Evt={code:"en-US",formatDistance:Gyt,formatLong:Zyt,formatRelative:Jyt,localize:avt,match:Svt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kvt(e,t){const n=ha(e,t==null?void 0:t.in);return Byt(n,qyt(n))+1}function _vt(e,t){const n=ha(e,t==null?void 0:t.in),r=+l5(n)-+Hyt(n);return Math.round(r/T1e)+1}function O1e(e,t){var d,f,p,m;const n=ha(e,t==null?void 0:t.in),r=n.getFullYear(),i=AS(),o=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,s=dd((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,o),s.setHours(0,0,0,0);const a=uv(s,t),l=dd((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);
vendor: 6,060 bytes, line 654
654const c=uv(l,t);return+n>=+a?r+1:+n>=+c?r:r-1}function Avt(e,t){var a,l,c,d;const n=AS(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(c=n.locale)==null?void 0:c.options)==null?void 0:d.firstWeekContainsDate)??1,i=O1e(e,t),o=dd((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),uv(o,t)}function Nvt(e,t){const n=ha(e,t==null?void 0:t.in),r=+uv(n,t)-+Avt(n,t);return Math.round(r/T1e)+1}function cn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const su={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return cn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):cn(n+1,2)},d(e,t){return cn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return cn(e.getHours()%12||12,t.length)},H(e,t){return cn(e.getHours(),t.length)},m(e,t){return cn(e.getMinutes(),t.length)},s(e,t){return cn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return cn(i,t.length)}},Ep={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},qJ={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return su.y(e,t)},Y:function(e,t,n,r){const i=O1e(e,r),o=i>0?i:1-i;if(t==="YY"){const s=o%100;return cn(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):cn(o,t.length)},R:function(e,t){const n=M1e(e);return cn(n,t.length)},u:function(e,t){const n=e.getFullYear();return cn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return cn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return cn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return su.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return cn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Nvt(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):cn(i,t.length)},I:function(e,t,n){const r=_vt(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):cn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):su.d(e,t)},D:function(e,t,n){const r=kvt(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):cn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return cn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return cn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return cn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Ep.noon:r===0?i=Ep.midnight:i=r/12>
vendor: 4,422 bytes, line 654
654=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Ep.evening:r>=12?i=Ep.afternoon:r>=4?i=Ep.morning:i=Ep.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return su.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):su.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):cn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):cn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):su.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):su.s(e,t)},S:function(e,t){return su.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return GJ(r);case"XXXX":case"XX":return pf(r);case"XXXXX":case"XXX":default:return pf(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return GJ(r);case"xxxx":case"xx":return pf(r);case"xxxxx":case"xxx":default:return pf(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+WJ(r,":");case"OOOO":default:return"GMT"+pf(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+WJ(r,":");case"zzzz":default:return"GMT"+pf(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return cn(r,t.length)},T:function(e,t,n){return cn(+e,t.length)}};function WJ(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+cn(o,2)}function GJ(e,t){return e%60===0?(e>0?"-":"+")+cn(Math.abs(e)/60,2):pf(e,t)}function pf(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=cn(Math.trunc(r/60),2),o=cn(r%60,2);return n+i+t+o}const KJ=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},R1e=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},jvt=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return KJ(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",KJ(r,t)).replace("{{time}}",R1e(i,t))},Tvt={p:R1e,P:jvt},Mvt=/^D+$/,Ovt=/^Y+$/,Rvt=["D","DD","YY","YYYY"];function Pvt(e){return Mvt.test(e)}function Dvt(e){return Ovt.test(e)}function Ivt(e,t,n){const r=Lvt(e,t,n);if(console.warn(r),Rvt.includes(e))throw new RangeError(r)}function Lvt(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zvt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fvt=/^'([^]*?)'?$/,Bvt=/''/g,Hvt=/[a-zA-Z]/;function q2(e,t,n){var d,f,p,m;const r=AS(),i=r.locale??Evt,o=r.firstWeekContainsDate??((f=(d=r.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,a=ha(e,n==null?void 0:n.in);if(!Uyt(a))throw new RangeError("Invalid time value");let l=t.match(zvt).map(y=>{const v=y[0];if(v==="p"||v==="P"){const b=Tvt[v];return b(y,i.formatLong)}return y}).join("").match($vt).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const v=y[0];if(v==="'")return{isToken:!1,value:Vvt(y)};if(qJ[v])return{isToken:!0,value:y};
vendor: 46,608 bytes, lines 654-666
654if(v.match(Hvt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:y}});i.localize.preprocessor&&(l=i.localize.preprocessor(a,l));const c={firstWeekContainsDate:o,weekStartsOn:s,locale:i};return l.map(y=>{if(!y.isToken)return y.value;const v=y.value;(Dvt(v)||Pvt(v))&&Ivt(v,t,String(e));const b=qJ[v[0]];return b(a,v,i.localize,c)}).join("")}function Vvt(e){const t=e.match(Fvt);return t?t[1].replace(Bvt,"'"):e}/** 655 * table-core 656 * 657 * Copyright (c) TanStack 658 * 659 * This source code is licensed under the MIT license found in the 660 * LICENSE.md file in the root directory of this source tree. 661 * 662 * @license MIT 663 */function zu(e,t){return typeof e=="function"?e(t):e}function Oo(e,t){return n=>{t.setState(r=>({...r,[e]:zu(n,r[e])}))}}function NS(e){return e instanceof Function}function Uvt(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function qvt(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=t(o);s!=null&&s.length&&r(s)})};return r(e),n}function at(e,t,n){let r=[],i;return o=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(o);if(!(a.length!==r.length||a.some((d,f)=>r[f]!==d)))return i;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-s)*100)/100,f=Math.round((Date.now()-c)*100)/100,p=f/16,m=(y,v)=>{for(y=String(y);y.length<v;)y=" "+y;return y};console.info(`%câ± ${m(f,5)} /${m(d,5)} ms`,` 664 font-size: .6rem; 665 font-weight: bold; 666 color: hsl(${Math.max(0,Math.min(120-120*p,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function lt(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function Wvt(e,t,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:at(()=>[e,n,t,o],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),lt(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(o,n,t,e)},{}),o}function Gvt(e,t,n,r){var i,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(i=(o=a.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,d;if(a.accessorFn?d=a.accessorFn:l&&(l.includes(".")?d=p=>{let m=p;for(const v of l.split(".")){var y;m=(y=m)==null?void 0:y[v]}return m}:d=p=>p[a.accessorKey]),!c)throw new Error;let f={id:`${String(c)}`,accessorFn:d,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:at(()=>[!0],()=>{var p;return[f,...(p=f.columns)==null?void 0:p.flatMap(m=>m.getFlatColumns())]},lt(e.options,"debugColumns")),getLeafColumns:at(()=>[e._getOrderColumnsFn()],p=>{var m;if((m=f.columns)!=null&&m.length){let y=f.columns.flatMap(v=>v.getLeafColumns());return p(y)}return[f]},lt(e.options,"debugColumns"))};for(const p of e._features)p.createColumn==null||p.createColumn(f,e);return f}const ui="debugHeaders";function YJ(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(o),s},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(o,e)}),o}const Kvt={createTable:e=>{e.getHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,s;const a=(o=r==null?void 0:r.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?o:[],l=(s=i==null?void 0:i.map(f=>n.find(p=>p.id===f)).filter(Boolean))!=null?s:[],c=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return W2(t,[...a,...c,...l],e)},lt(e.options,ui)),e.getCenterHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),W2(t,n,e,"center")),lt(e.options,ui)),e.getLeftHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return W2(t,o,e,"left")},lt(e.options,ui)),e.getRightHeaderGroups=at(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return W2(t,o,e,"right")},lt(e.options,ui)),e.getFooterGroups=at(()=>[e.getHeaderGroups()],t=>[...t].reverse(),lt(e.options,ui)),e.getLeftFooterGroups=at(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),lt(e.options,ui)),e.getCenterFooterGroups=at(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),lt(e.options,ui)),e.getRightFooterGroups=at(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),lt(e.options,ui)),e.getFlatHeaders=at(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),lt(e.options,ui)),e.getLeftFlatHeaders=at(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),lt(e.options,ui)),e.getCenterFlatHeaders=at(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),lt(e.options,ui)),e.getRightFlatHeaders=at(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),lt(e.options,ui)),e.getCenterLeafHeaders=at(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),lt(e.options,ui)),e.getLeftLeafHeaders=at(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),lt(e.options,ui)),e.getRightLeafHeaders=at(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),lt(e.options,ui)),e.getLeafHeaders=at(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,s,a,l,c;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},lt(e.options,ui))}};function W2(e,t,n,r){var i,o;let s=0;const a=function(p,m){m===void 0&&(m=1),s=Math.max(s,m),p.filter(y=>y.getIsVisible()).forEach(y=>{var v;(v=y.columns)!=null&&v.length&&a(y.columns,m+1)},0)};a(e);let l=[];const c=(p,m)=>{const y={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},v=[];p.forEach(b=>{const C=[...v].reverse()[0],S=b.column.depth===y.depth;let E,A=!1;if(S&&b.column.parent?E=b.column.parent:(E=b.column,A=!0),C&&(C==null?void 0:C.column)===E)C.subHeaders.push(b);else{const _=YJ(n,E,{id:[r,m,E.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:A,placeholderId:A?`${v.filter(N=>N.column===E).length}`:void 0,depth:m,index:v.length});_.subHeaders.push(b),v.push(_)}y.headers.push(b),b.headerGroup=y}),l.push(y),m>0&&c(v,m-1)},d=t.map((p,m)=>YJ(n,p,{depth:s,index:m}));c(d,s-1),l.reverse();const f=p=>p.filter(y=>y.column.getIsVisible()).map(y=>{let v=0,b=0,C=[0];y.subHeaders&&y.subHeaders.length?(C=[],f(y.subHeaders).forEach(E=>{let{colSpan:A,rowSpan:_}=E;v+=A,C.push(_)})):v=1;const S=Math.min(...C);return b=b+S,y.colSpan=v,y.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const Yvt=(e,t,n,r,i,o,s)=>{let a={id:t,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>qvt(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const d=c.getParentRow();if(!d)break;l.push(d),c=d}return l.reverse()},getAllCells:at(()=>[e.getAllLeafColumns()],l=>l.map(c=>Wvt(e,a,c,c.id)),lt(e.options,"debugRows")),_getAllCellsByColumnId:at(()=>[a.getAllCells()],l=>l.reduce((c,d)=>(c[d.column.id]=d,c),{}),lt(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},Xvt={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},P1e=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};P1e.autoRemove=e=>na(e);const D1e=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};D1e.autoRemove=e=>na(e);const I1e=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};I1e.autoRemove=e=>na(e);const L1e=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};L1e.autoRemove=e=>na(e);const $1e=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});$1e.autoRemove=e=>na(e)||!(e!=null&&e.length);const z1e=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});z1e.autoRemove=e=>na(e)||!(e!=null&&e.length);const F1e=(e,t,n)=>e.getValue(t)===n;F1e.autoRemove=e=>na(e);const B1e=(e,t,n)=>e.getValue(t)==n;B1e.autoRemove=e=>na(e);const eL=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};eL.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const a=o;o=s,s=a}return[o,s]};eL.autoRemove=e=>na(e)||na(e[0])&&na(e[1]);const Hl={includesString:P1e,includesStringSensitive:D1e,equalsString:I1e,arrIncludes:L1e,arrIncludesAll:$1e,arrIncludesSome:z1e,equals:F1e,weakEquals:B1e,inNumberRange:eL};function na(e){return e==null||e===""}const Zvt={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Oo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Hl.includesString:typeof r=="number"?Hl.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Hl.equals:Array.isArray(r)?Hl.arrIncludes:Hl.weakEquals},e.getFilterFn=()=>{var n,r;return NS(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Hl[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r==null?void 0:r.find(d=>d.id===e.id),s=zu(n,o?o.value:void 0);if(XJ(i,s,e)){var a;return(a=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(o){var c;return(c=r==null?void 0:r.map(d=>d.id===e.id?l:d))!=null?c:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=zu(t,i))==null?void 0:o.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(XJ(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function XJ(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Qvt=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),Jvt=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},ebt=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},tbt=(e,t,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i<s&&(i=s)))}),[r,i]},nbt=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},rbt=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Uvt(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},ibt=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),obt=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,sbt=(e,t)=>t.length,oN={sum:Qvt,min:Jvt,max:ebt,extent:tbt,mean:nbt,median:rbt,unique:ibt,uniqueCount:obt,count:sbt},abt={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Oo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return oN.sum;if(Object.prototype.toString.call(r)==="[object Date]")return oN.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return NS(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:oN[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function lbt(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(s=>s.id===o)).filter(Boolean),...r]}const cbt={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Oo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=at(n=>[z1(t,n)],n=>n.findIndex(r=>r.id===e.id),lt(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=z1(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=z1(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=at(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const s=[...t],a=[...i];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(d=>d.id===l);c>-1&&o.push(a.splice(c,1)[0])}o=[...o,...a]}return lbt(o,n,r)},lt(e.options,"debugTable"))}},sN=()=>({left:[],right:[]}),ubt={getInitialState:e=>({columnPinning:sN(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Oo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,s;if(n==="right"){var a,l;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var c,d;return{left:[...((c=i==null?void 0:i.left)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((d=i==null?void 0:i.right)!=null?d:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i==null?void 0:i.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((s=i==null?void 0:i.right)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,s;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>i==null?void 0:i.includes(a));return o?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=at(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},lt(t.options,"debugRows")),e.getLeftVisibleCells=at(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),lt(t.options,"debugRows")),e.getRightVisibleCells=at(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),lt(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?sN():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:sN())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=at(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),lt(e.options,"debugColumns")),e.getRightLeafColumns=at(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),lt(e.options,"debugColumns")),e.getCenterLeafColumns=at(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},lt(e.options,"debugColumns"))}};function dbt(e){return e||(typeof document<"u"?document:null)}const G2={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},aN=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),fbt={getDefaultColumnDef:()=>G2,getInitialState:e=>({columnSizing:{},columnSizingInfo:aN(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Oo("columnSizing",e),onColumnSizingInfoChange:Oo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:G2.minSize,(r=o??e.columnDef.size)!=null?r:G2.size),(i=e.columnDef.maxSize)!=null?i:G2.maxSize)},e.getStart=at(n=>[n,z1(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),lt(t.options,"debugColumns")),e.getAfter=at(n=>[n,z1(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),lt(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),lN(o)&&o.touches&&o.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(C=>[C.column.id,C.column.getSize()]):[[r.id,r.getSize()]],l=lN(o)?Math.round(o.touches[0].clientX):o.clientX,c={},d=(C,S)=>{typeof S=="number"&&(t.setColumnSizingInfo(E=>{var A,_;const N=t.options.columnResizeDirection==="rtl"?-1:1,j=(S-((A=E==null?void 0:E.startOffset)!=null?A:0))*N,T=Math.max(j/((_=E==null?void 0:E.startSize)!=null?_:0),-.999999);return E.columnSizingStart.forEach(O=>{let[D,R]=O;c[D]=Math.round(Math.max(R+R*T,0)*100)/100}),{...E,deltaOffset:j,deltaPercentage:T}}),(t.options.columnResizeMode==="onChange"||C==="end")&&t.setColumnSizing(E=>({...E,...c})))},f=C=>d("move",C),p=C=>{d("end",C),t.setColumnSizingInfo(S=>({...S,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=dbt(n),y={moveHandler:C=>f(C.clientX),upHandler:C=>{m==null||m.removeEventListener("mousemove",y.moveHandler),m==null||m.removeEventListener("mouseup",y.upHandler),p(C.clientX)}},v={moveHandler:C=>(C.cancelable&&(C.preventDefault(),C.stopPropagation()),f(C.touches[0].clientX),!1),upHandler:C=>{var S;m==null||m.removeEventListener("touchmove",v.moveHandler),m==null||m.removeEventListener("touchend",v.upHandler),C.cancelable&&(C.preventDefault(),C.stopPropagation()),p((S=C.touches[0])==null?void 0:S.clientX)}},b=hbt()?{passive:!1}:!1;lN(o)?(m==null||m.addEventListener("touchmove",v.moveHandler,b),m==null||m.addEventListener("touchend",v.upHandler,b)):(m==null||m.addEventListener("mousemove",y.moveHandler,b),m==null||m.addEventListener("mouseup",y.upHandler,b)),t.setColumnSizingInfo(C=>({...C,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?aN():(n=e.initialState.columnSizingInfo)!=null?n:aN())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let K2=null;function hbt(){if(typeof K2=="boolean")return K2;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return K2=e,K2}function lN(e){return e.type==="touchstart"}const pbt={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Oo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=at(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),lt(t.options,"debugRows")),e.getVisibleCells=at(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],lt(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>at(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),lt(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function z1(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const mbt={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},gbt={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Oo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Hl.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return NS(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Hl[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},ybt={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Oo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const s=o.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},tO=0,nO=10,cN=()=>({pageIndex:tO,pageSize:nO}),vbt={getInitialState:e=>({...e,pagination:{...cN(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Oo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>zu(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?cN():(i=e.initialState.pagination)!=null?i:cN())},e.setPageIndex=r=>{e.setPagination(i=>{let o=zu(r,i.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?tO:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:tO)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?nO:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:nO)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,zu(r,i.pageSize)),s=i.pageSize*i.pageIndex,a=Math.floor(s/o);return{...i,pageIndex:a,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let s=zu(r,(o=e.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),e.getPageOptions=at(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},lt(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},uN=()=>({top:[],bottom:[]}),bbt={getInitialState:e=>({rowPinning:uN(),...e}),getDefaultOptions:e=>({onRowPinningChange:Oo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=i?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...o]);t.setRowPinning(l=>{var c,d;if(n==="bottom"){var f,p;return{top:((f=l==null?void 0:l.top)!=null?f:[]).filter(v=>!(a!=null&&a.has(v))),bottom:[...((p=l==null?void 0:l.bottom)!=null?p:[]).filter(v=>!(a!=null&&a.has(v))),...Array.from(a)]}}if(n==="top"){var m,y;return{top:[...((m=l==null?void 0:l.top)!=null?m:[]).filter(v=>!(a!=null&&a.has(v))),...Array.from(a)],bottom:((y=l==null?void 0:l.bottom)!=null?y:[]).filter(v=>!(a!=null&&a.has(v)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(v=>!(a!=null&&a.has(v))),bottom:((d=l==null?void 0:l.bottom)!=null?d:[]).filter(v=>!(a!=null&&a.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>i==null?void 0:i.includes(a));return o?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?uN():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:uN())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=at(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),lt(e.options,"debugRows")),e.getBottomRows=at(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),lt(e.options,"debugRows")),e.getCenterRows=at(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},lt(e.options,"debugRows"))}},xbt={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Oo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{rO(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=at(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?dN(e,n):{rows:[],flatRows:[],rowsById:{}},lt(e.options,"debugTable")),e.getFilteredSelectedRowModel=at(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?dN(e,n):{rows:[],flatRows:[],rowsById:{}},lt(e.options,"debugTable")),e.getGroupedSelectedRowModel=at(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?dN(e,n):{rows:[],flatRows:[],rowsById:{}},lt(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var s;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const a={...o};return rO(a,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return tL(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return iO(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return iO(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},rO=(e,t,n,r,i)=>{var o;const s=i.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=s.subRows)!=null&&o.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>rO(e,a.id,n,r,i))};function dN(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(s,a){return s.map(l=>{var c;const d=tL(l,n);if(d&&(r.push(l),i[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:o(l.subRows)}),d)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function tL(e,t){var n;return(n=t[e.id])!=null?n:!1}function iO(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(s=>{if(!(o&&!i)&&(s.getCanSelect()&&(tL(s,t)?o=!0:i=!1),s.subRows&&s.subRows.length)){const a=iO(s,t);a==="all"?o=!0:(a==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const oO=/([0-9]+)/gm,wbt=(e,t,n)=>H1e(fd(e.getValue(n)).toLowerCase(),fd(t.getValue(n)).toLowerCase()),Cbt=(e,t,n)=>H1e(fd(e.getValue(n)),fd(t.getValue(n))),Sbt=(e,t,n)=>nL(fd(e.getValue(n)).toLowerCase(),fd(t.getValue(n)).toLowerCase()),Ebt=(e,t,n)=>nL(fd(e.getValue(n)),fd(t.getValue(n))),kbt=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},_bt=(e,t,n)=>nL(e.getValue(n),t.getValue(n));function nL(e,t){return e===t?0:e>t?1:-1}function fd(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function H1e(e,t){const n=e.split(oO).filter(Boolean),r=t.split(oO).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),a=parseInt(o,10),l=[s,a].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const Xg={alphanumeric:wbt,alphanumericCaseSensitive:Cbt,text:Sbt,textCaseSensitive:Ebt,datetime:kbt,basic:_bt},Abt={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Oo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Xg.datetime;if(typeof o=="string"&&(r=!0,o.split(oO).length>1))return Xg.alphanumeric}return r?Xg.text:Xg.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return NS(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Xg[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(m=>m.id===e.id),l=s==null?void 0:s.findIndex(m=>m.id===e.id);let c=[],d,f=o?n:i==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?d="toggle":d="add":s!=null&&s.length&&l!==s.length-1?d="replace":a?d="toggle":d="replace",d==="toggle"&&(o||i||(d="remove")),d==="add"){var p;c=[...s,{id:e.id,desc:f}],c.splice(0,c.length-((p=t.options.maxMultiSortColCount)!=null?p:Number.MAX_SAFE_INTEGER))}else d==="toggle"?c=s.map(m=>m.id===e.id?{...m,desc:f}:m):d==="remove"?c=s.filter(m=>m.id!==e.id):c=[{id:e.id,desc:f}];return c})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Nbt=[Kvt,pbt,cbt,ubt,Xvt,Zvt,mbt,gbt,Abt,abt,ybt,vbt,bbt,xbt,fbt];function jbt(e){var t,n;
666const r=[...Nbt,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((p,m)=>Object.assign(p,m.getDefaultOptions==null?void 0:m.getDefaultOptions(i)),{}),s=p=>i.options.mergeOptions?i.options.mergeOptions(o,p):{...o,...p};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(p=>{var m;l=(m=p.getInitialState==null?void 0:p.getInitialState(l))!=null?m:l});const c=[];let d=!1;const f={_features:r,options:{...o,...e},initialState:l,_queue:p=>{c.push(p),d||(d=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();d=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{i.setState(i.initialState)},setOptions:p=>{const m=zu(p,i.options);i.options=s(m)},getState:()=>i.options.state,setState:p=>{i.options.onStateChange==null||i.options.onStateChange(p)},_getRowId:(p,m,y)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(p,m,y))!=null?v:`${y?[y.id,m].join("."):m}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(p,m)=>{let y=(m?i.getPrePaginationRowModel():i.getRowModel()).rowsById[p];if(!y&&(y=i.getCoreRowModel().rowsById[p],!y))throw new Error;return y},_getDefaultColumnDef:at(()=>[i.options.defaultColumn],p=>{var m;return p=(m=p)!=null?m:{},{header:y=>{const v=y.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:y=>{var v,b;return(v=(b=y.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((y,v)=>Object.assign(y,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...p}},lt(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:at(()=>[i._getColumnDefs()],p=>{const m=function(y,v,b){return b===void 0&&(b=0),y.map(C=>{const S=Gvt(i,C,b,v),E=C;return S.columns=E.columns?m(E.columns,S,b+1):[],S})};return m(p)},lt(e,"debugColumns")),getAllFlatColumns:at(()=>[i.getAllColumns()],p=>p.flatMap(m=>m.getFlatColumns()),lt(e,"debugColumns")),_getAllFlatColumnsById:at(()=>[i.getAllFlatColumns()],p=>p.reduce((m,y)=>(m[y.id]=y,m),{}),lt(e,"debugColumns")),getAllLeafColumns:at(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(p,m)=>{let y=p.flatMap(v=>v.getLeafColumns());return m(y)},lt(e,"debugColumns")),getColumn:p=>i._getAllFlatColumnsById()[p]};Object.assign(i,f);for(let p=0;p<i._features.length;p++){const m=i._features[p];m==null||m.createTable==null||m.createTable(i)}return i}function Tbt(){return e=>at(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const a=[];for(let c=0;c<i.length;c++){const d=Yvt(e,e._getRowId(i[c],c,s),i[c],c,o,void 0,s==null?void 0:s.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,a.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(i[c],c),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=r(d.originalSubRows,o+1,d))}}return a};return n.rows=r(t),n},lt(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function Mbt(){return e=>at(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(l=>{var c;return(c=e.getColumn(l.id))==null?void 0:c.getCanSort()}),s={};o.forEach(l=>{const c=e.getColumn(l.id);c&&(s[l.id]={sortUndefined:c.columnDef.sortUndefined,invertSorting:c.columnDef.invertSorting,sortingFn:c.getSortingFn()})});const a=l=>{const c=l.map(d=>({...d}));return c.sort((d,f)=>{for(let m=0;m<o.length;m+=1){var p;const y=o[m],v=s[y.id],b=v.sortUndefined,C=(p=y==null?void 0:y.desc)!=null?p:!1;let S=0;if(b){const E=d.getValue(y.id),A=f.getValue(y.id),_=E===void 0,N=A===void 0;if(_||N){if(b==="first")return _?-1:1;if(b==="last")return _?1:-1;S=_&&N?0:_?b:-b}}if(S===0&&(S=v.sortingFn(d,f,y.id)),S!==0)return C&&(S*=-1),v.invertSorting&&(S*=-1),S}return d.index-f.index}),c.forEach(d=>{var f;i.push(d),(f=d.subRows)!=null&&f.length&&(d.subRows=a(d.subRows))}),c};return{rows:a(n.rows),flatRows:i,rowsById:n.rowsById}},lt(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** 667 * react-table 668 * 669 * Copyright (c) TanStack 670 * 671 * This source code is licensed under the MIT license found in the 672 * LICENSE.md file in the root directory of this source tree. 673 * 674 * @license MIT 675 */function ZJ(e,t){return e?Obt(e)?x.createElement(e,t):e:null}function Obt(e){return Rbt(e)||typeof e=="function"||Pbt(e)}function Rbt(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Pbt(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Dbt(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=x.useState(()=>({current:jbt(t)})),[r,i]=x.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:s=>{i(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const Ibt="StatusBadgeRoot",V1e="StatusBadgeIcon",U1e="StatusBadgeDot",rL=el({slots:{root:["inline-flex h-6 items-center justify-center gap-2 whitespace-nowrap rounded-md px-2 text-label-xs","has-[>.dot]:gap-1.5"],icon:"-mx-1 size-4",dot:["dot -mx-1 flex size-4 items-center justify-center","before:size-1.5 before:rounded-full before:bg-current"]},variants:{variant:{stroke:{root:"bg-bg-white-0 text-text-sub-600 ring-1 ring-inset ring-stroke-soft-200"},light:{}},status:{completed:{icon:"text-success-base",dot:"text-success-base"},pending:{icon:"text-warning-base",dot:"text-warning-base"},failed:{icon:"text-error-base",dot:"text-error-base"},disabled:{icon:"text-faded-base",dot:"text-faded-base"}}},compoundVariants:[{variant:"light",status:"completed",class:{root:"bg-success-lighter text-success-base"}},{variant:"light",status:"pending",class:{root:"bg-warning-lighter text-warning-base"}},{variant:"light",status:"failed",class:{root:"bg-error-lighter text-error-base"}},{variant:"light",status:"disabled",class:{root:"bg-faded-lighter text-text-sub-600"}}],defaultVariants:{status:"disabled",variant:"stroke"}}),c5=x.forwardRef(({asChild:e,children:t,variant:n,status:r,className:i,...o},s)=>{const a=x.useId(),l=e?Ei:"div",{root:c}=rL({variant:n,status:r}),f=yd(t,{variant:n,status:r},[V1e,U1e],a,e);return u.jsx(l,{ref:s,className:c({class:i}),...o,children:f})});c5.displayName=Ibt;function F1({variant:e,status:t,className:n,as:r}){const i=r||"div",{icon:o}=rL({variant:e,status:t});return u.jsx(i,{className:o({class:n})})}F1.displayName=V1e;function q1e({variant:e,status:t,className:n,...r}){const{dot:i}=rL({variant:e,status:t});return u.jsx("div",{className:i({class:n}),...r})}q1e.displayName=U1e;const Lbt="/assets/no-articles-CVROd2qE.svg";function $bt({className:e,...t}){return u.jsx("div",{className:Et("flex h-5 items-center gap-0.5 whitespace-nowrap rounded bg-bg-white-0 px-1.5 text-subheading-xs text-text-soft-400 ring-1 ring-inset ring-stroke-soft-200",e),...t})}const W1e=Fde;W1e.displayName="SegmentedControlRoot";const G1e=x.forwardRef(({children:e,className:t,floatingBgClassName:n,...r},i)=>{const[o,s]=x.useState({width:0,left:0}),{mounted:a,listRef:l}=qde({onActiveTabChange:(c,d)=>{const{offsetWidth:f,offsetLeft:p}=d;s({width:f,left:p})}});return u.jsxs(Bde,{ref:Ude(i,l),className:Nt("relative isolate grid w-full auto-cols-fr grid-flow-col gap-1 rounded-10 bg-bg-weak-50 p-1",t),...r,children:[u.jsx(GO,{children:e}),u.jsx("div",{className:Nt("absolute inset-y-1 left-0 -z-10 rounded-md bg-bg-white-0 shadow-toggle-switch transition-transform duration-300",{hidden:!a},n),style:{transform:`translate3d(${o.left}px, 0, 0)`,width:`${o.width}px`,transitionTimingFunction:"cubic-bezier(0.65, 0, 0.35, 1)"},"aria-hidden":"true"})]})});G1e.displayName="SegmentedControlList";const Ew=x.forwardRef(({className:e,...t},n)=>u.jsx(Hde,{ref:n,className:Nt("peer","relative z-10 h-7 whitespace-nowrap rounded-md px-1 text-label-sm text-text-soft-400 outline-none","flex items-center justify-center gap-1.5","transition duration-300 ease-out","focus:outline-none","data-[state=active]:text-text-strong-950",e),...t}));Ew.displayName="SegmentedControlTrigger";const zbt=x.forwardRef(({...e},t)=>u.jsx(Vde,{ref:t,...e}));zbt.displayName="SegmentedControlContent";const Fbt=()=>u.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:u.jsx("path",{d:"M1.90057 9.11932C1.55398 9.11932 1.2358 9.03409 0.946023 8.86364C0.65625 8.69034 0.426136 8.46023 0.255682 8.1733C0.0852273 7.88352 0 7.56534 0 7.21875C0 6.86932 0.0852273 6.55114 0.255682 6.2642C0.426136 5.97443 0.65625 5.7429 0.946023 5.5696C1.2358 5.39631 1.55398 5.30966 1.90057 5.30966H2.83807V3.80114H1.90057C1.55398 3.80114 1.2358 3.71591 0.946023 3.54545C0.65625 3.375 0.426136 3.14631 0.255682 2.85938C0.0852273 2.5696 0 2.25 0 1.90057C0 1.55114 0.0852273 1.23295 0.255682 0.946023C0.426136 0.659091 0.65625 0.430398 0.946023 0.259943C1.2358 0.0866477 1.55398 0 1.90057 0C2.25 0 2.56818 0.0866477 2.85511 0.259943C3.14489 0.430398 3.375 0.659091 3.54545 0.946023C3.71875 1.23295 3.8054 1.55114 3.8054 1.90057V2.82955H5.31818V1.90057C5.31818 1.55114 5.40341 1.23295 5.57386 0.946023C5.74432 0.659091 5.97301 0.430398 6.25994 0.259943C6.54972 0.0866477 6.86932 0 7.21875 0C7.56818 0 7.88636 0.0866477 8.1733 0.259943C8.46023 0.430398 8.68892 0.659091 8.85938 0.946023C9.02983 1.23295 9.11506 1.55114 9.11506 1.90057C9.11506 2.25 9.02983 2.5696 8.85938 2.85938C8.68892 3.14631 8.46023 3.375 8.1733 3.54545C7.88636 3.71591 7.56818 3.80114 7.21875 3.80114H6.28551V5.30966H7.21875C7.56818 5.30966 7.88636 5.39631 8.1733 5.5696C8.46023 5.7429 8.68892 5.97443 8.85938 6.2642C9.02983 6.55114 9.11506 6.86932 9.11506 7.21875C9.11506 7.56534 9.02983 7.88352 8.85938 8.1733C8.68892 8.46023 8.46023 8.69034 8.1733 8.86364C7.88636 9.03409 7.56818 9.11932 7.21875 9.11932C6.86932 9.11932 6.54972 9.03409 6.25994 8.86364C5.97301 8.69034 5.74432 8.46023 5.57386 8.1733C5.40341 7.88352 5.31818 7.56534 5.31818 7.21875V6.28125H3.8054V7.21875C3.8054 7.56534 3.71875 7.88352 3.54545 8.1733C3.375 8.46023 3.14489 8.69034 2.85511 8.86364C2.56818 9.03409 2.25 9.11932 1.90057 9.11932ZM1.90057 8.14773C2.07386 8.14773 2.23011 8.10653 2.36932 8.02415C2.51136 7.94176 2.625 7.82955 2.71023 7.6875C2.79545 7.54546 2.83807 7.3892 2.83807 7.21875V6.28125H1.90057C1.73011 6.28125 1.57386 6.32386 1.43182 6.40909C1.28977 6.49148 1.17614 6.60369 1.09091 6.74574C1.00852 6.88778 0.96733 7.04545 0.96733 7.21875C0.96733 7.3892 1.00852 7.54546 1.09091 7.6875C1.17614 7.82955 1.28977 7.94176 1.43182 8.02415C1.57386 8.10653 1.73011 8.14773 1.90057 8.14773ZM1.90057 2.82955H2.83807V1.90057C2.83807 1.72727 2.79545 1.57102 2.71023 1.43182C2.625 1.28977 2.51136 1.17756 2.36932 1.09517C2.23011 1.01278 2.07386 0.971591 1.90057 0.971591C1.73011 0.971591 1.57386 1.01278 1.43182 1.09517C1.28977 1.17756 1.17614 1.28977 1.09091 1.43182C1.00852 1.57102 0.96733 1.72727 0.96733 1.90057C0.96733 2.07386 1.00852 2.23153 1.09091 2.37358C1.17614 2.51278 1.28977 2.62358 1.43182 2.70597C1.57386 2.78835 1.73011 2.82955 1.90057 2.82955ZM6.28551 2.82955H7.21875C7.39205 2.82955 7.5483 2.78835 7.6875 2.70597C7.8267 2.62358 7.9375 2.51278 8.01989 2.37358C8.10511 2.23153 8.14773 2.07386 8.14773 1.90057C8.14773 1.72727 8.10511 1.57102 8.01989 1.43182C7.9375 1.28977 7.8267 1.17756 7.6875 1.09517C7.5483 1.01278 7.39205 0.971591 7.21875 0.971591C7.04545 0.971591 6.88778 1.01278 6.74574 1.09517C6.60369 1.17756 6.49148 1.28977 6.40909 1.43182C6.3267 1.57102 6.28551 1.72727 6.28551 1.90057V2.82955ZM7.21875 8.14773C7.39205 8.14773 7.5483 8.10653 7.6875 8.02415C7.8267 7.94176 7.9375 7.82955 8.01989 7.6875C8.10511 7.54546 8.14773 7.3892 8.14773 7.21875C8.14773 7.04545 8.10511 6.88778 8.01989 6.74574C7.9375 6.60369 7.8267 6.49148 7.6875 6.40909C7.5483 6.32386 7.39205 6.28125 7.21875 6.28125H6.28551V7.21875C6.28551 7.3892 6.3267 7.54546 6.40909 7.6875C6.49148 7.82955 6.60369 7.94176 6.74574 8.02415C6.88778 8.10653 7.04545 8.14773 7.21875 8.14773ZM3.8054 5.30966H5.31818V3.80114H3.8054V5.30966Z",fill:"currentColor"})});function QJ({isLoading:e=!1}){return e?u.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between lg:gap-3 w-full",children:[u.jsx(ht,{className:"h-10 w-full lg:hidden rounded-lg"}),u.jsx(ht,{className:"h-12 w-full lg:w-80 rounded-lg"}),u.jsxs("div",{className:"hidden flex-wrap gap-3 min-[560px]:flex-nowrap lg:flex lg:ml-auto",children:[u.jsx(ht,{className:"h-10 w-[300px] rounded-lg"}),u.jsx(ht,{className:"h-10 w-24 rounded-lg"}),u.jsx(ht,{className:"h-10 w-28 rounded-lg"})]})]}):u.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between lg:gap-3 w-full",children:[u.jsx(Tn,{className:"lg:hidden",children:u.jsxs(Vn,{children:[u.jsx(dc,{as:ZN}),u.jsx(Mn,{placeholder:"Search..."}),u.jsx("button",{type:"button",children:u.jsx(rH,{className:"size-5 text-text-soft-400"})})]})}),u.jsx(W1e,{defaultValue:"all",className:"lg:w-80",children:u.jsxs(G1e,{children:[u.jsx(Ew,{value:"all",children:"All"}),u.jsx(Ew,{value:"pending",children:"Pending"}),u.jsx(Ew,{value:"finished",children:"Finished"})]})}),u.jsxs("div",{className:"hidden flex-wrap gap-3 min-[560px]:flex-nowrap lg:flex lg:ml-auto",children:[u.jsx(Tn,{size:"small",className:"w-[300px]",children:u.jsxs(Vn,{children:[u.jsx(dc,{as:ZN}),u.jsx(Mn,{placeholder:"Search..."}),u.jsxs($bt,{children:[u.jsx(Fbt,{}),"1"]})]})}),u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"small",className:"flex-1 min-[560px]:flex-none",children:[u.jsx(wt,{as:rH}),"Filter"]}),u.jsxs(Xi,{size:"small",children:[u.jsxs(Qi,{className:"w-auto flex-1 min-[560px]:flex-none",children:[u.jsx(Fv,{as:Ine}),u.jsx(Zi,{placeholder:"Sort by"})]}),u.jsxs(Ji,{children:[u.jsx(Ft,{value:"asc",children:"ASC"}),u.jsx(Ft,{value:"desc",children:"DESC"})]})]})]})]})}const af=e=>e==="asc"?u.jsx(mSe,{className:"size-5 text-text-sub-600"}):e==="desc"?u.jsx(hSe,{className:"size-5 text-text-sub-600"}):u.jsx(TSe,{className:"size-5 text-text-sub-600"}),Bbt=e=>e===Dt.COMPLETED?"completed":e===Dt.FAILED?"failed":[Dt.PENDING,Dt.RESEARCHING,Dt.AUDITING,Dt.PLANNING,Dt.SECTION_GENERATION,Dt.ASSEMBLING,Dt.ENHANCED_RESEARCHING,Dt.ENHANCED_PLANNING,Dt.ENHANCED_IMAGING,Dt.ENHANCED_DRAFTING,Dt.ENHANCED_ASSEMBLING,"agent_brief_generation","agent_generating_images","agent_researching","agent_section_processing","agent_content_creation","agent_generating_blog_cover","agent_generating_extra_content"].includes(e)?"pending":"disabled",Hbt={pending:"Queued For Creation",agent_brief_generation:"Generating Content Brief",agent_generating_images:"Generating Images",agent_researching:"Researching Content",agent_section_processing:"Section Processing",agent_content_creation:"Content Creation",agent_generating_blog_cover:"Generating Blog Cover",agent_generating_extra_content:"SEO & Content Research"},Vbt=e=>{const t=Hbt[e];return t||e.split("_").map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")},JJ={0:"#34d399",10:"#22c55e",20:"#2dd4bf",30:"#14b8a6",40:"#facc15",50:"#fbbf24",60:"#f59e0b",70:"#fb923c",80:"#f97316",90:"#ef4444",100:"#dc2626"};function Ubt(e){const t=e>=100?100:Math.floor(e/10)*10;return{backgroundColor:JJ[t]??JJ[0]}}function qbt({open:e,title:t,onConfirm:n,onCancel:r,isDeleting:i}){return e?u.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:i?void 0:r,children:[u.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm"}),u.jsxs("div",{className:"relative w-full max-w-md rounded-2xl bg-bg-white-0 p-6 shadow-2xl",onClick:o=>o.stopPropagation(),children:[u.jsxs("div",{className:"mb-1 flex items-center gap-3",children:[u.jsx("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-full bg-red-50",children:u.jsx(YN,{className:"size-5 text-red-500"})}),u.jsx("h2",{className:"text-label-lg text-text-strong-950",children:"Delete article"})]}),u.jsxs("p",{className:"mb-6 pl-[52px] text-paragraph-sm text-text-sub-600",children:["Are you sure you want to delete ",u.jsxs("span",{className:"font-medium text-text-strong-950",children:['"',t,'"']}),"? This action cannot be undone."]}),u.jsxs("div",{className:"flex justify-end gap-3",children:[u.jsx(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:r,disabled:i,children
675:"Cancel"}),u.jsxs(Re,{variant:"error",mode:"filled",size:"small",onClick:n,disabled:i,children:[i?u.jsx(wt,{as:YO,className:"animate-spin"}):u.jsx(wt,{as:YN}),"Delete"]})]})]})]}):null}function Wbt({article:e,onRetry:t,retryingId:n,onDelete:r,deletingId:i,pipelineSlotsFull:o}){const[s,a]=x.useState(!1),[l,c]=x.useState(!1),d=e.status===Dt.COMPLETED,f=x.useRef(!1);x.useEffect(()=>{const _=i===e.id;f.current&&!_&&c(!1),f.current=_},[i,e.id]);const p=e.status===Dt.FAILED,m=!d&&!p,y=n===e.id,v=i===e.id,b=e.title||e.keyword,C=_=>{_.stopPropagation(),t(e.id,b).then(()=>a(!1))},S=_=>{_.stopPropagation(),a(!1),c(!0)},E=()=>{r(e.id,b)},A=_=>{m||a(_)};return u.jsxs(u.Fragment,{children:[u.jsxs(KR,{open:s,onOpenChange:A,children:[u.jsx(YR,{asChild:!0,children:u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",disabled:m,onClick:_=>_.stopPropagation(),children:u.jsx(wt,{as:Av})})}),u.jsxs(oC,{align:"end",className:"w-48 bg-bg-white-0 p-1",children:[p&&u.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-paragraph-sm text-text-strong-950 hover:bg-bg-weak-50 disabled:opacity-50",disabled:y||o,title:o?Ua:void 0,onClick:C,children:[y?u.jsx(YO,{className:"size-4 animate-spin"}):u.jsx(NSe,{className:"size-4"}),"Retry"]}),u.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-paragraph-sm text-red-600 hover:bg-red-50 disabled:opacity-50",disabled:v,onClick:S,children:[u.jsx(YN,{className:"size-4"}),"Delete"]})]})]}),u.jsx(qbt,{open:l,title:b,onConfirm:E,onCancel:()=>c(!1),isDeleting:v})]})}function Gbt(e,t,n,r,i){return[{id:"article",accessorKey:"title",header:({column:o})=>u.jsxs("div",{className:"flex items-center gap-0.5 whitespace-nowrap",children:["Article",u.jsx("button",{type:"button",onClick:()=>o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),enableSorting:!0,cell:({row:o})=>{var s,a,l,c;return u.jsxs("div",{className:"flex min-w-[212px] items-center gap-3",children:[u.jsx("img",{src:o.original.coverImageUrl||"https://placehold.co/64x40/F5F5F5/A4A4A4?text=No+Image",alt:o.original.title||o.original.keyword,className:"h-10 w-16 rounded-lg object-cover flex-shrink-0"}),u.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.jsx("span",{className:"text-label-sm text-text-strong-950",children:o.original.title||o.original.keyword}),u.jsxs("span",{className:"text-paragraph-xs text-text-sub-600",children:["by ",((a=(s=o.original)==null?void 0:s.createdBy)==null?void 0:a.name)||((c=(l=o.original)==null?void 0:l.createdBy)==null?void 0:c.email)]})]})]})}},{id:"publishedAt",accessorKey:"createdAt",header:({column:o})=>u.jsxs("div",{className:"flex items-center gap-0.5 whitespace-nowrap",children:["Published At",u.jsx("button",{type:"button",onClick:()=>o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),cell:({row:o})=>u.jsxs("div",{className:"flex min-w-[156px] flex-col gap-0.5",children:[u.jsx("span",{className:"text-label-sm text-text-strong-950",children:o.original.ghostLastPublishedDate?q2(new Date(o.original.ghostLastPublishedDate),"do MMM yyyy"):q2(new Date(o.original.createdAt),"do MMM yyyy")}),u.jsx("span",{className:"text-paragraph-xs text-text-sub-600",children:o.original.ghostLastPublishedDate?`Since ${q2(new Date(o.original.ghostLastPublishedDate),"MMM, yyyy")}`:`Since ${q2(new Date(o.original.createdAt),"MMM, yyyy")}`})]})},{id:"keywords",accessorKey:"keyword",header:({column:o})=>u.jsxs("div",{className:"flex items-center gap-0.5 whitespace-nowrap",children:["Keywords",u.jsx("button",{type:"button",onClick:()=>o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),cell:({row:o})=>{const s=[o.original.keyword],a=s.slice(0,2),l=s.length-2;return u.jsxs("div",{className:"flex w-[232px] flex-wrap items-center gap-2",children:[a.map((c,d)=>u.jsx(Ri,{variant:"lighter",color:"blue",size:"medium",className:"px-3",children:c},d)),l>0&&u.jsxs("span",{className:"text-label-xs font-medium text-text-sub-600",children:["+",l]})]})}},{id:"wordCount",accessorKey:"wordCount",enableSorting:!0,header:({column:o})=>u.jsxs("div",{className:"flex items-center gap-0.5 whitespace-nowrap",children:["Word count",u.jsx("button",{type:"button",onClick:()=>
675o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),cell:({row:o})=>{const s=o.original.wordCount;return u.jsx("span",{className:"text-label-sm text-text-strong-950",children:s!=null&&s>0?s.toLocaleString():"â"})}},{id:"searchTrafficPotential",accessorKey:"keywordOverviewData",enableSorting:!0,accessorFn:o=>{var s,a,l,c;return((c=(l=(a=(s=o.keywordOverviewData)==null?void 0:s.results)==null?void 0:a[0])==null?void 0:l.keyword_info)==null?void 0:c.search_volume)??-1},header:({column:o})=>u.jsxs("div",{className:"flex items-center gap-0.5 whitespace-nowrap",children:["Potential Monthly Traffic",u.jsx("button",{type:"button",onClick:()=>o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),cell:({row:o})=>{var l,c,d;const s=o.original.keywordOverviewData,a=(d=(c=(l=s==null?void 0:s.results)==null?void 0:l[0])==null?void 0:c.keyword_info)==null?void 0:d.search_volume;return u.jsx("span",{className:"text-label-sm text-text-strong-950",children:a!=null&&a>=0?a>=1e3?`${(a/1e3).toFixed(1)}k`:a.toLocaleString():"â"})}},{id:"difficulty",accessorKey:"keywordOverviewData",enableSorting:!0,accessorFn:o=>{var s,a,l,c;return((c=(l=(a=(s=o.keywordOverviewData)==null?void 0:s.results)==null?void 0:a[0])==null?void 0:l.keyword_properties)==null?void 0:c.keyword_difficulty)??-1},header:({column:o})=>u.jsxs("div",{className:"flex items-center gap-0.5 whitespace-nowrap",children:["Difficulty",u.jsx("button",{type:"button",onClick:()=>o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),cell:({row:o})=>{var l,c,d;const s=o.original.keywordOverviewData,a=(d=(c=(l=s==null?void 0:s.results)==null?void 0:l[0])==null?void 0:c.keyword_properties)==null?void 0:d.keyword_difficulty;return a==null||a<0?u.jsx("span",{className:"text-label-sm text-text-strong-950",children:"â"}):u.jsxs("span",{className:"inline-flex items-center gap-1.5 text-label-sm text-text-strong-950",children:[u.jsx("span",{className:"size-3 shrink-0 rounded-full",style:Ubt(a),"aria-hidden":!0}),a]})}},{id:"status",accessorKey:"status",header:({column:o})=>u.jsxs("div",{className:"flex min-w-24 items-center gap-0.5 whitespace-nowrap",children:["Status",u.jsx("button",{type:"button",onClick:()=>o.toggleSorting(o.getIsSorted()==="asc"),children:af(o.getIsSorted())})]}),cell:({row:o})=>{const s=o.original.status,a=s===Dt.COMPLETED,l=s===Dt.FAILED,c=!a&&!l;return u.jsxs(c5,{status:Bbt(s),children:[c&&u.jsx(F1,{as:YO,className:"animate-spin"}),a&&u.jsx(F1,{as:_ne}),l&&u.jsx(F1,{as:bSe}),Vbt(s)]})}},{id:"actions",enableHiding:!1,cell:({row:o})=>u.jsx(Wbt,{article:o.original,onRetry:e,retryingId:t,onDelete:n,deletingId:r,pipelineSlotsFull:i}),meta:{className:"px-4"}}]}const Kbt=({articles:e,total:t,pageIndex:n,pageSize:r,onPageChange:i,onPageSizeChange:o,isLoading:s,onArticleClick:a=d=>console.log(`Article clicked: ${d}`),onCreateArticle:l,pipelineSlotsFull:c=!1})=>{var j;const[d,f]=x.useState([]),[p]=dne(),[m]=NCe(),[y,v]=x.useState(null),[b,C]=x.useState(null),S=x.useCallback((T,O)=>(v(T),p(T).unwrap().then(()=>{ze.success(`${O} has been queued again`)}).catch(D=>{s5(D)?ze.error(a5(D)):ze.error("Failed to retry article")}).finally(()=>v(null))),[p]),E=x.useCallback((T,O)=>{C(T),m(T).unwrap().then(()=>{ze.success(`"${O}" has been deleted`)}).catch(()=>{ze.error("Failed to delete article. Please try again.")}).finally(()=>C(null))},[m]),A=x.useMemo(()=>Gbt(S,y,E,b,c),[S,y,E,b,c]),_=t>0?Math.ceil(t/r):1,N=Dbt({data:e,columns:A,onSortingChange:f,getCoreRowModel:Tbt(),getSortedRowModel:Mbt(),state:{sorting:d}});return s?u.jsxs("div",{className:"flex w-full flex-1 flex-col",children:[u.jsx("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between mb-5",children:u.jsx(QJ,{isLoading:!0})}),u.jsxs(hc,{className:"-mx-4 mt-5 w-auto px-4 lg:mx-0 lg:mt-4 lg:w-full lg:px-0",children:[u.jsx(pc,{children:u.jsxs(ri,{children:[u.jsx(pt,{className:"pr-0",children:u.jsx(ht,{className:"h-5 w-5"})}),u.jsx(pt,{children:"Article"}),u.jsx(pt,{children:"Published At"}),u.jsx(pt,{children:"Keywords"}),u.jsx(pt,{children:"Status"}),u.jsx(pt,{className:"px-4",children:"Actions"})]})}),u.jsx(mc,{children:[...Array(5)].map((T,O)=>u.jsxs(x.Fragment,{children:[u.jsxs(ri,{children:[u.jsx(mt,{className:"pr-0",children:u.jsx(ht,{className:"h-5 w-5"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex min-w-[212px] items-center gap-3",children:[u.jsx(ht,{className:"h-10 w-16 rounded-lg"}),u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx(ht,{className:"h-4 w-32"}),u.jsx(ht,{className:"h-3 w-24"})]})]})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-4 w-24"})}),u.jsx(mt,{children:u.jsxs("div",{className:"flex gap-2",children:[u.jsx(ht,{className:"h-6 w-20 rounded-full"}),u.jsx(ht,{className:"h-6 w-16 rounded-full"})]})}),u.jsx(mt,{children:u.jsx(ht,{className:"h-6 w-24 rounded-md"})}),u.jsx(mt,{className:"px-4",children:u.jsx(ht,{className:"h-6 w-6 rounded-md"})})]}),O<4&&u.jsx(gc,{})]},O))})]}),u.jsx("div",{className:"mt-auto",children:u.jsxs("div",{className:"mt-10 hidden items-center gap-3 lg:flex",children:[u.jsx(ht,{className:"h-4 w-24"}),u.jsx("div",{className:"flex-1 flex justify-center gap-2",children:[...Array(7)].map((T,O)=>u.jsx(ht,{className:"h-8 w-8 rounded-lg"},O))}),u.jsx(ht,{className:"h-8 w-20 rounded-lg"})]})})]}):e.length===0?u.jsxs("div",{className:"flex flex-col flex-1 items-center justify-center p-12 text-center",children:[u.jsx("img",{src:Lbt,alt:"No articles",className:"mb-6 w-32 h-32"}),u.jsx("h3",{className:"text-text-strong-950 text-lg font-medium mb-2",children:"No articles found."}),u.jsx("p",{className:"text-text-sub-600 text-sm mb-5",children:"Create your first article to get started."}),l&&(c?u.jsx(qu,{delayDuration:150,children:u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{className:"inline-flex",children:u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",disabled:!0,type:"button",children:[u.jsx(wt,{as:Pi}
675),"Create New Article"]})})}),u.jsx(ns,{side:"bottom",sideOffset:8,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:Ua})]})}):u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",onClick:l,children:[u.jsx(wt,{as:Pi}),"Create New Article"]}))]}):u.jsxs("div",{className:"flex w-full flex-1 flex-col",children:[u.jsx("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:u.jsx(QJ,{})}),u.jsxs(hc,{className:"-mx-4 mt-5 w-auto px-4 lg:mx-0 lg:mt-4 lg:w-full lg:px-0",children:[u.jsx(pc,{children:N.getHeaderGroups().map(T=>u.jsx(ri,{children:T.headers.map(O=>{var D;return u.jsx(pt,{className:(D=O.column.columnDef.meta)==null?void 0:D.className,children:O.isPlaceholder?null:ZJ(O.column.columnDef.header,O.getContext())},O.id)})},T.id))}),u.jsx(mc,{children:((j=N.getRowModel().rows)==null?void 0:j.length)>0&&N.getRowModel().rows.map((T,O,D)=>{const R=T.original.status===Dt.COMPLETED,I=T.original.published===!0,F=R||I;return u.jsxs(x.Fragment,{children:[u.jsx(ri,{"data-state":T.getIsSelected()&&"selected",className:F?"cursor-pointer":"",onClick:F?()=>a(T.original.id):void 0,children:T.getVisibleCells().map($=>{var H;return u.jsx(mt,{className:(H=$.column.columnDef.meta)==null?void 0:H.className,children:ZJ($.column.columnDef.cell,$.getContext())},$.id)})}),O<D.length-1&&u.jsx(gc,{})]},T.id)})})]}),u.jsxs("div",{className:"mt-auto",children:[u.jsxs("div",{className:"mt-4 flex items-center justify-between py-4 lg:hidden",children:[u.jsx(Re,{variant:"neutral",mode:"stroke",size:"xsmall",className:"w-28",onClick:()=>i(n-1),disabled:n===0,children:"Previous"}),u.jsxs("span",{className:"whitespace-nowrap text-center text-paragraph-sm text-text-sub-600",children:["Page ",n+1," of ",_]}),u.jsx(Re,{variant:"neutral",mode:"stroke",size:"xsmall",className:"w-28",onClick:()=>i(n+1),disabled:n>=_-1,children:"Next"})]}),u.jsxs("div",{className:"mt-10 hidden items-center gap-3 lg:flex",children:[u.jsxs("span",{className:"flex-1 whitespace-nowrap text-paragraph-sm text-text-sub-600",children:["Page ",n+1," of ",_]}),u.jsxs(cC,{children:[u.jsx(Vs,{onClick:()=>i(0),disabled:n===0,children:u.jsx(Us,{as:Lne})}),u.jsx(Vs,{onClick:()=>i(n-1),disabled:n===0,children:u.jsx(Us,{as:Qs})}),Array.from({length:_},(T,O)=>O).map(T=>{const O=n;return T===0||T===_-1||T>=O-1&&T<=O+1?u.jsx(u0,{current:T===O,onClick:()=>i(T),children:T+1},T):T===O-2||T===O+2?u.jsx(u0,{children:"..."},T):null}),u.jsx(Vs,{onClick:()=>i(n+1),disabled:n>=_-1,children:u.jsx(Us,{as:im})}),u.jsx(Vs,{onClick:()=>i(_-1),disabled:n>=_-1,children:u.jsx(Us,{as:$ne})})]}),u.jsx("div",{className:"flex flex-1 justify-end",children:u.jsxs(Xi,{size:"xsmall",value:String(r),onValueChange:T=>o(Number(T)),children:[u.jsx(Qi,{className:"w-auto",children:u.jsx(Zi,{})}),u.jsxs(Ji,{children:[u.jsx(Ft,{value:"10",children:"10 / page"}),u.jsx(Ft,{value:"15",children:"15 / page"}),u.jsx(Ft,{value:"50",children:"50 / page"}),u.jsx(Ft,{value:"100",children:"100 / page"})]})]})})]})]})]})},Ybt=({isOpen:e,onClose:t,onSuccess:n})=>{const[r,i]=x.useState(""),[o,{isLoading:s}]=ECe(),[a,l]=x.useState(null),c=x.useRef(null),{data:d}=qO(void 0,{skip:!e,pollingInterval:e?5e3:0}),f=((d==null?void 0:d.used)??0)>=((d==null?void 0:d.limit)??3),p=y=>{y||(i(""),l(null),t())},m=async y=>{if(y.preventDefault(),!r.trim()){l("Please enter a keyword");return}l(null);try{await o({keyword:r.trim(),useEnhancedFlow:!0}).unwrap(),i(""),n&&n(),t()}catch(v){if(s5(v))l(a5(v));else{const b=v instanceof Error?v.message:"Failed to create article";l(b)}}};return u.jsx(wd,{open:e,onOpenChange:p,children:u.jsxs(Ec,{children:[u.jsx(kc,{icon:Q1,title:"Create New Article",description:"Enter the keyword y
675our article should target."}),u.jsxs("form",{onSubmit:m,children:[u.jsx(fm,{className:"flex flex-col gap-5",children:u.jsxs("div",{className:"flex flex-col items-start gap-1",children:[u.jsxs("div",{className:"flex items-center gap-1",children:[u.jsx(It,{htmlFor:"create-article-keyword",children:"Keyword"}),u.jsx(Jw,{delayDuration:200,children:u.jsxs(e3,{children:[u.jsx(t3,{asChild:!0,children:u.jsx("button",{type:"button",className:"focus:outline-none inline-flex text-text-disabled-300 hover:text-text-soft-400",children:u.jsx(Tne,{className:"size-5"})})}),u.jsx(n3,{children:u.jsx(ry,{className:"max-w-72 bg-bg-strong-950 text-text-white-0 shadow-tooltip z-[100] rounded-md px-2 py-1.5 text-xs font-medium",sideOffset:6,children:"The primary search term your article will be optimized for. Our AI will research and write content aimed at ranking for this keyword."})})]})})]}),u.jsx(Tn,{size:"medium",children:u.jsx(Vn,{children:u.jsx(Mn,{ref:c,id:"create-article-keyword",type:"text",placeholder:"e.g. best coffee makers",value:r,onChange:y=>i(y.target.value),className:"text-text-sub-600 placeholder:text-text-soft-400",autoFocus:!0,disabled:s})})}
675),a&&u.jsx(es,{hasError:!0,className:"mt-1",children:a})]})}),u.jsxs(_c,{className:"flex gap-2 justify-end",children:[u.jsx(ile,{asChild:!0,children:u.jsx(Re,{type:"button",variant:"neutral",mode:"stroke",size:"small",className:"w-full sm:w-fit",disabled:s,children:"Cancel"})}),u.jsx(Re,{type:"submit",variant:"primary",mode:"filled",size:"small",className:"w-full sm:w-fit",disabled:s||!r.trim()||f,children:s?"Creatingâ¦":"Create Article"})]})]})]})})},K1e="articlesPageSize",Xbt=[10,15,50,100],fN=10;function Zbt(){try{const e=localStorage.getItem(K1e);if(e==null)return fN;const t=parseInt(e,10);return Xbt.includes(t)?t:fN}catch{return fN}}const Qbt=()=>{const e=br(),[t,n]=x.useState(0),[r,i]=x.useState(Zbt),o=x.useRef(void 0),{data:s,isLoading:a,refetch:l}=lne({page:t+1,pageSize:r},{pollingInterval:(o.current??[]).some(E=>E.status!=="completed"&&E.status!=="failed")?5e3:0}),{data:c}=qO(void 0,{pollingInterval:5e3}),d=((c==null?void 0:c.used)??0)>=((c==null?void 0:c.limit)??3);o.current=s==null?void 0:s.data;const f=(s==null?void 0:s.data)??[],p=(s==null?void 0:s.total)??0,m=!a&&f.length===0,[y,v]=x.useState(!1),b=E=>{e(`/articles/${E}`)},C=E=>{n(E)},S=E=>{i(E),n(0);try{localStorage.setItem(K1e,String(E))}catch{}};return u.jsx(u.Fragment,{children:u.jsxs("div",{className:"flex flex-col flex-1 px-5 pb-6",children:[!m&&u.jsxs("div",{className:"flex items-center justify-between pt-6 pb-4",children:[u.jsxs("div",{children:[u.jsx("h1",{className:"text-display-xs font-semibold text-text-strong-950 mb-1",children:"Articles"}),u.jsx("p",{className:"text-text-sub-600 text-sm font-normal",children:"View articles you have created, scheduled, updated or published here."})]}),d?u.jsx(qu,{delayDuration:150,children:u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{className:"inline-flex",children:u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",disabled:!0,type:"button",children:[u.jsx(wt,{as:Pi}),"Create New Article"]})})}),u.jsx(ns,{side:"bottom",sideOffset:8,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:Ua})]})}):u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",onClick:()=>v(!0),children:[u.jsx(wt,{as:Pi}),"Create New Article"]})]}),u.jsx("div",{className:`flex flex-col flex-1${m?"":" mt-6"}`,children:u.jsx(Kbt,{articles:f,total:p,pageIndex:t,pageSize:r,onPageChange:C,onPageSizeChange:S,isLoading:a,onArticleClick:b,onCreateArticle:()=>v(!0),pipelineSlotsFull:d})}),u.jsx(Ybt,{isOpen:y,onClose:()=>v(!1),onSuccess:()=>l()})]})})};function xr(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=xr(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Jbt={value:()=>{}};function jS(){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 kw(n)}function kw(e){this._=e}function ext(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}kw.prototype=jS.prototype={constructor:kw,on:function(e,t){var n=this._,r=ext(e+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(e=r[o]).type)&&(i=txt(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<s;)if(i=(e=r[o]).type)n[i]=eee(n[i],e.name,t);else if(t==null)for(i in n)n[i]=eee(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new kw(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function txt(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function eee(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Jbt,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var sO="http://www.w3.org/1999/xhtml";const tee={svg:"http://www.w3.org/2000/svg",xhtml:sO,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function TS(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),tee.hasOwnProperty(t)?{space:tee[t],local:e}:e}function nxt(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===sO&&t.documentElement.namespaceURI===sO?t.createElement(e):t.createElementNS(n,e)}}function rxt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Y1e(e){var t=TS(e);return(t.local?rxt:nxt)(t)}function ixt(){}function iL(e){return e==null?ixt:function(){return this.querySelector(e)}}function oxt(e){typeof e!="function"&&(e=iL(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=new Array(s),l,c,d=0;d<s;++d)(l=o[d])&&(c=e.call(l,l.__data__,d,o))&&("__data__"in l&&(c.__data__=l.__data__),a[d]=c);return new Ro(r,this._parents)}function sxt(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function axt(){return[]}function X1e(e){return e==null?axt:function(){return this.querySelectorAll(e)}}function lxt(e){return function(){return sxt(e.apply(this,arguments))}}function cxt(e){typeof e=="function"?e=lxt(e):e=X1e(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var s=t[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(r.push(e.call(l,l.__data__,c,s)),i.push(l));
vendor: 4,296 bytes, line 675
675return new Ro(r,i)}function Z1e(e){return function(){return this.matches(e)}}function Q1e(e){return function(t){return t.matches(e)}}var uxt=Array.prototype.find;function dxt(e){return function(){return uxt.call(this.children,e)}}function fxt(){return this.firstElementChild}function hxt(e){return this.select(e==null?fxt:dxt(typeof e=="function"?e:Q1e(e)))}var pxt=Array.prototype.filter;function mxt(){return Array.from(this.children)}function gxt(e){return function(){return pxt.call(this.children,e)}}function yxt(e){return this.selectAll(e==null?mxt:gxt(typeof e=="function"?e:Q1e(e)))}function vxt(e){typeof e!="function"&&(e=Z1e(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&a.push(l);return new Ro(r,this._parents)}function J1e(e){return new Array(e.length)}function bxt(){return new Ro(this._enter||this._groups.map(J1e),this._parents)}function u5(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}u5.prototype={constructor:u5,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 xxt(e){return function(){return e}}function wxt(e,t,n,r,i,o){for(var s=0,a,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],r[s]=a):n[s]=new u5(e,o[s]);for(;s<l;++s)(a=t[s])&&(i[s]=a)}function Cxt(e,t,n,r,i,o,s){var a,l,c=new Map,d=t.length,f=o.length,p=new Array(d),m;for(a=0;a<d;++a)(l=t[a])&&(p[a]=m=s.call(l,l.__data__,a,t)+"",c.has(m)?i[a]=l:c.set(m,l));for(a=0;a<f;++a)m=s.call(e,o[a],a,o)+"",(l=c.get(m))?(r[a]=l,l.__data__=o[a],c.delete(m)):n[a]=new u5(e,o[a]);for(a=0;a<d;++a)(l=t[a])&&c.get(p[a])===l&&(i[a]=l)}function Sxt(e){return e.__data__}function Ext(e,t){if(!arguments.length)return Array.from(this,Sxt);var n=t?Cxt:wxt,r=this._parents,i=this._groups;typeof e!="function"&&(e=xxt(e));for(var o=i.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var d=r[c],f=i[c],p=f.length,m=kxt(e.call(d,d&&d.__data__,c,r)),y=m.length,v=a[c]=new Array(y),b=s[c]=new Array(y),C=l[c]=new Array(p);n(d,f,v,b,C,m,t);for(var S=0,E=0,A,_;S<y;++S)if(A=v[S]){for(S>=E&&(E=S+1);!(_=b[E])&&++E<y;);A._next=_||null}}return s=new Ro(s,r),s._enter=a,s._exit=l,s}function kxt(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function _xt(){return new Ro(this._exit||this._groups.map(J1e),this._parents)}function Axt(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function Nxt(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,s=Math.min(i,o),a=new Array(i),l=0;l<s;++l)for(var c=n[l],d=r[l],f=c.length,p=a[l]=new Array(f),m,y=0;y<f;++y)(m=c[y]||d[y])&&(p[y]=m);for(;l<i;++l)a[l]=n[l];return new Ro(a,this._parents)}function jxt(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Txt(e){e||(e=Mxt);function t(f,p){return f&&p?e(f.__data__,p.__data__):!f-!p}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],a=s.length,l=i[o]=new Array(a),c,d=0;d<a;++d)(c=s[d])&&(l[d]=c);l.sort(t)}return new Ro(i,this._parents).order()}function Mxt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Oxt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Rxt(){return Array.from(this)}function Pxt(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function Dxt(){let e=0;for(const t of this)++e;return e}function Ixt(){return!this.node()}function Lxt(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,s=i.length,a;o<s;++o)(a=i[o])&&e.call(a,a.__data__,o,i);return this}function $xt(e){return function(){this.removeAttribute(e)}}function zxt(e){return function(){this.removeAttributeNS(e.space,e.local)}}
vendor: 13,289 bytes, line 675
675function Fxt(e,t){return function(){this.setAttribute(e,t)}}function Bxt(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Hxt(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Vxt(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 Uxt(e,t){var n=TS(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?zxt:$xt:typeof t=="function"?n.local?Vxt:Hxt:n.local?Bxt:Fxt)(n,t))}function eye(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function qxt(e){return function(){this.style.removeProperty(e)}}function Wxt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Gxt(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Kxt(e,t,n){return arguments.length>1?this.each((t==null?qxt:typeof t=="function"?Gxt:Wxt)(e,t,n??"")):q0(this.node(),e)}function q0(e,t){return e.style.getPropertyValue(t)||eye(e).getComputedStyle(e,null).getPropertyValue(t)}function Yxt(e){return function(){delete this[e]}}function Xxt(e,t){return function(){this[e]=t}}function Zxt(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Qxt(e,t){return arguments.length>1?this.each((t==null?Yxt:typeof t=="function"?Zxt:Xxt)(e,t)):this.node()[e]}function tye(e){return e.trim().split(/^|\s+/)}function oL(e){return e.classList||new nye(e)}function nye(e){this._node=e,this._names=tye(e.getAttribute("class")||"")}nye.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 rye(e,t){for(var n=oL(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function iye(e,t){for(var n=oL(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Jxt(e){return function(){rye(this,e)}}function e2t(e){return function(){iye(this,e)}}function t2t(e,t){return function(){(t.apply(this,arguments)?rye:iye)(this,e)}}function n2t(e,t){var n=tye(e+"");if(arguments.length<2){for(var r=oL(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?t2t:t?Jxt:e2t)(n,t))}function r2t(){this.textContent=""}function i2t(e){return function(){this.textContent=e}}function o2t(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function s2t(e){return arguments.length?this.each(e==null?r2t:(typeof e=="function"?o2t:i2t)(e)):this.node().textContent}function a2t(){this.innerHTML=""}function l2t(e){return function(){this.innerHTML=e}}function c2t(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function u2t(e){return arguments.length?this.each(e==null?a2t:(typeof e=="function"?c2t:l2t)(e)):this.node().innerHTML}function d2t(){this.nextSibling&&this.parentNode.appendChild(this)}function f2t(){return this.each(d2t)}function h2t(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function p2t(){return this.each(h2t)}function m2t(e){var t=typeof e=="function"?e:Y1e(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function g2t(){return null}function y2t(e,t){var n=typeof e=="function"?e:Y1e(e),r=t==null?g2t:typeof t=="function"?t:iL(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function v2t(){var e=this.parentNode;e&&e.removeChild(this)}function b2t(){return this.each(v2t)}function x2t(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function w2t(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function C2t(e){return this.select(e?w2t:x2t)}function S2t(e){return arguments.length?this.property("__data__",e):this.node().__data__}function E2t(e){return function(t){e.call(this,t,this.__data__)}}function k2t(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 _2t(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function A2t(e,t,n){return function(){var r=this.__on,i,o=E2t(t);if(r){for(var s=0,a=r.length;s<a;++s)if((i=r[s]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function N2t(e,t,n){var r=k2t(e+""),i,o=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,d;l<c;++l)for(i=0,d=a[l];i<o;++i)if((s=r[i]).type===d.type&&s.name===d.name)return d.value}return}for(a=t?A2t:_2t,i=0;i<o;++i)this.each(a(r[i],t,n));return this}function oye(e,t,n){var r=eye(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function j2t(e,t){return function(){return oye(this,e,t)}}function T2t(e,t){return function(){return oye(this,e,t.apply(this,arguments))}}function M2t(e,t){return this.each((typeof t=="function"?T2t:j2t)(e,t))}function*O2t(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var sye=[null];function Ro(e,t){this._groups=e,this._parents=t}function vb(){return new Ro([[document.documentElement]],sye)}function R2t(){return this}Ro.prototype=vb.prototype={constructor:Ro,select:oxt,selectAll:cxt,selectChild:hxt,selectChildren:yxt,filter:vxt,data:Ext,enter:bxt,exit:_xt,join:Axt,merge:Nxt,selection:R2t,order:jxt,sort:Txt,call:Oxt,nodes:Rxt,node:Pxt,size:Dxt,empty:Ixt,each:Lxt,attr:Uxt,style:Kxt,property:Qxt,classed:n2t,text:s2t,html:u2t,raise:f2t,lower:p2t,append:m2t,insert:y2t,remove:b2t,clone:C2t,datum:S2t,on:N2t,dispatch:M2t,[Symbol.iterator]:O2t};function ko(e){return typeof e=="string"?new Ro([[document.querySelector(e)]],[document.documentElement]):new Ro([[e]],sye)}function P2t(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Rs(e,t){if(e=P2t(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const D2t={passive:!1},dv={capture:!0,passive:!1};function hN(e){e.stopImmediatePropagation()}function Jp(e){e.preventDefault(),e.stopImmediatePropagation()}function aye(e){var t=e.document.documentElement,n=ko(e).on("dragstart.drag",Jp,dv);"onselectstart"in t?n.on("selectstart.drag",Jp,dv):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function lye(e,t){var n=e.document.documentElement,r=ko(e).on("dragstart.drag",null);t&&(r.on("click.drag",Jp,dv),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 Y2=e=>()=>e;function aO(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:s,y:a,dx:l,dy:c,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:d}})}aO.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function I2t(e){return!e.ctrlKey&&!e.button}function L2t(){return this.parentNode}function $2t(e,t){return t??{x:e.x,y:e.y}}function z2t(){return navigator.maxTouchPoints||"ontouchstart"in this}function cye(){var e=I2t,t=L2t,n=$2t,r=z2t,i={},o=jS("start","drag","end"),s=0,a,l,c,d,f=0;function p(A){A.on("mousedown.drag",m).filter(r).on("touchstart.drag",b).on("touchmove.drag",C,D2t).on("touchend.drag touchcancel.drag",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(A,_){if(!(d||!e.call(this,A,_))){var N=E(this,t.call(this,A,_),A,_,"mouse");N&&(ko(A.view).on("mousemove.drag",y,dv).on("mouseup.drag",v,dv),aye(A.view),hN(A),c=!1,a=A.clientX,l=A.clientY,N("start",A))}}function y(A){if(Jp(A),!c){var _=A.clientX-a,N=A.clientY-l;c=_*_+N*N>f}i.mouse("drag",A)}function v(A){ko(A.view).on("mousemove.drag mouseup.drag",null),lye(A.view,c),Jp(A),i.mouse("end",A)}function b(A,_){if(e.call(this,A,_)){var N=A.changedTouches,j=t.call(this,A,_),T=N.length,O,D;for(O=0;O<T;++O)(D=E(this,j,A,_,N[O].identifier,N[O]))&&(hN(A),D("start",A,N[O]))}}function C(A){var _=A.changedTouches,N=_.length,j,T;for(j=0;j<N;++j)(T=i[_[j].identifier])&&(Jp(A),T("drag",A,_[j]))}function S(A){var _=A.changedTouches,N=_.length,j,T;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),j=0;j<N;++j)(T=i[_[j].identifier])&&(hN(A),T("end",A,_[j]))}function E(A,_,N,j,T,O){var D=o.copy(),R=Rs(O||N,_),I,F,$;if(($=n.call(A,new aO("beforestart",{sourceEvent:N,target:p,identifier:T,active:s,x:R[0],y:R[1],dx:0,dy:0,dispatch:D}),j))!=null)return I=$.x-R[0]||0,F=$.y-R[1]||0,function H(L,B,z){var V=R,U;switch(L){case"start":i[T]=H,U=s++;break;case"end":delete i[T],--s;case"drag":R=Rs(z||B,_),U=s;break}D.call(L,A,new aO(L,{sourceEvent:B,subject:$,target:p,identifier:T,active:U,x:R[0]+I,y:R[1]+F,dx:R[0]-V[0],dy:R[1]-V[1],dispatch:D}),j)}}return p.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Y2(!!A),p):e},p.container=function(A){return arguments.length?(t=typeof A=="function"?A:Y2(A),p):t},p.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Y2(A),p):n},p.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Y2(!!A),p):r},p.on=function(){var A=o.on.apply(o,arguments);return A===o?p:A},p.clickDistance=function(A){return arguments.length?(f=(A=+A)*A,p):Math.sqrt(f)},p}var W0=0,p1=0,Zg=0,uye=1e3,d5,m1,f5=0,oh=0,MS=0,fv=typeof performance=="object"&&performance.now?performance:Date,dye=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function sL(){return oh||(dye(F2t),oh=fv.now()+MS)}function F2t(){oh=0}function h5(){this._call=this._time=this._next=null}h5.prototype=fye.prototype={constructor:h5,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?sL():+n)+(t==null?0:+t),!this._next&&m1!==this&&(m1?m1._next=this:d5=this,m1=this),this._call=e,this._time=n,lO()},stop:function(){this._call&&(this._call=null,this._time=1/0,lO())}};function fye(e,t,n){var r=new h5;return r.restart(e,t,n),r}function B2t(){sL(),++W0;for(var e=d5,t;e;)(t=oh-e._time)>=0&&e._call.call(void 0,t),e=e._next;--W0}function nee(){oh=(f5=fv.now())+MS,W0=p1=0;try{B2t()}finally{W0=0,V2t(),oh=0}}function H2t(){var e=fv.now(),t=e-f5;t>uye&&(MS-=t,f5=e)}function V2t(){for(var e,t=d5,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:d5=n);m1=e,lO(r)}function lO(e){if(!W0){p1&&(p1=clearTimeout(p1));var t=e-oh;t>24?(e<1/0&&(p1=setTimeout(nee,e-fv.now()-MS)),Zg&&(Zg=clearInterval(Zg))):(Zg||(f5=fv.now(),Zg=setInterval(H2t,uye)),W0=1,dye(nee))}}function ree(e,t,n){var r=new h5;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var U2t=jS("start","end","cancel","interrupt"),q2t=[],hye=0,iee=1,cO=2,_w=3,oee=4,uO=5,Aw=6;function OS(e,t,n,r,i,o){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;W2t(e,n,{name:t,index:r,group:i,on:U2t,tween:q2t,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:hye})}function aL(e,t){var n=pa(e,t);if(n.state>hye)throw new Error("too late; already scheduled");return n}function cl(e,t){var n=pa(e,t);if(n.state>_w)throw new Error("too late; already running");return n}function pa(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function W2t(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=fye(o,0,n.time);function o(c){n.state=iee,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var d,f,p,m;if(n.state!==iee)return l();for(d in r)if(m=r[d],m.name===n.name){if(m.state===_w)return ree(s);m.state===oee?(m.state=Aw,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[d]):+d<t&&(m.state=Aw,m.timer.stop(),m.on.call("cancel",e,e.__data__,m.index,m.group),delete r[d])}
vendor: 5,092 bytes, line 675
675if(ree(function(){n.state===_w&&(n.state=oee,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=cO,n.on.call("start",e,e.__data__,n.index,n.group),n.state===cO){for(n.state=_w,i=new Array(p=n.tween.length),d=0,f=-1;d<p;++d)(m=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=m);i.length=f+1}}function a(c){for(var d=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=uO,1),f=-1,p=i.length;++f<p;)i[f].call(e,d);n.state===uO&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Aw,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function Nw(e,t){var n=e.__transition,r,i,o=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){o=!1;continue}i=r.state>cO&&r.state<uO,r.state=Aw,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}o&&delete e.__transition}}function G2t(e){return this.each(function(){Nw(this,e)})}function K2t(e,t){var n,r;return function(){var i=cl(this,e),o=i.tween;if(o!==n){r=n=o;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function Y2t(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=cl(this,e),s=o.tween;if(s!==r){i=(r=s).slice();for(var a={name:t,value:n},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=a;break}l===c&&i.push(a)}o.tween=i}}function X2t(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=pa(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===e)return s.value;return null}return this.each((t==null?K2t:Y2t)(n,e,t))}function lL(e,t,n){var r=e._id;return e.each(function(){var i=cl(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return pa(i,r).value[t]}}function pye(e,t){var n;return(typeof t=="number"?Ps:t instanceof Yf?w3:(n=Yf(t))?(t=n,w3):Ace)(e,t)}function Z2t(e){return function(){this.removeAttribute(e)}}function Q2t(e){return function(){this.removeAttributeNS(e.space,e.local)}}function J2t(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttribute(e);return s===i?null:s===r?o:o=t(r=s,n)}}function ewt(e,t,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(e.space,e.local);return s===i?null:s===r?o:o=t(r=s,n)}}function twt(e,t,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=t(r=s,a)))}}function nwt(e,t,n){var r,i,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===r&&l===i?o:(i=l,o=t(r=s,a)))}}function rwt(e,t){var n=TS(e),r=n==="transform"?ZLe:pye;return this.attrTween(e,typeof t=="function"?(n.local?nwt:twt)(n,r,lL(this,"attr."+e,t)):t==null?(n.local?Q2t:Z2t)(n):(n.local?ewt:J2t)(n,r,t))}function iwt(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function owt(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function swt(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&owt(e,o)),n}return i._value=t,i}function awt(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&iwt(e,o)),n}return i._value=t,i}function lwt(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=TS(e);return this.tween(n,(r.local?swt:awt)(r,t))}function cwt(e,t){return function(){aL(this,e).delay=+t.apply(this,arguments)}}function uwt(e,t){return t=+t,function(){aL(this,e).delay=t}}function dwt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?cwt:uwt)(t,e)):pa(this.node(),t).delay}function fwt(e,t){return function(){cl(this,e).duration=+t.apply(this,arguments)}}function hwt(e,t){return t=+t,function(){cl(this,e).duration=t}}function pwt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?fwt:hwt)(t,e)):pa(this.node(),t).duration}function mwt(e,t){if(typeof t!="function")throw new Error;return function(){cl(this,e).ease=t}}function gwt(e){var t=this._id;return arguments.length?this.each(mwt(t,e)):pa(this.node(),t).ease}function ywt(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;cl(this,e).ease=n}}function vwt(e){if(typeof e!="function")throw new Error;return this.each(ywt(this._id,e))}function bwt(e){typeof e!="function"&&(e=Z1e(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],s=o.length,a=r[i]=[],l,c=0;c<s;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&a.push(l);return new wc(r,this._parents,this._name,this._id)}function xwt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),s=new Array(r),a=0;a<o;++a)for(var l=t[a],c=n[a],d=l.length,f=s[a]=new Array(d),p,m=0;m<d;++m)(p=l[m]||c[m])&&(f[m]=p);for(;a<r;++a)s[a]=t[a];return new wc(s,this._parents,this._name,this._id)}function wwt(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>
vendor: 4,109 bytes, line 675
675=0&&(t=t.slice(0,n)),!t||t==="start"})}function Cwt(e,t,n){var r,i,o=wwt(t)?aL:cl;return function(){var s=o(this,e),a=s.on;a!==r&&(i=(r=a).copy()).on(t,n),s.on=i}}function Swt(e,t){var n=this._id;return arguments.length<2?pa(this.node(),n).on.on(e):this.each(Cwt(n,e,t))}function Ewt(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function kwt(){return this.on("end.remove",Ewt(this._id))}function _wt(e){var t=this._name,n=this._id;typeof e!="function"&&(e=iL(e));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var a=r[s],l=a.length,c=o[s]=new Array(l),d,f,p=0;p<l;++p)(d=a[p])&&(f=e.call(d,d.__data__,p,a))&&("__data__"in d&&(f.__data__=d.__data__),c[p]=f,OS(c[p],t,n,p,c,pa(d,n)));return new wc(o,this._parents,t,n)}function Awt(e){var t=this._name,n=this._id;typeof e!="function"&&(e=X1e(e));for(var r=this._groups,i=r.length,o=[],s=[],a=0;a<i;++a)for(var l=r[a],c=l.length,d,f=0;f<c;++f)if(d=l[f]){for(var p=e.call(d,d.__data__,f,l),m,y=pa(d,n),v=0,b=p.length;v<b;++v)(m=p[v])&&OS(m,t,n,v,p,y);o.push(p),s.push(d)}return new wc(o,s,t,n)}var Nwt=vb.prototype.constructor;function jwt(){return new Nwt(this._groups,this._parents)}function Twt(e,t){var n,r,i;return function(){var o=q0(this,e),s=(this.style.removeProperty(e),q0(this,e));return o===s?null:o===n&&s===r?i:i=t(n=o,r=s)}}function mye(e){return function(){this.style.removeProperty(e)}}function Mwt(e,t,n){var r,i=n+"",o;return function(){var s=q0(this,e);return s===i?null:s===r?o:o=t(r=s,n)}}function Owt(e,t,n){var r,i,o;return function(){var s=q0(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),q0(this,e))),s===l?null:s===r&&l===i?o:(i=l,o=t(r=s,a))}}function Rwt(e,t){var n,r,i,o="style."+t,s="end."+o,a;return function(){var l=cl(this,e),c=l.on,d=l.value[o]==null?a||(a=mye(t)):void 0;(c!==n||i!==d)&&(r=(n=c).copy()).on(s,i=d),l.on=r}}function Pwt(e,t,n){var r=(e+="")=="transform"?XLe:pye;return t==null?this.styleTween(e,Twt(e,r)).on("end.style."+e,mye(e)):typeof t=="function"?this.styleTween(e,Owt(e,r,lL(this,"style."+e,t))).each(Rwt(this._id,e)):this.styleTween(e,Mwt(e,r,t),n).on("end.style."+e,null)}function Dwt(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Iwt(e,t,n){var r,i;function o(){var s=t.apply(this,arguments);return s!==i&&(r=(i=s)&&Dwt(e,s,n)),r}return o._value=t,o}function Lwt(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,Iwt(e,t,n??""))}function $wt(e){return function(){this.textContent=e}}function zwt(e){return function(){var t=e(this);this.textContent=t??""}}function Fwt(e){return this.tween("text",typeof e=="function"?zwt(lL(this,"text",e)):$wt(e==null?"":e+""))}function Bwt(e){return function(t){this.textContent=e.call(this,t)}}function Hwt(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Bwt(i)),t}return r._value=e,r}function Vwt(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,Hwt(e))}function Uwt(){for(var e=this._name,t=this._id,n=gye(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var d=pa(l,t);OS(l,e,n,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new wc(r,this._parents,e,n)}function qwt(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--i===0&&o()}};n.each(function(){var c=cl(this,r),d=c.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t}),i===0&&o()})}var Wwt=0;function wc(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function gye(){return++Wwt}var Ll=vb.prototype;wc.prototype={constructor:wc,select:_wt,selectAll:Awt,selectChild:Ll.selectChild,selectChildren:Ll.selectChildren,filter:bwt,merge:xwt,selection:jwt,transition:Uwt,call:Ll.call,nodes:Ll.n
vendor: 11,149 bytes, line 675
675odes,node:Ll.node,size:Ll.size,empty:Ll.empty,each:Ll.each,on:Swt,attr:rwt,attrTween:lwt,style:Pwt,styleTween:Lwt,text:Fwt,textTween:Vwt,remove:kwt,tween:X2t,delay:dwt,duration:pwt,ease:gwt,easeVarying:vwt,end:qwt,[Symbol.iterator]:Ll[Symbol.iterator]};function Gwt(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Kwt={time:null,delay:0,duration:250,ease:Gwt};function Ywt(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 Xwt(e){var t,n;e instanceof wc?(t=e._id,e=e._name):(t=gye(),(n=Kwt).time=sL(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&OS(l,e,t,c,s,n||Ywt(l,t));return new wc(r,this._parents,e,t)}vb.prototype.interrupt=G2t;vb.prototype.transition=Xwt;const X2=e=>()=>e;function Zwt(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Jl(e,t,n){this.k=e,this.x=t,this.y=n}Jl.prototype={constructor:Jl,scale:function(e){return e===1?this:new Jl(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Jl(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 RS=new Jl(1,0,0);yye.prototype=Jl.prototype;function yye(e){for(;!e.__zoom;)if(!(e=e.parentNode))return RS;return e.__zoom}function pN(e){e.stopImmediatePropagation()}function Qg(e){e.preventDefault(),e.stopImmediatePropagation()}function Qwt(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Jwt(){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 see(){return this.__zoom||RS}function e3t(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function t3t(){return navigator.maxTouchPoints||"ontouchstart"in this}function n3t(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function vye(){var e=Qwt,t=Jwt,n=n3t,r=e3t,i=t3t,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=lw,c=jS("start","zoom","end"),d,f,p,m=500,y=150,v=0,b=10;function C($){$.property("__zoom",see).on("wheel.zoom",T,{passive:!1}).on("mousedown.zoom",O).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",R).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function($,H,L,B){var z=$.selection?$.selection():$;z.property("__zoom",see),$!==z?_($,H,L,B):z.interrupt().each(function(){N(this,arguments).event(B).start().zoom(null,typeof H=="function"?H.apply(this,arguments):H).end()})},C.scaleBy=function($,H,L,B){C.scaleTo($,function(){var z=this.__zoom.k,V=typeof H=="function"?H.apply(this,arguments):H;return z*V},L,B)},C.scaleTo=function($,H,L,B){C.transform($,function(){var z=t.apply(this,arguments),V=this.__zoom,U=L==null?A(z):typeof L=="function"?L.apply(this,arguments):L,W=V.invert(U),G=typeof H=="function"?H.apply(this,arguments):H;return n(E(S(V,G),U,W),z,s)},L,B)},C.translateBy=function($,H,L,B){C.transform($,function(){return n(this.__zoom.translate(typeof H=="function"?H.apply(this,arguments):H,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),s)},null,B)},C.translateTo=function($,H,L,B,z){C.transform($,function(){var V=t.apply(this,arguments),U=this.__zoom,W=B==null?A(V):typeof B=="function"?B.apply(this,arguments):B;return n(RS.translate(W[0],W[1]).scale(U.k).translate(typeof H=="function"?-H.apply(this,arguments):-H,typeof L=="function"?-L.apply(this,arguments):-L),V,s)},B,z)};function S($,H){return H=Math.max(o[0],Math.min(o[1],H)),H===$.k?$:new Jl(H,$.x,$.y)}function E($,H,L){var B=H[0]-L[0]*$.k,z=H[1]-L[1]*$.k;return B===$.x&&z===$.y?$:new Jl($.k,B,z)}function A($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function _($,H,L,B){$.on("start.zoom",function(){N(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(B).end()}).tween("zoom",function(){var z=this,V=arguments,U=N(z,V).event(B),W=t.apply(z,V),G=L==null?A(W):typeof L=="function"?L.apply(z,V):L,Y=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),X=z.__zoom,Q=typeof H=="function"?H.apply(z,V):H,ne=l(X.invert(G).concat(Y/X.k),Q.invert(G).concat(Y/Q.k));return function(ie){if(ie===1)ie=Q;else{var se=ne(ie),oe=Y/se[2];ie=new Jl(oe,G[0]-se[0]*oe,G[1]-se[1]*oe)}U.zoom(null,ie)}})}function N($,H,L){return!L&&$.__zooming||new j($,H)}function j($,H){this.that=$,this.args=H,this.active=0,this.sourceEvent=null,this.extent=t.apply($,H),this.taps=0}j.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,H){return this.mouse&&$!=="mouse"&&(this.mouse[1]=H.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=H.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=H.invert(this.touch1[0])),this.that.__zoom=H,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var H=ko(this.that).datum();c.call($,this.that,new Zwt($,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:c}),H)}};function T($,...H){if(!e.apply(this,arguments))return;var L=N(this,H).event($),B=this.__zoom,z=Math.max(o[0],Math.min(o[1],B.k*Math.pow(2,r.apply(this,arguments)))),V=Rs($);if(L.wheel)(L.mouse[0][0]!==V[0]||L.mouse[0][1]!==V[1])&&(L.mouse[1]=B.invert(L.mouse[0]=V)),clearTimeout(L.wheel);else{if(B.k===z)return;L.mouse=[V,B.invert(V)],Nw(this),L.start()}Qg($),L.wheel=setTimeout(U,y),L.zoom("mouse",n(E(S(B,z),L.mouse[0],L.mouse[1]),L.extent,s));function U(){L.wheel=null,L.end()}}function O($,...H){if(p||!e.apply(this,arguments))return;var L=$.currentTarget,B=N(this,H,!0).event($),z=ko($.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",Y,!0),V=Rs($,L),U=$.clientX,W=$.clientY;aye($.view),pN($),B.mouse=[V,this.__zoom.invert(V)],Nw(this),B.start();function G(X){if(Qg(X),!B.moved){var Q=X.clientX-U,ne=X.clientY-W;B.moved=Q*Q+ne*ne>v}B.event(X).zoom("mouse",n(E(B.that.__zoom,B.mouse[0]=Rs(X,L),B.mouse[1]),B.extent,s))}function Y(X){z.on("mousemove.zoom mouseup.zoom",null),lye(X.view,B.moved),Qg(X),B.event(X).end()}}function D($,...H){if(e.apply(this,arguments)){var L=this.__zoom,B=Rs($.changedTouches?$.changedTouches[0]:$,this),z=L.invert(B),V=L.k*($.shiftKey?.5:2),U=n(E(S(L,V),B,z),t.apply(this,H),s);Qg($),a>0?ko(this).transition().duration(a).call(_,U,B,$):ko(this).call(C.transform,U,B,$)}}function R($,...H){if(e.apply(this,arguments)){var L=$.touches,B=L.length,z=N(this,H,$.changedTouches.length===B).event($),V,U,W,G;for(pN($),U=0;U<B;++U)W=L[U],G=Rs(W,this),G=[G,this.__zoom.invert(G),W.identifier],z.touch0?!z.touch1&&z.touch0[2]!==G[2]&&(z.touch1=G,z.taps=0):(z.touch0=G,V=!0,z.taps=1+!!d);d&&(d=clearTimeout(d)),V&&(z.taps<2&&(f=G[0],d=setTimeout(function(){d=null},m)),Nw(this),z.start())}}function I($,...H){if(this.__zooming){var L=N(this,H).event($),B=$.changedTouches,z=B.length,V,U,W,G;for(Qg($),V=0;V<z;++V)U=B[V],W=Rs(U,this),L.touch0&&L.touch0[2]===U.identifier?L.touch0[0]=W:L.touch1&&L.touch1[2]===U.identifier&&(L.touch1[0]=W);if(U=L.that.__zoom,L.touch1){var Y=L.touch0[0],X=L.touch0[1],Q=L.touch1[0],ne=L.touch1[1],ie=(ie=Q[0]-Y[0])*ie+(ie=Q[1]-Y[1])*ie,se=(se=ne[0]-X[0])*se+(se=ne[1]-X[1])*se;U=S(U,Math.sqrt(ie/se)),W=[(Y[0]+Q[0])/2,(Y[1]+Q[1])/2],G=[(X[0]+ne[0])/2,(X[1]+ne[1])/2]}else if(L.touch0)W=L.touch0[0],G=L.touch0[1];else return;L.zoom("touch",n(E(U,W,G),L.extent,s))}}function F($,...H){if(this.__zooming){var L=N(this,H).event($),B=$.changedTouches,z=B.length,V,U;for(pN($),p&&clearTimeout(p),p=setTimeout(function(){p=null},m),V=0;V<z;++V)U=B[V],L.touch0&&L.touch0[2]===U.identifier?delete L.touch0:L.touch1&&L.touch1[2]===U.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(U=Rs(U,this),Math.hypot(f[0]-U[0],f[1]-U[1])<b)){var W=ko(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return C.wheelDelta=function($){return arguments.length?(r=typeof $=="function"?$:X2(+$),C):r},C.filter=function($){return arguments.length?(e=typeof $=="function"?$:X2(!!$),C):e},C.touchable=function($){return arguments.length?(i=typeof $=="function"?$:X2(!!$),C):i},C.extent=function($){return arguments.length?(t=typeof $=="function"?$:X2([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),C):t},C.scaleExtent=function($){return arguments.length?(o[0]=+$[0],o[1]=+$[1],C):[o[0],o[1]]},C.translateExtent=function($){return arguments.length?(s[0][0]=+$[0][0],s[1][0]=+$[1][0],s[0][1]=+$[0][1],s[1][1]=+$[1][1],C):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},C.constrain=function($){return arguments.length?(n=$,C):n},C.duration=function($){return arguments.length?(a=+$,C):a},C.interpolate=function($){return arguments.length?(l=$,C):l},C.on=function(){var $=c.on.apply(c,arguments);return $===c?C:$},C.clickDistance=function($){return arguments.length?(v=($=+$)*$,C):Math.sqrt(v)},C.tapDistance=function($){return arguments.length?(b=+$,C):b},C}const Xa={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,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,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".`,error012:e=>
675`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},hv=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],bye=["Enter"," ","Escape"],xye={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var G0;(function(e){e.Strict="strict",e.Loose="loose"})(G0||(G0={}));var $f;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})($f||($f={}));var pv;(function(e){e.Partial="partial",e.Full="full"})(pv||(pv={}));const wye={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Ou;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ou||(Ou={}));var hd;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(hd||(hd={}));var Qe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Qe||(Qe={}));const aee={[Qe.Left]:Qe.Right,[Qe.Right]:Qe.Left,[Qe.Top]:Qe.Bottom,[Qe.Bottom]:Qe.Top};function Cye(e){return e===null?null:e?"valid":"invalid"}const Sye=e=>"id"in e&&"source"in e&&"target"in e,r3t=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),cL=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),bb=(e,t=[0,0])=>{const{width:n,height:r}=Pc(e),i=e.origin??t,o=n*i[0],s=r*i[1];return{x:e.position.x-o,y:e.position.y-s}},i3t=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let s=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(s=o?t.nodeLookup.get(i):cL(i)?i:t.nodeLookup.get(i.id));const a=s?p5(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return PS(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return DS(n)},xb=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=PS(n,p5(i)),r=!0)}),r?DS(n):{x:0,y:0,width:0,height:0}},uL=(e,t,[n,r,i]=[0,0,1],o=!1,s=!1)=>{const a={...Cb(t,[n,r,i]),width:t.width/i,height:t.height/i},l=[];for(const c of e.values()){const{measured:d,selectable:f=!0,hidden:p=!1}=c;if(s&&!f||p)continue;const m=d.width??c.width??c.initialWidth??null,y=d.height??c.height??c.initialHeight??null,v=mv(a,Y0(c)),b=(m??0)*(y??0),C=o&&v>0;(!c.internals.handleBounds||C||v>=b||c.dragging)&&l.push(c)}return l},o3t=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function s3t(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}
675async function a3t({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},s){if(e.size===0)return Promise.resolve(!0);const a=s3t(e,s),l=xb(a),c=dL(l,t,n,(s==null?void 0:s.minZoom)??i,(s==null?void 0:s.maxZoom)??o,(s==null?void 0:s.padding)??.1);return await r.setViewport(c,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function Eye({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const s=n.get(e),a=s.parentId?n.get(s.parentId):void 0,{x:l,y:c}=a?a.internals.positionAbsolute:{x:0,y:0},d=s.origin??r;let f=s.extent||i;if(s.extent==="parent"&&!s.expandParent)if(!a)o==null||o("005",Xa.error005());else{const m=a.measured.width,y=a.measured.height;m&&y&&(f=[[l,c],[l+m,c+y]])}else a&&X0(s.extent)&&(f=[[s.extent[0][0]+l,s.extent[0][1]+c],[s.extent[1][0]+l,s.extent[1][1]+c]]);const p=X0(f)?sh(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(o==null||o("015",Xa.error015())),{position:{x:p.x-l+(s.measured.width??0)*d[0],y:p.y-c+(s.measured.height??0)*d[1]},positionAbsolute:p}}async function l3t({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(p=>p.id)),s=[];for(const p of n){if(p.deletable===!1)continue;const m=o.has(p.id),y=!m&&p.parentId&&s.find(v=>v.id===p.parentId);(m||y)&&s.push(p)}const a=new Set(t.map(p=>p.id)),l=r.filter(p=>p.deletable!==!1),d=o3t(s,l);for(const p of l)a.has(p.id)&&!d.find(y=>y.id===p.id)&&d.push(p);if(!i)return{edges:d,nodes:s};const f=await i({nodes:s,edges:d});return typeof f=="boolean"?f?{edges:d,nodes:s}:{edges:[],nodes:[]}:f}const K0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),sh=(e={x:0,y:0},t,n)=>({x:K0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:K0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function kye(e,t,n){const{width:r,height:i}=Pc(n),{x:o,y:s}=n.internals.positionAbsolute;return sh(e,[[o,s],[o+r,s+i]],t)}const lee=(e,t,n)=>e<t?K0(Math.abs(e-t),1,t)/t:e>n?-K0(Math.abs(e-n),1,t)/t:0,_ye=(e,t,n=15,r=40)=>{const i=lee(e.x,r,t.width-r)*n,o=lee(e.y,r,t.height-r)*n;return[i,o]},PS=(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)}),dO=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),DS=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Y0=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=cL(e)?e.internals.positionAbsolute:bb(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},p5=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=cL(e)?e.internals.positionAbsolute:bb(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},Aye=(e,t)=>DS(PS(dO(e),dO(t))),mv=(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)},cee=e=>Ys(e.width)&&Ys(e.height)&&Ys(e.x)&&Ys(e.y),Ys=e=>!isNaN(e)&&isFinite(e),c3t=(e,t)=>{},wb=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Cb=({x:e,y:t},[n,r,i],o=!1,s=[1,1])=>{const a={x:(e-n)/i,y:(t-r)/i};return o?wb(a,s):a},m5=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function kp(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function u3t(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=kp(e,n),i=kp(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=kp(e.top??e.y??0,n),i=kp(e.bottom??e.y??0,n),o=kp(e.left??e.x??0,t),s=kp(e.right??e.x??0,t);return{top:r,right:s,bottom:i,left:o,x:o+s,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function d3t(e,t,n,r,i,o){const{x:s,y:a}=m5(e,[t,n,r]),{x:l,y:c}=m5({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-l,f=o-c;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(d),bottom:Math.floor(f)}}const dL=(e,t,n,r,i,o)=>{const s=u3t(o,t,n),a=(t-s.x)/e.width,l=(n-s.y)/e.height,c=Math.min(a,l),d=K0(c,r,i),f=e.x+e.width/2,p=e.y+e.height/2,m=t/2-f*d,y=n/2-p*d,v=d3t(e,m,y,d,t,n),b={left:Math.min(v.left-s.left,0),top:Math.min(v.top-s.top,0),right:Math.min(v.right-s.right,0),bottom:Math.min(v.bottom-s.bottom,0)};return{x:m-b.left+b.right,y:y-b.top+b.bottom,zoom:d}},gv=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function X0(e){return e!=null&&e!=="parent"}function Pc(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function Nye(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function jye(e,t={width:0,height:0},n,r,i){const o={...e},s=r.get(n);if(s){const a=s.origin||i;o.x+=s.internals.positionAbsolute.x-(t.width??0)*a[0],o.y+=s.internals.positionAbsolute.y-(t.height??0)*a[1]}return o}function uee(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function f3t(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function h3t(e){return{...xye,...e||{}}}
675function B1(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:s}=Xs(e),a=Cb({x:o-((i==null?void 0:i.left)??0),y:s-((i==null?void 0:i.top)??0)},r),{x:l,y:c}=n?wb(a,t):a;return{xSnapped:l,ySnapped:c,...a}}const fL=e=>({width:e.offsetWidth,height:e.offsetHeight}),Tye=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},p3t=["INPUT","SELECT","TEXTAREA"];function Mye(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:p3t.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Oye=e=>"clientX"in e,Xs=(e,t)=>{var o,s;const n=Oye(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},dee=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:i,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...fL(s)}})};function Rye({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:s,targetControlY:a}){const l=e*.125+i*.375+s*.375+n*.125,c=t*.125+o*.375+a*.375+r*.125,d=Math.abs(l-e),f=Math.abs(c-t);return[l,c,d,f]}function Z2(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function fee({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Qe.Left:return[t-Z2(t-r,o),n];case Qe.Right:return[t+Z2(r-t,o),n];case Qe.Top:return[t,n-Z2(n-i,o)];case Qe.Bottom:return[t,n+Z2(i-n,o)]}}function Pye({sourceX:e,sourceY:t,sourcePosition:n=Qe.Bottom,targetX:r,targetY:i,targetPosition:o=Qe.Top,curvature:s=.25}){const[a,l]=fee({pos:n,x1:e,y1:t,x2:r,y2:i,c:s}),[c,d]=fee({pos:o,x1:r,y1:i,x2:e,y2:t,c:s}),[f,p,m,y]=Rye({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:a,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${a},${l} ${c},${d} ${r},${i}`,f,p,m,y]}function Dye({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[o,a,i,s]}function m3t({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const s=i&&n?r+1e3:r,a=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return s+a}function g3t({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=PS(p5(e),p5(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const s={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return mv(s,DS(o))>0}const y3t=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,v3t=(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)),b3t=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||y3t;let i;return Sye(e)?i={...e}:i={...e,id:r(e)},v3t(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Iye({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,s,a]=Dye({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,s,a]}const hee={[Qe.Left]:{x:-1,y:0},[Qe.Right]:{x:1,y:0},[Qe.Top]:{x:0,y:-1},[Qe.Bottom]:{x:0,y:1}},x3t=({source:e,sourcePosition:t=Qe.Bottom,target:n})=>t===Qe.Left||t===Qe.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},pee=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function w3t({source:e,sourcePosition:t=Qe.Bottom,target:n,targetPosition:r=Qe.Top,center:i,offset:o,stepPosition:s}){const a=hee[t],l=hee[r],c={x:e.x+a.x*o,y:e.y+a.y*o},d={x:n.x+l.x*o,y:n.y+l.y*o},f=x3t({source:c,sourcePosition:t,target:d}),p=f.x!==0?"x":"y",m=f[p];let y=[],v,b;const C={x:0,y:0},S={x:0,y:0},[,,E,A]=Dye({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[p]*l[p]===-1){p==="x"?(v=i.x??c.x+(d.x-c.x)*s,b=i.y??(c.y+d.y)/2):(v=i.x??(c.x+d.x)/2,b=i.y??c.y+(d.y-c.y)*s);const T=[{x:v,y:c.y},{x:v,y:d.y}],O=[{x:c.x,y:b},{x:d.x,y:b}];a[p]===m?y=p==="x"?T:O:y=p==="x"?O:T}else{const T=[{x:c.x,y:d.y}],O=[{x:d.x,y:c.y}];if(p==="x"?y=a.x===m?O:T:y=a.y===m?T:O,t===r){const $=Math.abs(e[p]-n[p]);if($<=o){const H=Math.min(o-1,o-$);a[p]===m?C[p]=(c[p]>e[p]?-1:1)*H:S[p]=(d[p]>n[p]?-1:1)*H}}if(t!==r){const $=p==="x"?"y":"x",H=a[p]===l[$],L=c[$]>d[$],B=c[$]<d[$];(a[p]===1&&(!H&&L||H&&B)||a[p]!==1&&(!H&&B||H&&L))&&(y=p==="x"?T:O)}const D={x:c.x+C.x,y:c.y+C.y},R={x:d.x+S.x,y:d.y+S.y},I=Math.max(Math.abs(D.x-y[0].x),Math.abs(R.x-y[0].x)),F=Math.max(Math.abs(D.y-y[0].y),Math.abs(R.y-y[0].y));I>=F?(v=(D.x+R.x)/2,b=y[0].y):(v=y[0].x,b=(D.y+R.y)/2)}
675const _={x:c.x+C.x,y:c.y+C.y},N={x:d.x+S.x,y:d.y+S.y};return[[e,..._.x!==y[0].x||_.y!==y[0].y?[_]:[],...y,...N.x!==y[y.length-1].x||N.y!==y[y.length-1].y?[N]:[],n],v,b,E,A]}function C3t(e,t,n,r){const i=Math.min(pee(e,t)/2,pee(t,n)/2,r),{x:o,y:s}=t;if(e.x===o&&o===n.x||e.y===s&&s===n.y)return`L${o} ${s}`;if(e.y===s){const c=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${o+i*c},${s}Q ${o},${s} ${o},${s+i*d}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${o},${s+i*l}Q ${o},${s} ${o+i*a},${s}`}function fO({sourceX:e,sourceY:t,sourcePosition:n=Qe.Bottom,targetX:r,targetY:i,targetPosition:o=Qe.Top,borderRadius:s=5,centerX:a,centerY:l,offset:c=20,stepPosition:d=.5}){const[f,p,m,y,v]=w3t({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:a,y:l},offset:c,stepPosition:d});let b=`M${f[0].x} ${f[0].y}`;for(let C=1;C<f.length-1;C++)b+=C3t(f[C-1],f[C],f[C+1],s);return b+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[b,p,m,y,v]}function mee(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function S3t(e){var f;const{sourceNode:t,targetNode:n}=e;if(!mee(t)||!mee(n))return null;const r=t.internals.handleBounds||gee(t.handles),i=n.internals.handleBounds||gee(n.handles),o=yee((r==null?void 0:r.source)??[],e.sourceHandle),s=yee(e.connectionMode===G0.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!s)return(f=e.onError)==null||f.call(e,"008",Xa.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(o==null?void 0:o.position)||Qe.Bottom,l=(s==null?void 0:s.position)||Qe.Top,c=ah(t,o,a),d=ah(n,s,l);return{sourceX:c.x,sourceY:c.y,targetX:d.x,targetY:d.y,sourcePosition:a,targetPosition:l}}function gee(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function ah(e,t,n=Qe.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:a}=t??Pc(e);if(r)return{x:i+s/2,y:o+a/2};switch((t==null?void 0:t.position)??n){case Qe.Top:return{x:i+s/2,y:o};case Qe.Right:return{x:i+s,y:o+a/2};case Qe.Bottom:return{x:i+s/2,y:o+a};case Qe.Left:return{x:i,y:o+a/2}}}function yee(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function hO(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function E3t(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((s,a)=>([a.markerStart||r,a.markerEnd||i].forEach(l=>{if(l&&typeof l=="object"){const c=hO(l,t);o.has(c)||(s.push({id:c,color:l.color||n,...l}),o.add(c))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const Lye=1e3,k3t=10,hL={nodeOrigin:[0,0],nodeExtent:hv,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},_3t={...hL,checkEquality:!0};function pL(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function A3t(e,t,n){const r=pL(hL,n);for(const i of e.values())if(i.parentId)gL(i,e,t,r);else{const o=bb(i,r.nodeOrigin),s=X0(i.extent)?i.extent:r.nodeExtent,a=sh(o,s,Pc(i));i.internals.positionAbsolute=a}}function N3t(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const o={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(o):i.type==="target"&&r.push(o)}return{source:n,target:r}}function mL(e){return e==="manual"}function pO(e,t,n,r={}){var d,f;const i=pL(_3t,r),o={i:0},s=new Map(t),a=i!=null&&i.elevateNodesOnSelect&&!mL(i.zIndexMode)?Lye:0;let l=e.length>0,c=!1;t.clear(),n.clear();for(const p of e){let m=s.get(p.id);if(i.checkEquality&&p===(m==null?void 0:m.internals.userNode))t.set(p.id,m);else{const y=bb(p,i.nodeOrigin),v=X0(p.extent)?p.extent:i.nodeExtent,b=sh(y,v,Pc(p));m={...i.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:b,handleBounds:N3t(p,m),z:$ye(p,a,i.zIndexMode),userNode:p}},t.set(p.id,m)}(m.measured===void 0||m.measured.width===void 0||m.measured.height===void 0)&&!m.hidden&&(l=!1),p.parentId&&gL(m,t,n,r,o),c||(c=p.selected??!1)}return{nodesInitialized:l,hasSelectedNodes:c}}function j3t(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function gL(e,t,n,r,i){const{elevateNodesOnSelect:o,nodeOrigin:s,nodeExtent:a,zIndexMode:l}=pL(hL,r),c=e.parentId,d=t.get(c);if(!d){console.warn(`Parent node ${c}
675 not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}j3t(e,n),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&l==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*k3t),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);const f=o&&!mL(l)?Lye:0,{x:p,y:m,z:y}=T3t(e,d,s,a,f,l),{positionAbsolute:v}=e.internals,b=p!==v.x||m!==v.y;(b||y!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:p,y:m}:v,z:y}})}function $ye(e,t,n){const r=Ys(e.zIndex)?e.zIndex:0;return mL(n)?r:r+(e.selected?t:0)}function T3t(e,t,n,r,i,o){const{x:s,y:a}=t.internals.positionAbsolute,l=Pc(e),c=bb(e,n),d=X0(e.extent)?sh(c,e.extent,l):c;let f=sh({x:s+d.x,y:a+d.y},r,l);e.extent==="parent"&&(f=kye(f,l,t));const p=$ye(e,i,o),m=t.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function yL(e,t,n,r=[0,0]){var s;const i=[],o=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const c=((s=o.get(a.parentId))==null?void 0:s.expandedRect)??Y0(l),d=Aye(c,a.rect);o.set(a.parentId,{expandedRect:d,parent:l})}return o.size>0&&o.forEach(({expandedRect:a,parent:l},c)=>{var E;const d=l.internals.positionAbsolute,f=Pc(l),p=l.origin??r,m=a.x<d.x?Math.round(Math.abs(d.x-a.x)):0,y=a.y<d.y?Math.round(Math.abs(d.y-a.y)):0,v=Math.max(f.width,Math.round(a.width)),b=Math.max(f.height,Math.round(a.height)),C=(v-f.width)*p[0],S=(b-f.height)*p[1];(m>0||y>0||C||S)&&(i.push({id:c,type:"position",position:{x:l.position.x-m+C,y:l.position.y-y+S}}
675),(E=n.get(c))==null||E.forEach(A=>{e.some(_=>_.id===A.id)||i.push({id:A.id,type:"position",position:{x:A.position.x+m,y:A.position.y+y}})})),(f.width<a.width||f.height<a.height||m||y)&&i.push({id:c,type:"dimensions",setAttributes:!0,dimensions:{width:v+(m?p[0]*m-C:0),height:b+(y?p[1]*y-S:0)}})}),i}function M3t(e,t,n,r,i,o,s){const a=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const c=[],d=window.getComputedStyle(a),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=[];for(const m of e.values()){const y=t.get(m.id);if(!y)continue;if(y.hidden){t.set(y.id,{...y,internals:{...y.internals,handleBounds:void 0}}),l=!0;continue}const v=fL(m.nodeElement),b=y.measured.width!==v.width||y.measured.height!==v.height;if(!!(v.width&&v.height&&(b||!y.internals.handleBounds||m.force))){const S=m.nodeElement.getBoundingClientRect(),E=X0(y.extent)?y.extent:o;let{positionAbsolute:A}=y.internals;y.parentId&&y.extent==="parent"?A=kye(A,v,t.get(y.parentId)):E&&(A=sh(A,E,v));const _={...y,measured:v,internals:{...y.internals,positionAbsolute:A,handleBounds:{source:dee("source",m.nodeElement,S,f,y.id),target:dee("target",m.nodeElement,S,f,y.id)}}};t.set(y.id,_),y.parentId&&gL(_,t,n,{nodeOrigin:i,zIndexMode:s}),l=!0,b&&(c.push({id:y.id,type:"dimensions",dimensions:v}),y.expandParent&&y.parentId&&p.push({id:y.id,parentId:y.parentId,rect:Y0(_,i)}))}}if(p.length>0){const m=yL(p,t,n,i);c.push(...m)}return{changes:c,updatedInternals:l}}async function O3t({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}function vee(e,t,n,r,i,o){let s=i;const a=r.get(s)||new Map;r.set(s,a.set(n,t)),s=`${i}-${e}`;const l=r.get(s)||new Map;if(r.set(s,l.set(n,t)),o){s=`${i}-${e}-${o}`;const c=r.get(s)||new Map;r.set(s,c.set(n,t))}}function zye(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:s=null,targetHandle:a=null}=r,l={edgeId:r.id,source:i,target:o,sourceHandle:s,targetHandle:a},c=`${i}-${s}--${o}-${a}`,d=`${o}-${a}--${i}-${s}`;vee("source",l,d,e,i,s),vee("target",l,c,e,o,a),t.set(r.id,r)}}function Fye(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Fye(n,t):!1}function bee(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function R3t(e,t,n,r){const i=new Map;for(const[o,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!Fye(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const a=e.get(o);a&&i.set(o,{id:o,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return i}function mN({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,a,l;const i=[];for(const[c,d]of t){const f=(s=n.get(c))==null?void 0:s.internals.userNode;f&&i.push({...f,position:d.position,dragging:r})}if(!e)return[i[0],i];const o=(a=n.get(e))==null?void 0:a.internals.userNode;return[o?{...o,position:((l=t.get(e))==null?void 0:l.position)||o.position,dragging:r}:i[0],i]}function P3t({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const o={x:n-i.distance.x,y:r-i.distance.y},s=wb(o,t);return{x:s.x-o.x,y:s.y-o.y}}function D3t({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},s=0,a=new Map,l=!1,c={x:0,y:0},d=null,f=!1,p=null,m=!1,y=!1,v=null;function b({noDragClassName:S,handleSelector:E,domNode:A,isSelectable:_,nodeId:N,nodeClickDistance:j=0}){p=ko(A);function T({x:I,y:F}
675){const{nodeLookup:$,nodeExtent:H,snapGrid:L,snapToGrid:B,nodeOrigin:z,onNodeDrag:V,onSelectionDrag:U,onError:W,updateNodePositions:G}=t();o={x:I,y:F};let Y=!1;const X=a.size>1,Q=X&&H?dO(xb(a)):null,ne=X&&B?P3t({dragItems:a,snapGrid:L,x:I,y:F}):null;for(const[ie,se]of a){if(!$.has(ie))continue;let oe={x:I-se.distance.x,y:F-se.distance.y};B&&(oe=ne?{x:Math.round(oe.x+ne.x),y:Math.round(oe.y+ne.y)}:wb(oe,L));let J=null;if(X&&H&&!se.extent&&Q){const{positionAbsolute:pe}=se.internals,be=pe.x-Q.x+H[0][0],xe=pe.x+se.measured.width-Q.x2+H[1][0],ke=pe.y-Q.y+H[0][1],Pe=pe.y+se.measured.height-Q.y2+H[1][1];J=[[be,ke],[xe,Pe]]}const{position:ae,positionAbsolute:re}=Eye({nodeId:ie,nextPosition:oe,nodeLookup:$,nodeExtent:J||H,nodeOrigin:z,onError:W});Y=Y||se.position.x!==ae.x||se.position.y!==ae.y,se.position=ae,se.internals.positionAbsolute=re}if(y=y||Y,!!Y&&(G(a,!0),v&&(r||V||!N&&U))){const[ie,se]=mN({nodeId:N,dragItems:a,nodeLookup:$});r==null||r(v,a,ie,se),V==null||V(v,ie,se),N||U==null||U(v,se)}}async function O(){if(!d)return;const{transform:I,panBy:F,autoPanSpeed:$,autoPanOnNodeDrag:H}=t();if(!H){l=!1,cancelAnimationFrame(s);return}const[L,B]=_ye(c,d,$);(L!==0||B!==0)&&(o.x=(o.x??0)-L/I[2],o.y=(o.y??0)-B/I[2],await F({x:L,y:B})&&T(o)),s=requestAnimationFrame(O)}function D(I){var X;const{nodeLookup:F,multiSelectionActive:$,nodesDraggable:H,transform:L,snapGrid:B,snapToGrid:z,selectNodesOnDrag:V,onNodeDragStart:U,onSelectionDragStart:W,unselectNodesAndEdges:G}=t();f=!0,(!V||!_)&&!$&&N&&((X=F.get(N))!=null&&X.selected||G()),_&&V&&N&&(e==null||e(N));const Y=B1(I.sourceEvent,{transform:L,snapGrid:B,snapToGrid:z,containerBounds:d});if(o=Y,a=R3t(F,H,Y,N),a.size>0&&(n||U||!N&&W)){const[Q,ne]=mN({nodeId:N,dragItems:a,nodeLookup:F});n==null||n(I.sourceEvent,a,Q,ne),U==null||U(I.sourceEvent,Q,ne),N||W==null||W(I.sourceEvent,ne)}}const R=cye().clickDistance(j).on("start",I=>{const{domNode:F,nodeDragThreshold:$,transform:H,snapGrid:L,snapToGri
675d:B}=t();d=(F==null?void 0:F.getBoundingClientRect())||null,m=!1,y=!1,v=I.sourceEvent,$===0&&D(I),o=B1(I.sourceEvent,{transform:H,snapGrid:L,snapToGrid:B,containerBounds:d}),c=Xs(I.sourceEvent,d)}).on("drag",I=>{const{autoPanOnNodeDrag:F,transform:$,snapGrid:H,snapToGrid:L,nodeDragThreshold:B,nodeLookup:z}=t(),V=B1(I.sourceEvent,{transform:$,snapGrid:H,snapToGrid:L,containerBounds:d});if(v=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||N&&!z.has(N))&&(m=!0),!m){if(!l&&F&&f&&(l=!0,O()),!f){const U=Xs(I.sourceEvent,d),W=U.x-c.x,G=U.y-c.y;Math.sqrt(W*W+G*G)>B&&D(I)}(o.x!==V.xSnapped||o.y!==V.ySnapped)&&a&&f&&(c=Xs(I.sourceEvent,d),T(V))}}).on("end",I=>{if(!(!f||m)&&(l=!1,f=!1,cancelAnimationFrame(s),a.size>0)){const{nodeLookup:F,updateNodePositions:$,onNodeDragStop:H,onSelectionDragStop:L}=t();if(y&&($(a,!1),y=!1),i||H||!N&&L){const[B,z]=mN({nodeId:N,dragItems:a,nodeLookup:F,dragging:!1});i==null||i(I.sourceEvent,a,B,z),H==null||H(I.sourceEvent,B,z),N||L==null||L(I.sourceEvent,z)}}}).filter(I=>{const F=I.target;return!I.button&&(!S||!bee(F,`.${S}`,A))&&(!E||bee(F,E,A))});p.call(R)}function C(){p==null||p.on(".drag",null)}return{update:b,destroy:C}}function I3t(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())mv(i,Y0(o))>0&&r.push(o);return r}const L3t=250;function $3t(e,t,n,r){var a,l;let i=[],o=1/0;const s=I3t(e,n,t+L3t);for(const c of s){const d=[...((a=c.internals.handleBounds)==null?void 0:a.source)??[],...((l=c.internals.handleBounds)==null?void 0:l.target)??[]];for(const f of d){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=ah(c,f,f.position,!0),y=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(m-e.y,2));y>t||(y<o?(i=[{...f,x:p,y:m}],o=y):y===o&&i.push({...f,x:p,y:m}))}}if(!i.length)return null;if(i.length>1){const c=r.type==="source"?"target":"source";return i.find(d=>d.type===c)??i[0]}return i[0]}function Bye(e,t,n,r,i,o=!1){var c,d,f;const s=r.get(e);if(!s)return null;const a=i==="strict"?(c=s.internals.handleBounds)==null?void 0:c[t]:[...((d=s.internals.handleBounds)==null?void 0:d.source)??[],...((f=s.internals.handleBounds)==null?void 0:f.target)??[]],l=(n?a==null?void 0:a.find(p=>p.id===n):a==null?void 0:a[0])??null;return l&&o?{...l,...ah(s,l,l.position,!0)}:l}function Hye(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function z3t(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Vye=()=>!0;function F3t(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:s,domNode:a,nodeLookup:l,lib:c,autoPanOnConnect:d,flowId:f,panBy:p,cancelConnection:m,onConnectStart:y,onConnect:v,onConnectEnd:b,isValidConnection:C=Vye,onReconnectEnd:S,updateConnection:E,getTransform:A,getFromHandle:_,autoPanSpeed:N,dragThreshold:j=1,handleDomNode:T}){const O=Tye(e.target);let D=0,R;const{x:I,y:F}=Xs(e),$=Hye(o,T),H=a==null?void 0:a.getBoundingClientRect();let L=!1;if(!H||!$)return;const B=Bye(i,$,r,l,t);if(!B)return;let z=Xs(e,H),V=!1,U=null,W=!1,G=null;function Y(){if(!d||!H)return;const[ae,re]=_ye(z,H,N);p({x:ae,y:re}),D=requestAnimationFrame(Y)}const X={...B,nodeId:i,type:$,position:B.position},Q=l.get(i);let ie={inProgress:!0,isValid:null,from:ah(Q,X,Qe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:Q,to:z,toHandle:null,toPosition:aee[X.position],toNode:null,pointer:z};function se(){L=!0,E(ie),y==null||y(e,{nodeId:i,handleId:r,handleType:$})}j===0&&se();function oe(ae){if(!L){const{x:Pe,y:it}=Xs(ae),qe=Pe-I,$n=it-F;if(!(qe*qe+$n*$n>j*j))return;se()}if(!_()||!X){J(ae);return}const re=A();z=Xs(ae,H),R=$3t(Cb(z,re,!1,[1,1]),n,l,X),V||(Y(),V=!0);const pe=Uye(ae,{handle:R,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:s?"target":"source",isValidConnection:C,doc:O,lib:c,flowId:f,nodeLookup:l});G=pe.handleDomNode,U=pe.connection,W=z3t(!!R,pe.isValid);const be=l.get(i),xe=be?ah(be,X,Qe.Left,!0):ie.from,ke={...ie,from:xe,isValid:W,to:pe.toHandle&&W?m5({x:pe.toHandle.x,y:pe.toHandle.y},re):z,toHandle:pe.toHandle,toPosition:W&&pe.toHandle?pe.toHandle.position:aee[X.position],toNode:pe.toHandle?l.get(pe.toHandle.nodeId):null,pointer:z};E(ke),ie=ke}function J(ae){if(!("touches"in ae&&ae.touches.length>0)){if(L){(R||G)&&U&&W&&(v==null||v(U));const{inProgress:re,...pe}=ie,be={...pe,toPosition:ie.toHandle?ie.toPosition:null};b==null||b(ae,be),o&&(S==null||S(ae,be))}m(),cancelAnimationFrame(D),V=!1,W=!1,U=null,G=null,O.removeEventListener("mousemove",oe),O.removeEventListener("mouseup",J),O.removeEventListener("touchmove",oe),O.removeEventListener("touchend",J)}}O.addEventListener("mousemove",oe),O.addEventListener("mouseup",J),O.addEventListener("touchmove",oe),O.addEventListener("touchend",J)}function Uye(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:s,lib:a,flowId:l,isValidConnection:c=Vye,nodeLookup:d}){const f=o==="target",p=t?s.querySelector(`.${a}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:m,y}=Xs(e),v=s.elementFromPoint(m,y),b=v!=null&&v.classList.contains(`${a}
675-flow__handle`)?v:p,C={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const S=Hye(void 0,b),E=b.getAttribute("data-nodeid"),A=b.getAttribute("data-handleid"),_=b.classList.contains("connectable"),N=b.classList.contains("connectableend");if(!E||!S)return C;const j={source:f?E:r,sourceHandle:f?A:i,target:f?r:E,targetHandle:f?i:A};C.connection=j;const O=_&&N&&(n===G0.Strict?f&&S==="source"||!f&&S==="target":E!==r||A!==i);C.isValid=O&&c(j),C.toHandle=Bye(E,S,A,d,n,!0)}return C}const mO={onPointerDown:F3t,isValid:Uye};function B3t({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=ko(e);function o({translateExtent:a,width:l,height:c,zoomStep:d=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const y=E=>{if(E.sourceEvent.type!=="wheel"||!t)return;const A=n(),_=E.sourceEvent.ctrlKey&&gv()?10:1,N=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*d,j=A[2]*Math.pow(2,N*_);t.scaleTo(j)};let v=[0,0];const b=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(v=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},C=E=>{const A=n();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!t)return;const _=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],N=[_[0]-v[0],_[1]-v[1]];v=_;const j=r()*Math.max(A[2],Math.log(A[2]))*(m?-1:1),T={x:A[0]-N[0]*j,y:A[1]-N[1]*j},O=[[0,0],[l,c]];t.setViewportConstrained({x:T.x,y:T.y,zoom:A[2]},O,a)},S=vye().on("start",b).on("zoom",f?C:null).on("zoom.wheel",p?y:null);i.call(S,{})}function s(){i.on("zoom",null)}return{update:o,destroy:s,pointer:Rs}}const IS=e=>({x:e.x,y:e.y,zoom:e.k}),gN=({x:e,y:t,zoom:n})=>RS.translate(e,t).scale(n),Lp=(e,t)=>e.target.closest(`.${t}`),qye=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),H3t=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,yN=(e,t=0,n=H3t,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},Wye=e=>{const t=e.ctrlKey&&gv()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function V3t({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:c}){return d=>{if(Lp(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const f=n.property("__zoom").k||1;if(d.ctrlKey&&s){const b=Rs(d),C=Wye(d),S=f*Math.pow(2,C);r.scaleTo(n,S,b,d);return}const p=d.deltaMode===1?20:1;let m=i===$f.Vertical?0:d.deltaX*p,y=i===$f.Horizontal?0:d.deltaY*p;!gv()&&d.shiftKey&&i!==$f.Vertical&&(m=d.deltaY*p,y=0),r.translateBy(n,-(m/f)*o,-(y/f)*o,{internal:!0});const v=IS(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(d,v),e.panScrollTimeout=setTimeout(()=>{c==null||c(d,v),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a==null||a(d,v))}}function U3t({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",s=!t&&o&&!r.ctrlKey,a=Lp(r,e);if(r.ctrlKey&&o&&a&&r.preventDefault(),s||a)return null;r.preventDefault(),n.call(this,r,i)}}function q3t({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,s,a;if((o=r.sourceEvent)!=null&&o.internal)return;const i=IS(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function W3t({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var s,a;e.usedRightMouseButton=!!(n&&qye(t,e.mouseButton??0)),(s=o.sourceEvent)!=null&&s.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((a=o.sourceEvent)!=null&&a.internal)&&(i==null||i(o.sourceEvent,IS(o.transform)))}}function G3t({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return s=>{var a;if(!((a=s.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,o&&qye(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&o(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const l=IS(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(s.sourceEvent,l)},n?150:0)}}}function K3t({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:a,noPanClassName:l,lib:c,connectionInProgress:d}){return f=>{var b;const p=e||t,m=n&&f.ctrlKey,y=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Lp(f,`${c}-flow__node`)||Lp(f,`${c}-flow__edge`)))return!0;
675if(!r&&!p&&!i&&!o&&!n||s||d&&!y||Lp(f,a)&&y||Lp(f,l)&&(!y||i&&y&&!e)||!n&&f.ctrlKey&&y)return!1;if(!n&&f.type==="touchstart"&&((b=f.touches)==null?void 0:b.length)>1)return f.preventDefault(),!1;if(!p&&!i&&!m&&y||!r&&(f.type==="mousedown"||f.type==="touchstart")||Array.isArray(r)&&!r.includes(f.button)&&f.type==="mousedown")return!1;const v=Array.isArray(r)&&r.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||y)&&v}}function Y3t({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:s,onPanZoomEnd:a,onDraggingChange:l}){const c={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),f=vye().scaleExtent([t,n]).translateExtent(r),p=ko(e).call(f);S({x:i.x,y:i.y,zoom:K0(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);const m=p.on("wheel.zoom"),y=p.on("dblclick.zoom");f.wheelDelta(Wye);function v(R,I){return p?new Promise(F=>{f==null||f.interpolate((I==null?void 0:I.interpolate)==="linear"?ic:lw).transform(yN(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function b({noWheelClassName:R,noPanClassName:I,onPaneContextMenu:F,userSelectionActive:$,panOnScroll:H,panOnDrag:L,panOnScrollMode:B,panOnScrollSpeed:z,preventScrolling:V,zoomOnPinch:U,zoomOnScroll:W,zoomOnDoubleClick:G,zoomActivationKeyPressed:Y,lib:X,onTransformChange:Q,connectionInProgress:ne,paneClickDistance:ie,selectionOnDrag:se}){$&&!c.isZoomingOrPanning&&C();const oe=H&&!Y&&!$;f.clickDistance(se?1/0:!Ys(ie)||ie<0?0:ie);const J=oe?V3t({zoomPanValues:c,noWheelClassName:R,d3Selection:p,d3Zoom:f,panOnScrollMode:B,panOnScrollSpeed:z,zoomOnPinch:U,onPanZoomStart:s,onPanZoom:o,onPanZoomEnd:a}):U3t({noWheelClassName:R,preventScrolling:V,d3ZoomHandler:m});if(p.on("wheel.zoom",J,{passive:!1}),!$){const re=q3t({zoomPanValues:c,onDraggingChange:l,onPanZoomStart:s});f.on("start",re);const pe=W3t({zoomPanValues:c,panOnDrag:L,onPaneContextMenu:!!F,onPanZoom:o,onTransformChange:Q});f.on("zoom",pe);const be=G3t({zoomPanValues:c,panOnDrag:L,panOnScroll:H,onPaneContextMenu:F,onPanZoomEnd:a,onDraggingChange:l});f.on("end",be)}const ae=K3t({zoomActivationKeyPressed:Y,panOnDrag:L,zoomOnScroll:W,panOnScroll:H,zoomOnDoubleClick:G,zoomOnPinch:U,userSelectionActive:$,noPanClassName:I,noWheelClassName:R,lib:X,connectionInProgress:ne});f.filter(ae),G?p.on("dblclick.zoom",y):p.on("dblclick.zoom",null)}function C(){f.on("zoom",null)}async function S(R,I,F){const $=gN(R),H=f==null?void 0:f.constrain()($,I,F);return H&&await v(H),new Promise(L=>L(H))}async function E(R,I){const F=gN(R);return await v(F,I),new Promise($=>$(F))}function A(R){if(p){const I=gN(R),F=p.property("__zoom");(F.k!==R.zoom||F.x!==R.x||F.y!==R.y)&&(f==null||f.transform(p,I,null,{sync:!0}))}}function _(){const R=p?yye(p.node()):{x:0,y:0,k:1};return{x:R.x,y:R.y,zoom:R.k}}function N(R,I){return p?new Promise(F=>{f==null||f.interpolate((I==null?void 0:I.interpolate)==="linear"?ic:lw).scaleTo(yN(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function j(R,I){return p?new Promise(F=>{f==null||f.interpolate((I==null?void 0:I.interpolate)==="linear"?ic:lw).scaleBy(yN(p,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function T(R){f==null||f.scaleExtent(R)}function O(R){f==null||f.translateExtent(R)}function D(R){const I=!Ys(R)||R<0?0:R;f==null||f.clickDistance(I)}return{update:b,destroy:C,setViewport:E,setViewportConstrained:S,getViewport:_,scaleTo:N,scaleBy:j,setScaleExtent:T,setTranslateExtent:O,syncViewport:A,setClickDistance:D}}var Z0;(function(e){e.Line="line",e.Handle="handle"})(Z0||(Z0={}));function X3t({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const s=e-t,a=n-r,l=[s>0?1:s<0?-1:0,a>0?1:a<0?-1:0];return s&&i&&(l[0]=l[0]*-1),a&&o&&(l[1]=l[1]*-1),l}function xee(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function au(e,t){return Math.max(0,t-e)}function lu(e,t){return Math.max(0,e-t)}function Q2(e,t,n){return Math.max(0,t-e,e-n)}function wee(e,t){return e?!t:t}function Z3t(e,t,n,r,i,o,s,a){let{affectsX:l,affectsY:c}=t;const{isHorizontal:d,isVertical:f}=t,p=d&&f,{xSnapped:m,ySnapped:y}=n,{minWidth:v,maxWidth:b,minHeight:C,maxHeight:S}
675=r,{x:E,y:A,width:_,height:N,aspectRatio:j}=e;let T=Math.floor(d?m-e.pointerX:0),O=Math.floor(f?y-e.pointerY:0);const D=_+(l?-T:T),R=N+(c?-O:O),I=-o[0]*_,F=-o[1]*N;let $=Q2(D,v,b),H=Q2(R,C,S);if(s){let z=0,V=0;l&&T<0?z=au(E+T+I,s[0][0]):!l&&T>0&&(z=lu(E+D+I,s[1][0])),c&&O<0?V=au(A+O+F,s[0][1]):!c&&O>0&&(V=lu(A+R+F,s[1][1])),$=Math.max($,z),H=Math.max(H,V)}if(a){let z=0,V=0;l&&T>0?z=lu(E+T,a[0][0]):!l&&T<0&&(z=au(E+D,a[1][0])),c&&O>0?V=lu(A+O,a[0][1]):!c&&O<0&&(V=au(A+R,a[1][1])),$=Math.max($,z),H=Math.max(H,V)}if(i){if(d){const z=Q2(D/j,C,S)*j;if($=Math.max($,z),s){let V=0;!l&&!c||l&&!c&&p?V=lu(A+F+D/j,s[1][1])*j:V=au(A+F+(l?T:-T)/j,s[0][1])*j,$=Math.max($,V)}if(a){let V=0;!l&&!c||l&&!c&&p?V=au(A+D/j,a[1][1])*j:V=lu(A+(l?T:-T)/j,a[0][1])*j,$=Math.max($,V)}}if(f){const z=Q2(R*j,v,b)/j;if(H=Math.max(H,z),s){let V=0;!l&&!c||c&&!l&&p?V=lu(E+R*j+I,s[1][0])/j:V=au(E+(c?O:-O)*j+I,s[0][0])/j,H=Math.max(H,V)}if(a){let V=0;!l&&!c||c&&!l&&p?V=au(E+R*j,a[1][0])/j:V=lu(E+(c?O:-O)*j,a[0][0])/j,H=Math.max(H,V)}}}O=O+(O<0?H:-H),T=T+(T<0?$:-$),i&&(p?D>R*j?O=(wee(l,c)?-T:T)/j:T=(wee(l,c)?-O:O)*j:d?(O=T/j,c=l):(T=O*j,l=c));const L=l?E+T:E,B=c?A+O:A;return{width:_+(l?-T:T),height:N+(c?-O:O),x:o[0]*T*(l?-1:1)+L,y:o[1]*O*(c?-1:1)+B}}const Gye={width:0,height:0,x:0,y:0},Q3t={...Gye,pointerX:0,pointerY:0,aspectRatio:1};function J3t(e){return[[0,0],[e.measured.width,e.measured.height]]}function e4t(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,s=e.measured.height??0,a=n[0]*o,l=n[1]*s;return[[r-a,i-l],[r+o-a,i+s-l]]}function t4t({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=ko(e);let s={controlDirection:xee("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:c,boundaries:d,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:y,onResizeEnd:v,shouldResize:b}){let C={...Gye},S={...Q3t};s={boundaries:d,resizeDirection:p,keepAspectRatio:f,controlDirection:xee(c)};let E,A=null,_=[],N,j,T,O=!1;const D=cye().on("start",R=>{const{nodeLookup:I,transform:F,snapGrid:$,snapToGrid:H,nodeOrigin:L,paneDomNode:B}=n();if(E=I.get(t),!E)return;A=(B==null?void 0:B.getBoundingClientRect())??null;const{xSnapped:z,ySnapped:V}=B1(R.sourceEvent,{transform:F,snapGrid:$,snapToGrid:H,containerBounds:A});C={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},S={...C,pointerX:z,pointerY:V,aspectRatio:C.width/C.height},N=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(N=I.get(E.parentId),j=N&&E.extent==="parent"?J3t(N):void 0),_=[],T=void 0;for(const[U,W]of I)if(W.parentId===t&&(_.push({id:U,position:{...W.position},extent:W.extent}),W.extent==="parent"||W.expandParent)){const G=e4t(W,E,W.origin??L);T?T=[[Math.min(G[0][0],T[0][0]),Math.min(G[0][1],T[0][1])],[Math.max(G[1][0],T[1][0]),Math.max(G[1][1],T[1][1])]]:T=G}m==null||m(R,{...C})}).on("drag",R=>{const{transform:I,snapGrid:F,snapToGrid:$,nodeOrigin:H}=n(),L=B1(R.sourceEvent,{transform:I,snapGrid:F,snapToGrid:$,containerBounds:A}),B=[];if(!E)return;const{x:z,y:V,width:U,height:W}=C,G={},Y=E.origin??H,{width:X,height:Q,x:ne,y:ie}=Z3t(S,s.controlDirection,L,s.boundaries,s.keepAspectRatio,Y,j,T),se=X!==U,oe=Q!==W,J=ne!==z&&se,ae=ie!==V&&oe;if(!J&&!ae&&!se&&!oe)return;if((J||ae||Y[0]===1||Y[1]===1)&&(G.x=J?ne:C.x,G.y=ae?ie:C.y,C.x=G.x,C.y=G.y,_.length>0)){const xe=ne-z,ke=ie-V;for(const Pe of _)Pe.position={x:Pe.position.x-xe+Y[0]*(X-U),y:Pe.position.y-ke+Y[1]*(Q-W)},B.push(Pe)}if((se||oe)&&(G.width=se&&(!s.resizeDirection||s.resizeDirection==="horizontal")?X:C.width,G.height=oe&&(!s.resizeDirection||s.resizeDirection==="vertical")?Q:C.height,C.width=G.width,C.height=G.height),N&&E.expandParent){const xe=Y[0]*(G.width??0);G.x&&G.x<xe&&(C.x=xe,S.x=S.x-(G.x-xe));const ke=Y[1]*(G.height??0);G.y&&G.y<ke&&(C.y=ke,S.y=S.y-(G.y-ke))}const re=X3t({width:C.width,prevWidth:U,height:C.height,prevHeight:W,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),pe={...C,direction:re};(b==null?void 0:b(R,pe))!==!1&&(O=!0,y==null||y(R,pe),r(G,B))}).on("end",R=>
vendor: 2,082 bytes, lines 675-691
675{O&&(v==null||v(R,{...C}),i==null||i({...C}),O=!1)});o.call(D)}function l(){o.on(".drag",null)}return{update:a,destroy:l}}var vN={exports:{}},bN={},xN={exports:{}},wN={};/** 676 * @license React 677 * use-sync-external-store-shim.production.js 678 * 679 * Copyright (c) Meta Platforms, Inc. and affiliates. 680 * 681 * This source code is licensed under the MIT license found in the 682 * LICENSE file in the root directory of this source tree. 683 */var Cee;function n4t(){if(Cee)return wN;Cee=1;var e=pd();function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function a(f,p){var m=p(),y=r({inst:{value:m,getSnapshot:p}}),v=y[0].inst,b=y[1];return o(function(){v.value=m,v.getSnapshot=p,l(v)&&b({inst:v})},[f,m,p]),i(function(){return l(v)&&b({inst:v}),f(function(){l(v)&&b({inst:v})})},[f]),s(m),m}function l(f){var p=f.getSnapshot;f=f.value;try{var m=p();return!n(f,m)}catch{return!0}}function c(f,p){return p()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return wN.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,wN}var See;function r4t(){return See||(See=1,xN.exports=n4t()),xN.exports}/** 684 * @license React 685 * use-sync-external-store-shim/with-selector.production.js 686 * 687 * Copyright (c) Meta Platforms, Inc. and affiliates. 688 * 689 * This source code is licensed under the MIT license found in the 690 * LICENSE file in the root directory of this source tree. 691 */var Eee;function i4t(){if(Eee)return bN;Eee=1;var e=pd(),t=r4t();function n(c,d){return c===d&&(c!==0||1/c===1/d)||c!==c&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return bN.useSyncExternalStoreWithSelector=function(c,d,f,p,m){var y=o(null);if(y.current===null){var v={hasValue:!1,value:null};y.current=v}else v=y.current;y=a(function(){function C(N){if(!S){if(S=!0,E=N,N=p(N),m!==void 0&&v.hasValue){var j=v.value;if(m(j,N))return A=j}return A=N}
691if(j=A,r(E,N))return j;var T=p(N);return m!==void 0&&m(j,T)?(E=N,j):(E=N,A=T)}var S=!1,E,A,_=f===void 0?null:f;return[function(){return C(d())},_===null?void 0:function(){return C(_())}]},[d,f,p,m]);var b=i(c,y[0],y[1]);return s(function(){v.hasValue=!0,v.value=b},[b]),l(b),b},bN}var kee;function o4t(){return kee||(kee=1,vN.exports=i4t()),vN.exports}var s4t=o4t();const a4t=Ht(s4t),l4t={},_ee=e=>{let t;const n=new Set,r=(d,f)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const m=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(y=>y(t,m))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(l4t?"production":void 0)!=="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()}},c=t=e(r,i,l);return l},c4t=e=>e?_ee(e):_ee,{useDebugValue:u4t}=K,{useSyncExternalStoreWithSelector:d4t}=a4t,f4t=e=>e;function Kye(e,t=f4t,n){const r=d4t(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return u4t(r),r}const Aee=(e,t)=>{const n=c4t(e),r=(i,o=t)=>Kye(n,i,o);return Object.assign(r,n),r},h4t=(e,t)=>e?Aee(e,t):Aee;function Dn(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const LS=x.createContext(null),p4t=LS.Provider,Yye=Xa.error001();function zt(e,t){const n=x.useContext(LS);if(n===null)throw new Error(Yye);return Kye(n,e,t)}function Ln(){const e=x.useContext(LS);if(e===null)throw new Error(Yye);return x.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Nee={display:"none"},m4t={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Xye="react-flow__node-desc",Zye="react-flow__edge-desc",g4t="react-flow__aria-live",y4t=e=>e.ariaLiveMessage,v4t=e=>e.ariaLabelConfig;function b4t({rfId:e}){const t=zt(y4t);return u.jsx("div",{id:`${g4t}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:m4t,children:t})}function x4t({rfId:e,disableKeyboardA11y:t}){const n=zt(v4t);return u.jsxs(u.Fragment,{children:[u.jsx("div",{id:`${Xye}-${e}`,style:Nee,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),u.jsx("div",{id:`${Zye}-${e}`,style:Nee,children:n["edge.a11yDescription.default"]}),!t&&u.jsx(b4t,{rfId:e})]})}const $S=x.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const s=`${e}`.split("-");return u.jsx("div",{className:xr(["react-flow__panel",n,...s]),style:r,ref:o,...i,children:t})});$S.displayName="Panel";function w4t({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:u.jsx($S,{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:u.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const C4t=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},J2=e=>e.id;function S4t(e,t){return Dn(e.selectedNodes.map(J2),t.selectedNodes.map(J2))&&Dn(e.selectedEdges.map(J2),t.selectedEdges.map(J2))}function E4t({onSelectionChange:e}){const t=Ln(),{selectedNodes:n,selectedEdges:r}=zt(C4t,S4t);return x.useEffect(()=>{const i={nodes:n,edges:r};
691e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const k4t=e=>!!e.onSelectionChangeHandlers;function _4t({onSelectionChange:e}){const t=zt(k4t);return e||t?u.jsx(E4t,{onSelectionChange:e}):null}const gO=typeof window<"u"?x.useLayoutEffect:x.useEffect,Qye=[0,0],A4t={x:0,y:0,zoom:1},N4t=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],jee=[...N4t,"rfId"],j4t=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),Tee={translateExtent:hv,nodeOrigin:Qye,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function T4t(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:s,reset:a,setDefaultNodesAndEdges:l}=zt(j4t,Dn),c=Ln();gO(()=>(l(e.defaultNodes,e.defaultEdges),()=>{d.current=Tee,a()}),[]);const d=x.useRef(Tee);return gO(()=>{for(const f of jee){const p=e[f],m=d.current[f];p!==m&&(typeof e[f]>"u"||(f==="nodes"?t(p):f==="edges"?n(p):f==="minZoom"?r(p):f==="maxZoom"?i(p):f==="translateExtent"?o(p):f==="nodeExtent"?s(p):f==="ariaLabelConfig"?c.setState({ariaLabelConfig:h3t(p)}):f==="fitView"?c.setState({fitViewQueued:p}):f==="fitViewOptions"?c.setState({fitViewOptions:p}):c.setState({[f]:p})))}d.current=e},jee.map(f=>e[f])),null}function Mee(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function M4t(e){var r;const[t,n]=x.useState(e==="system"?null:e);return x.useEffect(()=>{if(e!=="system"){n(e);return}const i=Mee(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=Mee())!=null&&r.matches?"dark":"light"}const Oee=typeof document<"u"?document:null;function yv(e=null,t={target:Oee,actInsideInputWithModifier:!0}){const[n,r]=x.useState(!1),i=x.useRef(!1),o=x.useRef(new Set([])),[s,a]=x.useMemo(()=>{if(e!==null){const c=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace("+",` 692`).replace(` 693 694`,` 695+`).split(` 696`)),d=c.reduce((f,p)=>f.concat(...p),[]);return[c,d]}return[[],[]]},[e]);return x.useEffect(()=>{const l=(t==null?void 0:t.target)??Oee,c=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=m=>{var b,C;if(i.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!i.current||i.current&&!c)&&Mye(m))return!1;const v=Pee(m.code,a);if(o.current.add(m[v]),Ree(s,o.current,!1)){const S=((C=(b=m.composedPath)==null?void 0:b.call(m))==null?void 0:C[0])||m.target,E=(S==null?void 0:S.nodeName)==="BUTTON"||(S==null?void 0:S.nodeName)==="A";t.preventDefault!==!1&&(i.current||!E)&&m.preventDefault(),r(!0)}},f=m=>{const y=Pee(m.code,a);Ree(s,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(m[y]),m.key==="Meta"&&o.current.clear(),i.current=!1},p=()=>{o.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",d),l==null||l.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{l==null||l.removeEventListener("keydown",d),l==null||l.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),n}function Ree(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function Pee(e,t){return t.includes(e)?"code":"key"}const O4t=()=>{const e=Ln();return x.useMemo(()=>({zoomIn:t=>
696{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,o],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:s,panZoom:a}=e.getState(),l=dL(t,r,i,o,s,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(l,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:s}=e.getState();if(!s)return t;const{x:a,y:l}=s.getBoundingClientRect(),c={x:t.x-a,y:t.y-l}
696,d=n.snapGrid??i,f=n.snapToGrid??o;return Cb(c,r,f,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),s=m5(t,n);return{x:s.x+i,y:s.y+o}}}),[])};function Jye(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const s=r.get(o.id);s?s.push(o):r.set(o.id,[o])}for(const o of t){const s=r.get(o.id);if(!s){n.push(o);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const a={...o};for(const l of s)R4t(l,a);n.push(a)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function R4t(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function eve(e,t){return Jye(e,t)}function tve(e,t){return Jye(e,t)}function mf(e,t){return{id:e,type:"select",selected:t}}function $p(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const s=t.has(i);!(o.selected===void 0&&!s)&&o.selected!==s&&(n&&(o.selected=s),r.push(mf(o.id,s)))}return r}function Dee({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,s]of e.entries()){const a=t.get(s.id),l=((i=a==null?void 0:a.internals)==null?void 0:i.userNode)??a;l!==void 0&&l!==s&&n.push({id:s.id,item:s,type:"replace"}),l===void 0&&n.push({item:s,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function Iee(e){return{id:e.id,type:"remove"}}const Lee=e=>r3t(e),P4t=e=>Sye(e);function nve(e){return x.forwardRef(e)}function $ee(e){const[t,n]=x.useState(BigInt(0)),[r]=x.useState(()=>D4t(()=>n(i=>i+BigInt(1))));return gO(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function D4t(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const rve=x.createContext(null);function I4t({children:e}){const t=Ln(),n=x.useCallback(a=>{const{nodes:l=[],setNodes:c,hasDefaultNodes:d,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:y}=t.getState();let v=l;for(const C of a)v=typeof C=="function"?C(v):C;let b=Dee({items:v,lookup:p});for(const C of y.values())b=C(b);d&&c(v),b.length>0?f==null||f(b):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:S,setNodes:E}=t.getState();C&&E(S)})},[]),r=$ee(n),i=x.useCallback(a=>{const{edges:l=[],setEdges:c,hasDefaultEdges:d,onEdgesChange:f,edgeLookup:p}=t.getState();let m=l;for(const y of a)m=typeof y=="function"?y(m):y;d?c(m):f&&f(Dee({items:m,lookup:p}))},[]),o=$ee(i),s=x.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return u.jsx(rve.Provider,{value:s,children:e})}function L4t(){const e=x.useContext(rve);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const $4t=e=>!!e.panZoom;function vL(){const e=O4t(),t=Ln(),n=L4t(),r=zt($4t),i=x.useMemo(()=>{const o=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},a=f=>{n.edgeQueue.push(f)},l=f=>{var C,S;const{nodeLookup:p,nodeOrigin:m}=t.getState(),y=Lee(f)?f:p.get(f.id),v=y.parentId?jye(y.position,y.measured,y.parentId,p,m):y.position,b={...y,position:v,width:((C=y.measured)==null?void 0:C.width)??y.width,height:((S=y.measured)==null?void 0:S.height)??y.height};return Y0(b)},c=(f,p,m={replace:!1})=>{s(y=>y.map(v=>{if(v.id===f){const b=typeof p=="function"?p(v):p;return m.replace&&Lee(b)?b:{...v,...b}}return v}))},d=(f,p,m={replace:!1})=>{a(y=>y.map(v=>{if(v.id===f){const b=typeof p=="function"?p(v):p;return m.replace&&P4t(b)?b:{...v,...b}}return v}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>{var p;return(p=o(f))==null?void 0:p.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:f=[]}=t.getState();return f.map(p=>({...p}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:a,addNodes:f=>{const p=Array.isArray(f)?f:[f];n.nodeQueue.push(m=>[...m,...p])},addEdges:f=>{const p=Array.isArray(f)?f:[f];n.edgeQueue.push(m=>[...m,...p])},toObject:()=>{const{nodes:f=[],edges:p=[],transform:m}=t.getState(),[y,v,b]=m;return{nodes:f.map(C=>({...C})),edges:p.map(C=>({...C})),viewport:{x:y,y:v,zoom:b}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:y,onNodesDelete:v,onEdgesDelete:b,triggerNodeChanges:C,triggerEdgeChanges:S,onDelete:E,onBeforeDelete:A}=t.getState(),{nodes:_,edges:N}=await l3t({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:y,onBeforeDelete:A}),j=N.length>0,T=_.length>0;if(j){const O=N.map(Iee);b==null||b(N),S(O)}if(T){const O=_.map(Iee);v==null||v(_),C(O)}return(T||j)&&(E==null||E({nodes:_,edges:N})),{deletedNodes:_,deletedEdges:N}},getIntersectingNodes:(f,p=!0,m)=>{const y=cee(f),v=y?f:l(f),b=m!==void 0;return v?(m||t.getState().nodes).filter(C=>
696{const S=t.getState().nodeLookup.get(C.id);if(S&&!y&&(C.id===f.id||!S.internals.positionAbsolute))return!1;const E=Y0(b?C:S),A=mv(E,v);return p&&A>0||A>=E.width*E.height||A>=v.width*v.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const v=cee(f)?f:l(f);if(!v)return!1;const b=mv(v,p);return m&&b>0||b>=p.width*p.height||b>=v.width*v.height},updateNode:c,updateNodeData:(f,p,m={replace:!1})=>{c(f,y=>{const v=typeof p=="function"?p(y):p;return m.replace?{...y,data:v}:{...y,data:{...y.data,...v}}},m)},updateEdge:d,updateEdgeData:(f,p,m={replace:!1})=>{d(f,y=>{const v=typeof p=="function"?p(y):p;return m.replace?{...y,data:v}:{...y,data:{...y.data,...v}}},m)},getNodesBounds:f=>{const{nodeLookup:p,nodeOrigin:m}=t.getState();return i3t(f,{nodeLookup:p,nodeOrigin:m})},getHandleConnections:({type:f,id:p,nodeId:m})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${m}-${f}${p?`-${p}`:""}`))==null?void 0:y.values())??[])},getNodeConnections:({type:f,handleId:p,nodeId:m})=>{var y;return Array.from(((y=t.getState().connectionLookup.get(`${m}${f?p?`-${f}-${p}`:`-${f}`:""}`))==null?void 0:y.values())??[])},fitView:async f=>{const p=t.getState().fitViewResolver??f3t();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:p}),n.nodeQueue.push(m=>[...m]),p.promise}}},[]);return x.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const zee=e=>e.selected,z4t=typeof window<"u"?window:void 0;function F4t({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ln(),{deleteElements:r}=vL(),i=yv(e,{actInsideInputWithModifier:!1}),o=yv(t,{target:z4t});x.useEffect(()=>{if(i){const{edges:s,nodes:a}=n.getState();r({nodes:a.filter(zee),edges:s.filter(zee)}),n.setState({nodesSelectionActive:!1})}},[i]),x.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function B4t(e){const t=Ln();x.useEffect(()=>{const n=()=>{var i,o,s,a;if(!e.current||!(((o=(i=e.current).checkVisibility)==null?void 0:o.call(i))??!0))return!1;const r=fL(e.current);(r.height===0||r.width===0)&&((a=(s=t.getState()).onError)==null||a.call(s,"004",Xa.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const zS={position:"absolute",width:"100%",height:"100%",top:0,left:0},H4t=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function V4t({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=$f.Free,zoomOnDoubleClick:s=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:c,minZoom:d,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:y,noWheelClassName:v,noPanClassName:b,onViewportChange:C,isControlledViewport:S,paneClickDistance:E,selectionOnDrag:A}){const _=Ln(),N=x.useRef(null),{userSelectionActive:j,lib:T,connectionInProgress:O}=zt(H4t,Dn),D=yv(p),R=x.useRef();B4t(N);const I=x.useCallback(F=>{C==null||C({x:F[0],y:F[1],zoom:F[2]}),S||_.setState({transform:F})},[C,S]);return x.useEffect(()=>{if(N.current){R.current=Y3t({domNode:N.current,minZoom:d,maxZoom:f,translateExtent:c,viewport:l,onDraggingChange:L=>_.setState(B=>B.paneDragging===L?B:{paneDragging:L}),onPanZoomStart:(L,B)=>{const{onViewportChangeStart:z,onMoveStart:V}=_.getState();V==null||V(L,B),z==null||z(B)},onPanZoom:(L,B)=>{const{onViewportChange:z,onMove:V}=_.getState();V==null||V(L,B),z==null||z(B)},onPanZoomEnd:(L,B)=>{const{onViewportChangeEnd:z,onMoveEnd:V}=_.getState();V==null||V(L,B),z==null||z(B)}});const{x:F,y:$,zoom:H}=R.current.getViewport();return _.setState({panZoom:R.current,transform:[F,$,H],domNode:N.current.closest(".react-flow")}),()=>{var L;(L=R.current)==null||L.destroy()}}},[]),x.useEffect(()=>{var F;(F=R.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:s,panOnDrag:a,zoomActivationKeyPressed:D,preventScrolling:m,noPanClassName:b,userSelectionActive:j,noWheelClassName:v,lib:T,onTransformChange:I,connectionInProgress:O,selectionOnDrag:A,paneClickDistance:E})},[e,t,n,r,i,o,s,a,D,m,b,j,v,T,I,O,A,E]),u.jsx("div",{className:"react-flow__renderer",ref:N,style:zS,children:y})}const U4t=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function q4t(){const{userSelectionActive:e,userSelectionRect:t}=zt(U4t,Dn);return e&&t?u.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const CN=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},W4t=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});
696function G4t({isSelecting:e,selectionKeyPressed:t,selectionMode:n=pv.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:o,onSelectionStart:s,onSelectionEnd:a,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:d,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:y}){const v=Ln(),{userSelectionActive:b,elementsSelectable:C,dragging:S,connectionInProgress:E}=zt(W4t,Dn),A=C&&(e||b),_=x.useRef(null),N=x.useRef(),j=x.useRef(new Set),T=x.useRef(new Set),O=x.useRef(!1),D=z=>{if(O.current||E){O.current=!1;return}l==null||l(z),v.getState().resetSelectedElements(),v.setState({nodesSelectionActive:!1})},R=z=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){z.preventDefault();return}c==null||c(z)},I=d?z=>d(z):void 0,F=z=>{O.current&&(z.stopPropagation(),O.current=!1)},$=z=>{var Q,ne;const{domNode:V}=v.getState();if(N.current=V==null?void 0:V.getBoundingClientRect(),!N.current)return;const U=z.target===_.current;if(!U&&!!z.target.closest(".nokey")||!e||!(o&&U||t)||z.button!==0||!z.isPrimary)return;(ne=(Q=z.target)==null?void 0:Q.setPointerCapture)==null||ne.call(Q,z.pointerId),O.current=!1;const{x:Y,y:X}=Xs(z.nativeEvent,N.current);v.setState({userSelectionRect:{width:0,height:0,startX:Y,startY:X,x:Y,y:X}}),U||(z.stopPropagation(),z.preventDefault())},H=z=>{const{userSelectionRect:V,transform:U,nodeLookup:W,edgeLookup:G,connectionLookup:Y,triggerNodeChanges:X,triggerEdgeChanges:Q,defaultEdgeOptions:ne,resetSelectedElements:ie}=v.getState();if(!N.current||!V)return;const{x:se,y:oe}=Xs(z.nativeEvent,N.current),{startX:J,startY:ae}=V;if(!O.current){const ke=t?0:i;if(Math.hypot(se-J,oe-ae)<=ke)return;ie(),s==null||s(z)}O.current=!0;const re={startX:J,startY:ae,x:se<J?se:J,y:oe<ae?oe:ae,width:Math.abs(se-J),height:Math.abs(oe-ae)},pe=j.current,be=T.current;j.current=new Set(uL(W,re,U,n===pv.Partial,!0).map(ke=>ke.id)),T.current=new Set;const xe=(ne==null?void 0:ne.selectable)??!0;for(const ke of j.current){const Pe=Y.get(ke);if(Pe)for(const{edgeId:it}of Pe.values()){const qe=G.get(it);qe&&(qe.selectable??xe)&&T.current.add(it)}}if(!uee(pe,j.current)){const ke=$p(W,j.current,!0);X(ke)}if(!uee(be,T.current)){const ke=$p(G,T.current);Q(ke)}v.setState({userSelectionRect:re,userSelectionActive:!0,nodesSelectionActive:!1})},L=z=>{var V,U;z.button===0&&((U=(V=z.target)==null?void 0:V.releasePointerCapture)==null||U.call(V,z.pointerId),!b&&z.target===_.current&&v.getState().userSelectionRect&&(D==null||D(z)),v.setState({userSelectionActive:!1,userSelectionRect:null}),O.current&&(a==null||a(z),v.setState({nodesSelectionActive:j.current.size>0})))},B=r===!0||Array.isArray(r)&&r.includes(0);return u.jsxs("div",{className:xr(["react-flow__pane",{draggable:B,dragging:S,selection:e}]),onClick:A?void 0:CN(D,_),onContextMenu:CN(R,_),onWheel:CN(I,_),onPointerEnter:A?void 0:f,onPointerMove:A?H:p,onPointerUp:A?L:void 0,onPointerDownCapture:A?$:void 0,onClickCapture:A?F:void 0,onPointerLeave:m,ref:_,style:zS,children:[y,u.jsx(q4t,{})]})}function yO({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:s,nodeLookup:a,onError:l}=t.getState(),c=a.get(e);if(!c){l==null||l("012",Xa.error012(e));return}t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&s)&&(o({nodes:[c],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):i([e])}function ive({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:s}){const a=Ln(),[l,c]=x.useState(!1),d=x.useRef();return x.useEffect(()=>{d.current=D3t({getStoreItems:()=>a.getState(),onNodeMouseDown:f=>{yO({id:f,store:a,nodeRef:e})},onDragStart:()=>{c(!0)},onDragStop:()=>{c(!1)}})},[]),x.useEffect(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:s}),()=>{var f;(f=d.current)==null||f.destroy()}},[n,r,t,o,e,i,s]),l}const K4t=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function ove(){const e=Ln();return x.useCallback(n=>
696{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:s,onError:a,updateNodePositions:l,nodeLookup:c,nodeOrigin:d}=e.getState(),f=new Map,p=K4t(s),m=i?o[0]:5,y=i?o[1]:5,v=n.direction.x*m*n.factor,b=n.direction.y*y*n.factor;for(const[,C]of c){if(!p(C))continue;let S={x:C.internals.positionAbsolute.x+v,y:C.internals.positionAbsolute.y+b};i&&(S=wb(S,o));const{position:E,positionAbsolute:A}=Eye({nodeId:C.id,nextPosition:S,nodeLookup:c,nodeExtent:r,nodeOrigin:d,onError:a});C.position=E,C.internals.positionAbsolute=A,f.set(C.id,C)}l(f)},[])}const bL=x.createContext(null),Y4t=bL.Provider;bL.Consumer;const sve=()=>x.useContext(bL),X4t=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Z4t=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:s}=r,{fromHandle:a,toHandle:l,isValid:c}=s,d=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:d,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===G0.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!i,valid:d&&c}};function Q4t({type:e="source",position:t=Qe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:s,onConnect:a,children:l,className:c,onMouseDown:d,onTouchStart:f,...p},m){var H,L;const y=s||null,v=e==="target",b=Ln(),C=sve(),{connectOnClick:S,noPanClassName:E,rfId:A}=zt(X4t,Dn),{connectingFrom:_,connectingTo:N,clickConnecting:j,isPossibleEndHandle:T,connectionInProcess:O,clickConnectionInProcess:D,valid:R}=zt(Z4t(C,y,e),Dn);C||(L=(H=b.getState()).onError)==null||L.call(H,"010",Xa.error010());const I=B=>{const{defaultEdgeOptions:z,onConnect:V,hasDefaultEdges:U}=b.getState(),W={...z,...B};if(U){const{edges:G,setEdges:Y}=b.getState();Y(b3t(W,G))}V==null||V(W),a==null||a(W)},F=B=>{if(!C)return;const z=Oye(B.nativeEvent);if(i&&(z&&B.button===0||!z)){const V=b.getState();mO.onPointerDown(B.nativeEvent,{handleDomNode:B.currentTarget,autoPanOnConnect:V.autoPanOnConnect,connectionMode:V.connectionMode,connectionRadius:V.connectionRadius,domNode:V.domNode,nodeLookup:V.nodeLookup,lib:V.lib,isTarget:v,handleId:y,nodeId:C,flowId:V.rfId,panBy:V.panBy,cancelConnection:V.cancelConnection,onConnectStart:V.onConnectStart,onConnectEnd:(...U)=>{var W,G;return(G=(W=b.getState()).onConnectEnd)==null?void 0:G.call(W,...U)},updateConnection:V.updateConnection,onConnect:I,isValidConnection:n||((...U)=>{var W,G;return((G=(W=b.getState()).isValidConnection)==null?void 0:G.call(W,...U))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:V.autoPanSpeed,dragThreshold:V.connectionDragThreshold})}z?d==null||d(B):f==null||f(B)},$=B=>{const{onClickConnectStart:z,onClickConnectEnd:V,connectionClickStartHandle:U,connectionMode:W,isValidConnection:G,lib:Y,rfId:X,nodeLookup:Q,connection:ne}=b.getState();if(!C||!U&&!i)return;if(!U){z==null||z(B.nativeEvent,{nodeId:C,handleId:y,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:C,type:e,id:y}});return}const ie=Tye(B.target),se=n||G,{connection:oe,isValid:J}=mO.isValid(B.nativeEvent,{handle:{nodeId:C,id:y,type:e},connectionMode:W,fromNodeId:U.nodeId,fromHandleId:U.id||null,fromType:U.type,isValidConnection:se,flowId:X,doc:ie,lib:Y,nodeLookup:Q});J&&oe&&I(oe);const ae=structuredClone(ne);delete ae.inProgress,ae.toPosition=ae.toHandle?ae.toHandle.position:null,V==null||V(B,ae),b.setState({connectionClickStartHandle:null})};return u.jsx("div",{"data-handleid":y,"data-nodeid":C,"data-handlepos":t,"data-id":`${A}-${C}-${y}-${e}`,className:xr(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",E,c,{source:!v,target:v,connectable:r,connectablestart:i,connectableend:o,clickconnecting:j,connectingfrom:_,connectingto:N,valid:R,connectionindicator:r&&(!O||T)&&(O||D?o:i)}]),onMouseDown:F,onTouchStart:F,onClick:S?$:void 0,ref:m,...p,children:l})}const Q0=x.memo(nve(Q4t));function J4t({data:e,isConnectable:t,sourcePosition:n=Qe.Bottom}){return u.jsxs(u.Fragment,{children:[e==null?void 0:e.label,u.jsx(Q0,{type:"source",position:n,isConnectable:t})]})}function e5t({data:e,isConnectable:t,targetPosition:n=Qe.Top,sourcePosition:r=Qe.Bottom}){return u.jsxs(u.Fragment,{children:[u.jsx(Q0,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,u.jsx(Q0,{type:"source",position:r,isConnectable:t})]})}function t5t(){return null}function n5t({data:e,isConnectable:t,targetPosition:n=Qe.Top}){return u.jsxs(u.Fragment,{children:[u.jsx(Q0,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const g5={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Fee={input:J4t,default:e5t,output:n5t,group:t5t};function r5t(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const i5t=e=>{const{width:t,height:n,x:r,y:i}=xb(e.nodeLookup,{filter:o=>!!o.selected});return{width:Ys(t)?t:null,height:Ys(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function o5t({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ln(),{width:i,height:o,transformString:s,userSelectionActive:a}=zt(i5t,Dn),l=ove(),c=x.useRef(null);x.useEffect(()=>{var m;n||(m=c.current)==null||m.focus({preventScroll:!0})},[n]);const d=!a&&i!==null&&o!==null;if(ive({nodeRef:c,disabled:!d}),!d)return null;const f=e?m=>{const y=r.getState().nodes.filter(v=>v.selected);e(m,y)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(g5,m.key)&&(m.preventDefault(),l({direction:g5[m.key],factor:m.shiftKey?4:1}))};return u.jsx("div",{className:xr(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:u.jsx("div",{ref:c,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:i,height:o}})})}const Bee=typeof window<"u"?window:void 0,s5t=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function ave({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:c,selectionOnDrag:d,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:y,panActivationKeyCode:v,zoomActivationKeyCode:b,elementsSelectable:C,zoomOnScroll:S,zoomOnPinch:E,panOnScroll:A,panOnScrollSpeed:_,panOnScrollMode:N,zoomOnDoubleClick:j,panOnDrag:T,defaultViewport:O,translateExtent:D,minZoom:R,maxZoom:I,preventScrolling:F,onSelectionContextMenu:$,noWheelClassName:H,noPanClassName:L,disableKeyboardA11y:B,onViewportChange:z,isControlledViewport:V}){const{nodesSelectionActive:U,userSelectionActive:W}=zt(s5t,Dn),G=yv(c,{target:Bee}),Y=yv(v,{target:Bee}),X=Y||T,Q=Y||A,ne=d&&X!==!0,ie=G||W||ne;return F4t({deleteKeyCode:l,multiSelectionKeyCode:y}),u.jsx(V4t,{onPaneContextMenu:o,elementsSelectable:C,zoomOnScroll:S,zoomOnPinch:E,panOnScroll:Q,panOnScrollSpeed:_,panOnScrollMode:N,zoomOnDoubleClick:j,panOnDrag:!G&&X,defaultViewport:O,translateExtent:D,minZoom:R,maxZoom:I,zoomActivationKeyCode:b,preventScrolling:F,noWheelClassName:H,noPanClassName:L,onViewportChange:z,isControlledViewport:V,paneClickDistance:a,selectionOnDrag:ne,children:u.jsxs(G4t,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:s,panOnDrag:X,isSelecting:!!ie,selectionMode:f,selectionKeyPressed:G,paneClickDistance:a,selectionOnDrag:ne,children:[e,U&&u.jsx(o5t,{onSelectionContextMenu:$,noPanClassName:L,disableKeyboardA11y:B})]})})}ave.displayName="FlowRenderer";const a5t=x.memo(ave),l5t=e=>t=>e?uL(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function c5t(e){return zt(x.useCallback(l5t(e),[e]),Dn)}const u5t=e=>e.updateNodeInternals;
696function d5t(){const e=zt(u5t),[t]=x.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return x.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function f5t({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Ln(),o=x.useRef(null),s=x.useRef(null),a=x.useRef(e.sourcePosition),l=x.useRef(e.targetPosition),c=x.useRef(t),d=n&&!!e.internals.handleBounds;return x.useEffect(()=>{o.current&&!e.hidden&&(!d||s.current!==o.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(o.current),s.current=o.current)},[d,e.hidden]),x.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),x.useEffect(()=>{if(o.current){const f=c.current!==t,p=a.current!==e.sourcePosition,m=l.current!==e.targetPosition;(f||p||m)&&(c.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function h5t({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:s,nodesDraggable:a,elementsSelectable:l,nodesConnectable:c,nodesFocusable:d,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:y,rfId:v,nodeTypes:b,nodeClickDistance:C,onError:S}){const{node:E,internals:A,isParent:_}=zt(se=>{const oe=se.nodeLookup.get(e),J=se.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:J}},Dn);let N=E.type||"default",j=(b==null?void 0:b[N])||Fee[N];j===void 0&&(S==null||S("003",Xa.error003(N)),N="default",j=(b==null?void 0:b.default)||Fee.default);const T=!!(E.draggable||a&&typeof E.draggable>"u"),O=!!(E.selectable||l&&typeof E.selectable>"u"),D=!!(E.connectable||c&&typeof E.connectable>"u"),R=!!(E.focusable||d&&typeof E.focusable>"u"),I=Ln(),F=Nye(E),$=f5t({node:E,nodeType:N,hasDimensions:F,resizeObserver:f}),H=ive({nodeRef:$,disabled:E.hidden||!T,noDragClassName:p,handleSelector:E.dragHandle,nodeId:e,isSelectable:O,nodeClickDistance:C}),L=ove();if(E.hidden)return null;const B=Pc(E),z=r5t(E),V=O||T||t||n||r||i,U=n?se=>n(se,{...A.userNode}):void 0,W=r?se=>r(se,{...A.userNode}):void 0,G=i?se=>i(se,{...A.userNode}):void 0,Y=o?se=>o(se,{...A.userNode}):void 0,X=s?se=>s(se,{...A.userNode}):void 0,Q=se=>{const{selectNodesOnDrag:oe,nodeDragThreshold:J}=I.getState();O&&(!oe||!T||J>0)&&yO({id:e,store:I,nodeRef:$}),t&&t(se,{...A.userNode})},ne=se=>{if(!(Mye(se.nativeEvent)||y)){if(bye.includes(se.key)&&O){const oe=se.key==="Escape";yO({id:e,store:I,unselect:oe,nodeRef:$})}else if(T&&E.selected&&Object.prototype.hasOwnProperty.call(g5,se.key)){se.preventDefault();const{ariaLabelConfig:oe}=I.getState();I.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:se.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),L({direction:g5[se.key],factor:se.shiftKey?4:1})}}},ie=()=>{var be;if(y||!((be=$.current)!=null&&be.matches(":focus-visible")))return;const{transform:se,width:oe,height:J,autoPanOnNodeFocus:ae,setCenter:re}=I.getState();if(!ae)return;uL(new Map([[e,E]]),{x:0,y:0,width:oe,height:J},se,!0).length>0||re(E.position.x+B.width/2,E.position.y+B.height/2,{zoom:se[2]})};return u.jsx("div",{className:xr(["react-flow__node",`react-flow__node-${N}`,{[m]:T},E.className,{selected:E.selected,selectable:O,parent:_,draggable:T,dragging:H}]),ref:$,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:V?"all":"none",visibility:F?"visible":"hidden",...E.style,...z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:U,onMouseMove:W,onMouseLeave:G,onContextMenu:Y,onClick:Q,onDoubleClick:X,onKeyDown:R?ne:void 0,tabIndex:R?0:void 0,onFocus:R?ie:void 0,role:E.ariaRole??(R?"group":void 0),"aria-roledescription":"node","aria-describedby":y?void 0:`${Xye}-${v}`,"aria-label":E.ariaLabel,...E.domAttributes,children:u.jsx(Y4t,{value:e,children:u.jsx(j,{id:e,data:E.data,type:N,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:E.selected??!1,selectable:O,draggable:T,deletable:E.deletable??!0,isConnectable:D,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:H,dragHandle:E.dragHandle,zIndex:A.z,parentId:E.parentId,...B})})})}var p5t=x.memo(h5t);const m5t=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,no
696desFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function lve(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=zt(m5t,Dn),s=c5t(e.onlyRenderVisibleElements),a=d5t();return u.jsx("div",{className:"react-flow__nodes",style:zS,children:s.map(l=>u.jsx(p5t,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:o},l))})}lve.displayName="NodeRenderer";const g5t=x.memo(lve);function y5t(e){return zt(x.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),s=n.nodeLookup.get(i.target);o&&s&&g3t({sourceNode:o,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Dn)}const v5t=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return u.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},b5t=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return u.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Hee={[hd.Arrow]:v5t,[hd.ArrowClosed]:b5t};function x5t(e){const t=Ln();return x.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(Hee,e)?Hee[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",Xa.error009(e)),null)},[e])}const w5t=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const l=x5t(t);return l?u.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:a,refX:"0",refY:"0",children:u.jsx(l,{color:n,strokeWidth:s})}):null},cve=({defaultColor:e,rfId:t})=>{const n=zt(o=>o.edges),r=zt(o=>o.defaultEdgeOptions),i=x.useMemo(()=>E3t(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?u.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:u.jsx("defs",{children:i.map(o=>u.jsx(w5t,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};cve.displayName="MarkerDefinitions";var C5t=x.memo(cve);function uve({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:o,labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:l,className:c,...d}){const[f,p]=x.useState({x:1,y:0,width:0,height:0}),m=xr(["react-flow__edge-textwrapper",c]),y=x.useRef(null);return x.useEffect(()=>{if(y.current){const v=y.current.getBBox();p({x:v.x,y:v.y,width:v.width,height:v.height})}},[n]),n?u.jsxs("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...d,children:[i&&u.jsx("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:o,rx:a,ry:a}),u.jsx("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:y,style:r,children:n}),l]}):null}uve.displayName="EdgeText";const S5t=x.memo(uve);function FS({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:c=20,...d}){return u.jsxs(u.Fragment,{children:[u.jsx("path",{...d,d:e,fill:"none",className:xr(["react-flow__edge-path",d.className])}),c?u.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:c,className:"react-flow__edge-interaction"}):null,r&&Ys(t)&&Ys(n)?u.jsx(S5t,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function Vee({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Qe.Left||e===Qe.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function dve({sourceX:e,sourceY:t,sourcePosition:n=Qe.Bottom,targetX:r,targetY:i,targetPosition:o=Qe.Top}){const[s,a]=Vee({pos:n,x1:e,y1:t,x2:r,y2:i}),[l,c]=Vee({pos:o,x1:r,y1:i,x2:e,y2:t}),[d,f,p,m]=Rye({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:c});return[`M${e},${t} C${s},${a} ${l},${c} ${r},${i}`,d,f,p,m]}function fve(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s,targetPosition:a,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:v,markerStart:b,interactionWidth:C})=>{const[S,E,A]=dve({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:a}),_=e.isInternal?void 0:t;return u.jsx(FS,{id:_,path:S,labelX:E,labelY:A,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:v,markerStart:b,interactionWidth:C})})}const E5t=fve({isInternal:!1}),hve=fve({isInternal:!0});E5t.displayName="SimpleBezierEdge";hve.displayName="SimpleBezierEdgeInternal";function pve(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:p,sourcePosition:m=Qe.Bottom,targetPosition:y=Qe.Top,markerEnd:v,markerStart:b,pathOptions:C,interactionWidth:S})=>{const[E,A,_]=fO({sourceX:n,sourceY:r,sourcePosition:m,targetX:i,targetY:o,targetPosition:y,borderRadius:C==null?void 0:C.borderRadius,offset:C==null?void 0:C.offset,stepPosition:C==null?void 0:C.stepPosition}),N=e.isInternal?void 0:t;return u.jsx(FS,{id:N,path:E,labelX:A,labelY:_,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:v,markerStart:b,interactionWidth:S})})}const mve=pve({isInternal:!1}),gve=pve({isInternal:!0});mve.displayName="SmoothStepEdge";gve.displayName="SmoothStepEdgeInternal";function yve(e){return x.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return u.jsx(mve,{...n,id:r,pathOptions:x.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const k5t=yve({isInternal:!1}),vve=yve({isInternal:!0});k5t.displayName="StepEdge";vve.displayName="StepEdgeInternal";function bve(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:y,interactionWidth:v})=>{const[b,C,S]=Iye({sourceX:n,sourceY:r,targetX:i,targetY:o}),E=e.isInternal?void 0:t;return u.jsx(FS,{id:E,path:b,labelX:C,labelY:S,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:y,interactionWidth:v})})}const _5t=bve({isInternal:!1}),xve=bve({isInternal:!0});_5t.displayName="StraightEdge";xve.displayName="StraightEdgeInternal";function wve(e){return x.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:s=Qe.Bottom,targetPosition:a=Qe.Top,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:v,markerStart:b,pathOptions:C,interactionWidth:S})=>{const[E,A,_]=Pye({sourceX:n,sourceY:r,sourcePosition:s,targetX:i,targetY:o,targetPosition:a,curvature:C==null?void 0:C.curvature}),N=e.isInternal?void 0:t;return u.jsx(FS,{id:N,path:E,labelX:A,labelY:_,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:y,markerEnd:v,markerStart:b,interactionWidth:S})})}const A5t=wve({isInternal:!1}),Cve=wve({isInternal:!0});A5t.displayName="BezierEdge";Cve.displayName="BezierEdgeInternal";const Uee={default:Cve,straight:xve,step:vve,smoothstep:gve,simplebezier:hve},qee={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null}
696,N5t=(e,t,n)=>n===Qe.Left?e-t:n===Qe.Right?e+t:e,j5t=(e,t,n)=>n===Qe.Top?e-t:n===Qe.Bottom?e+t:e,Wee="react-flow__edgeupdater";function Gee({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:s,type:a}){return u.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:s,className:xr([Wee,`${Wee}-${a}`]),cx:N5t(t,r,e),cy:j5t(n,r,e),r,stroke:"transparent",fill:"transparent"})}function T5t({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:s,sourcePosition:a,targetPosition:l,onReconnect:c,onReconnectStart:d,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const y=Ln(),v=(A,_)=>{if(A.button!==0)return;const{autoPanOnConnect:N,domNode:j,connectionMode:T,connectionRadius:O,lib:D,onConnectStart:R,cancelConnection:I,nodeLookup:F,rfId:$,panBy:H,updateConnection:L}=y.getState(),B=_.type==="target",z=(W,G)=>{p(!1),f==null||f(W,n,_.type,G)},V=W=>c==null?void 0:c(n,W),U=(W,G)=>{p(!0),d==null||d(A,n,_.type),R==null||R(W,G)};mO.onPointerDown(A.nativeEvent,{autoPanOnConnect:N,connectionMode:T,connectionRadius:O,domNode:j,handleId:_.id,nodeId:_.nodeId,nodeLookup:F,isTarget:B,edgeUpdaterType:_.type,lib:D,flowId:$,cancelConnection:I,panBy:H,isValidConnection:(...W)=>{var G,Y;return((Y=(G=y.getState()).isValidConnection)==null?void 0:Y.call(G,...W))??!0},onConnect:V,onConnectStart:U,onConnectEnd:(...W)=>{var G,Y;return(Y=(G=y.getState()).onConnectEnd)==null?void 0:Y.call(G,...W)},onReconnectEnd:z,updateConnection:L,getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,dragThreshold:y.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},b=A=>v(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),C=A=>v(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),S=()=>m(!0),E=()=>m(!1);return u.jsxs(u.Fragment,{children:[(e===!0||e==="source")&&u.jsx(Gee,{position:a,centerX:r,centerY:i,radius:t,onMouseDown:b,onMouseEnter:S,onMouseOut:E,type:"source"}),(e===!0||e==="target")&&u.jsx(Gee,{position:l,centerX:o,centerY:s,radius:t,onMouseDown:C,onMouseEnter:S,onMouseOut:E,type:"target"})]})}function M5t({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:s,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:y,edgeTypes:v,noPanClassName:b,onError:C,disableKeyboardA11y:S}){let E=zt(re=>re.edgeLookup.get(e));const A=zt(re=>re.defaultEdgeOptions);E=A?{...A,...E}:E;let _=E.type||"default",N=(v==null?void 0:v[_])||Uee[_];N===void 0&&(C==null||C("011",Xa.error011(_)),_="default",N=(v==null?void 0:v.default)||Uee.default);const j=!!(E.focusable||t&&typeof E.focusable>"u"),T=typeof f<"u"&&(E.reconnectable||n&&typeof E.reconnectable>"u"),O=!!(E.selectable||r&&typeof E.selectable>"u"),D=x.useRef(null),[R,I]=x.useState(!1),[F,$]=x.useState(!1),H=Ln(),{zIndex:L,sourceX:B,sourceY:z,targetX:V,targetY:U,sourcePosition:W,targetPosition:G}=zt(x.useCallback(re=>{const pe=re.nodeLookup.get(E.source),be=re.nodeLookup.get(E.target);if(!pe||!be)return{zIndex:E.zIndex,...qee};const xe=S3t({id:e,sourceNode:pe,targetNode:be,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:re.connectionMode,onError:C});return{zIndex:m3t({selected:E.selected,zIndex:E.zIndex,sourceNode:pe,targetNode:be,elevateOnSelect:re.elevateEdgesOnSelect,zIndexMode:re.zIndexMode}),...xe||qee}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Dn),Y=x.useMemo(()=>E.markerStart?`url('#${hO(E.markerStart,y)}')`:void 0,[E.markerStart,y]),X=x.useMemo(()=>E.markerEnd?`url('#${hO(E.markerEnd,y)}')`:void 0,[E.markerEnd,y]);if(E.hidden||B===null||z===null||V===null||U===null)return null;const Q=re=>{var ke;const{addSelectedEdges:pe,unselectNodesAndEdges:be,multiSelectionActive:xe}=H.getState();O&&(H.setState({nodesSelectionActive:!1}),E.selected&&xe?(be({nodes:[],edges:[E]}),(ke=D.current)==null||ke.blur()):pe([e])),i&&i(re,E)},ne=o?re=>{o(re,{...E})}:void 0,ie=s?re=>{s(re,{...E})}:void 0,se=a?re=>{a(re,{...E})}:void 0,oe=l?re=>{l(re,{...E})}:void 0,J=c?re=>{c(re,{...E})}:void 0,ae=re=>{var pe;if(!S&&bye.includes(re.key)&&O){const{unselectNodesAndEdges:be,addSelectedEdges:xe}
696=H.getState();re.key==="Escape"?((pe=D.current)==null||pe.blur(),be({edges:[E]})):xe([e])}};return u.jsx("svg",{style:{zIndex:L},children:u.jsxs("g",{className:xr(["react-flow__edge",`react-flow__edge-${_}`,E.className,b,{selected:E.selected,animated:E.animated,inactive:!O&&!i,updating:R,selectable:O}]),onClick:Q,onDoubleClick:ne,onContextMenu:ie,onMouseEnter:se,onMouseMove:oe,onMouseLeave:J,onKeyDown:j?ae:void 0,tabIndex:j?0:void 0,role:E.ariaRole??(j?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":j?`${Zye}-${y}`:void 0,ref:D,...E.domAttributes,children:[!F&&u.jsx(N,{id:e,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:O,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:B,sourceY:z,targetX:V,targetY:U,sourcePosition:W,targetPosition:G,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:Y,markerEnd:X,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),T&&u.jsx(T5t,{edge:E,isReconnectable:T,reconnectRadius:d,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:B,sourceY:z,targetX:V,targetY:U,sourcePosition:W,targetPosition:G,setUpdateHover:I,setReconnecting:$})]})})}var O5t=x.memo(M5t);const R5t=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Sve({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:s,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:d,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:y,disableKeyboardA11y:v}){const{edgesFocusable:b,edgesReconnectable:C,elementsSelectable:S,onError:E}=zt(R5t,Dn),A=y5t(t);return u.jsxs("div",{className:"react-flow__edges",children:[u.jsx(C5t,{defaultColor:e,rfId:n}),A.map(_=>u.jsx(O5t,{id:_,edgesFocusable:b,edgesReconnectable:C,elementsSelectable:S,noPanClassName:i,onReconnect:o,onContextMenu:s,onMouseEnter:a,onMouseMove:l,onMouseLeave:c,onClick:d,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:y,rfId:n,onError:E,edgeTypes:r,disableKeyboardA11y:v},_))]})}Sve.displayName="EdgeRenderer";const P5t=x.memo(Sve),D5t=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function I5t({children:e}){const t=zt(D5t);return u.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function L5t(e){const t=vL(),n=x.useRef(!1);x.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const $5t=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function z5t(e){const t=zt($5t),n=Ln();return x.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function F5t(e){return e.connection.inProgress?{...e.connection,to:Cb(e.connection.to,e.transform)}:{...e.connection}}function B5t(e){return F5t}function H5t(e){const t=B5t();return zt(t,Dn)}const V5t=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function U5t({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:s,isValid:a,inProgress:l}=zt(V5t,Dn);return!(o&&i&&l)?null:u.jsx("svg",{style:e,width:o,height:s,className:"react-flow__connectionline react-flow__container",children:u.jsx("g",{className:xr(["react-flow__connection",Cye(a)]),children:u.jsx(Eve,{style:t,type:n,CustomComponent:r,isValid:a})})})}const Eve=({style:e,type:t=Ou.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:s,fromHandle:a,fromPosition:l,to:c,toNode:d,toHandle:f,toPosition:p,pointer:m}=H5t();if(!i)return;if(n)return u.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:a,fromX:o.x,fromY:o.y,toX:c.x,toY:c.y,fromPosition:l,toPosition:p,connectionStatus:Cye(r),toNode:d,toHandle:f,pointer:m});let y="";const v={sourceX:o.x,sourceY:o.y,sourcePosition:l,targetX:c.x,targetY:c.y,targetPosition:p};switch(t){case Ou.Bezier:[y]=Pye(v);break;case Ou.SimpleBezier:[y]=dve(v);break;case Ou.Step:[y]=fO({...v,borderRadius:0});break;case Ou.SmoothStep:[y]=fO(v);break;default:[y]=Iye(v)}return u.jsx("path",{d:y,fill:"none",className:"react-flow__connection-path",style:e})};Eve.displayName="ConnectionLine";const q5t={};function Kee(e=q5t){x.useRef(e),Ln(),x.useEffect(()=>{},[e])}function W5t(){Ln(),x.useRef(!1),x.useEffect(()=>{},[])}function kve({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:d,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:y,connectionLineStyle:v,connectionLineComponent:b,connectionLineContainerStyle:C,selectionKeyCode:S,selectionOnDrag:E,selectionMode:A,multiSelectionKeyCode:_,panActivationKeyCode:N,zoomActivationKeyCode:j,deleteKeyCode:T,onlyRenderVisibleElements:O,elementsSelectable:D,defaultViewport:R,translateExtent:I,minZoom:F,maxZoom:$,preventScrolling:H,defaultMarkerColor:L,zoomOnScroll:B,zoomOnPinch:z,panOnScroll:V,panOnScrollSpeed:U,panOnScrollMode:W,zoomOnDoubleClick:G,panOnDrag:Y,onPaneClick:X,onPaneMouseEnter:Q,onPaneMouseMove:ne,onPaneMouseLeave:ie,onPaneScroll:se,onPaneContextMenu:oe,paneClickDistance:J,nodeClickDistance:ae,onEdgeContextMenu:re,onEdgeMouseEnter:pe,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:ke,onReconnect:Pe,onReconnectStart:it,onReconnectEnd:qe,noDragClassName:$n,noWheelClassName:Vt,noPanClassName:ee,disableKeyboardA11y:ue,nodeExtent:me,rfId:je,viewport:Ae,onViewportChange:_e}){return Kee(e),Kee(t),W5t(),L5t(n),z5t(Ae),u.jsx(a5t,{onPaneClick:X,onPaneMouseEnter:Q,onPaneMouseMove:ne,onPaneMouseLeave:ie,onPaneContextMenu:oe,onPaneScroll:se,paneClickDistance:J,deleteKeyCode:T,selectionKeyCode:S,selectionOnDrag:E,selectionMode:A,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:_,panActivationKeyCode:N,zoomActivationKeyCode:j,elementsSelectable:D,zoomOnScroll:B,zoomOnPinch:z,zoomOnDoubleClick:G,panOnScroll:V,panOnScrollSpeed:U,panOnScrollMode:W,panOnDrag:Y,defaultViewport:R,translateExtent:I,minZoom:F,maxZoom:$,onSelectionContextMenu:f,preventScrolling:H,noDragClassName:$n,noWheelClassName:Vt,noPanClassName:ee,disableKeyboardA11y:ue,onViewportChange:_e,isControlledViewport:!!Ae,children:u.jsxs(I5t,{children:[u.jsx(P5t,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:s,onReconnect:Pe,onReconnectStart:it,onReconnectEnd:qe,onlyRenderVisibleElements:O,onEdgeContextMenu:re,onEdgeMouseEnter:pe,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:ke,defaultMarkerColor:L,noPanClassName:ee,disableKeyboardA11y:ue,rfId:je}),u.jsx(U5t,{style:v,type:y,component:b,containerStyle:C}),u.jsx("div",{className:"react-flow__edgelabel-renderer"}),u.jsx(g5t,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:d,nodeClickDistance:ae,onlyRenderVisibleElements:O,noPanClassName:ee,noDragClassName:$n,disableKeyboardA11y:ue,nodeExtent:me,rfId:je}),u.jsx("div",{className:"react-flow__viewport-portal"})]})})}kve.displayName="GraphView";const G5t=x.memo(kve),Yee=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:a,minZoom:l=.5,maxZoom:c=2,nodeOrigin:d,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,y=new Map,v=new Map,b=new Map,C=r??t??[],S=n??e??[],E=d??[0,0],A=f??hv;zye(v,b,C);const{nodesInitialized:_}=pO(S,m,y,{nodeOrigin:E,nodeExtent:A,zIndexMode:p});let N=[0,0,1];if(s&&i&&o){const j=xb(m,{filter:R=>!!((R.width||R.initialWidth)&&(R.height||R.initialHeight))}),{x:T,y:O,zoom:D}=dL(j,i,o,l,c,(a==null?void 0:a.padding)??.1);N=[T,O,D]}return{rfId:"1",width:i??0,height:o??0,transform:N,nodes:S,nodesInitialized:_,nodeLookup:m,parentLookup:y,edges:C,edgeLookup:b,connectionLookup:v,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:c,translateExtent:hv,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:G0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGri
696d:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:a,fitViewResolver:null,connection:{...wye},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:c3t,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:xye,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},K5t=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p})=>h4t((m,y)=>{async function v(){const{nodeLookup:b,panZoom:C,fitViewOptions:S,fitViewResolver:E,width:A,height:_,minZoom:N,maxZoom:j}=y();C&&(await a3t({nodes:b,width:A,height:_,panZoom:C,minZoom:N,maxZoom:j},S),E==null||E.resolve(!0),m({fitViewResolver:null}))}return{...Yee({nodes:e,edges:t,width:i,height:o,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:c,nodeOrigin:d,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:p}),setNodes:b=>{const{nodeLookup:C,parentLookup:S,nodeOrigin:E,elevateNodesOnSelect:A,fitViewQueued:_,zIndexMode:N,nodesSelectionActive:j}=y(),{nodesInitialized:T,hasSelectedNodes:O}=pO(b,C,S,{nodeOrigin:E,nodeExtent:f,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:N}),D=j&&O;_&&T?(v(),m({nodes:b,nodesInitialized:T,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:b,nodesInitialized:T,nodesSelectionActive:D})},setEdges:b=>{const{connectionLookup:C,edgeLookup:S}=y();zye(C,S,b),m({edges:b})},setDefaultNodesAndEdges:(b,C)=>{if(b){const{setNodes:S}=y();S(b),m({hasDefaultNodes:!0})}if(C){const{setEdges:S}=y();S(C),m({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:C,nodeLookup:S,parentLookup:E,domNode:A,nodeOrigin:_,nodeExtent:N,debug:j,fitViewQueued:T,zIndexMode:O}=y(),{changes:D,updatedInternals:R}=M3t(b,S,E,A,_,N,O);R&&(A3t(S,E,{nodeOrigin:_,nodeExtent:N,zIndexMode:O}),T?(v(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(j&&console.log("React Flow: trigger node changes",D),C==null||C(D)))},updateNodePositions:(b,C=!1)=>{const S=[];let E=[];const{nodeLookup:A,triggerNodeChanges:_,connection:N,updateConnection:j,onNodesChangeMiddlewareMap:T}=y();for(const[O,D]of b){const R=A.get(O),I=!!(R!=null&&R.expandParent&&(R!=null&&R.parentId)&&(D!=null&&D.position)),F={id:O,type:"position",position:I?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:C};if(R&&N.inProgress&&N.fromNode.id===R.id){const $=ah(R,N.fromHandle,Qe.Left,!0);j({...N,from:$})}I&&R.parentId&&S.push({id:O,parentId:R.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),E.push(F)}if(S.length>0){const{parentLookup:O,nodeOrigin:D}=y(),R=yL(S,A,O,D);E.push(...R)}for(const O of T.values())E=O(E);_(E)},triggerNodeChanges:b=>{const{onNodesChange:C,setNodes:S,nodes:E,hasDefaultNodes:A,debug:_}=y();if(b!=null&&b.length){if(A){const N=eve(b,E);S(N)}_&&console.log("React Flow: trigger node changes",b),C==null||C(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:C,setEdges:S,edges:E,hasDefaultEdges:A,debug:_}=y();if(b!=null&&b.length){if(A){const N=tve(b,E);S(N)}_&&console.log("React Flow: trigger edge changes",b),C==null||C(b)}},addSelectedNodes:b=>{const{multiSelectionActive:C,edgeLookup:S,nodeLookup:E,triggerNodeChanges:A,triggerEdgeChanges:_}=y();if(C){const N=b.map(j=>mf(j,!0));A(N);return}A($p(E,new Set([...b]),!0)),_($p(S))},addSelectedEdges:b=>{const{multiSelectionActive:C,edgeLookup:S,nodeLookup:E,triggerNodeChanges:A,triggerEdgeChanges:_}=y();if(C){const N=b.map(j=>mf(j,!0));_(N);return}_($p(S,new Set([...b]))),A($p(E,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:C}={})=>{const{edges:S,nodes:E,nodeLookup:A,triggerNodeChanges:_,triggerEdgeChanges:N}=y(),j=b||E,T=C||S,O=[];for(const R of j){if(!R.selected)continue;const I=A.get(R.id);I&&(I.selected=!1),O.push(mf(R.id,!1))}const D=[];for(const R of T)R.selected&&D.push(mf(R.id,!1));_(O),N(D)},setMinZoom:b=>
696{const{panZoom:C,maxZoom:S}=y();C==null||C.setScaleExtent([b,S]),m({minZoom:b})},setMaxZoom:b=>{const{panZoom:C,minZoom:S}=y();C==null||C.setScaleExtent([S,b]),m({maxZoom:b})},setTranslateExtent:b=>{var C;(C=y().panZoom)==null||C.setTranslateExtent(b),m({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:C,triggerNodeChanges:S,triggerEdgeChanges:E,elementsSelectable:A}=y();if(!A)return;const _=C.reduce((j,T)=>T.selected?[...j,mf(T.id,!1)]:j,[]),N=b.reduce((j,T)=>T.selected?[...j,mf(T.id,!1)]:j,[]);S(_),E(N)},setNodeExtent:b=>{const{nodes:C,nodeLookup:S,parentLookup:E,nodeOrigin:A,elevateNodesOnSelect:_,nodeExtent:N,zIndexMode:j}=y();b[0][0]===N[0][0]&&b[0][1]===N[0][1]&&b[1][0]===N[1][0]&&b[1][1]===N[1][1]||(pO(C,S,E,{nodeOrigin:A,nodeExtent:b,elevateNodesOnSelect:_,checkEquality:!1,zIndexMode:j}),m({nodeExtent:b}))},panBy:b=>{const{transform:C,width:S,height:E,panZoom:A,translateExtent:_}=y();return O3t({delta:b,panZoom:A,transform:C,translateExtent:_,width:S,height:E})},setCenter:async(b,C,S)=>{const{width:E,height:A,maxZoom:_,panZoom:N}=y();if(!N)return Promise.resolve(!1);const j=typeof(S==null?void 0:S.zoom)<"u"?S.zoom:_;return await N.setViewport({x:E/2-b*j,y:A/2-C*j,zoom:j},{duration:S==null?void 0:S.duration,ease:S==null?void 0:S.ease,interpolate:S==null?void 0:S.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{m({connection:{...wye}})},updateConnection:b=>{m({connection:b})},reset:()=>m({...Yee()})}},Object.is);function Y5t({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,initialMinZoom:s,initialMaxZoom:a,initialFitViewOptions:l,fitView:c,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:m}){const[y]=x.useState(()=>K5t({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:c,minZoom:s,maxZoom:a,fitViewOptions:l,nodeOrigin:d,nodeExtent:f,zIndexMode:p}));return u.jsx(p4t,{value:y,children:u.jsx(I4t,{children:m})})}function X5t({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:s,fitView:a,fitViewOptions:l,minZoom:c,maxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return x.useContext(LS)?u.jsx(u.Fragment,{children:e}):u.jsx(Y5t,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:s,fitView:a,initialFitViewOptions:l,initialMinZoom:c,initialMaxZoom:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const Z5t={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Q5t({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:s,onNodeClick:a,onEdgeClick:l,onInit:c,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:y,onConnectEnd:v,onClickConnectStart:b,onClickConnectEnd:C,onNodeMouseEnter:S,onNodeMouseMove:E,onNodeMouseLeave:A,onNodeContextMenu:_,onNodeDoubleClick:N,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:O,onNodesDelete:D,onEdgesDelete:R,onDelete:I,onSelectionChange:F,onSelectionDragStart:$,onSelectionDrag:H,onSelectionDragStop:L,onSelectionContextMenu:B,onSelectionStart:z,onSelectionEnd:V,onBeforeDelete:U,connectionMode:W,connectionLineType:G=Ou.Bezier,connectionLineStyle:Y,connectionLineComponent:X,connectionLineContainerStyle:Q,deleteKeyCode:ne="Backspace",selectionKeyCode:ie="Shift",selectionOnDrag:se=!1,selectionMode:oe=pv.Full,panActivationKeyCode:J="Space",multiSelectionKeyCode:ae=gv()?"Meta":"Control",zoomActivationKeyCode:re=gv()?"Meta":"Control",snapToGrid:pe,snapGrid:be,onlyRenderVisibleElements:xe=!1,selectNodesOnDrag:ke,nodesDraggable:Pe,autoPanOnNodeFocus:it,nodesConnectable:qe,nodesFocusable:$n,nodeOrigin:Vt=Qye,edgesFocusable:ee,edgesReconnectable:ue,elementsSelectable:me=!0,defaultViewport:je=A4t,minZoom:Ae=.5,maxZoom:_e=2,translateExtent:Oe=hv,preventScrolling:dt=!0,nodeExtent:vt,defaultMarkerColor:Kt="#b1b1b7",zoomOnScroll:Or=!0,zoomOnPinch:wr=!0,panOnScroll:en=!1,panOnScrollSpeed:Rr=.5,panOnScrollMode:tr=$f.Free,zoomOnDoubleClick:De=!0,panOnDrag:Yt=!0,onPaneClick:Xt,onPaneMouseEnter:Po,onPaneMouseMove:ma,onPaneMouseLeave:bs,onPaneScroll:Fi,onPaneContextMenu:ot,paneClickDistance:un=1,nodeClickDistance:Un=0,children:ir,onReconnect:Se,onReconnectStart:Te,onReconnectEnd:Le,onEdgeContextMenu:tt,onEdgeDoubleClick:ut,onEdgeMouseEnter:Tt,onEdgeMouseMove:Zt,onEdgeMouseLeave:st,reconnectRadius:ln=10,onNodesChange:Pr,onEdgesChange:kn,noDragClassName:zn="nodrag",noWheelClassName:xs="nowheel",noPanClassName:Do="nopan",fitView:ws,fitViewOptions:Ch,connectOnClick:Sb,attributionPosition:Od,proOptions:_m,defaultEdgeOptions:ul,elevateNodesOnSelect:Dc=!0,elevateEdgesOnSelect:Rd=!1,disableKeyboardA11y:dl=!1,autoPanOnConnect:or,autoPanOnNodeDrag:Eb,autoPanSpeed:kb,connectionRadius:fl,isValidConnection:Ic,onError:Cs,style:HS,id:Am,nodeDragThreshold:_b,connectionDragThreshold:VS,viewport:Sh,onViewportChange:Eh,width:Ss,height:Bi,colorMode:Ab="light",debug:US,onScroll:hl,ariaLabelConfig:Nb,zIndexMode:Pd="basic",...qS},Hi){const Dd=Am||"1",jb=M4t(Ab),Nm=x.useCallback(pl=>{pl.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),hl==null||hl(pl)},[hl]);return u.jsx("div",{"data-testid":"rf__wrapper",...qS,onScroll:Nm,style:{...HS,...Z5t},ref:Hi,className:xr(["react-flow",i,jb]),id:Am,role:"application",children:u.jsxs(X5t,{nodes:e,edges:t,width:Ss,height:Bi,fitView:ws,fitViewOptions:Ch,minZ
696oom:Ae,maxZoom:_e,nodeOrigin:Vt,nodeExtent:vt,zIndexMode:Pd,children:[u.jsx(T4t,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:m,onConnectStart:y,onConnectEnd:v,onClickConnectStart:b,onClickConnectEnd:C,nodesDraggable:Pe,autoPanOnNodeFocus:it,nodesConnectable:qe,nodesFocusable:$n,edgesFocusable:ee,edgesReconnectable:ue,elementsSelectable:me,elevateNodesOnSelect:Dc,elevateEdgesOnSelect:Rd,minZoom:Ae,maxZoom:_e,nodeExtent:vt,onNodesChange:Pr,onEdgesChange:kn,snapToGrid:pe,snapGrid:be,connectionMode:W,translateExtent:Oe,connectOnClick:Sb,defaultEdgeOptions:ul,fitView:ws,fitViewOptions:Ch,onNodesDelete:D,onEdgesDelete:R,onDelete:I,onNodeDragStart:j,onNodeDrag:T,onNodeDragStop:O,onSelectionDrag:H,onSelectionDragStart:$,onSelectionDragStop:L,onMove:d,onMoveStart:f,onMoveEnd:p,noPanClassName:Do,nodeOrigin:Vt,rfId:Dd,autoPanOnConnect:or,autoPanOnNodeDrag:Eb,autoPanSpeed:kb,onError:Cs,connectionRadius:fl,isValidConnection:Ic,selectNodesOnDrag:ke,nodeDragThreshold:_b,connectionDragThreshold:VS,onBeforeDelete:U,debug:US,ariaLabelConfig:Nb,zIndexMode:Pd}),u.jsx(G5t,{onInit:c,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:S,onNodeMouseMove:E,onNodeMouseLeave:A,onNodeContextMenu:_,onNodeDoubleClick:N,nodeTypes:o,edgeTypes:s,connectionLineType:G,connectionLineStyle:Y,connectionLineComponent:X,connectionLineContainerStyle:Q,selectionKeyCode:ie,selectionOnDrag:se,selectionMode:oe,deleteKeyCode:ne,multiSelectionKeyCode:ae,panActivationKeyCode:J,zoomActivationKeyCode:re,onlyRenderVisibleElements:xe,defaultViewport:je,translateExtent:Oe,minZoom:Ae,maxZoom:_e,preventScrolling:dt,zoomOnScroll:Or,zoomOnPinch:wr,zoomOnDoubleClick:De,panOnScroll:en,panOnScrollSpeed:Rr,panOnScrollMode:tr,panOnDrag:Yt,onPaneClick:Xt,onPaneMouseEnter:Po,onPaneMouseMove:ma,onPaneMouseLeave:bs,onPaneScroll:Fi,onPaneContextMenu:ot,paneClickDistance:un,nodeClickDistance:Un,onSelectionContextMenu:B,onSelectionStart:z,onSelectionEnd:V,onReconnect:Se,onReconnectStart:Te,onReconnectEnd:Le,onEdgeContextMenu:tt,onEdgeDoubleClick:ut,onEdgeMouseEnter:Tt,onEdgeMouseMove:Zt,onEdgeMouseLeave:st,reconnectRadius:ln,defaultMarkerColor:Kt,noDragClassName:zn,noWheelClassName:xs,noPanClassName:Do,rfId:Dd,disableKeyboardA11y:dl,nodeExtent:vt,viewport:Sh,onViewportChange:Eh}),u.jsx(_4t,{onSelectionChange:F}),ir,u.jsx(w4t,{proOptions:_m,position:Od}),u.jsx(x4t,{rfId:Dd,disableKeyboardA11y:dl})]})})}var J5t=nve(Q5t);function eCt(e){const[t,n]=x.useState(e),r=x.useCallback(i=>n(o=>eve(i,o)),[]);return[t,n,r]}function tCt(e){const[t,n]=x.useState(e),r=x.useCallback(i=>n(o=>tve(i,o)),[]);return[t,n,r]}function nCt({dimensions:e,lineWidth:t,variant:n,className:r}){return u.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:xr(["react-flow__background-pattern",n,r])})}function rCt({radius:e,className:t}){return u.jsx("circle",{cx:e,cy:e,r:e,className:xr(["react-flow__background-pattern","dots",t])})}var ed;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ed||(ed={}));const iCt={[ed.Dots]:1,[ed.Lines]:1,[ed.Cross]:6},oCt=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function _ve({id:e,variant:t=ed.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:s,bgColor:a,style:l,className:c,patternClassName:d}){const f=x.useRef(null),{transform:p,patternId:m}=zt(oCt,Dn),y=r||iCt[t],v=t===ed.Dots,b=t===ed.Cross,C=Array.isArray(n)?n:[n,n],S=[C[0]*p[2]||1,C[1]*p[2]||1],E=y*p[2],A=Array.isArray(o)?o:[o,o],_=b?[E,E]:S,N=[A[0]*p[2]||1+_[0]/2,A[1]*p[2]||1+_[1]/2],j=`${m}${e||""}`;return u.jsxs("svg",{className:xr(["react-flow__background",c]),style:{...l,...zS,"--xy-background-color-props":a,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[u.jsx("pattern",{id:j,x:p[0]%S[0],y:p[1]%S[1],width:S[0],height:S[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${N[0]},-${N[1]})`,children:v?u.jsx(rCt,{radius:E/2,className:d}):u.jsx(nCt,{dimensions:_,lineWidth:i,variant:t,className:d})}),u.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${j})`})]})}_ve.displayName="Background";const sCt=x.memo(_ve);function aCt(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:u.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function lCt(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:u.jsx("path",{d:"M0 0h32v4.2H0z"})})}function cCt(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:u.jsx("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 uCt(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:u.jsx("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 dCt(){return u.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:u.jsx("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"})})}function ew({children:e,className:t,...n}){return u.jsx("button",{type:"button",className:xr(["react-flow__controls-button",t]),...n,children:e})}const fCt=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Ave({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:s,onFitView:a,onInteractiveChange:l,className:c,children:d,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const y=Ln(),{isInteractive:v,minZoomReached:b,maxZoomReached:C,ariaLabelConfig:S}=zt(fCt,Dn),{zoomIn:E,zoomOut:A,fitView:_}=vL(),N=()=>{E(),o==null||o()},j=()=>{A(),s==null||s()},T=()=>{_(i),a==null||a()},O=()=>{y.setState({nodesDraggable:!v,nodesConnectable:!v,elementsSelectable:!v}),l==null||l(!v)},D=p==="horizontal"?"horizontal":"vertical";return u.jsxs($S,{className:xr(["react-flow__controls",D,c]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??S["controls.ariaLabel"],children:[t&&u.jsxs(u.Fragment,{children:[u.jsx(ew,{onClick:N,className:"react-flow__controls-zoomin",title:S["controls.zoomIn.ariaLabel"],"aria-label":S["controls.zoomIn.ariaLabel"],disabled:C,children:u.jsx(aCt,{})}),u.jsx(ew,{onClick:j,className:"react-flow__controls-zoomout",title:S["controls.zoomOut.ariaLabel"],"aria-label":S["controls.zoomOut.ariaLabel"],disabled:b,children:u.jsx(lCt,{})})]}),n&&u.jsx(ew,{className:"react-flow__controls-fitview",onClick:T,title:S["controls.fitView.ariaLabel"],"aria-label":S["controls.fitView.ariaLabel"],children:u.jsx(cCt,{})}),r&&u.jsx(ew,{className:"react-flow__controls-interactive",onClick:O,title:S["controls.interactive.ariaLabel"],"aria-label":S["controls.interactive.ariaLabel"],children:v?u.jsx(dCt,{}):u.jsx(uCt,{})}),d]})}Ave.displayName="Controls";const hCt=x.memo(Ave);function pCt({id:e,x:t,y:n,width:r,height:i,style:o,color:s,strokeColor:a,strokeWidth:l,className:c,borderRadius:d,shapeRendering:f,selected:p,onClick:m}){const{background:y,backgroundColor:v}=o||{},b=s||y||v;return u.jsx("rect",{className:xr(["react-flow__minimap-node",{selected:p},c]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:b,stroke:a,strokeWidth:l},shapeRendering:f,onClick:m?C=>m(C,e):void 0})}const mCt=x.memo(pCt),gCt=e=>e.nodes.map(t=>
696t.id),SN=e=>e instanceof Function?e:()=>e;function yCt({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=mCt,onClick:s}){const a=zt(gCt,Dn),l=SN(t),c=SN(e),d=SN(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return u.jsx(u.Fragment,{children:a.map(p=>u.jsx(bCt,{id:p,nodeColorFunc:l,nodeStrokeColorFunc:c,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:s,shapeRendering:f},p))})}function vCt({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:s,NodeComponent:a,onClick:l}){const{node:c,x:d,y:f,width:p,height:m}=zt(y=>{const v=y.nodeLookup.get(e);if(!v)return{node:void 0,x:0,y:0,width:0,height:0};const b=v.internals.userNode,{x:C,y:S}=v.internals.positionAbsolute,{width:E,height:A}=Pc(b);return{node:b,x:C,y:S,width:E,height:A}},Dn);return!c||c.hidden||!Nye(c)?null:u.jsx(a,{x:d,y:f,width:p,height:m,style:c.style,selected:!!c.selected,className:r(c),color:t(c),borderRadius:i,strokeColor:n(c),strokeWidth:o,shapeRendering:s,onClick:l,id:c.id})}const bCt=x.memo(vCt);var xCt=x.memo(yCt);const wCt=200,CCt=150,SCt=e=>!e.hidden,ECt=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Aye(xb(e.nodeLookup,{filter:SCt}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},kCt="react-flow__minimap-desc";function Nve({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:a,bgColor:l,maskColor:c,maskStrokeColor:d,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:y,pannable:v=!1,zoomable:b=!1,ariaLabel:C,inversePan:S,zoomStep:E=1,offsetScale:A=5}){const _=Ln(),N=x.useRef(null),{boundingRect:j,viewBB:T,rfId:O,panZoom:D,translateExtent:R,flowWidth:I,flowHeight:F,ariaLabelConfig:$}=zt(ECt,Dn),H=(e==null?void 0:e.width)??wCt,L=(e==null?void 0:e.height)??CCt,B=j.width/H,z=j.height/L,V=Math.max(B,z),U=V*H,W=V*L,G=A*V,Y=j.x-(U-j.width)/2-G,X=j.y-(W-j.height)/2-G,Q=U+G*2,ne=W+G*2,ie=`${kCt}-${O}`,se=x.useRef(0),oe=x.useRef();se.current=V,x.useEffect(()=>{if(N.current&&D)return oe.current=B3t({domNode:N.current,panZoom:D,getTransform:()=>_.getState().transform,getViewScale:()=>se.current}),()=>{var pe;(pe=oe.current)==null||pe.destroy()}},[D]),x.useEffect(()=>{var pe;(pe=oe.current)==null||pe.update({translateExtent:R,width:I,height:F,inversePan:S,pannable:v,zoomStep:E,zoomable:b})},[v,b,S,E,R,I,F]);const J=m?pe=>{var ke;const[be,xe]=((ke=oe.current)==null?void 0:ke.pointer(pe))||[0,0];m(pe,{x:be,y:xe})}:void 0,ae=y?x.useCallback((pe,be)=>{const xe=_.getState().nodeLookup.get(be).internals.userNode;y(pe,xe)},[]):void 0,re=C??$["minimap.ariaLabel"];return u.jsx($S,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*V:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:xr(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:u.jsxs("svg",{width:H,height:L,viewBox:`${Y} ${X} ${Q} ${ne}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ie,ref:N,onClick:J,children:[re&&u.jsx("title",{id:ie,children:re}),u.jsx(xCt,{onClick:ae,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:s,nodeComponent:a}),u.jsx("path",{className:"react-flow__minimap-mask",d:`M${Y-G},${X-G}h${Q+G*2}v${ne+G*2}h${-Q-G*2}z 697 M${T.x},${T.y}h${T.width}v${T.height}h${-T.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Nve.displayName="MiniMap";const _Ct=x.memo(Nve),ACt=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,NCt={[Z0.Line]:"right",[Z0.Handle]:"bottom-right"};
697function jCt({nodeId:e,position:t,variant:n=Z0.Handle,className:r,style:i=void 0,children:o,color:s,minWidth:a=10,minHeight:l=10,maxWidth:c=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:y,onResizeStart:v,onResize:b,onResizeEnd:C}){const S=sve(),E=typeof e=="string"?e:S,A=Ln(),_=x.useRef(null),N=n===Z0.Handle,j=zt(x.useCallback(ACt(N&&m),[N,m]),Dn),T=x.useRef(null),O=t??NCt[n];x.useEffect(()=>{if(!(!_.current||!E))return T.current||(T.current=t4t({domNode:_.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:R,transform:I,snapGrid:F,snapToGrid:$,nodeOrigin:H,domNode:L}=A.getState();return{nodeLookup:R,transform:I,snapGrid:F,snapToGrid:$,nodeOrigin:H,paneDomNode:L}},onChange:(R,I)=>{const{triggerNodeChanges:F,nodeLookup:$,parentLookup:H,nodeOrigin:L}=A.getState(),B=[],z={x:R.x,y:R.y},V=$.get(E);if(V&&V.expandParent&&V.parentId){const U=V.origin??L,W=R.width??V.measured.width??0,G=R.height??V.measured.height??0,Y={id:V.id,parentId:V.parentId,rect:{width:W,height:G,...jye({x:R.x??V.position.x,y:R.y??V.position.y},{width:W,height:G},V.parentId,$,U)}},X=yL([Y],$,H,L);B.push(...X),z.x=R.x?Math.max(U[0]*W,R.x):void 0,z.y=R.y?Math.max(U[1]*G,R.y):void 0}if(z.x!==void 0&&z.y!==void 0){const U={id:E,type:"position",position:{...z}};B.push(U)}if(R.width!==void 0&&R.height!==void 0){const W={id:E,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:R.width,height:R.height}};B.push(W)}for(const U of I){const W={...U,type:"position"};B.push(W)}F(B)},onEnd:({width:R,height:I})=>{const F={id:E,type:"dimensions",resizing:!1,dimensions:{width:R,height:I}};A.getState().triggerNodeChanges([F])}})),T.current.update({controlPosition:O,boundaries:{minWidth:a,minHeight:l,maxWidth:c,maxHeight:d},keepAspectRatio:f,resizeDirection:p,onResizeStart:v,onResize:b,onResizeEnd:C,shouldResize:y}),()=>{var R;(R=T.current)==null||R.destroy()}},[O,a,l,c,d,f,v,b,C,y]);const D=O.split("-");return u.jsx("div",{className:xr(["react-flow__resize-control","nodrag",...D,n,r]),ref:_,style:{...i,scale:j,...s&&{[N?"backgroundColor":"borderColor"]:s}},children:o})}x.memo(jCt);function zp(e){const t=(e==null?void 0:e.trim())||"";if(!t||t==="/")return"";const n=t.split("/").filter(Boolean);return n[n.length-1]??""}function H1(e){return e?e.normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""):""}function jve(e,t=!1){return t?H1(e.label)||zp(e.routeUrl):zp(e.routeUrl)||H1(e.label)}function TCt(e,t,n,r=!1){const i=new Map(t.map(m=>[m.id,m])),o=new Map;for(const m of n)o.set(m.target,m.source);const s=[];let a=e;const l=new Set;for(;a&&!l.has(a);){l.add(a);const m=i.get(a);if(!m)break;s.push(m),a=o.get(a)}s.reverse();const c=s.filter(m=>m.type==="topic");if(c.length===0)return{prefix:"",slug:""};const d=c.map(m=>jve(m,r)).filter(m=>m.length>0);if(d.length===0)return{prefix:"",slug:""};const f=d[d.length-1];return d.length===1?{prefix:"/",slug:f}:{prefix:`/${d.slice(0,-1).join("/")}`,slug:f}}function MCt(e){if(!e||!e.trim())return null;const t=e.trim().toLowerCase();switch(t.length===1?t:{informational:"i",commercial:"c",navigational:"n",transactional:"t"}[t]??t[0]){case"c":return{label:"Commercial",color:"blue"};case"i":return{label:"Informational",color:"purple"};case"n":return{label:"Navigational",color:"teal"};case"t":return{label:"Transactional",color:"green"};default:return{label:e,color:"gray"}}}function BS(e){return e<=10?"hsl(171.86 72.24% 48.04%)":e<=30?"hsl(142.1 70.6% 45.3%)":e<=55?"hsl(47.9 95.8% 53.1%)":e<=75?"hsl(24.6 95% 53.1%)":"hsl(0 72.2% 50.6%)"}function Tve(e){if(!e.article)return!0;const t=e.article.status;return t===Dt.COMPLETED||t===Dt.FAILED}function OCt(e){return e.some(t=>t.article&&!Tve(t))}const Xee=[Dt.PENDING,Dt.AGENT_BRIEF_GENERATION,Dt.AGENT_GENERATING_IMAGES,Dt.AGENT_GENERATING_EXTRA_CONTENT,Dt.AGENT_GENERATING_BLOG_COVER,Dt.AGENT_SECTION_PROCESSING,Dt.AGENT_CONTENT_CREATION],RCt={pending:"Queued",agent_brief_generation:"Planning article",agent_generating_images:"Finding images",agent_generating_extra_content:"Adding video",agent_generating_blog_cover:"Designing cover",agent_researching:"Researching",agent_section_processing:"Researching sections",agent_content_creation:"Writing content",researching:"Researching",auditing:"Auditing",planning:"Planning",section_generation:"Writing sections",assembling:"Assembling",word_count_verification:"Verifying word count",enhancing:"Enhancing",enhanced_researching:"Researching",enhanced_planning:"Planning",enhanced_imaging:"Generating images",enhanced_drafting:"Drafting",enhanced_assembling:"Assembling"};function PCt(e){const t=RCt[e]??String(e).replace(/_/g," ");
697if(e===Dt.COMPLETED)return{label:"Completed",percent:100};if(e===Dt.FAILED)return{label:"Failed",percent:100};const n=Xee.indexOf(e);if(n>=0){const r=Xee.length,i=Math.round((n+.5)/r*100);return{label:t,percent:i,step:n+1,totalSteps:r}}return{label:t,percent:12}}function DCt(e,t,n,r){return t.edges.some(o=>o.sourceNodeId===e&&!r.has(o.id))?!0:n.some(o=>o.sourceNodeId===e)}const ICt=u.jsxs("svg",{width:"108",height:"109",viewBox:"0 0 108 109",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-auto shrink-0","aria-hidden":!0,children:[u.jsx("rect",{width:"108",height:"108",rx:"54",fill:"#F5F5F5"}),u.jsx("path",{d:"M78.3562 29.3041V62.8506H17.4628V29.3041C17.4628 26.5078 19.7283 24.2422 22.5247 24.2422H73.2944C76.0908 24.2422 78.3562 26.5078 78.3562 29.3041Z",fill:"white",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M84.6786 29.3041V67.0782C84.6786 69.8745 82.4131 72.1399 79.6168 72.1399H73.2942C76.0906 72.1399 78.356 69.8745 78.356 67.0782V29.3041C78.356 26.5078 76.0906 24.2422 73.2942 24.2422H79.6168C82.4131 24.2422 84.6786 26.5078 84.6786 29.3041Z",fill:"#D1D1D1",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M78.3535 62.8477V67.0777C78.3535 69.8775 76.0937 72.1378 73.2934 72.1378H22.5237C19.7237 72.1378 17.4636 69.8775 17.4636 67.0777V62.8477H78.3535Z",fill:"#EBEBEB",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M32.7736 83.7578H35.9136H39.3036",fill:"white"}),u.jsx("path",{d:"M32.7736 83.7578H35.9136H39.3036",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M56.3438 83.7566H39.3038C42.3936 83.7566 44.5636 80.7066 43.5538 77.7866L41.6136 72.1367H58.6536L60.5938 77.7866C61.6036 80.7065 59.4336 83.7566 56.3438 83.7566Z",fill:"white",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M39.3037 83.7578H35.9137",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M72.0984 78.5586H71.7653C64.8341 78.5586 59.2068 72.9313 59.2068 66.0001V59.5801H84.6569V66.0001C84.6569 72.9313 79.0296 78.5586 72.0984 78.5586Z",fill:"white",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M82.5348 73.3464H85.4178C88.2449 73.3464 90.5366 71.0546 90.5366 68.2276C90.5366 65.9154 89.0035 63.9612 86.8984 63.3262",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M84.9948 83.7578H58.8687C57.058 83.7578 55.588 82.2878 55.588 80.4771H88.2755C88.2755 82.2878 86.8055 83.7578 84.9948 83.7578Z",fill:"#D1D1D1",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M30.7781 46.0742H24.8333C24.281 46.0742 23.8333 46.5219 23.8333 47.0742V53.019C23.8333 53.5713 24.281 54.019 24.8333 54.019H30.7781C31.3303 54.019 31.7781 53.5713 31.7781 53.019V47.0742C31.7781 46.5219 31.3303 46.0742 30.7781 46.0742Z",fill:"#D1D1D1"}),u.jsx("path",{d:"M52.425 31.2676H46.4802C45.9279 31.2676 45.4802 31.7153 45.4802 32.2676V38.2124C45.4802 38.7647 45.9279 39.2124 46.4802 39.2124H52.425C52.9773 39.2124 53.425 38.7647 53.425 38.2124V32.2676C53.425 31.7153 52.9773 31.2676 52.425 31.2676Z",fill:"#EBEBEB"}),u.jsx("path",{d:"M72.1086 47.6641H38.363C37.8108 47.6641 37.363 48.1118 37.363 48.6641V50.5122C37.363 51.0644 37.8108 51.5122 38.363 51.5122H72.1086C72.6609 51.5122 73.1086 51.0644 73.1086 50.5122V48.6641C73.1086 48.1118 72.6609 47.6641 72.1086 47.6641Z",fill:"#D1D1D1"}),u.jsx("path",{d:"M72.6086 33.4922H60.01C59.4577 33.4922 59.01 33.9399 59.01 34.4922V36.3403C59.01 36.8926 59.4577 37.3403 60.01 37.3403H72.6086C73.1609 37.3403 73.6086 36.8926 73.6086 36.3403V34.4922C73.6086 33.9399 73.1609 33.4922 72.6086 33.4922Z",fill:"#D1D1D1"}
697),u.jsx("path",{d:"M24.1307 35.2414C24.1307 35.2414 27.335 39.0394 30.9074 39.0394C34.4798 39.0394 37.5109 35.2414 37.5109 35.2414C37.5109 35.2414 34.4798 31.4434 30.9074 31.4434C27.335 31.4434 24.1307 35.2414 24.1307 35.2414Z",fill:"white",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M30.8604 37.8784C32.2954 37.8784 33.4588 36.7151 33.4588 35.28C33.4588 33.845 32.2954 32.6816 30.8604 32.6816C29.4253 32.6816 28.262 33.845 28.262 35.28C28.262 36.7151 29.4253 37.8784 30.8604 37.8784Z",fill:"#A4A4A4",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M32.6025 2.18953C32.6025 2.18953 28.6823 6.78854 33.2522 10.7109C28.6822 6.78846 24.7309 11.3606 24.7309 11.3606C24.7309 11.3606 28.6511 6.76163 24.0811 2.83918C28.6511 6.76163 32.6025 2.18953 32.6025 2.18953Z",fill:"white",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"}),u.jsx("path",{d:"M84.2943 101.16C84.2943 101.16 78.2703 101.64 78.7282 107.645C78.2703 101.64 72.2433 102.079 72.2433 102.079C72.2433 102.079 78.2673 101.599 77.8094 95.5938C78.2673 101.599 84.2943 101.16 84.2943 101.16Z",fill:"white",stroke:"#A4A4A4",strokeLinecap:"round",strokeLinejoin:"round"})]});function LCt({list:e,search:t,expanded:n,onToggle:r,onPickKeyword:i,disabled:o}){const s=x.useMemo(()=>{const a=e.keywords??[],l=t.trim().toLowerCase();return l?a.filter(c=>c.keyword.toLowerCase().includes(l)):a},[e.keywords,t]);return u.jsxs("div",{className:"border-stroke-soft-200 border-b last:border-b-0",children:[u.jsxs("button",{type:"button",onClick:r,className:"text-text-strong-950 hover:bg-bg-weak-50 flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left text-label-sm transition-colors",children:[u.jsx("span",{className:"truncate",children:e.name}),u.jsxs("span",{className:"text-text-sub-600 flex shrink-0 items-center gap-1.5 text-label-xs",children:[u.jsx(Qs,{className:Et("size-4 shrink-0 transition-transform duration-200 ease-out",n?"rotate-90":"-rotate-90"),"aria-hidden":!0}),(e.keywords??[]).length]})]}),u.jsx("div",{className:Et("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",n?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:u.jsx("div",{className:Et("min-h-0 overflow-hidden",!n&&"pointer-events-none"),"aria-hidden":!n,children:u.jsxs("div",{className:"max-h-48 overflow-y-auto px-2 pb-2",children:[s.map(a=>u.jsxs("button",{type:"button",disabled:o,onClick:()=>i(a),className:"hover:bg-bg-weak-50 flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left transition-colors disabled:opacity-50",children:[u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 truncate",children:a.keyword}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[u.jsxs("span",{className:"bg-information-lighter text-information-base inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-label-xs font-medium",children:[u.jsx(jne,{className:"size-3.5","aria-hidden":!0}),a.searchVolume.toLocaleString()]}),u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-label-xs font-medium text-green-800 dark:bg-green-950/40 dark:text-green-200",children:[u.jsx("span",{className:"size-1.5 rounded-full",style:{backgroundColor:BS(a.difficulty)}}),a.difficulty]})]})]},`${e.id}-${a.keyword}`)),s.length===0&&u.jsx("p",{className:"text-text-sub-600 px-2 py-2 text-center text-paragraph-xs",children:"No matching keywords"})]})})})]})}function Mve({open:e,onOpenChange:t,onAddTopic:n,onCreateArticleChild:r,onEnterArticlePicker:i,onSuppressPickerGhostClicks:o}){const[s,a]=x.useState("root"),[l,c]=x.useState("pillar"),[d,f]=x.useState(""),[p,m]=x.useState(new Set),[y,v]=x.useState(!1),{data:b,isLoading:C}=kv();x.useEffect(()=>{if(!e){const I=window.setTimeout(()=>{a("root"),f(""),m(new Set)},220);return()=>window.clearTimeout(I)}},[e]);const S=I=>{i(),c(I),a("picker")},E=I=>{m(F=>{const $=new Set(F);return $.has(I)?$.delete(I):$.add(I),$})},A=x.useMemo(()=>{const I=b??[],F=d.trim().toLowerCase();return F?I.filter($=>$.name.toLowerCase().includes(F)||($.keywords??[]).some(H=>H.keyword.toLowerCase().includes(F))):I},[b,d]),_=((b==null?void 0:b.length)??0)>0,N=async()=>{v(!0);try{await r(l,{kind:"empty"}),t(!1)}finally{v(!1)}},j=async(I,F)=>{v(!0);try{await r(l,{kind:"keyword",listId:I,item:F}),t(!1)}finally{v(!1)}},T=l==="pillar"?"Add empty pillar article":"Add empty support article",O=l==="pillar"?XN:Q1;return u.jsx("div",{className:Et("h-fit overflow-hidden p-0 transition-[width] duration-200 ease-out",s==="root"?"w-[min(13rem,calc(100vw-2rem))]":"w-[min(380px,calc(100vw-2rem))]"),children:u.jsx("div",{className:"h-fit overflow-hidden",children:u.jsxs("div",{className:Et("flex shrink-0 items-start transition-transform duration-200 ease-out",s==="picker"&&"-translate-x-[min(13rem,calc(100vw-2rem))]"),style:{width:"calc(min(13rem, 100vw - 2rem) + min(380px, 100vw - 2rem))"},children:[u.jsxs("div",{className:Et("bg-bg-white-0 p-1","w-[min(13rem,calc(100vw-2rem))] shrink-0"),children:[u.jsxs(Hu,{onSelect:I=>{I.preventDefault(),n(),t(!1)},children:[u.jsx(w1,{as:Mne}),"Add topic"]}),u.jsxs(Hu,{onSelect:I=>{I.preventDefault(),S("pillar")},children:[u.jsx(w1,{as:XN}),"Add pillar article"]}),u.jsxs(Hu,{onSelect:I=>{I.preventDefault(),S("supporting")},children:[u.jsx(w1,{as:Q1}),"Add support article"]})]}),u.jsxs("div",{className:Et("bg-bg-white-0","w-[min(380px,calc(100vw-2rem))] shrink-0 min-w-0 border-l border-stroke-soft-200",s==="root"&&"h-0 min-h-0 overflow-hidden border-l-0 p-0 opacity-0 pointer-events-none"),onPointerDownCapture:()=>o(),children:[u.jsxs("button",{type:"button",onClick:()=>a("root"),className:"text-text-sub-600 hover:text-text-strong-950 hover:bg-bg-weak-50 flex w-full items-center gap-1 px-3 py-2.5 text-left text-label-sm transition-colors",children:[u.jsx(Qs,{className:"size-4 shrink-0","aria-hidden":!0}),"Back"]}),u.jsx("div",{className:"border-stroke-soft-200 border-t px-2 pb-2",children:u.jsxs("div",{className:"border-stroke-soft-200 bg-bg-weak-50 mt-2 flex items-center gap-2 rounded-lg border px-2.5 py-1.5",children:[u.jsx(Dne,{className:"text-text-sub-600 size-4 shrink-0","aria-hidden":!0}),u.jsx("input",{type:"search",value:d,onChange:I=>f(I.target.value),placeholder:"Search keywordsâ¦",className:"text-paragraph-sm placeholder:text-text-sub-600 min-w-0 flex-1 border-0 bg-transparent outline-none"})]})}),u.jsxs("div",{className:"border-stroke-soft-200 max-h-[280px] min-h-[100px] overflow-y-auto border-t",children:[C&&u.jsx("div",{className:"flex justify-center py-8",children:u.jsx(Wa,{className:"size-6"})}),!C&&!_&&u.jsxs("div",{className:"flex flex-col items-center px-4 py-6 text-center",children:[ICt,u.jsx("p",{className:"text-text-sub-600 mt-4 max-w-[260px] text-paragraph-sm",children:"No keyword lists have been created yet. Create a keyword list to enable this functionality."}),u.jsx(ra,{to:"/keyword-lists",className:"text-text-strong-950 hover:text-primary-base mt-3 text-label-sm font-medium underline-offset-2 hover:underline",onClick:()=>t(!1),children:"Create a keyword list"})]}),!C&&_&&A.map(I=>u.jsx(LCt,{list:I,search:d,expanded:p.has(I.id),onToggle:()=>E(I.id),onPickKeyword:F=>void j(I.id,F),disabled:y},I.id)),!C&&_&&A.length===0&&u.jsx("p",{className:"text-text-sub-600 px-4 py-6 text-center text-paragraph-sm",children:"No lists match your search."})]}),u.jsx("div",{className:"border-stroke-soft-200 border-t p-2",children:u.jsxs("button",{type:"button",disabled:y,onClick:()=>void N(),className:"text-text-strong-950 hover:bg-bg-weak-50 flex w-full items-center gap-2 rounded-lg px-2 py-2.5 text-left text-label-sm transition-colors disabled:opacity-50",children:[y?u.jsx(Wa,{className:"size-4 shrink-0"}):u.jsx(O,{className:"text-text-sub-600 size-4 shrink-0","aria-hidden":!0}),T]})})]})]})})})}function $Ct(e){return e===Dt.COMPLETED?"completed":e===Dt.FAILED?"failed":"pending"}
697function zCt({id:e,data:t,selected:n}){var Y,X,Q,ne,ie,se,oe;const{mapNode:r,topicRouteDisplay:i,onCreateArticle:o,createArticlePending:s,onRetryArticle:a,retryArticlePending:l,onAddChild:c,onCreateArticleChildFromPicker:d,onEnterArticlePicker:f,onSuppressPickerGhostClicks:p,onOpenNodeDetail:m,onDeletePendingNode:y,onDeleteFailedNode:v,hasOutgoingChildren:b,pipelineSlotsFull:C=!1}=t,[S,E]=x.useState(!1),[A,_]=x.useState(!1),N=r.type==="topic",j=N?((Y=r.label)==null?void 0:Y.trim())||"Topic":((X=r.keyword)==null?void 0:X.trim())||((Q=r.label)==null?void 0:Q.trim())||"Untitled node",T=!!((ne=r.keyword)!=null&&ne.trim()),O=r.article,D=O&&!Tve(r),R=!!c,I=e.startsWith("pending-node-"),F=N&&I,$=N&&!!b,H=!I&&!$,L=I?"Save with Apply before editing":$?"Locked: this topic has content below it":"",B="bg-success-base text-static-white flex size-6 items-center justify-center rounded-full shadow-md ring-2 ring-bg-white-0 transition-opacity hover:opacity-90",z="absolute -right-1 -bottom-1 z-10 inline-flex",V=i!=null&&i.slug?u.jsxs("p",{className:"text-text-sub-600 mt-1 flex min-w-0 flex-wrap items-center gap-0.5 font-mono text-label-xs",children:[i.prefix==="/"?u.jsx("span",{className:"shrink-0",children:"/"}):i.prefix?u.jsxs("span",{className:"min-w-0 truncate",children:[i.prefix,"/"]}):null,u.jsx(Ri,{variant:"lighter",color:"gray",size:"small",className:"max-w-full shrink truncate normal-case",children:i.slug})]}):u.jsx("p",{className:"text-text-sub-600 mt-1 truncate font-mono text-label-xs",children:((ie=r.routeUrl)==null?void 0:ie.trim())||"/"}),U=u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-2 flex items-center gap-1.5",children:[u.jsx(Mne,{className:"text-text-sub-600 size-4","aria-hidden":!0}),u.jsx("span",{className:"text-label-xs text-text-sub-600 uppercase",children:"Topic"})]}),u.jsx("p",{className:"text-label-sm text-text-strong-950 font-semibold",children:j}),V]}),W=I&&!!y,G=u.jsxs("div",{className:Et("bg-bg-white-0 border-stroke-soft-200 relative min-w-[200px] max-w-[260px] rounded-xl border p-3 shadow-sm",n&&"ring-2 ring-primary-base ring-offset-2",D&&"opacity-80"),children:[(()=>{const J=u.jsx("button",{type:"button","data-content-map-edit":!0,disabled:!H,title:H?"Edit in sidebar":L,"aria-label":H?"Edit in sidebar":L||"Edit",className:Et("text-text-sub-600 hover:text-text-strong-950 absolute top-2 right-2 z-10 flex size-7 items-center justify-center rounded-lg transition-opacity",H?"hover:bg-bg-weak-50 opacity-80 hover:opacity-100":"cursor-not-allowed opacity-40"),onPointerDown:ae=>ae.stopPropagation(),onClick:ae=>{ae.stopPropagation(),H&&m(e)},children:u.jsx(_Se,{className:"size-4","aria-hidden":!0})});return $?u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:J}),u.jsx(ns,{side:"top",sideOffset:6,align:"end",size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:"You can't edit this topic while there are pillars, supporting pages, or articles connected below it. Editing the title would change the URL of every article underneath it. Disconnect or delete the content below first."})]}):J})(),W&&u.jsx("button",{type:"button",title:"Discard unsaved node","aria-label":"Discard unsaved node",className:"text-text-sub-600 hover:text-error-base hover:bg-error-lighter absolute top-2 right-10 z-10 flex size-7 items-center justify-center rounded-lg opacity-80 transition-opacity hover:opacity-100",onPointerDown:J=>J.stopPropagation(),onClick:J=>{J.stopPropagation(),y==null||y(e)},children:u.jsx(Bs,{className:"size-4","aria-hidden":!0})}),u.jsx(Q0,{type:"target",position:Qe.Top,className:"!size-2 !border-stroke-soft-200 !bg-bg-white-0"}),N?F?u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("div",{className:"w-full cursor-default",children:U})}),u.jsx(ns,{side:"bottom",sideOffset:36,align:"center",avoidCollisions:!1,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:"This topic is not saved yet. Use Apply changes to save it before you can edit it in the sidebar."})]}):U:u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-2 flex items-center gap-1.5",children:[r.type==="pillar"?u.jsx(XN,{className:"size-4 text-primary-base","aria-hidden":!0}):u.jsx(Q1,{className:"text-text-sub-600 size-4","aria-hidden":!0}),u.jsx("span",{className:"text-label-xs text-text-sub-600 uppercase",children:r.type==="pillar"?"Pillar":"Supporting"})]}),u.jsx("p",{className:"text-label-sm text-text-strong-950 line-clamp-2 font-medium",children:j}),(r.searchVolume!=null||r.difficulty!=null||r.trafficPotential!=null)&&u.jsxs("div",{className:"text-text-sub-600 mt-2 flex flex-wrap gap-2 text-label-xs",children:[r.searchVolume!=null&&u.jsxs("span",{title:"Search volume",children:["Vol ",r.searchVolume.toLocaleStr
697ing()]}),r.difficulty!=null&&u.jsxs("span",{className:"inline-flex items-center gap-1",title:"Keyword difficulty",children:[u.jsx("span",{className:"size-1.5 rounded-full",style:{backgroundColor:BS(r.difficulty)}}),"KD ",r.difficulty]}),r.trafficPotential!=null&&u.jsxs("span",{title:"Traffic potential",children:["TP ",r.trafficPotential.toLocaleString()]})]}),O&&O.status===Dt.COMPLETED&&u.jsxs(ra,{to:`/articles/${O.id}`,onPointerDown:J=>J.stopPropagation(),onClick:J=>J.stopPropagation(),className:"bg-bg-weak-50 hover:bg-bg-weak-50 mt-3 flex items-center gap-2.5 rounded-lg p-2 transition-colors group",children:[u.jsx("span",{className:"bg-success-lighter text-success-base flex size-8 shrink-0 items-center justify-center rounded-lg",children:u.jsx(Q1,{className:"size-4","aria-hidden":!0})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"text-label-xs text-text-strong-950 truncate font-semibold",children:((se=O.title)==null?void 0:se.trim())||((oe=r.keyword)==null?void 0:oe.trim())||"Article"}),u.jsx("p",{className:"text-text-sub-600 text-label-xs group-hover:text-primary-base group-hover:underline",children:"View Article"})]})]}),u.jsx("div",{className:"mt-3 border-t border-stroke-soft-200 pt-2",children:O?D?(()=>{const J=PCt(O.status);return u.jsxs("div",{className:"flex flex-col gap-1.5","aria-live":"polite",children:[u.jsxs("div",{className:"text-text-sub-600 flex items-center justify-between gap-2 text-label-xs",children:[u.jsxs("span",{className:"inline-flex min-w-0 items-center gap-1.5",children:[u.jsx(Wa,{className:"size-3 shrink-0"}),u.jsx("span",{className:"truncate",children:J.label})]}),J.step!=null&&J.totalSteps!=null&&u.jsxs("span",{className:"text-text-soft-400 shrink-0 tabular-nums",children:[J.step,"/",J.totalSteps]})]}),u.jsx("div",{className:"bg-bg-weak-50 h-1 w-full overflow-hidden rounded-full",role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":J.percent,"aria-label":`Article generation: ${J.label}`,children:u.jsx("div",{className:"bg-primary-base h-full rounded-full transition-[width] duration-500 ease-out motion-reduce:transition-none",style:{width:`${J.percent}%`}})})]})})():O.status===Dt.FAILED?u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(c5,{variant:"light",status:"failed",asChild:!0,className:"flex-1",children:u.jsxs("button",{type:"button",title:C?Ua:l?"Retryingâ¦":"Retry article generation","aria-label":C?Ua:l?"Retrying article generation":"Retry article generation",disabled:l||A||C,onPointerDown:J=>J.stopPropagation(),onClick:J=>{J.stopPropagation(),a==null||a(e)},className:"focus-visible:ring-error-base w-full cursor-pointer transition-opacity hover:opacity-70 focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:outline-none disabled:cursor-default disabled:opacity-70",children:[l?u.jsx("span",{"aria-hidden":!0,className:"-mx-1 inline-block size-3.5 animate-spin rounded-full border-2 border-current/30 border-t-current motion-reduce:animate-none"}):u.jsx(F1,{as:Pne}),l?"Retrying":"Failed"]})}),v&&u.jsx("button",{type:"button",title:"Delete node","aria-label":"Delete node",disabled:l||A,onPointerDown:J=>J.stopPropagation(),onClick:J=>{J.stopPropagation(),_(!0),v(e).finally(()=>_(!1))},className:"text-text-soft-400 hover:text-error-base flex size-6 shrink-0 items-center justify-center rounded-md transition-colors disabled:pointer-events-none disabled:opacity-50",children:A?u.jsx("span",{"aria-hidden":!0,className:"inline-block size-3.5 animate-spin rounded-full border-2 border-current/30 border-t-current motion-reduce:animate-none"}):u.jsx(Bs,{className:"size-3.5","aria-hidden":!0})})]}),O.slug&&u.jsxs("span",{className:"text-text-sub-600 truncate text-label-xs",children:["/",O.slug]})]}):u.jsxs("div",{className:"flex flex-col gap-1",children:[u.jsxs(c5,{variant:"light",status:$Ct(O.status),children:[u.jsx(q1e,{}),O.status.replace(/_/g," ")]}),O.slug&&u.jsxs("span",{className:"text-text-sub-600 truncate text-label-xs",children:["/",O.slug]})]}):u.jsx("div",{className:"flex flex-col gap-2",children:T?C?u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{className:"inline-flex w-full",children:u.jsx(Re,{variant:"primary",mode:"filled",size:"small",className:"w-full",disabled:!0,type:"button",children:"Create article"})})}),u.jsx(ns,{side:"top",sideOffset:6,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:Ua})]}):u.jsx(Re,{variant:"primary",mode:"filled",size:"small",className:"w-full",disabled:s||D,onClick:J=>{J.stopPropagation(),o==null||o(e)},children:s?u.jsxs(u.Fragment,{children:[u.jsx(Wa,{className:"size-3.5"})," Startingâ¦"]}):"Create article"}):u.jsx("span",{className:"inline-flex w-full",title:"Add a keyword to create an article",children:u.jsx(Re,{variant:"neutral",mode:"stroke",size:"small",className:"w-full",disabled:!0,children:"Create article"})})})})]}),u.jsx(Q0,{type:"source",position:Qe.Bottom,className:"!size-2 !border-stroke-soft-200 !bg-bg-white-0"}),R&&!F&&u.jsxs(dm,{open:S,onOpenChange:E,children:[u.jsx(qf,{asChild:!0,children:u.jsx("button",{type:"button",className:Et(z,B),"aria-label":"Add child","aria-expanded":S,onPointerDown:J=>J.stopPropagation(),onClick:J=>J.stopPropagation(),children:u.jsx(Pi,{className:"size-4","aria-hidden":!0})})}),u.jsx(hh,{align:"end",side:"bottom",sideOffset:6,className:"min-w-0 p-0",children:u.jsx(Mve,{open:S,onOpenChange:E,onAddTopic:()=>c==null?void 0:c(e,"topic"),onCreateArticleChild:(J,ae)=>
697d(e,J,ae),onEnterArticlePicker:f,onSuppressPickerGhostClicks:p})})]}),R&&F&&u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{className:Et(z,"cursor-not-allowed"),tabIndex:0,"aria-label":"Save topic before adding linked content",children:u.jsx("button",{type:"button","aria-disabled":"true",className:Et(B,"cursor-not-allowed opacity-50"),onPointerDown:J=>J.stopPropagation(),onClick:J=>{J.preventDefault(),J.stopPropagation()},children:u.jsx(Pi,{className:"size-4","aria-hidden":!0})})})}),u.jsx(ns,{side:"bottom",sideOffset:10,align:"center",avoidCollisions:!1,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:"Save this topic with Apply before you can add pillars, supporting articles, or other topics to it."})]})]});return F?u.jsx(qu,{delayDuration:0,children:G}):G}function FCt({onPick:e,emptyCtaHref:t="/keyword-lists",emptyCtaLabel:n="Create a keyword list",disabled:r=!1}){const[i,o]=x.useState(""),[s,a]=x.useState(new Set),{data:l,isLoading:c}=kv(),d=x.useMemo(()=>{const m=l??[],y=i.trim().toLowerCase();return y?m.filter(v=>v.name.toLowerCase().includes(y)||(v.keywords??[]).some(b=>b.keyword.toLowerCase().includes(y))):m},[l,i]);x.useEffect(()=>{const m=i.trim().toLowerCase();m&&a(y=>{const v=new Set(y);for(const b of d)(b.keywords??[]).some(C=>C.keyword.toLowerCase().includes(m))&&v.add(b.id);return v})},[i,d]);const f=m=>{a(y=>{const v=new Set(y);return v.has(m)?v.delete(m):v.add(m),v})},p=((l==null?void 0:l.length)??0)>0;return u.jsxs("div",{className:"bg-bg-white-0 w-[min(380px,calc(100vw-2rem))]",children:[u.jsx("div",{className:"px-2 pb-2 pt-2",children:u.jsxs("div",{className:"border-stroke-soft-200 bg-bg-weak-50 flex items-center gap-2 rounded-lg border px-2.5 py-1.5",children:[u.jsx(Dne,{className:"text-text-sub-600 size-4 shrink-0","aria-hidden":!0}),u.jsx("input",{type:"search",value:i,onChange:m=>o(m.target.value),placeholder:"Search keywordsâ¦",className:"text-paragraph-sm placeholder:text-text-sub-600 min-w-0 flex-1 border-0 bg-transparent outline-none"})]})}),u.jsxs("div",{className:"border-stroke-soft-200 max-h-[280px] min-h-[100px] overflow-y-auto border-t",children:[c&&u.jsx("div",{className:"flex justify-center py-8",children:u.jsx(Wa,{className:"size-6"})}),!c&&!p&&u.jsxs("div",{className:"flex flex-col items-center px-4 py-6 text-center",children:[u.jsx("p",{className:"text-text-sub-600 max-w-[260px] text-paragraph-sm",children:"No keyword lists yet. Create one to pick a keyword for this pillar."}),u.jsx(ra,{to:t,className:"text-text-strong-950 hover:text-primary-base mt-3 text-label-sm font-medium underline-offset-2 hover:underline",children:n})]}),!c&&p&&d.map(m=>u.jsx(BCt,{list:m,search:i,expanded:s.has(m.id),onToggle:()=>f(m.id),onPickKeyword:y=>e({listId:m.id,item:y}),disabled:r},m.id)),!c&&p&&d.length===0&&u.jsx("p",{className:"text-text-sub-600 px-4 py-6 text-center text-paragraph-sm",children:"No lists match your search."})]})]})}function BCt({list:e,search:t,expanded:n,onToggle:r,onPickKeyword:i,disabled:o}){const s=x.useMemo(()=>{const a=e.keywords??[],l=t.trim().toLowerCase();return l?a.filter(c=>c.keyword.toLowerCase().includes(l)):a},[e.keywords,t]);return u.jsxs("div",{className:"border-stroke-soft-200 border-b last:border-b-0",children:[u.jsxs("button",{type:"button",onClick:r,className:"text-text-strong-950 hover:bg-bg-weak-50 flex w-full items-center justify-between gap-2 px-3 py-2.5 text-left text-label-sm transition-colors",children:[u.jsx("span",{className:"truncate",children:e.name}),u.jsxs("span",{className:"text-text-sub-600 flex shrink-0 items-center gap-1.5 text-label-xs",children:[u.jsx(Qs,{className:Et("size-4 shrink-0 transition-transform duration-200 ease-out",n?"rotate-90":"-rotate-90"),"aria-hidden":!0}),(e.keywords??[]).length]})]}),u.jsx("div",{className:Et("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none",n?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:u.jsx("div",{className:Et("min-h-0 overflow-hidden",!n&&"pointer-events-none"),"aria-hidden":!n,children:u.jsxs("div",{className:"max-h-48 overflow-y-auto px-2 pb-2",children:[s.map(a=>u.jsxs("button",{type:"button",disabled:o,onClick:()=>i(a),className:"hover:bg-bg-weak-50 flex w-full items-center justify-between gap-2 rounded-lg px-2 py-2 text-left transition-colors disabled:opacity-50",children:[u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 truncate",children:a.keyword}),u.jsxs("div",{className:"flex shrink-0 items-center gap-1.5",children:[u.jsxs("span",{className:"bg-information-lighter text-information-base inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-label-xs font-medium",children:[u.jsx(jne,{className:"size-3.5","aria-hidden":!0}
697),a.searchVolume.toLocaleString()]}),u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-green-100 px-2 py-0.5 text-label-xs font-medium text-green-800 dark:bg-green-950/40 dark:text-green-200",children:[u.jsx("span",{className:"size-1.5 rounded-full",style:{backgroundColor:BS(a.difficulty)}}),a.difficulty]})]})]},`${e.id}-${a.keyword}`)),s.length===0&&u.jsx("p",{className:"text-text-sub-600 px-2 py-2 text-center text-paragraph-xs",children:"No matching keywords"})]})})})]})}function HCt(e,t,n,r){const i=new Map;for(const d of r)i.set(d.targetNodeId,d.sourceNodeId);const o=[],s=new Set;let a=i.get(e);for(;a&&!s.has(a);){s.add(a);const d=n.find(f=>f.id===a);if(!d)break;o.push(d),a=i.get(a)}o.reverse();const c=[...o.filter(d=>d.type==="topic").map(d=>jve(d)).filter(d=>d.length>0),t].filter(Boolean);return c.length>0?"/"+c.join("/"):"/"}const ji={white:"#ffffff",weakBg:"#f5f5f5",softBorder:"#e5e5e5",softBg:"#e5e5e5",textStrong:"#0a0a0a",textSub:"#525252",textSoft:"#a3a3a3",focusRing:"#0a0a0a"},VCt={control:(e,t)=>({...e,minHeight:"36px",fontSize:"0.875rem",fontFamily:"inherit",backgroundColor:t.isDisabled?ji.weakBg:ji.white,borderRadius:"8px",border:"none",boxShadow:t.isFocused?`0 0 0 1.5px ${ji.focusRing}`:`0 0 0 1px ${ji.softBorder}, 0 1px 2px rgba(0,0,0,0.04)`,transition:"box-shadow 0.2s ease, background-color 0.2s ease","&:hover":{backgroundColor:ji.weakBg,boxShadow:"0 0 0 1px transparent"},cursor:"pointer"}),valueContainer:e=>({...e,padding:"3px 8px"}),singleValue:e=>({...e,color:ji.textStrong}),menu:e=>({...e,borderRadius:"12px",border:`1px solid ${ji.softBorder}`,boxShadow:"0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04)",overflow:"hidden",zIndex:9999}),menuList:e=>({...e,padding:"6px"}),option:(e,t)=>({...e,fontSize:"0.875rem",fontFamily:"inherit",borderRadius:"8px",padding:"6px 8px",backgroundColor:t.isFocused?ji.weakBg:"transparent",color:ji.textStrong,cursor:"pointer","&:active":{backgroundColor:ji.softBg}}),placeholder:e=>({...e,color:ji.textSub,fontSize:"0.875rem",fontFamily:"inherit"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:ji.textSoft,padding:"0 6px","&:hover":{color:ji.textSub}}),clearIndicator:e=>({...e,color:ji.textSoft,padding:"0 4px","&:hover":{color:ji.textSub}})},UCt=x.memo(function({value:t,onChange:n}){const{data:r=[],isLoading:i}=A5(),o=x.useMemo(()=>{const a=r.map(c=>({value:c.slug,label:c.name})),l=a.some(c=>c.value===t);return t&&!l?[{value:t,label:t},...a]:a},[r,t]),s=x.useMemo(()=>t?o.find(a=>a.value===t)??null:null,[o,t]);return u.jsx(JI,{inputId:"topic-tag",isClearable:!0,isLoading:i,options:o,value:s,onChange:a=>n((a==null?void 0:a.value)??""),placeholder:i?"Loading tagsâ¦":"Select a tag",noOptionsMessage:()=>"No tags found in Ghost",styles:VCt,menuPosition:"fixed"})});function qCt({map:e,selectedNodeId:t,onClose:n,createArticlePendingNodeId:r,onCreateArticle:i,hasOutgoingChildren:o,onRetryArticle:s,retryArticlePending:a=!1,pipelineSlotsFull:l=!1,onMapMutationSuccess:c}){var Or,wr,en,Rr,tr;const[d]=gne(),[f]=yne(),p=am(),m=x.useCallback(De=>{T(De?`/${De}`:""),D("")},[]),{data:y}=lne({page:1,pageSize:100}),v=br(),{integrations:{data:b}}=al(),C=!!(b!=null&&b.some(De=>De.type===ll.GHOST)),S=e.nodes.find(De=>De.id===t),[E,A]=x.useState(""),[_,N]=x.useState(""),[j,T]=x.useState(""),[O,D]=x.useState(""),[R,I]=x.useState(!1),[F,$]=x.useState(null),[H,L]=x.useState(!1),[B,z]=x.useState(!1),V=(S==null?void 0:S.label)??"",U=(S==null?void 0:S.routeUrl)??"",W=zp(U);x.useEffect(()=>{S&&(A(S.keyword??""),N(S.label??""),T(S.routeUrl??""),D(""),$(null),z(!1))},[S==null?void 0:S.id,S==null?void 0:S.keyword,S==null?void 0:S.label,S==null?void 0:S.routeUrl]);const[G,Y]=x.useState(0),[X,Q]=x.useState(!1),[ne,ie]=x.useState(!1);if(x.useEffect(()=>{Q(!1),ie(!1)},[S==null?void 0:S.id]),!S)return null;const se=async()=>{const De={mapId:e.id,nodeId:S.id,label:_.trim()||null};if(C){const Yt=j.trim()||O.trim(),Xt=H1(Yt);De.routeUrl=Xt?`/${Xt}`:null}I(!0);try{const Yt=await d(De).unwrap();c?c(Yt):p(Yn.util.upsertQueryData("getContentMap",void 0,Yt)),ze.success("Topic updated"),D("")}catch{ze.error("Failed to update topic")}finally{I(!1)}},oe=()=>{N((S==null?void 0:S.label)??""),T((S==null?void 0:S.routeUrl)??""),D("")},J=async()=>{try{await d({mapId:e.id,nodeId:S.id,keyword:E.trim()||null,label:_.trim()||null}).unwrap(),ze.success("Node updated")}catch{ze.error("Failed to update node")}},ae=async De=>{try{await d({mapId:e.id,nodeId:S.id,type:De}).unwrap()}catch{ze.error("Failed to update type")}},re=async De=>{if(!(e.nodes.find(Xt=>Xt.id!==S.id&&Xt.articleId===De)&&!window.confirm("This article is already linked to another node on the map. Link it here too?")))try{await d({mapId:e.id,nodeId:S.id,articleId:De}).unwrap(),ze.success("Article linked"),Y(Xt=>Xt+1)}catch{ze.error("Failed to link article")}},pe=async()=>{try{await d({mapId:e.id,nodeId:S.id,articleId:null}).unwrap(),ze.success("Article unlinked")}catch{ze.error("Failed to unlink")}},be=async()=>{var De;if(o){ze.error("Remove everything connected below this node first, then you can delete it."),Q(!1);return}ie(!0);try{await f({mapId:e.id,nodeId:S.id}).unwrap(),ze.success("Node removed from the map."),Q(!1),n()}catch(Yt){const Xt=typeof Yt=="object"&&Yt!==null&&"data"in Yt?(De=Yt.data)==null?void 0:De.message:void 0;ze.error((Xt==null?void 0:Xt.trim())||"Failed to delete node")}finally{ie(!1)}},xe=S.type==="topic",ke=S.type==="pillar",Pe=S.type==="supporting",it=ke||Pe,qe=S.article?y==null?void 0:y.data.find(De=>
697De.id===S.article.id):void 0,$n=it&&!!S.article,Vt=(F==null?void 0:F.type)==="set"?F.item.keyword:(F==null?void 0:F.type)==="clear"?null:S.keyword,ee=(()=>{if((F==null?void 0:F.type)==="set"){const De=F.item;return{intent:De.intent??null,difficulty:De.difficulty??null,trafficPotential:S.trafficPotential,searchVolume:De.searchVolume??null}}return(F==null?void 0:F.type)==="clear"?{intent:null,difficulty:null,trafficPotential:null,searchVolume:null}:{intent:S.intent,difficulty:S.difficulty,trafficPotential:S.trafficPotential,searchVolume:S.searchVolume}})(),ue=it&&F!==null,me=De=>{$({type:"set",listId:De.listId,item:De.item}),z(!1)},je=()=>{$({type:"clear"})},Ae=()=>{$(null)},_e=async()=>{if(F){L(!0);try{if(F.type==="clear")await d({mapId:e.id,nodeId:S.id,keyword:null,searchVolume:null,difficulty:null,cpc:null,intent:null,sourceKeywordListId:null}).unwrap();else{const De=F.item;await d({mapId:e.id,nodeId:S.id,keyword:De.keyword,searchVolume:De.searchVolume??null,difficulty:De.difficulty??null,cpc:De.cpc??null,intent:De.intent??null,sourceKeywordListId:F.listId}).unwrap()}ze.success(Pe?"Supporting page updated":"Pillar updated"),$(null)}catch{ze.error(Pe?"Failed to update supporting page":"Failed to update pillar")}finally{L(!1)}}},Oe=S.type==="topic"?((Or=S.label)==null?void 0:Or.trim())||"Topic":((wr=S.keyword)==null?void 0:wr.trim())||((en=S.label)==null?void 0:en.trim())||"Untitled node",dt=zp(j)||H1(O)||H1(_),vt=xe?HCt(S.id,dt,e.nodes,e.edges):"",Kt=xe&&(_.trim()!==V.trim()||C&&(zp(j)!==W||O.trim().length>0));return u.jsxs(u.Fragment,{children:[xe?u.jsxs("aside",{className:"flex h-full w-[min(100%,380px)] shrink-0 flex-col bg-bg-white-0",children:[u.jsxs("div",{className:"flex items-start justify-between gap-2 px-5 pt-5 pb-4",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"text-label-md text-text-strong-950 font-semibold",children:"Topic Details"}),u.jsx("p",{className:"text-text-sub-600 text-paragraph-sm mt-0.5",children:"Configure your topic's details"})]}),u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:n,"aria-label":"Close panel",children:u.jsx(wt,{as:Hf})})]}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[u.jsx(Yi,{variant:"solid-text",children:"GENERAL"}),u.jsxs("div",{className:"px-5 py-4",children:[u.jsxs(It,{htmlFor:"topic-title",className:"gap-1",children:["Title",u.jsx(ss,{}),u.jsxs(gre,{children:["(Topic url - ",vt,")"]})]}),u.jsx(Tn,{size:"medium",className:"mt-1.5",children:u.jsx(Vn,{children:u.jsx(Mn,{id:"topic-title",value:_,onChange:De=>N(De.target.value),placeholder:"e.g. New Topic"})})})]}),C&&u.jsxs(u.Fragment,{children:[u.jsx(Yi,{variant:"solid-text",children:"GHOST INTEGRATION"}),u.jsxs("div",{className:"px-5 py-4",children:[u.jsxs(It,{htmlFor:"topic-tag",className:"gap-1",children:["Tag",u.jsx(ss,{})]}),u.jsxs("div",{className:"mt-1.5 flex items-start gap-2",children:[u.jsx("div",{className:"min-w-0 flex-1",children:u.jsx(UCt,{value:zp(j),onChange:m})}),u.jsx(qu,{delayDuration:150,children:u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("button",{type:"button","aria-label":"What is this tag?",className:"text-text-soft-400 hover:text-text-sub-600 inline-flex h-9 shrink-0 items-center",children:u.jsx(Rne,{className:"size-4","aria-hidden":!0})})}),u.jsx(ns,{side:"top",sideOffset:8,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:"The tag becomes the URL segment for this topic and is used to map articles to a route on your Ghost blog."})]})})]}),u.jsxs("p",{className:"text-text-sub-600 text-paragraph-sm mt-2",children:["A tag maps to a route for example on your Ghost blog. For example, here,"," ",vt!=="/"?vt:"/blog/shopify","/your-article-slug."," ","You need a"," ",u.jsx("code",{className:"bg-bg-weak-50 rounded px-1 py-0.5 font-mono text-[0.75em]",children:"routes.yaml"})," ","setup in Ghost for this to work correctly â"," ",u.jsx("a",{href:"https://docs.ghost.org/themes/routing",target:"_blank",rel:"noopener noreferrer",className:"text-primary-base hover:text-primary-darker underline",children:"see Ghost routing docs"}),"."]})]})]})]}),!o&&u.jsx("div",{className:"px-5 pb-3 pt-4",children:u.jsxs("button",{type:"button",onClick:()=>Q(!0),className:"bg-red-alpha-10 text-error-base hover:bg-red-alpha-16 flex w-full items-center justify-center gap-1.5 rounded-xl px-4 py-2.5 text-label-sm font-medium transition-colors",children:[u.jsx(Bs,{className:"size-4 shrink-0","aria-hidden":!0}),"Delete topic"]})}),u.jsxs("div",{className:"border-stroke-soft-200 bg-bg-white-0 flex items-center gap-3 border-t px-5 py-4",children:[u.jsx(Re,{variant:"neutral",mode:"stroke",size:"medium",className:"flex-1",onClick:oe,disabled:!Kt||R,children:"Discard"}),u.jsx(Re,{variant:"primary",mode:"filled",size:"medium",className:"flex-1",onClick:()=>void se(),disabled:!Kt||R,children:R?u.jsxs(u.Fragment,{children:[u.jsx(Wa,{className:"size-4 shrink-0 border-static-white/30 border-t-static-white"}),"Savingâ¦"]}):"Save Details"})]})]}):it?u.jsx(WCt,{node:S,coverImageUrl:(qe==null?void 0:qe.coverImageUrl)??null,articleSlug:(qe==null?void 0:qe.slug)??((Rr=S.article)==null?void 0:Rr.slug)??null,hasLinkedArticle:$n,effectiveKeyword:Vt,effectiveMetrics:ee,pickerOpen:B,onPickerOpenChange:z,onPickKeyword:me,onClearKeyword:je,hasChanges:ue,saving:H,onDiscard:Ae,onSave:()=>void _e(),onClose:n,onEditArticle:()=>
697{S.article&&v(`/articles/${S.article.id}`)},onRetryArticle:()=>s==null?void 0:s(S.id),retryArticlePending:a,pipelineSlotsFull:l,onRequestDelete:()=>Q(!0)}):u.jsxs("aside",{className:Et("flex h-full w-[min(100%,380px)] shrink-0 flex-col bg-bg-white-0"),children:[u.jsxs("div",{className:"border-stroke-soft-200 flex items-center justify-between gap-2 border-b px-4 py-3",children:[u.jsx("h2",{className:"text-label-sm text-text-strong-950 font-semibold",children:"Node details"}),u.jsx(Re,{variant:"neutral",mode:"ghost",size:"small",onClick:n,"aria-label":"Close panel",children:u.jsx(wt,{as:Hf})})]}),u.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-4",children:u.jsxs("div",{className:"flex flex-col gap-4",children:[u.jsxs("div",{children:[u.jsx(It,{children:"Type"}),u.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[u.jsx(Re,{variant:S.type==="topic"?"primary":"neutral",mode:S.type==="topic"?"filled":"stroke",size:"small",onClick:()=>void ae("topic"),children:"Topic"}),u.jsx(Re,{variant:S.type==="pillar"?"primary":"neutral",mode:S.type==="pillar"?"filled":"stroke",size:"small",onClick:()=>void ae("pillar"),children:"Pillar"}),u.jsx(Re,{variant:S.type==="supporting"?"primary":"neutral",mode:S.type==="supporting"?"filled":"stroke",size:"small",onClick:()=>void ae("supporting"),children:"Supporting"})]})]}),u.jsxs("div",{children:[u.jsx(It,{htmlFor:"node-keyword",children:"Keyword"}),u.jsx(Tn,{size:"medium",className:"mt-1",children:u.jsx(Vn,{children:u.jsx(Mn,{id:"node-keyword",value:E,onChange:De=>A(De.target.value),placeholder:"Target keyword"})})})]}),u.jsxs("div",{children:[u.jsx(It,{htmlFor:"node-label",children:"Label (optional)"}),u.jsx(Tn,{size:"medium",className:"mt-1",children:u.jsx(Vn,{children:u.jsx(Mn,{id:"node-label",value:_,onChange:De=>N(De.target.value),placeholder:"Short label if no keyword"})})})]}),u.jsx(Re,{variant:"primary",mode:"filled",size:"small",onClick:()=>void J(),children:"Save keyword & label"}),(S.searchVolume!=null||S.difficulty!=null||S.trafficPotential!=null)&&u.jsxs("div",{className:"text-text-sub-600 text-paragraph-sm space-y-1 rounded-lg bg-bg-weak-50 p-3",children:[S.searchVolume!=null&&u.jsxs("p",{children:["Volume: ",S.searchVolume.toLocaleString()]}),S.difficulty!=null&&u.jsxs("p",{children:["Difficulty: ",S.difficulty]}),S.trafficPotential!=null&&u.jsxs("p",{children:["Traffic potential: ",S.trafficPotential.toLocaleString()]}),S.intent&&u.jsxs("p",{children:["Intent: ",S.intent]})]}),(S.sourceKeywordListId||S.sourceKeywordReportId)&&u.jsxs("p",{className:"text-text-sub-600 text-paragraph-xs",children:["Source:"," ",S.sourceKeywordListId?"Keyword list (reference clears if the list is deleted; metrics stay on the node)":"Keyword report"]}),u.jsxs("div",{className:"border-stroke-soft-200 space-y-2 border-t pt-4",children:[u.jsx(It,{children:"Linked article"}),S.article?u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-label-sm text-text-strong-950",children:S.article.title||S.article.keyword}),u.jsxs("p",{className:"text-text-sub-600 text-paragraph-xs",children:["Status: ",S.article.status]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(ra,{to:`/articles/${S.article.id}`,className:"text-label-sm text-primary-base hover:underline",children:"Open article"}),u.jsx(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:()=>void pe(),children:"Unlink"})]})]}):u.jsxs(u.Fragment,{children:[u.jsxs("select",{className:"border-stroke-soft-200 bg-bg-white-0 text-paragraph-sm w-full rounded-lg border px-3 py-2",defaultValue:"",onChange:De=>{const Yt=De.target.value;Yt&&re(Yt)},children:[u.jsx("option",{value:"",children:"Link existing articleâ¦"}),((y==null?void 0:y.data)??[]).map(De=>u.jsxs("option",{value:De.id,children:[De.keyword,De.title?` â ${De.title}`:""]},De.id))]},G),l?u.jsx(qu,{delayDuration:150,children:u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{className:"inline-flex w-full",children:u.jsx(Re,{variant:"primary",mode:"filled",size:"small",className:"w-full",disabled:!0,type:"button",children:"Create article from keyword"})})}),u.jsx(ns,{side:"top",sideOffset:8,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:Ua})]})}):u.jsx(Re,{variant:"primary",mode:"filled",size:"small",className:"w-full",disabled:!((tr=S.keyword)!=null&&tr.trim())||!!r,onClick:()=>i(S.id),children:r===S.id?"Startingâ¦":"Create article from keyword"})]})]}),o?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"text-paragraph-xs text-text-sub-600",children:"This node has content below it on the map. Disconnect or delete those nodes first."}
697),u.jsx(qu,{delayDuration:0,children:u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{className:"inline-flex w-full cursor-not-allowed",children:u.jsxs(Re,{type:"button",variant:"error",mode:"stroke",size:"small",className:"pointer-events-none w-full",disabled:!0,"aria-disabled":!0,children:[u.jsx(wt,{as:Bs}),"Delete node"]})})}),u.jsx(ns,{side:"top",sideOffset:8,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:"This node has topics, pillars, or supporting pages connected below it. Remove those links or delete those nodes first."})]})})]}):u.jsxs(Re,{type:"button",variant:"error",mode:"stroke",size:"small",className:"w-full",onClick:De=>{De.preventDefault(),De.stopPropagation(),Q(!0)},children:[u.jsx(wt,{as:Bs}),"Delete node"]})]})})]}),u.jsx(wd,{open:X,onOpenChange:De=>{De?Q(!0):ne||Q(!1)},children:u.jsxs(Ec,{className:"max-w-[400px]",showClose:!ne,onOpenAutoFocus:De=>De.preventDefault(),onPointerDownOutside:De=>{ne&&De.preventDefault()},onEscapeKeyDown:De=>{ne&&De.preventDefault()},children:[u.jsx(kc,{icon:Bs,title:"Delete this node?",description:`${Oe} will be removed from the map. Linked articles are not deleted automatically.`}),u.jsxs(_c,{className:"justify-end gap-2",children:[u.jsx(Re,{type:"button",variant:"neutral",mode:"stroke",size:"medium",disabled:ne,onClick:()=>Q(!1),children:"Cancel"}),u.jsx(Re,{type:"button",variant:"error",mode:"filled",size:"medium",disabled:ne,onClick:()=>void be(),children:ne?u.jsxs(u.Fragment,{children:[u.jsx(Wa,{className:"size-4 shrink-0 border-static-white/30 border-t-static-white"}),"Delete node"]}):"Delete node"})]})]})})]})}function WCt({node:e,coverImageUrl:t,articleSlug:n,hasLinkedArticle:r,effectiveKeyword:i,effectiveMetrics:o,pickerOpen:s,onPickerOpenChange:a,onPickKeyword:l,onClearKeyword:c,hasChanges:d,saving:f,onDiscard:p,onSave:m,onClose:y,onEditArticle:v,onRetryArticle:b,retryArticlePending:C,pipelineSlotsFull:S,onRequestDelete:E}){var D,R;const A=MCt(o.intent),_=r,N=((D=e.article)==null?void 0:D.status)===Dt.FAILED,j=N&&S,O=e.type==="supporting"?{title:"Supporting Details",subtitle:"Configure your supporting page's details",keywordHint:"A supporting page can only target one keyword. Pick one from your keyword lists.",editArticleSubtitle:"Modify the article linked to this supporting page",deleteActionTitle:"Delete Supporting Page",deleteActionSubtitle:"Remove the supporting page from the map"}:{title:"Pillar Details",subtitle:"Configure your pillar's details",keywordHint:"A pillar can only target one keyword. Pick one from your keyword lists.",editArticleSubtitle:"Modify the article linked to this pillar",deleteActionTitle:"Delete Pillar",deleteActionSubtitle:"Remove the pillar from the map"};return u.jsxs("aside",{className:"flex h-full w-[min(100%,380px)] shrink-0 flex-col bg-bg-white-0",children:[u.jsxs("div",{className:"flex items-start justify-between gap-2 px-5 pt-5 pb-4",children:[u.jsxs("div",{className:"min-w-0",children:[u.jsx("h2",{className:"text-label-md text-text-strong-950 font-semibold",children:O.title}),u.jsx("p",{className:"text-text-sub-600 text-paragraph-sm mt-0.5",children:O.subtitle})]}),u.jsx(Re,{variant:"neutral",mode:"ghost",size:"xsmall",onClick:y,"aria-label":"Close panel",children:u.jsx(wt,{as:Hf})})]}),u.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[u.jsx(Yi,{variant:"solid-text",children:"GENERAL"}),u.jsxs("div",{className:"px-5 py-4",children:[u.jsx(It,{children:"Keyword"}),u.jsx(GCt,{keyword:i,locked:_,pickerOpen:s,onPickerOpenChange:a,onPickKeyword:l,onClearKeyword:c,saving:f}),!_&&u.jsx("p",{className:"text-text-sub-600 text-paragraph-xs mt-2",children:O.keywordHint})]}),u.jsx(Yi,{variant:"solid-text",children:"OVERVIEW"}),u.jsxs("div",{className:"space-y-3 px-5 py-4",children:[u.jsx(EN,{label:"Intent",value:A?u.jsx(Ri,{variant:"lighter",color:A.color,size:"small",children:A.label}):u.jsx("span",{className:"text-text-soft-400 text-paragraph-sm",children:"â"})}),u.jsx(EN,{label:"Keyword Difficulty",value:o.difficulty!=null?u.jsxs("span",{className:"inline-flex items-center gap-1.5 text-paragraph-sm text-text-strong-950 tabular-nums",children:[u.jsx("span",{className:"size-2 roun
697ded-full",style:{backgroundColor:BS(o.difficulty)}}),o.difficulty]}):u.jsx("span",{className:"text-text-soft-400 text-paragraph-sm",children:"â"})}),u.jsx(EN,{label:"Traffic Potential",value:o.trafficPotential!=null?u.jsx("span",{className:"text-paragraph-sm text-text-strong-950 tabular-nums",children:o.trafficPotential.toLocaleString()}):u.jsx("span",{className:"text-text-soft-400 text-paragraph-sm",children:"â"})})]}),r&&e.article&&u.jsxs(u.Fragment,{children:[u.jsx(Yi,{variant:"solid-text",children:"LINKED ARTICLE"}),u.jsx("div",{className:"px-5 py-4",children:u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:"border-stroke-soft-200 bg-bg-weak-50 flex size-12 shrink-0 items-center justify-center overflow-hidden rounded-md border",children:t?u.jsx("img",{src:t,alt:"",className:"size-full object-cover"}):u.jsx(SSe,{className:"text-text-soft-400 size-5","aria-hidden":!0})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"text-label-sm text-text-strong-950 truncate",children:((R=e.article.title)==null?void 0:R.trim())||e.article.keyword||"Untitled article"}),n&&u.jsxs("p",{className:"text-text-sub-600 text-paragraph-xs truncate",children:["/",n.replace(/^\//,"")]}),u.jsx("div",{className:"mt-1.5",children:e.article.published?u.jsxs("span",{className:"inline-flex items-center gap-1 text-paragraph-xs text-success-base",children:[u.jsx(_ne,{className:"size-3.5","aria-hidden":!0}),"Published"]}):u.jsx("span",{className:"text-text-sub-600 text-paragraph-xs capitalize",children:String(e.article.status).replace(/_/g," ")})})]})]})}),u.jsx(Yi,{}),u.jsxs("button",{type:"button",disabled:C||j,title:j?Ua:void 0,onClick:N?b:v,className:"hover:bg-bg-weak-50 flex w-full items-center gap-3 px-5 py-4 text-left transition-colors disabled:opacity-60",children:[u.jsx("span",{className:Et("flex size-9 shrink-0 items-center justify-center rounded-full",N?"bg-error-lighter text-error-base":"bg-success-lighter text-success-base"),children:N?C?u.jsx("span",{className:"inline-block size-4 animate-spin rounded-full border-2 border-current/30 border-t-current motion-reduce:animate-none"}):u.jsx(Pne,{className:"size-4","aria-hidden":!0}):u.jsx(wSe,{className:"size-4","aria-hidden":!0})}),u.jsxs("span",{className:"min-w-0 flex-1",children:[u.jsx("span",{className:"text-label-sm text-text-strong-950 block",children:N?C?"Retryingâ¦":"Retry Article":"Edit Linked Article"}),u.jsx("span",{className:"text-text-sub-600 text-paragraph-xs block",children:N?"Re-run the article generation pipeline":O.editArticleSubtitle})]}),!N&&u.jsx(im,{className:"text-text-soft-400 size-5 shrink-0","aria-hidden":!0})]}),N&&u.jsxs(u.Fragment,{children:[u.jsx(Yi,{}),u.jsxs("button",{type:"button",onClick:E,className:"hover:bg-error-lighter flex w-full items-center gap-3 px-5 py-4 text-left transition-colors group",children:[u.jsx("span",{className:"bg-error-lighter text-error-base flex size-9 shrink-0 items-center justify-center rounded-full",children:u.jsx(Bs,{className:"size-4","aria-hidden":!0})}),u.jsxs("span",{className:"min-w-0 flex-1",children:[u.jsx("span",{className:"text-label-sm text-error-base block",children:O.deleteActionTitle}),u.jsx("span",{className:"text-text-sub-600 text-paragraph-xs block",children:O.deleteActionSubtitle})]})]})]})]})]}),!r&&u.jsx("div",{className:"px-5 pb-3 pt-4",children:u.jsxs("button",{type:"button",onClick:E,className:"bg-red-alpha-10 text-error-base hover:bg-red-alpha-16 flex w-full items-center justify-center gap-1.5 rounded-xl px-4 py-2.5 text-label-sm font-medium transition-colors",children:[u.jsx(Bs,{className:"size-4 shrink-0","aria-hidden":!0}),"Delete"]})}),u.jsxs("div",{className:"border-stroke-soft-200 bg-bg-white-0 flex items-center gap-3 border-t px-5 py-4",children:[u.jsx(Re,{variant:"neutral",mode:"stroke",size:"medium",className:"flex-1",onClick:p,disabled:!d||f,children:"Discard"}),u.jsx(Re,{variant:"primary",mode:"filled",size:"medium",className:"flex-1",onClick:m,disabled:!d||f,children:f?u.jsxs(u.Fragment,{children:[u.jsx(Wa,{className:"size-4 shrink-0 border-static-white/30 border-t-static-white"}),"Savingâ¦"]}):"Save Details"})]})]})}function EN({label:e,value:t}){return u.jsxs("div",{className:"flex items-center justify-between gap-3",children:[u.jsx("span",{className:"text-paragraph-sm text-text-strong-950",children:e}),u.jsx("div",{className:"flex shrink-0 items-center",children:t})]})}function GCt({keyword:e,locked:t,pickerOpen:n,onPickerOpenChange:r,onPickKeyword:i,onClearKeyword:o,saving:s}){const a=u.jsxs("button",{type:"button",disabled:t,onClick:()=>{t||r(!n)},className:Et("border-stroke-soft-200 bg-bg-white-0 mt-1.5 flex h-10 w-full items-center gap-2 rounded-lg border px-3 text-left transition-colors",!t&&"hover:border-stroke-strong-950 cursor-pointer",t&&"curs
697or-not-allowed opacity-70"),children:[e?u.jsxs("span",{className:"bg-bg-weak-50 text-text-strong-950 inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-paragraph-sm",children:[u.jsx("span",{className:"truncate",children:e}),!t&&u.jsx("span",{role:"button",tabIndex:0,"aria-label":`Remove keyword ${e}`,className:"text-text-soft-400 hover:text-text-strong-950 inline-flex items-center",onClick:l=>{l.preventDefault(),l.stopPropagation(),o()},onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),l.stopPropagation(),o())},children:u.jsx(Hf,{className:"size-3.5","aria-hidden":!0})})]}):u.jsx("span",{className:"text-text-soft-400 text-paragraph-sm",children:t?"No keyword set":"Pick a keywordâ¦"}),u.jsx(qu,{delayDuration:150,children:u.jsxs(qs,{children:[u.jsx(Ws,{asChild:!0,children:u.jsx("span",{role:"button",tabIndex:0,"aria-label":"What is this?",className:"text-text-soft-400 hover:text-text-sub-600 ml-auto inline-flex shrink-0 items-center",onClick:l=>l.stopPropagation(),children:u.jsx(Rne,{className:"size-4","aria-hidden":!0})})}),u.jsx(ns,{side:"top",sideOffset:8,size:"medium",variant:"dark",className:"max-w-[min(18rem,calc(100vw-2rem))] text-pretty",children:"This page targets exactly one keyword from your keyword lists. Pick a keyword to drive its intent, difficulty, and traffic potential."})]})})]});return t?a:u.jsxs(dm,{open:n,onOpenChange:r,children:[u.jsx(qf,{asChild:!0,disabled:s,children:a}),u.jsx(hh,{align:"start",sideOffset:6,className:"p-0",children:u.jsx(FCt,{onPick:i,disabled:s})})]})}const KCt={contentNode:zCt},vO="__canvas_floating__";function YCt(e){return{id:e.tempId,type:e.type,position:e.position,keyword:e.keyword??null,searchVolume:e.searchVolume??null,difficulty:e.difficulty??null,cpc:e.cpc??null,trafficPotential:e.trafficPotential??null,intent:e.intent??null,label:e.label,routeUrl:e.routeUrl,articleId:null,sourceKeywordListId:e.sourceKeywordListId??null,sourceKeywordReportId:null,createdAt:"",updatedAt:"",article:null}}function XCt(e){return{id:e.id,source:e.sourceNodeId,target:e.targetNodeId,markerEnd:{type:hd.ArrowClosed},markerStart:e.direction==="bidirectional"?{type:hd.ArrowClosed}:void 0,style:{strokeDasharray:e.status==="planned"?"5 5":void 0,strokeWidth:1.5}}}function tw(e,t,n,r,i,o,s,a,l,c,d,f,p,m,y,v,b,C){const S=e.nodes.map(O=>({...O,position:i.get(O.id)??O.position})),E=t.map(O=>({...YCt(O),position:i.get(O.tempId)??O.position})),A=[...S,...E],_=[];for(const O of e.edges)r.has(O.id)||_.push({source:O.sourceNodeId,target:O.targetNodeId});for(const O of n)_.push({source:O.sourceNodeId,target:O.targetNodeId});const N=new Set;for(const O of _)N.add(O.source);const j=A.map(O=>{var I;const D=O.type==="topic"?TCt(O.id,A,_,b):void 0,R={mapNode:O,mapId:e.id,topicRouteDisplay:D,onCreateArticle:O.type!=="topic"?o:void 0,createArticlePending:s===O.id,onRetryArticle:O.type!=="topic"?a:void 0,retryArticlePending:l===O.id,onAddChild:c,onCreateArticleChildFromPicker:d,onEnterArticlePicker:f,onSuppressPickerGhostClicks:p,onOpenNodeDetail:m,onDeletePendingNode:y,onDeleteFailedNode:((I=O.article)==null?void 0:I.status)==="failed"?v:void 0,hasOutgoingChildren:N.has(O.id),pipelineSlotsFull:C};return{id:O.id,type:"contentNode",position:O.position,data:R}}),T=[];for(const O of e.edges)r.has(O.id)||T.push(XCt(O));for(const O of n){const D=O.targetNodeId.startsWith("pending-node-");T.push({id:O.tempId,source:O.sourceNodeId,target:O.targetNodeId,markerEnd:{type:hd.ArrowClosed},style:{strokeWidth:1.5,strokeDasharray:D?"4 4":void 0}})}return{nodes:j,edges:T}}function ZCt(e,t,n){const r=t.edges.filter(o=>o.sourceNodeId===e).length,i=n.filter(o=>o.parentId===e).length;return r+i}function Zee(e){return e.filter(t=>t.parentId===vO).length}function Qee(e){const o=e%4,s=Math.floor(e/4);return{x:360+o*260,y:120+s*150}}function QCt(){const[e,t]=x.useState(null),[n,r]=x.useState(null),[i,o]=x.useState(null),[s,a]=x.useState(!1),l=x.useRef(null),c=e!=null&&!e.startsWith("pending-node-")?e:null,d=x.useRef(c);d.current=c;const[f,p]=x.useState(null),[m,y]=x.useState(!1),v=x.useCallback(()=>{if(d.current!=null)return;const Se=l.current;l.current=null,p(null),Se&&requestAnimationFrame(()=>t(Se))},[]);x.useLayoutEffect(()=>{if(c){p(c);const Se=requestAnimationFrame(()=>y(!0));return()=>cancelAnimationFrame(Se)}y(!1)},[c]);const b=x.useCallback(Se=>{Se.target!==Se.currentTarget||Se.propertyName!=="width"||d.current||v()},[v]);x.useEffect(()=>{if(m||c!=null)return;const Se=window.setTimeout(()=>{d.current||v()},320);return()=>window.clearTimeout(Se)},[m,c,v]);const C=x.useRef(0),[S,E]=x.useState(new Map),[A,_]=x.useState([]),[N,j]=x.useState(new Set),[T,O]=x.use
697State([]),[D,R]=x.useState(!1),I=S.size>0||A.length>0||N.size>0||T.length>0,F=x.useRef(A);x.useEffect(()=>{F.current=A},[A]);const $=am(),[H,L]=x.useState(0),{data:B,isLoading:z,isFetching:V}=qCe(void 0,{pollingInterval:H}),{data:U}=qO(void 0,{pollingInterval:5e3}),W=((U==null?void 0:U.used)??0)>=((U==null?void 0:U.limit)??3),{integrations:{data:G}}=al(),X=!!!(G!=null&&G.some(Se=>Se.type===ll.GHOST));x.useEffect(()=>{L(B&&OCt(B.nodes)?5e3:0)},[B]);const[Q]=WCe(),[ne]=GCe(),[ie]=KCe(),[se]=yne(),[oe]=gne(),[J]=YCe(),[ae]=dne(),re=x.useCallback(()=>{l.current=null,t(null),C.current=Date.now()+500},[]),pe=x.useCallback(()=>{C.current=Date.now()+550},[]),be=x.useRef(e);x.useEffect(()=>{be.current=e},[e]);const xe=x.useCallback(Se=>{if(Se.startsWith("pending-node-"))return;if(l.current!=null){l.current=Se;return}const Te=be.current;if(Te!=null&&!Te.startsWith("pending-node-")&&Te!==Se){l.current=Se,t(null);return}l.current=null,t(Se)},[]),[ke,Pe]=x.useState(null),it=x.useCallback(Se=>{Se.startsWith("pending-node-")&&Pe(Se)},[]),qe=x.useMemo(()=>{var Te,Le;if(!ke)return"";const Se=T.find(tt=>tt.tempId===ke);return Se&&(((Te=Se.label)==null?void 0:Te.trim())||((Le=Se.keyword)==null?void 0:Le.trim()))||"This node"},[ke,T]),$n=x.useCallback(()=>{const Se=ke;Se&&(O(Te=>Te.filter(Le=>Le.tempId!==Se)),_(Te=>Te.filter(Le=>Le.sourceNodeId!==Se&&Le.targetNodeId!==Se)),Pe(null),ze.success("Unsaved node removed"))},[ke]),Vt=x.useCallback(async Se=>{if(B){r(Se);try{await J({mapId:B.id,nodeId:Se}).unwrap()}catch(Te){s5(Te)?ze.error(a5(Te)):ze.error("Failed to create article")}finally{r(null)}}},[B,J]),ee=x.useCallback(async Se=>{var tt,ut,Tt;if(!B)return;const Te=B.nodes.find(Zt=>Zt.id===Se),Le=(tt=Te==null?void 0:Te.article)==null?void 0:tt.id;if(Le){o(Se);try{await ae(Le).unwrap(),ze.success("Retrying article generationâ¦")}catch(Zt){if(s5(Zt))ze.error(a5(Zt));else{const st=((ut=Zt==null?void 0:Zt.data)==null?void 0:ut.message)??((Tt=Zt==null?void 0:Zt.data)==null?void 0:Tt.error)??"Failed to retry article";ze.error(st)}}finally{o(null)}}},[B,ae]),ue=x.useCallback(async Se=>{if(B)try{await se({mapId:B.id,nodeId:Se}).unwrap(),ze.success("Node removed from the map.")}catch{ze.error("Failed to delete node")}},[B,se]),[me,je,Ae]=eCt([]),[_e,Oe,dt]=tCt([]),vt=x.useRef(null),Kt=x.useRef(B),Or=x.useRef(me),wr=x.useRef(T);x.useEffect(()=>{Kt.current=B},[B]),x.useEffect(()=>{Or.current=me},[me]),x.useEffect(()=>{wr.current=T},[T]);const en=x.useCallback(Se=>{const Te=Kt.current;if(!Te)return{x:400,y:220};const Le=Or.current.find(ln=>ln.id===Se),tt=(Le==null?void 0:Le.position)??{x:400,y:40},ut=ZCt(Se,Te,wr.current),Zt=tt.x+(ut-Math.max(ut,1)/2)*260,st=tt.y+180;return{x:Zt,y:st}},[]),Rr=x.useCallback((Se,Te)=>{if(!Kt.current)return;const tt=en(Se),ut=`pending-node-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,Tt=`pending-edge-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,Zt=Te==="topic"?"New topic":Te==="pillar"?"New pillar article":"New support article",st=Te==="topic"?"/new-topic":null;O(ln=>[...ln,{tempId:ut,parentId:Se,type:Te,position:tt,label:Zt,routeUrl:st}]),_(ln=>[...ln,{tempId:Tt,sourceNodeId:Se,targetNodeId:ut}])},[en]),tr=x.useCallback(()=>{O(Se=>{const Te=Zee(Se),Le=`pending-node-${Date.now()}-${Math.random().toString(36).slice(2,9)}`;return[...Se,{tempId:Le,parentId:vO,type:"topic",position:Qee(Te),label:"New topic",routeUrl:"/new-topic"}]})},[]),De=x.useCallback(async(Se,Te)=>{O(Le=>{const tt=Zee(Le),Tt={tempId:`pending-node-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,parentId:vO,type:Se,position:Qee(tt),routeUrl:null};if(Te.kind==="empty")return[...Le,{...Tt,label:Se==="pillar"?"New pillar article":"New support article"}];const{listId:Zt,item:st}=Te;return[...Le,{...Tt,label:st.keyword,keyword:st.keyword,searchVolume:st.searchVolume,difficulty:st.difficulty,cpc:st.cpc,intent:st.intent,sourceKeywordListId:Zt}]}),Te.kind==="empty"&&(C.current=Date.now()+550)},[]),Yt=x.useCallback(async(Se,Te,Le)=>{const tt=Kt.current;if(!tt)return;if(Se.startsWith("pending-node-")){const Pr=en(Se),kn=`pending-node-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,zn=`pending-edge-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,xs={tempId:kn,parentId:Se,type:Te,position:Pr,routeUrl:null};if(Le.kind==="empty")O(Do=>[...Do,{...xs,label:Te==="pillar"?"New pillar article":"New support article"}]);else{const{listId:Do,item:ws}=Le;O(Ch=>[...Ch,{...xs,label:ws.keyword,keyword:ws.keyword,searchVolume:ws.searchVolume,difficulty:ws.difficulty,cpc:ws.cpc,intent:ws.intent,sourceKeywordListId:Do}])}_(Do=>[...Do,{tempId:zn,sourceNodeId:Se,targetNodeId:kn}]);return}const ut=en(Se),Tt=new Set(tt.nodes.map(Pr=>Pr.id)),Zt=Te==="pillar"?"New pillar article":"New support article",ln=(Le.kind==="empty"?await Q({mapId:tt.id,type:Te,position:ut,label:Zt,routeUrl:null,keyword:null}).unwrap():await Q({mapId:tt.id,type:Te,position:ut,keyword:Le.item.keyword,label:Le.item.keyword,searchVolume:Le.item.searchVolume,difficulty:Le.item.difficulty,cpc:Le.item.cpc,intent:Le.item.intent,routeUrl:null,sourceKeywordListId:Le.listId}
697).unwrap()).nodes.find(Pr=>!Tt.has(Pr.id));if(ln){try{await ne({mapId:tt.id,sourceNodeId:Se,targetNodeId:ln.id}).unwrap()}catch{}Le.kind==="empty"&&(C.current=Date.now()+550)}},[Q,ne,en]),Xt=x.useRef(""),Po=x.useCallback((Se,Te,Le)=>JSON.stringify({n:Se.map(tt=>{var Tt;const ut=tt.data.mapNode;return{id:tt.id,p:tt.position,t:ut.type,k:ut.keyword??null,l:ut.label??null,r:ut.routeUrl??null,a:((Tt=ut.article)==null?void 0:Tt.status)??null,aid:ut.articleId??null,cap:tt.data.createArticlePending??!1,rap:tt.data.retryArticlePending??!1,trd:tt.data.topicRouteDisplay??null}}),e:Te.map(tt=>({id:tt.id,s:tt.source,t:tt.target})),pf:Le?1:0}),[]);x.useEffect(()=>{if(!B||s||V)return;const{nodes:Se,edges:Te}=tw(B,T,A,N,S,Vt,n,ee,i,Rr,Yt,re,pe,xe,it,ue,X,W),Le=Po(Se,Te,W);Le!==Xt.current&&(Xt.current=Le,je(Se),Oe(Te))},[s,V,Po,B,T,A,N,S,je,Oe,Vt,n,ee,i,Rr,Yt,re,pe,xe,it,ue,X,W]);const ma=x.useCallback((Se,Te)=>{E(Le=>new Map(Le).set(Te.id,Te.position))},[]),bs=x.useCallback(Se=>{if(!Se.source||!Se.target)return;const Te=`pending-edge-manual-${Date.now()}`;Oe(Le=>[...Le,{id:Te,source:Se.source,target:Se.target,markerEnd:{type:hd.ArrowClosed},style:{strokeWidth:1.5}}]),_(Le=>[...Le,{tempId:Te,sourceNodeId:Se.source,targetNodeId:Se.target}])},[Oe]),Fi=x.useCallback(Se=>{for(const Te of Se)if(F.current.some(tt=>tt.tempId===Te.id)){_(ut=>ut.filter(Tt=>Tt.tempId!==Te.id));const tt=F.current.find(ut=>ut.tempId===Te.id);tt!=null&&tt.targetNodeId.startsWith("pending-node-")&&O(ut=>ut.filter(Tt=>Tt.tempId!==tt.targetNodeId))}else j(tt=>new Set(tt).add(Te.id))},[]),ot=x.useCallback(()=>{l.current=null,t(null)},[]),un=x.useCallback(Se=>{$(Yn.util.upsertQueryData("getContentMap",void 0,Se));const{nodes:Te,edges:Le}=tw(Se,T,A,N,S,Vt,n,ee,i,Rr,Yt,re,pe,xe,it,ue,X,W);Xt.current=Po(Te,Le,W),je(Te),Oe(Le)},[$,T,A,N,S,Vt,n,ee,i,Rr,Yt,re,pe,xe,it,ue,X,W,Po,je,Oe]),Un=async()=>{if(B){a(!0);try{let Se=B;const Te=new Map,Le=new Set(B.nodes.map(st=>st.id)),tt=[...T];for(;tt.length>0;){const st=tt.findIndex(zn=>!zn.parentId.startsWith("pending-node-")||Te.has(zn.parentId));if(st===-1)break;const ln=tt.splice(st,1)[0],Pr=S.get(ln.tempId)??ln.position;Se=await Q({mapId:B.id,type:ln.type,position:Pr,label:ln.label,routeUrl:ln.routeUrl,keyword:ln.keyword,searchVolume:ln.searchVolume,difficulty:ln.difficulty,cpc:ln.cpc,trafficPotential:ln.trafficPotential,intent:ln.intent,sourceKeywordListId:ln.sourceKeywordListId}).unwrap();const kn=Se.nodes.find(zn=>!Le.has(zn.id));kn&&(Le.add(kn.id),Te.set(ln.tempId,kn.id))}const ut=st=>Te.get(st)??st,Tt=A.map(st=>({...st,sourceNodeId:ut(st.sourceNodeId),targetNodeId:ut(st.targetNodeId)}));for(const st of Tt)if(!(st.sourceNodeId.startsWith("pending")||st.targetNodeId.startsWith("pending")))try{Se=await ne({mapId:B.id,sourceNodeId:st.sourceNodeId,targetNodeId:st.targetNodeId}).unwrap()}catch{}for(const[st,ln]of S)st.startsWith("pending-node-")||(Se=await oe({mapId:B.id,nodeId:st,position:ln}).unwrap());for(const st of N)Se=await ie({mapId:B.id,edgeId:st}).unwrap();$(Yn.util.upsertQueryData("getContentMap",void 0,Se)),E(new Map),_([]),j(new Set),O([]);const Zt=tw(Se,[],[],new Set,new Map,Vt,n,ee,i,Rr,Yt,re,pe,xe,it,ue,X,W);Xt.current=Po(Zt.nodes,Zt.edges,W),je(Zt.nodes),Oe(Zt.edges)}finally{a(!1)}}},ir=()=>{if(E(new Map),_([]),j(new Set),O([]),B){const{nodes:Se,edges:Te}=tw(B,[],[],new Set,new Map,Vt,n,ee,i,Rr,Yt,re,pe,xe,it,ue,X,W);Xt.current=Po(Se,Te,W),je(Se),Oe(Te)}};return z&&!B?u.jsx("div",{className:"flex flex-1 items-center justify-center p-12",children:u.jsx(Wa,{className:"size-8"})}):B?u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"flex h-[calc(100dvh-5rem)] min-h-[480px] flex-1 flex-col overflow-hidden lg:px-0 lg:rounded-3xl",children:u.jsxs("div",{className:"relative flex min-h-0 flex-1",children:[u.jsxs("div",{className:"relative min-h-0 min-w-0 flex-1",children:[u.jsx("div",{className:"pointer-events-none absolute top-4 right-4 z-10 flex items-center gap-2",children:u.jsxs("div",{className:"pointer-events-auto flex items-center gap-2",children:[I&&u.jsxs(Re,{variant:"neutral",mode:"stroke",size:"medium",onClick:ir,disabled:s,children:[u.jsx(wt,{as:OSe}),"Discard"]}),u.jsxs(Re,{variant:"primary",mode:"filled",size:"medium",onClick:()=>void Un(),disabled:s||!I,children:[u.jsx(wt,{as:zw}),s?"Savingâ¦":"Apply Changes"]}),u.jsx("div",{className:"bg-stroke-soft-200 mx-1 h-6 w-px shrink-0","aria-hidden":!0}),u.jsxs(dm,{open:D,onOpenChange:R,children:[u.jsx(qf,{asChild:!0,children:u.jsx(Re,{type:"button",variant:"neutral",mode:"ghost",size:"medium",className:"px-2","aria-label":"Add node to map","aria-expanded":D,disabled:s,children:u.jsx(wt,{as:Pi})})}),u.jsx(hh,{align:"end",side:"bottom",sideOffset:6,className:"min-w-0 p-0",children:u.jsx(Mve,{open:D,onOpenChange:R,onAddTopic:tr,onCreateArticleChild:De,onEnterArticlePicker:re,onSuppressPickerGhostClicks:pe})})]})]})}),u.jsxs(J5t,{nodes:me,edges:_e,onNodesChange:Ae,onEdgesChange:dt,onConnect:bs,onNodeDragStop:ma,onEdgesDelete:Fi,onPaneClick:ot,nodeTypes:KCt,minZoom:.2,maxZoom:1.5,deleteKeyCode:null,onInit:Se=>{vt.current=Se,Se.fitView()},proOptions:{hideAttribution:!0},className:"bg-bg-weak-50",children:[u.jsx(sCt,{}),u.jsx(hCt,{}),u.jsx(_Ct,{zoomable:!0,pannable:!0})]})]}),u.jsx("div",{className:Et("bg-bg-white-0 border-stroke-soft-200 absolute top-0 right-0 bottom-0 z-20 min-w-0 overflow-hidden border-l shadow-lg transition-[width] duration-300 ease-in-out motion-reduce:transition-none",m?"w-[min(100%,380px)]":"w-0 border-l-transparent shadow-none"),onTransitionEnd:b,children:f&&u.jsx("div",{className:Et("h-full w-[min(100%,380px)] transition-opacity duration-200 ease-out motion-reduce:transition-none",m?"opacity-100 delay-100":"opacity-0"),children:u.jsx(qCt,{map:B,selectedNodeId:f,onClose:()=>{l.current=null,t(null)},createArticlePendingNodeId:n,onCreateArticle:Vt,hasOutgoingChildren:DCt(f,B,A,N),onRetryArticle:ee,retryArticlePending:i===f,pipelineSlotsFull:W,onMapMutationSuccess:un})})})]})}),u.jsx(wd,{open:ke!=null,onOpenChange:Se=>{Se||Pe(null)},children:u.jsxs(Ec,{className:"max-w-[400px]",onOpenAutoFocus:Se=>Se.preventDefault(),children:[u.jsx(kc,{icon:Bs,title:"Discard this unsaved node?",description:`${qe} hasn't been saved yet. It will be removed from the map immediately.`}),u.jsxs(_c,{className:"justify-end gap-2",children:[u.jsx(Re,{type:"button",variant:"neutral",mode:"stroke",size:"medium",onClick:()=>Pe(null),children:"Cancel"}),u.jsx(Re,{type:"button",variant:"error",mode:"filled",size:"medium",onClick:$n,children:"Discard node"})]})]})})]}):u.jsx("div",{className:"flex flex-1 flex-col items-center justify-center p-12 text-center",children:u.jsx("p",{className:"text-text-sub-600",children:"Could not load content map."})})}function JCt({size:e=32}){return u.jsx("img",{src:"/icons/ghost-logo.png",alt:"Ghost CMS",className:"flex-shrink-0",style:{width:e,height:e,objectFit:"contain"}})}function eSt(){const e=br(),{integrations:{data:t,isLoading:n}}
697=al(),r=t==null?void 0:t.reduce((s,a)=>(s[a.type]=a,s),{}),i=r==null?void 0:r[ll.GHOST],o=s=>{try{return new URL(s).hostname}catch{return s}};return u.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-8",children:[u.jsx("h1",{className:"text-title-h5 text-text-strong-950 mb-6",children:"Integrations"}),u.jsxs("div",{className:"space-y-3",children:[n?u.jsxs("div",{className:"w-full flex items-center gap-4 bg-bg-white-0 border border-stroke-soft-200 rounded-2xl px-5 py-4",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-bg-weak-50 animate-pulse flex-shrink-0"}),u.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("div",{className:"h-4 w-24 rounded bg-bg-weak-50 animate-pulse"}),u.jsx("div",{className:"h-4 w-16 rounded-full bg-bg-weak-50 animate-pulse"})]}),u.jsx("div",{className:"h-3 w-48 rounded bg-bg-weak-50 animate-pulse"})]})]}):u.jsxs("button",{onClick:()=>e("/integrations/ghost"),className:"w-full flex items-center gap-4 bg-bg-white-0 border border-stroke-soft-200 rounded-2xl px-5 py-4 hover:bg-bg-weak-50 transition-colors text-left",children:[u.jsx(JCt,{size:40}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[u.jsx("span",{className:"text-label-md text-text-strong-950",children:"Ghost CMS"}),i?u.jsxs(Ri,{variant:"light",color:"green",size:"medium",children:[u.jsx(tP,{}),"Connected"]}):u.jsx(Ri,{variant:"light",color:"gray",size:"medium",children:"Not connected"})]}),u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 truncate",children:i?o(i.config.ghostApiUrl):"Publish your content directly to your Ghost blog"})]}),u.jsx(NQ,{size:18,className:"text-text-soft-400 flex-shrink-0"})]}),u.jsxs("div",{className:"w-full flex items-center gap-4 bg-bg-white-0 border border-stroke-soft-200 rounded-2xl px-5 py-4 opacity-50 cursor-not-allowed",children:[u.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-600 flex items-center justify-center flex-shrink-0",children:u.jsx("svg",{width:22,height:22,viewBox:"0 0 24 24",fill:"white",children:u.jsx("path",{d:"M12 2C6.486 2 2 6.486 2 12s4.486 10 10 10 10-4.486 10-10S17.514 2 12 2zm0 18c-4.411 0-8-3.589-8-8s3.589-8 8-8 8 3.589 8 8-3.589 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})})}),u.jsxs("div",{className:"flex-1 min-w-0",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[u.jsx("span",{className:"text-label-md text-text-strong-950",children:"WordPress"}),u.jsx(Ri,{variant:"light",color:"gray",size:"medium",children:"Coming soon"})]}),u.jsx("p",{className:"text-paragraph-sm text-text-soft-400",children:"Publish your content directly to your WordPress site"})]}),u.jsx(NQ,{size:18,className:"text-text-soft-400 flex-shrink-0"})]})]})]})}function tSt({size:e=40}){return u.jsx("img",{src:"/icons/ghost-logo.png",alt:"Ghost CMS",className:"flex-shrink-0",style:{width:e,height:e,objectFit:"contain"}})}function nSt({name:e,src:t,size:n=28}){const r=e.split(" ").map(i=>i[0]).join("").slice(0,2).toUpperCase();return t?u.jsx("img",{src:t,alt:e,className:"rounded-full object-cover flex-shrink-0",style:{width:n,height:n}}):u.jsx("div",{className:"rounded-full bg-bg-weak-50 border border-stroke-soft-200 flex items-center justify-center flex-shrink-0 text-text-sub-600 font-medium",style:{width:n,height:n,fontSize:n*.38},children:r})}function rSt(){var G,Y;const e=br(),{integrations:{data:t,isLoading:n}}=al(),r=t==null?void 0:t.reduce((X,Q)=>(X[Q.type]=Q,X),{}),i=r==null?void 0:r[ll.GHOST],o=!!i,[s,{isLoading:a,error:l}]=fne(),[c,{isLoading:d}]=MCe(),[f,{isLoading:p}]=OCe(),{data:m,isLoading:y}=A5(void 0,{skip:!o}),{data:v,isLoading:b}=WO(void 0,{skip:!o}),[C,S]=x.useState(""),[E,A]=x.useState(""),[_,N]=x.useState(""),[j,T]=x.useState(!1),[O,D]=x.useState(""),[R,I]=x.useState(""),[F,$]=x.useState(!1);x.useEffect(()=>{var X;(X=i==null?void 0:i.config)!=null&&X.ghostApiUrl&&(S(i.config.ghostApiUrl),N(i.config.ghostApiUrl))},[i]);const H=C.trim()!==_.trim()||E.trim().length>0,L=X=>{try{return new URL(X).hostname}catch{return X}},B=()=>{let X=!0;if(D(""),I(""),!C.trim())D("Ghost site URL is required"),X=!1;else try{new URL(C)}catch{D("Please enter a valid URL (e.g. https://your-blog.com)"),X=!1}return E.trim()||(I("Ghost Admin API key is required"),X=!1),X},z=async()=>
697{if(B())try{await s({ghostApiUrl:C.trim(),ghostAdminApiKey:E.trim()}).unwrap(),A("")}catch{}},V=async()=>{try{await c().unwrap(),S(""),A(""),$(!1)}catch{}},U=l&&"data"in l?((G=l.data)==null?void 0:G.error)??"Failed to connect":l?"Failed to connect. Check your URL and API key.":null,W=(Y=i==null?void 0:i.config)!=null&&Y.lastSyncedAt?new Date(i.config.lastSyncedAt).toLocaleString():null;return n?u.jsx("div",{className:"flex items-center justify-center py-24",children:u.jsx("div",{className:"animate-spin rounded-full h-7 w-7 border-b-2 border-stroke-strong-950"})}):u.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-8",children:[u.jsxs("button",{onClick:()=>e("/integrations"),className:"flex items-center gap-1.5 text-paragraph-sm text-text-soft-400 hover:text-text-strong-950 transition-colors mb-6",children:[u.jsx(T0e,{size:16}),"Integrations"]}),u.jsxs("div",{className:"flex items-start gap-4 mb-8",children:[u.jsx(tSt,{size:48}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"flex items-center gap-2.5 flex-wrap",children:[u.jsx("h1",{className:"text-title-h5 text-text-strong-950",children:"Ghost CMS"}),o?u.jsxs(Ri,{variant:"light",color:"green",size:"medium",children:[u.jsx(tP,{}),"Connected to ",L(i.config.ghostApiUrl)]}):u.jsx(Ri,{variant:"light",color:"gray",size:"medium",children:"Not connected"})]}),u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mt-0.5",children:"Publish your content directly to your Ghost blog"})]}),o&&u.jsx("div",{className:"flex-shrink-0",children:F?u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-paragraph-sm text-text-soft-400",children:"Are you sure?"}),u.jsx(Re,{variant:"error",mode:"lighter",size:"small",onClick:V,disabled:d,children:d?"Disconnectingâ¦":"Yes, disconnect"}),u.jsx(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:()=>$(!1),children:"Cancel"})]}):u.jsx(Re,{variant:"neutral",mode:"stroke",size:"small",onClick:()=>$(!0),children:"Disconnect"})})]}),!o&&u.jsxs("div",{className:"bg-bg-white-0 border border-stroke-soft-200 rounded-2xl p-6",children:[u.jsx("h2",{className:"text-label-md text-text-strong-950 mb-1",children:"Connection Setup"}),u.jsxs("p",{className:"text-paragraph-sm text-text-soft-400 mb-5",children:["Enter your Ghost site URL and Admin API key to connect."," ",u.jsx("a",{href:"https://ghost.org/docs/admin-api/",target:"_blank",rel:"noopener noreferrer",className:"text-text-sub-600 underline underline-offset-2 hover:text-text-strong-950",children:"How to find your API key â"})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(It,{htmlFor:"ghost-url",children:["Ghost Site URL",u.jsx(ss,{})]}),u.jsx(Tn,{hasError:!!O,children:u.jsx(Vn,{children:u.jsx(Mn,{id:"ghost-url",type:"url",placeholder:"https://your-blog.com",value:C,onChange:X=>{S(X.target.value),O&&D("")}})})}
697),O&&u.jsx(es,{hasError:!0,children:O})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(It,{htmlFor:"ghost-key",children:["Ghost Admin API Key",u.jsx(ss,{})]}),u.jsx(Tn,{hasError:!!R,children:u.jsxs(Vn,{children:[u.jsx(Mn,{id:"ghost-key",type:j?"text":"password",placeholder:"xxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",value:E,onChange:X=>{A(X.target.value),R&&I("")}}),u.jsx("button",{type:"button",onClick:()=>T(X=>!X),className:"text-text-soft-400 hover:text-text-sub-600 transition-colors flex-shrink-0 pr-1",tabIndex:-1,children:j?u.jsx(jQ,{size:16}):u.jsx(TQ,{size:16})})]})}),R&&u.jsx(es,{hasError:!0,children:R})]}),U&&u.jsx(es,{hasError:!0,children:U}),u.jsx("div",{className:"pt-1",children:u.jsx(Re,{variant:"primary",mode:"filled",onClick:z,disabled:a,children:a?"Connectingâ¦":"Connect Ghost"})})]})]}),o&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"bg-bg-white-0 border border-stroke-soft-200 rounded-2xl p-6",children:[u.jsxs("div",{className:"flex items-center justify-between mb-4",children:[u.jsxs("div",{children:[u.jsx("h2",{className:"text-label-md text-text-strong-950",children:"Tags"}),W&&u.jsxs("p",{className:"text-paragraph-xs text-text-soft-400 mt-0.5",children:["Last synced ",W]})]}),u.jsxs(Re,{variant:"neutral",mode:"ghost",size:"small",onClick:()=>f(),disabled:p,children:[u.jsx(wt,{as:hI,className:p?"animate-spin":""}),p?"Syncingâ¦":"Sync"]})]}),y?u.jsx("div",{className:"flex gap-2 flex-wrap",children:[...Array(6)].map((X,Q)=>u.jsx("div",{className:"h-6 rounded-full bg-bg-weak-50 animate-pulse",style:{width:`${60+Q*15}px`}},Q))}):m&&m.length>0?u.jsx("div",{className:"flex flex-wrap gap-2",children:m.map(X=>u.jsx("span",{className:"inline-flex items-center h-6 px-2.5 rounded-full text-label-xs bg-bg-weak-50 text-text-sub-600 border border-stroke-soft-200",children:X.name},X.id))}):u.jsx("p",{className:"text-paragraph-sm text-text-soft-400",children:"No tags found in your Ghost site."})]}),u.jsxs("div",{className:"bg-bg-white-0 border border-stroke-soft-200 rounded-2xl p-6",children:[u.jsx("h2",{className:"text-label-md text-text-strong-950 mb-4",children:"Authors"}),b?u.jsx("div",{className:"space-y-3",children:[...Array(3)].map((X,Q)=>u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"w-7 h-7 rounded-full bg-bg-weak-50 animate-pulse flex-shrink-0"}),u.jsx("div",{className:"h-4 rounded bg-bg-weak-50 animate-pulse",style:{width:`${120+Q*40}px`}})]},Q))}):v&&v.length>0?u.jsx("div",{className:"space-y-3",children:v.map(X=>u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(nSt,{name:X.name,src:X.profileImage,size:28}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("p",{className:"text-label-sm text-text-strong-950 truncate",children:X.name}),X.email&&u.jsx("p",{className:"text-paragraph-xs text-text-soft-400 truncate",children:X.email})]})]},X.id))}):u.jsx("p",{className:"text-paragraph-sm text-text-soft-400",children:"No authors found in your Ghost site."})]}),u.jsxs("div",{className:"bg-bg-white-0 border border-stroke-soft-200 rounded-2xl p-6",children:[u.jsx("h2",{className:"text-label-md text-text-strong-950 mb-1",children:"Update Connection"}),u.jsx("p",{className:"text-paragraph-sm text-text-soft-400 mb-5",children:"Update your Ghost site URL or API key."}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"ghost-url-update",children:"Ghost Site URL"}),u.jsx(Tn,{hasError:!!O,children:u.jsx(Vn,{children:u.jsx(Mn,{id:"ghost-url-update",type:"url",placeholder:"https://your-blog.com",value:C,onChange:X=>{S(X.target.value),O&&D("")}})})}
697),O&&u.jsx(es,{hasError:!0,children:O})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(It,{htmlFor:"ghost-key-update",children:"New Admin API Key"}),u.jsx(Tn,{hasError:!!R,children:u.jsxs(Vn,{children:[u.jsx(Mn,{id:"ghost-key-update",type:j?"text":"password",placeholder:"Leave blank to keep existing key",value:E,onChange:X=>{A(X.target.value),R&&I("")}}),u.jsx("button",{type:"button",onClick:()=>T(X=>!X),className:"text-text-soft-400 hover:text-text-sub-600 transition-colors flex-shrink-0 pr-1",tabIndex:-1,children:j?u.jsx(jQ,{size:16}):u.jsx(TQ,{size:16})})]})}),R&&u.jsx(es,{hasError:!0,children:R})]}),U&&u.jsx(es,{hasError:!0,children:U}),u.jsx("div",{className:"pt-1",children:u.jsx(Re,{variant:"primary",mode:"filled",disabled:a||!H,onClick:async()=>{if(!C.trim()){D("Ghost site URL is required");return}try{new URL(C)}catch{D("Please enter a valid URL");return}try{await s({ghostApiUrl:C.trim(),ghostAdminApiKey:E.trim()}).unwrap(),A(""),N(C.trim())}catch{}},children:a?"Savingâ¦":"Save Changes"})})]})]})]})]})}const iSt=j1e();function kN(e){return e?new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"â"}function oSt({published:e}){return u.jsxs("span",{className:Ar("inline-flex items-center gap-1.5 px-2 py-0.5 rounded-full text-label-xs font-medium",e?"bg-success-lighter text-success-base":"bg-bg-weak-50 text-text-soft-400"),children:[u.jsx("span",{className:Ar("size-1.5 rounded-full",e?"bg-success-base":"bg-text-soft-400")}),e?"Published":"Draft"]})}function sSt({articleId:e,coverImageUrl:t}){const n=x.useRef(null),[r,i]=x.useState(!1),[o,s]=x.useState(!1),[a]=une(),l=async c=>{if(!c.type.startsWith("image/")){ze.error("Please select an image file");return}s(!0);try{const{url:d}=await vI(c);await a({id:e,coverImageUrl:d}).unwrap(),ze.success("Cover image updated")}catch{ze.error("Failed to upload image")}finally{s(!1)}};return u.jsxs("div",{children:[u.jsx("p",{className:"text-label-xs font-medium text-text-soft-400 uppercase tracking-wide mb-2",children:"Cover Image"}),u.jsx("input",{ref:n,type:"file",accept:"image/*",className:"hidden",onChange:c=>{var f;const d=(f=c.target.files)==null?void 0:f[0];d&&l(d),c.target.value=""}}),u.jsx("div",{className:"relative w-full h-36 rounded-xl overflow-hidden",onDragOver:c=>{c.preventDefault(),i(!0)},onDragLeave:()=>i(!1),onDrop:c=>{var f;c.preventDefault(),i(!1);const d=(f=c.dataTransfer.files)==null?void 0:f[0];d&&l(d)},children:t?u.jsxs(u.Fragment,{children:[u.jsx("img",{src:t,alt:"Cover",className:"w-full h-full object-cover"}),o?u.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-black/40",children:u.jsx(nv,{size:20,className:"text-white animate-spin"})}):u.jsxs("button",{className:"absolute top-2 right-2 flex items-center gap-1 px-2.5 py-1 rounded-full bg-black/60 text-white text-label-xs font-medium backdrop-blur-sm hover:bg-black/75 transition-colors",onClick:()=>{var c;return(c=n.current)==null?void 0:c.click()},children:[u.jsx(M0e,{size:11})," Change"]})]}):u.jsx("button",{className:Ar("w-full h-full border-2 border-dashed rounded-xl bg-bg-weak-50 flex flex-col items-center justify-center gap-2 text-text-disabled-300 transition-colors",r?"border-primary-base bg-primary-alpha-10":"border-stroke-soft-200 hover:border-stroke-sub-300 hover:bg-bg-weak-100"),onClick:()=>{var c;return!o&&((c=n.current)==null?void 0:c.click())},disabled:o,children:o?u.jsx(nv,{size:20,className:"text-primary-base animate-spin"}):u.jsxs(u.Fragment,{children:[u.jsx(fI,{size:24}),u.jsx("span",{className:"text-paragraph-xs",children:"Drop image or click to upload"})]})})})]})}function aSt({score:e}){const i=2*Math.PI*75,o=Math.PI*75,s=e/100*o,a=e>=70?"#22c55e":e>=40?"#f59e0b":"#ef4444";return u.jsx("div",{className:"flex flex-col items-center",children:u.jsxs("div",{className:"relative w-full max-w-[180px]",children:[u.jsxs("svg",{viewBox:"0 0 200 105",className:"w-full",children:[u.jsx("circle",{cx:100,cy:100,r:75,fill:"none",stroke:"#e5e7eb",strokeWidth:14,strokeDasharray:`${o} ${i}`,transform:"rotate(-180 100 100)",strokeLinecap:"round"}),u.jsx("circle",{cx:100,cy:100,r:75,fill:"none",stroke:a,strokeWidth:14,strokeDasharray:`${s} ${i}`,transform:"rotate(-180 100 100)",strokeLinecap:"round"})]}),u.jsxs("div",{className:"absolute bottom-0 left-0 right-0 flex flex-col items-center",children:[u.jsx("span",{className:"text-[10px] font-medium text-text-soft-400 uppercase tracking-widest",children:"SEO SCORE"}),u.jsxs("span",{className:"text-3xl font-bold text-text-strong-950 leading-tight",children:[e,"%"]})]})]})})}function lSt({slug:e,register:t,watchedFields:n,seoScore:r,keywordCount:i,linkCount:o,contentScore:s,checks:a}){var c;const l=((c=n.metaDescription)==null?void 0:c.length)||0;return u.jsxs("div",{className:"space-y-5",children:[u.jsx(aSt,{score:r}),u.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{bg:"bg-purple-50",color:"text-purple-500",icon:u.jsxs("svg",{className:"size-4",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("rect",{x:"1",y:"1",width:"6",height:"6",rx:"1",fill:"currentColor",opacity:"0.7"}),u.jsx("rect",{x:"9",y:"1",width:"6",height:"6",rx:"1",fill:"currentColor"}),u.jsx("rect",{x:"1",y:"9",width:"6",height:"6",rx:"1",fill:"currentColor"}),u.jsx("rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",fill:"currentColor",opacity:"0.7"})]}),label:"Keyword Count",value:i},{bg:"bg-blue-50",color:"text-blue-500",icon:u.jsxs("svg",{className:"size-4",viewBox:"0 0 16 16",fill:"none",children:[u.jsx("path",{d:"M6 8a3 3 0 1 1 4.243-4.243L11.657 5.17A3 3 0 0 1 8 9H6V8z",fill:"
697currentColor",opacity:"0.5"}),u.jsx("path",{d:"M10 8a3 3 0 1 1-4.243 4.243L4.343 10.83A3 3 0 0 1 8 7h2v1z",fill:"currentColor"})]}),label:"Links",value:o},{bg:"bg-amber-50",color:"text-amber-500",icon:u.jsx("svg",{className:"size-4",viewBox:"0 0 16 16",fill:"none",children:u.jsx("path",{d:"M8 1l1.854 3.756L14 5.528l-3 2.924.708 4.13L8 10.557l-3.708 2.025L5 8.452 2 5.528l4.146-.772L8 1z",fill:"currentColor"})}),label:"Content Score",value:`${s}/10`}].map(({bg:d,color:f,icon:p,label:m,value:y})=>u.jsxs("div",{className:"flex flex-col items-center gap-1",children:[u.jsx("div",{className:Ar("size-7 rounded-md flex items-center justify-center",d,f),children:p}),u.jsx("span",{className:"text-[10px] text-text-soft-400 text-center leading-tight",children:m}),u.jsx("span",{className:"text-label-sm font-semibold text-text-strong-950",children:y})]},m))}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"h-px flex-1 bg-stroke-soft-200"}),u.jsx("span",{className:"text-[10px] font-semibold text-text-soft-400 uppercase tracking-widest whitespace-nowrap",children:"Checklist"}),u.jsx("div",{className:"h-px flex-1 bg-stroke-soft-200"})]}),u.jsx("div",{className:"space-y-2",children:a.map(d=>u.jsxs("div",{className:"flex items-start gap-2.5",children:[u.jsx("div",{className:Ar("mt-0.5 flex-shrink-0 size-4 rounded-full flex items-center justify-center",d.passed?"bg-success-lighter":"bg-error-lighter"),children:d.passed?u.jsx("svg",{className:"size-2.5 text-success-base",viewBox:"0 0 10 10",fill:"none",children:u.jsx("path",{d:"M2 5l2.5 2.5L8 3",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):u.jsx("svg",{className:"size-2.5 text-error-base",viewBox:"0 0 10 10",fill:"none",children:u.jsx("path",{d:"M3 3l4 4M7 3l-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}),u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:Ar("text-label-xs font-medium leading-tight",(d.passed,"text-text-strong-950")),children:d.label}),u.jsx("p",{className:Ar("text-[10px] leading-snug mt-0.5",d.passed?"text-text-soft-400":"text-error-base"),children:d.hint})]})]},d.label))}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"h-px flex-1 bg-stroke-soft-200"}),u.jsx("span",{className:"text-[10px] font-semibold text-text-soft-400 uppercase tracking-widest whitespace-nowrap",children:"Meta Info & Google"}),u.jsx("div",{className:"h-px flex-1 bg-stroke-soft-200"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(It,{htmlFor:"s-meta-title",children:["Meta Title ",u.jsx(ss,{})]}),u.jsx(Tn,{size:"small",children:u.jsx(Vn,{children:u.jsx(Mn,{id:"s-meta-title",...t("metaTitle"),placeholder:"Enter meta title..."})})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsxs(It,{htmlFor:"s-meta-desc",children:["Meta Description ",u.jsx(ss,{}),u.jsx(gre,{className:"ml-1",children:"(Optional)"}),u.jsx(dlt,{size:12,className:"text-text-soft-400 ml-0.5"})]}),u.jsx(HI,{id:"s-meta-desc",...t("metaDescription"),rows:4,placeholder:"Enter meta description...",hasError:l>260,children:u.jsx(VI,{current:l,max:260})})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("p",{className:"text-label-xs font-medium text-text-soft-400 uppercase tracking-wide",children:"Google Preview"}),u.jsxs("div",{className:"border border-stroke-soft-200 rounded-lg p-3 space-y-0.5",children:[u.jsxs("p",{className:"text-[11px] text-text-soft-400 truncate",children:["seio.so ⺠blog ⺠",e||"article-slug"]}),u.jsx("p",{className:"text-[15px] font-medium text-[#1a0dab] leading-snug line-clamp-1",children:n.metaTitle||"No title set"}),u.jsx("p",{className:"text-[12px] text-text-sub-600 leading-relaxed line-clamp-2",children:n.metaDescription||"No description set."})]})]})]})}const ur={white:"#ffffff",weakBg:"#f5f5f5",softBorder:"#e5e5e5",softBg:"#e5e5e5",textStrong:"#0a0a0a",textSub:"#525252",textSoft:"#a3a3a3",focusRing:"#0a0a0a"},cSt={control:(e,t)=>({...e,minHeight:"36px",fontSize:"0.875rem",fontFamily:"inherit",backgroundColor:t.isDisabled?ur.weakBg:ur.white,borderRadius:"8px",border:"none",boxShadow:t.isFocused?`0 0 0 1.5px ${ur.focusRing}
697`:`0 0 0 1px ${ur.softBorder}, 0 1px 2px rgba(0,0,0,0.04)`,transition:"box-shadow 0.2s ease, background-color 0.2s ease","&:hover":{backgroundColor:ur.weakBg,boxShadow:"0 0 0 1px transparent"},cursor:"pointer"}),valueContainer:e=>({...e,padding:"3px 8px",gap:"4px",flexWrap:"wrap"}),multiValue:e=>({...e,backgroundColor:ur.weakBg,borderRadius:"6px",border:`1px solid ${ur.softBorder}`,margin:"2px 2px 2px 0"}),multiValueLabel:e=>({...e,fontSize:"0.75rem",fontWeight:500,fontFamily:"inherit",color:ur.textSub,padding:"1px 5px"}),multiValueRemove:e=>({...e,color:ur.textSoft,borderRadius:"0 6px 6px 0",paddingLeft:"2px",paddingRight:"4px","&:hover":{backgroundColor:ur.softBg,color:ur.textSub}}),menu:e=>({...e,borderRadius:"12px",border:`1px solid ${ur.softBorder}`,boxShadow:"0 8px 24px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04)",overflow:"hidden",zIndex:9999}),menuList:e=>({...e,padding:"6px"}),option:(e,t)=>({...e,fontSize:"0.875rem",fontFamily:"inherit",borderRadius:"8px",padding:"6px 8px",backgroundColor:t.isFocused?ur.weakBg:"transparent",color:ur.textStrong,cursor:"pointer","&:active":{backgroundColor:ur.softBg}}),placeholder:e=>({...e,color:ur.textSub,fontSize:"0.875rem",fontFamily:"inherit"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:ur.textSoft,padding:"0 6px","&:hover":{color:ur.textSub}}),clearIndicator:e=>({...e,color:ur.textSoft,padding:"0 4px","&:hover":{color:ur.textSub}})};function uSt({articleId:e,ghostTagIds:t,ghostAuthorId:n}){const{data:r=[],isLoading:i}=A5(),{data:o=[],isLoading:s}=WO(),[a]=PCe(),[l,c]=x.useState(t??[]),[d,f]=x.useState(n??"");x.useEffect(()=>{c(t??[])},[t]),x.useEffect(()=>{f(n??"")},[n]);const p=async(C,S)=>{try{await a({id:e,ghostTagIds:C,ghostAuthorId:S||void 0}).unwrap()}catch{}},m=C=>{const S=C.map(E=>E.value);c(S),p(S,d)},y=C=>{f(C),p(l,C)},v=r.map(C=>({value:C.id,label:C.name})),b=v.filter(C=>l.includes(C.value));return u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("img",{src:"/icons/ghost-logo.png",alt:"Ghost",className:"w-4 h-4 object-contain"}),u.jsx("span",{className:"text-label-xs font-semibold text-text-soft-400 uppercase tracking-wide",children:"Ghost"})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("p",{className:"text-label-xs text-text-soft-400",children:"Tags"}),u.jsx(JI,{isMulti:!0,isLoading:i,options:v,value:b,onChange:m,placeholder:"Select tagsâ¦",styles:cSt,components:iSt,menuPosition:"fixed",closeMenuOnSelect:!1})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("p",{className:"text-label-xs text-text-soft-400",children:"Publish as"}),u.jsxs(Xi,{value:d,onValueChange:y,disabled:s,children:[u.jsx(Qi,{size:"small",children:u.jsx(Zi,{placeholder:"Select authorâ¦"})}),u.jsx(Ji,{children:o.map(C=>u.jsxs(Ft,{value:C.id,children:[u.jsx(X5,{as:UI,size:"20",color:"gray",children:C.profileImage?u.jsx(CS,{src:C.profileImage}):null}),C.name]},C.id))})]})]})]})}function dSt({open:e,liveContent:t}){var E,A;const{id:n}=v5(),{data:r}=cne(n||"",{skip:!n}),{integrations:{data:i}}=al(),o=i==null?void 0:i.reduce((_,N)=>(_[N.type]=N,_),{}),s=!!(o!=null&&o[ll.GHOST]),[a,l]=x.useState("overview"),{register:c,watch:d,reset:f}=afe({defaultValues:{metaTitle:"",metaDescription:"",slug:""}}),p=d();x.useEffect(()=>{r&&f({metaTitle:r.metaTitle||"",metaDescription:r.metaDescription||"",slug:r.slug||""})},[r,f]);const m=t??(r==null?void 0:r.content)??"",{seoScore:y,keywordCount:v,linkCount:b,contentScore:C,checks:S}=kge(m,r==null?void 0:r.keyword,r==null?void 0:r.title,p.metaTitle,p.metaDescription);return u.jsx("div",{className:Ar("flex-shrink-0 overflow-hidden transition-all duration-300 ease-in-out lg:pb-3",e?"w-[325px]":"w-0"),children:u.jsxs("div",{className:"w-[320px] h-full flex flex-col bg-bg-white-0 border border-stroke-soft-200 lg:rounded-3xl lg:mt-1.5 overflow-hidden",children:[u.jsxs("div",{className:"px-5 pt-6 pb-4 border-b border-stroke-soft-200 flex-shrink-0",children:[u.jsx("h2",{className:"text-label-md font-semibold text-text-strong-950",children:"Article Details"}),u.jsx("p",{className:"text-paragraph-xs text-text-soft-400 mt-0.5",children:"Manage Details & SEO Settings"})]}),u.jsx("div",{className:"flex border-b border-stroke-soft-200 flex-shrink-0",children:["overview","seo"].map(_=>u.jsx("button",{onClick:()=>l(_),className:Ar("flex-1 py-3 text-label-sm font-medium transition-colors",a===_?"text-primary-base border-b-2 border-primary-base -mb-px":"text-text-soft-400 hover:text-text-sub-600"),children:_==="seo"?"SEO Details":"Overview"},_))}),u.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-5",children:[a==="overview"&&u.jsxs("div",{className:"space-y-5",children:[r&&u.jsx(sSt,{articleId:r.id,coverImageUrl:r.coverImageUrl}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"text-label-xs font-medium text-text-soft-400 uppercase tracking-wide",children:"Status"}),u.jsx(oSt,{published:r==null?void 0:r.published})]}),u.jsx("div",{className:"h-px bg-stroke-soft-200"}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"size-8 rounded-full bg-primary-alpha-10 flex items-center justify-center flex-shrink-0",children:u.jsx(Ylt,{size:14,className:"text-primary-base"})}),u.jsxs("div",{className:"min-w-0",children:[u.jsx("p",{className:"text-label-xs text-text-soft-400",children:"Author"}),u.jsx("p",{className:"text-paragraph-sm font-medium text-text-strong-950 truncate",children:((E=r==null?void 0:r.createdBy)==null?void 0:E.name)||((A=r==null?void 0:r.createdBy)==null?void 0:A.email)||"â"})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"size-8 rounded-full bg-bg-weak-50 flex items-center justify-center flex-shrink-0",children:u.jsx(Fat,{size:14,className:"text-text-soft-400"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-label-xs text-text-soft-400",children:"Created"}),u.jsx("p",{className:"text-paragraph-sm font-medium text-text-strong-950",children:kN(r==null?void 0:r.createdAt)})]})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"size-8 rounded-full bg-bg-weak-50 flex items-center justify-center flex-shrink-0",children:u.jsx(hI,{size:14,className:"text-text-soft-400"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-label-xs text-text-soft-400",children:"Last updated"}),u.jsx("p",{className:"text-paragraph-sm font-medium text-text-strong-950",children:kN(r==null?void 0:r.updatedAt)})]})]}),(r==null?void 0:r.ghostLastPublishedDate)&&u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"size-8 rounded-full bg-success-lighter flex items-center justify-center flex-shrink-0",children:u.jsx(nlt,{size:14,className:"text-success-base"})}),u.jsxs("div",{children:[u.jsx("p",{className:"text-label-xs text-text-soft-400",children:"Published to Ghost"}),u.jsx("p",{className:"text-paragraph-sm font-medium text-text-strong-950",children:kN(r.ghostLastPublishedDate)})]})]}),s&&r&&u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"h-px bg-stroke-soft-200"}),u.jsx(uSt,{articleId:r.id,ghostTagIds:r.ghostTagIds,ghostAuthorId:r.ghostAuthorId})]})]}),a==="seo"&&u.jsx(lSt,{slug:p.slug||(r==null?void 0:r.slug),register:c,watchedFields:p,seoScore:y,keywordCount:v,linkCount:b,contentScore:C,checks:S})]})]})})}const fSt=()=>
697{const[e,t]=x.useState(!1),[n,r]=x.useState("");return u.jsxs("div",{className:"relative flex h-dvh lg:h-screen overflow-hidden",children:[u.jsx(HR,{}),u.jsx("main",{className:"flex-1 min-w-0 flex flex-col overflow-hidden",children:u.jsx(U1,{context:{sidebarOpen:e,setSidebarOpen:t,editorContent:n,setEditorContent:r}})}),u.jsx(dSt,{open:e,liveContent:n})]})};function hSt(){return u.jsx(Owe,{store:xne,children:u.jsx(K9e,{children:u.jsx(qu,{delayDuration:300,children:u.jsxs(cwe,{children:[u.jsx(W8e,{position:"top-right",richColors:!0}),u.jsxs(EO,{children:[u.jsx(on,{path:"/sign-in",element:u.jsx(Y8e,{})}),u.jsx(on,{path:"/sign-up",element:u.jsx(Q8e,{})}),u.jsx(on,{path:"/confirm-email",element:u.jsx(J8e,{})}),u.jsx(on,{path:"/auth/callback",element:u.jsx(e7e,{})}),u.jsxs(on,{element:u.jsx(W9e,{}),children:[u.jsx(on,{path:"/onboarding",element:u.jsx(q9e,{})}),u.jsx(on,{element:u.jsx(fSt,{}),children:u.jsx(on,{path:"/articles/:id",element:u.jsx(uyt,{})})}),u.jsxs(on,{element:u.jsx(Bje,{}),children:[u.jsx(on,{path:"/",element:u.jsx(Tw,{to:"/articles",replace:!0})}),u.jsx(on,{path:"/articles",element:u.jsx(Qbt,{})}),u.jsx(on,{path:"/content-map",element:u.jsx(QCt,{})}),u.jsx(on,{path:"/keywords/*",element:u.jsx(IYe,{})}),u.jsx(on,{path:"/keyword-lists/*",element:u.jsx(qYe,{})}),u.jsx(on,{path:"/integrations",element:u.jsx(eSt,{})}),u.jsx(on,{path:"/integrations/ghost",element:u.jsx(rSt,{})}),u.jsxs(on,{path:"/settings",element:u.jsx(_yt,{}),children:[u.jsx(on,{index:!0,element:u.jsx(FJ,{})}),u.jsx(on,{path:"profile",element:u.jsx(FJ,{})}),u.jsx(on,{path:"billing",element:u.jsx(Pyt,{})}),u.jsx(on,{path:"usage",element:u.jsx(Iyt,{})}),u.jsx(on,{path:"integrations",element:u.jsx(Myt,{})}),u.jsx(on,{path:"ai",element:u.jsx(Lyt,{})}),u.jsx(on,{path:"preferences",element:u.jsx(Oyt,{})})]})]})]}),u.jsx(on,{path:"*",element:u.jsx(Tw,{to:"/"})})]})]})})})})}const xL=document.createElement("link");xL.rel="stylesheet";xL.href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap";document.head.appendChild(xL);Kxe.createRoot(document.getElementById("root")).render(u.jsx(K.StrictMode,{children:u.jsx(hSt,{})}));export{Ht as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.