vendor: 4,656 bytes, lines 1-9
1var IQ=Object.defineProperty;var nR=e=>{throw TypeError(e)};var MQ=(e,t,n)=>t in e?IQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Jt=(e,t,n)=>MQ(e,typeof t!="symbol"?t+"":t,n),Zb=(e,t,n)=>t.has(e)||nR("Cannot "+n);var he=(e,t,n)=>(Zb(e,t,"read from private field"),n?n.call(e):t.get(e)),lt=(e,t,n)=>t.has(e)?nR("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ve=(e,t,n,r)=>(Zb(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ot=(e,t,n)=>(Zb(e,t,"access private method"),n);var Wm=(e,t,n,r)=>({set _(i){Ve(e,t,i,n)},get _(){return he(e,t,r)}});function DQ(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 a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{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 a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Vm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function LQ(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 Jb={exports:{}},Yd={},ew={exports:{}},bt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its 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 rR;function $Q(){if(rR)return bt;rR=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"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.iterator;function p(F){return F===null||typeof F!="object"?null:(F=d&&F[d]||F["@@iterator"],typeof F=="function"?F:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function y(F,z,U){this.props=F,this.context=z,this.refs=v,this.updater=U||m}y.prototype.isReactComponent={},y.prototype.setState=function(F,z){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,z,"setState")},y.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=y.prototype;function _(F,z,U){this.props=F,this.context=z,this.refs=v,this.updater=U||m}var S=_.prototype=new x;S.constructor=_,b(S,y.prototype),S.isPureReactComponent=!0;var w=Array.isArray,N=Object.prototype.hasOwnProperty,k={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function P(F,z,U){var ee,re={},X=null,Z=null;if(z!=null)for(ee in z.ref!==void 0&&(Z=z.ref),z.key!==void 0&&(X=""+z.key),z)N.call(z,ee)&&!C.hasOwnProperty(ee)&&(re[ee]=z[ee]);var ie=arguments.length-2;if(ie===1)re.children=U;else if(1<ie){for(var Y=Array(ie),J=0;J<ie;J++)Y[J]=arguments[J+2];re.children=Y}if(F&&F.defaultProps)for(ee in ie=F.defaultProps,ie)re[ee]===void 0&&(re[ee]=ie[ee]);return{$$typeof:e,type:F,key:X,ref:Z,props:re,_owner:k.current}}function L(F,z){return{$$typeof:e,type:F.type,key:z,ref:F.ref,props:F.props,_owner:F._owner}}
vendor: 9,594 bytes, lines 9-25
9function T(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function A(F){var z={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(U){return z[U]})}var R=/\/+/g;function I(F,z){return typeof F=="object"&&F!==null&&F.key!=null?A(""+F.key):z.toString(36)}function M(F,z,U,ee,re){var X=typeof F;(X==="undefined"||X==="boolean")&&(F=null);var Z=!1;if(F===null)Z=!0;else switch(X){case"string":case"number":Z=!0;break;case"object":switch(F.$$typeof){case e:case t:Z=!0}}if(Z)return Z=F,re=re(Z),F=ee===""?"."+I(Z,0):ee,w(re)?(U="",F!=null&&(U=F.replace(R,"$&/")+"/"),M(re,z,U,"",function(J){return J})):re!=null&&(T(re)&&(re=L(re,U+(!re.key||Z&&Z.key===re.key?"":(""+re.key).replace(R,"$&/")+"/")+F)),z.push(re)),1;if(Z=0,ee=ee===""?".":ee+":",w(F))for(var ie=0;ie<F.length;ie++){X=F[ie];var Y=ee+I(X,ie);Z+=M(X,z,U,Y,re)}else if(Y=p(F),typeof Y=="function")for(F=Y.call(F),ie=0;!(X=F.next()).done;)X=X.value,Y=ee+I(X,ie++),Z+=M(X,z,U,Y,re);else if(X==="object")throw z=String(F),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return Z}function B(F,z,U){if(F==null)return F;var ee=[],re=0;return M(F,ee,"","",function(X){return z.call(U,X,re++)}),ee}function W(F){if(F._status===-1){var z=F._result;z=z(),z.then(function(U){(F._status===0||F._status===-1)&&(F._status=1,F._result=U)},function(U){(F._status===0||F._status===-1)&&(F._status=2,F._result=U)}),F._status===-1&&(F._status=0,F._result=z)}if(F._status===1)return F._result.default;throw F._result}var G={current:null},H={transition:null},K={ReactCurrentDispatcher:G,ReactCurrentBatchConfig:H,ReactCurrentOwner:k};function $(){throw Error("act(...) is not supported in production builds of React.")}return bt.Children={map:B,forEach:function(F,z,U){B(F,function(){z.apply(this,arguments)},U)},count:function(F){var z=0;return B(F,function(){z++}),z},toArray:function(F){return B(F,function(z){return z})||[]},only:function(F){if(!T(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},bt.Component=y,bt.Fragment=n,bt.Profiler=i,bt.PureComponent=_,bt.StrictMode=r,bt.Suspense=c,bt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=K,bt.act=$,bt.cloneElement=function(F,z,U){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var ee=b({},F.props),re=F.key,X=F.ref,Z=F._owner;if(z!=null){if(z.ref!==void 0&&(X=z.ref,Z=k.current),z.key!==void 0&&(re=""+z.key),F.type&&F.type.defaultProps)var ie=F.type.defaultProps;for(Y in z)N.call(z,Y)&&!C.hasOwnProperty(Y)&&(ee[Y]=z[Y]===void 0&&ie!==void 0?ie[Y]:z[Y])}var Y=arguments.length-2;if(Y===1)ee.children=U;else if(1<Y){ie=Array(Y);for(var J=0;J<Y;J++)ie[J]=arguments[J+2];ee.children=ie}return{$$typeof:e,type:F.type,key:re,ref:X,props:ee,_owner:Z}},bt.createContext=function(F){return F={$$typeof:o,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},bt.createElement=P,bt.createFactory=function(F){var z=P.bind(null,F);return z.type=F,z},bt.createRef=function(){return{current:null}},bt.forwardRef=function(F){return{$$typeof:l,render:F}},bt.isValidElement=T,bt.lazy=function(F){return{$$typeof:f,_payload:{_status:-1,_result:F},_init:W}},bt.memo=function(F,z){return{$$typeof:u,type:F,compare:z===void 0?null:z}},bt.startTransition=function(F){var z=H.transition;H.transition={};try{F()}finally{H.transition=z}},bt.unstable_act=$,bt.useCallback=function(F,z){return G.current.useCallback(F,z)},bt.useContext=function(F){return G.current.useContext(F)},bt.useDebugValue=function(){},bt.useDeferredValue=function(F){return G.current.useDeferredValue(F)},bt.useEffect=function(F,z){return G.current.useEffect(F,z)},bt.useId=function(){return G.current.useId()},bt.useImperativeHandle=function(F,z,U){return G.current.useImperativeHandle(F,z,U)},bt.useInsertionEffect=function(F,z){return G.current.useInsertionEffect(F,z)},bt.useLayoutEffect=function(F,z){return G.current.useLayoutEffect(F,z)},bt.useMemo=function(F,z){return G.current.useMemo(F,z)},bt.useReducer=function(F,z,U){return G.current.useReducer(F,z,U)},bt.useRef=function(F){return G.current.useRef(F)},bt.useState=function(F){return G.current.useState(F)},bt.useSyncExternalStore=function(F,z,U){return G.current.useSyncExternalStore(F,z,U)},bt.useTransition=function(){return G.current.useTransition()},bt.version="18.3.1",bt}var iR;function ip(){return iR||(iR=1,ew.exports=$Q()),ew.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its 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 aR;function FQ(){if(aR)return Yd;aR=1;var e=ip(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var f,d={},p=null,m=null;u!==void 0&&(p=""+u),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(m=c.ref);for(f in c)r.call(c,f)&&!a.hasOwnProperty(f)&&(d[f]=c[f]);if(l&&l.defaultProps)for(f in c=l.defaultProps,c)d[f]===void 0&&(d[f]=c[f]);return{$$typeof:t,type:l,key:p,ref:m,props:d,_owner:i.current}}return Yd.Fragment=n,Yd.jsx=o,Yd.jsxs=o,Yd}var oR;function BQ(){return oR||(oR=1,Jb.exports=FQ()),Jb.exports}var s=BQ(),E=ip();const ne=Mt(E),cO=DQ({__proto__:null,default:ne},[E]);var Gm={},tw={exports:{}},Dr={},nw={exports:{}},rw={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its 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 sR;function qQ(){return sR||(sR=1,(function(e){function t(H,K){var $=H.length;H.push(K);e:for(;0<$;){var F=$-1>>>1,z=H[F];if(0<i(z,K))H[F]=K,H[$]=z,$=F;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var K=H[0],$=H.pop();if($!==K){H[0]=$;e:for(var F=0,z=H.length,U=z>>>1;F<U;){var ee=2*(F+1)-1,re=H[ee],X=ee+1,Z=H[X];if(0>i(re,$))X<z&&0>i(Z,re)?(H[F]=Z,H[X]=$,F=X):(H[F]=re,H[ee]=$,F=ee);else if(X<z&&0>i(Z,$))H[F]=Z,H[X]=$,F=X;else break e}}return K}function i(H,K){var $=H.sortIndex-K.sortIndex;return $!==0?$:H.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],f=1,d=null,p=3,m=!1,b=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(H){for(var K=n(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=H)r(u),K.sortIndex=K.expirationTime,t(c,K);else break;K=n(u)}}function w(H){if(v=!1,S(H),!b)if(n(c)!==null)b=!0,W(N);else{var K=n(u);K!==null&&G(w,K.startTime-H)}}function N(H,K){b=!1,v&&(v=!1,x(P),P=-1),m=!0;var $=p;try{for(S(K),d=n(c);d!==null&&(!(d.expirationTime>K)||H&&!A());){var F=d.callback;if(typeof F=="function"){d.callback=null,p=d.priorityLevel;var z=F(d.expirationTime<=K);K=e.unstable_now(),typeof z=="function"?d.callback=z:d===n(c)&&r(c),S(K)}else r(c);d=n(c)}if(d!==null)var U=!0;else{var ee=n(u);ee!==null&&G(w,ee.startTime-K),U=!1}return U}finally{d=null,p=$,m=!1}}var k=!1,C=null,P=-1,L=5,T=-1;function A(){return!(e.unstable_now()-T<L)}function R(){if(C!==null){var H=e.unstable_now();T=H;var K=!0;try{K=C(!0,H)}finally{K?I():(k=!1,C=null)}}else k=!1}var I;if(typeof _=="function")I=function(){_(R)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,B=M.port2;M.port1.onmessage=R,I=function(){B.postMessage(null)}}else I=function(){y(R,0)};function W(H){C=H,k||(k=!0,I())}function G(H,K){P=y(function(){H(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){b||m||(b=!0,W(N))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(H){switch(p){case 1:case 2:case 3:var K=3;break;default:K=p}var $=p;p=K;try{return H()}finally{p=$}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,K){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var $=p;p=H;try{return K()}finally{p=$}},e.unstable_scheduleCallback=function(H,K,$){var F=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?F+$:F):$=F,H){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=$+z,H={id:f++,callback:K,priorityLevel:H,startTime:$,expirationTime:z,sortIndex:-1},$>F?(H.sortIndex=$,t(u,H),n(c)===null&&H===n(u)&&(v?(x(P),P=-1):v=!0,G(w,$-F)
vendor: 4,481 bytes, lines 25-33
25)):(H.sortIndex=z,t(c,H),b||m||(b=!0,W(N))),H},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(H){var K=p;return function(){var $=p;p=K;try{return H.apply(this,arguments)}finally{p=$}}}})(rw)),rw}var lR;function UQ(){return lR||(lR=1,nw.exports=qQ()),nw.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its 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 cR;function zQ(){if(cR)return Dr;cR=1;var e=ip(),t=UQ();function n(h){for(var g="https://reactjs.org/docs/error-decoder.html?invariant="+h,j=1;j<arguments.length;j++)g+="&args[]="+encodeURIComponent(arguments[j]);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."}var r=new Set,i={};function a(h,g){o(h,g),o(h+"Capture",g)}function o(h,g){for(i[h]=g,h=0;h<g.length;h++)r.add(g[h])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[: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]*$/,f={},d={};function p(h){return c.call(d,h)?!0:c.call(f,h)?!1:u.test(h)?d[h]=!0:(f[h]=!0,!1)}function m(h,g,j,O){if(j!==null&&j.type===0)return!1;switch(typeof g){case"function":case"symbol":return!0;case"boolean":return O?!1:j!==null?!j.acceptsBooleans:(h=h.toLowerCase().slice(0,5),h!=="data-"&&h!=="aria-");default:return!1}}function b(h,g,j,O){if(g===null||typeof g>"u"||m(h,g,j,O))return!0;if(O)return!1;if(j!==null)switch(j.type){case 3:return!g;case 4:return g===!1;case 5:return isNaN(g);case 6:return isNaN(g)||1>g}return!1}function v(h,g,j,O,D,q,Q){this.acceptsBooleans=g===2||g===3||g===4,this.attributeName=O,this.attributeNamespace=D,this.mustUseProperty=j,this.propertyName=h,this.type=g,this.sanitizeURL=q,this.removeEmptyString=Q}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(h){y[h]=new v(h,0,!1,h,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(h){var g=h[0];y[g]=new v(g,1,!1,h[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(h){y[h]=new v(h,2,!1,h.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(h){y[h]=new v(h,2,!1,h,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(h){y[h]=new v(h,3,!1,h.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(h){y[h]=new v(h,3,!0,h,null,!1,!1)}),["capture","download"].forEach(function(h){y[h]=new v(h,4,!1,h,null,!1,!1)}),["cols","rows","size","span"].forEach(function(h){y[h]=new v(h,6,!1,h,null,!1,!1)}),["rowSpan","start"].forEach(function(h){y[h]=new v(h,5,!1,h.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function _(h){return h[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode
33-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(h){var g=h.replace(x,_);y[g]=new v(g,1,!1,h,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(h){var g=h.replace(x,_);y[g]=new v(g,1,!1,h,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(h){var g=h.replace(x,_);y[g]=new v(g,1,!1,h,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(h){y[h]=new v(h,1,!1,h.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(h){y[h]=new v(h,1,!1,h.toLowerCase(),null,!0,!0)});function S(h,g,j,O){var D=y.hasOwnProperty(g)?y[g]:null;(D!==null?D.type!==0:O||!(2<g.length)||g[0]!=="o"&&g[0]!=="O"||g[1]!=="n"&&g[1]!=="N")&&(b(g,j,D,O)&&(j=null),O||D===null?p(g)&&(j===null?h.removeAttribute(g):h.setAttribute(g,""+j)):D.mustUseProperty?h[D.propertyName]=j===null?D.type===3?!1:"":j:(g=D.attributeName,O=D.attributeNamespace,j===null?h.removeAttribute(g):(D=D.type,j=D===3||D===4&&j===!0?"":""+j,O?h.setAttributeNS(O,g,j):h.setAttribute(g,j))))}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),k=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),T=Symbol.for("react.provider"),A=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),G=Symbol.for("react.offscreen"),H=Symbol.iterator;function K(h){return h===null||typeof h!="object"?null:(h=H&&h[H]||h["@@iterator"],typeof h=="function"?h:null)}var $=Object.assign,F;function z(h){if(F===void 0)try{throw Error()}catch(j){var g=j.stack.trim().match(/\n( *(at )?)/);F=g&&g[1]||""}return` 34`+F+h}var U=!1;function ee(h,g){if(!h||U)return"";U=!0;var j=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(g)if(g=function(){throw Error()},Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(Se){var O=Se}Reflect.construct(h,[],g)}else{try{g.call()}catch(Se){O=Se}h.call(g.prototype)}else{try{throw Error()}catch(Se){O=Se}h()}}catch(Se){if(Se&&O&&typeof Se.stack=="string"){for(var D=Se.stack.split(` 35`),q=O.stack.split(` 36`),Q=D.length-1,ae=q.length-1;1<=Q&&0<=ae&&D[Q]!==q[ae];)ae--;for(;1<=Q&&0<=ae;Q--,ae--)if(D[Q]!==q[ae]){if(Q!==1||ae!==1)do if(Q--,ae--,0>ae||D[Q]!==q[ae]){var ue=` 37`+D[Q].replace(" at new "," at ");return h.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",h.displayName)),ue}while(1<=Q&&0<=ae);break}}}finally{U=!1,Error.prepareStackTrace=j}return(h=h?h.displayName||h.name:"")?z(h):""}function re(h){switch(h.tag){case 5:return z(h.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return h=ee(h.type,!1),h;case 11:return h=ee(h.type.render,!1),h;case 1:return h=ee(h.type,!0),h;default:return""}}function X(h){if(h==null)return null;if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h;switch(h){case C:return"Fragment";case k:return"Portal";case L:return"Profiler";case P:return"StrictMode";case I:return"Suspense";case M:return"SuspenseList"}if(typeof h=="object")switch(h.$$typeof){case A:return(h.displayName||"Context")+".Consumer";case T:return(h._context.displayName||"Context")+".Provider";case R:var g=h.render;return h=h.displayName,h||(h=g.displayName||g.name||"",h=h!==""?"ForwardRef("+h+")":"ForwardRef"),h;case B:return g=h.displayName||null,g!==null?g:X(h.type)||"Memo";case W:g=h._payload,h=h._init;try{return X(h(g))}catch{}}return null}function Z(h){var g=h.type;switch(h.tag){case 24:return"Cache";case 9:return(g.displayName||"Context")+".Consumer";case 10:return(g._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return h=g.render,h=h.displayName||h.name||"",g.displayName||(h!==""?"ForwardRef("+h+")":"ForwardRef");case 7:return"Fragment";case 5:return g;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return X(g);case 8:return g===P?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g}return null}function ie(h){switch(typeof h){case"boolean":case"number":case"string":case"undefined":return h;case"object":return h;default:return""}}function Y(h){var g=h.type;return(h=h.nodeName)&&h.toLowerCase()==="input"&&(g==="checkbox"||g==="radio")}function J(h){var g=Y(h)?"checked":"value",j=Object.getOwnPropertyDescriptor(h.constructor.prototype,g),O=""+h[g];
vendor: 12,960 bytes, line 37
37if(!h.hasOwnProperty(g)&&typeof j<"u"&&typeof j.get=="function"&&typeof j.set=="function"){var D=j.get,q=j.set;return Object.defineProperty(h,g,{configurable:!0,get:function(){return D.call(this)},set:function(Q){O=""+Q,q.call(this,Q)}}),Object.defineProperty(h,g,{enumerable:j.enumerable}),{getValue:function(){return O},setValue:function(Q){O=""+Q},stopTracking:function(){h._valueTracker=null,delete h[g]}}}}function se(h){h._valueTracker||(h._valueTracker=J(h))}function V(h){if(!h)return!1;var g=h._valueTracker;if(!g)return!0;var j=g.getValue(),O="";return h&&(O=Y(h)?h.checked?"true":"false":h.value),h=O,h!==j?(g.setValue(h),!0):!1}function fe(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}}function ce(h,g){var j=g.checked;return $({},g,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:j??h._wrapperState.initialChecked})}function Ne(h,g){var j=g.defaultValue==null?"":g.defaultValue,O=g.checked!=null?g.checked:g.defaultChecked;j=ie(g.value!=null?g.value:j),h._wrapperState={initialChecked:O,initialValue:j,controlled:g.type==="checkbox"||g.type==="radio"?g.checked!=null:g.value!=null}}function me(h,g){g=g.checked,g!=null&&S(h,"checked",g,!1)}function je(h,g){me(h,g);var j=ie(g.value),O=g.type;if(j!=null)O==="number"?(j===0&&h.value===""||h.value!=j)&&(h.value=""+j):h.value!==""+j&&(h.value=""+j);else if(O==="submit"||O==="reset"){h.removeAttribute("value");return}g.hasOwnProperty("value")?oe(h,g.type,j):g.hasOwnProperty("defaultValue")&&oe(h,g.type,ie(g.defaultValue)),g.checked==null&&g.defaultChecked!=null&&(h.defaultChecked=!!g.defaultChecked)}function te(h,g,j){if(g.hasOwnProperty("value")||g.hasOwnProperty("defaultValue")){var O=g.type;if(!(O!=="submit"&&O!=="reset"||g.value!==void 0&&g.value!==null))return;g=""+h._wrapperState.initialValue,j||g===h.value||(h.value=g),h.defaultValue=g}j=h.name,j!==""&&(h.name=""),h.defaultChecked=!!h._wrapperState.initialChecked,j!==""&&(h.name=j)}function oe(h,g,j){(g!=="number"||fe(h.ownerDocument)!==h)&&(j==null?h.defaultValue=""+h._wrapperState.initialValue:h.defaultValue!==""+j&&(h.defaultValue=""+j))}var le=Array.isArray;function ye(h,g,j,O){if(h=h.options,g){g={};for(var D=0;D<j.length;D++)g["$"+j[D]]=!0;for(j=0;j<h.length;j++)D=g.hasOwnProperty("$"+h[j].value),h[j].selected!==D&&(h[j].selected=D),D&&O&&(h[j].defaultSelected=!0)}else{for(j=""+ie(j),g=null,D=0;D<h.length;D++){if(h[D].value===j){h[D].selected=!0,O&&(h[D].defaultSelected=!0);return}g!==null||h[D].disabled||(g=h[D])}g!==null&&(g.selected=!0)}}function xe(h,g){if(g.dangerouslySetInnerHTML!=null)throw Error(n(91));return $({},g,{value:void 0,defaultValue:void 0,children:""+h._wrapperState.initialValue})}function Ce(h,g){var j=g.value;if(j==null){if(j=g.children,g=g.defaultValue,j!=null){if(g!=null)throw Error(n(92));if(le(j)){if(1<j.length)throw Error(n(93));j=j[0]}g=j}g==null&&(g=""),j=g}h._wrapperState={initialValue:ie(j)}}function Be(h,g){var j=ie(g.value),O=ie(g.defaultValue);j!=null&&(j=""+j,j!==h.value&&(h.value=j),g.defaultValue==null&&h.defaultValue!==j&&(h.defaultValue=j)),O!=null&&(h.defaultValue=""+O)}function Re(h){var g=h.textContent;g===h._wrapperState.initialValue&&g!==""&&g!==null&&(h.value=g)}function ge(h){switch(h){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ke(h,g){return h==null||h==="http://www.w3.org/1999/xhtml"?ge(g):h==="http://www.w3.org/2000/svg"&&g==="foreignObject"?"http://www.w3.org/1999/xhtml":h}var De,at=(function(h){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(g,j,O,D){MSApp.execUnsafeLocalFunction(function(){return h(g,j,O,D)})}:h})(function(h,g){if(h.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in h)h.innerHTML=g;else{for(De=De||document.createElement("div"),De.innerHTML="<svg>"+g.valueOf().toString()+"</svg>",g=De.firstChild;h.firstChild;)h.removeChild(h.firstChild);for(;g.firstChild;)h.appendChild(g.firstChild)}});function tt(h,g){if(g){var j=h.firstChild;if(j&&j===h.lastChild&&j.nodeType===3){j.nodeValue=g;return}}h.textContent=g}var Ae={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},_t=["Webkit","ms","Moz","O"];Object.keys(Ae).forEach(function(h){_t.forEach(function(g){g=g+h.charAt(0).toUpperCase()+h.substring(1),Ae[g]=Ae[h]})});function Pt(h,g,j){return g==null||typeof g=="boolean"||g===""?"":j||typeof g!="number"||g===0||Ae.hasOwnProperty(h)&&Ae[h]?(""+g).trim():g+"px"}function rt(h,g){h=h.style;for(var j in g)if(g.hasOwnProperty(j)){var O=j.indexOf("--")===0,D=Pt(j,g[j],O);j==="float"&&(j="cssFloat"),O?h.setProperty(j,D):h[j]=D}}var Ui=$({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Tt(h,g){if(g){if(Ui[h]&&(g.children!=null||g.dangerouslySetInnerHTML!=null))throw Error(n(137,h));if(g.dangerouslySetInnerHTML!=null){if(g.children!=null)throw Error(n(60));if(typeof g.dangerouslySetInnerHTML!="object"||!("__html"in g.dangerouslySetInnerHTML))throw Error(n(61))}if(g.style!=null&&typeof g.style!="object")throw Error(n(62))}}function fi(h,g){if(h.indexOf("-")===-1)return typeof g.is=="string";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 vr=null;function h0(h){return h=h.target||h.srcElement||window,h.correspondingUseElement&&(h=h.correspondingUseElement),h.nodeType===3?h.parentNode:h}var p0=null,Gl=null,Kl=null;function xP(h){if(h=Id(h)){if(typeof p0!="function")throw Error(n(280));var g=h.stateNode;g&&(g=om(g),p0(h.stateNode,h.type,g))}}function bP(h){Gl?Kl?Kl.push(h):Kl=[h]:Gl=h}function wP(){if(Gl){var h=Gl,g=Kl;if(Kl=Gl=null,xP(h),g)for(h=0;h<g.length;h++)xP(g[h])}}function _P(h,g){return h(g)}function SP(){}var m0=!1;function jP(h,g,j){if(m0)return h(g,j);m0=!0;try{return _P(h,g,j)}finally{m0=!1,(Gl!==null||Kl!==null)&&(SP(),wP())}}function hd(h,g){var j=h.stateNode;if(j===null)return null;var O=om(j);if(O===null)return null;j=O[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":(O=!O.disabled)||(h=h.type,O=!(h==="button"||h==="input"||h==="select"||h==="textarea")),h=!O;break e;default:h=!1}if(h)return null;if(j&&typeof j!="function")throw Error(n(231,g,typeof j));return j}var g0=!1;if(l)try{var pd={};Object.defineProperty(pd,"passive",{get:function(){g0=!0}}),window.addEventListener("test",pd,pd),window.removeEventListener("test",pd,pd)}catch{g0=!1}function BK(h,g,j,O,D,q,Q,ae,ue){var Se=Array.prototype.slice.call(arguments,3);try{g.apply(j,Se)}catch(Ie){this.onError(Ie)}}var md=!1,$p=null,Fp=!1,v0=null,qK={onError:function(h){md=!0,$p=h}};function UK(h,g,j,O,D,q,Q,ae,ue){md=!1,$p=null,BK.apply(qK,arguments)}function zK(h,g,j,O,D,q,Q,ae,ue){if(UK.apply(this,arguments),md){if(md){var Se=$p;md=!1,$p=null}else throw Error(n(198));Fp||(Fp=!0,v0=Se)}}function Ts(h){var g=h,j=h;if(h.alternate)for(;g.return;)g=g.return;else{h=g;do g=h,(g.flags&4098)!==0&&(j=g.return),h=g.return;while(h)}return g.tag===3?j:null}function NP(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 EP(h){if(Ts(h)!==h)throw Error(n(188))}function HK(h){var g=h.alternate;if(!g){if(g=Ts(h),g===null)throw Error(n(188));return g!==h?null:h}for(var j=h,O=g;;){var D=j.return;if(D===null)break;var q=D.alternate;if(q===null){if(O=D.return,O!==null){j=O;continue}break}if(D.child===q.child){for(q=D.child;q;){if(q===j)return EP(D),h;if(q===O)return EP(D),g;q=q.sibling}throw Error(n(188))}if(j.return!==O.return)j=D,O=q;else{for(var Q=!1,ae=D.child;ae;){if(ae===j){Q=!0,j=D,O=q;break}if(ae===O){Q=!0,O=D,j=q;break}ae=ae.sibling}if(!Q){for(ae=q.child;ae;){if(ae===j){Q=!0,j=q,O=D;break}if(ae===O){Q=!0,O=q,j=D;break}ae=ae.sibling}if(!Q)throw Error(n(189))}}if(j.alternate!==O)throw Error(n(190))}if(j.tag!==3)throw Error(n(188));return j.stateNode.current===j?h:g}function kP(h){return h=HK(h),h!==null?OP(h):null}function OP(h){if(h.tag===5||h.tag===6)return h;for(h=h.child;h!==null;){var g=OP(h);if(g!==null)return g;h=h.sibling}return null}var CP=t.unstable_scheduleCallback,AP=t.unstable_cancelCallback,WK=t.unstable_shouldYield,VK=t.unstable_requestPaint,Sn=t.unstable_now,GK=t.unstable_getCurrentPriorityLevel,y0=t.unstable_ImmediatePriority,PP=t.unstable_UserBlockingPriority,Bp=t.unstable_NormalPriority,KK=t.unstable_LowPriority,TP=t.unstable_IdlePriority,qp=null,ha=null;function YK(h){if(ha&&typeof ha.onCommitFiberRoot=="function")try{ha.onCommitFiberRoot(qp,h,void 0,(h.current.flags&128)===128)}catch{}}var zi=Math.clz32?Math.clz32:ZK,QK=Math.log,XK=Math.LN2;function ZK(h){return h>>>=0,h===0?32:31-(QK(h)/XK|0)|0}var Up=64,zp=4194304;function gd(h){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return h&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return h}}function Hp(h,g){var j=h.pendingLanes;if(j===0)return 0;var O=0,D=h.suspendedLanes,q=h.pingedLanes,Q=j&268435455;if(Q!==0){var ae=Q&~D;ae!==0?O=gd(ae):(q&=Q,q!==0&&(O=gd(q)))}else Q=j&~D,Q!==0?O=gd(Q):q!==0&&(O=gd(q));if(O===0)return 0;if(g!==0&&g!==O&&(g&D)===0&&(D=O&-O,q=g&-g,D>=q||D===16&&(q&4194240)!==0))return g;if((O&4)!==0&&(O|=j&16),g=h.entangledLanes,g!==0)for(h=h.entanglements,g&=O;0<g;)j=31-zi(g),D=1<<j,O|=h[j],g&=~D;return O}function JK(h,g){switch(h){case 1:case 2:case 4:return g+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return g+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function eY(h,g){for(var j=h.suspendedLanes,O=h.pingedLanes,D=h.expirationTimes,q=h.pendingLanes;0<q;){var Q=31-zi(q),ae=1<<Q,ue=D[Q];ue===-1?((ae&j)===0||(ae&O)!==0)&&(D[Q]=JK(ae,g)):ue<=g&&(h.expiredLanes|=ae),q&=~ae}}function x0(h){return h=h.pendingLanes&-1073741825,h!==0?h:h&1073741824?1073741824:0}function RP(){var h=Up;return Up<<=1,(Up&4194240)===0&&(Up=64),h}function b0(h){for(var g=[],j=0;31>j;j++)g.push(h);return g}function vd(h,g,j){h.pendingLanes|=g,g!==536870912&&(h.suspendedLanes=0,h.pingedLanes=0),h=h.eventTimes,g=31-zi(g),h[g]=j}function tY(h,g){var j=h.pendingLanes&~g;h.pendingLanes=g,h.suspendedLanes=0,h.pingedLanes=0,h.expiredLanes&=g,h.mutableReadLanes&=g,h.entangledLanes&=g,g=h.entanglements;var O=h.eventTimes;for(h=h.expirationTimes;0<j;){var D=31-zi(j),q=1<<D;g[D]=0,O[D]=-1,h[D]=-1,j&=~q}}function w0(h,g){var j=h.entangledLanes|=g;for(h=h.entanglements;j;){var O=31-zi(j),D=1<<O;D&g|h[O]&g&&(h[O]|=g),j&=~D}}var Vt=0;function IP(h){return h&=-h,1<h?4<h?(h&268435455)!==0?16:536870912:4:1}var MP,_0,DP,LP,$P,S0=!1,Wp=[],_o=null,So=null,jo=null,yd=new Map,xd=new Map,No=[],nY="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function FP(h,g){switch(h){case"focusin":case"focusout":_o=null;break;case"dragenter":case"dragleave":So=null;break;case"mouseover":case"mouseout":jo=null;break;case"pointerover":case"pointerout":yd.delete(g.pointerId);break;case"gotpointercapture":case"lostpointercapture":xd.delete(g.pointerId)}}function bd(h,g,j,O,D,q){return h===null||h.nativeEvent!==q?(h={blockedOn:g,domEventName:j,eventSystemFlags:O,nativeEvent:q,targetContainers:[D]},g!==null&&(g=Id(g),g!==null&&_0(g)),h):(h.eventSystemFlags|=O,g
vendor: 1,957 bytes, line 37
37=h.targetContainers,D!==null&&g.indexOf(D)===-1&&g.push(D),h)}function rY(h,g,j,O,D){switch(g){case"focusin":return _o=bd(_o,h,g,j,O,D),!0;case"dragenter":return So=bd(So,h,g,j,O,D),!0;case"mouseover":return jo=bd(jo,h,g,j,O,D),!0;case"pointerover":var q=D.pointerId;return yd.set(q,bd(yd.get(q)||null,h,g,j,O,D)),!0;case"gotpointercapture":return q=D.pointerId,xd.set(q,bd(xd.get(q)||null,h,g,j,O,D)),!0}return!1}function BP(h){var g=Rs(h.target);if(g!==null){var j=Ts(g);if(j!==null){if(g=j.tag,g===13){if(g=NP(j),g!==null){h.blockedOn=g,$P(h.priority,function(){DP(j)});return}}else if(g===3&&j.stateNode.current.memoizedState.isDehydrated){h.blockedOn=j.tag===3?j.stateNode.containerInfo:null;return}}}h.blockedOn=null}function Vp(h){if(h.blockedOn!==null)return!1;for(var g=h.targetContainers;0<g.length;){var j=N0(h.domEventName,h.eventSystemFlags,g[0],h.nativeEvent);if(j===null){j=h.nativeEvent;var O=new j.constructor(j.type,j);vr=O,j.target.dispatchEvent(O),vr=null}else return g=Id(j),g!==null&&_0(g),h.blockedOn=j,!1;g.shift()}return!0}function qP(h,g,j){Vp(h)&&j.delete(g)}function iY(){S0=!1,_o!==null&&Vp(_o)&&(_o=null),So!==null&&Vp(So)&&(So=null),jo!==null&&Vp(jo)&&(jo=null),yd.forEach(qP),xd.forEach(qP)}function wd(h,g){h.blockedOn===g&&(h.blockedOn=null,S0||(S0=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,iY)))}function _d(h){function g(D){return wd(D,h)}if(0<Wp.length){wd(Wp[0],h);for(var j=1;j<Wp.length;j++){var O=Wp[j];O.blockedOn===h&&(O.blockedOn=null)}}for(_o!==null&&wd(_o,h),So!==null&&wd(So,h),jo!==null&&wd(jo,h),yd.forEach(g),xd.forEach(g),j=0;j<No.length;j++)O=No[j],O.blockedOn===h&&(O.blockedOn=null);for(;0<No.length&&(j=No[0],j.blockedOn===null);)BP(j),j.blockedOn===null&&No.shift()}var Yl=w.ReactCurrentBatchConfig,Gp=!0;function aY(h,g,j,O){var D=Vt,q=Yl.transition;Yl.transition=null;try{Vt=1,j0(h,g,j,O)}finally{Vt=D,Yl.transition=q}}function oY(h,g,j,O){var D=Vt,q=Yl.transition;Yl.transition=null;
vendor: 13,364 bytes, line 37
37try{Vt=4,j0(h,g,j,O)}finally{Vt=D,Yl.transition=q}}function j0(h,g,j,O){if(Gp){var D=N0(h,g,j,O);if(D===null)U0(h,g,O,Kp,j),FP(h,O);else if(rY(D,h,g,j,O))O.stopPropagation();else if(FP(h,O),g&4&&-1<nY.indexOf(h)){for(;D!==null;){var q=Id(D);if(q!==null&&MP(q),q=N0(h,g,j,O),q===null&&U0(h,g,O,Kp,j),q===D)break;D=q}D!==null&&O.stopPropagation()}else U0(h,g,O,null,j)}}var Kp=null;function N0(h,g,j,O){if(Kp=null,h=h0(O),h=Rs(h),h!==null)if(g=Ts(h),g===null)h=null;else if(j=g.tag,j===13){if(h=NP(g),h!==null)return h;h=null}else if(j===3){if(g.stateNode.current.memoizedState.isDehydrated)return g.tag===3?g.stateNode.containerInfo:null;h=null}else g!==h&&(h=null);return Kp=h,null}function UP(h){switch(h){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(GK()){case y0:return 1;case PP:return 4;case Bp:case KK:return 16;case TP:return 536870912;default:return 16}default:return 16}}var Eo=null,E0=null,Yp=null;function zP(){if(Yp)return Yp;var h,g=E0,j=g.length,O,D="value"in Eo?Eo.value:Eo.textContent,q=D.length;for(h=0;h<j&&g[h]===D[h];h++);var Q=j-h;for(O=1;O<=Q&&g[j-O]===D[q-O];O++);return Yp=D.slice(h,1<O?1-O:void 0)}function Qp(h){var g=h.keyCode;return"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 Xp(){return!0}function HP(){return!1}function Yr(h){function g(j,O,D,q,Q){this._reactName=j,this._targetInst=D,this.type=O,this.nativeEvent=q,this.target=Q,this.currentTarget=null;for(var ae in h)h.hasOwnProperty(ae)&&(j=h[ae],this[ae]=j?j(q):q[ae]);return this.isDefaultPrevented=(q.defaultPrevented!=null?q.defaultPrevented:q.returnValue===!1)?Xp:HP,this.isPropagationStopped=HP,this}return $(g.prototype,{preventDefault:function(){this.defaultPrevented=!0;var j=this.nativeEvent;j&&(j.preventDefault?j.preventDefault():typeof j.returnValue!="unknown"&&(j.returnValue=!1),this.isDefaultPrevented=Xp)},stopPropagation:function(){var j=this.nativeEvent;j&&(j.stopPropagation?j.stopPropagation():typeof j.cancelBubble!="unknown"&&(j.cancelBubble=!0),this.isPropagationStopped=Xp)},persist:function(){},isPersistent:Xp}),g}var Ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(h){return h.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},k0=Yr(Ql),Sd=$({},Ql,{view:0,detail:0}),sY=Yr(Sd),O0,C0,jd,Zp=$({},Sd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:P0,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!==jd&&(jd&&h.type==="mousemove"?(O0=h.screenX-jd.screenX,C0=h.screenY-jd.screenY):C0=O0=0,jd=h),O0)},movementY:function(h){return"movementY"in h?h.movementY:C0}}),WP=Yr(Zp),lY=$({},Zp,{dataTransfer:0}),cY=Yr(lY),uY=$({},Sd,{relatedTarget:0}),A0=Yr(uY),dY=$({},Ql,{animationName:0,elapsedTime:0,pseudoElement:0}),fY=Yr(dY),hY=$({},Ql,{clipboardData:function(h){return"clipboardData"in h?h.clipboardData:window.clipboardData}}),pY=Yr(hY),mY=$({},Ql,{data:0}),VP=Yr(mY),gY={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vY={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"},yY={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xY(h){var g=this.nativeEvent;return g.getModifierState?g.getModifierState(h):(h=yY[h])?!!g[h]:!1}function P0(){return xY}var bY=$({},Sd,{key:function(h){if(h.key){var g=gY[h.key]||h.key;if(g!=="Unidentified")return g}return h.type==="keypress"?(h=Qp(h),h===13?"Enter":String.fromCharCode(h)):h.type==="keydown"||h.type==="keyup"?vY[h.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:P0,charCode:function(h){return h.type==="keypress"?Qp(h):0},keyCode:function(h){return h.type==="keydown"||h.type==="keyup"?h.keyCode:0},which:function(h){return h.type==="keypress"?Qp(h):h.type==="keydown"||h.type==="keyup"?h.keyCode:0}}),wY=Yr(bY),_Y=$({},Zp,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),GP=Yr(_Y),SY=$({},Sd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:P0}),jY=Yr(SY),NY=$({},Ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),EY=Yr(NY),kY=$({},Zp,{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}),OY=Yr(kY),CY=[9,13,27,32],T0=l&&"CompositionEvent"in window,Nd=null;l&&"documentMode"in document&&(Nd=document.documentMode);var AY=l&&"TextEvent"in window&&!Nd,KP=l&&(!T0||Nd&&8<Nd&&11>=Nd),YP=" ",QP=!1;function XP(h,g){switch(h){case"keyup":return CY.indexOf(g.keyCode)!==-1;case"keydown":return g.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZP(h){return h=h.detail,typeof h=="object"&&"data"in h?h.data:null}var Xl=!1;function PY(h,g){switch(h){case"compositionend":return ZP(g);case"keypress":return g.which!==32?null:(QP=!0,YP);case"textInput":return h=g.data,h===YP&&QP?null:h;default:return null}}function TY(h,g){if(Xl)return h==="compositionend"||!T0&&XP(h,g)?(h=zP(),Yp=E0=Eo=null,Xl=!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 KP&&g.locale!=="ko"?null:g.data;default:return null}}var RY={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 JP(h){var g=h&&h.nodeName&&h.nodeName.toLowerCase();return g==="input"?!!RY[h.type]:g==="textarea"}function e2(h,g,j,O){bP(O),g=rm(g,"onChange"),0<g.length&&(j=new k0("onChange","change",null,j,O),h.push({event:j,listeners:g}))}var Ed=null,kd=null;function IY(h){y2(h,0)}function Jp(h){var g=nc(h);if(V(g))return h}function MY(h,g){if(h==="change")return g}var t2=!1;if(l){var R0;if(l){var I0="oninput"in document;if(!I0){var n2=document.createElement("div");n2.setAttribute("oninput","return;"),I0=typeof n2.oninput=="function"}R0=I0}else R0=!1;t2=R0&&(!document.documentMode||9<document.documentMode)}function r2(){Ed&&(Ed.detachEvent("onpropertychange",i2),kd=Ed=null)}function i2(h){if(h.propertyName==="value"&&Jp(kd)){var g=[];e2(g,kd,h,h0(h)),jP(IY,g)}}function DY(h,g,j){h==="focusin"?(r2(),Ed=g,kd=j,Ed.attachEvent("onpropertychange",i2)):h==="focusout"&&r2()}function LY(h){if(h==="selectionchange"||h==="keyup"||h==="keydown")return Jp(kd)}function $Y(h,g){if(h==="click")return Jp(g)}function FY(h,g){if(h==="input"||h==="change")return Jp(g)}function BY(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var Hi=typeof Object.is=="function"?Object.is:BY;function Od(h,g){if(Hi(h,g))return!0;if(typeof h!="object"||h===null||typeof g!="object"||g===null)return!1;var j=Object.keys(h),O=Object.keys(g);if(j.length!==O.length)return!1;for(O=0;O<j.length;O++){var D=j[O];if(!c.call(g,D)||!Hi(h[D],g[D]))return!1}return!0}function a2(h){for(;h&&h.firstChild;)h=h.firstChild;return h}function o2(h,g){var j=a2(h);h=0;for(var O;j;){if(j.nodeType===3){if(O=h+j.textContent.length,h<=g&&O>=g)return{node:j,offset:g-h};h=O}e:{for(;j;){if(j.nextSibling){j=j.nextSibling;break e}j=j.parentNode}j=void 0}j=a2(j)}}function s2(h,g){return h&&g?h===g?!0:h&&h.nodeType===3?!1:g&&g.nodeType===3?s2(h,g.parentNode):"contains"in h?h.contains(g):h.compareDocumentPosition?!!(h.compareDocumentPosition(g)&16):!1:!1}function l2(){for(var h=window,g=fe();g instanceof h.HTMLIFrameElement;){try{var j=typeof g.contentWindow.location.href=="string"}catch{j=!1}if(j)h=g.contentWindow;else break;g=fe(h.document)}return g}function M0(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 qY(h){var g=l2(),j=h.focusedElem,O=h.selectionRange;if(g!==j&&j&&j.ownerDocument&&s2(j.ownerDocument.documentElement,j)){if(O!==null&&M0(j)){if(g=O.start,h=O.end,h===void 0&&(h=g),"selectionStart"in j)j.selectionStart=g,j.selectionEnd=Math.min(h,j.value.length);else if(h=(g=j.ownerDocument||document)&&g.defaultView||window,h.getSelection){h=h.getSelection();var D=j.textContent.length,q=Math.min(O.start,D);O=O.end===void 0?q:Math.min(O.end,D),!h.extend&&q>O&&(D=O,O=q,q=D),D=o2(j,q);var Q=o2(j,O);D&&Q&&(h.rangeCount!==1||h.anchorNode!==D.node||h.anchorOffset!==D.offset||h.focusNode!==Q.node||h.focusOffset!==Q.offset)&&(g=g.createRange(),g.setStart(D.node,D.offset),h.removeAllRanges(),q>O?(h.addRange(g),h.extend(Q.node,Q.offset)):(g.setEnd(Q.node,Q.offset),h.addRange(g)))}}for(g=[],h=j;h=h.parentNode;)h.nodeType===1&&g.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof j.focus=="function"&&j.focus(),j=0;j<g.length;j++)h=g[j],h.element.scrollLeft=h.left,h.element.scrollTop=h.top}}var UY=l&&"documentMode"in document&&11>=document.documentMode,Zl=null,D0=null,Cd=null,L0=!1;function c2(h,g,j){var O=j.window===j?j.document:j.nodeType===9?j:j.ownerDocument;L0||Zl==null||Zl!==fe(O)||(O=Zl,"selectionStart"in O&&M0(O)?O={start:O.selectionStart,end:O.selectionEnd}:(O=(O.ownerDocument&&O.ownerDocument.defaultView||window).getSelection(),O={anchorNode:O.anchorNode,anchorOffset:O.anchorOffset,focusNode:O.focusNode,focusOffset:O.focusOffset}),Cd&&Od(Cd,O)||(Cd=O,O=rm(D0,"onSelect"),0<O.length&&(g=new k0("onSelect","select",null,g,j),h.push({event:g,listeners:O}),g.target=Zl)))}function em(h,g){var j={};return j[h.toLowerCase()]=g.toLowerCase(),j["Webkit"+h]="webkit"+g,j["Moz"+h]="moz"+g,j}var Jl={animationend:em("Animation","AnimationEnd"),animationiteration:em("Animation","AnimationIteration"),animationstart:em("Animation","AnimationStart"),transitionend:em("Transition","TransitionEnd")},$0={},u2={};l&&(u2=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function tm(h){if($0[h])return $0[h];if(!Jl[h])return h;var g=Jl[h],j;for(j in g)if(g.hasOwnProperty(j)&&j in u2)return $0[h]=g[j];return h}var d2=tm("animationend"),f2=tm("animationiteration"),h2=tm("animationstart"),p2=tm("transitionend"),m2=new Map,g2="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ko(h,g){m2.set(h,g),a(g,[h])}for(var F0=0;F0<g2.length;F0++){var B0=g2[F0],zY=B0.toLowerCase(),HY=B0[0].toUpperCase()+B0.slice(1);ko(zY,"on"+HY)}ko(d2,"onAnimationEnd"),ko(f2,"onAnimationIteration"),ko(h2,"onAnimationStart"),ko("dblclick","onDoubleClick"),ko("focusin","onFocus"),ko("focusout","onBlur"),ko(p2,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ad="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(" "),WY=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ad));function v2(h,g,j){var O=h.type||"unknown-event";h.currentTarget=j,zK(O,g,void 0,h),h.currentTarget=null}function y2(h,g){g=(g&4)!==0;for(var j=0;j<h.length;j++){var O=h[j],D=O.event;O=O.listeners;e:{var q=void 0;if(g)for(var Q=O.length-1;0<=Q;Q--){var ae=O[Q],ue=ae.instance,Se=ae.currentTarget;if(ae=ae.listener,ue!==q&&D.isPropagationStopped())break e;v2(D,ae,Se),q=ue}else for(Q=0;Q<O.length;Q++){if(ae=O[Q],ue=ae.instance,Se=ae.currentTarget,ae=ae.listener,ue!==q&&D.isPropagationStopped())break e;v2(D,ae,Se),q=ue}}}if(Fp)throw h=v0,Fp=!1,v0=null,h}function on(h,g){var j=g[K0];j===void 0&&(j=g[K0]=new Set);var O=h+"__bubble";j.has(O)||(x2(g,h,2,!1),j.add(O))}function q0(h,g,j){var O=0;g&&(O|=4),x2(j,h,O,g)}var nm="_reactListening"+Math.random().toString(36).slice(2);function Pd(h){if(!h[nm]){h[nm]=!0,r.forEach(function(j){j!=="selectionchange"&&(WY.has(j)||q0(j,!1,h),q0(j,!0,h))});var g=h.nodeType===9?h:h.ownerDocument;g===null||g[nm]||(g[nm]=!0,q0("selectionchange",!1,g))}}function x2(h,g,j,O){switch(UP(g)){case 1:var D=aY;break;case 4:D=oY;break;default:D=j0}j=D.bind(null,g,j,h),D=void 0,!g0||g!=="touchstart"&&g!=="touchmove"&&g!=="wheel"||(D=!0),O?D!==void 0?h.addEventListener(g,j,{capture:!0,passive:D}):h.addEventListener(g,j,!0):D!==void 0?h.addEventListener(g,j,{passive:D}):h.addEventListener(g,j,!1)}function U0(h,g,j,O,D){var q=O;if((g&1)===0&&(g&2)===0&&O!==null)e:for(;;){if(O===null)return;var Q=O.tag;if(Q===3||Q===4){var ae=O.stateNode.containerInfo;if(ae===D||ae.nodeType===8&&ae.parentNode===D)break;if(Q===4)for(Q=O.return;Q!==null;){var ue=Q.tag;if((ue===3||ue===4)&&(ue=Q.stateNode.containerInfo,ue===D||ue.nodeType===8&&ue.parentNode===D))return;Q=Q.return}for(;ae!==null;){if(Q=Rs(ae),Q===null)return;if(ue=Q.tag,ue===5||ue===6){O=q=Q;continue e}ae=ae.parentNode}}O=O.return}jP(function(){var Se=q,Ie=h0(j),Me=[];e:{var Pe=m2.get(h);if(Pe!==void 0){var We=k0,Qe=h;switch(h){case"keypress":if(Qp(j)===0)break e;case"keydown":case"keyup":We=wY;break;case"focusin":Qe="focus",We=A0;break;case"focusout":Qe="blur",We=A0;break;case"beforeblur":case"afterblur":We=A0;break;case"click":if(j.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":We=WP;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":We=cY;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":We=jY;break;case d2:case f2:case h2:We=fY;break;case p2:We=EY;break;case"scroll":We=sY;break;case"wheel":We=OY;break;case"copy":case"cut":case"paste":We=pY;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":We=GP}var Je=(g&4)!==0,jn=!Je&&h==="scroll",we=Je?Pe!==null?Pe+"Capture":null:Pe;Je=[];for(var pe=Se,_e;pe!==null;){_e=pe;var Fe=_e.stateNode;if(_e.tag===5&&Fe!==null&&(_e=Fe,we!==null&&(Fe=hd(pe,we),Fe!=null&&Je.push(Td(pe,Fe,_e)))),jn)break;pe=pe.return}0<Je.length&&(Pe=new We(Pe,Qe,null,j,Ie),Me.push({event:Pe,listeners:Je}))}}if((g&7)===0){e:{if(Pe=h==="mouseover"||h==="pointerover",We=h==="mouseout"||h==="pointerout",Pe&&j!==vr&&(Qe=j.relatedTarget||j.fromElement)&&(Rs(Qe)||Qe[Ha]))break e;if((We||Pe)&&(Pe=Ie.window===Ie?Ie:(Pe=Ie.ownerDocument)?Pe.defaultView||Pe.parentWindow:window,We?(Qe=j.relatedTarget||j.toElement,We=Se,Qe=Qe?Rs(Qe):null,Qe!==null&&(jn=Ts(Qe),Qe!==jn||Qe.tag!==5&&Qe.tag!==6)&&(Qe=null)):(We=null,Qe=Se),We!==Qe)){if(Je=WP,Fe="onMouseLeave",we="onMouseEnter",pe="mouse",(h==="pointerout"||h==="pointerover")&&(Je=GP,Fe="onPointerLeave",we="onPointerEnter",pe="pointer"),jn=We==null?Pe:nc(We),_e=Qe==null?Pe:nc(Qe),Pe=new Je(Fe,pe+"leave",We,j,Ie),Pe.target=jn,Pe.relatedTarget=_e,Fe=null,Rs(Ie)===Se&&(Je=new Je(we,pe+"enter",Qe,j,Ie),Je.target=_e,Je.relatedTarget=jn,Fe=Je),jn=Fe,We&&Qe)t:{for(Je=We,we=Qe,pe=0,_e=Je;_e;_e=ec(_e))pe++;
vendor: 5,237 bytes, lines 37-38
37for(_e=0,Fe=we;Fe;Fe=ec(Fe))_e++;for(;0<pe-_e;)Je=ec(Je),pe--;for(;0<_e-pe;)we=ec(we),_e--;for(;pe--;){if(Je===we||we!==null&&Je===we.alternate)break t;Je=ec(Je),we=ec(we)}Je=null}else Je=null;We!==null&&b2(Me,Pe,We,Je,!1),Qe!==null&&jn!==null&&b2(Me,jn,Qe,Je,!0)}}e:{if(Pe=Se?nc(Se):window,We=Pe.nodeName&&Pe.nodeName.toLowerCase(),We==="select"||We==="input"&&Pe.type==="file")var nt=MY;else if(JP(Pe))if(t2)nt=FY;else{nt=LY;var ot=DY}else(We=Pe.nodeName)&&We.toLowerCase()==="input"&&(Pe.type==="checkbox"||Pe.type==="radio")&&(nt=$Y);if(nt&&(nt=nt(h,Se))){e2(Me,nt,j,Ie);break e}ot&&ot(h,Pe,Se),h==="focusout"&&(ot=Pe._wrapperState)&&ot.controlled&&Pe.type==="number"&&oe(Pe,"number",Pe.value)}switch(ot=Se?nc(Se):window,h){case"focusin":(JP(ot)||ot.contentEditable==="true")&&(Zl=ot,D0=Se,Cd=null);break;case"focusout":Cd=D0=Zl=null;break;case"mousedown":L0=!0;break;case"contextmenu":case"mouseup":case"dragend":L0=!1,c2(Me,j,Ie);break;case"selectionchange":if(UY)break;case"keydown":case"keyup":c2(Me,j,Ie)}var st;if(T0)e:{switch(h){case"compositionstart":var ft="onCompositionStart";break e;case"compositionend":ft="onCompositionEnd";break e;case"compositionupdate":ft="onCompositionUpdate";break e}ft=void 0}else Xl?XP(h,j)&&(ft="onCompositionEnd"):h==="keydown"&&j.keyCode===229&&(ft="onCompositionStart");ft&&(KP&&j.locale!=="ko"&&(Xl||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&Xl&&(st=zP()):(Eo=Ie,E0="value"in Eo?Eo.value:Eo.textContent,Xl=!0)),ot=rm(Se,ft),0<ot.length&&(ft=new VP(ft,h,null,j,Ie),Me.push({event:ft,listeners:ot}),st?ft.data=st:(st=ZP(j),st!==null&&(ft.data=st)))),(st=AY?PY(h,j):TY(h,j))&&(Se=rm(Se,"onBeforeInput"),0<Se.length&&(Ie=new VP("onBeforeInput","beforeinput",null,j,Ie),Me.push({event:Ie,listeners:Se}),Ie.data=st))}y2(Me,g)})}function Td(h,g,j){return{instance:h,listener:g,currentTarget:j}}function rm(h,g){for(var j=g+"Capture",O=[];h!==null;){var D=h,q=D.stateNode;D.tag===5&&q!==null&&(D=q,q=hd(h,j),q!=null&&O.unshift(Td(h,q,D)),q=hd(h,g),q!=null&&O.push(Td(h,q,D))),h=h.return}return O}function ec(h){if(h===null)return null;do h=h.return;while(h&&h.tag!==5);return h||null}function b2(h,g,j,O,D){for(var q=g._reactName,Q=[];j!==null&&j!==O;){var ae=j,ue=ae.alternate,Se=ae.stateNode;if(ue!==null&&ue===O)break;ae.tag===5&&Se!==null&&(ae=Se,D?(ue=hd(j,q),ue!=null&&Q.unshift(Td(j,ue,ae))):D||(ue=hd(j,q),ue!=null&&Q.push(Td(j,ue,ae)))),j=j.return}Q.length!==0&&h.push({event:g,listeners:Q})}var VY=/\r\n?/g,GY=/\u0000|\uFFFD/g;function w2(h){return(typeof h=="string"?h:""+h).replace(VY,` 38`).replace(GY,"")}function im(h,g,j){if(g=w2(g),w2(h)!==g&&j)throw Error(n(425))}function am(){}var z0=null,H0=null;function W0(h,g){return h==="textarea"||h==="noscript"||typeof g.children=="string"||typeof g.children=="number"||typeof g.dangerouslySetInnerHTML=="object"&&g.dangerouslySetInnerHTML!==null&&g.dangerouslySetInnerHTML.__html!=null}var V0=typeof setTimeout=="function"?setTimeout:void 0,KY=typeof clearTimeout=="function"?clearTimeout:void 0,_2=typeof Promise=="function"?Promise:void 0,YY=typeof queueMicrotask=="function"?queueMicrotask:typeof _2<"u"?function(h){return _2.resolve(null).then(h).catch(QY)}:V0;function QY(h){setTimeout(function(){throw h})}function G0(h,g){var j=g,O=0;do{var D=j.nextSibling;if(h.removeChild(j),D&&D.nodeType===8)if(j=D.data,j==="/$"){if(O===0){h.removeChild(D),_d(g);return}O--}else j!=="$"&&j!=="$?"&&j!=="$!"||O++;j=D}while(j);_d(g)}function Oo(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==="$?")break;if(g==="/$")return null}}return h}function S2(h){h=h.previousSibling;for(var g=0;h;){if(h.nodeType===8){var j=h.data;if(j==="$"||j==="$!"||j==="$?"){if(g===0)return h;g--}else j==="/$"&&g++}h=h.previousSibling}return null}var tc=Math.random().toString(36).slice(2),pa="__reactFiber$"+tc,Rd="__reactProps$"+tc,Ha="__reactContainer$"+tc,K0="__reactEvents$"+tc,XY="__reactListeners$"+tc,ZY="__reactHandles$"+tc;function Rs(h){var g=h[pa];if(g)return g;for(var j=h.parentNode;j;){if(g=j[Ha]||j[pa]){if(j=g.alternate,g.child!==null||j!==null&&j.child!==null)for(h=S2(h);h!==null;){if(j=h[pa])return j;h=S2(h)}return g}h=j,j=h.parentNode}return null}function Id(h){return h=h[pa]||h[Ha],!h||h.tag!==5&&h.tag!==6&&h.tag!==13&&h.tag!==3?null:h}function nc(h){if(h.tag===5||h.tag===6)return h.stateNode;throw Error(n(33))}function om(h){return h[Rd]||null}var Y0=[],rc=-1;function Co(h){return{current:h}}function sn(h){0>rc||(h.current=Y0[rc],Y0[rc]=null,rc--)}function Zt(h,g){rc++,Y0[rc]=h.current,h.current=g}var Ao={},or=Co(Ao),Pr=Co(!1),Is=Ao;function ic(h,g){var j=h.type.contextTypes;if(!j)return Ao;var O=h.stateNode;if(O&&O.__reactInternalMemoizedUnmaskedChildContext===g)return O.__reactInternalMemoizedMaskedChildContext;var D={},q;for(q in j)D[q]=g[q];return O&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=g,h.__reactInternalMemoizedMaskedChildContext=D),D}function Tr(h){return h=h.childContextTypes,h!=null}function sm(){sn(Pr),sn(or)}function j2(h,g,j){if(or.current!==Ao)throw Error(n(168));Zt(or,g),Zt(Pr,j)}function N2(h,g,j){var O=h.stateNode;if(g=g.childContextTypes,typeof O.getChildContext!="function")return j;O=O.getChildContext();
vendor: 5,181 bytes, line 38
38for(var D in O)if(!(D in g))throw Error(n(108,Z(h)||"Unknown",D));return $({},j,O)}function lm(h){return h=(h=h.stateNode)&&h.__reactInternalMemoizedMergedChildContext||Ao,Is=or.current,Zt(or,h),Zt(Pr,Pr.current),!0}function E2(h,g,j){var O=h.stateNode;if(!O)throw Error(n(169));j?(h=N2(h,g,Is),O.__reactInternalMemoizedMergedChildContext=h,sn(Pr),sn(or),Zt(or,h)):sn(Pr),Zt(Pr,j)}var Wa=null,cm=!1,Q0=!1;function k2(h){Wa===null?Wa=[h]:Wa.push(h)}function JY(h){cm=!0,k2(h)}function Po(){if(!Q0&&Wa!==null){Q0=!0;var h=0,g=Vt;try{var j=Wa;for(Vt=1;h<j.length;h++){var O=j[h];do O=O(!0);while(O!==null)}Wa=null,cm=!1}catch(D){throw Wa!==null&&(Wa=Wa.slice(h+1)),CP(y0,Po),D}finally{Vt=g,Q0=!1}}return null}var ac=[],oc=0,um=null,dm=0,hi=[],pi=0,Ms=null,Va=1,Ga="";function Ds(h,g){ac[oc++]=dm,ac[oc++]=um,um=h,dm=g}function O2(h,g,j){hi[pi++]=Va,hi[pi++]=Ga,hi[pi++]=Ms,Ms=h;var O=Va;h=Ga;var D=32-zi(O)-1;O&=~(1<<D),j+=1;var q=32-zi(g)+D;if(30<q){var Q=D-D%5;q=(O&(1<<Q)-1).toString(32),O>>=Q,D-=Q,Va=1<<32-zi(g)+D|j<<D|O,Ga=q+h}else Va=1<<q|j<<D|O,Ga=h}function X0(h){h.return!==null&&(Ds(h,1),O2(h,1,0))}function Z0(h){for(;h===um;)um=ac[--oc],ac[oc]=null,dm=ac[--oc],ac[oc]=null;for(;h===Ms;)Ms=hi[--pi],hi[pi]=null,Ga=hi[--pi],hi[pi]=null,Va=hi[--pi],hi[pi]=null}var Qr=null,Xr=null,un=!1,Wi=null;function C2(h,g){var j=yi(5,null,null,0);j.elementType="DELETED",j.stateNode=g,j.return=h,g=h.deletions,g===null?(h.deletions=[j],h.flags|=16):g.push(j)}function A2(h,g){switch(h.tag){case 5:var j=h.type;return g=g.nodeType!==1||j.toLowerCase()!==g.nodeName.toLowerCase()?null:g,g!==null?(h.stateNode=g,Qr=h,Xr=Oo(g.firstChild),!0):!1;case 6:return g=h.pendingProps===""||g.nodeType!==3?null:g,g!==null?(h.stateNode=g,Qr=h,Xr=null,!0):!1;case 13:return g=g.nodeType!==8?null:g,g!==null?(j=Ms!==null?{id:Va,overflow:Ga}:null,h.memoizedState={dehydrated:g,treeContext:j,retryLane:1073741824},j=yi(18,null,null,0),j.stateNode=g,j.return=h,h.child=j,Qr=h,Xr=null,!0):!1;default:return!1}}function J0(h){return(h.mode&1)!==0&&(h.flags&128)===0}function eb(h){if(un){var g=Xr;if(g){var j=g;if(!A2(h,g)){if(J0(h))throw Error(n(418));g=Oo(j.nextSibling);var O=Qr;g&&A2(h,g)?C2(O,j):(h.flags=h.flags&-4097|2,un=!1,Qr=h)}}else{if(J0(h))throw Error(n(418));h.flags=h.flags&-4097|2,un=!1,Qr=h}}}function P2(h){for(h=h.return;h!==null&&h.tag!==5&&h.tag!==3&&h.tag!==13;)h=h.return;Qr=h}function fm(h){if(h!==Qr)return!1;if(!un)return P2(h),un=!0,!1;var g;if((g=h.tag!==3)&&!(g=h.tag!==5)&&(g=h.type,g=g!=="head"&&g!=="body"&&!W0(h.type,h.memoizedProps)),g&&(g=Xr)){if(J0(h))throw T2(),Error(n(418));for(;g;)C2(h,g),g=Oo(g.nextSibling)}if(P2(h),h.tag===13){if(h=h.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(n(317));e:{for(h=h.nextSibling,g=0;h;){if(h.nodeType===8){var j=h.data;if(j==="/$"){if(g===0){Xr=Oo(h.nextSibling);break e}g--}else j!=="$"&&j!=="$!"&&j!=="$?"||g++}h=h.nextSibling}Xr=null}}else Xr=Qr?Oo(h.stateNode.nextSibling):null;return!0}function T2(){for(var h=Xr;h;)h=Oo(h.nextSibling)}function sc(){Xr=Qr=null,un=!1}function tb(h){Wi===null?Wi=[h]:Wi.push(h)}var eQ=w.ReactCurrentBatchConfig;function Md(h,g,j){if(h=j.ref,h!==null&&typeof h!="function"&&typeof h!="object"){if(j._owner){if(j=j._owner,j){if(j.tag!==1)throw Error(n(309));var O=j.stateNode}if(!O)throw Error(n(147,h));var D=O,q=""+h;return g!==null&&g.ref!==null&&typeof g.ref=="function"&&g.ref._stringRef===q?g.ref:(g=function(Q){var ae=D.refs;Q===null?delete ae[q]:ae[q]=Q},g._stringRef=q,g)}if(typeof h!="string")throw Error(n(284));if(!j._owner)throw Error(n(290,h))}return h}function hm(h,g){throw h=Object.prototype.toString.call(g),Error(n(31,h==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":h))}function R2(h){var g=h._init;return g(h._payload)}function I2(h){function g(we,pe){if(h){var _e=we.deletions;_e===null?(we.deletions=[pe],we.flags|=16):_e.push(pe)}}function j(we,pe){if(!h)return null;for(;pe!==null;)g(we,pe),pe=pe.sibling;return null}function O(we,pe){for(we=new Map;pe!==null;)pe.key!==null?we.set(pe.key,pe):we.set(pe.index,pe),pe=pe.sibling;return we}function D(we,pe){return we=Fo(we,pe),we.index=0,we.sibling=null,we}function q(we,pe,_e){return we.index=_e,h?(_e=we.alternate,_e!==null?(_e=_e.index,_e<pe?(we.flags|=2,pe):_e):(we.flags|=2,pe)):(we.flags|=1048576,pe)}function Q(we){return h&&we.alternate===null&&(we.flags|=2),we}function ae(we,pe,_e,Fe){return pe===null||pe.tag!==6?(pe=Vb(_e,we.mode,Fe),pe.return=we,pe):(pe=D(pe,_e),pe.return=we,pe)}function ue(we,pe,_e,Fe){var nt=_e.type;return nt===C?Ie(we,pe,_e.props.children,Fe,_e.key):pe!==null&&(pe.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===W&&R2(nt)===pe.type)?(Fe=D(pe,_e.props),Fe.ref=Md(we,pe,_e),Fe.return=we,Fe):(Fe=Lm(_e.type,_e.key,_e.props,null,we.mode,Fe),Fe.ref=Md(we,pe,_e),Fe.return=we,Fe)}function Se(we,pe,_e,Fe){return pe===null||pe.tag!==4||pe.stateNode.containerInfo!==_e.containerInfo||pe.stateNode.implementation!==_e.implementation?(pe=Gb(_e,we.mode,Fe),pe.return=we,pe):(pe=D(pe,_e.children||[]),pe.return=we,pe)}function Ie(we,pe,_e,Fe,nt){return pe===null||pe.tag!==7?(pe=Hs(_e,we.mode,Fe,nt),pe.return=we,pe):(pe=D(pe,_e),pe.return=we,pe)}
vendor: 12,262 bytes, line 38
38function Me(we,pe,_e){if(typeof pe=="string"&&pe!==""||typeof pe=="number")return pe=Vb(""+pe,we.mode,_e),pe.return=we,pe;if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case N:return _e=Lm(pe.type,pe.key,pe.props,null,we.mode,_e),_e.ref=Md(we,null,pe),_e.return=we,_e;case k:return pe=Gb(pe,we.mode,_e),pe.return=we,pe;case W:var Fe=pe._init;return Me(we,Fe(pe._payload),_e)}if(le(pe)||K(pe))return pe=Hs(pe,we.mode,_e,null),pe.return=we,pe;hm(we,pe)}return null}function Pe(we,pe,_e,Fe){var nt=pe!==null?pe.key:null;if(typeof _e=="string"&&_e!==""||typeof _e=="number")return nt!==null?null:ae(we,pe,""+_e,Fe);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case N:return _e.key===nt?ue(we,pe,_e,Fe):null;case k:return _e.key===nt?Se(we,pe,_e,Fe):null;case W:return nt=_e._init,Pe(we,pe,nt(_e._payload),Fe)}if(le(_e)||K(_e))return nt!==null?null:Ie(we,pe,_e,Fe,null);hm(we,_e)}return null}function We(we,pe,_e,Fe,nt){if(typeof Fe=="string"&&Fe!==""||typeof Fe=="number")return we=we.get(_e)||null,ae(pe,we,""+Fe,nt);if(typeof Fe=="object"&&Fe!==null){switch(Fe.$$typeof){case N:return we=we.get(Fe.key===null?_e:Fe.key)||null,ue(pe,we,Fe,nt);case k:return we=we.get(Fe.key===null?_e:Fe.key)||null,Se(pe,we,Fe,nt);case W:var ot=Fe._init;return We(we,pe,_e,ot(Fe._payload),nt)}if(le(Fe)||K(Fe))return we=we.get(_e)||null,Ie(pe,we,Fe,nt,null);hm(pe,Fe)}return null}function Qe(we,pe,_e,Fe){for(var nt=null,ot=null,st=pe,ft=pe=0,zn=null;st!==null&&ft<_e.length;ft++){st.index>ft?(zn=st,st=null):zn=st.sibling;var $t=Pe(we,st,_e[ft],Fe);if($t===null){st===null&&(st=zn);break}h&&st&&$t.alternate===null&&g(we,st),pe=q($t,pe,ft),ot===null?nt=$t:ot.sibling=$t,ot=$t,st=zn}if(ft===_e.length)return j(we,st),un&&Ds(we,ft),nt;if(st===null){for(;ft<_e.length;ft++)st=Me(we,_e[ft],Fe),st!==null&&(pe=q(st,pe,ft),ot===null?nt=st:ot.sibling=st,ot=st);return un&&Ds(we,ft),nt}for(st=O(we,st);ft<_e.length;ft++)zn=We(st,we,ft,_e[ft],Fe),zn!==null&&(h&&zn.alternate!==null&&st.delete(zn.key===null?ft:zn.key),pe=q(zn,pe,ft),ot===null?nt=zn:ot.sibling=zn,ot=zn);return h&&st.forEach(function(Bo){return g(we,Bo)}),un&&Ds(we,ft),nt}function Je(we,pe,_e,Fe){var nt=K(_e);if(typeof nt!="function")throw Error(n(150));if(_e=nt.call(_e),_e==null)throw Error(n(151));for(var ot=nt=null,st=pe,ft=pe=0,zn=null,$t=_e.next();st!==null&&!$t.done;ft++,$t=_e.next()){st.index>ft?(zn=st,st=null):zn=st.sibling;var Bo=Pe(we,st,$t.value,Fe);if(Bo===null){st===null&&(st=zn);break}h&&st&&Bo.alternate===null&&g(we,st),pe=q(Bo,pe,ft),ot===null?nt=Bo:ot.sibling=Bo,ot=Bo,st=zn}if($t.done)return j(we,st),un&&Ds(we,ft),nt;if(st===null){for(;!$t.done;ft++,$t=_e.next())$t=Me(we,$t.value,Fe),$t!==null&&(pe=q($t,pe,ft),ot===null?nt=$t:ot.sibling=$t,ot=$t);return un&&Ds(we,ft),nt}for(st=O(we,st);!$t.done;ft++,$t=_e.next())$t=We(st,we,ft,$t.value,Fe),$t!==null&&(h&&$t.alternate!==null&&st.delete($t.key===null?ft:$t.key),pe=q($t,pe,ft),ot===null?nt=$t:ot.sibling=$t,ot=$t);return h&&st.forEach(function(RQ){return g(we,RQ)}),un&&Ds(we,ft),nt}function jn(we,pe,_e,Fe){if(typeof _e=="object"&&_e!==null&&_e.type===C&&_e.key===null&&(_e=_e.props.children),typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case N:e:{for(var nt=_e.key,ot=pe;ot!==null;){if(ot.key===nt){if(nt=_e.type,nt===C){if(ot.tag===7){j(we,ot.sibling),pe=D(ot,_e.props.children),pe.return=we,we=pe;break e}}else if(ot.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===W&&R2(nt)===ot.type){j(we,ot.sibling),pe=D(ot,_e.props),pe.ref=Md(we,ot,_e),pe.return=we,we=pe;break e}j(we,ot);break}else g(we,ot);ot=ot.sibling}_e.type===C?(pe=Hs(_e.props.children,we.mode,Fe,_e.key),pe.return=we,we=pe):(Fe=Lm(_e.type,_e.key,_e.props,null,we.mode,Fe),Fe.ref=Md(we,pe,_e),Fe.return=we,we=Fe)}return Q(we);case k:e:{for(ot=_e.key;pe!==null;){if(pe.key===ot)if(pe.tag===4&&pe.stateNode.containerInfo===_e.containerInfo&&pe.stateNode.implementation===_e.implementation){j(we,pe.sibling),pe=D(pe,_e.children||[]),pe.return=we,we=pe;break e}else{j(we,pe);break}else g(we,pe);pe=pe.sibling}pe=Gb(_e,we.mode,Fe),pe.return=we,we=pe}return Q(we);case W:return ot=_e._init,jn(we,pe,ot(_e._payload),Fe)}if(le(_e))return Qe(we,pe,_e,Fe);if(K(_e))return Je(we,pe,_e,Fe);hm(we,_e)}return typeof _e=="string"&&_e!==""||typeof _e=="number"?(_e=""+_e,pe!==null&&pe.tag===6?(j(we,pe.sibling),pe=D(pe,_e),pe.return=we,we=pe):(j(we,pe),pe=Vb(_e,we.mode,Fe),pe.return=we,we=pe),Q(we)):j(we,pe)}return jn}var lc=I2(!0),M2=I2(!1),pm=Co(null),mm=null,cc=null,nb=null;function rb(){nb=cc=mm=null}function ib(h){var g=pm.current;sn(pm),h._currentValue=g}function ab(h,g,j){for(;h!==null;){var O=h.alternate;if((h.childLanes&g)!==g?(h.childLanes|=g,O!==null&&(O.childLanes|=g)):O!==null&&(O.childLanes&g)!==g&&(O.childLanes|=g),h===j)break;h=h.return}}function uc(h,g){mm=h,nb=cc=null,h=h.dependencies,h!==null&&h.firstContext!==null&&((h.lanes&g)!==0&&(Rr=!0),h.firstContext=null)}function mi(h){var g=h._currentValue;if(nb!==h)if(h={context:h,memoizedValue:g,next:null},cc===null){if(mm===null)throw Error(n(308));cc=h,mm.dependencies={lanes:0,firstContext:h}}else cc=cc.next=h;return g}var Ls=null;function ob(h){Ls===null?Ls=[h]:Ls.push(h)}function D2(h,g,j,O){var D=g.interleaved;return D===null?(j.next=j,ob(g)):(j.next=D.next,D.next=j),g.interleaved=j,Ka(h,O)}function Ka(h,g){h.lanes|=g;var j=h.alternate;for(j!==null&&(j.lanes|=g),j=h,h=h.return;h!==null;)h.childLanes|=g,j=h.alternate,j!==null&&(j.childLanes|=g),j=h,h=h.return;return j.tag===3?j.stateNode:null}var To=!1;function sb(h){h.updateQueue={baseState:h.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function L2(h,g){h=h.updateQueue,g.updateQueue===h&&(g.updateQueue={baseState:h.baseState,firstBaseUpdate:h.firstBaseUpdate,lastBaseUpdate:h.lastBaseUpdate,shared:h.shared,effects:h.effects})}function Ya(h,g){return{eventTime:h,lane:g,tag:0,payload:null,callback:null,next:null}}function Ro(h,g,j){var O=h.updateQueue;if(O===null)return null;if(O=O.shared,(Dt&2)!==0){var D=O.pending;return D===null?g.next=g:(g.next=D.next,D.next=g),O.pending=g,Ka(h,j)}return D=O.interleaved,D===null?(g.next=g,ob(O)):(g.next=D.next,D.next=g),O.interleaved=g,Ka(h,j)}function gm(h,g,j){if(g=g.updateQueue,g!==null&&(g=g.shared,(j&4194240)!==0)){var O=g.lanes;O&=h.pendingLanes,j|=O,g.lanes=j,w0(h,j)}}function $2(h,g){var j=h.updateQueue,O=h.alternate;if(O!==null&&(O=O.updateQueue,j===O)){var D=null,q=null;if(j=j.firstBaseUpdate,j!==null){do{var Q={eventTime:j.eventTime,lane:j.lane,tag:j.tag,payload:j.payload,callback:j.callback,next:null};q===null?D=q=Q:q=q.next=Q,j=j.next}while(j!==null);q===null?D=q=g:q=q.next=g}else D=q=g;j={baseState:O.baseState,firstBaseUpdate:D,lastBaseUpdate:q,shared:O.shared,effects:O.effects},h.updateQueue=j;return}h=j.lastBaseUpdate,h===null?j.firstBaseUpdate=g:h.next=g,j.lastBaseUpdate=g}function vm(h,g,j,O){var D=h.updateQueue;To=!1;var q=D.firstBaseUpdate,Q=D.lastBaseUpdate,ae=D.shared.pending;if(ae!==null){D.shared.pending=null;var ue=ae,Se=ue.next;ue.next=null,Q===null?q=Se:Q.next=Se,Q=ue;var Ie=h.alternate;Ie!==null&&(Ie=Ie.updateQueue,ae=Ie.lastBaseUpdate,ae!==Q&&(ae===null?Ie.firstBaseUpdate=Se:ae.next=Se,Ie.lastBaseUpdate=ue))}if(q!==null){var Me=D.baseState;Q=0,Ie=Se=ue=null,ae=q;do{var Pe=ae.lane,We=ae.eventTime;if((O&Pe)===Pe){Ie!==null&&(Ie=Ie.next={eventTime:We,lane:0,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null});e:{var Qe=h,Je=ae;switch(Pe=g,We=j,Je.tag){case 1:if(Qe=Je.payload,typeof Qe=="function"){Me=Qe.call(We,Me,Pe);break e}Me=Qe;break e;case 3:Qe.flags=Qe.flags&-65537|128;case 0:if(Qe=Je.payload,Pe=typeof Qe=="function"?Qe.call(We,Me,Pe):Qe,Pe==null)break e;Me=$({},Me,Pe);break e;case 2:To=!0}}ae.callback!==null&&ae.lane!==0&&(h.flags|=64,Pe=D.effects,Pe===null?D.effects=[ae]:Pe.push(ae))}else We={eventTime:We,lane:Pe,tag:ae.tag,payload:ae.payload,callback:ae.callback,next:null},Ie===null?(Se=Ie=We,ue=Me):Ie=Ie.next=We,Q|=Pe;if(ae=ae.next,ae===null){if(ae=D.shared.pending,ae===null)break;Pe=ae,ae=Pe.next,Pe.next=null,D.lastBaseUpdate=Pe,D.shared.pending=null}}while(!0);if(Ie===null&&(ue=Me),D.baseState=ue,D.firstBaseUpdate=Se,D.lastBaseUpdate=Ie,g=D.shared.interleaved,g!==null){D=g;do Q|=D.lane,D=D.next;while(D!==g)}else q===null&&(D.shared.lanes=0);Bs|=Q,h.lanes=Q,h.memoizedState=Me}}function F2(h,g,j){if(h=g.effects,g.effects=null,h!==null)for(g=0;g<h.length;g++){var O=h[g],D=O.callback;if(D!==null){if(O.callback=null,O=j,typeof D!="function")throw Error(n(191,D));D.call(O)}}}var Dd={},ma=Co(Dd),Ld=Co(Dd),$d=Co(Dd);function $s(h){if(h===Dd)throw Error(n(174));return h}function lb(h,g){switch(Zt($d,g),Zt(Ld,h),Zt(ma,Dd),h=g.nodeType,h){case 9:case 11:g=(g=g.documentElement)?g.namespaceURI:ke(null,"");break;default:h=h===8?g.parentNode:g,g=h.namespaceURI||null,h=h.tagName,g=ke(g,h)}sn(ma),Zt(ma,g)}function dc(){sn(ma),sn(Ld),sn($d)}function B2(h){$s($d.current);var g=$s(ma.current),j=ke(g,h.type);g!==j&&(Zt(Ld,h),Zt(ma,j))}function cb(h){Ld.current===h&&(sn(ma),sn(Ld))}var mn=Co(0);function ym(h){for(var g=h;g!==null;){if(g.tag===13){var j=g.memoizedState;if(j!==null&&(j=j.dehydrated,j===null||j.data==="$?"||j.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 ub=[];function db(){for(var h=0;h<ub.length;h++)ub[h]._workInProgressVersionPrimary=null;ub.length=0}var xm=w.ReactCurrentDispatcher,fb=w.ReactCurrentBatchConfig,Fs=0,gn=null,In=null,qn=null,bm=!1,Fd=!1,Bd=0,tQ=0;function sr(){throw Error(n(321))}function hb(h,g){if(g===null)return!1;for(var j=0;j<g.length&&j<h.length;j++)if(!Hi(h[j],g[j]))return!1;return!0}function pb(h,g,j,O,D,q){if(Fs=q,gn=g,g.memoizedState=null,g.updateQueue=null,g.lanes=0,xm.current=h===null||h.memoizedState===null?aQ:oQ,h=j(O,D),Fd){q=0;do{if(Fd=!1,Bd=0,25<=q)throw Error(n(301));q+=1,qn=In=null,g.updateQueue=null,xm.current=sQ,h=j(O,D)}while(Fd)}if(xm.current=Sm,g=In!==null&&In.next!==null,Fs=0,qn=In=gn=null,bm=!1,g)throw Error(n(300));return h}function mb(){var h=Bd!==0;return Bd=0,h}function ga(){var h={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qn===null?gn.memoizedState=qn=h:qn=qn.next=h,qn}function gi(){if(In===null){var h=gn.alternate;h=h!==null?h.memoizedState:null}else h=In.next;var g=qn===null?gn.memoizedState:qn.next;if(g!==null)qn=g,In=h;else{if(h===null)throw Error(n(310));In=h,h={memoizedState:In.memoizedState,baseState:In.baseState,baseQueue:In.baseQueue,queue:In.queue,next:null},qn===null?gn.memoizedState=qn=h:qn=qn.next=h}return qn}function qd(h,g){return typeof g=="function"?g(h):g}function gb(h){var g=gi(),j=g.queue;if(j===null)throw Error(n(311));j.lastRenderedReducer=h;var O=In,D=O.baseQueue,q=j.pending;if(q!==null){if(D!==null){var Q=D.next;D.next=q.next,q.next=Q}O.baseQueue=D=q,j.pending=null}if(D!==null){q=D.next,O=O.baseState;var ae=Q=null,ue=null,Se=q;do{var Ie=Se.lane;if((Fs&Ie)===Ie)ue!==null&&(ue=ue.next={lane:0,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null}),O=Se.hasEagerState?Se.eagerState:h(O,Se.action);else{var Me={lane:Ie,action:Se.action,hasEagerState:Se.hasEagerState,eagerState:Se.eagerState,next:null};ue===null?(ae=ue=Me,Q=O):ue=ue.next=Me,gn.lanes|=Ie,Bs|=Ie}Se=Se.next}while(Se!==null&&Se!==q);ue===null?Q=O:ue.next=ae,Hi(O,g.memoizedState)||(Rr=!0),g.memoizedState=O,g.baseState=Q,g.baseQueue=ue,j.lastRenderedState=O}if(h=j.interleaved,h!==null){D=h;do q=D.lane,gn.lanes|=q,Bs|=q,D=D.next;while(D!==h)}else D===null&&(j.lanes=0);return[g.memoizedState,j.dispatch]}function vb(h){var g=gi(),j=g.queue;if(j===null)throw Error(n(311));j.lastRenderedReducer=h;var O=j.dispatch,D=j.pending,q=g.memoizedState;if(D!==null){j.pending=null;var Q=D=D.next;do q=h(q,Q.action),Q=Q.next;while(Q!==D);Hi(q,g.memoizedState)||(Rr=!0),g.memoizedState=q,g.baseQueue===null&&(g.baseState=q),j.lastRenderedState=q}return[q,O]}function q2(){}function U2(h,g){var j=gn,O=gi(),D=g(),q=!Hi(O.memoizedState,D);if(q&&(O.memoizedState=D,Rr=!0),O=O.queue,yb(W2.bind(null,j,O,h),[h]
vendor: 4,400 bytes, line 38
38),O.getSnapshot!==g||q||qn!==null&&qn.memoizedState.tag&1){if(j.flags|=2048,Ud(9,H2.bind(null,j,O,D,g),void 0,null),Un===null)throw Error(n(349));(Fs&30)!==0||z2(j,g,D)}return D}function z2(h,g,j){h.flags|=16384,h={getSnapshot:g,value:j},g=gn.updateQueue,g===null?(g={lastEffect:null,stores:null},gn.updateQueue=g,g.stores=[h]):(j=g.stores,j===null?g.stores=[h]:j.push(h))}function H2(h,g,j,O){g.value=j,g.getSnapshot=O,V2(g)&&G2(h)}function W2(h,g,j){return j(function(){V2(g)&&G2(h)})}function V2(h){var g=h.getSnapshot;h=h.value;try{var j=g();return!Hi(h,j)}catch{return!0}}function G2(h){var g=Ka(h,1);g!==null&&Yi(g,h,1,-1)}function K2(h){var g=ga();return typeof h=="function"&&(h=h()),g.memoizedState=g.baseState=h,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qd,lastRenderedState:h},g.queue=h,h=h.dispatch=iQ.bind(null,gn,h),[g.memoizedState,h]}function Ud(h,g,j,O){return h={tag:h,create:g,destroy:j,deps:O,next:null},g=gn.updateQueue,g===null?(g={lastEffect:null,stores:null},gn.updateQueue=g,g.lastEffect=h.next=h):(j=g.lastEffect,j===null?g.lastEffect=h.next=h:(O=j.next,j.next=h,h.next=O,g.lastEffect=h)),h}function Y2(){return gi().memoizedState}function wm(h,g,j,O){var D=ga();gn.flags|=h,D.memoizedState=Ud(1|g,j,void 0,O===void 0?null:O)}function _m(h,g,j,O){var D=gi();O=O===void 0?null:O;var q=void 0;if(In!==null){var Q=In.memoizedState;if(q=Q.destroy,O!==null&&hb(O,Q.deps)){D.memoizedState=Ud(g,j,q,O);return}}gn.flags|=h,D.memoizedState=Ud(1|g,j,q,O)}function Q2(h,g){return wm(8390656,8,h,g)}function yb(h,g){return _m(2048,8,h,g)}function X2(h,g){return _m(4,2,h,g)}function Z2(h,g){return _m(4,4,h,g)}function J2(h,g){if(typeof g=="function")return h=h(),g(h),function(){g(null)};if(g!=null)return h=h(),g.current=h,function(){g.current=null}}function eT(h,g,j){return j=j!=null?j.concat([h]):null,_m(4,4,J2.bind(null,g,h),j)}function xb(){}function tT(h,g){var j=gi();g=g===void 0?null:g;var O=j.memoizedState;return O!==null&&g!==null&&hb(g,O[1])?O[0]:(j.memoizedState=[h,g],h)}function nT(h,g){var j=gi();g=g===void 0?null:g;var O=j.memoizedState;return O!==null&&g!==null&&hb(g,O[1])?O[0]:(h=h(),j.memoizedState=[h,g],h)}function rT(h,g,j){return(Fs&21)===0?(h.baseState&&(h.baseState=!1,Rr=!0),h.memoizedState=j):(Hi(j,g)||(j=RP(),gn.lanes|=j,Bs|=j,h.baseState=!0),g)}function nQ(h,g){var j=Vt;Vt=j!==0&&4>j?j:4,h(!0);var O=fb.transition;fb.transition={};try{h(!1),g()}finally{Vt=j,fb.transition=O}}function iT(){return gi().memoizedState}function rQ(h,g,j){var O=Lo(h);if(j={lane:O,action:j,hasEagerState:!1,eagerState:null,next:null},aT(h))oT(g,j);else if(j=D2(h,g,j,O),j!==null){var D=xr();Yi(j,h,O,D),sT(j,g,O)}}function iQ(h,g,j){var O=Lo(h),D={lane:O,action:j,hasEagerState:!1,eagerState:null,next:null};if(aT(h))oT(g,D);else{var q=h.alternate;if(h.lanes===0&&(q===null||q.lanes===0)&&(q=g.lastRenderedReducer,q!==null))try{var Q=g.lastRenderedState,ae=q(Q,j);if(D.hasEagerState=!0,D.eagerState=ae,Hi(ae,Q)){var ue=g.interleaved;ue===null?(D.next=D,ob(g)):(D.next=ue.next,ue.next=D),g.interleaved=D;return}}catch{}finally{}j=D2(h,g,D,O),j!==null&&(D=xr(),Yi(j,h,O,D),sT(j,g,O))}}function aT(h){var g=h.alternate;return h===gn||g!==null&&g===gn}function oT(h,g){Fd=bm=!0;var j=h.pending;j===null?g.next=g:(g.next=j.next,j.next=g),h.pending=g}function sT(h,g,j){if((j&4194240)!==0){var O=g.lanes;O&=h.pendingLanes,j|=O,g.lanes=j,w0(h,j)}}var Sm={readContext:mi,useCallback:sr,useContext:sr,useEffect:sr,useImperativeHandle:sr,useInsertionEffect:sr,useLayoutEffect:sr,useMemo:sr,useReducer:sr,useRef:sr,useState:sr,useDebugValue:sr,useDeferredValue:sr,useTransition:sr,useMutableSource:sr,useSyncExternalStore:sr,useId:sr,unstable_isNewReconciler:!1},aQ={readContext:mi,useCallback:function(h,g){return ga().memoizedState=[h,g===void 0?null:g],h},useContext:mi,useEffect:Q2,useImperativeHandle:function(h,g,j){return j=j!=null?j.concat([h]):null,wm(4194308,4,J2.bind(null,g,h),j)},useLayoutEffect:function(h,g){return wm(4194308,4,h,g)},useInsertionEffect:function(h,g){return wm(4,2,h,g)},useMemo:function(h,g){var j=ga();return g=g===void 0?null:g,h=h(),j.memoizedState=[h,g],h},useReducer:function(h,g,j){var O=ga();return g=j!==void 0?j(g):g,O.memoizedState=O.baseState=g,h={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:h,lastRenderedState:g},O.queue=h,h=h.dispatch=rQ.bind(null,gn,h),[O.memoizedState,h]}
vendor: 5,552 bytes, lines 38-40
38,useRef:function(h){var g=ga();return h={current:h},g.memoizedState=h},useState:K2,useDebugValue:xb,useDeferredValue:function(h){return ga().memoizedState=h},useTransition:function(){var h=K2(!1),g=h[0];return h=nQ.bind(null,h[1]),ga().memoizedState=h,[g,h]},useMutableSource:function(){},useSyncExternalStore:function(h,g,j){var O=gn,D=ga();if(un){if(j===void 0)throw Error(n(407));j=j()}else{if(j=g(),Un===null)throw Error(n(349));(Fs&30)!==0||z2(O,g,j)}D.memoizedState=j;var q={value:j,getSnapshot:g};return D.queue=q,Q2(W2.bind(null,O,q,h),[h]),O.flags|=2048,Ud(9,H2.bind(null,O,q,j,g),void 0,null),j},useId:function(){var h=ga(),g=Un.identifierPrefix;if(un){var j=Ga,O=Va;j=(O&~(1<<32-zi(O)-1)).toString(32)+j,g=":"+g+"R"+j,j=Bd++,0<j&&(g+="H"+j.toString(32)),g+=":"}else j=tQ++,g=":"+g+"r"+j.toString(32)+":";return h.memoizedState=g},unstable_isNewReconciler:!1},oQ={readContext:mi,useCallback:tT,useContext:mi,useEffect:yb,useImperativeHandle:eT,useInsertionEffect:X2,useLayoutEffect:Z2,useMemo:nT,useReducer:gb,useRef:Y2,useState:function(){return gb(qd)},useDebugValue:xb,useDeferredValue:function(h){var g=gi();return rT(g,In.memoizedState,h)},useTransition:function(){var h=gb(qd)[0],g=gi().memoizedState;return[h,g]},useMutableSource:q2,useSyncExternalStore:U2,useId:iT,unstable_isNewReconciler:!1},sQ={readContext:mi,useCallback:tT,useContext:mi,useEffect:yb,useImperativeHandle:eT,useInsertionEffect:X2,useLayoutEffect:Z2,useMemo:nT,useReducer:vb,useRef:Y2,useState:function(){return vb(qd)},useDebugValue:xb,useDeferredValue:function(h){var g=gi();return In===null?g.memoizedState=h:rT(g,In.memoizedState,h)},useTransition:function(){var h=vb(qd)[0],g=gi().memoizedState;return[h,g]},useMutableSource:q2,useSyncExternalStore:U2,useId:iT,unstable_isNewReconciler:!1};function Vi(h,g){if(h&&h.defaultProps){g=$({},g),h=h.defaultProps;for(var j in h)g[j]===void 0&&(g[j]=h[j]);return g}return g}function bb(h,g,j,O){g=h.memoizedState,j=j(O,g),j=j==null?g:$({},g,j),h.memoizedState=j,h.lanes===0&&(h.updateQueue.baseState=j)}var jm={isMounted:function(h){return(h=h._reactInternals)?Ts(h)===h:!1},enqueueSetState:function(h,g,j){h=h._reactInternals;var O=xr(),D=Lo(h),q=Ya(O,D);q.payload=g,j!=null&&(q.callback=j),g=Ro(h,q,D),g!==null&&(Yi(g,h,D,O),gm(g,h,D))},enqueueReplaceState:function(h,g,j){h=h._reactInternals;var O=xr(),D=Lo(h),q=Ya(O,D);q.tag=1,q.payload=g,j!=null&&(q.callback=j),g=Ro(h,q,D),g!==null&&(Yi(g,h,D,O),gm(g,h,D))},enqueueForceUpdate:function(h,g){h=h._reactInternals;var j=xr(),O=Lo(h),D=Ya(j,O);D.tag=2,g!=null&&(D.callback=g),g=Ro(h,D,O),g!==null&&(Yi(g,h,O,j),gm(g,h,O))}};function lT(h,g,j,O,D,q,Q){return h=h.stateNode,typeof h.shouldComponentUpdate=="function"?h.shouldComponentUpdate(O,q,Q):g.prototype&&g.prototype.isPureReactComponent?!Od(j,O)||!Od(D,q):!0}function cT(h,g,j){var O=!1,D=Ao,q=g.contextType;return typeof q=="object"&&q!==null?q=mi(q):(D=Tr(g)?Is:or.current,O=g.contextTypes,q=(O=O!=null)?ic(h,D):Ao),g=new g(j,q),h.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=jm,h.stateNode=g,g._reactInternals=h,O&&(h=h.stateNode,h.__reactInternalMemoizedUnmaskedChildContext=D,h.__reactInternalMemoizedMaskedChildContext=q),g}function uT(h,g,j,O){h=g.state,typeof g.componentWillReceiveProps=="function"&&g.componentWillReceiveProps(j,O),typeof g.UNSAFE_componentWillReceiveProps=="function"&&g.UNSAFE_componentWillReceiveProps(j,O),g.state!==h&&jm.enqueueReplaceState(g,g.state,null)}function wb(h,g,j,O){var D=h.stateNode;D.props=j,D.state=h.memoizedState,D.refs={},sb(h);var q=g.contextType;typeof q=="object"&&q!==null?D.context=mi(q):(q=Tr(g)?Is:or.current,D.context=ic(h,q)),D.state=h.memoizedState,q=g.getDerivedStateFromProps,typeof q=="function"&&(bb(h,g,q,j),D.state=h.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof D.getSnapshotBeforeUpdate=="function"||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(g=D.state,typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount(),g!==D.state&&jm.enqueueReplaceState(D,D.state,null),vm(h,j,D,O),D.state=h.memoizedState),typeof D.componentDidMount=="function"&&(h.flags|=4194308)}function fc(h,g){try{var j="",O=g;do j+=re(O),O=O.return;while(O);var D=j}catch(q){D=` 39Error generating stack: `+q.message+` 40`+q.stack}return{value:h,source:g,stack:D,digest:null}}function _b(h,g,j){return{value:h,source:null,stack:j??null,digest:g??null}}function Sb(h,g){try{console.error(g.value)}catch(j){setTimeout(function(){throw j})}}var lQ=typeof WeakMap=="function"?WeakMap:Map;function dT(h,g,j){j=Ya(-1,j),j.tag=3,j.payload={element:null};var O=g.value;return j.callback=function(){Pm||(Pm=!0,$b=O),Sb(h,g)},j}function fT(h,g,j){j=Ya(-1,j),j.tag=3;var O=h.type.getDerivedStateFromError;if(typeof O=="function"){var D=g.value;j.payload=function(){return O(D)},j.callback=function(){Sb(h,g)}}var q=h.stateNode;return q!==null&&typeof q.componentDidCatch=="function"&&(j.callback=function(){Sb(h,g),typeof O!="function"&&(Mo===null?Mo=new Set([this]):Mo.add(this));var Q=g.stack;this.componentDidCatch(g.value,{componentStack:Q!==null?Q:""})}),j}function hT(h,g,j){var O=h.pingCache;if(O===null){O=h.pingCache=new lQ;var D=new Set;O.set(g,D)}else D=O.get(g),D===void 0&&(D=new Set,O.set(g,D));D.has(j)||(D.add(j),h=_Q.bind(null,h,g,j),g.then(h,h))}function pT(h){do{var g;if((g=h.tag===13)&&(g=h.memoizedState,g=g!==null?g.dehydrated!==null:!0),g)return h;h=h.return}while(h!==null);return null}
vendor: 15,782 bytes, line 40
40function mT(h,g,j,O,D){return(h.mode&1)===0?(h===g?h.flags|=65536:(h.flags|=128,j.flags|=131072,j.flags&=-52805,j.tag===1&&(j.alternate===null?j.tag=17:(g=Ya(-1,1),g.tag=2,Ro(j,g,1))),j.lanes|=1),h):(h.flags|=65536,h.lanes=D,h)}var cQ=w.ReactCurrentOwner,Rr=!1;function yr(h,g,j,O){g.child=h===null?M2(g,null,j,O):lc(g,h.child,j,O)}function gT(h,g,j,O,D){j=j.render;var q=g.ref;return uc(g,D),O=pb(h,g,j,O,q,D),j=mb(),h!==null&&!Rr?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~D,Qa(h,g,D)):(un&&j&&X0(g),g.flags|=1,yr(h,g,O,D),g.child)}function vT(h,g,j,O,D){if(h===null){var q=j.type;return typeof q=="function"&&!Wb(q)&&q.defaultProps===void 0&&j.compare===null&&j.defaultProps===void 0?(g.tag=15,g.type=q,yT(h,g,q,O,D)):(h=Lm(j.type,null,O,g,g.mode,D),h.ref=g.ref,h.return=g,g.child=h)}if(q=h.child,(h.lanes&D)===0){var Q=q.memoizedProps;if(j=j.compare,j=j!==null?j:Od,j(Q,O)&&h.ref===g.ref)return Qa(h,g,D)}return g.flags|=1,h=Fo(q,O),h.ref=g.ref,h.return=g,g.child=h}function yT(h,g,j,O,D){if(h!==null){var q=h.memoizedProps;if(Od(q,O)&&h.ref===g.ref)if(Rr=!1,g.pendingProps=O=q,(h.lanes&D)!==0)(h.flags&131072)!==0&&(Rr=!0);else return g.lanes=h.lanes,Qa(h,g,D)}return jb(h,g,j,O,D)}function xT(h,g,j){var O=g.pendingProps,D=O.children,q=h!==null?h.memoizedState:null;if(O.mode==="hidden")if((g.mode&1)===0)g.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(pc,Zr),Zr|=j;else{if((j&1073741824)===0)return h=q!==null?q.baseLanes|j:j,g.lanes=g.childLanes=1073741824,g.memoizedState={baseLanes:h,cachePool:null,transitions:null},g.updateQueue=null,Zt(pc,Zr),Zr|=h,null;g.memoizedState={baseLanes:0,cachePool:null,transitions:null},O=q!==null?q.baseLanes:j,Zt(pc,Zr),Zr|=O}else q!==null?(O=q.baseLanes|j,g.memoizedState=null):O=j,Zt(pc,Zr),Zr|=O;return yr(h,g,D,j),g.child}function bT(h,g){var j=g.ref;(h===null&&j!==null||h!==null&&h.ref!==j)&&(g.flags|=512,g.flags|=2097152)}function jb(h,g,j,O,D){var q=Tr(j)?Is:or.current;return q=ic(g,q),uc(g,D),j=pb(h,g,j,O,q,D),O=mb(),h!==null&&!Rr?(g.updateQueue=h.updateQueue,g.flags&=-2053,h.lanes&=~D,Qa(h,g,D)):(un&&O&&X0(g),g.flags|=1,yr(h,g,j,D),g.child)}function wT(h,g,j,O,D){if(Tr(j)){var q=!0;lm(g)}else q=!1;if(uc(g,D),g.stateNode===null)Em(h,g),cT(g,j,O),wb(g,j,O,D),O=!0;else if(h===null){var Q=g.stateNode,ae=g.memoizedProps;Q.props=ae;var ue=Q.context,Se=j.contextType;typeof Se=="object"&&Se!==null?Se=mi(Se):(Se=Tr(j)?Is:or.current,Se=ic(g,Se));var Ie=j.getDerivedStateFromProps,Me=typeof Ie=="function"||typeof Q.getSnapshotBeforeUpdate=="function";Me||typeof Q.UNSAFE_componentWillReceiveProps!="function"&&typeof Q.componentWillReceiveProps!="function"||(ae!==O||ue!==Se)&&uT(g,Q,O,Se),To=!1;var Pe=g.memoizedState;Q.state=Pe,vm(g,O,Q,D),ue=g.memoizedState,ae!==O||Pe!==ue||Pr.current||To?(typeof Ie=="function"&&(bb(g,j,Ie,O),ue=g.memoizedState),(ae=To||lT(g,j,ae,O,Pe,ue,Se))?(Me||typeof Q.UNSAFE_componentWillMount!="function"&&typeof Q.componentWillMount!="function"||(typeof Q.componentWillMount=="function"&&Q.componentWillMount(),typeof Q.UNSAFE_componentWillMount=="function"&&Q.UNSAFE_componentWillMount()),typeof Q.componentDidMount=="function"&&(g.flags|=4194308)):(typeof Q.componentDidMount=="function"&&(g.flags|=4194308),g.memoizedProps=O,g.memoizedState=ue),Q.props=O,Q.state=ue,Q.context=Se,O=ae):(typeof Q.componentDidMount=="function"&&(g.flags|=4194308),O=!1)}else{Q=g.stateNode,L2(h,g),ae=g.memoizedProps,Se=g.type===g.elementType?ae:Vi(g.type,ae),Q.props=Se,Me=g.pendingProps,Pe=Q.context,ue=j.contextType,typeof ue=="object"&&ue!==null?ue=mi(ue):(ue=Tr(j)?Is:or.current,ue=ic(g,ue));var We=j.getDerivedStateFromProps;(Ie=typeof We=="function"||typeof Q.getSnapshotBeforeUpdate=="function")||typeof Q.UNSAFE_componentWillReceiveProps!="function"&&typeof Q.componentWillReceiveProps!="function"||(ae!==Me||Pe!==ue)&&uT(g,Q,O,ue),To=!1,Pe=g.memoizedState,Q.state=Pe,vm(g,O,Q,D);var Qe=g.memoizedState;ae!==Me||Pe!==Qe||Pr.current||To?(typeof We=="function"&&(bb(g,j,We,O),Qe=g.memoizedState),(Se=To||lT(g,j,Se,O,Pe,Qe,ue)||!1)?(Ie||typeof Q.UNSAFE_componentWillUpdate!="function"&&typeof Q.componentWillUpdate!="function"||(typeof Q.componentWillUpdate=="function"&&Q.componentWillUpdate(O,Qe,ue),typeof Q.UNSAFE_componentWillUpdate=="function"&&Q.UNSAFE_componentWillUpdate(O,Qe,ue)),typeof Q.componentDidUpdate=="function"&&(g.flags|=4),typeof Q.getSnapshotBeforeUpdate=="function"&&(g.flags|=1024)):(typeof Q.componentDidUpdate!="function"||ae===h.memoizedProps&&Pe===h.memoizedState||(g.flags|=4),typeof Q.getSnapshotBeforeUpdate!="function"||ae===h.memoizedProps&&Pe===h.memoizedState||(g.flags|=1024),g.memoizedProps=O,g.memoizedState=Qe),Q.props=O,Q.state=Qe,Q.context=ue,O=Se):(typeof Q.componentDidUpdate!="function"||ae===h.memoizedProps&&Pe===h.memoizedState||(g.flags|=4),typeof Q.getSnapshotBeforeUpdate!="function"||ae===h.memoizedProps&&Pe===h.memoizedState||(g.flags|=1024),O=!1)}return Nb(h,g,j,O,q,D)}function Nb(h,g,j,O,D,q){bT(h,g);var Q=(g.flags&128)!==0;if(!O&&!Q)return D&&E2(g,j,!1),Qa(h,g,q);O=g.stateNode,cQ.current=g;var ae=Q&&typeof j.getDerivedStateFromError!="function"?null:O.render();return g.flags|=1,h!==null&&Q?(g.child=lc(g,h.child,null,q),g.child=lc(g,null,ae,q)):yr(h,g,ae,q),g.memoizedState=O.state,D&&E2(g,j,!0),g.child}function _T(h){var g=h.stateNode;g.pendingContext?j2(h,g.pendingContext,g.pendingContext!==g.context):g.context&&j2(h,g.context,!1),lb(h,g.containerInfo)}function ST(h,g,j,O,D){return sc(),tb(D),g.flags|=256,yr(h,g,j,O),g.child}var Eb={dehydrated:null,treeContext:null,retryLane:0};function kb(h){return{baseLanes:h,cachePool:null,transitions:null}}function jT(h,g,j){var O=g.pendingProps,D=mn.current,q=!1,Q=(g.flags&128)!==0,ae;if((ae=Q)||(ae=h!==null&&h.memoizedState===null?!1:(D&2)!==0),ae?(q=!0,g.flags&=-129):(h===null||h.memoizedState!==null)&&(D|=1),Zt(mn,D&1),h===null)return eb(g),h=g.memoizedState,h!==null&&(h=h.dehydrated,h!==null)?((g.mode&1)===0?g.lanes=1:h.data==="$!"?g.lanes=8:g.lanes=1073741824,null):(Q=O.children,h=O.fallback,q?(O=g.mode,q=g.child,Q={mode:"hidden",children:Q},(O&1)===0&&q!==null?(q.childLanes=0,q.pendingProps=Q):q=$m(Q,O,0,null),h=Hs(h,O,j,null),q.return=g,h.return=g,q.sibling=h,g.child=q,g.child.memoizedState=kb(j),g.memoizedState=Eb,h):Ob(g,Q));if(D=h.memoizedState,D!==null&&(ae=D.dehydrated,ae!==null))return uQ(h,g,Q,O,ae,D,j);if(q){q=O.fallback,Q=g.mode,D=h.child,ae=D.sibling;var ue={mode:"hidden",children:O.children};return(Q&1)===0&&g.child!==D?(O=g.child,O.childLanes=0,O.pendingProps=ue,g.deletions=null):(O=Fo(D,ue),O.subtreeFlags=D.subtreeFlags&14680064),ae!==null?q=Fo(ae,q):(q=Hs(q,Q,j,null),q.flags|=2),q.return=g,O.return=g,O.sibling=q,g.child=O,O=q,q=g.child,Q=h.child.memoizedState,Q=Q===null?kb(j):{baseLanes:Q.baseLanes|j,cachePool:null,transitions:Q.transitions},q.memoizedState=Q,q.childLanes=h.childLanes&~j,g.memoizedState=Eb,O}return q=h.child,h=q.sibling,O=Fo(q,{mode:"visible",children:O.children}),(g.mode&1)===0&&(O.lanes=j),O.return=g,O.sibling=null,h!==null&&(j=g.deletions,j===null?(g.deletions=[h],g.flags|=16):j.push(h)),g.child=O,g.memoizedState=null,O}function Ob(h,g){return g=$m({mode:"visible",children:g},h.mode,0,null),g.return=h,h.child=g}function Nm(h,g,j,O){return O!==null&&tb(O),lc(g,h.child,null,j),h=Ob(g,g.pendingProps.children),h.flags|=2,g.memoizedState=null,h}function uQ(h,g,j,O,D,q,Q){if(j)return g.flags&256?(g.flags&=-257,O=_b(Error(n(422))),Nm(h,g,Q,O)):g.memoizedState!==null?(g.child=h.child,g.flags|=128,null):(q=O.fallback,D=g.mode,O=$m({mode:"visible",children:O.children},D,0,null),q=Hs(q,D,Q,null),q.flags|=2,O.return=g,q.return=g,O.sibling=q,g.child=O,(g.mode&1)!==0&&lc(g,h.child,null,Q),g.child.memoizedState=kb(Q),g.memoizedState=Eb,q);if((g.mode&1)===0)return Nm(h,g,Q,null);if(D.data==="$!"){if(O=D.nextSibling&&D.nextSibling.dataset,O)var ae=O.dgst;return O=ae,q=Error(n(419)),O=_b(q,O,void 0),Nm(h,g,Q,O)}if(ae=(Q&h.childLanes)!==0,Rr||ae){if(O=Un,O!==null){switch(Q&-Q){case 4:D=2;break;case 16:D=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:D=32;break;case 536870912:D=268435456;break;default:D=0}D=(D&(O.suspendedLanes|Q))!==0?0:D,D!==0&&D!==q.retryLane&&(q.retryLane=D,Ka(h,D),Yi(O,h,D,-1))}return Hb(),O=_b(Error(n(421))),Nm(h,g,Q,O)}return D.data==="$?"?(g.flags|=128,g.child=h.child,g=SQ.bind(null,h),D._reactRetry=g,null):(h=q.treeContext,Xr=Oo(D.nextSibling),Qr=g,un=!0,Wi=null,h!==null&&(hi[pi++]=Va,hi[pi++]=Ga,hi[pi++]=Ms,Va=h.id,Ga=h.overflow,Ms=g),g=Ob(g,O.children),g.flags|=4096,g)}function NT(h,g,j){h.lanes|=g;var O=h.alternate;O!==null&&(O.lanes|=g),ab(h.return,g,j)}function Cb(h,g,j,O,D){var q=h.memoizedState;q===null?h.memoizedState={isBackwards:g,rendering:null,renderingStartTime:0,last:O,tail:j,tailMode:D}:(q.isBackwards=g,q.rendering=null,q.renderingStartTime=0,q.last=O,q.tail=j,q.tailMode=D)}function ET(h,g,j){var O=g.pendingProps,D=O.revealOrder,q=O.tail;if(yr(h,g,O.children,j),O=mn.current,(O&2)!==0)O=O&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&&NT(h,j,g);else if(h.tag===19)NT(h,j,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}O&=1}if(Zt(mn,O),(g.mode&1)===0)g.memoizedState=null;else switch(D){case"forwards":for(j=g.child,D=null;j!==null;)h=j.alternate,h!==null&&ym(h)===null&&(D=j),j=j.sibling;j=D,j===null?(D=g.child,g.child=null):(D=j.sibling,j.sibling=null),Cb(g,!1,D,j,q);break;case"backwards":for(j=null,D=g.child,g.child=null;D!==null;){if(h=D.alternate,h!==null&&ym(h)===null){g.child=D;break}h=D.sibling,D.sibling=j,j=D,D=h}Cb(g,!0,j,null,q);break;case"together":Cb(g,!1,null,null,void 0);break;default:g.memoizedState=null}return g.child}function Em(h,g){(g.mode&1)===0&&h!==null&&(h.alternate=null,g.alternate=null,g.flags|=2)}function Qa(h,g,j){if(h!==null&&(g.dependencies=h.dependencies),Bs|=g.lanes,(j&g.childLanes)===0)return null;if(h!==null&&g.child!==h.child)throw Error(n(153));if(g.child!==null){for(h=g.child,j=Fo(h,h.pendingProps),g.child=j,j.return=g;h.sibling!==null;)h=h.sibling,j=j.sibling=Fo(h,h.pendingProps),j.return=g;j.sibling=null}return g.child}function dQ(h,g,j){switch(g.tag){case 3:_T(g),sc();break;case 5:B2(g);break;case 1:Tr(g.type)&&lm(g);break;case 4:lb(g,g.stateNode.containerInfo);break;case 10:var O=g.type._context,D=g.memoizedProps.value;Zt(pm,O._currentValue),O._currentValue=D;break;case 13:if(O=g.memoizedState,O!==null)return O.dehydrated!==null?(Zt(mn,mn.current&1),g.flags|=128,null):(j&g.child.childLanes)!==0?jT(h,g,j):(Zt(mn,mn.current&1),h=Qa(h,g,j),h!==null?h.sibling:null);Zt(mn,mn.current&1);break;case 19:if(O=(j&g.childLanes)!==0,(h.flags&128)!==0){if(O)return ET(h,g,j);g.flags|=128}if(D=g.memoizedState,D!==null&&(D.rendering=null,D.tail=null,D.lastEffect=null),Zt(mn,mn.current),O)break;return null;case 22:case 23:return g.lanes=0,xT(h,g,j)}return Qa(h,g,j)}var kT,Ab,OT,CT;kT=function(h,g){for(var j=g.child;j!==null;){if(j.tag===5||j.tag===6)h.appendChild(j.stateNode);else if(j.tag!==4&&j.child!==null){j.child.return=j,j=j.child;continue}if(j===g)break;for(;j.sibling===null;){if(j.return===null||j.return===g)return;j=j.return}j.sibling.return=j.return,j=j.sibling}},Ab=function(){},OT=function(h,g,j,O){var D=h.memoizedProps;if(D!==O){h=g.stateNode,$s(ma.current);var q=null;switch(j){case"input":D=ce(h,D),O=ce(h,O),q=[];break;case"select":D=$({},D,{value:void 0}),O=$({},O,{value:void 0}),q=[];break;case"textarea":D=xe(h,D),O=xe(h,O),q=[];break;default:typeof D.onClick!="function"&&typeof O.onClick=="function"&&(h.onclick=am)}Tt(j,O);var Q;j=null;for(Se in D)if(!O.hasOwnProperty(Se)&&D.hasOwnProperty(Se)&&D[Se]!=null)if(Se==="style"){var ae=D[Se];for(Q in ae)ae.hasOwnProperty(Q)&&(j||(j={}),j[Q]="")}else Se!=="dangerouslySetInnerHTML"&&Se!=="children"&&Se!=="suppressContentEditableWarning"&&Se!=="suppressHydrationWarning"&&Se!=="autoFocus"&&(i.hasOwnProperty(Se)?q||(q=[]):(q=q||[]).push(Se,null));for(Se in O){var ue=O[Se];if(ae=D!=null?D[Se]:void 0,O.hasOwnProperty(Se)&&ue!==ae&&(ue!=null||ae!=null))if(Se==="style")if(ae){for(Q in ae)!ae.hasOwnProperty(Q)||ue&&ue.hasOwnProperty(Q)||(j||(j={}),j[Q]="");for(Q in ue)ue.hasOwnProperty(Q)&&ae[Q]!==ue[Q]&&(j||(j={}),j[Q]=ue[Q])}else j||(q||(q=[]),q.push(Se,j)),j=ue;else Se==="dangerouslySetInnerHTML"?(ue=ue?ue.__html:void 0,ae=ae?ae.__html:void 0,ue!=null&&ae!==ue&&(q=q||[]).push(Se,ue)):Se==="children"?typeof ue!="string"&&typeof ue!="number"||(q=q||[]).push(Se,""+ue):Se!=="suppressContentEditableWarning"&&Se!=="suppressHydrationWarning"&&(i.hasOwnProperty(Se)?(ue!=null&&Se==="onScroll"&&on("scroll",h),q||ae===ue||(q=[])):(q=q||[]).push(Se,ue))}j&&(q=q||[]).push("style",j);var Se=q;(g.updateQueue=Se)&&(g.flags|=4)}},CT=function(h,g,j,O){j!==O&&(g.flags|=4)};function zd(h,g){if(!un)switch(h.tailMode){case"hidden":g=h.tail;for(var j=null;g!==null;)g.alternate!==null&&(j=g),g=g.sibling;j===null?h.tail=null:j.sibling=null;break;case"collapsed":j=h.tail;for(var O=null;j!==null;)j.alternate!==null&&(O=j),j=j.sibling;O===null?g||h.tail===null?h.tail=null:h.tail.sibling=null:O.sibling=null}}function lr(h){var g=h.alternate!==null&&h.alternate.child===h.child,j=0,O=0;if(g)for(var D=h.child;D!==null;)j|=D.lanes|D.childLanes,O|=D.subtreeFlags&14680064,O|=D.flags&14680064,D.return=h,D=D.sibling;else for(D=h.child;D!==null;)j|=D.lanes|D.childLanes,O|=D.subtreeFlags,O|=D.flags,D.return=h,D=D.sibling;return h.subtreeFlags|=O,h.childLanes=j,g}function fQ(h,g,j){var O=g.pendingProps;switch(Z0(g),g.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lr(g),null;case 1:return Tr(g.type)&&sm(),lr(g),null;case 3:return O=g.stateNode,dc(),sn(Pr),sn(or),db(),O.pendingContext&&(O.context=O.pendingContext,O.pendingContext=null),(h===null||h.child===null)&&(fm(g)?g.flags|=4:h===null||h.memoizedState.isDehydrated&&(g.flags&256)===0||(g.flags|=1024,Wi!==null&&(qb(Wi),Wi=null))),Ab(h,g),lr(g),null;case 5:cb(g);var D=$s($d.current);if(j=g.type,h!==null&&g.stateNode!=null)OT(h,g,j,O,D),h.ref!==g.ref&&(g.flags|=512,g.flags|=2097152);else{if(!O){if(g.stateNode===null)throw Error(n(166));return lr(g),null}if(h=$s(ma.current),fm(g)){O=g.stateNode,j=g.type;var q=g.memoizedProps;switch(O[pa]=g,O[Rd]=q,h=(g.mode&1)!==0,j){case"dialog":on("cancel",O),on("close",O);break;case"iframe":case"object":case"embed":on("load",O);break;case"video":case"audio":for(D=0;D<Ad.length;D++)on(Ad[D],O);break;case"source":on("error",O);break;case"img":case"image":case"link":on("error",O),on("load",O);break;case"details":on("toggle",O);break;case"input":Ne(O,q),on("invalid",O);break;case"select":O._wrapperState={wasMultiple:!!q.multiple},on("invalid",O);break;case"textarea":Ce(O,q),on("invalid",O)}Tt(j,q),D=null;for(var Q in q)if(q.hasOwnProperty(Q)){var ae=q[Q];Q==="children"?typeof ae=="string"?O.textContent!==ae&&(q.suppressHydrationWarning!==!0&&im(O.textContent,ae,h),D=["children",ae]):typeof ae=="number"&&O.textContent!==""+ae&&(q.suppressHydrationWarning!==!0&&im(O.textContent,ae,h),D=["children",""+ae]):i.hasOwnProperty(Q)&&ae!=null&&Q==="onScroll"&&on("scroll",O)}switch(j){case"input":se(O),te(O,q,!0);break;case"textarea":se(O),Re(O);break;case"select":case"option":break;default:typeof q.onClick=="function"&&(O.onclick=am)}O=D,g.updateQueue=O,O!==null&&(g.flags|=4)}else{Q=D.nodeType===9?D:D.ownerDocument,h==="http://www.w3.org/1999/xhtml"&&(h=ge(j)),h==="http://www.w3.org/1999/xhtml"?j==="script"?(h=Q.createElement("div"),h.innerHTML="<script><\/script>
40",h=h.removeChild(h.firstChild)):typeof O.is=="string"?h=Q.createElement(j,{is:O.is}):(h=Q.createElement(j),j==="select"&&(Q=h,O.multiple?Q.multiple=!0:O.size&&(Q.size=O.size))):h=Q.createElementNS(h,j),h[pa]=g,h[Rd]=O,kT(h,g,!1,!1),g.stateNode=h;e:{switch(Q=fi(j,O),j){case"dialog":on("cancel",h),on("close",h),D=O;break;case"iframe":case"object":case"embed":on("load",h),D=O;break;case"video":case"audio":for(D=0;D<Ad.length;D++)on(Ad[D],h);D=O;break;case"source":on("error",h),D=O;break;case"img":case"image":case"link":on("error",h),on("load",h),D=O;break;case"details":on("toggle",h),D=O;break;case"input":Ne(h,O),D=ce(h,O),on("invalid",h);break;case"option":D=O;break;case"select":h._wrapperState={wasMultiple:!!O.multiple},D=$({},O,{value:void 0}),on("invalid",h);break;case"textarea":Ce(h,O),D=xe(h,O),on("invalid",h);break;default:D=O}Tt(j,D),ae=D;for(q in ae)if(ae.hasOwnProperty(q)){var ue=ae[q];q==="style"?rt(h,ue):q==="dangerouslySetInnerHTML"?(ue=ue?ue.__html:void 0,ue!=null&&at(h,ue)):q==="children"?typeof ue=="string"?(j!=="textarea"||ue!=="")&&tt(h,ue):typeof ue=="number"&&tt(h,""+ue):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(i.hasOwnProperty(q)?ue!=null&&q==="onScroll"&&on("scroll",h):ue!=null&&S(h,q,ue,Q))}switch(j){case"input":se(h),te(h,O,!1);break;case"textarea":se(h),Re(h);break;case"option":O.value!=null&&h.setAttribute("value",""+ie(O.value));break;case"select":h.multiple=!!O.multiple,q=O.value,q!=null?ye(h,!!O.multiple,q,!1):O.defaultValue!=null&&ye(h,!!O.multiple,O.defaultValue,!0);break;default:typeof D.onClick=="function"&&(h.onclick=am)}switch(j){case"button":case"input":case"select":case"textarea":O=!!O.autoFocus;break e;case"img":O=!0;break e;default:O=!1}}O&&(g.flags|=4)}g.ref!==null&&(g.flags|=512,g.flags|=2097152)}return lr(g),null;case 6:if(h&&g.stateNode!=null)CT(h,g,h.memoizedProps,O);else{if(typeof O!="string"&&g.stateNode===null)throw Error(n(166));if(j=$s($d.current),$s(ma.current),fm(g)){if(O=g.stateNode,j=g.memoizedProps,O[pa]=g,(q=O.nodeValue!==j)&&(h=Qr,h!==null))switch(h.tag){case 3:im(O.nodeValue,j,(h.mode&1)!==0);break;case 5:h.memoizedProps.suppressHydrationWarning!==!0&&im(O.nodeValue,j,(h.mode&1)!==0)}q&&(g.flags|=4)}else O=(j.nodeType===9?j:j.ownerDocument).createTextNode(O),O[pa]=g,g.stateNode=O}return lr(g),null;case 13:if(sn(mn),O=g.memoizedState,h===null||h.memoizedState!==null&&h.memoizedState.dehydrated!==null){if(un&&Xr!==null&&(g.mode&1)!==0&&(g.flags&128)===0)T2(),sc(),g.flags|=98560,q=!1;else if(q=fm(g),O!==null&&O.dehydrated!==null){if(h===null){if(!q)throw Error(n(318));if(q=g.memoizedState,q=q!==null?q.dehydrated:null,!q)throw Error(n(317));q[pa]=g}else sc(),(g.flags&128)===0&&(g.memoizedState=null),g.flags|=4;lr(g),q=!1}else Wi!==null&&(qb(Wi),Wi=null),q=!0;if(!q)return g.flags&65536?g:null}return(g.flags&128)!==0?(g.lanes=j,g):(O=O!==null,O!==(h!==null&&h.memoizedState!==null)&&O&&(g.child.flags|=8192,(g.mode&1)!==0&&(h===null||(mn.current&1)!==0?Mn===0&&(Mn=3):Hb())),g.updateQueue!==null&&(g.flags|=4),lr(g),null);case 4:return dc(),Ab(h,g),h===null&&Pd(g.stateNode.containerInfo),lr(g),null;case 10:return ib(g.type._context),lr(g),null;case 17:return Tr(g.type)&&sm(),lr(g),null;case 19:if(sn(mn),q=g.memoizedState,q===null)return lr(g),null;if(O=(g.flags&128)!==0,Q=q.rendering,Q===null)if(O)zd(q,!1);else{if(Mn!==0||h!==null&&(h.flags&128)!==0)for(h=g.child;h!==null;){if(Q=ym(h),Q!==null){for(g.flags|=128,zd(q,!1),O=Q.updateQueue,O!==null&&(g.updateQueue=O,g.flags|=4),g.subtreeFlags=0,O=j,j=g.child;j!==null;)q=j,h=O,q.flags&=14680066,Q=q.alternate,Q===null?(q.childLanes=0,q.lanes=h,q.child=null,q.subtreeFlags=0,q.memoizedProps=null,q.memoizedState=null,q.updateQueue=null,q.dependencies=null,q.stateNode=null):(q.childLanes=Q.childLanes,q.lanes=Q.lanes,q.child=Q.child,q.subtreeFlags=0,q.deletions=null,q.memoizedProps=Q.memoizedProps,q.memoizedState=Q.memoizedState,q.updateQueue=Q.updateQueue,q.type=Q.type,h=Q.dependencies,q.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext}),j=j.sibling;return Zt(mn,mn.current&1|2),g.child}h=h.sibling}q.tail!==null&&Sn()>mc&&(g.flags|=128,O=!0,zd(q,!1),g.lanes=4194304)}else{if(!O)if(h=ym(Q),h!==null){if(g.flags|=128,O=!0,j=h.updateQueue,j!==null&&(g.updateQueue=j,g.flags|=4),zd(q,!0),q.tail===null&&q.tailMode==="hidden"&&!Q.alternate&&!un)return lr(g),null}else 2*Sn()-q.renderingStartTime>mc&&j!==1073741824&&(g.flags|=128,O=!0,zd(q,!1),g.lanes=4194304);q.isBackwards?(Q.sibling=g.child,g.child=Q):(j=q.last,j!==null?j.sibling=Q:g.child=Q,q.last=Q)}return q.tail!==null?(g=q.tail,q.rendering=g,q.tail=g.sibling,q.renderingStartTime=Sn(),g.sibling=null,j=mn.current,Zt(mn,O?j&1|2:j&1),g):(lr(g),null);case 22:case 23:return zb(),O=g.memoizedState!==null,h!==null&&h.memoizedState!==null!==O&&(g.flags|=8192),O&&(g.mode&1)!==0?(Zr&1073741824)!==0&&(lr(g),g.subtreeFlags&6&&(g.flags|=8192)):lr(g),null;case 24:return null;case 25:return null}throw Error(n(156,g.tag))}function hQ(h,g){switch(Z0(g),g.tag){case 1:return Tr(g.type)&&sm(),h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;case 3:return dc(),sn(Pr),sn(or),db(),h=g.flags,(h&65536)!==0&&(h&128)===0?(g.flags=h&-65537|128,g):null;case 5:return cb(g),null;case 13:if(sn(mn),h=g.memoizedState,h!==null&&h.dehydrated!==null){if(g.alternate===null)throw Error(n(340));sc()}return h=g.flags,h&65536?(g.flags=h&-65537|128,g):null;
vendor: 19,400 bytes, line 40
40case 19:return sn(mn),null;case 4:return dc(),null;case 10:return ib(g.type._context),null;case 22:case 23:return zb(),null;case 24:return null;default:return null}}var km=!1,cr=!1,pQ=typeof WeakSet=="function"?WeakSet:Set,Ke=null;function hc(h,g){var j=h.ref;if(j!==null)if(typeof j=="function")try{j(null)}catch(O){yn(h,g,O)}else j.current=null}function Pb(h,g,j){try{j()}catch(O){yn(h,g,O)}}var AT=!1;function mQ(h,g){if(z0=Gp,h=l2(),M0(h)){if("selectionStart"in h)var j={start:h.selectionStart,end:h.selectionEnd};else e:{j=(j=h.ownerDocument)&&j.defaultView||window;var O=j.getSelection&&j.getSelection();if(O&&O.rangeCount!==0){j=O.anchorNode;var D=O.anchorOffset,q=O.focusNode;O=O.focusOffset;try{j.nodeType,q.nodeType}catch{j=null;break e}var Q=0,ae=-1,ue=-1,Se=0,Ie=0,Me=h,Pe=null;t:for(;;){for(var We;Me!==j||D!==0&&Me.nodeType!==3||(ae=Q+D),Me!==q||O!==0&&Me.nodeType!==3||(ue=Q+O),Me.nodeType===3&&(Q+=Me.nodeValue.length),(We=Me.firstChild)!==null;)Pe=Me,Me=We;for(;;){if(Me===h)break t;if(Pe===j&&++Se===D&&(ae=Q),Pe===q&&++Ie===O&&(ue=Q),(We=Me.nextSibling)!==null)break;Me=Pe,Pe=Me.parentNode}Me=We}j=ae===-1||ue===-1?null:{start:ae,end:ue}}else j=null}j=j||{start:0,end:0}}else j=null;for(H0={focusedElem:h,selectionRange:j},Gp=!1,Ke=g;Ke!==null;)if(g=Ke,h=g.child,(g.subtreeFlags&1028)!==0&&h!==null)h.return=g,Ke=h;else for(;Ke!==null;){g=Ke;try{var Qe=g.alternate;if((g.flags&1024)!==0)switch(g.tag){case 0:case 11:case 15:break;case 1:if(Qe!==null){var Je=Qe.memoizedProps,jn=Qe.memoizedState,we=g.stateNode,pe=we.getSnapshotBeforeUpdate(g.elementType===g.type?Je:Vi(g.type,Je),jn);we.__reactInternalSnapshotBeforeUpdate=pe}break;case 3:var _e=g.stateNode.containerInfo;_e.nodeType===1?_e.textContent="":_e.nodeType===9&&_e.documentElement&&_e.removeChild(_e.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Fe){yn(g,g.return,Fe)}if(h=g.sibling,h!==null){h.return=g.return,Ke=h;break}Ke=g.return}return Qe=AT,AT=!1,Qe}function Hd(h,g,j){var O=g.updateQueue;if(O=O!==null?O.lastEffect:null,O!==null){var D=O=O.next;do{if((D.tag&h)===h){var q=D.destroy;D.destroy=void 0,q!==void 0&&Pb(g,j,q)}D=D.next}while(D!==O)}}function Om(h,g){if(g=g.updateQueue,g=g!==null?g.lastEffect:null,g!==null){var j=g=g.next;do{if((j.tag&h)===h){var O=j.create;j.destroy=O()}j=j.next}while(j!==g)}}function Tb(h){var g=h.ref;if(g!==null){var j=h.stateNode;switch(h.tag){case 5:h=j;break;default:h=j}typeof g=="function"?g(h):g.current=h}}function PT(h){var g=h.alternate;g!==null&&(h.alternate=null,PT(g)),h.child=null,h.deletions=null,h.sibling=null,h.tag===5&&(g=h.stateNode,g!==null&&(delete g[pa],delete g[Rd],delete g[K0],delete g[XY],delete g[ZY])),h.stateNode=null,h.return=null,h.dependencies=null,h.memoizedProps=null,h.memoizedState=null,h.pendingProps=null,h.stateNode=null,h.updateQueue=null}function TT(h){return h.tag===5||h.tag===3||h.tag===4}function RT(h){e:for(;;){for(;h.sibling===null;){if(h.return===null||TT(h.return))return null;h=h.return}for(h.sibling.return=h.return,h=h.sibling;h.tag!==5&&h.tag!==6&&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 Rb(h,g,j){var O=h.tag;if(O===5||O===6)h=h.stateNode,g?j.nodeType===8?j.parentNode.insertBefore(h,g):j.insertBefore(h,g):(j.nodeType===8?(g=j.parentNode,g.insertBefore(h,j)):(g=j,g.appendChild(h)),j=j._reactRootContainer,j!=null||g.onclick!==null||(g.onclick=am));else if(O!==4&&(h=h.child,h!==null))for(Rb(h,g,j),h=h.sibling;h!==null;)Rb(h,g,j),h=h.sibling}function Ib(h,g,j){var O=h.tag;if(O===5||O===6)h=h.stateNode,g?j.insertBefore(h,g):j.appendChild(h);else if(O!==4&&(h=h.child,h!==null))for(Ib(h,g,j),h=h.sibling;h!==null;)Ib(h,g,j),h=h.sibling}var Xn=null,Gi=!1;function Io(h,g,j){for(j=j.child;j!==null;)IT(h,g,j),j=j.sibling}function IT(h,g,j){if(ha&&typeof ha.onCommitFiberUnmount=="function")try{ha.onCommitFiberUnmount(qp,j)}catch{}switch(j.tag){case 5:cr||hc(j,g);case 6:var O=Xn,D=Gi;Xn=null,Io(h,g,j),Xn=O,Gi=D,Xn!==null&&(Gi?(h=Xn,j=j.stateNode,h.nodeType===8?h.parentNode.removeChild(j):h.removeChild(j)):Xn.removeChild(j.stateNode));break;case 18:Xn!==null&&(Gi?(h=Xn,j=j.stateNode,h.nodeType===8?G0(h.parentNode,j):h.nodeType===1&&G0(h,j),_d(h)):G0(Xn,j.stateNode));break;case 4:O=Xn,D=Gi,Xn=j.stateNode.containerInfo,Gi=!0,Io(h,g,j),Xn=O,Gi=D;break;case 0:case 11:case 14:case 15:if(!cr&&(O=j.updateQueue,O!==null&&(O=O.lastEffect,O!==null))){D=O=O.next;do{var q=D,Q=q.destroy;q=q.tag,Q!==void 0&&((q&2)!==0||(q&4)!==0)&&Pb(j,g,Q),D=D.next}while(D!==O)}Io(h,g,j);break;case 1:if(!cr&&(hc(j,g),O=j.stateNode,typeof O.componentWillUnmount=="function"))try{O.props=j.memoizedProps,O.state=j.memoizedState,O.componentWillUnmount()}catch(ae){yn(j,g,ae)}Io(h,g,j);break;case 21:Io(h,g,j);break;case 22:j.mode&1?(cr=(O=cr)||j.memoizedState!==null,Io(h,g,j),cr=O):Io(h,g,j);break;default:Io(h,g,j)}}function MT(h){var g=h.updateQueue;if(g!==null){h.updateQueue=null;var j=h.stateNode;j===null&&(j=h.stateNode=new pQ),g.forEach(function(O){var D=jQ.bind(null,h,O);j.has(O)||(j.add(O),O.then(D,D))})}}function Ki(h,g){var j=g.deletions;if(j!==null)for(var O=0;O<j.length;O++){var D=j[O];try{var q=h,Q=g,ae=Q;e:for(;ae!==null;){switch(ae.tag){case 5:Xn=ae.stateNode,Gi=!1;break e;case 3:Xn=ae.stateNode.containerInfo,Gi=!0;break e;case 4:Xn=ae.stateNode.containerInfo,Gi=!0;break e}ae=ae.return}if(Xn===null)throw Error(n(160));IT(q,Q,D),Xn=null,Gi=!1;var ue=D.alternate;ue!==null&&(ue.return=null),D.return=null}catch(Se){yn(D,g,Se)}}if(g.subtreeFlags&12854)for(g=g.child;g!==null;)DT(g,h),g=g.sibling}function DT(h,g){var j=h.alternate,O=h.flags;switch(h.tag){case 0:case 11:case 14:case 15:if(Ki(g,h),va(h),O&4){try{Hd(3,h,h.return),Om(3,h)}catch(Je){yn(h,h.return,Je)}try{Hd(5,h,h.return)}catch(Je){yn(h,h.return,Je)}}break;case 1:Ki(g,h),va(h),O&512&&j!==null&&hc(j,j.return);break;case 5:if(Ki(g,h),va(h),O&512&&j!==null&&hc(j,j.return),h.flags&32){var D=h.stateNode;try{tt(D,"")}catch(Je){yn(h,h.return,Je)}}if(O&4&&(D=h.stateNode,D!=null)){var q=h.memoizedProps,Q=j!==null?j.memoizedProps:q,ae=h.type,ue=h.updateQueue;if(h.updateQueue=null,ue!==null)try{ae==="input"&&q.type==="radio"&&q.name!=null&&me(D,q),fi(ae,Q);var Se=fi(ae,q);for(Q=0;Q<ue.length;Q+=2){var Ie=ue[Q],Me=ue[Q+1];Ie==="style"?rt(D,Me):Ie==="dangerouslySetInnerHTML"?at(D,Me):Ie==="children"?tt(D,Me):S(D,Ie,Me,Se)}switch(ae){case"input":je(D,q);break;case"textarea":Be(D,q);break;case"select":var Pe=D._wrapperState.wasMultiple;D._wrapperState.wasMultiple=!!q.multiple;var We=q.value;We!=null?ye(D,!!q.multiple,We,!1):Pe!==!!q.multiple&&(q.defaultValue!=null?ye(D,!!q.multiple,q.defaultValue,!0):ye(D,!!q.multiple,q.multiple?[]:"",!1))}D[Rd]=q}catch(Je){yn(h,h.return,Je)}}break;case 6:if(Ki(g,h),va(h),O&4){if(h.stateNode===null)throw Error(n(162));D=h.stateNode,q=h.memoizedProps;try{D.nodeValue=q}catch(Je){yn(h,h.return,Je)}}break;case 3:if(Ki(g,h),va(h),O&4&&j!==null&&j.memoizedState.isDehydrated)try{_d(g.containerInfo)}catch(Je){yn(h,h.return,Je)}break;case 4:Ki(g,h),va(h);break;case 13:Ki(g,h),va(h),D=h.child,D.flags&8192&&(q=D.memoizedState!==null,D.stateNode.isHidden=q,!q||D.alternate!==null&&D.alternate.memoizedState!==null||(Lb=Sn())),O&4&&MT(h);break;case 22:if(Ie=j!==null&&j.memoizedState!==null,h.mode&1?(cr=(Se=cr)||Ie,Ki(g,h),cr=Se):Ki(g,h),va(h),O&8192){if(Se=h.memoizedState!==null,(h.stateNode.isHidden=Se)&&!Ie&&(h.mode&1)!==0)for(Ke=h,Ie=h.child;Ie!==null;){for(Me=Ke=Ie;Ke!==null;){switch(Pe=Ke,We=Pe.child,Pe.tag){case 0:case 11:case 14:case 15:Hd(4,Pe,Pe.return);break;case 1:hc(Pe,Pe.return);var Qe=Pe.stateNode;if(typeof Qe.componentWillUnmount=="function"){O=Pe,j=Pe.return;try{g=O,Qe.props=g.memoizedProps,Qe.state=g.memoizedState,Qe.componentWillUnmount()}catch(Je){yn(O,j,Je)}}break;case 5:hc(Pe,Pe.return);break;case 22:if(Pe.memoizedState!==null){FT(Me);continue}}We!==null?(We.return=Pe,Ke=We):FT(Me)}Ie=Ie.sibling}e:for(Ie=null,Me=h;;){if(Me.tag===5){if(Ie===null){Ie=Me;try{D=Me.stateNode,Se?(q=D.style,typeof q.setProperty=="function"?q.setProperty("display","none","important"):q.display="none"):(ae=Me.stateNode,ue=Me.memoizedProps.style,Q=ue!=null&&ue.hasOwnProperty("display")?ue.display:null,ae.style.display=Pt("display",Q))}catch(Je){yn(h,h.return,Je)}}}else if(Me.tag===6){if(Ie===null)try{Me.stateNode.nodeValue=Se?"":Me.memoizedProps}catch(Je){yn(h,h.return,Je)}}else if((Me.tag!==22&&Me.tag!==23||Me.memoizedState===null||Me===h)&&Me.child!==null){Me.child.return=Me,Me=Me.child;continue}if(Me===h)break e;for(;Me.sibling===null;){if(Me.return===null||Me.return===h)break e;Ie===Me&&(Ie=null),Me=Me.return}Ie===Me&&(Ie=null),Me.sibling.return=Me.return,Me=Me.sibling}}break;case 19:Ki(g,h),va(h),O&4&&MT(h);break;case 21:break;default:Ki(g,h),va(h)}}function va(h){var g=h.flags;if(g&2){try{e:{for(var j=h.return;j!==null;){if(TT(j)){var O=j;break e}j=j.return}throw Error(n(160))}switch(O.tag){case 5:var D=O.stateNode;O.flags&32&&(tt(D,""),O.flags&=-33);var q=RT(h);Ib(h,q,D);break;case 3:case 4:var Q=O.stateNode.containerInfo,ae=RT(h);Rb(h,ae,Q);break;default:throw Error(n(161))}}catch(ue){yn(h,h.return,ue)}h.flags&=-3}g&4096&&(h.flags&=-4097)}function gQ(h,g,j){Ke=h,LT(h)}function LT(h,g,j){for(var O=(h.mode&1)!==0;Ke!==null;){var D=Ke,q=D.child;if(D.tag===22&&O){var Q=D.memoizedState!==null||km;if(!Q){var ae=D.alternate,ue=ae!==null&&ae.memoizedState!==null||cr;ae=km;var Se=cr;if(km=Q,(cr=ue)&&!Se)for(Ke=D;Ke!==null;)Q=Ke,ue=Q.child,Q.tag===22&&Q.memoizedState!==null?BT(D):ue!==null?(ue.return=Q,Ke=ue):BT(D);for(;q!==null;)Ke=q,LT(q),q=q.sibling;Ke=D,km=ae,cr=Se}$T(h)}else(D.subtreeFlags&8772)!==0&&q!==null?(q.return=D,Ke=q):$T(h)}}function $T(h){for(;Ke!==null;){var g=Ke;if((g.flags&8772)!==0){var j=g.alternate;try{if((g.flags&8772)!==0)switch(g.tag){case 0:case 11:case 15:cr||Om(5,g);break;case 1:var O=g.stateNode;if(g.flags&4&&!cr)if(j===null)O.componentDidMount();else{var D=g.elementType===g.type?j.memoizedProps:Vi(g.type,j.memoizedProps);O.componentDidUpdate(D,j.memoizedState,O.__reactInternalSnapshotBeforeUpdate)}var q=g.updateQueue;q!==null&&F2(g,q,O);break;case 3:var Q=g.updateQueue;if(Q!==null){if(j=null,g.child!==null)switch(g.child.tag){case 5:j=g.child.stateNode;break;case 1:j=g.child.stateNode}F2(g,Q,j)}break;case 5:var ae=g.stateNode;if(j===null&&g.flags&4){j=ae;var ue=g.memoizedProps;switch(g.type){case"button":case"input":case"select":case"textarea":ue.autoFocus&&j.focus();break;case"img":ue.src&&(j.src=ue.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(g.memoizedState===null){var Se=g.alternate;if(Se!==null){var Ie=Se.memoizedState;if(Ie!==null){var Me=Ie.dehydrated;Me!==null&&_d(Me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}cr||g.flags&512&&Tb(g)}catch(Pe){yn(g,g.return,Pe)}}if(g===h){Ke=null;break}if(j=g.sibling,j!==null){j.return=g.return,Ke=j;break}Ke=g.return}}function FT(h){for(;Ke!==null;){var g=Ke;if(g===h){Ke=null;break}var j=g.sibling;if(j!==null){j.return=g.return,Ke=j;break}Ke=g.return}}function BT(h){for(;Ke!==null;){var g=Ke;try{switch(g.tag){case 0:case 11:case 15:var j=g.return;try{Om(4,g)}catch(ue){yn(g,j,ue)}break;case 1:var O=g.stateNode;if(typeof O.componentDidMount=="function"){var D=g.return;try{O.componentDidMount()}catch(ue){yn(g,D,ue)}}var q=g.return;try{Tb(g)}catch(ue){yn(g,q,ue)}break;case 5:var Q=g.return;try{Tb(g)}catch(ue){yn(g,Q,ue)}}}catch(ue){yn(g,g.return,ue)}if(g===h){Ke=null;break}var ae=g.sibling;if(ae!==null){ae.return=g.return,Ke=ae;break}Ke=g.return}}var vQ=Math.ceil,Cm=w.ReactCurrentDispatcher,Mb=w.ReactCurrentOwner,vi=w.ReactCurrentBatchConfig,Dt=0,Un=null,On=null,Zn=0,Zr=0,pc=Co(0),Mn=0,Wd=null,Bs=0,Am=0,Db=0,Vd=null,Ir=null,Lb=0,mc=1/0,Xa=null,Pm=!1,$b=null,Mo=null,Tm=!1,Do=null,Rm=0,Gd=0,Fb=null,Im=-1,Mm=0;function xr(){return(Dt&6)!==0?Sn():Im!==-1?Im:Im=Sn()}function Lo(h){return(h.mode&1)===0?1:(Dt&2)!==0&&Zn!==0?Zn&-Zn:eQ.transition!==null?(Mm===0&&(Mm=RP()),Mm):(h=Vt,h!==0||(h=window.event,h=h===void 0?16:UP(h.type)),h)}function Yi(h,g,j,O){if(50<Gd)throw Gd=0,Fb=null,Error(n(185));vd(h,j,O),((Dt&2)===0||h!==Un)&&(h===Un&&((Dt&2)===0&&(Am|=j),Mn===4&&$o(h,Zn)),Mr(h,O),j===1&&Dt===0&&(g.mode&1)===0&&(mc=Sn()+500,cm&&Po()))}function Mr(h,g){var j=h.callbackNode;eY(h,g);var O=Hp(h,h===Un?Zn:0);if(O===0)j!==null&&AP(j),h.callbackNode=null,h.callbackPriority=0;else if(g=O&-O,h.callbackPriority!==g){if(j!=null&&AP(j),g===1)h.tag===0?JY(UT.bind(null,h)):k2(UT.bind(null,h)),YY(function(){(Dt&6)===0&&Po()}),j=null;else{switch(IP(O)){case 1:j=y0;break;case 4:j=PP;break;case 16:j=Bp;break;case 536870912:j=TP;break;default:j=Bp}j=QT(j,qT.bind(null,h))}h.callbackPriority=g,h.callbackNode=j}}function qT(h,g){if(Im=-1,Mm=0,(Dt&6)!==0)throw Error(n(327));var j=h.callbackNode;if(gc()&&h.callbackNode!==j)return null;var O=Hp(h,h===Un?Zn:0);if(O===0)return null;if((O&30)!==0||(O&h.expiredLanes)!==0||g)g=Dm(h,O);else{g=O;var D=Dt;Dt|=2;var q=HT();(Un!==h||Zn!==g)&&(Xa=null,mc=Sn()+500,Us(h,g));do try{bQ();break}catch(ae){zT(h,ae)}while(!0);rb(),Cm.current=q,Dt=D,On!==null?g=0:(Un=null,Zn=0,g=Mn)}if(g!==0){if(g===2&&(D=x0(h),D!==0&&(O=D,g=Bb(h,D))),g===1)throw j=Wd,Us(h,0),$o(h,O),Mr(h,Sn()),j;if(g===6)$o(h,O);else{if(D=h.current.alternate,(O&30)===0&&!yQ(D)&&(g=Dm(h,O),g===2&&(q=x0(h),q!==0&&(O=q,g=Bb(h,q))),g===1))throw j=Wd,Us(h,0),$o(h,O),Mr(h,Sn()),j;switch(h.finishedWork=D,h.finishedLanes=O,g){case 0:case 1:throw Error(n(345));case 2:zs(h,Ir,Xa);break;case 3:if($o(h,O),(O&130023424)===O&&(g=Lb+500-Sn(),10<g)){if(Hp(h,0)!==0)break;if(D=h.suspendedLanes,(D&O)!==O){xr(),h.pingedLanes|=h.suspendedLanes&D;break}h.timeoutHandle=V0(zs.bind(null,h,Ir,Xa),g);break}zs(h,Ir,Xa);break;case 4:if($o(h,O),(O&4194240)===O)break;for(g=h.eventTimes,D=-1;0<O;){var Q=31-zi(O);q=1<<Q,Q=g[Q],Q>D&&(D=Q),O&=~q}if(O=D,O=Sn()-O,O=(120>O?120:480>O?480:1080>O?1080:1920>O?1920:3e3>O?3e3:4320>O?4320:1960*vQ(O/1960))-O,10<O){h.timeoutHandle=V0(zs.bind(null,h,Ir,Xa),O);break}zs(h,Ir,Xa);break;case 5:zs(h,Ir,Xa);break;default:throw Error(n(329))}}}return Mr(h,Sn()),h.callbackNode===j?qT.bind(null,h):null}function Bb(h,g){var j=Vd;return h.current.memoizedState.isDehydrated&&(Us(h,g).flags|=256),h=Dm(h,g),h!==2&&(g=Ir,Ir=j,g!==null&&qb(g)),h}function qb(h){Ir===null?Ir=h:Ir.push.apply(Ir,h)}function yQ(h){for(var g=h;;){if(g.flags&16384){var j=g.updateQueue;if(j!==null&&(j=j.stores,j!==null))for(var O=0;O<j.length;O++){var D=j[O],q=D.getSnapshot;D=D.value;try{if(!Hi(q(),D))return!1}catch{return!1}}}if(j=g.child,g.subtreeFlags&16384&&j!==null)j.return=g,g=j;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 $o(h,g){for(g&=~Db,g&=~Am,h.suspendedLanes|=g,h.pingedLanes&=~g,h=h.expirationTimes;0<g;){var j=31-zi(g),O=1<<j;h[j]=-1,g&=~O}}function UT(h){if((Dt&6)!==0)throw Error(n(327));gc();var g=Hp(h,0);if((g&1)===0)return Mr(h,Sn()),null;var j=Dm(h,g);if(h.tag!==0&&j===2){var O=x0(h);O!==0&&(g=O,j=Bb(h,O))}if(j===1)throw j=Wd,Us(h,0),$o(h,g),Mr(h,Sn()),j;if(j===6)throw Error(n(345));return h.finishedWork=h.current.alternate,h.finishedLanes=g,zs(h,Ir,Xa),Mr(h,Sn()),null}function Ub(h,g){var j=Dt;Dt|=1;try{return h(g)}finally{Dt=j,Dt===0&&(mc=Sn()+500,cm&&Po())}}function qs(h){Do!==null&&Do.tag===0&&(Dt&6)===0&&gc();var g=Dt;Dt|=1;var j=vi.transition,O=Vt;try{if(vi.transition=null,Vt=1,h)return h()}finally{Vt=O,vi.transition=j,Dt=g,(Dt&6)===0&&Po()}}function zb(){Zr=pc.current,sn(pc)}function Us(h,g){h.finishedWork=null,h.finishedLanes=0;var j=h.timeoutHandle;if(j!==-1&&(h.timeoutHandle=-1,KY(j)),On!==null)for(j=On.return;j!==null;){var O=j;switch(Z0(O),O.tag){case 1:O=O.type.childContextTypes,O!=null&&sm();break;case 3:dc(),sn(Pr),sn(or),db();break;case 5:cb(O);break;case 4:dc();break;case 13:sn(mn);break;case 19:sn(mn);break;case 10:ib(O.type._context);break;case 22:case 23:zb()}j=j.return}if(Un=h,On=h=Fo(h.current,null),Zn=Zr=g,Mn=0,Wd=null,Db=Am=Bs=0,Ir=Vd=null,Ls!==null){for(g=0;g<Ls.length;g++)if(j=Ls[g],O=j.interleaved,O!==null){j.interleaved=null;var D=O.next,q=j.pending;if(q!==null){var Q=q.next;q.next=D,O.next=Q}j.pending=O}Ls=null}return h}function zT(h,g){do{var j=On;try{if(rb(),xm.current=Sm,bm){for(var O=gn.memoizedState;O!==null;){var D=O.queue;D!==null&&(D.pending=null),O=O.next}bm=!1}if(Fs=0,qn=In=gn=null,Fd=!1,Bd=0,Mb.current=null,j===null||j.return===null){Mn=1,Wd=g,On=null;break}e:{var q=h,Q=j.return,ae=j,ue=g;if(g=Zn,ae.flags|=32768,ue!==null&&typeof ue=="object"&&typeof ue.then=="function"){var Se=ue,Ie=ae,Me=Ie.tag;if((Ie.mode&1)===0&&(Me===0||Me===11||Me===15)){var Pe=Ie.alternate;Pe?(Ie.updateQueue=Pe.updateQueue,Ie.memoizedState=Pe.memoizedState,Ie.lanes=Pe.lanes):(Ie.updateQueue=null,Ie.memoizedState=null)}var We=pT(Q);if(We!==null){We.flags&=-257,mT(We,Q,ae,q,g),We.mode&1&&hT(q,Se,g),g=We,ue=Se;var Qe=g.updateQueue;if(Qe===null){var Je=new Set;Je.add(ue),g.updateQueue=Je}else Qe.add(ue);break e}else{if((g&1)===0){hT(q,Se,g),Hb();break e}ue=Error(n(426))}}else if(un&&ae.mode&1){var jn=pT(Q);if(jn!==null){(jn.flags&65536)===0&&(jn.flags|=256),mT(jn,Q,ae,q,g),tb(fc(ue,ae));break e}}q=ue=fc(ue,ae),Mn!==4&&(Mn=2),Vd===null?Vd=[q]:Vd.push(q),q=Q;do{switch(q.tag){case 3:q.flags|=65536,g&=-g,q.lanes|=g;var we=dT(q,ue,g);$2(q,we);break e;case 1:ae=ue;var pe=q.type,_e=q.stateNode;if((q.flags&128)===0&&(typeof pe.getDerivedStateFromError=="function"||_e!==null&&typeof _e.componentDidCatch=="function"&&(Mo===null||!Mo.has(_e)))){q.flags|=65536,g&=-g,q.lanes|=g;var Fe=fT(q,ae,g);$2(q,Fe);break e}}q=q.return}while(q!==null)}VT(j)}catch(nt){g=nt,On===j&&j!==null&&(On=j=j.return);continue}break}while(!0)}function HT(){var h=Cm.current;return Cm.current=Sm,h===null?Sm:h}function Hb(){(Mn===0||Mn===3||Mn===2)&&(Mn=4),Un===null||(Bs&268435455)===0&&(Am&268435455)===0||$o(Un,Zn)}function Dm(h,g){var j=Dt;Dt|=2;var O=HT();(Un!==h||Zn!==g)&&(Xa=null,Us(h,g));do try{xQ();break}catch(D){zT(h,D)}while(!0);if(rb(),Dt=j,Cm.current=O,On!==null)throw Error(n(261));return Un=null,Zn=0,Mn}function xQ(){for(;On!==null;)WT(On)}function bQ(){for(;On!==null&&!WK();)WT(On)}function WT(h){var g=YT(h.alternate,h,Zr);h.memoizedProps=h.pendingProps,g===null?VT(h):On=g,Mb.current=null}function VT(h){var g=h;do{var j=g.alternate;if(h=g.return,(g.flags&32768)===0){if(j=fQ(j,g,Zr),j!==null){On=j;return}}else{if(j=hQ(j,g),j!==null){j.flags&=32767,On=j;return}if(h!==null)h.flags|=32768,h.subtreeFlags=0,h.deletions=null;else{Mn=6,On=null;return}}if(g=g.sibling,g!==null){On=g;return}On=g=h}while(g!==null);Mn===0&&(Mn=5)}function zs(h,g,j){var O=Vt,D=vi.transition;try{vi.transition=null,Vt=1,wQ(h,g,j,O)}finally{vi.transition=D,Vt=O}return null}function wQ(h,g,j,O){do gc();while(Do!==null);if((Dt&6)!==0)throw Error(n(327));j=h.finishedWork;var D=h.finishedLanes;if(j===null)return null;if(h.finishedWork=null,h.finishedLanes=0,j===h.current)throw Error(n(177));h.callbackNode=null,h.callbackPriority=0;var q=j.lanes|j.childLanes;if(tY(h,q),h===Un&&(On=Un=null,Zn=0),(j.subtreeFlags&2064)===0&&(j.flags&2064)===0||Tm||(Tm=!0,QT(Bp,function(){return gc(),null})),q=(j.flags&15990)!==0,(j.subtreeFlags&15990)!==0||q){q=vi.transition,vi.transition=null;var Q=Vt;Vt=1;var ae=Dt;Dt|=4,Mb.current=null,mQ(h,j),DT(j,h),qY(H0),Gp=!!z0,H0=z0=null,h.current=j,gQ(j),VK(),Dt=ae,Vt=Q,vi.transition=q}else h.current=j;
vendor: 2,976 bytes, line 40
40if(Tm&&(Tm=!1,Do=h,Rm=D),q=h.pendingLanes,q===0&&(Mo=null),YK(j.stateNode),Mr(h,Sn()),g!==null)for(O=h.onRecoverableError,j=0;j<g.length;j++)D=g[j],O(D.value,{componentStack:D.stack,digest:D.digest});if(Pm)throw Pm=!1,h=$b,$b=null,h;return(Rm&1)!==0&&h.tag!==0&&gc(),q=h.pendingLanes,(q&1)!==0?h===Fb?Gd++:(Gd=0,Fb=h):Gd=0,Po(),null}function gc(){if(Do!==null){var h=IP(Rm),g=vi.transition,j=Vt;try{if(vi.transition=null,Vt=16>h?16:h,Do===null)var O=!1;else{if(h=Do,Do=null,Rm=0,(Dt&6)!==0)throw Error(n(331));var D=Dt;for(Dt|=4,Ke=h.current;Ke!==null;){var q=Ke,Q=q.child;if((Ke.flags&16)!==0){var ae=q.deletions;if(ae!==null){for(var ue=0;ue<ae.length;ue++){var Se=ae[ue];for(Ke=Se;Ke!==null;){var Ie=Ke;switch(Ie.tag){case 0:case 11:case 15:Hd(8,Ie,q)}var Me=Ie.child;if(Me!==null)Me.return=Ie,Ke=Me;else for(;Ke!==null;){Ie=Ke;var Pe=Ie.sibling,We=Ie.return;if(PT(Ie),Ie===Se){Ke=null;break}if(Pe!==null){Pe.return=We,Ke=Pe;break}Ke=We}}}var Qe=q.alternate;if(Qe!==null){var Je=Qe.child;if(Je!==null){Qe.child=null;do{var jn=Je.sibling;Je.sibling=null,Je=jn}while(Je!==null)}}Ke=q}}if((q.subtreeFlags&2064)!==0&&Q!==null)Q.return=q,Ke=Q;else e:for(;Ke!==null;){if(q=Ke,(q.flags&2048)!==0)switch(q.tag){case 0:case 11:case 15:Hd(9,q,q.return)}var we=q.sibling;if(we!==null){we.return=q.return,Ke=we;break e}Ke=q.return}}var pe=h.current;for(Ke=pe;Ke!==null;){Q=Ke;var _e=Q.child;if((Q.subtreeFlags&2064)!==0&&_e!==null)_e.return=Q,Ke=_e;else e:for(Q=pe;Ke!==null;){if(ae=Ke,(ae.flags&2048)!==0)try{switch(ae.tag){case 0:case 11:case 15:Om(9,ae)}}catch(nt){yn(ae,ae.return,nt)}if(ae===Q){Ke=null;break e}var Fe=ae.sibling;if(Fe!==null){Fe.return=ae.return,Ke=Fe;break e}Ke=ae.return}}if(Dt=D,Po(),ha&&typeof ha.onPostCommitFiberRoot=="function")try{ha.onPostCommitFiberRoot(qp,h)}catch{}O=!0}return O}finally{Vt=j,vi.transition=g}}return!1}function GT(h,g,j){g=fc(j,g),g=dT(h,g,1),h=Ro(h,g,1),g=xr(),h!==null&&(vd(h,1,g),Mr(h,g))}function yn(h,g,j){if(h.tag===3)GT(h,h,j);else for(;g!==null;){if(g.tag===3){GT(g,h,j);break}else if(g.tag===1){var O=g.stateNode;if(typeof g.type.getDerivedStateFromError=="function"||typeof O.componentDidCatch=="function"&&(Mo===null||!Mo.has(O))){h=fc(j,h),h=fT(g,h,1),g=Ro(g,h,1),h=xr(),g!==null&&(vd(g,1,h),Mr(g,h));break}}g=g.return}}function _Q(h,g,j){var O=h.pingCache;O!==null&&O.delete(g),g=xr(),h.pingedLanes|=h.suspendedLanes&j,Un===h&&(Zn&j)===j&&(Mn===4||Mn===3&&(Zn&130023424)===Zn&&500>Sn()-Lb?Us(h,0):Db|=j),Mr(h,g)}function KT(h,g){g===0&&((h.mode&1)===0?g=1:(g=zp,zp<<=1,(zp&130023424)===0&&(zp=4194304)));var j=xr();h=Ka(h,g),h!==null&&(vd(h,g,j),Mr(h,j))}function SQ(h){var g=h.memoizedState,j=0;g!==null&&(j=g.retryLane),KT(h,j)}function jQ(h,g){var j=0;switch(h.tag){case 13:var O=h.stateNode,D=h.memoizedState;D!==null&&(j=D.retryLane);break;case 19:O=h.stateNode;break;default:throw Error(n(314))}O!==null&&O.delete(g),KT(h,j)}var YT;YT=function(h,g,j){if(h!==null)if(h.memoizedProps!==g.pendingProps||Pr.current)Rr=!0;
vendor: 14,099 bytes, line 40
40else{if((h.lanes&j)===0&&(g.flags&128)===0)return Rr=!1,dQ(h,g,j);Rr=(h.flags&131072)!==0}else Rr=!1,un&&(g.flags&1048576)!==0&&O2(g,dm,g.index);switch(g.lanes=0,g.tag){case 2:var O=g.type;Em(h,g),h=g.pendingProps;var D=ic(g,or.current);uc(g,j),D=pb(null,g,O,h,D,j);var q=mb();return g.flags|=1,typeof D=="object"&&D!==null&&typeof D.render=="function"&&D.$$typeof===void 0?(g.tag=1,g.memoizedState=null,g.updateQueue=null,Tr(O)?(q=!0,lm(g)):q=!1,g.memoizedState=D.state!==null&&D.state!==void 0?D.state:null,sb(g),D.updater=jm,g.stateNode=D,D._reactInternals=g,wb(g,O,h,j),g=Nb(null,g,O,!0,q,j)):(g.tag=0,un&&q&&X0(g),yr(null,g,D,j),g=g.child),g;case 16:O=g.elementType;e:{switch(Em(h,g),h=g.pendingProps,D=O._init,O=D(O._payload),g.type=O,D=g.tag=EQ(O),h=Vi(O,h),D){case 0:g=jb(null,g,O,h,j);break e;case 1:g=wT(null,g,O,h,j);break e;case 11:g=gT(null,g,O,h,j);break e;case 14:g=vT(null,g,O,Vi(O.type,h),j);break e}throw Error(n(306,O,""))}return g;case 0:return O=g.type,D=g.pendingProps,D=g.elementType===O?D:Vi(O,D),jb(h,g,O,D,j);case 1:return O=g.type,D=g.pendingProps,D=g.elementType===O?D:Vi(O,D),wT(h,g,O,D,j);case 3:e:{if(_T(g),h===null)throw Error(n(387));O=g.pendingProps,q=g.memoizedState,D=q.element,L2(h,g),vm(g,O,null,j);var Q=g.memoizedState;if(O=Q.element,q.isDehydrated)if(q={element:O,isDehydrated:!1,cache:Q.cache,pendingSuspenseBoundaries:Q.pendingSuspenseBoundaries,transitions:Q.transitions},g.updateQueue.baseState=q,g.memoizedState=q,g.flags&256){D=fc(Error(n(423)),g),g=ST(h,g,O,j,D);break e}else if(O!==D){D=fc(Error(n(424)),g),g=ST(h,g,O,j,D);break e}else for(Xr=Oo(g.stateNode.containerInfo.firstChild),Qr=g,un=!0,Wi=null,j=M2(g,null,O,j),g.child=j;j;)j.flags=j.flags&-3|4096,j=j.sibling;else{if(sc(),O===D){g=Qa(h,g,j);break e}yr(h,g,O,j)}g=g.child}return g;case 5:return B2(g),h===null&&eb(g),O=g.type,D=g.pendingProps,q=h!==null?h.memoizedProps:null,Q=D.children,W0(O,D)?Q=null:q!==null&&W0(O,q)&&(g.flags|=32),bT(h,g),yr(h,g,Q,j),g.child;case 6:return h===null&&eb(g),null;case 13:return jT(h,g,j);case 4:return lb(g,g.stateNode.containerInfo),O=g.pendingProps,h===null?g.child=lc(g,null,O,j):yr(h,g,O,j),g.child;case 11:return O=g.type,D=g.pendingProps,D=g.elementType===O?D:Vi(O,D),gT(h,g,O,D,j);case 7:return yr(h,g,g.pendingProps,j),g.child;case 8:return yr(h,g,g.pendingProps.children,j),g.child;case 12:return yr(h,g,g.pendingProps.children,j),g.child;case 10:e:{if(O=g.type._context,D=g.pendingProps,q=g.memoizedProps,Q=D.value,Zt(pm,O._currentValue),O._currentValue=Q,q!==null)if(Hi(q.value,Q)){if(q.children===D.children&&!Pr.current){g=Qa(h,g,j);break e}}else for(q=g.child,q!==null&&(q.return=g);q!==null;){var ae=q.dependencies;if(ae!==null){Q=q.child;for(var ue=ae.firstContext;ue!==null;){if(ue.context===O){if(q.tag===1){ue=Ya(-1,j&-j),ue.tag=2;var Se=q.updateQueue;if(Se!==null){Se=Se.shared;var Ie=Se.pending;Ie===null?ue.next=ue:(ue.next=Ie.next,Ie.next=ue),Se.pending=ue}}q.lanes|=j,ue=q.alternate,ue!==null&&(ue.lanes|=j),ab(q.return,j,g),ae.lanes|=j;break}ue=ue.next}}else if(q.tag===10)Q=q.type===g.type?null:q.child;else if(q.tag===18){if(Q=q.return,Q===null)throw Error(n(341));Q.lanes|=j,ae=Q.alternate,ae!==null&&(ae.lanes|=j),ab(Q,j,g),Q=q.sibling}else Q=q.child;if(Q!==null)Q.return=q;else for(Q=q;Q!==null;){if(Q===g){Q=null;break}if(q=Q.sibling,q!==null){q.return=Q.return,Q=q;break}Q=Q.return}q=Q}yr(h,g,D.children,j),g=g.child}return g;case 9:return D=g.type,O=g.pendingProps.children,uc(g,j),D=mi(D),O=O(D),g.flags|=1,yr(h,g,O,j),g.child;case 14:return O=g.type,D=Vi(O,g.pendingProps),D=Vi(O.type,D),vT(h,g,O,D,j);case 15:return yT(h,g,g.type,g.pendingProps,j);case 17:return O=g.type,D=g.pendingProps,D=g.elementType===O?D:Vi(O,D),Em(h,g),g.tag=1,Tr(O)?(h=!0,lm(g)):h=!1,uc(g,j),cT(g,O,D),wb(g,O,D,j),Nb(null,g,O,!0,h,j);case 19:return ET(h,g,j);case 22:return xT(h,g,j)}throw Error(n(156,g.tag))};function QT(h,g){return CP(h,g)}function NQ(h,g,j,O){this.tag=h,this.key=j,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=g,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=O,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yi(h,g,j,O){return new NQ(h,g,j,O)}function Wb(h){return h=h.prototype,!(!h||!h.isReactComponent)}function EQ(h){if(typeof h=="function")return Wb(h)?1:0;if(h!=null){if(h=h.$$typeof,h===R)return 11;if(h===B)return 14}return 2}function Fo(h,g){var j=h.alternate;return j===null?(j=yi(h.tag,g,h.key,h.mode),j.elementType=h.elementType,j.type=h.type,j.stateNode=h.stateNode,j.alternate=h,h.alternate=j):(j.pendingProps=g,j.type=h.type,j.flags=0,j.subtreeFlags=0,j.deletions=null),j.flags=h.flags&14680064,j.childLanes=h.childLanes,j.lanes=h.lanes,j.child=h.child,j.memoizedProps=h.memoizedProps,j.memoizedState=h.memoizedState,j.updateQueue=h.updateQueue,g=h.dependencies,j.dependencies=g===null?null:{lanes:g.lanes,firstContext:g.firstContext},j.sibling=h.sibling,j.index=h.index,j.ref=h.ref,j}function Lm(h,g,j,O,D,q){var Q=2;if(O=h,typeof h=="function")Wb(h)&&(Q=1);else if(typeof h=="string")Q=5;else e:switch(h){case C:return Hs(j.children,D,q,g);case P:Q=8,D|=8;break;case L:return h=yi(12,j,g,D|2),h.elementType=L,h.lanes=q,h;case I:return h=yi(13,j,g,D),h.elementType=I,h.lanes=q,h;case M:return h=yi(19,j,g,D),h.elementType=M,h.lanes=q,h;case G:return $m(j,D,q,g);default:if(typeof h=="object"&&h!==null)switch(h.$$typeof){case T:Q=10;break e;case A:Q=9;break e;case R:Q=11;break e;case B:Q=14;break e;case W:Q=16,O=null;break e}throw Error(n(130,h==null?h:typeof h,""))}return g=yi(Q,j,g,D),g.elementType=h,g.type=O,g.lanes=q,g}function Hs(h,g,j,O){return h=yi(7,h,O,g),h.lanes=j,h}function $m(h,g,j,O){return h=yi(22,h,O,g),h.elementType=G,h.lanes=j,h.stateNode={isHidden:!1},h}function Vb(h,g,j){return h=yi(6,h,null,g),h.lanes=j,h}function Gb(h,g,j){return g=yi(4,h.children!==null?h.children:[],h.key,g),g.lanes=j,g.stateNode={containerInfo:h.containerInfo,pendingChildren:null,implementation:h.implementation},g}function kQ(h,g,j,O,D){this.tag=g,this.containerInfo=h,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=b0(0),this.expirationTimes=b0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=b0(0),this.identifierPrefix=O,this.onRecoverableError=D,this.mutableSourceEagerHydrationData=null}function Kb(h,g,j,O,D,q,Q,ae,ue){return h=new kQ(h,g,j,ae,ue),g===1?(g=1,q===!0&&(g|=8)):g=0,q=yi(3,null,null,g),h.current=q,q.stateNode=h,q.memoizedState={element:O,isDehydrated:j,cache:null,transitions:null,pendingSuspenseBoundaries:null},sb(q),h}function OQ(h,g,j){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:O==null?null:""+O,children:h,containerInfo:g,implementation:j}}function XT(h){if(!h)return Ao;h=h._reactInternals;e:{if(Ts(h)!==h||h.tag!==1)throw Error(n(170));var g=h;do{switch(g.tag){case 3:g=g.stateNode.context;break e;case 1:if(Tr(g.type)){g=g.stateNode.__reactInternalMemoizedMergedChildContext;break e}}g=g.return}while(g!==null);throw Error(n(171))}if(h.tag===1){var j=h.type;if(Tr(j))return N2(h,j,g)}return g}function ZT(h,g,j,O,D,q,Q,ae,ue){return h=Kb(j,O,!0,h,D,q,Q,ae,ue),h.context=XT(null),j=h.current,O=xr(),D=Lo(j),q=Ya(O,D),q.callback=g??null,Ro(j,q,D),h.current.lanes=D,vd(h,D,O),Mr(h,O),h}function Fm(h,g,j,O){var D=g.current,q=xr(),Q=Lo(D);return j=XT(j),g.context===null?g.context=j:g.pendingContext=j,g=Ya(q,Q),g.payload={element:h},O=O===void 0?null:O,O!==null&&(g.callback=O),h=Ro(D,g,Q),h!==null&&(Yi(h,D,Q,q),gm(h,D,Q)),Q}function Bm(h){if(h=h.current,!h.child)return null;switch(h.child.tag){case 5:return h.child.stateNode;default:return h.child.stateNode}}function JT(h,g){if(h=h.memoizedState,h!==null&&h.dehydrated!==null){var j=h.retryLane;h.retryLane=j!==0&&j<g?j:g}}function Yb(h,g){JT(h,g),(h=h.alternate)&&JT(h,g)}function CQ(){return null}var eR=typeof reportError=="function"?reportError:function(h){console.error(h)};function Qb(h){this._internalRoot=h}qm.prototype.render=Qb.prototype.render=function(h){var g=this._internalRoot;if(g===null)throw Error(n(409));Fm(h,g,null,null)},qm.prototype.unmount=Qb.prototype.unmount=function(){var h=this._internalRoot;if(h!==null){this._internalRoot=null;var g=h.containerInfo;qs(function(){Fm(null,h,null,null)}),g[Ha]=null}};function qm(h){this._internalRoot=h}qm.prototype.unstable_scheduleHydration=function(h){if(h){var g=LP();h={blockedOn:null,target:h,priority:g};for(var j=0;j<No.length&&g!==0&&g<No[j].priority;j++);No.splice(j,0,h),j===0&&BP(h)}};function Xb(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)}function Um(h){return!(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11&&(h.nodeType!==8||h.nodeValue!==" react-mount-point-unstable "))}function tR(){}function AQ(h,g,j,O,D){if(D){if(typeof O=="function"){var q=O;O=function(){var Se=Bm(Q);q.call(Se)}}var Q=ZT(g,O,h,0,null,!1,!1,"",tR);return h._reactRootContainer=Q,h[Ha]=Q.current,Pd(h.nodeType===8?h.parentNode:h),qs(),Q}for(;D=h.lastChild;)h.removeChild(D);if(typeof O=="function"){var ae=O;O=function(){var Se=Bm(ue);ae.call(Se)}}var ue=Kb(h,0,!1,null,null,!1,!1,"",tR);return h._reactRootContainer=ue,h[Ha]=ue.current,Pd(h.nodeType===8?h.parentNode:h),qs(function(){Fm(g,ue,j,O)}),ue}function zm(h,g,j,O,D){var q=j._reactRootContainer;if(q){var Q=q;if(typeof D=="function"){var ae=D;D=function(){var ue=Bm(Q);ae.call(ue)}}Fm(g,Q,h,D)}else Q=AQ(j,g,h,D,O);return Bm(Q)}MP=function(h){switch(h.tag){case 3:var g=h.stateNode;if(g.current.memoizedState.isDehydrated){var j=gd(g.pendingLanes);j!==0&&(w0(g,j|1),Mr(g,Sn()),(Dt&6)===0&&(mc=Sn()+500,Po()))}break;case 13:qs(function(){var O=Ka(h,1);if(O!==null){var D=xr();Yi(O,h,1,D)}}),Yb(h,1)}},_0=function(h){if(h.tag===13){var g=Ka(h,134217728);if(g!==null){var j=xr();Yi(g,h,134217728,j)}Yb(h,134217728)}},DP=function(h){if(h.tag===13){var g=Lo(h),j=Ka(h,g);if(j!==null){var O=xr();Yi(j,h,g,O)}Yb(h,g)}},LP=function(){return Vt},$P=function(h,g){var j=Vt;try{return Vt=h,g()}finally{Vt=j}},p0=function(h,g,j){switch(g){case"input":if(je(h,j),g=j.name,j.type==="radio"&&g!=null){for(j=h;j.parentNode;)j=j.parentNode;for(j=j.querySelectorAll("input[name="+JSON.stringify(""+g)+'][type="radio"]'),g=0;g<j.length;g++){var O=j[g];if(O!==h&&O.form===h.form){var D=om(O);if(!D)throw Error(n(90));V(O),je(O,D)}}}break;case"textarea":Be(h,j);break;case"select":g=j.value,g!=null&&ye(h,!!j.multiple,g,!1)}},_P=Ub,SP=qs;var PQ={usingClientEntryPoint:!1,Events:[Id,nc,om,bP,wP,Ub]},Kd={findFiberByHostInstance:Rs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},TQ={bundleType:Kd.bundleType,version:Kd.version,rendererPackageName:Kd.rendererPackageName,rendererConfig:Kd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(h){return h=kP(h),h===null?null:h.stateNode},findFiberByHostInstance:Kd.findFiberByHostInstance||CQ,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hm.isDisabled&&Hm.supportsFiber)try{qp=Hm.inject(TQ),ha=Hm}catch{}}return Dr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=PQ,Dr.createPortal=function(h,g){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Xb(g))throw Error(n(200));return OQ(h,g,null,j)},Dr.createRoot=function(h,g){if(!Xb(h))throw Error(n(299));var j=!1,O="",D=eR;return g!=null&&(g.unstable_strictMode===!0&&(j=!0),g.identifierPrefix!==void 0&&(O=g.identifierPrefix),g.onRecoverableError!==void 0&&(D=g.onRecoverableError)),g=Kb(h,1,!1,null,null,j,!1,O,D),h[Ha]=g.current,Pd(h.nodeType===8?h.parentNode:h),new Qb(g)},Dr.findDOMNode=function(h){if(h==null)return null;if(h.nodeType===1)return h;var g=h._reactInternals;if(g===void 0)throw typeof h.render=="function"?Error(n(188)):(h=Object.keys(h).join(","),Error(n(268,h)));return h=kP(g),h=h===null?null:h.stateNode,h},Dr.flushSync=function(h){return qs(h)},Dr.hydrate=function(h,g,j){if(!Um(g))throw Error(n(200));return zm(null,h,g,!0,j)},Dr.hydrateRoot=function(h,g,j){if(!Xb(h))throw Error(n(405));var O=j!=null&&j.hydratedSources||null,D=!1,q="",Q=eR;if(j!=null&&(j.unstable_strictMode===!0&&(D=!0),j.identifierPrefix!==void 0&&(q=j.identifierPrefix),j.onRecoverableError!==void 0&&(Q=j.onRecoverableError)),g=ZT(g,null,h,1,j??null,D,!1,q,Q),h[Ha]=g.current,Pd(h),O)for(h=0;h<O.length;h++)j=O[h],D=j._getVersion,D=D(j._source),g.mutableSourceEagerHydrationData==null?g.mutableSourceEagerHydrationData=[j,D]:g.mutableSourceEagerHydrationData.push(j,D);return new qm(g)},Dr.render=function(h,g,j){if(!Um(g))throw Error(n(200));return zm(null,h,g,!1,j)},Dr.unmountComponentAtNode=function(h){if(!Um(h))throw Error(n(40));return h._reactRootContainer?(qs(function(){zm(null,null,h,!1,function(){h._reactRootContainer=null,h[Ha]=null})}),!0):!1},Dr.unstable_batchedUpdates=Ub,Dr.unstable_renderSubtreeIntoContainer=function(h,g,j,O){if(!Um(j))throw Error(n(200));if(h==null||h._reactInternals===void 0)throw Error(n(38));return zm(h,g,j,!1,O)},Dr.version="18.3.1-next-f1338f8080-20240426",Dr}var uR;function uO(){if(uR)return tw.exports;uR=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(),tw.exports=zQ(),tw.exports}var dR;function HQ(){if(dR)return Gm;dR=1;var e=uO();return Gm.createRoot=e.createRoot,Gm.hydrateRoot=e.hydrateRoot,Gm}
40var WQ=HQ();const VQ=Mt(WQ),GQ=20,KQ=4e3,ja={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let iw=0;function YQ(){return iw=(iw+1)%Number.MAX_VALUE,iw.toString()}const aw=new Map,fR=e=>{if(aw.has(e))return;const t=setTimeout(()=>{aw.delete(e),$c({type:ja.REMOVE_TOAST,toastId:e})},KQ);aw.set(e,t)},QQ=(e,t)=>{switch(t.type){case ja.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,GQ)};case ja.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case ja.DISMISS_TOAST:{const{toastId:n}=t;return n?fR(n):e.toasts.forEach(r=>{fR(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case ja.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ig=[];let Mg={toasts:[]};function $c(e){Mg=QQ(Mg,e),Ig.forEach(t=>{t(Mg)})}function XQ({...e}){const t=YQ(),n=i=>$c({type:ja.UPDATE_TOAST,toast:{...i,id:t}}),r=()=>$c({type:ja.DISMISS_TOAST,toastId:t});return $c({type:ja.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function ui(){const[e,t]=E.useState(Mg);return E.useEffect(()=>(Ig.push(t),()=>{const n=Ig.indexOf(t);n>-1&&Ig.splice(n,1)}),[e]),{...e,toast:XQ,dismiss:n=>$c({type:ja.DISMISS_TOAST,toastId:n}),remove:n=>$c({type:ja.REMOVE_TOAST,toastId:n})}}function cB(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=cB(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function gt(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cB(e))&&(r&&(r+=" "),r+=t);return r}const hR=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,pR=gt,ap=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return pR(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const f=n==null?void 0:n[u],d=a==null?void 0:a[u];if(f===null)return null;const p=hR(f)||hR(d);return i[u][p]}),l=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...a,...l}[v]):{...a,...l}[v]===y})?[...u,d,p]:u},[]);return pR(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.475.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const ZQ=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),uB=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.475.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var JQ={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"};/** 51 * @license lucide-react v0.475.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const eX=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},c)=>E.createElement("svg",{ref:c,...JQ,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:uB("lucide",i),...l},[...o.map(([u,f])=>E.createElement(u,f)),...Array.isArray(a)?a:[a]]));/** 56 * @license lucide-react v0.475.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const Le=(e,t)=>{const n=E.forwardRef(({className:r,...i},a)=>E.createElement(eX,{ref:a,iconNode:t,className:uB(`lucide-${ZQ(e)}`,r),...i}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.475.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const tX=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
65-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],rl=Le("Activity",tX);/** 66 * @license lucide-react v0.475.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const nX=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],dB=Le("ArrowLeft",nX);/** 71 * @license lucide-react v0.475.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const rX=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],iX=Le("ArrowRightLeft",rX);/** 76 * @license lucide-react v0.475.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const aX=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],fB=Le("ArrowRight",aX);/** 81 * @license lucide-react v0.475.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const oX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]],hB=Le("Ban",oX);/** 86 * @license lucide-react v0.475.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const sX=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],wN=Le("Bot",sX);/** 91 * @license lucide-react v0.475.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const lX=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]],pB=Le("Brain",lX);/** 96 * @license lucide-react v0.475.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const cX=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],hs=Le("Building",cX);/** 101 * @license lucide-react v0.475.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const uX=[["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"}]],dX=Le("CalendarDays",uX);/** 106 * @license lucide-react v0.475.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const fX=[["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"}]],au=Le("Calendar",fX);/** 111 * @license lucide-react v0.475.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const hX=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],mB=Le("ChartColumn",hX);/** 116 * @license lucide-react v0.475.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const pX=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],mX=Le("ChartNoAxesColumn",pX);/** 121 * @license lucide-react v0.475.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const gX=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Hr=Le("Check",gX);/** 126 * @license lucide-react v0.475.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const vX=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Or=Le("ChevronDown",vX);/** 131 * @license lucide-react v0.475.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const yX=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],gB=Le("ChevronLeft",yX);/** 136 * @license lucide-react v0.475.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const xX=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],op=Le("ChevronRight",xX);/** 141 * @license lucide-react v0.475.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const bX=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Py=Le("ChevronUp",bX);/** 146 * @license lucide-react v0.475.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const wX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],sp=Le("CircleAlert",wX);/** 151 * @license lucide-react v0.475.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const _X=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}]],SX=Le("CircleArrowRight",_X);/** 156 * @license lucide-react v0.475.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const jX=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],vB=Le("CircleCheckBig",jX);/** 161 * @license lucide-react v0.475.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const NX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],oa=Le("CircleCheck",NX);/** 166 * @license lucide-react v0.475.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const EX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],kX=Le("CircleX",EX);/** 171 * @license lucide-react v0.475.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const OX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],CX=Le("Circle",OX);/** 176 * @license lucide-react v0.475.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree.
180 */const AX=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],Rf=Le("ClipboardList",AX);/** 181 * @license lucide-react v0.475.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const PX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]],TX=Le("Clock3",PX);/** 186 * @license lucide-react v0.475.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const RX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Ty=Le("Clock",RX);/** 191 * @license lucide-react v0.475.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const IX=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],lp=Le("Copy",IX);/** 196 * @license lucide-react v0.475.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const MX=[["polyline",{points:"9 14 4 9 9 4",key:"881910"}],["path",{d:"M20 20v-7a4 4 0 0 0-4-4H4",key:"1nkjon"}]],DX=Le("CornerUpLeft",MX);/** 201 * @license lucide-react v0.475.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const LX=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],Fu=Le("Download",LX);/** 206 * @license lucide-react v0.475.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const $X=[["path",{d:"m15 15 6 6",key:"1s409w"}],["path",{d:"m15 9 6-6",key:"ko1vev"}],["path",{d:"M21 16.2V21h-4.8",key:"1hrera"}],["path",{d:"M21 7.8V3h-4.8",key:"ul1q53"}],["path",{d:"M3 16.2V21h4.8",key:"1x04uo"}],["path",{d:"m3 21 6-6",key:"wwnumi"}],["path",{d:"M3 7.8V3h4.8",key:"1ijppm"}],["path",{d:"M9 9 3 3",key:"v551iv"}]],FX=Le("Expand",$X);/** 211 * @license lucide-react v0.475.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const BX=[["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"}]],yB=Le("ExternalLink",BX);/** 216 * @license lucide-react v0.475.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const qX=[["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"}]],Qd=Le("EyeOff",qX);/** 221 * @license lucide-react v0.475.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const UX=[["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"}]],xB=Le("Eye",UX);/** 226 * @license lucide-react v0.475.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const zX=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Oa=Le("FileText",zX);/** 231 * @license lucide-react v0.475.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const HX=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],WX=Le("Filter",HX);/** 236 * @license lucide-react v0.475.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const VX=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],_N=Le("FlaskConical",VX);/** 241 * @license lucide-react v0.475.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const GX=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],mR=Le("FolderKanban",GX);/** 246 * @license lucide-react v0.475.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const KX=[["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"}]],dO=Le("Globe",KX);/** 251 * @license lucide-react v0.475.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const YX=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Km=Le("GripVertical",YX);/** 256 * @license lucide-react v0.475.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const QX=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}],["path",{d:"M3.22 12H9.5l.5-1 2 4.5 2-7 1.5 3.5h5.27",key:"1uw2ng"}]],XX=Le("HeartPulse",QX);/** 261 * @license lucide-react v0.475.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const ZX=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],fO=Le("Inbox",ZX);/** 266 * @license lucide-react v0.475.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const JX=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bB=Le("Info",JX);/** 271 * @license lucide-react v0.475.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const eZ=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],gR=Le("Layers",eZ);/** 276 * @license lucide-react v0.475.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const tZ=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],nZ=Le("LayoutDashboard",tZ);/** 281 * @license lucide-react v0.475.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const rZ=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],Yf=Le("LayoutTemplate",rZ);/** 286 * @license lucide-react v0.475.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const iZ=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],wB=Le("Link",iZ);/** 291 * @license lucide-react v0.475.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const aZ=[["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"}]],oZ=Le("List",aZ);/** 296 * @license lucide-react v0.475.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const sZ=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qt=Le("LoaderCircle",sZ);/** 301 * @license lucide-react v0.475.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const lZ=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cZ=Le("Lock",lZ);/** 306 * @license lucide-react v0.475.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const uZ=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],SN=Le("LogOut",uZ);/** 311 * @license lucide-react v0.475.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const dZ=[["path",{d:"M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z",key:"1jhwl8"}],["path",{d:"m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10",key:"1qfld7"}]],fZ=Le("MailOpen",dZ);/** 316 * @license lucide-react v0.475.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const hZ=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],hn=Le("Mail",hZ);/** 321 * @license lucide-react v0.475.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const pZ=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],Li=Le("MapPin",pZ);/** 326 * @license lucide-react v0.475.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const mZ=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],hO=Le("Menu",mZ);/** 331 * @license lucide-react v0.475.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const gZ=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],pO=Le("MessageCircle",gZ);/** 336 * @license lucide-react v0.475.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const vZ=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.
340074z",key:"s0h3yz"}]],mO=Le("MousePointerClick",vZ);/** 341 * @license lucide-react v0.475.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const yZ=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],If=Le("OctagonX",yZ);/** 346 * @license lucide-react v0.475.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const xZ=[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]],bZ=Le("Pause",xZ);/** 351 * @license lucide-react v0.475.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const wZ=[["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"}]],_Z=Le("PenLine",wZ);/** 356 * @license lucide-react v0.475.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const SZ=[["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"}]],gO=Le("Pencil",SZ);/** 361 * @license lucide-react v0.475.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const jZ=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],Ai=Le("Phone",jZ);/** 366 * @license lucide-react v0.475.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const NZ=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],EZ=Le("Play",NZ);/** 371 * @license lucide-react v0.475.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const kZ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ir=Le("Plus",kZ);/** 376 * @license lucide-react v0.475.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const OZ=[["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"}]],CZ=Le("RefreshCw",OZ);/** 381 * @license lucide-react v0.475.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const AZ=[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]],PZ=Le("Reply",AZ);/** 386 * @license lucide-react v0.475.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const TZ=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],RZ=Le("RotateCcw",TZ);/** 391 * @license lucide-react v0.475.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const IZ=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}
395]],tv=Le("Save",IZ);/** 396 * @license lucide-react v0.475.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const MZ=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],DZ=Le("Search",MZ);/** 401 * @license lucide-react v0.475.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const LZ=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Qf=Le("Send",LZ);/** 406 * @license lucide-react v0.475.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const $Z=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ou=Le("Settings",$Z);/** 411 * @license lucide-react v0.475.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const FZ=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],BZ=Le("ShieldAlert",FZ);/** 416 * @license lucide-react v0.475.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const qZ=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],UZ=Le("ShieldCheck",qZ);/** 421 * @license lucide-react v0.475.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const zZ=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],_B=Le("Shield",zZ);/** 426 * @license lucide-react v0.475.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const HZ=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],vO=Le("Sparkles",HZ);/** 431 * @license lucide-react v0.475.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const WZ=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Xs=Le("SquarePen",WZ);/** 436 * @license lucide-react v0.475.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const VZ=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],vR=Le("Star",VZ);/** 441 * @license lucide-react v0.475.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const GZ=[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]],Ry=Le("Stethoscope",GZ);/** 446 * @license lucide-react v0.475.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const KZ=[["path",{d:"M16 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V8Z",key:"qazsjp"}],["path",{d:"M15 3v4a2 2 0 0 0 2 2h4",key:"40519r"}]],Xf=Le("StickyNote",KZ);/** 451 * @license lucide-react v0.475.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const YZ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Mf=Le("Target",YZ);/** 456 * @license lucide-react v0.475.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const QZ=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
460],["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"}]],Na=Le("Trash2",QZ);/** 461 * @license lucide-react v0.475.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const XZ=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],jN=Le("TrendingUp",XZ);/** 466 * @license lucide-react v0.475.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const ZZ=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Dg=Le("TriangleAlert",ZZ);/** 471 * @license lucide-react v0.475.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const JZ=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],eJ=Le("Trophy",JZ);/** 476 * @license lucide-react v0.475.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const tJ=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],SB=Le("Unplug",tJ);/** 481 * @license lucide-react v0.475.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const nJ=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Bu=Le("Upload",nJ);/** 486 * @license lucide-react v0.475.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const rJ=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]],Iy=Le("UserCheck",rJ);/** 491 * @license lucide-react v0.475.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree. 495 */const iJ=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],jB=Le("UserPlus",iJ);/** 496 * @license lucide-react v0.475.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const aJ=[["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"}]],su=Le("User",aJ);/** 501 * @license lucide-react v0.475.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const oJ=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],qu=Le("Users",oJ);/** 506 * @license lucide-react v0.475.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const sJ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}
vendor: 4,216 bytes, lines 510-520
510],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Cr=Le("X",sJ);/** 511 * @license lucide-react v0.475.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const lJ=[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],NB=Le("ZapOff",lJ);/** 516 * @license lucide-react v0.475.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const cJ=[["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"}]],nv=Le("Zap",cJ),yO="-",uJ=e=>{const t=fJ(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(yO);return l[0]===""&&l.length!==1&&l.shift(),EB(l,t)||dJ(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},EB=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?EB(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(yO);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},yR=/^\[(.+)\]$/,dJ=e=>{if(yR.test(e)){const t=yR.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},fJ=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const i in n)NN(n[i],r,i,t);return r},NN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:xR(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(hJ(i)){NN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{NN(o,xR(t,a),n,r)})})},xR=(e,t)=>{let n=e;return t.split(yO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},hJ=e=>e.isThemeGetter,pJ=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},EN="!",kN=":",mJ=kN.length,gJ=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const a=[];let o=0,l=0,c=0,u;for(let b=0;b<i.length;b++){let v=i[b];if(o===0&&l===0){if(v===kN){a.push(i.slice(c,b)),c=b+mJ;continue}if(v==="/"){u=b;continue}}v==="["?o++:v==="]"?o--:v==="("?l++:v===")"&&l--}const f=a.length===0?i:i.substring(c),d=vJ(f),p=d!==f,m=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:d,maybePostfixModifierPosition:m}};if(t){const i=t+kN,a=r;r=o=>o.startsWith(i)?a(o.substring(i.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:o,maybePostfixModifierPosition:void 0}}if(n){const i=r;r=a=>n({className:a,parseClassName:i})}return r},vJ=e=>e.endsWith(EN)?e.substring(0,e.length-1):e.startsWith(EN)?e.substring(1):e,yJ=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const i=[];let a=[];return r.forEach(o=>{o[0]==="["||t[o]?(i.push(...a.sort(),o),a=[]):a.push(o)}),i.push(...a.sort()),i}},xJ=e=>({cache:pJ(e.cacheSize),parseClassName:gJ(e),sortModifiers:yJ(e),...uJ(e)}),bJ=/\s+/,wJ=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],l=e.trim().split(bJ);let c="";for(let u=l.length-1;u>=0;u-=1){const f=l[u],{isExternal:d,modifiers:p,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:v}=n(f);if(d){c=f+(c.length>0?" "+c:c);continue}let y=!!v,x=r(y?b.substring(0,v):b);if(!x){if(!y){c=f+(c.length>0?" "+c:c);continue}if(x=r(b),!x){c=f+(c.length>0?" "+c:c);continue}y=!1}const _=a(p).join(":"),S=m?_+EN:_,w=S+x;if(o.includes(w))continue;o.push(w);const N=i(x,y);for(let k=0;k<N.length;++k){const C=N[k];o.push(S+C)}c=f+(c.length>0?" "+c:c)}return c};
vendor: 4,219 bytes, line 520
520function _J(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=kB(t))&&(r&&(r+=" "),r+=n);return r}const kB=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=kB(e[r]))&&(n&&(n+=" "),n+=t);return n};function SJ(e,...t){let n,r,i,a=o;function o(c){const u=t.reduce((f,d)=>d(f),e());return n=xJ(u),r=n.cache.get,i=n.cache.set,a=l,l(c)}function l(c){const u=r(c);if(u)return u;const f=wJ(c,n);return i(c,f),f}return function(){return a(_J.apply(null,arguments))}}const Dn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},OB=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,CB=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jJ=/^\d+\/\d+$/,NJ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EJ=/\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$/,kJ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OJ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,CJ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vc=e=>jJ.test(e),xt=e=>!!e&&!Number.isNaN(Number(e)),qo=e=>!!e&&Number.isInteger(Number(e)),ow=e=>e.endsWith("%")&&xt(e.slice(0,-1)),Za=e=>NJ.test(e),AJ=()=>!0,PJ=e=>EJ.test(e)&&!kJ.test(e),AB=()=>!1,TJ=e=>OJ.test(e),RJ=e=>CJ.test(e),IJ=e=>!Xe(e)&&!Ze(e),MJ=e=>Uu(e,RB,AB),Xe=e=>OB.test(e),Ws=e=>Uu(e,IB,PJ),sw=e=>Uu(e,BJ,xt),bR=e=>Uu(e,PB,AB),DJ=e=>Uu(e,TB,RJ),Ym=e=>Uu(e,MB,TJ),Ze=e=>CB.test(e),Xd=e=>zu(e,IB),LJ=e=>zu(e,qJ),wR=e=>zu(e,PB),$J=e=>zu(e,RB),FJ=e=>zu(e,TB),Qm=e=>zu(e,MB,!0),Uu=(e,t,n)=>{const r=OB.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},zu=(e,t,n=!1)=>{const r=CB.exec(e);return r?r[1]?t(r[1]):n:!1},PB=e=>e==="position"||e==="percentage",TB=e=>e==="image"||e==="url",RB=e=>e==="length"||e==="size"||e==="bg-size",IB=e=>e==="length",BJ=e=>e==="number",qJ=e=>e==="family-name",MB=e=>e==="shadow",UJ=()=>{const e=Dn("color"),t=Dn("font"),n=Dn("text"),r=Dn("font-weight"),i=Dn("tracking"),a=Dn("leading"),o=Dn("breakpoint"),l=Dn("container"),c=Dn("spacing"),u=Dn("radius"),f=Dn("shadow"),d=Dn("inset-shadow"),p=Dn("text-shadow"),m=Dn("drop-shadow"),b=Dn("blur"),v=Dn("perspective"),y=Dn("aspect"),x=Dn("ease"),_=Dn("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],N=()=>[...w(),Ze,Xe],k=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto","contain","none"],P=()=>[Ze,Xe,c],L=()=>[vc,"full","auto",...P()],T=()=>[qo,"none","subgrid",Ze,Xe],A=()=>["auto",{span:["full",qo,Ze,Xe]},qo,Ze,Xe],R=()=>[qo,"auto",Ze,Xe],I=()=>["auto","min","max","fr",Ze,Xe],M=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...P()],G=()=>[vc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],H=()=>[e,Ze,Xe],K=()=>[...w(),wR,bR,{position:[Ze,Xe]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",$J,MJ,{size:[Ze,Xe]}],z=()=>[ow,Xd,Ws],U=()=>["","none","full",u,Ze,Xe],ee=()=>["",xt,Xd,Ws],re=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>[xt,ow,wR,bR],ie=()=>["","none",b,Ze,Xe],Y=()=>["none",xt,Ze,Xe],J=()=>["none",xt,Ze,Xe],se=()=>[xt,Ze,Xe],V=()=>[vc,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Za],breakpoint:[Za],color:[AJ],container:[Za],"drop-shadow":[Za],ease:["in","out","in-out"],font:[IJ],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Za],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Za],shadow:[Za],spacing:["px",xt],text:[Za],"text-shadow":[Za],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vc,Xe,Ze,y]}
vendor: 4,428 bytes, line 520
520],container:["container"],columns:[{columns:[xt,Xe,Ze,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:N()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[qo,"auto",Ze,Xe]}],basis:[{basis:[vc,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[xt,vc,"auto","initial","none",Xe]}],grow:[{grow:["",xt,Ze,Xe]}],shrink:[{shrink:["",xt,Ze,Xe]}],order:[{order:[qo,"first","last","none",Ze,Xe]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:A()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:A()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":I()}],"auto-rows":[{"auto-rows":I()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...M(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...M()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":M()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[l,"screen",...G()]}],"min-w":[{"min-w":[l,"screen","none",...G()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",n,Xd,Ws]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Ze,sw]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ow,Xe]}],"font-family":[{font:[LJ,Xe,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,Ze,Xe]}],"line-clamp":[{"line-clamp":[xt,"none",Ze,sw]}],leading:[{leading:[a,...P()]}],"list-image":[{"list-image":["none",Ze,Xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ze,Xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:H()}],"text-color":[{text:H()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"w
520avy"]}],"text-decoration-thickness":[{decoration:[xt,"from-font","auto",Ze,Ws]}],"text-decoration-color":[{decoration:H()}],"underline-offset":[{"underline-offset":[xt,"auto",Ze,Xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ze,Xe]}],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",Ze,Xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:K()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},qo,Ze,Xe],radial:["",Ze,Xe],conic:[qo,Ze,Xe]},FJ,DJ]}],"bg-color":[{bg:H()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:H()}],"gradient-via":[{via:H()}],"gradient-to":[{to:H()}],rounded:[{rounded:U()}],"rounded-s":[{"rounded-s":U()}],"rounded-e":[{"rounded-e":U()}],"rounded-t":[{"rounded-t":U()}],"rounded-r":[{"rounded-r":U()}],"rounded-b":[{"rounded-b":U()}],"rounded-l":[{"rounded-l":U()}],"rounded-ss":[{"rounded-ss":U()}],"rounded-se":[{"rounded-se":U()}],"rounded-ee":[{"rounded-ee":U()}],"rounded-es":[{"rounded-es":U()}],"rounded-tl":[{"rounded-tl":U()}],"rounded-tr":[{"rounded-tr":U()}],"rounded-br":[{"rounded-br":U()}],"rounded-bl":[{"rounded-bl":U()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:H()}],"border-color-x":[{"border-x":H()}],"border-color-y":[{"border-y":H()}],"border-color-s":[{"border-s":H()}],"border-color-e":[{"border-e":H()}],"border-color-t":[{"border-t":H()}],"border-color-r":[{"border-r":H()}],"border-color-b":[{"border-b":H()}],"border-color-l":[{"border-l":H()}],"divide-color":[{divide:H()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[xt,Ze,Xe]}],"outline-w":[{outline:["",xt,Xd,Ws]}],"outline-color":[{outline:H()}],shadow:[{shadow:["","none",f,Qm,Ym]}],"shadow-color":[{shadow:H()}],"inset-shadow":[{"inset-shadow":["none",d,Qm,Ym]}],"inset-shadow-color":[{"inset-shadow":H()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:H()}],"ring-offset-w":[{"ring-offset":[xt,Ws]}],"ring-offset-color":[{"ring-offset":H()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":H()}],"text-shadow":[{"text-shadow":["none",p,Qm,Ym]}],"text-shadow-color":[{"text-shadow":H()}],opacity:[{opacity:[xt,Ze,Xe]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[xt]}],"mask-image-linear-from-pos":[{"mask-linear-from":Z()}],"mask-image-linear-to-pos":[{"mask-linear-to":Z()}],"mask-image-linear-from-color":[{"mask-linear-from":H()}],"mask-image-linear-to-color":[{"mask-linear-to":H()}],"mask-image-t-from-pos":[{"mask-t-from":Z()}],"mask-image-t-to-pos":[{"mask-t-to":Z()}],"mask-image-t-from-color":[{"mask-t-from":H()}],"mask-image-t-to-color":[{"mask-t-to":H()}],"mask-image-r-from-pos":[{"mask-r-from":Z()}],"mask-image-r-to-pos":[{"mask-r-to":Z()}],"mask-image-r-from-color":[{"mask-r-from":H()}],"mask-image-r-to-color":[{"mask-r-to":H()}],"mask-image-b-from-pos":[{"mask-b-from":Z()}],"mask-image-b-to-pos":[{"mask-b-to":Z()}],"mask-image-b-from-color":[{"mask-b-from":H()}],"mask-image-b-to-color":[{"mask-b-to":H()}],"mask-image-l-from-pos":[{"mask-l-from":Z()}],"mask-image-l-to-pos":[{"mask-l-to":Z()}],"mask-image-l-from-color":[{"mask-l-from":H()}],"mask-image-l-to-color":[{"mask-l-to":H()}],"mask-image-x-from-pos":[{"mask-x-from":Z()}],"mask-image-x-to-pos":[{"mask-x-to":Z()}],"mask-image-x-from-color":[{"mask-x-from":H()}],"mask-image-x-to-color":[{"mask-x-to":H()}],"mask-image-y-from-pos":[{"mask-y-from":Z()}],"mask-image-y-to-pos":[{"mask-y-to":Z()}],"mask-image-y-from-color":[{"mask-y-from":H()}],"mask-image-y-to-color":[{"mask-y-to":H()}],"mask-image-radial":[{"mask-radial":[Ze,Xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":Z()}],"mask-image-radial-to-pos":[{"mask-radial-to":Z()}],"mask-image-radial-from-color":[{"mask-radial-from":H()}],"mask-image-radial-to-color":[{"mask-radial-to":H()}],"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":w()}],"mask-image-conic-pos":[{"mask-conic":[xt]}],"mask-image-conic-from-pos":[{"mask-conic-from":Z()}],"mask-image-conic-to-pos":[{"mask-conic-to":Z()}],"mask-image-conic-from-color":[{"mask-conic-from":H()}],"mask-image-conic-to-color":[{"mask-conic-to":H()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:K()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ze,Xe]}],filter:[{filter:["","none",Ze,Xe]}],blur:[{blur:ie()}],brightness:[{brightness:[xt,Ze,Xe]}],contrast:[{contrast:[xt,Ze,Xe]}],"drop-shadow":[{"drop-shadow":["","none",m,Qm,Ym]}],"drop-shadow-color":[{"drop-shadow":H()}],grayscale:[{grayscale:["",xt,Ze,Xe]}],"hue-rotate":[{"hue-rotate":[xt,Ze,Xe]}],invert:[{invert:["",xt,Ze,Xe]}],saturate:[{saturate:[xt,Ze,Xe]}],sepia:[{sepia:["",xt,Ze,Xe]}],"backdrop-filter":[{"backdrop-filter":["","none",Ze,Xe]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[xt,Ze,Xe]}],"backdrop-contrast":[{"backdrop-contrast":[xt,Ze,Xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",xt,Ze,Xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[xt,Ze,Xe]}],"backdrop-invert":[{"backdrop-invert":["",xt,Ze,Xe]}],"backdrop-opacity":[{"backdrop-opacity":[xt,Ze,Xe]}],"backdrop-saturate":[{"backdrop-saturate":[xt,Ze,Xe]}],"backdrop-sepia":[{"backdrop-sepia":["",xt,Ze,Xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ze,Xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[xt,"initial",Ze,Xe]}],ease:[{ease:["linear","initial",x,Ze,Xe]}],delay:[{delay:[xt,Ze,Xe]}],animate:[{animate:["none",_,Ze,Xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ze,Xe]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:Y()}],"rotate-x":[{"rotate-x":Y()}],"rotate-y":[{"rotate-y":Y()}],"rotate-z":[{"rotate-z":Y()}],scale:[{scale:J()}],"scale-x":[{"scale-x":J()}],"scale-y":[{"scale-y":J()}],"scale-z":[{"scale-z":J()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Ze,Xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:V()}],"translate-x":[{"translate-x":V()}],"translate-y":[{"translate-y":V()}],"translate-z":[{"translate-z":V()}],"translate-none":["translate-none"],accent:[{accent:H()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:H()}
vendor: 6,657 bytes, line 520
520],"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",Ze,Xe]}],"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":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Ze,Xe]}],fill:[{fill:["none",...H()]}],"stroke-w":[{stroke:[xt,Xd,Ws,sw]}],stroke:[{stroke:["none",...H()]}],"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"]}},zJ=SJ(UJ);function et(...e){return zJ(gt(e))}const DB=E.forwardRef(({...e},t)=>s.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));DB.displayName="ToastProvider";const LB=E.forwardRef(({...e},t)=>s.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));LB.displayName="ToastViewport";const HJ=ap("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),$B=E.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,className:et(HJ({variant:t}),e),...n}));$B.displayName="Toast";const WJ=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));WJ.displayName="ToastAction";const FB=E.forwardRef(({className:e,...t},n)=>s.jsx("button",{ref:n,className:et("absolute right-2 top-2 rounded-md p-1 text-foreground
vendor: 4,404 bytes, line 520
520/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Cr,{className:"h-4 w-4"})}));FB.displayName="ToastClose";const BB=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("text-sm font-semibold",e),...t}));BB.displayName="ToastTitle";const qB=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("text-sm opacity-90",e),...t}));qB.displayName="ToastDescription";function ON(){const{toasts:e,remove:t}=ui();return s.jsxs(DB,{children:[e.map(function({id:n,title:r,description:i,action:a,...o}){return s.jsxs($B,{...o,children:[s.jsxs("div",{className:"grid gap-1",children:[r&&s.jsx(BB,{children:r}),i&&s.jsx(qB,{children:i})]}),a,s.jsx(FB,{onClick:l=>{l.stopPropagation(),t(n)}})]},n)}),s.jsx(LB,{})]})}var cp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},VJ={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Yo,lO,ZF,GJ=(ZF=class{constructor(){lt(this,Yo,VJ);lt(this,lO,!1)}setTimeoutProvider(e){Ve(this,Yo,e)}setTimeout(e,t){return he(this,Yo).setTimeout(e,t)}clearTimeout(e){he(this,Yo).clearTimeout(e)}setInterval(e,t){return he(this,Yo).setInterval(e,t)}clearInterval(e){he(this,Yo).clearInterval(e)}},Yo=new WeakMap,lO=new WeakMap,ZF),al=new GJ;function KJ(e){setTimeout(e,0)}var Sl=typeof window>"u"||"Deno"in globalThis;function Fr(){}function YJ(e,t){return typeof e=="function"?e(t):e}function CN(e){return typeof e=="number"&&e>=0&&e!==1/0}function UB(e,t){return Math.max(e+(t||0)-Date.now(),0)}function as(e,t){return typeof e=="function"?e(t):e}function Ni(e,t){return typeof e=="function"?e(t):e}function _R(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==xO(o,t.options))return!1}else if(!Jf(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function SR(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Zf(t.options.mutationKey)!==Zf(a))return!1}else if(!Jf(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function xO(e,t){return((t==null?void 0:t.queryKeyHashFn)||Zf)(e)}function Zf(e){return JSON.stringify(e,(t,n)=>PN(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Jf(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Jf(e[n],t[n])):!1}var QJ=Object.prototype.hasOwnProperty;function zB(e,t){if(e===t)return e;const n=jR(e)&&jR(t);if(!n&&!(PN(e)&&PN(t)))return t;const i=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,l=n?new Array(o):{};let c=0;for(let u=0;u<o;u++){const f=n?u:a[u],d=e[f],p=t[f];if(d===p){l[f]=d,(n?u<i:QJ.call(e,f))&&c++;continue}if(d===null||p===null||typeof d!="object"||typeof p!="object"){l[f]=p;continue}const m=zB(d,p);l[f]=m,m===d&&c++}return i===o&&c===i?e:l}function AN(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function jR(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function PN(e){if(!NR(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!NR(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function NR(e){return Object.prototype.toString.call(e)==="[object Object]"}function XJ(e){return new Promise(t=>{al.setTimeout(t,e)})}function TN(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?zB(e,t):t}function ZJ(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function JJ(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var bO=Symbol();function HB(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>
520t.initialPromise:!e.queryFn||e.queryFn===bO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function eee(e,t){return typeof e=="function"?e(...t):!!e}var dl,Qo,Gc,JF,tee=(JF=class extends cp{constructor(){super();lt(this,dl);lt(this,Qo);lt(this,Gc);Ve(this,Gc,t=>{if(!Sl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){he(this,Qo)||this.setEventListener(he(this,Gc))}onUnsubscribe(){var t;this.hasListeners()||((t=he(this,Qo))==null||t.call(this),Ve(this,Qo,void 0))}setEventListener(t){var n;Ve(this,Gc,t),(n=he(this,Qo))==null||n.call(this),Ve(this,Qo,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){he(this,dl)!==t&&(Ve(this,dl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof he(this,dl)=="boolean"?he(this,dl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},dl=new WeakMap,Qo=new WeakMap,Gc=new WeakMap,JF),wO=new tee;function RN(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var nee=KJ;function ree(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=nee;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var nr=ree(),Kc,Xo,Yc,eB,iee=(eB=class extends cp{constructor(){super();lt(this,Kc,!0);lt(this,Xo);lt(this,Yc);Ve(this,Yc,t=>{if(!Sl&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){he(this,Xo)||this.setEventListener(he(this,Yc))}onUnsubscribe(){var t;this.hasListeners()||((t=he(this,Xo))==null||t.call(this),Ve(this,Xo,void 0))}setEventListener(t){var n;Ve(this,Yc,t),(n=he(this,Xo))==null||n.call(this),Ve(this,Xo,t(this.setOnline.bind(this)))}setOnline(t){he(this,Kc)!==t&&(Ve(this,Kc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return he(this,Kc)}},Kc=new WeakMap,Xo=new WeakMap,Yc=new WeakMap,eB),rv=new iee;function aee(e){return Math.min(1e3*2**e,3e4)}function WB(e){return(e??"online")==="online"?rv.isOnline():!0}var IN=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function VB(e){let t=!1,n=0,r;const i=RN(),a=()=>i.status!=="pending",o=v=>{var y;if(!a()){const x=new IN(v);p(x),(y=e.onCancel)==null||y.call(e,x)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>wO.isFocused()&&(e.networkMode==="always"||rv.isOnline())&&e.canRun(),f=()=>WB(e.networkMode)&&e.canRun(),d=v=>{a()||(r==null||r(),i.resolve(v))},p=v=>{a()||(r==null||r(),i.reject(v))},m=()=>new Promise(v=>{var y;r=x=>{(a()||u())&&v(x)},(y=e.onPause)==null||y.call(e)}).then(()=>{var v;r=void 0,a()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(a())return;let v;const y=n===0?e.initialPromise:void 0;try{v=y??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(d).catch(x=>{var k;if(a())return;const _=e.retry??(Sl?0:3),S=e.retryDelay??aee,w=typeof S=="function"?S(n,x):S,N=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,x);if(t||!N){p(x);return}n++,(k=e.onFail)==null||k.call(e,n,x),XJ(w).then(()=>u()?void 0:m()).then(()=>{t?p(x):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?b():m().then(b),i)}}var fl,tB,GB=(tB=class{constructor(){lt(this,fl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),CN(this.gcTime)&&Ve(this,fl,al.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Sl?1/0:300*1e3))}clearGcTimeout(){he(this,fl)&&(al.clearTimeout(he(this,fl)),Ve(this,fl,void 0))}},fl=new WeakMap,tB),hl,Qc,ji,pl,Hn,Jh,ml,ea,eo,nB,oee=(nB=class extends GB{constructor(t){super();lt(this,ea);lt(this,hl);lt(this,Qc);lt(this,ji);lt(this,pl);lt(this,Hn);lt(this,Jh);lt(this,ml);Ve(this,ml,!1),Ve(this,Jh,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ve(this,pl,t.client),Ve(this,ji,he(this,pl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ve(this,hl,ER(this.options)),this.state=t.state??he(this,hl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=he(this,Hn))==null?void 0:t.promise}setOptions(t){if(this.options={...he(this,Jh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=ER(this.options);n.data!==void 0&&(this.setData(n.data,{updatedAt:n.dataUpdatedAt,manual:!0}),Ve(this,hl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&he(this,ji).remove(this)}setData(t,n){const r=TN(this.state.data,t,this.options);return Ot(this,ea,eo).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ot(this,ea,eo).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=he(this,Hn))==null?void 0:r.promise;
520return(i=he(this,Hn))==null||i.cancel(t),n?n.then(Fr).catch(Fr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(he(this,hl))}isActive(){return this.observers.some(t=>Ni(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>as(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!UB(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=he(this,Hn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=he(this,Hn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),he(this,ji).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(he(this,Hn)&&(he(this,ml)?he(this,Hn).cancel({revert:!0}):he(this,Hn).cancelRetry()),this.scheduleGc()),he(this,ji).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,ea,eo).call(this,{type:"invalidate"})}async fetch(t,n){var c,u,f,d,p,m,b,v,y,x,_,S;if(this.state.fetchStatus!=="idle"&&((c=he(this,Hn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(he(this,Hn))return he(this,Hn).continueRetry(),he(this,Hn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(N=>N.options.queryFn);w&&this.setOptions(w.options)}const r=new AbortController,i=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(Ve(this,ml,!0),r.signal)})},a=()=>{const w=HB(this.options,n),k=(()=>{const C={client:he(this,pl),queryKey:this.queryKey,meta:this.meta};return i(C),C})();return Ve(this,ml,!1),this.options.persister?this.options.persister(w,k,this):w(k)},l=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:he(this,pl),state:this.state,fetchFn:a};return i(w),w})();(u=this.options.behavior)==null||u.onFetch(l,this),Ve(this,Qc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Ot(this,ea,eo).call(this,{type:"fetch",meta:(d=l.fetchOptions)==null?void 0:d.meta}),Ve(this,Hn,VB({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:w=>{w instanceof IN&&w.revert&&this.setState({...he(this,Qc),fetchStatus:"idle"}),r.abort()},onFail:(w,N)=>{Ot(this,ea,eo).call(this,{type:"failed",failureCount:w,error:N})},onPause:()=>{Ot(this,ea,eo).call(this,{type:"pause"})},onContinue:()=>{Ot(this,ea,eo).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const w=await he(this,Hn).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(m=(p=he(this,ji).config).onSuccess)==null||m.call(p,w,this),(v=(b=he(this,ji).config).onSettled)==null||v.call(b,w,this.state.error,this),w}catch(w){if(w instanceof IN){if(w.silent)return he(this,Hn).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw Ot(this,ea,eo).call(this,{type:"error",error:w}),(x=(y=he(this,ji).config).onError)==null||x.call(y,w,this),(S=(_=he(this,ji).config).onSettled)==null||S.call(_,this.state.data,w,this),w}finally{this.scheduleGc()}}},hl=new WeakMap,Qc=new WeakMap,ji=new WeakMap,pl=new WeakMap,Hn=new WeakMap,Jh=new WeakMap,ml=new WeakMap,ea=new WeakSet,eo=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...KB(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ve(this,Qc,t.manual?i:void 0),i;case"error":const a=t.error;
vendor: 10,915 bytes, line 520
520return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),nr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),he(this,ji).notify({query:this,type:"updated",action:t})})},nB);function KB(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:WB(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ER(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $r,Ct,ep,_r,gl,Xc,no,Zo,tp,Zc,Jc,vl,yl,Jo,eu,Wt,jf,MN,DN,LN,$N,FN,BN,qN,YB,rB,see=(rB=class extends cp{constructor(t,n){super();lt(this,Wt);lt(this,$r);lt(this,Ct);lt(this,ep);lt(this,_r);lt(this,gl);lt(this,Xc);lt(this,no);lt(this,Zo);lt(this,tp);lt(this,Zc);lt(this,Jc);lt(this,vl);lt(this,yl);lt(this,Jo);lt(this,eu,new Set);this.options=n,Ve(this,$r,t),Ve(this,Zo,null),Ve(this,no,RN()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(he(this,Ct).addObserver(this),kR(he(this,Ct),this.options)?Ot(this,Wt,jf).call(this):this.updateResult(),Ot(this,Wt,$N).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return UN(he(this,Ct),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return UN(he(this,Ct),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,Wt,FN).call(this),Ot(this,Wt,BN).call(this),he(this,Ct).removeObserver(this)}setOptions(t){const n=this.options,r=he(this,Ct);if(this.options=he(this,$r).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ni(this.options.enabled,he(this,Ct))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ot(this,Wt,qN).call(this),he(this,Ct).setOptions(this.options),n._defaulted&&!AN(this.options,n)&&he(this,$r).getQueryCache().notify({type:"observerOptionsUpdated",query:he(this,Ct),observer:this});const i=this.hasListeners();i&&OR(he(this,Ct),r,this.options,n)&&Ot(this,Wt,jf).call(this),this.updateResult(),i&&(he(this,Ct)!==r||Ni(this.options.enabled,he(this,Ct))!==Ni(n.enabled,he(this,Ct))||as(this.options.staleTime,he(this,Ct))!==as(n.staleTime,he(this,Ct)))&&Ot(this,Wt,MN).call(this);const a=Ot(this,Wt,DN).call(this);i&&(he(this,Ct)!==r||Ni(this.options.enabled,he(this,Ct))!==Ni(n.enabled,he(this,Ct))||a!==he(this,Jo))&&Ot(this,Wt,LN).call(this,a)}getOptimisticResult(t){const n=he(this,$r).getQueryCache().build(he(this,$r),t),r=this.createResult(n,t);return cee(this,r)&&(Ve(this,_r,r),Ve(this,Xc,this.options),Ve(this,gl,he(this,Ct).state)),r}getCurrentResult(){return he(this,_r)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&!this.options.experimental_prefetchInRender&&he(this,no).status==="pending"&&he(this,no).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,i))})}trackProp(t){he(this,eu).add(t)}getCurrentQuery(){return he(this,Ct)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=he(this,$r).defaultQueryOptions(t),r=he(this,$r).getQueryCache().build(he(this,$r),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ot(this,Wt,jf).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),he(this,_r)))}createResult(t,n){var L;const r=he(this,Ct),i=this.options,a=he(this,_r),o=he(this,gl),l=he(this,Xc),u=t!==r?t.state:he(this,ep),{state:f}=t;let d={...f},p=!1,m;if(n._optimisticResults){const T=this.hasListeners(),A=!T&&kR(t,n),R=T&&OR(t,r,n,i);(A||R)&&(d={...d,...KB(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:y}=d;m=d.data;let x=!1;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let T;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(T=a.data,x=!0):T=typeof n.placeholderData=="function"?n.placeholderData((L=he(this,Jc))==null?void 0:L.state.data,he(this,Jc)):n.placeholderData,T!==void 0&&(y="success",m=TN(a==null?void 0:a.data,T,n),p=!0)}if(n.select&&m!==void 0&&!x)if(a&&m===(o==null?void 0:o.data)&&n.select===he(this,tp))m=he(this,Zc);else try{Ve(this,tp,n.select),m=n.select(m),m=TN(a==null?void 0:a.data,m,n),Ve(this,Zc,m),Ve(this,Zo,null)}catch(T){Ve(this,Zo,T)}he(this,Zo)&&(b=he(this,Zo),m=he(this,Zc),v=Date.now(),y="error");const _=d.fetchStatus==="fetching",S=y==="pending",w=y==="error",N=S&&_,k=m!==void 0,P={status:y,fetchStatus:d.fetchStatus,isPending:S,isSuccess:y==="success",isError:w,isInitialLoading:N,isLoading:N,data:m,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:_,isRefetching:_&&!S,isLoadingError:w&&!k,isPaused:d.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:w&&k,isStale:_O(t,n),refetch:this.refetch,promise:he(this,no),isEnabled:Ni(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const T=I=>{P.status==="error"?I.reject(P.error):P.data!==void 0&&I.resolve(P.data)},A=()=>{const I=Ve(this,no,P.promise=RN());T(I)},R=he(this,no);switch(R.status){case"pending":t.queryHash===r.queryHash&&T(R);break;case"fulfilled":(P.status==="error"||P.data!==R.value)&&A();break;case"rejected":(P.status!=="error"||P.error!==R.reason)&&A();break}}return P}updateResult(){const t=he(this,_r),n=this.createResult(he(this,Ct),this.options);if(Ve(this,gl,he(this,Ct).state),Ve(this,Xc,this.options),he(this,gl).data!==void 0&&Ve(this,Jc,he(this,Ct)),AN(n,t))return;Ve(this,_r,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!he(this,eu).size)return!0;const o=new Set(a??he(this,eu));return this.options.throwOnError&&o.add("error"),Object.keys(he(this,_r)).some(l=>{const c=l;return he(this,_r)[c]!==t[c]&&o.has(c)})};Ot(this,Wt,YB).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,Wt,$N).call(this)}},$r=new WeakMap,Ct=new WeakMap,ep=new WeakMap,_r=new WeakMap,gl=new WeakMap,Xc=new WeakMap,no=new WeakMap,Zo=new WeakMap,tp=new WeakMap,Zc=new WeakMap,Jc=new WeakMap,vl=new WeakMap,yl=new WeakMap,Jo=new WeakMap,eu=new WeakMap,Wt=new WeakSet,jf=function(t){Ot(this,Wt,qN).call(this);let n=he(this,Ct).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Fr)),n},MN=function(){Ot(this,Wt,FN).call(this);const t=as(this.options.staleTime,he(this,Ct));if(Sl||he(this,_r).isStale||!CN(t))return;const r=UB(he(this,_r).dataUpdatedAt,t)+1;Ve(this,vl,al.setTimeout(()=>{he(this,_r).isStale||this.updateResult()},r))},DN=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(he(this,Ct)):this.options.refetchInterval)??!1},LN=function(t){Ot(this,Wt,BN).call(this),Ve(this,Jo,t),!(Sl||Ni(this.options.enabled,he(this,Ct))===!1||!CN(he(this,Jo))||he(this,Jo)===0)&&Ve(this,yl,al.setInterval(()=>{(this.options.refetchIntervalInBackground||wO.isFocused())&&Ot(this,Wt,jf).call(this)},he(this,Jo)))},$N=function(){Ot(this,Wt,MN).call(this),Ot(this,Wt,LN).call(this,Ot(this,Wt,DN).call(this))},FN=function(){he(this,vl)&&(al.clearTimeout(he(this,vl)),Ve(this,vl,void 0))},BN=function(){he(this,yl)&&(al.clearInterval(he(this,yl)),Ve(this,yl,void 0))},qN=function(){const t=he(this,$r).getQueryCache().build(he(this,$r),this.options);if(t===he(this,Ct))return;const n=he(this,Ct);Ve(this,Ct,t),Ve(this,ep,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},YB=function(t){nr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(he(this,_r))}),he(this,$r).getQueryCache().notify({query:he(this,Ct),type:"observerResultsUpdated"})})},rB);function lee(e,t){return Ni(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function kR(e,t){return lee(e,t)||e.state.data!==void 0&&UN(e,t,t.refetchOnMount)}function UN(e,t,n){if(Ni(t.enabled,e)!==!1&&as(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&_O(e,t)}return!1}function OR(e,t,n,r){return(e!==t||Ni(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&_O(e,n)}function _O(e,t){return Ni(t.enabled,e)!==!1&&e.isStaleByTime(as(t.staleTime,e))}function cee(e,t){return!AN(e.getCurrentResult(),t)}function CR(e){return{onFetch:(t,n)=>{var f,d,p,m,b;const r=t.options,i=(p=(d=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:d.fetchMore)==null?void 0:p.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let v=!1;const y=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},x=HB(t.options,t.fetchOptions),_=async(S,w,N)=>{if(v)return Promise.reject();if(w==null&&S.pages.length)return Promise.resolve(S);const C=(()=>{const A={client:t.client,queryKey:t.queryKey,pageParam:w,direction:N?"backward":"forward",meta:t.options.meta};return y(A),A})(),P=await x(C),{maxPages:L}=t.options,T=N?JJ:ZJ;return{pages:T(S.pages,P,L),pageParams:T(S.pageParams,w,L)}};if(i&&a.length){const S=i==="backward",w=S?uee:AR,N={pages:a,pageParams:o},k=w(r,N);l=await _(N,k,S)}else{const S=e??a.length;do{const w=c===0?o[0]??r.initialPageParam:AR(r,l);if(c>0&&w==null)break;l=await _(l,w),c++}while(c<S)}return l};t.options.persister?t.fetchFn=()=>{var v,y;return(y=(v=t.options).persister)==null?void 0:y.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function AR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function uee(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var np,xa,Sr,xl,ba,Ho,iB,dee=(iB=class extends GB{constructor(t){super();lt(this,ba);lt(this,np);lt(this,xa);lt(this,Sr);lt(this,xl);Ve(this,np,t.client),this.mutationId=t.mutationId,Ve(this,Sr,t.mutationCache),Ve(this,xa,[]),this.state=t.state||fee(
520),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){he(this,xa).includes(t)||(he(this,xa).push(t),this.clearGcTimeout(),he(this,Sr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ve(this,xa,he(this,xa).filter(n=>n!==t)),this.scheduleGc(),he(this,Sr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){he(this,xa).length||(this.state.status==="pending"?this.scheduleGc():he(this,Sr).remove(this))}continue(){var t;return((t=he(this,xl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,u,f,d,p,m,b,v,y,x,_,S,w,N,k,C,P,L;const n=()=>{Ot(this,ba,Ho).call(this,{type:"continue"})},r={client:he(this,np),meta:this.options.meta,mutationKey:this.options.mutationKey};Ve(this,xl,VB({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,A)=>{Ot(this,ba,Ho).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{Ot(this,ba,Ho).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>he(this,Sr).canRun(this)}));const i=this.state.status==="pending",a=!he(this,xl).canStart();try{if(i)n();else{Ot(this,ba,Ho).call(this,{type:"pending",variables:t,isPaused:a}),await((l=(o=he(this,Sr).config).onMutate)==null?void 0:l.call(o,t,this,r));const A=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,t,r));A!==this.state.context&&Ot(this,ba,Ho).call(this,{type:"pending",context:A,variables:t,isPaused:a})}const T=await he(this,xl).start();return await((d=(f=he(this,Sr).config).onSuccess)==null?void 0:d.call(f,T,t,this.state.context,this,r)),await((m=(p=this.options).onSuccess)==null?void 0:m.call(p,T,t,this.state.context,r)),await((v=(b=he(this,Sr).config).onSettled)==null?void 0:v.call(b,T,null,this.state.variables,this.state.context,this,r)),await((x=(y=this.options).onSettled)==null?void 0:x.call(y,T,null,t,this.state.context,r)),Ot(this,ba,Ho).call(this,{type:"success",data:T}),T}catch(T){try{throw await((S=(_=he(this,Sr).config).onError)==null?void 0:S.call(_,T,t,this.state.context,this,r)),await((N=(w=this.options).onError)==null?void 0:N.call(w,T,t,this.state.context,r)),await((C=(k=he(this,Sr).config).onSettled)==null?void 0:C.call(k,void 0,T,this.state.variables,this.state.context,this,r)),await((L=(P=this.options).onSettled)==null?void 0:L.call(P,void 0,T,t,this.state.context,r)),T}finally{Ot(this,ba,Ho).call(this,{type:"error",error:T})}}finally{he(this,Sr).runNext(this)}}},np=new WeakMap,xa=new WeakMap,Sr=new WeakMap,xl=new WeakMap,ba=new WeakSet,Ho=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),nr.batch(()=>{he(this,xa).forEach(r=>{r.onMutationUpdate(t)}),he(this,Sr).notify({mutation:this,type:"updated",action:t})})},iB);function fee(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ro,ta,rp,aB,hee=(aB=class extends cp{constructor(t={}){super();lt(this,ro);lt(this,ta);lt(this,rp);this.config=t,Ve(this,ro,new Set),Ve(this,ta,new Map),Ve(this,rp,0)}build(t,n,r){const i=new dee({client:t,mutationCache:this,mutationId:++Wm(this,rp)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){he(this,ro).add(t);const n=Xm(t);if(typeof n=="string"){const r=he(this,ta).get(n);r?r.push(t):he(this,ta).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(he(this,ro).delete(t)){const n=Xm(t);if(typeof n=="string"){const r=he(this,ta).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&he(this,ta).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Xm(t);if(typeof n=="string"){const r=he(this,ta).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Xm(t);if(typeof n=="string"){const i=(r=he(this,ta).get(n))==null?void 0:r.find(a=>
vendor: 4,765 bytes, line 520
520a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){nr.batch(()=>{he(this,ro).forEach(t=>{this.notify({type:"removed",mutation:t})}),he(this,ro).clear(),he(this,ta).clear()})}getAll(){return Array.from(he(this,ro))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>SR(n,r))}findAll(t={}){return this.getAll().filter(n=>SR(t,n))}notify(t){nr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return nr.batch(()=>Promise.all(t.map(n=>n.continue().catch(Fr))))}},ro=new WeakMap,ta=new WeakMap,rp=new WeakMap,aB);function Xm(e){var t;return(t=e.options.scope)==null?void 0:t.id}var wa,oB,pee=(oB=class extends cp{constructor(t={}){super();lt(this,wa);this.config=t,Ve(this,wa,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??xO(i,n);let o=this.get(a);return o||(o=new oee({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){he(this,wa).has(t.queryHash)||(he(this,wa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=he(this,wa).get(t.queryHash);n&&(t.destroy(),n===t&&he(this,wa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){nr.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return he(this,wa).get(t)}getAll(){return[...he(this,wa).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>_R(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>_R(t,r)):n}notify(t){nr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){nr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){nr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},wa=new WeakMap,oB),xn,es,ts,tu,nu,ns,ru,iu,sB,mee=(sB=class{constructor(e={}){lt(this,xn);lt(this,es);lt(this,ts);lt(this,tu);lt(this,nu);lt(this,ns);lt(this,ru);lt(this,iu);Ve(this,xn,e.queryCache||new pee),Ve(this,es,e.mutationCache||new hee),Ve(this,ts,e.defaultOptions||{}),Ve(this,tu,new Map),Ve(this,nu,new Map),Ve(this,ns,0)}mount(){Wm(this,ns)._++,he(this,ns)===1&&(Ve(this,ru,wO.subscribe(async e=>{e&&(await this.resumePausedMutations(),he(this,xn).onFocus())})),Ve(this,iu,rv.subscribe(async e=>{e&&(await this.resumePausedMutations(),he(this,xn).onOnline())})))}unmount(){var e,t;Wm(this,ns)._--,he(this,ns)===0&&((e=he(this,ru))==null||e.call(this),Ve(this,ru,void 0),(t=he(this,iu))==null||t.call(this),Ve(this,iu,void 0))}isFetching(e){return he(this,xn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return he(this,es).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=he(this,xn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=he(this,xn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(as(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return he(this,xn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=he(this,xn).get(r.queryHash),a=i==null?void 0:i.state.data,o=YJ(t,a);if(o!==void 0)return he(this,xn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return nr.batch(()=>he(this,xn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=he(this,xn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=he(this,xn);nr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=he(this,xn);return nr.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=nr.batch(()=>he(this,xn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Fr).catch(Fr)}invalidateQueries(e,t={}){return nr.batch(()=>(he(this,xn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=nr.batch(()=>he(this,xn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Fr)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Fr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=he(this,xn).build(this,t);return n.isStaleByTime(as(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}
520prefetchQuery(e){return this.fetchQuery(e).then(Fr).catch(Fr)}fetchInfiniteQuery(e){return e.behavior=CR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Fr).catch(Fr)}ensureInfiniteQueryData(e){return e.behavior=CR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return rv.isOnline()?he(this,es).resumePausedMutations():Promise.resolve()}getQueryCache(){return he(this,xn)}getMutationCache(){return he(this,es)}getDefaultOptions(){return he(this,ts)}setDefaultOptions(e){Ve(this,ts,e)}setQueryDefaults(e,t){he(this,tu).set(Zf(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...he(this,tu).values()],n={};return t.forEach(r=>{Jf(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){he(this,nu).set(Zf(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...he(this,nu).values()],n={};return t.forEach(r=>{Jf(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...he(this,ts).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===bO&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...he(this,ts).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){he(this,xn).clear(),he(this,es).clear()}},xn=new WeakMap,es=new WeakMap,ts=new WeakMap,tu=new WeakMap,nu=new WeakMap,ns=new WeakMap,ru=new WeakMap,iu=new WeakMap,sB),QB=E.createContext(void 0),gee=e=>{const t=E.useContext(QB);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vee=({client:e,children:t})=>(E.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(QB.Provider,{value:e,children:t})),XB=E.createContext(!1),yee=()=>E.useContext(XB);XB.Provider;function xee(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bee=E.createContext(xee()),wee=()=>E.useContext(bee),_ee=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},See=e=>{E.useEffect(()=>{e.clearReset()},[e])},jee=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||eee(n,[e.error,r])),Nee=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Eee=(e,t)=>e.isLoading&&e.isFetching&&!t,kee=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,PR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Oee(e,t,n){var d,p,m,b,v;const r=yee(),i=wee(),a=gee(),o=a.defaultQueryOptions(e);(p=(d=a.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||p.call(d,o),o._optimisticResults=r?"isRestoring":"optimistic",Nee(o),_ee(o,i),See(i);const l=!a.getQueryCache().get(o.queryHash),[c]=E.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),f=!r&&e.subscribed!==!1;if(E.useSyncExternalStore(E.useCallback(y=>{const x=f?c.subscribe(nr.batchCalls(y)):Fr;return c.updateResult(),x},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),E.useEffect(()=>{c.setOptions(o)},[o,c]),kee(o,u))throw PR(o,c,i);if(jee({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((b=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||b.call(m,o,u),o.experimental_prefetchInRender&&!Sl&&Eee(u,r)){const y=l?PR(o,c,i):(v=a.getQueryCache().get(o.queryHash))==null?void 0:v.promise;y==null||y.catch(Fr).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function Cee(e,t){return Oee(e,see)}const Aee=new mee({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Ll=uO();const ZB=Mt(Ll);/** 521 * @remix-run/router v1.23.0 522 * 523 * Copyright (c) Remix Software Inc. 524 * 525 * This source code is licensed under the MIT license found in the 526 * LICENSE.md file in the root directory of this source tree. 527 * 528 * @license MIT 529 */function eh(){return eh=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},eh.apply(this,arguments)}
vendor: 4,841 bytes, line 529
529var rs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(rs||(rs={}));const TR="popstate";function Pee(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:o,hash:l}=r.location;return zN("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:iv(i)}return Ree(t,n,null,e)}function Tn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function JB(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Tee(){return Math.random().toString(36).substr(2,8)}function RR(e,t){return{usr:e.state,key:e.key,idx:t}}function zN(e,t,n,r){return n===void 0&&(n=null),eh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Hu(t):t,{state:n,key:t&&t.key||r||Tee()})}function iv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Hu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Ree(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=rs.Pop,c=null,u=f();u==null&&(u=0,o.replaceState(eh({},o.state,{idx:u}),""));function f(){return(o.state||{idx:null}).idx}function d(){l=rs.Pop;let y=f(),x=y==null?null:y-u;u=y,c&&c({action:l,location:v.location,delta:x})}function p(y,x){l=rs.Push;let _=zN(v.location,y,x);u=f()+1;let S=RR(_,u),w=v.createHref(_);try{o.pushState(S,"",w)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;i.location.assign(w)}a&&c&&c({action:l,location:v.location,delta:1})}function m(y,x){l=rs.Replace;let _=zN(v.location,y,x);u=f();let S=RR(_,u),w=v.createHref(_);o.replaceState(S,"",w),a&&c&&c({action:l,location:v.location,delta:0})}function b(y){let x=i.location.origin!=="null"?i.location.origin:i.location.href,_=typeof y=="string"?y:iv(y);return _=_.replace(/ $/,"%20"),Tn(x,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,x)}let v={get action(){return l},get location(){return e(i,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(TR,d),c=y,()=>{i.removeEventListener(TR,d),c=null}},createHref(y){return t(i,y)},createURL:b,encodeLocation(y){let x=b(y);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:p,replace:m,go(y){return o.go(y)}};return v}var IR;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(IR||(IR={}));function Iee(e,t,n){return n===void 0&&(n="/"),Mee(e,t,n)}function Mee(e,t,n,r){let i=typeof t=="string"?Hu(t):t,a=SO(i.pathname||"/",n);if(a==null)return null;let o=eq(e);Dee(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=Kee(a);l=Wee(o[c],u)}return l}function eq(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(Tn(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=os([r,c.relativePath]),f=n.concat(c);a.children&&a.children.length>0&&(Tn(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),eq(a.children,t,f,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:zee(u,a.index),routesMeta:f})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of tq(a.path))i(a,o,c)}),t}function tq(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=tq(r.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function Dee(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Hee(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Lee=/^:[\w-]+$/,$ee=3,Fee=2,Bee=1,qee=10,Uee=-2,MR=e=>e==="*";function zee(e,t){let n=e.split("/"),r=n.length;return n.some(MR)&&(r+=Uee),t&&(r+=Fee),n.filter(i=>!MR(i)).reduce((i,a)=>i+(Lee.test(a)?$ee:a===""?Bee:qee),r)}function Hee(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 Wee(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,f=a==="/"?t:t.slice(a.length)||"/",d=Vee({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},f),p=c.route;if(!d)return null;
vendor: 9,325 bytes, lines 529-538
529Object.assign(i,d.params),o.push({params:i,pathname:os([a,d.pathname]),pathnameBase:Zee(os([a,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(a=os([a,d.pathnameBase]))}return o}function Vee(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Gee(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,f,d)=>{let{paramName:p,isOptional:m}=f;if(p==="*"){let v=l[d]||"";o=a.slice(0,a.length-v.length).replace(/(.)\/+$/,"$1")}const b=l[d];return m&&!b?u[p]=void 0:u[p]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function Gee(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),JB(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,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Kee(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return JB(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function SO(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 Yee(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Hu(e):e;return{pathname:n?n.startsWith("/")?n:Qee(n,t):t,search:Jee(r),hash:ete(i)}}function Qee(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 lw(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 Xee(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nq(e,t){let n=Xee(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rq(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Hu(e):(i=eh({},e),Tn(!i.pathname||!i.pathname.includes("?"),lw("?","pathname","search",i)),Tn(!i.pathname||!i.pathname.includes("#"),lw("#","pathname","hash",i)),Tn(!i.search||!i.search.includes("#"),lw("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;i.pathname=p.join("/")}l=d>=0?t[d]:"/"}let c=Yee(i,l),u=o&&o!=="/"&&o.endsWith("/"),f=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const os=e=>e.join("/").replace(/\/\/+/g,"/"),Zee=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Jee=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ete=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function tte(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const iq=["post","put","patch","delete"];new Set(iq);const nte=["get",...iq];new Set(nte);/** 530 * React Router v6.30.1 531 * 532 * Copyright (c) Remix Software Inc. 533 * 534 * This source code is licensed under the MIT license found in the 535 * LICENSE.md file in the root directory of this source tree. 536 * 537 * @license MIT 538 */function th(){return th=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},th.apply(this,arguments)}const jO=E.createContext(null),rte=E.createContext(null),$l=E.createContext(null),My=E.createContext(null),_s=E.createContext({outlet:null,matches:[],isDataRoute:!1}),aq=E.createContext(null);function ite(e,t){let{relative:n}=t===void 0?{}:t;up()||Tn(!1);let{basename:r,navigator:i}=E.useContext($l),{hash:a,pathname:o,search:l}=sq(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:os([r,o])),i.createHref({pathname:c,search:l,hash:a})}function up(){return E.useContext(My)!=null}function Ba(){return up()||Tn(!1),E.useContext(My).location}function oq(e){E.useContext($l).static||E.useLayoutEffect(e)}function mr(){let{isDataRoute:e}=E.useContext(_s);return e?yte():ate()}function ate(){up()||Tn(!1);let e=E.useContext(jO),{basename:t,future:n,navigator:r}=E.useContext($l),{matches:i}=E.useContext(_s),{pathname:a}=Ba(),o=JSON.stringify(nq(i,n.v7_relativeSplatPath)),l=E.useRef(!1);return oq(()=>{l.current=!0}),E.useCallback(function(u,f){if(f===void 0&&(f={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=rq(u,JSON.parse(o),a,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:os([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,o,a,e])}function ote(){let{matches:e}=E.useContext(_s),t=e[e.length-1];return t?t.params:{}}function sq(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=E.useContext($l),{matches:i}=E.useContext(_s),{pathname:a}=Ba(),o=JSON.stringify(nq(i,r.v7_relativeSplatPath));return E.useMemo(()=>rq(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function ste(e,t){return lte(e,t)}function lte(e,t,n,r){up()||Tn(!1);let{navigator:i}=E.useContext($l),{matches:a}=E.useContext(_s),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Ba(),f;if(t){var d;let y=typeof t=="string"?Hu(t):t;c==="/"||(d=y.pathname)!=null&&d.startsWith(c)||Tn(!1),f=y}else f=u;let p=f.pathname||"/",m=p;if(c!=="/"){let y=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let b=Iee(e,{pathname:m}),v=hte(b&&b.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:os([c,i.encodeLocation?i.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:os([c,i.encodeLocation?i.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r);return t&&v?E.createElement(My.Provider,{value:{location:th({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:rs.Pop}},v):v}function cte(){let e=vte(),t=tte(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},t),n?E.createElement("pre",{style:i},n):null,null)}const ute=E.createElement(cte,null);class dte extends E.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?E.createElement(_s.Provider,{value:this.props.routeContext},E.createElement(aq.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function fte(e){let{routeContext:t,match:n,children:r}=e,i=E.useContext(jO);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(_s.Provider,{value:t},r)}function hte(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let f=o.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);f>=0||Tn(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let d=o[f];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=f),d.route.id){let{loaderData:p,errors:m}=n,b=d.route.loader&&p[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||b){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((f,d,p)=>{let m,b=!1,v=null,y=null;n&&(m=l&&d.route.id?l[d.route.id]:void 0,v=d.route.errorElement||ute,c&&(u<0&&p===0?(xte("route-fallback"),b=!0,y=null):u===p&&(b=!0,y=d.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,p+1)),_=()=>{let S;return m?S=v:b?S=y:d.route.Component?S=E.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=f,E.createElement(fte,{match:d,routeC
vendor: 1,185 bytes, line 538
538ontext:{outlet:f,matches:x,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?E.createElement(dte,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:_(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):_()},null)}var lq=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(lq||{}),cq=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(cq||{});function pte(e){let t=E.useContext(jO);return t||Tn(!1),t}function mte(e){let t=E.useContext(rte);return t||Tn(!1),t}function gte(e){let t=E.useContext(_s);return t||Tn(!1),t}function uq(e){let t=gte(),n=t.matches[t.matches.length-1];return n.route.id||Tn(!1),n.route.id}function vte(){var e;let t=E.useContext(aq),n=mte(),r=uq();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function yte(){let{router:e}
538=pte(lq.UseNavigateStable),t=uq(cq.UseNavigateStable),n=E.useRef(!1);return oq(()=>{n.current=!0}),E.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,th({fromRouteId:t},a)))},[e,t])}const DR={};function xte(e,t,n){DR[e]||(DR[e]=!0)}function bte(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Jn(e){Tn(!1)}function wte(e){let{basename:t="/",children:n=null,location:r,navigationType:i=rs.Pop,navigator:a,static:o=!1,future:l}=e;up()&&Tn(!1);let c=t.replace(/^\/*/,"/"),u=E.useMemo(()=>({basename:c,navigator:a,static:o,future:th({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof r=="string"&&(r=Hu(r));let{pathname:f="/",search:d="",hash:p="",state:m=null,key:b="default"}=r,v=E.useMemo(()=>{let y=SO(f,c);return y==null?null:{location:{pathname:y,search:d,hash:p,state:m,key:b},navigationType:i}},[c,f,d,p,m,b,i]);return v==null?null:E.createElement($l.Provider,{value:u},E.createElement(My.Provider,{children:n,value:v}))}function _te(e){let{children:t,location:n}=e;return ste(HN(t),n)}new Promise(()=>{});function HN(e,t){t===void 0&&(t=[]);let n=[];return E.Children.forEach(e,(r,i)=>{if(!E.isValidElement(r))return;let a=[...t,i];if(r.type===E.Fragment){n.push.apply(n,HN(r.props.children,a));return}r.type!==Jn&&Tn(!1),!r.props.index||!r.props.children||Tn(!1);let o={id:r.props.id||a.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,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=HN(r.props.children,a)),n.push(o)}),n}/** 539 * React Router DOM v6.30.1 540 * 541 * Copyright (c) Remix Software Inc. 542 * 543 * This source code is licensed under the MIT license found in the 544 * LICENSE.md file in the root directory of this source tree. 545 * 546 * @license MIT 547 */function WN(){return WN=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},WN.apply(this,arguments)}function Ste(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function jte(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Nte(e,t){return e.button===0&&(!t||t==="_self")&&!jte(e)}function VN(e){return e===void 0&&(e=""),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 Ete(e,t){let n=VN(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(a=>{n.append(i,a)})}),n}const kte=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ote="6";try{window.__reactRouterVersion=Ote}catch{}const Cte="startTransition",LR=cO[Cte];function Ate(e){let{basename:t,children:n,future:r,window:i}=e,a=E.useRef();a.current==null&&(a.current=Pee({window:i,v5Compat:!0}));let o=a.current,[l,c]=E.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},f=E.useCallback(d=>{u&&LR?LR(()=>c(d)):c(d)},[c,u]);return E.useLayoutEffect(()=>o.listen(f),[o,f]),E.useEffect(()=>bte(r),[r]),E.createElement(wte,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const Pte=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tte=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qr=E.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:f,viewTransition:d}=t,p=Ste(t,kte),{basename:m}=E.useContext($l),b,v=!1;if(typeof u=="string"&&Tte.test(u)&&(b=u,Pte))try{let S=new URL(window.location.href),w=u.startsWith("//")?new URL(S.protocol+u):new URL(u),N=SO(w.pathname,m);w.origin===S.origin&&N!=null?u=N+w.search+w.hash:v=!0}catch{}let y=ite(u,{relative:i}),x=Rte(u,{replace:o,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:d});function _(S){r&&r(S),S.defaultPrevented||x(S)}return E.createElement("a",WN({},p,{href:b||y,onClick:v||a?r:_,ref:n,target:c}))});var $R;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($R||($R={}));var FR;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(FR||(FR={}));function Rte(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=mr(),u=Ba(),f=sq(e,{relative:o});return E.useCallback(d=>
547{if(Nte(d,n)){d.preventDefault();let p=r!==void 0?r:iv(u)===iv(f);c(e,{replace:p,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,f,r,i,n,e,a,o,l])}function Dy(e){let t=E.useRef(VN(e)),n=E.useRef(!1),r=Ba(),i=E.useMemo(()=>Ete(r.search,n.current?null:t.current),[r.search]),a=mr(),o=E.useCallback((l,c)=>{const u=VN(typeof l=="function"?l(i):l);n.current=!0,a("?"+u,c)},[a,i]);return[i,o]}function dq(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ite}=Object.prototype,{getPrototypeOf:ps}=Object,{iterator:dp,toStringTag:fq}=Symbol,nh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),hq=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),pq=(e,t,n)=>e===Object.prototype||!n&&t===null,Mte=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(hq(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},rh=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const i=ps(n);if(pq(n,i,n===e))return!1;if(nh(n,t))return!0;n=i}return!1},Dte=(e,t)=>e!=null&&rh(e,t)?e[t]:void 0,Lte=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=ps(e);if(t===null&&Mte(e))return e;const n=Object.create(null),r=Object.create(null),i=[];let a=e;for(;a!=null&&i.indexOf(a)===-1;){i.push(a);const o=a===e?t:ps(a);if(pq(a,o,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const c of l)hq(c)||nh(r,c)||(n[c]=e[c],r[c]=!0);a=o}return n},NO=(e=>t=>{const n=Ite.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Fi=e=>(e=e.toLowerCase(),t=>NO(t)===e),Ly=e=>t=>typeof t===e,{isArray:jl}=Array,Nl=Ly("undefined");function Wu(e){return e!==null&&!Nl(e)&&e.constructor!==null&&!Nl(e.constructor)&&Ur(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const mq=Fi("ArrayBuffer");function $te(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&mq(e.buffer),t}const Fte=Ly("string"),Ur=Ly("function"),gq=Ly("number"),Vu=e=>e!==null&&typeof e=="object",Bte=e=>e===!0||e===!1,Lg=e=>{if(!Vu(e))return!1;const t=ps(e);return(t===null||t===Object.prototype||ps(t)===null)&&!rh(e,fq)&&!rh(e,dp)},qte=e=>{if(!Vu(e)||Wu(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ute=Fi("Date"),zte=Fi("File"),Hte=e=>!!(e&&typeof e.uri<"u"),Wte=e=>e&&typeof e.getParts<"u",Vte=Fi("Blob"),Gte=Fi("FileList"),Kte=Fi("Set"),Yte=e=>Vu(e)&&Ur(e.pipe);function Qte(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const BR=Qte(),qR=typeof BR.FormData<"u"?BR.FormData:void 0,Xte=e=>{if(!e)return!1;if(qR&&e instanceof qR)return!0;const t=ps(e);if(!t||t===Object.prototype||!Ur(e.append))return!1;const n=NO(e);return n==="formdata"||n==="object"&&Ur(e.toString)&&e.toString()==="[object FormData]"},Zte=Fi("URLSearchParams"),[Jte,ene,tne,nne]=["ReadableStream","Request","Response","Headers"].map(Fi),rne=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fp(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),jl(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(Wu(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let l;for(r=0;r<o;r++)l=a[r],t.call(null,e[l],l,e)}}function vq(e,t){if(Wu(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,yq=e=>!Nl(e)&&e!==ol;function GN(...e){const{caseless:t,skipUndefined:n}=yq(this)&&this||{},r={},i=(a,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const l=t&&typeof o=="string"&&vq(r,o)||o,c=nh(r,l)?r[l]:void 0;Lg(c)&&Lg(a)?r[l]=GN(c,a):Lg(a)?r[l]=GN({}
vendor: 13,912 bytes, lines 547-549
547,a):jl(a)?r[l]=a.slice():(!n||!Nl(a))&&(r[l]=a)};for(let a=0,o=e.length;a<o;a++){const l=e[a];if(!l||Wu(l)||(fp(l,i),typeof l!="object"||jl(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let u=0;u<c.length;u++){const f=c[u];mne.call(l,f)&&i(l[f],f)}}return r}const ine=(e,t,n,{allOwnKeys:r}={})=>(fp(t,(i,a)=>{n&&Ur(i)?Object.defineProperty(e,a,{__proto__:null,value:dq(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),ane=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),one=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},sne=(e,t,n,r)=>{let i,a,o;const l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&ps(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},lne=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},cne=e=>{if(!e)return null;if(jl(e))return e;let t=e.length;if(!gq(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},une=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ps(Uint8Array)),dne=(e,t)=>{const r=(e&&e[dp]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},fne=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},hne=Fi("HTMLFormElement"),pne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),{propertyIsEnumerable:mne}=Object.prototype,gne=Fi("RegExp"),xq=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fp(n,(i,a)=>{let o;(o=t(i,a,e))!==!1&&(r[a]=o||i)}),Object.defineProperties(e,r)},vne=e=>{xq(e,(t,n)=>{if(Ur(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Ur(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yne=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return jl(e)?r(e):r(String(e).split(t)),n},xne=()=>{},bne=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function wne(e){return!!(e&&Ur(e.append)&&e[fq]==="FormData"&&e[dp])}const _ne=e=>{const t=new WeakSet,n=r=>{if(Vu(r)){if(t.has(r))return;if(Wu(r))return r;if(!("toJSON"in r)){t.add(r);let i;if(Kte(r)){i=[];for(const a of r){const o=n(a);!Nl(o)&&i.push(o)}}else i=jl(r)?[]:{},fp(r,(a,o)=>{const l=n(a);!Nl(l)&&(i[o]=l)});return t.delete(r),i}}return r};return n(e)},Sne=Fi("AsyncFunction"),jne=e=>e&&(Vu(e)||Ur(e))&&Ur(e.then)&&Ur(e.catch),bq=((e,t)=>e?setImmediate:t?((n,r)=>(ol.addEventListener("message",({source:i,data:a})=>{i===ol&&a===n&&r.length&&r.shift()()},!1),i=>{r.push(i),ol.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Ur(ol.postMessage)),Nne=typeof queueMicrotask<"u"?queueMicrotask.bind(ol):typeof process<"u"&&process.nextTick||bq,wq=e=>e!=null&&Ur(e[dp]),Ene=e=>e!=null&&rh(e,dp)&&wq(e),de={isArray:jl,isArrayBuffer:mq,isBuffer:Wu,isFormData:Xte,isArrayBufferView:$te,isString:Fte,isNumber:gq,isBoolean:Bte,isObject:Vu,isPlainObject:Lg,isEmptyObject:qte,isReadableStream:Jte,isRequest:ene,isResponse:tne,isHeaders:nne,isUndefined:Nl,isDate:Ute,isFile:zte,isReactNativeBlob:Hte,isReactNative:Wte,isBlob:Vte,isRegExp:gne,isFunction:Ur,isStream:Yte,isURLSearchParams:Zte,isTypedArray:une,isFileList:Gte,forEach:fp,merge:GN,extend:ine,trim:rne,stripBOM:ane,inherits:one,toFlatObject:sne,kindOf:NO,kindOfTest:Fi,endsWith:lne,toArray:cne,forEachEntry:dne,matchAll:fne,isHTMLForm:hne,hasOwnProperty:nh,hasOwnProp:nh,hasOwnInPrototypeChain:rh,getSafeProp:Dte,toSafeFlatObject:Lte,reduceDescriptors:xq,freezeMethods:vne,toObjectSet:yne,toCamelCase:pne,noop:xne,toFiniteNumber:bne,findKey:vq,global:ol,isContextDefined:yq,isSpecCompliantForm:wne,toJSONObject:_ne,isAsyncFn:Sne,isThenable:jne,setImmediate:bq,asap:Nne,isIterable:wq,isSafeIterable:Ene},kne=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),One=e=>{const t={};let n,r,i;return e&&e.split(` 548`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim();const l=de.hasOwnProp(t,n);!n||l&&de.hasOwnProp(kne,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function Cne(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const Ane=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),Pne=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function EO(e,t){return de.isArray(e)?e.map(n=>EO(n,t)):Cne(String(e).replace(t,""))}const Tne=e=>EO(e,Ane),Rne=e=>EO(e,Pne);function _q(e){const t=Object.create(null);return de.forEach(e.toJSON(),(n,r)=>{t[r]=Rne(n)}),t}const UR=Symbol("internals");function Zd(e){return e&&String(e).trim().toLowerCase()}function $g(e){return e===!1||e==null?e:de.isArray(e)?e.map($g):Tne(String(e))}function Ine(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Mne=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function cw(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function Dne(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const i=e.charCodeAt(r);if(i===34||i===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function Lne(e){const t=Object.create(null),n=String(e);let r=0,i=!1,a=!1;function o(l){const c=cw(n.slice(r,l)),u=c.indexOf("=");if(u<1)return;const f=cw(c.slice(0,u));if(!Mne.test(f))return;const d=f.toLowerCase();if(d==="__proto__"||d==="constructor"||d==="prototype")return;const p=cw(c.slice(u+1));t[d]=Dne(p)}for(let l=0;l<n.length;l++){const c=n.charCodeAt(l);i?a?a=!1:c===92?a=!0:c===34&&(i=!1):c===34?i=!0:(c===44||c===59)&&(o(l),r=l+1)}return o(n.length),t}const $ne=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uw(e,t,n,r,i){if(de.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!de.isString(t)){if(de.isString(r))return t.indexOf(r)!==-1;if(de.isRegExp(r))return r.test(t)}}function Fne(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Bne(e,t){const n=de.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}let pr=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(l,c,u){const f=Zd(c);if(!f)return;const d=de.findKey(i,f);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||c]=$g(l))}const o=(l,c)=>de.forEach(l,(u,f)=>a(u,f,c));if(de.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(de.isString(t)&&(t=t.trim())&&!$ne(t))o(One(t),n);else if(de.isObject(t)&&de.isSafeIterable(t)){let l=Object.create(null),c,u;for(const f of t){if(!de.isArray(f))throw new TypeError("Object iterator must return a key-value pair");u=f[0],de.hasOwnProp(l,u)?(c=l[u],l[u]=de.isArray(c)?[...c,f[1]]:[c,f[1]]):l[u]=f[1]}o(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Zd(t),t){const r=de.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Ine(i);if(de.isFunction(n))return n.call(this,i,r);if(de.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zd(t),t){const r=de.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||uw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=Zd(o),o){const l=de.findKey(r,o);l&&(!n||uw(r,r[l],l,n))&&(delete r[l],i=!0)}}return de.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||uw(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return de.forEach(this,(i,a)=>{const o=de.findKey(r,a);if(o){n[o]=$g(i),delete n[a];return}const l=t?Fne(a):String(a).trim();l!==a&&delete n[a],n[l]=$g(i),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return de.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&de.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 549`)}getSetCookie(){const t=this.get("set-cookie");return de.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return Lne(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[UR]=this[UR]={accessors:{}}).accessors,i=this.prototype;function a(o){const l=Zd(o);r[l]||(Bne(i,o),r[l]=!0)}return de.isArray(t)?t.forEach(a):a(t),this}};pr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(pr.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});de.freezeMethods(pr);const av="[REDACTED ****]";function qne(e){if(de.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(de.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function Une(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],i=a=>{if(a===null||typeof a!="object"||de.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof pr&&(a=a.toJSON()),r.push(a);let o;if(de.isArray(a))o=[],a.forEach((l,c)=>{const u=i(l);de.isUndefined(u)||(o[c]=u)});else{if(!de.isPlainObject(a)&&qne(a))return r.pop(),a;o=Object.create(null);for(const[l,c]of Object.entries(a)){const u=n.has(l.toLowerCase())?av:i(c);de.isUndefined(u)||(o[l]=u)}}return r.pop(),o};return i(e)}function zR(e){try{return String(e)}catch{return""}}function zne(e){return e.errors.map(n=>{try{return n&&n.message?zR(n.message):zR(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let ze=class Sq extends Error{static from(t,n,r,i,a,o){let l=t.message;!l&&de.isArray(t.errors)&&t.errors.length&&(l=zne(t));const c=new Sq(l,n||t.code,r,i,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(t,n,r,i,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&de.hasOwnProp(t,"redact")?t.redact:void 0,r=de.isArray(n)&&n.length>0?Une(t,n):de.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};ze.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ze.ERR_BAD_OPTION="ERR_BAD_OPTION";ze.ECONNABORTED="ECONNABORTED";ze.ETIMEDOUT="ETIMEDOUT";ze.ECONNREFUSED="ECONNREFUSED";ze.ERR_NETWORK="ERR_NETWORK";ze.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ze.ERR_DEPRECATED="ERR_DEPRECATED";ze.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ze.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ze.ERR_CANCELED="ERR_CANCELED";ze.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ze.ERR_INVALID_URL="ERR_INVALID_URL";ze.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Hne=null,jq=100;function KN(e){return de.isPlainObject(e)||de.isArray(e)}function Nq(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function dw(e,t,n){return e?e.concat(t).map(function(i,a){return i=Nq(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Wne(e){return de.isArray(e)&&!e.some(KN)}const Vne=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function $y(e,t,n){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(_,S)=>{const w=de.getSafeProp(n,_);return de.isUndefined(w)?S:w},i=r("metaTokens",!0),a=r("visitor")||v,o=r("dots",!1),l=r("indexes",!1),c=r("Blob")||typeof Blob<"u"&&Blob,u=r("maxDepth",jq),f=c&&de.isSpecCompliantForm(t),d=[];if(!de.isFunction(a))throw new TypeError("visitor must be a function");function p(_){if(_===null)return"";if(de.isDate(_))return _.toISOString();if(de.isBoolean(_))return _.toString();if(!f&&de.isBlob(_))throw new ze("Blob is not supported. Use a Buffer instead.");if(de.isArrayBuffer(_)||de.isTypedArray(_)){if(f&&typeof c=="function")return new c([_]);throw new ze("Blob is not supported. Use a Buffer instead.",ze.ERR_NOT_SUPPORT)}return _}function m(_){if(_>u)throw new ze("Object is too deeply nested ("+_+" levels). Max depth: "+u,ze.ERR_FORM_DATA_DEPTH_EXCEEDED)}function b(_,S){if(u===1/0)return JSON.stringify(_);const w=[];return JSON.stringify(_,function(k,C){if(!de.isObject(C))return C;for(;w.length&&w[w.length-1]!==this;)w.pop();return w.push(C),m(S+w.length-1),C})}function v(_,S,w){let N=_;if(de.isReactNative(t)&&de.isReactNativeBlob(_))return t.append(dw(w,S,o),p(_)),!1;if(_&&!w&&typeof _=="object"){if(de.endsWith(S,"{}"))S=i?S:S.slice(0,-2),_=b(_,1);else if(de.isArray(_)&&Wne(_)||(de.isFileList(_)||de.endsWith(S,"[]"))&&(N=de.toArray(_)))return S=Nq(S),N.forEac
549h(function(C,P){!(de.isUndefined(C)||C===null)&&t.append(l===!0?dw([S],P,o):l===null?S:S+"[]",p(C))}),!1}return KN(_)?!0:(t.append(dw(w,S,o),p(_)),!1)}const y=Object.assign(Vne,{defaultVisitor:v,convertValue:p,isVisitable:KN});function x(_,S,w=0){if(!de.isUndefined(_)){if(m(w),d.indexOf(_)!==-1)throw new Error("Circular reference detected in "+S.join("."));d.push(_),de.forEach(_,function(k,C){(!(de.isUndefined(k)||k===null)&&a.call(t,k,de.isString(C)?C.trim():C,S,y))===!0&&x(k,S?S.concat(C):[C],w+1)}),d.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return x(e),t}function HR(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function kO(e,t){this._pairs=[],e&&$y(e,this,t)}const Eq=kO.prototype;Eq.append=function(t,n){this._pairs.push([t,n])};Eq.toString=function(t){const n=t?r=>t.call(this,r,HR):HR;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Gne(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kq(e,t,n){if(!t)return e;e=e||"";const r=de.isFunction(n)?{serialize:n}:n,i=de.getSafeProp(r,"encode")||Gne,a=de.getSafeProp(r,"serialize");let o;if(a?o=a(t,r):o=de.isURLSearchParams(t)?t.toString():new kO(t,r).toString(i),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}const Jd=Symbol("internals");function Oq(e){return e?e.length:0}function WR(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function ef(e,t){const n=e.handlers,r=Oq(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,o){n[a.index]!==a.handler&&t.handlerEntries.delete(o)}):t.handlerEntries.clear()),t.handlersLength=r}class VR{constructor(){this.handlers=[],this[Jd]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const i={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[Jd];this.handlers==null&&(this.handlers=[]),ef(this,a);const o=a.nextId++;return this.handlers.push(i),a.handlerEntries.set(o,{handler:i,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,o}eject(t){const n=this[Jd];ef(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(WR(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ef(this,this[Jd]))}forEach(t){const n=this[Jd];ef(this,n),n.iterationDepth++;try{de.forEach(this.handlers,function(i){i!==null&&t(i)})}finally{--n.iterationDepth||(ef(this,n),WR(this.handlers),n.handlersLength=Oq(this.handlers))}}}const OO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Kne=typeof URLSearchParams<"u"?URLSearchParams:kO,Yne=typeof FormData<"u"?FormData:null,Qne=typeof Blob<"u"?Blob:null,Xne={isBrowser:!0,classes:{URLSearchParams:Kne,FormData:Yne,Blob:Qne},protocols:["http","https","file","blob","url","data"]},CO=typeof window<"u"&&typeof document<"u",YN=typeof navigator=="object"&&navigator||void 0,Zne=CO&&(!YN||["ReactNative","NativeScript","NS"].indexOf(YN.product)<0),Jne=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ere=CO&&window.location.href||"http://localhost",tre=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:CO,hasStandardBrowserEnv:Zne,hasStandardBrowserWebWorkerEnv:Jne,navigator:YN,origin:ere},Symbol.toStringTag,{value:"Module"})),Gn={...tre,...Xne};function nre(e,t){return $y(e,new Gn.classes.URLSearchParams,{visitor:function(n,r,i,a){return Gn.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}const GR=jq;function Cq(e){if(e>GR)throw new ze("FormData field is too deeply nested ("+e+" levels). Max depth: "+GR,ze.ERR_FORM_DATA_DEPTH_EXCEEDED)}function rre(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Cq(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function ire(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Aq(e){function t(n,r,i,a){Cq(a);let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=a>=n.length;return o=!o&&de.isArray(i)?i.length:o,c?(de.hasOwnProp(i,o)?i[o]=de.isArray(i[o])?i[o].concat(r):[i[o],r]:i[o]=r,!l):((!de.hasOwnProp(i,o)||!de.isObject(i[o]))&&
vendor: 11,496 bytes, line 549
549(i[o]=[]),t(n,r,i[o],a)&&de.isArray(i[o])&&(i[o]=ire(i[o])),!l)}if(de.isFormData(e)&&de.isFunction(e.entries)){const n={};return de.forEachEntry(e,(r,i)=>{t(rre(r),i,n,0)}),n}return null}const Pq=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),yc=(e,t)=>e!=null&&de.hasOwnProp(e,t)?e[t]:void 0;function are(e,t,n){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const hp={transitional:OO,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=de.isObject(t);if(a&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return i?JSON.stringify(Aq(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t)||de.isReadableStream(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const c=yc(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return nre(t,c).toString();if((l=de.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=yc(this,"env"),f=u&&u.FormData;return $y(l?{"files[]":t}:t,f&&new f,c)}}return a||i?(n.setContentType("application/json",!1),are(t)):t}],transformResponse:[function(t){const n=yc(this,"transitional")||hp.transitional,r=n&&n.forcedJSONParsing,i=yc(this,"responseType"),a=i==="json";if(de.isResponse(t)||de.isReadableStream(t))return t;if(t&&de.isString(t)&&(r&&!i||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,yc(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?ze.from(c,ze.ERR_BAD_RESPONSE,this,null,yc(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Gn.classes.FormData,Blob:Gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(Pq,e=>{hp.headers[e]={}});function fw(e,t){const n=this||hp,r=t||n,i=pr.from(r.headers);let a=r.data;return de.forEach(e,function(l){a=l.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Tq(e){return!!(e&&e.__CANCEL__)}let pp=class extends ze{constructor(t,n,r){super(t??"canceled",ze.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Rq(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ze("Request failed with status code "+n.status,n.status>=400&&n.status<500?ze.ERR_BAD_REQUEST:ze.ERR_BAD_RESPONSE,n.config,n.request,n))}const ore=/[\t\n\r]/g;function Iq(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(ore,"")}function hw(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function sre(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),f=r[a];o||(o=u),n[i]=c,r[i]=u;let d=a,p=0;for(;d!==i;)p+=n[d++],d=d%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),u-o<t)return;const m=f&&u-f;return m?Math.round(p*1e3/m):void 0}}function lre(e,t){let n=0,r=1e3/t,i,a;const o=(f,d=Date.now())=>{n=d,i=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const d=Date.now(),p=d-n;p>=r?o(f,d):(i=f,a||(a=setTimeout(()=>{a=null,o(i)},r-p)))},()=>i&&o(i),(...f)=>o(f)]}const ov=(e,t,n=3)=>{let r=0;const i=sre(50,250);return lre(a=>{if(!a||!de.isNumber(a.loaded))return;const o=a.loaded,l=a.lengthComputable?a.total:void 0,c=Math.max(0,l!=null?Math.min(o,l):o),u=Math.max(0,c-r),f=i(u);r=Math.max(r,c);const d={loaded:c,total:l,progress:l?c/l:void 0,bytes:u,rate:f||void 0,estimated:f&&l?(l-c)/f:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(d)},n)},KR=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},YR=(e,t=de.asap)=>(...n)=>t(()=>e(...n)),cre=Gn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Gn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Gn.origin),Gn.navigator&&/(msie|trident)/i.test(Gn.navigator.userAgent)):()=>!0,ure=Gn.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];de.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),de.isString(r)&&l.push(`path=${r}`),de.isString(i)&&l.push(`domain=${i}`),a===!0&&l.push("secure"),de.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),i=r.indexOf("=");if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function dre(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function fre(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const hre=/^https?:(?!\/\/)/i;function pre(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${av}`)}function mre(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${av}@`),n=t.indexOf("#"),i=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${av}`);return n===-1?i:`${i}#${pre(t.slice(n+1))}`}function QR(e,t){if(typeof e=="string"){const n=Iq(e);if(hre.test(n))throw new ze(`Invalid URL ${JSON.stringify(mre(n))}: missing "//" after protocol`,ze.ERR_INVALID_URL,t)}}function Mq(e,t,n,r){QR(t,r);let i=!dre(t);return e&&(i||n===!1)?(QR(e,r),fre(e,t)):t}const XR=e=>e instanceof pr?{...e}:e,gre=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function El(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,d,p,m){return de.isPlainObject(f)&&de.isPlainObject(d)?de.merge.call({caseless:m},f,d):de.isPlainObject(d)?de.merge({},d):de.isArray(d)?d.slice():d}function i(f,d,p,m){if(de.isUndefined(d)){if(!de.isUndefined(f))return r(void 0,f,p,m)}else return r(f,d,p,m)}function a(f,d){if(!de.isUndefined(d))return r(void 0,d)}function o(f,d){if(de.isUndefined(d)){if(!de.isUndefined(f))return r(void 0,f)}else return r(void 0,d)}function l(f){const d=de.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!de.isUndefined(d))if(de.isPlainObject(d)){if(de.hasOwnProp(d,f))return d[f]}else return;const p=de.hasOwnProp(e,"transitional")?e.transitional:void 0;if(de.isPlainObject(p)&&de.hasOwnProp(p,f))return p[f]}function c(f,d,p){if(de.hasOwnProp(t,p))return r(f,d);if(de.hasOwnProp(e,p))return r(void 0,f)}const u={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutErrorMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(f,d,p)=>i(XR(f),XR(d),p,!0)};return de.forEach(gre({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const p=de.hasOwnProp(u,d)?u[d]:i,m=de.hasOwnProp(e,d)?e[d]:void 0,b=de.hasOwnProp(t,d)?t[d]:void 0,v=p(m,b,d);de.isUndefined(v)&&p!==c||(n[d]=v)}),de.hasOwnProp(t,"validateStatus")&&de.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(de.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const vre=["content-type","content-length"];function yre(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,i])=>{vre.includes(r.toLowerCase())&&e.set(r,i)})}const xre=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function Dq(e){const t=El({},e),n=p=>de.hasOwnProp(t,p)?t[p]:void 0,r=n("data");let i=n("withXSRFToken");const a=n("xsrfHeaderName"),o=n("xsrfCookieName");let l=n("headers");const c=n("auth"),u=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=l=pr.from(l),t.url=kq(Mq(u,d,f,t),n("params"),n("paramsSerializer")),c){const p=de.getSafeProp(c,"username")||"",m=de.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(p+":"+(m?xre(m):"")))}catch(b){throw ze.from(b,ze.ERR_BAD_OPTION_VALUE,e)}}if(de.isFormData(r)){const p=de.getSafeProp(r,"getHeaders");Gn.hasStandardBrowserEnv||Gn.hasStandardBrowserWebWorkerEnv||de.isReactNative(r)?l.setContentType(void 0):de.isFunction(p)&&yre(l,p.call(r),n("formDataHeaderPolicy"))}if(Gn.hasStandardBrowserEnv&&(de.isFunction(i)&&(i=i(t)),i===!0||i==null&&cre(t.url))){const m=a&&o&&ure.read(o);m&&l.set(a,m)}return t}const bre=typeof XMLHttpRequest<"u",wre=bre&&function(e){return new Promise(function(n,r){const i=Dq(e);let a=i.data;const o=pr.from(i.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=i,f,d,p,m,b,v;function y(){m&&m(),b&&b(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let x=new XMLHttpRequest;x.open(i.method.toUpperCase(),i.url,!0),x.timeout=i.timeout;function _(w){if(!x)return;if(x.status===0&&(hw(Iq(i.url))||hw(Gn.origin))!=="file"&&!(x.responseURL&&x.responseURL.startsWith("file:"))){r(new ze("Request aborted",ze.ECONNABORTED,e,x)),y(),x=null;return}try{w?v&&v(w):b&&b()}catch(P){setTimeout(()=>{throw P})}if(!x)return;const N=pr.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:N,config:e,request:x};Rq(function(L){n(L),y()},function(L){r(L),y()},C),x=null}"onloadend"in x?x.onloadend=_:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(_)},x.onabort=function(){x&&(r(new ze("Request aborted",ze.ECONNABORTED,e,x)),y(),x=null)},x.onerror=function(N){const k=N&&N.message?N.message:"Network Error",C=new ze(k,ze.ERR_NETWORK,e,x);C.event=N||null,r(C),y(),x=null},x.ontimeout=function(){let N=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||OO;i.timeoutErrorMessage&&(N=i.timeoutErrorMessage),r(new ze(N,k.clarifyTimeoutError?ze.ETIMEDOUT:ze.ECONNABORTED,e,x)),y(),x=null},a===void 0&&o.setContentType(null),"setRequestHeader"in x&&de.forEach(_q(o),function(N,k){x.setRequestHeader(k,N)}),de.isUndefined(i.withCredentials)||(x.withCredentials=!!i.withCredentials),l&&l!=="json"&&(x.responseType=i.responseType),u&&([p,b,v]=ov(u,!0),x.addEventListener("progress",p)),c&&x.upload&&([d,m]=ov(c),x.upload.addEventListener("progress",d),x.upload.addEventListener("loadend",m)),(i.cancelToken||i.signal)&&(f=w=>{x&&(r(!w||w.type?new pp(null,e,x):w),x.abort(),y(),x=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const S=hw(i.url);if(S&&!Gn.protocols.includes(S)){r(new ze("Unsupported protocol "+S+":",ze.ERR_BAD_REQUEST,e)),y();return}x.send(a||null)})},_re=(e,t)=>
549{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const i=function(c){if(!r){r=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof ze?u:new pp(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new ze(`timeout of ${t}ms exceeded`,ze.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>{if(!r){if(c.aborted){i.call(c);return}c.addEventListener("abort",i,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>de.asap(o),l},Sre=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},jre=async function*(e,t){for await(const n of Nre(e))yield*Sre(n,t)},Nre=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},ZR=(e,t,n,r)=>{const i=jre(e,t);let a=0,o,l=c=>{o||(o=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:u,value:f}=await i.next();if(u){l(),c.close();return}let d=f.byteLength;if(n){let p=a+=d;n(p)}c.enqueue(new Uint8Array(f))}catch(u){throw l(u),u}},cancel(c){return l(c),i.return()}},{highWaterMark:2})},JR=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Lq=(e,t,n)=>t+2<n&&JR(e.charCodeAt(t+1))&&JR(e.charCodeAt(t+2)),eI=e=>e<=57?e-48:(e&223)-55,Ere=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,kre=e=>e===9||e===10||e===12||e===13||e===32,Ore=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},Cre=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},Are=e=>{const t=e.length;let n=0,r=0,i=!1;for(let a=0;a<t;a++){let o=e.charCodeAt(a);if(o===37&&Lq(e,a,t)&&(o=eI(e.charCodeAt(a+1))*16+eI(e.charCodeAt(a+2)),a+=2),!kre(o)){if(o===61){r++;continue}if(!Ere(o)||r>0){i=!0;continue}n++}}return i||r>2||r>0&&(n+r)%4!==0||n%4===1?Cre(e):Ore(n)},Pre=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),i=e.slice(n+1);if(/;base64/i.test(r))return t(i);let o=0;for(let l=0,c=i.length;l<c;l++){const u=i.charCodeAt(l);if(u===37&&Lq(i,l,c))o+=1,l+=2;else if(u<128)o+=1;else if(u<2048)o+=2;else if(u>=55296&&u<=56319&&l+1<c){const f=i.charCodeAt(l+1);f>=56320&&f<=57343?(o+=4,l++):o+=3}else o+=3}return o};function Tre(e){const t=typeof e=="string"?e.indexOf("#"):-1;return Pre(t===-1?e:e.slice(0,t),Are)}const AO="1.20.0",tI=64*1024,Rre={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Zm}=de,Ire=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),nI=e=>{if(!de.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},rI=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mre=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},Dre=e=>{const t=de.global!==void 0&&de.global!==null?de.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=de.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:i,Request:a,Response:o}=e,l=i?Zm(i):typeof fetch=="function",c=Zm(a),u=Zm(o);if(!l)return!1;const f=l&&Zm(n),d=l&&(typeof r=="function"?(x=>_=>x.encode(_))(new r):async x=>new Uint8Array(await new a(x).arrayBuffer())),p=c&&f&&rI(()=>{let x=!1;const _=new a(Gn.origin,{body:new n,method:"POST",get duplex(){return x=!0,"half"}}),S=_.headers.has("Content-Type");return _.body!=null&&_.body.cancel(),x&&!S}),m=u&&f&&rI(()=>de.isReadableStream(new o("").body)),b={stream:m&&(x=>x.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!b[x]&&(b[x]=(_,S)=>{let w=_&&_[x];if(w)return w.call(_);throw new ze(`Response type '${x}' is not supported`,ze.ERR_NOT_SUPPORT,S)})});const v=async x=>{if(x==null)return 0;if(de.isBlob(x))return x.size;if(de.isSpecCompliantForm(x))return(await new a(Gn.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(de.isArrayBufferView(x)||de.isArrayBuffer(x))return x.byteLength;if(de.isURLSearchParams(x)&&(x=x+""),de.isString(x))return(await d(x)).byteLength},y=async(x,_)=>{const S=de.toFiniteNumber(x.getContentLength());return S??v(_)};return async x=>{let{url:_,method:S,data:w,signal:N,cancelToken:k,timeout:C,onDownloadProgress:P,onUploadProgress:L,responseType:T,headers:A,withCredentials:R="same-origin",fetchOptions:I,maxContentLength:M,maxBo
vendor: 8,248 bytes, lines 549-555
549dyLength:B,maxRedirects:W}=Dq(x);const G=de.isNumber(M)&&M>-1,H=de.isNumber(B)&&B>-1,K=Z=>de.hasOwnProp(x,Z)?x[Z]:void 0;let $=i||fetch;T=T?(T+"").toLowerCase():"text";let F=_re([N,k&&k.toAbortSignal()],C),z=null;const U=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let ee,re=null;const X=()=>new ze("Request body larger than maxBodyLength limit",ze.ERR_BAD_REQUEST,x,z);try{let Z;const ie=K("auth");if(ie){const te=de.getSafeProp(ie,"username")||"",oe=de.getSafeProp(ie,"password")||"";Z={username:te,password:oe}}if(Mre(_)){const te=new URL(_,Gn.origin);if(!Z&&(te.username||te.password)){const oe=nI(te.username),le=nI(te.password);Z={username:oe,password:le}}(te.username||te.password)&&(te.username="",te.password="",_=te.href)}if(Z&&(A.delete("authorization"),A.set("Authorization","Basic "+btoa(Ire((Z.username||"")+":"+(Z.password||""))))),G&&typeof _=="string"&&_.startsWith("data:")&&Tre(_)>M)throw new ze("maxContentLength size of "+M+" exceeded",ze.ERR_BAD_RESPONSE,x,z);if(H&&S!=="get"&&S!=="head"){const te=await v(w);if(typeof te=="number"&&isFinite(te)&&(ee=te,te>B))throw X()}const Y=H&&(de.isReadableStream(w)||de.isStream(w)),J=(te,oe,le)=>ZR(te,tI,ye=>{if(H&&ye>B)throw re=X();oe&&oe(ye)},le);if(p&&S!=="get"&&S!=="head"&&(L||Y)){if(ee=ee??await y(A,w),ee!==0||Y){let te=new a(_,{method:"POST",body:w,duplex:"half"}),oe;if(de.isFormData(w)&&(oe=te.headers.get("content-type"))&&A.setContentType(oe),te.body){const[le,ye]=L&&KR(ee,ov(YR(L)))||[];w=J(te.body,le,ye)}}}else if(Y&&!c&&f&&S!=="get"&&S!=="head")w=J(w);else if(Y&&c&&!p&&S!=="get"&&S!=="head")throw new ze("Stream request bodies are not supported by the current fetch implementation",ze.ERR_NOT_SUPPORT,x,z);de.isString(R)||(R=R?"include":"omit");const se=c&&"credentials"in a.prototype;if(de.isFormData(w)){const te=A.getContentType();te&&/^multipart\/form-data/i.test(te)&&!/boundary=/i.test(te)&&A.delete("content-type")}A.set("User-Agent","axios/"+AO,!1);const V=I==null?I:Object.assign(Object.create(null),I);V&&(delete V.body,delete V.headers,delete V.method,delete V.signal,delete V.duplex,delete V.credentials);const fe=Object.assign(Object.create(null),V,{signal:F,method:S.toUpperCase(),headers:_q(A.normalize()),body:w,duplex:"half",credentials:se?R:void 0});c&&(de.forEach(Rre,(te,oe)=>{fe[oe]===void 0&&(fe[oe]=te)}),fe.signal===void 0&&(fe.signal=null),fe.body===void 0&&(fe.body=null)),W===0&&(fe.redirect="manual",V&&(V.redirect="manual")),z=c&&new a(_,fe);let ce=await(c?$(z,V):$(_,fe));const Ne=pr.from(ce.headers);if(G){const te=de.toFiniteNumber(Ne.getContentLength());if(te!=null&&te>M)throw new ze("maxContentLength size of "+M+" exceeded",ze.ERR_BAD_RESPONSE,x,z)}const me=m&&(T==="stream"||T==="response");if(m&&ce.body&&(P||G||me&&U)){const te={};["status","statusText","headers"].forEach(Be=>{te[Be]=ce[Be]});const oe=de.toFiniteNumber(Ne.getContentLength()),[le,ye]=P&&KR(oe,ov(YR(P),!0))||[];let xe=0;const Ce=Be=>{if(G&&(xe=Be,xe>M))throw new ze("maxContentLength size of "+M+" exceeded",ze.ERR_BAD_RESPONSE,x,z);le&&le(Be)};ce=new o(ZR(ce.body,tI,Ce,()=>{ye&&ye(),U&&U()}),te)}T=T||"text";let je=await b[de.findKey(b,T)||"text"](ce,x);if(G&&!m&&!me){let te;if(je!=null&&(typeof je.byteLength=="number"?te=je.byteLength:typeof je.size=="number"?te=je.size:typeof je=="string"&&(te=typeof r=="function"?new r().encode(je).byteLength:je.length)),typeof te=="number"&&te>M)throw new ze("maxContentLength size of "+M+" exceeded",ze.ERR_BAD_RESPONSE,x,z)}return!me&&U&&U(),await new Promise((te,oe)=>{Rq(te,oe,{data:je,headers:pr.from(ce.headers),status:ce.status,statusText:ce.statusText,config:x,request:z})})}catch(Z){if(U&&U(),F&&F.aborted&&F.reason instanceof ze){const ie=F.reason;throw ie.config=x,z&&(ie.request=z),Z!==ie&&Object.defineProperty(ie,"cause",{__proto__:null,value:Z,writable:!0,enumerable:!1,configurable:!0}),ie}if(re)throw z&&!re.request&&(re.request=z),re;if(Z instanceof ze)throw z&&!Z.request&&(Z.request=z),Z;if(Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)){const ie=new ze("Network Error",ze.ERR_NETWORK,x,z,Z&&Z.response);throw Object.defineProperty(ie,"cause",{__proto__:null,value:Z.cause||Z,writable:!0,enumerable:!1,configurable:!0}),ie}throw ze.from(Z,Z&&Z.code,x,z,Z&&Z.response)}}},Lre=new Map,$q=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,a=[r,i,n];let o=a.length,l=o,c,u,f=Lre;for(;l--;)c=a[l],u=f.get(c),u===void 0&&f.set(c,u=l?new Map:Dre(t)),f=u;return u};$q();const PO={http:Hne,xhr:wre,fetch:{get:$q}};de.forEach(PO,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const iI=e=>`- ${e}`,$re=e=>de.isFunction(e)||e===null||e===!1;function Fre(e,t){e=de.isArray(e)?e:[e];const{length:n}=e;let r,i;const a={};for(let o=0;o<n;o++){r=e[o];let l;if(i=r,!$re(r)&&(i=PO[(l=String(r)).toLowerCase()],i===void 0))throw new ze(`Unknown adapter '${l}'`);if(i&&(de.isFunction(i)||(i=i.get(t))))break;a[l||"#"+o]=i}if(!i){const o=Object.entries(a).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since : 550`+o.map(iI).join(` 551`):" "+iI(o[0]):"as no adapter specified";throw new ze("There is no suitable adapter to dispatch the request "+l,ze.ERR_NOT_SUPPORT)}return i}const Fq={getAdapter:Fre,adapters:PO};function pw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new pp(null,e)}function mw(e){const t=de.toSafeFlatObject(e);return pw(t),t.headers=pr.from(de.getSafeProp(t,"headers")),t.data=fw.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Fq.getAdapter(t.adapter||hp.adapter,t)(t).then(function(i){pw(t),t.response=i;try{i.data=fw.call(t,t.transformResponse,i)}finally{delete t.response}return i.headers=pr.from(i.headers),i},function(i){if(!Tq(i)&&(pw(t),i&&i.response)){t.response=i.response;try{i.response.data=fw.call(t,t.transformResponse,i.response)}finally{delete t.response}i.response.headers=pr.from(i.response.headers)}return Promise.reject(i)})}const Fy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Fy[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const aI={};Fy.transitional=function(t,n,r){function i(a,o){return"[Axios v"+AO+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,l)=>{if(t===!1)throw new ze(i(o," has been removed"+(n?" in "+n:"")),ze.ERR_DEPRECATED);return n&&!aI[o]&&(aI[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,l):!0}};Fy.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Bre(e,t,n){if(typeof e!="object"||e===null)throw new ze("options must be an object",ze.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){const l=e[a],c=l===void 0||o(l,a,e);if(c!==!0)throw new ze("option "+a+" must be "+c,ze.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ze("Unknown option "+a,ze.ERR_BAD_OPTION)}}const Fg={assertOptions:Bre,validators:Fy},ur=Fg.validators;let bl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new VR,response:new VR}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error)try{let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const a=i.stack;let o="";if(typeof a=="string"){const l=a.indexOf(` 552`);o=l===-1?"":a.slice(l+1)}if(!r.stack)r.stack=o;else if(o){const l=o.indexOf(` 553`),c=l===-1?-1:o.indexOf(` 554`,l+1),u=c===-1?"":o.slice(c+1);String(r.stack).endsWith(u)||(r.stack+=` 555`+o)}}catch{}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=El(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&Fg.assertOptions(r,{silentJSONParsing:ur.transitional(ur.boolean),forcedJSONParsing:ur.transitional(ur.boolean),clarifyTimeoutError:ur.transitional(ur.boolean),legacyInterceptorReqResOrdering:ur.transitional(ur.boolean),advertiseZstdAcceptEncoding:ur.transitional(ur.boolean),validateStatusUndefinedResolves:ur.transitional(ur.boolean)}
vendor: 3,315 bytes, line 555
555,!1),i!=null&&(de.isFunction(i)?n.paramsSerializer={serialize:i}:Fg.assertOptions(i,{encode:ur.function,serialize:ur.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Fg.assertOptions(n,{baseUrl:ur.spelling("baseURL"),withXsrfToken:ur.spelling("withXSRFToken")},!0),n.method=(de.getSafeProp(n,"method")||de.getSafeProp(this.defaults,"method")||"get").toLowerCase();let o=a&&de.merge(a.common,a[n.method]);a&&de.forEach(Pq.concat("common"),b=>{delete a[b]}),n.headers=pr.concat(o,a);const l=[];let c=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;c=c&&v.synchronous;const y=n.transitional||OO;y&&y.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!c){const b=[mw.bind(this),void 0];for(b.unshift(...l),b.push(...u),p=b.length,f=Promise.resolve(n);d<p;)f=f.then(b[d++],b[d++]);return f}p=l.length;let m=n;for(;d<p;){const b=l[d++],v=l[d++];try{m=b?b(m):m}catch(y){if(!v){f=Promise.reject(y);break}try{const x=v.call(this,y);de.isThenable(x)&&(f=Promise.resolve(x).then(()=>mw.call(this,m)))}catch(x){f=Promise.reject(x)}break}}if(!f)try{f=mw.call(this,m)}catch(b){f=Promise.reject(b)}for(d=0,p=u.length;d<p;)f=f.then(u[d++],u[d++]);return f}getUri(t){t=El(this.defaults,t);const n=Mq(t.baseURL,t.url,t.allowAbsoluteUrls,t);return kq(n,t.params,t.paramsSerializer)}};de.forEach(["delete","get","head","options"],function(t){bl.prototype[t]=function(n,r){return this.request(El(r||{},{method:t,url:n,data:r&&de.hasOwnProp(r,"data")?r.data:void 0}))}});de.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,o,l){return this.request(El(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}bl.prototype[t]=n(),t!=="query"&&(bl.prototype[t+"Form"]=n(!0))});let qre=class Bq{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(l=>{r.subscribe(l),a=l}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,l){r.reason||(r.reason=new pp(a,o,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Bq(function(i){t=i}),cancel:t}}};function Ure(e){return function(n){return e.apply(null,n)}}function zre(e){return de.isObject(e)&&e.isAxiosError===!0}const Bg={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
555alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Bg).forEach(([e,t])=>{Bg[t]===void 0&&(Bg[t]=e)});function qq(e){const t=new bl(e),n=dq(bl.prototype.request,t);return de.extend(n,bl.prototype,t,{allOwnKeys:!0}),de.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return qq(El(e,i))},n}const Nn=qq(hp);Nn.Axios=bl;Nn.CanceledError=pp;Nn.CancelToken=qre;Nn.isCancel=Tq;Nn.VERSION=AO;Nn.toFormData=$y;Nn.AxiosError=ze;Nn.Cancel=Nn.CanceledError;Nn.all=function(t){return Promise.all(t)};Nn.spread=Ure;Nn.isAxiosError=zre;Nn.mergeConfig=El;Nn.AxiosHeaders=pr;Nn.formToJSON=e=>Aq(de.isHTMLForm(e)?new FormData(e):e);Nn.getAdapter=Fq.getAdapter;Nn.HttpStatusCode=Bg;Nn.default=Nn;const{Axios:Q5e,AxiosError:X5e,CanceledError:Z5e,isCancel:J5e,CancelToken:e3e,VERSION:t3e,all:n3e,Cancel:r3e,isAxiosError:i3e,spread:a3e,toFormData:o3e,AxiosHeaders:s3e,HttpStatusCode:l3e,formToJSON:c3e,getAdapter:u3e,mergeConfig:d3e,create:f3e}=Nn,Uq=typeof window>"u",oI=!Uq&&window.self!==window.top,Hre=!Uq&&typeof document>"u",zq=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),er=[];for(let e=0;e<256;++e)er.push((e+256).toString(16).slice(1));function Wre(e,t=0){return(er[e[t+0]]+er[e[t+1]]+er[e[t+2]]+er[e[t+3]]+"-"+er[e[t+4]]+er[e[t+5]]+"-"+er[e[t+6]]+er[e[t+7]]+"-"+er[e[t+8]]+er[e[t+9]]+"-"+er[e[t+10]]+er[e[t+11]]+er[e[t+12]]+er[e[t+13]]+er[e[t+14]]+er[e[t+15]]).toLowerCase()}let gw;const Vre=new Uint8Array(16);function Gre(){if(!gw){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");gw=crypto.getRandomValues.bind(crypto)}return gw(Vre)}const Kre=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),sI={randomUUID:Kre};function Yre(e,t,n){var i;e=e||{};const r=e.random??((i=e.rng)==null?void 0:i.call(e))??Gre();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Wre(r)}function Qre(e,t,n){return sI.randomUUID&&!e?sI.randomUUID():Yre(e)}const tf=typeof window<"u"?window:{base44SharedInstances:{}};function Xre(e,t){return tf.base44SharedInstances||(tf.base44SharedInstances={}),tf.base44SharedInstances[e]||(tf.base44SharedInstances[e]={instance:t()}),tf.base44SharedInstances[e].instance}const Zre="__user_heartbeat_event__",Jre="__initialization_event__",eie="__session_duration_event__",lI="analytics-enable",cI="base44_analytics_session_id",tie={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},nie="analytics",zt=Xre(nie,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...tie,...uie()}})),rie=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r,enabled:i})=>{var a;const{maxQueueSize:o,throttleTime:l,batchSize:c}=zt.config;if(!i||!(!((a=zt.config)===null||a===void 0)&&a.enabled)||Hre)return{track:()=>{},cleanup:()=>{}};let u;const f=`${t}/api/apps/${n}/analytics/track/batch`,d=async w=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:w}})},p=w=>{try{const N=JSON.stringify({events:w}),k=new Blob([N],{type:"application/json"});return typeof navigator>"u"||N.length>6e4||!navigator.sendBeacon(f,k)}catch{return!1}},m=async(w,N={})=>
555{if(w.length===0)return;const k=await cie(r),C=w.map(lie(k));try{(!N.isBeacon||!p(C))&&await d(C)}catch{}},b=()=>{dI(m,{throttleTime:l,batchSize:c})},v=w=>{if(zt.requestsQueue.length>=o)return;const N=sie();zt.requestsQueue.push({...w,...N}),b()},y=()=>{dI(m,{throttleTime:l,batchSize:c}),u=fI(v),aie()},x=()=>{uI(),u==null||u(),oie(v);const w=zt.requestsQueue.splice(0);m(w,{isBeacon:!0})},_=()=>{typeof window>"u"||(document.visibilityState==="hidden"?x():document.visibilityState==="visible"&&y())},S=()=>{uI(),u==null||u(),typeof window<"u"&&window.removeEventListener("visibilitychange",_)};return b(),u=fI(v),iie(v),typeof window<"u"&&window.addEventListener("visibilitychange",_),{track:v,cleanup:S}};function uI(){zt.isProcessing=!1}async function dI(e,t){if(zt.isProcessing)return;zt.isProcessing=!0;const{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;zt.isProcessing&&zt.requestsQueue.length>0;){const i=zt.requestsQueue.splice(0,r);i.length&&await e(i),await new Promise(a=>setTimeout(a,n))}zt.isProcessing=!1}function fI(e){var t;if(typeof window>"u"||zt.isHeartBeatProcessing||((t=zt.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};zt.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:Zre})},zt.config.heartBeatInterval);return()=>{clearInterval(n),zt.isHeartBeatProcessing=!1}}function iie(e){typeof window>"u"||zt.wasInitializationTracked||(zt.wasInitializationTracked=!0,e({eventName:Jre,properties:{referrer:document==null?void 0:document.referrer}}))}function aie(){typeof window>"u"||zt.sessionStartTime!==null||(zt.sessionStartTime=new Date().toISOString())}function oie(e){if(typeof window>"u"||zt.sessionStartTime===null)return;const t=new Date().getTime()-new Date(zt.sessionStartTime).getTime();zt.sessionStartTime=null,e({eventName:eie,properties:{sessionDuration:t}})}function sie(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function lie(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Nf=null;function hI(){zt.sessionContext=null,Nf=null}async function cie(e){if(!zt.sessionContext){if(!e.hasToken())return{user_id:null,session_id:sv()};if(!Nf){const r=sv();Nf=e.me().then(i=>({user_id:i.id,session_id:r})).catch(()=>({user_id:null,session_id:r}))}const t=Nf,n=await t;return Nf===t&&(zt.sessionContext=n),n}return zt.sessionContext}function uie(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(lI);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(lI);const r=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",r),{enabled:t==="true"}}function pI(){var e;return(e=zt.fallbackSessionId)!==null&&e!==void 0?e:zt.fallbackSessionId=zq()}function sv(){if(typeof window>"u")return pI();try{const e=localStorage.getItem(cI);if(!e){const t=zq();return localStorage.setItem(cI,t),t}return e}catch{return pI()}}class Hq extends Error{constructor(t,n,r,i,a){super(t),this.name="Base44Error",this.status=n,this.code=r,this.data=i,this.originalError=a}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function Cc({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){const a=Nn.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",sv()));const l=Qre();if(o.requestId=l,oI)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),r&&a.interceptors.response.use(o=>{var l;const c=(l=o.config)===null||l===void 0?void 0:l.requestId;try{oI&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var l,c,u,f,d,p,m,b,v,y,x,_;const S=(l=o.response)===null||l===void 0?void 0:l.data,w=((c=S==null?void 0:S.error)===null||c===void 0?void 0:c.message)||(S==null?void 0:S.message)||(S==null?void 0:S.detail)||o.message,N=new Hq(w,(u=o.response)===null||u===void 0?void 0:u.status,(y=(p=(d=(f=S==null?void 0:S.error)===null||f===void 0?void 0:f.code)!==null&&d!==void 0?d:S==null?void 0:S.code)!==null&&p!==void 0?p:(v=(b=(m=o.response)===null||m===void 0?void 0:m.headers)===null||b===void 0?void 0:b.get)===null||v===void 0?void 0:v.call(b,"x-base44-connector-error"))!==null&&y!==void 0?y:(_=(x=o.response)===null||x===void 0?void 0:x.headers)===null||_===void 0?void 0:_["x-base44-connector-error"],S,o);return i==null||i(N),Promise.reject(N)}),a}function mI(e){const{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(i,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return hie(t,n,a,r)}})}function die(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}const fie=100;function gI(e){return typeof e=="object"&&e!==null}function hie(e,t,n,r){const i=`/apps/${t}/entities/${n}`,a=c=>Array.isArray(c)?c.join(","):c,o=(c,u,f,d,p)=>{const m={};return p&&(m.q=JSON.stringify(p)),c&&(m.sort=c),u&&(m.limit=u),f&&(m.skip=f),d&&(m.fields=a(d)),e.get(i,{params:m})},l=(c,u)=>{const f={};return u&&(f.q=JSON.stringify(u)),f.limit=c.limit||fie,c.cursor&&(f.cursor=c.cursor),"distinct"in c?f.distinct=c.distinct:(c.sort&&(f.sort=c.sort),c.fields&&(f.fields=a(c.fields))),e.get(`${i}/v2/list`,{params:f})};return{async list(...c){const[u,f,d,p]=c;return gI(u)?l(u):o(u,f,d,p)},async filter(c,...u){const[f,d,p,m]=u;return gI(f)?l(f,c):o(f,d,p,m,c)},async get(c){return e.get(`${i}/${c}`)},async create(c){return e.post(i,c)},async update(c,u){return e.put(`${i}/${c}`,u)},async delete(c){return e.delete(`${i}/${c}`)},async deleteMany(c){return e.delete(i,{data:c})},async bulkCreate(c){return e.post(`${i}/bulk`,c)},async updateMany(c,u){return e.patch(`${i}/update-many`,{query:c,data:u})},async count(c){const u={};return c&&(u.q=JSON.stringify(c)),(await e.get(`${i}/count`,{params:u})).count},async aggregate(c){return e.post(`${i}
555/aggregate`,c)},async upsert(c,u){return e.post(`${i}/upsert`,{records:c,key:u.key})},async bulkUpdate(c){return e.put(`${i}/bulk`,c)},async importEntities(c){const u=new FormData;return u.append("file",c,c.name),e.post(`${i}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(c){const u=`entities:${t}:${n}`;return r().subscribeToRoom(u,{update_model:p=>{var m;const b=die(p.data);if(b){b.type!=="delete"&&(!((m=b.data)===null||m===void 0)&&m._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${b.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${b.id}")\` to fetch the full record.`);try{c(b)}catch(v){console.error("[Base44 SDK] Subscription callback error:",v)}}}})}}}function pie(e,t){return{async call(n,r,i){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(r!=null&&r.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:a,queryParams:o,...l}=i??{},c={...l,...a&&{path_params:a},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,c)}}}function vI(e,t){const n=pie(e,t);return new Proxy({},{get(r,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return i==="custom"?n:new Proxy({},{get(a,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${l}`);let c,u;return l instanceof FormData||l&&Object.values(l).some(f=>f instanceof File)?(c=new FormData,Object.keys(l).forEach(f=>{l[f]instanceof File?c.append(f,l[f],l[f].name):typeof l[f]=="object"&&l[f]!==null?c.append(f,JSON.stringify(l[f])):c.append(f,l[f])}),u="multipart/form-data"):(c=l,u="application/json"),i==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,c||l,{headers:{"Content-Type":u}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${o}`,c||l,{headers:{"Content-Type":u}})}}})}})}function mie(){return typeof window>"u"?!1:window!==window.parent}function gie(e,t,n){const a=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),l=window.open(e,"base44_auth",`width=500,height=600,left=${a},top=${o},resizable=yes,scrollbars=yes`);if(!l)return;const c=()=>{window.removeEventListener("message",u),clearInterval(f),l.closed||l.close()},u=d=>{var p;if(d.origin!==n||d.source!==l||!(!((p=d.data)===null||p===void 0)&&p.access_token))return;c();const m=new URL(t),{access_token:b,is_new_user:v}=d.data;m.searchParams.set("access_token",b),v!=null&&m.searchParams.set("is_new_user",String(v)),window.location.href=m.toString()},f=setInterval(()=>{l.closed&&c()},500);window.addEventListener("message",u)}function vie(e,t,n,r){let i=null;const a=()=>{i=null};let o=!!r.token;return{hasToken(){return o},async me(){const l=i??e.get(`/apps/${n}/entities/User/me`).finally(()=>{i===l&&(i=null)});return i=l,l},async updateMe(l){return e.put(`/apps/${n}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=l?new URL(l,window.location.origin).toString():window.location.href,u=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=u},loginWithProvider(l,c="/"){const u=new URL(c,window.location.origin).toString(),f=`app_id=${n}&from_url=${encodeURIComponent(u)}`;let d;l==="sso"?d=`/apps/${n}/auth/sso/login`:d=`/apps/auth${l==="google"?"":`/${l}`}/login`;const p=`${r.appBaseUrl}/api${d}?${f}`;if(mie()){const m=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return gie(m,u,window.location.origin)}window.location.href=p},logout(l){if(delete e.defaults.headers.common.Authorization,a(),hI(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(f){console.error("Failed to remove token from localStorage:",f)}const c=l||window.location.href,u=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=u}},setToken(l,c=!0){if(l&&(a(),hI(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${l}`,t.defaults.headers.common.Authorization=`Bearer ${l}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(u){console.error("Failed to save token to localStorage:",u)}},async loginViaEmailPassword(l,c,u){var f;try{const d=await e.post(`/apps/${n}/auth/login`,{email:l,password:c,...u&&{turnstile_token:u}}),{access_token:p,user:m}=d;return p&&this.setToken(p),{access_token:p,user:m}}catch(d){throw((f=d.response)===null||f===void 0?void 0:f.status)===401&&await this.logout(),d}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,c){return e.post(`/apps/${n}/users/invite-user`,{user_email:l,role:c})},register(l){return e.post(`/apps/${n}/auth/register`,l)},verifyOtp({email:l,otpCode:c}){return e.post(`/apps/${n}/auth/verify-otp`,{email:l,otp_code:c})},resendOtp(l){return e.post(`/apps/${n}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return e.post(`/apps/${n}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:c}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:l,new_password:c})},changePassword({userId:l,currentPassword:c,newPassword:u}){return e.post(`/apps/${n}/auth/change-password`,{user_id:l,current_password:c,new_password:u})}}}function yie(e,t){return{async getAccessToken(n){const r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)},async getIdToken(n){const r=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(r)}}}const xie=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);
555function bie(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var r;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getWorkspaceConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var r;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const a=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:a.access_token,connectionConfig:(r=a.connection_config)!==null&&r!==void 0?r:null}},async callApi(n,r){return Wq(n,"Integration type"),wie(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,r)}}}function Wq(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function wie(e,t,n){var r,i,a,o,l,c,u,f,d;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");Wq(n.path,"Request path");const p=(r=n.method)!==null&&r!==void 0?r:"GET";if(!xie.has(p))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const b=await e.post(t,{method:p,...n.host==null?{}:{host:n.host},path:n.path,query:(i=n.query)!==null&&i!==void 0?i:{},headers:(a=n.headers)!==null&&a!==void 0?a:{},body:(o=n.body)!==null&&o!==void 0?o:null});return{success:b.success,phase:b.phase,status:(l=b.status_code)!==null&&l!==void 0?l:null,data:b.data,dataBase64:(c=b.data_base64)!==null&&c!==void 0?c:null,contentType:(u=b.content_type)!==null&&u!==void 0?u:null,headers:(f=b.headers)!==null&&f!==void 0?f:{},creditsCharged:(d=b.credits_charged)!==null&&d!==void 0?d:0}}function _ie(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function io(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:r=!0,removeFromUrl:i=!0}=e;let a=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(a=o.get(n),a){if(r&&Vq(a,{storageKey:t}),i){o.delete(n);const l=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return a}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function Vq(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(r){return console.error("Error saving token to local storage:",r),!1}}function Sie(e){const{storageKey:t="base44_access_token"}=e;if(typeof window>"u"||!window.localStorage)return!1;try{return window.localStorage.removeItem(t),!0}catch(n){return console.error("Error removing token from local storage:",n),!1}}function jie(e,t){const{serverUrl:n,appId:r,loginPath:i="/login"}=t;if(!n||!r)throw new Error("serverUrl and appId are required to construct login URL");const a=encodeURIComponent(e||(typeof window<"u"?window.location.href:""));return`${n}${i}?from_url=${a}&app_id=${r}`}function Nie({axios:e,serviceRoleAxios:t,appId:n,serverUrl:r,functionsVersion:i,platformHeaders:a}){const o=new Headers(a),l=c=>{const u=c.defaults.headers.common.Authorization;return typeof u=="string"&&u.startsWith("Bearer ")?u:null};return async function(u,f={}){Eie(u);const{fetch:d=fetch,...p}=f,m=new Headers(f.headers),b=(v,y)=>{y&&!m.has(v)&&m.set(v,y)};return b("Authorization",l(e)),b("Base44-Service-Authorization",l(t)),b("Base44-App-Id",n),b("Base44-Api-Url",r),b("Base44-Functions-Version",i),b("Base44-State",o.get("Base44-State")),b("X-Data-Env",o.get("X-Data-Env")),d(u,{...p,headers:m})}}function Eie(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it â pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function yI(e,t,n){const r=(a,o)=>a?`${String(a).replace(/\/$/,"")}${o}`:o,i=a=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const l=n.getAuthHeaders();Object.entries(l).forEach(([c,u])=>{u!=null&&o.set(c,String(u))})}
555return a&&new Headers(a).forEach((l,c)=>{o.set(c,l)}),o};return{async invoke(a,o){if(typeof o=="string")throw new Error(`Function ${a} must receive an object with named parameters, received: ${o}`);let l,c;return o instanceof FormData||o&&Object.values(o).some(u=>u instanceof File)?(l=new FormData,Object.keys(o).forEach(u=>{o[u]instanceof File?l.append(u,o[u],o[u].name):typeof o[u]=="object"&&o[u]!==null?l.append(u,JSON.stringify(o[u])):l.append(u,o[u])}),c="multipart/form-data"):(l=o,c="application/json"),e.post(`/apps/${t}/functions/${a}`,l||o,{headers:{"Content-Type":c}})},async fetch(a,o={}){const c=`/functions${a.startsWith("/")?a:`/${a}`}`,u=i(o.headers),f={...o,headers:u};return await fetch(r(n==null?void 0:n.baseURL,c),f)}}}function xI({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){const a=`/apps/${n}/agents`,o={},l=()=>e.get(`${a}/conversations`),c=v=>e.get(`${a}/conversations/${v}`);return{getConversations:l,getConversation:c,listConversations:v=>e.get(`${a}/conversations`,{params:v}),createConversation:v=>e.post(`${a}/conversations`,v),addMessage:async(v,y)=>e.post(`${a}/conversations/v2/${v.id}/messages`,y),subscribeToConversation:(v,y)=>{const x=`/agent-conversations/${v}`,_=t(),S=c(v).then(w=>(o[v]=w,w));return _.subscribeToRoom(x,{connect:()=>{},update_model:async({data:w})=>{const N=JSON.parse(w);if(N._message){await S;const k=N._message,C=o[v];if(C){const P=C.messages||[],L=P.findIndex(A=>A.id===k.id),T=L!==-1?P.map((A,R)=>R===L?k:A):[...P,k];o[v]={...C,messages:T},y==null||y(o[v])}}}})},getWhatsAppConnectURL:v=>{const y=`${r}/api/apps/${n}/agents/${encodeURIComponent(v)}/whatsapp`,x=i??io();return x?`${y}?token=${x}`:y},getTelegramConnectURL:v=>{const y=`${r}/api/apps/${n}/agents/${encodeURIComponent(v)}/telegram`,x=i??io();return x?`${y}?token=${x}`:y}}}function bI({serverUrl:e,token:t,appId:n}){return{connection:()=>{var i;return{baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:(i=t??io())!==null&&i!==void 0?i:""}}}}function wI(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(r){await e.post(`${n}/log-user-in-app/${r}`)},async fetchLogs(r={}){return await e.get(n,{params:r})},async getStats(r={}){return await e.get(`${n}/stats`,{params:r})}}}function kie(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function Oie(e,t){return{async inviteUser(n,r){if(r!=="user"&&r!=="admin")throw new Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}const Ra=Object.create(null);Ra.open="0";Ra.close="1";Ra.ping="2";Ra.pong="3";Ra.message="4";Ra.upgrade="5";Ra.noop="6";const qg=Object.create(null);Object.keys(Ra).forEach(e=>{qg[Ra[e]]=e});const QN={type:"error",data:"parser error"},Gq=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Kq=typeof ArrayBuffer=="function",Yq=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,TO=({type:e,data:t},n,r)=>Gq&&t instanceof Blob?n?r(t):_I(t,r):Kq&&(t instanceof ArrayBuffer||Yq(t))?n?r(t):_I(new Blob([t]),r):r(Ra[e]+(t||"")),_I=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function SI(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let vw;function Cie(e,t){if(Gq&&e.data instanceof Blob)return e.data.arrayBuffer().then(SI).then(t);if(Kq&&(e.data instanceof ArrayBuffer||Yq(e.data)))return t(SI(e.data));TO(e,!1,n=>{vw||(vw=new TextEncoder),t(vw.encode(n))})}const jI="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ef=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<jI.length;e++)Ef[jI.charCodeAt(e)]=e;const Aie=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),f=new Uint8Array(u);for(r=0;r<n;r+=4)a=Ef[e.charCodeAt(r)],o=Ef[e.charCodeAt(r+1)],l=Ef[e.charCodeAt(r+2)],c=Ef[e.charCodeAt(r+3)],f[i++]=a<<2|o>>4,f[i++]=(o&15)<<4|l>>2,f[i++]=(l&3)<<6|c&63;return u},Pie=typeof ArrayBuffer=="function",RO=(e,t)=>
vendor: 4,483 bytes, line 555
555{if(typeof e!="string")return{type:"message",data:Qq(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Tie(e.substring(1),t)}:qg[n]?e.length>1?{type:qg[n],data:e.substring(1)}:{type:qg[n]}:QN},Tie=(e,t)=>{if(Pie){const n=Aie(e);return Qq(n,t)}else return{base64:!0,data:e}},Qq=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Xq="�",Rie=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((a,o)=>{TO(a,!1,l=>{r[o]=l,++i===n&&t(r.join(Xq))})})},Iie=(e,t)=>{const n=e.split(Xq),r=[];for(let i=0;i<n.length;i++){const a=RO(n[i],t);if(r.push(a),a.type==="error")break}return r};function Mie(){return new TransformStream({transform(e,t){Cie(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const a=new DataView(i.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{i=new Uint8Array(9);const a=new DataView(i.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let yw;function Jm(e){return e.reduce((t,n)=>t+n.length,0)}function eg(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Die(e,t){yw||(yw=new TextDecoder);const n=[];let r=0,i=-1,a=!1;return new TransformStream({transform(o,l){for(n.push(o);;){if(r===0){if(Jm(n)<1)break;const c=eg(n,1);a=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Jm(n)<2)break;const c=eg(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Jm(n)<8)break;const c=eg(n,8),u=new DataView(c.buffer,c.byteOffset,c.length),f=u.getUint32(0);if(f>Math.pow(2,21)-1){l.enqueue(QN);break}i=f*Math.pow(2,32)+u.getUint32(4),r=3}else{if(Jm(n)<i)break;const c=eg(n,i);l.enqueue(RO(a?c:yw.decode(c),t)),r=0}if(i===0||i>e){l.enqueue(QN);break}}}})}const Zq=4;function Pn(e){if(e)return Lie(e)}function Lie(e){for(var t in Pn.prototype)e[t]=Pn.prototype[t];return e}Pn.prototype.on=Pn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Pn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Pn.prototype.off=Pn.prototype.removeListener=Pn.prototype.removeAllListeners=Pn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Pn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};Pn.prototype.emitReserved=Pn.prototype.emit;Pn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Pn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const By=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ki=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),$ie="arraybuffer";function Jq(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Fie=ki.setTimeout,Bie=ki.clearTimeout;function qy(e,t){t.useNativeTimers?(e.setTimeoutFn=Fie.bind(ki),e.clearTimeoutFn=Bie.bind(ki)):(e.setTimeoutFn=ki.setTimeout.bind(ki),e.clearTimeoutFn=ki.clearTimeout.bind(ki))}const qie=1.33;function Uie(e){return typeof e=="string"?zie(e):Math.ceil((e.byteLength||e.size)*qie)}function zie(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function e8(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Hie(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Wie(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let a=n[r].split("=");
vendor: 6,278 bytes, line 555
555t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class Vie extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class IO extends Pn{constructor(t){super(),this.writable=!1,qy(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Vie(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=RO(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Hie(t);return n.length?"?"+n:""}}class Gie extends IO{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Iie(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Rie(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=e8()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let t8=!1;try{t8=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Kie=t8;function Yie(){}class Qie extends Gie{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,a)=>{this.onError("xhr post error",i,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ca extends Pn{constructor(t,n,r){super(),this.createRequest=t,qy(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Jq(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Ca.requestsCount++,Ca.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Yie,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ca.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ca.requestsCount=0;Ca.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",NI);else if(typeof addEventListener=="function"){const e="onpagehide"in ki?"pagehide":"unload";addEventListener(e,NI,!1)}}function NI(){for(let e in Ca.requests)Ca.requests.hasOwnProperty(e)&&Ca.requests[e].abort()}const Xie=(function(){const e=n8({xdomain:!1});return e&&e.responseType!==null})();class Zie extends Qie{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Xie&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ca(n8,this.uri(),t)}}function n8(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Kie))return new XMLHttpRequest}catch{}if(!t)try{return new ki[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const r8=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Jie extends IO{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=r8?{}:Jq(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}
vendor: 10,345 bytes, line 555
555this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;TO(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch{}i&&By(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=e8()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const xw=ki.WebSocket||ki.MozWebSocket;class eae extends Jie{createSocket(t,n,r){return r8?new xw(t,n,r):n?new xw(t,n):new xw(t)}doWrite(t,n){this.ws.send(n)}}class tae extends IO{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Die(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Mie();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const a=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),a())}).catch(l=>{})};a();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&By(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const nae={websocket:eae,webtransport:tae,polling:Zie},rae=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,iae=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function XN(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=rae.exec(e||""),a={},o=14;for(;o--;)a[iae[o]]=i[o]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=aae(a,a.path),a.queryKey=oae(a,a.query),a}function aae(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function oae(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,a){i&&(n[i]=a)}),n}const ZN=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ug=[];ZN&&addEventListener("offline",()=>{Ug.forEach(e=>e())},!1);class ss extends Pn{constructor(t,n){if(super(),this.binaryType=$ie,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=XN(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=XN(n.host).host);qy(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Wie(this.opts.query)),ZN&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ug.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Zq,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&ss.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",ss.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=Uie(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,By(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(ss.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),ZN&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ug.indexOf(this._offlineEventListener);r!==-1&&Ug.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ss.protocol=Zq;class sae extends ss{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;ss.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ss.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}
vendor: 11,056 bytes, line 555
555]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function a(){r||(r=!0,f(),n.close(),n=null)}const o=d=>{const p=new Error("probe error: "+d);p.transport=n.name,a(),this.emitReserved("upgradeError",p)};function l(){o("transport closed")}function c(){o("socket closed")}function u(d){n&&d.name!==n.name&&a()}const f=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",l),this.off("close",c),this.off("upgrading",u)};n.once("open",i),n.once("error",o),n.once("close",l),this.once("close",c),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let lae=class extends sae{constructor(t,n={}){const r=typeof t=="object",i=r?{...t}:{...n};(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(a=>nae[a]).filter(a=>!!a)),super(r?i:t,i)}};function cae(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=XN(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const uae=typeof ArrayBuffer=="function",dae=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,i8=Object.prototype.toString,fae=typeof Blob=="function"||typeof Blob<"u"&&i8.call(Blob)==="[object BlobConstructor]",hae=typeof File=="function"||typeof File<"u"&&i8.call(File)==="[object FileConstructor]";function MO(e){return uae&&(e instanceof ArrayBuffer||dae(e))||fae&&e instanceof Blob||hae&&e instanceof File}function zg(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(zg(e[n]))return!0;return!1}if(MO(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return zg(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&zg(e[n]))return!0;return!1}function pae(e){const t=[],n=e.data,r=e;return r.data=Hg(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Hg(e,t,n){if(!e)return e;if(MO(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let i=0;i<e.length;i++)r[i]=Hg(e[i],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Hg(e.toJSON(),t,!0);const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=Hg(e[i],t));return r}return e}function mae(e,t){return e.data=JN(e.data,t),delete e.attachments,e}function JN(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=JN(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=JN(e[n],t));return e}const a8=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gae=5;var vt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(vt||(vt={}));class vae{constructor(t){this.replacer=t}encode(t){return(t.type===vt.EVENT||t.type===vt.ACK)&&zg(t)?this.encodeAsBinary({type:t.type===vt.EVENT?vt.BINARY_EVENT:vt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===vt.BINARY_EVENT||t.type===vt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=pae(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class DO extends Pn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===vt.BINARY_EVENT;r||n.type===vt.BINARY_ACK?(n.type=r?vt.EVENT:vt.ACK,this.reconstructor=new yae(n)):super.emitReserved("decoded",n)}else if(MO(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(vt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===vt.BINARY_EVENT||r.type===vt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(a,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(o);if(!o8(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const a=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(DO.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case vt.CONNECT:return lv(n);case vt.DISCONNECT:return n===void 0;case vt.CONNECT_ERROR:return typeof n=="string"||lv(n);case vt.EVENT:case vt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&a8.indexOf(n[0])===-1);case vt.ACK:case vt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yae{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=mae(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function xae(e){return typeof e=="string"}const o8=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function bae(e){return e===void 0||o8(e)}function lv(e){return Object.prototype.toString.call(e)==="[object Object]"}function wae(e,t){switch(e){case vt.CONNECT:return t===void 0||lv(t);case vt.DISCONNECT:return t===void 0;case vt.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&a8.indexOf(t[0])===-1);case vt.ACK:return Array.isArray(t);case vt.CONNECT_ERROR:return typeof t=="string"||lv(t);default:return!1}}function _ae(e){return xae(e.nsp)&&bae(e.id)&&wae(e.type,e.data)}const Sae=Object.freeze(Object.defineProperty({__proto__:null,Decoder:DO,Encoder:vae,get PacketType(){return vt},isPacketValid:_ae,protocol:gae},Symbol.toStringTag,{value:"Module"}));function na(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const jae=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class s8 extends Pn{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[na(t,"open",this.onopen.bind(this)),na(t,"packet",this.onpacket.bind(this)),na(t,"error",this.onerror.bind(this)),na(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,a;if(jae.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:vt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,d=n.pop();this._registerAckCallback(f,d),o.id=f}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),o=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,i)=>{const a=(o,l)=>o?i(o):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...a)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:vt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,089 bytes, line 555
555_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case vt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case vt.EVENT:case vt.BINARY_EVENT:this.onevent(t);break;case vt.ACK:case vt.BINARY_ACK:this.onack(t);break;case vt.DISCONNECT:this.ondisconnect();break;case vt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:vt.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:vt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Gu(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Gu.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Gu.prototype.reset=function(){this.attempts=0};Gu.prototype.setMin=function(e){this.ms=e};Gu.prototype.setMax=function(e){this.max=e};Gu.prototype.setJitter=function(e){this.jitter=e};class eE extends Pn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,qy(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Gu({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Sae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new lae(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=na(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=na(n,"error",a);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{i(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(na(t,"ping",this.onping.bind(this)),na(t,"data",this.ondata.bind(this)),na(t,"error",this.onerror.bind(this)),na(t,"close",this.onclose.bind(this)),na(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){By(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new s8(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}
555cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const nf={};function Wg(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=cae(e,t.path||"/socket.io"),r=n.source,i=n.id,a=n.path,o=nf[i]&&a in nf[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new eE(r,t):(nf[i]||(nf[i]=new eE(r,t)),c=nf[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Wg,{Manager:eE,Socket:s8,io:Wg,connect:Wg});const Nae=250;function EI(e,t){var n;const r=(n=e.token)!==null&&n!==void 0?n:io(),i={app_id:e.appId,token:r};r||(i.anonymous_id=sv());const a=Wg(e.serverUrl,{path:e.mountPath,transports:e.transports,query:i});return a.on("connect",async()=>{var o;return console.log("connect",a.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),a.on("update_model",async o=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,o)}),a.on("error",async o=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),a.on("connect_error",async o=>{var l;return console.error("connect_error",o),(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),a}function Eae({config:e}){let t={...e};const n={},r={},i={connect:async()=>{const x=[];Object.keys(n).forEach(_=>{const S=p(_);S.length!==0&&(u(_),S.forEach(({connect:w})=>{const N=async()=>w==null?void 0:w();x.push(N())}))}),await Promise.all(x)},update_model:async x=>{const S=p(x.room).map(w=>{var N;return(N=w.update_model)===null||N===void 0?void 0:N.call(w,x)});await Promise.all(S)},error:async x=>{console.error("error",x);const _=Object.values(n).flat().map(S=>{var w;return(w=S.error)===null||w===void 0?void 0:w.call(S,x)});await Promise.all(_)}};let a=EI(e,i);function o(){l()}function l(){b(),a&&a.disconnect()}function c(x){o(),t={...t,...x},a=EI(t,i)}function u(x){a.emit("join",x)}function f(x){a.emit("leave",x)}async function d(x,_){var S;const w=JSON.stringify(_);return(S=i.update_model)===null||S===void 0?void 0:S.call(i,{room:x,data:w})}function p(x){var _;return(_=n[x])!==null&&_!==void 0?_:[]}function m(x){const _=r[x];_&&(clearTimeout(_),delete r[x])}function b(){Object.keys(r).forEach(x=>{var _,S;clearTimeout(r[x]),delete r[x],((S=(_=n[x])===null||_===void 0?void 0:_.length)!==null&&S!==void 0?S:0)===0&&delete n[x]})}function v(x){m(x),r[x]=setTimeout(()=>{var _,S;delete r[x],!(((S=(_=n[x])===null||_===void 0?void 0:_.length)!==null&&S!==void 0?S:0)>0)&&(f(x),delete n[x])},Nae)}return{socket:a,subscribeToRoom:(x,_)=>
555{n[x]?m(x):(u(x),n[x]=[]),n[x].push(_);let S=!1;return()=>{var w,N;S||(S=!0,n[x]=(N=(w=n[x])===null||w===void 0?void 0:w.filter(k=>k!==_))!==null&&N!==void 0?N:[],n[x].length===0&&v(x))}},updateConfig:c,updateModel:d,disconnect:l}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` 556 PartySocket requires a global 'EventTarget' class to be available! 557 You can polyfill this global by adding this to your code before any partysocket imports: 558 559 \`\`\` 560 import 'partysocket/event-target-polyfill'; 561 \`\`\` 562 Please file an issue at https://github.com/partykit/partykit if you're still having trouble. 563`);var l8=class extends Event{constructor(t,n){super("error",n);Jt(this,"message");Jt(this,"error");this.message=t.message,this.error=t}},c8=class extends Event{constructor(t=1e3,n="",r){super("close",r);Jt(this,"code");Jt(this,"reason");Jt(this,"wasClean",!0);this.code=t,this.reason=n}},bw={Event,ErrorEvent:l8,CloseEvent:c8};function kae(e,t){if(!e)throw new Error(t)}function Oae(e){return new e.constructor(e.type,e)}function Cae(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new c8(e.code||1999,e.reason||"unknown reason",e):"error"in e?new l8(e.error,e):new Event(e.type,e)}var lB,Aae=typeof process<"u"&&typeof((lB=process.versions)==null?void 0:lB.node)<"u"&&typeof document>"u",tg=Aae?Cae:Oae,Vs={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},kI=!1,Pae=class Zs extends EventTarget{constructor(n,r,i={}){super();Jt(this,"_ws");Jt(this,"_retryCount",-1);Jt(this,"_uptimeTimeout");Jt(this,"_connectTimeout");Jt(this,"_shouldReconnect",!0);Jt(this,"_connectLock",!1);Jt(this,"_binaryType","blob");Jt(this,"_closeCalled",!1);Jt(this,"_messageQueue",[]);Jt(this,"_url");Jt(this,"_protocols");Jt(this,"_options");Jt(this,"onclose",null);Jt(this,"onerror",null);Jt(this,"onmessage",null);Jt(this,"onopen",null);Jt(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:r=Vs.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),r),kae(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{var a;return(a=this._ws)==null?void 0:a.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent(tg(n))});Jt(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent(tg(n))});Jt(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent(tg(n)),this._connect()});Jt(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent(tg(n))});this._url=n,this._protocols=r,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Zs.CONNECTING}get OPEN(){return Zs.OPEN}get CLOSING(){return Zs.CLOSING}get CLOSED(){return Zs.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,i)=>(typeof i=="string"?r+=i.length:i instanceof Blob?r+=i.size:r+=i.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Zs.CLOSED:Zs.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,r){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,r)}reconnect(n,r){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,r),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:r=Vs.maxEnqueuedMessages}=this._options;this._messageQueue.length<r&&(this._debug("enqueue",n),this._messageQueue.push(n))}}_debug(...n){this._options.debug&&console.log.apply(console,["RWS>",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=Vs.reconnectionDelayGrowFactor,minReconnectionDelay:r=Vs.minReconnectionDelay,maxReconnectionDelay:i=Vs.maxReconnectionDelay}=this._options;let a=0;return this._retryCount>0&&(a=r*Math.pow(n,this._retryCount-1),a>i&&(a=i)),this._debug("next delay",a),a}_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const r=n();if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(r.then)return r}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const r=n();if(typeof r=="string")return Promise.resolve(r);if(r.then)return r}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
563const{maxRetries:n=Vs.maxRetries,connectionTimeout:r=Vs.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,a])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!kI&&(console.error(`â¼ï¸ No WebSocket implementation available. You should define options.WebSocket. 564 565For example, if you're using node.js, run \`npm install ws\`, and then in your code: 566 567import PartySocket from 'partysocket'; 568import WS from 'ws'; 569 570const partysocket = new PartySocket({ 571 host: "127.0.0.1:1999", 572 room: "test-room", 573 WebSocket: WS 574}); 575 576`),kI=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:a}),this._ws=a?new o(i,a):new o(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),r)}).catch(i=>{this._connectLock=!1,this._handleError(new bw.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new bw.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,r){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,r),this._handleClose(new bw.CloseEvent(n,r,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! 577 * Reconnecting WebSocket 578 * by Pedro Ladaria <[email protected]> 579 * https://github.com/pladaria/reconnecting-websocket 580 * License MIT 581 */const Tae=1e3,Rae=3e3,Iae=new Set([405,409,422,503]),Mae=new Set([400,403,404]);function Dae(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function Lae(e){return e instanceof Error?e:new Error(String(e))}class $ae{constructor(t,n,r,i,a){var o;this.onClose=a,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=i==null?void 0:i.id)!==null&&o!==void 0?o:crypto.randomUUID();let l=r.transport==="proxy";const c=async()=>{var p;if(this.closed)throw new Error("Actor connection is closed");if(!l)try{const{websocket_url:m,token:b}=await r.mintConnectionToken(t,n,this.id),v=m.includes("?")?"&":"?";return`${m}${v}token=${encodeURIComponent(b)}`}catch(m){const b=Dae(m);if(!(r.transport!=="direct"&&b!==void 0&&Iae.has(b))){b!==void 0&&Mae.has(b)&&this.close();try{(p=r.onMintError)===null||p===void 0||p.call(r,Lae(m))}catch{}throw m}l=!0}return Bae(r.host,t,n,this.id,r.appId,r.getAuthToken(),r.functionsVersion)},u=new Pae(c);this.ws=u;let f=Date.now();const d=()=>{f=Date.now()};u.addEventListener("open",d),u.addEventListener("message",p=>{d();let m;try{m=JSON.parse(p.data)}catch{return}if((m&&typeof m=="object"?m.type:void 0)!=="__pong")for(const v of this.listeners)v(m)}),this.heartbeat=setInterval(()=>{if(Date.now()-f>Rae){d(),u.readyState===u.OPEN&&u.reconnect();return}try{u.send(JSON.stringify({type:"__ping"}))}catch{}},Tae)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function Fae(e,t,n,r){let i=null;return{connect(a){if(i)return i;const o=new $ae(e,t,n,a,()=>{r.delete(o),i===o&&(i=null)});return i=o,r.add(o),o}}}function Bae(e,t,n,r,i,a,o){let l=e.replace(/^(http|https|ws|wss):\/\//,"");l.endsWith("/")&&(l=l.slice(0,-1));const c=l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:"),u=new URLSearchParams([["_pk",r],["app_id",i],["handler",t]]);return a&&u.append("token",a),o&&u.append("fv",o),`${c?"ws":"wss"}://${l}/parties/${t}/${n}?${u}`}function qae(e,t){return e&&!e.startsWith("/")?e:t??e}function Uae(e){const t=new Set;return{module:new Proxy({}
581,{get(r,i){if(!(typeof i!="string"||i==="then"))return a=>Fae(i,a,e,t)}}),closeAll:()=>{for(const r of[...t])r.close()}}}function LO(e){var t,n,r,i;const{serverUrl:a="https://base44.app",appId:o,analytics:l,token:c,serviceToken:u,requiresAuth:f=!1,appBaseUrl:d,options:p,functionsVersion:m,headers:b}=e,v=typeof d=="string"?d:"",y={serverUrl:a,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:c};let x=null;const _=()=>(x||(x=Eae({config:y})),x),S={...b,"X-App-Id":String(o)},w=m?{...S,"Base44-Functions-Version":m}:S,N=Cc({baseURL:`${a}/api`,headers:S,token:c,onError:p==null?void 0:p.onError}),k=Cc({baseURL:`${a}/api`,headers:w,token:c,interceptResponses:!1,onError:p==null?void 0:p.onError}),C={...S,...c?{"on-behalf-of":`Bearer ${c}`}:{}},P=Cc({baseURL:`${a}/api`,headers:C,token:u,onError:p==null?void 0:p.onError}),L=Cc({baseURL:`${a}/api`,headers:w,token:u,interceptResponses:!1}),T=Cc({baseURL:`${a}/api`,headers:S}),A=vie(N,k,o,{appBaseUrl:v,token:c});if(typeof window<"u"){const W=c||io();W&&A.setToken(W)}const R=Uae({appId:o,host:qae(a,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:m,getAuthToken:()=>c||io(),mintConnectionToken:async(W,G,H)=>{const K=c||io();return await T.post(`/apps/${o}/actors/${encodeURIComponent(W)}/connection-token`,{room:G,connection_id:H},{headers:{...K?{Authorization:`Bearer ${K}`}:{},...m?{"Base44-Functions-Version":m}:{}}})},transport:p==null?void 0:p.actorsTransport,onMintError:p==null?void 0:p.onError}),I={entities:mI({axios:N,appId:o,getSocket:_}),integrations:vI(N,o),connectors:_ie(N,o),auth:A,functions:yI(k,o,{getAuthHeaders:()=>{const W={},G=c||io();return G&&(W.Authorization=`Bearer ${G}`),W},baseURL:(n=k.defaults)===null||n===void 0?void 0:n.baseURL}),agents:xI({axios:N,getSocket:_,appId:o,serverUrl:a,token:c}),aiGateway:bI({serverUrl:a,token:c,appId:o}),appLogs:wI(N,o),app:kie(N,o),users:Oie(N,o),analytics:rie({axiosClient:N,serverUrl:a,appId:o,userAuthModule:A,enabled:(r=l==null?void 0:l.enabled)!==null&&r!==void 0?r:!0}),actors:R.module,cleanup:()=>{I.analytics.cleanup(),R.closeAll(),x&&x.disconnect()}},M={entities:mI({axios:P,appId:o,getSocket:_}),integrations:vI(P,o),sso:yie(P,o),connectors:bie(P,o),functions:yI(L,o,{getAuthHeaders:()=>{const W={};return u&&(W.Authorization=`Bearer ${u}`),W},baseURL:(i=L.defaults)===null||i===void 0?void 0:i.baseURL}),agents:xI({axios:P,getSocket:_,appId:o,serverUrl:a,token:c}),aiGateway:bI({serverUrl:a,token:u,appId:o}),appLogs:wI(P,o),cleanup:()=>{x&&x.disconnect()}};return f&&typeof window<"u"&&setTimeout(async()=>{try{await I.auth.isAuthenticated()||I.auth.redirectToLogin(window.location.href)}catch(W){console.error("Authentication check failed:",W),I.auth.redirectToLogin(window.location.href)}},0),{...I,fetchWithAuth:Nie({axios:N,serviceRoleAxios:P,appId:String(o),serverUrl:a,functionsVersion:m,platformHeaders:b}),setToken(W){I.auth.setToken(W),x&&x.updateConfig({token:W}),y.token=W},getConfig(){return{serverUrl:a,appId:o,requiresAuth:f}},get asServiceRole(){if(!u)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return M}}}function zae(e){const t=e.headers.get("Authorization"),n=e.headers.get("Base44-Service-Authorization"),r=e.headers.get("Base44-App-Id"),i=e.headers.get("Base44-Api-Url"),a=e.headers.get("Base44-Functions-Version"),o=e.headers.get("Base44-State"),l=e.headers.get("X-Data-Env");if(!r)throw new Error("Base44-App-Id header is required, but is was not found on the request");let c,u;if(n!==null){if(n===""||!n.startsWith("Bearer ")||n.split(" ").length!==2)throw new Error('Invalid authorization header format. Expected "Bearer <token>"');c=n.split(" ")[1]}if(t!==null){if(t===""||!t.startsWith("Bearer ")||t.split(" ").length!==2)throw new Error('Invalid authorization header format. Expected "Bearer <token>"');u=t.split(" ")[1]}const f={};return o&&(f["Base44-State"]=o),(l==="dev"||l==="prod")&&(f["X-Data-Env"]=l),LO({serverUrl:i||"https://base44.app",appId:r,token:u,serviceToken:c,functionsVersion:a??void 0,headers:f})}class Hae{constructor(){this.tickIntervalMs=100}handleStart(){}handleWake(t){}schedule(t,n){throw new Error("Actor.schedule() is only available inside a deployed actor")}cancelSchedule(t){throw new Error("Actor.cancelSchedule() is only available inside a deployed actor")}broadcast(t){throw new Error("Actor.broadcast() is only available inside a deployed actor")}getConnections(){throw new Error("Actor.getConnections() is only available inside a deployed actor")}get instanceId(){throw new Error("Actor.instanceId is only available inside a deployed actor")}get storage(){throw new Error("Actor.storage is only available inside a deployed actor")}get client(){throw new Error("Actor.client is only available inside a deployed actor")}}const Wae=Object.freeze(Object.defineProperty({__proto__:null,Actor:Hae,Base44Error:Hq,createClient:LO,createClientFromRequest:zae,getAccessToken:io,getLoginUrl:jie,removeAccessToken:Sie,saveAcce
581ssToken:Vq},Symbol.toStringTag,{value:"Module"})),u8=typeof window>"u",Vae=u8?{localStorage:new Map}:window,Df=Vae.localStorage,Gae=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),xc=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(u8)return t;const r=`base44_${Gae(e)}`,i=new URLSearchParams(window.location.search),a=i.get(e);if(n){i.delete(e);const l=`${window.location.pathname}${i.toString()?`?${i.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(a)return Df.setItem(r,a),a;if(t)return Df.setItem(r,t),t;const o=Df.getItem(r);return o||null},Kae=()=>(xc("clear_access_token")==="true"&&(Df.removeItem("base44_access_token"),Df.removeItem("token")),{appId:xc("app_id",{defaultValue:"696f865eaed283c6951e030b"}),token:xc("access_token",{removeFromUrl:!0}),fromUrl:xc("from_url",{defaultValue:window.location.href}),functionsVersion:xc("functions_version",{defaultValue:"prod"}),appBaseUrl:xc("app_base_url",{defaultValue:void 0})}),kf={...Kae()},{appId:Yae,token:Qae,functionsVersion:Xae,appBaseUrl:Zae}=kf,ve=LO({appId:Yae,token:Qae,functionsVersion:Xae,serverUrl:"",requiresAuth:!1,appBaseUrl:Zae}),d8=E.createContext(),Jae=({children:e})=>{const[t,n]=E.useState(null),[r,i]=E.useState(!1),[a,o]=E.useState(!0),[l,c]=E.useState(!0),[u,f]=E.useState(null),[d,p]=E.useState(null);E.useEffect(()=>{m()},[]);const m=async()=>{var x,_;try{c(!0),f(null);const S=Cc({baseURL:"/api/apps/public",headers:{"X-App-Id":kf.appId},token:kf.token,interceptResponses:!0});try{const w=await S.get(`/prod/public-settings/by-id/${kf.appId}`);p(w),kf.token?await b():(o(!1),i(!1)),c(!1)}catch(w){if(console.error("App state check failed:",w),w.status===403&&((_=(x=w.data)==null?void 0:x.extra_data)!=null&&_.reason)){const N=w.data.extra_data.reason;f(N==="auth_required"?{type:"auth_required",message:"Authentication required"}:N==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:N,message:w.message})}else f({type:"unknown",message:w.message||"Failed to load app"});c(!1),o(!1)}}catch(S){console.error("Unexpected error:",S),f({type:"unknown",message:S.message||"An unexpected error occurred"}),c(!1),o(!1)}},b=async()=>{try{o(!0);const x=await ve.auth.me();n(x),i(!0),o(!1)}catch(x){console.error("User auth check failed:",x),o(!1),i(!1),(x.status===401||x.status===403)&&f({type:"auth_required",message:"Authentication required"})}},v=(x=!0)=>{n(null),i(!1),x?ve.auth.logout(window.location.href):ve.auth.logout()},y=()=>{ve.auth.redirectToLogin(window.location.href)};return s.jsx(d8.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:a,isLoadingPublicSettings:l,authError:u,appPublicSettings:d,logout:v,navigateToLogin:y,checkAppState:m},children:e})},$O=()=>{const e=E.useContext(d8);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},yt=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("rounded-xl border bg-card text-card-foreground shadow",e),...t}));yt.displayName="Card";const wn=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("flex flex-col space-y-1.5 p-6",e),...t}));wn.displayName="CardHeader";const _n=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("font-semibold leading-none tracking-tight",e),...t}));_n.displayName="CardTitle";const f8=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("text-sm text-muted-foreground",e),...t}));f8.displayName="CardDescription";const It=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("p-6 pt-0",e),...t}));It.displayName="CardContent";const eoe=E.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:et("flex items-center p-6 pt-0",e),...t}));eoe.displayName="CardFooter";const Te=E.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:et("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Te.displayName="Input";function OI(e,t){if(typeof e=="function")return e(t);
vendor: 18,034 bytes, line 581
581e!=null&&(e.current=t)}function Uy(...e){return t=>{let n=!1;const r=e.map(i=>{const a=OI(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():OI(e[i],null)}}}}function At(...e){return E.useCallback(Uy(...e),e)}function ms(e){const t=noe(e),n=E.forwardRef((r,i)=>{const{children:a,...o}=r,l=E.Children.toArray(a),c=l.find(ioe);if(c){const u=c.props.children,f=l.map(d=>d===c?E.Children.count(u)>1?E.Children.only(null):E.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...o,ref:i,children:E.isValidElement(u)?E.cloneElement(u,void 0,f):null})}return s.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var toe=ms("Slot");function noe(e){const t=E.forwardRef((n,r)=>{const{children:i,...a}=n;if(E.isValidElement(i)){const o=ooe(i),l=aoe(a,i.props);return i.type!==E.Fragment&&(l.ref=r?Uy(r,o):o),E.cloneElement(i,l)}return E.Children.count(i)>1?E.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var roe=Symbol("radix.slottable");function ioe(e){return E.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===roe}function aoe(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function ooe(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)}const soe=ap("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),be=E.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?toe:"button";return s.jsx(o,{className:et(soe({variant:t,size:n,className:e})),ref:a,...i})});be.displayName="Button";const loe=ap("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Rt({className:e,variant:t,...n}){return s.jsx("div",{className:et(loe({variant:t}),e),...n})}function Ge(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 coe(e,t){const n=E.createContext(t),r=a=>{const{children:o,...l}=a,c=E.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=E.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function di(e,t=[]){let n=[];function r(a,o){const l=E.createContext(o),c=n.length;n=[...n,o];const u=d=>{var x;const{scope:p,children:m,...b}=d,v=((x=p==null?void 0:p[e])==null?void 0:x[c])||l,y=E.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:y,children:m})};u.displayName=a+"Provider";function f(d,p){var v;const m=((v=p==null?void 0:p[e])==null?void 0:v[c])||l,b=E.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const i=()=>{const a=n.map(o=>E.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return E.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[r,uoe(i,...t)]}function uoe(...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(a){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...l,...d}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var ar=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},doe=cO[" useId ".trim().toString()]||(()=>{}),foe=0;function Ri(e){const[t,n]=E.useState(doe());return ar(()=>{n(r=>r??String(foe++))},[e]),t?`radix-${t}`:""}var hoe=cO[" useInsertionEffect ".trim().toString()]||ar;function Wr({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=poe({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const f=E.useRef(e!==void 0);E.useEffect(()=>{const d=f.current;d!==l&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${l?"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.`),f.current=l},[l,r])}const u=E.useCallback(f=>{var d;if(l){const p=moe(f)?f(e):f;p!==e&&((d=o.current)==null||d.call(o,p))}else a(f)},[l,e,a,o]);return[c,u]}function poe({defaultProp:e,onChange:t}){const[n,r]=E.useState(e),i=E.useRef(n),a=E.useRef(t);return hoe(()=>{a.current=t},[t]),E.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function moe(e){return typeof e=="function"}var goe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ut=goe.reduce((e,t)=>{const n=ms(`Primitive.${t}`),r=E.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function h8(e,t){e&&Ll.flushSync(()=>e.dispatchEvent(t))}function Ia(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function voe(e,t=globalThis==null?void 0:globalThis.document){const n=Ia(e);E.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 yoe="DismissableLayer",tE="dismissableLayer.update",xoe="dismissableLayer.pointerDownOutside",boe="dismissableLayer.focusOutside",CI,p8=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mp=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,u=E.useContext(p8),[f,d]=E.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=E.useState({}),b=At(t,C=>d(C)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(y),_=f?v.indexOf(f):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,w=_>=x,N=Soe(C=>{const P=C.target,L=[...u.branches].some(T=>T.contains(P));!w||L||(i==null||i(C),o==null||o(C),C.defaultPrevented||l==null||l())},p),k=joe(C=>{const P=C.target;[...u.branches].some(T=>T.contains(P))||(a==null||a(C),o==null||o(C),C.defaultPrevented||l==null||l())},p);return voe(C=>{_===u.layers.size-1&&(r==null||r(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},p),E.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(CI=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),AI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=CI)}},[f,p,n,u]),E.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),AI())},[f,u]),E.useEffect(()=>{const C=()=>m({});return document.addEventListener(tE,C),()=>document.removeEventListener(tE,C)},[]),s.jsx(ut.div,{...c,ref:b,style:{pointerEvents:S?w?"auto":"none":void 0,...e.style},onFocusCapture:Ge(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ge(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ge(e.onPointerDownCapture,N.onPointerDownCapture)})});mp.displayName=yoe;var woe="DismissableLayerBranch",_oe=E.forwardRef((e,t)=>{const n=E.useContext(p8),r=E.useRef(null),i=At(t,r);return E.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx(ut.div,{...e,ref:i})});_oe.displayName=woe;function Soe(e,t=globalThis==null?void 0:globalThis.document){const n=Ia(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){m8(xoe,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function joe(e,t=globalThis==null?void 0:globalThis.document){const n=Ia(e),r=E.useRef(!1);return E.useEffect(()=>{const i=a=>{a.target&&!r.current&&m8(boe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function AI(){const e=new CustomEvent(tE);document.dispatchEvent(e)}function m8(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?h8(i,a):i.dispatchEvent(a)}var ww="focusScope.autoFocusOnMount",_w="focusScope.autoFocusOnUnmount",PI={bubbles:!1,cancelable:!0},Noe="FocusScope",gp=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,c]=E.useState(null),u=Ia(i),f=Ia(a),d=E.useRef(null),p=At(t,v=>c(v)),m=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let v=function(S){if(m.paused||!l)return;const w=S.target;l.contains(w)?d.current=w:Wo(d.current,{select:!0})},y=function(S){if(m.paused||!l)return;const w=S.relatedTarget;w!==null&&(l.contains(w)||Wo(d.current,{select:!0}))},x=function(S){if(document.activeElement===document.body)for(const N of S)N.removedNodes.length>0&&Wo(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const _=new MutationObserver(x);return l&&_.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),_.disconnect()}}},[r,l,m.paused]),E.useEffect(()=>{if(l){RI.add(m);const v=document.activeElement;if(!l.contains(v)){const x=new CustomEvent(ww,PI);l.addEventListener(ww,u),l.dispatchEvent(x),x.defaultPrevented||(Eoe(Poe(g8(l)),{select:!0}),document.activeElement===v&&Wo(l))}return()=>{l.removeEventListener(ww,u),setTimeout(()=>{const x=new CustomEvent(_w,PI);l.addEventListener(_w,f),l.dispatchEvent(x),x.defaultPrevented||Wo(v??document.body,{select:!0}),l.removeEventListener(_w,f),RI.remove(m)},0)}}},[l,u,f,m]);const b=E.useCallback(v=>{if(!n&&!r||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const _=v.currentTarget,[S,w]=koe(_);S&&w?!v.shiftKey&&x===w?(v.preventDefault(),n&&Wo(S,{select:!0})):v.shiftKey&&x===S&&(v.preventDefault(),n&&Wo(w,{select:!0})):x===_&&v.preventDefault()}},[n,r,m.paused]);return s.jsx(ut.div,{tabIndex:-1,...o,ref:p,onKeyDown:b})});gp.displayName=Noe;function Eoe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Wo(r,{select:t}),document.activeElement!==n)return}function koe(e){const t=g8(e),n=TI(t,e),r=TI(t.reverse(),e);return[n,r]}function g8(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 TI(e,t){for(const n of e)if(!Ooe(n,{upTo:t}))return n}function Ooe(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 Coe(e){return e instanceof HTMLInputElement&&"select"in e}function Wo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Coe(e)&&t&&e.select()}}var RI=Aoe();function Aoe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=II(e,t),e.unshift(t)},remove(t){var n;e=II(e,t),(n=e[0])==null||n.resume()}}}function II(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Poe(e){return e.filter(t=>t.tagName!=="A")}var Toe="Portal",vp=E.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,a]=E.useState(!1);ar(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?ZB.createPortal(s.jsx(ut.div,{...r,ref:t}),o):null});vp.displayName=Toe;function Roe(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var Bi=e=>{const{present:t,children:n}=e,r=Ioe(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),a=At(r.ref,Moe(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:a}):null};Bi.displayName="Presence";function Ioe(e){const[t,n]=E.useState(),r=E.useRef(null),i=E.useRef(e),a=E.useRef("none"),o=e?"mounted":"unmounted",[l,c]=Roe(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const u=ng(r.current);a.current=l==="mounted"?u:"none"},[l]),ar(()=>{const u=r.current,f=i.current;if(f!==e){const p=a.current,m=ng(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ar(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=m=>{const v=ng(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(c("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=m=>{m.target===t&&(a.current=ng(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:E.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function ng(e){return(e==null?void 0:e.animationName)||"none"}function Moe(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 Sw=0;function zy(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??MI()),document.body.insertAdjacentElement("beforeend",e[1]??MI()),Sw++,()=>{Sw===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sw--}},[])}function MI(){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 _a=function(){return _a=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},_a.apply(this,arguments)};function v8(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 Doe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Vg="right-scroll-bar-position",Gg="width-before-scroll-bar",Loe="with-scroll-bars-hidden",$oe="--removed-body-scroll-bar-size";function jw(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Foe(e,t){var n=E.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 Boe=typeof window<"u"?E.useLayoutEffect:E.useEffect,DI=new WeakMap;function qoe(e,t){var n=Foe(null,function(r){return e.forEach(function(i){return jw(i,r)})});return Boe(function(){var r=DI.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;
vendor: 4,224 bytes, lines 581-596
581i.forEach(function(l){a.has(l)||jw(l,null)}),a.forEach(function(l){i.has(l)||jw(l,o)})}DI.set(n,e)},[e]),n}function Uoe(e){return e}function zoe(e,t){t===void 0&&(t=Uoe);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(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var c=function(){var f=o;o=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){o.push(f),u()},filter:function(f){return o=o.filter(f),n}}}};return i}function Hoe(e){e===void 0&&(e={});var t=zoe(null);return t.options=_a({async:!0,ssr:!1},e),t}var y8=function(e){var t=e.sideCar,n=v8(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 E.createElement(r,_a({},n))};y8.isSideCarExport=!0;function Woe(e,t){return e.useMedium(t),y8}var x8=Hoe(),Nw=function(){},Hy=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:Nw,onWheelCapture:Nw,onTouchMoveCapture:Nw}),i=r[0],a=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,y=e.allowPinchZoom,x=e.as,_=x===void 0?"div":x,S=e.gapMode,w=v8(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=p,k=qoe([n,t]),C=_a(_a({},w),i);return E.createElement(E.Fragment,null,f&&E.createElement(N,{sideCar:x8,removeScrollBar:u,shards:d,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:S}),o?E.cloneElement(E.Children.only(l),_a(_a({},C),{ref:k})):E.createElement(_,_a({},C,{className:c,ref:k}),l))});Hy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Hy.classNames={fullWidth:Gg,zeroRight:Vg};var Voe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Goe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Voe();return t&&e.setAttribute("nonce",t),e}function Koe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Yoe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Qoe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Goe())&&(Koe(t,n),Yoe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xoe=function(){var e=Qoe();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},b8=function(){var e=Xoe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Zoe={left:0,top:0,right:0,gap:0},Ew=function(e){return parseInt(e||"",10)||0},Joe=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[Ew(n),Ew(r),Ew(i)]},ese=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zoe;var t=Joe(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])}},tse=b8(),Fc="data-scroll-locked",nse=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),` 582 .`.concat(Loe,` { 583 overflow: hidden `).concat(r,`; 584 padding-right: `).concat(l,"px ").concat(r,`; 585 } 586 body[`).concat(Fc,`] { 587 overflow: hidden `).concat(r,`; 588 overscroll-behavior: contain; 589 `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` 590 padding-left: `.concat(i,`px; 591 padding-top: `).concat(a,`px; 592 padding-right: `).concat(o,`px; 593 margin-left:0; 594 margin-top:0; 595 margin-right: `).concat(l,"px ").concat(r,`; 596 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";
596")].filter(Boolean).join(""),` 597 } 598 599 .`).concat(Vg,` { 600 right: `).concat(l,"px ").concat(r,`; 601 } 602 603 .`).concat(Gg,` { 604 margin-right: `).concat(l,"px ").concat(r,`; 605 } 606 607 .`).concat(Vg," .").concat(Vg,` { 608 right: 0 `).concat(r,`; 609 } 610 611 .`).concat(Gg," .").concat(Gg,` { 612 margin-right: 0 `).concat(r,`; 613 } 614 615 body[`).concat(Fc,`] { 616 `).concat($oe,": ").concat(l,`px; 617 } 618`)},LI=function(){var e=parseInt(document.body.getAttribute(Fc)||"0",10);return isFinite(e)?e:0},rse=function(){E.useEffect(function(){return document.body.setAttribute(Fc,(LI()+1).toString()),function(){var e=LI()-1;e<=0?document.body.removeAttribute(Fc):document.body.setAttribute(Fc,e.toString())}},[])},ise=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;rse();var a=E.useMemo(function(){return ese(i)},[i]);return E.createElement(tse,{styles:nse(a,!t,i,n?"":"!important")})},nE=!1;if(typeof window<"u")try{var rg=Object.defineProperty({},"passive",{get:function(){return nE=!0,!0}});window.addEventListener("test",rg,rg),window.removeEventListener("test",rg,rg)}catch{nE=!1}var bc=nE?{passive:!1}:!1,ase=function(e){return e.tagName==="TEXTAREA"},w8=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ase(e)&&n[t]==="visible")},ose=function(e){return w8(e,"overflowY")},sse=function(e){return w8(e,"overflowX")},$I=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=_8(e,r);if(i){var a=S8(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},lse=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},cse=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},_8=function(e,t){return e==="v"?ose(t):sse(t)},S8=function(e,t){return e==="v"?lse(t):cse(t)},use=function(e,t){return e==="h"&&t==="rtl"?-1:1},dse=function(e,t,n,r,i){var a=use(e,window.getComputedStyle(t).direction),o=a*r,l=n.target,c=t.contains(l),u=!1,f=o>0,d=0,p=0;do{if(!l)break;var m=S8(e,l),b=m[0],v=m[1],y=m[2],x=v-y-a*b;(b||x)&&_8(e,l)&&(d+=x,p+=b);var _=l.parentNode;l=_&&_.nodeType===Node.DOCUMENT_FRAGMENT_NODE?_.host:_}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(f&&Math.abs(d)<1||!f&&Math.abs(p)<1)&&(u=!0),u},ig=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},FI=function(e){return[e.deltaX,e.deltaY]},BI=function(e){return e&&"current"in e?e.current:e},fse=function(e,t){return e[0]===t[0]&&e[1]===t[1]},hse=function(e){return` 619 .block-interactivity-`.concat(e,` {pointer-events: none;} 620 .allow-interactivity-`).concat(e,` {pointer-events: all;} 621`)},pse=0,wc=[];function mse(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(pse++)[0],a=E.useState(b8)[0],o=E.useRef(e);E.useEffect(function(){o.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Doe([e.lockRef.current],(e.shards||[]).map(BI),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=E.useCallback(function(v,y){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!o.current.allowPinchZoom;var x=ig(v),_=n.current,S="deltaX"in v?v.deltaX:_[0]-x[0],w="deltaY"in v?v.deltaY:_[1]-x[1],N,k=v.target,C=Math.abs(S)>Math.abs(w)?"h":"v";if("touches"in v&&C==="h"&&k.type==="range")return!1;var P=$I(C,k);if(!P)return!0;if(P?N=C:(N=C==="v"?"h":"v",P=$I(C,k)),!P)return!1;if(!r.current&&"changedTouches"in v&&(S||w)&&(r.current=N),!N)return!0;var L=r.current||N;return dse(L,y,v,L==="h"?S:w)},[]),c=E.useCallback(function(v){var y=v;if(!(!wc.length||wc[wc.length-1]!==a)){var x="deltaY"in y?FI(y):ig(y),_=t.current.filter(function(N){return N.name===y.type&&(N.target===y.target||y.target===N.shadowParent)&&fse(N.delta,x)})[0];if(_&&_.should){y.cancelable&&y.preventDefault();return}
vendor: 4,101 bytes, line 621
621if(!_){var S=(o.current.shards||[]).map(BI).filter(Boolean).filter(function(N){return N.contains(y.target)}),w=S.length>0?l(y,S[0]):!o.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),u=E.useCallback(function(v,y,x,_){var S={name:v,delta:y,target:x,should:_,shadowParent:gse(x)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(w){return w!==S})},1)},[]),f=E.useCallback(function(v){n.current=ig(v),r.current=void 0},[]),d=E.useCallback(function(v){u(v.type,FI(v),v.target,l(v,e.lockRef.current))},[]),p=E.useCallback(function(v){u(v.type,ig(v),v.target,l(v,e.lockRef.current))},[]);E.useEffect(function(){return wc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,bc),document.addEventListener("touchmove",c,bc),document.addEventListener("touchstart",f,bc),function(){wc=wc.filter(function(v){return v!==a}),document.removeEventListener("wheel",c,bc),document.removeEventListener("touchmove",c,bc),document.removeEventListener("touchstart",f,bc)}},[]);var m=e.removeScrollBar,b=e.inert;return E.createElement(E.Fragment,null,b?E.createElement(a,{styles:hse(i)}):null,m?E.createElement(ise,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gse(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const vse=Woe(x8,mse);var yp=E.forwardRef(function(e,t){return E.createElement(Hy,_a({},e,{ref:t,sideCar:vse}))});yp.classNames=Hy.classNames;var yse=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_c=new WeakMap,ag=new WeakMap,og={},kw=0,j8=function(e){return e&&(e.host||j8(e.parentNode))},xse=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=j8(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})},bse=function(e,t,n,r){var i=xse(t,Array.isArray(e)?e:[e]);og[n]||(og[n]=new WeakMap);var a=og[n],o=[],l=new Set,c=new Set(i),u=function(d){!d||l.has(d)||(l.add(d),u(d.parentNode))};i.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(l.has(p))f(p);else try{var m=p.getAttribute(r),b=m!==null&&m!=="false",v=(_c.get(p)||0)+1,y=(a.get(p)||0)+1;_c.set(p,v),a.set(p,y),o.push(p),v===1&&b&&ag.set(p,!0),y===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return f(t),l.clear(),kw++,function(){o.forEach(function(d){var p=_c.get(d)-1,m=a.get(d)-1;_c.set(d,p),a.set(d,m),p||(ag.has(d)||d.removeAttribute(r),ag.delete(d)),m||d.removeAttribute(n)}),kw--,kw||(_c=new WeakMap,_c=new WeakMap,ag=new WeakMap,og={})}},Wy=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=yse(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),bse(r,i,n,"aria-hidden")):function(){return null}},Vy="Dialog",[N8]=di(Vy),[wse,ua]=N8(Vy),E8=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=E.useRef(null),c=E.useRef(null),[u,f]=Wr({prop:r,defaultProp:i??!1,onChange:a,caller:Vy});return s.jsx(wse,{scope:t,triggerRef:l,contentRef:c,contentId:Ri(),titleId:Ri(),descriptionId:Ri(),open:u,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(d=>!d),[f]),modal:o,children:n})};E8.displayName=Vy;var k8="DialogTrigger",_se=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ua(k8,n),a=At(t,i.triggerRef);return s.jsx(ut.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":qO(i.open),...r,ref:a,onClick:Ge(e.onClick,i.onOpenToggle)})});_se.displayName=k8;var FO="DialogPortal",[Sse,O8]=N8(FO,{forceMount:void 0}),C8=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=ua(FO,t);return s.jsx(Sse,{scope:t,forceMount:n,children:E.Children.map(r,o=>s.jsx(Bi,{present:n||a.open,children:s.jsx(vp,{asChild:!0,container:i,children:o})}))})};C8.displayName=FO;var cv="DialogOverlay",A8=E.forwardRef((e,t)=>
vendor: 4,904 bytes, lines 621-625
621{const n=O8(cv,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ua(cv,e.__scopeDialog);return a.modal?s.jsx(Bi,{present:r||a.open,children:s.jsx(Nse,{...i,ref:t})}):null});A8.displayName=cv;var jse=ms("DialogOverlay.RemoveScroll"),Nse=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ua(cv,n);return s.jsx(yp,{as:jse,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(ut.div,{"data-state":qO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),kl="DialogContent",P8=E.forwardRef((e,t)=>{const n=O8(kl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=ua(kl,e.__scopeDialog);return s.jsx(Bi,{present:r||a.open,children:a.modal?s.jsx(Ese,{...i,ref:t}):s.jsx(kse,{...i,ref:t})})});P8.displayName=kl;var Ese=E.forwardRef((e,t)=>{const n=ua(kl,e.__scopeDialog),r=E.useRef(null),i=At(t,n.contentRef,r);return E.useEffect(()=>{const a=r.current;if(a)return Wy(a)},[]),s.jsx(T8,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:Ge(e.onFocusOutside,a=>a.preventDefault())})}),kse=E.forwardRef((e,t)=>{const n=ua(kl,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return s.jsx(T8,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),T8=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=ua(kl,n),c=E.useRef(null),u=At(t,c);return zy(),s.jsxs(s.Fragment,{children:[s.jsx(gp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:s.jsx(mp,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":qO(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(Ose,{titleId:l.titleId}),s.jsx(Ase,{contentRef:c,descriptionId:l.descriptionId})]})]})}),BO="DialogTitle",R8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ua(BO,n);return s.jsx(ut.h2,{id:i.titleId,...r,ref:t})});R8.displayName=BO;var I8="DialogDescription",M8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ua(I8,n);return s.jsx(ut.p,{id:i.descriptionId,...r,ref:t})});M8.displayName=I8;var D8="DialogClose",L8=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ua(D8,n);return s.jsx(ut.button,{type:"button",...r,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});L8.displayName=D8;function qO(e){return e?"open":"closed"}var $8="DialogTitleWarning",[p3e,F8]=coe($8,{contentName:kl,titleName:BO,docsSlug:"dialog"}),Ose=({titleId:e})=>{const t=F8($8),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 622 623If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 624 625For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Cse="DialogDescriptionWarning",Ase=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${F8(Cse).contentName}}.`;return E.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},B8=E8,q8=C8,Gy=A8,Ky=P8,Yy=R8,Qy=M8,U8=L8;const vn=B8,Pse=q8,z8=E.forwardRef(({className:e,...t},n)=>s.jsx(Gy,{ref:n,className:et("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));z8.displayName=Gy.displayName;const pn=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(Pse,{children:[s.jsx(z8,{}),s.jsxs(Ky,{ref:r,className:et("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
625nded-lg",e),...n,children:[t,s.jsxs(U8,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[s.jsx(Cr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pn.displayName=Ky.displayName;const En=({className:e,...t})=>s.jsx("div",{className:et("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});En.displayName="DialogHeader";const Ku=({className:e,...t})=>s.jsx("div",{className:et("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ku.displayName="DialogFooter";const kn=E.forwardRef(({className:e,...t},n)=>s.jsx(Yy,{ref:n,className:et("text-lg font-semibold leading-none tracking-tight",e),...t}));kn.displayName=Yy.displayName;const H8=E.forwardRef(({className:e,...t},n)=>s.jsx(Qy,{ref:n,className:et("text-sm text-muted-foreground",e),...t}));H8.displayName=Qy.displayName;function Nt(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function Ma(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function W8(e,t){const n=Nt(e);return isNaN(t)?Ma(e,NaN):(t&&n.setDate(n.getDate()+t),n)}function Tse(e,t){const n=+Nt(e);return Ma(e,n+t)}const V8=6048e5,Rse=864e5,ih=6e4,G8=36e5,qI=525600,Pc=43200,uv=1440;let Ise={};function Yu(){return Ise}function gs(e,t){var l,c,u,f;const n=Yu(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,i=Nt(e),a=i.getDay(),o=(a<r?7:0)+a-r;return i.setDate(i.getDate()-o),i.setHours(0,0,0,0),i}function dv(e){return gs(e,{weekStartsOn:1})}function K8(e){const t=Nt(e),n=t.getFullYear(),r=Ma(e,0);r.setFullYear(n+1,0,4),r.setHours(0,0,0,0);const i=dv(r),a=Ma(e,0);a.setFullYear(n,0,4),a.setHours(0,0,0,0);const o=dv(a);return t.getTime()>=i.getTime()?n+1:t.getTime()>=o.getTime()?n:n-1}function UI(e){const t=Nt(e);return t.setHours(0,0,0,0),t}function lu(e){const t=Nt(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 Y8(e,t){const n=UI(e),r=UI(t),i=+n-lu(n),a=+r-lu(r);return Math.round((i-a)/Rse)}function Mse(e){const t=K8(e),n=Ma(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),dv(n)}function Dse(e,t){return Tse(e,t*ih)}function Lse(e,t){const n=t*7;return W8(e,n)}function Lf(e,t){const n=Nt(e),r=Nt(t),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Q8(e){return Ma(e,Date.now())}function $se(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Fse(e){if(!$se(e)&&typeof e!="number")return!1;const t=Nt(e);return!isNaN(Number(t))}function Bse(e,t){const n=Nt(e),r=Nt(t),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return i*12+a}function X8(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function qse(e,t){return+Nt(e)-+Nt(t)}function Use(e){const t=Nt(e);return t.setHours(23,59,59,999),t}function Z8(e){const t=Nt(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function zse(e){const t=Nt(e);return+Use(t)==+Z8(t)}function Hse(e,t){const n=Nt(e),r=Nt(t),i=Lf(n,r),a=Math.abs(Bse(n,r));let o;if(a<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-i*a);let l=Lf(n,r)===-i;zse(Nt(e))&&a===1&&Lf(e,r)===1&&(l=!1),o=i*(a-Number(l))}return o===0?0:o}function J8(e,t,n){const r=qse(e,t)/1e3;return X8(n==null?void 0:n.roundingMethod)(r)}function eU(e){const t=Nt(e);return t.setDate(1),t.setHours(0,0,0,0),t}function Wse(e){const t=Nt(e),n=Ma(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Vse(e,t){const n=t==null?void 0:t.weekStartsOn,r=Nt(e),i=r.getDay(),a=(i<n?-7:0)+6-(i-n);return r.setDate(r.getDate()+a),r.setHours(23,59,59,999),r}const Gse={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"}},Kse=(e,t,n)=>{let r;const i=Gse[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 Ow(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Yse={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Qse={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Xse={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Zse={date:Ow({formats:Yse,defaultWidth:"full"}),time:Ow({formats:Qse,defaultWidth:"full"}),dateTime:Ow({formats:Xse,defaultWidth:"full"})},Jse={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ele=(e,t,n,r)=>Jse[e];function rf(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const o=e.defaultFormattingWidth||e.defaultWidth,l=n!=null&&n.width?String(n.width):o;i=e.formattingValues[l]||e.formattingValues[o]}else{const o=e.defaultWidth,l=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[l]||e.values[o]}const a=e.argumentCallback?e.argumentCallback(t):t;return i[a]}}const tle={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},nle={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},rle={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"]},ile={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
625ay","Saturday"]},ale={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"}},ole={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"}},sle=(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"},lle={ordinalNumber:sle,era:rf({values:tle,defaultWidth:"wide"}),quarter:rf({values:nle,defaultWidth:"wide",argumentCallback:e=>e-1}),month:rf({values:rle,defaultWidth:"wide"}),day:rf({values:ile,defaultWidth:"wide"}),dayPeriod:rf({values:ale,defaultWidth:"wide",formattingValues:ole,defaultFormattingWidth:"wide"})};function af(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;const o=a[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?ule(l,d=>d.test(o)):cle(l,d=>d.test(o));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(o.length);return{value:u,rest:f}}}function cle(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function ule(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function dle(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],a=t.match(e.parsePattern);if(!a)return null;let o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;const l=t.slice(i.length);return{value:o,rest:l}}}const fle=/^(\d+)(th|st|nd|rd)?/i,hle=/\d+/i,ple={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},mle={any:[/^b/i,/^(a|c)/i]},gle={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},vle={any:[/1/i,/2/i,/3/i,/4/i]},yle={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},xle={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]},ble={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},wle={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]},_le={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},Sle={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}},jle={ordinalNumber:dle({matchPattern:fle,parsePattern:hle,valueCallback:e=>parseInt(e,10)}),era:af({matchPatterns:ple,defaultMatchWidth:"wide",parsePatterns:mle,defaultParseWidth:"any"}),quarter:af({matchPatterns:gle,defaultMatchWidth:"wide",parsePatterns:vle,defaultParseWidth:"any",valueCallback:e=>e+1}),month:af({matchPatterns:yle,defaultMatchWidth:"wide",parsePatterns:xle,defaultParseWidth:"any"}),day:af({matchPatterns:ble,defaultMatchWidth:"wide",parsePatterns:wle,defaultParseWidth:"any"}),dayPeriod:af({matchPatterns:_le,defaultMatchWidth:"any",parsePatterns:Sle,defaultParseWidth:"any"})},UO={code:"en-US",formatDistance:Kse,formatLong:Zse,formatRelative:ele,localize:lle,match:jle,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Nle(e){const t=Nt(e);return Y8(t,Wse(t))+1}function Ele(e){const t=Nt(e),n=+dv(t)-+Mse(t);return Math.round(n/V8)+1}function tU(e,t){var f,d,p,m;const n=Nt(e),r=n.getFullYear(),i=Yu(),a=(t==null?void 0:t.firstWeekContainsDate)??((d=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??i.firstWeekContainsDate??((m=(p=i.locale)==null?void 0:p.options)==null?void 0:m.firstWeekContainsDate)??1,o=Ma(e,0);o.setFullYear(r+1,0,a),o.setHours(0,0,0,0);const l=gs(o,t),c=Ma(e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=gs(c,t);return n.getTime()>=l.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function kle(e,t){var l,c,u,f;const n=Yu(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,i=tU(e,t),a=Ma(e,0);return a.setFullYear(i,0,r),a.setHours(0,0,0,0),gs(a,t)}function Ole(e,t){const n=Nt(e),r=+gs(n,t)-+kle(n,t);return Math.round(r/V8)+1}function Gt(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Uo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Gt(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Gt(n+1,2)},d(e,t){return Gt(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 Gt(e.getHours()%12||12,t.length)},H(e,t){return Gt(e.getHours(),t.length)},m(e,t){return Gt(e.getMinutes(),t.length)},s(e,t){return Gt(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Gt(i,t.length)}},Sc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},zI={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 Uo.y(e,t)},Y:function(e,t,n,r){const i=tU(e,r),a=i>0?i:1-i;if(t==="YY"){const o=a%100;return Gt(o,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):Gt(a,t.length)},R:function(e,t){const n=K8(e);return Gt(n,t.length)},u:function(e,t){const n=e.getFullYear();return Gt(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 Gt(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 Gt(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 Uo.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 Gt(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=Ole(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Gt(i,t.length)},I:function(e,t,n){const r=Ele(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Gt(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Uo.d(e,t)},D:function(e,t,n){const r=Nle(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Gt(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(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Gt(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Gt(a,t.length);case"co":return n.ordinalNumber(a,{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 Gt(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=Sc.noon:r===0?i=Sc.midnight:i=r/12>
vendor: 4,426 bytes, line 625
625=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=Sc.evening:r>=12?i=Sc.afternoon:r>=4?i=Sc.morning:i=Sc.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 Uo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Uo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Gt(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Gt(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Uo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Uo.s(e,t)},S:function(e,t){return Uo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return WI(r);case"XXXX":case"XX":return Js(r);case"XXXXX":case"XXX":default:return Js(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return WI(r);case"xxxx":case"xx":return Js(r);case"xxxxx":case"xxx":default:return Js(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+HI(r,":");case"OOOO":default:return"GMT"+Js(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+HI(r,":");case"zzzz":default:return"GMT"+Js(r,":")}},t:function(e,t,n){const r=Math.trunc(e.getTime()/1e3);return Gt(r,t.length)},T:function(e,t,n){const r=e.getTime();return Gt(r,t.length)}};function HI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),a=r%60;return a===0?n+String(i):n+String(i)+t+Gt(a,2)}function WI(e,t){return e%60===0?(e>0?"-":"+")+Gt(Math.abs(e)/60,2):Js(e,t)}function Js(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Gt(Math.trunc(r/60),2),a=Gt(r%60,2);return n+i+t+a}const VI=(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"})}},nU=(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"})}},Cle=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return VI(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",VI(r,t)).replace("{{time}}",nU(i,t))},Ale={p:nU,P:Cle},Ple=/^D+$/,Tle=/^Y+$/,Rle=["D","DD","YY","YYYY"];function Ile(e){return Ple.test(e)}function Mle(e){return Tle.test(e)}function Dle(e,t,n){const r=Lle(e,t,n);if(console.warn(r),Rle.includes(e))throw new RangeError(r)}function Lle(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 $le=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fle=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ble=/^'([^]*?)'?$/,qle=/''/g,Ule=/[a-zA-Z]/;function Vr(e,t,n){var f,d,p,m;const r=Yu(),i=r.locale??UO,a=r.firstWeekContainsDate??((d=(f=r.locale)==null?void 0:f.options)==null?void 0:d.firstWeekContainsDate)??1,o=r.weekStartsOn??((m=(p=r.locale)==null?void 0:p.options)==null?void 0:m.weekStartsOn)??0,l=Nt(e);if(!Fse(l))throw new RangeError("Invalid time value");let c=t.match(Fle).map(b=>{const v=b[0];if(v==="p"||v==="P"){const y=Ale[v];return y(b,i.formatLong)}return b}).join("").match($le).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const v=b[0];if(v==="'")return{isToken:!1,value:zle(b)};if(zI[v])return{isToken:!0,value:b};
625if(v.match(Ule))throw new RangeError("Format string contains an unescaped latin alphabet character `"+v+"`");return{isToken:!1,value:b}});i.localize.preprocessor&&(c=i.localize.preprocessor(l,c));const u={firstWeekContainsDate:a,weekStartsOn:o,locale:i};return c.map(b=>{if(!b.isToken)return b.value;const v=b.value;(Mle(v)||Ile(v))&&Dle(v,t,String(e));const y=zI[v[0]];return y(l,v,i.localize,u)}).join("")}function zle(e){const t=e.match(Ble);return t?t[1].replace(qle,"'"):e}function Hle(e,t,n){const r=Yu(),i=(n==null?void 0:n.locale)??r.locale??UO,a=2520,o=Lf(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const l=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let c,u;o>0?(c=Nt(t),u=Nt(e)):(c=Nt(e),u=Nt(t));const f=J8(u,c),d=(lu(u)-lu(c))/1e3,p=Math.round((f-d)/60);let m;if(p<2)return n!=null&&n.includeSeconds?f<5?i.formatDistance("lessThanXSeconds",5,l):f<10?i.formatDistance("lessThanXSeconds",10,l):f<20?i.formatDistance("lessThanXSeconds",20,l):f<40?i.formatDistance("halfAMinute",0,l):f<60?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",1,l):p===0?i.formatDistance("lessThanXMinutes",1,l):i.formatDistance("xMinutes",p,l);if(p<45)return i.formatDistance("xMinutes",p,l);if(p<90)return i.formatDistance("aboutXHours",1,l);if(p<uv){const b=Math.round(p/60);return i.formatDistance("aboutXHours",b,l)}else{if(p<a)return i.formatDistance("xDays",1,l);if(p<Pc){const b=Math.round(p/uv);return i.formatDistance("xDays",b,l)}else if(p<Pc*2)return m=Math.round(p/Pc),i.formatDistance("aboutXMonths",m,l)}if(m=Hse(u,c),m<12){const b=Math.round(p/Pc);return i.formatDistance("xMonths",b,l)}else{const b=m%12,v=Math.trunc(m/12);return b<3?i.formatDistance("aboutXYears",v,l):b<9?i.formatDistance("overXYears",v,l):i.formatDistance("almostXYears",v+1,l)}}function Wle(e,t,n){const r=Yu(),i=(n==null?void 0:n.locale)??r.locale??UO,a=Lf(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const o=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a});let l,c;a>0?(l=Nt(t),c=Nt(e)):(l=Nt(e),c=Nt(t));const u=X8((n==null?void 0:n.roundingMethod)??"round"),f=c.getTime()-l.getTime(),d=f/ih,p=lu(c)-lu(l),m=(f-p)/ih,b=n==null?void 0:n.unit;let v;if(b?v=b:d<1?v="second":d<60?v="minute":d<uv?v="hour":m<Pc?v="day":m<qI?v="month":v="year",v==="second"){const y=u(f/1e3);return i.formatDistance("xSeconds",y,o)}else if(v==="minute"){const y=u(d);return i.formatDistance("xMinutes",y,o)}else if(v==="hour"){const y=u(d/60);return i.formatDistance("xHours",y,o)}else if(v==="day"){const y=u(m/uv);return i.formatDistance("xDays",y,o)}else if(v==="month"){const y=u(m/Pc);return y===12&&b!=="month"?i.formatDistance("xYears",1,o):i.formatDistance("xMonths",y,o)}else{const y=u(m/qI);return i.formatDistance("xYears",y,o)}}function Vle(e,t){return Hle(e,Q8(e),t)}function GI(e,t){return Wle(e,Q8(e),t)}function rE(e,t){const n=Nt(e),r=Nt(t);return n.getTime()>r.getTime()}function Cw(e,t){return W8(e,-t)}function Kg(e,t){const r=Qle(e);let i;if(r.date){const c=Xle(r.date,2);i=Zle(c.restDateString,c.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);const a=i.getTime();let o=0,l;if(r.time&&(o=Jle(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(l=ece(r.timezone),isNaN(l))return new Date(NaN)}else{const c=new Date(a+o),u=new Date(0);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return new Date(a+o+l)}const sg={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Gle=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Kle=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Yle=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Qle(e){const t={},n=e.split(sg.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],sg.timeZoneDelimiter.test(t.date)&&(t.date=e.split(sg.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=sg.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Xle(e,t){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),r=e.match(n);if(!r)return{year:NaN,restDateString:""};const i=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:a===null?i:a*100,restDateString:e.slice((r[1]||r[2]).length)}}function Zle(e,t){if(t===null)return new Date(NaN);const n=e.match(Gle);if(!n)return new Date(NaN);const r=!!n[4],i=of(n[1]),a=of(n[2])-1,o=of(n[3]),l=of(n[4]),c=of(n[5])-1;if(r)return ace(t,l,c)?tce(t,l,c):new Date(NaN);{const u=new Date(0);return!rce(t,a,o)||!ice(t,i)?new Date(NaN):(u.setUTCFullYear(t,a,Math.max(i,o)),u)}}function of(e){return e?parseInt(e):1}function Jle(e){const t=e.match(Kle);if(!t)return NaN;const n=Aw(t[1]),r=Aw(t[2]),i=Aw(t[3]);return oce(n,r,i)?n*G8+r*ih+i*1e3:NaN}function Aw(e){return e&&parseFloat(e.replace(",","."))||0}function ece(e){if(e==="Z")return 0;const t=e.match(Yle);if(!t)return 0;
625const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return sce(r,i)?n*(r*G8+i*ih):NaN}function tce(e,t,n){const r=new Date(0);r.setUTCFullYear(e,0,4);const i=r.getUTCDay()||7,a=(t-1)*7+n+1-i;return r.setUTCDate(r.getUTCDate()+a),r}const nce=[31,null,31,30,31,30,31,31,30,31,30,31];function rU(e){return e%400===0||e%4===0&&e%100!==0}function rce(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(nce[t]||(rU(e)?29:28))}function ice(e,t){return t>=1&&t<=(rU(e)?366:365)}function ace(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function oce(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function sce(e,t){return t>=0&&t<=59}function Pw(e,t){return Lse(e,-t)}function ln(e){return"/"+e.replace(/ /g,"-")}function lce({label:e,value:t,width:n="full"}){if(t==null||t==="")return null;const r={third:"md:col-span-2",half:"md:col-span-3",full:"md:col-span-6","33%":"md:col-span-2","50%":"md:col-span-3","100%":"md:col-span-6"},i=r[n]||r.full;return s.jsxs("div",{className:`mb-5 ${i}`,children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500 mb-1",children:e}),s.jsx("div",{className:"text-slate-900 whitespace-pre-wrap",children:String(t)})]})}function cce({template:e,response:t,wrapInCard:n=!0}){if(!e||!t)return n?s.jsx(yt,{children:s.jsxs(wn,{children:[s.jsx(_n,{children:"Intake Form"}),s.jsx(f8,{children:"No completed responses found."})]})}):null;const r=t.responses||{},i=Array.isArray(e.sections)?e.sections.slice().sort((o,l)=>(o.order||0)-(l.order||0)):[],a=s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-6 md:gap-x-8",children:[i.map(o=>{var u;const l=r[o.id],c=((u=o==null?void 0:o.config)==null?void 0:u.width)||"full";switch(o.type){case"heading":return s.jsxs("div",{className:"md:col-span-6 mt-6 mb-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"h-5 w-1.5 rounded bg-teal-600"}),s.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:o.title})]}),o.description&&s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:o.description})]},o.id);case"paragraph":return s.jsx("div",{className:"md:col-span-6 mb-3 text-slate-700",children:o.description||o.title},o.id);case"checkboxes":return!Array.isArray(l)||l.length===0?null:s.jsxs("div",{className:`mb-5 ${c==="full"?"md:col-span-6":""}`,children:[s.jsx("div",{className:"text-xs uppercase tracking-wide text-slate-500 mb-1",children:o.title}),s.jsx("div",{className:"flex flex-wrap gap-2",children:l.map((f,d)=>s.jsx(Rt,{variant:"secondary",children:String(f)},d))})]},o.id);default:return s.jsx(lce,{label:o.title,value:l,width:c},o.id)}}),(r.goal_1||r.goal_2||r.goal_3)&&s.jsxs("div",{className:"md:col-span-6 mt-6",children:[s.jsx("h4",{className:"text-base font-semibold text-slate-900 mb-2",children:"Goals"}),s.jsxs("ul",{className:"list-disc pl-5 text-slate-800 space-y-1",children:[r.goal_1&&s.jsx("li",{children:r.goal_1}),r.goal_2&&s.jsx("li",{children:r.goal_2}),r.goal_3&&s.jsx("li",{children:r.goal_3})]})]})]});return n?s.jsx(yt,{children:s.jsx(It,{className:"pt-6",children:a})}):a}var Tw={};const uce=LQ(Wae);var KI;function zO(){if(KI)return Tw;KI=1;const{createClient:e}=uce;return Tw.base44=e({appId:"696f865eaed283c6951e030b",serverUrl:"https://base44.app"}),Tw}var Rw,YI;function dce(){if(YI)return Rw;YI=1;const{base44:e}=zO();return Rw=new Proxy({},{get:(t,n)=>(...r)=>e.functions.invoke(n,...r)}),Rw}var iE=dce();const fce=ve.entities.PatientFormResponse;function hce(){const[e,t]=E.useState([]),[n,r]=E.useState({}),[i]=E.useState({}),[a]=E.useState({}),[o]=E.useState({}),[l]=E.useState({}),[c,u]=E.useState(""),[f,d]=E.useState(!1),[p,m]=E.useState(null),[b,v]=E.useState(null),[y,x]=E.useState(null),[_,S]=E.useState(null),w=R=>{const I=R!=null&&R.lead_id?n[R.lead_id]:null;return I?{email:I.email||R.patient_email||"",first_name:I.first_name||"",last_name:I.last_name||"",display:`${I.first_name||""} ${I.last_name||""}`.trim()||I.email||R.patient_email||"â"}:{email:(R==null?void 0:R.patient_email)||"",first_name:"",last_name:"",display:(R==null?void 0:R.patient_email)||"â"}};E.useEffect(()=>{(async()=>{const I=await fce.list("-updated_date",300);t(I||[]);const M=Array.from(new Set((I||[]).map(B=>
625B.lead_id).filter(Boolean)));if(M.length>0){const B=await Promise.all(M.map(G=>ve.entities.Lead.filter({id:G}).catch(()=>[]))),W={};B.flat().forEach(G=>{G!=null&&G.id&&(W[G.id]=G)}),r(W)}})()},[]);const N=E.useMemo(()=>{const R=c.trim().toLowerCase();return R?e.filter(I=>{var B;const M=w(I);return(M.email||"").toLowerCase().includes(R)||(M.display||"").toLowerCase().includes(R)||(I.status||"").toLowerCase().includes(R)||(I.form_type||"").toLowerCase().includes(R)||(((B=i[I.form_template_id])==null?void 0:B.name)||"").toLowerCase().includes(R)}):e},[e,c,i,n]),k=R=>{m(R),v(i[R.form_template_id]||null),d(!0)},C=async R=>{alert("Resend not available in this version.")},P=async R=>{var M,B,W,G;const I=w(R);if(!I.email){alert("No patient email found on the linked lead.");return}if(confirm(`Resend AI Symptoms results email to ${I.email}?`)){x(R.id);try{const H={email:I.email,first_name:I.first_name,last_name:I.last_name},K=await ve.functions.invoke("generateAISymptomsReportPdf",{formResponseId:R.id,contactDetails:H}),$=((M=K==null?void 0:K.data)==null?void 0:M.pdf_url)||null;if(console.log("[AdminFormResponses] Resend - generated PDF URL:",$),!$)throw new Error("Failed to generate PDF for email attachment. "+(((B=K==null?void 0:K.data)==null?void 0:B.error)||""));await ve.functions.invoke("sendAISymptomsResultsEmail",{formResponseId:R.id,contactDetails:H,pdfUrl:$}),alert("Email resent successfully with PDF attached.")}catch(H){console.error("[AdminFormResponses] Resend email failed:",H),alert("Failed to resend email: "+(((G=(W=H==null?void 0:H.response)==null?void 0:W.data)==null?void 0:G.error)||H.message||"Unknown error"))}finally{x(null)}}},L=async R=>{var I;S(R.id);try{if(R.form_type==="ai_symptoms_checker"){const M=w(R),B={first_name:M.first_name,last_name:M.last_name,email:M.email},W=await iE.generateAISymptomsReportPdf({formResponseId:R.id,contactDetails:B});(I=W.data)!=null&&I.pdf_url?window.open(W.data.pdf_url,"_blank"):alert("Failed to generate PDF")}else alert("PDF download not yet available for this form type")}catch(M){console.error("Error downloading PDF:",M),alert("Failed to download PDF: "+(M.message||"Unknown error"))}finally{S(null)}},T=R=>{switch(R){case"intake":return"Intake Form";case"ai_symptoms_checker":return"AI Symptoms";case"consent":return"Consent";case"outcome":return"Outcome";default:return R||"Unknown"}},A=R=>{const I=i[R.form_template_id];if(R.form_type==="ai_symptoms_checker"){const M=`/AISymptomsChecker?response_id=${R.id}`;window.open(M,"_blank")}else if(I){const M=`/IntakeForm?response_id=${R.id}`;window.open(M,"_blank")}else{const M=`/AISymptomsChecker?response_id=${R.id}`;window.open(M,"_blank")}};return s.jsxs("div",{className:"p-6",children:[s.jsxs(yt,{children:[s.jsxs(wn,{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[s.jsx(_n,{children:"Form Responses"}),s.jsx("div",{className:"flex gap-2",children:s.jsx(Te,{placeholder:"Search by email, status, type...",value:c,onChange:R=>u(R.target.value)})})]}),s.jsx(It,{children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"text-left text-slate-500 border-b",children:[s.jsx("th",{className:"py-2 pr-4",children:"Form ID"}),s.jsx("th",{className:"py-2 pr-4",children:"Patient"}),s.jsx("th",{className:"py-2 pr-4",children:"Type"}),s.jsx("th",{className:"py-2 pr-4",children:"Template"}),s.jsx("th",{className:"py-2 pr-4",children:"Status"}),s.jsx("th",{className:"py-2 pr-4",children:"Updated"}),s.jsx("th",{className:"py-2 pr-4",children:"Appointment Date"}),s.jsx("th",{className:"py-2 pr-4",children:"Practitioner"}),s.jsx("th",{className:"py-2 pr-4",children:"Actions"})]})}),s.jsxs("tbody",{children:[N.map(R=>{const I=i[R.form_template_id],M=R.appointment_id?a[R.appointment_id]:null,B=M!=null&&M.practitioner_id?o[M.practitioner_id]:null,W=w(R),G=R.lead_id?n[R.lead_id]:null;return s.jsxs("tr",{className:"border-b last:border-0 hover:bg-slate-50 cursor-pointer",onClick:()=>k(R),children:[s.jsx("td",{className:"py-2 pr-4 text-xs text-slate-500 font-mono",children:R.id.slice(0,8)}),s.jsx("td",{className:"py-2 pr-4",onClick:H=>H.stopPropagation(),children:G?s.jsxs(qr,{to:`/LeadDetails?id=${G.id}`,className:"text-teal-600 hover:underline flex items-center gap-1",children:[s.jsxs("span",{className:"flex flex-col",children:[s.jsx("span",{children:W.display}),W.email&&W.email!==W.display&&s.jsx("span",{className:"text-xs text-slate-500",children:W.email})]}),s.jsx(yB,{className:"w-3 h-3"})]}):s.jsx("span",{children:W.display})}),s.jsx("td",{className:"py-2 pr-4",children:s.jsx(Rt,{variant:"outline",className:R.form_type==="ai_symptoms_checker"?"bg-purple-50 text-purple-700 border-purple-200":R.form_type==="intake"?"bg-blue-50 text-blue-700 border-blue-200":"bg-slate-50 text-slate-700 border-slate-200",children:T(R.form_type)})}),s.jsx("td",{className:"py-2 pr-4",children:(I==null?void 0:I.name)||"â"}),s.jsx("td",{className:"py-2 pr-4",children:s.jsx(Rt,{variant:"outline",className:R.status==="completed"?"bg-green-50 text-green-700 border-green-200":R.status==="draft"?"bg-amber-50 text-amber-700 border-amber-200":"bg-slate-50 text-slate-700 border-slate-200",children:R.status})}),s.jsx("td",{className:"py-2 pr-4",children:R.updated_date?Vr(new Date(R.updated_date),"d MMM yyyy HH:mm"):"â"}),s.jsx("td",{className:"py-2 pr-4",children:M?Vr(new Date(M.appointment_date),"d MMM yyyy HH:mm"):"â"}),s.jsx("td",{className:"py-2 pr-4",children:B?`${B.first_name} ${B.last_name}`:"â"}),s.jsx("td",{className:"py-2 pr-4",onClick:H=>H.stopPropagation(),children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>A(R),className:"flex items-center gap-1",children:[s.jsx(xB,{className:"w-3 h-3"}),R.status==="completed"?"View":"Edit"]}),R.status!=="completed"&&R.form_type==="intake"&&s.jsx(be,{size:"sm",variant:"outline",onClick:()=>C(),disabled:y===R.id,children:y===R.id?"Resending...":"Resend"}),R.status==="completed"&&R.form_type==="ai_symptoms_checker"&&s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>L(R),disabled:_===R.id,className:"flex items-center gap-1",children:[s.jsx(Fu,{className:"w-3 h-3"}),_===R.id?"Generating...":"PDF"]}),R.form_type==="ai_symptoms_checker"&&s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>
625P(R),disabled:y===R.id,className:"flex items-center gap-1",title:"Resend assessment results email",children:[s.jsx(hn,{className:"w-3 h-3"}),y===R.id?"Sending...":"Resend Email"]}),R.appointment_id&&s.jsx(qr,{to:`${ln("Calendar")}?focus_appointment_id=${R.appointment_id}`,className:"text-xs text-teal-700 hover:underline",children:"Open Appt"})]})})]},R.id)}),N.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:9,className:"py-6 text-center text-slate-500",children:"No responses found."})})]})]})})})]}),s.jsx(vn,{open:f,onOpenChange:d,children:s.jsxs(pn,{className:"max-w-3xl",children:[s.jsx(En,{children:s.jsx(kn,{children:"Form Response Preview"})}),s.jsx("div",{className:"mt-4",children:p&&b?s.jsx(cce,{template:b,response:p,wrapInCard:!1}):p&&p.form_type==="ai_symptoms_checker"?s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{className:"text-sm text-slate-600",children:s.jsx("strong",{children:"AI Symptoms Checker Response"})}),p.ai_analysis_results&&s.jsxs("div",{className:"bg-slate-50 rounded-lg p-4 space-y-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase mb-1",children:"Summary"}),s.jsx("div",{className:"text-slate-900",children:p.ai_analysis_results.summary})]}),p.ai_analysis_results.working_diagnosis&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase mb-1",children:"Working Diagnosis"}),s.jsx("div",{className:"text-slate-900",children:p.ai_analysis_results.working_diagnosis})]}),p.ai_analysis_results.recommendation&&s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase mb-1",children:"Recommendation"}),s.jsx("div",{className:"text-slate-900 capitalize",children:p.ai_analysis_results.recommendation})]})]})]}):s.jsx("div",{className:"text-slate-500",children:"No response selected."})})]})})]})}function QI({title:e,Icon:t,items:n}){const r=[{bg:"bg-rose-100",text:"text-rose-900",iconBg:"bg-rose-200"},{bg:"bg-sky-100",text:"text-sky-900",iconBg:"bg-sky-200"},{bg:"bg-emerald-100",text:"text-emerald-900",iconBg:"bg-emerald-200"},{bg:"bg-amber-100",text:"text-amber-900",iconBg:"bg-amber-200"},{bg:"bg-violet-100",text:"text-violet-900",iconBg:"bg-violet-200"},{bg:"bg-cyan-100",text:"text-cyan-900",iconBg:"bg-cyan-200"}],i=(e||"").split("").reduce((o,l)=>o+l.charCodeAt(0),0),a=r[i%r.length];return s.jsxs(yt,{className:"overflow-hidden",children:[s.jsx(wn,{className:`p-0 ${a.bg} border-b`,children:s.jsx("div",{className:"h-24 w-full flex items-center justify-between px-5",children:s.jsxs("div",{className:"flex items-center gap-3",children:[t?s.jsx("div",{className:`w-10 h-10 ${a.iconBg} rounded-lg flex items-center justify-center`,children:s.jsx(t,{className:`w-5 h-5 ${a.text}`})}):null,s.jsx("h3",{className:`text-lg font-semibold ${a.text}`,children:e})]})})}),s.jsxs(It,{className:"p-5",children:[s.jsx(_n,{className:"sr-only",children:e}),s.jsxs("ul",{className:"space-y-2",children:[(n||[]).map(o=>s.jsx("li",{className:"text-sm",children:s.jsxs(qr,{to:o.to,className:"text-slate-700 hover:underline hover:text-[#005a60] flex items-center gap-2",children:[o.Icon?s.jsx(o.Icon,{className:"w-4 h-4"}):null,o.label]})},o.label)),(n||[]).length===0&&s.jsx("li",{className:"text-sm text-slate-500",children:"No items"})]})]})]})}function pce(){return s.jsxs("div",{className:"min-h-screen bg-slate-50",children:[s.jsx("div",{className:"border-b bg-white",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-6 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#e6f0f1] text-[#006e74] flex items-center justify-center",children:s.jsx(ou,{className:"w-5 h-5"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"App Settings"}),s.jsx("p",{className:"text-slate-600 text-sm",children:"Manage all configuration from one place."})]})]})}),s.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8 grid grid-cols-1 md:grid-cols-2 gap-6",children:[s.jsx(QI,{title:"AI Symptoms Checker",Icon:wN,items:[{label:"Manage Form",to:ln("ManageLeadForm"),Icon:Oa},{label:"Form Responses",to:ln("AdminFormResponses"),Icon:Rf},{label:"Body Chart Configuration",to:ln("BodyChartSettings"),Icon:wN}]}),s.jsx(QI,{title:"Email Templates",Icon:hn,items:[{label:"Manage Templates",to:"/EmailTemplates",Icon:hn}]})]})]})}var Iw,XI;function mce(){if(XI)return Iw;XI=1;const{base44:e}=zO();return Iw=new Proxy({},{get:(t,n)=>new Proxy({},{get:(r,i)=>{if(n==="User"){if(i==="me")return e.auth.me;if(i==="loginWithRedirect"||i==="login")return e.auth.loginWithRedirect;if(i==="logout")return e.auth.logout;if(i==="updateMyUserData")return e.auth.updateMe}return e.entities[n][i]}})}),Iw}var jr=mce();const fv=({defaultValue:e,value:t,onValueChange:n,children:r,className:i,...a})=>{const[o,l]=E.useState(e),c=t!==void 0?t:o,u=n||l;return s.jsx("div",{className:et("w-full",i),...a,children:ne.Children.map(r,f=>ne.isValidElement(f)?ne.cloneElement(f,{activeTab:c,setActiveTab:u}):f)})},HO=({children:e,className:t,activeTab:n,setActiveTab:r,...i})=>s.jsx("div",{className:et("flex border-b border-gray-200",t),...i,children:ne.Children.map(e,a=>ne.isValidElement(a)?ne.cloneElement(a,{activeTab:n,setActiveTab:r}):a)}),Bc=({value:e,children:t,activeTab:n,setActiveTab:r,className:i,...a})=>s.jsx("button",{onClick:()=>r(e),className:et("px-4 py-2 font-medium text-sm border-b-2 transition-colors",n===e?"border-blue-500 text-blue-600":"border-transparent text-gray-600 hover:text-gray-900",i),...a,children:t}),aE=({value:e,children:t,activeTab:n,setActiveTab:r,className:i,...a})=>s.jsx("div",{className:et(n===e?"block":"hidden",i),...a,children:t});function wr(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 gce=typeof Symbol=="function"&&Symbol.observable||"@@observable",ZI=gce,JI=()=>Math.random().toString(36).substring(7).split("").join("."),vce={INIT:`@@redux/INIT${JI()}`,REPLACE:`@@redux/REPLACE${JI()}`},eM=vce;function yce(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 iU(e,t,n){if(typeof e!="function")throw new Error(wr(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(wr(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(wr(1));return n(iU)(e,t)}let r=e,i=t,a=new Map,o=a,l=0,c=!1;function u(){o===a&&(o=new Map,a.forEach((y,x)=>{o.set(x,y)}))}function f(){if(c)throw new Error(wr(3));return i}function d(y){if(typeof y!="function")throw new Error(wr(4));if(c)throw new Error(wr(5));let x=!0;u();const _=l++;return o.set(_,y),function(){if(x){if(c)throw new Error(wr(6));x=!1,u(),o.delete(_),a=null}}}function p(y){if(!yce(y))throw new Error(wr(7));if(typeof y.type>"u")throw new Error(wr(8));if(typeof y.type!="string")throw new Error(wr(17));if(c)throw new Error(wr(9));try{c=!0,i=r(i,y)}finally{c=!1}
625return(a=o).forEach(_=>{_()}),y}function m(y){if(typeof y!="function")throw new Error(wr(10));r=y,p({type:eM.REPLACE})}function b(){const y=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(wr(11));function _(){const w=x;w.next&&w.next(f())}return _(),{unsubscribe:y(_)}},[ZI](){return this}}}return p({type:eM.INIT}),{dispatch:p,subscribe:d,getState:f,replaceReducer:m,[ZI]:b}}function tM(e,t){return function(...n){return t(e.apply(this,n))}}function nM(e,t){if(typeof e=="function")return tM(e,t);if(typeof e!="object"||e===null)throw new Error(wr(16));const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=tM(i,t))}return n}function aU(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function xce(...e){return t=>(n,r)=>{const i=t(n,r);let a=()=>{throw new Error(wr(15))};const o={getState:i.getState,dispatch:(c,...u)=>a(c,...u)},l=e.map(c=>c(o));return a=aU(...l)(i.dispatch),{...i,dispatch:a}}}var Mw={exports:{}},Dw={};/** 626 * @license React 627 * use-sync-external-store-with-selector.production.js 628 * 629 * Copyright (c) Meta Platforms, Inc. and affiliates. 630 * 631 * This source code is licensed under the MIT license found in the 632 * LICENSE file in the root directory of this source tree. 633 */var rM;function bce(){if(rM)return Dw;rM=1;var e=ip();function t(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return Dw.useSyncExternalStoreWithSelector=function(c,u,f,d,p){var m=i(null);if(m.current===null){var b={hasValue:!1,value:null};m.current=b}else b=m.current;m=o(function(){function y(N){if(!x){if(x=!0,_=N,N=d(N),p!==void 0&&b.hasValue){var k=b.value;if(p(k,N))return S=k}return S=N}if(k=S,n(_,N))return k;
633var C=d(N);return p!==void 0&&p(k,C)?(_=N,k):(_=N,S=C)}var x=!1,_,S,w=f===void 0?null:f;return[function(){return y(u())},w===null?void 0:function(){return y(w())}]},[u,f,d,p]);var v=r(c,m[0],m[1]);return a(function(){b.hasValue=!0,b.value=v},[v]),l(v),v},Dw}var iM;function wce(){return iM||(iM=1,Mw.exports=bce()),Mw.exports}wce();var _ce=E.version.startsWith("19"),Sce=Symbol.for(_ce?"react.transitional.element":"react.element"),jce=Symbol.for("react.portal"),Nce=Symbol.for("react.fragment"),Ece=Symbol.for("react.strict_mode"),kce=Symbol.for("react.profiler"),Oce=Symbol.for("react.consumer"),Cce=Symbol.for("react.context"),oU=Symbol.for("react.forward_ref"),Ace=Symbol.for("react.suspense"),Pce=Symbol.for("react.suspense_list"),WO=Symbol.for("react.memo"),Tce=Symbol.for("react.lazy"),Rce=oU,Ice=WO;function Mce(e){if(typeof e=="object"&&e!==null){const{$$typeof:t}=e;switch(t){case Sce:switch(e=e.type,e){case Nce:case kce:case Ece:case Ace:case Pce:return e;default:switch(e=e&&e.$$typeof,e){case Cce:case oU:case Tce:case WO:return e;case Oce:return e;default:return t}}case jce:return t}}}function Dce(e){return Mce(e)===WO}function Lce(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:a,areStatePropsEqual:o}){let l=!1,c,u,f,d,p;function m(_,S){return c=_,u=S,f=e(c,u),d=t(r,u),p=n(f,d,u),l=!0,p}
vendor: 5,522 bytes, line 633
633function b(){return f=e(c,u),t.dependsOnOwnProps&&(d=t(r,u)),p=n(f,d,u),p}function v(){return e.dependsOnOwnProps&&(f=e(c,u)),t.dependsOnOwnProps&&(d=t(r,u)),p=n(f,d,u),p}function y(){const _=e(c,u),S=!o(_,f);return f=_,S&&(p=n(f,d,u)),p}function x(_,S){const w=!a(S,u),N=!i(_,c,S,u);return c=_,u=S,w&&N?b():w?v():N?y():p}return function(S,w){return l?x(S,w):m(S,w)}}function $ce(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){const a=t(e,i),o=n(e,i),l=r(e,i);return Lce(a,o,l,e,i)}function Fce(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...a)=>t(i(...a)))}return n}function oE(e){return function(n){const r=e(n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function aM(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function sU(e,t){return function(r,{displayName:i}){const a=function(l,c){return a.dependsOnOwnProps?a.mapToProps(l,c):a.mapToProps(l,void 0)};return a.dependsOnOwnProps=!0,a.mapToProps=function(l,c){a.mapToProps=e,a.dependsOnOwnProps=aM(e);let u=a(l,c);return typeof u=="function"&&(a.mapToProps=u,a.dependsOnOwnProps=aM(u),u=a(l,c)),u},a}}function VO(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Bce(e){return e&&typeof e=="object"?oE(t=>Fce(e,t)):e?typeof e=="function"?sU(e):VO(e,"mapDispatchToProps"):oE(t=>({dispatch:t}))}function qce(e){return e?typeof e=="function"?sU(e):VO(e,"mapStateToProps"):oE(()=>({}))}function Uce(e,t,n){return{...n,...e,...t}}function zce(e){return function(n,{displayName:r,areMergedPropsEqual:i}){let a=!1,o;return function(c,u,f){const d=e(c,u,f);return a?i(d,o)||(o=d):(a=!0,o=d),o}}}function Hce(e){return e?typeof e=="function"?zce(e):VO(e,"mergeProps"):()=>Uce}function Wce(e){e()}function Vce(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Wce(()=>{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 oM={notify(){},get:()=>[]};function lU(e,t){let n,r=oM,i=0,a=!1;function o(v){f();const y=r.subscribe(v);let x=!1;return()=>{x||(x=!0,y(),d())}}function l(){r.notify()}function c(){b.onStateChange&&b.onStateChange()}function u(){return a}function f(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=Vce())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=oM)}function p(){a||(a=!0,f())}function m(){a&&(a=!1,d())}const b={addNestedSub:o,notifyNestedSubs:l,handleChangeWrapper:c,isSubscribed:u,trySubscribe:p,tryUnsubscribe:m,getListeners:()=>r};return b}var Gce=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Kce=Gce(),Yce=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Qce=Yce(),Xce=()=>Kce||Qce?E.useLayoutEffect:E.useEffect,hv=Xce();function sM(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Lw(e,t){if(sM(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!sM(e[n[i]],t[n[i]]))return!1;return!0}var Zce={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Jce={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},eue={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cU={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},tue={[Rce]:eue,[Ice]:cU};function lM(e){return Dce(e)?cU:tue[e.$$typeof]||Zce}var nue=Object.defineProperty,rue=Object.getOwnPropertyNames,cM=Object.getOwnPropertySymbols,iue=Object.getOwnPropertyDescriptor,aue=Object.getPrototypeOf,uM=Object.prototype;function sE(e,t){if(typeof t!="string"){if(uM){const a=aue(t);a&&a!==uM&&sE(e,a)}let n=rue(t);cM&&(n=n.concat(cM(t)));const r=lM(e),i=lM(t);for(let a=0;a<n.length;++a){const o=n[a];if(!Jce[o]&&!(i&&i[o])&&!(r&&r[o])){const l=iue(t,o);try{nue(e,o,l)}catch{}}}}return e}var $w=Symbol.for("react-redux-context"),Fw=typeof globalThis<"u"?globalThis:{};function oue(){if(!E.createContext)return{};const e=Fw[$w]??(Fw[$w]=new Map);let t=e.get(E.createContext);return t||(t=E.createContext(null),e.set(E.createContext,t)),t}var uU=oue(),sue=[null,null];function lue(e,t,n){hv(()=>e(...t),n)}function cue(e,t,n,r,i,a){e.current=r,n.current=!1,i.current&&(i.current=null,a())}function uue(e,t,n,r,i,a,o,l,c,u,f){if(!e)return()=>{};let d=!1,p=null;const m=()=>{if(d||!l.current)return;const v=t.getState();let y,x;try{y=r(v,i.current)}catch(_){x=_,p=_}x||(p=null),y===a.current?o.current||u():(a.current=y,c.current=y,o.current=!0,f())};return n.onStateChange=m,n.trySubscribe(),m(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}function due(e,t){return e===t}function fue(e,t,n,{pure:r,areStatesEqual:i=due,areOwnPropsEqual:a=Lw,areStatePropsEqual:o=Lw,areMergedPropsEqual:l=Lw,forwardRef:c=!1,context:u=uU}={}){const f=u,d=qce(e),p=Bce(t),m=Hce(n),b=!!e;return y=>{const x=y.displayName||y.name||"Component",_=`Connect(${x})`,S={shouldHandleStateChanges:b,displayName:_,wrappedComponentName:x,WrappedComponent:y,initMapStateToProps:d,initMapDispat
633chToProps:p,initMergeProps:m,areStatesEqual:i,areStatePropsEqual:o,areOwnPropsEqual:a,areMergedPropsEqual:l};function w(C){const[P,L,T]=E.useMemo(()=>{const{reactReduxForwardedRef:V,...fe}=C;return[C.context,V,fe]},[C]),A=E.useMemo(()=>{let V=f;return P!=null&&P.Consumer,V},[P,f]),R=E.useContext(A),I=!!C.store&&!!C.store.getState&&!!C.store.dispatch,M=!!R&&!!R.store,B=I?C.store:R.store,W=M?R.getServerState:B.getState,G=E.useMemo(()=>$ce(B.dispatch,S),[B]),[H,K]=E.useMemo(()=>{if(!b)return sue;const V=lU(B,I?void 0:R.subscription),fe=V.notifyNestedSubs.bind(V);return[V,fe]},[B,I,R]),$=E.useMemo(()=>I?R:{...R,subscription:H},[I,R,H]),F=E.useRef(void 0),z=E.useRef(T),U=E.useRef(void 0),ee=E.useRef(!1),re=E.useRef(!1),X=E.useRef(void 0);hv(()=>(re.current=!0,()=>{re.current=!1}),[]);const Z=E.useMemo(()=>()=>U.current&&T===z.current?U.current:G(B.getState(),T),[B,T]),ie=E.useMemo(()=>fe=>H?uue(b,B,H,G,z,F,ee,re,U,K,fe):()=>{},[H]);lue(cue,[z,F,ee,T,U,K]);let Y;try{Y=E.useSyncExternalStore(ie,Z,W?()=>G(W(),T):Z)}catch(V){throw X.current&&(V.message+=` 634The error may be correlated with this previous error: 635${X.current.stack} 636 637`),V}hv(()=>{X.current=void 0,U.current=void 0,F.current=Y});const J=E.useMemo(()=>E.createElement(y,{...Y,ref:L}),[L,y,Y]);return E.useMemo(()=>b?E.createElement(A.Provider,{value:$},J):J,[A,J,$])}const k=E.memo(w);if(k.WrappedComponent=y,k.displayName=w.displayName=_,c){const P=E.forwardRef(function(T,A){return E.createElement(k,{...T,reactReduxForwardedRef:A})});return P.displayName=_,P.WrappedComponent=y,sE(P,y)}return sE(k,y)}}var dU=fue;function hue(e){const{children:t,context:n,serverState:r,store:i}=e,a=E.useMemo(()=>{const c=lU(i);return{store:i,subscription:c,getServerState:r?()=>r:void 0}},[i,r]),o=E.useMemo(()=>i.getState(),[i]);hv(()=>{const{subscription:c}=a;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),o!==i.getState()&&c.notifyNestedSubs(),()=>{c.tryUnsubscribe(),c.onStateChange=void 0}},[a,o]);const l=n||uU;return E.createElement(l.Provider,{value:a},t)}var pue=hue;function mue(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function fU(e,t){var n=E.useState(function(){return{inputs:t,result:e()}})[0],r=E.useRef(!0),i=E.useRef(n),a=r.current||!!(t&&i.current.inputs&&mue(t,i.current.inputs)),o=a?i.current:{inputs:t,result:e()};return E.useEffect(function(){r.current=!1,i.current=o},[o]),o.result}function gue(e,t){return fU(function(){return e},t)}var Lt=fU,it=gue,vue="Invariant failed";function vs(e,t){throw new Error(vue)}var aa=function(t){var n=t.top,r=t.right,i=t.bottom,a=t.left,o=r-a,l=i-n,c={top:n,right:r,bottom:i,left:a,width:o,height:l,x:a,y:n,center:{x:(r+a)/2,y:(i+n)/2}};return c},GO=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}}
637,dM=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},yue=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Bw={top:0,right:0,bottom:0,left:0},KO=function(t){var n=t.borderBox,r=t.margin,i=r===void 0?Bw:r,a=t.border,o=a===void 0?Bw:a,l=t.padding,c=l===void 0?Bw:l,u=aa(GO(n,i)),f=aa(dM(n,o)),d=aa(dM(f,c));return{marginBox:u,borderBox:aa(n),paddingBox:f,contentBox:d,margin:i,border:o,padding:c}},xi=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var i=Number(n);return isNaN(i)&&vs(),i},xue=function(){return{x:window.pageXOffset,y:window.pageYOffset}},pv=function(t,n){var r=t.borderBox,i=t.border,a=t.margin,o=t.padding,l=yue(r,n);return KO({borderBox:l,border:i,margin:a,padding:o})},mv=function(t,n){return n===void 0&&(n=xue()),pv(t,n)},hU=function(t,n){var r={top:xi(n.marginTop),right:xi(n.marginRight),bottom:xi(n.marginBottom),left:xi(n.marginLeft)},i={top:xi(n.paddingTop),right:xi(n.paddingRight),bottom:xi(n.paddingBottom),left:xi(n.paddingLeft)},a={top:xi(n.borderTopWidth),right:xi(n.borderRightWidth),bottom:xi(n.borderBottomWidth),left:xi(n.borderLeftWidth)};return KO({borderBox:t,margin:r,padding:i,border:a})},pU=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return hU(n,r)},fM=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function bue(e,t){return!!(e===t||fM(e)&&fM(t))}function wue(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!bue(e[n],t[n]))return!1;return!0}function Kn(e,t){t===void 0&&(t=wue);var n=null;function r(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var o=e.apply(this,i);return n={lastResult:o,lastArgs:i,lastThis:this},o}return r.clear=function(){n=null},r}var ah=function(t){var n=[],r=null,i=function(){for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];n=l,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return i.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},i};function gv(){return gv=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},gv.apply(null,arguments)}function mU(e,t){}mU.bind(null,"warn");mU.bind(null,"error");function ls(){}function _ue(e,t){return{...e,...t}}function Pi(e,t,n){const r=t.map(i=>{const a=_ue(n,i.options);return e.addEventListener(i.eventName,i.fn,a),function(){e.removeEventListener(i.eventName,i.fn,a)}});return function(){r.forEach(a=>{a()})}}const Sue="Invariant failed";class vv extends Error{}vv.prototype.toString=function(){return this.message};function Ue(e,t){throw new vv(Sue)}class jue extends ne.Component{constructor(...t){super(...t),this.callbacks=null,this.unbind=ls,this.onWindowError=n=>{const r=this.getCallbacks();r.isDragging()&&r.tryAbort(),n.error instanceof vv&&n.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return this.callbacks},this.setCallbacks=n=>{this.callbacks=n}}componentDidMount(){this.unbind=Pi(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof vv){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const Nue=` 638 Press space bar to start a drag. 639 When dragging you can use the arrow keys to move the item around and escape to cancel. 640 Some screen readers may require you to be in focus mode or to use your pass through key 641`,yv=e=>e+1,Eue=e=>` 642 You have lifted an item in position ${yv(e.source.index)} 643`,gU=(e,t)=>{const n=e.droppableId===t.droppableId,r=yv(e.index),i=yv(t.index);return n?` 644 You have moved the item from position ${r} 645 to position ${i} 646 `:` 647 You have moved the item from position ${r} 648 in list ${e.droppableId} 649 to list ${t.droppableId} 650 in position ${i} 651 `},vU=(e,t,n)=>t.droppableId===n.droppableId?` 652 The item ${e} 653 has been combined with ${n.draggableId}`:` 654 The item ${e} 655 in list ${t.droppableId} 656 has been combined with ${n.draggableId} 657 in list ${n.droppableId} 658 `,kue=e=>{const t=e.destination;if(t)return gU(e.source,t);
658const n=e.combine;return n?vU(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},hM=e=>` 659 The item has returned to its starting position 660 of ${yv(e.index)} 661`,Oue=e=>{if(e.reason==="CANCEL")return` 662 Movement cancelled. 663 ${hM(e.source)} 664 `;const t=e.destination,n=e.combine;return t?` 665 You have dropped the item. 666 ${gU(e.source,t)} 667 `:n?` 668 You have dropped the item. 669 ${vU(e.draggableId,e.source,n)} 670 `:` 671 The item has been dropped while not over a drop area. 672 ${hM(e.source)} 673 `},Yg={dragHandleUsageInstructions:Nue,onDragStart:Eue,onDragUpdate:kue,onDragEnd:Oue},Yn={x:0,y:0},rr=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),ii=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),cs=(e,t)=>e.x===t.x&&e.y===t.y,Qu=e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),Ol=(e,t,n=0)=>e==="x"?{x:t,y:n}:{x:n,y:t},oh=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),pM=(e,t)=>Math.min(...t.map(n=>oh(e,n))),yU=e=>t=>({x:e(t.x),y:e(t.y)});var Cue=(e,t)=>{const n=aa({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n};const xp=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),mM=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Aue={top:0,right:0,bottom:0,left:0},Pue=(e,t)=>t?xp(e,t.scroll.diff.displacement):e,Tue=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,Rue=(e,t)=>t&&t.shouldClipSubject?Cue(t.pageMarginBox,e):aa(e);var cu=({page:e,withPlaceholder:t,axis:n,frame:r})=>{const i=Pue(e.marginBox,r),a=Tue(i,n,t),o=Rue(a,r);return{page:e,withPlaceholder:t,active:o}},YO=(e,t)=>{e.frame||Ue();const n=e.frame,r=ii(t,n.scroll.initial),i=Qu(r),a={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},o=cu({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return{...e,frame:a,subject:o}};const xU=Kn(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),bU=Kn(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),Xy=Kn(e=>Object.values(e)),Iue=Kn(e=>Object.values(e));var Xu=Kn((e,t)=>Iue(t).filter(r=>e===r.descriptor.droppableId).sort((r,i)=>r.descriptor.index-i.descriptor.index));function QO(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Zy(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var Jy=Kn((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),Mue=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:i})=>{if(!n.isCombineEnabled||!QO(i))return null;function o(m){const b={type:"COMBINE",combine:{draggableId:m,droppableId:n.descriptor.id}};return{...i,at:b}}const l=i.displaced.all,c=l.length?l[0]:null;if(e)return c?o(c):null;const u=Jy(t,r);if(!c){if(!u.length)return null;const m=u[u.length-1];return o(m.descriptor.id)}const f=u.findIndex(m=>m.descriptor.id===c);f===-1&&Ue();const d=f-1;if(d<0)return null;const p=u[d];return o(p.descriptor.id)},Zu=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const wU={point:Yn,value:0},sh={invisible:{},visible:{},all:[]},Due={displaced:sh,displacedBy:wU,at:null};var Ii=(e,t)=>n=>e<=n&&n<=t,_U=e=>{const t=Ii(e.top,e.bottom),n=Ii(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const a=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(a&&o)return!0;const c=r.top<e.top&&r.bottom>e.bottom,u=r.left<e.left&&r.right>e.right;return c&&u?!0:c&&o||u&&a}},Lue=e=>{const t=Ii(e.top,e.bottom),n=Ii(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)};const XO={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},SU={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var $ue=e=>t=>{const n=Ii(t.top,t.bottom),r=Ii(t.left,t.right);return i=>e===XO?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)};const Fue=(e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:Yn;return xp(e,n)}
673,Bue=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,que=(e,t,n)=>n(t)(e),ZO=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:i})=>{const a=r?Fue(e,t):e;return Bue(a,t,i)&&que(a,n,i)},Uue=e=>ZO({...e,isVisibleThroughFrameFn:_U}),jU=e=>ZO({...e,isVisibleThroughFrameFn:Lue}),zue=e=>ZO({...e,isVisibleThroughFrameFn:$ue(e.destination.axis)}),Hue=(e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:i}=t;if(r[e])return!1;const a=i[e];return a?a.shouldAnimate:!0};function Wue(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return aa(GO(n,r))}function lh({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:i,last:a}){return e.reduce(function(l,c){const u=Wue(c,n),f=c.descriptor.id;if(l.all.push(f),!Uue({target:u,destination:t,viewport:r,withDroppableDisplacement:!0}))return l.invisible[c.descriptor.id]=!0,l;const p=Hue(f,a,i),m={draggableId:f,shouldAnimate:p};return l.visible[f]=m,l},{all:[],visible:{},invisible:{}})}function Vue(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function gM({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){const i=Vue(e,{inHomeList:t});return{displaced:sh,displacedBy:n,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:i}}}}function xv({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:i,last:a,index:o,forceShouldAnimate:l}){const c=Zu(e,n);if(o==null)return gM({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});const u=t.find(b=>b.descriptor.index===o);if(!u)return gM({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});const f=Jy(e,t),d=t.indexOf(u),p=f.slice(d);return{displaced:lh({afterDragging:p,destination:n,displacedBy:i,last:a,viewport:r.frame,forceShouldAnimate:l}),displacedBy:i,at:{type:"REORDER",destination:{droppableId:n.descriptor.id,index:o}}}}function ys(e,t){return!!t.effected[e]}var Gue=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:i})=>{if(!t.isCombineEnabled)return null;const a=r.draggableId,l=n[a].descriptor.index;return ys(a,i)?e?l:l-1:e?l+1:l},Kue=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;const i=r.index,a=e?i+1:i-1,o=n[0].descriptor.index,l=n[n.length-1].descriptor.index,c=t?l:l+1;return a<o||a>c?null:a},Yue=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:i,insideDestination:a,previousImpact:o,viewport:l,afterCritical:c})=>{const u=o.at;if(u||Ue(),u.type==="REORDER"){const d=Kue({isMovingForward:e,isInHomeList:t,location:u.destination,insideDestination:a});return d==null?null:xv({draggable:n,insideDestination:a,destination:i,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:d})}const f=Gue({isMovingForward:e,destination:i,displaced:o.displaced,draggables:r,combine:u.combine,afterCritical:c});return f==null?null:xv({draggable:n,insideDestination:a,destination:i,viewport:l,last:o.displaced,displacedBy:o.displacedBy,index:f})},Que=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{const i=!!(e.visible[n]||e.invisible[n]);return ys(n,t)?i?Yn:Qu(r.point):i?r.point:Yn},Xue=({afterCritical:e,impact:t,draggables:n})=>{const r=Zy(t);r||Ue();const i=r.draggableId,a=n[i].page.borderBox.center,o=Que({displaced:t.displaced,afterCritical:e,combineWith:i,displacedBy:t.displacedBy});return rr(a,o)};const NU=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,Zue=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,JO=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,vM=({axis:e,moveRelativeTo:t,isMoving:n})=>Ol(e.line,t.marginBox[e.end]+NU(e,n),JO(e,t.marginBox,n)),yM=({axis:e,moveRelativeTo:t,isMoving:n})=>Ol(e.line,t.marginBox[e.start]-Zue(e,n),JO(e,t.marginBox,n)),Jue=({axis:e,moveInto:t,isMoving:n})=>Ol(e.line,t.contentBox[e.start]+NU(e,n),JO(e,t.contentBox,n));var ede=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i})=>{const a=Xu(r.descriptor.id,n),o=t.page,l=r.axis;if(!a.length)return Jue({axis:l,moveInto:r.page,isMoving:o});const{displaced:c,displacedBy:u}=e,f=c.all[0];if(f){const p=n[f];if(ys(f,i))return yM({axis:l,moveRelativeTo:p.page,isMoving:o});const m=pv(p.page,u.point);return yM({axis:l,moveRelativeTo:m,isMoving:o})}const d=a[a.length-1];if(d.descriptor.id===t.descriptor.id)return o.borderBox.center;if(ys(d.descriptor.id,i)){const p=pv(d.page,Qu(i.displacedBy.point));return vM({axis:l,moveRelativeTo:p,isMoving:o})}return vM({axis:l,moveRelativeTo:d.page,isMoving:o})},lE=(e,t)=>{const n=e.frame;return n?rr(t,n.scroll.diff.displacement):t};const tde=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:i})=>{const a=t.page.borderBox.center,o=e.at;return!n||!o?a:o.type==="REORDER"?ede({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i}):Xue({impact:e,draggables:r,afterCritical:i})};var ex=e=>{const t=tde(e),n=e.droppable;return n?lE(n,t):t},EU=(e,t)=>{const n=ii(t,e.scroll.initial),r=Qu(n);return{frame:aa({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function xM(e,t){return e.map(n=>t[n])}
673function nde(e,t){for(let n=0;n<t.length;n++){const r=t[n].visible[e];if(r)return r}return null}var rde=({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:i})=>{const a=EU(t,rr(t.scroll.current,i)),o=n.frame?YO(n,rr(n.frame.scroll.current,i)):n,l=e.displaced,c=lh({afterDragging:xM(l.all,r),destination:n,displacedBy:e.displacedBy,viewport:a.frame,last:l,forceShouldAnimate:!1}),u=lh({afterDragging:xM(l.all,r),destination:o,displacedBy:e.displacedBy,viewport:t.frame,last:l,forceShouldAnimate:!1}),f={},d={},p=[l,c,u];return l.all.forEach(b=>{const v=nde(b,p);if(v){d[b]=v;return}f[b]=!0}),{...e,displaced:{all:l.all,invisible:f,visible:d}}},ide=(e,t)=>rr(e.scroll.diff.displacement,t),eC=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{const r=ide(n,e),i=ii(r,t.page.borderBox.center);return rr(t.client.borderBox.center,i)},kU=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:i,onlyOnMainAxis:a=!1})=>{const o=ii(n,e.page.borderBox.center),c={target:xp(e.page.borderBox,o),destination:t,withDroppableDisplacement:i,viewport:r};return a?zue(c):jU(c)},ade=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:i,viewport:a,previousPageBorderBoxCenter:o,previousClientSelection:l,afterCritical:c})=>{if(!n.isEnabled)return null;const u=Xu(n.descriptor.id,r),f=Zu(t,n),d=Mue({isMovingForward:e,draggable:t,destination:n,insideDestination:u,previousImpact:i})||Yue({isMovingForward:e,isInHomeList:f,draggable:t,draggables:r,destination:n,insideDestination:u,previousImpact:i,viewport:a,afterCritical:c});if(!d)return null;const p=ex({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:c});if(kU({draggable:t,destination:n,newPageBorderBoxCenter:p,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:eC({pageBorderBoxCenter:p,draggable:t,viewport:a}),impact:d,scrollJumpRequest:null};const b=ii(p,o),v=rde({impact:d,viewport:a,destination:n,draggables:r,maxScrollChange:b});return{clientSelection:l,impact:v,scrollJumpRequest:b}};const br=e=>{const t=e.subject.active;return t||Ue(),t};var ode=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:i})=>{const a=n.subject.active;if(!a)return null;const o=n.axis,l=Ii(a[o.start],a[o.end]),c=Xy(r).filter(f=>f!==n).filter(f=>f.isEnabled).filter(f=>!!f.subject.active).filter(f=>_U(i.frame)(br(f))).filter(f=>{const d=br(f);return e?a[o.crossAxisEnd]<d[o.crossAxisEnd]:d[o.crossAxisStart]<a[o.crossAxisStart]}).filter(f=>{const d=br(f),p=Ii(d[o.start],d[o.end]);return l(d[o.start])||l(d[o.end])||p(a[o.start])||p(a[o.end])}).sort((f,d)=>{const p=br(f)[o.crossAxisStart],m=br(d)[o.crossAxisStart];return e?p-m:m-p}).filter((f,d,p)=>br(f)[o.crossAxisStart]===br(p[0])[o.crossAxisStart]);if(!c.length)return null;if(c.length===1)return c[0];const u=c.filter(f=>Ii(br(f)[o.start],br(f)[o.end])(t[o.line]));return u.length===1?u[0]:u.length>1?u.sort((f,d)=>br(f)[o.start]-br(d)[o.start])[0]:c.sort((f,d)=>{const p=pM(t,mM(br(f))),m=pM(t,mM(br(d)));return p!==m?p-m:br(f)[o.start]-br(d)[o.start]})[0]};const bM=(e,t)=>{const n=e.page.borderBox.center;return ys(e.descriptor.id,t)?ii(n,t.displacedBy.point):n},sde=(e,t)=>{const n=e.page.borderBox;return ys(e.descriptor.id,t)?xp(n,Qu(t.displacedBy.point)):n};var lde=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:i})=>r.filter(o=>jU({target:sde(o,i),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((o,l)=>{const c=oh(e,lE(n,bM(o,i))),u=oh(e,lE(n,bM(l,i)));return c<u?-1:u<c?1:o.descriptor.index-l.descriptor.index})[0]||null,bp=Kn(function(t,n){const r=n[t.line];return{value:r,point:Ol(t.line,r)}});const cde=(e,t,n)=>{const r=e.axis;if(e.descriptor.mode==="virtual")return Ol(r.line,t[r.line]);const i=e.subject.page.contentBox[r.size],c=Xu(e.descriptor.id,n).reduce((u,f)=>u+f.client.marginBox[r.size],0)+t[r.line]-i;return c<=0?null:Ol(r.line,c)},OU=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),CU=(e,t,n)=>{const r=e.frame;Zu(t,e)&&Ue(),e.subject.withPlaceholder&&Ue();const i=bp(e.axis,t.displaceBy).point,a=cde(e,i,n),o={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const f=cu({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:e.frame});return{...e,subject:f}}const l=a?rr(r.scroll.max,a):r.scroll.max,c=OU(r,l),u=cu({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:c});return{...e,subject:u,frame:c}},ude=e=>{const t=e.subject.withPlaceholder;t||Ue();const n=e.frame;if(!n){const o=cu({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:o}}const r=t.oldFrameMaxScroll;r||Ue();const i=OU(n,r),a=cu({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:a,frame:i}};var dde=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:i,destination:a,viewport:o,afterCritical:l})=>
673{if(!t){if(n.length)return null;const d={displaced:sh,displacedBy:wU,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},p=ex({impact:d,draggable:r,droppable:a,draggables:i,afterCritical:l}),m=Zu(r,a)?a:CU(a,r,i);return kU({draggable:r,destination:m,newPageBorderBoxCenter:p,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}const c=e[a.axis.line]<=t.page.borderBox.center[a.axis.line],u=(()=>{const d=t.descriptor.index;return t.descriptor.id===r.descriptor.id||c?d:d+1})(),f=bp(a.axis,r.displaceBy);return xv({draggable:r,insideDestination:n,destination:a,viewport:o,displacedBy:f,last:sh,index:u})},fde=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:i,droppables:a,viewport:o,afterCritical:l})=>{const c=ode({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:a,viewport:o});if(!c)return null;const u=Xu(c.descriptor.id,i),f=lde({pageBorderBoxCenter:t,viewport:o,destination:c,insideDestination:u,afterCritical:l}),d=dde({previousPageBorderBoxCenter:t,destination:c,draggable:n,draggables:i,moveRelativeTo:f,insideDestination:u,viewport:o,afterCritical:l});if(!d)return null;const p=ex({impact:d,draggable:n,droppable:c,draggables:i,afterCritical:l});return{clientSelection:eC({pageBorderBoxCenter:p,draggable:n,viewport:o}),impact:d,scrollJumpRequest:null}},oi=e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null};const hde=(e,t)=>{const n=oi(e);return n?t[n]:null};var pde=({state:e,type:t})=>{const n=hde(e.impact,e.dimensions.droppables),r=!!n,i=e.dimensions.droppables[e.critical.droppable.id],a=n||i,o=a.axis.direction,l=o==="vertical"&&(t==="MOVE_UP"||t==="MOVE_DOWN")||o==="horizontal"&&(t==="MOVE_LEFT"||t==="MOVE_RIGHT");if(l&&!r)return null;const c=t==="MOVE_DOWN"||t==="MOVE_RIGHT",u=e.dimensions.draggables[e.critical.draggable.id],f=e.current.page.borderBoxCenter,{draggables:d,droppables:p}=e.dimensions;return l?ade({isMovingForward:c,previousPageBorderBoxCenter:f,draggable:u,destination:a,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):fde({isMovingForward:c,previousPageBorderBoxCenter:f,draggable:u,isOver:a,draggables:d,droppables:p,viewport:e.viewport,afterCritical:e.afterCritical})};function el(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function AU(e){const t=Ii(e.top,e.bottom),n=Ii(e.left,e.right);return function(i){return t(i.y)&&n(i.x)}}function mde(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function gde({pageBorderBox:e,draggable:t,candidates:n}){const r=t.page.borderBox.center,i=n.map(a=>{const o=a.axis,l=Ol(a.axis.line,e.center[o.line],a.page.borderBox.center[o.crossAxisLine]);return{id:a.descriptor.id,distance:oh(r,l)}}).sort((a,o)=>o.distance-a.distance);return i[0]?i[0].id:null}function vde({pageBorderBox:e,draggable:t,droppables:n}){const r=Xy(n).filter(i=>{if(!i.isEnabled)return!1;const a=i.subject.active;if(!a||!mde(e,a))return!1;if(AU(a)(e.center))return!0;const o=i.axis,l=a.center[o.crossAxisLine],c=e[o.crossAxisStart],u=e[o.crossAxisEnd],f=Ii(a[o.crossAxisStart],a[o.crossAxisEnd]),d=f(c),p=f(u);return!d&&!p?!0:d?c<l:u>l});return r.length?r.length===1?r[0].descriptor.id:gde({pageBorderBox:e,draggable:t,candidates:r}):null}const PU=(e,t)=>aa(xp(e,t));var yde=(e,t)=>{const n=e.frame;return n?PU(t,n.scroll.diff.value):t};function TU({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function xde({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var bde=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:i,viewport:a,afterCritical:o})=>{const l=n.axis,c=bp(n.axis,t.displaceBy),u=c.value,f=e[l.start],d=e[l.end],m=Jy(t,r).find(v=>{const y=v.descriptor.id,x=v.page.borderBox.center[l.line],_=ys(y,o),S=TU({displaced:i,id:y});return _?S?d<=x:f<x-u:S?d<=x+u:f<x})||null,b=xde({draggable:t,closest:m,inHomeList:Zu(t,n)});return xv({draggable:t,insideDestination:r,destination:n,viewport:
673a,last:i,displacedBy:c,index:b})};const wde=4;var _de=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:i,afterCritical:a})=>{if(!r.isCombineEnabled)return null;const o=r.axis,l=bp(r.axis,e.displaceBy),c=l.value,u=t[o.start],f=t[o.end],p=Jy(e,i).find(b=>{const v=b.descriptor.id,y=b.page.borderBox,_=y[o.size]/wde,S=ys(v,a),w=TU({displaced:n.displaced,id:v});return S?w?f>y[o.start]+_&&f<y[o.end]-_:u>y[o.start]-c+_&&u<y[o.end]-c-_:w?f>y[o.start]+c+_&&f<y[o.end]+c-_:u>y[o.start]+_&&u<y[o.end]-_});return p?{displacedBy:l,displaced:n.displaced,at:{type:"COMBINE",combine:{draggableId:p.descriptor.id,droppableId:r.descriptor.id}}}:null},RU=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:i,viewport:a,afterCritical:o})=>{const l=PU(t.page.borderBox,e),c=vde({pageBorderBox:l,draggable:t,droppables:r});if(!c)return Due;const u=r[c],f=Xu(u.descriptor.id,n),d=yde(u,l);return _de({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:i,destination:u,insideDestination:f,afterCritical:o})||bde({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:u,insideDestination:f,last:i.displaced,viewport:a,afterCritical:o})},tC=(e,t)=>({...e,[t.descriptor.id]:t});const Sde=({previousImpact:e,impact:t,droppables:n})=>{const r=oi(e),i=oi(t);if(!r||r===i)return n;const a=n[r];if(!a.subject.withPlaceholder)return n;const o=ude(a);return tC(n,o)};var jde=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:i})=>{const a=Sde({previousImpact:r,impact:i,droppables:n}),o=oi(i);if(!o)return a;const l=n[o];if(Zu(e,l)||l.subject.withPlaceholder)return a;const c=CU(l,e,t);return tC(a,c)},$f=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:i,scrollJumpRequest:a})=>{const o=r||e.viewport,l=n||e.dimensions,c=t||e.current.client.selection,u=ii(c,e.initial.client.selection),f={offset:u,selection:c,borderBoxCenter:rr(e.initial.client.borderBoxCenter,u)},d={selection:rr(f.selection,o.scroll.current),borderBoxCenter:rr(f.borderBoxCenter,o.scroll.current),offset:rr(f.offset,o.scroll.diff.value)},p={client:f,page:d};if(e.phase==="COLLECTING")return{...e,dimensions:l,viewport:o,current:p};const m=l.draggables[e.critical.draggable.id],b=i||RU({pageOffset:d.offset,draggable:m,draggables:l.draggables,droppables:l.droppables,previousImpact:e.impact,viewport:o,afterCritical:e.afterCritical}),v=jde({draggable:m,impact:b,previousImpact:e.impact,draggables:l.draggables,droppables:l.droppables});return{...e,current:p,dimensions:{draggables:l.draggables,droppables:v},impact:b,viewport:o,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null}};function Nde(e,t){return e.map(n=>t[n])}var IU=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:i})=>{const a=e.displaced,o=Nde(a.all,n),l=lh({afterDragging:o,destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:i,last:a});return{...e,displaced:l}},MU=({impact:e,draggable:t,droppable:n,draggables:r,viewport:i,afterCritical:a})=>{const o=ex({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:a});return eC({pageBorderBoxCenter:o,draggable:t,viewport:i})},DU=({state:e,dimensions:t,viewport:n})=>{e.movementMode!=="SNAP"&&Ue();const r=e.impact,i=n||e.viewport,a=t||e.dimensions,{draggables:o,droppables:l}=a,c=o[e.critical.draggable.id],u=oi(r);u||Ue();const f=l[u],d=IU({impact:r,viewport:i,destination:f,draggables:o}),p=MU({impact:d,draggable:c,droppable:f,draggables:o,viewport:i,afterCritical:e.afterCritical});return $f({impact:d,clientSelection:p,state:e,dimensions:a,viewport:i})},Ede=e=>({index:e.index,droppableId:e.droppableId}),LU=({draggable:e,home:t,draggables:n,viewport:r})=>{const i=bp(t.axis,e.displaceBy),a=Xu(t.descriptor.id,n),o=a.indexOf(e);o===-1&&Ue();const l=a.slice(o+1),c=l.reduce((p,m)=>(p[m.descriptor.id]=!0,p),{}),u={inVirtualList:t.descriptor.mode==="virtual",displacedBy:i,effected:c};return{impact:{displaced:lh({afterDragging:l,destination:t,displacedBy:i,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:"REORDER",destination:Ede(e.descriptor)}},afterCritical:u}},kde=(e,t)=>({draggables:e.draggables,droppables:tC(e.droppables,t)}),Ode=({draggable:e,offset:t,initialWindowScroll:n})=>
673{const r=pv(e.client,t),i=mv(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:i}},Cde=e=>{const t=e.frame;return t||Ue(),t},Ade=({additions:e,updatedDroppables:t,viewport:n})=>{const r=n.scroll.diff.value;return e.map(i=>{const a=i.descriptor.droppableId,o=t[a],c=Cde(o).scroll.diff.value,u=rr(r,c);return Ode({draggable:i,offset:u,initialWindowScroll:n.scroll.initial})})},Pde=({state:e,published:t})=>{const n=t.modified.map(x=>{const _=e.dimensions.droppables[x.droppableId];return YO(_,x.scroll)}),r={...e.dimensions.droppables,...xU(n)},i=bU(Ade({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),a={...e.dimensions.draggables,...i};t.removals.forEach(x=>{delete a[x]});const o={droppables:r,draggables:a},l=oi(e.impact),c=l?o.droppables[l]:null,u=o.draggables[e.critical.draggable.id],f=o.droppables[e.critical.droppable.id],{impact:d,afterCritical:p}=LU({draggable:u,home:f,draggables:a,viewport:e.viewport}),m=c&&c.isCombineEnabled?e.impact:d,b=RU({pageOffset:e.current.page.offset,draggable:o.draggables[e.critical.draggable.id],draggables:o.draggables,droppables:o.droppables,previousImpact:m,viewport:e.viewport,afterCritical:p}),v={...e,phase:"DRAGGING",impact:b,onLiftImpact:d,dimensions:o,afterCritical:p,forceShouldAnimate:!1};return e.phase==="COLLECTING"?v:{...v,phase:"DROP_PENDING",reason:e.reason,isWaiting:!1}};const cE=e=>e.movementMode==="SNAP",qw=(e,t,n)=>{const r=kde(e.dimensions,t);return!cE(e)||n?$f({state:e,dimensions:r}):DU({state:e,dimensions:r})};function Uw(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}const wM={phase:"IDLE",completed:null,shouldFlush:!1};var Tde=(e=wM,t)=>{if(t.type==="FLUSH")return{...wM,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&Ue();const{critical:n,clientSelection:r,viewport:i,dimensions:a,movementMode:o}=t.payload,l=a.draggables[n.draggable.id],c=a.droppables[n.droppable.id],u={selection:r,borderBoxCenter:l.client.borderBox.center,offset:Yn},f={client:u,page:{selection:rr(u.selection,i.scroll.initial),borderBoxCenter:rr(u.selection,i.scroll.initial),offset:rr(u.selection,i.scroll.diff.value)}},d=Xy(a.droppables).every(v=>!v.isFixedOnPage),{impact:p,afterCritical:m}=LU({draggable:l,home:c,draggables:a.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:o,dimensions:a,initial:f,current:f,isWindowScrollAllowed:d,impact:p,afterCritical:m,onLiftImpact:p,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&Ue(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||Ue(),Pde({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;el(e)||Ue();const{client:n}=t.payload;return cs(n,e.current.client.selection)?e:$f({state:e,clientSelection:n,impact:cE(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Uw(e);el(e)||Ue();const{id:n,newScroll:r}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const a=YO(i,r);return qw(e,a,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;el(e)||Ue();const{id:n,isEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||Ue(),i.isEnabled===r&&Ue();const a={...i,isEnabled:r};return qw(e,a,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;el(e)||Ue();const{id:n,isCombineEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||Ue(),i.isCombineEnabled===r&&Ue();const a={...i,isCombineEnabled:r};return qw(e,a,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;el(e)||Ue(),e.isWindowScrollAllowed||Ue();const n=t.payload.newScroll;if(cs(e.viewport.scroll.current,n))return Uw(e);const r=EU(e.viewport,n);return cE(e)?DU({state:e,viewport:r}):$f({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!el(e))return e;const n=t.payload.maxScroll;if(cs(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&Ue();const n=pde({state:e,type:t.type});return n?$f({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&Ue(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:i}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||Ue(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:i,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e};function Ht(e,t){return e instanceof Object&&"type"in e&&e.type===t}const Rde=e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),Ide=e=>({type:"LIFT",payload:e}),Mde=e=>({type:"INITIAL_PUBLISH",payload:e}),Dde=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),Lde=()=>({type:"COLLECTION_STARTING",payload:null}),$de=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Fde=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Bde=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),$U=e=>({type:"MOVE",payload:e}),qde=e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),Ude=e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),zde=()=>({type:"MOVE_UP",payload:null}),Hde=()=>({type:"MOVE_DOWN",payload:null}),Wde=()=>({type:"MOVE_RIGHT",payload:null}),Vde=()=>({type:"MOVE_LEFT",payload:null}),nC=()=>({type:"FLUSH",payload:null}),Gde=e=>({type:"DROP_ANIMATE",payload:e}),rC=e=>({type:"DROP_COMPLETE",payload:e}),FU=e=>({type:"DROP",payload:e}),Kde=e=>({type:"DROP_PENDING",payload:e}),BU=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});var Yde=e=>({getState:t,dispatch:n})=>r=>i=>{if(!Ht(i,"LIFT")){r(i);return}const{id:a,clientSelection:o,movementMode:l}=i.payload,c=t();c.phase==="DROP_ANIMATING"&&n(rC({completed:c.completed})),t().phase!=="IDLE"&&Ue(),n(nC()),n(Rde({draggableId:a,movementMode:l}));const f={draggableId:a,scrollOptions:{shouldPublishImmediately:l==="SNAP"}},{critical:d,dimensions:p,viewport:m}=e.startPublishing(f);n(Mde({critical:d,dimensions:p,clientSelection:o,movementMode:l,viewport:m}))},Qde=e=>()=>t=>n=>{Ht(n,"INITIAL_PUBLISH")&&e.dragging(),Ht(n,"DROP_ANIMATE")&&e.dropping(n.payload.completed.result.reason),(Ht(n,"FLUSH")||Ht(n,"DROP_COMPLETE"))&&e.resting(),t(n)};const iC={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},ch={opacity:{drop:0,combining:.7},scale:{drop:.75}},qU={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Gs=`${qU.outOfTheWay}s ${iC.outOfTheWay}`,Ff={fluid:`opacity ${Gs}`,snap:`transform ${Gs}, opacity ${Gs}`,drop:e=>{const t=`${e}s ${iC.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Gs}`,placeholder:`height ${Gs}, width ${Gs}, margin ${Gs}`},_M=e=>cs(e,Yn)?void 0:`translate(${e.x}px, ${e.y}px)`,uE={moveTo:_M,drop:(e,t)=>{const n=_M(e);if(n)return t?`${n} scale(${ch.scale.drop})`:n}},{minDropTime:dE,maxDropTime:UU}=qU,Xde=UU-dE,SM=1500,Zde=.6;var Jde=({current:e,destination:t,reason:n})=>{const r=oh(e,t);if(r<=0)return dE;if(r>=SM)return UU;const i=r/SM,a=dE+Xde*i,o=n==="CANCEL"?a*Zde:a;return Number(o.toFixed(2))},efe=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:i})=>{const{draggables:a,droppables:o}=n,l=oi(e),c=l?o[l]:null,u=o[t.descriptor.droppableId],f=MU({impact:e,draggable:t,draggables:a,afterCritical:i,droppable:c||u,viewport:r});return ii(f,t.client.borderBox.center)},tfe=({draggables:e,reason:t,lastImpact:n,home:r,viewport:i,onLiftImpact:a})=>!n.at||t!=="DROP"?{impact:IU({draggables:e,impact:a,destination:r,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type==="REORDER"?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:sh},didDropInsideDroppable:!0};const nfe=({getState:e,dispatch:t})=>n=>r=>{if(!Ht(r,"DROP")){n(r);return}const i=e(),a=r.payload.reason;if(i.phase==="COLLECTING"){t(Kde({reason:a}));return}if(i.phase==="IDLE")return;i.phase==="DROP_PENDING"&&i.isWaiting&&Ue(),i.phase==="DRAGGING"||i.phase==="DROP_PENDING"||Ue();const l=i.critical,c=i.dimensions,u=c.draggables[i.critical.draggable.id],{impact:f,didDropInsideDroppable:d}=tfe({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.
673id],viewport:i.viewport,draggables:i.dimensions.draggables}),p=d?QO(f):null,m=d?Zy(f):null,b={index:l.draggable.index,droppableId:l.droppable.id},v={draggableId:u.descriptor.id,type:u.descriptor.type,source:b,reason:a,mode:i.movementMode,destination:p,combine:m},y=efe({impact:f,draggable:u,dimensions:c,viewport:i.viewport,afterCritical:i.afterCritical}),x={critical:i.critical,afterCritical:i.afterCritical,result:v,impact:f};if(!(!cs(i.current.client.offset,y)||!!v.combine)){t(rC({completed:x}));return}const S=Jde({current:i.current.client.offset,destination:y,reason:a});t(Gde({newHomeClientOffset:y,dropDuration:S,completed:x}))};var zU=()=>({x:window.pageXOffset,y:window.pageYOffset});function rfe(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function ife({onWindowScroll:e}){function t(){e(zU())}const n=ah(t),r=rfe(n);let i=ls;function a(){return i!==ls}function o(){a()&&Ue(),i=Pi(window,[r])}function l(){a()||Ue(),n.cancel(),i(),i=ls}return{start:o,stop:l,isActive:a}}const afe=e=>
673Ht(e,"DROP_COMPLETE")||Ht(e,"DROP_ANIMATE")||Ht(e,"FLUSH"),ofe=e=>{const t=ife({onWindowScroll:n=>{e.dispatch(qde({newScroll:n}))}});return n=>r=>{!t.isActive()&&Ht(r,"INITIAL_PUBLISH")&&t.start(),t.isActive()&&afe(r)&&t.stop(),n(r)}};var sfe=e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),i=a=>{t||n||(t=!0,e(a),clearTimeout(r))};return i.wasCalled=()=>t,i},lfe=()=>{const e=[],t=i=>{const a=e.findIndex(l=>l.timerId===i);a===-1&&Ue();const[o]=e.splice(a,1);o.callback()};return{add:i=>{const a=setTimeout(()=>t(a)),o={timerId:a,callback:i};e.push(o)},flush:()=>{if(!e.length)return;const i=[...e];e.length=0,i.forEach(a=>{clearTimeout(a.timerId),a.callback()})}}};const cfe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,ufe=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,dfe=(e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},sf=(e,t)=>{t()},lg=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function zw(e,t,n,r){if(!e){n(r(t));return}const i=sfe(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}var ffe=(e,t)=>{const n=lfe();let r=null;const i=(d,p)=>{r&&Ue(),sf("onBeforeCapture",()=>{const m=e().onBeforeCapture;m&&m({draggableId:d,mode:p})})},a=(d,p)=>{r&&Ue(),sf("onBeforeDragStart",()=>{const m=e().onBeforeDragStart;m&&m(lg(d,p))})},o=(d,p)=>{r&&Ue();const m=lg(d,p);r={mode:p,lastCritical:d,lastLocation:m.source,lastCombine:null},n.add(()=>{sf("onDragStart",()=>zw(e().onDragStart,m,t,Yg.onDragStart))})},l=(d,p)=>{const m=QO(p),b=Zy(p);r||Ue();const v=!dfe(d,r.lastCritical);v&&(r.lastCritical=d);const y=!cfe(r.lastLocation,m);y&&(r.lastLocation=m);const x=!ufe(r.lastCombine,b);if(x&&(r.lastCombine=b),!v&&!y&&!x)return;const _={...lg(d,r.mode),combine:b,destination:m};n.add(()=>{sf("onDragUpdate",()=>zw(e().onDragUpdate,_,t,Yg.onDragUpdate))})},c=()=>{r||Ue(),n.flush()},u=d=>{r||Ue(),r=null,sf("onDragEnd",()=>zw(e().onDragEnd,d,t,Yg.onDragEnd))};return{beforeCapture:i,beforeStart:a,start:o,update:l,flush:c,drop:u,abort:()=>{if(!r)return;const d={...lg(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};u(d)}}},hfe=(e,t)=>{const n=ffe(e,t);return r=>i=>a=>{if(Ht(a,"BEFORE_INITIAL_CAPTURE")){n.beforeCapture(a.payload.draggableId,a.payload.movementMode);return}if(Ht(a,"INITIAL_PUBLISH")){const l=a.payload.critical;n.beforeStart(l,a.payload.movementMode),i(a),n.start(l,a.payload.movementMode);return}if(Ht(a,"DROP_COMPLETE")){const l=a.payload.completed.result;n.flush(),i(a),n.drop(l);return}if(i(a),Ht(a,"FLUSH")){n.abort();return}const o=r.getState();o.phase==="DRAGGING"&&n.update(o.critical,o.impact)}};const pfe=e=>t=>n=>{if(!Ht(n,"DROP_ANIMATION_FINISHED")){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&Ue(),e.dispatch(rC({completed:r.completed}))},mfe=e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return i=>a=>{if((Ht(a,"FLUSH")||Ht(a,"DROP_COMPLETE")||Ht(a,"DROP_ANIMATION_FINISHED"))&&r(),i(a),!Ht(a,"DROP_ANIMATE"))return;const o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(BU())}};n=requestAnimationFrame(()=>{n=null,t=Pi(window,[o])})}};var gfe=e=>()=>t=>n=>{(Ht(n,"DROP_COMPLETE")||Ht(n,"FLUSH")||Ht(n,"DROP_ANIMATE"))&&e.stopPublishing(),t(n)},vfe=e=>{let t=!1;return()=>n=>r=>{if(Ht(r,"INITIAL_PUBLISH")){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(Ht(r,"FLUSH")){t=!1,e.tryRestoreFocusRecorded();return}if(Ht(r,"DROP_COMPLETE")){t=!1;const i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}};const yfe=e=>Ht(e,"DROP_COMPLETE")||Ht(e,"DROP_ANIMATE")||Ht(e,"FLUSH");var xfe=e=>t=>n=>r=>{if(yfe(r)){e.stop(),n(r);return}if(Ht(r,"INITIAL_PUBLISH")){n(r);const i=t.getState();i.phase!=="DRAGGING"&&Ue(),e.start(i);return}n(r),e.scroll(t.getState())};const bfe=e=>t=>n=>{if(t(n),!Ht(n,"PUBLISH_WHILE_DRAGGING"))return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(FU({reason:r.reason})))},wfe=aU;var _fe=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:i,autoScroller:a})=>iU(Tde,wfe(xce(Qde(n),gfe(e),Yde(e),nfe,pfe,mfe,bfe,xfe(a),ofe,vfe(t),hfe(r,i))));const Hw=()=>({additions:{},removals:{},modified:{}});function Sfe({registry:e,callbacks:t}){let n=Hw(),r=null;const i=()=>{r||(t.collectionStarting(),r=requestAnimationFrame(()=>{r=null;const{additions:c,removals:u,modified:f}=n,d=Object.keys(c).map(b=>e.draggable.getById(b).getDimension(Yn)).sort((b,v)=>b.descriptor.index-v.descriptor.index),p=Object.keys(f).map(b=>{const y=e.droppable.getById(b).callbacks.getScrollWhileDragging();return{droppableId:b,scroll:y}}),m={additions:d,removals:Object.keys(u),modified:p};n=Hw(),t.publish(m)}))};return{add:c=>{const u=c.descriptor.id;n.additions[u]=c,n.modified[c.descriptor.droppableId]=!0,n.removals[u]&&delete n.removals[u],i()},remove:c=>{const u=c.descriptor;n.removals[u.id]=!0,n.modified[u.droppableId]=!0,n.additions[u.id]&&delete n.additions[u.id],i()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=Hw())}}}var HU=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{const i=ii({x:t,y:e},{x:r,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},WU=()=>{const e=document.documentElement;return e||Ue(),e},VU=()=>{const e=WU();return HU({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},jfe=()=>{const e=zU(),t=VU(),n=e.y,r=e.x,i=WU(),a=i.clientWidth,o=i.clientHeight,l=r+a,c=n+o;return{frame:aa({top:n,left:r,right:l,bottom:c}),scroll:{initial:e,current:e,max:t,diff:{value:Yn,displacement:Yn}}}},Nfe=({critical:e,scrollOptions:t,registry:n})=>{const r=jfe(),i=r.scroll.current,a=e.droppable,o=n.droppable.getAllByType(a.type).map(f=>f.callbacks.getDimensionAndWatchScroll(i,t)),l=n.draggable.getAllByType(e.draggable.type).map(f=>f.getDimension(i));return{dimensions:{draggables:bU(l),droppables:xU(o)},critical:e,viewport:r}};function jM(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}var Efe=(e,t)=>
673{let n=null;const r=Sfe({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=(p,m)=>{e.droppable.exists(p)||Ue(),n&&t.updateDroppableIsEnabled({id:p,isEnabled:m})},a=(p,m)=>{n&&(e.droppable.exists(p)||Ue(),t.updateDroppableIsCombineEnabled({id:p,isCombineEnabled:m}))},o=(p,m)=>{n&&(e.droppable.exists(p)||Ue(),t.updateDroppableScroll({id:p,newScroll:m}))},l=(p,m)=>{n&&e.droppable.getById(p).callbacks.scroll(m)},c=()=>{if(!n)return;r.stop();const p=n.critical.droppable;e.droppable.getAllByType(p.type).forEach(m=>m.callbacks.dragStopped()),n.unsubscribe(),n=null},u=p=>{n||Ue();const m=n.critical.draggable;p.type==="ADDITION"&&jM(e,m,p.value)&&r.add(p.value),p.type==="REMOVAL"&&jM(e,m,p.value)&&r.remove(p.value)};return{updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:a,scrollDroppable:l,updateDroppableScroll:o,startPublishing:p=>{n&&Ue();const m=e.draggable.getById(p.draggableId),b=e.droppable.getById(m.descriptor.droppableId),v={draggable:m.descriptor,droppable:b.descriptor},y=e.subscribe(u);return n={critical:v,unsubscribe:y},Nfe({critical:v,registry:e,scrollOptions:p.scrollOptions})},stopPublishing:c}},GU=(e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP",kfe=e=>{window.scrollBy(e.x,e.y)};const Ofe=Kn(e=>Xy(e).filter(t=>!(!t.isEnabled||!t.frame))),Cfe=(e,t)=>Ofe(t).find(r=>(r.frame||Ue(),AU(r.frame.pageMarginBox)(e)))||null;var Afe=({center:e,destination:t,droppables:n})=>{if(t){const i=n[t];return i.frame?i:null}return Cfe(e,n)};const uh={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var Pfe=(e,t,n=()=>uh)=>{const r=n(),i=e[t.size]*r.startFromPercentage,a=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:i,maxScrollValueAt:a}},KU=({startOfRange:e,endOfRange:t,current:n})=>{const r=t-e;return r===0?0:(n-e)/r},aC=1,Tfe=(e,t,n=()=>uh)=>{const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return aC;const a=1-KU({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),o=r.maxPixelScroll*r.ease(a);return Math.ceil(o)},Rfe=(e,t,n)=>{const r=n(),i=r.durationDampening.accelerateAt,a=r.durationDampening.stopDampeningAt,o=t,l=a,u=Date.now()-o;if(u>=a)return e;if(u<i)return aC;const f=KU({startOfRange:i,endOfRange:l,current:u}),d=e*r.ease(f);return Math.ceil(d)},NM=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:i})=>{const a=Tfe(e,t,i);return a===0?0:r?Math.max(Rfe(a,n,i),aC):a},EM=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o=Pfe(e,r,a);return t[r.end]<t[r.start]?NM({distanceToEdge:t[r.end],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a}):-1*NM({distanceToEdge:t[r.start],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a})},Ife=({container:e,subject:t,proposedScroll:n})=>{const r=t.height>e.height,i=t.width>e.width;return!i&&!r?n:i&&r?null:{x:i?0:n.x,y:r?0:n.y}};const Mfe=yU(e=>e===0?0:e);var YU=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},l=EM({container:t,distanceToEdges:o,dragStartTime:e,axis:XO,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),c=EM({container:t,distanceToEdges:o,dragStartTime:e,axis:SU,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),u=Mfe({x:c,y:l});if(cs(u,Yn))return null;const f=Ife({container:t,subject:n,proposedScroll:u});return f?cs(f,Yn)?null:f:null};const Dfe=yU(e=>e===0?0:e>0?1:-1),oC=(()=>{const e=(t,n)=>t<0?t:t>n?t-n:0;return({current:t,max:n,change:r})=>{const i=rr(t,r),a={x:e(i.x,n.x),y:e(i.y,n.y)};return cs(a,Yn)?null:a}})(),QU=({max:e,current:t,change:n})=>{const r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},i=Dfe(n),a=oC({max:r,current:t,change:i});return!a||i.x!==0&&a.x===0||i.y!==0&&a.y===0},sC=(e,t)=>QU({current:e.scroll.current,max:e.scroll.max,change:t}),Lfe=(e,t)=>
673{if(!sC(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return oC({current:r,max:n,change:t})},lC=(e,t)=>{const n=e.frame;return n?QU({current:n.scroll.current,max:n.scroll.max,change:t}):!1},$fe=(e,t)=>{const n=e.frame;return!n||!lC(e,t)?null:oC({current:n.scroll.current,max:n.scroll.max,change:t})};var Ffe=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o=YU({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return o&&sC(e,o)?o:null},Bfe=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{const o=e.frame;if(!o)return null;const l=YU({dragStartTime:r,container:o.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return l&&lC(e,l)?l:null},kM=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:i,getAutoScrollerOptions:a})=>{const o=e.current.page.borderBoxCenter,c=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){const d=e.viewport,p=Ffe({dragStartTime:t,viewport:d,subject:c,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:a});if(p){r(p);return}}const u=Afe({center:o,destination:oi(e.impact),droppables:e.dimensions.droppables});if(!u)return;const f=Bfe({dragStartTime:t,droppable:u,subject:c,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:a});f&&i(u.descriptor.id,f)},qfe=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>uh})=>{const r=ah(e),i=ah(t);let a=null;const o=u=>{a||Ue();const{shouldUseTimeDampening:f,dragStartTime:d}=a;kM({state:u,scrollWindow:r,scrollDroppable:i,dragStartTime:d,shouldUseTimeDampening:f,getAutoScrollerOptions:n})};return{start:u=>{a&&Ue();const f=Date.now();let d=!1;const p=()=>{d=!0};kM({state:u,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:p,scrollDroppable:p,getAutoScrollerOptions:n}),a={dragStartTime:f,shouldUseTimeDampening:d},d&&o(u)},stop:()=>{a&&(r.cancel(),i.cancel(),a=null)},scroll:o}},Ufe=({move:e,scrollDroppable:t,scrollWindow:n})=>{const r=(l,c)=>{const u=rr(l.current.client.selection,c);e({client:u})},i=(l,c)=>{if(!lC(l,c))return c;const u=$fe(l,c);if(!u)return t(l.descriptor.id,c),null;const f=ii(c,u);return t(l.descriptor.id,f),ii(c,f)},a=(l,c,u)=>{if(!l||!sC(c,u))return u;const f=Lfe(c,u);if(!f)return n(u),null;const d=ii(u,f);return n(d),ii(u,d)};return l=>{const c=l.scrollJumpRequest;if(!c)return;const u=oi(l.impact);u||Ue();const f=i(l.dimensions.droppables[u],c);if(!f)return;const d=l.viewport,p=a(l.isWindowScrollAllowed,d,f);p&&r(l,p)}},zfe=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{const i=qfe({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),a=Ufe({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:c=>{if(!(r().disabled||c.phase!=="DRAGGING")){if(c.movementMode==="FLUID"){i.scroll(c);return}c.scrollJumpRequest&&a(c)}},start:i.start,stop:i.stop}};const uu="data-rfd",du=(()=>{const e=`${uu}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),fE=(()=>{const e=`${uu}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Hfe=(()=>{const e=`${uu}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),OM={contextId:`${uu}-scroll-container-context-id`},Wfe=e=>t=>`[${t}="${e}"]`,lf=(e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),Vfe="pointer-events: none;";var Gfe=e=>{const t=Wfe(e),n=(()=>{const l=` 674 cursor: -webkit-grab; 675 cursor: grab; 676 `;return{selector:t(du.contextId),styles:{always:` 677 -webkit-touch-callout: none; 678 -webkit-tap-highlight-color: rgba(0,0,0,0); 679 touch-action: manipulation; 680 `,resting:l,dragging:Vfe,dropAnimating:l}}})(),r=(()=>{const l=` 681 transition: ${Ff.outOfTheWay}; 682 `;return{selector:t(fE.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}})(),i={selector:t(Hfe.contextId),styles:{always:"overflow-anchor: none;"}}
682,o=[r,n,i,{selector:"body",styles:{dragging:` 683 cursor: grabbing; 684 cursor: -webkit-grabbing; 685 user-select: none; 686 -webkit-user-select: none; 687 -moz-user-select: none; 688 -ms-user-select: none; 689 overflow-anchor: none; 690 `}}];return{always:lf(o,"always"),resting:lf(o,"resting"),dragging:lf(o,"dragging"),dropAnimating:lf(o,"dropAnimating"),userCancel:lf(o,"userCancel")}};const si=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?E.useLayoutEffect:E.useEffect,Ww=()=>{const e=document.querySelector("head");return e||Ue(),e},CM=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Kfe(e,t){const n=Lt(()=>Gfe(e),[e]),r=E.useRef(null),i=E.useRef(null),a=it(Kn(d=>{const p=i.current;p||Ue(),p.textContent=d}),[]),o=it(d=>{const p=r.current;p||Ue(),p.textContent=d},[]);si(()=>{!r.current&&!i.current||Ue();const d=CM(t),p=CM(t);return r.current=d,i.current=p,d.setAttribute(`${uu}-always`,e),p.setAttribute(`${uu}-dynamic`,e),Ww().appendChild(d),Ww().appendChild(p),o(n.always),a(n.resting),()=>{const m=b=>{const v=b.current;v||Ue(),Ww().removeChild(v),b.current=null};m(r),m(i)}},[t,o,a,n.always,n.resting,e]);const l=it(()=>a(n.dragging),[a,n.dragging]),c=it(d=>{if(d==="DROP"){a(n.dropAnimating);return}a(n.userCancel)},[a,n.dropAnimating,n.userCancel]),u=it(()=>{i.current&&a(n.resting)},[a,n.resting]);return Lt(()=>({dragging:l,dropping:c,resting:u}),[l,c,u])}function XU(e,t){return Array.from(e.querySelectorAll(t))}var ZU=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function tx(e){return e instanceof ZU(e).HTMLElement}function Yfe(e,t){const n=`[${du.contextId}="${e}"]`,r=XU(document,n);if(!r.length)return null;const i=r.find(a=>a.getAttribute(du.draggableId)===t);return!i||!tx(i)?null:i}function Qfe(e){const t=E.useRef({}),n=E.useRef(null),r=E.useRef(null),i=E.useRef(!1),a=it(function(p,m){const b={id:p,focus:m};return t.current[p]=b,function(){const y=t.current;y[p]!==b&&delete y[p]}},[]),o=it(function(p){const m=Yfe(e,p);m&&m!==document.activeElement&&m.focus()},[e]),l=it(function(p,m){n.current===p&&(n.current=m)},[]),c=it(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const p=n.current;p&&o(p)}))},[o]),u=it(function(p){n.current=null;const m=document.activeElement;m&&m.getAttribute(du.draggableId)===p&&(n.current=p)},[]);return si(()=>(i.current=!0,function(){i.current=!1;const p=r.current;p&&cancelAnimationFrame(p)}),[]),Lt(()=>({register:a,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[a,u,c,l])}function Xfe(){const e={draggables:{},droppables:{}},t=[];function n(d){return t.push(d),function(){const m=t.indexOf(d);m!==-1&&t.splice(m,1)}}function r(d){t.length&&t.forEach(p=>p(d))}function i(d){return e.draggables[d]||null}function a(d){const p=i(d);return p||Ue(),p}const o={register:d=>{e.draggables[d.descriptor.id]=d,r({type:"ADDITION",value:d})},update:(d,p)=>{const m=e.draggables[p.descriptor.id];m&&m.uniqueId===d.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[d.descriptor.id]=d)},unregister:d=>{const p=d.descriptor.id,m=i(p);m&&d.uniqueId===m.uniqueId&&(delete e.draggables[p],e.droppables[d.descriptor.droppableId]&&r({type:"REMOVAL",value:d}))},getById:a,findById:i,exists:d=>!!i(d),getAllByType:d=>Object.values(e.draggables).filter(p=>p.descriptor.type===d)};function l(d){return e.droppables[d]||null}function c(d){const p=l(d);return p||Ue(),p}const u={register:d=>{e.droppables[d.descriptor.id]=d},unregister:d=>{const p=l(d.descriptor.id);p&&d.uniqueId===p.uniqueId&&delete e.droppables[d.descriptor.id]},getById:c,findById:l,exists:d=>!!l(d),getAllByType:d=>Object.values(e.droppables).filter(p=>p.descriptor.type===d)};function f(){e.draggables={},e.droppables={},t.length=0}return{draggable:o,droppable:u,subscribe:n,clean:f}}function Zfe(){const e=Lt(Xfe,[]);return E.useEffect(()=>function(){e.clean()},[e]),e}var cC=ne.createContext(null),bv=()=>{const e=document.body;return e||Ue(),e};const Jfe={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ehe=e=>`rfd-announcement-${e}`;function the(e){const t=Lt(()=>ehe(e),[e]),n=E.useRef(null);return E.useEffect(function(){const a=document.createElement("div");return n.current=a,a.id=t,a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true"),gv(a.style,Jfe),bv().appendChild(a),function(){setTimeout(function(){const c=bv();c.contains(a)&&c.removeChild(a),a===n.current&&(n.current=null)})}},[t]),it(i=>{const a=n.current;if(a){a.textContent=i;return}},[])}const nhe={separator:"::"};function uC(e,t=nhe){const n=ne.useId();return Lt(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function rhe({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function ihe({contextId:e,text:t}){const n=uC("hidden-text",{separator:"-"}),r=Lt(()=>rhe({contextId:e,uniqueId:n}),[n,e]);return E.useEffect(function(){const a=document.createElement("div");return a.id=r,a.textContent=t,a.style.display="none",bv().appendChild(a),function(){const l=bv();l.contains(a)&&l.removeChild(a)}},[r,t]),r}var nx=ne.createContext(null);function JU(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),t}function ahe(){let e=null;function t(){return!!e}function n(o){return o===e}function r(o){e&&Ue();const l={abandon:o};return e=l,l}function i(){e||Ue(),e=null}function a(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:a}}function dh(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const ohe=9,she=13,dC=27,e7=32,lhe=33,che=34,uhe=35,dhe=36,fhe=37,hhe=38,phe=39,mhe=40,ghe={[she]:!0,[ohe]:!0};var t7=e=>{ghe[e.keyCode]&&e.preventDefault()};const rx=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})(),n7=0,AM=5;function vhe(e,t){return Math.abs(t.x-e.x)>=AM||Math.abs(t.y-e.y)>=AM}const PM={type:"IDLE"};function yhe({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:"mousemove",fn:i=>{const{button:a,clientX:o,clientY:l}=i;if(a!==n7)return;const c={x:o,y:l},u=n();if(u.type==="DRAGGING"){i.preventDefault(),u.actions.move(c);return}u.type!=="PENDING"&&Ue();const f=u.point;if(!vhe(f,c))return;i.preventDefault();const d=u.actions.fluidLift(c);r({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:i=>{const a=n();if(a.type!=="DRAGGING"){e();return}i.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{n().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(n().type==="PENDING"){e();return}if(i.keyCode===dC){i.preventDefault(),e();return}t7(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{n().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const a=n();if(a.type==="IDLE"&&Ue(),a.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:rx,fn:e}]}function xhe(e){const t=E.useRef(PM),n=E.useRef(ls),r=Lt(()=>({eventName:"mousedown",fn:function(d){if(d.defaultPrevented||d.button!==n7||d.ctrlKey||d.metaKey||d.shiftKey||d.altKey)return;const p=e.findClosestDraggableId(d);if(!p)return;const m=e.tryGetLock(p,o,{sourceEvent:d});if(!m)return;d.preventDefault();const b={x:d.clientX,y:d.clientY};n.current(),u(m,b)}}),[e]),i=Lt(()=>({eventName:"webkitmouseforcewillbegin",fn:f=>{if(f.defaultPrevented)return;const d=e.findClosestDraggableId(f);if(!d)return;const p=e.findOptionsForDraggable(d);p&&(p.shouldRespectForcePress||e.canGetLock(d)&&f.preventDefault())}}),[e]),a=it(function(){const d={passive:!1,capture:!0};n.current=Pi(window,[i,r],d)},[i,r]),o=it(()=>{t.current.type!=="IDLE"&&(t.current=PM,n.current(),a())},[a]),l=it(()=>{const f=t.current;o(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[o]),c=it(function(){const d={capture:!0,passive:!1},p=yhe({cancel:l,completed:o,getPhase:()=>t.current,setPhase:m=>{t.current=m}});n.current=Pi(window,p,d)},[l,o]),u=it(function(d,p){t.current.type!=="IDLE"&&Ue(),t.current={type:"PENDING",point:p,actions:d},c()},[c]);si(function(){return a(),function(){n.current()}},[a])}function bhe(){}const whe={[che]:!0,[lhe]:!0,[dhe]:!0,[uhe]:!0}
690;function _he(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===dC){i.preventDefault(),n();return}if(i.keyCode===e7){i.preventDefault(),r();return}if(i.keyCode===mhe){i.preventDefault(),e.moveDown();return}if(i.keyCode===hhe){i.preventDefault(),e.moveUp();return}if(i.keyCode===phe){i.preventDefault(),e.moveRight();return}if(i.keyCode===fhe){i.preventDefault(),e.moveLeft();return}if(whe[i.keyCode]){i.preventDefault();return}t7(i)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:rx,fn:n}]}function She(e){const t=E.useRef(bhe),n=Lt(()=>({eventName:"keydown",fn:function(a){if(a.defaultPrevented||a.keyCode!==e7)return;const o=e.findClosestDraggableId(a);if(!o)return;const l=e.tryGetLock(o,f,{sourceEvent:a});if(!l)return;a.preventDefault();let c=!0;const u=l.snapLift();t.current();function f(){c||Ue(),c=!1,t.current(),r()}t.current=Pi(window,_he(u,f),{capture:!0,passive:!1})}}),[e]),r=it(function(){const a={passive:!1,capture:!0};t.current=Pi(window,[n],a)},[n]);si(function(){return r(),function(){t.current()}},[r])}const Vw={type:"IDLE"},jhe=120,Nhe=.15;function Ehe({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:n=>{n.preventDefault()}},{eventName:"keydown",fn:n=>{if(t().type!=="DRAGGING"){e();return}n.keyCode===dC&&n.preventDefault(),e()}},{eventName:rx,fn:e}]}function khe({cancel:e,completed:t,getPhase:n}){return[{eventName:"touchmove",options:{capture:!1},fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:a,clientY:o}=r.touches[0],l={x:a,y:o};r.preventDefault(),i.actions.move(l)}},{eventName:"touchend",fn:r=>{const i=n();if(i.type!=="DRAGGING"){e();return}r.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:r=>{if(n().type!=="DRAGGING"){e();return}r.preventDefault(),e()}},{eventName:"touchforcechange",fn:r=>{const i=n();i.type==="IDLE"&&Ue();const a=r.touches[0];if(!a||!(a.force>=Nhe))return;const l=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){l&&e();return}if(l){if(i.hasMoved){r.preventDefault();return}e();return}r.preventDefault()}},{eventName:rx,fn:e}]}function Ohe(e){const t=E.useRef(Vw),n=E.useRef(ls),r=it(function(){return t.current},[]),i=it(function(m){t.current=m},[]),a=Lt(()=>({eventName:"touchstart",fn:function(m){if(m.defaultPrevented)return;const b=e.findClosestDraggableId(m);if(!b)return;const v=e.tryGetLock(b,l,{sourceEvent:m});if(!v)return;const y=m.touches[0],{clientX:x,clientY:_}=y,S={x,y:_};n.current(),d(v,S)}}),[e]),o=it(function(){const m={capture:!0,passive:!1};n.current=Pi(window,[a],m)},[a]),l=it(()=>{const p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(Vw),n.current(),o())},[o,i]),c=it(()=>{const p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),u=it(function(){const m={capture:!0,passive:!1},b={cancel:c,completed:l,getPhase:r},v=Pi(window,khe(b),m),y=Pi(window,Ehe(b),m);n.current=function(){v(),y()}},[c,r,l]),f=it(function(){const m=r();m.type!=="PENDING"&&Ue();const b=m.actions.fluidLift(m.point);i({type:"DRAGGING",actions:b,hasMoved:!1})},[r,i]),d=it(function(m,b){r().type!=="IDLE"&&Ue();const v=setTimeout(f,jhe);i({type:"PENDING",point:b,actions:m,longPressTimerId:v}),u()},[u,r,i,f]);si(function(){return o(),function(){n.current();const b=r();b.type==="PENDING"&&(clearTimeout(b.longPressTimerId),i(Vw))}},[r,o,i]),si(function(){return Pi(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const Che=["input","button","textarea","select","option","optgroup","video","audio"];function r7(e,t){if(t==null)return!1;if(Che.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:r7(e,t.parentElement)}function Ahe(e,t){const n=t.target;return tx(n)?r7(e,n):!1}var Phe=e=>aa(e.getBoundingClientRect()).center;function The(e){return e instanceof ZU(e).Element}const Rhe=(()=>{const e="matches";return typeof document>
690"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function i7(e,t){return e==null?null:e[Rhe](t)?e:i7(e.parentElement,t)}function Ihe(e,t){return e.closest?e.closest(t):i7(e,t)}function Mhe(e){return`[${du.contextId}="${e}"]`}function Dhe(e,t){const n=t.target;if(!The(n))return null;const r=Mhe(e),i=Ihe(n,r);return!i||!tx(i)?null:i}function Lhe(e,t){const n=Dhe(e,t);return n?n.getAttribute(du.draggableId):null}function $he(e,t){const n=`[${fE.contextId}="${e}"]`,i=XU(document,n).find(a=>a.getAttribute(fE.id)===t);return!i||!tx(i)?null:i}function Fhe(e){e.preventDefault()}function cg({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function a7({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;const i=n.draggable.findById(r);return!(!i||!i.options.isEnabled||!GU(t.getState(),r))}function Bhe({lockAPI:e,contextId:t,store:n,registry:r,draggableId:i,forceSensorStop:a,sourceEvent:o}){if(!a7({lockAPI:e,store:n,registry:r,draggableId:i}))return null;const c=r.draggable.getById(i),u=$he(t,c.descriptor.id);if(!u||o&&!c.options.canDragInteractiveElements&&Ahe(u,o))return null;const f=e.claim(a||ls);let d="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function m(){return e.isActive(f)}function b(N,k){cg({expected:N,phase:d,isLockActive:m,shouldWarn:!0})&&n.dispatch(k())}const v=b.bind(null,"DRAGGING");function y(N){function k(){e.release(),d="COMPLETED"}d!=="PRE_DRAG"&&(k(),Ue()),n.dispatch(Ide(N.liftActionArgs)),d="DRAGGING";function C(P,L={shouldBlockNextClick:!1}){if(N.cleanup(),L.shouldBlockNextClick){const T=Pi(window,[{eventName:"click",fn:Fhe,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(T)}k(),n.dispatch(FU({reason:P}))}return{isActive:()=>cg({expected:"DRAGGING",phase:d,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,drop:P=>C("DROP",P),cancel:P=>C("CANCEL",P),...N.actions}}function x(N){const k=ah(P=>{v(()=>$U({client:P}))});return{...y({liftActionArgs:{id:i,clientSelection:N,movementMode:"FLUID"},cleanup:()=>k.cancel(),actions:{move:k}}),move:k}}function _(){const N={moveUp:()=>v(zde),moveRight:()=>v(Wde),moveDown:()=>v(Hde),moveLeft:()=>v(Vde)};return y({liftActionArgs:{id:i,clientSelection:Phe(u),movementMode:"SNAP"},cleanup:ls,actions:N})}function S(){cg({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!0})&&e.release()}return{isActive:()=>cg({expected:"PRE_DRAG",phase:d,isLockActive:m,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:x,snapLift:_,abort:S}}const qhe=[xhe,She,Ohe];function Uhe({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){const a=[...i?qhe:[],...r||[]],o=E.useState(()=>ahe())[0],l=it(function(y,x){dh(y)&&!dh(x)&&o.tryAbandon()},[o]);si(function(){let y=t.getState();return t.subscribe(()=>{const _=t.getState();l(y,_),y=_})},[o,t,l]),si(()=>o.tryAbandon,[o.tryAbandon]);const c=it(v=>a7({lockAPI:o,registry:n,store:t,draggableId:v}),[o,n,t]),u=it((v,y,x)=>Bhe({lockAPI:o,registry:n,contextId:e,store:t,draggableId:v,forceSensorStop:y||null,sourceEvent:x&&x.sourceEvent?x.sourceEvent:null}),[e,o,n,t]),f=it(v=>Lhe(e,v),[e]),d=it(v=>{const y=n.draggable.findById(v);return y?y.options:null},[n.draggable]),p=it(function(){o.isClaimed()&&(o.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(nC()))},[o,t]),m=it(()=>o.isClaimed(),[o]),b=Lt(()=>({canGetLock:c,tryGetLock:u,findClosestDraggableId:f,findOptionsForDraggable:d,tryReleaseLock:p,isLockClaimed:m}),[c,u,f,d,p,m]);for(let v=0;v<a.length;v++)a[v](b)}const zhe=e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Ll.flushSync(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Hhe=e=>({...uh,...e.autoScrollerOptions,durationDampening:{...uh.durationDampening,...e.autoScrollerOptions}});function cf(e){return e.current||Ue(),e.current}function Whe(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:i,dragHandleUsageInstructions:a}=e,o=E.useRef(null),l=JU(e),c=it(()=>zhe(l.current),[l]),u=it(()=>Hhe(l.current),[l]),f=the(t),d=ihe({contextId:t,text:a}),p=Kfe(t,i),m=it(T=>{cf(o).dispatch(T)},[]),b=Lt(()=>nM({publishWhileDragging:Dde,updateDroppableScroll:$de,updateDroppableIsEnabled:Fde,updateDroppableIsCombine
690Enabled:Bde,collectionStarting:Lde},m),[m]),v=Zfe(),y=Lt(()=>Efe(v,b),[v,b]),x=Lt(()=>zfe({scrollWindow:kfe,scrollDroppable:y.scrollDroppable,getAutoScrollerOptions:u,...nM({move:$U},m)}),[y.scrollDroppable,m,u]),_=Qfe(t),S=Lt(()=>_fe({announce:f,autoScroller:x,dimensionMarshal:y,focusMarshal:_,getResponders:c,styleMarshal:p}),[f,x,y,_,c,p]);o.current=S;const w=it(()=>{const T=cf(o);T.getState().phase!=="IDLE"&&T.dispatch(nC())},[]),N=it(()=>{const T=cf(o).getState();return T.phase==="DROP_ANIMATING"?!0:T.phase==="IDLE"?!1:T.isDragging},[]),k=Lt(()=>({isDragging:N,tryAbort:w}),[N,w]);n(k);const C=it(T=>GU(cf(o).getState(),T),[]),P=it(()=>el(cf(o).getState()),[]),L=Lt(()=>({marshal:y,focus:_,contextId:t,canLift:C,isMovementAllowed:P,dragHandleUsageInstructionsId:d,registry:v}),[t,y,d,_,C,P,v]);return Uhe({contextId:t,store:S,registry:v,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),E.useEffect(()=>w,[w]),ne.createElement(nx.Provider,{value:L},ne.createElement(pue,{context:cC,store:S},e.children))}function Vhe(){return ne.useId()}function o7(e){const t=Vhe(),n=e.dragHandleUsageInstructions||Yg.dragHandleUsageInstructions;return ne.createElement(jue,null,r=>ne.createElement(Whe,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const TM={dragging:5e3,dropAnimating:4500},Ghe=(e,t)=>t?Ff.drop(t.duration):e?Ff.snap:Ff.fluid,Khe=(e,t)=>
690{if(e)return t?ch.opacity.drop:ch.opacity.combining},Yhe=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function Qhe(e){const n=e.dimension.client,{offset:r,combineWith:i,dropping:a}=e,o=!!i,l=Yhe(e),c=!!a,u=c?uE.drop(r,o):uE.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:Ghe(l,a),transform:u,opacity:Khe(o,c),zIndex:c?TM.dropAnimating:TM.dragging,pointerEvents:"none"}}function Xhe(e){return{transform:uE.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function Zhe(e){return e.type==="DRAGGING"?Qhe(e):Xhe(e)}function Jhe(e,t,n=Yn){const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),a=hU(i,r),o=mv(a,n),l={client:a,tagName:t.tagName.toLowerCase(),display:r.display},c={x:a.marginBox.width,y:a.marginBox.height};return{descriptor:e,placeholder:l,displaceBy:c,client:a,page:o}}function epe(e){const t=uC("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:o,isEnabled:l}=e,c=Lt(()=>({canDragInteractiveElements:a,shouldRespectForcePress:o,isEnabled:l}),[a,l,o]),u=it(m=>{const b=i();return b||Ue(),Jhe(n,b,m)},[n,i]),f=Lt(()=>({uniqueId:t,descriptor:n,options:c,getDimension:u}),[n,u,c,t]),d=E.useRef(f),p=E.useRef(!0);si(()=>(r.draggable.register(d.current),()=>r.draggable.unregister(d.current)),[r.draggable]),si(()=>{if(p.current){p.current=!1;return}const m=d.current;d.current=f,r.draggable.update(f,m)},[f,r.draggable])}var fC=ne.createContext(null);function wv(e){const t=E.useContext(e);return t||Ue(),t}function tpe(e){e.preventDefault()}const npe=e=>{const t=E.useRef(null),n=it((k=null)=>{t.current=k},[]),r=it(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:a,registry:o}=wv(nx),{type:l,droppableId:c}=wv(fC),u=Lt(()=>({id:e.draggableId,index:e.index,type:l,droppableId:c}),[e.draggableId,e.index,l,c]),{children:f,draggableId:d,isEnabled:p,shouldRespectForcePress:m,canDragInteractiveElements:b,isClone:v,mapped:y,dropAnimationFinished:x}=e;if(!v){const k=Lt(()=>({descriptor:u,registry:o,getDraggableRef:r,canDragInteractiveElements:b,shouldRespectForcePress:m,isEnabled:p}),[u,o,r,b,m,p]);epe(k)}const _=Lt(()=>p?{tabIndex:0,role:"button","aria-describedby":a,"data-rfd-drag-handle-draggable-id":d,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:tpe}:null,[i,a,d,p]),S=it(k=>{y.type==="DRAGGING"&&y.dropping&&k.propertyName==="transform"&&Ll.flushSync(x)},[x,y]),w=Lt(()=>{const k=Zhe(y),C=y.type==="DRAGGING"&&y.dropping?S:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":d,style:k,onTransitionEnd:C},dragHandleProps:_}},[i,_,d,y,S,n]),N=Lt(()=>({draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}),[u.droppableId,u.id,u.index,u.type]);return ne.createElement(ne.Fragment,null,f(w,y.snapshot,N))};var s7=(e,t)=>e===t,l7=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};const rpe=e=>e.combine?e.combine.draggableId:null,ipe=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function ape(){const e=Kn((i,a)=>({x:i,y:a})),t=Kn((i,a,o=null,l=null,c=null)=>({isDragging:!0,isClone:a,isDropAnimating:!!c,dropAnimation:c,mode:i,draggingOver:o,combineWith:l,combineTargetFor:null})),n=Kn((i,a,o,l,c=null,u=null,f=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:u,mode:a,offset:i,dimension:o,forceShouldAnimate:f,snapshot:t(a,l,c,u,null)}}));return(i,a)=>{if(dh(i)){if(i.critical.draggable.id!==a.draggableId)return null;const o=i.current.client.offset,l=i.dimensions.draggables[a.draggableId],c=oi(i.impact),u=ipe(i.impact),f=i.forceShouldAnimate;return n(e(o.x,o.y),i.movementMode,l,a.isClone,c,u,f)}if(i.phase==="DROP_ANIMATING"){const o=i.completed;if(o.result.draggableId!==a.draggableId)return null;const l=a.isClone,c=i.dimensions.draggables[a.draggableId],u=o.result,f=u.mode,d=l7(u),p=rpe(u),b={duration:i.dropDuration,curve:iC.drop,moveTo:i.newHomeClientOffset,opacity:p?ch.opacity.drop:null,
690scale:p?ch.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:c,dropping:b,draggingOver:d,combineWith:p,mode:f,forceShouldAnimate:null,snapshot:t(f,l,d,p,b)}}}return null}}function c7(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const ope={mapped:{type:"SECONDARY",offset:Yn,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:c7(null)}};function spe(){const e=Kn((o,l)=>({x:o,y:l})),t=Kn(c7),n=Kn((o,l=null,c)=>({mapped:{type:"SECONDARY",offset:o,combineTargetFor:l,shouldAnimateDisplacement:c,snapshot:t(l)}})),r=o=>o?n(Yn,o,!0):null,i=(o,l,c,u)=>{const f=c.displaced.visible[o],d=!!(u.inVirtualList&&u.effected[o]),p=Zy(c),m=p&&p.draggableId===o?l:null;if(!f){if(!d)return r(m);if(c.displaced.invisible[o])return null;const y=Qu(u.displacedBy.point),x=e(y.x,y.y);return n(x,m,!0)}if(d)return r(m);const b=c.displacedBy.point,v=e(b.x,b.y);return n(v,m,f.shouldAnimate)};return(o,l)=>{if(dh(o))return o.critical.draggable.id===l.draggableId?null:i(l.draggableId,o.critical.draggable.id,o.impact,o.afterCritical);if(o.phase==="DROP_ANIMATING"){const c=o.completed;return c.result.draggableId===l.draggableId?null:i(l.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null}}const lpe=()=>{const e=ape(),t=spe();return(r,i)=>e(r,i)||t(r,i)||ope},cpe={dropAnimationFinished:BU},upe=dU(lpe,cpe,null,{context:cC,areStatePropsEqual:s7})(npe);function u7(e){return wv(fC).isUsingCloneFor===e.draggableId&&!e.isClone?null:ne.createElement(upe,e)}function hE(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return ne.createElement(u7,gv({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const d7=e=>t=>e===t,dpe=d7("scroll"),fpe=d7("auto"),RM=(e,t)=>t(e.overflowX)||t(e.overflowY),hpe=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return RM(n,dpe)||RM(n,fpe)},ppe=()=>!1,f7=e=>e==null?null:e===document.body?ppe()?e:null:e===document.documentElement?null:hpe(e)?e:f7(e.parentElement);var pE=e=>({x:e.scrollLeft,y:e.scrollTop});const h7=e=>e?window.getComputedStyle(e).position==="fixed"?!0:h7(e.parentElement):!1;var mpe=e=>{const t=f7(e),n=h7(e);return{closestScrollable:t,isFixedOnPage:n}},gpe=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:i,client:a,page:o,closest:l})=>{const c=(()=>{if(!l)return null;const{scrollSize:p,client:m}=l,b=HU({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:m.paddingBox.height,width:m.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:m,scrollSize:p,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:b,diff:{value:Yn,displacement:Yn}}}})(),u=i==="vertical"?XO:SU,f=cu({page:o,withPlaceholder:null,axis:u,frame:c});return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:u,isEnabled:t,client:a,page:o,frame:c,subject:f}};const vpe=(e,t)=>{const n=pU(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,a=r+t.scrollHeight,o=i+t.scrollWidth,c=GO({top:r,right:o,bottom:a,left:i},n.border);return KO({borderBox:c,margin:n.margin,border:n.border,padding:n.padding})};var ype=({ref:e,descriptor:t,env:n,windowScroll:r,direction:i,isDropDisabled:a,isCombine
690Enabled:o,shouldClipSubject:l})=>{const c=n.closestScrollable,u=vpe(e,c),f=mv(u,r),d=(()=>{if(!c)return null;const m=pU(c),b={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:m,page:mv(m,r),scroll:pE(c),scrollSize:b,shouldClipSubject:l}})();return gpe({descriptor:t,isEnabled:!a,isCombineEnabled:o,isFixedOnPage:n.isFixedOnPage,direction:i,client:u,page:f,closest:d})};const xpe={passive:!1},bpe={passive:!0};var IM=e=>e.shouldPublishImmediately?xpe:bpe;const ug=e=>e&&e.env.closestScrollable||null;function wpe(e){const t=E.useRef(null),n=wv(nx),r=uC("droppable"),{registry:i,marshal:a}=n,o=JU(e),l=Lt(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=E.useRef(l),u=Lt(()=>Kn((w,N)=>{t.current||Ue();const k={x:w,y:N};a.updateDroppableScroll(l.id,k)}),[l.id,a]),f=it(()=>{const w=t.current;return!w||!w.env.closestScrollable?Yn:pE(w.env.closestScrollable)},[]),d=it(()=>{const w=f();u(w.x,w.y)},[f,u]),p=Lt(()=>ah(d),[d]),m=it(()=>{const w=t.current,N=ug(w);if(w&&N||Ue(),w.scrollOptions.shouldPublishImmediately){d();return}p()},[p,d]),b=it((w,N)=>{t.current&&Ue();const k=o.current,C=k.getDroppableRef();C||Ue();const P=mpe(C),L={ref:C,descriptor:l,env:P,scrollOptions:N};t.current=L;const T=ype({ref:C,descriptor:l,env:P,windowScroll:w,direction:k.direction,isDropDisabled:k.isDropDisabled,isCombineEnabled:k.isCombineEnabled,shouldClipSubject:!k.ignoreContainerClipping}),A=P.closestScrollable;return A&&(A.setAttribute(OM.contextId,n.contextId),A.addEventListener("scroll",m,IM(L.scrollOptions))),T},[n.contextId,l,m,o]),v=it(()=>{const w=t.current,N=ug(w);return w&&N||Ue(),pE(N)},[]),y=it(()=>{const w=t.current;w||Ue();const N=ug(w);t.current=null,N&&(p.cancel(),N.removeAttribute(OM.contextId),N.removeEventListener("scroll",m,IM(w.scrollOptions)))},[m,p]),x=it(w=>{const N=t.current;N||Ue();const k=ug(N);k||Ue(),k.scrollTop+=w.y,k.scrollLeft+=w.x},[]),_=Lt(()=>({getDimensionAndWatchScroll:b,getScrollWhileDragging:v,dragStopped:y,scroll:x}),[y,b,v,x]),S=Lt(()=>({uniqueId:r,descriptor:l,callbacks:_}),[_,l,r]);si(()=>(c.current=S.descriptor,i.droppable.register(S),()=>{t.current&&y(),i.droppable.unregister(S)}),[_,l,y,S,a,i.droppable]),si(()=>{t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),si(()=>{t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function Gw(){}const MM={width:0,height:0,margin:Aue},_pe=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n==="close"?MM:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},Spe=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{const r=_pe({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:n!=="none"?Ff.placeholder:null}},jpe=e=>{const t=E.useRef(null),n=it(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:i,onClose:a,contextId:o}=e,[l,c]=E.useState(e.animate==="open");E.useEffect(()=>l?r!=="open"?(n(),c(!1),Gw):t.current?Gw:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):Gw,[r,l,n]);const u=it(d=>{d.propertyName==="height"&&(i(),r==="close"&&a())},[r,a,i]),f=Spe({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return ne.createElement(e.placeholder.tagName,{style:f,"data-rfd-placeholder-context-id":o,onTransitionEnd:u,ref:e.innerRef})};var Npe=ne.memo(jpe);class Epe extends ne.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}
690render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const kpe=e=>{const t=E.useContext(nx);t||Ue();const{contextId:n,isMovementAllowed:r}=t,i=E.useRef(null),a=E.useRef(null),{children:o,droppableId:l,type:c,mode:u,direction:f,ignoreContainerClipping:d,isDropDisabled:p,isCombineEnabled:m,snapshot:b,useClone:v,updateViewportMaxScroll:y,getContainerForClone:x}=e,_=it(()=>i.current,[]),S=it((A=null)=>{i.current=A},[]);it(()=>a.current,[]);const w=it((A=null)=>{a.current=A},[]),N=it(()=>{r()&&y({maxScroll:VU()})},[r,y]);wpe({droppableId:l,type:c,mode:u,direction:f,isDropDisabled:p,isCombineEnabled:m,ignoreContainerClipping:d,getDroppableRef:_});const k=Lt(()=>ne.createElement(Epe,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:A,data:R,animate:I})=>ne.createElement(Npe,{placeholder:R,onClose:A,innerRef:w,animate:I,contextId:n,onTransitionEnd:N})),[n,N,e.placeholder,e.shouldAnimatePlaceholder,w]),C=Lt(()=>({innerRef:S,placeholder:k,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":n}}),[n,l,k,S]),P=v?v.dragging.draggableId:null,L=Lt(()=>({droppableId:l,type:c,isUsingCloneFor:P}),[l,P,c]);function T(){if(!v)return null;const{dragging:A,render:R}=v,I=ne.createElement(u7,{draggableId:A.draggableId,index:A.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(M,B)=>R(M,B,A));return ZB.createPortal(I,x())}return ne.createElement(fC.Provider,{value:L},o(C,b),T())};function Ope(){return document.body||Ue(),document.body}const DM={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Ope},p7=e=>{let t={...e},n;for(n in DM)e[n]===void 0&&(t={...t,[n]:DM[n]});return t},Kw=(e,t)=>e===t.droppable.type,LM=(e,t)=>t.draggables[e.draggable.id],Cpe=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=Kn(a=>({draggableId:a.id,type:a.type,source:{index:a.index,droppableId:a.droppableId}})),r=Kn((a,o,l,c,u,f)=>{const d=u.descriptor.id;if(u.descriptor.droppableId===a){const b=f?{render:f,dragging:n(u.descriptor)}:null,v={isDraggingOver:l,draggingOverWith:l?d:null,draggingFromThisWith:d,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!1,snapshot:v,useClone:b}}if(!o)return t;if(!c)return e;const m={isDraggingOver:l,draggingOverWith:d,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:u.placeholder,shouldAnimatePlaceholder:!0,snapshot:m,useClone:null}});return(a,o)=>{const l=p7(o),c=l.droppableId,u=l.type,f=!l.isDropDisabled,d=l.renderClone;if(dh(a)){const p=a.critical;if(!Kw(u,p))return t;const m=LM(p,a.dimensions),b=oi(a.impact)===c;return r(c,f,b,b,m,d)}if(a.phase==="DROP_ANIMATING"){const p=a.completed;if(!Kw(u,p.critical))return t;const m=LM(p.critical,a.dimensions);return r(c,f,l7(p.result)===c,oi(p.impact)===c,m,d)}if(a.phase==="IDLE"&&a.completed&&!a.shouldFlush){const p=a.completed;if(!Kw(u,p.critical))return t;const m=oi(p.impact)===c,b=!!(p.impact.at&&p.impact.at.type==="COMBINE"),v=p.critical.droppable.id===c;return m?b?e:t:v?e:t}return t}},Ape={updateViewportMaxScroll:Ude},Ppe=dU(Cpe,Ape,(e,t,n)=>({...p7(n),...e,...t}),{context:cC,areStatePropsEqual:s7})(kpe);var mE=Ppe;function $M(e,[t,n]){return Math.min(n,Math.max(t,e))}function ix(e){const t=e+"CollectionProvider",[n,r]=di(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:y,children:x}=v,_=ne.useRef(null),S=ne.useRef(new Map).current;return s.jsx(i,{scope:y,itemMap:S,collectionRef:_,children:x})};o.displayName=t;const l=e+"CollectionSlot",c=ms(l),u=ne.forwardRef((v,y)=>{const{scope:x,children:_}=v,S=a(l,x),w=At(y,S.collectionRef);return s.jsx(c,{ref:w,children:_})});u.displayName=l;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=ms(f),m=ne.forwardRef((v,y)=>{const{scope:x,children:_,...S}=v,w=ne.useRef(null),N=At(y,w),k=a(f,x);return ne.useEffect(()=>(k.itemMap.set(w,{ref:w,...S}),()=>void k.itemMap.delete(w))),s.jsx(p,{[d]:"",ref:N,children:_})});m.displayName=f;function b(v){const y=a(e+"CollectionConsumer",v);return ne.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const S=Array.from(_.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((k,C)=>S.indexOf(k.ref.current)-S.indexOf(C.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},b,r]}var Tpe=E.createContext(void 0);function wp(e){const t=E.useContext(Tpe);return e||t||"ltr"}const Rpe=["top","right","bottom","left"],xs=Math.min,ni=Math.max,_v=Math.round,dg=Math.floor,Aa=e=>({x:e,y:e}
vendor: 46,986 bytes, line 690
690),Ipe={left:"right",right:"left",bottom:"top",top:"bottom"},Mpe={start:"end",end:"start"};function gE(e,t,n){return ni(e,xs(t,n))}function ho(e,t){return typeof e=="function"?e(t):e}function po(e){return e.split("-")[0]}function Ju(e){return e.split("-")[1]}function hC(e){return e==="x"?"y":"x"}function pC(e){return e==="y"?"height":"width"}const Dpe=new Set(["top","bottom"]);function Ea(e){return Dpe.has(po(e))?"y":"x"}function mC(e){return hC(Ea(e))}function Lpe(e,t,n){n===void 0&&(n=!1);const r=Ju(e),i=mC(e),a=pC(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Sv(o)),[o,Sv(o)]}function $pe(e){const t=Sv(e);return[vE(e),t,vE(t)]}function vE(e){return e.replace(/start|end/g,t=>Mpe[t])}const FM=["left","right"],BM=["right","left"],Fpe=["top","bottom"],Bpe=["bottom","top"];function qpe(e,t,n){switch(e){case"top":case"bottom":return n?t?BM:FM:t?FM:BM;case"left":case"right":return t?Fpe:Bpe;default:return[]}}function Upe(e,t,n,r){const i=Ju(e);let a=qpe(po(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(vE)))),a}function Sv(e){return e.replace(/left|right|bottom|top/g,t=>Ipe[t])}function zpe(e){return{top:0,right:0,bottom:0,left:0,...e}}function m7(e){return typeof e!="number"?zpe(e):{top:e,right:e,bottom:e,left:e}}function jv(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 qM(e,t,n){let{reference:r,floating:i}=e;const a=Ea(t),o=mC(t),l=pC(o),c=po(t),u=a==="y",f=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,p=r[l]/2-i[l]/2;let m;switch(c){case"top":m={x:f,y:r.y-i.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-i.width,y:d};break;default:m={x:r.x,y:r.y}}switch(Ju(t)){case"start":m[o]-=p*(n&&u?-1:1);break;case"end":m[o]+=p*(n&&u?-1:1);break}return m}const Hpe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:d}=qM(u,r,c),p=r,m={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:_,y:S,data:w,reset:N}=await x({x:f,y:d,initialPlacement:r,placement:p,strategy:i,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});f=_??f,d=S??d,m={...m,[y]:{...m[y],...w}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(p=N.placement),N.rects&&(u=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):N.rects),{x:f,y:d}=qM(u,p,c)),v=-1)}return{x:f,y:d,placement:p,strategy:i,middlewareData:m}};async function fh(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:m=0}=ho(t,e),b=m7(m),y=l[p?d==="floating"?"reference":"floating":d],x=jv(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:c})),_=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),w=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},N=jv(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:_,offsetParent:S,strategy:c}):_);return{top:(x.top-N.top+b.top)/w.y,bottom:(N.bottom-x.bottom+b.bottom)/w.y,left:(x.left-N.left+b.left)/w.x,right:(N.right-x.right+b.right)/w.x}}const Wpe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:f=0}=ho(e,t)||{};if(u==null)return{};const d=m7(f),p={x:n,y:r},m=mC(i),b=pC(m),v=await o.getDimensions(u),y=m==="y",x=y?"top":"left",_=y?"bottom":"right",S=y?"clientHeight":"clientWidth",w=a.reference[b]+a.reference[m]-p[m]-a.floating[b],N=p[m]-a.reference[m],k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let C=k?k[S]:0;(!C||!await(o.isElement==null?void 0:o.isElement(k)))&&(C=l.floating[S]||a.floating[b]);const P=w/2-N/2,L=C/2-v[b]/2-1,T=xs(d[x],L),A=xs(d[_],L),R=T,I=C-v[b]-A,M=C/2-v[b]/2+P,B=gE(R,M,I),W=!c.arrow&&Ju(i)!=null&&M!==B&&a.reference[b]/2-(M<R?T:A)-v[b]/2<0,G=W?M<R?M-R:M-I:0;return{[m]:p[m]+G,data:{[m]:B,centerOffset:M-B-G,...W&&{alignmentOffset:G}},reset:W}}}),Vpe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=ho(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=po(i),_=Ea(l),S=po(l)===l,w=await(c.isRTL==null?void 0:c.isRTL(u.floating)),N=p||(S||!v?[Sv(l)]:$pe(l)),k=b!=="none";!p&&k&&N.push(...Upe(l,v,b,w));const C=[l,...N],P=await fh(t,y),L=[];let T=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&L.push(P[x]),d){const M=Lpe(i,o,w);L.push(P[M[0]],P[M[1]])}if(T=[...T,{placement:i,overflows:L}],!L.every(M=>M<=0)){var A,R;const M=(((A=a.flip)==null?void 0:A.index)||0)+1,B=C[M];if(B&&(!(d==="alignment"?_!==Ea(B):!1)||T.every(H=>Ea(H.placement)===_?H.overflows[0]>0:!0)))return{data:{index:M,overflows:T},reset:{placement:B}};let W=(R=T.filter(G=>G.overflows[0]<=0).sort((G,H)=>G.overflows[1]-H.overflows[1])[0])==null?void 0:R.placement;if(!W)switch(m){case"bestFit":{var I;const G=(I=T.filter(H=>{if(k){const K=Ea(H.placement);return K===_||K==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(K=>K>0).reduce((K,$)=>K+$,0)]).sort((H,K)=>H[1]-K[1])[0])==null?void 0:I[0];G&&(W=G);break}case"initialPlacement":W=l;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function UM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zM(e){return Rpe.some(t=>e[t]>=0)}const Gpe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ho(e,t);switch(r){case"referenceHidden":{const a=await fh(t,{...i,elementContext:"reference"}),o=UM(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:zM(o)}}}case"escaped":{const a=await fh(t,{...i,altBoundary:!0}),o=UM(a,n.floating);return{data:{escapedOffsets:o,escaped:zM(o)}}}default:return{}}}}},g7=new Set(["left","top"]);async function Kpe(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=po(n),l=Ju(n),c=Ea(n)==="y",u=g7.has(o)?-1:1,f=a&&c?-1:1,d=ho(t,e);let{mainAxis:p,crossAxis:m,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),c?{x:m*f,y:p*u}:{x:p*u,y:m*f}}const Ype=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:l}=t,c=await Kpe(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},Qpe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:y=>{let{x,y:_}=y;return{x,y:_}}},...c}=ho(e,t),u={x:n,y:r},f=await fh(t,c),d=Ea(po(i)),p=hC(d);let m=u[p],b=u[d];if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",_=m+f[y],S=m-f[x];m=gE(_,m,S)}if(o){const y=d==="y"?"top":"left",x=d==="y"?"bottom":"right",_=b+f[y],S=b-f[x];b=gE(_,b,S)}const v=l.fn({...t,[p]:m,[d]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[d]:o}}}}}},Xpe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=ho(e,t),f={x:n,y:r},d=Ea(i),p=hC(d);let m=f[p],b=f[d];const v=ho(l,t),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const S=p==="y"?"height":"width",w=a.reference[p]-a.floating[S]+y.mainAxis,N=a.reference[p]+a.reference[S]-y.mainAxis;m<w?m=w:m>N&&(m=N)}if(u){var x,_;const S=p==="y"?"width":"height",w=g7.has(po(i)),N=a.reference[d]-a.floating[S]+(w&&((x=o.offset)==null?void 0:x[d])||0)+(w?0:y.crossAxis),k=a.reference[d]+a.reference[S]+(w?0:((_=o.offset)==null?void 0:_[d])||0)-(w?y.crossAxis:0);b<N?b=N:b>k&&(b=k)}return{[p]:m,[d]:b}}}},Zpe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...u}=ho(e,t),f=await fh(t,u),d=po(i),p=Ju(i),m=Ea(i)==="y",{width:b,height:v}=a.floating;let y,x;d==="top"||d==="bottom"?(y=d,x=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(x=d,y=p==="end"?"top":"bottom");const _=v-f.top-f.bottom,S=b-f.left-f.right,w=xs(v-f[y],_),N=xs(b-f[x],S),k=!t.middlewareData.shift;let C=w,P=N;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=_),k&&!p){const T=ni(f.left,0),A=ni(f.right,0),R=ni(f.top,0),I=ni(f.bottom,0);m?P=b-2*(T!==0||A!==0?T+A:ni(f.left,f.right)):C=v-2*(R!==0||I!==0?R+I:ni(f.top,f.bottom))}await c({...t,availableWidth:P,availableHeight:C});const L=await o.getDimensions(l.floating);return b!==L.width||v!==L.height?{reset:{rects:!0}}:{}}}};function ax(){return typeof window<"u"}function ed(e){return v7(e)?(e.nodeName||"").toLowerCase():"#document"}function li(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function qa(e){var t;return(t=(v7(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function v7(e){return ax()?e instanceof Node||e instanceof li(e).Node:!1}function la(e){return ax()?e instanceof Element||e instanceof li(e).Element:!1}function Da(e){return ax()?e instanceof HTMLElement||e instanceof li(e).HTMLElement:!1}function HM(e){return!ax()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof li(e).ShadowRoot}const Jpe=new Set(["inline","contents"]);function _p(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ca(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Jpe.has(i)}const eme=new Set(["table","td","th"]);function tme(e){return eme.has(ed(e))}const nme=[":popover-open",":modal"];function ox(e){return nme.some(t=>{try{return e.matches(t)}catch{return!1}})}const rme=["transform","translate","scale","rotate","perspective"],ime=["transform","translate","scale","rotate","perspective","filter"],ame=["paint","layout","strict","content"];function gC(e){const t=vC(),n=la(e)?ca(e):e;return rme.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ime.some(r=>(n.willChange||"").includes(r))||ame.some(r=>(n.contain||"").includes(r))}function ome(e){let t=bs(e);for(;Da(t)&&!fu(t);){if(gC(t))return t;if(ox(t))return null;t=bs(t)}return null}function vC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const sme=new Set(["html","body","#document"]);function fu(e){return sme.has(ed(e))}function ca(e){return li(e).getComputedStyle(e)}function sx(e){return la(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bs(e){if(ed(e)==="html")return e;const t=e.assignedSlot||e.parentNode||HM(e)&&e.host||qa(e);return HM(t)?t.host:t}function y7(e){const t=bs(e);return fu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Da(t)&&_p(t)?t:y7(t)}function hh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=y7(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=li(i);if(a){const l=yE(o);return t.concat(o,o.visualViewport||[],_p(i)?i:[],l&&n?hh(l):[])}return t.concat(i,hh(i,[],n))}function yE(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function x7(e){const t=ca(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Da(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=_v(n)!==a||_v(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function yC(e){return la(e)?e:e.contextElement}function qc(e){const t=yC(e);if(!Da(t))return Aa(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=x7(t);let o=(a?_v(n.width):n.width)/r,l=(a?_v(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const lme=Aa(0);function b7(e){const t=li(e);return!vC()||!t.visualViewport?lme:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cme(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==li(e)?!1:t}function Cl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=yC(e);let o=Aa(1);t&&(r?la(r)&&(o=qc(r)):o=qc(e));const l=cme(a,n,r)?b7(a):Aa(0);let c=(i.left+l.x)/o.x,u=(i.top+l.y)/o.y,f=i.width/o.x,d=i.height/o.y;if(a){const p=li(a),m=r&&la(r)?li(r):r;let b=p,v=yE(b);for(;v&&r&&m!==b;){const y=qc(v),x=v.getBoundingClientRect(),_=ca(v),S=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*y.x,w=x.top+(v.clientTop+parseFloat(_.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,d*=y.y,c+=S,u+=w,b=li(v),v=yE(b)}}return jv({width:f,height:d,x:c,y:u})}function lx(e,t){const n=sx(e).scrollLeft;return t?t.left+n:Cl(qa(e)).left+n}function w7(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-lx(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function ume(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=qa(r),l=t?ox(t.floating):!1;if(r===o||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Aa(1);const f=Aa(0),d=Da(r);if((d||!d&&!a)&&((ed(r)!=="body"||_p(o))&&(c=sx(r)),Da(r))){const m=Cl(r);u=qc(r),f.x=m.x+r.clientLeft,f.y=m.y+r.clientTop}const p=o&&!d&&!a?w7(o,c):Aa(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function dme(e){return Array.from(e.getClientRects())}function fme(e){const t=qa(e),n=sx(e),r=e.ownerDocument.body,i=ni(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ni(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+lx(e);const l=-n.scrollTop;return ca(r).direction==="rtl"&&(o+=ni(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}const WM=25;function hme(e,t){const n=li(e),r=qa(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,l=0,c=0;if(i){a=i.width,o=i.height;const f=vC();(!f||f&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}const u=lx(r);if(u<=0){const f=r.ownerDocument,d=f.body,p=getComputedStyle(d),m=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(r.clientWidth-d.clientWidth-m);b<=WM&&(a-=b)}else u<=WM&&(a+=u);return{width:a,height:o,x:l,y:c}}const pme=new Set(["absolute","fixed"]);function mme(e,t){const n=Cl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Da(e)?qc(e):Aa(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,u=r*a.y;return{width:o,height:l,x:c,y:u}}function VM(e,t,n){let r;if(t==="viewport")r=hme(e,n);else if(t==="document")r=fme(qa(e));else if(la(t))r=mme(t,n);else{const i=b7(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return jv(r)}function _7(e,t){const n=bs(e);return n===t||!la(n)||fu(n)?!1:ca(n).position==="fixed"||_7(n,t)}function gme(e,t){const n=t.get(e);if(n)return n;let r=hh(e,[],!1).filter(l=>la(l)&&ed(l)!=="body"),i=null;const a=ca(e).position==="fixed";let o=a?bs(e):e;for(;la(o)&&!fu(o);){const l=ca(o),c=gC(o);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&pme.has(i.position)||_p(o)&&!c&&_7(e,o))?r=r.filter(f=>f!==o):i=l,o=bs(o)}return t.set(e,r),r}function vme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?ox(t)?[]:gme(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,f)=>{const d=VM(t,f,i);return u.top=ni(d.top,u.top),u.right=xs(d.right,u.right),u.bottom=xs(d.bottom,u.bottom),u.left=ni(d.left,u.left),u},VM(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yme(e){const{width:t,height:n}=x7(e);return{width:t,height:n}}function xme(e,t,n){const r=Da(t),i=qa(t),a=n==="fixed",o=Cl(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=Aa(0);function u(){c.x=lx(i)}if(r||!r&&!a)if((ed(t)!=="body"||_p(i))&&(l=sx(t)),r){const m=Cl(t,!0,a,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else i&&u();a&&!r&&i&&u();const f=i&&!r&&!a?w7(i,l):Aa(0),d=o.left+l.scrollLeft-c.x-f.x,p=o.top+l.scrollTop-c.y-f.y;return{x:d,y:p,width:o.width,height:o.height}}function Yw(e){return ca(e).position==="static"}function GM(e,t){if(!Da(e)||ca(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return qa(e)===n&&(n=n.ownerDocument.body),n}function S7(e,t){const n=li(e);if(ox(e))return n;if(!Da(e)){let i=bs(e);for(;i&&!fu(i);){if(la(i)&&!Yw(i))return i;i=bs(i)}return n}let r=GM(e,t);for(;r&&tme(r)&&Yw(r);)r=GM(r,t);return r&&fu(r)&&Yw(r)&&!gC(r)?n:r||ome(e)||n}const bme=async function(e){const t=this.getOffsetParent||S7,n=this.getDimensions,r=await n(e.floating);return{reference:xme(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wme(e){return ca(e).direction==="rtl"}const _me={convertOffsetParentRelativeRectToViewportRelativeRect:ume,getDocumentElement:qa,getClippingRect:vme,getOffsetParent:S7,getElementRects:bme,getClientRects:dme,getDimensions:yme,getScale:qc,isElement:la,isRTL:wme};function j7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sme(e,t){let n=null,r;const i=qa(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:d,width:p,height:m}=u;if(l||t(),!p||!m)return;const b=dg(d),v=dg(i.clientWidth-(f+p)),y=dg(i.clientHeight-(d+m)),x=dg(f),S={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:ni(0,xs(1,c))||1};let w=!0;function N(k){const C=k[0].intersectionRatio;if(C!==c){if(!w)return o();C?o(!1,C):r=setTimeout(()=>{o(!1,1e-7)},1e3)}C===1&&!j7(u,e.getBoundingClientRect())&&o(),w=!1}try{n=new IntersectionObserver(N,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,S)}n.observe(e)}return o(!0),a}function jme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=yC(e),f=i||a?[...u?hh(u):[],...hh(t)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const d=u&&l?Sme(u,n):null;let p=-1,m=null;o&&(m=new ResizeObserver(x=>{let[_]=x;_&&_.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=m)==null||S.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let b,v=c?Cl(e):null;c&&y();function y(){const x=Cl(e);v&&!j7(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(_=>{i&&_.removeEventListener("scroll",n),a&&_.removeEventListener("resize",n)}),d==null||d(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const Nme=Ype,Eme=Qpe,kme=Vpe,Ome=Zpe,Cme=Gpe,KM=Wpe,Ame=Xpe,Pme=(e,t,n)=>{const r=new Map,i={platform:_me,...n},a={...i.platform,_c:r};return Hpe(e,t,{...i,platform:a})};var Tme=typeof document<"u",Rme=function(){},Qg=Tme?E.useLayoutEffect:Rme;function Nv(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(!Nv(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 a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Nv(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function N7(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YM(e,t){const n=N7(e);return Math.round(t*n)/n}function Qw(e){const t=E.useRef(e);return Qg(()=>{t.current=e}),t}function Ime(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[f,d]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=E.useState(r);Nv(p,r)||m(r);const[b,v]=E.useState(null),[y,x]=E.useState(null),_=E.useCallback(H=>{H!==k.current&&(k.current=H,v(H))},[]),S=E.useCallback(H=>{H!==C.current&&(C.current=H,x(H))},[]),w=a||b,N=o||y,k=E.useRef(null),C=E.useRef(null),P=E.useRef(f),L=c!=null,T=Qw(c),A=Qw(i),R=Qw(u),I=E.useCallback(()=>{if(!k.current||!C.current)return;const H={placement:t,strategy:n,middleware:p};A.current&&(H.platform=A.current),Pme(k.current,C.current,H).then(K=>{const $={...K,isPositioned:R.current!==!1};M.current&&!Nv(P.current,$)&&(P.current=$,Ll.flushSync(()=>{d($)}))})},[p,t,n,A,R]);Qg(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(H=>({...H,isPositioned:!1})))},[u]);const M=E.useRef(!1);Qg(()=>(M.current=!0,()=>{M.current=!1}),[]),Qg(()=>{if(w&&(k.current=w),N&&(C.current=N),w&&N){if(T.current)return T.current(w,N,I);I()}},[w,N,I,T,L]);const B=E.useMemo(()=>({reference:k,floating:C,setReference:_,setFloating:S}),[_,S]),W=E.useMemo(()=>({reference:w,floating:N}),[w,N]),G=E.useMemo(()=>{const H={position:n,left:0,top:0};if(!W.floating)return H;const K=YM(W.floating,f.x),$=YM(W.floating,f.y);return l?{...H,transform:"translate("+K+"px, "+$+"px)",...N7(W.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:$}},[n,l,W.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:I,refs:B,elements:W,floatingStyles:G}),[f,I,B,W,G])}const Mme=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?KM({element:r.current,padding:i}).fn(n):{}:r?KM({element:r,padding:i}).fn(n):{}}}},Dme=(e,t)=>({...Nme(e),options:[e,t]}),Lme=(e,t)=>({...Eme(e),options:[e,t]}),$me=(e,t)=>({...Ame(e),options:[e,t]}),Fme=(e,t)=>({...kme(e),options:[e,t]}),Bme=(e,t)=>({...Ome(e),options:[e,t]}),qme=(e,t)=>({...Cme(e),options:[e,t]}),Ume=(e,t)=>({...Mme(e),options:[e,t]});var zme="Arrow",E7=E.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return s.jsx(ut.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});E7.displayName=zme;var Hme=E7;function xC(e){const[t,n]=E.useState(void 0);return ar(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var bC="Popper",[k7,td]=di(bC),[Wme,O7]=k7(bC),C7=e=>{const{__scopePopper:t,children:n}=e,[r,i]=E.useState(null);return s.jsx(Wme,{scope:t,anchor:r,onAnchorChange:i,children:n})};C7.displayName=bC;var A7="PopperAnchor",P7=E.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=O7(A7,n),o=E.useRef(null),l=At(t,o),c=E.useRef(null);return E.useEffect(()=>{const u=c.current;c.current=(r==null?void 0:r.current)||o.current,u!==c.current&&a.onAnchorChange(c.current)}),r?null:s.jsx(ut.div,{...i,ref:l})});P7.displayName=A7;var wC="PopperContent",[Vme,Gme]=k7(wC),T7=E.forwardRef((e,t)=>{var Z,ie,Y,J,se,V;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,y=O7(wC,n),[x,_]=E.useState(null),S=At(t,fe=>_(fe)),[w,N]=E.useState(null),k=xC(w),C=(k==null?void 0:k.width)??0,P=(k==null?void 0:k.height)??0,L=r+(a!=="center"?"-"+a:""),T=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},A=Array.isArray(u)?u:[u],R=A.length>0,I={padding:T,boundary:A.filter(Yme),altBoundary:R},{refs:M,floatingStyles:B,placement:W,isPositioned:G,middlewareData:H}=Ime({strategy:"fixed",placement:L,whileElementsMounted:(...fe)=>jme(...fe,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Dme({mainAxis:i+P,alignmentAxis:o}),c&&Lme({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?$me():void 0,...I}),c&&Fme({...I}),Bme({...I,apply:({elements:fe,rects:ce,availableWidth:Ne,availableHeight:me})=>{const{width:je,height:te}=ce.reference,oe=fe.floating.style;oe.setProperty("--radix-popper-available-width",`${Ne}px`),oe.setProperty("--radix-popper-available-height",`${me}px`),oe.setProperty("--radix-popper-anchor-width",`${je}px`),oe.setProperty("--radix-popper-anchor-height",`${te}px`)}}),w&&Ume({element:w,padding:l}),Qme({arrowWidth:C,arrowHeight:P}),p&&qme({strategy:"referenceHidden",...I})]}),[K,$]=M7(W),F=Ia(b);ar(()=>{G&&(F==null||F())},[G,F]);const z=(Z=H.arrow)==null?void 0:Z.x,U=(ie=H.arrow)==null?void 0:ie.y,ee=((Y=H.arrow)==null?void 0:Y.centerOffset)!==0,[re,X]=E.useState();return ar(()=>{x&&X(window.getComputedStyle(x).zIndex)},[x]),s.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:G?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:re,"--radix-popper-transform-origin":[(J=H.transformOrigin)==null?void 0:J.x,(se=H.transformOrigin)==null?void 0:se.y].join(" "),...((V=H.hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Vme,{scope:n,placedSide:K,onArrowChange:N,arrowX:z,arrowY:U,shouldHideArrow:ee,children:s.jsx(ut.div,{"data-side":K,"data-align":$,...v,ref:S,style:{...v.style,animation:G?void 0:"none"}})})})});T7.displayName=wC;var R7="PopperArrow",Kme={top:"bottom",right:"left",bottom:"top",left:"right"},I7=E.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Gme(R7,r),o=Kme[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(Hme,{...i,ref:n,style:{...i.style,display:"block"}})})});I7.displayName=R7;function Yme(e){return e!==null}var Qme=e=>({name:"transformOrigin",options:e,fn(t){var y,x,_;const{placement:n,rects:r,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,f]=M7(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(((x=i.arrow)==null?void 0:x.x)??0)+l/2,m=(((_=i.arrow)==null?void 0:_.y)??0)+c/2;let b="",v="";return u==="bottom"?(b=o?d:`${p}px`,v=`${-c}px`):u==="top"?(b=o?d:`${p}px`,v=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,v=o?d:`${m}px`):u==="left"&&(b=`${r.floating.width+c}px`,v=o?d:`${m}px`),{data:{x:b,y:v}}}});function M7(e){const[t,n="center"]=e.split("-");return[t,n]}var _C=C7,cx=P7,SC=T7,jC=I7;function NC(e){const t=E.useRef({value:e,previous:e});return E.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var D7=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"}),Xme="VisuallyHidden",Zme=E.forwardRef((e,t)=>s.jsx(ut.span,{...e,ref:t,style:{...D7,...e.style}}));Zme.displayName=Xme;var Jme=[" ","Enter","ArrowUp","ArrowDown"],ege=[" ","Enter"],Al="Select",[ux,dx,tge]=ix(Al),[nd]=di(Al,[tge,td]),fx=td(),[nge,Ss]=nd(Al),[rge,ige]=nd(Al),L7=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:d,disabled:p,required:m,form:b}=e,v=fx(t),[y,x]=E.useState(null),[_,S]=E.useState(null),[w,N]=E.useState(!1),k=wp(u),[C,P]=Wr({prop:r,defaultProp:i??!1,onChange:a,caller:Al}),[L,T]=Wr({prop:o,defaultProp:l,onChange:c,caller:Al}),A=E.useRef(null),R=y?b||!!y.closest("form"):!0,[I,M]=E.useState(new Set),B=Array.from(I).map(W=>W.props.value).join(";");return s.jsx(_C,{...v,children:s.jsxs(nge,{required:m,scope:t,trigger:y,onTriggerChange:x,valueNode:_,onValueNodeChange:S,valueNodeHasChildren:w,onValueNodeHasChildrenChange:N,contentId:Ri(),value:L,onValueChange:T,open:C,onOpenChange:P,dir:k,triggerPointerDownPosRef:A,disabled:p,children:[s.jsx(ux.Provider,{scope:t,children:s.jsx(rge,{scope:e.__scopeSelect,onNativeOptionAdd:E.useCallback(W=>{M(G=>new Set(G).add(W))},[]),onNativeOptionRemove:E.useCallback(W=>{M(G=>{const H=new Set(G);return H.delete(W),H})},[]),children:n})}),R?s.jsxs(sz,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:L,onChange:W=>T(W.target.value),disabled:p,form:b,children:[L===void 0?s.jsx("option",{value:""}):null,Array.from(I)]},B):null]})})};L7.displayName=Al;var $7="SelectTrigger",F7=E.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=fx(n),o=Ss($7,n),l=o.disabled||r,c=At(t,o.onTriggerChange),u=dx(n),f=E.useRef("touch"),[d,p,m]=cz(v=>{const y=u().filter(S=>!S.disabled),x=y.find(S=>S.value===o.value),_=uz(y,v,x);_!==void 0&&o.onValueChange(_.value)}),b=v=>{l||(o.onOpenChange(!0),m()),v&&(o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return s.jsx(cx,{asChild:!0,...a,children:s.jsx(ut.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":lz(o.value)?"":void 0,...i,ref:c,onClick:Ge(i.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&b(v)}),onPointerDown:Ge(i.onPointerDown,v=>{f.current=v.pointerType;const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(b(v),v.preventDefault())}),onKeyDown:Ge(i.onKeyDown,v=>{const y=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(y&&v.key===" ")&&Jme.includes(v.key)&&(b(),v.preventDefault())})})})});F7.displayName=$7;var B7="SelectValue",q7=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...l}=e,c=Ss(B7,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,d=At(t,c.onValueNodeChange);return ar(()=>{u(f)},[u,f]),s.jsx(ut.span,{...l,ref:d,style:{pointerEvents:"none"},children:lz(c.value)?s.jsx(s.Fragment,{children:o}):a})});q7.displayName=B7;var age="SelectIcon",U7=E.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return s.jsx(ut.span,{"aria-hidden":!0,...i,ref:t,children:r||"â¼"})});U7.displayName=age;var oge="SelectPortal",z7=e=>s.jsx(vp,{asChild:!0,...e});z7.displayName=oge;var Pl="SelectContent",H7=E.forwardRef((e,t)=>{const n=Ss(Pl,e.__scopeSelect),[r,i]=E.useState();if(ar(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Ll.createPortal(s.jsx(W7,{scope:e.__scopeSelect,children:s.jsx(ux.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),a):null}return s.jsx(V7,{...e,ref:t})});H7.displayName=Pl;var Ji=10,[W7,js]=nd(Pl),sge="SelectContentImpl",lge=ms("SelectContent.RemoveScroll"),V7=E.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:y,...x}=e,_=Ss(Pl,n),[S,w]=E.useState(null),[N,k]=E.useState(null),C=At(t,Z=>w(Z)),[P,L]=E.useState(null),[T,A]=E.useState(null),R=dx(n),[I,M]=E.useState(!1),B=E.useRef(!1);E.useEffect(()=>{if(S)return Wy(S)},[S]),zy();const W=E.useCallback(Z=>{const[ie,...Y]=R().map(V=>V.ref.current),[J]=Y.slice(-1),se=document.activeElement;for(const V of Z)if(V===se||(V==null||V.scrollIntoView({block:"nearest"}),V===ie&&N&&(N.scrollTop=0),V===J&&N&&(N.scrollTop=N.scrollHeight),V==null||V.focus(),document.activeElement!==se))return},[R,N]),G=E.useCallback(()=>W([P,S]),[W,P,S]);E.useEffect(()=>{I&&G()},[I,G]);const{onOpenChange:H,triggerPointerDownPosRef:K}=_;E.useEffect(()=>{if(S){let Z={x:0,y:0};const ie=J=>{var se,V;Z={x:Math.abs(Math.round(J.pageX)-(((se=K.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(J.pageY)-(((V=K.current)==null?void 0:V.y)??0))}},Y=J=>{Z.x<=10&&Z.y<=10?J.preventDefault():S.contains(J.target)||H(!1),document.removeEventListener("pointermove",ie),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",ie),document.addEventListener("pointerup",Y,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ie),document.removeEventListener("pointerup",Y,{capture:!0})}}},[S,H,K]),E.useEffect(()=>{const Z=()=>H(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[H]);const[$,F]=cz(Z=>{const ie=R().filter(se=>!se.disabled),Y=ie.find(se=>se.ref.current===document.activeElement),J=uz(ie,Z,Y);J&&setTimeout(()=>J.ref.current.focus())}),z=E.useCallback((Z,ie,Y)=>{const J=!B.current&&!Y;(_.value!==void 0&&_.value===ie||J)&&(L(Z),J&&(B.current=!0))},[_.value]),U=E.useCallback(()=>S==null?void 0:S.focus(),[S]),ee=E.useCallback((Z,ie,Y)=>{const J=!B.current&&!Y;(_.value!==void 0&&_.value===ie||J)&&A(Z)},[_.value]),re=r==="popper"?xE:G7,X=re===xE?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:b,hideWhenDetached:v,avoidCollisions:y}:{};return s.jsx(W7,{scope:n,content:S,viewport:N,onViewportChange:k,itemRefCallback:z,selectedItem:P,onItemLeave:U,itemTextRefCallback:ee,focusSelectedItem:G,selectedItemText:T,position:r,isPositioned:I,searchRef:$,children:s.jsx(yp,{as:lge,allowPinchZoom:!0,children:s.jsx(gp,{asChild:!0,trapped:_.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:Ge(i,Z=>{var ie;(ie=_.trigger)==null||ie.focus({preventScroll:!0}),Z.preventDefault()}),children:s.jsx(mp,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:s.jsx(re,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:Z=>Z.preventDefault(),...x,...X,onPlaced:()=>M(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:Ge(x.onKeyDown,Z=>{const ie=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!ie&&Z.key.length===1&&F(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let J=R().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(J=J.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const se=Z.target,V=J.indexOf(se);J=J.slice(V+1)}setTimeout(()=>W(J)),Z.preventDefault()}})})})})})})});V7.displayName=sge;var cge="SelectItemAlignedPosition",G7=E.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=Ss(Pl,n),o=js(Pl,n),[l,c]=E.useState(null),[u,f]=E.useState(null),d=At(t,C=>f(C)),p=dx(n),m=E.useRef(!1),b=E.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:x,focusSelectedItem:_}=o,S=E.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&u&&v&&y&&x){const C=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),T=x.getBoundingClientRect();if(a.dir!=="rtl"){const se=T.left-P.left,V=L.left-se,fe=C.left-V,ce=C.width+fe,Ne=Math.max(ce,P.width),me=window.innerWidth-Ji,je=$M(V,[Ji,Math.max(Ji,me-Ne)]);l.style.minWidth=ce+"px",l.style.left=je+"px"}else{const se=P.right-T.right,V=window.innerWidth-L.right-se,fe=window.innerWidth-C.right-V,ce=C.width+fe,Ne=Math.max(ce,P.width),me=window.innerWidth-Ji,je=$M(V,[Ji,Math.max(Ji,me-Ne)]);l.style.minWidth=ce+"px",l.style.right=je+"px"}const A=p(),R=window.innerHeight-Ji*2,I=v.scrollHeight,M=window.getComputedStyle(u),B=parseInt(M.borderTopWidth,10),W=parseInt(M.paddingTop,10),G=parseInt(M.borderBottomWidth,10),H=parseInt(M.paddingBottom,10),K=B+W+I+H+G,$=Math.min(y.offsetHeight*5,K),F=window.getComputedStyle(v),z=parseInt(F.paddingTop,10),U=parseInt(F.paddingBottom,10),ee=C.top+C.height/2-Ji,re=R-ee,X=y.offsetHeight/2,Z=y.offsetTop+X,ie=B+W+Z,Y=K-ie;if(ie<=ee){const se=A.length>0&&y===A[A.length-1].ref.current;l.style.bottom="0px";const V=u.clientHeight-v.offsetTop-v.offsetHeight,fe=Math.max(re,X+(se?U:0)+V+G),ce=ie+fe;l.style.height=ce+"px"}else{const se=A.length>0&&y===A[0].ref.current;l.style.top="0px";const fe=Math.max(ee,B+v.offsetTop+(se?z:0)+X)+Y;l.style.height=fe+"px",v.scrollTop=ie-ee+v.offsetTop}l.style.margin=`${Ji}px 0`,l.style.minHeight=$+"px",l.style.maxHeight=R+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[p,a.trigger,a.valueNode,l,u,v,y,x,a.dir,r]);ar(()=>S(),[S]);const[w,N]=E.useState();ar(()=>{u&&N(window.getComputedStyle(u).zIndex)},[u]);const k=E.useCallback(C=>{C&&b.current===!0&&(S(),_==null||_(),b.current=!1)},[S,_]);return s.jsx(dge,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:s.jsx(ut.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});G7.displayName=cge;var uge="SelectPopperPosition",xE=E.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ji,...a}=e,o=fx(n);return s.jsx(SC,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.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)"}})});xE.displayName=uge;var[dge,EC]=nd(Pl,{}),bE="SelectViewport",K7=E.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=js(bE,n),o=EC(bE,n),l=At(t,a.onViewportChange),c=E.useRef(0);return s.jsxs(s.Fragment,{children:[s.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}),s.jsx(ux.Slot,{scope:n,children:s.jsx(ut.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ge(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&d){const m=Math.abs(c.current-f.scrollTop);if(m>0){const b=window.innerHeight-Ji*2,v=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),x=Math.max(v,y);if(x<b){const _=x+m,S=Math.min(b,_),w=_-S;d.style.height=S+"px",d.style.bottom==="0px"&&(f.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});K7.displayName=bE;var Y7="SelectGroup",[fge,hge]=nd(Y7),pge=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Ri();return s.jsx(fge,{scope:n,id:i,children:s.jsx(ut.div,{role:"group","aria-labelledby":i,...r,ref:t})})});pge.displayName=Y7;var Q7="SelectLabel",X7=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=hge(Q7,n);return s.jsx(ut.div,{id:i.id,...r,ref:t})});X7.displayName=Q7;var Ev="SelectItem",[mge,Z7]=nd(Ev),J7=E.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,l=Ss(Ev,n),c=js(Ev,n),u=l.value===r,[f,d]=E.useState(a??""),[p,m]=E.useState(!1),b=At(t,_=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,_,r,i)}),v=Ri(),y=E.useRef("touch"),x=()=>{i||(l.onValueChange(r),l.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 s.jsx(mge,{scope:n,value:r,disabled:i,textId:v,isSelected:u,onItemTextChange:E.useCallback(_=>{d(S=>S||((_==null?void 0:_.textContent)??"").trim())},[]),children:s.jsx(ux.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:s.jsx(ut.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:Ge(o.onFocus,()=>m(!0)),onBlur:Ge(o.onBlur,()=>m(!1)),onClick:Ge(o.onClick,()=>{y.current!=="mouse"&&x()}),onPointerUp:Ge(o.onPointerUp,()=>{y.current==="mouse"&&x()}),onPointerDown:Ge(o.onPointerDown,_=>{y.current=_.pointerType}),onPointerMove:Ge(o.onPointerMove,_=>{var S;y.current=_.pointerType,i?(S=c.onItemLeave)==null||S.call(c):y.current==="mouse"&&_.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ge(o.onPointerLeave,_=>{var S;_.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:Ge(o.onKeyDown,_=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&_.key===" "||(ege.includes(_.key)&&x(),_.key===" "&&_.preventDefault())})})})})});J7.displayName=Ev;var Of="SelectItemText",ez=E.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=Ss(Of,n),l=js(Of,n),c=Z7(Of,n),u=ige(Of,n),[f,d]=E.useState(null),p=At(t,x=>d(x),c.onItemTextChange,x=>{var _;return(_=l.itemTextRefCallback)==null?void 0:_.call(l,x,c.value,c.disabled)}),m=f==null?void 0:f.textContent,b=E.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=u;return ar(()=>(v(b),()=>y(b)),[v,y,b]),s.jsxs(s.Fragment,{children:[s.jsx(ut.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Ll.createPortal(a.children,o.valueNode):null]})});ez.displayName=Of;var tz="SelectItemIndicator",nz=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Z7(tz,n).isSelected?s.jsx(ut.span,{"aria-hidden":!0,...r,ref:t}):null});nz.displayName=tz;var wE="SelectScrollUpButton",rz=E.forwardRef((e,t)=>{const n=js(wE,e.__scopeSelect),r=EC(wE,e.__scopeSelect),[i,a]=E.useState(!1),o=At(t,r.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?s.jsx(az,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});rz.displayName=wE;var _E="SelectScrollDownButton",iz=E.forwardRef((e,t)=>{const n=js(_E,e.__scopeSelect),r=EC(_E,e.__scopeSelect),[i,a]=E.useState(!1),o=At(t,r.onScrollButtonChange);return ar(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?s.jsx(az,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});iz.displayName=_E;var az=E.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=js("SelectScrollButton",n),o=E.useRef(null),l=dx(n),c=E.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return E.useEffect(()=>()=>c(),[c]),ar(()=>{var f;const u=l().find(d=>d.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[l]),s.jsx(ut.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ge(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Ge(i.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Ge(i.onPointerLeave,()=>{c()})})}),gge="SelectSeparator",oz=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return s.jsx(ut.div,{"aria-hidden":!0,...r,ref:t})});oz.displayName=gge;var SE="SelectArrow",vge=E.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fx(n),a=Ss(SE,n),o=js(SE,n);return a.open&&o.position==="popper"?s.jsx(jC,{...i,...r,ref:t}):null});vge.displayName=SE;var yge="SelectBubbleInput",sz=E.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=E.useRef(null),a=At(r,i),o=NC(t);return E.useEffect(()=>{const l=i.current;if(!l)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&f){const d=new Event("change",{bubbles:!0});f.call(l,t),l.dispatchEvent(d)}},[o,t]),s.jsx(ut.select,{...n,style:{...D7,...n.style},ref:a,defaultValue:t})});sz.displayName=yge;function lz(e){return e===""||e===void 0}function cz(e){const t=Ia(e),n=E.useRef(""),r=E.useRef(0),i=E.useCallback(o=>{const l=n.current+o;t(l),(function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),a=E.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return E.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function uz(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=xge(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function xge(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var bge=L7,dz=F7,wge=q7,_ge=U7,Sge=z7,fz=H7,jge=K7,hz=X7,pz=J7,Nge=ez,Ege=nz,mz=rz,gz=iz,vz=oz;const Et=bge,kt=wge,St=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(dz,{ref:r,className:et("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(_ge,{asChild:!0,children:s.jsx(Or,{className:"h-4 w-4 opacity-50"})})]}));St.displayName=dz.displayName;const yz=E.forwardRef(({className:e,...t},n)=>s.jsx(mz,{ref:n,className:et("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Py,{className:"h-4 w-4"})}));yz.displayName=mz.displayName;const xz=E.forwardRef(({className:e,...t},n)=>s.jsx(gz,{ref:n,className:et("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Or,{className:"h-4 w-4"})}));
690xz.displayName=gz.displayName;const jt=E.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>s.jsx(Sge,{children:s.jsxs(fz,{ref:i,className:et("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-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=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[s.jsx(yz,{}),s.jsx(jge,{className:et("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(xz,{})]})}));jt.displayName=fz.displayName;const kge=E.forwardRef(({className:e,...t},n)=>s.jsx(hz,{ref:n,className:et("px-2 py-1.5 text-sm font-semibold",e),...t}));kge.displayName=hz.displayName;const He=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(pz,{ref:r,className:et("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(Ege,{children:s.jsx(Hr,{className:"h-4 w-4"})})}),s.jsx(Nge,{children:t})]}));He.displayName=pz.displayName;const Oge=E.forwardRef(({className:e,...t},n)=>s.jsx(vz,{ref:n,className:et("-mx-1 my-1 h-px bg-muted",e),...t}));Oge.displayName=vz.displayName;function Cge({lead:e,practitioners:t=[],onAssign:n,onOpen:r}){var u;const i=`${e.first_name} ${e.last_name}`,a=e.last_contact_date?Y8(new Date,new Date(e.last_contact_date)):null,o=a===null?"â":a===0?"Today":a===1?"1 day":`${a} days`,l=a===null||a<=1?"text-emerald-700 bg-emerald-50 border-emerald-200":a>2?"text-red-700 bg-red-50 border-red-200":"text-amber-700 bg-amber-50 border-amber-200",c=`https://ui-avatars.com/api/?name=${encodeURIComponent((e.first_name||"")+" "+(e.last_name||""))}&background=14b8a6&color=fff`;return s.jsxs("div",{className:"bg-white border rounded-lg p-3 shadow-sm hover:shadow-md transition cursor-pointer",onClick:()=>r==null?void 0:r(e),children:[s.jsxs("div",{className:"flex items-start justify-between gap-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("img",{src:c,alt:i,className:"w-8 h-8 rounded-full flex-none"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-semibold text-slate-900",children:i}),s.jsx("div",{className:"text-xs text-slate-500",children:e.source||"â"})]})]}),((u=e.tags)==null?void 0:u.length)>0&&s.jsxs("div",{className:"flex gap-1 flex-wrap justify-end",children:[e.tags.slice(0,3).map((f,d)=>s.jsx(Rt,{variant:"secondary",className:"text-[10px]",children:f},d)),e.tags.length>3&&s.jsxs(Rt,{variant:"outline",className:"text-[10px]",children:["+",e.tags.length-3]})]})]}),s.jsxs("div",{className:"mt-2 text-sm space-y-1",children:[e.email&&s.jsxs("div",{className:"flex items-center gap-2 text-slate-700",children:[s.jsx(hn,{className:"w-3.5 h-3.5"}),e.email]}),e.phone&&s.jsxs("div",{className:"flex items-center gap-2 text-slate-700",children:[s.jsx(Ai,{className:"w-3.5 h-3.5"}),e.phone]}),s.jsxs("div",{className:`inline-flex items-center gap-1 text-xs border rounded-md px-2 py-1 ${l}`,children:[s.jsx(TX,{className:"w-3.5 h-3.5"}),s.jsxs("span",{children:["Last contact: ",o]})]})]}),s.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[s.jsxs(Et,{value:e.assigned_to_email||"",onValueChange:f=>n==null?void 0:n(e,f),children:[s.jsx(St,{className:"h-8 text-xs",children:s.jsx(kt,{placeholder:"Assign..."})}),s.jsxs(jt,{children:[s.jsx(He,{value:null,children:"Unassigned"}),t.map(f=>s.jsxs(He,{value:f.user_email,children:[f.first_name," ",f.last_name]},f.id))]})]}),s.jsxs(be,{size:"sm",variant:"outline",className:"h-8 px-2",onClick:f=>{f.stopPropagation(),r==null||r(e)},children:[s.jsx(iX,{className:"w-3.5 h-3.5 mr-1"})," View"]})]})]})}const Ee=ne.forwardRef(({className:e,...t},n)=>s.jsx("label",{ref:n,className:et("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...t}));
690Ee.displayName="Label";function Age({open:e,onOpenChange:t,lead:n,onBooked:r}){const[i,a]=E.useState([]),[o,l]=E.useState([]),[c,u]=E.useState([]),[f,d]=E.useState(""),[p,m]=E.useState(""),[b,v]=E.useState(""),[y,x]=E.useState(""),[_,S]=E.useState(!1);E.useEffect(()=>{e&&(async()=>{const[N,k,C]=await Promise.all([jr.Clinic.list(),jr.TreatmentType.list(),jr.Practitioner.list()]);a(N.filter(P=>P.is_active)),l(k),u(C.filter(P=>P.is_active))})()},[e]);const w=async()=>{if(!(!f||!p||!y)){S(!0);try{const N=o.find(R=>R.id===p),k=b?c.find(R=>R.id===b):c.find(R=>{var I;return(I=R.clinic_locations)==null?void 0:I.includes(f)});if(!k)throw new Error("Please select a practitioner.");const C=(n.email||"").trim().toLowerCase();let P=(await jr.Patient.filter({user_email:C},"",1))[0];if(!P){const R=crypto.randomUUID(),I=new Date;I.setDate(I.getDate()+7),P=await jr.Patient.create({user_email:C,first_name:n.first_name,last_name:n.last_name,full_name:`${n.first_name} ${n.last_name}`,phone:n.phone||"",account_status:"invited",account_setup_token:R,account_setup_token_expiry:I.toISOString()}),await iE.processNotificationTriggers({triggerEvent:"account_created",data:{recipientEmail:C,patientName:`${n.first_name} ${n.last_name}`,accountSetupToken:R}}).catch(()=>{})}const L=new Date(y),T=Dse(L,N.duration_minutes||60),A=await jr.Appointment.create({patient_id:P.id,patient_email:P.user_email,practitioner_id:k.id,clinician_email:k.user_email,appointment_date:L.toISOString(),duration_minutes:N.duration_minutes,service_type:N.name,appointment_type:N.appointment_type||"initial",clinic_location_code:f,amount:N.price,payment_status:"pending",status:"scheduled",booked_online:!1});await iE.processNotificationTriggers({triggerEvent:"booking_confirmation",data:{patientName:P.full_name,recipientEmail:P.user_email,appointmentDate:Vr(L,"EEEE, MMMM d, yyyy"),appointmentTime:Vr(L,"h:mm a"),serviceType:N.name}}).catch(()=>{}),r==null||r({patient:P,appt:A}),t(!1)}catch(N){alert(N.message||"Failed to book")}finally{S(!1)}}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-lg",children:[s.jsx(En,{children:s.jsx(kn,{children:"Book Appointment to Close Won"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Clinic"}),s.jsxs(Et,{value:f,onValueChange:d,children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Select clinic"})}),s.jsx(jt,{children:i.map(N=>s.jsx(He,{value:N.location_code,children:N.name},N.location_code))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Treatment"}),s.jsxs(Et,{value:p,onValueChange:m,children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Select treatment"})}),s.jsx(jt,{children:o.map(N=>s.jsx(He,{value:N.id,children:N.name},N.id))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Practitioner"}),s.jsxs(Et,{value:b,onValueChange:v,children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Select practitioner"})}),s.jsx(jt,{children:c.map(N=>s.jsxs(He,{value:N.id,children:[N.first_name," ",N.last_name]},N.id))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Date & Time"}),s.jsx(Te,{type:"datetime-local",value:y,onChange:N=>x(N.target.value)})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[s.jsx(be,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsxs(be,{onClick:w,disabled:_,children:[_?s.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}):s.jsx(vB,{className:"w-4 h-4 mr-2"}),"Confirm & Close Won"]})]})]})})}const dn=E.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:et("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));dn.displayName="Textarea";const Pge=["Contact Form","Email Lead","AI Symptoms Checker","Manual Entry"],Tge=["physiotherapy","osteopathy","sports_and_deep_tissue_massage","general"];function kv({open:e,onOpenChange:t,clinicId:n,teamMembers:r=[],onCreated:i}){const[a,o]=E.useState(n||null);E.useEffect(()=>{if(n){o(n);return}ve.auth.me().then(x=>o((x==null?void 0:x.clinic_id)||null)).catch(()=>{})},[n]);const l=a,[c,u]=E.useState({first_name:"",last_name:"",email:"",ph
690one:"",source:"Manual Entry",preferred_discipline:"",assigned_team_member_id:"",notes:""}),[f,d]=E.useState(!1),[p,m]=E.useState(null);E.useEffect(()=>{e&&(ve.auth.me().then(m).catch(()=>m(null)),u({first_name:"",last_name:"",email:"",phone:"",source:"Manual Entry",preferred_discipline:"",assigned_team_member_id:"",notes:""}))},[e]);const b=(x,_)=>u(S=>({...S,[x]:_})),v=c.first_name&&c.last_name&&c.email&&l,y=async()=>{var x;if(v){d(!0);try{const _=c.assigned_team_member_id&&c.assigned_team_member_id!=="__unassigned__"?r.find(N=>N.id===c.assigned_team_member_id):null,S={first_name:c.first_name.trim(),last_name:c.last_name.trim(),email:c.email.trim().toLowerCase(),phone:((x=c.phone)==null?void 0:x.trim())||"",source:c.source||"Manual Entry",preferred_discipline:c.preferred_discipline||"general",notes:c.notes||"",status:"new",clinic_id:l,assigned_team_member_id:(_==null?void 0:_.id)||null,assigned_to_email:(_==null?void 0:_.email)||null},w=await ve.entities.Lead.create(S);try{await ve.entities.LeadActivity.create({lead_id:w.id,type:"status_change",channel:"system",content:`New lead created via ${S.source}. ${c.notes?`Notes: ${c.notes}`:""}`.trim(),sent_by_email:(p==null?void 0:p.email)||"",sent_date:new Date().toISOString(),clinic_id:l})}catch{}i==null||i(w)}finally{d(!1)}}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-lg",children:[s.jsx(En,{children:s.jsx(kn,{children:"Add New Lead"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"First name *"}),s.jsx(Te,{value:c.first_name,onChange:x=>b("first_name",x.target.value),placeholder:"Jane"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Last name *"}),s.jsx(Te,{value:c.last_name,onChange:x=>b("last_name",x.target.value),placeholder:"Doe"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Email *"}),s.jsx(Te,{type:"email",value:c.email,onChange:x=>b("email",x.target.value),placeholder:"[email protected]"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Phone"}),s.jsx(Te,{value:c.phone,onChange:x=>b("phone",x.target.value),placeholder:"+44 7700 900123"})]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Source"}),s.jsxs(Et,{value:c.source,onValueChange:x=>b("source",x),children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Choose source"})}),s.jsx(jt,{children:Pge.map(x=>s.jsx(He,{value:x,children:x},x))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Preferred discipline"}),s.jsxs(Et,{value:c.preferred_discipline,onValueChange:x=>b("preferred_discipline",x),children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Select discipline"})}),s.jsx(jt,{children:Tge.map(x=>s.jsx(He,{value:x,children:x.replaceAll("_"," ")},x))})]})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Assign to team member"}),s.jsxs(Et,{value:c.assigned_team_member_id||"__unassigned__",onValueChange:x=>b("assigned_team_member_id",x==="__unassigned__"?"":x),children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Unassigned"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"__unassigned__",children:"Unassigned"}),r.map(x=>s.jsxs(He,{value:x.id,children:[x.first_name," ",x.last_name," ",x.job_title?`⢠${x.job_title}`:""]},x.id))]})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Notes"}),s.jsx(dn,{value:c.notes,onChange:x=>b("notes",x.target.value),placeholder:"Context from the call, injury details, goals..."})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[s.jsx(be,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsxs(be,{onClick:y,disabled:!v||f,className:"bg-[#006e74] hover:bg-[#005a60]",children:[f?s.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}):null,"Save Lead"]})]})]})})}const uf=ve.entities.Lead,QM=[{id:"new",label:"New Lead"},{id:"contact_made",label:"Contact Made"},{id:"won",label:"Lead Won"},{id:"lost",label:"Lead Lost"}];function Rge(){const[e,t]=E.useState(null),[n,r]=E.useState(null),[i,a]=E.useState([]),[o,l]=E.useState([]),[c,u]=E.useState("kanban"),[f,d]=E.useState(""),[p,m]=E.useState(null),[b,v]=E.useState("all"),[y,x]=E.useState("all"),[_,S]=E.useState(!1),w=mr();E.useEffect(()=>{(async()=>{const R=await jr.User.me().catch(()=>null);t(R);const I=await uf.list();a(I),l([])})()},[]);const N=E.useMemo(()=>e?!!(e.role==="admin"||n!=null&&n.is_lead_manager):!1,[e,n]),k=E.useMemo(()=>{const R=(f||"").toLowerCase();return i.filter(I=>{const M=!R||`${I.first_name} ${I.last_name}`.toLowerCase().includes(R)||(I.email||"").toLowerCase().includes(R)||(I.source||"").toLowerCase().includes(R),B=b==="all"||(I.source||"").toLowerCase()===b.toLowerCase(),W=y==="all"||y==="open"&&(I.status==="new"||I.status==="contact_made")||y==="won"&&I.status==="won"||y==="lost"&&I.status==="lost";return M&&B&&W})},[i,f,b,y]),C=E.useMemo(()=>{const R={new:[],contact_made:[],won:[],lost:[]};
690return k.forEach(I=>{(R[I.status]||R.new).push(I)}),R},[k]),P=async()=>{const R=await uf.list();a(R)},L=async(R,I)=>{await uf.update(R.id,{assigned_to_email:I||null}),P()},T=async R=>{const{destination:I,source:M,draggableId:B}=R||{};if(!I)return;const W=I.droppableId,G=M.droppableId;if(W===G)return;const H=i.find($=>$.id===B);if(!H)return;if(W==="won"){m(H);return}const K={status:W};W==="contact_made"&&!H.assigned_to_email&&(e!=null&&e.email)&&(K.assigned_to_email=e.email,K.last_contact_date=new Date().toISOString()),await uf.update(H.id,K),P()},A=async({patient:R,appt:I})=>{p&&(await uf.update(p.id,{status:"won",patient_id:R.id,appointment_id:I.id,assigned_to_email:p.assigned_to_email||(e==null?void 0:e.email)||null,last_contact_date:new Date().toISOString()}),m(null),P())};return e?N?s.jsxs("div",{className:"p-4 md:p-8",children:[s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col md:flex-row items-start md:items-center justify-between gap-3 mb-4",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(mR,{className:"w-6 h-6 text-[#006e74]"}),s.jsx("h1",{className:"text-2xl font-bold",children:"Leads"}),s.jsx(Rt,{variant:"secondary",children:k.length})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Te,{placeholder:"Search leads...",value:f,onChange:R=>d(R.target.value),className:"w-56"}),s.jsx(fv,{value:c,onValueChange:u,children:s.jsxs(HO,{children:[s.jsxs(Bc,{value:"kanban",children:[s.jsx(mR,{className:"w-4 h-4 mr-1"})," Kanban"]}),s.jsxs(Bc,{value:"list",children:[s.jsx(oZ,{className:"w-4 h-4 mr-1"})," List"]})]})}),s.jsxs(be,{onClick:()=>S(!0),className:"ml-2",children:[s.jsx(ir,{className:"w-4 h-4 mr-1"})," Add New Lead"]})]})]}),s.jsx("div",{className:"bg-white border rounded-lg p-3 mb-4",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Source"}),s.jsxs(Et,{value:b,onValueChange:v,children:[s.jsx(St,{className:"w-full",children:s.jsx(kt,{placeholder:"All sources"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All"}),s.jsx(He,{value:"Contact Form",children:"Contact Form"}),s.jsx(He,{value:"Reception Call",children:"Reception Call"}),s.jsx(He,{value:"Manual Entry",children:"Manual Entry"})]})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-xs text-slate-500 mb-1",children:"Stage"}),s.jsxs(Et,{value:y,onValueChange:x,children:[s.jsx(St,{className:"w-full",children:s.jsx(kt,{placeholder:"Any"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All"}),s.jsx(He,{value:"open",children:"Open"}),s.jsx(He,{value:"won",children:"Won"}),s.jsx(He,{value:"lost",children:"Lost"})]})]})]})]})}),s.jsxs(fv,{value:c,onValueChange:u,className:"w-full",children:[s.jsx(aE,{value:"kanban",className:"mt-0",children:s.jsx(o7,{onDragEnd:T,children:s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:QM.map(R=>s.jsx(mE,{droppableId:R.id,children:I=>{var M;return s.jsxs("div",{ref:I.innerRef,...I.droppableProps,className:"bg-slate-50 border rounded-lg p-3 min-h-[400px]",children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("div",{className:"font-semibold",children:R.label}),s.jsx(Rt,{variant:"outline",children:((M=C[R.id])==null?void 0:M.length)||0})]}),s.jsxs("div",{className:"space-y-2",children:[(C[R.id]||[]).map((B,W)=>s.jsx(hE,{draggableId:B.id,index:W,children:G=>s.jsx("div",{ref:G.innerRef,...G.draggableProps,...G.dragHandleProps,onClick:()=>w(`${ln("LeadDetails")}?id=${B.id}`),children:s.jsx(Cge,{lead:B,practitioners:o,onAssign:L,onOpen:()=>w(`${ln("LeadDetails")}?id=${B.id}`)})})},B.id)),I.placeholder]})]})}},R.id))})})}),s.jsx(aE,{value:"list",className:"mt-0",children:s.jsx("div",{className:"bg-white border rounded-lg overflow-hidden",children:s.jsx("div",{className:"overflow-x-auto",children:s.jsxs("table",{className:"min-w-full",children:[s.jsx("thead",{className:"bg-slate-50",children:s.jsxs("tr",{className:"text-left text-sm text-slate-600",children:[s.jsx("th",{className:"px-4 py-2",children:"Name"}),s.jsx("th",{className:"px-4 py-2",children:"Email"}),s.jsx("th",{className:"px-4 py-2",children:"Phone"}),s.jsx("th",{className:"px-4 py-2",children:"Source"}),s.jsx("th",{className:"px-4 py-2",children:"Stage"}),s.jsx("th",{className:"px-4 py-2",children:"Assigned"}),s.jsx("th",{className:"px-4 py-2"})]})}),s.jsxs("tbody",{children:[k.map(R=>{var I;return s.jsxs("tr",{className:"border-t text-sm hover:bg-slate-50 cursor-pointer",onClick:()=>w(`${ln("LeadDetails")}?id=${R.id}`),children:[s.jsxs("td",{className:"px-4 py-2 font-medium",children:[R.first_name," ",R.last_name]}),s.jsx("td",{className:"px-4 py-2",children:R.email}),s.jsx("td",{className:"px-4 py-2",children:R.phone||"â"}),s.jsx("td",{className:"px-4 py-2",children:R.source||"â"}),s.jsx("td",{className:"px-4 py-2",children:(I=QM.find(M=>M.id===R.status))==null?void 0:I.label}),s.jsx("td",{className:"px-4 py-2",children:R.assigned_to_email||"â"}),s.jsx("td",{className:"px-4 py-2",children:s.jsx(be,{size:"sm",variant:"outline",onClick:M=>{M.stopPropagation(),m(R)},disabled:!!R.appointment_id,children:"Close Won"})})]},R.id)}),k.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:7,className:"px-4 py-8 text-center text-slate-500",children:"No leads found."})})]})]})})})})]})]}),s.jsx(Age,{open:!!p,onOpenChange:R=>!R&&m(null),lead:p,onBooked:A}),s.jsx(kv,{open:_,onOpenChange:S,practitioners:o,onCreated:()=>{S(!1),P()}})]}):s.jsx("div",{className:"p-6 max-w-3xl mx-auto",children:s.jsxs(yt,{children:[s.jsx(wn,{children:s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(BZ,{className:"w-5 h-5 text-amber-600"})," Access Restricted"]})}),s.jsx(It,{children:"You donât have permission to view Leads. Please contact an administrator."})]})}):s.jsx("div",{className:"p-6",children:"Loading..."})}function Ige({open:e,onOpenChange:t,onSubmit:n}){const[r,i]=E.useState(!1),[a,o]=E.useState({name:"",slug:"",website_url:"",admin_email:"",primary_color:"#006e74"}),l=async c=>{c.preventDefault(),i(!0);try{await n(a),o({name:"",slug:"",website_url:"",admin_email:"",primary_color:"#006e74"})}finally{i(!1)}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"sm:max-w-md",children:[s.jsx(En,{children:s.jsx(kn,{children:"Create New Clinic"})}),s.jsxs("form",{onSubmit:l,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"name",children:"Clinic Name *"}),s.jsx(Te,{id:"name",value:a.name,onChange:c=>o({...a,name:c.target.value}),placeholder:"e.g., Downtown Wellness Clinic",required:!0})]}),s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"slug",children:"URL Slug *"}),s.jsx(Te,{id:"slug",value:a.slug,onChange:c=>o({...a,slug:c.target.value}),placeholder:"e.g., downtown-wellness",required:!0})]}),s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"website_url",children:"Website URL"}),s.jsx(Te,{id:"website_url",type:"url",value:a.website_url,onChange:c=>o({...a,website_url:c.target.value}),placeholder:"https://example.com"})]}),s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"admin_email",children:"Primary Admin Email *"}),s.jsx(Te,{id:"admin_email",type:"email",value:a.admin_email,onChange:c=>o({...a,admin_email:c.target.value}),placeholder:"[email protected]",required:!0})]}),s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"primary_color",children:"Primary Brand Color"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Te,{id:"primary_color",type:"color",value:a.primary_color,onChange:c=>o({...a,primary_color:c.target.value}),className:"w-20 h-10"}),s.jsx(Te,{type:"text",value:a.primary_color,onChange:c=>o({...a,primary_color:c.target.value}),placeholder:"#006e74",className:"flex-1"})]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:r,children:"Cancel"}),s.jsx(be,{type:"submit",className:"bg-[#006e74] hover:bg-[#005560]",disabled:r,children:r?"Creating...":"Create Clinic"})]})]})]})})}var hx="Switch",[Mge]=di(hx),[Dge,Lge]=Mge(hx),bz=E.forwardRef((e,t)=>
690{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:l,value:c="on",onCheckedChange:u,form:f,...d}=e,[p,m]=E.useState(null),b=At(t,S=>m(S)),v=E.useRef(!1),y=p?f||!!p.closest("form"):!0,[x,_]=Wr({prop:i,defaultProp:a??!1,onChange:u,caller:hx});return s.jsxs(Dge,{scope:n,checked:x,disabled:l,children:[s.jsx(ut.button,{type:"button",role:"switch","aria-checked":x,"aria-required":o,"data-state":jz(x),"data-disabled":l?"":void 0,disabled:l,value:c,...d,ref:b,onClick:Ge(e.onClick,S=>{_(w=>!w),y&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),y&&s.jsx(Sz,{control:p,bubbles:!v.current,name:r,value:c,checked:x,required:o,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});bz.displayName=hx;var wz="SwitchThumb",_z=E.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=Lge(wz,n);return s.jsx(ut.span,{"data-state":jz(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});_z.displayName=wz;var $ge="SwitchBubbleInput",Sz=E.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{const o=E.useRef(null),l=At(o,a),c=NC(n),u=xC(t);return E.useEffect(()=>{const f=o.current;if(!f)return;const d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&m){const b=new Event("click",{bubbles:r});m.call(f,n),f.dispatchEvent(b)}},[c,n,r]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:l,style:{...i.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Sz.displayName=$ge;function jz(e){return e?"checked":"unchecked"}var Nz=bz,Fge=_z;const kC=E.forwardRef(({className:e,...t},n)=>s.jsx(Nz,{className:et("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(Fge,{className:et("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));kC.displayName=Nz.displayName;function XM({options:e=[],value:t=[],onChange:n,placeholder:r="Select options"}){const[i,a]=E.useState(!1),o=E.useRef(null);E.useEffect(()=>{const u=f=>{o.current&&!o.current.contains(f.target)&&a(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[]);const l=u=>{t.includes(u)?n(t.filter(f=>f!==u)):n([...t,u])},c=(u,f)=>{f.stopPropagation(),n(t.filter(d=>d!==u))};return s.jsxs("div",{ref:o,className:"relative",children:[s.jsxs("button",{type:"button",onClick:()=>a(u=>!u),className:"w-full min-h-9 border border-input rounded-md px-3 py-1.5 text-left bg-background text-sm flex items-center justify-between gap-2",children:[s.jsxs("div",{className:"flex flex-wrap gap-1 flex-1",children:[t.length===0&&s.jsx("span",{className:"text-muted-foreground",children:r}),t.map(u=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-teal-50 text-[#006e74] rounded-md text-xs",children:[u,s.jsx(Cr,{className:"w-3 h-3 cursor-pointer",onClick:f=>c(u,f)})]},u))]}),s.jsx(Or,{className:`w-4 h-4 text-slate-400 transition-transform ${i?"rotate-180":""}`})]}),i&&s.jsx("div",{className:"absolute z-50 w-full mt-1 bg-white border rounded-md shadow-lg max-h-60 overflow-y-auto",children:e.map(u=>{const f=t.includes(u);return s.jsxs("div",{onClick:()=>l(u),className:"flex items-center gap-2 px-3 py-2 hover:bg-slate-50 cursor-pointer text-sm",children:[s.jsx("div",{className:`w-4 h-4 rounded border flex items-center justify-center ${f?"bg-[#006e74] border-[#006e74]":"border-slate-300"}`,children:f&&s.jsx(Hr,{className:"w-3 h-3 text-white"})}),s.jsx("span",{children:u})]},u)})})]})}function Xw(e=""){return String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}function Ez({locations:e=[],onChange:t,disabled:n=!1}){const r=(o,l)=>{const c=e.map((u,f)=>f===o?{...u,...l}:u);t(c)},i=o=>{t(e.filter((l,c)=>c!==o))},a=()=>{t([...e||[],{name:"",slug:"",address:"",phone:"",email:""}])};return s.jsxs("div",{className:"space-y-3",children:[e.length===0&&s.jsx("div",{className:"text-sm text-slate-400 py-3 px-4 border border-dashed rounded-lg text-center",children:"No locations yet. Add your first clinic location below."}),e.map((o,l)=>s.jsxs("div",{className:"border rounded-lg p-3 bg-slate-50 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold text-slate-700",children:[s.jsx(Li,{className:"w-4 h-4 text-[#006e74]"}),"Location ",l+1]}),!n&&s.jsxs(be,{type:"button",variant:"ghost",size:"sm",onClick:()=>i(l),className:"text-red-600 hover:text-red-700 hover:bg-red-50 gap-1",children:[s.jsx(Na,{className:"w-3.5 h-3.5"})," Remove"]})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:[s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"Name *"}),s.jsx(Te,{value:o.name||"",onChange:c=>{const u=c.target.value,f=!o.slug||o.slug===Xw(o.name||"");r(l,{name:u,...f?{slug:Xw(u)}:{}})},placeholder:"e.g. London Bridge",disabled:n,className:"mt-1 h-9 bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"URL slug *"}),s.jsx(Te,{value:o.slug||"",onChange:c=>r(l,{slug:Xw(c.target.value)}),placeholder:"london-bridge",disabled:n,className:"mt-1 h-9 bg-white font-mono text-xs"}),s.jsx("p",{className:"text-[11px] text-slate-400 mt-1",children:"Used in ?location=<slug>"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"Phone"}),s.jsx(Te,{value:o.phone||"",onChange:c=>r(l,{phone:c.target.value}),placeholder:"+44 20 1234 5678",disabled:n,className:"mt-1 h-9 bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"Email"}),s.jsx(Te,{type:"email",value:o.email||"",onChange:c=>r(l,{email:c.target.value}),placeholder:"[email protected]",disabled:n,className:"mt-1 h-9 bg-white"})]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(Ee,{className:"text-xs",children:"Address"}),s.jsx(Te,{value:o.address||"",onChange:c=>r(l,{address:c.target.value}),placeholder:"123 High Street, London, SW1 1AA",disabled:n,className:"mt-1 h-9 bg-white"})]})]})]},l)),!n&&s.jsxs(be,{type:"button",variant:"outline",size:"sm",onClick:a,className:"gap-1.5",children:[s.jsx(ir,{className:"w-3.5 h-3.5"})," Add Location"]})]})}const Bge=["Physiotherapy","Osteopathy","Sports & Deep Tissue Massage"],qge=["BUPA","AXA","Cigna","Aviva","Vitality","WPA","Other"];function jE({open:e,onOpenChange:t,clinic:n,onSubmit:r,readOnly:i=!1}){const[a,o]=E.useState(!1),[l,c]=E.useState(!1),[u,f]=E.useState({name:"",slug:"",website_url:"",logo_url:"",primary_color:"#006e74",about:"",booking_url:"",internal_booking_url:"",treatments_provided:[],health_insurance_covered:[],locations:[],is_active:!0});E.useEffect(()=>{if(n){let m=Array.isArray(n.locations)?n.locations:[];m.length===0&&(n.phone_number||n.email||n.address)&&(m=[{name:n.name||"Main",slug:n.slug||"main",address:n.address||"",phone:n.phone_number||"",email:n.email||""}
690]),f({name:n.name||"",slug:n.slug||"",website_url:n.website_url||"",logo_url:n.logo_url||"",primary_color:n.primary_color||"#006e74",about:n.about||"",booking_url:n.booking_url||"",internal_booking_url:n.internal_booking_url||"",treatments_provided:n.treatments_provided||[],health_insurance_covered:n.health_insurance_covered||[],locations:m,is_active:n.is_active!==!1})}},[n]);const d=async m=>{var v;const b=(v=m.target.files)==null?void 0:v[0];if(b){c(!0);try{const{file_url:y}=await ve.integrations.Core.UploadFile({file:b});f(x=>({...x,logo_url:y}))}finally{c(!1)}}},p=async m=>{m.preventDefault(),o(!0);try{const b=u.locations&&u.locations[0]||{},v={...u,phone_number:b.phone||"",email:b.email||"",address:b.address||""};await r(v)}finally{o(!1)}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"sm:max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsx(En,{children:s.jsx(kn,{children:"Edit Clinic Details"})}),s.jsxs("form",{onSubmit:p,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Clinic Name *"}),s.jsx(Te,{value:u.name,onChange:m=>f({...u,name:m.target.value}),required:!0,className:"mt-1",disabled:i})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"URL Slug *"}),s.jsx(Te,{value:u.slug,onChange:m=>f({...u,slug:m.target.value}),required:!0,className:"mt-1",disabled:i})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Website URL"}),s.jsx(Te,{type:"url",value:u.website_url,onChange:m=>f({...u,website_url:m.target.value}),placeholder:"https://example.com",className:"mt-1",disabled:i})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Public Booking URL"}),s.jsx(Te,{type:"url",value:u.booking_url,onChange:m=>f({...u,booking_url:m.target.value}),placeholder:"https://example.com/book",className:"mt-1",disabled:i}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Shown to patients in the symptoms checker results."})]}),s.jsxs("div",{className:"md:col-span-2",children:[s.jsx(Ee,{children:"Internal Booking URL"}),s.jsx(Te,{type:"url",value:u.internal_booking_url,onChange:m=>f({...u,internal_booking_url:m.target.value}),placeholder:"https://staff.example.com/book",className:"mt-1",disabled:i}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Used by clinic staff from the lead details page."})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"About the Clinic"}),s.jsx(dn,{value:u.about,onChange:m=>f({...u,about:m.target.value}),placeholder:"Brief description of your clinic...",rows:3,className:"mt-1",disabled:i})]}),s.jsxs("div",{className:"pt-2 border-t",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx(Li,{className:"w-4 h-4 text-[#006e74]"}),s.jsx(Ee,{className:"text-base",children:"Clinic Locations"})]}),s.jsxs("p",{className:"text-xs text-slate-500 mb-3",children:["Add one row per physical location. Each location has its own contact details and slug (used in ",s.jsx("code",{children:"?location=<slug>"})," to pre-select on the symptoms form)."]}),s.jsx(Ez,{locations:u.locations,onChange:m=>f(b=>({...b,locations:m})),disabled:i})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Treatments Provided"}),s.jsx("div",{className:"mt-1",children:s.jsx(XM,{options:Bge,value:u.treatments_provided,onChange:m=>f({...u,treatments_provided:m}),placeholder:"Select treatments..."})})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Health Insurance Covered"}),s.jsx("div",{className:"mt-1",children:s.jsx(XM,{options:qge,value:u.health_insurance_covered,onChange:m=>f({...u,health_insurance_covered:m}),placeholder:"Select insurers..."})})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Clinic Logo"}),u.logo_url&&s.jsx("div",{className:"mt-2 mb-2",children:s.jsx("img",{src:u.logo_url,alt:"Logo preview",className:"h-14 object-contain border rounded-lg p-2 bg-slate-50"})}),!i&&s.jsxs("label",{className:"mt-1 flex items-center gap-2 cursor-pointer border border-dashed rounded-lg px-4 py-2.5 hover:bg-slate-50 transition-colors",children:[l?s.jsx(Qt,{className:"w-4 h-4 animate-spin text-slate-400"}):s.jsx(Bu,{className:"w-4 h-4 text-slate-400"}),s.jsx("span",{className:"text-sm text-slate-500",children:l?"Uploading...":u.logo_url?"Replace logo":"Upload logo"}),s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:d,disabled:l})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Primary Brand Color"}),s.jsxs("div",{className:"flex gap-2 mt-1",children:[s.jsx(Te,{type:"color",value:u.primary_color,onChange:m=>f({...u,primary_color:m.target.value}),className:"w-14 h-9 p-1",disabled:i}),s.jsx(Te,{value:u.primary_color,onChange:m=>f({...u,primary_color:m.target.value}),placeholder:"#006e74",className:"flex-1",disabled:i})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ee,{children:"Active Status"}),s.jsx(kC,{checked:u.is_active,onCheckedChange:m=>f({...u,is_active:m}),disabled:i})]}),s.jsxs("div",{className:"flex gap-3 pt-2 justify-end",children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:a,children:"Cancel"}),!i&&s.jsx(be,{type:"submit",className:"bg-[#006e74] hover:bg-[#005560]",disabled:a||l,children:a?"Saving...":"Save Changes"})]})]})]})})}function Uge(){const e=mr(),[t,n]=E.useState(!0),[r,i]=E.useState([]),[a,o]=E.useState(""),[l,c]=E.useState(!1),[u,f]=E.useState(!1),[d,p]=E.useState(null),[m,b]=E.useState(null),{toast:v}=ui();E.useEffect(()=>{y()},[]);const y=async()=>{n(!0);try{const[w,N]=await Promise.all([ve.auth.me(),ve.entities.Clinic.list()]);if(b(w),i(N||[]),(w==null?void 0:w.role)!=="admin")throw new Error("Unauthorized: Only super admins can manage clinics")}catch(w){console.error("Error loading data:",w)}finally{n(!1)}},x=async w=>{try{await ve.entities.Clinic.create(w),c(!1),y()}catch(N){console.error("Error creating clinic:",N)}},_=async w=>{try{await ve.entities.Clinic.update(d.id,w),v({title:"Success",description:"Clinic updated successfully"}),f(!1),p(null),y()}catch(N){console.error("Error updating clinic:",N),v({title:"Error",description:"Failed to update clinic",variant:"destructive"})}},S=r.filter(w=>{var N,k;return((N=w.name)==null?void 0:N.toLowerCase().includes(a.toLowerCase()))||((k=w.slug)==null?void 0:k.toLowerCase().includes(a.toLowerCase()))});return t?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:s.jsx("div",{className:"animate-pulse",children:"Loading..."})}):s.jsxs("div",{className:"min-h-screen bg-slate-50",children:[s.jsx("div",{className:"border-b bg-white",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-6 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#e6f0f1] text-[#006e74] flex items-center justify-center",children:s.jsx(hs,{className:"w-5 h-5"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Manage Clinics"}),s.jsx("p",{className:"text-slate-600 text-sm",children:"Invite and manage all registered clinics"})]})]}),s.jsxs(be,{onClick:()=>c(!0),className:"bg-[#006e74] hover:bg-[#005560] gap-2",children:[s.jsx(ir,{className:"w-4 h-4"}),"Add New Clinic"]})]})}),s.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[s.jsx("div",{className:"mb-6",children:s.jsx(Te,{placeholder:"Search clinics by name or slug...",value:a,onChange:w=>o(w.target.value),className:"max-w-md"})}),S.length===0?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-slate-500",children:"No clinics foun
690d"})}):s.jsx("div",{className:"grid grid-cols-1 gap-4",children:S.map(w=>s.jsx(yt,{className:"p-5 hover:shadow-md transition-shadow",children:s.jsxs("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[w.logo_url?s.jsx("img",{src:w.logo_url,alt:w.name,className:"w-10 h-10 rounded-lg object-contain border bg-slate-50 flex-none"}):s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#e6f0f1] flex items-center justify-center flex-none",children:s.jsx(hs,{className:"w-5 h-5 text-[#006e74]"})}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("h3",{className:"text-base font-semibold text-slate-900",children:w.name}),s.jsx("span",{className:`inline-block px-2.5 py-0.5 rounded-full text-xs font-medium ${w.is_active?"bg-green-100 text-green-800":"bg-gray-100 text-gray-800"}`,children:w.is_active?"Active":"Inactive"})]}),s.jsxs("p",{className:"text-xs text-slate-500 mt-0.5",children:["/check/",w.slug]}),Array.isArray(w.locations)&&w.locations.length>0&&s.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:w.locations.map((N,k)=>s.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 bg-slate-100 text-slate-700 rounded-full text-[11px]",children:[s.jsx(Li,{className:"w-3 h-3 text-[#006e74]"}),N.name]},k))})]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsxs(be,{variant:"outline",size:"sm",className:"gap-1.5",onClick:N=>{N.stopPropagation(),p(w),f(!0)},children:[s.jsx(Xs,{className:"w-3.5 h-3.5"})," Edit Details"]}),s.jsxs(be,{variant:"outline",size:"sm",className:"gap-1.5",onClick:N=>{N.stopPropagation(),e(`/ClinicTeamAdmin?id=${w.id}`)},children:[s.jsx(qu,{className:"w-3.5 h-3.5"})," Team"]}),s.jsxs(be,{size:"sm",className:"bg-[#006e74] hover:bg-[#005a60] gap-1.5",onClick:N=>{N.stopPropagation(),e(`/ClinicDashboard?id=${w.id}`)},children:[s.jsx(mX,{className:"w-3.5 h-3.5"})," Dashboard"]})]})]})},w.id))})]}),s.jsx(Ige,{open:l,onOpenChange:c,onSubmit:x}),d&&s.jsx(jE,{open:u,onOpenChange:f,clinic:d,onSubmit:_})]})}var px="Checkbox",[zge]=di(px),[Hge,OC]=zge(px);function Wge(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:l,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:d}=e,[p,m]=Wr({prop:n,defaultProp:i??!1,onChange:c,caller:px}),[b,v]=E.useState(null),[y,x]=E.useState(null),_=E.useRef(!1),S=b?!!o||!!b.closest("form"):!0,w={checked:p,disabled:a,setChecked:m,control:b,setControl:v,name:l,form:o,value:f,hasConsumerStoppedPropagationRef:_,required:u,defaultChecked:us(i)?!1:i,isFormControl:S,bubbleInput:y,setBubbleInput:x};return s.jsx(Hge,{scope:t,...w,children:Vge(d)?d(w):r})}var kz="CheckboxTrigger",Oz=E.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:o,disabled:l,checked:c,required:u,setControl:f,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:m,bubbleInput:b}=OC(kz,e),v=At(i,f),y=E.useRef(c);return E.useEffect(()=>{const x=a==null?void 0:a.form;if(x){const _=()=>d(y.current);return x.addEventListener("reset",_),()=>x.removeEventListener("reset",_)}},[a,d]),s.jsx(ut.button,{type:"button",role:"checkbox","aria-checked":us(c)?"mixed":c,"aria-required":u,"data-state":Rz(c),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:v,onKeyDown:Ge(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:Ge(n,x=>{d(_=>us(_)?!0:!_),b&&m&&(p.current=x.isPropagationStopped(),p.current||x.stopPropagation())})})});Oz.displayName=kz;var CC=E.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:l,value:c,onCheckedChange:u,form:f,...d}=e;return s.jsx(Wge,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:l,required:o,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>s.jsxs(s.Fragment,{children:[s.jsx(Oz,{...d,ref:t,__scopeCheckbox:n}),p&&s.jsx(Tz,{__scopeCheckbox:n})]})})});CC.displayName=px;var Cz="CheckboxIndicator",Az=E.forwardRef((e,t)=>
690{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=OC(Cz,n);return s.jsx(Bi,{present:r||us(a.checked)||a.checked===!0,children:s.jsx(ut.span,{"data-state":Rz(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});Az.displayName=Cz;var Pz="CheckboxBubbleInput",Tz=E.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:l,disabled:c,name:u,value:f,form:d,bubbleInput:p,setBubbleInput:m}=OC(Pz,e),b=At(n,m),v=NC(a),y=xC(r);E.useEffect(()=>{const _=p;if(!_)return;const S=window.HTMLInputElement.prototype,N=Object.getOwnPropertyDescriptor(S,"checked").set,k=!i.current;if(v!==a&&N){const C=new Event("click",{bubbles:k});_.indeterminate=us(a),N.call(_,us(a)?!1:a),_.dispatchEvent(C)}},[p,v,a,i]);const x=E.useRef(us(a)?!1:a);return s.jsx(ut.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??x.current,required:l,disabled:c,name:u,value:f,form:d,...t,tabIndex:-1,ref:b,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Tz.displayName=Pz;function Vge(e){return typeof e=="function"}function us(e){return e==="indeterminate"}function Rz(e){return us(e)?"indeterminate":e?"checked":"unchecked"}const Xg=E.forwardRef(({className:e,...t},n)=>s.jsx(CC,{ref:n,className:et("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(Az,{className:et("flex items-center justify-center text-current"),children:s.jsx(Hr,{className:"h-4 w-4"})})}));Xg.displayName=CC.displayName;const Tc={forehead:"Head / Face / Jaw",jaw:"Head / Face / Jaw",back_head:"Head / Face / Jaw",central_neck_front:"Neck (Cervical)",left_neck_front:"Neck (Cervical)",right_neck_front:"Neck (Cervical)",central_upper_neck:"Neck (Cervical)",left_back_neck:"Neck (Cervical)",right_back_neck:"Neck (Cervical)",right_front_shoulder:"Shoulder / Upper Back (Scapular Mechanics)",left_front_shoulder:"Shoulder / Upper Back (Scapular Mechanics)",back_left_shoulder:"Shoulder / Upper Back (Scapular Mechanics)",back_right_shoulder:"Shoulder / Upper Back (Scapular Mechanics)",left_shoulder_blade:"Shoulder / Upper Back (Scapular Mechanics)",right_shoulder_blade:"Shoulder / Upper Back (Scapular Mechanics)",upper_back_central:"Shoulder / Upper Back (Scapular Mechanics)",central_mid_back:"Shoulder / Upper Back (Scapular Mechanics)",front_left_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",front_right_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",back_left_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",back_right_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",left_front_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",right_front_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",left_back_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",right_back_upper_arm:"Shoulder / Upper Back (Scapular Mechanics)",left_elbow:"Elbow / Forearm",right_elbow:"Elbow / Forearm",left_front_forearm:"Elbow / Forearm",right_front_forearm:"Elbow / Forearm",left_back_forearm:"Elbow / Forearm",right_back_forearm:"Elbow / Forearm",left_front_wrist:"Wrist / Hand",right_front_wrist:"Wrist / Hand",left_back_wrist:"Wrist / Hand",right_back_wrist:"Wrist / Hand",left_palm:"Wrist / Hand",right_palm:"Wrist / Hand",left_back_hand:"Wrist / Hand",right_back_hand:"Wrist / Hand",left_chest:"Thorax / Chest / Ribs",central_chest:"Thorax / Chest / Ribs",right_chest:"Thorax / Chest / Ribs",left_ribcage:"Thorax / Chest / Ribs",right_ribcage:"Thorax / Chest / Ribs",left_oblique:"Thorax / Chest / Ribs",right_oblique:"Thorax / Chest / Ribs",upper_abdomen:"Abdomen / Core",lower_abdomen:"Abdomen / Core",pelvic_area:"Abdomen / Core",left_lower_back:"Lumbar / Lower Back",right_lower_back:"Lumbar / Lower Back",central_lower_back:"Lumbar / Lower Back",left_mid_back:"Lumbar / Lower Back",right_mid_back:"Lumbar / Lower Back",left_hip:"Hip / Groin / Glute",right_hip:"Hip / Groin / Glute",left_groin:"Hip / Groin / Glute",right_groin:"Hip / Groin / Glute",left_glute:"Hip / Groin / Glute",right_glute:"Hip / Groin / Glute",left_thigh:"Knee / Thigh",right_thigh:"Knee / Thigh",left_front_knee:"Knee / Thigh",right_front_knee:"Knee / Thigh",back_left_knee:"Knee / Thigh",back_right_knee:"Knee / Thigh",left_hamstring:"Knee / Thigh",right_hamstring:"Knee / Thigh",left_shin:"Ankle / Foot",right_shin:"Ankle / Foot",left_calf:"Ankle / Foot",right_calf:"Ankle / Foot",left_foot_ankle:"Ankle / Foot",right_foot_ankle:"Ankle / Foot",left_heel:"Ankle / Foot",right_heel:"Ankle / Foot"},Ac=e=>({forehead:"Forehead",jaw:"Jaw",back_head:"Back of Head",central_neck_front:"Central Neck (Front)",left_neck_front:"Left Neck (Front)",right_neck_front:"Right Neck (Front)",central_upper_neck:"Central Upper Neck",left_back_neck:"Left Back Neck",right_back_neck:"Right Back Neck",right_front_shoulder:"Right Front Shoulder",left_front_shoulder:"Left Front Shoulder",back_left_shoulder:"Back Left Shoulder",back_right_shoulder:"Back Right Shoulder",left_shoulder_blade:"Left Shoulder Blade",right_shoulder_blade:"Right Shoulder Blade",upper_back_central:"Upper Back Central",central_mid_back:"Central Mid Back",front_left_upper_arm:"Front Left Upper Arm",front_right_upper_arm:"Front Right Upper Arm",back_left_upper_arm:"Back Left Upper Arm",back_right_upper_arm:"Back Right Upper Arm",left_front_upper_arm:"Left Front Upper Arm",right_front_upper_arm:"Right Front Upper Arm",left_back_upper_arm:"Left Back Upper Arm",right_back_upper_arm:"Right Back Upper Arm",left_elbow:"Left Elbow",right_elbow:"Right Elbow",left_front_forearm:"Left Front Forearm",right_front_forearm:"Right Front Forearm",left_back_forearm:"Left Back Forearm",right_back_forearm:"Right Back Forearm",left_front_wrist:"Left Front Wrist",right_front_wrist:"Right Front Wrist",left_back_wrist:"Left Back Wrist",right_back_wrist:"Right Back Wrist",left_palm:"Left Palm",right_palm:"Right Palm",left_back_hand:"Left Back Hand",right_back_hand:"Right Back Hand",left_chest:"Left Chest",central_chest:"Central Chest",right_chest:"Right Chest",left_ribcage:"Left Ribcage",right_ribcage:"Right Ribcage",left_oblique:"Left Oblique",right_oblique:"Right Oblique",upper_abdomen:"Upper Abdomen",lower_abdomen:"Lower Abdomen",pelvic_area:"Pelvic Area",left_lower_back:"Left Lower Back",right_lower_back:"Right Lower Back",central_lower_back:"Central Lower Back",left_mid_back:"Left Mid Back",right_mid_back:"Right Mid Back",left_hip:"Left Hip",right_hip:"Right Hip",left_groin:"Left Groin",right_groin:"Right Groin",left_glute:"Left Glute",right_glute:"Right Glute",left_thigh:"Left Thigh",right_thigh:"Right Thigh",left_front_knee:"Left Front Knee",right_front_knee:"Right Front Knee",back_left_knee:"Back Left Knee",back_right_knee:"Back Right Knee",left_hamstring:"Left Hamstring",right_hamstring:"Right Hamstring",left_shin:"Left Shin",right_shin:"Right Shin",left_calf:"Left Calf",right_calf:"Right Calf",left_foot_ankle:"Left Foot & Ankle",right_foot_ankle:"Right Foot & Ankle",left_heel:"Left Heel",right_heel:"Right Heel"})[e]||e.split("_").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ");function Gge({svgFileUrl:e,onRegionClick:t,selectedRegions:n=[],readOnly:r=!1,showSidebar:i=!0,className:a=""}){const[o,l]=E.useState(null),[c,u]=E.useState(null),[f,d]=E.useState({x:0,y:0}),[p,m]=E.useState([]),[b,v]=E.useState({}),[y,x]=E.useState(""),_=E.useRef(null),S=Object.keys(Tc),w=T=>Tc[T]||null;ne.useImperativeHandle(null,()=>({getMajorRegion:w}));const N=T=>{const R=new DOMParser().parseFromString(T,"image/svg+xml"),I=R.querySelector("svg");return I?(I.removeAttribute("width"),I.removeAttribute("height"),I.setAttribute("width","100%"),I.setAttribute("height","100%"),I.setAttribute("preserveAspectRatio","xMidYMid meet"),new XMLSerializer().serializeToString(R)):(console.error("No SVG element found in content"),T)},k=T=>{const I=new DOMParser().parseFromString(T,"image/svg+xml").querySelectorAll("[id]"),M=Array.from(I).map(G=>G.getAttribute("id")).filter(G=>G&&G.trim()!==""),B={};M.forEach(G=>{const H=G.toLowerCase();
690S.forEach(K=>{H===K?(B[K]||(B[K]=[]),B[K].push(G)):(H.startsWith(K+"_")||H.startsWith(K)&&/\d/.test(H.charAt(K.length)))&&(B[K]||(B[K]=[]),B[K].push(G))})});const W=Object.keys(B);m(W),v(B)},C=T=>{if(!r&&t){const A=w(T);t(T,A)}},P=T=>{const A=Ac(T);return n.includes(A)};E.useEffect(()=>{if(e){const T=e.includes("?")?`${e}&t=${Date.now()}`:`${e}?t=${Date.now()}`;fetch(T).then(A=>A.text()).then(A=>{const R=N(A);l(R),k(R)}).catch(A=>console.error("Error loading SVG from URL:",A))}},[e]),E.useEffect(()=>{if(!_.current)return;const T=_.current.querySelector("svg");if(T)return p.forEach(A=>{(b[A]||[]).forEach(M=>{const B=T.querySelector(`#${CSS.escape(M)}`);if(B&&(B.style.transition="opacity 0.2s ease",B.style.pointerEvents="auto",!r)){B.style.cursor="pointer",B.style.touchAction="manipulation",B.style.webkitTapHighlightColor="transparent",B.addEventListener("mouseenter",H=>{u(A),d({x:H.clientX,y:H.clientY})}),B.addEventListener("mousemove",H=>{d({x:H.clientX,y:H.clientY})}),B.addEventListener("mouseleave",()=>{u(null)});let W=0;const G=H=>{H&&H.stopPropagation();const K=Date.now();K-W<400||(W=K,C(A))};B.addEventListener("click",G),B.addEventListener("touchend",H=>{H.preventDefault(),G(H)},{passive:!1})}});const I=T.querySelector(`#${CSS.escape(A+"_dot")}`);I&&(I.style.display="block",I.style.opacity="1",I.style.pointerEvents="none")}),()=>{p.forEach(A=>{(b[A]||[]).forEach(I=>{const M=T.querySelector(`#${CSS.escape(I)}`);M&&M.replaceWith(M.cloneNode(!0))})})}},[o,p,b,r]),E.useEffect(()=>{if(!_.current)return;const T=_.current.querySelector("svg");T&&p.forEach(A=>{const R=b[A]||[],I=T.querySelector(`#${CSS.escape(A+"_dot")}`),M=c===A,B=P(Ac(A));R.forEach(W=>{const G=T.querySelector(`#${CSS.escape(W)}`);G&&(G.style.opacity=M||B?"1":"0")}),I&&(M||B?(I.style.display="none",I.style.opacity="0"):(I.style.display="block",I.style.opacity="1"))})},[c,n,p,b]);const L=p.filter(T=>T.toLowerCase().includes(y.toLowerCase())||Ac(T).toLowerCase().includes(y.toLowerCase()));return e?o?s.jsxs("div",{className:`grid grid-cols-1 ${i?"lg:grid-cols-4":""} gap-6 ${a}`,children:[i&&s.jsx("div",{className:"lg:col-span-1",children:s.jsx("div",{className:"sticky top-4",children:s.jsxs("div",{className:"border rounded-lg p-4 bg-white",children:[s.jsxs("h3",{className:"font-semibold text-slate-900 mb-2 flex items-center gap-2",children:[s.jsx(Li,{className:"w-4 h-4"}),"Body Regions (",p.length,")"]}),s.jsx("div",{className:"mb-3",children:s.jsx("input",{type:"text",placeholder:"Search regions...",className:"w-full border rounded-md px-3 py-2 text-sm",value:y,onChange:T=>x(T.target.value)})}),s.jsx("div",{className:"space-y-2 max-h-[600px] overflow-y-auto",children:L.length===0?s.jsx("p",{className:"text-sm text-slate-500",children:y?"No matching regions found":"No regions detected"}):L.map(T=>{const A=w(T);return s.jsxs("div",{className:`p-2 rounded-lg text-sm cursor-pointer transition-colors ${P(T)?"bg-blue-100 border border-blue-300":c===T?"bg-slate-100":"hover:bg-slate-50"}`,onClick:()=>!r&&C(T),children:[s.jsx("div",{className:"font-medium truncate",children:Ac(T)}),A&&s.jsx("div",{className:"text-xs text-slate-500 truncate",children:A})]},T)})})]})})}),s.jsx("div",{className:i?"lg:col-span-3":"col-span-1",children:s.jsx("div",{className:"border rounded-lg p-4 bg-white",children:s.jsxs("div",{className:"relative overflow-auto",style:{height:"70vh",maxHeight:"70vh"},children:[s.jsx("div",{ref:_,dangerouslySetInnerHTML:{__html:o},style:{width:"100%",height:"100%"}}),c&&s.jsxs("div",{className:"fixed bg-slate-900 text-white px-4 py-2 rounded-lg shadow-lg z-50 pointer-events-none",style:{left:`${f.x+15}px`,top:`${f.y-40}px`,transform:"translate(0, 0)"},children:[s.jsx("p",{className:"text-sm font-medium whitespace-nowrap",children:Ac(c)}),w(c)&&s.jsx("p",{className:"text-xs text-slate-300",children:w(c)})]})]})})})]}):s.jsx("div",{className:"p-8 text-center",children:s.jsxs("div",{className:"animate-pulse flex flex-col items-center gap-3",children:[s.jsx("div",{className:"w-12 h-12 bg-gray-200 rounded-full"}),s.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded"})]})}):s.jsxs("div",{className:"p-8 text-center text-slate-500",children:[s.jsx(Li,{className:"w-12 h-12 mx-auto mb-4 text-slate-300"}),s.jsx("p",{children:"No body chart configured. Please contact your administrator."})]})}function Kge({open:e,onClose:t,entityFields:n,onImport:r}){const[i,a]=E.useState(null),[o,l]=E.useState([]),[c,u]=E.useState({}),[f,d]=E.useState("id"),[p,m]=E.useState(1),[b,v]=E.useState(!1),y=w=>{var C;const N=(C=w.target.files)==null?void 0:C[0];if(!N)return;const k=new FileReader;k.onload=P=>{const A=P.target.result.split(` 691`)[0].split(",").map(I=>I.trim().replace(/"/g,""));l(A),a(N);const R={};A.forEach(I=>{const M=I.toLowerCase().replace(/\s+/g,"_"),B=n.find(W=>W.toLowerCase()===M||W.toLowerCase().includes(M)||M.includes(W.toLowerCase()));R[I]=B||"__do_not_import__"}),u(R),m(2)},k.readAsText(N)},x=(w,N)=>{u(k=>({...k,[w]:N}))},_=async()=>{v(!0);try{await r({file:i,fieldMappings:c,upsertBy:f,csvHeaders:o}),S()}catch(w){console.error("Import error:",w)}finally{v(!1)}},S=()=>{a(null),l([]),u({}),m(1),v(!1),t()};return s.jsx(vn,{open:e,onOpenChange:S,children:s.jsxs(pn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[s.jsx(En,{children:s.jsxs(kn,{children:["Import CSV - ",p===1?"Upload File":"Map Fields"]})}),p===1&&s.jsx("div",{className:"space-y-4",children:s.jsxs("div",{children:[s.jsx(Ee,{children:"Upload CSV File"}),s.jsx(Te,{type:"file",accept:".csv",onChange:y,className:"mt-2"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Select a CSV file to import. First row should contain column headers."})]})}),p===2&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[s.jsx(Ee,{className:"mb-2 block font-semibold",children:"Upsert By"}),s.jsxs(Et,{value:f,onValueChange:d,children:[s.jsx(St,{children:s.jsx(kt,{})}),s.jsxs(jt,{children:[s.jsx(He,{value:"id",children:"ID (create if not exists, update if exists)"}),n.map(w=>s.jsxs(He,{value:w,children:[w," (create if not exists, update if exists)"]},w))]})]}),s.jsx("p",{className:"text-xs text-slate-600 mt-1",children:"Choose which field to use for matching existing records. If a match is found, the record will be updated; otherwise, a new record will be created."})]}),s.jsxs("div",{className:"border rounded-lg",children:[s.jsxs("div",{className:"bg-slate-50 px-4 py-2 border-b font-semibold text-sm flex",children:[s.jsx("div",{className:"w-1/2",children:"CSV Column"}),s.jsx("div",{className:"w-1/2",children:"Maps To"})]}),s.jsx("div",{className:"divide-y max-h-96 overflow-y-auto",children:o.map((w,N)=>s.jsxs("div",{className:"px-4 py-3 flex items-center gap-4",children:[s.jsx("div",{className:"w-1/2 font-medium text-sm",children:w}),s.jsx("div",{className:"w-1/2",children:s.jsxs(Et,{value:c[w]||"__do_not_import__",onValueChange:k=>x(w,k),children:[s.jsx(St,{className:"h-9",children:s.jsx(kt,{})}),s.jsxs(jt,{children:[s.jsx(He,{value:"__do_not_import__",children:s.jsx("span",{className:"text-slate-500 italic",children:"Do not import"})}),n.map(k=>s.jsx(He,{value:k,children:k},k))]})]})})]},N))})]}),s.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 flex items-start gap-2",children:[s.jsx(vB,{className:"w-4 h-4 text-green-600 mt-0.5"}),s.jsxs("div",{className:"text-sm text-green-900",children:[s.jsx("strong",{children:o.filter(w=>c[w]&&c[w]!=="__do_not_import__").length})," columns will be imported, ",s.jsx("strong",{children:o.filter(w=>!c[w]||c[w]==="__do_not_import__").length})," will be skipped"]})]})]}),s.jsxs(Ku,{className:"flex justify-between",children:[p===2&&s.jsx(be,{variant:"outline",onClick:()=>m(1),children:"Back"}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(be,{variant:"outline",onClick:S,children:"Cancel"}),p===2&&s.jsx(be,{onClick:_,disabled:b,children:b?"Importing...":"Import Data"})]})]})]})})}const Yge=[{value:"text_input",label:"Text Input"},{value:"textarea",label:"Text Area"},{value:"dropdown",label:"Dropdown"},{value:"radio",label:"Radio Buttons"},{value:"yes_no",label:"Yes / No"},{value:"multi_select",label:"Multi-Select"},{value:"number_input",label:"Number"},{value:"range_scale",label:"Range Scale"},{value:"date_picker",label:"Date Picker"},{value:"single_checkbox",label:"Single Checkbox"},{value:"static_text",label:"Static Text"},{value:"field_group_container",label:"Field Group"},{value:"problem_area",label:"Problem Area (Body Chart)"},{value:"major_regions",label:"Major Regions"},{value:"heading",label:"Section Heading"},{value:"health_insurer",label:"Health Insurer"},{value:"payment_method_confirmation",label:"Payment Method"},{value:"digital_signature",label:"Digital Signature"}],Qge=["100","50","33"],Xge=[{value:"__no_mapping__",label:"No mapping"},{value:"first_name",label:"First Name"},{value:"last_name",label:"Last Name"},{value:"date_of_birth",label:"Date of Birth"},{value:"phone",label:"Phone"},{value:"email",label:"Email"},{value:"occupation",label:"Occupation"},{value:"emergency_contact_name",label:"Emergency Contact Name"},{value:"emergency_contact_phone",label:"Emergency Contact Phone"},{value:"medical_history",label:"Medical History"},{value:"current_medications",label:"Current Medications"},{value:"allergies",label:"Allergies"},{value:"referral_source",label:"Referral Source"},{value:"gp_name",label:"GP Name"},{value:"gp_practice_name",label:"GP Practice Name"},{value:"gp_phone",label:"GP Phone"},{value:"gp_email",label:"GP Email"},{value:"gp_address",label:"GP Address"}];function Zw({title:e,badge:t,icon:n,defaultOpen:r=!1,children:i}){const[a,o]=E.useState(r);return s.jsxs("div",{className:"border rounded-lg",children:[s.jsxs("button",{type:"button",onClick:()=>o(!a),className:"w-full flex items-center justify-between px-4 py-3 bg-slate-50 hover:bg-slate-100 transition-colors",children:[s.jsxs("div",{className:"flex items-center gap-2 font-semibold text-sm",children:[n&&s.jsx(n,{className:"w-4 h-4 text-indigo-600"}),s.jsx("span",{children:e}),t&&s.jsx(Rt,{variant:"outline",className:"text-xs font-normal",children:t})]}),a?s.jsx(Py,{className:"w-4 h-4 text-slate-500"}):s.jsx(Or,{className:"w-4 h-4 text-slate-500"})]}),a&&s.jsx("div",{className:"p-4 space-y-4 overflow-visible",children:i})]})}function Zge({question:e,onSave:t,onClose:n,allQuestions:r}){var P,L;const[i,a]=E.useState({});if(E.useEffect(()=>{e&&a({...e})},[e]),!e)return null;const o=!i.id,l=["dropdown","radio","multi_select"].includes(i.response_type),c=i.response_type==="range_scale",u=i.response_type==="number_input",f=T=>T.toLowerCase().replace(/[^a-z0-9\s]/g,"").replace(/\s+/g,"_").substring(0,40),d=T=>{const A={question_text:T};o&&(!i.question_id||i.question_id===f(i.question_text||""))&&(A.question_id=f(T)),a(R=>({...R,...A}))},p=()=>{a(T=>({...T,options:[...T.options||[],""]}))},m=(T,A)=>{const R=[...i.options||[]];R[T]=A,a(I=>({...I,options:R}))},b=T=>{const A=[...i.options||[]];A.splice(T,1);const R={...i.option_multipliers||{}},I=(i.options||[])[T];I&&R[I]&&delete R[I],a(M=>({...M,options:A,option_multipliers:R}))},v=(T,A)=>{const R={...i.option_multipliers||{}};R[T]=A===""?void 0:Number(A),a(I=>({...I,option_multipliers:R}))},y=(T,A,R)=>{const I={...i[T]||{}};R===""?delete I[A]:I[A]=R,a(M=>({...M,[T]:I}))},x=(T,A)=>{const R=[...i.options||[]],I=T+A;I<0||I>=R.length||([R[T],R[I]]=[R[I],R[T]],a(M=>({...M,options:R})))},_=()=>{const T={...i};T.profile_mapping==="__no_mapping__"&&(T.profile_mapping=null),t(T)},S=((P=i.conditional_logic)==null?void 0:P.conditions)||[],w=()=>
691{const T=i.conditional_logic||{action:"show",logic_operator:"AND",conditions:[]};T.conditions=[...T.conditions||[],{source_question_id:"",operator:"equals",value:""}],a(A=>({...A,conditional_logic:{...T}}))},N=(T,A,R)=>{const I={...i.conditional_logic};I.conditions=[...I.conditions],I.conditions[T]={...I.conditions[T],[A]:R},a(M=>({...M,conditional_logic:I}))},k=T=>{const A={...i.conditional_logic};A.conditions=A.conditions.filter((R,I)=>I!==T),A.conditions.length===0?a(R=>({...R,conditional_logic:null})):a(R=>({...R,conditional_logic:A}))},C=(r||[]).filter(T=>T.question_id!==i.question_id).map(T=>({value:T.question_id,label:T.question_text||T.question_id}));return s.jsx(vn,{open:!!e,onOpenChange:T=>{T||n()},children:s.jsxs(pn,{className:"max-w-3xl max-h-[90vh] overflow-y-auto p-0",children:[s.jsx(En,{className:"px-6 pt-6 pb-0",children:s.jsx(kn,{children:o?"Add Question":"Edit Question"})}),s.jsxs("div",{className:"px-6 py-4 space-y-5",children:[s.jsxs("div",{children:[s.jsx(Ee,{className:"font-semibold",children:"Question Text"}),s.jsx(Te,{value:i.question_text||"",onChange:T=>d(T.target.value),placeholder:"Enter question text",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"font-semibold",children:"Help Text"}),s.jsx(Te,{value:i.help_text||"",onChange:T=>a(A=>({...A,help_text:T.target.value})),className:"mt-1",placeholder:"Optional helper text for patients..."})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"font-semibold",children:"Profile Field Mapping"}),s.jsxs(Et,{value:i.profile_mapping||"__no_mapping__",onValueChange:T=>a(A=>({...A,profile_mapping:T})),children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{})}),s.jsx(jt,{children:Xge.map(T=>s.jsx(He,{value:T.value,children:T.label},T.value))})]}),s.jsx("p",{className:"text-xs text-[#006e74] mt-1",children:"This will auto-populate from patient data and save back to their profile."})]}),l&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(Ee,{className:"font-semibold",children:"Options"}),s.jsxs(be,{variant:"outline",size:"sm",onClick:p,children:[s.jsx(ir,{className:"w-3 h-3 mr-1"})," Add Option"]})]}),s.jsxs("div",{className:"space-y-2",children:[(i.options||[]).map((T,A)=>{var R,I,M,B;return s.jsxs("div",{className:"border rounded-md p-2 space-y-2 bg-white",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("button",{type:"button",onClick:()=>x(A,-1),disabled:A===0,className:"text-slate-400 hover:text-slate-600 disabled:opacity-30",children:s.jsx(Py,{className:"w-3 h-3"})}),s.jsx("button",{type:"button",onClick:()=>x(A,1),disabled:A===(i.options||[]).length-1,className:"text-slate-400 hover:text-slate-600 disabled:opacity-30",children:s.jsx(Or,{className:"w-3 h-3"})})]}),s.jsx(Te,{value:T,onChange:W=>m(A,W.target.value),placeholder:`Option ${A+1}`,className:"flex-1"}),s.jsx(Te,{type:"number",step:"0.1",value:((R=i.option_multipliers)==null?void 0:R[T])??"1",onChange:W=>v(T,W.target.value),className:"w-20",placeholder:"Wt"}),s.jsx(be,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>b(A),children:s.jsx(Na,{className:"w-4 h-4 text-red-500"})})]}),s.jsxs("div",{className:"grid grid-cols-3 gap-2 pl-8",children:[s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs text-slate-500",children:"Urgency"}),s.jsx(Te,{value:((I=i.option_urgency)==null?void 0:I[T])||"",onChange:W=>y("option_urgency",T,W.target.value),placeholder:"e.g., urgent_same_day",className:"mt-0.5 h-8 text-sm"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs text-slate-500",children:"Domain"}),s.jsx(Te,{value:((M=i.option_domains)==null?void 0:M[T])||"",onChange:W=>y("option_domains",T,W.target.value),placeholder:"e.g., RedFlag",className:"mt-0.5 h-8 text-sm"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs text-slate-500",children:"Tag"}),s.jsx(Te,{value:((B=i.option_tags)==null?void 0:B[T])||"",onChange:W=>y("option_tags",T,W.target.value),placeholder:"e.g., rf_weight_change",className:"mt-0.5 h-8 text-sm"})]})]})]},A)}),(i.options||[]).length===0&&s.jsx("p",{className:"text-sm text-slate-500 italic",children:'No options yet. Click "Add Option" to add choices.'})]})]}),(c||u)&&s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Min"}),s.jsx(Te,{type:"number",value:i.min_value??"",onChange:T=>a(A=>({...A,min_value:T.target.value?Number(T.target.value):null})),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Max"}),s.jsx(Te,{type:"number",value:i.max_value??"",onChange:T=>a(A=>({...A,max_value:T.target.value?Number(T.target.value):null})),className:"mt-1"})]}),c&&s.jsxs("div",{children:[s.jsx(Ee,{children:"Step"}),s.jsx(Te,{type:"number",value:i.step_value??"",onChange:T=>a(A=>({...A,step_value:T.target.value?Number(T.target.value):null})),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Unit"}),s.jsx(Te,{value:i.unit||"",onChange:T=>a(A=>({...A,unit:T.target.value})),className:"mt-1",placeholder:"e.g., minutes"})]})]}),s.jsxs(Zw,{title:"Diagnostic & Region Settings",badge:"Optional",children:[s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Region"}),s.jsx(Te,{value:i.region||"",onChange:T=>a(A=>
691({...A,region:T.target.value})),className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Diagnostic Tag"}),s.jsx(Te,{value:i.diagnostic_tag||"",onChange:T=>a(A=>({...A,diagnostic_tag:T.target.value})),className:"mt-1",placeholder:"e.g., mechanism_general"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Diagnostic Domain"}),s.jsx(Te,{value:i.diagnostic_domain||"",onChange:T=>a(A=>({...A,diagnostic_domain:T.target.value})),className:"mt-1",placeholder:"e.g., Traumatic"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Weight"}),s.jsx(Te,{type:"number",value:i.weight??"0",onChange:T=>a(A=>({...A,weight:T.target.value?Number(T.target.value):null})),className:"mt-1"})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Notes (Internal)"}),s.jsx(dn,{value:i.notes||"",onChange:T=>a(A=>({...A,notes:T.target.value})),className:"mt-1",rows:2,placeholder:"Internal notes for practitioners..."})]})]}),s.jsxs(Zw,{title:"Conditional Logic",badge:"Optional",icon:xB,children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Action"}),s.jsxs(Et,{value:((L=i.conditional_logic)==null?void 0:L.action)||"show",onValueChange:T=>a(A=>({...A,conditional_logic:{...A.conditional_logic||{logic_operator:"AND",conditions:[]},action:T}})),children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{placeholder:"Show this question if..."})}),s.jsxs(jt,{children:[s.jsx(He,{value:"show",children:"Show this question if..."}),s.jsx(He,{value:"hide",children:"Hide this question if..."})]})]})]}),S.map((T,A)=>s.jsxs("div",{className:"grid grid-cols-[1fr_auto_1fr_auto] gap-2 items-end bg-slate-50 p-3 rounded",children:[s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"Source Field"}),s.jsxs(Et,{value:T.source_question_id||"",onValueChange:R=>N(A,"source_question_id",R),children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{placeholder:"Select a field..."})}),s.jsx(jt,{children:C.map(R=>s.jsx(He,{value:R.value,children:R.label},R.value))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"Operator"}),s.jsxs(Et,{value:T.operator,onValueChange:R=>N(A,"operator",R),children:[s.jsx(St,{className:"mt-1 w-28",children:s.jsx(kt,{})}),s.jsx(jt,{children:["equals","not_equals","contains","not_contains","is_empty","is_not_empty"].map(R=>s.jsx(He,{value:R,children:R.charAt(0).toUpperCase()+R.slice(1).replace(/_/g," ")},R))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"text-xs",children:"Value"}),s.jsx(Te,{value:T.value||"",onChange:R=>N(A,"value",R.target.value),placeholder:"Enter value",className:"mt-1"})]}),s.jsx(be,{variant:"ghost",size:"icon",className:"h-9 w-9 mt-5",onClick:()=>k(A),children:s.jsx(Cr,{className:"w-4 h-4 text-red-500"})})]},A)),s.jsxs(be,{variant:"outline",size:"sm",onClick:w,children:[s.jsx(ir,{className:"w-3 h-3 mr-1"})," Add Condition"]})]}),s.jsx(Zw,{title:"Field Settings",badge:"Advanced",icon:ou,children:s.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Response Type"}),s.jsxs(Et,{value:i.response_type||"",onValueChange:T=>a(A=>({...A,response_type:T})),children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{})}),s.jsx(jt,{children:Yge.map(T=>s.jsx(He,{value:T.value,children:T.label},T.value))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Question ID"}),s.jsx(Te,{value:i.question_id||"",onChange:T=>a(A=>({...A,question_id:T.target.value})),className:"mt-1"}),o&&s.jsx("p",{className:"text-xs text-[#006e74] mt-0.5",children:"Auto-generated from question text"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Display Width"}),s.jsxs(Et,{value:i.display_width||"100",onValueChange:T=>a(A=>({...A,display_width:T})),children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{})}),s.jsx(jt,{children:Qge.map(T=>s.jsxs(He,{value:T,children:[T,"%"]},T))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Order"}),s.jsx(Te,{type:"number",value:i.order??"",onChange:T=>a(A=>({...A,order:T.target.value?Number(T.target.value):0})),className:"mt-1"})]})]})}),s.jsxs("div",{className:"flex flex-wrap gap-6 pt-1",children:[s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Xg,{checked:!!i.is_required,onCheckedChange:T=>a(A=>({...A,is_required:T}))}),"Required"]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Xg,{checked:!!i.is_hidden,onCheckedChange:T=>a(A=>({...A,is_hidden:T}))}),"Hidden"]}),s.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[s.jsx(Xg,{checked:i.is_active!==!1,onCheckedChange:T=>a(A=>({...A,is_active:T}))}),"Active"]})]})]}),s.jsxs(Ku,{className:"px-6 py-4 border-t",children:[s.jsx(be,{variant:"outline",onClick:n,children:"Cancel"}),s.jsxs(be,{onClick:_,className:"bg-slate-900 hover:bg-slate-800 text-white",children:[s.jsx(tv,{className:"w-4 h-4 mr-1"}),"Save Question"]})]})]})})}const Jge=[{key:"first_name",label:"First Name",type:"text_input",required:!0},{key:"last_name",label:"Last Name",type:"text_input",required:!0},{key:"date_of_birth",label:"Date of Birth",type:"date_picker",required:!0},{key:"phone",label:"Phone Number",type:"text_input",required:!0},{key:"address",label:"Address",type:"textarea",required:!1},{key:"emergency_contact_name",label:"Emergency Contact Name",type:"text_input",required:!1},{key:"emergency_contact_phone",label:"Emergency Contact Phone",type:"text_input",required:!1},{key:"emergency_contact_relationship",label:"Emergency Contact Relationship",type:"text_input",required:!1},{key:"occupation",label:"Occupation",type:"text_input",required:!1},{key:"medical_history",label:"Medical History",type:"textarea",required:!1},{key:"current_medications",label:"Current Medications",type:"textarea",required:!1},{key:"allergies",label:"Allergies",type:"textarea",required:!1},{key:"referral_source",label:"How did you hear about us?",type:"text_input",required:!1}];function eve(){const[e,t]=E.useState([]),[n,r]=E.useState(null),[i,a]=E.useState(!0),[o,l]=E.useState("profile"),[c,u]=E.useState(null),[f,d]=E.useState(!1),[p,m]=E.useState([]),{toast:b}=ui(),[v,y]=E.useState(!1),[x,_]=E.useState(null),[S,w]=E.useState(null),[N,k]=E.useState(null),[C,P]=E.useState(!1),[L,T]=E.useState(!1);E.useEffect(()=>{A()},[]);const A=async()=>{a(!0);try{const[Y,J]=await Promise.all([ve.entities.IntakeFormQuestion.list("-order"),ve.entities.IntakeFormSettings.list()]);t(Y||[]),r(J&&J[0]?J[0]:{name:"Lead Intake Form",profile_step_description:"",problem_step_description:"",medical_step_description:"",overall_instructions:"",ai_followup_overall_purpose:"",ai_followup_duplication_rules:"",ai_followup_focus_areas:"",ai_followup_clinical_reasoning:"",ai_analysis_overall_purpose:"",ai_analysis_clinical_instructions:"",ai_analysis_red_flag_guidelines:"",ai_analysis_treatment_plan_instructions:""})}catch(Y){console.error("Error loading data:",Y),b({title:"Error",description:"Failed to load form data",variant:"destructive"})}a(!1)},R=async()=>{try{if(n!=null&&n.id)await ve.entities.IntakeFormSettings.update(n.id,n);else{const Y=await ve.entities.IntakeFormSettings.create(n);r(Y)}}catch(Y){console.error("Error saving settings:",Y),b({title:"Error",description:"Failed to save settings",variant:"destructive"})}},I=async Y=>{try{if(Y.id){const J=await ve.entities.IntakeFormQuestion.update(Y.id,Y);t(se=>se.map(V=>V.id===Y.id?{...V,...J}:V))}else{const J=await ve.entities.IntakeFormQuestion.create(Y);t(se=>[...se,J])}u(null)}catch(J){console.error("Error saving question:",J),b({title:"Error",description:"Failed to save question",variant:"destructive"})}},M=async Y=>{if(confirm("Are you sure you want to delete this question?"))try{await ve.entities.IntakeFormQuestion.delete(Y),t(J=>J.filter(se=>se.id!==Y))}catch(J){console.error("Error deleting question:",J),b({title:"Error",description:"Failed to delete question",variant:"destructive"})}},B=async Y=>{if(e.find(V=>V.profile_mapping===Y.key&&V.step==="profile")){b({title:"Already Exists",description:`${Y.label} is already in the form`,variant:"destructive"});return}const se={question_id:`profile_${Y.key}`,question_text:Y.label,response_type:Y.type,region:"Global",step:"profile",order:$("profile").length,is_required:Y.required,display_width:"50",profile_mapping:Y.key,is_active:!0};try{await ve.entities.IntakeFormQuestion.create(se),A()}catch(V){console.error("Error adding profile field:",V),b({title:"Error",description:"Failed to add profile field",variant:"destructive"})}},W=async Y=>{const J={question_id:`group_${Y}_${Date.now()}`,question_text:"New Conditional Group",response_type:"field_group_container",region:"Global",step:Y,order:$(Y).length,is_required:!1,display_width:"100",is_active:!0,conditional_logic:null};try{await ve.entities.IntakeFormQuestion.create(J),A()}catch(se){console.error("Error adding conditional group:",se),b({title:"Error",description:"Failed to add conditional group",variant:"destructive"})}},G=async Y=>{const J={question_id:`header_${Y}_${Date.now()}`,question_text:"New Section Header",response_type:"heading",region:"Global",step:Y,order:$(Y).length,is_required:!1,display_width:"100",is_active:!0};try{await ve.entities.IntakeFormQuestion.create(J),A()}catch(se){console.error("Error adding header:",se),b({title:"Error",description:"Failed to add header",variant:"destructive"})}},H=async Y=>{if(!Y.destination)return;const{source:J,destination:se,draggableId:V}=Y,fe=o,ce=e.find(le=>le.id===V);if(!ce)return;const Ne=J.droppableId,me=se.droppableId,je=Ne.startsWith("group-");je&&Ne.replace("group-","");const te=me.startsWith("group-"),oe=te?me.replace("group-",""):null;try{if(te)t(le=>le.map(ye=>ye.id===ce.id?{...ye,parent_question_id:oe,order:se.index}:ye)),await ve.entities.IntakeFormQuestion.update(ce.id,{parent_question_id:oe,order:se.index});else if(je)t(le=>le.map(ye=>ye.id===ce.id?{...ye,parent_question_id:null,order:se.index}:ye)),await ve.entities.IntakeFormQuestion.update(ce.id,{parent_question_id:null,order:se.index});else{const le=e.filter(Re=>Re.step===fe&&!Re.parent_question_id&&Re.is_active!==!1).sort((Re,ge)=>(Re.order||0)-(ge.order||0)),ye=Array.from(le),[xe]=ye.splice(J.index,1);ye.splice(se.index,0,xe);const Ce=e.map(Re=>{const ge=ye.findIndex(ke=>ke.id===Re.id);return ge!==-1?{...Re,order:ge}:Re});t(Ce);const Be=ye.map((Re,ge)=>({id:Re.id,order:ge}));Promise.all(Be.map(Re=>ve.entities.IntakeFormQuestion.update(Re.id,{order:Re.order}))).catch(Re=>{console.error("Error saving reorder:",Re),b({title:"Error",description:"Failed to save order changes",variant:"destructive"}),A()})}}catch(le){console.error("Error reordering:",le),b({title:"Error",description:"Failed to reorder questions",variant:"destructive"}),A()}},K=Y=>{m(J=>J.includes(Y)?J.filter(se=>se!==Y):[...J,Y])},$=Y=>e.filter(J=>J.step===Y&&!J.parent_question_id&&J.is_active!==!1).sort((J,se)=>(J.order||0)-(se.order||0)),F=Y=>e.filter(J=>J.parent_question_id===Y&&J.is_active!==!1).sort((J,se)=>(J.order||0)-(se.order||0)),z=()=>{const Y=e.filter(J=>J.step==="profile"&&J.profile_mapping).map(J=>J.profile_mapping);return Jge.filter(J=>!Y.includes(J.key))},U=Y=>{if(!Y||!Y.conditions||Y.conditions.length===0)return null;const J=Y.action==="show"?"Show":"Hide",se=Y.conditions.length>1?` ${Y.logic_operator} `:"",V=Y.conditions.map(fe=>{const ce=e.find(je=>je.question_id===fe.source_question_id),Ne=(ce==null?void 0:ce.question_text)||fe.source_question_id;let me=fe.operator.replace(/_/g," ");return["is empty","is not empty"].includes(me)?`${Ne} ${me}`:`${Ne} ${me} "${fe.value}"`}).join(se);return`${J} if: ${V}`},ee=(Y,J=null)=>{w(Y),k(J),y(!0)},re=Y=>{const J=N?F(N).length:$(S).length;u({question_id:"",question_text:"",response_type:Y,region:"Global",step:S,parent_question_id:N,order:J,is_required:!1,display_width:"100",is_active:!0}),y(!1),_(null),w(null),k(null)},X=async()=>{try{const Y=["id","question_id","question_text","response_type","options","option_multipliers","option_urgency","option_domains","option_tags","min_value","max_value","step_value","unit","diagnostic_tag","diagnostic_domain","weight","shared_tag_id","notes","region","step","order","help_text","is_required","is_hidden","display_width","parent_question_id","profile_mapping","conditional_logic","is_active","created_date","updated_date","created_by"],J=[Y.join(",")];e.forEach(Ne=>{const me=Y.map(je=>{const te=Ne[je];if(te==null)return"";if(typeof te=="object")return`"${JSON.stringify(te).replace(/"/g,'""')}"`;const oe=String(te);return oe.includes(",")||oe.includes('"')||oe.includes(` 692`)?`"${oe.replace(/"/g,'""')}"`:oe});J.push(me.join(","))});const se=J.join(` 693`),V=new Blob([se],{type:"text/csv"}),fe=window.URL.createObjectURL(V),ce=document.createElement("a");ce.href=fe,ce.download=`lead-form-questions-${new Date().toISOString().split("T")[0]}.csv`,document.body.appendChild(ce),ce.click(),document.body.removeChild(ce),window.URL.revokeObjectURL(fe),b({title:"Success",description:"Questions exported to CSV"})}catch(Y){console.error("Export error:",Y),b({title:"Error",description:"Failed to export CSV",variant:"destructive"})}},Z=async({file:Y,fieldMappings:J,upsertBy:se,csvHeaders:V})=>{try{const ce=(await Y.text()).split(` 694`).filter(ye=>ye.trim()),Ne=ye=>{const xe=[];let Ce="",Be=!1;for(let Re=0;Re<ye.length;Re++){const ge=ye[Re],ke=ye[Re+1];ge==='"'&&Be&&ke==='"'?(Ce+='"',Re++):ge==='"'?Be=!Be:ge===","&&!Be?(xe.push(Ce),Ce=""):Ce+=ge}return xe.push(Ce),xe},me=Ne(ce[0]),je=ce.slice(1),te=[];for(const ye of je){const xe=Ne(ye),Ce={};me.forEach((Be,Re)=>{const ge=J[Be];if(ge&&ge!=="__do_not_import__"&&xe[Re]){let ke=xe[Re];if(["options","option_multipliers","option_urgency","option_domains","option_tags","conditional_logic"].includes(ge))try{ke=JSON.parse(ke)}catch{}if(["min_value","max_value","step_value","weight","order"].includes(ge)){const De=parseFloat(ke);ke=isNaN(De)?ke:De}["is_required","is_hidden","is_active"].includes(ge)&&(ke=ke==="true"||ke==="1"||ke===1),Ce[ge]=ke}}),Object.keys(Ce).length>0&&te.push(Ce)}let oe=0,le=0;for(const ye of te){const xe={...ye};if(se!=="id"&&delete xe.id,se&&ye[se]){const Ce=e.find(Be=>
694Be[se]===ye[se]);Ce?(delete xe.id,await ve.entities.IntakeFormQuestion.update(Ce.id,xe),le++):(delete xe.id,await ve.entities.IntakeFormQuestion.create(xe),oe++)}else delete xe.id,await ve.entities.IntakeFormQuestion.create(xe),oe++}b({title:"Success",description:`Imported ${oe} new and updated ${le} existing questions`}),A()}catch(fe){throw console.error("Import error:",fe),b({title:"Error",description:"Failed to import CSV",variant:"destructive"}),fe}},ie=["id","question_id","question_text","response_type","options","option_multipliers","option_urgency","option_domains","option_tags","min_value","max_value","step_value","unit","diagnostic_tag","diagnostic_domain","weight","shared_tag_id","notes","region","step","order","help_text","is_required","is_hidden","display_width","parent_question_id","profile_mapping","conditional_logic","is_active"];return i?s.jsx("div",{className:"p-8",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs("div",{className:"animate-pulse space-y-4",children:[s.jsx("div",{className:"h-8 bg-gray-200 rounded w-1/4"}),s.jsx("div",{className:"h-64 bg-gray-200 rounded"})]})})}):s.jsxs("div",{className:"p-8",children:[s.jsxs("div",{className:"max-w-7xl mx-auto space-y-6",children:[s.jsxs("div",{className:"flex justify-between items-center",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-3xl font-bold text-slate-900",children:"Manage Lead Form"}),s.jsx("p",{className:"text-slate-600",children:"Configure the AI symptoms checker form for lead generation"})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsxs(be,{variant:"outline",onClick:X,children:[s.jsx(Fu,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),s.jsxs(be,{variant:"outline",onClick:()=>T(!0),children:[s.jsx(Bu,{className:"w-4 h-4 mr-2"}),"Import CSV"]})]})]}),s.jsxs(yt,{children:[s.jsx("button",{type:"button",onClick:()=>d(!f),className:"w-full",children:s.jsx(wn,{className:"hover:bg-gray-50 transition-colors cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(ou,{className:"w-5 h-5"}),"Form Settings"]}),f?s.jsx(Or,{className:"w-5 h-5"}):s.jsxs(be,{size:"sm",variant:"ghost",onClick:Y=>{Y.stopPropagation(),d(!0)},children:[s.jsx(Xs,{className:"w-4 h-4 mr-2"}),"Edit Settings"]})]})})}),f&&s.jsxs(It,{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Form Name"}),s.jsx(Te,{value:(n==null?void 0:n.name)||"",onChange:Y=>r({...n,name:Y.target.value})})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Description"}),s.jsx(Te,{value:(n==null?void 0:n.description)||"",onChange:Y=>r({...n,description:Y.target.value})})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Overall Instructions (shown at start of form)"}),s.jsx(dn,{value:(n==null?void 0:n.overall_instructions)||"",onChange:Y=>r({...n,overall_instructions:Y.target.value}),rows:3})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Body Chart SVG File"}),s.jsxs("div",{className:"flex gap-2 items-center",children:[s.jsx(Te,{type:"file",accept:".svg,image/svg+xml",onChange:async Y=>{var se;const J=(se=Y.target.files)==null?void 0:se[0];if(J)try{const{file_url:V}=await ve.integrations.Core.UploadFile({file:J});r({...n,body_chart_svg_url:V})}catch(V){console.error("Error uploading file:",V),alert("Failed to upload file")}},className:"flex-1"}),(n==null?void 0:n.body_chart_svg_url)&&s.jsx("a",{href:n.body_chart_svg_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-blue-600 hover:underline",children:"View"})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Upload an SVG file for the body chart (recommended size: 800x1000px)"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Profile Step Description"}),s.jsx(dn,{value:(n==null?void 0:n.profile_step_description)||"",onChange:Y=>r({...n,profile_step_description:Y.target.value}),rows:2})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Problem Step Description"}),s.jsx(dn,{value:(n==null?void 0:n.problem_step_description)||"",onChange:Y=>r({...n,problem_step_description:Y.target.value}),rows:2})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Medical Step Description"}),s.jsx(dn,{value:(n==null?void 0:n.medical_step_description)||"",onChange:Y=>r({...n,medical_step_description:Y.target.value}),rows:2})]})]}),s.jsx("div",{className:"flex justify-end pt-4 border-t",children:s.jsxs(be,{onClick:R,children:[s.jsx(tv,{className:"w-4 h-4 mr-2"}),"Save Settings"]})})]})]}),s.jsxs(yt,{children:[s.jsx(wn,{children:s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(Oa,{className:"w-5 h-5"}),"Form Questions"]})}),s.jsx(It,{children:s.jsxs(fv,{value:o,onValueChange:l,children:[s.jsxs(HO,{className:"grid w-full grid-cols-3",children:[s.jsxs(Bc,{value:"profile",children:["Profile (",$("profile").length,")"]}),s.jsxs(Bc,{value:"problem",children:["Problem (",$("problem").length,")"]}),s.jsxs(Bc,{value:"medical",children:["Medical (",$("medical").length,")"]})]}),o==="profile"&&s.jsxs("div",{className:"mt-4 mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[s.jsxs("h3",{className:"font-semibold text-sm mb-3 flex items-center gap-2",children:[s.jsx(su,{className:"w-4 h-4"}),"Quick Add Profile Fields"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:z().map(Y=>s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>B(Y),className:"bg-white hover:bg-blue-100",children:[s.jsx(ir,{className:"w-3 h-3 mr-1"}),Y.label]},Y.key))}),z().length===0&&s.jsx("p",{className:"text-sm text-slate-600",children:"All profile fields have been added to the form."})]}),["profile","problem","medical"].map(Y=>s.jsx(aE,{value:Y,className:"mt-6",children:s.jsx(o7,{onDragEnd:H,children:s.jsx(mE,{droppableId:`step-${Y}`,children:J=>s.jsxs("div",{ref:J.innerRef,...J.droppableProps,className:"space-y-2",children:[$(Y).map((se,V)=>{const fe=se.response_type==="field_group_container",ce=se.response_type==="heading",Ne=p.includes(se.question_id),me=fe?F(se.question_id):[],je=U(se.conditional_logic);return s.jsx(hE,{draggableId:se.id,index:V,children:te=>s.jsx("div",{ref:te.innerRef,...te.draggableProps,children:fe?s.jsx(yt,{className:"hover:shadow-md transition-shadow border-2 border-indigo-200",children:s.jsx(It,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{...te.dragHandleProps,className:"cursor-grab mt-1",children:s.jsx(Km,{className:"w-4 h-4 text-gray-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("button",{type:"button",onClick:()=>K(se.question_id),className:"w-full flex items-start justify-between p-2 rounded transition-colors hover:bg-indigo-50",children:[s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"font-medium flex items-center gap-2",children:[s.jsx(gR,{className:"w-4 h-4 text-indigo-600"}),se.question_text,s.jsxs(Rt,{className:"bg-indigo-100 text-indigo-800",children:[me.length," ",me.length===1?"field":"fields"]})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[s.jsx(Rt,{variant:"outline",children:"Conditional Group"}),se.conditional_logic&&s.jsxs(Rt,{className:"bg-indigo-100 text-indigo-800 flex items-center gap-1",children:[s.jsx(Qd,{className:"w-3 h-3"})," Has Logic"]})]}),je&&s.jsx("div",{className:"text-xs text-slate-600 mt-2 italic",children:je})]}),s.jsxs("div",{className:"flex items-center gap-3 ml-4",children:[s.jsxs("div",{className:"text-xs text-slate-500",children:["ID: ",se.question_id]}),s.jsx(be,{variant:"ghost",size:"icon",onClick:oe=>{oe.stopPropagation(),u(se)},children:s.jsx(Xs,{className:"w-4 h-4"})}),s.jsx(be,{variant:"ghost",size:"icon",onClick:oe=>{oe.stopPropagation(),M(se.id)},children:s.jsx(Na,{className:"w-4 h-4 text-red-500"})}),Ne?s.jsx(Or,{className:"w-5 h-5"}):s.jsx(op,{className:"w-5 h-5"})]})]}),Ne&&s.jsx(mE,{droppableId:`group-${se.question_id}`,children:oe=>s.jsxs("div",{ref:oe.innerRef,...oe.droppableProps,className:"mt-3 ml-4 space-y-2 border-l-2 border-indigo-300 pl-3",children:[me.map((le,ye)=>{const xe=U(le.conditional_logic);return s.jsx(hE,{draggableId:le.id,index:ye,children:Ce=>s.jsx("div",{ref:Ce.innerRef,...Ce.draggableProps,className:"p-2 bg-gray-50 rounded",children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{...Ce.dragHandleProps,className:"cursor-grab",children:s.jsx(Km,{className:"w-3 h-3 text-gray-400"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"text-sm font-medium",children:le.question_text}),s.jsxs("div",{className:"flex gap-1 mt-1",children:[s.jsx(Rt,{variant:"outline",className:"text-xs",children:le.response_type}),le.conditional_logic&&s.jsxs(Rt,{className:"bg-indigo-100 text-indigo-800 text-xs flex items-center gap-1",children:[s.jsx(Qd,{className:"w-2 h-2"})," Conditional"]}),le.is_hidden&&s.jsxs(Rt,{className:"bg-gray-100 text-gray-800 text-xs flex items-center gap-1",children:[s.jsx(Qd,{className:"w-2 h-2"})," Hidden"]})]}),xe&&s.jsx("div",{className:"text-xs text-slate-600 mt-1 italic",children:xe})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"text-xs text-slate-500",children:["ID: ",le.question_id," (",le.display_width,"%)"]}),s.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>u(le),children:s.jsx(Xs,{className:"w-3 h-3"})}),s.jsx(be,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:()=>M(le.id),children:s.jsx(Na,{className:"w-3 h-3 text-red-500"})})]})]})})},le.id)}),oe.placeholder,me.length===0&&s.jsx("div",{className:"text-xs text-slate-500 italic p-2",children:"Drag questions here or create new ones inside this group"}),s.jsxs(be,{variant:"outline",size:"sm",onClick:()=>ee(Y,se.question_id),className:"w-full mt-2",children:[s.jsx(ir,{className:"w-3 h-3 mr-2"}),"Add Question to Group"]})]})})]})]})})}):ce?s.jsx(yt,{className:"hover:shadow-md transition-shadow bg-blue-50 border-2 border-blue-200",children:s.jsx(It,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{...te.dragHandleProps,className:"cursor-grab mt-1",children:s.jsx(Km,{className:"w-4 h-4 text-gray-400"})}),s.jsxs("div",{className:"flex-1 flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"font-semibold text-lg text-blue-800",children:se.question_text}),s.jsx(Rt,{className:"bg-blue-100 text-blue-800",children:"Section Header"})]}),s.jsxs("div",{className:"flex items-center gap-3 ml-4",children:[s.jsxs("div",{className:"text-xs text-slate-500",children:["ID: ",se.question_id]}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>u(se),children:s.jsx(Xs,{className:"w-4 h-4"})}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>M(se.id),children:s.jsx(Na,{className:"w-4 h-4 text-red-500"})})]})]})]})})}):s.jsx(yt,{className:"hover:shadow-md transition-shadow",children:s.jsx(It,{className:"p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{...te.dragHandleProps,className:"cursor-grab mt-1",children:s.jsx(Km,{className:"w-4 h-4 text-gray-400"})}),s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"flex items-start justify-between",children:[s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-medium",children:se.question_text}),s.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[s.jsx(Rt,{variant:"outline",children:se.response_type}),se.profile_mapping&&s.jsxs(Rt,{className:"bg-emerald-100 text-emerald-800",children:["Maps to: ",se.profile_mapping]}),!se.profile_mapping&&s.jsx(Rt,{variant:"outline",children:se.region}),se.is_required&&s.jsx(Rt,{className:"bg-red-100 text-red-800",children:"Required"}),se.diagnostic_tag&&s.jsx(Rt,{className:"bg-purple-100 text-purple-800",children:se.diagnostic_tag}),se.conditional_logic&&s.jsxs(Rt,{className:"bg-indigo-100 text-indigo-800 flex items-center gap-1",children:[s.jsx(Qd,{className:"w-3 h-3"})," Conditional"]}),se.is_hidden&&s.jsxs(Rt,{className:"bg-gray-100 text-gray-800 flex items-center gap-1",children:[s.jsx(Qd,{className:"w-3 h-3"})," Hidden"]})]}),je&&s.jsx("div",{className:"text-xs text-slate-600 mt-2 italic",children:je})]}),s.jsxs("div",{className:"flex items-center gap-3 ml-4",children:[s.jsxs("div",{className:"text-xs text-slate-500 text-right",children:[s.jsxs("div",{children:["ID: ",se.question_id]}),s.jsxs("div",{children:[se.display_width,"%"]})]}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>u(se),children:s.jsx(Xs,{className:"w-4 h-4"})}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>M(se.id),children:s.jsx(Na,{className:"w-4 h-4 text-red-500"})})]})]})})]})})})})},se.id)}),J.placeholder,s.jsxs("div",{className:"flex gap-2 pt-4",children:[s.jsxs(be,{variant:"outline",onClick:()=>ee(Y),className:"flex-1",children:[s.jsx(ir,{className:"w-4 h-4 mr-2"}),"Add Question"]}),s.jsxs(be,{variant:"outline",onClick:()=>G(Y),className:"flex-1",children:[s.jsx(Oa,{className:"w-4 h-4 mr-2"}),"Add Header"]}),s.jsxs(be,{variant:"outline",onClick:()=>W(Y),className:"flex-1",children:[s.jsx(gR,{className:"w-4 h-4 mr-2"}),"Add Conditional Group"]})]})]})})})},Y))]})})]}),s.jsxs(yt,{children:[s.jsx("button",{type:"button",onClick:()=>P(!C),className:"w-full",children:s.jsx(wn,{className:"hover:bg-gray-50 transition-colors cursor-pointer",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs(_n,{className:"flex items-center gap-2",children:[s.jsx(pB,{className:"w-5 h-5"}
694),"AI Instruction Prompts"]}),C?s.jsx(Or,{className:"w-5 h-5"}):s.jsxs(be,{size:"sm",variant:"ghost",onClick:Y=>{Y.stopPropagation(),P(!0)},children:[s.jsx(Xs,{className:"w-4 h-4 mr-2"}),"Edit Prompts"]})]})})}),C&&s.jsxs(It,{className:"space-y-8",children:[s.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:s.jsxs("p",{className:"text-sm text-blue-900",children:[s.jsx("strong",{children:"How it works:"})," Your custom instructions are combined with patient data (automatically appended) and system-required output formatting to ensure consistent, structured AI responses."]})}),s.jsxs("div",{className:"border-t-2 border-purple-200 pt-6",children:[s.jsxs("h3",{className:"text-xl font-bold text-purple-900 mb-2 flex items-center gap-2",children:[s.jsx("span",{className:"text-2xl",children:"ð"}),"Step 1 â Step 2: Follow-Up Questions Generation"]}),s.jsxs("p",{className:"text-sm text-slate-600 mb-4",children:["The system automatically appends ",s.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"questionsContext"})," (what was asked in Step 1) and ",s.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"responses"})," (patient's answers) to your instructions below."]}),s.jsxs("div",{className:"bg-slate-50 border-l-4 border-slate-300 p-4 mb-6",children:[s.jsx("h4",{className:"font-semibold text-sm mb-2",children:"Automatically Appended by System:"}),s.jsxs("ul",{className:"text-sm text-slate-700 space-y-1",children:[s.jsxs("li",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"questionsContext"})," - All questions asked in Step 1 with available options"]}),s.jsxs("li",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"responses"})," - Patient's actual answers from Step 1"]}),s.jsx("li",{children:"Output format instructions (JSON schema for question structure)"})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"1. Overall Purpose"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Define the AI's role and objective for generating follow-up questions"}),s.jsx(dn,{value:(n==null?void 0:n.ai_followup_overall_purpose)||"",onChange:Y=>r({...n,ai_followup_overall_purpose:Y.target.value}),placeholder:"e.g., You are an experienced UK musculoskeletal practitioner conducting a detailed patient intake interview...",rows:3,className:"bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"2. General Guidance"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Rules and guidelines for generating appropriate follow-up questions"}),s.jsx(dn,{value:(n==null?void 0:n.ai_followup_duplication_rules)||"",onChange:Y=>r({...n,ai_followup_duplication_rules:Y.target.value}),placeholder:"e.g., DO NOT repeat ANY question that was already asked. Make questions conversational and patient-friendly. Prefer structured responses (radio, multi_select) over free-text...",rows:6,className:"bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"3. Focus for Step 2"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"What should the AI focus on when creating follow-up questions?"}),s.jsx(dn,{value:(n==null?void 0:n.ai_followup_focus_areas)||"",onChange:Y=>r({...n,ai_followup_focus_areas:Y.target.value}),placeholder:"e.g., Ask DEEPER questions about what they DID report, explore functional impact in detail, get precise symptom characteristics...",rows:4,className:"bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"4. Clinical Reasoning Lens"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Clinical reasoning approach and assessment criteria for question selection"}),s.jsx(dn,{value:(n==null?void 0:n.ai_followup_clinical_reasoning)||"",onChange:Y=>r({...n,ai_followup_clinical_reasoning:Y.target.value}),placeholder:"e.g., Generate 4-6 SPECIFIC questions that dive deeper into their presentation, get functional details, clarify symptom characteristics...",rows:4,className:"bg-white"})]})]})]}),s.jsxs("div",{className:"border-t-2 border-teal-200 pt-6",children:[s.jsxs("h3",{className:"text-xl font-bold text-teal-900 mb
694-2 flex items-center gap-2",children:[s.jsx("span",{className:"text-2xl",children:"ð©º"}),"Step 3: Symptom Analysis & Treatment Plan"]}),s.jsxs("p",{className:"text-sm text-slate-600 mb-4",children:["The system automatically appends ",s.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"analysisData"})," (ALL patient responses from Step 1 + Step 2 with diagnostic tags) and ",s.jsx("code",{className:"bg-slate-100 px-1 rounded",children:"patientInfo"})," (analysis results) to your instructions below."]}),s.jsxs("div",{className:"bg-slate-50 border-l-4 border-slate-300 p-4 mb-6",children:[s.jsx("h4",{className:"font-semibold text-sm mb-2",children:"Automatically Appended by System:"}),s.jsxs("ul",{className:"text-sm text-slate-700 space-y-1",children:[s.jsxs("li",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"analysisData"})," - ALL patient responses from Step 1 + Step 2 with diagnostic weights/tags"]}),s.jsxs("li",{children:[s.jsx("code",{className:"bg-white px-2 py-0.5 rounded",children:"patientInfo"})," - Analysis results and activities limited"]}),s.jsx("li",{children:"Output format instructions (JSON schema for results structure)"})]})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"1. Overall Purpose"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"Define the AI's role for analyzing symptoms and creating treatment plans"}),s.jsx(dn,{value:(n==null?void 0:n.ai_analysis_overall_purpose)||"",onChange:Y=>r({...n,ai_analysis_overall_purpose:Y.target.value}),placeholder:"e.g., You are an experienced UK musculoskeletal practitioner analyzing a patient's intake form...",rows:3,className:"bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"2. Clinical Analysis Instructions"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"How to analyze symptoms and create the clinical assessment"}),s.jsx(dn,{value:(n==null?void 0:n.ai_analysis_clinical_instructions)||"",onChange:Y=>r({...n,ai_analysis_clinical_instructions:Y.target.value}),placeholder:"e.g., Provide empathetic overview acknowledging their symptoms, detailed clinical impression, most likely diagnosis in patient-friendly language...",rows:5,className:"bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"3. Red Flag Guidelines"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"How to identify and communicate serious warning signs"}),s.jsx(dn,{value:(n==null?void 0:n.ai_analysis_red_flag_guidelines)||"",onChange:Y=>r({...n,ai_analysis_red_flag_guidelines:Y.target.value}),placeholder:"e.g., For each red flag clearly state: WHAT triggered concern, WHY it's concerning, WHAT action needed and HOW URGENTLY...",rows:4,className:"bg-white"})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block font-semibold text-base",children:"4. Treatment Plan Instructions"}),s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:"How to create the 3-phase treatment plan and next steps"}),s.jsx(dn,{value:(n==null?void 0:n.ai_analysis_treatment_plan_instructions)||"",onChange:Y=>r({...n,ai_analysis_treatment_plan_instructions:Y.target.value}),placeholder:"e.g., Create warm, professional 3-phase approach: Relief & Recovery, Correction & Strengthening, Maintenance & Prevention. Explain clinical reasoning and encourage booking...",rows:5,className:"bg-white"})]})]})]}),s.jsx("div",{className:"flex justify-end pt-4 border-t",children:s.jsxs(be,{onClick:R,children:[s.jsx(tv,{className:"w-4 h-4 mr-2"}),"Save All AI Prompts"]})})]})]})]}),s.jsx(vn,{open:v,onOpenChange:y,children:s.jsxs(pn,{className:"max-w-2xl",children:[s.jsx(En,{children:s.jsx(kn,{children:"Choose Question Type"})}),s.jsx("div",{className:"grid grid-cols-2 gap-3",children:[{value:"text_input",label:"Text Input",icon:"ð"},{value:"textarea",label:"Text Area",icon:"ð"},{value:"number_input",label:"Number",icon:"ð¢"},{value:"date_picker",label:"Date",icon:"ð
"},{value:"dropdown",label:"Dropdown",icon:"ð"},{value:"radio",label:"Radio Buttons",icon:"ð"},{value:"yes_no",label:"Yes/No",icon:"ââ"},{value:"multi_select",label:"Multi-Select",icon:"âï¸"},{value:"single_checkbox",label:"Single Checkbox",icon:"â
"},{value:"range_scale",label:"Range Scale",icon:"ð"},{value:"problem_area",label:"Problem Area (Body Chart)",icon:"ð«"},{value:"major_regions",label:"Major Regions",icon:"ðºï¸"},{value:"heading",label:"Section Heading",icon:"ð"}].map(Y=>s.jsxs("button",{onClick:()=>re(Y.value),className:"p-4 border-2 rounded-lg hover:border-indigo-500 hover:bg-indigo-50 transition-all text-left",children:[s.jsx("div",{className:"text-2xl mb-2",children:Y.icon}),s.jsx("div",{className:"font-semibold text-slate-900",children:Y.label})]},Y.value))}),s.jsx(Ku,{children:s.jsx(be,{variant:"outline",onClick:()=>y(!1),children:"Cancel"})})]})}),s.jsx(Kge,{open:L,onClose:()=>T(!1),entityFields:ie,onImport:Z}),c&&s.jsx(Zge,{question:c,onSave:I,onClose:()=>u(null),allQuestions:e})]})}function tve(){const e=mr(),{toast:t}=ui(),[n,r]=E.useState(""),[i,a]=E.useState(""),[o,l]=E.useState(!1),[c,u]=E.useState(""),[f,d]=E.useState(!1);E.useEffect(()=>{const b=new URLSearchParams(window.location.search).get("email");b&&(r(b),d(!0))},[]);const p=async m=>{if(m.preventDefault(),u(""),!n||!i){u("Please fill in all fields");return}if(i.length<8){u("Password must be at least 8 characters");return}l(!0);try{await ve.auth.register({email:n,password:i}),t({title:"Success",description:"Check your email for the verification code."});const b=new URLSearchParams(window.location.search),v=b.get("clinic_id"),y=b.get("team_member_id");setTimeout(()=>{const x=new URLSearchParams({email:n});v&&x.set("clinic_id",v),y&&x.set("team_member_id",y),e(`${ln("VerifyEmail")}?${x.toString()}`)},1500)}catch(b){console.error("Registration error:",b),u(b.message||"Failed to create account. Please try again.")}finally{l(!1)}};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-primary-700 via-primary-600 to-earth-700 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1576091160550-112173fba4b7?
694w=1600')] bg-cover bg-center opacity-10"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent"}),s.jsx("div",{className:"relative min-h-screen flex items-center justify-center px-4 py-12",children:s.jsxs("div",{className:"w-full max-w-md",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-white/90 backdrop-blur-sm rounded-full mb-4",children:s.jsx(rl,{className:"w-8 h-8 text-[#006e74]"})}),s.jsx("h1",{className:"text-3xl font-bold text-white mb-2 drop-shadow-lg",children:"TriageFlow"}),s.jsx("p",{className:"text-white/90 drop-shadow",children:"Create your clinic admin account"})]}),s.jsxs("div",{className:"rounded-xl border bg-white text-card-foreground shadow-2xl",children:[s.jsxs("div",{className:"flex flex-col space-y-1.5 p-6",children:[s.jsx("div",{className:"font-semibold tracking-tight text-2xl text-[#54595f]",children:"Create Your Account"}),s.jsx("div",{className:"text-sm text-gray-600",children:"Fill in your details to get started"})]}),s.jsx("div",{className:"p-6 pt-0",children:s.jsxs("form",{onSubmit:p,className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-2 text-[#54595f]",htmlFor:"email",children:[s.jsx(hn,{className:"w-4 h-4 text-gray-500"}),"Email Address"]}),s.jsx(Te,{id:"email",type:"email",placeholder:"[email protected]",value:n,onChange:m=>r(m.target.value),disabled:o||f,readOnly:f,className:`h-11 ${f?"bg-gray-50 cursor-not-allowed":""}`}),f&&s.jsx("p",{className:"text-xs text-gray-500",children:"This invitation is for this email address. To use a different email, please request a new invite."})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-2 text-[#54595f]",htmlFor:"password",children:[s.jsx(cZ,{className:"w-4 h-4 text-gray-500"}),"Password"]}),s.jsx(Te,{id:"password",type:"password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:i,onChange:m=>a(m.target.value),disabled:o,className:"h-11"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Must be at least 8 characters long"})]}),c&&s.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-md text-sm",children:c}),s.jsx(be,{type:"submit",disabled:o,className:"w-full h-11 bg-[#006e74] hover:bg-[#005560] text-white font-medium text-base",children:o?"Creating Account...":"Create Account"}),s.jsxs("p",{className:"text-center text-sm text-gray-600",children:["Already have an account?"," ",s.jsx("button",{type:"button",onClick:()=>ve.auth.redirectToLogin(ln("ManageClinics")),className:"text-[#006e74] hover:text-[#005560] font-medium",children:"Sign in"})]})]})})]}),s.jsx("p",{className:"text-center text-white/70 text-sm mt-6 drop-shadow",children:"By creating an account, you agree to our Terms of Service and Privacy Policy"})]})})]})}function nve({open:e,onOpenChange:t,onSubmit:n}){const[r,i]=E.useState(!1),[a,o]=E.useState(""),[l,c]=E.useState("team_member"),u=async f=>{f.preventDefault(),i(!0);try{await n(a,l),o(""),c("team_member")}finally{i(!1)}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"sm:max-w-md",children:[s.jsx(En,{children:s.jsx(kn,{children:"Invite Team Member"})}),s.jsxs("form",{onSubmit:u,className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"email",children:"Email *"}),s.jsx(Te,{id:"email",type:"email",value:a,onChange:f=>o(f.target.value),placeholder:"[email protected]",required:!0})]}),s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"role",children:"Role *"}),s.jsxs(Et,{value:l,onValueChange:c,children:[s.jsx(St,{children:s.jsx(kt,{})}),s.jsxs(jt,{children:[s.jsx(He,{value:"practitioner",children:"Practitioner"}),s.jsx(He,{value:"team_member",children:"Team Member"})]})]})]}),s.jsx("p",{className:"text-xs text-slate-500",children:"The invited user will receive an email with a link to set up their account and join your clinic."}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(be,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:r,children:"Cancel"}),s.jsx(be,{type:"submit",className:"bg-[#006e74] hover:bg-[#005560]",disabled:r,children:r?"Sending...":"Send Invite"})]})]})]})})}function rve(){const[e,t]=E.useState(!0),[n,r]=E.useState(null),[i,a]=E.useState([]),[o,l]=E.useState(!1);E.useEffect(()=>{c()},[]);const c=async()=>{t(!0);try{const d=await ve.auth.me();if(r(d),d!=null&&d.clinic_id){const p=await ve.entities.User.filter({clinic_id:d.clinic_id});a(p||[])}}catch(d){console.error("Error loading data:",d)}finally{t(!1)}},u=async(d,p)=>{try{await ve.functions.invoke("inviteTeamMember",{email:d,role:p}),l(!1),c()}catch(m){throw console.error("Error inviting team member:",m),m}},f=async d=>{if(confirm("Are you sure you want to remove this team member?"))try{console.log("Would delete user:",d)}catch(p){console.error("Error removing team member:",p)}};return e?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-slate-50",children:s.jsx("div",{className:"animate-pulse",children:"Loading..."})}):s.jsxs("div",{className:"min-h-screen bg-slate-50",children:[s.jsx("div",{className:"border-b bg-white",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-6 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 rounded-lg bg-[#e6f0f1] text-[#006e74] flex items-center justify-center",children:s.jsx(qu,{className:"w-5 h-5"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Team Management"}),s.jsx("p",{className:"text-slate-600 text-sm",children:"Manage your clinic's team members"})]})]}),s.jsxs(be,{onClick:()=>l(!0),className:"bg-[#006e74] hover:bg-[#005560] gap-2",children:[s.jsx(ir,{className:"w-4 h-4"}),"Invite Team Member"]})]})}),s.jsx("div",{className:"max-w-6xl mx-auto px-6 py-8",children:i.length===0?s.jsx("div",{className:"text-center py-12",children:s.jsx("p",{className:"text-slate-500",children:"No team members yet. Invite your first team member to get started."})}):s.jsx("div",{className:"grid grid-cols-1 gap-4",children:i.map(d=>s.jsx(yt,{className:"p-6",children:s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("img",{src:d.profile_image_url||`https://ui-avatars.c
694om/api/?name=${d.full_name||d.email}&background=006e74&color=fff`,alt:d.full_name,className:"w-12 h-12 rounded-full"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-slate-900",children:d.full_name||d.email}),s.jsx("p",{className:"text-sm text-slate-600",children:d.email}),s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Role: ",s.jsx("span",{className:"font-medium",children:d.app_role||"team_member"})]})]})]}),d.email!==(n==null?void 0:n.email)&&s.jsx(be,{variant:"ghost",size:"sm",onClick:()=>f(d.id),className:"text-red-600 hover:bg-red-50",children:s.jsx(Na,{className:"w-4 h-4"})})]})},d.id))})}),s.jsx(nve,{open:o,onOpenChange:l,onSubmit:u})]})}function ive(){mr();const{toast:e}=ui(),[t,n]=E.useState(""),[r,i]=E.useState(""),[a,o]=E.useState(!1),[l,c]=E.useState(!1),[u,f]=E.useState("");E.useEffect(()=>{const m=new URLSearchParams(window.location.search).get("email");m&&n(m)},[]);const d=async p=>{var m,b;if(p.preventDefault(),f(""),!r||r.length<6){f("Please enter the 6-digit code");return}o(!0);try{const v=new URLSearchParams(window.location.search),y=v.get("clinic_id");console.log("Attempting verifyOtp with:",{email:t,codeLength:r.length,clinicId:y}),await ve.auth.verifyOtp({email:t,otpCode:r}),e({title:"Success",description:"Email verified! Redirecting..."});const x=v.get("team_member_id");if(y)try{await ve.functions.invoke("assignClinicAdminRole",{email:t,clinic_id:y,team_member_id:x||null})}catch(w){console.warn("Clinic role assignment failed (non-fatal):",w)}const _=y?"/ClinicDashboard":"/ManageClinics";let S=!1;try{S=await ve.auth.isAuthenticated()}catch{S=!1}setTimeout(()=>{S?window.location.href=_:ve.auth.redirectToLogin(_)},1e3)}catch(v){console.error("Verification error:",v),console.error("Error type:",(m=v==null?void 0:v.constructor)==null?void 0:m.name),console.error("Error message:",v==null?void 0:v.message),console.error("Error status:",v==null?void 0:v.status),console.error("Error data:",v==null?void 0:v.data),console.error("Full error object:",{message:v==null?void 0:v.message,status:v==null?void 0:v.status,data:v==null?void 0:v.data,response:v==null?void 0:v.response,errors:v==null?void 0:v.errors});const y=((b=v==null?void 0:v.message)==null?void 0:b.replace(/\[object Object\]/g,"validation error"))||"Invalid or expired code. Please try again or resend the code.";f(y)}finally{o(!1)}};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-primary-700 via-primary-600 to-earth-700 relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 bg-[url('https://images.unsplash.com/photo-1576091160550-112173fba4b7?w=1600')] bg-cover bg-center opacity-10"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent"}),s.jsx("div",{className:"relative min-h-screen flex items-center justify-center px-4 py-12",children:s.jsxs("div",{className:"w-full max-w-md",children:[s.jsxs("div",{className:"text-center mb-8",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-white/90 backdrop-blur-sm rounded-full mb-4",children:s.jsx(rl,{className:"w-8 h-8 text-[#006e74]"})}),s.jsx("h1",{className:"text-3xl font-bold text-white mb-2 drop-shadow-lg",children:"TriageFlow"}),s.jsx("p",{className:"text-white/90 drop-shadow",children:"Verify your email"})]}),s.jsxs("div",{className:"rounded-xl border bg-white text-card-foreground shadow-2xl",children:[s.jsxs("div",{className:"flex flex-col space-y-1.5 p-6",children:[s.jsx("div",{className:"font-semibold tracking-tight text-2xl text-[#54595f]",children:"Verify Your Email"}),s.jsx("div",{className:"text-sm text-gray-600",children:"Enter the 6-digit code we sent to your email"})]}),s.jsx("div",{className:"p-6 pt-0",children:s.jsxs("form",{onSubmit:d,className:"space-y-5",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-2 text-[#54595f]",htmlFor:"email",children:[s.jsx(hn,{className:"w-4 h-4 text-gray-500"}),"Email"]}),s.jsx("div",{className:"h-11 px-3 py-1 rounded-md border border-input bg-gray-50 flex items-center text-gray-600",children:t})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("label",{className:"text-sm font-medium leading-none text-[#54595f]",htmlFor:"code",children:"Verification Code"}),s.jsx(Te,{id:"code",type:"text",placeholder:"Enter the 6-digit code from your email",value:r,onChange:p=>i(p.target.value.replace(/\D/g,"").slice(0,6)),disabled:a,className:"h-11 text-center text-lg tracking-widest",maxLength:"6"}),s.jsx("p",{className:"text-xs text-gray-500",children:"Check your inbox or spam folder"})]}),u&&s.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded-md text-sm",children:u}),s.jsx(be,{type:"submit",disabled:a||r.length!==6,className:"w-full h-11 bg-[#006e74] hover:bg-[#005560] text-white font-medium text-base disabled:opacity-50",children:a?"Verifying...":"
694Verify Email"}),s.jsx("button",{type:"button",disabled:l,onClick:async()=>{c(!0),f("");try{await ve.auth.resendOtp(t),e({title:"Code resent",description:"Check your email for a new code."})}catch(p){f((p==null?void 0:p.message)||"Failed to resend code.")}finally{c(!1)}},className:"w-full text-center text-sm text-[#006e74] hover:text-[#005560] font-medium disabled:opacity-50",children:l?"Resending...":"Didn't receive the code? Resend"})]})})]}),s.jsx("p",{className:"text-center text-white/70 text-sm mt-6 drop-shadow",children:"We sent a 6-digit code to your email. Enter it above to complete registration."})]})})]})}var Jw,ZM;function ave(){if(ZM)return Jw;ZM=1;const{base44:e}=zO();return Jw=new Proxy({},{get:(t,n)=>n==="agentSDK"||n==="default"?e.agents:e.agents[n]}),Jw}var e1=ave();function ove(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const sve=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lve=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cve={};function JM(e,t){return(cve.jsx?lve:sve).test(e)}const uve=/[ \t\n\f\r]/g;function dve(e){return typeof e=="object"?e.type==="text"?eD(e.value):!1:eD(e)}function eD(e){return e.replace(uve,"")===""}class Sp{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Sp.prototype.normal={};Sp.prototype.property={};Sp.prototype.space=void 0;function Iz(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Sp(n,r,t)}function NE(e){return e.toLowerCase()}class Gr{constructor(t,n){this.attribute=n,this.property=t}}Gr.prototype.attribute="";Gr.prototype.booleanish=!1;Gr.prototype.boolean=!1;Gr.prototype.commaOrSpaceSeparated=!1;Gr.prototype.commaSeparated=!1;Gr.prototype.defined=!1;Gr.prototype.mustUseProperty=!1;Gr.prototype.number=!1;Gr.prototype.overloadedBoolean=!1;Gr.prototype.property="";Gr.prototype.spaceSeparated=!1;Gr.prototype.space=void 0;let fve=0;const mt=Fl(),Cn=Fl(),EE=Fl(),$e=Fl(),en=Fl(),Uc=Fl(),Jr=Fl();function Fl(){return 2**++fve}const kE=Object.freeze(Object.defineProperty({__proto__:null,boolean:mt,booleanish:Cn,commaOrSpaceSeparated:Jr,commaSeparated:Uc,number:$e,overloadedBoolean:EE,spaceSeparated:en},Symbol.toStringTag,{value:"Module"})),t1=Object.keys(kE);class AC extends Gr{constructor(t,n,r,i){let a=-1;if(super(t,n),tD(this,"space",i),typeof r=="number")for(;++a<t1.length;){const o=t1[a];tD(this,t1[a],(r&kE[o])===kE[o])}}}AC.prototype.defined=!0;function tD(e,t,n){n&&(e[t]=n)}function rd(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const a=new AC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[NE(r)]=r,n[NE(a.attribute)]=r}return new Sp(t,n,e.space)}const Mz=rd({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:$e,ariaColIndex:$e,ariaColSpan:$e,ariaControls:en,ariaCurrent:null,ariaDescribedBy:en,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:en,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:en,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:en,ariaLevel:$e,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:en,ariaPlaceholder:null,ariaPosInSet:$e,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:en,ariaRowCount:$e,ariaRowIndex:$e,ariaRowSpan:$e,ariaSelected:Cn,ariaSetSize:$e,ariaSort:null,ariaValueMax:$e,ariaValueMin:$e,ariaValueNow:$e,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Dz(e,t){return t in e?e[t]:t}function Lz(e,t){return Dz(e,t.toLowerCase())}const hve=rd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Uc,acceptCharset:en,accessKey:en,action:null,allow:null,allowFullScreen:mt,allowPaymentRequest:mt,allowUserMedia:mt,alt:null,as:null,async:mt,autoCapitalize:null,autoComplete:en,autoFocus:mt,autoPlay:mt,blocking:en,capture:null,charSet:null,checked:mt,cite:null,className:en,cols:$e,colSpan:null,content:null,contentEditable:Cn,controls:mt,controlsList:en,coords:$e|Uc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:mt,defer:mt,dir:null,dirName:null,disabled:mt,download:EE,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:mt,formTarget:null,headers:en,height:$e,hidden:EE,high:$e,href:null,hrefLang:null,htmlFor:en,httpEquiv:en,id:null,imageSizes:null,imageSrcSet:null,inert:mt,inputMode:null,integrity:null,is:null,isMap:mt,itemId:null,itemProp:en,itemRef:en,itemScope:mt,itemType:en,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:mt,low:$e,manifest:null,max:null,maxLength:$e,media:null,method:null,min:null,minLength:$e,multiple:mt,muted:mt,name:null,nonce:null,noModule:mt,noValidate:mt,onAbort:null,onAfterPrint:null,onAuxCl
694ick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:mt,optimum:$e,pattern:null,ping:en,placeholder:null,playsInline:mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:mt,referrerPolicy:null,rel:en,required:mt,reversed:mt,rows:$e,rowSpan:$e,sandbox:en,scope:null,scoped:mt,seamless:mt,selected:mt,shadowRootClonable:mt,shadowRootDelegatesFocus:mt,shadowRootMode:null,shape:null,size:$e,sizes:null,slot:null,span:$e,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$e,step:null,style:null,tabIndex:$e,target:null,title:null,translate:null,type:null,typeMustMatch:mt,useMap:null,value:Cn,width:$e,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:en,axis:null,background:null,bgColor:null,border:$e,borderColor:null,bottomMargin:$e,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:mt,declare:mt,event:null,face:null,frame:null,frameBorder:null,hSpace:$e,leftMargin:$e,link:null,longDesc:null,lowSrc:null,marginHeight:$e,marginWidth:$e,noResize:mt,noHref:mt,noShade:mt,noWrap:mt,object:null,profile:null,prompt:null,rev:null,rightMargin:$e,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:$e,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$e,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:mt,disableRemotePlayback:mt,prefix:null,property:null,results:$e,security:null,unselectable:null},space:"html",transform:Lz}),pve=rd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav
694-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Jr,accentHeight:$e,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$e,amplitude:$e,arabicForm:null,ascent:$e,attributeName:null,attributeType:null,azimuth:$e,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$e,by:null,calcMode:null,capHeight:$e,className:en,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$e,diffuseConstant:$e,direction:null,display:null,dur:null,divisor:$e,dominantBaseline:null,download:mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:$e,enableBackground:null,end:null,event:null,exponent:$e,externalResourcesRequired:null,fill:null,fillOpacity:$e,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uc,g2:Uc,glyphName:Uc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$e,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$e,horizOriginX:$e,horizOriginY:$e,id:null,ideographic:$e,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$e,k:$e,k1:$e,k2:$e,k3:$e,k4:$e,kernelMatrix:Jr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$e,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$e,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,on
vendor: 4,175 bytes, lines 694-695
694Zoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$e,overlineThickness:$e,paintOrder:null,panose1:null,path:null,pathLength:$e,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:en,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$e,pointsAtY:$e,pointsAtZ:$e,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jr,rev:Jr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jr,requiredFeatures:Jr,requiredFonts:Jr,requiredFormats:Jr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$e,specularExponent:$e,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$e,strikethroughThickness:$e,string:null,stroke:null,strokeDashArray:Jr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$e,strokeOpacity:$e,strokeWidth:null,style:null,surfaceScale:$e,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jr,tabIndex:$e,tableValues:null,target:null,targetX:$e,targetY:$e,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$e,underlineThickness:$e,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$e,values:null,vAlphabetic:$e,vMathematical:$e,vectorEffect:null,vHanging:$e,vIdeographic:$e,version:null,vertAdvY:$e,vertOriginX:$e,vertOriginY:$e,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$e,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Dz}),$z=rd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),Fz=rd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Lz}),Bz=rd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),mve={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},gve=/[A-Z]/g,nD=/-[a-z]/g,vve=/^data[-\w.:]+$/i;function yve(e,t){const n=NE(t);let r=t,i=Gr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&vve.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(nD,bve);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!nD.test(a)){let o=a.replace(gve,xve);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=AC}return new i(r,t)}function xve(e){return"-"+e.toLowerCase()}function bve(e){return e.charAt(1).toUpperCase()}const wve=Iz([Mz,hve,$z,Fz,Bz],"html"),PC=Iz([Mz,pve,$z,Fz,Bz],"svg");function _ve(e){return e.join(" ").trim()}var jc={},n1,rD;function Sve(){if(rD)return n1;rD=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=` 695`,u="/",f="*",d="",p="comment",m="declaration";n1=function(v,y){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];y=y||{};var x=1,_=1;function S(I){var M=I.match(t);M&&(x+=M.length);var B=I.lastIndexOf(c);_=~B?I.length-B:_+I.length}
vendor: 4,493 bytes, line 695
695function w(){var I={line:x,column:_};return function(M){return M.position=new N(I),P(),M}}function N(I){this.start=I,this.end={line:x,column:_},this.source=y.source}N.prototype.content=v;function k(I){var M=new Error(y.source+":"+x+":"+_+": "+I);if(M.reason=I,M.filename=y.source,M.line=x,M.column=_,M.source=v,!y.silent)throw M}function C(I){var M=I.exec(v);if(M){var B=M[0];return S(B),v=v.slice(B.length),M}}function P(){C(n)}function L(I){var M;for(I=I||[];M=T();)M!==!1&&I.push(M);return I}function T(){var I=w();if(!(u!=v.charAt(0)||f!=v.charAt(1))){for(var M=2;d!=v.charAt(M)&&(f!=v.charAt(M)||u!=v.charAt(M+1));)++M;if(M+=2,d===v.charAt(M-1))return k("End of comment missing");var B=v.slice(2,M-2);return _+=2,S(B),v=v.slice(M),_+=2,I({type:p,comment:B})}}function A(){var I=w(),M=C(r);if(M){if(T(),!C(i))return k("property missing ':'");var B=C(a),W=I({type:m,property:b(M[0].replace(e,d)),value:B?b(B[0].replace(e,d)):d});return C(o),W}}function R(){var I=[];L(I);for(var M;M=A();)M!==!1&&(I.push(M),L(I));return I}return P(),R()};function b(v){return v?v.replace(l,d):d}return n1}var iD;function jve(){if(iD)return jc;iD=1;var e=jc&&jc.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(jc,"__esModule",{value:!0}),jc.default=n;var t=e(Sve());function n(r,i){var a=null;if(!r||typeof r!="string")return a;var o=(0,t.default)(r),l=typeof i=="function";return o.forEach(function(c){if(c.type==="declaration"){var u=c.property,f=c.value;l?i(u,f,c):f&&(a=a||{},a[u]=f)}}),a}return jc}var df={},aD;function Nve(){if(aD)return df;aD=1,Object.defineProperty(df,"__esModule",{value:!0}),df.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,a=function(u){return!u||n.test(u)||e.test(u)},o=function(u,f){return f.toUpperCase()},l=function(u,f){return"".concat(f,"-")},c=function(u,f){return f===void 0&&(f={}),a(u)?u:(u=u.toLowerCase(),f.reactCompat?u=u.replace(i,l):u=u.replace(r,l),u.replace(t,o))};return df.camelCase=c,df}var ff,oD;function Eve(){if(oD)return ff;oD=1;var e=ff&&ff.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(jve()),n=Nve();function r(i,a){var o={};return!i||typeof i!="string"||(0,t.default)(i,function(l,c){l&&c&&(o[(0,n.camelCase)(l,a)]=c)}),o}return r.default=r,ff=r,ff}var kve=Eve();const Ove=Mt(kve),qz=Uz("end"),TC=Uz("start");function Uz(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Cve(e){const t=TC(e),n=qz(e);if(t&&n)return{start:t,end:n}}function Bf(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?sD(e.position):"start"in e||"end"in e?sD(e):"line"in e||"column"in e?OE(e):""}function OE(e){return lD(e&&e.line)+":"+lD(e&&e.column)}function sD(e){return OE(e&&e.start)+"-"+OE(e&&e.end)}function lD(e){return e&&typeof e=="number"?e:1}class gr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?a.ruleId=r:(a.source=r.slice(0,c),a.ruleId=r.slice(c+1))}if(!a.place&&a.ancestors&&a.ancestors){const c=a.ancestors[a.ancestors.length-1];c&&(a.place=c.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Bf(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gr.prototype.file="";gr.prototype.name="";gr.prototype.reason="";gr.prototype.message="";gr.prototype.stack="";gr.prototype.column=void 0;gr.prototype.line=void 0;gr.prototype.ancestors=void 0;gr.prototype.cause=void 0;gr.prototype.fatal=void 0;gr.prototype.place=void 0;gr.prototype.ruleId=void 0;gr.prototype.source=void 0;const RC={}.hasOwnProperty,Ave=new Map,Pve=/[A-Z]/g,Tve=new Set(["table","tbody","thead","tfoot","tr"]),Rve=ne
vendor: 2,669 bytes, line 695
695w Set(["td","th"]),zz="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Ive(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Uve(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=qve(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?PC:wve,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Hz(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Hz(e,t,n){if(t.type==="element")return Mve(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Dve(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return $ve(e,t,n);if(t.type==="mdxjsEsm")return Lve(e,t);if(t.type==="root")return Fve(e,t,n);if(t.type==="text")return Bve(e,t)}function Mve(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=PC,e.schema=i),e.ancestors.push(t);const a=Vz(e,t.tagName,!1),o=zve(e,t);let l=MC(e,t);return Tve.has(t.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!dve(c):!0})),Wz(e,o,a,t),IC(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Dve(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}ph(e,t.position)}function Lve(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ph(e,t.position)}function $ve(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=PC,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Vz(e,t.name,!0),o=Hve(e,t),l=MC(e,t);return Wz(e,o,a,t),IC(o,l),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Fve(e,t,n){const r={};return IC(r,MC(e,t)),e.create(t,e.Fragment,r,n)}function Bve(e,t){return t.value}function Wz(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function IC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function qve(e,t,n){return r;function r(i,a,o,l){const u=Array.isArray(o.children)?n:t;
vendor: 4,127 bytes, line 695
695return l?u(a,o,l):u(a,o)}}function Uve(e,t){return n;function n(r,i,a,o){const l=Array.isArray(a.children),c=TC(r);return t(i,a,o,l,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function zve(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&RC.call(t.properties,i)){const a=Wve(e,i,t.properties[i]);if(a){const[o,l]=a;e.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&Rve.has(t.tagName)?r=l:n[o]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Hve(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ph(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else ph(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function MC(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Ave;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const c=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(c){const u=i.get(c)||0;o=c+"-"+u,i.set(c,u+1)}}const l=Hz(e,a,o);l!==void 0&&n.push(l)}return n}function Wve(e,t,n){const r=yve(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ove(n):_ve(n)),r.property==="style"){let i=typeof n=="object"?n:Vve(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Gve(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?mve[r.property]||r.property:r.attribute,n]}}function Vve(e,t){try{return Ove(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new gr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=zz+"#cannot-parse-style-attribute",i}}function Vz(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const l=JM(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=o}else r=JM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return RC.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);ph(e)}function ph(e,t){const n=new gr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zz+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Gve(e){const t={};let n;for(n in e)RC.call(e,n)&&(t[Kve(n)]=e[n]);return t}function Kve(e){let t=e.replace(Pve,Yve);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Yve(e){return"-"+e.toLowerCase()}const r1={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Qve={};function Xve(e,t){const n=Qve,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Gz(e,r,i)}function Gz(e,t,n){if(Zve(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return cD(e.children,t,n)}return Array.isArray(e)?cD(e,t,n):""}function cD(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Gz(e[i],t,n);return r.join("")}function Zve(e){return!!(e&&typeof e=="object")}const uD=document.createElement("i");function DC(e){const t="&"+e+";";uD.innerHTML=t;const n=uD.textContent;
vendor: 13,052 bytes, line 695
695return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function La(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Oi(e,t){return e.length>0?(La(e,e.length,0,t),e):t}const dD={}.hasOwnProperty;function Jve(e){const t={};let n=-1;for(;++n<e.length;)eye(t,e[n]);return t}function eye(e,t){let n;for(n in t){const i=(dD.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){dD.call(i,o)||(i[o]=[]);const l=a[o];tye(i[o],Array.isArray(l)?l:l?[l]:[])}}}function tye(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);La(e,0,0,r)}function Kz(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zc(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Sa=Ns(/[A-Za-z]/),ai=Ns(/[\dA-Za-z]/),nye=Ns(/[#-'*+\--9=?A-Z^-~]/);function CE(e){return e!==null&&(e<32||e===127)}const AE=Ns(/\d/),rye=Ns(/[\dA-Fa-f]/),iye=Ns(/[!-/:-@[-`{-~]/);function ht(e){return e!==null&&e<-2}function zr(e){return e!==null&&(e<0||e===32)}function Bt(e){return e===-2||e===-1||e===32}const aye=Ns(new RegExp("\\p{P}|\\p{S}","u")),oye=Ns(/\s/);function Ns(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function id(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&ai(e.charCodeAt(n+1))&&ai(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(o=String.fromCharCode(a,l),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function rn(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(c){return Bt(c)?(e.enter(n),l(c)):t(c)}function l(c){return Bt(c)&&a++<i?(e.consume(c),l):(e.exit(n),t(c))}}const sye={tokenize:lye};function lye(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),rn(e,t,"linePrefix")}function i(l){return e.enter("paragraph"),a(l)}function a(l){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ht(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),o)}}const cye={tokenize:uye},fD={tokenize:dye};function uye(e){const t=this,n=[];let r=0,i,a,o;return l;function l(S){if(r<n.length){const w=n[r];return t.containerState=w[1],e.attempt(w[0].continuation,c,u)(S)}return u(S)}function c(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const w=t.events.length;let N=w,k;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){k=t.events[N][1].end;break}x(r);let C=w;for(;C<t.events.length;)t.events[C][1].end={...k},C++;return La(t.events,N+1,0,t.events.slice(w)),t.events.length=C,u(S)}return l(S)}function u(S){if(r===n.length){if(!i)return p(S);if(i.currentConstruct&&i.currentConstruct.concrete)return b(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(fD,f,d)(S)}function f(S){return i&&_(),x(r),p(S)}function d(S){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,b(S)}function p(S){return t.containerState={},e.attempt(fD,m,b)(S)}function m(S){return r++,n.push([t.currentConstruct,t.containerState]),p(S)}function b(S){if(S===null){i&&_(),x(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:a}),v(S)}function v(S){if(S===null){y(e.exit("chunkFlow"),!0),x(0),e.consume(S);return}return ht(S)?(e.consume(S),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(S),v)}function y(S,w){const N=t.sliceStream(S);if(w&&N.push(null),S.previous=a,a&&(a.next=S),a=S,i.defineSkip(S.start),i.write(N),t.parser.lazy[S.start.line]){let k=i.events.length;for(;k--;)if(i.events[k][1].start.offset<o&&(!i.events[k][1].end||i.events[k][1].end.offset>o))return;const C=t.events.length;let P=C,L,T;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if(L){T=t.events[P][1].end;break}L=!0}for(x(r),k=C;k<t.events.length;)t.events[k][1].end={...T},k++;La(t.events,P+1,0,t.events.slice(C)),t.events.length=k}}function x(S){let w=n.length;for(;w-- >S;){const N=n[w];t.containerState=N[1],N[0].exit.call(t,e)}n.length=S}function _(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function dye(e,t,n){return rn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function hD(e){if(e===null||zr(e)||oye(e))return 1;if(aye(e))return 2}function LC(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const PE={name:"attention",resolveAll:fye,tokenize:hye};function fye(e,t){let n=-1,r,i,a,o,l,c,u,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},p={...e[n][1].start};pD(d,-c),pD(p,c),o={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},a={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},e[r][1].end={...o.start},e[n][1].start={...l.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Oi(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Oi(u,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),u=Oi(u,LC(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Oi(u,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,u=Oi(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,La(e,r-1,n-r+3,u),n=r+u.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function hye(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=hD(r);let a;return o;function o(c){return a=c,e.enter("attentionSequence"),l(c)}function l(c){if(c===a)return e.consume(c),l;const u=e.exit("attentionSequence"),f=hD(c),d=!f||f===2&&i||n.includes(c),p=!i||i===2&&f||n.includes(r);return u._open=!!(a===42?d:d&&(i||!p)),u._close=!!(a===42?p:p&&(f||!d)),t(c)}}function pD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pye={name:"autolink",tokenize:mye};function mye(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(m){return Sa(m)?(e.consume(m),o):m===64?n(m):u(m)}function o(m){return m===43||m===45||m===46||ai(m)?(r=1,l(m)):u(m)}function l(m){return m===58?(e.consume(m),r=0,c):(m===43||m===45||m===46||ai(m))&&r++<32?(e.consume(m),l):(r=0,u(m))}function c(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||CE(m)?n(m):(e.consume(m),c)}function u(m){return m===64?(e.consume(m),f):nye(m)?(e.consume(m),u):n(m)}function f(m){return ai(m)?d(m):n(m)}function d(m){return m===46?(e.consume(m),r=0,f):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||ai(m))&&r++<63){const b=m===45?p:d;return e.consume(m),b}return n(m)}}const mx={partial:!0,tokenize:gye};function gye(e,t,n){return r;function r(a){return Bt(a)?rn(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||ht(a)?t(a):n(a)}}const Yz={continuation:{tokenize:yye},exit:xye,name:"blockQuote",tokenize:vye};function vye(e,t,n){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Bt(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function yye(e,t,n){const r=this;return i;function i(o){return Bt(o)?rn(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Yz,t,n)(o)}}function xye(e){e.exit("blockQuote")}const Qz={name:"characterEscape",tokenize:bye};function bye(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return iye(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Xz={name:"characterReference",tokenize:wye};function wye(e,t,n){const r=this;let i=0,a,o;return l;function l(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),a=31,o=ai,f(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=rye,f):(e.enter("characterReferenceValue"),a=7,o=AE,f(d))}function f(d){if(d===59&&i){const p=e.exit("characterReferenceValue");return o===ai&&!DC(r.sliceSerialize(p))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(d)&&i++<a?(e.consume(d),f):n(d)}}const mD={partial:!0,tokenize:Sye},gD={concrete:!0,name:"codeFenced",tokenize:_ye};function _ye(e,t,n){const r=this,i={partial:!0,tokenize:N};let a=0,o=0,l;return c;function c(k){return u(k)}function u(k){const C=r.events[r.events.length-1];return a=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,l=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(k)}function f(k){return k===l?(o++,e.consume(k),f):o<3?n(k):(e.exit("codeFencedFenceSequence"),Bt(k)?rn(e,d,"whitespace")(k):d(k))}function d(k){return k===null||ht(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(mD,v,w)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||ht(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(k)):Bt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),rn(e,m,"whitespace")(k)):k===96&&k===l?n(k):(e.consume(k),p)}function m(k){return k===null||ht(k)?d(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===null||ht(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(k)):k===96&&k===l?n(k):(e.consume(k),b)}function v(k){return e.attempt(i,w,y)(k)}function y(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),x}function x(k){return a>0&&Bt(k)?rn(e,_,"linePrefix",a+1)(k):_(k)}function _(k){return k===null||ht(k)?e.check(mD,v,w)(k):(e.enter("codeFlowValue"),S(k))}function S(k){return k===null||ht(k)?(e.exit("codeFlowValue"),_(k)):(e.consume(k),S)}function w(k){return e.exit("codeFenced"),t(k)}function N(k,C,P){let L=0;return T;function T(B){return k.enter("lineEnding"),k.consume(B),k.exit("lineEnding"),A}function A(B){return k.enter("codeFencedFence"),Bt(B)?rn(k,R,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===l?(k.enter("codeFencedFenceSequence"),I(B)):P(B)}function I(B){return B===l?(L++,k.consume(B),I):L>=o?(k.exit("codeFencedFenceSequence"),Bt(B)?rn(k,M,"whitespace")(B):M(B)):P(B)}function M(B){return B===null||ht(B)?(k.exit("codeFencedFence"),C(B)):P(B)}}}function Sye(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const i1={name:"codeIndented",tokenize:Nye},jye={partial:!0,tokenize:Eye};function Nye(e,t,n){const r=this;return i;
vendor: 4,991 bytes, line 695
695function i(u){return e.enter("codeIndented"),rn(e,a,"linePrefix",5)(u)}function a(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(u):n(u)}function o(u){return u===null?c(u):ht(u)?e.attempt(jye,o,c)(u):(e.enter("codeFlowValue"),l(u))}function l(u){return u===null||ht(u)?(e.exit("codeFlowValue"),o(u)):(e.consume(u),l)}function c(u){return e.exit("codeIndented"),t(u)}}function Eye(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):rn(e,a,"linePrefix",5)(o)}function a(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):ht(o)?i(o):n(o)}}const kye={name:"codeText",previous:Cye,resolve:Oye,tokenize:Aye};function Oye(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Cye(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Aye(e,t,n){let r=0,i,a;return o;function o(d){return e.enter("codeText"),e.enter("codeTextSequence"),l(d)}function l(d){return d===96?(e.consume(d),r++,l):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(a=e.enter("codeTextSequence"),i=0,f(d)):ht(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||ht(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function f(d){return d===96?(e.consume(d),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(a.type="codeTextData",u(d))}}class Pye{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&hf(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),hf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),hf(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);hf(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);hf(this.left,n.reverse())}}}function hf(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Zz(e){const t={};let n=-1,r,i,a,o,l,c,u;const f=new Pye(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type==="lineEndingBlank"&&(a+=2),a<c.length&&c[a][1].type==="content"))for(;++a<c.length&&c[a][1].type!=="content";)c[a][1].type==="chunkText"&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Tye(f,n)),n=t[n],u=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=f.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,n),l.unshift(r),f.splice(i,n-i+1,l))}}return La(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function Tye(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[];let o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],u={};let f,d,p=-1,m=n,b=0,v=0;const y=[v];for(;m;){for(;e.get(++i)[1]!==m;);
vendor: 18,718 bytes, line 695
695a.push(i),m._tokenizer||(f=r.sliceStream(m),m.next||f.push(null),d&&o.defineSkip(m.start),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),m._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=m,m=m.next}for(m=n;++p<l.length;)l[p][0]==="exit"&&l[p-1][0]==="enter"&&l[p][1].type===l[p-1][1].type&&l[p][1].start.line!==l[p][1].end.line&&(v=p+1,y.push(v),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(o.events=[],m?(m._tokenizer=void 0,m.previous=void 0):y.pop(),p=y.length;p--;){const x=l.slice(y[p],y[p+1]),_=a.pop();c.push([_,_+x.length-1]),e.splice(_,2,x)}for(c.reverse(),p=-1;++p<c.length;)u[b+c[p][0]]=b+c[p][1],b+=c[p][1]-c[p][0]-1;return u}const Rye={resolve:Mye,tokenize:Dye},Iye={partial:!0,tokenize:Lye};function Mye(e){return Zz(e),e}function Dye(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?a(l):ht(l)?e.check(Iye,o,a)(l):(e.consume(l),i)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function o(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Lye(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),rn(e,a,"linePrefix")}function a(o){if(o===null||ht(o))return n(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function Jz(e,t,n,r,i,a,o,l,c){const u=c||Number.POSITIVE_INFINITY;let f=0;return d;function d(x){return x===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(x),e.exit(a),p):x===null||x===32||x===41||CE(x)?n(x):(e.enter(r),e.enter(o),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(x))}function p(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),m(x))}function m(x){return x===62?(e.exit("chunkString"),e.exit(l),p(x)):x===null||x===60||ht(x)?n(x):(e.consume(x),x===92?b:m)}function b(x){return x===60||x===62||x===92?(e.consume(x),m):m(x)}function v(x){return!f&&(x===null||x===41||zr(x))?(e.exit("chunkString"),e.exit(l),e.exit(o),e.exit(r),t(x)):f<u&&x===40?(e.consume(x),f++,v):x===41?(e.consume(x),f--,v):x===null||x===32||x===40||CE(x)?n(x):(e.consume(x),x===92?y:v)}function y(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function e9(e,t,n,r,i,a){const o=this;let l=0,c;return u;function u(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(a),f}function f(m){return l>999||m===null||m===91||m===93&&!c||m===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(m):m===93?(e.exit(a),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):ht(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===null||m===91||m===93||ht(m)||l++>999?(e.exit("chunkString"),f(m)):(e.consume(m),c||(c=!Bt(m)),m===92?p:d)}function p(m){return m===91||m===92||m===93?(e.consume(m),l++,d):d(m)}}function t9(e,t,n,r,i,a){let o;return l;function l(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),o=p===40?41:p,c):n(p)}function c(p){return p===o?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(a),u(p))}function u(p){return p===o?(e.exit(a),c(o)):p===null?n(p):ht(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),rn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===o||p===null||ht(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?d:f)}function d(p){return p===o||p===92?(e.consume(p),f):f(p)}}function qf(e,t){let n;return r;function r(i){return ht(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Bt(i)?rn(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const $ye={name:"definition",tokenize:Bye},Fye={partial:!0,tokenize:qye};function Bye(e,t,n){const r=this;let i;return a;function a(m){return e.enter("definition"),o(m)}function o(m){return e9.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function l(m){return i=zc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),c):n(m)}function c(m){return zr(m)?qf(e,u)(m):u(m)}function u(m){return Jz(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function f(m){return e.attempt(Fye,d,d)(m)}function d(m){return Bt(m)?rn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||ht(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function qye(e,t,n){return r;function r(l){return zr(l)?qf(e,i)(l):n(l)}function i(l){return t9(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Bt(l)?rn(e,o,"whitespace")(l):o(l)}function o(l){return l===null||ht(l)?t(l):n(l)}}const Uye={name:"hardBreakEscape",tokenize:zye};function zye(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return ht(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Hye={name:"headingAtx",resolve:Wye,tokenize:Vye};function Wye(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},La(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Vye(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),a(f)}function a(f){return e.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(e.consume(f),o):f===null||zr(f)?(e.exit("atxHeadingSequence"),l(f)):n(f)}function l(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||ht(f)?(e.exit("atxHeading"),t(f)):Bt(f)?rn(e,l,"whitespace")(f):(e.enter("atxHeadingText"),u(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),l(f))}function u(f){return f===null||f===35||zr(f)?(e.exit("atxHeadingText"),l(f)):(e.consume(f),u)}}const Gye=["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"],vD=["pre","script","style","textarea"],Kye={concrete:!0,name:"htmlFlow",resolveTo:Xye,tokenize:Zye},Yye={partial:!0,tokenize:exe},Qye={partial:!0,tokenize:Jye};function Xye(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Zye(e,t,n){const r=this;let i,a,o,l,c;return u;function u(U){return f(U)}function f(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),d}function d(U){return U===33?(e.consume(U),p):U===47?(e.consume(U),a=!0,v):U===63?(e.consume(U),i=3,r.interrupt?t:$):Sa(U)?(e.consume(U),o=String.fromCharCode(U),y):n(U)}function p(U){return U===45?(e.consume(U),i=2,m):U===91?(e.consume(U),i=5,l=0,b):Sa(U)?(e.consume(U),i=4,r.interrupt?t:$):n(U)}function m(U){return U===45?(e.consume(U),r.interrupt?t:$):n(U)}function b(U){const ee="CDATA[";return U===ee.charCodeAt(l++)?(e.consume(U),l===ee.length?r.interrupt?t:R:b):n(U)}function v(U){return Sa(U)?(e.consume(U),o=String.fromCharCode(U),y):n(U)}function y(U){if(U===null||U===47||U===62||zr(U)){const ee=U===47,re=o.toLowerCase();return!ee&&!a&&vD.includes(re)?(i=1,r.interrupt?t(U):R(U)):Gye.includes(o.toLowerCase())?(i=6,ee?(e.consume(U),x):r.interrupt?t(U):R(U)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(U):a?_(U):S(U))}return U===45||ai(U)?(e.consume(U),o+=String.fromCharCode(U),y):n(U)}function x(U){return U===62?(e.consume(U),r.interrupt?t:R):n(U)}function _(U){return Bt(U)?(e.consume(U),_):T(U)}function S(U){return U===47?(e.consume(U),T):U===58||U===95||Sa(U)?(e.consume(U),w):Bt(U)?(e.consume(U),S):T(U)}function w(U){return U===45||U===46||U===58||U===95||ai(U)?(e.consume(U),w):N(U)}function N(U){return U===61?(e.consume(U),k):Bt(U)?(e.consume(U),N):S(U)}function k(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),c=U,C):Bt(U)?(e.consume(U),k):P(U)}function C(U){return U===c?(e.consume(U),c=null,L):U===null||ht(U)?n(U):(e.consume(U),C)}function P(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||zr(U)?N(U):(e.consume(U),P)}function L(U){return U===47||U===62||Bt(U)?S(U):n(U)}function T(U){return U===62?(e.consume(U),A):n(U)}function A(U){return U===null||ht(U)?R(U):Bt(U)?(e.consume(U),A):n(U)}function R(U){return U===45&&i===2?(e.consume(U),W):U===60&&i===1?(e.consume(U),G):U===62&&i===4?(e.consume(U),F):U===63&&i===3?(e.consume(U),$):U===93&&i===5?(e.consume(U),K):ht(U)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Yye,z,I)(U)):U===null||ht(U)?(e.exit("htmlFlowData"),I(U)):(e.consume(U),R)}function I(U){return e.check(Qye,M,z)(U)}function M(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),B}function B(U){return U===null||ht(U)?I(U):(e.enter("htmlFlowData"),R(U))}function W(U){return U===45?(e.consume(U),$):R(U)}function G(U){return U===47?(e.consume(U),o="",H):R(U)}function H(U){if(U===62){const ee=o.toLowerCase();return vD.includes(ee)?(e.consume(U),F):R(U)}return Sa(U)&&o.length<8?(e.consume(U),o+=String.fromCharCode(U),H):R(U)}function K(U){return U===93?(e.consume(U),$):R(U)}function $(U){return U===62?(e.consume(U),F):U===45&&i===2?(e.consume(U),$):R(U)}function F(U){return U===null||ht(U)?(e.exit("htmlFlowData"),z(U)):(e.consume(U),F)}function z(U){return e.exit("htmlFlow"),t(U)}}function Jye(e,t,n){const r=this;return i;function i(o){return ht(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function exe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(mx,t,n)}}const txe={name:"htmlText",tokenize:nxe};function nxe(e,t,n){const r=this;let i,a,o;return l;function l($){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume($),c}function c($){return $===33?(e.consume($),u):$===47?(e.consume($),N):$===63?(e.consume($),S):Sa($)?(e.consume($),P):n($)}function u($){return $===45?(e.consume($),f):$===91?(e.consume($),a=0,b):Sa($)?(e.consume($),_):n($)}function f($){return $===45?(e.consume($),m):n($)}function d($){return $===null?n($):$===45?(e.consume($),p):ht($)?(o=d,G($)):(e.consume($),d)}function p($){return $===45?(e.consume($),m):d($)}function m($){return $===62?W($):$===45?p($):d($)}function b($){const F="CDATA[";return $===F.charCodeAt(a++)?(e.consume($),a===F.length?v:b):n($)}function v($){return $===null?n($):$===93?(e.consume($),y):ht($)?(o=v,G($)):(e.consume($),v)}function y($){return $===93?(e.consume($),x):v($)}function x($){return $===62?W($):$===93?(e.consume($),x):v($)}function _($){return $===null||$===62?W($):ht($)?(o=_,G($)):(e.consume($),_)}function S($){return $===null?n($):$===63?(e.consume($),w):ht($)?(o=S,G($)):(e.consume($),S)}function w($){return $===62?W($):S($)}function N($){return Sa($)?(e.consume($),k):n($)}function k($){return $===45||ai($)?(e.consume($),k):C($)}function C($){return ht($)?(o=C,G($)):Bt($)?(e.consume($),C):W($)}function P($){return $===45||ai($)?(e.consume($),P):$===47||$===62||zr($)?L($):n($)}function L($){return $===47?(e.consume($),W):$===58||$===95||Sa($)?(e.consume($),T):ht($)?(o=L,G($)):Bt($)?(e.consume($),L):W($)}function T($){return $===45||$===46||$===58||$===95||ai($)?(e.consume($),T):A($)}function A($){return $===61?(e.consume($),R):ht($)?(o=A,G($)):Bt($)?(e.consume($),A):L($)}function R($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),i=$,I):ht($)?(o=R,G($)):Bt($)?(e.consume($),R):(e.consume($),M)}function I($){return $===i?(e.consume($),i=void 0,B):$===null?n($):ht($)?(o=I,G($)):(e.consume($),I)}function M($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||zr($)?L($):(e.consume($),M)}function B($){return $===47||$===62||zr($)?L($):n($)}function W($){return $===62?(e.consume($),e.exit("htmlTextData"),e.exit("htmlText"),t):n($)}function G($){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),H}function H($){return Bt($)?rn(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):K($)}function K($){return e.enter("htmlTextData"),o($)}}const $C={name:"labelEnd",resolveAll:oxe,resolveTo:sxe,tokenize:lxe},rxe={tokenize:cxe},ixe={tokenize:uxe},axe={tokenize:dxe};function oxe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&La(e,0,e.length,n),e}function sxe(e,t){let n=e.length,r=0,i,a,o,l;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const c={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[a][1].start},end:{...e[o][1].end}},f={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return l=[["enter",c,t],["enter",u,t]],l=Oi(l,e.slice(a+1,a+r+3)),l=Oi(l,[["enter",f,t]]),l=Oi(l,LC(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),l=Oi(l,[["exit",f,t],e[o-2],e[o-1],["exit",u,t]]),l=Oi(l,e.slice(o+1)),l=Oi(l,[["exit",c,t]]),La(e,a,e.length,l),e}function lxe(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return l;function l(p){return a?a._inactive?d(p):(o=r.parser.defined.includes(zc(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):n(p)}function c(p){return p===40?e.attempt(rxe,f,o?f:d)(p):p===91?e.attempt(ixe,f,o?u:d)(p):o?f(p):d(p)}function u(p){return e.attempt(axe,f,d)(p)}function f(p){return t(p)}function d(p){return a._balanced=!0,n(p)}}function cxe(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),i}function i(d){return zr(d)?qf(e,a)(d):a(d)}function a(d){return d===41?f(d):Jz(e,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function o(d){return zr(d)?qf(e,c)(d):f(d)}function l(d){return n(d)}function c(d){return d===34||d===39||d===40?t9(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):f(d)}function u(d){return zr(d)?qf(e,f)(d):f(d)}function f(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function uxe(e,t,n){const r=this;return i;function i(l){return e9.call(r,e,a,o,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(zc(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function o(l){return n(l)}}function dxe(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const fxe={name:"labelStartImage",resolveAll:$C.resolveAll,tokenize:hxe};function hxe(e,t,n){const r=this;return i;function i(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const pxe={name:"labelStartLink",resolveAll:$C.resolveAll,tokenize:mxe};function mxe(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const a1={name:"lineEnding",tokenize:gxe};function gxe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),rn(e,t,"linePrefix")}}const Zg={name:"thematicBreak",tokenize:vxe};function vxe(e,t,n){let r=0,i;return a;function a(u){return e.enter("thematicBreak"),o(u)}function o(u){return i=u,l(u)}function l(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||ht(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),Bt(u)?rn(e,l,"whitespace")(u):l(u))}}const Lr={continuation:{tokenize:wxe},exit:Sxe,name:"list",tokenize:bxe},yxe={partial:!0,tokenize:jxe},xxe={partial:!0,tokenize:_xe};function bxe(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(m){const b=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:AE(m)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Zg,n,u)(m):u(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(m)}return n(m)}function c(m){return AE(m)&&++o<10?(e.consume(m),c):(!r.interrupt||o<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),u(m)):n(m)}function u(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(mx,r.interrupt?n:f,e.attempt(yxe,p,d))}
vendor: 5,407 bytes, line 695
695function f(m){return r.containerState.initialBlankLine=!0,a++,p(m)}function d(m){return Bt(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function wxe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(mx,i,a);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,rn(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Bt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(xxe,t,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,rn(e,e.attempt(Lr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function _xe(e,t,n){const r=this;return rn(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function Sxe(e){e.exit(this.containerState.type)}function jxe(e,t,n){const r=this;return rn(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Bt(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const yD={name:"setextUnderline",resolveTo:Nxe,tokenize:Exe};function Nxe(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push(["exit",o,t]),e}function Exe(e,t,n){const r=this;let i;return a;function a(u){let f=r.events.length,d;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){d=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),i=u,o(u)):n(u)}function o(u){return e.enter("setextHeadingLineSequence"),l(u)}function l(u){return u===i?(e.consume(u),l):(e.exit("setextHeadingLineSequence"),Bt(u)?rn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||ht(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const kxe={tokenize:Oxe};function Oxe(e){const t=this,n=e.attempt(mx,r,e.attempt(this.parser.constructs.flowInitial,i,rn(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Rye,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Cxe={resolveAll:r9()},Axe=n9("string"),Pxe=n9("text");function n9(e){return{resolveAll:r9(e==="text"?Txe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,l);return o;function o(f){return u(f)?a(f):l(f)}function l(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return u(f)?(n.exit("data"),a(f)):(n.consume(f),c)}function u(f){if(f===null)return!0;const d=i[f];let p=-1;if(d)for(;++p<d.length;){const m=d[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function r9(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function Txe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,l=0,c;for(;a--;){const u=i[a];if(typeof u=="string"){for(o=u.length;u.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(u===-2)c=!0,l++;else if(u!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const u={type:n===e.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const Rxe={42:Lr,43:Lr,45:Lr,48:Lr,49:Lr,50:Lr,51:Lr,52:Lr,53:Lr,54:Lr,55:Lr,56:Lr,57:Lr,62:Yz},Ixe={91:$ye},Mxe={[-2]:i1,[-1]:i1,32:i1},Dxe={35:Hye,42:Zg,45:[yD,Zg],60:Kye,61:yD,95:Zg,96:gD,126:gD},Lxe={38:Xz,92:Qz},$xe={[-5]:a1,[-4]:a1,[-3]:a1,33:fxe,38:Xz,42:PE,60:[pye,txe],91:pxe,92:[Uye,Qz],93:$C,95:PE,96:kye},Fxe={null:[PE,Cxe]},Bxe={null:[42,95]},qxe={null:[]},Uxe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Bxe,contentInitial:Ixe,disable:qxe,document:Rxe,flow:Dxe,flowInitial:Mxe,insideSpan:Fxe,string:Lxe,text:$xe},Symbol.toStringTag,{value:"Module"}));function zxe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,c
vendor: 19,298 bytes, lines 695-701
695olumn:n&&n.column||1,offset:n&&n.offset||0};const i={},a=[];let o=[],l=[];const c={attempt:C(N),check:C(k),consume:_,enter:S,exit:w,interrupt:C(k,{interrupt:!0})},u={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:d};let f=t.tokenize.call(u,c);return t.resolveAll&&a.push(t),u;function d(A){return o=Oi(o,A),y(),o[o.length-1]!==null?[]:(P(t,0),u.events=LC(a,u.events,u),u.events)}function p(A,R){return Wxe(m(A),R)}function m(A){return Hxe(o,A)}function b(){const{_bufferIndex:A,_index:R,line:I,column:M,offset:B}=r;return{_bufferIndex:A,_index:R,line:I,column:M,offset:B}}function v(A){i[A.line]=A.column,T()}function y(){let A;for(;r._index<o.length;){const R=o[r._index];if(typeof R=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<R.length;)x(R.charCodeAt(r._bufferIndex));else x(R)}}function x(A){f=f(A)}function _(A){ht(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,T()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=A}function S(A,R){const I=R||{};return I.type=A,I.start=b(),u.events.push(["enter",I,u]),l.push(I),I}function w(A){const R=l.pop();return R.end=b(),u.events.push(["exit",R,u]),R}function N(A,R){P(A,R.from)}function k(A,R){R.restore()}function C(A,R){return I;function I(M,B,W){let G,H,K,$;return Array.isArray(M)?z(M):"tokenize"in M?z([M]):F(M);function F(X){return Z;function Z(ie){const Y=ie!==null&&X[ie],J=ie!==null&&X.null,se=[...Array.isArray(Y)?Y:Y?[Y]:[],...Array.isArray(J)?J:J?[J]:[]];return z(se)(ie)}}function z(X){return G=X,H=0,X.length===0?W:U(X[H])}function U(X){return Z;function Z(ie){return $=L(),K=X,X.partial||(u.currentConstruct=X),X.name&&u.parser.constructs.disable.null.includes(X.name)?re():X.tokenize.call(R?Object.assign(Object.create(u),R):u,c,ee,re)(ie)}}function ee(X){return A(K,$),B}function re(X){return $.restore(),++H<G.length?U(G[H]):W}}}function P(A,R){A.resolveAll&&!a.includes(A)&&a.push(A),A.resolve&&La(u.events,R,u.events.length-R,A.resolve(u.events.slice(R),u)),A.resolveTo&&(u.events=A.resolveTo(u.events,u))}function L(){const A=b(),R=u.previous,I=u.currentConstruct,M=u.events.length,B=Array.from(l);return{from:M,restore:W};function W(){r=A,u.previous=R,u.currentConstruct=I,u.events.length=M,l=B,T()}}function T(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Hxe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Wxe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=` 696`;break}case-3:{o=`\r 697`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}function Vxe(e){const r={constructs:Jve([Uxe,...(e||{}).extensions||[]]),content:i(sye),defined:[],document:i(cye),flow:i(kxe),lazy:{},string:i(Axe),text:i(Pxe)};return r;function i(a){return o;function o(l){return zxe(r,a,l)}}}function Gxe(e){for(;!Zz(e););return e}const xD=/[\0\t\n\r]/g;function Kxe(){let e=1,t="",n=!0,r;return i;function i(a,o,l){const c=[];let u,f,d,p,m;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),d=0,t="",n&&(a.charCodeAt(0)===65279&&d++,n=void 0);d<a.length;){if(xD.lastIndex=d,u=xD.exec(a),p=u&&u.index!==void 0?u.index:a.length,m=a.charCodeAt(p),!u){t=a.slice(d);break}if(m===10&&d===p&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<p&&(c.push(a.slice(d,p)),e+=p-d),m){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=p+1}return l&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Yxe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qxe(e){return e.replace(Yxe,Xxe)}function Xxe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Kz(n.slice(a?2:1),a?16:10)}return DC(n)||e}const i9={}.hasOwnProperty;function Zxe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Jxe(n)(Gxe(Vxe(n).document().write(Kxe()(e,t,!0))))}function Jxe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(oe),autolinkProtocol:L,autolinkEmail:L,atxHeading:a(Ne),blockQuote:a(J),characterEscape:L,characterReference:L,codeFenced:a(se),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(se,o),codeText:a(V,o),codeTextData:L,data:L,codeFlowValue:L,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ce),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(je,o),htmlFlowData:L,htmlText:a(je,o),htmlTextData:L,image:a(te),label:o,link:a(oe),listItem:a(ye),listItemValue:p,listOrdered:a(le,d),listUnordered:a(le),paragraph:a(xe),reference:U,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ne),strong:a(Ce),thematicBreak:a(Re)},exit:{atxHeading:c(),atxHeadingSequence:N,autolink:c(),autolinkEmail:Y,autolinkProtocol:ie,blockQuote:c(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:X,characterReference:Z,codeFenced:c(y),codeFencedFence:v,codeFencedFenceInfo:m,codeFencedFenceMeta:b,codeFlowValue:T,codeIndented:c(x),codeText:c(B),codeTextData:T,data:T,definition:c(),definitionDestinationString:w,definitionLabelString:_,definitionTitleString:S,emphasis:c(),hardBreakEscape:c(R),hardBreakTrailing:c(R),htmlFlow:c(I),htmlFlowData:T,htmlText:c(M),htmlTextData:T,image:c(G),label:K,labelText:H,lineEnding:A,link:c(W),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ee,resourceDestinationString:$,resourceTitleString:F,resource:z,setextHeading:c(P),setextHeadingLineSequence:C,setextHeadingText:k,strong:c(),thematicBreak:c()}};a9(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ge){let ke={type:"root",children:[]};const De={stack:[ke],tokenStack:[],config:t,enter:l,exit:u,buffer:o,resume:f,data:n},at=[];let tt=-1;for(;++tt<ge.length;)if(ge[tt][1].type==="listOrdered"||ge[tt][1].type==="listUnordered")if(ge[tt][0]==="enter")at.push(tt);else{const Ae=at.pop();tt=i(ge,Ae,tt)}for(tt=-1;++tt<ge.length;){const Ae=t[ge[tt][0]];i9.call(Ae,ge[tt][1].type)&&Ae[ge[tt][1].type].call(Object.assign({sliceSerialize:ge[tt][2].sliceSerialize},De),ge[tt][1])}if(De.tokenStack.length>0){const Ae=De.tokenStack[De.tokenStack.length-1];(Ae[1]||bD).call(De,void 0,Ae[0])}for(ke.position={start:zo(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:zo(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)ke=t.transforms[tt](ke)||ke;return ke}function i(ge,ke,De){let at=ke-1,tt=-1,Ae=!1,_t,Pt,rt,Ui;for(;++at<=De;){const Tt=ge[at];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?tt++:tt--,Ui=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(_t&&!Ui&&!tt&&!rt&&(rt=at),Ui=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ui=void 0}if(!tt&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||tt===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(_t){let fi=at;for(Pt=void 0;fi--;){const vr=ge[fi];if(vr[1].type==="lineEnding"||vr[1].type==="lineEndingBlank"){if(vr[0]==="exit")continue;Pt&&(ge[Pt][1].type="lineEndingBlank",Ae=!0),vr[1].type="lineEnding",Pt=fi}else if(!(vr[1].type==="linePrefix"||vr[1].type==="blockQuotePrefix"||vr[1].type==="blockQuotePrefixWhitespace"||vr[1].type==="blockQuoteMarker"||vr[1].type==="listItemIndent"))break}rt&&(!Pt||rt<Pt)&&(_t._spread=!0),_t.end=Object.assign({},Pt?ge[Pt][1].start:Tt[1].end),ge.splice(Pt||at,0,["exit",_t,Tt[2]]),at++,De++}if(Tt[1].type==="listItemPrefix"){const fi={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};_t=fi,ge.splice(at,0,["enter",fi,Tt[2]]),at++,De++,rt=void 0,Ui=!0}}}return ge[ke][1]._spread=Ae,De}function a(ge,ke){return De;function De(at){l.call(this,ge(at),at),ke&&ke.call(this,at)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(ge,ke,De){this.stack[this.stack.length-1].children.push(ge),this.stack.push(ge),this.tokenStack.push([ke,De||void 0]),ge.position={start:zo(ke.start),end:void 0}}function c(ge){return ke;function ke(De){ge&&ge.call(this,De),u.call(this,De)}}function u(ge,ke){const De=this.stack.pop(),at=this.tokenStack.pop();if(at)at[0].type!==ge.type&&(ke?ke.call(this,ge,at[0]):(at[1]||bD).call(this,ge,at[0]));else throw new Error("Cannot close `"+ge.type+"` ("+Bf({start:ge.start,end:ge.end})+"): itâs not open");De.position.end=zo(ge.end)}function f(){return Xve(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(ge){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(ge),10),this.data.expectingFirstListItemValue=void 0}}function m(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=ge}function b(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=ge}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge.replace(/(\r?\n|\r)$/g,"")}function _(ge){const ke=this.resume(),De=this.stack[this.stack.length-1];De.label=ke,De.identifier=zc(this.sliceSerialize(ge)).toLowerCase()}function S(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ge}function w(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ge}function N(ge){const ke=this.stack[this.stack.length-1];if(!ke.depth){const De=this.sliceSerialize(ge).length;ke.depth=De}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function C(ge){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(ge).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function L(ge){const De=this.stack[this.stack.length-1].children;let at=De[De.length-1];(!at||at.type!=="text")&&(at=Be(),at.position={start:zo(ge.start),end:void 0},De.push(at)),this.stack.push(at)}function T(ge){const ke=this.stack.pop();ke.value+=this.sliceSerialize(ge),ke.position.end=zo(ge.end)}function A(ge){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const De=ke.children[ke.children.length-1];De.position.end=zo(ge.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ke.type)&&(L.call(this,ge),T.call(this,ge))}function R(){this.data.atHardBreak=!0}function I(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function M(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function B(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.value=ge}function W(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=ke,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function G(){const ge=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";ge.type+="Reference",ge.referenceType=ke,delete ge.url,delete ge.title}else delete ge.identifier,delete ge.label;this.data.referenceType=void 0}function H(ge){const ke=this.sliceSerialize(ge),De=this.stack[this.stack.length-2];De.label=Qxe(ke),De.identifier=zc(ke).toLowerCase()}function K(){const ge=this.stack[this.stack.length-1],ke=this.resume(),De=this.stack[this.stack.length-1];if(this.data.inReference=!0,De.type==="link"){const at=ge.children;De.children=at}else De.alt=ke}function $(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.url=ge}function F(){const ge=this.resume(),ke=this.stack[this.stack.length-1];ke.title=ge}function z(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function ee(ge){const ke=this.resume(),De=this.stack[this.stack.length-1];De.label=ke,De.identifier=zc(this.sliceSerialize(ge)).toLowerCase(),this.data.referenceType="full"}function re(ge){this.data.characterReferenceType=ge.type}function X(ge){const ke=this.sliceSerialize(ge),De=this.data.characterReferenceType;let at;De?(at=Kz(ke,De==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):at=DC(ke);const tt=this.stack[this.stack.length-1];tt.value+=at}function Z(ge){const ke=this.stack.pop();ke.position.end=zo(ge.end)}function ie(ge){T.call(this,ge);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(ge)}function Y(ge){T.call(this,ge);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(ge)}function J(){return{type:"blockquote",children:[]}}function se(){return{type:"code",lang:null,meta:null,value:""}}function V(){return{type:"inlineCode",value:""}}function fe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ce(){return{type:"emphasis",children:[]}}function Ne(){return{type:"heading",depth:0,children:[]}}function me(){return{type:"break"}}function je(){return{type:"html",value:""}}function te(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function le(ge){return{type:"list",ordered:ge.type==="listOrdered",start:null,spread:ge._spread,children:[]}}function ye(ge){return{type:"listItem",spread:ge._spread,checked:null,children:[]}}function xe(){return{type:"paragraph",children:[]}}function Ce(){return{type:"strong",children:[]}}function Be(){return{type:"text",value:""}}function Re(){return{type:"thematicBreak"}}}function zo(e){return{line:e.line,column:e.column,offset:e.offset}}function a9(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?a9(e,r):e0e(e,r)}}function e0e(e,t){let n;for(n in t)if(i9.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function bD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Bf({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Bf({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Bf({start:t.start,end:t.end})+") is still open")}function t0e(e){const t=this;t.parser=n;function n(r){return Zxe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function n0e(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function r0e(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:` 698`}]}function i0e(e,t){const n=t.value?t.value+` 699`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function a0e(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function o0e(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function s0e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=id(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,l+=1,e.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function l0e(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c0e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function o9(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function u0e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return o9(e,t);const i={src:id(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function d0e(e,t){const n={src:id(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function f0e(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function h0e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return o9(e,t);const i={href:id(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function p0e(e,t){const n={href:id(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function m0e(e,t,n){const r=e.all(t),i=n?g0e(n):s9(t),a={},o=[];if(typeof t.checked=="boolean"){const f=r[0];let d;f&&f.type==="element"&&f.tagName==="p"?d=f:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:` 700`}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:` 701`});const u={type:"element",tagName:"li",properties:a,children:o};
vendor: 6,138 bytes, line 701
701return e.patch(t,u),e.applyData(t,u)}function g0e(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=s9(n[r])}return t}function s9(e){const t=e.spread;return t??e.children.length>1}function v0e(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function y0e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function x0e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function b0e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function w0e(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=TC(t.children[1]),c=qz(t.children[t.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function _0e(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:t.children.length;let c=-1;const u=[];for(;++c<l;){const d=t.children[c],p={},m=o?o[c]:void 0;m&&(p.align=m);let b={type:"element",tagName:a,properties:p,children:[]};d&&(b.children=e.all(d),e.patch(d,b),b=e.applyData(d,b)),u.push(b)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,f),e.applyData(t,f)}function S0e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const wD=9,_D=32;function j0e(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(SD(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(SD(t.slice(i),i>0,!1)),a.join("")}function SD(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===wD||a===_D;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===wD||a===_D;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function N0e(e,t){const n={type:"text",value:j0e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function E0e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const k0e={blockquote:n0e,break:r0e,code:i0e,delete:a0e,emphasis:o0e,footnoteReference:s0e,heading:l0e,html:c0e,imageReference:u0e,image:d0e,inlineCode:f0e,linkReference:h0e,link:p0e,listItem:m0e,list:v0e,paragraph:y0e,root:x0e,strong:b0e,table:w0e,tableCell:S0e,tableRow:_0e,text:N0e,thematicBreak:E0e,toml:fg,yaml:fg,definition:fg,footnoteDefinition:fg};function fg(){}const l9=-1,gx=0,Uf=1,Ov=2,FC=3,BC=4,qC=5,UC=6,c9=7,u9=8,jD=typeof self=="object"?self:globalThis,O0e=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case gx:case l9:return n(o,i);case Uf:{const l=n([],i);for(const c of o)l.push(r(c));return l}case Ov:{const l=n({},i);for(const[c,u]of o)l[r(c)]=r(u);return l}case FC:return n(new Date(o),i);case BC:{const{source:l,flags:c}=o;return n(new RegExp(l,c),i)}case qC:{const l=n(new Map,i);for(const[c,u]of o)l.set(r(c),r(u));return l}case UC:{const l=n(new Set,i);for(const c of o)l.add(r(c));return l}case c9:{const{name:l,message:c}=o;return n(new jD[l](c),i)}case u9:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new jD[a](o),i)};return r},ND=e=>O0e(new Map,e)(0),Nc="",{toString:C0e}={},{keys:A0e}=Object,pf=e=>{const t=typeof e;if(t!=="object"||!e)return[gx,t];const n=C0e.call(e).slice(8,-1);switch(n){case"Array":return[Uf,Nc];case"Object":return[Ov,Nc];case"Date":return[FC,Nc];case"RegExp":return[BC,Nc];case"Map":return[qC,Nc];case"Set":return[UC,Nc];case"DataView":return[Uf,n]}return n.includes("Array")?[Uf,n]:n.includes("Error")?[c9,n]:[Ov,n]},hg=([e,t])=>e===gx&&(t==="function"||t==="symbol"),P0e=(e,t,n,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return n.set(l,c),c},a=o=>{if(n.has(o))return n.get(o);let[l,c]=pf(o);switch(l){case gx:{let f=o;switch(c){case"bigint":l=u9,f=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([l9],o)}return i([l,f],o)}case Uf:{if(c){let p=o;return c==="DataView"?p=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(o)),i([c,[...p]],o)}const f=[],d=i([l,f],o);for(const p of o)f.push(a(p));return d}case Ov:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const f=[],d=i([l,f],o);for(const p of A0e(o))(e||!hg(pf(o[p])))&&f.push([a(p),a(o[p])]);return d}case FC:return i([l,o.toISOString()],o);case BC:{const{source:f,flags:d}=o;return i([l,{source:f,flags:d}],o)}case qC:{const f=[],d=i([l,f],o);for(const[p,m]of o)(e||!(hg(pf(p))||hg(pf(m))))&&f.push([a(p),a(m)]);return d}case UC:{const f=[],d=i([l,f],o);for(const p of o)(e||!hg(pf(p)))&&f.push(a(p));return d}}const{message:u}=o;return i([l,{name:c,message:u}],o)};return a},ED=(e,{json:t,lossy:n}={})=>{const r=[];return P0e(!(t||n),!!t,new Map,r)(e),r},Cv=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ND(ED(e,t)):structuredClone(e):(e,t)=>ND(ED(e,t));function T0e(e,t){const n=[{type:"text",value:"â©"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function R0e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}
vendor: 4,262 bytes, lines 701-703
701function I0e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||T0e,r=e.options.footnoteBackLabel||R0e,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const f=e.all(u),d=String(u.identifier).toUpperCase(),p=id(d.toLowerCase());let m=0;const b=[],v=e.footnoteCounts.get(d);for(;v!==void 0&&++m<=v;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,m);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,m),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const y=f[f.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const _=y.children[y.children.length-1];_&&_.type==="text"?_.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...b)}else f.push(...b);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(u,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Cv(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:` 702`},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:` 703`}]}}const d9=(function(e){if(e==null)return $0e;if(typeof e=="function")return vx(e);if(typeof e=="object")return Array.isArray(e)?M0e(e):D0e(e);if(typeof e=="string")return L0e(e);throw new Error("Expected function, string, or object as test")});function M0e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=d9(e[n]);return vx(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function D0e(e){const t=e;return vx(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function L0e(e){return vx(t);function t(n){return n&&n.type===e}}function vx(e){return t;function t(n,r,i){return!!(F0e(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function $0e(){return!0}function F0e(e){return e!==null&&typeof e=="object"&&"type"in e}const f9=[],B0e=!0,kD=!1,q0e="skip";function U0e(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=d9(i),o=r?-1:1;l(e,void 0,[])();function l(c,u,f){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const m=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(c.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=f9,b,v,y;if((!t||a(c,u,f[f.length-1]||void 0))&&(m=z0e(n(c,f)),m[0]===kD))return m;if("children"in c&&c.children){const x=c;if(x.children&&m[0]!==q0e)for(v=(r?x.children.length:-1)+o,y=f.concat(x);v>-1&&v<x.children.length;){const _=x.children[v];if(b=l(_,v,y)(),b[0]===kD)return b;v=typeof b[1]=="number"?b[1]:v+o}}return m}}}function z0e(e){return Array.isArray(e)?e:typeof e=="number"?[B0e,e]:e==null?f9:[e]}function h9(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),U0e(e,a,l,i);function l(c,u){const f=u[u.length-1],d=f?f.children.indexOf(c):void 0;return o(c,d,f)}}const TE={}.hasOwnProperty,H0e={};function W0e(e,t){const n=t||H0e,r=new Map,i=new Map,a=new Map,o={...k0e,...n.handlers},l={all:u,applyData:G0e,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:c,options:n,patch:V0e,wrap:Y0e};return h9(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const d=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();d.has(p)||d.set(p,f)}}),l;function c(f,d){const p=f.type,m=l.handlers[p];if(TE.call(l.handlers,p)&&m)return m(l,f,d);if(l.options.passThrough&&l.options.passThrough.includes(p)){if("children"in f){const{children:v,...y}=f,x=Cv(y);return x.children=l.all(f),x}return Cv(f)}return(l.options.unknownHandler||K0e)(l,f,d)}function u(f){const d=[];if("children"in f){const p=f.children;let m=-1;for(;++m<p.length;){const b=l.one(p[m],f);
vendor: 12,282 bytes, lines 703-707
703if(b){if(m&&p[m-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=OD(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=OD(v.value))}Array.isArray(b)?d.push(...b):d.push(b)}}}return d}}function V0e(e,t){e.position&&(t.position=Cve(e))}function G0e(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Cv(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function K0e(e,t){const n=t.data||{},r="value"in t&&!(TE.call(n,"hProperties")||TE.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Y0e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:` 704`});++r<e.length;)r&&n.push({type:"text",value:` 705`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:` 706`}),n}function OD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function CD(e,t){const n=W0e(e,t),r=n.one(e,void 0),i=I0e(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:` 707`},i),a}function Q0e(e,t){return e&&"run"in e?async function(n,r){const i=CD(n,{file:r,...t});await e.run(i,r)}:function(n,r){return CD(n,{file:r,...e||t})}}function AD(e){if(e)throw e}var o1,PD;function X0e(){if(PD)return o1;PD=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},a=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var f=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!f&&!d)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},o=function(u,f){n&&f.name==="__proto__"?n(u,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):u[f.name]=f.newValue},l=function(u,f){if(f==="__proto__")if(e.call(u,f)){if(r)return r(u,f).value}else return;return u[f]};return o1=function c(){var u,f,d,p,m,b,v=arguments[0],y=1,x=arguments.length,_=!1;for(typeof v=="boolean"&&(_=v,v=arguments[1]||{},y=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});y<x;++y)if(u=arguments[y],u!=null)for(f in u)d=l(v,f),p=l(u,f),v!==p&&(_&&p&&(a(p)||(m=i(p)))?(m?(m=!1,b=d&&i(d)?d:[]):b=d&&a(d)?d:{},o(v,{name:f,newValue:c(_,b,p)})):typeof p<"u"&&o(v,{name:f,newValue:p}));return v},o1}var Z0e=X0e();const s1=Mt(Z0e);function RE(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function J0e(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...u){const f=e[++a];let d=-1;if(c){o(c);return}for(;++d<i.length;)(u[d]===null||u[d]===void 0)&&(u[d]=i[d]);i=u,f?ebe(f,l)(...u):o(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function ebe(e,t){let n;return r;function r(...o){const l=e.length>o.length;let c;l&&o.push(i);try{c=e.apply(this,o)}catch(u){const f=u;if(l&&n)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(a,i):c instanceof Error?i(c):a(c))}function i(o,...l){n||(n=!0,t(o,...l))}function a(o){i(null,o)}}const ya={basename:tbe,dirname:nbe,extname:rbe,join:ibe,sep:"/"};function tbe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jp(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,l=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),l>-1&&(e.codePointAt(i)===t.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function nbe(e){if(jp(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function rbe(e){jp(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const l=e.codePointAt(t);if(l===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),l===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function ibe(...e){let t=-1,n;for(;++t<e.length;)jp(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":abe(n)}function abe(e){jp(e);const t=e.codePointAt(0)===47;let n=obe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function obe(e,t){let n="",r=0,i=-1,a=0,o=-1,l,c;for(;++o<=e.length;){if(o<e.length)l=e.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else l===46&&a>-1?a++:a=-1}return n}function jp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sbe={cwd:lbe};function lbe(){return"/"}function IE(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function cbe(e){if(typeof e=="string")e=new URL(e);else if(!IE(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return ube(e)}function ube(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const l1=["history","path","basename","stem","extname","dirname"];class p9{constructor(t){let n;t?IE(t)?n={path:t}:typeof t=="string"||dbe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sbe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<l1.length;){const a=l1[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)l1.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ya.basename(this.path):void 0}set basename(t){u1(t,"basename"),c1(t,"basename"),this.path=ya.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?ya.dirname(this.path):void 0}set dirname(t){TD(this.basename,"dirname"),this.path=ya.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?ya.extname(this.path):void 0}set extname(t){if(c1(t,"extname"),TD(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ya.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){IE(t)&&(t=cbe(t)),u1(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?ya.basename(this.path,this.extname):void 0}set stem(t){u1(t,"stem"),c1(t,"stem"),this.path=ya.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new gr(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function c1(e,t){if(e&&e.includes(ya.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+ya.sep+"`")}function u1(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function TD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function dbe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const fbe=(function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),hbe={}.hasOwnProperty;class zC extends fbe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=J0e()}copy(){const t=new zC;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(s1(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(h1("data",this.frozen),this.namespace[t]=n,this):hbe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(h1("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=pg(t),r=this.parser||this.Parser;return d1("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),d1("process",this.parser||this.Parser),f1("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const l=pg(t),c=r.parse(l);r.run(c,l,function(f,d,p){if(f||!d||!p)return u(f);const m=d,b=r.stringify(m,p);gbe(b)?p.value=b:p.result=b,u(f,p)});function u(f,d){f||!d?o(f):a?a(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),d1("processSync",this.parser||this.Parser),f1("processSync",this.compiler||this.Compiler),this.process(t,i),ID("processSync","process",n),r;function i(a,o){n=!0,AD(a),r=o}}run(t,n,r){RD(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,l){const c=pg(n);i.run(t,c,u);function u(f,d,p){const m=d||t;f?l(f):o?o(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),ID("runSync","run",r),i;function a(o,l){AD(o),i=l,r=!0}}stringify(t,n){this.freeze();const r=pg(n),i=this.compiler||this.Compiler;return f1("stringify",i),RD(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(h1("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[f,...d]=u;c(f,d)}else o(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function o(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(u.plugins),u.settings&&(i.settings=s1(!0,i.settings,u.settings))}function l(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){const d=u[f];a(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,f){let d=-1,p=-1;for(;++d<r.length;)if(r[d][0]===u){p=d;break}if(p===-1)r.push([u,...f]);else if(f.length>0){let[m,...b]=f;
707const v=r[p][1];RE(v)&&RE(m)&&(m=s1(!0,v,m)),r[p]=[u,m,...b]}}}}const pbe=new zC().freeze();function d1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function f1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function h1(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function RD(e){if(!RE(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ID(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function pg(e){return mbe(e)?e:new p9(e)}function mbe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gbe(e){return typeof e=="string"||vbe(e)}function vbe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ybe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",MD=[],DD={allowDangerousHtml:!0},xbe=/^(https?|ircs?|mailto|xmpp)$/i,bbe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function wbe(e){const t=_be(e),n=Sbe(e);return jbe(t.runSync(t.parse(n),n),e)}function _be(e){const t=e.rehypePlugins||MD,n=e.remarkPlugins||MD,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...DD}:DD;return pbe().use(t0e).use(n).use(Q0e,r).use(t)}function Sbe(e){const t=e.children||"",n=new p9;return typeof t=="string"&&(n.value=t),n}function jbe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,l=t.unwrapDisallowed,c=t.urlTransform||Nbe;for(const f of bbe)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+ybe+f.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),h9(e,u),Ive(e,{Fragment:s.Fragment,components:i,ignoreInvalidStyle:!0,jsx:s.jsx,jsxs:s.jsxs,passKeys:!0,passNode:!0});function u(f,d,p){if(f.type==="raw"&&p&&typeof d=="number")return o?p.children.splice(d,1):p.children[d]={type:"text",value:f.value},d;if(f.type==="element"){let m;for(m in r1)if(Object.hasOwn(r1,m)&&Object.hasOwn(f.properties,m)){const b=f.properties[m],v=r1[m];(v===null||v.includes(f.tagName))&&(f.properties[m]=c(String(b||""),m,f))}}if(f.type==="element"){let m=n?!n.includes(f.tagName):a?a.includes(f.tagName):!1;if(!m&&r&&typeof d=="number"&&(m=!r(f,d,p)),m&&p&&typeof d=="number")return l&&f.children?p.children.splice(d,1,...f.children):p.children.splice(d,1),d}}}function Nbe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||xbe.test(e.slice(0,t))?e:""}function Ebe({message:e}){const t=e.role==="user",n=e.content||"";return s.jsx("div",{className:et("flex gap-3 mb-3",t?"justify-end":"justify-start"),children:s.jsx("div",{className:et("max-w-[80%] md:max-w-[70%]",t&&"flex flex-col items-end"),children:s.jsx("div",{className:et("rounded-2xl px-4 py-2.5 text-sm",t?"bg-slate-800 text-white":"bg-white border border-slate-200"),children:s.jsx(wbe,{components:{code:({inline:r,className:i,children:a,...o})=>r?s.jsx("code",{className:"px-1 py-0.5 rounded bg-slate-100 text-slate-700 text-xs",children:a}):s.jsxs("div",{className:"relative",children:[s.jsx("pre",{className:"bg-slate-900 text-slate-100 rounded-lg p-3 overflow-x-auto my-2",children:s.jsx("code",{className:i,...o,children:a})}),s.jsx(be,{size:"icon",variant:"ghost",className:"absolute top-2 right-2 h-6 w-6 bg-slate-800 hover:bg-slate-700",onClick:()=>navigator.clipboard.writeText(String(a).replace(/\n$/,"")),children:s.jsx(lp,{className:"h-3 w-3 text-slate-300"})})]})},children:n})})})})}
707const mg=[{agent_name:"app_guide",display_name:"Apollo Guide",welcome_message:"Hi! I can help you use Apollo Clinics. What would you like to do?",disclaimer:""},{agent_name:"practice_insights",display_name:"Practice Insights",welcome_message:"Ask me about patients, appointments, revenue, and trends. For example: 'Compare patient retention this month vs last month.'",disclaimer:""},{agent_name:"clinical_navigator",display_name:"Clinical Navigator",welcome_message:"Clinical support ready. Ask evidence-based questions. Iâll include a brief disclaimer and cite reputable sources when possible.",disclaimer:"For clinical decision support only; not medical advice."}];function kbe(){const[e,t]=E.useState(!1),[n,r]=E.useState([]),[i,a]=E.useState("app_guide"),[o,l]=E.useState(null),[c,u]=E.useState([]),[f,d]=E.useState(""),p=E.useRef(null);E.useEffect(()=>((async()=>{var _,S;let x=!1;try{x=await ve.auth.isAuthenticated()}catch{x=!1}if(!x){const w=mg.map((N,k)=>({...N,enabled:!0,order:k}));r(w),a(((_=w[0])==null?void 0:_.agent_name)||"app_guide");return}try{let w=await jr.AgentSettings.list();!w||w.length===0?w=mg.map((N,k)=>({...N,enabled:!0,order:k})):w=w.filter(N=>N.enabled!==!1).map(N=>({...mg.find(C=>C.agent_name===N.agent_name),...N})).sort((N,k)=>(N.order||0)-(k.order||0)),r(w),w.length>0?a(w[0].agent_name):a("app_guide")}catch{const N=mg.map((k,C)=>({...k,enabled:!0,order:C}));r(N),a(((S=N[0])==null?void 0:S.agent_name)||"app_guide")}})(),()=>{p.current&&p.current()}),[]);const m=E.useMemo(()=>n.find(y=>y.agent_name===i),[n,i]),b=async y=>{p.current&&(p.current(),p.current=null);const x=await e1.agentSDK.createConversation({agent_name:y,metadata:{name:`Chat - ${new Date().toLocaleString()}`}});l(x),u(x.messages||[]),p.current=e1.agentSDK.subscribeToConversation(x.id,S=>{u(S.messages||[])});const _=m==null?void 0:m.welcome_message;_&&(!x.messages||x.messages.length===0)&&u([{id:"welcome",role:"assistant",content:_}])};E.useEffect(()=>{e&&i&&b(i)},[e,i]);const v=async()=>{const y=f.trim();!y||!o||(d(""),await e1.agentSDK.addMessage(o,{role:"user",content:y}))};return s.jsxs(s.Fragment,{children:[s.jsx("button",{onClick:()=>t(!0),className:"fixed bottom-5 right-5 z-[70] rounded-full w-12 h-12 bg-[#006e74] text-white shadow-lg hover:bg-[#005a60] flex items-center justify-center","aria-label":"Open AI Assistant",children:s.jsx(wN,{className:"w-6 h-6"})}),s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"sm:max-w-[700px] p-0 overflow-hidden",children:[s.jsx(En,{className:"p-4 border-b",children:s.jsxs(kn,{className:"flex items-center justify-between w-full",children:[s.jsx("span",{children:"AI Assistants"}),s.jsxs("a",{href:window.location.origin+"/#"+encodeURIComponent("AdminAgents"),className:"text-slate-500 hover:text-slate-700 flex items-center gap-1 text-xs",onClick:()=>t(!1),children:[s.jsx(ou,{className:"w-4 h-4"})," Manage"]})]})}),s.jsx("div",{className:"p-3 border-b",children:s.jsx(fv,{value:i,onValueChange:a,children:s.jsx(HO,{className:"grid w-full grid-cols-3",children:n.map(y=>s.jsx(Bc,{value:y.agent_name,className:"text-xs",children:y.display_name},y.agent_name))})})}),s.jsx("div",{className:"max-h-[55vh] overflow-y-auto p-4 bg-slate-50",children:c.map((y,x)=>s.jsx(Ebe,{message:y},y.id||x))}),(m==null?void 0:m.disclaimer)&&s.jsx("div",{className:"px-4 pt-2 text-[11px] text-slate-500 bg-slate-50",children:m.disclaimer}),s.jsxs("div",{className:"p-3 border-t bg-white flex gap-2",children:[s.jsx(Te,{placeholder:"Type your question...",value:f,onChange:y=>d(y.target.value),onKeyDown:y=>y.key==="Enter"?v():null}),s.jsxs(be,{onClick:v,className:"bg-[#006e74] hover:bg-[#005a60]",children:[s.jsx(Qf,{className:"w-4 h-4 mr-1"})," Send"]})]})]})})]})}function LD(){const e=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,t=navigator.standalone===!0;return e||t}function $D(){const e=navigator.userAgent||navigator.vendor||"",t=/iPad|iPhone|iPod/.test(e)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,n=/Android/.test(e),r=/^((?!chrome|android).)*safari/i.test(e);return{isIOS:t,isAndroid:n,isSafari:r}}function Obe({currentPageName:e,role:t,userId:n}){const[r,i]=ne.useState(!1),[a,o]=ne.useState(null),[l,c]=ne.useState(!1);if(ne.useEffect(()=>{c(LD());const m=b=>(b.preventDefault(),o(b),!1);return window.addEventListener("beforeinstallprompt",m),()=>window.removeEventListener("beforeinstallprompt",m)},[]),ne.useEffect(()=>{if(LD())return;const{isIOS:m,isAndroid:b}=$D(),v=n?`pwa_prompt_${n}`:"pwa_prompt_anon",y=`${v}_patient_seen`,x=`${v}_patient_exercises_seen`,_=`${v}_practitioner_last_shown`;let S=!1;t==="patient"?(localStorage.getItem(y)||(S=!0,localStorage.setItem(y,"1")),!S&&e==="MyExercises"&&(localStorage.getItem(x)||(S=!0,localStorage.setItem(x,"1")))):t==="practitioner"?(S=!0,localStorage.setItem(_,String(Date.now()))):localStorage.getItem(v)||(S=!0,localStorage.setItem(v,"1")),S&&(m||b)&&i(!0)},[e,t,n]),!r||l)return null;const{isIOS:u,isAndroid:f,isSafari:d}=$D(),p=async()=>
707{if(a){a.prompt();const{outcome:m}=await a.userChoice;m==="accepted"&&i(!1),o(null)}else i(!0)};return s.jsx("div",{className:"fixed bottom-3 inset-x-3 z-50",children:s.jsx("div",{className:"rounded-xl shadow-xl bg-white border p-4 md:p-5",children:s.jsx("div",{className:"flex items-start gap-3",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[s.jsx("h4",{className:"font-semibold text-slate-900",children:"Add Apollo Clinics to your home screen"}),s.jsx("button",{className:"text-slate-500 hover:text-slate-700",onClick:()=>i(!1),"aria-label":"Close",children:s.jsx(Cr,{className:"w-4 h-4"})})]}),f&&s.jsxs("div",{className:"text-sm text-slate-700 space-y-2",children:[s.jsx("p",{children:"For quick access, install the app:"}),s.jsxs("ol",{className:"list-decimal ml-5 space-y-1",children:[s.jsx("li",{children:"Tap the browser menu (â®)"}),s.jsx("li",{children:"Select âInstall appâ or âAdd to Home screenâ"})]}),s.jsx("div",{className:"mt-2",children:s.jsxs(be,{size:"sm",className:"gap-2",onClick:p,children:[s.jsx(Fu,{className:"w-4 h-4"})," Install"]})})]}),u&&s.jsx("div",{className:"text-sm text-slate-700 space-y-2",children:d?s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"Install this app for a better full-screen experience:"}),s.jsxs("ol",{className:"list-decimal ml-5 space-y-1",children:[s.jsx("li",{children:"Tap the Share icon in Safari"}),s.jsx("li",{children:"Select âAdd to Home Screenâ"}),s.jsx("li",{children:"Tap Add"})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{children:"On iPhone/iPad, install via Safari:"}),s.jsxs("ol",{className:"list-decimal ml-5 space-y-1",children:[s.jsx("li",{children:"Open this link in Safari"}),s.jsx("li",{children:"Tap Share â âAdd to Home Screenâ"})]}),s.jsx("div",{className:"mt-2",children:s.jsxs(be,{size:"sm",variant:"outline",className:"gap-2",onClick:()=>{navigator.clipboard.writeText(window.location.href)},children:[s.jsx(lp,{className:"w-4 h-4"})," Copy link"]})})]})})]})})})})}const m9=B8,Cbe=q8,g9=E.forwardRef(({className:e,...t},n)=>s.jsx(Gy,{className:et("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));g9.displayName=Gy.displayName;const Abe=ap("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),HC=E.forwardRef(({side:e="right",className:t,children:n,...r},i)=>s.jsxs(Cbe,{children:[s.jsx(g9,{}),s.jsxs(Ky,{ref:i,className:et(Abe({side:e}),t),...r,children:[s.jsxs(U8,{className:"absolute right-4 top-4 roun
707ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[s.jsx(Cr,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));HC.displayName=Ky.displayName;const WC=({className:e,...t})=>s.jsx("div",{className:et("flex flex-col space-y-2 text-center sm:text-left",e),...t});WC.displayName="SheetHeader";const VC=E.forwardRef(({className:e,...t},n)=>s.jsx(Yy,{ref:n,className:et("text-lg font-semibold text-foreground",e),...t}));VC.displayName=Yy.displayName;const Pbe=E.forwardRef(({className:e,...t},n)=>s.jsx(Qy,{ref:n,className:et("text-sm text-muted-foreground",e),...t}));Pbe.displayName=Qy.displayName;function Tbe({children:e,currentPageName:t}){const n=Ba(),r=mr();ui();const[i,a]=E.useState(null),[o,l]=E.useState(!0),[c,u]=E.useState(!1),[f,d]=E.useState(null),[p,m]=E.useState([]),[b,v]=E.useState(null),[y,x]=E.useState(!1),[_,S]=E.useState({x:0,y:0}),w=E.useRef(null),[N,k]=E.useState(!1),C=(G,H)=>{var K;if((K=G==null?void 0:G.currentTarget)!=null&&K.getBoundingClientRect){const $=G.currentTarget.getBoundingClientRect();S({x:$.right+8,y:$.top})}v(H),u(!0)};E.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),E.useEffect(()=>{const G=document.createElement("link");G.rel="manifest",G.href="/functions/pwaManifest",document.head.appendChild(G);const H=document.createElement("meta");H.name="theme-color",H.content="#006e74",document.head.appendChild(H);const K=document.createElement("meta");K.name="apple-mobile-web-app-capable",K.content="yes",document.head.appendChild(K);const $=document.createElement("meta");return $.name="apple-mobile-web-app-status-bar-style",$.content="default",document.head.appendChild($),(async()=>{if("serviceWorker"in navigator)try{await navigator.serviceWorker.register("/sw.js",{scope:"/"})}catch{try{await navigator.serviceWorker.register("/functions/pwaSw",{scope:"/"})}catch{}}})(),()=>{try{document.head.removeChild(G)}catch(z){console.error("Error removing PWA link:",z)}try{document.head.removeChild(H)}catch(z){console.error("Error removing PWA theme meta:",z)}try{document.head.removeChild(K)}catch(z){console.error("Error removing PWA apple-capable meta:",z)}try{document.head.removeChild($)}catch(z){console.error("Error removing PWA apple-status-bar meta:",z)}}},[]);const P=E.useCallback(async()=>{l(!0);try{const G=await jr.User.me();a(G),["clinic","team_member","practitioner"].includes(G==null?void 0:G.app_role)&&!["AISymptomsChecker","VerifyEmail"].includes(t)&&!window.location.pathname.startsWith("/Clinic")&&!window.location.pathname.startsWith("/LeadDetails")&&r("/ClinicDashboard")}catch{a(null)}finally{l(!1)}},[t]);E.useEffect(()=>{(async()=>{try{const H=await jr.User.me();if(!H)return;if(!H.app_role){const $=new URLSearchParams(window.location.search).get("signup_role");!$||!["admin","team_member","practitioner","patient"].includes($)?await jr.User.updateMyUserData({app_role:"team_member"}):await jr.User.updateMyUserData({app_role:$})}}catch{}})()},[]),E.useEffect(()=>{P()},[P,t]),E.useEffect(()=>{(async()=>{if((i==null?void 0:i.role)==="admin"&&!(i!=null&&i.clinic_id)){const K=await ve.entities.Clinic.list();m(K||[]),!f&&(K==null?void 0:K.length)>0&&d(K[0].id)}})()},[i,f]);const L=async()=>{await jr.User.logout(),a(null),r(ln("AISymptomsChecker"))},T=()=>{const G=typeof window<"u"?window.location.href:void 0;G?jr.User.loginWithRedirect(G):jr.User.loginWithRedirect("/")};if(o)return t==="AISymptomsChecker"||t==="Register"||t==="VerifyEmail"?s.jsx("div",{className:"min-h-screen bg-white",children:e}):s.jsx("div",{className:"min-h-screen bg-[#f7f7f7] flex items-center justify-center",children:s.jsxs("div",{className:"animate-pulse flex items-center gap-3",children:[s.jsx("div",{className:"w-8 h-8 bg-gray-200 rounded-full"}),s.jsx("div",{className:"w-32 h-4 bg-gray-200 rounded"})]})});if(t==="AISymptomsChecker")return s.jsxs("div",{className:"min-h-screen bg-white",children:[e,s.jsx(ON,{})]});if(!i)return t==="Register"||t==="VerifyEmail"?s.jsx("div",{className:"min-h-screen bg-white",children:e}):s.jsx("div",{className:"min-h-screen bg-[#f7f7f7]",children:s.jsx("div",{className:"container mx-auto px-4 py-16",children:s.jsxs("div",{className:"max-w-md mx-auto text-center",children:[s.jsx("div",{className:"w-20 h-20 bg-[#006e74] rounded-full flex items-center justify-center mx-auto mb-6 shadow-xl",children:s.jsx(rl,{className:"w-10 h-10 text-white"})}),s.jsx("h1",{className:"text-4xl font-bold text-[#54595f] mb-2",children:"TriageFlow"}),s.jsx("p",{className:"text-lg text-[#006e74] font-medium mb-4",children:"AI-powered clinic lead management"}),s.jsx("p",{className:"text-[#54595f] mb-8",children:"Please sign in to continue."}),s.jsx(be,{onClick:T,className:"w-full bg-[#006e74] hover:bg-[#005a60] text-lg py-3",children:"Sign In"})]})})});const A=i.role==="admin",R=(i==null?void 0:i.app_role)||((i==null?void 0:i.role)==="admin"?"practitioner":"user"),I=(i==null?void 0:i.role)==="admin"&&!(i!=null&&i.clinic_id),M=(i==null?void 0:i.role)==="admin"&&(i==null?void 0:i.clinic_id),B=[{title:"Form Builder",url:ln("ManageIntakeForms"),icon:Oa},{title:"Form Responses",url:ln("AdminFormResponses"),icon:Rf},{title:"Leads",url:ln("LeadsPipeline"),icon:Mf}
707,{title:"App Settings",url:ln("AppSettings"),icon:ou}];let W=[];return I?W=[{title:"Manage Clinics",url:ln("ManageClinics"),icon:hs},{title:"Leads",url:ln("LeadsPipeline")+(f?`?clinic_id=${f}`:""),icon:Mf},{title:"Lead Form",url:ln("ManageLeadForm")+(f?`?clinic_id=${f}`:""),icon:Oa},{title:"Form Responses",url:ln("AdminFormResponses")+(f?`?clinic_id=${f}`:""),icon:Rf},{title:"Email Templates",url:"/EmailTemplates",icon:hn}]:M?W=[{title:"Form Builder",url:ln("ManageLeadForm"),icon:Oa},{title:"Form Responses",url:ln("AdminFormResponses"),icon:Rf},{title:"Leads",url:ln("LeadsPipeline"),icon:Mf},{title:"Team Management",url:ln("TeamManagement"),icon:qu},{title:"App Settings",url:ln("AppSettings"),icon:ou}]:A?W=B:W=[{title:"AI Symptoms Checker",url:ln("AISymptomsChecker"),icon:rl}],s.jsxs("div",{className:"min-h-screen flex w-full bg-white text-slate-900",children:[s.jsx("style",{children:` 708 :root { 709 --sidebar-background: #ffffff; 710 --sidebar-foreground: #54595f; 711 --sidebar-primary: #006e74; 712 --sidebar-primary-foreground: #ffffff; 713 --sidebar-accent: #e6f0f1; 714 --sidebar-accent-foreground: #006e74; 715 --sidebar-border: #e5e7eb; 716 } 717 /* Mobile table horizontal scrolling: only table scrolls */ 718 @media (max-width: 768px) { 719 .app-content table { 720 display: block; 721 overflow-x: auto; 722 -webkit-overflow-scrolling: touch; 723 border-collapse: separate; /* avoid layout issues when scrolling */ 724 } 725 .app-content thead, .app-content tbody, .app-content tr { 726 display: table; /* keep rows as tables for layout */ 727 width: 100%; 728 } 729 } 730 `}),s.jsx("div",{className:`fixed left-0 top-0 h-full z-50 border-r border-gray-200 bg-white transition-all duration-300 hidden md:block ${c?"w-72":"w-16"}`,onMouseEnter:()=>u(!0),onMouseLeave:()=>{!b&&!y&&v(null),!b&&!y&&u(!1)},children:s.jsxs("div",{className:"flex flex-col h-full",children:[s.jsx("div",{className:"border-b border-gray-200 p-3 h-16 flex items-center justify-center",children:s.jsxs("div",{className:`flex items-center gap-3 ${c?"":"w-full"}`,children:[s.jsx("div",{className:"w-10 h-10 bg-[#006e74] rounded-lg flex-none flex items-center justify-center shadow-md",children:s.jsx(rl,{className:"w-5 h-5 text-white"})}),c&&s.jsxs("div",{className:"flex-grow",children:[s.jsx("h2",{className:"font-bold text-[#54595f] text-sm",children:"TriageFlow"}),s.jsx("p",{className:"text-xs text-[#006e74] font-medium",children:A?"Practitioner Portal":"Patient Portal"})]})]})}),s.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:s.jsxs("div",{className:"space-y-1",children:[I&&c&&s.jsx("div",{className:"px-2 py-2",children:s.jsxs(Et,{value:f||"",onValueChange:d,children:[s.jsx(St,{className:"h-8 text-xs",children:s.jsx(kt,{placeholder:"Select clinic"})}),s.jsx(jt,{children:p.map(G=>s.jsx(He,{value:G.id,children:G.name},G.id))})]})}),c&&s.jsx("div",{className:"text-xs font-semibold text-slate-900 uppercase tracking-wider px-3 py-2",children:I?"Admin":"Patients"}),W.map(G=>Array.isArray(G.children)&&G.children.length>0?s.jsxs("div",{className:`relative ${c?"":"justify-center"}`,onClick:K=>{b===G.title?v(null):C(K,G.title)},onMouseLeave:()=>{setTimeout(()=>{y||v(null)},100)},children:[s.jsxs("div",{className:"flex items-center gap-3 px-3 py-2.5 rounded-md text-[#54595f] hover:bg-gray-100 cursor-pointer",children:[s.jsx(G.icon,{className:"w-4 h-4 flex-none"}),c&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"font-medium text-sm",children:G.title}),s.jsx(op,{className:"w-4 h-4 ml-auto text-gray-400"})]})]}),b===G.title&&s.jsx("div",{className:"bg-white border border-gray-200 rounded-md shadow-lg w-64 z-[60] py-3",style:{position:"fixed",top:`${_.y}px`,left:`${_.x}px`},onMouseEnter:()=>{x(!0)},onMouseLeave:()=>{x(!1),v(null)},children:G.children.map(K=>{const $=K.icon||G.icon;return s.jsxs(qr,{to:K.url,className:"flex items-center gap-3 px-4 py-3 text-sm text-[#54595f] hover:bg-gray-50",onClick:()=>{v(null),x(!1)},children:[s.jsx($,{className:"w-4 h-4 text-[#006e74]"}),s.jsx("span",{children:K.title})]},K.title)})})]},G.title):s.jsxs(qr,{to:G.url,className:`flex items-center gap-3 px-3 py-2.5 rounded-md transition-all duration-200 ${n.pathname===G.url?"bg-[#006e74] text-white shadow":"text-[#54595f] hover:bg-gray-100"} ${c?"":"justify-center"}`,children:[s.jsx(G.icon,{className:"w-4 h-4 flex-none"}),c&&s.jsx(s.Fragment,{children:s.jsx("span",{className:"font-medium text-sm",children:G.title})})]},G.title))]})}),s.jsxs("div",{className:"border-t border-gray-200 p-2 relative",children:[s.jsxs("div",{className:`flex items-center gap-3 ${c?"":"justify-center"}`,children:[s.jsxs("button",{onClick:()=>{c&&A&&r(ln("AppSettings"))},className:"flex items-center gap-3 hover:bg-gray-50 rounded-lg p-1 transition-colors",children:[s.jsx("img",{src:i.profile_image_url||`https://ui-avatars.c
730om/api/?name=${i.full_name||i.email}&background=006e74&color=fff`,alt:"User avatar",className:"w-9 h-9 rounded-full flex-none"}),c&&s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[s.jsx("p",{className:"font-medium text-[#54595f] text-sm truncate",children:i.full_name||"User"}),s.jsx("p",{className:"text-xs text-gray-500 truncate",children:i.email})]})]}),c&&s.jsx(be,{variant:"ghost",size:"icon",onClick:L,className:"hover:bg-red-50 text-gray-500 hover:text-red-600 flex-none",children:s.jsx(SN,{className:"w-4 h-4"})})]}),!c&&s.jsx(be,{variant:"ghost",size:"icon",onClick:L,className:"hover:bg-red-50 text-gray-500 hover:text-red-600 flex-none absolute bottom-2 right-2",children:s.jsx(SN,{className:"w-4 h-4"})})]})]})}),s.jsx("div",{className:"md:hidden fixed top-0 left-0 right-0 z-40 bg-white border-b border-gray-200",children:s.jsxs("div",{className:"h-14 px-3 flex items-center justify-between",children:[s.jsx("button",{"aria-label":"Open menu",className:"p-2 rounded-md hover:bg-gray-100",onClick:()=>k(!0),children:s.jsx(hO,{className:"w-6 h-6 text-[#006e74]"})}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-9 h-9 bg-[#006e74] rounded-lg flex items-center justify-center shadow-md",children:s.jsx(rl,{className:"w-5 h-5 text-white"})}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-bold text-[#54595f] leading-4",children:"TriageFlow"}),s.jsxs("div",{className:"text-[11px] text-[#006e74]",children:[A?"Practitioner":"Patient"," Portal"]})]})]}),s.jsx("div",{className:"w-6"})]})}),s.jsx(m9,{open:N,onOpenChange:k,children:s.jsxs(HC,{side:"left",className:"p-0 w-[280px]",children:[s.jsx(WC,{className:"px-4 py-3 border-b",children:s.jsxs(VC,{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-8 h-8 bg-[#006e74] rounded-lg flex items-center justify-center",children:s.jsx(rl,{className:"w-4 h-4 text-white"})}),s.jsx("span",{children:"TriageFlow"})]})}),s.jsxs("div",{className:"p-3 overflow-y-auto h-full",children:[s.jsx("div",{className:"text-xs font-semibold text-slate-900 uppercase tracking-wider px-2 py-2",children:"Patients"}),s.jsx("div",{className:"space-y-1",children:W.flatMap(G=>Array.isArray(G.children)&&G.children.length>0?G.children.map(H=>({title:H.title,url:H.url,icon:H.icon||G.icon})):[{title:G.title,url:G.url,icon:G.icon}]).map(G=>s.jsxs(qr,{to:G.url,onClick:()=>k(!1),className:`flex items-center gap-3 px-3 py-2.5 rounded-md transition-all duration-200 ${n.pathname===G.url?"bg-[#006e74] text-white shadow":"text-[#54595f] hover:bg-gray-100"}`,children:[G.icon&&ne.createElement(G.icon,{className:"w-4 h-4"}),s.jsx("span",{className:"text-sm",children:G.title})]},G.title))})]})]})}),s.jsxs("main",{className:`flex-1 flex flex-col overflow-hidden transition-all duration-300 ${c?"md:ml-72":"md:ml-16"} ml-0`,children:[s.jsx("div",{className:"md:hidden h-14"}),s.jsx("div",{className:"flex-1 overflow-y-auto app-content",children:e})]}),s.jsx(ON,{}),i&&s.jsx(kbe,{}),i&&s.jsx(Obe,{currentPageName:t,role:R,userId:i.id})]})}const Rbe={AdminFormResponses:hce,AppSettings:pce,LeadsPipeline:Rge,ManageClinics:Uge,ManageLeadForm:eve,Register:tve,TeamManagement:rve,VerifyEmail:ive},v9={mainPage:"Register",Pages:Rbe,Layout:Tbe};function Ibe(){const e=Ba(),{isAuthenticated:t}=$O(),{Pages:n,mainPage:r}=v9,i=r;return E.useEffect(()=>{const a=e.pathname;let o;if(a==="/"||a==="")o=i;else{const l=a.replace(/^\//,"").split("/")[0];o=Object.keys(n).find(f=>f.toLowerCase()===l.toLowerCase())||null}t&&o&&ve.appLogs.logUserInApp(o).catch(()=>{})},[e,t,n,i]),null}function Mbe({}){var i;const t=Ba().pathname.substring(1),{data:n,isFetched:r}=Cee({queryKey:["user"],queryFn:async()=>{try{return{user:await ve.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return s.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:s.jsx("div",{className:"max-w-md w-full",children:s.jsxs("div",{className:"text-center space-y-6",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),s.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),s.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",s.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),r&&n.isAuthenticated&&((i=n.user)==null?void 0:i.role)==="admin"&&s.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:s.jsxs("div",{className:"flex items-start space-x-3",children:[s.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:s.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),s.jsxs("div",{className:"text-left space-y-1",children:[s.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),s.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),s.jsx("div",{className:"pt-6",children:s.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[s.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}var p1,FD;function Dbe(){if(FD)return p1;FD=1;function e(){this.__data__=[],this.size=0}return p1=e,p1}var m1,BD;function GC(){if(BD)return m1;BD=1;function e(t,n){return t===n||t!==t&&n!==n}return m1=e,m1}var g1,qD;function yx(){if(qD)return g1;qD=1;var e=GC();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return g1=t,g1}var v1,UD;function Lbe(){if(UD)return v1;UD=1;var e=yx(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():n.call(a,o,1),--this.size,!0}return v1=r,v1}var y1,zD;function $be(){if(zD)return y1;zD=1;var e=yx();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return y1=t,y1}var x1,HD;function Fbe(){if(HD)return x1;HD=1;var e=yx();function t(n){return e(this.__data__,n)>-1}return x1=t,x1}var b1,WD;function Bbe(){if(WD)return b1;WD=1;var e=yx();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return b1=t,b1}var w1,VD;function xx(){if(VD)return w1;VD=1;
vendor: 6,482 bytes, line 730
730var e=Dbe(),t=Lbe(),n=$be(),r=Fbe(),i=Bbe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,w1=a,w1}var _1,GD;function qbe(){if(GD)return _1;GD=1;var e=xx();function t(){this.__data__=new e,this.size=0}return _1=t,_1}var S1,KD;function Ube(){if(KD)return S1;KD=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return S1=e,S1}var j1,YD;function zbe(){if(YD)return j1;YD=1;function e(t){return this.__data__.get(t)}return j1=e,j1}var N1,QD;function Hbe(){if(QD)return N1;QD=1;function e(t){return this.__data__.has(t)}return N1=e,N1}var E1,XD;function y9(){if(XD)return E1;XD=1;var e=typeof Vm=="object"&&Vm&&Vm.Object===Object&&Vm;return E1=e,E1}var k1,ZD;function Ua(){if(ZD)return k1;ZD=1;var e=y9(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return k1=n,k1}var O1,JD;function Np(){if(JD)return O1;JD=1;var e=Ua(),t=e.Symbol;return O1=t,O1}var C1,e4;function Wbe(){if(e4)return C1;e4=1;var e=Np(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=n.call(o,i),c=o[i];try{o[i]=void 0;var u=!0}catch{}var f=r.call(o);return u&&(l?o[i]=c:delete o[i]),f}return C1=a,C1}var A1,t4;function Vbe(){if(t4)return A1;t4=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return A1=n,A1}var P1,n4;function xo(){if(n4)return P1;n4=1;var e=Np(),t=Wbe(),n=Vbe(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:r:a&&a in Object(l)?t(l):n(l)}return P1=o,P1}var T1,r4;function Es(){if(r4)return T1;r4=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return T1=e,T1}var R1,i4;function KC(){if(i4)return R1;i4=1;var e=xo(),t=Es(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==r||c==i||c==n||c==a}return R1=o,R1}var I1,a4;function Gbe(){if(a4)return I1;a4=1;var e=Ua(),t=e["__core-js_shared__"];return I1=t,I1}var M1,o4;function Kbe(){if(o4)return M1;o4=1;var e=Gbe(),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 M1=n,M1}var D1,s4;function x9(){if(s4)return D1;s4=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 D1=n,D1}var L1,l4;function Ybe(){if(l4)return L1;l4=1;var e=KC(),t=Kbe(),n=Es(),r=x9(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,u=l.hasOwnProperty,f=RegExp("^"+c.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(p){if(!n(p)||t(p))return!1;var m=e(p)?f:a;return m.test(r(p))}return L1=d,L1}var $1,c4;function Qbe(){if(c4)return $1;c4=1;function e(t,n){return t==null?void 0:t[n]}return $1=e,$1}var F1,u4;function Bl(){if(u4)return F1;u4=1;var e=Ybe(),t=Qbe();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return F1=n,F1}var B1,d4;function YC(){if(d4)return B1;d4=1;var e=Bl(),t=Ua(),n=e(t,"Map");return B1=n,B1}var q1,f4;function bx(){if(f4)return q1;f4=1;var e=Bl(),t=e(Object,"create");return q1=t,q1}var U1,h4;function Xbe(){if(h4)return U1;h4=1;var e=bx();function t(){this.__data__=e?e(null):{},this.size=0}return U1=t,U1}var z1,p4;function Zbe(){if(p4)return z1;p4=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return z1=e,z1}var H1,m4;function Jbe(){if(m4)return H1;m4=1;var e=bx(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return r.call(o,a)?o[a]:void 0}return H1=i,H1}var W1,g4;function ewe(){if(g4)return W1;g4=1;var e=bx(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return W1=r,W1}var V1,v4;function twe(){if(v4)return V1;v4=1;var e=bx(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return V1=n,V1}var G1,y4;function nwe(){if(y4)return G1;y4=1;var e=Xbe(),t=Zbe(),n=Jbe(),r=ewe(),i=twe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,G1=a,G1}var K1,x4;function rwe(){if(x4)return K1;x4=1;var e=nwe(),t=xx(),n=YC();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return K1=r,K1}var Y1,b4;function iwe(){if(b4)return Y1;b4=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Y1=e,Y1}var Q1,w4;function wx(){if(w4)return Q1;w4=1;var e=iwe();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Q1=t,Q1}var X1,_4;function awe(){if(_4)return X1;_4=1;var e=wx();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return X1=t,X1}var Z1,S4;function owe(){if(S4)return Z1;S4=1;var e=wx();function t(n){return e(this,n).get(n)}return Z1=t,Z1}var J1,j4;function swe(){if(j4)return J1;j4=1;var e=wx();function t(n){return e(this,n).has(n)}return J1=t,J1}var e_,N4;function lwe(){if(N4)return e_;N4=1;var e=wx();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return e_=t,e_}var t_,E4;function QC(){if(E4)return t_;E4=1;var e=rwe(),t=awe(),n=owe(),r=swe(),i=lwe();function a(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,t_=a,t_}var n_,k4;function cwe(){if(k4)return n_;k4=1;var e=xx(),t=YC(),n=QC(),r=200;function i(a,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<r-1)return c.push([a,o]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(a,o),this.size=l.size,this}return n_=i,n_}var r_,O4;function b9(){if(O4)return r_;O4=1;var e=xx(),t=qbe(),n=Ube(),r=zbe(),i=Hbe(),a=cwe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,r_=o,r_}var i_,C4;
vendor: 4,738 bytes, line 730
730function uwe(){if(C4)return i_;C4=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return i_=t,i_}var a_,A4;function dwe(){if(A4)return a_;A4=1;function e(t){return this.__data__.has(t)}return a_=e,a_}var o_,P4;function w9(){if(P4)return o_;P4=1;var e=QC(),t=uwe(),n=dwe();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,o_=r,o_}var s_,T4;function _9(){if(T4)return s_;T4=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 s_=e,s_}var l_,R4;function S9(){if(R4)return l_;R4=1;function e(t,n){return t.has(n)}return l_=e,l_}var c_,I4;function j9(){if(I4)return c_;I4=1;var e=w9(),t=_9(),n=S9(),r=1,i=2;function a(o,l,c,u,f,d){var p=c&r,m=o.length,b=l.length;if(m!=b&&!(p&&b>m))return!1;var v=d.get(o),y=d.get(l);if(v&&y)return v==l&&y==o;var x=-1,_=!0,S=c&i?new e:void 0;for(d.set(o,l),d.set(l,o);++x<m;){var w=o[x],N=l[x];if(u)var k=p?u(N,w,x,l,o,d):u(w,N,x,o,l,d);if(k!==void 0){if(k)continue;_=!1;break}if(S){if(!t(l,function(C,P){if(!n(S,P)&&(w===C||f(w,C,c,u,d)))return S.push(P)})){_=!1;break}}else if(!(w===N||f(w,N,c,u,d))){_=!1;break}}return d.delete(o),d.delete(l),_}return c_=a,c_}var u_,M4;function fwe(){if(M4)return u_;M4=1;var e=Ua(),t=e.Uint8Array;return u_=t,u_}var d_,D4;function hwe(){if(D4)return d_;D4=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return d_=e,d_}var f_,L4;function XC(){if(L4)return f_;L4=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return f_=e,f_}var h_,$4;function pwe(){if($4)return h_;$4=1;var e=Np(),t=fwe(),n=GC(),r=j9(),i=hwe(),a=XC(),o=1,l=2,c="[object Boolean]",u="[object Date]",f="[object Error]",d="[object Map]",p="[object Number]",m="[object RegExp]",b="[object Set]",v="[object String]",y="[object Symbol]",x="[object ArrayBuffer]",_="[object DataView]",S=e?e.prototype:void 0,w=S?S.valueOf:void 0;function N(k,C,P,L,T,A,R){switch(P){case _:if(k.byteLength!=C.byteLength||k.byteOffset!=C.byteOffset)return!1;k=k.buffer,C=C.buffer;case x:return!(k.byteLength!=C.byteLength||!A(new t(k),new t(C)));case c:case u:case p:return n(+k,+C);case f:return k.name==C.name&&k.message==C.message;case m:case v:return k==C+"";case d:var I=i;case b:var M=L&o;if(I||(I=a),k.size!=C.size&&!M)return!1;var B=R.get(k);if(B)return B==C;L|=l,R.set(k,C);var W=r(I(k),I(C),L,T,A,R);return R.delete(k),W;case y:if(w)return w.call(k)==w.call(C)}return!1}return h_=N,h_}var p_,F4;function N9(){if(F4)return p_;F4=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return p_=e,p_}var m_,B4;function Kr(){if(B4)return m_;B4=1;var e=Array.isArray;return m_=e,m_}var g_,q4;function mwe(){if(q4)return g_;q4=1;var e=N9(),t=Kr();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return g_=n,g_}var v_,U4;function gwe(){if(U4)return v_;U4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var l=t[r];n(l,r,t)&&(o[a++]=l)}return o}return v_=e,v_}var y_,z4;function vwe(){if(z4)return y_;z4=1;function e(){return[]}return y_=e,y_}var x_,H4;function ywe(){if(H4)return x_;H4=1;var e=gwe(),t=vwe(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return r.call(o,l)}))}:t;return x_=a,x_}var b_,W4;function xwe(){if(W4)return b_;W4=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return b_=e,b_}var w_,V4;function bo(){if(V4)return w_;V4=1;function e(t){return t!=null&&typeof t=="object"}return w_=e,w_}var __,G4;function bwe(){if(G4)return __;G4=1;var e=xo(),t=bo(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return __=r,__}var S_,K4;function ZC(){if(K4)return S_;K4=1;var e=bwe(),t=bo(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return S_=a,S_}var Cf={exports:{}},j_,Y4;function wwe(){if(Y4)return j_;Y4=1;function e(){return!1}return j_=e,j_}Cf.exports;var Q4;function E9(){return Q4||(Q4=1,(function(e,t){var n=Ua(),r=wwe(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||r;e.exports=u})(Cf,Cf.exports)),Cf.exports}var N_,X4;function JC(){if(X4)return N_;X4=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return N_=n,N_}var E_,Z4;function eA(){if(Z4)return E_;Z4=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return E_=t,E_}var k_,J4;
vendor: 4,128 bytes, line 730
730function _we(){if(J4)return k_;J4=1;var e=xo(),t=eA(),n=bo(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",f="[object Number]",d="[object Object]",p="[object RegExp]",m="[object Set]",b="[object String]",v="[object WeakMap]",y="[object ArrayBuffer]",x="[object DataView]",_="[object Float32Array]",S="[object Float64Array]",w="[object Int8Array]",N="[object Int16Array]",k="[object Int32Array]",C="[object Uint8Array]",P="[object Uint8ClampedArray]",L="[object Uint16Array]",T="[object Uint32Array]",A={};A[_]=A[S]=A[w]=A[N]=A[k]=A[C]=A[P]=A[L]=A[T]=!0,A[r]=A[i]=A[y]=A[a]=A[x]=A[o]=A[l]=A[c]=A[u]=A[f]=A[d]=A[p]=A[m]=A[b]=A[v]=!1;function R(I){return n(I)&&t(I.length)&&!!A[e(I)]}return k_=R,k_}var O_,eL;function k9(){if(eL)return O_;eL=1;function e(t){return function(n){return t(n)}}return O_=e,O_}var Af={exports:{}};Af.exports;var tL;function Swe(){return tL||(tL=1,(function(e,t){var n=y9(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=(function(){try{var c=i&&i.require&&i.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Af,Af.exports)),Af.exports}var C_,nL;function O9(){if(nL)return C_;nL=1;var e=_we(),t=k9(),n=Swe(),r=n&&n.isTypedArray,i=r?t(r):e;return C_=i,C_}var A_,rL;function jwe(){if(rL)return A_;rL=1;var e=xwe(),t=ZC(),n=Kr(),r=E9(),i=JC(),a=O9(),o=Object.prototype,l=o.hasOwnProperty;function c(u,f){var d=n(u),p=!d&&t(u),m=!d&&!p&&r(u),b=!d&&!p&&!m&&a(u),v=d||p||m||b,y=v?e(u.length,String):[],x=y.length;for(var _ in u)(f||l.call(u,_))&&!(v&&(_=="length"||m&&(_=="offset"||_=="parent")||b&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,x)))&&y.push(_);return y}return A_=c,A_}var P_,iL;function Nwe(){if(iL)return P_;iL=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return P_=t,P_}var T_,aL;function C9(){if(aL)return T_;aL=1;function e(t,n){return function(r){return t(n(r))}}return T_=e,T_}var R_,oL;function Ewe(){if(oL)return R_;oL=1;var e=C9(),t=e(Object.keys,Object);return R_=t,R_}var I_,sL;function kwe(){if(sL)return I_;sL=1;var e=Nwe(),t=Ewe(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))r.call(a,l)&&l!="constructor"&&o.push(l);return o}return I_=i,I_}var M_,lL;function Ep(){if(lL)return M_;lL=1;var e=KC(),t=eA();function n(r){return r!=null&&t(r.length)&&!e(r)}return M_=n,M_}var D_,cL;function _x(){if(cL)return D_;cL=1;var e=jwe(),t=kwe(),n=Ep();function r(i){return n(i)?e(i):t(i)}return D_=r,D_}var L_,uL;function Owe(){if(uL)return L_;uL=1;var e=mwe(),t=ywe(),n=_x();function r(i){return e(i,n,t)}return L_=r,L_}var $_,dL;function Cwe(){if(dL)return $_;dL=1;var e=Owe(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l,c,u,f){var d=l&t,p=e(a),m=p.length,b=e(o),v=b.length;if(m!=v&&!d)return!1;for(var y=m;y--;){var x=p[y];if(!(d?x in o:r.call(o,x)))return!1}var _=f.get(a),S=f.get(o);if(_&&S)return _==o&&S==a;var w=!0;f.set(a,o),f.set(o,a);for(var N=d;++y<m;){x=p[y];var k=a[x],C=o[x];if(c)var P=d?c(C,k,x,o,a,f):c(k,C,x,a,o,f);if(!(P===void 0?k===C||u(k,C,l,c,f):P)){w=!1;break}N||(N=x=="constructor")}if(w&&!N){var L=a.constructor,T=o.constructor;L!=T&&"constructor"in a&&"constructor"in o&&!(typeof L=="function"&&L instanceof L&&typeof T=="function"&&T instanceof T)&&(w=!1)}return f.delete(a),f.delete(o),w}return $_=i,$_}var F_,fL;function Awe(){if(fL)return F_;fL=1;var e=Bl(),t=Ua(),n=e(t,"DataView");return F_=n,F_}var B_,hL;function Pwe(){if(hL)return B_;hL=1;var e=Bl(),t=Ua(),n=e(t,"Promise");return B_=n,B_}var q_,pL;function A9(){if(pL)return q_;pL=1;var e=Bl(),t=Ua(),n=e(t,"Set");return q_=n,q_}var U_,mL;function Twe(){if(mL)return U_;mL=1;var e=Bl(),t=Ua(),n=e(t,"WeakMap");return U_=n,U_}var z_,gL;function Rwe(){if(gL)return z_;gL=1;var e=Awe(),t=YC(),n=Pwe(),r=A9(),i=Twe(),a=xo(),o=x9(),l="[object Map]",c="[object Object]",u="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",m=o(e),b=o(t),v=o(n),y=o(r),x=o(i),_=a;
vendor: 147,374 bytes, lines 730-761
730return(e&&_(new e(new ArrayBuffer(1)))!=p||t&&_(new t)!=l||n&&_(n.resolve())!=u||r&&_(new r)!=f||i&&_(new i)!=d)&&(_=function(S){var w=a(S),N=w==c?S.constructor:void 0,k=N?o(N):"";if(k)switch(k){case m:return p;case b:return l;case v:return u;case y:return f;case x:return d}return w}),z_=_,z_}var H_,vL;function Iwe(){if(vL)return H_;vL=1;var e=b9(),t=j9(),n=pwe(),r=Cwe(),i=Rwe(),a=Kr(),o=E9(),l=O9(),c=1,u="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype,m=p.hasOwnProperty;function b(v,y,x,_,S,w){var N=a(v),k=a(y),C=N?f:i(v),P=k?f:i(y);C=C==u?d:C,P=P==u?d:P;var L=C==d,T=P==d,A=C==P;if(A&&o(v)){if(!o(y))return!1;N=!0,L=!1}if(A&&!L)return w||(w=new e),N||l(v)?t(v,y,x,_,S,w):n(v,y,C,x,_,S,w);if(!(x&c)){var R=L&&m.call(v,"__wrapped__"),I=T&&m.call(y,"__wrapped__");if(R||I){var M=R?v.value():v,B=I?y.value():y;return w||(w=new e),S(M,B,x,_,w)}}return A?(w||(w=new e),r(v,y,x,_,S,w)):!1}return H_=b,H_}var W_,yL;function tA(){if(yL)return W_;yL=1;var e=Iwe(),t=bo();function n(r,i,a,o,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,l)}return W_=n,W_}var V_,xL;function P9(){if(xL)return V_;xL=1;var e=tA();function t(n,r){return e(n,r)}return V_=t,V_}var Jg={exports:{}};/*! 731 * Quill Editor v1.3.7 732 * https://quilljs.com/ 733 * Copyright (c) 2014, Jason Chen 734 * Copyright (c) 2013, salesforce.com 735 */var Mwe=Jg.exports,bL;function Dwe(){return bL||(bL=1,(function(e,t){(function(r,i){e.exports=i()})(typeof self<"u"?self:Mwe,function(){return(function(n){var r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={i:a,l:!1,exports:{}};return n[a].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=n,i.c=r,i.d=function(a,o,l){i.o(a,o)||Object.defineProperty(a,o,{configurable:!1,enumerable:!0,get:l})},i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,"a",o),o},i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)},i.p="",i(i.s=109)})([(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(17),o=i(18),l=i(19),c=i(45),u=i(46),f=i(47),d=i(48),p=i(49),m=i(12),b=i(32),v=i(33),y=i(31),x=i(1),_={Scope:x.Scope,create:x.create,find:x.find,query:x.query,register:x.register,Container:a.default,Format:o.default,Leaf:l.default,Embed:d.default,Scroll:c.default,Block:f.default,Inline:u.default,Text:p.default,Attributor:{Attribute:m.default,Class:b.default,Style:v.default,Store:y.default}};r.default=_}),(function(n,r,i){var a=this&&this.__extends||(function(){var y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,_){x.__proto__=_}||function(x,_){for(var S in _)_.hasOwnProperty(S)&&(x[S]=_[S])};return function(x,_){y(x,_);function S(){this.constructor=x}x.prototype=_===null?Object.create(_):(S.prototype=_.prototype,new S)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=(function(y){a(x,y);function x(_){var S=this;return _="[Parchment] "+_,S=y.call(this,_)||this,S.message=_,S.name=S.constructor.name,S}return x})(Error);r.ParchmentError=o;var l={},c={},u={},f={};r.DATA_KEY="__blot";var d;(function(y){y[y.TYPE=3]="TYPE",y[y.LEVEL=12]="LEVEL",y[y.ATTRIBUTE=13]="ATTRIBUTE",y[y.BLOT=14]="BLOT",y[y.INLINE=7]="INLINE",y[y.BLOCK=11]="BLOCK",y[y.BLOCK_BLOT=10]="BLOCK_BLOT",y[y.INLINE_BLOT=6]="INLINE_BLOT",y[y.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",y[y.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",y[y.ANY=15]="ANY"})(d=r.Scope||(r.Scope={}));function p(y,x){var _=b(y);if(_==null)throw new o("Unable to create "+y+" blot");var S=_,w=y instanceof Node||y.nodeType===Node.TEXT_NODE?y:S.create(x);return new S(w,x)}r.create=p;function m(y,x){return x===void 0&&(x=!1),y==null?null:y[r.DATA_KEY]!=null?y[r.DATA_KEY].blot:x?m(y.parentNode,x):null}r.find=m;function b(y,x){x===void 0&&(x=d.ANY);var _;if(typeof y=="string")_=f[y]||l[y];else if(y instanceof Text||y.nodeType===Node.TEXT_NODE)_=f.text;else if(typeof y=="number")y&d.LEVEL&d.BLOCK?_=f.block:y&d.LEVEL&d.INLINE&&(_=f.inline);else if(y instanceof HTMLElement){var S=(y.getAttribute("class")||"").split(/\s+/);for(var w in S)if(_=c[S[w]],_)break;_=_||u[y.tagName]}return _==null?null:x&d.LEVEL&_.scope&&x&d.TYPE&_.scope?_:null}r.query=b;function v(){for(var y=[],x=0;x<arguments.length;x++)y[x]=arguments[x];if(y.length>1)return y.map(function(w){return v(w)});var _=y[0];if(typeof _.blotName!="string"&&typeof _.attrName!="string")throw new o("Invalid definition");if(_.blotName==="abstract")throw new o("Cannot register abstract class");if(f[_.blotName||_.attrName]=_,typeof _.keyName=="string")l[_.keyName]=_;else if(_.className!=null&&(c[_.className]=_),_.tagName!=null){Array.isArray(_.tagName)?_.tagName=_.tagName.map(function(w){return w.toUpperCase()}):_.tagName=_.tagName.toUpperCase();var S=Array.isArray(_.tagName)?_.tagName:[_.tagName];S.forEach(function(w){(u[w]==null||_.className==null)&&(u[w]=_)})}return _}r.register=v}),(function(n,r,i){var a=i(51),o=i(11),l=i(3),c=i(20),u="\0",f=function(d){Array.isArray(d)?this.ops=d:d!=null&&Array.isArray(d.ops)?this.ops=d.ops:this.ops=[]};f.prototype.insert=function(d,p){var m={};return d.length===0?this:(m.insert=d,p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(m.attributes=p),this.push(m))},f.prototype.delete=function(d){return d<=0?this:this.push({delete:d})},f.prototype.retain=function(d,p){if(d<=0)return this;var m={retain:d};return p!=null&&typeof p=="object"&&Object.keys(p).length>0&&(m.attributes=p),this.push(m)},f.prototype.push=function(d){var p=this.ops.length,m=this.ops[p-1];if(d=l(!0,{},d),typeof m=="object"){if(typeof d.delete=="number"&&typeof m.delete=="number")return this.ops[p-1]={delete:m.delete+d.delete},this;if(typeof m.delete=="number"&&d.insert!=null&&(p-=1,m=this.ops[p-1],typeof m!="object"))return this.ops.unshift(d),this;if(o(d.attributes,m.attributes)){if(typeof d.insert=="string"&&typeof m.insert=="string")return this.ops[p-1]={insert:m.insert+d.insert},typeof d.attributes=="object"&&(this.ops[p-1].attributes=d.attributes),this;if(typeof d.retain=="number"&&typeof m.retain=="number")return this.ops[p-1]={retain:m.retain+d.retain},typeof d.attributes=="object"&&(this.ops[p-1].attributes=d.attributes),this}}return p===this.ops.length?this.ops.push(d):this.ops.splice(p,0,d),this},f.prototype.chop=function(){var d=this.ops[this.ops.length-1];return d&&d.retain&&!d.attributes&&this.ops.pop(),this},f.prototype.filter=function(d){return this.ops.filter(d)},f.prototype.forEach=function(d){this.ops.forEach(d)},f.prototype.map=function(d){return this.ops.map(d)},f.prototype.partition=function(d){var p=[],m=[];return this.forEach(function(b){var v=d(b)?p:m;v.push(b)}),[p,m]},f.prototype.reduce=function(d,p){return this.ops.reduce(d,p)},f.prototype.changeLength=function(){return this.reduce(function(d,p){return p.insert?d+c.length(p):p.delete?d-p.delete:d},0)},f.prototype.length=function(){return this.reduce(function(d,p){return d+c.length(p)},0)},f.prototype.slice=function(d,p){d=d||0,typeof p!="number"&&(p=1/0);for(var m=[],b=c.iterator(this.ops),v=0;v<p&&b.hasNext();){var y;v<d?y=b.next(d-v):(y=b.next(p-v),m.push(y)),v+=c.length(y)}return new f(m)},f.prototype.compose=function(d){var p=c.iterator(this.ops),m=c.iterator(d.ops),b=[],v=m.peek();if(v!=null&&typeof v.retain=="number"&&v.attributes==null){for(var y=v.retain;p.peekType()==="insert"&&p.peekLength()<=y;)y-=p.peekLength(),b.push(p.next());v.retain-y>0&&m.next(v.retain-y)}for(var x=new f(b);p.hasNext()||m.hasNext();)if(m.peekType()==="insert")x.push(m.next());else if(p.peekType()==="delete")x.push(p.next());else{var _=Math.min(p.peekLength(),m.peekLength()),S=p.next(_),w=m.next(_);if(typeof w.retain=="number"){var N={};typeof S.retain=="number"?N.retain=_:N.insert=S.insert;var k=c.attributes.compose(S.attributes,w.attributes,typeof S.retain=="number");if(k&&(N.attributes=k),x.push(N),!m.hasNext()&&o(x.ops[x.ops.length-1],N)){var C=new f(p.rest());return x.concat(C).chop()}}else typeof w.delete=="number"&&typeof S.retain=="number"&&x.push(w)}return x.chop()},f.prototype.concat=function(d){var p=new f(this.ops.slice());return d.ops.length>0&&(p.push(d.ops[0]),p.ops=p.ops.concat(d.ops.slice(1))),p},f.prototype.diff=function(d,p){if(this.ops===d.ops)return new f;var m=[this,d].map(function(_){return _.map(function(S){if(S.insert!=null)return typeof S.insert=="string"?S.insert:u;var w=_===d?"on":"with";throw new Error("diff() called "+w+" non-document")}).join("")}),b=new f,v=a(m[0],m[1],p),y=c.iterator(this.ops),x=c.iterator(d.ops);return v.forEach(function(_){for(var S=_[1].length;S>0;){var w=0;switch(_[0]){case a.INSERT:w=Math.min(x.peekLength(),S),b.push(x.next(w));break;case a.DELETE:w=Math.min(S,y.peekLength()),y.next(w),b.delete(w);break;case a.EQUAL:w=Math.min(y.peekLength(),x.peekLength(),S);var N=y.next(w),k=x.next(w);o(N.insert,k.insert)?b.retain(w,c.attributes.diff(N.attributes,k.attributes)):b.push(k).delete(w);break}S-=w}}),b.chop()},f.prototype.eachLine=function(d,p){p=p||` 736`;for(var m=c.iterator(this.ops),b=new f,v=0;m.hasNext();){if(m.peekType()!=="insert")return;var y=m.peek(),x=c.length(y)-m.peekLength(),_=typeof y.insert=="string"?y.insert.indexOf(p,x)-x:-1;if(_<0)b.push(m.next());else if(_>0)b.push(m.next(_));else{if(d(b,m.next(1).attributes||{},v)===!1)return;v+=1,b=new f}}b.length()>0&&d(b,{},v)},f.prototype.transform=function(d,p){if(p=!!p,typeof d=="number")return this.transformPosition(d,p);for(var m=c.iterator(this.ops),b=c.iterator(d.ops),v=new f;m.hasNext()||b.hasNext();)if(m.peekType()==="insert"&&(p||b.peekType()!=="insert"))v.retain(c.length(m.next()));else if(b.peekType()==="insert")v.push(b.next());else{var y=Math.min(m.peekLength(),b.peekLength()),x=m.next(y),_=b.next(y);if(x.delete)continue;_.delete?v.push(_):v.retain(y,c.attributes.transform(x.attributes,_.attributes,p))}return v.chop()},f.prototype.transformPosition=function(d,p){p=!!p;for(var m=c.iterator(this.ops),b=0;m.hasNext()&&b<=d;){var v=m.peekLength(),y=m.peekType();if(m.next(),y==="delete"){d-=Math.min(v,d-b);continue}else y==="insert"&&(b<d||!p)&&(d+=v);b+=v}return d},n.exports=f}),(function(n,r){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=function(m){return typeof Array.isArray=="function"?Array.isArray(m):a.call(m)==="[object Array]"},u=function(m){if(!m||a.call(m)!=="[object Object]")return!1;var b=i.call(m,"constructor"),v=m.constructor&&m.constructor.prototype&&i.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!v)return!1;var y;for(y in m);return typeof y>"u"||i.call(m,y)},f=function(m,b){o&&b.name==="__proto__"?o(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},d=function(m,b){if(b==="__proto__")if(i.call(m,b)){if(l)return l(m,b).value}else return;return m[b]};n.exports=function p(){var m,b,v,y,x,_,S=arguments[0],w=1,N=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},w=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});w<N;++w)if(m=arguments[w],m!=null)for(b in m)v=d(S,b),y=d(m,b),S!==y&&(k&&y&&(u(y)||(x=c(y)))?(x?(x=!1,_=v&&c(v)?v:[]):_=v&&u(v)?v:{},f(S,{name:b,newValue:p(k,_,y)})):typeof y<"u"&&f(S,{name:b,newValue:y}));return S}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BlockEmbed=r.bubbleFormats=void 0;var a=(function(){function A(R,I){for(var M=0;M<I.length;M++){var B=I[M];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(R,B.key,B)}}return function(R,I,M){return I&&A(R.prototype,I),M&&A(R,M),R}})(),o=function A(R,I,M){R===null&&(R=Function.prototype);var B=Object.getOwnPropertyDescriptor(R,I);if(B===void 0){var W=Object.getPrototypeOf(R);return W===null?void 0:A(W,I,M)}else{if("value"in B)return B.value;var G=B.get;return G===void 0?void 0:G.call(M)}},l=i(3),c=S(l),u=i(2),f=S(u),d=i(0),p=S(d),m=i(16),b=S(m),v=i(6),y=S(v),x=i(7),_=S(x);function S(A){return A&&A.__esModule?A:{default:A}}function w(A,R){if(!(A instanceof R))throw new TypeError("Cannot call a class as a function")}function N(A,R){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:A}function k(A,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);A.prototype=Object.create(R&&R.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(A,R):A.__proto__=R)}var C=1,P=(function(A){k(R,A);function R(){return w(this,R),N(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}return a(R,[{key:"attach",value:function(){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"attach",this).call(this),this.attributes=new p.default.Attributor.Store(this.domNode)}},{key:"delta",value:function(){return new f.default().insert(this.value(),(0,c.default)(this.formats(),this.attributes.values()))}},{key:"format",value:function(M,B){var W=p.default.query(M,p.default.Scope.BLOCK_ATTRIBUTE);W!=null&&this.attributes.attribute(W,B)}},{key:"formatAt",value:function(M,B,W,G){this.format(W,G)}},{key:"insertAt",value:function(M,B,W){if(typeof B=="string"&&B.endsWith(` 737`)){var G=p.default.create(L.blotName);this.parent.insertBefore(G,M===0?this:this.next),G.insertAt(0,B.slice(0,-1))}else o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,M,B,W)}}]),R})(p.default.Embed);P.scope=p.default.Scope.BLOCK_BLOT;var L=(function(A){k(R,A);function R(I){w(this,R);var M=N(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,I));return M.cache={},M}return a(R,[{key:"delta",value:function(){return this.cache.delta==null&&(this.cache.delta=this.descendants(p.default.Leaf).reduce(function(M,B){return B.length()===0?M:M.insert(B.value(),T(B))},new f.default).insert(` 738`,T(this))),this.cache.delta}},{key:"deleteAt",value:function(M,B){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"deleteAt",this).call(this,M,B),this.cache={}}},{key:"formatAt",value:function(M,B,W,G){B<=0||(p.default.query(W,p.default.Scope.BLOCK)?M+B===this.length()&&this.format(W,G):o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"formatAt",this).call(this,M,Math.min(B,this.length()-M-1),W,G),this.cache={})}},{key:"insertAt",value:function(M,B,W){if(W!=null)return o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,M,B,W);if(B.length!==0){var G=B.split(` 739`),H=G.shift();H.length>0&&(M<this.length()-1||this.children.tail==null?o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertAt",this).call(this,Math.min(M,this.length()-1),H):this.children.tail.insertAt(this.children.tail.length(),H),this.cache={});var K=this;G.reduce(function($,F){return K=K.split($,!0),K.insertAt(0,F),F.length},M+H.length)}}},{key:"insertBefore",value:function(M,B){var W=this.children.head;o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertBefore",this).call(this,M,B),W instanceof b.default&&W.remove(),this.cache={}}},{key:"length",value:function(){return this.cache.length==null&&(this.cache.length=o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"length",this).call(this)+C),this.cache.length}},{key:"moveChildren",value:function(M,B){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"moveChildren",this).call(this,M,B),this.cache={}}},{key:"optimize",value:function(M){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,M),this.cache={}}},{key:"path",value:function(M){return o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"path",this).call(this,M,!0)}},{key:"removeChild",value:function(M){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"removeChild",this).call(this,M),this.cache={}}},{key:"split",value:function(M){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(B&&(M===0||M>=this.length()-C)){var W=this.clone();return M===0?(this.parent.insertBefore(W,this),this):(this.parent.insertBefore(W,this.next),W)}else{var G=o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"split",this).call(this,M,B);return this.cache={},G}}}]),R})(p.default.Block);L.blotName="block",L.tagName="P",L.defaultChild="break",L.allowedChildren=[y.default,p.default.Embed,_.default];function T(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A==null||(typeof A.formats=="function"&&(R=(0,c.default)(R,A.formats())),A.parent==null||A.parent.blotName=="scroll"||A.parent.statics.scope!==A.statics.scope)?R:T(A.parent,R)}r.bubbleFormats=T,r.BlockEmbed=P,r.default=L}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},o=(function(){function K($,F){var z=[],U=!0,ee=!1,re=void 0;try{for(var X=$[Symbol.iterator](),Z;!(U=(Z=X.next()).done)&&(z.push(Z.value),!(F&&z.length===F));U=!0);}catch(ie){ee=!0,re=ie}finally{try{!U&&X.return&&X.return()}finally{if(ee)throw re}}return z}return function($,F){if(Array.isArray($))return $;if(Symbol.iterator in Object($))return K($,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function K($,F){for(var z=0;z<F.length;z++){var U=F[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty($,U.key,U)}}return function($,F,z){return F&&K($.prototype,F),z&&K($,z),$}})();i(50);var c=i(2),u=T(c),f=i(14),d=T(f),p=i(8),m=T(p),b=i(9),v=T(b),y=i(0),x=T(y),_=i(15),S=T(_),w=i(3),N=T(w),k=i(10),C=T(k),P=i(34),L=T(P);function T(K){return K&&K.__esModule?K:{default:K}}function A(K,$,F){return $ in K?Object.defineProperty(K,$,{value:F,enumerable:!0,configurable:!0,writable:!0}):K[$]=F,K}function R(K,$){if(!(K instanceof $))throw new TypeError("Cannot call a class as a function")}var I=(0,C.default)("quill"),M=(function(){l(K,null,[{key:"debug",value:function(F){F===!0&&(F="log"),C.default.level(F)}},{key:"find",value:function(F){return F.__quill||x.default.find(F)}},{key:"import",value:function(F){return this.imports[F]==null&&I.error("Cannot import "+F+". Are you sure it was registered?"),this.imports[F]}},{key:"register",value:function(F,z){var U=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof F!="string"){var re=F.attrName||F.blotName;typeof re=="string"?this.register("formats/"+re,F,z):Object.keys(F).forEach(function(X){U.register(X,F[X],z)})}else this.imports[F]!=null&&!ee&&I.warn("Overwriting "+F+" with",z),this.imports[F]=z,(F.startsWith("blots/")||F.startsWith("formats/"))&&z.blotName!=="abstract"?x.default.register(z):F.startsWith("modules")&&typeof z.register=="function"&&z.register()}}]);function K($){var F=this,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(R(this,K),this.options=B($,z),this.container=this.options.container,this.container==null)return I.error("Invalid Quill container",$);this.options.debug&&K.debug(this.options.debug);var U=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new m.default,this.scroll=x.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new d.default(this.scroll),this.selection=new S.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(m.default.events.EDITOR_CHANGE,function(re){re===m.default.events.TEXT_CHANGE&&F.root.classList.toggle("ql-blank",F.editor.isBlank())}),this.emitter.on(m.default.events.SCROLL_UPDATE,function(re,X){var Z=F.selection.lastRange,ie=Z&&Z.length===0?Z.index:void 0;W.call(F,function(){return F.editor.update(null,X,ie)},re)});var ee=this.clipboard.convert(`<div class='ql-editor' style="white-space: normal;">`+U+"<p><br></p></div>");this.setContents(ee),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return l(K,[{key:"addContainer",value:function(F){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof F=="string"){var U=F;F=document.createElement("div"),F.classList.add(U)}return this.container.insertBefore(F,z),F}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(F,z,U){var ee=this,re=G(F,z,U),X=o(re,4);return F=X[0],z=X[1],U=X[3],W.call(this,function(){return ee.editor.deleteText(F,z)},U,F,-1*z)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(F),this.container.classList.toggle("ql-disabled",!F)}},{key:"focus",value:function(){var F=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=F,this.scrollIntoView()}},{key:"format",value:function(F,z){var U=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:m.default.sources.API;return W.call(this,function(){var re=U.getSelection(!0),X=new u.default;if(re==null)return X;if(x.default.query(F,x.default.Scope.BLOCK))X=U.editor.formatLine(re.index,re.length,A({},F,z));else{if(re.length===0)return U.selection.format(F,z),X;X=U.editor.formatText(re.index,re.length,A({},F,z))}return U.setSelection(re,m.default.sources.SILENT),X},ee)}},{key:"formatLine",value:function(F,z,U,ee,re){var X=this,Z=void 0,ie=G(F,z,U,ee,re),Y=o(ie,4);return F=Y[0],z=Y[1],Z=Y[2],re=Y[3],W.call(this,function(){return X.editor.formatLine(F,z,Z)},re,F,0)}},{key:"formatText",value:function(F,z,U,ee,re){var X=this,Z=void 0,ie=G(F,z,U,ee,re),Y=o(ie,4);return F=Y[0],z=Y[1],Z=Y[2],re=Y[3],W.call(this,function(){return X.editor.formatText(F,z,Z)},re,F,0)}},{key:"getBounds",value:function(F){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U=void 0;typeof F=="number"?U=this.selection.getBounds(F,z):U=this.selection.getBounds(F.index,F.length);var ee=this.container.getBoundingClientRect();return{bottom:U.bottom-ee.top,height:U.height,left:U.left-ee.left,right:U.right-ee.left,top:U.top-ee.top,width:U.width}}},{key:"getContents",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-F,U=G(F,z),ee=o(U,2);return F=ee[0],z=ee[1],this.editor.getContents(F,z)}},{key:"getFormat",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof F=="number"?this.editor.getFormat(F,z):this.editor.getFormat(F.index,F.length)}},{key:"getIndex",value:function(F){return F.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(F){return this.scroll.leaf(F)}},{key:"getLine",value:function(F){return this.scroll.line(F)}},{key:"getLines",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof F!="number"?this.scroll.lines(F.index,F.length):this.scroll.lines(F,z)}},{key:"getModule",value:function(F){return this.theme.modules[F]}},{key:"getSelection",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return F&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-F,U=G(F,z),ee=o(U,2);return F=ee[0],z=ee[1],this.editor.getText(F,z)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(F,z,U){var ee=this,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:K.sources.API;return W.call(this,function(){return ee.editor.insertEmbed(F,z,U)},re,F)}},{key:"insertText",value:function(F,z,U,ee,re){var X=this,Z=void 0,ie=G(F,0,U,ee,re),Y=o(ie,4);return F=Y[0],Z=Y[2],re=Y[3],W.call(this,function(){return X.editor.insertText(F,z,Z)},re,F,z.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(F,z,U){this.clipboard.dangerouslyPasteHTML(F,z,U)}},{key:"removeFormat",value:function(F,z,U){var ee=this,re=G(F,z,U),X=o(re,4);return F=X[0],z=X[1],U=X[3],W.call(this,function(){return ee.editor.removeFormat(F,z)},U,F)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(F){var z=this,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API;return W.call(this,function(){F=new u.default(F);var ee=z.getLength(),re=z.editor.deleteText(0,ee),X=z.editor.applyDelta(F),Z=X.ops[X.ops.length-1];Z!=null&&typeof Z.insert=="string"&&Z.insert[Z.insert.length-1]===` 740`&&(z.editor.deleteText(z.getLength()-1,1),X.delete(1));var ie=re.compose(X);return ie},U)}},{key:"setSelection",value:function(F,z,U){if(F==null)this.selection.setRange(null,z||K.sources.API);else{var ee=G(F,z,U),re=o(ee,4);F=re[0],z=re[1],U=re[3],this.selection.setRange(new _.Range(F,z),U),U!==m.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(F){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API,U=new u.default().insert(F);return this.setContents(U,z)}},{key:"update",value:function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:m.default.sources.USER,z=this.scroll.update(F);return this.selection.update(F),z}},{key:"updateContents",value:function(F){var z=this,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:m.default.sources.API;return W.call(this,function(){return F=new u.default(F),z.editor.applyDelta(F,U)},U,!0)}}]),K})();M.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},M.events=m.default.events,M.sources=m.default.sources,M.version="1.3.7",M.imports={delta:u.default,parchment:x.default,"core/module":v.default,"core/theme":L.default};function B(K,$){if($=(0,N.default)(!0,{container:K,modules:{clipboard:!0,keyboard:!0,history:!0}},$),!$.theme||$.theme===M.DEFAULTS.theme)$.theme=L.default;else if($.theme=M.import("themes/"+$.theme),$.theme==null)throw new Error("Invalid theme "+$.theme+". Did you register it?");var F=(0,N.default)(!0,{},$.theme.DEFAULTS);[F,$].forEach(function(ee){ee.modules=ee.modules||{},Object.keys(ee.modules).forEach(function(re){ee.modules[re]===!0&&(ee.modules[re]={})})});var z=Object.keys(F.modules).concat(Object.keys($.modules)),U=z.reduce(function(ee,re){var X=M.import("modules/"+re);return X==null?I.error("Cannot load "+re+" module. Are you sure you registered it?"):ee[re]=X.DEFAULTS||{},ee},{});return $.modules!=null&&$.modules.toolbar&&$.modules.toolbar.constructor!==Object&&($.modules.toolbar={container:$.modules.toolbar}),$=(0,N.default)(!0,{},M.DEFAULTS,{modules:U},F,$),["bounds","container","scrollingContainer"].forEach(function(ee){typeof $[ee]=="string"&&($[ee]=document.querySelector($[ee]))}),$.modules=Object.keys($.modules).reduce(function(ee,re){return $.modules[re]&&(ee[re]=$.modules[re]),ee},{}),$}function W(K,$,F,z){if(this.options.strict&&!this.isEnabled()&&$===m.default.sources.USER)return new u.default;var U=F==null?null:this.getSelection(),ee=this.editor.delta,re=K();if(U!=null&&(F===!0&&(F=U.index),z==null?U=H(U,re,$):z!==0&&(U=H(U,F,z,$)),this.setSelection(U,m.default.sources.SILENT)),re.length()>0){var X,Z=[m.default.events.TEXT_CHANGE,re,ee,$];if((X=this.emitter).emit.apply(X,[m.default.events.EDITOR_CHANGE].concat(Z)),$!==m.default.sources.SILENT){var ie;(ie=this.emitter).emit.apply(ie,Z)}}return re}function G(K,$,F,z,U){var ee={};return typeof K.index=="number"&&typeof K.length=="number"?typeof $!="number"?(U=z,z=F,F=$,$=K.length,K=K.index):($=K.length,K=K.index):typeof $!="number"&&(U=z,z=F,F=$,$=0),(typeof F>"u"?"undefined":a(F))==="object"?(ee=F,U=z):typeof F=="string"&&(z!=null?ee[F]=z:U=F),U=U||m.default.sources.API,[K,$,ee,U]}function H(K,$,F,z){if(K==null)return null;var U=void 0,ee=void 0;if($ instanceof u.default){var re=[K.index,K.index+K.length].map(function(Y){return $.transformPosition(Y,z!==m.default.sources.USER)}),X=o(re,2);U=X[0],ee=X[1]}else{var Z=[K.index,K.index+K.length].map(function(Y){return Y<$||Y===$&&z===m.default.sources.USER?Y:F>=0?Y+F:Math.max($,Y+F)}),ie=o(Z,2);U=ie[0],ee=ie[1]}return new _.Range(U,ee-U)}r.expandConfig=B,r.overload=G,r.default=M}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function y(x,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}return function(x,_,S){return _&&y(x.prototype,_),S&&y(x,S),x}})(),o=function y(x,_,S){x===null&&(x=Function.prototype);var w=Object.getOwnPropertyDescriptor(x,_);if(w===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:y(N,_,S)}else{if("value"in w)return w.value;var k=w.get;return k===void 0?void 0:k.call(S)}},l=i(7),c=d(l),u=i(0),f=d(u);function d(y){return y&&y.__esModule?y:{default:y}}function p(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function m(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function b(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var v=(function(y){b(x,y);function x(){return p(this,x),m(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"formatAt",value:function(S,w,N,k){if(x.compare(this.statics.blotName,N)<0&&f.default.query(N,f.default.Scope.BLOT)){var C=this.isolate(S,w);k&&C.wrap(N,k)}else o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"formatAt",this).call(this,S,w,N,k)}},{key:"optimize",value:function(S){if(o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"optimize",this).call(this,S),this.parent instanceof x&&x.compare(this.statics.blotName,this.parent.statics.blotName)>0){var w=this.parent.isolate(this.offset(),this.length());this.moveChildren(w),w.wrap(this)}}}],[{key:"compare",value:function(S,w){var N=x.order.indexOf(S),k=x.order.indexOf(w);return N>=0||k>=0?N-k:S===w?0:S<w?-1:1}}]),x})(f.default.Inline);v.allowedChildren=[v,f.default.Embed,c.default],v.order=["cursor","inline","underline","strike","italic","bold","script","link","code"],r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function f(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var d=(function(p){f(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default.Text);r.default=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function _(S,w){for(var N=0;N<w.length;N++){var k=w[N];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(S,k.key,k)}}return function(S,w,N){return w&&_(S.prototype,w),N&&_(S,N),S}})(),o=function _(S,w,N){S===null&&(S=Function.prototype);var k=Object.getOwnPropertyDescriptor(S,w);if(k===void 0){var C=Object.getPrototypeOf(S);return C===null?void 0:_(C,w,N)}else{if("value"in k)return k.value;var P=k.get;return P===void 0?void 0:P.call(N)}},l=i(54),c=d(l),u=i(10),f=d(u);function d(_){return _&&_.__esModule?_:{default:_}}function p(_,S){if(!(_ instanceof S))throw new TypeError("Cannot call a class as a function")}function m(_,S){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return S&&(typeof S=="object"||typeof S=="function")?S:_}function b(_,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof S);_.prototype=Object.create(S&&S.prototype,{constructor:{value:_,enumerable:!1,writable:!0,configurable:!0}}),S&&(Object.setPrototypeOf?Object.setPrototypeOf(_,S):_.__proto__=S)}var v=(0,f.default)("quill:events"),y=["selectionchange","mousedown","mouseup","click"];y.forEach(function(_){document.addEventListener(_,function(){for(var S=arguments.length,w=Array(S),N=0;N<S;N++)w[N]=arguments[N];[].slice.call(document.querySelectorAll(".ql-container")).forEach(function(k){if(k.__quill&&k.__quill.emitter){var C;(C=k.__quill.emitter).handleDOM.apply(C,w)}})})});var x=(function(_){b(S,_);function S(){p(this,S);var w=m(this,(S.__proto__||Object.getPrototypeOf(S)).call(this));return w.listeners={},w.on("error",v.error),w}return a(S,[{key:"emit",value:function(){v.log.apply(v,arguments),o(S.prototype.__proto__||Object.getPrototypeOf(S.prototype),"emit",this).apply(this,arguments)}},{key:"handleDOM",value:function(N){for(var k=arguments.length,C=Array(k>1?k-1:0),P=1;P<k;P++)C[P-1]=arguments[P];(this.listeners[N.type]||[]).forEach(function(L){var T=L.node,A=L.handler;(N.target===T||T.contains(N.target))&&A.apply(void 0,[N].concat(C))})}},{key:"listenDOM",value:function(N,k,C){this.listeners[N]||(this.listeners[N]=[]),this.listeners[N].push({node:k,handler:C})}}]),S})(c.default);x.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},x.sources={API:"api",SILENT:"silent",USER:"user"},r.default=x}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});function a(l,c){if(!(l instanceof c))throw new TypeError("Cannot call a class as a function")}var o=function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};a(this,l),this.quill=c,this.options=u};o.DEFAULTS={},r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=["error","warn","log","info"],o="warn";function l(u){if(a.indexOf(u)<=a.indexOf(o)){for(var f,d=arguments.length,p=Array(d>1?d-1:0),m=1;m<d;m++)p[m-1]=arguments[m];(f=console)[u].apply(f,p)}}function c(u){return a.reduce(function(f,d){return f[d]=l.bind(console,d,u),f},{})}l.level=c.level=function(u){o=u},r.default=c}),(function(n,r,i){var a=Array.prototype.slice,o=i(52),l=i(53),c=n.exports=function(p,m,b){return b||(b={}),p===m?!0:p instanceof Date&&m instanceof Date?p.getTime()===m.getTime():!p||!m||typeof p!="object"&&typeof m!="object"?b.strict?p===m:p==m:d(p,m,b)};function u(p){return p==null}function f(p){return!(!p||typeof p!="object"||typeof p.length!="number"||typeof p.copy!="function"||typeof p.slice!="function"||p.length>0&&typeof p[0]!="number")}function d(p,m,b){var v,y;if(u(p)||u(m)||p.prototype!==m.prototype)return!1;if(l(p))return l(m)?(p=a.call(p),m=a.call(m),c(p,m,b)):!1;if(f(p)){if(!f(m)||p.length!==m.length)return!1;for(v=0;v<p.length;v++)if(p[v]!==m[v])return!1;return!0}try{var x=o(p),_=o(m)}catch{return!1}if(x.length!=_.length)return!1;for(x.sort(),_.sort(),v=x.length-1;v>=0;v--)if(x[v]!=_[v])return!1;for(v=x.length-1;v>=0;v--)if(y=x[v],!c(p[y],m[y],b))return!1;return typeof p==typeof m}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(1),o=(function(){function l(c,u,f){f===void 0&&(f={}),this.attrName=c,this.keyName=u;var d=a.Scope.TYPE&a.Scope.ATTRIBUTE;f.scope!=null?this.scope=f.scope&a.Scope.LEVEL|d:this.scope=a.Scope.ATTRIBUTE,f.whitelist!=null&&(this.whitelist=f.whitelist)}return l.keys=function(c){return[].map.call(c.attributes,function(u){return u.name})},l.prototype.add=function(c,u){return this.canAdd(c,u)?(c.setAttribute(this.keyName,u),!0):!1},l.prototype.canAdd=function(c,u){var f=a.query(c,a.Scope.BLOT&(this.scope|a.Scope.TYPE));return f==null?!1:this.whitelist==null?!0:typeof u=="string"?this.whitelist.indexOf(u.replace(/["']/g,""))>-1:this.whitelist.indexOf(u)>-1},l.prototype.remove=function(c){c.removeAttribute(this.keyName)},l.prototype.value=function(c){var u=c.getAttribute(this.keyName);return this.canAdd(c,u)&&u?u:""},l})();r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var a=(function(){function P(L,T){var A=[],R=!0,I=!1,M=void 0;try{for(var B=L[Symbol.iterator](),W;!(R=(W=B.next()).done)&&(A.push(W.value),!(T&&A.length===T));R=!0);}catch(G){I=!0,M=G}finally{try{!R&&B.return&&B.return()}finally{if(I)throw M}}return A}return function(L,T){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return P(L,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function P(L,T){for(var A=0;A<T.length;A++){var R=T[A];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(L,R.key,R)}}return function(L,T,A){return T&&P(L.prototype,T),A&&P(L,A),L}})(),l=function P(L,T,A){L===null&&(L=Function.prototype);var R=Object.getOwnPropertyDescriptor(L,T);if(R===void 0){var I=Object.getPrototypeOf(L);return I===null?void 0:P(I,T,A)}else{if("value"in R)return R.value;var M=R.get;return M===void 0?void 0:M.call(A)}},c=i(2),u=_(c),f=i(0),d=_(f),p=i(4),m=_(p),b=i(6),v=_(b),y=i(7),x=_(y);function _(P){return P&&P.__esModule?P:{default:P}}function S(P,L){if(!(P instanceof L))throw new TypeError("Cannot call a class as a function")}function w(P,L){if(!P)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L&&(typeof L=="object"||typeof L=="function")?L:P}function N(P,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof L);P.prototype=Object.create(L&&L.prototype,{constructor:{value:P,enumerable:!1,writable:!0,configurable:!0}}),L&&(Object.setPrototypeOf?Object.setPrototypeOf(P,L):P.__proto__=L)}var k=(function(P){N(L,P);function L(){return S(this,L),w(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return L})(v.default);k.blotName="code",k.tagName="CODE";var C=(function(P){N(L,P);function L(){return S(this,L),w(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}return o(L,[{key:"delta",value:function(){var A=this,R=this.domNode.textContent;return R.endsWith(` 741`)&&(R=R.slice(0,-1)),R.split(` 742`).reduce(function(I,M){return I.insert(M).insert(` 743`,A.formats())},new u.default)}},{key:"format",value:function(A,R){if(!(A===this.statics.blotName&&R)){var I=this.descendant(x.default,this.length()-1),M=a(I,1),B=M[0];B!=null&&B.deleteAt(B.length()-1,1),l(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"format",this).call(this,A,R)}}},{key:"formatAt",value:function(A,R,I,M){if(R!==0&&!(d.default.query(I,d.default.Scope.BLOCK)==null||I===this.statics.blotName&&M===this.statics.formats(this.domNode))){var B=this.newlineIndex(A);if(!(B<0||B>=A+R)){var W=this.newlineIndex(A,!0)+1,G=B-W+1,H=this.isolate(W,G),K=H.next;H.format(I,M),K instanceof L&&K.formatAt(0,A-W+R-G,I,M)}}}},{key:"insertAt",value:function(A,R,I){if(I==null){var M=this.descendant(x.default,A),B=a(M,2),W=B[0],G=B[1];W.insertAt(G,R)}}},{key:"length",value:function(){var A=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` 744`)?A:A+1}},{key:"newlineIndex",value:function(A){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(R)return this.domNode.textContent.slice(0,A).lastIndexOf(` 745`);var I=this.domNode.textContent.slice(A).indexOf(` 746`);return I>-1?A+I:-1}},{key:"optimize",value:function(A){this.domNode.textContent.endsWith(` 747`)||this.appendChild(d.default.create("text",` 748`)),l(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"optimize",this).call(this,A);var R=this.next;R!=null&&R.prev===this&&R.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===R.statics.formats(R.domNode)&&(R.optimize(A),R.moveChildren(this),R.remove())}},{key:"replace",value:function(A){l(L.prototype.__proto__||Object.getPrototypeOf(L.prototype),"replace",this).call(this,A),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(R){var I=d.default.find(R);I==null?R.parentNode.removeChild(R):I instanceof d.default.Embed?I.remove():I.unwrap()})}}],[{key:"create",value:function(A){var R=l(L.__proto__||Object.getPrototypeOf(L),"create",this).call(this,A);return R.setAttribute("spellcheck",!1),R}},{key:"formats",value:function(){return!0}}]),L})(m.default);C.blotName="code-block",C.tagName="PRE",C.TAB=" ",r.Code=k,r.default=C}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(K){return typeof K}:function(K){return K&&typeof Symbol=="function"&&K.constructor===Symbol&&K!==Symbol.prototype?"symbol":typeof K},o=(function(){function K($,F){var z=[],U=!0,ee=!1,re=void 0;try{for(var X=$[Symbol.iterator](),Z;!(U=(Z=X.next()).done)&&(z.push(Z.value),!(F&&z.length===F));U=!0);}catch(ie){ee=!0,re=ie}finally{try{!U&&X.return&&X.return()}finally{if(ee)throw re}}return z}return function($,F){if(Array.isArray($))return $;if(Symbol.iterator in Object($))return K($,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function K($,F){for(var z=0;z<F.length;z++){var U=F[z];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty($,U.key,U)}}return function($,F,z){return F&&K($.prototype,F),z&&K($,z),$}})(),c=i(2),u=R(c),f=i(20),d=R(f),p=i(0),m=R(p),b=i(13),v=R(b),y=i(24),x=R(y),_=i(4),S=R(_),w=i(16),N=R(w),k=i(21),C=R(k),P=i(11),L=R(P),T=i(3),A=R(T);function R(K){return K&&K.__esModule?K:{default:K}}function I(K,$,F){return $ in K?Object.defineProperty(K,$,{value:F,enumerable:!0,configurable:!0,writable:!0}):K[$]=F,K}function M(K,$){if(!(K instanceof $))throw new TypeError("Cannot call a class as a function")}var B=/^[ -~]*$/,W=(function(){function K($){M(this,K),this.scroll=$,this.delta=this.getDelta()}return l(K,[{key:"applyDelta",value:function(F){var z=this,U=!1;this.scroll.update();var ee=this.scroll.length();return this.scroll.batchStart(),F=H(F),F.reduce(function(re,X){var Z=X.retain||X.delete||X.insert.length||1,ie=X.attributes||{};if(X.insert!=null){if(typeof X.insert=="string"){var Y=X.insert;Y.endsWith(` 749`)&&U&&(U=!1,Y=Y.slice(0,-1)),re>=ee&&!Y.endsWith(` 750`)&&(U=!0),z.scroll.insertAt(re,Y);var J=z.scroll.line(re),se=o(J,2),V=se[0],fe=se[1],ce=(0,A.default)({},(0,_.bubbleFormats)(V));if(V instanceof S.default){var Ne=V.descendant(m.default.Leaf,fe),me=o(Ne,1),je=me[0];ce=(0,A.default)(ce,(0,_.bubbleFormats)(je))}ie=d.default.attributes.diff(ce,ie)||{}}else if(a(X.insert)==="object"){var te=Object.keys(X.insert)[0];if(te==null)return re;z.scroll.insertAt(re,te,X.insert[te])}ee+=Z}return Object.keys(ie).forEach(function(oe){z.scroll.formatAt(re,Z,oe,ie[oe])}),re+Z},0),F.reduce(function(re,X){return typeof X.delete=="number"?(z.scroll.deleteAt(re,X.delete),re):re+(X.retain||X.insert.length||1)},0),this.scroll.batchEnd(),this.update(F)}},{key:"deleteText",value:function(F,z){return this.scroll.deleteAt(F,z),this.update(new u.default().retain(F).delete(z))}},{key:"formatLine",value:function(F,z){var U=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(ee).forEach(function(re){if(!(U.scroll.whitelist!=null&&!U.scroll.whitelist[re])){var X=U.scroll.lines(F,Math.max(z,1)),Z=z;X.forEach(function(ie){var Y=ie.length();if(!(ie instanceof v.default))ie.format(re,ee[re]);else{var J=F-ie.offset(U.scroll),se=ie.newlineIndex(J+Z)-J+1;ie.formatAt(J,se,re,ee[re])}Z-=Y})}}),this.scroll.optimize(),this.update(new u.default().retain(F).retain(z,(0,C.default)(ee)))}},{key:"formatText",value:function(F,z){var U=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(ee).forEach(function(re){U.scroll.formatAt(F,z,re,ee[re])}),this.update(new u.default().retain(F).retain(z,(0,C.default)(ee)))}},{key:"getContents",value:function(F,z){return this.delta.slice(F,F+z)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(F,z){return F.concat(z.delta())},new u.default)}},{key:"getFormat",value:function(F){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,U=[],ee=[];z===0?this.scroll.path(F).forEach(function(X){var Z=o(X,1),ie=Z[0];ie instanceof S.default?U.push(ie):ie instanceof m.default.Leaf&&ee.push(ie)}):(U=this.scroll.lines(F,z),ee=this.scroll.descendants(m.default.Leaf,F,z));var re=[U,ee].map(function(X){if(X.length===0)return{};for(var Z=(0,_.bubbleFormats)(X.shift());Object.keys(Z).length>0;){var ie=X.shift();if(ie==null)return Z;Z=G((0,_.bubbleFormats)(ie),Z)}return Z});return A.default.apply(A.default,re)}},{key:"getText",value:function(F,z){return this.getContents(F,z).filter(function(U){return typeof U.insert=="string"}).map(function(U){return U.insert}).join("")}},{key:"insertEmbed",value:function(F,z,U){return this.scroll.insertAt(F,z,U),this.update(new u.default().retain(F).insert(I({},z,U)))}},{key:"insertText",value:function(F,z){var U=this,ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return z=z.replace(/\r\n/g,` 751`).replace(/\r/g,` 752`),this.scroll.insertAt(F,z),Object.keys(ee).forEach(function(re){U.scroll.formatAt(F,z.length,re,ee[re])}),this.update(new u.default().retain(F).insert(z,(0,C.default)(ee)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var F=this.scroll.children.head;return F.statics.blotName!==S.default.blotName||F.children.length>1?!1:F.children.head instanceof N.default}},{key:"removeFormat",value:function(F,z){var U=this.getText(F,z),ee=this.scroll.line(F+z),re=o(ee,2),X=re[0],Z=re[1],ie=0,Y=new u.default;X!=null&&(X instanceof v.default?ie=X.newlineIndex(Z)-Z+1:ie=X.length()-Z,Y=X.delta().slice(Z,Z+ie-1).insert(` 753`));var J=this.getContents(F,z+ie),se=J.diff(new u.default().insert(U).concat(Y)),V=new u.default().retain(F).concat(se);return this.applyDelta(V)}},{key:"update",value:function(F){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],U=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,ee=this.delta;if(z.length===1&&z[0].type==="characterData"&&z[0].target.data.match(B)&&m.default.find(z[0].target)){var re=m.default.find(z[0].target),X=(0,_.bubbleFormats)(re),Z=re.offset(this.scroll),ie=z[0].oldValue.replace(x.default.CONTENTS,""),Y=new u.default().insert(ie),J=new u.default().insert(re.value()),se=new u.default().retain(Z).concat(Y.diff(J,U));F=se.reduce(function(V,fe){return fe.insert?V.insert(fe.insert,X):V.push(fe)},new u.default),this.delta=ee.compose(F)}else this.delta=this.getDelta(),(!F||!(0,L.default)(ee.compose(F),this.delta))&&(F=ee.diff(this.delta,U));return F}}]),K})();function G(K,$){return Object.keys($).reduce(function(F,z){return K[z]==null||($[z]===K[z]?F[z]=$[z]:Array.isArray($[z])?$[z].indexOf(K[z])<0&&(F[z]=$[z].concat([K[z]])):F[z]=[$[z],K[z]]),F},{})}function H(K){return K.reduce(function($,F){if(F.insert===1){var z=(0,C.default)(F.attributes);return delete z.image,$.insert({image:F.attributes.image},z)}if(F.attributes!=null&&(F.attributes.list===!0||F.attributes.bullet===!0)&&(F=(0,C.default)(F),F.attributes.list?F.attributes.list="ordered":(F.attributes.list="bullet",delete F.attributes.bullet)),typeof F.insert=="string"){var U=F.insert.replace(/\r\n/g,` 754`).replace(/\r/g,` 755`);return $.insert(U,F.attributes)}return $.push(F)},new u.default)}r.default=W}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var a=(function(){function P(L,T){var A=[],R=!0,I=!1,M=void 0;try{for(var B=L[Symbol.iterator](),W;!(R=(W=B.next()).done)&&(A.push(W.value),!(T&&A.length===T));R=!0);}catch(G){I=!0,M=G}finally{try{!R&&B.return&&B.return()}finally{if(I)throw M}}return A}return function(L,T){if(Array.isArray(L))return L;if(Symbol.iterator in Object(L))return P(L,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function P(L,T){for(var A=0;A<T.length;A++){var R=T[A];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(L,R.key,R)}}return function(L,T,A){return T&&P(L.prototype,T),A&&P(L,A),L}})(),l=i(0),c=x(l),u=i(21),f=x(u),d=i(11),p=x(d),m=i(8),b=x(m),v=i(10),y=x(v);function x(P){return P&&P.__esModule?P:{default:P}}function _(P){if(Array.isArray(P)){for(var L=0,T=Array(P.length);L<P.length;L++)T[L]=P[L];return T}else return Array.from(P)}function S(P,L){if(!(P instanceof L))throw new TypeError("Cannot call a class as a function")}var w=(0,y.default)("quill:selection"),N=function P(L){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;S(this,P),this.index=L,this.length=T},k=(function(){function P(L,T){var A=this;S(this,P),this.emitter=T,this.scroll=L,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=c.default.create("cursor",this),this.lastRange=this.savedRange=new N(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){A.mouseDown||setTimeout(A.update.bind(A,b.default.sources.USER),1)}),this.emitter.on(b.default.events.EDITOR_CHANGE,function(R,I){R===b.default.events.TEXT_CHANGE&&I.length()>0&&A.update(b.default.sources.SILENT)}),this.emitter.on(b.default.events.SCROLL_BEFORE_UPDATE,function(){if(A.hasFocus()){var R=A.getNativeRange();R!=null&&R.start.node!==A.cursor.textNode&&A.emitter.once(b.default.events.SCROLL_UPDATE,function(){try{A.setNativeRange(R.start.node,R.start.offset,R.end.node,R.end.offset)}catch{}})}}),this.emitter.on(b.default.events.SCROLL_OPTIMIZE,function(R,I){if(I.range){var M=I.range,B=M.startNode,W=M.startOffset,G=M.endNode,H=M.endOffset;A.setNativeRange(B,W,G,H)}}),this.update(b.default.sources.SILENT)}return o(P,[{key:"handleComposition",value:function(){var T=this;this.root.addEventListener("compositionstart",function(){T.composing=!0}),this.root.addEventListener("compositionend",function(){if(T.composing=!1,T.cursor.parent){var A=T.cursor.restore();if(!A)return;setTimeout(function(){T.setNativeRange(A.startNode,A.startOffset,A.endNode,A.endOffset)},1)}})}},{key:"handleDragging",value:function(){var T=this;this.emitter.listenDOM("mousedown",document.body,function(){T.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){T.mouseDown=!1,T.update(b.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(T,A){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[T])){this.scroll.update();var R=this.getNativeRange();if(!(R==null||!R.native.collapsed||c.default.query(T,c.default.Scope.BLOCK))){if(R.start.node!==this.cursor.textNode){var I=c.default.find(R.start.node,!1);if(I==null)return;if(I instanceof c.default.Leaf){var M=I.split(R.start.offset);I.parent.insertBefore(this.cursor,M)}else I.insertBefore(this.cursor,R.start.node);this.cursor.attach()}this.cursor.format(T,A),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(T){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,R=this.scroll.length();T=Math.min(T,R-1),A=Math.min(T+A,R-1)-T;var I=void 0,M=this.scroll.leaf(T),B=a(M,2),W=B[0],G=B[1];if(W==null)return null;var H=W.position(G,!0),K=a(H,2);I=K[0],G=K[1];var $=document.createRange();if(A>0){$.setStart(I,G);var F=this.scroll.leaf(T+A),z=a(F,2);if(W=z[0],G=z[1],W==null)return null;var U=W.position(G,!0),ee=a(U,2);return I=ee[0],G=ee[1],$.setEnd(I,G),$.getBoundingClientRect()}else{var re="left",X=void 0;return I instanceof Text?(G<I.data.length?($.setStart(I,G),$.setEnd(I,G+1)):($.setStart(I,G-1),$.setEnd(I,G),re="right"),X=$.getBoundingClientRect()):(X=W.domNode.getBoundingClientRect(),G>0&&(re="right")),{bottom:X.top+X.height,height:X.height,left:X[re],right:X[re],top:X.top,width:0}}}},{key:"getNativeRange",value:function(){var T=document.getSelection();if(T==null||T.rangeCount<=0)return null;var A=T.getRangeAt(0);if(A==null)return null;var R=this.normalizeNative(A);return w.info("getNativeRange",R),R}},{key:"getRange",value:function(){var T=this.getNativeRange();if(T==null)return[null,null];var A=this.normalizedToRange(T);return[A,T]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(T){var A=this,R=[[T.start.node,T.start.offset]];T.native.collapsed||R.push([T.end.node,T.end.offset]);var I=R.map(function(W){var G=a(W,2),H=G[0],K=G[1],$=c.default.find(H,!0),F=$.offset(A.scroll);return K===0?F:$ instanceof c.default.Container?F+$.length():F+$.index(H,K)}),M=Math.min(Math.max.apply(Math,_(I)),this.scroll.length()-1),B=Math.min.apply(Math,[M].concat(_(I)));return new N(B,M-B)}},{key:"normalizeNative",value:function(T){if(!C(this.root,T.startContainer)||!T.collapsed&&!C(this.root,T.endContainer))return null;var A={start:{node:T.startContainer,offset:T.startOffset},end:{node:T.endContainer,offset:T.endOffset},native:T};return[A.start,A.end].forEach(function(R){for(var I=R.node,M=R.offset;!(I instanceof Text)&&I.childNodes.length>0;)if(I.childNodes.length>M)I=I.childNodes[M],M=0;else if(I.childNodes.length===M)I=I.lastChild,M=I instanceof Text?I.data.length:I.childNodes.length+1;else break;R.node=I,R.offset=M}),A}},{key:"rangeToNative",value:function(T){var A=this,R=T.collapsed?[T.index]:[T.index,T.index+T.length],I=[],M=this.scroll.length();return R.forEach(function(B,W){B=Math.min(M-1,B);var G=void 0,H=A.scroll.leaf(B),K=a(H,2),$=K[0],F=K[1],z=$.position(F,W!==0),U=a(z,2);G=U[0],F=U[1],I.push(G,F)}),I.length<2&&(I=I.concat(I)),I}},{key:"scrollIntoView",value:function(T){var A=this.lastRange;if(A!=null){var R=this.getBounds(A.index,A.length);if(R!=null){var I=this.scroll.length()-1,M=this.scroll.line(Math.min(A.index,I)),B=a(M,1),W=B[0],G=W;if(A.length>0){var H=this.scroll.line(Math.min(A.index+A.length,I)),K=a(H,1);G=K[0]}if(!(W==null||G==null)){var $=T.getBoundingClientRect();R.top<$.top?T.scrollTop-=$.top-R.top:R.bottom>$.bottom&&(T.scrollTop+=R.bottom-$.bottom)}}}}},{key:"setNativeRange",value:function(T,A){var R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T,I=arguments.length>3&&arguments[3]!==void 0?arguments[3]:A,M=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(w.info("setNativeRange",T,A,R,I),!(T!=null&&(this.root.parentNode==null||T.parentNode==null||R.parentNode==null))){var B=document.getSelection();if(B!=null)if(T!=null){this.hasFocus()||this.root.focus();var W=(this.getNativeRange()||{}).native;if(W==null||M||T!==W.startContainer||A!==W.startOffset||R!==W.endContainer||I!==W.endOffset){T.tagName=="BR"&&(A=[].indexOf.call(T.parentNode.childNodes,T),T=T.parentNode),R.tagName=="BR"&&(I=[].indexOf.call(R.parentNode.childNodes,R),R=R.parentNode);var G=document.createRange();G.setStart(T,A),G.setEnd(R,I),B.removeAllRanges(),B.addRange(G)}}else B.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(T){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.default.sources.API;if(typeof A=="string"&&(R=A,A=!1),w.info("setRange",T),T!=null){var I=this.rangeToNative(T);this.setNativeRange.apply(this,_(I).concat([A]))}else this.setNativeRange(null);this.update(R)}},{key:"update",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:b.default.sources.USER,A=this.lastRange,R=this.getRange(),I=a(R,2),M=I[0],B=I[1];if(this.lastRange=M,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,p.default)(A,this.lastRange)){var W;!this.composing&&B!=null&&B.native.collapsed&&B.start.node!==this.cursor.textNode&&this.cursor.restore();var G=[b.default.events.SELECTION_CHANGE,(0,f.default)(this.lastRange),(0,f.default)(A),T];if((W=this.emitter).emit.apply(W,[b.default.events.EDITOR_CHANGE].concat(G)),T!==b.default.sources.SILENT){var H;(H=this.emitter).emit.apply(H,G)}}}}]),P})();function C(P,L){try{L.parentNode}catch{return!1}return L instanceof Text&&(L=L.parentNode),P.contains(L)}r.Range=N,r.default=k}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function b(v,y){for(var x=0;x<y.length;x++){var _=y[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,y,x)}else{if("value"in _)return _.value;var w=_.get;return w===void 0?void 0:w.call(x)}},l=i(0),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function f(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var m=(function(b){p(v,b);function v(){return f(this,v),d(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,[{key:"insertInto",value:function(x,_){x.children.length===0?o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertInto",this).call(this,x,_):this.remove()}},{key:"length",value:function(){return 0}},{key:"value",value:function(){return""}}],[{key:"value",value:function(){}}]),v})(c.default.Embed);m.blotName="break",m.tagName="BR",r.default=m}),(function(n,r,i){var a=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var b in m)m.hasOwnProperty(b)&&(p[b]=m[b])};return function(p,m){d(p,m);function b(){this.constructor=p}p.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(44),l=i(30),c=i(1),u=(function(d){a(p,d);function p(m){var b=d.call(this,m)||this;return b.build(),b}return p.prototype.appendChild=function(m){this.insertBefore(m)},p.prototype.attach=function(){d.prototype.attach.call(this),this.children.forEach(function(m){m.attach()})},p.prototype.build=function(){var m=this;this.children=new o.default,[].slice.call(this.domNode.childNodes).reverse().forEach(function(b){try{var v=f(b);m.insertBefore(v,m.children.head||void 0)}catch(y){if(y instanceof c.ParchmentError)return;throw y}})},p.prototype.deleteAt=function(m,b){if(m===0&&b===this.length())return this.remove();this.children.forEachAt(m,b,function(v,y,x){v.deleteAt(y,x)})},p.prototype.descendant=function(m,b){var v=this.children.find(b),y=v[0],x=v[1];return m.blotName==null&&m(y)||m.blotName!=null&&y instanceof m?[y,x]:y instanceof p?y.descendant(m,x):[null,-1]},p.prototype.descendants=function(m,b,v){b===void 0&&(b=0),v===void 0&&(v=Number.MAX_VALUE);var y=[],x=v;return this.children.forEachAt(b,v,function(_,S,w){(m.blotName==null&&m(_)||m.blotName!=null&&_ instanceof m)&&y.push(_),_ instanceof p&&(y=y.concat(_.descendants(m,S,x))),x-=w}),y},p.prototype.detach=function(){this.children.forEach(function(m){m.detach()}),d.prototype.detach.call(this)},p.prototype.formatAt=function(m,b,v,y){this.children.forEachAt(m,b,function(x,_,S){x.formatAt(_,S,v,y)})},p.prototype.insertAt=function(m,b,v){var y=this.children.find(m),x=y[0],_=y[1];if(x)x.insertAt(_,b,v);else{var S=v==null?c.create("text",b):c.create(b,v);this.appendChild(S)}},p.prototype.insertBefore=function(m,b){if(this.statics.allowedChildren!=null&&!this.statics.allowedChildren.some(function(v){return m instanceof v}))throw new c.ParchmentError("Cannot insert "+m.statics.blotName+" into "+this.statics.blotName);m.insertInto(this,b)},p.prototype.length=function(){return this.children.reduce(function(m,b){return m+b.length()},0)},p.prototype.moveChildren=function(m,b){this.children.forEach(function(v){m.insertBefore(v,b)})},p.prototype.optimize=function(m){if(d.prototype.optimize.call(this,m),this.children.length===0)if(this.statics.defaultChild!=null){var b=c.create(this.statics.defaultChild);this.appendChild(b),b.optimize(m)}else this.remove()},p.prototype.path=function(m,b){b===void 0&&(b=!1);var v=this.children.find(m,b),y=v[0],x=v[1],_=[[this,m]];return y instanceof p?_.concat(y.path(x,b)):(y!=null&&_.push([y,x]),_)},p.prototype.removeChild=function(m){this.children.remove(m)},p.prototype.replace=function(m){m instanceof p&&m.moveChildren(this),d.prototype.replace.call(this,m)},p.prototype.split=function(m,b){if(b===void 0&&(b=!1),!b){if(m===0)return this;if(m===this.length())return this.next}var v=this.clone();return this.parent.insertBefore(v,this.next),this.children.forEachAt(m,this.length(),function(y,x,_){y=y.split(x,b),v.appendChild(y)}),v},p.prototype.unwrap=function(){this.moveChildren(this.parent,this.next),this.remove()},p.prototype.update=function(m,b){var v=this,y=[],x=[];m.forEach(function(_){_.target===v.domNode&&_.type==="childList"&&(y.push.apply(y,_.addedNodes),x.push.apply(x,_.removedNodes))}),x.forEach(function(_){if(!(_.parentNode!=null&&_.tagName!=="IFRAME"&&document.body.compareDocumentPosition(_)&Node.DOCUMENT_POSITION_CONTAINED_BY)){var S=c.find(_);S!=null&&(S.domNode.parentNode==null||S.domNode.parentNode===v.domNode)&&S.detach()}}),y.filter(function(_){return _.parentNode==v.domNode}).sort(function(_,S){return _===S?0:_.compareDocumentPosition(S)&Node.DOCUMENT_POSITION_FOLLOWING?1:-1}).forEach(function(_){var S=null;_.nextSibling!=null&&(S=c.find(_.nextSibling));var w=f(_);(w.next!=S||w.next==null)&&(w.parent!=null&&w.parent.removeChild(v),v.insertBefore(w,S||void 0))})},p})(l.default);function f(d){var p=c.find(d);if(p==null)try{p=c.create(d)}catch{p=c.create(c.Scope.INLINE),[].slice.call(d.childNodes).forEach(function(b){p.domNode.appendChild(b)}),d.parentNode&&d.parentNode.replaceChild(p.domNode,d),p.attach()}return p}r.default=u}),(function(n,r,i){var a=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var b in m)m.hasOwnProperty(b)&&(p[b]=m[b])};return function(p,m){d(p,m);function b(){this.constructor=p}p.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12),l=i(31),c=i(17),u=i(1),f=(function(d){a(p,d);function p(m){var b=d.call(this,m)||this;return b.attributes=new l.default(b.domNode),b}return p.formats=function(m){if(typeof this.tagName=="string")return!0;if(Array.isArray(this.tagName))return m.tagName.toLowerCase()},p.prototype.format=function(m,b){var v=u.query(m);v instanceof o.default?this.attributes.attribute(v,b):b&&v!=null&&(m!==this.statics.blotName||this.formats()[m]!==b)&&this.replaceWith(m,b)},p.prototype.formats=function(){var m=this.attributes.values(),b=this.statics.formats(this.domNode);return b!=null&&(m[this.statics.blotName]=b),m},p.prototype.replaceWith=function(m,b){var v=d.prototype.replaceWith.call(this,m,b);return this.attributes.copy(v),v},p.prototype.update=function(m,b){var v=this;d.prototype.update.call(this,m,b),m.some(function(y){return y.target===v.domNode&&y.type==="attributes"})&&this.attributes.build()},p.prototype.wrap=function(m,b){var v=d.prototype.wrap.call(this,m,b);return v instanceof p&&v.statics.scope===this.statics.scope&&this.attributes.move(v),v},p})(c.default);r.default=f}),(function(n,r,i){var a=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var p in d)d.hasOwnProperty(p)&&(f[p]=d[p])};return function(f,d){u(f,d);function p(){this.constructor=f}f.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(30),l=i(1),c=(function(u){a(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.value=function(d){return!0},f.prototype.index=function(d,p){return this.domNode===d||this.domNode.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_CONTAINED_BY?Math.min(p,1):-1},f.prototype.position=function(d,p){var m=[].indexOf.call(this.parent.domNode.childNodes,this.domNode);return d>0&&(m+=1),[this.parent.domNode,m]},f.prototype.value=function(){var d;return d={},d[this.statics.blotName]=this.statics.value(this.domNode)||!0,d},f.scope=l.Scope.INLINE_BLOT,f})(o.default);r.default=c}),(function(n,r,i){var a=i(11),o=i(3),l={attributes:{compose:function(u,f,d){typeof u!="object"&&(u={}),typeof f!="object"&&(f={});var p=o(!0,{},f);d||(p=Object.keys(p).reduce(function(b,v){return p[v]!=null&&(b[v]=p[v]),b},{}));for(var m in u)u[m]!==void 0&&f[m]===void 0&&(p[m]=u[m]);return Object.keys(p).length>0?p:void 0},diff:function(u,f){typeof u!="object"&&(u={}),typeof f!="object"&&(f={});var d=Object.keys(u).concat(Object.keys(f)).reduce(function(p,m){return a(u[m],f[m])||(p[m]=f[m]===void 0?null:f[m]),p},{});return Object.keys(d).length>0?d:void 0},transform:function(u,f,d){if(typeof u!="object")return f;if(typeof f=="object"){if(!d)return f;var p=Object.keys(f).reduce(function(m,b){return u[b]===void 0&&(m[b]=f[b]),m},{});return Object.keys(p).length>0?p:void 0}}},iterator:function(u){return new c(u)},length:function(u){return typeof u.delete=="number"?u.delete:typeof u.retain=="number"?u.retain:typeof u.insert=="string"?u.insert.length:1}};function c(u){this.ops=u,this.index=0,this.offset=0}c.prototype.hasNext=function(){return this.peekLength()<1/0},c.prototype.next=function(u){u||(u=1/0);var f=this.ops[this.index];if(f){var d=this.offset,p=l.length(f);if(u>=p-d?(u=p-d,this.index+=1,this.offset=0):this.offset+=u,typeof f.delete=="number")return{delete:u};var m={};return f.attributes&&(m.attributes=f.attributes),typeof f.retain=="number"?m.retain=u:typeof f.insert=="string"?m.insert=f.insert.substr(d,u):m.insert=f.insert,m}else return{retain:1/0}},c.prototype.peek=function(){return this.ops[this.index]},c.prototype.peekLength=function(){return this.ops[this.index]?l.length(this.ops[this.index])-this.offset:1/0},c.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},c.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var u=this.offset,f=this.index,d=this.next(),p=this.ops.slice(this.index);return this.offset=u,this.index=f,[d].concat(p)}else return[]},n.exports=l}),(function(n,r){var i=(function(){function a(v,y){return y!=null&&v instanceof y}var o;try{o=Map}catch{o=function(){}}var l;try{l=Set}catch{l=function(){}}var c;try{c=Promise}catch{c=function(){}}function u(v,y,x,_,S){typeof y=="object"&&(x=y.depth,_=y.prototype,S=y.includeNonEnumerable,y=y.circular);var w=[],N=[],k=typeof Buffer<"u";typeof y>"u"&&(y=!0),typeof x>"u"&&(x=1/0);function C(P,L){if(P===null)return null;if(L===0)return P;var T,A;if(typeof P!="object")return P;if(a(P,o))T=new o;else if(a(P,l))T=new l;else if(a(P,c))T=new c(function($,F){P.then(function(z){$(C(z,L-1))},function(z){F(C(z,L-1))})});else if(u.__isArray(P))T=[];else if(u.__isRegExp(P))T=new RegExp(P.source,b(P)),P.lastIndex&&(T.lastIndex=P.lastIndex);else if(u.__isDate(P))T=new Date(P.getTime());else{if(k&&Buffer.isBuffer(P))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(P.length):T=new Buffer(P.length),P.copy(T),T;a(P,Error)?T=Object.create(P):typeof _>"u"?(A=Object.getPrototypeOf(P),T=Object.create(A)):(T=Object.create(_),A=_)}if(y){var R=w.indexOf(P);if(R!=-1)return N[R];w.push(P),N.push(T)}a(P,o)&&P.forEach(function($,F){var z=C(F,L-1),U=C($,L-1);T.set(z,U)}),a(P,l)&&P.forEach(function($){var F=C($,L-1);T.add(F)});for(var I in P){var M;A&&(M=Object.getOwnPropertyDescriptor(A,I)),!(M&&M.set==null)&&(T[I]=C(P[I],L-1))}if(Object.getOwnPropertySymbols)for(var B=Object.getOwnPropertySymbols(P),I=0;I<B.length;I++){var W=B[I],G=Object.getOwnPropertyDescriptor(P,W);G&&!G.enumerable&&!S||(T[W]=C(P[W],L-1),G.enumerable||Object.defineProperty(T,W,{enumerable:!1}))}if(S)for(var H=Object.getOwnPropertyNames(P),I=0;I<H.length;I++){var K=H[I],G=Object.getOwnPropertyDescriptor(P,K);G&&G.enumerable||(T[K]=C(P[K],L-1),Object.defineProperty(T,K,{enumerable:!1}))}return T}return C(v,x)}u.clonePrototype=function(y){if(y===null)return null;var x=function(){};return x.prototype=y,new x};function f(v){return Object.prototype.toString.call(v)}u.__objToStr=f;function d(v){return typeof v=="object"&&f(v)==="[object Date]"}u.__isDate=d;function p(v){return typeof v=="object"&&f(v)==="[object Array]"}u.__isArray=p;function m(v){return typeof v=="object"&&f(v)==="[object RegExp]"}u.__isRegExp=m;function b(v){var y="";return v.global&&(y+="g"),v.ignoreCase&&(y+="i"),v.multiline&&(y+="m"),y}return u.__getRegExpFlags=b,u})();typeof n=="object"&&n.exports&&(n.exports=i)}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function T(A,R){var I=[],M=!0,B=!1,W=void 0;try{for(var G=A[Symbol.iterator](),H;!(M=(H=G.next()).done)&&(I.push(H.value),!(R&&I.length===R));M=!0);}catch(K){B=!0,W=K}finally{try{!M&&G.return&&G.return()}finally{if(B)throw W}}return I}return function(A,R){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return T(A,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function T(A,R){for(var I=0;I<R.length;I++){var M=R[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}return function(A,R,I){return R&&T(A.prototype,R),I&&T(A,I),A}})(),l=function T(A,R,I){A===null&&(A=Function.prototype);var M=Object.getOwnPropertyDescriptor(A,R);if(M===void 0){var B=Object.getPrototypeOf(A);return B===null?void 0:T(B,R,I)}else{if("value"in M)return M.value;var W=M.get;return W===void 0?void 0:W.call(I)}},c=i(0),u=w(c),f=i(8),d=w(f),p=i(4),m=w(p),b=i(16),v=w(b),y=i(13),x=w(y),_=i(25),S=w(_);function w(T){return T&&T.__esModule?T:{default:T}}function N(T,A){if(!(T instanceof A))throw new TypeError("Cannot call a class as a function")}function k(T,A){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:T}function C(T,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);T.prototype=Object.create(A&&A.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(T,A):T.__proto__=A)}function P(T){return T instanceof m.default||T instanceof p.BlockEmbed}var L=(function(T){C(A,T);function A(R,I){N(this,A);var M=k(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,R));return M.emitter=I.emitter,Array.isArray(I.whitelist)&&(M.whitelist=I.whitelist.reduce(function(B,W){return B[W]=!0,B},{})),M.domNode.addEventListener("DOMNodeInserted",function(){}),M.optimize(),M.enable(),M}return o(A,[{key:"batchStart",value:function(){this.batch=!0}},{key:"batchEnd",value:function(){this.batch=!1,this.optimize()}},{key:"deleteAt",value:function(I,M){var B=this.line(I),W=a(B,2),G=W[0],H=W[1],K=this.line(I+M),$=a(K,1),F=$[0];if(l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"deleteAt",this).call(this,I,M),F!=null&&G!==F&&H>0){if(G instanceof p.BlockEmbed||F instanceof p.BlockEmbed){this.optimize();return}if(G instanceof x.default){var z=G.newlineIndex(G.length(),!0);if(z>-1&&(G=G.split(z+1),G===F)){this.optimize();return}}else if(F instanceof x.default){var U=F.newlineIndex(0);U>-1&&F.split(U+1)}var ee=F.children.head instanceof v.default?null:F.children.head;G.moveChildren(F,ee),G.remove()}this.optimize()}},{key:"enable",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",I)}},{key:"formatAt",value:function(I,M,B,W){this.whitelist!=null&&!this.whitelist[B]||(l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"formatAt",this).call(this,I,M,B,W),this.optimize())}},{key:"insertAt",value:function(I,M,B){if(!(B!=null&&this.whitelist!=null&&!this.whitelist[M])){if(I>=this.length())if(B==null||u.default.query(M,u.default.Scope.BLOCK)==null){var W=u.default.create(this.statics.defaultChild);this.appendChild(W),B==null&&M.endsWith(` 756`)&&(M=M.slice(0,-1)),W.insertAt(0,M,B)}else{var G=u.default.create(M,B);this.appendChild(G)}else l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertAt",this).call(this,I,M,B);this.optimize()}}},{key:"insertBefore",value:function(I,M){if(I.statics.scope===u.default.Scope.INLINE_BLOT){var B=u.default.create(this.statics.defaultChild);B.appendChild(I),I=B}l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"insertBefore",this).call(this,I,M)}},{key:"leaf",value:function(I){return this.path(I).pop()||[null,-1]}},{key:"line",value:function(I){return I===this.length()?this.line(I-1):this.descendant(P,I)}},{key:"lines",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,B=function W(G,H,K){var $=[],F=K;return G.children.forEachAt(H,K,function(z,U,ee){P(z)?$.push(z):z instanceof u.default.Container&&($=$.concat(W(z,U,F))),F-=ee}),$};return B(this,I,M)}},{key:"optimize",value:function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"optimize",this).call(this,I,M),I.length>0&&this.emitter.emit(d.default.events.SCROLL_OPTIMIZE,I,M))}},{key:"path",value:function(I){return l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"path",this).call(this,I).slice(1)}},{key:"update",value:function(I){if(this.batch!==!0){var M=d.default.sources.USER;typeof I=="string"&&(M=I),Array.isArray(I)||(I=this.observer.takeRecords()),I.length>0&&this.emitter.emit(d.default.events.SCROLL_BEFORE_UPDATE,M,I),l(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"update",this).call(this,I.concat([])),I.length>0&&this.emitter.emit(d.default.events.SCROLL_UPDATE,M,I)}}}]),A})(u.default.Scroll);L.blotName="scroll",L.className="ql-editor",L.tagName="DIV",L.defaultChild="block",L.allowedChildren=[m.default,p.BlockEmbed,S.default],r.default=L}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},o=(function(){function X(Z,ie){var Y=[],J=!0,se=!1,V=void 0;try{for(var fe=Z[Symbol.iterator](),ce;!(J=(ce=fe.next()).done)&&(Y.push(ce.value),!(ie&&Y.length===ie));J=!0);}catch(Ne){se=!0,V=Ne}finally{try{!J&&fe.return&&fe.return()}finally{if(se)throw V}}return Y}return function(Z,ie){if(Array.isArray(Z))return Z;if(Symbol.iterator in Object(Z))return X(Z,ie);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function X(Z,ie){for(var Y=0;Y<ie.length;Y++){var J=ie[Y];J.enumerable=J.enumerable||!1,J.configurable=!0,"value"in J&&(J.writable=!0),Object.defineProperty(Z,J.key,J)}}return function(Z,ie,Y){return ie&&X(Z.prototype,ie),Y&&X(Z,Y),Z}})(),c=i(21),u=T(c),f=i(11),d=T(f),p=i(3),m=T(p),b=i(2),v=T(b),y=i(20),x=T(y),_=i(0),S=T(_),w=i(5),N=T(w),k=i(10),C=T(k),P=i(9),L=T(P);function T(X){return X&&X.__esModule?X:{default:X}}function A(X,Z,ie){return Z in X?Object.defineProperty(X,Z,{value:ie,enumerable:!0,configurable:!0,writable:!0}):X[Z]=ie,X}function R(X,Z){if(!(X instanceof Z))throw new TypeError("Cannot call a class as a function")}function I(X,Z){if(!X)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z&&(typeof Z=="object"||typeof Z=="function")?Z:X}function M(X,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Z);X.prototype=Object.create(Z&&Z.prototype,{constructor:{value:X,enumerable:!1,writable:!0,configurable:!0}}),Z&&(Object.setPrototypeOf?Object.setPrototypeOf(X,Z):X.__proto__=Z)}var B=(0,C.default)("quill:keyboard"),W=/Mac/i.test(navigator.platform)?"metaKey":"ctrlKey",G=(function(X){M(Z,X),l(Z,null,[{key:"match",value:function(Y,J){return J=re(J),["altKey","ctrlKey","metaKey","shiftKey"].some(function(se){return!!J[se]!==Y[se]&&J[se]!==null})?!1:J.key===(Y.which||Y.keyCode)}}]);function Z(ie,Y){R(this,Z);var J=I(this,(Z.__proto__||Object.getPrototypeOf(Z)).call(this,ie,Y));return J.bindings={},Object.keys(J.options.bindings).forEach(function(se){se==="list autofill"&&ie.scroll.whitelist!=null&&!ie.scroll.whitelist.list||J.options.bindings[se]&&J.addBinding(J.options.bindings[se])}),J.addBinding({key:Z.keys.ENTER,shiftKey:null},z),J.addBinding({key:Z.keys.ENTER,metaKey:null,ctrlKey:null,altKey:null},function(){}),/Firefox/i.test(navigator.userAgent)?(J.addBinding({key:Z.keys.BACKSPACE},{collapsed:!0},K),J.addBinding({key:Z.keys.DELETE},{collapsed:!0},$)):(J.addBinding({key:Z.keys.BACKSPACE},{collapsed:!0,prefix:/^.?$/},K),J.addBinding({key:Z.keys.DELETE},{collapsed:!0,suffix:/^.?$/},$)),J.addBinding({key:Z.keys.BACKSPACE},{collapsed:!1},F),J.addBinding({key:Z.keys.DELETE},{collapsed:!1},F),J.addBinding({key:Z.keys.BACKSPACE,altKey:null,ctrlKey:null,metaKey:null,shiftKey:null},{collapsed:!0,offset:0},K),J.listen(),J}return l(Z,[{key:"addBinding",value:function(Y){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},V=re(Y);if(V==null||V.key==null)return B.warn("Attempted to add invalid keyboard binding",V);typeof J=="function"&&(J={handler:J}),typeof se=="function"&&(se={handler:se}),V=(0,m.default)(V,J,se),this.bindings[V.key]=this.bindings[V.key]||[],this.bindings[V.key].push(V)}},{key:"listen",value:function(){var Y=this;this.quill.root.addEventListener("keydown",function(J){if(!J.defaultPrevented){var se=J.which||J.keyCode,V=(Y.bindings[se]||[]).filter(function(tt){return Z.match(J,tt)});if(V.length!==0){var fe=Y.quill.getSelection();if(!(fe==null||!Y.quill.hasFocus())){var ce=Y.quill.getLine(fe.index),Ne=o(ce,2),me=Ne[0],je=Ne[1],te=Y.quill.getLeaf(fe.index),oe=o(te,2),le=oe[0],ye=oe[1],xe=fe.length===0?[le,ye]:Y.quill.getLeaf(fe.index+fe.length),Ce=o(xe,2),Be=Ce[0],Re=Ce[1],ge=le instanceof S.default.Text?le.value().slice(0,ye):"",ke=Be instanceof S.default.Text?Be.value().slice(Re):"",De={collapsed:fe.length===0,empty:fe.length===0&&me.length()<=1,format:Y.quill.getFormat(fe),offset:je,prefix:ge,suffix:ke},at=V.some(function(tt){if(tt.collapsed!=null&&tt.collapsed!==De.collapsed||tt.empty!=null&&tt.empty!==De.empty||tt.offset!=null&&tt.offset!==De.offset)return!1;if(Array.isArray(tt.format)){if(tt.format.every(function(Ae){return De.format[Ae]==null}))return!1}else if(a(tt.format)==="object"&&!Object.keys(tt.format).every(function(Ae){return tt.format[Ae]===!0?De.format[Ae]!=null:tt.format[Ae]===!1?De.format[Ae]==null:(0,d.default)(tt.format[Ae],De.format[Ae])}))return!1;return tt.prefix!=null&&!tt.prefix.test(De.prefix)||tt.suffix!=null&&!tt.suffix.test(De.suffix)?!1:tt.handler.call(Y,fe,De)!==!0});at&&J.preventDefault()}}}})}}]),Z})(L.default);G.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},G.DEFAULTS={bindings:{bold:ee("bold"),italic:ee("italic"),underline:ee("underline"),indent:{key:G.keys.TAB,format:["blockquote","indent","list"],handler:function(Z,ie){if(ie.collapsed&&ie.offset!==0)return!0;this.quill.format("indent","+1",N.default.sources.USER)}},outdent:{key:G.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(Z,ie){if(ie.collapsed&&ie.offset!==0)return!0;this.quill.format("indent","-1",N.default.sources.USER)}},"outdent backspace":{key:G.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(Z,ie){ie.format.indent!=null?this.quill.format("indent","-1",N.default.sources.USER):ie.format.list!=null&&this.quill.format("list",!1,N.default.sources.USER)}},"indent code-block":U(!0),"outdent code-block":U(!1),"remove tab":{key:G.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(Z){this.quill.deleteText(Z.index-1,1,N.default.sources.USER)}},tab:{key:G.keys.TAB,handler:function(Z){this.quill.history.cutoff();var ie=new v.default().retain(Z.index).delete(Z.length).insert(" ");this.quill.updateContents(ie,N.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Z.index+1,N.default.sources.SILENT)}},"list empty enter":{key:G.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(Z,ie){this.quill.format("list",!1,N.default.sources.USER),ie.format.indent&&this.quill.format("indent",!1,N.default.sources.USER)}},"checklist enter":{key:G.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(Z){var ie=this.quill.getLine(Z.index),Y=o(ie,2),J=Y[0],se=Y[1],V=(0,m.default)({},J.formats(),{list:"checked"}),fe=new v.default().retain(Z.index).insert(` 757`,V).retain(J.length()-se-1).retain(1,{list:"unchecked"});this.quill.updateContents(fe,N.default.sources.USER),this.quill.setSelection(Z.index+1,N.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:G.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(Z,ie){var Y=this.quill.getLine(Z.index),J=o(Y,2),se=J[0],V=J[1],fe=new v.default().retain(Z.index).insert(` 758`,ie.format).retain(se.length()-V-1).retain(1,{header:null});this.quill.updateContents(fe,N.default.sources.USER),this.quill.setSelection(Z.index+1,N.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(Z,ie){var Y=ie.prefix.length,J=this.quill.getLine(Z.index),se=o(J,2),V=se[0],fe=se[1];if(fe>Y)return!0;var ce=void 0;switch(ie.prefix.trim()){case"[]":case"[ ]":ce="unchecked";break;case"[x]":ce="checked";break;case"-":case"*":ce="bullet";break;default:ce="ordered"}this.quill.insertText(Z.index," ",N.default.sources.USER),this.quill.history.cutoff();var Ne=new v.default().retain(Z.index-fe).delete(Y+1).retain(V.length()-2-fe).retain(1,{list:ce});this.quill.updateContents(Ne,N.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(Z.index-Y,N.default.sources.SILENT)}},"code exit":{key:G.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(Z){var ie=this.quill.getLine(Z.index),Y=o(ie,2),J=Y[0],se=Y[1],V=new v.default().retain(Z.index+J.length()-se-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(V,N.default.sources.USER)}},"embed left":H(G.keys.LEFT,!1),"embed left shift":H(G.keys.LEFT,!0),"embed right":H(G.keys.RIGHT,!1),"embed right shift":H(G.keys.RIGHT,!0)}};function H(X,Z){var ie,Y=X===G.keys.LEFT?"prefix":"suffix";return ie={key:X,shiftKey:Z,altKey:null},A(ie,Y,/^$/),A(ie,"handler",function(se){var V=se.index;X===G.keys.RIGHT&&(V+=se.length+1);var fe=this.quill.getLeaf(V),ce=o(fe,1),Ne=ce[0];return Ne instanceof S.default.Embed?(X===G.keys.LEFT?Z?this.quill.setSelection(se.index-1,se.length+1,N.default.sources.USER):this.quill.setSelection(se.index-1,N.default.sources.USER):Z?this.quill.setSelection(se.index,se.length+1,N.default.sources.USER):this.quill.setSelection(se.index+se.length+1,N.default.sources.USER),!1):!0}),ie}function K(X,Z){if(!(X.index===0||this.quill.getLength()<=1)){var ie=this.quill.getLine(X.index),Y=o(ie,1),J=Y[0],se={};if(Z.offset===0){var V=this.quill.getLine(X.index-1),fe=o(V,1),ce=fe[0];if(ce!=null&&ce.length()>1){var Ne=J.formats(),me=this.quill.getFormat(X.index-1,1);se=x.default.attributes.diff(Ne,me)||{}}}var je=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(Z.prefix)?2:1;this.quill.deleteText(X.index-je,je,N.default.sources.USER),Object.keys(se).length>0&&this.quill.formatLine(X.index-je,je,se,N.default.sources.USER),this.quill.focus()}}function $(X,Z){var ie=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(Z.suffix)?2:1;if(!(X.index>=this.quill.getLength()-ie)){var Y={},J=0,se=this.quill.getLine(X.index),V=o(se,1),fe=V[0];if(Z.offset>=fe.length()-1){var ce=this.quill.getLine(X.index+1),Ne=o(ce,1),me=Ne[0];if(me){var je=fe.formats(),te=this.quill.getFormat(X.index,1);Y=x.default.attributes.diff(je,te)||{},J=me.length()}}this.quill.deleteText(X.index,ie,N.default.sources.USER),Object.keys(Y).length>0&&this.quill.formatLine(X.index+J-1,ie,Y,N.default.sources.USER)}}function F(X){var Z=this.quill.getLines(X),ie={};if(Z.length>1){var Y=Z[0].formats(),J=Z[Z.length-1].formats();ie=x.default.attributes.diff(J,Y)||{}}this.quill.deleteText(X,N.default.sources.USER),Object.keys(ie).length>0&&this.quill.formatLine(X.index,1,ie,N.default.sources.USER),this.quill.setSelection(X.index,N.default.sources.SILENT),this.quill.focus()}function z(X,Z){var ie=this;X.length>0&&this.quill.scroll.deleteAt(X.index,X.length);var Y=Object.keys(Z.format).reduce(function(J,se){return S.default.query(se,S.default.Scope.BLOCK)&&!Array.isArray(Z.format[se])&&(J[se]=Z.format[se]),J},{});this.quill.insertText(X.index,` 759`,Y,N.default.sources.USER),this.quill.setSelection(X.index+1,N.default.sources.SILENT),this.quill.focus(),Object.keys(Z.format).forEach(function(J){Y[J]==null&&(Array.isArray(Z.format[J])||J!=="link"&&ie.quill.format(J,Z.format[J],N.default.sources.USER))})}function U(X){return{key:G.keys.TAB,shiftKey:!X,format:{"code-block":!0},handler:function(ie){var Y=S.default.query("code-block"),J=ie.index,se=ie.length,V=this.quill.scroll.descendant(Y,J),fe=o(V,2),ce=fe[0],Ne=fe[1];if(ce!=null){var me=this.quill.getIndex(ce),je=ce.newlineIndex(Ne,!0)+1,te=ce.newlineIndex(me+Ne+se),oe=ce.domNode.textContent.slice(je,te).split(` 760`);Ne=0,oe.forEach(function(le,ye){X?(ce.insertAt(je+Ne,Y.TAB),Ne+=Y.TAB.length,ye===0?J+=Y.TAB.length:se+=Y.TAB.length):le.startsWith(Y.TAB)&&(ce.deleteAt(je+Ne,Y.TAB.length),Ne-=Y.TAB.length,ye===0?J-=Y.TAB.length:se-=Y.TAB.length),Ne+=le.length+1}),this.quill.update(N.default.sources.USER),this.quill.setSelection(J,se,N.default.sources.SILENT)}}}}function ee(X){return{key:X[0].toUpperCase(),shortKey:!0,handler:function(ie,Y){this.quill.format(X,!Y.format[X],N.default.sources.USER)}}}function re(X){if(typeof X=="string"||typeof X=="number")return re({key:X});if((typeof X>"u"?"undefined":a(X))==="object"&&(X=(0,u.default)(X,!1)),typeof X.key=="string")if(G.keys[X.key.toUpperCase()]!=null)X.key=G.keys[X.key.toUpperCase()];else if(X.key.length===1)X.key=X.key.toUpperCase().charCodeAt(0);else return null;return X.shortKey&&(X[W]=X.shortKey,delete X.shortKey),X}r.default=G,r.SHORTKEY=W}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function x(_,S){var w=[],N=!0,k=!1,C=void 0;try{for(var P=_[Symbol.iterator](),L;!(N=(L=P.next()).done)&&(w.push(L.value),!(S&&w.length===S));N=!0);}catch(T){k=!0,C=T}finally{try{!N&&P.return&&P.return()}finally{if(k)throw C}}return w}return function(_,S){if(Array.isArray(_))return _;if(Symbol.iterator in Object(_))return x(_,S);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function x(_,S,w){_===null&&(_=Function.prototype);var N=Object.getOwnPropertyDescriptor(_,S);if(N===void 0){var k=Object.getPrototypeOf(_);return k===null?void 0:x(k,S,w)}else{if("value"in N)return N.value;var C=N.get;return C===void 0?void 0:C.call(w)}},l=(function(){function x(_,S){for(var w=0;w<S.length;w++){var N=S[w];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(_,N.key,N)}}return function(_,S,w){return S&&x(_.prototype,S),w&&x(_,w),_}})(),c=i(0),u=p(c),f=i(7),d=p(f);function p(x){return x&&x.__esModule?x:{default:x}}function m(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function b(x,_){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:x}function v(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(x,_):x.__proto__=_)}var y=(function(x){v(_,x),l(_,null,[{key:"value",value:function(){}}]);function _(S,w){m(this,_);var N=b(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,S));return N.selection=w,N.textNode=document.createTextNode(_.CONTENTS),N.domNode.appendChild(N.textNode),N._length=0,N}return l(_,[{key:"detach",value:function(){this.parent!=null&&this.parent.removeChild(this)}},{key:"format",value:function(w,N){if(this._length!==0)return o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"format",this).call(this,w,N);for(var k=this,C=0;k!=null&&k.statics.scope!==u.default.Scope.BLOCK_BLOT;)C+=k.offset(k.parent),k=k.parent;k!=null&&(this._length=_.CONTENTS.length,k.optimize(),k.formatAt(C,_.CONTENTS.length,w,N),this._length=0)}},{key:"index",value:function(w,N){return w===this.textNode?0:o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"index",this).call(this,w,N)}},{key:"length",value:function(){return this._length}},{key:"position",value:function(){return[this.textNode,this.textNode.data.length]}},{key:"remove",value:function(){o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"remove",this).call(this),this.parent=null}},{key:"restore",value:function(){if(!(this.selection.composing||this.parent==null)){var w=this.textNode,N=this.selection.getNativeRange(),k=void 0,C=void 0,P=void 0;if(N!=null&&N.start.node===w&&N.end.node===w){var L=[w,N.start.offset,N.end.offset];k=L[0],C=L[1],P=L[2]}for(;this.domNode.lastChild!=null&&this.domNode.lastChild!==this.textNode;)this.domNode.parentNode.insertBefore(this.domNode.lastChild,this.domNode);if(this.textNode.data!==_.CONTENTS){var T=this.textNode.data.split(_.CONTENTS).join("");this.next instanceof d.default?(k=this.next.domNode,this.next.insertAt(0,T),this.textNode.data=_.CONTENTS):(this.textNode.data=T,this.parent.insertBefore(u.default.create(this.textNode),this),this.textNode=document.createTextNode(_.CONTENTS),this.domNode.appendChild(this.textNode))}if(this.remove(),C!=null){var A=[C,P].map(function(I){return Math.max(0,Math.min(k.data.length,I-1))}),R=a(A,2);return C=R[0],P=R[1],{startNode:k,startOffset:C,endNode:k,endOffset:P}}}}},{key:"update",value:function(w,N){var k=this;if(w.some(function(P){return P.type==="characterData"&&P.target===k.textNode})){var C=this.restore();C&&(N.range=C)}}},{key:"value",value:function(){return""}}]),_})(u.default.Embed);y.blotName="cursor",y.className="ql-cursor",y.tagName="span",y.CONTENTS="\uFEFF",r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=u(a),l=i(4),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function f(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var m=(function(b){p(v,b);function v(){return f(this,v),d(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return v})(o.default.Container);m.allowedChildren=[c.default,l.BlockEmbed,m],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.ColorStyle=r.ColorClass=r.ColorAttributor=void 0;var a=(function(){function y(x,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}return function(x,_,S){return _&&y(x.prototype,_),S&&y(x,S),x}})(),o=function y(x,_,S){x===null&&(x=Function.prototype);var w=Object.getOwnPropertyDescriptor(x,_);if(w===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:y(N,_,S)}else{if("value"in w)return w.value;var k=w.get;return k===void 0?void 0:k.call(S)}},l=i(0),c=u(l);function u(y){return y&&y.__esModule?y:{default:y}}function f(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function d(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function p(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var m=(function(y){p(x,y);function x(){return f(this,x),d(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"value",value:function(S){var w=o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"value",this).call(this,S);return w.startsWith("rgb(")?(w=w.replace(/^[^\d]+/,"").replace(/[^\d]+$/,""),"#"+w.split(",").map(function(N){return("00"+parseInt(N).toString(16)).slice(-2)}).join("")):w}}]),x})(c.default.Attributor.Style),b=new c.default.Attributor.Class("color","ql-color",{scope:c.default.Scope.INLINE}),v=new m("color","color",{scope:c.default.Scope.INLINE});r.ColorAttributor=m,r.ColorClass=b,r.ColorStyle=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.sanitize=r.default=void 0;var a=(function(){function v(y,x){for(var _=0;_<x.length;_++){var S=x[_];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}return function(y,x,_){return x&&v(y.prototype,x),_&&v(y,_),y}})(),o=function v(y,x,_){y===null&&(y=Function.prototype);var S=Object.getOwnPropertyDescriptor(y,x);if(S===void 0){var w=Object.getPrototypeOf(y);return w===null?void 0:v(w,x,_)}else{if("value"in S)return S.value;var N=S.get;return N===void 0?void 0:N.call(_)}},l=i(6),c=u(l);function u(v){return v&&v.__esModule?v:{default:v}}function f(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var m=(function(v){p(y,v);function y(){return f(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"format",value:function(_,S){if(_!==this.statics.blotName||!S)return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"format",this).call(this,_,S);S=this.constructor.sanitize(S),this.domNode.setAttribute("href",S)}}],[{key:"create",value:function(_){var S=o(y.__proto__||Object.getPrototypeOf(y),"create",this).call(this,_);return _=this.sanitize(_),S.setAttribute("href",_),S.setAttribute("rel","noopener noreferrer"),S.setAttribute("target","_blank"),S}},{key:"formats",value:function(_){return _.getAttribute("href")}},{key:"sanitize",value:function(_){return b(_,this.PROTOCOL_WHITELIST)?_:this.SANITIZED_URL}}]),y})(c.default);m.blotName="link",m.tagName="A",m.SANITIZED_URL="about:blank",m.PROTOCOL_WHITELIST=["http","https","mailto","tel"];function b(v,y){var x=document.createElement("a");x.href=v;var _=x.href.slice(0,x.href.indexOf(":"));return y.indexOf(_)>-1}r.default=m,r.sanitize=b}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},o=(function(){function y(x,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}return function(x,_,S){return _&&y(x.prototype,_),S&&y(x,S),x}})(),l=i(23),c=d(l),u=i(107),f=d(u);function d(y){return y&&y.__esModule?y:{default:y}}function p(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}var m=0;function b(y,x){y.setAttribute(x,y.getAttribute(x)!=="true")}var v=(function(){function y(x){var _=this;p(this,y),this.select=x,this.container=document.createElement("span"),this.buildPicker(),this.select.style.display="none",this.select.parentNode.insertBefore(this.container,this.select),this.label.addEventListener("mousedown",function(){_.togglePicker()}),this.label.addEventListener("keydown",function(S){switch(S.keyCode){case c.default.keys.ENTER:_.togglePicker();break;case c.default.keys.ESCAPE:_.escape(),S.preventDefault();break}}),this.select.addEventListener("change",this.update.bind(this))}return o(y,[{key:"togglePicker",value:function(){this.container.classList.toggle("ql-expanded"),b(this.label,"aria-expanded"),b(this.options,"aria-hidden")}},{key:"buildItem",value:function(_){var S=this,w=document.createElement("span");return w.tabIndex="0",w.setAttribute("role","button"),w.classList.add("ql-picker-item"),_.hasAttribute("value")&&w.setAttribute("data-value",_.getAttribute("value")),_.textContent&&w.setAttribute("data-label",_.textContent),w.addEventListener("click",function(){S.selectItem(w,!0)}),w.addEventListener("keydown",function(N){switch(N.keyCode){case c.default.keys.ENTER:S.selectItem(w,!0),N.preventDefault();break;case c.default.keys.ESCAPE:S.escape(),N.preventDefault();break}}),w}},{key:"buildLabel",value:function(){var _=document.createElement("span");return _.classList.add("ql-picker-label"),_.innerHTML=f.default,_.tabIndex="0",_.setAttribute("role","button"),_.setAttribute("aria-expanded","false"),this.container.appendChild(_),_}},{key:"buildOptions",value:function(){var _=this,S=document.createElement("span");S.classList.add("ql-picker-options"),S.setAttribute("aria-hidden","true"),S.tabIndex="-1",S.id="ql-picker-options-"+m,m+=1,this.label.setAttribute("aria-controls",S.id),this.options=S,[].slice.call(this.select.options).forEach(function(w){var N=_.buildItem(w);S.appendChild(N),w.selected===!0&&_.selectItem(N)}),this.container.appendChild(S)}},{key:"buildPicker",value:function(){var _=this;[].slice.call(this.select.attributes).forEach(function(S){_.container.setAttribute(S.name,S.value)}),this.container.classList.add("ql-picker"),this.label=this.buildLabel(),this.buildOptions()}},{key:"escape",value:function(){var _=this;this.close(),setTimeout(function(){return _.label.focus()},1)}},{key:"close",value:function(){this.container.classList.remove("ql-expanded"),this.label.setAttribute("aria-expanded","false"),this.options.setAttribute("aria-hidden","true")}},{key:"selectItem",value:function(_){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=this.container.querySelector(".ql-selected");if(_!==w&&(w!=null&&w.classList.remove("ql-selected"),_!=null&&(_.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(_.parentNode.children,_),_.hasAttribute("data-value")?this.label.setAttribute("data-value",_.getAttribute("data-value")):this.label.removeAttribute("data-value"),_.hasAttribute("data-label")?this.label.setAttribute("data-label",_.getAttribute("data-label")):this.label.removeAttribute("data-label"),S))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":a(Event))==="object"){var N=document.createEvent("Event");N.initEvent("change",!0,!0),this.select.dispatchEvent(N)}this.close()}}},{key:"update",value:function(){var _=void 0;if(this.select.selectedIndex>-1){var S=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];_=this.select.options[this.select.selectedIndex],this.selectItem(S)}else this.selectItem(null);var w=_!=null&&_!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",w)}}]),y})();r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(0),o=B(a),l=i(5),c=B(l),u=i(4),f=B(u),d=i(16),p=B(d),m=i(25),b=B(m),v=i(24),y=B(v),x=i(35),_=B(x),S=i(6),w=B(S),N=i(22),k=B(N),C=i(7),P=B(C),L=i(55),T=B(L),A=i(42),R=B(A),I=i(23),M=B(I);function B(W){return W&&W.__esModule?W:{default:W}}c.default.register({"blots/block":f.default,"blots/block/embed":u.BlockEmbed,"blots/break":p.default,"blots/container":b.default,"blots/cursor":y.default,"blots/embed":_.default,"blots/inline":w.default,"blots/scroll":k.default,"blots/text":P.default,"modules/clipboard":T.default,"modules/history":R.default,"modules/keyboard":M.default}),o.default.register(f.default,p.default,y.default,w.default,k.default,P.default),r.default=c.default}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(1),o=(function(){function l(c){this.domNode=c,this.domNode[a.DATA_KEY]={blot:this}}return Object.defineProperty(l.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),l.create=function(c){if(this.tagName==null)throw new a.ParchmentError("Blot definition missing tagName");var u;return Array.isArray(this.tagName)?(typeof c=="string"&&(c=c.toUpperCase(),parseInt(c).toString()===c&&(c=parseInt(c))),typeof c=="number"?u=document.createElement(this.tagName[c-1]):this.tagName.indexOf(c)>-1?u=document.createElement(c):u=document.createElement(this.tagName[0])):u=document.createElement(this.tagName),this.className&&u.classList.add(this.className),u},l.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},l.prototype.clone=function(){var c=this.domNode.cloneNode(!1);return a.create(c)},l.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[a.DATA_KEY]},l.prototype.deleteAt=function(c,u){var f=this.isolate(c,u);f.remove()},l.prototype.formatAt=function(c,u,f,d){var p=this.isolate(c,u);if(a.query(f,a.Scope.BLOT)!=null&&d)p.wrap(f,d);else if(a.query(f,a.Scope.ATTRIBUTE)!=null){var m=a.create(this.statics.scope);p.wrap(m),m.format(f,d)}},l.prototype.insertAt=function(c,u,f){var d=f==null?a.create("text",u):a.create(u,f),p=this.split(c);this.parent.insertBefore(d,p)},l.prototype.insertInto=function(c,u){u===void 0&&(u=null),this.parent!=null&&this.parent.children.remove(this);var f=null;c.children.insertBefore(this,u),u!=null&&(f=u.domNode),(this.domNode.parentNode!=c.domNode||this.domNode.nextSibling!=f)&&c.domNode.insertBefore(this.domNode,f),this.parent=c,this.attach()},l.prototype.isolate=function(c,u){var f=this.split(c);return f.split(u),f},l.prototype.length=function(){return 1},l.prototype.offset=function(c){return c===void 0&&(c=this.parent),this.parent==null||this==c?0:this.parent.children.offset(this)+this.parent.offset(c)},l.prototype.optimize=function(c){this.domNode[a.DATA_KEY]!=null&&delete this.domNode[a.DATA_KEY].mutations},l.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},l.prototype.replace=function(c){c.parent!=null&&(c.parent.insertBefore(this,c.next),c.remove())},l.prototype.replaceWith=function(c,u){var f=typeof c=="string"?a.create(c,u):c;return f.replace(this),f},l.prototype.split=function(c,u){return c===0?this:this.next},l.prototype.update=function(c,u){},l.prototype.wrap=function(c,u){var f=typeof c=="string"?a.create(c,u):c;return this.parent!=null&&this.parent.insertBefore(f,this.next),f.appendChild(this),f},l.blotName="abstract",l})();r.default=o}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(12),o=i(32),l=i(33),c=i(1),u=(function(){function f(d){this.attributes={},this.domNode=d,this.build()}return f.prototype.attribute=function(d,p){p?d.add(this.domNode,p)&&(d.value(this.domNode)!=null?this.attributes[d.attrName]=d:delete this.attributes[d.attrName]):(d.remove(this.domNode),delete this.attributes[d.attrName])},f.prototype.build=function(){var d=this;this.attributes={};var p=a.default.keys(this.domNode),m=o.default.keys(this.domNode),b=l.default.keys(this.domNode);p.concat(m).concat(b).forEach(function(v){var y=c.query(v,c.Scope.ATTRIBUTE);y instanceof a.default&&(d.attributes[y.attrName]=y)})},f.prototype.copy=function(d){var p=this;Object.keys(this.attributes).forEach(function(m){var b=p.attributes[m].value(p.domNode);d.format(m,b)})},f.prototype.move=function(d){var p=this;this.copy(d),Object.keys(this.attributes).forEach(function(m){p.attributes[m].remove(p.domNode)}),this.attributes={}},f.prototype.values=function(){var d=this;return Object.keys(this.attributes).reduce(function(p,m){return p[m]=d.attributes[m].value(d.domNode),p},{})},f})();r.default=u}),(function(n,r,i){var a=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var p in d)d.hasOwnProperty(p)&&(f[p]=d[p])};return function(f,d){u(f,d);function p(){this.constructor=f}f.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(u,f){var d=u.getAttribute("class")||"";return d.split(/\s+/).filter(function(p){return p.indexOf(f+"-")===0})}var c=(function(u){a(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.keys=function(d){return(d.getAttribute("class")||"").split(/\s+/).map(function(p){return p.split("-").slice(0,-1).join("-")})},f.prototype.add=function(d,p){return this.canAdd(d,p)?(this.remove(d),d.classList.add(this.keyName+"-"+p),!0):!1},f.prototype.remove=function(d){var p=l(d,this.keyName);p.forEach(function(m){d.classList.remove(m)}),d.classList.length===0&&d.removeAttribute("class")},f.prototype.value=function(d){var p=l(d,this.keyName)[0]||"",m=p.slice(this.keyName.length+1);return this.canAdd(d,m)?m:""},f})(o.default);r.default=c}),(function(n,r,i){var a=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var p in d)d.hasOwnProperty(p)&&(f[p]=d[p])};return function(f,d){u(f,d);function p(){this.constructor=f}f.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(12);function l(u){var f=u.split("-"),d=f.slice(1).map(function(p){return p[0].toUpperCase()+p.slice(1)}).join("");return f[0]+d}var c=(function(u){a(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.keys=function(d){return(d.getAttribute("style")||"").split(";").map(function(p){var m=p.split(":");return m[0].trim()})},f.prototype.add=function(d,p){return this.canAdd(d,p)?(d.style[l(this.keyName)]=p,!0):!1},f.prototype.remove=function(d){d.style[l(this.keyName)]="",d.getAttribute("style")||d.removeAttribute("style")},f.prototype.value=function(d){var p=d.style[l(this.keyName)];return this.canAdd(d,p)?p:""},f})(o.default);r.default=c}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function c(u,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(u,p.key,p)}}return function(u,f,d){return f&&c(u.prototype,f),d&&c(u,d),u}})();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(u,f){o(this,c),this.quill=u,this.options=f,this.modules={}}return a(c,[{key:"init",value:function(){var f=this;Object.keys(this.options.modules).forEach(function(d){f.modules[d]==null&&f.addModule(d)})}},{key:"addModule",value:function(f){var d=this.quill.constructor.import("modules/"+f);return this.modules[f]=new d(this.quill,this.options.modules[f]||{}),this.modules[f]}}]),c})();l.DEFAULTS={modules:{}},l.themes={default:l},r.default=l}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function x(_,S){for(var w=0;w<S.length;w++){var N=S[w];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(_,N.key,N)}}return function(_,S,w){return S&&x(_.prototype,S),w&&x(_,w),_}})(),o=function x(_,S,w){_===null&&(_=Function.prototype);var N=Object.getOwnPropertyDescriptor(_,S);if(N===void 0){var k=Object.getPrototypeOf(_);return k===null?void 0:x(k,S,w)}else{if("value"in N)return N.value;var C=N.get;return C===void 0?void 0:C.call(w)}},l=i(0),c=d(l),u=i(7),f=d(u);function d(x){return x&&x.__esModule?x:{default:x}}function p(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function m(x,_){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:x}function b(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(x,_):x.__proto__=_)}var v="\uFEFF",y=(function(x){b(_,x);function _(S){p(this,_);var w=m(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,S));return w.contentNode=document.createElement("span"),w.contentNode.setAttribute("contenteditable",!1),[].slice.call(w.domNode.childNodes).forEach(function(N){w.contentNode.appendChild(N)}),w.leftGuard=document.createTextNode(v),w.rightGuard=document.createTextNode(v),w.domNode.appendChild(w.leftGuard),w.domNode.appendChild(w.contentNode),w.domNode.appendChild(w.rightGuard),w}return a(_,[{key:"index",value:function(w,N){return w===this.leftGuard?0:w===this.rightGuard?1:o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"index",this).call(this,w,N)}},{key:"restore",value:function(w){var N=void 0,k=void 0,C=w.data.split(v).join("");if(w===this.leftGuard)if(this.prev instanceof f.default){var P=this.prev.length();this.prev.insertAt(P,C),N={startNode:this.prev.domNode,startOffset:P+C.length}}else k=document.createTextNode(C),this.parent.insertBefore(c.default.create(k),this),N={startNode:k,startOffset:C.length};else w===this.rightGuard&&(this.next instanceof f.default?(this.next.insertAt(0,C),N={startNode:this.next.domNode,startOffset:C.length}):(k=document.createTextNode(C),this.parent.insertBefore(c.default.create(k),this.next),N={startNode:k,startOffset:C.length}));return w.data=v,N}},{key:"update",value:function(w,N){var k=this;w.forEach(function(C){if(C.type==="characterData"&&(C.target===k.leftGuard||C.target===k.rightGuard)){var P=k.restore(C.target);P&&(N.range=P)}})}}]),_})(c.default.Embed);r.default=y}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.AlignStyle=r.AlignClass=r.AlignAttribute=void 0;var a=i(0),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}var c={scope:o.default.Scope.BLOCK,whitelist:["right","center","justify"]},u=new o.default.Attributor.Attribute("align","align",c),f=new o.default.Attributor.Class("align","ql-align",c),d=new o.default.Attributor.Style("align","text-align",c);r.AlignAttribute=u,r.AlignClass=f,r.AlignStyle=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.BackgroundStyle=r.BackgroundClass=void 0;var a=i(0),o=c(a),l=i(26);function c(d){return d&&d.__esModule?d:{default:d}}var u=new o.default.Attributor.Class("background","ql-bg",{scope:o.default.Scope.INLINE}),f=new l.ColorAttributor("background","background-color",{scope:o.default.Scope.INLINE});r.BackgroundClass=u,r.BackgroundStyle=f}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.DirectionStyle=r.DirectionClass=r.DirectionAttribute=void 0;var a=i(0),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}var c={scope:o.default.Scope.BLOCK,whitelist:["rtl"]},u=new o.default.Attributor.Attribute("direction","dir",c),f=new o.default.Attributor.Class("direction","ql-direction",c),d=new o.default.Attributor.Style("direction","direction",c);r.DirectionAttribute=u,r.DirectionClass=f,r.DirectionStyle=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.FontClass=r.FontStyle=void 0;var a=(function(){function x(_,S){for(var w=0;w<S.length;w++){var N=S[w];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(_,N.key,N)}}return function(_,S,w){return S&&x(_.prototype,S),w&&x(_,w),_}})(),o=function x(_,S,w){_===null&&(_=Function.prototype);var N=Object.getOwnPropertyDescriptor(_,S);if(N===void 0){var k=Object.getPrototypeOf(_);return k===null?void 0:x(k,S,w)}else{if("value"in N)return N.value;var C=N.get;return C===void 0?void 0:C.call(w)}},l=i(0),c=u(l);function u(x){return x&&x.__esModule?x:{default:x}}function f(x,_){if(!(x instanceof _))throw new TypeError("Cannot call a class as a function")}function d(x,_){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _&&(typeof _=="object"||typeof _=="function")?_:x}function p(x,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof _);x.prototype=Object.create(_&&_.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),_&&(Object.setPrototypeOf?Object.setPrototypeOf(x,_):x.__proto__=_)}var m={scope:c.default.Scope.INLINE,whitelist:["serif","monospace"]},b=new c.default.Attributor.Class("font","ql-font",m),v=(function(x){p(_,x);function _(){return f(this,_),d(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}return a(_,[{key:"value",value:function(w){return o(_.prototype.__proto__||Object.getPrototypeOf(_.prototype),"value",this).call(this,w).replace(/["']/g,"")}}]),_})(c.default.Attributor.Style),y=new v("font","font-family",m);r.FontStyle=y,r.FontClass=b}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.SizeStyle=r.SizeClass=void 0;var a=i(0),o=l(a);function l(f){return f&&f.__esModule?f:{default:f}}var c=new o.default.Attributor.Class("size","ql-size",{scope:o.default.Scope.INLINE,whitelist:["small","large","huge"]}),u=new o.default.Attributor.Style("size","font-size",{scope:o.default.Scope.INLINE,whitelist:["10px","18px","32px"]});r.SizeClass=c,r.SizeStyle=u}),(function(n,r,i){n.exports={align:{"":i(76),center:i(77),right:i(78),justify:i(79)},background:i(80),blockquote:i(81),bold:i(82),clean:i(83),code:i(58),"code-block":i(58),color:i(84),direction:{"":i(85),rtl:i(86)},float:{center:i(87),full:i(88),left:i(89),right:i(90)},formula:i(91),header:{1:i(92),2:i(93)},italic:i(94),image:i(95),indent:{"+1":i(96),"-1":i(97)},link:i(98),list:{ordered:i(99),bullet:i(100),check:i(101)},script:{sub:i(102),super:i(103)},strike:i(104),underline:i(105),video:i(106)}}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.getLastChangeIndex=r.default=void 0;var a=(function(){function S(w,N){for(var k=0;k<N.length;k++){var C=N[k];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,N,k){return N&&S(w.prototype,N),k&&S(w,k),w}})(),o=i(0),l=p(o),c=i(5),u=p(c),f=i(9),d=p(f);function p(S){return S&&S.__esModule?S:{default:S}}function m(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function b(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function v(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var y=(function(S){v(w,S);function w(N,k){m(this,w);var C=b(this,(w.__proto__||Object.getPrototypeOf(w)).call(this,N,k));return C.lastRecorded=0,C.ignoreChange=!1,C.clear(),C.quill.on(u.default.events.EDITOR_CHANGE,function(P,L,T,A){P!==u.default.events.TEXT_CHANGE||C.ignoreChange||(!C.options.userOnly||A===u.default.sources.USER?C.record(L,T):C.transform(L))}),C.quill.keyboard.addBinding({key:"Z",shortKey:!0},C.undo.bind(C)),C.quill.keyboard.addBinding({key:"Z",shortKey:!0,shiftKey:!0},C.redo.bind(C)),/Win/i.test(navigator.platform)&&C.quill.keyboard.addBinding({key:"Y",shortKey:!0},C.redo.bind(C)),C}return a(w,[{key:"change",value:function(k,C){if(this.stack[k].length!==0){var P=this.stack[k].pop();this.stack[C].push(P),this.lastRecorded=0,this.ignoreChange=!0,this.quill.updateContents(P[k],u.default.sources.USER),this.ignoreChange=!1;var L=_(P[k]);this.quill.setSelection(L)}}},{key:"clear",value:function(){this.stack={undo:[],redo:[]}}},{key:"cutoff",value:function(){this.lastRecorded=0}},{key:"record",value:function(k,C){if(k.ops.length!==0){this.stack.redo=[];var P=this.quill.getContents().diff(C),L=Date.now();if(this.lastRecorded+this.options.delay>L&&this.stack.undo.length>0){var T=this.stack.undo.pop();P=P.compose(T.undo),k=T.redo.compose(k)}else this.lastRecorded=L;this.stack.undo.push({redo:k,undo:P}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(k){this.stack.undo.forEach(function(C){C.undo=k.transform(C.undo,!0),C.redo=k.transform(C.redo,!0)}),this.stack.redo.forEach(function(C){C.undo=k.transform(C.undo,!0),C.redo=k.transform(C.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),w})(d.default);y.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function x(S){var w=S.ops[S.ops.length-1];return w==null?!1:w.insert!=null?typeof w.insert=="string"&&w.insert.endsWith(` 761`):w.attributes!=null?Object.keys(w.attributes).some(function(N){return l.default.query(N,l.default.Scope.BLOCK)!=null}):!1}function _(S){var w=S.reduce(function(k,C){return k+=C.delete||0,k},0),N=S.length()-w;return x(S)&&(N-=1),N}r.default=y,r.getLastChangeIndex=_}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var a=(function(){function z(U,ee){for(var re=0;re<ee.length;re++){var X=ee[re];X.enumerable=X.enumerable||!1,X.configurable=!0,"value"in X&&(X.writable=!0),Object.defineProperty(U,X.key,X)}}return function(U,ee,re){return ee&&z(U.prototype,ee),re&&z(U,re),U}})(),o=function z(U,ee,re){U===null&&(U=Function.prototype);var X=Object.getOwnPropertyDescriptor(U,ee);if(X===void 0){var Z=Object.getPrototypeOf(U);return Z===null?void 0:z(Z,ee,re)}else{if("value"in X)return X.value;var ie=X.get;return ie===void 0?void 0:ie.call(re)}},l=i(3),c=L(l),u=i(2),f=L(u),d=i(8),p=L(d),m=i(23),b=L(m),v=i(34),y=L(v),x=i(59),_=L(x),S=i(60),w=L(S),N=i(28),k=L(N),C=i(61),P=L(C);function L(z){return z&&z.__esModule?z:{default:z}}function T(z,U){if(!(z instanceof U))throw new TypeError("Cannot call a class as a function")}function A(z,U){if(!z)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return U&&(typeof U=="object"||typeof U=="function")?U:z}function R(z,U){if(typeof U!="function"&&U!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof U);z.prototype=Object.create(U&&U.prototype,{constructor:{value:z,enumerable:!1,writable:!0,configurable:!0}}),U&&(Object.setPrototypeOf?Object.setPrototypeOf(z,U):z.__proto__=U)}var I=[!1,"center","right","justify"],M=["#000000","#e60000","#ff9900","#ffff00","#008a00","#0066cc","#9933ff","#ffffff","#facccc","#ffebcc","#ffffcc","#cce8cc","#cce0f5","#ebd6ff","#bbbbbb","#f06666","#ffc266","#ffff66","#66b966","#66a3e0","#c285ff","#888888","#a10000","#b26b00","#b2b200","#006100","#0047b2","#6b24b2","#444444","#5c0000","#663d00","#666600","#003700","#002966","#3d1466"],B=[!1,"serif","monospace"],W=["1","2","3",!1],G=["small",!1,"large","huge"],H=(function(z){R(U,z);function U(ee,re){T(this,U);var X=A(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,ee,re)),Z=function ie(Y){if(!document.body.contains(ee.root))return document.body.removeEventListener("click",ie);X.tooltip!=null&&!X.tooltip.root.contains(Y.target)&&document.activeElement!==X.tooltip.textbox&&!X.quill.hasFocus()&&X.tooltip.hide(),X.pickers!=null&&X.pickers.forEach(function(J){J.container.contains(Y.target)||J.close()})};return ee.emitter.listenDOM("click",document.body,Z),X}return a(U,[{key:"addModule",value:function(re){var X=o(U.prototype.__proto__||Object.getPrototypeOf(U.prototype),"addModule",this).call(this,re);return re==="toolbar"&&this.extendToolbar(X),X}},{key:"buildButtons",value:function(re,X){re.forEach(function(Z){var ie=Z.getAttribute("class")||"";ie.split(/\s+/).forEach(function(Y){if(Y.startsWith("ql-")&&(Y=Y.slice(3),X[Y]!=null))if(Y==="direction")Z.innerHTML=X[Y][""]+X[Y].rtl;else if(typeof X[Y]=="string")Z.innerHTML=X[Y];else{var J=Z.value||"";J!=null&&X[Y][J]&&(Z.innerHTML=X[Y][J])}})})}},{key:"buildPickers",value:function(re,X){var Z=this;this.pickers=re.map(function(Y){if(Y.classList.contains("ql-align"))return Y.querySelector("option")==null&&F(Y,I),new w.default(Y,X.align);if(Y.classList.contains("ql-background")||Y.classList.contains("ql-color")){var J=Y.classList.contains("ql-background")?"background":"color";return Y.querySelector("option")==null&&F(Y,M,J==="background"?"#ffffff":"#000000"),new _.default(Y,X[J])}else return Y.querySelector("option")==null&&(Y.classList.contains("ql-font")?F(Y,B):Y.classList.contains("ql-header")?F(Y,W):Y.classList.contains("ql-size")&&F(Y,G)),new k.default(Y)});var ie=function(){Z.pickers.forEach(function(J){J.update()})};this.quill.on(p.default.events.EDITOR_CHANGE,ie)}}]),U})(y.default);H.DEFAULTS=(0,c.default)(!0,{},y.default.DEFAULTS,{modules:{toolbar:{handlers:{formula:function(){this.quill.theme.tooltip.edit("formula")},image:function(){var U=this,ee=this.container.querySelector("input.ql-image[type=file]");ee==null&&(ee=document.createElement("input"),ee.setAttribute("type","file"),ee.setAttribute("accept","image/png, image/gif, image/jpeg, image/bmp, image/x-icon"),ee.classList.add("ql-image"),ee.addEventListener("change",function(){if(ee.files!=null&&ee.files[0]!=null){var re=new FileReader;re.onload=function(X){var Z=U.quill.getSelection(!0);U.quill.updateContents(new f.default().retain(Z.index).delete(Z.length).insert({image:X.target.result}),p.default.sources.USER),U.quill.setSelection(Z.index+1,p.default.sources.SILENT),ee.value=""},re.readAsDataURL(ee.files[0])}}),this.container.appendChild(ee)),ee.click()},video:function(){this.quill.theme.tooltip.edit("video")}}}}});var K=(function(z){R(U,z);function U(ee,re){T(this,U);var X=A(this,(U.__proto__||Object.getPrototypeOf(U)).call(this,ee,re));return X.textbox=X.root.querySelector('input[type="text"]'),X.listen(),X}return a(U,[{key:"listen",value:function(){var re=this;this.textbox.addEventListener("keydown",function(X){b.default.match(X,"enter")?(re.save(),X.preventDefault()):b.default.match(X,"escape")&&(re.cancel(),X.preventDefault())})}},{key:"cancel",value:function(){this.hide()}},{key:"edit",value:function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"link",X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),X!=null?this.textbox.value=X:re!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+re)||""),this.root.setAttribute("data-mode",re)}},{key:"restoreFocus",value:function(){var re=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=re}},{key:"save",value:function(){var re=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var X=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",re,p.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",re,p.default.sources.USER)),this.quill.root.scrollTop=X;break}case"video":re=$(re);case"formula":{if(!re)break;var Z=this.quill.getSelection(!0);if(Z!=null){var ie=Z.index+Z.length;this.quill.insertEmbed(ie,this.root.getAttribute("data-mode"),re,p.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(ie+1," ",p.default.sources.USER),this.quill.setSelection(ie+2,p.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),U})(P.default);function $(z){var U=z.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||z.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return U?(U[1]||"https")+"://www.youtube.com/embed/"+U[2]+"?showinfo=0":(U=z.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(U[1]||"https")+"://player.vimeo.com/video/"+U[2]+"/":z}function F(z,U){var ee=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;U.forEach(function(re){var X=document.createElement("option");re===ee?X.setAttribute("selected","selected"):X.setAttribute("value",re),z.appendChild(X)})}r.BaseTooltip=K,r.default=H}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var l=[],c=0;c<arguments.length;c++)l[c]=arguments[c];this.insertBefore(l[0],null),l.length>1&&this.append.apply(this,l.slice(1))},o.prototype.contains=function(l){for(var c,u=this.iterator();c=u();)if(c===l)return!0;return!1},o.prototype.insertBefore=function(l,c){l&&(l.next=c,c!=null?(l.prev=c.prev,c.prev!=null&&(c.prev.next=l),c.prev=l,c===this.head&&(this.head=l)):this.tail!=null?(this.tail.next=l,l.prev=this.tail,this.tail=l):(l.prev=null,this.head=this.tail=l),this.length+=1)},o.prototype.offset=function(l){for(var c=0,u=this.head;u!=null;){if(u===l)return c;c+=u.length(),u=u.next}return-1},o.prototype.remove=function(l){this.contains(l)&&(l.prev!=null&&(l.prev.next=l.next),l.next!=null&&(l.next.prev=l.prev),l===this.head&&(this.head=l.next),l===this.tail&&(this.tail=l.prev),this.length-=1)},o.prototype.iterator=function(l){return l===void 0&&(l=this.head),function(){var c=l;return l!=null&&(l=l.next),c}},o.prototype.find=function(l,c){c===void 0&&(c=!1);for(var u,f=this.iterator();u=f();){var d=u.length();if(l<d||c&&l===d&&(u.next==null||u.next.length()!==0))return[u,l];l-=d}return[null,0]},o.prototype.forEach=function(l){for(var c,u=this.iterator();c=u();)l(c)},o.prototype.forEachAt=function(l,c,u){if(!(c<=0))for(var f=this.find(l),d=f[0],p=f[1],m,b=l-p,v=this.iterator(d);(m=v())&&b<l+c;){var y=m.length();l>b?u(m,l-b,Math.min(c,b+y-l)):u(m,0,Math.min(y,l+c-b)),b+=y}},o.prototype.map=function(l){return this.reduce(function(c,u){return c.push(l(u)),c},[])},o.prototype.reduce=function(l,c){for(var u,f=this.iterator();u=f();)c=l(c,u);return c},o})();r.default=a}),(function(n,r,i){var a=this&&this.__extends||(function(){var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var b in m)m.hasOwnProperty(b)&&(p[b]=m[b])};return function(p,m){d(p,m);function b(){this.constructor=p}p.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(17),l=i(1),c={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},u=100,f=(function(d){a(p,d);function p(m){var b=d.call(this,m)||this;return b.scroll=b,b.observer=new MutationObserver(function(v){b.update(v)}),b.observer.observe(b.domNode,c),b.attach(),b}return p.prototype.detach=function(){d.prototype.detach.call(this),this.observer.disconnect()},p.prototype.deleteAt=function(m,b){this.update(),m===0&&b===this.length()?this.children.forEach(function(v){v.remove()}):d.prototype.deleteAt.call(this,m,b)},p.prototype.formatAt=function(m,b,v,y){this.update(),d.prototype.formatAt.call(this,m,b,v,y)},p.prototype.insertAt=function(m,b,v){this.update(),d.prototype.insertAt.call(this,m,b,v)},p.prototype.optimize=function(m,b){var v=this;m===void 0&&(m=[]),b===void 0&&(b={}),d.prototype.optimize.call(this,b);for(var y=[].slice.call(this.observer.takeRecords());y.length>0;)m.push(y.pop());for(var x=function(N,k){k===void 0&&(k=!0),!(N==null||N===v)&&N.domNode.parentNode!=null&&(N.domNode[l.DATA_KEY].mutations==null&&(N.domNode[l.DATA_KEY].mutations=[]),k&&x(N.parent))},_=function(N){N.domNode[l.DATA_KEY]==null||N.domNode[l.DATA_KEY].mutations==null||(N instanceof o.default&&N.children.forEach(_),N.optimize(b))},S=m,w=0;S.length>0;w+=1){if(w>=u)throw new Error("[Parchment] Maximum optimize iterations reached");for(S.forEach(function(N){var k=l.find(N.target,!0);k!=null&&(k.domNode===N.target&&(N.type==="childList"?(x(l.find(N.previousSibling,!1)),[].forEach.call(N.addedNodes,function(C){var P=l.find(C,!1);x(P,!1),P instanceof o.default&&P.children.forEach(function(L){x(L,!1)})})):N.type==="attributes"&&x(k.prev)),x(k))}),this.children.forEach(_),S=[].slice.call(this.observer.takeRecords()),y=S.slice();y.length>0;)m.push(y.pop())}},p.prototype.update=function(m,b){var v=this;b===void 0&&(b={}),m=m||this.observer.takeRecords(),m.map(function(y){var x=l.find(y.target,!0);return x==null?null:x.domNode[l.DATA_KEY].mutations==null?(x.domNode[l.DATA_KEY].mutations=[y],x):(x.domNode[l.DATA_KEY].mutations.push(y),null)}).forEach(function(y){y==null||y===v||y.domNode[l.DATA_KEY]==null||y.update(y.domNode[l.DATA_KEY].mutations||[],b)}),this.domNode[l.DATA_KEY].mutations!=null&&d.prototype.update.call(this,this.domNode[l.DATA_KEY].mutations,b),this.optimize(m,b)},p.blotName="scroll",p.defaultChild="block",p.scope=l.Scope.BLOCK_BLOT,p.tagName="DIV",p})(o.default);r.default=f}),(function(n,r,i){var a=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var m in p)p.hasOwnProperty(m)&&(d[m]=p[m])};return function(d,p){f(d,p);function m(){this.constructor=d}d.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1);function c(f,d){if(Object.keys(f).length!==Object.keys(d).length)return!1;for(var p in f)if(f[p]!==d[p])return!1;return!0}var u=(function(f){a(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.formats=function(p){if(p.tagName!==d.tagName)return f.formats.call(this,p)},d.prototype.format=function(p,m){var b=this;p===this.statics.blotName&&!m?(this.children.forEach(function(v){v instanceof o.default||(v=v.wrap(d.blotName,!0)),b.attributes.copy(v)}),this.unwrap()):f.prototype.format.call(this,p,m)},d.prototype.formatAt=function(p,m,b,v){if(this.formats()[b]!=null||l.query(b,l.Scope.ATTRIBUTE)){var y=this.isolate(p,m);y.format(b,v)}else f.prototype.formatAt.call(this,p,m,b,v)},d.prototype.optimize=function(p){f.prototype.optimize.call(this,p);var m=this.formats();if(Object.keys(m).length===0)return this.unwrap();var b=this.next;b instanceof d&&b.prev===this&&c(m,b.formats())&&(b.moveChildren(this),b.remove())},d.blotName="inline",d.scope=l.Scope.INLINE_BLOT,d.tagName="SPAN",d})(o.default);r.default=u}),(function(n,r,i){var a=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var p in d)d.hasOwnProperty(p)&&(f[p]=d[p])};return function(f,d){u(f,d);function p(){this.constructor=f}f.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(18),l=i(1),c=(function(u){a(f,u);function f(){return u!==null&&u.apply(this,arguments)||this}return f.formats=function(d){var p=l.query(f.blotName).tagName;if(d.tagName!==p)return u.formats.call(this,d)},f.prototype.format=function(d,p){l.query(d,l.Scope.BLOCK)!=null&&(d===this.statics.blotName&&!p?this.replaceWith(f.blotName):u.prototype.format.call(this,d,p))},f.prototype.formatAt=function(d,p,m,b){l.query(m,l.Scope.BLOCK)!=null?this.format(m,b):u.prototype.formatAt.call(this,d,p,m,b)},f.prototype.insertAt=function(d,p,m){if(m==null||l.query(p,l.Scope.INLINE)!=null)u.prototype.insertAt.call(this,d,p,m);else{var b=this.split(d),v=l.create(p,m);b.parent.insertBefore(v,b)}},f.prototype.update=function(d,p){navigator.userAgent.match(/Trident/)?this.build():u.prototype.update.call(this,d,p)},f.blotName="block",f.scope=l.Scope.BLOCK_BLOT,f.tagName="P",f})(o.default);r.default=c}),(function(n,r,i){var a=this&&this.__extends||(function(){var c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,f){u.__proto__=f}||function(u,f){for(var d in f)f.hasOwnProperty(d)&&(u[d]=f[d])};return function(u,f){c(u,f);function d(){this.constructor=u}u.prototype=f===null?Object.create(f):(d.prototype=f.prototype,new d)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=(function(c){a(u,c);function u(){return c!==null&&c.apply(this,arguments)||this}return u.formats=function(f){},u.prototype.format=function(f,d){c.prototype.formatAt.call(this,0,this.length(),f,d)},u.prototype.formatAt=function(f,d,p,m){f===0&&d===this.length()?this.format(p,m):c.prototype.formatAt.call(this,f,d,p,m)},u.prototype.formats=function(){return this.statics.formats(this.domNode)},u})(o.default);r.default=l}),(function(n,r,i){var a=this&&this.__extends||(function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,d){f.__proto__=d}||function(f,d){for(var p in d)d.hasOwnProperty(p)&&(f[p]=d[p])};return function(f,d){u(f,d);function p(){this.constructor=f}f.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=i(19),l=i(1),c=(function(u){a(f,u);function f(d){var p=u.call(this,d)||this;return p.text=p.statics.value(p.domNode),p}return f.create=function(d){return document.createTextNode(d)},f.value=function(d){var p=d.data;return p.normalize&&(p=p.normalize()),p},f.prototype.deleteAt=function(d,p){this.domNode.data=this.text=this.text.slice(0,d)+this.text.slice(d+p)},f.prototype.index=function(d,p){return this.domNode===d?p:-1},f.prototype.insertAt=function(d,p,m){m==null?(this.text=this.text.slice(0,d)+p+this.text.slice(d),this.domNode.data=this.text):u.prototype.insertAt.call(this,d,p,m)},f.prototype.length=function(){return this.text.length},f.prototype.optimize=function(d){u.prototype.optimize.call(this,d),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof f&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},f.prototype.position=function(d,p){return[this.domNode,d]},f.prototype.split=function(d,p){if(p===void 0&&(p=!1),!p){if(d===0)return this;if(d===this.length())return this.next}var m=l.create(this.domNode.splitText(d));return this.parent.insertBefore(m,this.next),this.text=this.statics.value(this.domNode),m},f.prototype.update=function(d,p){var m=this;d.some(function(b){return b.type==="characterData"&&b.target===m.domNode})&&(this.text=this.statics.value(this.domNode))},f.prototype.value=function(){return this.text},f.blotName="text",f.scope=l.Scope.INLINE_BLOT,f})(o.default);r.default=c}),(function(n,r,i){var a=document.createElement("div");if(a.classList.toggle("test-class",!1),a.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(l,c){return arguments.length>1&&!this.contains(l)==!c?c:o.call(this,l)}}String.prototype.startsWith||(String.prototype.startsWith=function(l,c){return c=c||0,this.substr(c,l.length)===l}),String.prototype.endsWith||(String.prototype.endsWith=function(l,c){var u=this.toString();(typeof c!="number"||!isFinite(c)||Math.floor(c)!==c||c>u.length)&&(c=u.length),c-=l.length;var f=u.indexOf(l,c);return f!==-1&&f===c}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(c){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof c!="function")throw new TypeError("predicate must be a function");for(var u=Object(this),f=u.length>>>0,d=arguments[1],p,m=0;m<f;m++)if(p=u[m],c.call(d,p,m,u))return p}}),document.addEventListener("DOMContentLoaded",function(){document.execCommand("enableObjectResizing",!1,!1),document.execCommand("autoUrlDetect",!1,!1)})}),(function(n,r){var i=-1,a=1,o=0;function l(w,N,k){if(w==N)return w?[[o,w]]:[];(k<0||w.length<k)&&(k=null);var C=d(w,N),P=w.substring(0,C);w=w.substring(C),N=N.substring(C),C=p(w,N);var L=w.substring(w.length-C);w=w.substring(0,w.length-C),N=N.substring(0,N.length-C);var T=c(w,N);return P&&T.unshift([o,P]),L&&T.push([o,L]),b(T),k!=null&&(T=x(T,k)),T=_(T),T}function c(w,N){var k;if(!w)return[[a,N]];if(!N)return[[i,w]];var C=w.length>N.length?w:N,P=w.length>N.length?N:w,L=C.indexOf(P);if(L!=-1)return k=[[a,C.substring(0,L)],[o,P],[a,C.substring(L+P.length)]],w.length>N.length&&(k[0][0]=k[2][0]=i),k;if(P.length==1)return[[i,w],[a,N]];var T=m(w,N);if(T){var A=T[0],R=T[1],I=T[2],M=T[3],B=T[4],W=l(A,I),G=l(R,M);return W.concat([[o,B]],G)}return u(w,N)}function u(w,N){for(var k=w.length,C=N.length,P=Math.ceil((k+C)/2),L=P,T=2*P,A=new Array(T),R=new Array(T),I=0;I<T;I++)A[I]=-1,R[I]=-1;A[L+1]=0,R[L+1]=0;for(var M=k-C,B=M%2!=0,W=0,G=0,H=0,K=0,$=0;$<P;$++){for(var F=-$+W;F<=$-G;F+=2){var z=L+F,U;F==-$||F!=$&&A[z-1]<A[z+1]?U=A[z+1]:U=A[z-1]+1;for(var ee=U-F;U<k&&ee<C&&w.charAt(U)==N.charAt(ee);)U++,ee++;if(A[z]=U,U>k)G+=2;else if(ee>C)W+=2;else if(B){var re=L+M-F;if(re>=0&&re<T&&R[re]!=-1){var X=k-R[re];if(U>=X)return f(w,N,U,ee)}}}for(var Z=-$+H;Z<=$-K;Z+=2){var re=L+Z,X;Z==-$||Z!=$&&R[re-1]<R[re+1]?X=R[re+1]:X=R[re-1]+1;for(var ie=X-Z;X<k&&ie<C&&w.charAt(k-X-1)==N.charAt(C-ie-1);)X++,ie++;if(R[re]=X,X>k)K+=2;else if(ie>C)H+=2;else if(!B){var z=L+M-Z;if(z>=0&&z<T&&A[z]!=-1){var U=A[z],ee=L+U-z;if(X=k-X,U>=X)return f(w,N,U,ee)}}}}return[[i,w],[a,N]]}function f(w,N,k,C){var P=w.substring(0,k),L=N.substring(0,C),T=w.substring(k),A=N.substring(C),R=l(P,L),I=l(T,A);return R.concat(I)}function d(w,N){if(!w||!N||w.charAt(0)!=N.charAt(0))return 0;for(var k=0,C=Math.min(w.length,N.length),P=C,L=0;k<P;)w.substring(L,P)==N.substring(L,P)?(k=P,L=k):C=P,P=Math.floor((C-k)/2+k);return P}function p(w,N){if(!w||!N||w.charAt(w.length-1)!=N.charAt(N.length-1))return 0;for(var k=0,C=Math.min(w.length,N.length),P=C,L=0;k<P;)w.substring(w.length-P,w.length-L)==N.substring(N.length-P,N.length-L)?(k=P,L=k):C=P,P=Math.floor((C-k)/2+k);return P}function m(w,N){var k=w.length>N.length?w:N,C=w.length>N.length?N:w;if(k.length<4||C.length*2<k.length)return null;function P(G,H,K){for(var $=G.substring(K,K+Math.floor(G.length/4)),F=-1,z="",U,ee,re,X;(F=H.indexOf($,F+1))!=-1;){var Z=d(G.substring(K),H.substring(F)),ie=p(G.substring(0,K),H.substring(0,F));z.length<ie+Z&&(z=H.substring(F-ie,F)+H.substring(F,F+Z),U=G.substring(0,K-ie),ee=G.substring(K+Z),re=H.substring(0,F-ie),X=H.substring(F+Z))}return z.length*2>=G.length?[U,ee,re,X,z]:null}var L=P(k,C,Math.ceil(k.length/4)),T=P(k,C,Math.ceil(k.length/2)),A;if(!L&&!T)return null;T?L?A=L[4].length>T[4].length?L:T:A=T:A=L;var R,I,M,B;w.length>N.length?(R=A[0],I=A[1],M=A[2],B=A[3]):(M=A[0],B=A[1],R=A[2],I=A[3]);var W=A[4];return[R,I,M,B,W]}function b(w){w.push([o,""]);for(var N=0,k=0,C=0,P="",L="",T;N<w.length;)switch(w[N][0]){case a:C++,L+=w[N][1],N++;break;case i:k++,P+=w[N][1],N++;break;case o:k+C>1?(k!==0&&C!==0&&(T=d(L,P),T!==0&&(N-k-C>0&&w[N-k-C-1][0]==o?w[N-k-C-1][1]+=L.substring(0,T):(w.splice(0,0,[o,L.substring(0,T)]),N++),L=L.substring(T),P=P.substring(T)),T=p(L,P),T!==0&&(w[N][1]=L.substring(L.length-T)+w[N][1],L=L.substring(0,L.length-T),P=P.substring(0,P.length-T))),k===0?w.splice(N-C,k+C,[a,L]):C===0?w.splice(N-k,k+C,[i,P]):w.splice(N-k-C,k+C,[i,P],[a,L]),N=N-k-C+(k?1:0)+(C?1:0)+1):N!==0&&w[N-1][0]==o?(w[N-1][1]+=w[N][1],w.splice(N,1)):N++,C=0,k=0,P="",L="";break}w[w.length-1][1]===""&&w.pop();var A=!1;for(N=1;N<w.length-1;)w[N-1][0]==o&&w[N+1][0]==o&&(w[N][1].substring(w[N][1].length-w[N-1][1].length)==w[N-1][1]?(w[N][1]=w[N-1][1]+w[N][1].substring(0,w[N][1].length-w[N-1][1].length),w[N+1][1]=w[N-1][1]+w[N+1][1],w.splice(N-1,1),A=!0):w[N][1].substring(0,w[N+1][1].length)==w[N+1][1]&&(w[N-1][1]+=w[N+1][1],w[N][1]=w[N][1].substring(w[N+1][1].length)+w[N+1][1],w.splice(N+1,1),A=!0)),N++;A&&b(w)}var v=l;v.INSERT=a,v.DELETE=i,v.EQUAL=o,n.exports=v;function y(w,N){if(N===0)return[o,w];for(var k=0,C=0;C<w.length;C++){var P=w[C];if(P[0]===i||P[0]===o){var L=k+P[1].length;if(N===L)return[C+1,w];if(N<L){w=w.slice();var T=N-k,A=[P[0],P[1].slice(0,T)],R=[P[0],P[1].slice(T)];return w.splice(C,1,A,R),[C+1,w]}else k=L}}throw new Error("cursor_pos is out of bounds!")}function x(w,N){var k=y(w,N),C=k[1],P=k[0],L=C[P],T=C[P+1];if(L==null)return w;if(L[0]!==o)return w;if(T!=null&&L[1]+T[1]===T[1]+L[1])return C.splice(P,2,T,L),S(C,P,2);if(T!=null&&T[1].indexOf(L[1])===0){C.splice(P,2,[T[0],L[1]],[0,L[1]]);var A=T[1].slice(L[1].length);return A.length>0&&C.splice(P+2,0,[T[0],A]),S(C,P,3)}else return w}function _(w){for(var N=!1,k=function(T){return T.charCodeAt(0)>=56320&&T.charCodeAt(0)<=57343},C=function(T){return T.charCodeAt(T.length-1)>=55296&&T.charCodeAt(T.length-1)<=56319},P=2;P<w.length;P+=1)w[P-2][0]===o&&C(w[P-2][1])&&w[P-1][0]===i&&k(w[P-1][1])&&w[P][0]===a&&k(w[P][1])&&(N=!0,w[P-1][1]=w[P-2][1].slice(-1)+w[P-1][1],w[P][1]=w[P-2][1].slice(-1)+w[P][1],w[P-2][1]=w[P-2][1].slice(0,-1));if(!N)return w;for(var L=[],P=0;P<w.length;P+=1)w[P][1].length>0&&L.push(w[P]);return L}function S(w,N,k){for(var C=N+k-1;C>=0&&C>=N-1;C--)if(C+1<w.length){var P=w[C],L=w[C+1];P[0]===L[1]&&w.splice(C,2,[P[0],P[1]+L[1]])}return w}}),(function(n,r){r=n.exports=typeof Object.keys=="function"?Object.keys:i,r.shim=i;function i(a){var o=[];for(var l in a)o.push(l);return o}}),(function(n,r){var i=(function(){return Object.prototype.toString.call(arguments)})()=="[object Arguments]";r=n.exports=i?a:o,r.supported=a;function a(l){return Object.prototype.toString.call(l)=="[object Arguments]"}r.unsupported=o;function o(l){return l&&typeof l=="object"&&typeof l.length=="number"&&Object.prototype.hasOwnProperty.call(l,"callee")&&!Object.prototype.propertyIsEnumerable.call(l,"callee")||!1}}),(function(n,r){var i=Object.prototype.hasOwnProperty,a="~";function o(){}Object.create&&(o.prototype=Object.create(null),new o().__proto__||(a=!1));function l(u,f,d){this.fn=u,this.context=f,this.once=d||!1}function c(){this._events=new o,this._eventsCount=0}c.prototype.eventNames=function(){var f=[],d,p;if(this._eventsCount===0)return f;for(p in d=this._events)i.call(d,p)&&f.push(a?p.slice(1):p);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},c.prototype.listeners=function(f,d){var p=a?a+f:f,m=this._events[p];if(d)return!!m;if(!m)return[];if(m.fn)return[m.fn];for(var b=0,v=m.length,y=new Array(v);b<v;b++)y[b]=m[b].fn;return y},c.prototype.emit=function(f,d,p,m,b,v){var y=a?a+f:f;if(!this._events[y])return!1;var x=this._events[y],_=arguments.length,S,w;if(x.fn){switch(x.once&&this.removeListener(f,x.fn,void 0,!0),_){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,d),!0;case 3:return x.fn.call(x.context,d,p),!0;case 4:return x.fn.call(x.context,d,p,m),!0;case 5:return x.fn.call(x.context,d,p,m,b),!0;case 6:return x.fn.call(x.context,d,p,m,b,v),!0}for(w=1,S=new Array(_-1);w<_;w++)S[w-1]=arguments[w];x.fn.apply(x.context,S)}else{var N=x.length,k;for(w=0;w<N;w++)switch(x[w].once&&this.removeListener(f,x[w].fn,void 0,!0),_){case 1:x[w].fn.call(x[w].context);break;case 2:x[w].fn.call(x[w].context,d);break;case 3:x[w].fn.call(x[w].context,d,p);break;case 4:x[w].fn.call(x[w].context,d,p,m);break;default:if(!S)for(k=1,S=new Array(_-1);k<_;k++)S[k-1]=arguments[k];x[w].fn.apply(x[w].context,S)}}return!0},c.prototype.on=function(f,d,p){var m=new l(d,p||this),b=a?a+f:f;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],m]:this._events[b].push(m):(this._events[b]=m,this._eventsCount++),this},c.prototype.once=function(f,d,p){var m=new l(d,p||this,!0),b=a?a+f:f;return this._events[b]?this._events[b].fn?this._events[b]=[this._events[b],m]:this._events[b].push(m):(this._events[b]=m,this._eventsCount++),this},c.prototype.removeListener=function(f,d,p,m){var b=a?a+f:f;if(!this._events[b])return this;if(!d)return--this._eventsCount===0?this._events=new o:delete this._events[b],this;var v=this._events[b];if(v.fn)v.fn===d&&(!m||v.once)&&(!p||v.context===p)&&(--this._eventsCount===0?this._events=new o:delete this._events[b]);else{for(var y=0,x=[],_=v.length;y<_;y++)(v[y].fn!==d||m&&!v[y].once||p&&v[y].context!==p)&&x.push(v[y]);x.length?this._events[b]=x.length===1?x[0]:x:--this._eventsCount===0?this._events=new o:delete this._events[b]}return this},c.prototype.removeAllListeners=function(f){var d;return f?(d=a?a+f:f,this._events[d]&&(--this._eventsCount===0?this._events=new o:delete this._events[d])):(this._events=new o,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prototype.setMaxListeners=function(){return this},c.prefixed=a,c.EventEmitter=c,typeof n<"u"&&(n.exports=c)}
761),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.matchText=r.matchSpacing=r.matchNewline=r.matchBlot=r.matchAttributor=r.default=void 0;var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},o=(function(){function te(oe,le){var ye=[],xe=!0,Ce=!1,Be=void 0;try{for(var Re=oe[Symbol.iterator](),ge;!(xe=(ge=Re.next()).done)&&(ye.push(ge.value),!(le&&ye.length===le));xe=!0);}catch(ke){Ce=!0,Be=ke}finally{try{!xe&&Re.return&&Re.return()}finally{if(Ce)throw Be}}return ye}return function(oe,le){if(Array.isArray(oe))return oe;if(Symbol.iterator in Object(oe))return te(oe,le);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),l=(function(){function te(oe,le){for(var ye=0;ye<le.length;ye++){var xe=le[ye];xe.enumerable=xe.enumerable||!1,xe.configurable=!0,"value"in xe&&(xe.writable=!0),Object.defineProperty(oe,xe.key,xe)}}return function(oe,le,ye){return le&&te(oe.prototype,le),ye&&te(oe,ye),oe}})(),c=i(3),u=R(c),f=i(2),d=R(f),p=i(0),m=R(p),b=i(5),v=R(b),y=i(10),x=R(y),_=i(9),S=R(_),w=i(36),N=i(37),k=i(13),C=R(k),P=i(26),L=i(38),T=i(39),A=i(40);
vendor: 50,895 bytes, lines 761-770
761function R(te){return te&&te.__esModule?te:{default:te}}function I(te,oe,le){return oe in te?Object.defineProperty(te,oe,{value:le,enumerable:!0,configurable:!0,writable:!0}):te[oe]=le,te}function M(te,oe){if(!(te instanceof oe))throw new TypeError("Cannot call a class as a function")}function B(te,oe){if(!te)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return oe&&(typeof oe=="object"||typeof oe=="function")?oe:te}function W(te,oe){if(typeof oe!="function"&&oe!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof oe);te.prototype=Object.create(oe&&oe.prototype,{constructor:{value:te,enumerable:!1,writable:!0,configurable:!0}}),oe&&(Object.setPrototypeOf?Object.setPrototypeOf(te,oe):te.__proto__=oe)}var G=(0,x.default)("quill:clipboard"),H="__ql-matcher",K=[[Node.TEXT_NODE,je],[Node.TEXT_NODE,ce],["br",se],[Node.ELEMENT_NODE,ce],[Node.ELEMENT_NODE,J],[Node.ELEMENT_NODE,Ne],[Node.ELEMENT_NODE,Y],[Node.ELEMENT_NODE,me],["li",fe],["b",ie.bind(ie,"bold")],["i",ie.bind(ie,"italic")],["style",V]],$=[w.AlignAttribute,L.DirectionAttribute].reduce(function(te,oe){return te[oe.keyName]=oe,te},{}),F=[w.AlignStyle,N.BackgroundStyle,P.ColorStyle,L.DirectionStyle,T.FontStyle,A.SizeStyle].reduce(function(te,oe){return te[oe.keyName]=oe,te},{}),z=(function(te){W(oe,te);function oe(le,ye){M(this,oe);var xe=B(this,(oe.__proto__||Object.getPrototypeOf(oe)).call(this,le,ye));return xe.quill.root.addEventListener("paste",xe.onPaste.bind(xe)),xe.container=xe.quill.addContainer("ql-clipboard"),xe.container.setAttribute("contenteditable",!0),xe.container.setAttribute("tabindex",-1),xe.matchers=[],K.concat(xe.options.matchers).forEach(function(Ce){var Be=o(Ce,2),Re=Be[0],ge=Be[1];!ye.matchVisual&&ge===Ne||xe.addMatcher(Re,ge)}),xe}return l(oe,[{key:"addMatcher",value:function(ye,xe){this.matchers.push([ye,xe])}},{key:"convert",value:function(ye){if(typeof ye=="string")return this.container.innerHTML=ye.replace(/\>\r?\n +\</g,"><"),this.convert();var xe=this.quill.getFormat(this.quill.selection.savedRange.index);if(xe[C.default.blotName]){var Ce=this.container.innerText;return this.container.innerHTML="",new d.default().insert(Ce,I({},C.default.blotName,xe[C.default.blotName]))}var Be=this.prepareMatching(),Re=o(Be,2),ge=Re[0],ke=Re[1],De=Z(this.container,ge,ke);return re(De,` 762`)&&De.ops[De.ops.length-1].attributes==null&&(De=De.compose(new d.default().retain(De.length()-1).delete(1))),G.log("convert",this.container.innerHTML,De),this.container.innerHTML="",De}},{key:"dangerouslyPasteHTML",value:function(ye,xe){var Ce=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof ye=="string")this.quill.setContents(this.convert(ye),xe),this.quill.setSelection(0,v.default.sources.SILENT);else{var Be=this.convert(xe);this.quill.updateContents(new d.default().retain(ye).concat(Be),Ce),this.quill.setSelection(ye+Be.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(ye){var xe=this;if(!(ye.defaultPrevented||!this.quill.isEnabled())){var Ce=this.quill.getSelection(),Be=new d.default().retain(Ce.index),Re=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){Be=Be.concat(xe.convert()).delete(Ce.length),xe.quill.updateContents(Be,v.default.sources.USER),xe.quill.setSelection(Be.length()-Ce.length,v.default.sources.SILENT),xe.quill.scrollingContainer.scrollTop=Re,xe.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var ye=this,xe=[],Ce=[];return this.matchers.forEach(function(Be){var Re=o(Be,2),ge=Re[0],ke=Re[1];switch(ge){case Node.TEXT_NODE:Ce.push(ke);break;case Node.ELEMENT_NODE:xe.push(ke);break;default:[].forEach.call(ye.container.querySelectorAll(ge),function(De){De[H]=De[H]||[],De[H].push(ke)});break}}),[xe,Ce]}}]),oe})(S.default);z.DEFAULTS={matchers:[],matchVisual:!0};function U(te,oe,le){return(typeof oe>"u"?"undefined":a(oe))==="object"?Object.keys(oe).reduce(function(ye,xe){return U(ye,xe,oe[xe])},te):te.reduce(function(ye,xe){return xe.attributes&&xe.attributes[oe]?ye.push(xe):ye.insert(xe.insert,(0,u.default)({},I({},oe,le),xe.attributes))},new d.default)}function ee(te){if(te.nodeType!==Node.ELEMENT_NODE)return{};var oe="__ql-computed-style";return te[oe]||(te[oe]=window.getComputedStyle(te))}function re(te,oe){for(var le="",ye=te.ops.length-1;ye>=0&&le.length<oe.length;--ye){var xe=te.ops[ye];if(typeof xe.insert!="string")break;le=xe.insert+le}return le.slice(-1*oe.length)===oe}function X(te){if(te.childNodes.length===0)return!1;var oe=ee(te);return["block","list-item"].indexOf(oe.display)>-1}function Z(te,oe,le){return te.nodeType===te.TEXT_NODE?le.reduce(function(ye,xe){return xe(te,ye)},new d.default):te.nodeType===te.ELEMENT_NODE?[].reduce.call(te.childNodes||[],function(ye,xe){var Ce=Z(xe,oe,le);return xe.nodeType===te.ELEMENT_NODE&&(Ce=oe.reduce(function(Be,Re){return Re(xe,Be)},Ce),Ce=(xe[H]||[]).reduce(function(Be,Re){return Re(xe,Be)},Ce)),ye.concat(Ce)},new d.default):new d.default}function ie(te,oe,le){return U(le,te,!0)}function Y(te,oe){var le=m.default.Attributor.Attribute.keys(te),ye=m.default.Attributor.Class.keys(te),xe=m.default.Attributor.Style.keys(te),Ce={};return le.concat(ye).concat(xe).forEach(function(Be){var Re=m.default.query(Be,m.default.Scope.ATTRIBUTE);Re!=null&&(Ce[Re.attrName]=Re.value(te),Ce[Re.attrName])||(Re=$[Be],Re!=null&&(Re.attrName===Be||Re.keyName===Be)&&(Ce[Re.attrName]=Re.value(te)||void 0),Re=F[Be],Re!=null&&(Re.attrName===Be||Re.keyName===Be)&&(Re=F[Be],Ce[Re.attrName]=Re.value(te)||void 0))}),Object.keys(Ce).length>0&&(oe=U(oe,Ce)),oe}function J(te,oe){var le=m.default.query(te);if(le==null)return oe;if(le.prototype instanceof m.default.Embed){var ye={},xe=le.value(te);xe!=null&&(ye[le.blotName]=xe,oe=new d.default().insert(ye,le.formats(te)))}else typeof le.formats=="function"&&(oe=U(oe,le.blotName,le.formats(te)));return oe}function se(te,oe){return re(oe,` 763`)||oe.insert(` 764`),oe}function V(){return new d.default}function fe(te,oe){var le=m.default.query(te);if(le==null||le.blotName!=="list-item"||!re(oe,` 765`))return oe;for(var ye=-1,xe=te.parentNode;!xe.classList.contains("ql-clipboard");)(m.default.query(xe)||{}).blotName==="list"&&(ye+=1),xe=xe.parentNode;return ye<=0?oe:oe.compose(new d.default().retain(oe.length()-1).retain(1,{indent:ye}))}function ce(te,oe){return re(oe,` 766`)||(X(te)||oe.length()>0&&te.nextSibling&&X(te.nextSibling))&&oe.insert(` 767`),oe}function Ne(te,oe){if(X(te)&&te.nextElementSibling!=null&&!re(oe,` 768 769`)){var le=te.offsetHeight+parseFloat(ee(te).marginTop)+parseFloat(ee(te).marginBottom);te.nextElementSibling.offsetTop>te.offsetTop+le*1.5&&oe.insert(` 770`)}return oe}function me(te,oe){var le={},ye=te.style||{};return ye.fontStyle&&ee(te).fontStyle==="italic"&&(le.italic=!0),ye.fontWeight&&(ee(te).fontWeight.startsWith("bold")||parseInt(ee(te).fontWeight)>=700)&&(le.bold=!0),Object.keys(le).length>0&&(oe=U(oe,le)),parseFloat(ye.textIndent||0)>0&&(oe=new d.default().insert(" ").concat(oe)),oe}function je(te,oe){var le=te.data;if(te.parentNode.tagName==="O:P")return oe.insert(le.trim());if(le.trim().length===0&&te.parentNode.classList.contains("ql-clipboard"))return oe;if(!ee(te.parentNode).whiteSpace.startsWith("pre")){var ye=function(Ce,Be){return Be=Be.replace(/[^\u00a0]/g,""),Be.length<1&&Ce?" ":Be};le=le.replace(/\r\n/g," ").replace(/\n/g," "),le=le.replace(/\s\s+/g,ye.bind(ye,!0)),(te.previousSibling==null&&X(te.parentNode)||te.previousSibling!=null&&X(te.previousSibling))&&(le=le.replace(/^\s+/,ye.bind(ye,!1))),(te.nextSibling==null&&X(te.parentNode)||te.nextSibling!=null&&X(te.nextSibling))&&(le=le.replace(/\s+$/,ye.bind(ye,!1)))}return oe.insert(le)}r.default=z,r.matchAttributor=Y,r.matchBlot=J,r.matchNewline=ce,r.matchSpacing=Ne,r.matchText=je}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function b(v,y){for(var x=0;x<y.length;x++){var _=y[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,y,x)}else{if("value"in _)return _.value;var w=_.get;return w===void 0?void 0:w.call(x)}},l=i(6),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function f(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var m=(function(b){p(v,b);function v(){return f(this,v),d(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,[{key:"optimize",value:function(x){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,x),this.domNode.tagName!==this.statics.tagName[0]&&this.replaceWith(this.statics.blotName)}}],[{key:"create",value:function(){return o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this)}},{key:"formats",value:function(){return!0}}]),v})(c.default);m.blotName="bold",m.tagName=["STRONG","B"],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.addControls=r.default=void 0;var a=(function(){function A(R,I){var M=[],B=!0,W=!1,G=void 0;try{for(var H=R[Symbol.iterator](),K;!(B=(K=H.next()).done)&&(M.push(K.value),!(I&&M.length===I));B=!0);}catch($){W=!0,G=$}finally{try{!B&&H.return&&H.return()}finally{if(W)throw G}}return M}return function(R,I){if(Array.isArray(R))return R;if(Symbol.iterator in Object(R))return A(R,I);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function A(R,I){for(var M=0;M<I.length;M++){var B=I[M];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(R,B.key,B)}}return function(R,I,M){return I&&A(R.prototype,I),M&&A(R,M),R}})(),l=i(2),c=x(l),u=i(0),f=x(u),d=i(5),p=x(d),m=i(10),b=x(m),v=i(9),y=x(v);function x(A){return A&&A.__esModule?A:{default:A}}function _(A,R,I){return R in A?Object.defineProperty(A,R,{value:I,enumerable:!0,configurable:!0,writable:!0}):A[R]=I,A}function S(A,R){if(!(A instanceof R))throw new TypeError("Cannot call a class as a function")}function w(A,R){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R&&(typeof R=="object"||typeof R=="function")?R:A}function N(A,R){if(typeof R!="function"&&R!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof R);A.prototype=Object.create(R&&R.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),R&&(Object.setPrototypeOf?Object.setPrototypeOf(A,R):A.__proto__=R)}var k=(0,b.default)("quill:toolbar"),C=(function(A){N(R,A);function R(I,M){S(this,R);var B=w(this,(R.__proto__||Object.getPrototypeOf(R)).call(this,I,M));if(Array.isArray(B.options.container)){var W=document.createElement("div");L(W,B.options.container),I.container.parentNode.insertBefore(W,I.container),B.container=W}else typeof B.options.container=="string"?B.container=document.querySelector(B.options.container):B.container=B.options.container;if(!(B.container instanceof HTMLElement)){var G;return G=k.error("Container required for toolbar",B.options),w(B,G)}return B.container.classList.add("ql-toolbar"),B.controls=[],B.handlers={},Object.keys(B.options.handlers).forEach(function(H){B.addHandler(H,B.options.handlers[H])}),[].forEach.call(B.container.querySelectorAll("button, select"),function(H){B.attach(H)}),B.quill.on(p.default.events.EDITOR_CHANGE,function(H,K){H===p.default.events.SELECTION_CHANGE&&B.update(K)}),B.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){var H=B.quill.selection.getRange(),K=a(H,1),$=K[0];B.update($)}),B}return o(R,[{key:"addHandler",value:function(M,B){this.handlers[M]=B}},{key:"attach",value:function(M){var B=this,W=[].find.call(M.classList,function(H){return H.indexOf("ql-")===0});if(W){if(W=W.slice(3),M.tagName==="BUTTON"&&M.setAttribute("type","button"),this.handlers[W]==null){if(this.quill.scroll.whitelist!=null&&this.quill.scroll.whitelist[W]==null){k.warn("ignoring attaching to disabled format",W,M);return}if(f.default.query(W)==null){k.warn("ignoring attaching to nonexistent format",W,M);return}}var G=M.tagName==="SELECT"?"change":"click";M.addEventListener(G,function(H){var K=void 0;if(M.tagName==="SELECT"){if(M.selectedIndex<0)return;var $=M.options[M.selectedIndex];$.hasAttribute("selected")?K=!1:K=$.value||!1}else M.classList.contains("ql-active")?K=!1:K=M.value||!M.hasAttribute("value"),H.preventDefault();B.quill.focus();var F=B.quill.selection.getRange(),z=a(F,1),U=z[0];if(B.handlers[W]!=null)B.handlers[W].call(B,K);else if(f.default.query(W).prototype instanceof f.default.Embed){if(K=prompt("Enter "+W),!K)return;B.quill.updateContents(new c.default().retain(U.index).delete(U.length).insert(_({},W,K)),p.default.sources.USER)}else B.quill.format(W,K,p.default.sources.USER);B.update(U)}),this.controls.push([W,M])}}},{key:"update",value:function(M){var B=M==null?{}:this.quill.getFormat(M);this.controls.forEach(function(W){var G=a(W,2),H=G[0],K=G[1];if(K.tagName==="SELECT"){var $=void 0;if(M==null)$=null;else if(B[H]==null)$=K.querySelector("option[selected]");else if(!Array.isArray(B[H])){var F=B[H];typeof F=="string"&&(F=F.replace(/\"/g,'\\"')),$=K.querySelector('option[value="'+F+'"]')}$==null?(K.value="",K.selectedIndex=-1):$.selected=!0}else if(M==null)K.classList.remove("ql-active");else if(K.hasAttribute("value")){var z=B[H]===K.getAttribute("value")||B[H]!=null&&B[H].toString()===K.getAttribute("value")||B[H]==null&&!K.getAttribute("value");K.classList.toggle("ql-active",z)}else K.classList.toggle("ql-active",B[H]!=null)})}}]),R})(y.default);C.DEFAULTS={};function P(A,R,I){var M=document.createElement("button");M.setAttribute("type","button"),M.classList.add("ql-"+R),I!=null&&(M.value=I),A.appendChild(M)}function L(A,R){Array.isArray(R[0])||(R=[R]),R.forEach(function(I){var M=document.createElement("span");M.classList.add("ql-formats"),I.forEach(function(B){if(typeof B=="string")P(M,B);else{var W=Object.keys(B)[0],G=B[W];Array.isArray(G)?T(M,W,G):P(M,W,G)}}),A.appendChild(M)})}function T(A,R,I){var M=document.createElement("select");M.classList.add("ql-"+R),I.forEach(function(B){var W=document.createElement("option");B!==!1?W.setAttribute("value",B):W.setAttribute("selected","selected"),M.appendChild(W)}),A.appendChild(M)}C.DEFAULTS={container:null,handlers:{clean:function(){var R=this,I=this.quill.getSelection();if(I!=null)if(I.length==0){var M=this.quill.getFormat();Object.keys(M).forEach(function(B){f.default.query(B,f.default.Scope.INLINE)!=null&&R.quill.format(B,!1)})}else this.quill.removeFormat(I,p.default.sources.USER)},direction:function(R){var I=this.quill.getFormat().align;R==="rtl"&&I==null?this.quill.format("align","right",p.default.sources.USER):!R&&I==="right"&&this.quill.format("align",!1,p.default.sources.USER),this.quill.format("direction",R,p.default.sources.USER)},indent:function(R){var I=this.quill.getSelection(),M=this.quill.getFormat(I),B=parseInt(M.indent||0);if(R==="+1"||R==="-1"){var W=R==="+1"?1:-1;M.direction==="rtl"&&(W*=-1),this.quill.format("indent",B+W,p.default.sources.USER)}},link:function(R){R===!0&&(R=prompt("Enter link URL:")),this.quill.format("link",R,p.default.sources.USER)},list:function(R){var I=this.quill.getSelection(),M=this.quill.getFormat(I);R==="check"?M.list==="checked"||M.list==="unchecked"?this.quill.format("list",!1,p.default.sources.USER):this.quill.format("list","unchecked",p.default.sources.USER):this.quill.format("list",R,p.default.sources.USER)}}},r.default=C,r.addControls=L}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polyline class="ql-even ql-stroke" points="5 7 3 9 5 11"></polyline> <polyline class="ql-even ql-stroke" points="13 7 15 9 13 11"></polyline> <line class=ql-stroke x1=10 x2=8 y1=5 y2=13></line> </svg>'}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function b(v,y){for(var x=0;x<y.length;x++){var _=y[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,y,x)}else{if("value"in _)return _.value;var w=_.get;return w===void 0?void 0:w.call(x)}},l=i(28),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function f(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var m=(function(b){p(v,b);function v(y,x){f(this,v);var _=d(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,y));return _.label.innerHTML=x,_.container.classList.add("ql-color-picker"),[].slice.call(_.container.querySelectorAll(".ql-picker-item"),0,7).forEach(function(S){S.classList.add("ql-primary")}),_}return a(v,[{key:"buildItem",value:function(x){var _=o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"buildItem",this).call(this,x);return _.style.backgroundColor=x.getAttribute("value")||"",_}},{key:"selectItem",value:function(x,_){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,x,_);var S=this.label.querySelector(".ql-color-label"),w=x&&x.getAttribute("data-value")||"";S&&(S.tagName==="line"?S.style.stroke=w:S.style.fill=w)}}]),v})(c.default);r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function b(v,y){for(var x=0;x<y.length;x++){var _=y[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,y,x)}else{if("value"in _)return _.value;var w=_.get;return w===void 0?void 0:w.call(x)}},l=i(28),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function f(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var m=(function(b){p(v,b);function v(y,x){f(this,v);var _=d(this,(v.__proto__||Object.getPrototypeOf(v)).call(this,y));return _.container.classList.add("ql-icon-picker"),[].forEach.call(_.container.querySelectorAll(".ql-picker-item"),function(S){S.innerHTML=x[S.getAttribute("data-value")||""]}),_.defaultItem=_.container.querySelector(".ql-selected"),_.selectItem(_.defaultItem),_}return a(v,[{key:"selectItem",value:function(x,_){o(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"selectItem",this).call(this,x,_),x=x||this.defaultItem,this.label.innerHTML=x.innerHTML}}]),v})(c.default);r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function c(u,f){for(var d=0;d<f.length;d++){var p=f[d];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(u,p.key,p)}}return function(u,f,d){return f&&c(u.prototype,f),d&&c(u,d),u}})();function o(c,u){if(!(c instanceof u))throw new TypeError("Cannot call a class as a function")}var l=(function(){function c(u,f){var d=this;o(this,c),this.quill=u,this.boundsContainer=f||document.body,this.root=u.addContainer("ql-tooltip"),this.root.innerHTML=this.constructor.TEMPLATE,this.quill.root===this.quill.scrollingContainer&&this.quill.root.addEventListener("scroll",function(){d.root.style.marginTop=-1*d.quill.root.scrollTop+"px"}),this.hide()}return a(c,[{key:"hide",value:function(){this.root.classList.add("ql-hidden")}},{key:"position",value:function(f){var d=f.left+f.width/2-this.root.offsetWidth/2,p=f.bottom+this.quill.root.scrollTop;this.root.style.left=d+"px",this.root.style.top=p+"px",this.root.classList.remove("ql-flip");var m=this.boundsContainer.getBoundingClientRect(),b=this.root.getBoundingClientRect(),v=0;if(b.right>m.right&&(v=m.right-b.right,this.root.style.left=d+v+"px"),b.left<m.left&&(v=m.left-b.left,this.root.style.left=d+v+"px"),b.bottom>m.bottom){var y=b.bottom-b.top,x=f.bottom-f.top+y;this.root.style.top=p-x+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),c})();r.default=l}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function T(A,R){var I=[],M=!0,B=!1,W=void 0;try{for(var G=A[Symbol.iterator](),H;!(M=(H=G.next()).done)&&(I.push(H.value),!(R&&I.length===R));M=!0);}catch(K){B=!0,W=K}finally{try{!M&&G.return&&G.return()}finally{if(B)throw W}}return I}return function(A,R){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return T(A,R);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function T(A,R,I){A===null&&(A=Function.prototype);var M=Object.getOwnPropertyDescriptor(A,R);if(M===void 0){var B=Object.getPrototypeOf(A);return B===null?void 0:T(B,R,I)}else{if("value"in M)return M.value;var W=M.get;return W===void 0?void 0:W.call(I)}},l=(function(){function T(A,R){for(var I=0;I<R.length;I++){var M=R[I];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(A,M.key,M)}}return function(A,R,I){return R&&T(A.prototype,R),I&&T(A,I),A}})(),c=i(3),u=S(c),f=i(8),d=S(f),p=i(43),m=S(p),b=i(27),v=S(b),y=i(15),x=i(41),_=S(x);function S(T){return T&&T.__esModule?T:{default:T}}function w(T,A){if(!(T instanceof A))throw new TypeError("Cannot call a class as a function")}function N(T,A){if(!T)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return A&&(typeof A=="object"||typeof A=="function")?A:T}function k(T,A){if(typeof A!="function"&&A!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof A);T.prototype=Object.create(A&&A.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}}),A&&(Object.setPrototypeOf?Object.setPrototypeOf(T,A):T.__proto__=A)}var C=[[{header:["1","2","3",!1]}],["bold","italic","underline","link"],[{list:"ordered"},{list:"bullet"}],["clean"]],P=(function(T){k(A,T);function A(R,I){w(this,A),I.modules.toolbar!=null&&I.modules.toolbar.container==null&&(I.modules.toolbar.container=C);var M=N(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,R,I));return M.quill.container.classList.add("ql-snow"),M}return l(A,[{key:"extendToolbar",value:function(I){I.container.classList.add("ql-snow"),this.buildButtons([].slice.call(I.container.querySelectorAll("button")),_.default),this.buildPickers([].slice.call(I.container.querySelectorAll("select")),_.default),this.tooltip=new L(this.quill,this.options.bounds),I.container.querySelector(".ql-link")&&this.quill.keyboard.addBinding({key:"K",shortKey:!0},function(M,B){I.handlers.link.call(I,!B.format.link)})}}]),A})(m.default);P.DEFAULTS=(0,u.default)(!0,{},m.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(A){if(A){var R=this.quill.getSelection();if(R==null||R.length==0)return;var I=this.quill.getText(R);/^\S+@\S+\.\S+$/.test(I)&&I.indexOf("mailto:")!==0&&(I="mailto:"+I);var M=this.quill.theme.tooltip;M.edit("link",I)}else this.quill.format("link",!1)}}}}});var L=(function(T){k(A,T);function A(R,I){w(this,A);var M=N(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,R,I));return M.preview=M.root.querySelector("a.ql-preview"),M}return l(A,[{key:"listen",value:function(){var I=this;o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"listen",this).call(this),this.root.querySelector("a.ql-action").addEventListener("click",function(M){I.root.classList.contains("ql-editing")?I.save():I.edit("link",I.preview.textContent),M.preventDefault()}),this.root.querySelector("a.ql-remove").addEventListener("click",function(M){if(I.linkRange!=null){var B=I.linkRange;I.restoreFocus(),I.quill.formatText(B,"link",!1,d.default.sources.USER),delete I.linkRange}M.preventDefault(),I.hide()}),this.quill.on(d.default.events.SELECTION_CHANGE,function(M,B,W){if(M!=null){if(M.length===0&&W===d.default.sources.USER){var G=I.quill.scroll.descendant(v.default,M.index),H=a(G,2),K=H[0],$=H[1];if(K!=null){I.linkRange=new y.Range(M.index-$,K.length());var F=v.default.formats(K.domNode);I.preview.textContent=F,I.preview.setAttribute("href",F),I.show(),I.position(I.quill.getBounds(I.linkRange));return}}else delete I.linkRange;I.hide()}})}},{key:"show",value:function(){o(A.prototype.__proto__||Object.getPrototypeOf(A.prototype),"show",this).call(this),this.root.removeAttribute("data-mode")}}]),A})(p.BaseTooltip);L.TEMPLATE=['<a class="ql-preview" rel="noopener noreferrer" target="_blank" href="about:blank"></a>','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-action"></a>','<a class="ql-remove"></a>'].join(""),r.default=P}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(29),o=xe(a),l=i(36),c=i(38),u=i(64),f=i(65),d=xe(f),p=i(66),m=xe(p),b=i(67),v=xe(b),y=i(37),x=i(26),_=i(39),S=i(40),w=i(56),N=xe(w),k=i(68),C=xe(k),P=i(27),L=xe(P),T=i(69),A=xe(T),R=i(70),I=xe(R),M=i(71),B=xe(M),W=i(72),G=xe(W),H=i(73),K=xe(H),$=i(13),F=xe($),z=i(74),U=xe(z),ee=i(75),re=xe(ee),X=i(57),Z=xe(X),ie=i(41),Y=xe(ie),J=i(28),se=xe(J),V=i(59),fe=xe(V),ce=i(60),Ne=xe(ce),me=i(61),je=xe(me),te=i(108),oe=xe(te),le=i(62),ye=xe(le);function xe(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}o.default.register({"attributors/attribute/direction":c.DirectionAttribute,"attributors/class/align":l.AlignClass,"attributors/class/background":y.BackgroundClass,"attributors/class/color":x.ColorClass,"attributors/class/direction":c.DirectionClass,"attributors/class/font":_.FontClass,"attributors/class/size":S.SizeClass,"attributors/style/align":l.AlignStyle,"attributors/style/background":y.BackgroundStyle,"attributors/style/color":x.ColorStyle,"attributors/style/direction":c.DirectionStyle,"attributors/style/font":_.FontStyle,"attributors/style/size":S.SizeStyle},!0),o.default.register({"formats/align":l.AlignClass,"formats/direction":c.DirectionClass,"formats/indent":u.IndentClass,"formats/background":y.BackgroundStyle,"formats/color":x.ColorStyle,"formats/font":_.FontClass,"formats/size":S.SizeClass,"formats/blockquote":d.default,"formats/code-block":F.default,"formats/header":m.default,"formats/list":v.default,"formats/bold":N.default,"formats/code":$.Code,"formats/italic":C.default,"formats/link":L.default,"formats/script":A.default,"formats/strike":I.default,"formats/underline":B.default,"formats/image":G.default,"formats/video":K.default,"formats/list/item":b.ListItem,"modules/formula":U.default,"modules/syntax":re.default,"modules/toolbar":Z.default,"themes/bubble":oe.default,"themes/snow":ye.default,"ui/icons":Y.default,"ui/picker":se.default,"ui/icon-picker":Ne.default,"ui/color-picker":fe.default,"ui/tooltip":je.default},!0),r.default=o.default}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var a=(function(){function v(y,x){for(var _=0;_<x.length;_++){var S=x[_];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(y,S.key,S)}}return function(y,x,_){return x&&v(y.prototype,x),_&&v(y,_),y}})(),o=function v(y,x,_){y===null&&(y=Function.prototype);var S=Object.getOwnPropertyDescriptor(y,x);if(S===void 0){var w=Object.getPrototypeOf(y);return w===null?void 0:v(w,x,_)}else{if("value"in S)return S.value;var N=S.get;return N===void 0?void 0:N.call(_)}},l=i(0),c=u(l);function u(v){return v&&v.__esModule?v:{default:v}}function f(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function d(v,y){if(!v)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y&&(typeof y=="object"||typeof y=="function")?y:v}function p(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof y);v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}),y&&(Object.setPrototypeOf?Object.setPrototypeOf(v,y):v.__proto__=y)}var m=(function(v){p(y,v);function y(){return f(this,y),d(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}return a(y,[{key:"add",value:function(_,S){if(S==="+1"||S==="-1"){var w=this.value(_)||0;S=S==="+1"?w+1:w-1}return S===0?(this.remove(_),!0):o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"add",this).call(this,_,S)}},{key:"canAdd",value:function(_,S){return o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,_,S)||o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"canAdd",this).call(this,_,parseInt(S))}},{key:"value",value:function(_){return parseInt(o(y.prototype.__proto__||Object.getPrototypeOf(y.prototype),"value",this).call(this,_))||void 0}}]),y})(c.default.Attributor.Class),b=new m("indent","ql-indent",{scope:c.default.Scope.BLOCK,whitelist:[1,2,3,4,5,6,7,8]});r.IndentClass=b}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(4),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function f(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var d=(function(p){f(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);d.blotName="blockquote",d.tagName="blockquote",r.default=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function m(b,v){for(var y=0;y<v.length;y++){var x=v[y];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(b,x.key,x)}}return function(b,v,y){return v&&m(b.prototype,v),y&&m(b,y),b}})(),o=i(4),l=c(o);function c(m){return m&&m.__esModule?m:{default:m}}function u(m,b){if(!(m instanceof b))throw new TypeError("Cannot call a class as a function")}function f(m,b){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&(typeof b=="object"||typeof b=="function")?b:m}function d(m,b){if(typeof b!="function"&&b!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof b);m.prototype=Object.create(b&&b.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(m,b):m.__proto__=b)}var p=(function(m){d(b,m);function b(){return u(this,b),f(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return a(b,null,[{key:"formats",value:function(y){return this.tagName.indexOf(y.tagName)+1}}]),b})(l.default);p.blotName="header",p.tagName=["H1","H2","H3","H4","H5","H6"],r.default=p}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.ListItem=void 0;var a=(function(){function w(N,k){for(var C=0;C<k.length;C++){var P=k[C];P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P&&(P.writable=!0),Object.defineProperty(N,P.key,P)}}return function(N,k,C){return k&&w(N.prototype,k),C&&w(N,C),N}})(),o=function w(N,k,C){N===null&&(N=Function.prototype);var P=Object.getOwnPropertyDescriptor(N,k);if(P===void 0){var L=Object.getPrototypeOf(N);return L===null?void 0:w(L,k,C)}else{if("value"in P)return P.value;var T=P.get;return T===void 0?void 0:T.call(C)}},l=i(0),c=m(l),u=i(4),f=m(u),d=i(25),p=m(d);function m(w){return w&&w.__esModule?w:{default:w}}function b(w,N,k){return N in w?Object.defineProperty(w,N,{value:k,enumerable:!0,configurable:!0,writable:!0}):w[N]=k,w}function v(w,N){if(!(w instanceof N))throw new TypeError("Cannot call a class as a function")}function y(w,N){if(!w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:w}function x(w,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);w.prototype=Object.create(N&&N.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(w,N):w.__proto__=N)}var _=(function(w){x(N,w);function N(){return v(this,N),y(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}return a(N,[{key:"format",value:function(C,P){C===S.blotName&&!P?this.replaceWith(c.default.create(this.statics.scope)):o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"format",this).call(this,C,P)}},{key:"remove",value:function(){this.prev==null&&this.next==null?this.parent.remove():o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"remove",this).call(this)}},{key:"replaceWith",value:function(C,P){return this.parent.isolate(this.offset(this.parent),this.length()),C===this.parent.statics.blotName?(this.parent.replaceWith(C,P),this):(this.parent.unwrap(),o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replaceWith",this).call(this,C,P))}}],[{key:"formats",value:function(C){return C.tagName===this.tagName?void 0:o(N.__proto__||Object.getPrototypeOf(N),"formats",this).call(this,C)}}]),N})(f.default);_.blotName="list-item",_.tagName="LI";var S=(function(w){x(N,w),a(N,null,[{key:"create",value:function(C){var P=C==="ordered"?"OL":"UL",L=o(N.__proto__||Object.getPrototypeOf(N),"create",this).call(this,P);return(C==="checked"||C==="unchecked")&&L.setAttribute("data-checked",C==="checked"),L}},{key:"formats",value:function(C){if(C.tagName==="OL")return"ordered";if(C.tagName==="UL")return C.hasAttribute("data-checked")?C.getAttribute("data-checked")==="true"?"checked":"unchecked":"bullet"}}]);function N(k){v(this,N);var C=y(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,k)),P=function(T){if(T.target.parentNode===k){var A=C.statics.formats(k),R=c.default.find(T.target);A==="checked"?R.format("list","unchecked"):A==="unchecked"&&R.format("list","checked")}};return k.addEventListener("touchstart",P),k.addEventListener("mousedown",P),C}return a(N,[{key:"format",value:function(C,P){this.children.length>0&&this.children.tail.format(C,P)}},{key:"formats",value:function(){return b({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(C,P){if(C instanceof _)o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"insertBefore",this).call(this,C,P);else{var L=P==null?this.length():P.offset(this),T=this.split(L);T.parent.insertBefore(C,T)}}},{key:"optimize",value:function(C){o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"optimize",this).call(this,C);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&P.domNode.tagName===this.domNode.tagName&&P.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(P.moveChildren(this),P.remove())}},{key:"replace",value:function(C){if(C.statics.blotName!==this.statics.blotName){var P=c.default.create(this.statics.defaultChild);C.moveChildren(P),this.appendChild(P)}o(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"replace",this).call(this,C)}}]),N})(p.default);S.blotName="list",S.scope=c.default.Scope.BLOCK_BLOT,S.tagName=["OL","UL"],S.defaultChild="list-item",S.allowedChildren=[_],r.ListItem=_,r.default=S}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(56),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function f(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var d=(function(p){f(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);d.blotName="italic",d.tagName=["EM","I"],r.default=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function b(v,y){for(var x=0;x<y.length;x++){var _=y[x];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(v,_.key,_)}}return function(v,y,x){return y&&b(v.prototype,y),x&&b(v,x),v}})(),o=function b(v,y,x){v===null&&(v=Function.prototype);var _=Object.getOwnPropertyDescriptor(v,y);if(_===void 0){var S=Object.getPrototypeOf(v);return S===null?void 0:b(S,y,x)}else{if("value"in _)return _.value;var w=_.get;return w===void 0?void 0:w.call(x)}},l=i(6),c=u(l);function u(b){return b&&b.__esModule?b:{default:b}}function f(b,v){if(!(b instanceof v))throw new TypeError("Cannot call a class as a function")}function d(b,v){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:b}function p(b,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);b.prototype=Object.create(v&&v.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(b,v):b.__proto__=v)}var m=(function(b){p(v,b);function v(){return f(this,v),d(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}return a(v,null,[{key:"create",value:function(x){return x==="super"?document.createElement("sup"):x==="sub"?document.createElement("sub"):o(v.__proto__||Object.getPrototypeOf(v),"create",this).call(this,x)}},{key:"formats",value:function(x){if(x.tagName==="SUB")return"sub";if(x.tagName==="SUP")return"super"}}]),v})(c.default);m.blotName="script",m.tagName=["SUB","SUP"],r.default=m}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function f(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var d=(function(p){f(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);d.blotName="strike",d.tagName="S",r.default=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=i(6),o=l(a);function l(p){return p&&p.__esModule?p:{default:p}}function c(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function u(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function f(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var d=(function(p){f(m,p);function m(){return c(this,m),u(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}return m})(o.default);d.blotName="underline",d.tagName="U",r.default=d}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function y(x,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}return function(x,_,S){return _&&y(x.prototype,_),S&&y(x,S),x}})(),o=function y(x,_,S){x===null&&(x=Function.prototype);var w=Object.getOwnPropertyDescriptor(x,_);if(w===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:y(N,_,S)}else{if("value"in w)return w.value;var k=w.get;return k===void 0?void 0:k.call(S)}},l=i(0),c=f(l),u=i(27);function f(y){return y&&y.__esModule?y:{default:y}}function d(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function p(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=["alt","height","width"],v=(function(y){m(x,y);function x(){return d(this,x),p(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"format",value:function(S,w){b.indexOf(S)>-1?w?this.domNode.setAttribute(S,w):this.domNode.removeAttribute(S):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,S,w)}}],[{key:"create",value:function(S){var w=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S);return typeof S=="string"&&w.setAttribute("src",this.sanitize(S)),w}},{key:"formats",value:function(S){return b.reduce(function(w,N){return S.hasAttribute(N)&&(w[N]=S.getAttribute(N)),w},{})}},{key:"match",value:function(S){return/\.(jpe?g|gif|png)$/.test(S)||/^data:image\/.+;base64/.test(S)}},{key:"sanitize",value:function(S){return(0,u.sanitize)(S,["http","https","data"])?S:"//:0"}},{key:"value",value:function(S){return S.getAttribute("src")}}]),x})(c.default.Embed);v.blotName="image",v.tagName="IMG",r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var a=(function(){function y(x,_){for(var S=0;S<_.length;S++){var w=_[S];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(x,w.key,w)}}return function(x,_,S){return _&&y(x.prototype,_),S&&y(x,S),x}})(),o=function y(x,_,S){x===null&&(x=Function.prototype);var w=Object.getOwnPropertyDescriptor(x,_);if(w===void 0){var N=Object.getPrototypeOf(x);return N===null?void 0:y(N,_,S)}else{if("value"in w)return w.value;var k=w.get;return k===void 0?void 0:k.call(S)}},l=i(4),c=i(27),u=f(c);function f(y){return y&&y.__esModule?y:{default:y}}function d(y,x){if(!(y instanceof x))throw new TypeError("Cannot call a class as a function")}function p(y,x){if(!y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x&&(typeof x=="object"||typeof x=="function")?x:y}function m(y,x){if(typeof x!="function"&&x!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof x);y.prototype=Object.create(x&&x.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),x&&(Object.setPrototypeOf?Object.setPrototypeOf(y,x):y.__proto__=x)}var b=["height","width"],v=(function(y){m(x,y);function x(){return d(this,x),p(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}return a(x,[{key:"format",value:function(S,w){b.indexOf(S)>-1?w?this.domNode.setAttribute(S,w):this.domNode.removeAttribute(S):o(x.prototype.__proto__||Object.getPrototypeOf(x.prototype),"format",this).call(this,S,w)}}],[{key:"create",value:function(S){var w=o(x.__proto__||Object.getPrototypeOf(x),"create",this).call(this,S);return w.setAttribute("frameborder","0"),w.setAttribute("allowfullscreen",!0),w.setAttribute("src",this.sanitize(S)),w}},{key:"formats",value:function(S){return b.reduce(function(w,N){return S.hasAttribute(N)&&(w[N]=S.getAttribute(N)),w},{})}},{key:"sanitize",value:function(S){return u.default.sanitize(S)}},{key:"value",value:function(S){return S.getAttribute("src")}}]),x})(l.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",r.default=v}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var a=(function(){function S(w,N){for(var k=0;k<N.length;k++){var C=N[k];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(w,C.key,C)}}return function(w,N,k){return N&&S(w.prototype,N),k&&S(w,k),w}})(),o=function S(w,N,k){w===null&&(w=Function.prototype);var C=Object.getOwnPropertyDescriptor(w,N);if(C===void 0){var P=Object.getPrototypeOf(w);return P===null?void 0:S(P,N,k)}else{if("value"in C)return C.value;var L=C.get;return L===void 0?void 0:L.call(k)}},l=i(35),c=m(l),u=i(5),f=m(u),d=i(9),p=m(d);function m(S){return S&&S.__esModule?S:{default:S}}function b(S,w){if(!(S instanceof w))throw new TypeError("Cannot call a class as a function")}function v(S,w){if(!S)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w&&(typeof w=="object"||typeof w=="function")?w:S}function y(S,w){if(typeof w!="function"&&w!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof w);S.prototype=Object.create(w&&w.prototype,{constructor:{value:S,enumerable:!1,writable:!0,configurable:!0}}),w&&(Object.setPrototypeOf?Object.setPrototypeOf(S,w):S.__proto__=w)}var x=(function(S){y(w,S);function w(){return b(this,w),v(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}return a(w,null,[{key:"create",value:function(k){var C=o(w.__proto__||Object.getPrototypeOf(w),"create",this).call(this,k);return typeof k=="string"&&(window.katex.render(k,C,{throwOnError:!1,errorColor:"#f00"}),C.setAttribute("data-value",k)),C}},{key:"value",value:function(k){return k.getAttribute("data-value")}}]),w})(c.default);x.blotName="formula",x.className="ql-formula",x.tagName="SPAN";var _=(function(S){y(w,S),a(w,null,[{key:"register",value:function(){f.default.register(x,!0)}}]);function w(){b(this,w);var N=v(this,(w.__proto__||Object.getPrototypeOf(w)).call(this));if(window.katex==null)throw new Error("Formula module requires KaTeX.");return N}return w})(p.default);r.FormulaBlot=x,r.default=_}),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.CodeToken=r.CodeBlock=void 0;var a=(function(){function k(C,P){for(var L=0;L<P.length;L++){var T=P[L];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(C,T.key,T)}}return function(C,P,L){return P&&k(C.prototype,P),L&&k(C,L),C}})(),o=function k(C,P,L){C===null&&(C=Function.prototype);var T=Object.getOwnPropertyDescriptor(C,P);if(T===void 0){var A=Object.getPrototypeOf(C);return A===null?void 0:k(A,P,L)}else{if("value"in T)return T.value;var R=T.get;return R===void 0?void 0:R.call(L)}},l=i(0),c=v(l),u=i(5),f=v(u),d=i(9),p=v(d),m=i(13),b=v(m);function v(k){return k&&k.__esModule?k:{default:k}}function y(k,C){if(!(k instanceof C))throw new TypeError("Cannot call a class as a function")}function x(k,C){if(!k)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return C&&(typeof C=="object"||typeof C=="function")?C:k}function _(k,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof C);k.prototype=Object.create(C&&C.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}),C&&(Object.setPrototypeOf?Object.setPrototypeOf(k,C):k.__proto__=C)}var S=(function(k){_(C,k);function C(){return y(this,C),x(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}return a(C,[{key:"replaceWith",value:function(L){this.domNode.textContent=this.domNode.textContent,this.attach(),o(C.prototype.__proto__||Object.getPrototypeOf(C.prototype),"replaceWith",this).call(this,L)}},{key:"highlight",value:function(L){var T=this.domNode.textContent;this.cachedText!==T&&((T.trim().length>0||this.cachedText==null)&&(this.domNode.innerHTML=L(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),C})(b.default);S.className="ql-syntax";var w=new c.default.Attributor.Class("token","hljs",{scope:c.default.Scope.INLINE}),N=(function(k){_(C,k),a(C,null,[{key:"register",value:function(){f.default.register(w,!0),f.default.register(S,!0)}}]);function C(P,L){y(this,C);var T=x(this,(C.__proto__||Object.getPrototypeOf(C)).call(this,P,L));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var A=null;return T.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(A),A=setTimeout(function(){T.highlight(),A=null},T.options.interval)}),T.highlight(),T}return a(C,[{key:"highlight",value:function(){var L=this;if(!this.quill.selection.composing){this.quill.update(f.default.sources.USER);var T=this.quill.getSelection();
770this.quill.scroll.descendants(S).forEach(function(A){A.highlight(L.options.highlight)}),this.quill.update(f.default.sources.SILENT),T!=null&&this.quill.setSelection(T,f.default.sources.SILENT)}}}]),C})(p.default);N.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(k){var C=window.hljs.highlightAuto(k);return C.value}})(),interval:1e3},r.CodeBlock=S,r.CodeToken=w,r.default=N}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=13 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=9 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=14 x2=4 y1=14 y2=14></line> <line class=ql-stroke x1=12 x2=6 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=5 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=9 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=15 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=15 x2=3 y1=14 y2=14></line> <line class=ql-stroke x1=15 x2=3 y1=4 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <g class="ql-fill ql-color-label"> <polygon points="6 6.868 6 6 5 6 5 7 5.942 7 6 6.868"></polygon> <rect height=1 width=1 x=4 y=4></rect> <polygon points="6.817 5 6 5 6 6 6.38 6 6.817 5"></polygon> <rect height=1 width=1 x=2 y=6></rect> <rect height=1 width=1 x=3 y=5></rect> <rect height=1 width=1 x=4 y=7></rect> <polygon points="4 11.439 4 11 3 11 3 12 3.755 12 4 11.439"></polygon> <rect height=1 width=1 x=2 y=12></rect> <rect height=1 width=1 x=2 y=9></rect> <rect height=1 width=1 x=2 y=15></rect> <polygon points="4.63 10 4 10 4 11 4.192 11 4.63 10"></polygon> <rect height=1 width=1 x=3 y=8></rect> <path d=M10.832,4.2L11,4.582V4H10.708A1.948,1.948,0,0,1,10.832,4.2Z></path> <path d=M7,4.582L7.168,4.2A1.929,1.929,0,0,1,7.292,4H7V4.582Z></path> <path d=M8,13H7.683l-0.351.8a1.933,1.933,0,0,1-.124.2H8V13Z></path> <rect height=1 width=1 x=12 y=2></rect> <rect height=1 width=1 x=11 y=3></rect> <path d=M9,3H8V3.282A1.985,1.985,0,0,1,9,3Z></path> <rect height=1 width=1 x=2 y=3></rect> <rect height=1 width=1 x=6 y=2></rect> <rect height=1 width=1 x=3 y=2></rect> <rect height=1 width=1 x=5 y=3></rect> <rect height=1 width=1 x=9 y=2></rect> <rect height=1 width=1 x=15 y=14></rect> <polygon points="13.447 10.174 13.469 10.225 13.472 10.232 13.808 11 14 11 14 10 13.37 10 13.447 10.174"></polygon> <rect height=1 width=1 x=13 y=7></rect> <rect height=1 width=1 x=15 y=5></rect> <rect height=1 width=1 x=14 y=6></rect> <rect height=1 width=1 x=15 y=8></rect> <rect height=1 width=1 x=14 y=9></rect> <path d=M3.775,14H3v1H4V14.314A1.97,1.97,0,0,1,3.775,14Z></path> <rect height=1 width=1 x=14 y=3></rect> <polygon points="12 6.868 12 6 11.62 6 12 6.868"></polygon> <rect height=1 width=1 x=15 y=2></rect> <rect height=1 width=1 x=12 y=5></rect> <rect height=1 width=1 x=13 y=4></rect> <polygon points="12.933 9 13 9 13 8 12.495 8 12.933 9"></polygon> <rect height=1 width=1 x=9 y=14></rect> <rect height=1 width=1 x=8 y=15></rect> <path d=M6,14.926V15H7V14.316A1.993,1.993,0,0,1,6,14.926Z></path> <rect height=1 width=1 x=5 y=15></rect> <path d=M10.668,13.8L10.317,13H10v1h0.792A1.947,1.947,0,0,1,10.668,13.8Z></path> <rect height=1 width=1 x=11 y=15></rect> <path d=M14.332,12.2a1.99,1.99,0,0,1,.166.8H15V12H14.245Z></path> <rect height=1 width=1 x=14 y=15></rect> <rect height=1 width=1 x=15 y=11></rect> </g> <polyline class=ql-stroke points="5.5 13 9 5 12.5 13"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=11 y2=11></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class="ql-fill ql-stroke" height=3 width=3 x=4 y=5></rect> <rect class="ql-fill ql-stroke" height=3 width=3 x=11 y=5></rect> <path class="ql-even ql-fill ql-stroke" d=M7,8c0,4.031-3,5-3,5></path> <path class="ql-even ql-fill ql-stroke" d=M14,8c0,4.031-3,5-3,5></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,4H9.5A2.5,2.5,0,0,1,12,6.5v0A2.5,2.5,0,0,1,9.5,9H5A0,0,0,0,1,5,9V4A0,0,0,0,1,5,4Z></path> <path class=ql-stroke d=M5,9h5.5A2.5,2.5,0,0,1,13,11.5v0A2.5,2.5,0,0,1,10.5,14H5a0,0,0,0,1,0,0V9A0,0,0,0,1,5,9Z></path> </svg>'}),(function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=5 x2=13 y1=3 y2=3></line> <line class=ql-stroke x1=6 x2=9.35 y1=12 y2=3></line> <line class=ql-stroke x1=11 x2=15 y1=11 y2=15></line>
770 <line class=ql-stroke x1=15 x2=11 y1=11 y2=15></line> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=7 x=2 y=14></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-color-label ql-stroke ql-transparent" x1=3 x2=15 y1=15 y2=15></line> <polyline class=ql-stroke points="5.5 11 9 3 12.5 11"></polyline> <line class=ql-stroke x1=11.63 x2=6.38 y1=9 y2=9></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="3 11 5 9 3 7 3 11"></polygon> <line class="ql-stroke ql-fill" x1=15 x2=11 y1=4 y2=4></line> <path class=ql-fill d=M11,3a3,3,0,0,0,0,6h1V3H11Z></path> <rect class=ql-fill height=11 width=1 x=11 y=4></rect> <rect class=ql-fill height=11 width=1 x=13 y=4></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class="ql-stroke ql-fill" points="15 12 13 10 15 8 15 12"></polygon> <line class="ql-stroke ql-fill" x1=9 x2=5 y1=4 y2=4></line> <path class=ql-fill d=M5,3A3,3,0,0,0,5,9H6V3H5Z></path> <rect class=ql-fill height=11 width=1 x=5 y=4></rect> <rect class=ql-fill height=11 width=1 x=7 y=4></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M14,16H4a1,1,0,0,1,0-2H14A1,1,0,0,1,14,16Z /> <path class=ql-fill d=M14,4H4A1,1,0,0,1,4,2H14A1,1,0,0,1,14,4Z /> <rect class=ql-fill x=3 y=6 width=12 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M13,16H5a1,1,0,0,1,0-2h8A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H5A1,1,0,0,1,5,2h8A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=2 y=6 width=14 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15,8H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,8Z /> <path class=ql-fill d=M15,12H13a1,1,0,0,1,0-2h2A1,1,0,0,1,15,12Z /> <path class=ql-fill d=M15,16H5a1,1,0,0,1,0-2H15A1,1,0,0,1,15,16Z /> <path class=ql-fill d=M15,4H5A1,1,0,0,1,5,2H15A1,1,0,0,1,15,4Z /> <rect class=ql-fill x=2 y=6 width=8 height=6 rx=1 ry=1 /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M5,8H3A1,1,0,0,1,3,6H5A1,1,0,0,1,5,8Z /> <path class=ql-fill d=M5,12H3a1,1,0,0,1,0-2H5A1,1,0,0,1,5,12Z /> <path class=ql-fill d=M13,16H3a1,1,0,0,1,0-2H13A1,1,0,0,1,13,16Z /> <path class=ql-fill d=M13,4H3A1,1,0,0,1,3,2H13A1,1,0,0,1,13,4Z /> <rect class=ql-fill x=8 y=6 width=8 height=6 rx=1 ry=1 transform="translate(24 18) rotate(-180)"/> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M11.759,2.482a2.561,2.561,0,0,0-3.53.607A7.656,7.656,0,0,0,6.8,6.2C6.109,9.188,5.275,14.677,4.15,14.927a1.545,1.545,0,0,0-1.3-.933A0.922,0.922,0,0,0,2,15.036S1.954,16,4.119,16s3.091-2.691,3.7-5.553c0.177-.826.36-1.726,0.554-2.6L8.775,6.2c0.381-1.421.807-2.521,1.306-2.676a1.014,1.014,0,0,0,1.02.56A0.966,0.966,0,0,0,11.759,2.482Z></path> <rect class=ql-fill height=1.6 rx=0.8 ry=0.8 width=5 x=5.15 y=6.2></rect> <path class=ql-fill d=M13.663,12.027a1.662,1.662,0,0,1,.266-0.276q0.193,0.069.456,0.138a2.1,2.1,0,0,0,.535.069,1.075,1.075,0,0,0,.767-0.3,1.044,1.044,0,0,0,.314-0.8,0.84,0.84,0,0,0-.238-0.619,0.8,0.8,0,0,0-.594-0.239,1.154,1.154,0,0,0-.781.3,4.607,4.607,0,0,0-.781,1q-0.091.15-.218,0.346l-0.246.38c-0.068-.288-0.137-0.582-0.212-0.885-0.459-1.847-2.494-.984-2.941-0.8-0.482.2-.353,0.647-0.094,0.529a0.869,0.869,0,0,1,1.281.585c0.217,0.751.377,1.436,0.527,2.038a5.688,5.688,0,0,1-.362.467,2.69,2.69,0,0,1-.264.271q-0.221-.08-0.471-0.147a2.029,2.029,0,0,0-.522-0.066,1.079,1.079,0,0,0-.768.3A1.058,1.058,0,0,0,9,15.131a0.82,0.82,0,0,0,.832.852,1.134,1.134,0,0,0,.787-0.3,5.11,5.11,0,0,0,.776-0.993q0.141-.219.215-0.34c0.046-.076.122-0.194,0.223-0.346a2.786,2.786,0,0,0,.918,1.726,2.582,2.582,0,0,0,2.376-.185c0.317-.181.212-0.565,0-0.494A0.807,0.807,0,0,1,14.176,15a5.159,5.159,0,0,1-.913-2.446l0,0Q13.487,12.24,13.663,12.027Z></path> </svg>'}),(function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M10,4V14a1,1,0,0,1-2,0V10H3v4a1,1,0,0,1-2,0V4A1,1,0,0,1,3,4V8H8V4a1,1,0,0,1,2,0Zm6.06787,9.209H14.98975V7.59863a.54085.54085,0,0,0-.605-.60547h-.62744a1.01119,1.01119,0,0,0-.748.29688L11.645,8.56641a.5435.5435,0,0,0-.022.8584l.28613.30762a.53861.53861,0,0,0,.84717.0332l.09912-.08789a1.2137,1.2137,0,0,0,.2417-.35254h.02246s-.01123.30859-.01123.60547V13.209H12.041a.54085.54085,0,0,0-.605.60547v.43945a.54085.54085,0,0,0,.605.60547h4.02686a.54085.54085,0,0,0,.605-.60547v-.43945A.54085.54085,0,0,0,16.06787,13.209Z /> </svg>'}),(function(n,r){n.exports='<svg viewBox="0 0 18 18"> <path class=ql-fill d=M16.73975,13.81445v.43945a.54085.54085,0,0,1-.605.60547H11.855a.58392.58392,0,0,1-.64893-.60547V14.0127c0-2.90527,3.39941-3.42187,3.39941-4.55469a.77675.77675,0,0,0-.84717-.78125,1.17684,1.17684,0,0,0-.83594.38477c-.2749.26367-.561.374-.85791.13184l-.4292-.34082c-.30811-.24219-.38525-.51758-.1543-.81445a2.97155,2.97155,0,0,1,2.45361-1.17676,2.45393,2.45393,0,0,1,2.68408,2.40918c0,2.45312-3.1792,2.92676-3.27832,3.93848h2.79443A.54085.54085,0,0,1,16.73975,13.81445ZM9,3A.99974.99974,0,0,0,8,4V8H3V4A1,1,0,0,0,1,4V14a1,1,0,0,0,2,0V10H8v4a1,1,0,0,0,2,0V4A.99974.99974,0,0,0,9,3Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=13 y1=4 y2=4></line> <line class=ql-stroke x1=5 x2=11 y1=14 y2=14></line> <line class=ql-stroke x1=8 x2=10 y1=14 y2=4></line> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=10 width=12 x=3 y=4></rect> <circle class=ql-fill cx=6 cy=7 r=1></circle> <polyline class="ql-even ql-fill" points="5 12 5 11 7 9 8 10 11 7 13 9 13 12 5 12"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class="ql-fill ql-stroke" points="3 7 3 11 5 9 3 7"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=3 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="5 7 5 11 3 9 5 7"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=11 y1=7 y2=11></line> <path class="ql-even ql-stroke" d=M8.9,4.577a3.476,3.476,0,0,1,.36,4.679A3.476,3.476,0,0,1,4.577,8.9C3.185,7.5,2.035,6.4,4.217,4.217S7.5,3.185,8.9,4.577Z></path> <path class="ql-even ql-stroke" d=M13.423,9.1a3.476,3.476,0,0,0-4.679-.36,3.476,3.476,0,0,0,.36,4.679c1.392,1.392,2.5,2.542,4.679.36S14.815,10.5,13.423,9.1Z></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=7 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=7 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=7 x2=15 y1=14 y2=14></line> <line class="ql-stroke ql-thin" x1=2.5 x2=4.5 y1=5.5 y2=5.5></line> <path class=ql-fill d=M3.5,6A0.5,0.5,0,0,1,3,5.5V3.085l-0.276.138A0.5,0.5,0,0,1,2.053,3c-0.124-.247-0.023-0.324.224-0.447l1-.5A0.5,0.5,0,0,1,4,2.5v3A0.5,0.5,0,0,1,3.5,6Z></path> <path class="ql-stroke ql-thin" d=M4.5,10.5h-2c0-.234,1.85-1.076,1.85-2.234A0.959,0.959,0,0,0,2.5,8.156></path> <path class="ql-stroke ql-thin" d=M2.5,14.846a0.959,0.959,0,0,0,1.85-.109A0.7,0.7,0,0,0,3.75,14a0.688,0.688,0,0,0,.6-0.736,0.959,0.959,0,0,0-1.85-.109></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class=ql-stroke x1=6 x2=15 y1=4 y2=4></line> <line class=ql-stroke x1=6 x2=15 y1=9 y2=9></line> <line class=ql-stroke x1=6 x2=15 y1=14 y2=14></line> <line class=ql-stroke x1=3 x2=3 y1=4 y2=4></line> <line class=ql-stroke x1=3 x2=3 y1=9 y2=9></line> <line class=ql-stroke x1=3 x2=3 y1=14 y2=14></line> </svg>'}),(function(n,r){n.exports='<svg class="" viewbox="0 0 18 18"> <line class=ql-stroke x1=9 x2=15 y1=4 y2=4></line> <polyline class=ql-stroke points="3 4 4 5 6 3"></polyline> <line class=ql-stroke x1=9 x2=15 y1=14 y2=14></line> <polyline class=ql-stroke points="3 14 4 15 6 13"></polyline> <line class=ql-stroke x1=9 x2=15 y1=9 y2=9></line> <polyline class=ql-stroke points="3 9 4 10 6 8"></polyline> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,15H13.861a3.858,3.858,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.921,1.921,0,0,0,12.021,11.7a0.50013,0.50013,0,1,0,.957.291h0a0.914,0.914,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.076-1.16971,1.86982-1.93971,2.43082A1.45639,1.45639,0,0,0,12,15.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,15Z /> <path class=ql-fill d=M9.65,5.241a1,1,0,0,0-1.409.108L6,7.964,3.759,5.349A1,1,0,0,0,2.192,6.59178Q2.21541,6.6213,2.241,6.649L4.684,9.5,2.241,12.35A1,1,0,0,0,3.71,13.70722q0.02557-.02768.049-0.05722L6,11.036,8.241,13.65a1,1,0,1,0,1.567-1.24277Q9.78459,12.3777,9.759,12.35L7.316,9.5,9.759,6.651A1,1,0,0,0,9.65,5.241Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-fill d=M15.5,7H13.861a4.015,4.015,0,0,0,1.914-2.975,1.8,1.8,0,0,0-1.6-1.751A1.922,1.922,0,0,0,12.021,3.7a0.5,0.5,0,1,0,.957.291,0.917,0.917,0,0,1,1.053-.725,0.81,0.81,0,0,1,.744.762c0,1.077-1.164,1.925-1.934,2.486A1.423,1.423,0,0,0,12,7.5a0.5,0.5,0,0,0,.5.5h3A0.5,0.5,0,0,0,15.5,7Z /> <path class=ql-fill d=M9.651,5.241a1,1,0,0,0-1.41.108L6,7.964,3.759,5.349a1,1,0,1,0-1.519,1.3L4.683,9.5,2.241,12.35a1,1,0,1,0,1.519,1.3L6,11.036,8.241,13.65a1,1,0,0,0,1.519-1.3L7.317,9.5,9.759,6.651A1,1,0,0,0,9.651,5.241Z /> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <line class="ql-stroke ql-thin" x1=15.5 x2=2.5 y1=8.5 y2=9.5></line> <path class=ql-fill d=M9.007,8C6.542,7.791,6,7.519,6,6.5,6,5.792,7.283,5,9,5c1.571,0,2.765.679,2.969,1.309a1,1,0,0,0,1.9-.617C13.356,4.106,11.354,3,9,3,6.2,3,4,4.538,4,6.5a3.2,3.2,0,0,0,.5,1.843Z></path> <path class=ql-fill d=M8.984,10C11.457,10.208,12,10.479,12,11.5c0,0.708-1.283,1.5-3,1.5-1.571,0-2.765-.679-2.969-1.309a1,1,0,1,0-1.9.617C4.644,13.894,6.646,15,9,15c2.8,0,5-1.538,5-3.5a3.2,3.2,0,0,0-.5-1.843Z></path> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <path class=ql-stroke d=M5,3V9a4.012,4.012,0,0,0,4,4H9a4.012,4.012,0,0,0,4-4V3></path> <rect class=ql-fill height=1 rx=0.5 ry=0.5 width=12 x=3 y=15></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <rect class=ql-stroke height=12 width=12 x=3 y=3></rect> <rect class=ql-fill height=12 width=1 x=5 y=3></rect> <rect class=ql-fill height=12 width=1 x=12 y=3></rect> <rect class=ql-fill height=2 width=8 x=5 y=8></rect> <rect class=ql-fill height=1 width=3 x=3 y=5></rect> <rect class=ql-fill height=1 width=3 x=3 y=7></rect> <rect class=ql-fill height=1 width=3 x=3 y=10></rect> <rect class=ql-fill height=1 width=3 x=3 y=12></rect> <rect class=ql-fill height=1 width=3 x=12 y=5></rect> <rect class=ql-fill height=1 width=3 x=12 y=7></rect> <rect class=ql-fill height=1 width=3 x=12 y=10></rect> <rect class=ql-fill height=1 width=3 x=12 y=12></rect> </svg>'}),(function(n,r){n.exports='<svg viewbox="0 0 18 18"> <polygon class=ql-stroke points="7 11 9 13 11 11 7 11"></polygon> <polygon class=ql-stroke points="7 7 9 5 11 7 7 7"></polygon> </svg>'}
vendor: 9,131 bytes, line 770
770),(function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var a=function C(P,L,T){P===null&&(P=Function.prototype);var A=Object.getOwnPropertyDescriptor(P,L);if(A===void 0){var R=Object.getPrototypeOf(P);return R===null?void 0:C(R,L,T)}else{if("value"in A)return A.value;var I=A.get;return I===void 0?void 0:I.call(T)}},o=(function(){function C(P,L){for(var T=0;T<L.length;T++){var A=L[T];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(P,A.key,A)}}return function(P,L,T){return L&&C(P.prototype,L),T&&C(P,T),P}})(),l=i(3),c=y(l),u=i(8),f=y(u),d=i(43),p=y(d),m=i(15),b=i(41),v=y(b);function y(C){return C&&C.__esModule?C:{default:C}}function x(C,P){if(!(C instanceof P))throw new TypeError("Cannot call a class as a function")}function _(C,P){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return P&&(typeof P=="object"||typeof P=="function")?P:C}function S(C,P){if(typeof P!="function"&&P!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof P);C.prototype=Object.create(P&&P.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),P&&(Object.setPrototypeOf?Object.setPrototypeOf(C,P):C.__proto__=P)}var w=[["bold","italic","link"],[{header:1},{header:2},"blockquote"]],N=(function(C){S(P,C);function P(L,T){x(this,P),T.modules.toolbar!=null&&T.modules.toolbar.container==null&&(T.modules.toolbar.container=w);var A=_(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,L,T));return A.quill.container.classList.add("ql-bubble"),A}return o(P,[{key:"extendToolbar",value:function(T){this.tooltip=new k(this.quill,this.options.bounds),this.tooltip.root.appendChild(T.container),this.buildButtons([].slice.call(T.container.querySelectorAll("button")),v.default),this.buildPickers([].slice.call(T.container.querySelectorAll("select")),v.default)}}]),P})(p.default);N.DEFAULTS=(0,c.default)(!0,{},p.default.DEFAULTS,{modules:{toolbar:{handlers:{link:function(P){P?this.quill.theme.tooltip.edit():this.quill.format("link",!1)}}}}});var k=(function(C){S(P,C);function P(L,T){x(this,P);var A=_(this,(P.__proto__||Object.getPrototypeOf(P)).call(this,L,T));return A.quill.on(f.default.events.EDITOR_CHANGE,function(R,I,M,B){if(R===f.default.events.SELECTION_CHANGE)if(I!=null&&I.length>0&&B===f.default.sources.USER){A.show(),A.root.style.left="0px",A.root.style.width="",A.root.style.width=A.root.offsetWidth+"px";var W=A.quill.getLines(I.index,I.length);if(W.length===1)A.position(A.quill.getBounds(I));else{var G=W[W.length-1],H=A.quill.getIndex(G),K=Math.min(G.length()-1,I.index+I.length-H),$=A.quill.getBounds(new m.Range(H,K));A.position($)}}else document.activeElement!==A.textbox&&A.quill.hasFocus()&&A.hide()}),A}return o(P,[{key:"listen",value:function(){var T=this;a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(f.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var A=T.quill.getSelection();A!=null&&T.position(T.quill.getBounds(A))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var A=a(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"position",this).call(this,T),R=this.root.querySelector(".ql-tooltip-arrow");if(R.style.marginLeft="",A===0)return A;R.style.marginLeft=-1*A-R.offsetWidth/2+"px"}}]),P})(d.BaseTooltip);k.TEMPLATE=['<span class="ql-tooltip-arrow"></span>','<div class="ql-tooltip-editor">','<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">','<a class="ql-close"></a>',"</div>"].join(""),r.BubbleTooltip=k,r.default=N}),(function(n,r,i){n.exports=i(63)})]).default})})(Jg)),Jg.exports}var Qi,wL;function Lwe(){if(wL)return Qi;wL=1;var e=Qi&&Qi.__extends||(function(){var f=function(d,p){return f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,b){m.__proto__=b}||function(m,b){for(var v in b)b.hasOwnProperty(v)&&(m[v]=b[v])},f(d,p)};return function(d,p){f(d,p);function m(){this.constructor=d}d.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})(),t=Qi&&Qi.__assign||function(){return t=Object.assign||function(f){for(var d,p=1,m=arguments.length;p<m;p++){d=arguments[p];for(var b in d)Object.prototype.hasOwnProperty.call(d,b)&&(f[b]=d[b])}return f},t.apply(this,arguments)},n=Qi&&Qi.__spreadArrays||function(){for(var f=0,d=0,p=arguments.length;d<p;d++)f+=arguments[d].length;for(var m=Array(f),b=0,d=0;d<p;d++)for(var v=arguments[d],y=0,x=v.length;y<x;y++,b++)m[b]=v[y];return m},r=Qi&&Qi.__importDefault||function(f){return f&&f.__esModule?f:{default:f}},i=r(ip()),a=r(uO()),o=r(P9()),l=r(Dwe()),c=(function(f){e(d,f);function d(p){var m=f.call(this,p)||this;m.dirtyProps=["modules","formats","bounds","theme","children"],m.cleanProps=["id","className","style","placeholder","tabIndex","onChange","onChangeSelection","onFocus","onBlur","onKeyPress","onKeyDown","onKeyUp"],m.state={generation:0},m.selection=null,m.onEditorChange=function(v,y,x,_){var S,w,N,k;v==="text-change"?(w=(S=m).onEditorChangeText)===null||w===void 0||w.call(S,m.editor.root.innerHTML,y,_,m.unprivilegedEditor):v==="selection-change"&&((k=(N=m).onEditorChangeSelection)===null||k===void 0||k.call(N,y,_,m.unprivilegedEditor))};var b=m.isControlled()?p.value:p.defaultValue;return m.value=b??"",m}return d.prototype.validateProps=function(p){var m;if(i.default.Children.count(p.children)>1)throw new Error("The Quill editing area can only be composed of a single React element.");if(i.default.Children.count(p.children)){var b=i.default.Children.only(p.children);if(((m=b)===null||m===void 0?void 0:m.type)==="textarea")throw new Error("Quill does not support editing on a <textarea>. Use a <div> instead.")}if(this.lastDeltaChangeSet&&p.value===this.lastDeltaChangeSet)throw new Error("You are passing the `delta` object from the `onChange` event back as `value`. You most probably want `editor.getContents()` instead. See: https://github.com/zenoamaro/react-quill#using-deltas")},d.prototype.shouldComponentUpdate=function(p,m){var b=this,v;if(this.validateProps(p),!this.editor||this.state.generation!==m.generation)return!0;if("value"in p){var y=this.getEditorContents(),x=(v=p.value,v??"");this.isEqualValue(x,y)||this.setEditorContents(this.editor,x)}return p.readOnly!==this.props.readOnly&&this.setEditorReadOnly(this.editor,p.readOnly),n(this.cleanProps,this.dirtyProps).some(function(_){return!o.default(p[_],b.props[_])})},d.prototype.shouldComponentRegenerate=function(p){var m=this;return this.dirtyProps.some(function(b){return!o.default(p[b],m.props[b])})},d.prototype.componentDidMount=function(){this.instantiateEditor(),this.setEditorContents(this.editor,this.getEditorContents())},d.prototype.componentWillUnmount=function(){this.destroyEditor()},d.prototype.componentDidUpdate=function(p,m){var b=this;if(this.editor&&this.shouldComponentRegenerate(p)){var v=this.editor.getContents(),y=this.editor.getSelection();this.regenerationSnapshot={delta:v,selection:y},this.setState({generation:this.state.generation+1}),this.destroyEditor()}if(this.state.generation!==m.generation){var x=this.regenerationSnapshot,v=x.delta,_=x.selection;delete this.regenerationSnapshot,this.instantiateEditor();var S=this.editor;S.setContents(v),u(function(){return b.setEditorSelection(S,_)})}},d.prototype.instantiateEditor=function(){this.editor?this.hookEditor(this.editor):this.editor=this.createEditor(this.getEditingArea(),this.getEditorConfig())},d.prototype.destroyEditor=function(){this.editor&&this.unhookEditor(this.editor)},d.prototype.isControlled=function(){return"value"in this.props},d.prototype.getEditorConfig=function(){return{bounds:this.props.bounds,formats:this.props.formats,modules:this.props.modules,placeholder:this.props.placeholder,readOnly:this.props.readOnly,scrollingContainer:this.props.scrollingContainer,tabIndex:this.props.tabIndex,theme:this.props.theme}},d.prototype.getEditor=function(){if(!this.editor)throw new Error("Accessing non-instantiated editor");return this.editor},d.prototype.createEditor=function(p,m){var b=new l.default(p,m);return m.tabIndex!=null&&this.setEditorTabIndex(b,m.tabIndex),this.hookEditor(b),b},d.prototype.hookEditor=function(p){this.unprivilegedEditor=this.makeUnprivilegedEditor(p),p.on("editor-change",this.onEditorChange)},d.prototype.unhookEditor=function(p){p.off("editor-change",this.onEditorChange)},d.prototype.getEditorContents=function(){return this.value},d.prototype.getEditorSelection=function(){return this.selection},d.prototype.isDelta=function(p){return p&&p.ops},d.prototype.isEqualValue=function(p,m){return this.isDelta(p)&&this.isDelta(m)?o.default(p.ops,m.ops):o.default(p,m)},d.prototype.setEditorContents=function(p,m){var b=this;this.value=m;var v=this.getEditorSelection();typeof m=="string"?p.setContents(p.clipboard.convert(m)):p.setContents(m),u(function(){return b.setE
770ditorSelection(p,v)})},d.prototype.setEditorSelection=function(p,m){if(this.selection=m,m){var b=p.getLength();m.index=Math.max(0,Math.min(m.index,b-1)),m.length=Math.max(0,Math.min(m.length,b-1-m.index)),p.setSelection(m)}},d.prototype.setEditorTabIndex=function(p,m){var b,v;!((v=(b=p)===null||b===void 0?void 0:b.scroll)===null||v===void 0)&&v.domNode&&(p.scroll.domNode.tabIndex=m)},d.prototype.setEditorReadOnly=function(p,m){m?p.disable():p.enable()},d.prototype.makeUnprivilegedEditor=function(p){var m=p;return{getHTML:function(){return m.root.innerHTML},getLength:m.getLength.bind(m),getText:m.getText.bind(m),getContents:m.getContents.bind(m),getSelection:m.getSelection.bind(m),getBounds:m.getBounds.bind(m)}},d.prototype.getEditingArea=function(){if(!this.editingArea)throw new Error("Instantiating on missing editing area");var p=a.default.findDOMNode(this.editingArea);if(!p)throw new Error("Cannot find element for editing area");if(p.nodeType===3)throw new Error("Editing area cannot be a text node");return p},d.prototype.renderEditingArea=function(){var p=this,m=this.props,b=m.children,v=m.preserveWhitespace,y=this.state.generation,x={key:y,ref:function(_){p.editingArea=_}};return i.default.Children.count(b)?i.default.cloneElement(i.default.Children.only(b),x):v?i.default.createElement("pre",t({},x)):i.default.createElement("div",t({},x))},d.prototype.render=function(){var p;return i.default.createElement("div",{id:this.props.id,style:this.props.style,key:this.state.generation,className:"quill "+(p=this.props.className,p??""),onKeyPress:this.props.onKeyPress,onKeyDown:this.props.onKeyDown,onKeyUp:this.props.onKeyUp},this.renderEditingArea())},d.prototype.onEditorChangeText=function(p,m,b,v){var y,x;if(this.editor){var _=this.isDelta(this.value)?v.getContents():v.getHTML();_!==this.getEditorContents()&&(this.lastDeltaChangeSet=m,this.value=_,(x=(y=this.props).onChange)===null||x===void 0||x.call(y,p,m,b,v))}},d.prototype.onEditorChangeSelection=function(p,m,b){var v,y,x,_,S,w;if(this.editor){var N=this.getEditorSelection(),k=!N&&p,C=N&&!p;o.default(p,N)||(this.selection=p,(y=(v=this.props).onChangeSelection)===null||y===void 0||y.call(v,p,m,b),k?(_=(x=this.props).onFocus)===null||_===void 0||_.call(x,p,m,b):C&&((w=(S=this.props).onBlur)===null||w===void 0||w.call(S,N,m,b)))}},d.prototype.focus=function(){this.editor&&this.editor.focus()},d.prototype.blur=function(){this.editor&&(this.selection=null,this.editor.blur())},d.displayName="React Quill",d.Quill=l.default,d.defaultProps={theme:"snow",modules:{},readOnly:!1},d})(i.default.Component);function u(f){Promise.resolve().then(f)}return Qi=c,Qi}var $we=Lwe();const Fwe=Mt($we),Bwe={toolbar:[[{header:[1,2,3,!1]}],["bold","italic","underline","strike"],[{color:[]},{background:[]}],[{list:"ordered"},{list:"bullet"}],[{align:[]}],["link"],["clean"]]};function hu({value:e,onChange:t,placeholder:n,height:r=260,modules:i}){return s.jsxs("div",{className:"rich-text-editor",children:[s.jsx("style",{children:` 771 .rich-text-editor .ql-container { min-height: ${r}px; font-size: 14px; } 772 .rich-text-editor .ql-editor { min-height: ${r}px; } 773 .rich-text-editor .ql-toolbar { border-top-left-radius: 6px; border-top-right-radius: 6px; } 774 .rich-text-editor .ql-container { border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; } 775 `}),s.jsx(Fwe,{theme:"snow",value:e||"",onChange:t,placeholder:n,modules:i||Bwe})]})}const qwe=[{label:"First Name",tag:"{{first_name}}",desc:"Lead's first name"},{label:"Last Name",tag:"{{last_name}}",desc:"Lead's last name"},{label:"Full Name",tag:"{{full_name}}",desc:"Lead's full name"},{label:"Email",tag:"{{email}}",desc:"Lead's email address"},{label:"Phone",tag:"{{phone}}",desc:"Lead's phone number"},{label:"Clinic Name",tag:"{{clinic_name}}",desc:"Your clinic name"},{label:"Enquiry Type",tag:"{{enquiry_type}}",desc:"Type of enquiry"},{label:"Lead Status",tag:"{{status}}",desc:"Current pipeline status"},{label:"Notes",tag:"{{notes}}",desc:"Lead notes"},{label:"Submission Date",tag:"{{submission_date}}",desc:"Date of assessment"},{label:"Portal URL",tag:"{{portal_url}}",desc:"Link to the portal"}],_L=["General","Automated - AI Symptoms Checker","Leads","Assessment Results","Follow Up","Booking","Other"],G_={name:"",category:"General",subject:"",body_html:"",is_active:!0};function Uwe(){const{toast:e}=ui(),[t,n]=E.useState([]),[r,i]=E.useState(null),[a,o]=E.useState(G_),[l,c]=E.useState(!1),[u,f]=E.useState(null),d=E.useRef(null);E.useEffect(()=>{p()},[]);const p=async()=>{const S=await ve.entities.EmailTemplate.list("-updated_date",100);n(S||[])},m=()=>{i(null),o(G_)},b=S=>{i(S.id),o({name:S.name||"",category:S.category||"General",subject:S.subject||"",body_html:S.body_html||"",is_active:S.is_active!==!1})},v=async()=>
775{if(!a.name||!a.subject){e({title:"Missing fields",description:"Name and subject are required.",variant:"destructive"});return}c(!0);try{r?(await ve.entities.EmailTemplate.update(r,a),e({title:"Saved",description:"Template updated."})):(await ve.entities.EmailTemplate.create(a),e({title:"Created",description:"Template created."})),await p()}finally{c(!1)}},y=async()=>{r&&confirm("Delete this template?")&&(await ve.entities.EmailTemplate.delete(r),i(null),o(G_),await p(),e({title:"Deleted"}))},x=S=>{const w=document.activeElement;if(w&&w===d.current){const N=w.selectionStart,k=w.selectionEnd,C=a.subject||"",P=C.substring(0,N)+S+C.substring(k);o(L=>({...L,subject:P})),setTimeout(()=>{w.selectionStart=N+S.length,w.selectionEnd=N+S.length,w.focus()},0);return}o(N=>({...N,body_html:(N.body_html||"")+S})),navigator.clipboard.writeText(S).catch(()=>{}),f(S),setTimeout(()=>f(null),2e3),e({title:"Inserted",description:`${S} added to body and copied to clipboard.`})},_=_L.reduce((S,w)=>(S[w]=t.filter(N=>(N.category||"General")===w),S),{});return s.jsxs("div",{className:"min-h-screen bg-gray-50",children:[s.jsxs("div",{className:"border-b bg-white px-6 py-4 flex items-center justify-between",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-xl font-bold text-slate-900",children:"Email Templates"}),s.jsx("p",{className:"text-sm text-slate-500",children:"Create and manage reusable email templates with merge fields"})]}),s.jsxs(be,{onClick:m,className:"bg-[#006e74] hover:bg-[#005a60]",children:[s.jsx(ir,{className:"w-4 h-4 mr-2"}),"New Template"]})]}),s.jsxs("div",{className:"flex h-[calc(100vh-73px)]",children:[s.jsxs("div",{className:"w-64 flex-shrink-0 border-r bg-white overflow-y-auto",children:[Object.entries(_).map(([S,w])=>w.length===0?null:s.jsxs("div",{children:[s.jsx("div",{className:"px-4 py-2 text-xs font-semibold text-slate-400 uppercase tracking-wider bg-gray-50 border-b",children:S}),w.map(N=>s.jsxs("button",{onClick:()=>b(N),className:`w-full text-left px-4 py-3 border-b hover:bg-gray-50 transition-colors ${r===N.id?"bg-teal-50 border-l-4 border-l-[#006e74]":""}`,children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hn,{className:"w-3.5 h-3.5 text-[#006e74] flex-shrink-0"}),s.jsx("span",{className:"text-sm font-medium text-slate-700 truncate",children:N.name})]}),!N.is_active&&s.jsx(Rt,{variant:"outline",className:"text-xs mt-1",children:"Inactive"})]},N.id))]},S)),t.length===0&&s.jsx("div",{className:"p-6 text-center text-sm text-slate-400",children:"No templates yet. Create one to get started."})]}),s.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:s.jsxs("div",{className:"max-w-2xl space-y-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h2",{className:"text-lg font-semibold text-slate-800",children:r?"Edit Template":"New Template"}),s.jsxs("div",{className:"flex gap-2",children:[r&&s.jsxs(be,{variant:"outline",size:"sm",onClick:y,className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:[s.jsx(Na,{className:"w-4 h-4 mr-1"}),"Delete"]}),s.jsxs(be,{size:"sm",onClick:v,disabled:l,className:"bg-[#006e74] hover:bg-[#005a60]",children:[s.jsx(tv,{className:"w-4 h-4 mr-1"}),l?"Saving...":"Save Template"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Template Name *"}),s.jsx(Te,{value:a.name,onChange:S=>o(w=>({...w,name:S.target.value})),placeholder:"e.g. Lead Follow Up",className:"mt-1"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Category"}),s.jsx("select",{value:a.category,onChange:S=>o(w=>({...w,category:S.target.value})),className:"mt-1 w-full h-9 rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm",children:_L.map(S=>s.jsx("option",{value:S,children:S},S))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Subject Line *"}),s.jsx(Te,{ref:d,value:a.subject,onChange:S=>o(w=>({...w,subject:S.target.value})),placeholder:"e.g. Following up on your enquiry, {{first_name}}",className:"mt-1"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Click a merge field on the right to insert it at cursor position"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Email Body"}),s.jsx("div",{className:"mt-1",children:s.jsx(hu,{value:a.body_html,onChange:S=>o(w=>
775({...w,body_html:S})),placeholder:"Hi {{first_name}}, ...",height:320})}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Format your email with the toolbar. Click a merge field on the right to insert it into the body."})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",id:"is_active",checked:a.is_active,onChange:S=>o(w=>({...w,is_active:S.target.checked})),className:"accent-[#006e74]"}),s.jsx(Ee,{htmlFor:"is_active",children:"Active (visible in template picker)"})]})]})}),s.jsxs("div",{className:"w-60 flex-shrink-0 border-l bg-white overflow-y-auto p-4",children:[s.jsx("p",{className:"text-sm font-semibold text-slate-700 mb-1",children:"Merge Fields"}),s.jsx("p",{className:"text-xs text-slate-400 mb-4",children:"Click a field to insert at cursor, or copy to clipboard."}),s.jsx("div",{className:"space-y-2",children:qwe.map(S=>s.jsx("button",{onClick:()=>x(S.tag),className:"w-full text-left group",children:s.jsxs("div",{className:"flex items-center justify-between px-3 py-2 rounded-md border border-slate-200 hover:border-[#006e74] hover:bg-teal-50 transition-colors",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-xs font-semibold text-[#006e74] font-mono",children:S.tag}),s.jsx("div",{className:"text-xs text-slate-500",children:S.desc})]}),u===S.tag?s.jsx(Hr,{className:"w-3.5 h-3.5 text-green-500"}):s.jsx(lp,{className:"w-3.5 h-3.5 text-slate-300 group-hover:text-[#006e74]"})]})},S.tag))})]})]})]})}function SL(){const{slug:e}=ote(),t=mr(),[n,r]=E.useState(null);return E.useEffect(()=>{(async()=>{if(!e){r("No clinic specified");return}try{const a=await ve.entities.Clinic.filter({slug:e,is_active:!0});if(!a||a.length===0){r(`No active clinic found for "${e}"`);return}const o=a[0],l=new URLSearchParams(window.location.search);l.set("slug",o.slug||e),l.set("clinic_id",o.id),t(`/assessment?${l.toString()}`,{replace:!0})}catch{r("Failed to load clinic. Please try again.")}})()},[e,t]),n?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:s.jsxs("div",{className:"text-center max-w-md px-6",children:[s.jsx(sp,{className:"w-12 h-12 text-red-500 mx-auto mb-4"}),s.jsx("h2",{className:"text-xl font-semibold text-slate-800 mb-2",children:"Clinic Not Found"}),s.jsx("p",{className:"text-slate-600",children:n})]})}):s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Qt,{className:"w-10 h-10 animate-spin text-[#006e74] mx-auto mb-4"}),s.jsx("p",{className:"text-slate-600",children:"Loading clinic..."})]})})}function zwe({locations:e=[],value:t={location_slugs:[],primary_location_slug:""},onChange:n,disabled:r=!1}){const i=Array.isArray(t==null?void 0:t.location_slugs)?t.location_slugs:[],a=(t==null?void 0:t.primary_location_slug)||"";E.useEffect(()=>{if(!r&&e.length===1){const u=e[0].slug;(!i.includes(u)||a!==u)&&(n==null||n({location_slugs:[u],primary_location_slug:u}))}},[e.length]),E.useMemo(()=>Object.fromEntries(e.map(u=>[u.slug,u.name])),[e]);const o=u=>{if(r)return;const f=i.includes(u);let d=f?i.filter(m=>m!==u):[...i,u],p=a;!f&&!p&&(p=u),f&&a===u&&(p=d[0]||""),n==null||n({location_slugs:d,primary_location_slug:p})},l=u=>{r||i.includes(u)&&(n==null||n({location_slugs:i,primary_location_slug:u}))};if(e.length===0)return s.jsx("div",{className:"text-xs text-slate-400 py-2",children:"No clinic locations defined yet. Add locations in Clinic Details."});const c=e.length>1&&i.length>1;return s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block",children:"Clinic Locations"}),s.jsx("p",{className:"text-[11px] text-slate-500 mb-2",children:e.length===1?"This team member is at the only clinic location (set as their main location).":"Tick each location this team member works at. Click the star to set their main location."}),s.jsx("div",{className:"space-y-1.5",children:e.map(u=>{const f=i.includes(u.slug),d=a===u.slug;return s.jsxs("div",{className:`flex items-center gap-3 px-3 py-2 rounded-md border text-sm ${f?"bg-teal-50 border-teal-200":"bg-white border-slate-200"}`,children:[s.jsx("input",{type:"checkbox",checked:f,onChange:()=>o(u.slug),disabled:r,className:"accent-[#006e74]"}),s.jsx(Li,{className:"w-3.5 h-3.5 text-slate-400 flex-none"}),s.jsx("span",{className:"flex-1 truncate text-slate-800",children:u.name}),d&&s.jsxs(Rt,{className:"text-[10px] bg-teal-100 text-teal-700 border-0 gap-1",children:[s.jsx(vR,{className:"w-3 h-3 fill-current"})," Main"]}),!d&&f&&!r&&s.jsxs("button",{type:"button",onClick:()=>l(u.slug),className:"text-[11px] text-slate-500 hover:text-[#006e74] inline-flex items-center gap-1",title:"Make this their main location",children:[s.jsx(vR,{className:"w-3 h-3"})," Set main"]})]},u.slug)})}),c&&!a&&s.jsx("p",{className:"text-[11px] text-amber-600 mt-2",children:"Please choose a main location."})]})}const jL=[{value:"practitioner",label:"Practitioner"},{value:"admin",label:"Clinic Admin"}];function Av({open:e,onOpenChange:t,member:n,clinicId:r,allClinics:i,onSaved:a,readOnly:o}){var H,K;const{toast:l}=ui(),[c,u]=E.useState(!1),[f,d]=E.useState(!1),[p,m]=E.useState(!1),[b,v]=E.useState(""),[y,x]=E.useState(!1),[_,S]=E.useState(null),[w,N]=E.useState({first_name:"",last_name:"",email:"",ph
775one:"",job_title:"",role:"practitioner",profile_image_url:"",is_active:!0,clinic_id:r,additional_clinic_ids:[],notes:"",location_slugs:[],primary_location_slug:""});E.useEffect(()=>{ve.auth.me().then($=>S($)).catch(()=>{})},[]),E.useEffect(()=>{N(n?{first_name:n.first_name||"",last_name:n.last_name||"",email:n.email||"",phone:n.phone||"",job_title:n.job_title||"",role:n.role||"practitioner",profile_image_url:n.profile_image_url||"",is_active:n.is_active!==!1,clinic_id:n.clinic_id||r,additional_clinic_ids:n.additional_clinic_ids||[],notes:n.notes||"",location_slugs:Array.isArray(n.location_slugs)?n.location_slugs:[],primary_location_slug:n.primary_location_slug||""}:{first_name:"",last_name:"",email:"",phone:"",job_title:"",role:"practitioner",profile_image_url:"",is_active:!0,clinic_id:r,additional_clinic_ids:[],notes:"",location_slugs:[],primary_location_slug:""})},[n,r]);const[k,C]=E.useState(null);E.useEffect(()=>{const $=w.clinic_id||r;if(!$){C(null);return}const F=i==null?void 0:i.find(z=>z.id===$);if(F){C(F);return}ve.entities.Clinic.filter({id:$}).then(z=>C((z==null?void 0:z[0])||null)).catch(()=>{})},[w.clinic_id,r,i]);const P=async $=>{var z;const F=(z=$.target.files)==null?void 0:z[0];if(F){m(!0);try{const{file_url:U}=await ve.integrations.Core.UploadFile({file:F});N(ee=>({...ee,profile_image_url:U}))}finally{m(!1)}}},L=async($=!1)=>{var z;if(!w.first_name||!w.last_name||!w.email){l({title:"Required fields missing",variant:"destructive"});return}if((((z=k==null?void 0:k.locations)==null?void 0:z.length)||0)>1&&(w.location_slugs||[]).length>1&&!w.primary_location_slug){l({title:"Please choose a main clinic location",variant:"destructive"});return}u(!0);try{let U=n;n?await ve.entities.TeamMember.update(n.id,w):U=await ve.entities.TeamMember.create(w),$?(await T(w.email,(U==null?void 0:U.id)||null),l({title:n?"Team member updated & invite sent":"Team member added & invite sent"})):l({title:n?"Team member updated":"Team member added"}),a()}finally{u(!1)}},T=async($,F)=>{const z=i.find(U=>U.id===r);await ve.functions.invoke("sendClinicInviteEmail",{email:$,clinicId:r,clinicName:(z==null?void 0:z.name)||"the clinic",teamMemberId:F||(n==null?void 0:n.id),teamMemberRole:w.role||(n==null?void 0:n.role)||"practitioner"})},A=async()=>{if(w.email){d(!0);try{await T(w.email,n==null?void 0:n.id),n&&await ve.entities.TeamMember.update(n.id,{invite_sent_date:new Date().toISOString()}),l({title:"Invite sent",description:`Invitation sent to ${w.email}`})}catch($){l({title:"Failed to send invite",description:$.message,variant:"destructive"})}finally{d(!1)}}},R=$=>{N(F=>({...F,additional_clinic_ids:(F.additional_clinic_ids||[]).filter(z=>z!==$)}))},I=$=>{$===w.clinic_id||(w.additional_clinic_ids||[]).includes($)||(N(F=>({...F,additional_clinic_ids:[...F.additional_clinic_ids||[],$]})),v(""),x(!1))},M=(_==null?void 0:_.role)==="admin"&&!(_!=null&&_.clinic_id),B=[w.clinic_id,...w.additional_clinic_ids||[]],W=i.filter($=>!B.includes($.id)&&$.name.toLowerCase().includes(b.toLowerCase())),G=$=>{var F;return((F=i.find(z=>z.id===$))==null?void 0:F.name)||$};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[s.jsx(En,{children:s.jsx(kn,{children:n?o?"View Team Member":"Edit Team Member":"Add Team Member"})}),s.jsxs("div",{className:"space-y-4 mt-2",children:[n&&s.jsxs("div",{className:"flex items-center justify-between p-3 rounded-lg bg-slate-50 border",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[n.linked_user_id?s.jsxs(s.Fragment,{children:[s.jsx(Iy,{className:"w-4 h-4 text-green-500"}),s.jsx("span",{className:"text-green-700 font-medium",children:"Linked to app account"})]}):s.jsxs(s.Fragment,{children:[s.jsx(Ty,{className:"w-4 h-4 text-amber-400"}),s.jsx("span",{className:"text-amber-700",children:"Not yet signed up"})]}),n.invite_sent_date&&s.jsxs("span",{className:"text-xs text-slate-400 ml-2",children:["Invite sent ",new Date(n.invite_sent_date).toLocaleDateString()]})]}),!o&&s.jsxs(be,{size:"sm",variant:"outline",onClick:A,disabled:f,className:"gap-1",children:[s.jsx(Qf,{className:"w-3.5 h-3.5"}),f?"Sending...":n.invite_sent_date?"Resend Invite":"Send Invite"]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Profile Photo"}),s.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[w.profile_image_url?s.jsx("img",{src:w.profile_image_url,alt:"",className:"w-16 h-16 rounded-full object-cover border"}):s.jsxs("div",{className:"w-16 h-16 rounded-full bg-slate-200 flex items-center justify-center text-xl font-semibold text-slate-500",children:[(H=w.first_name)==null?void 0:H[0],(K=w.last_name)==null?void 0:K[0]]}),!o&&s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer border border-dashed rounded-lg px-3 py-2 hover:bg-slate-50 transition-colors",children:[p?s.jsx(Qt,{className:"w-4 h-4 animate-spin text-slate-400"}):s.jsx(Bu,{className:"w-4 h-4 text-slate-400"}),s.jsx("span",{className:"text-sm text-slate-500",children:p?"Uploading...":"Upload photo"}),s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:P,disabled:p})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"First Name *"}),s.jsx(Te,{value:w.first_name,onChange:$=>N(F=>({...F,first_name:$.target.value})),className:"mt-1",disabled:o})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Last Name *"}),s.jsx(Te,{value:w.last_name,onChange:$=>N(F=>({...F,last_name:$.target.value})),className:"mt-1",disabled:o})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Email *"}),s.jsx(Te,{type:"email",value:w.email,onChange:$=>N(F=>({...F,email:$.target.value})),className:"mt-1",disabled:o||!!n})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Phone"}),s.jsx(Te,{value:w.phone,onChange:$=>N(F=>({...F,phone:$.target.value})),className:"mt-1",disabled:o})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Job Title"}),s.jsx(Te,{value:w.job_title,onChange:$=>N(F=>({...F,job_title:$.target.value})),className:"mt-1",disabled:o})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Role"}),s.jsxs(Et,{value:w.role,onValueChange:$=>N(F=>({...F,role:$})),disabled:o,children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{})}),s.jsxs(jt,{children:[jL.map($=>s.jsx(He,{value:$.value,children:$.label},$.value)),w.role&&!jL.some($=>$.value===w.role)&&s.jsx(He,{value:w.role,children:w.role})]})]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{type:"checkbox",id:"is_active",checked:w.is_active,onChange:$=>N(F=>({...F,is_active:$.target.checked})),className:"accent-[#006e74]",disabled:o}),s.jsx(Ee,{htmlFor:"is_active",children:"Active"})]}),M&&s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block",children:"Assigned Clinics"}),s.jsxs("div",{className:"space-y-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 rounded-md bg-teal-50 border border-teal-200 text-sm",children:[s.jsx("span",{className:"font-medium text-teal-800",children:G(w.clinic_id)}),s.jsx(Rt,{className:"text-xs bg-teal-100 text-teal-700",children:"Primary"})]}),(w.additional_clinic_ids||[]).map($=>s.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 rounded-md bg-slate-50 border text-sm",children:[s.jsx("span",{children:G($)}),!o&&s.jsx("button",{onClick:()=>R($),className:"text-red-400 hover:text-red-600",children:s.jsx(Cr,{className:"w-3.5 h-3.5"})})]},$)),!o&&s.jsxs("div",{className:"relative",children:[s.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border border-dashed rounded-md cursor-pointer hover:bg-slate-50 text-sm text-slate-500",onClick:()=>x($=>
775!$),children:[s.jsx(ir,{className:"w-3.5 h-3.5"})," Add to another clinic"]}),y&&s.jsxs("div",{className:"absolute z-10 top-full left-0 right-0 mt-1 bg-white border rounded-md shadow-lg",children:[s.jsx(Te,{autoFocus:!0,placeholder:"Search clinics...",value:b,onChange:$=>v($.target.value),className:"border-0 border-b rounded-none text-sm"}),s.jsxs("div",{className:"max-h-40 overflow-y-auto",children:[W.length===0&&s.jsx("p",{className:"text-xs text-slate-400 text-center py-3",children:"No clinics found"}),W.map($=>s.jsx("button",{onClick:()=>I($.id),className:"w-full text-left px-3 py-2 text-sm hover:bg-slate-50",children:$.name},$.id))]})]})]})]})]}),s.jsx(zwe,{locations:(k==null?void 0:k.locations)||[],value:{location_slugs:w.location_slugs,primary_location_slug:w.primary_location_slug},onChange:$=>N(F=>({...F,...$})),disabled:o}),!o&&s.jsxs("div",{children:[s.jsx(Ee,{children:"Notes"}),s.jsx(Te,{value:w.notes,onChange:$=>N(F=>({...F,notes:$.target.value})),className:"mt-1",placeholder:"Internal notes..."})]}),!o&&s.jsxs("div",{className:"flex justify-end gap-2 pt-2 flex-wrap",children:[s.jsx(be,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsx(be,{variant:"outline",onClick:()=>L(!1),disabled:c||p,children:c?"Saving...":n?"Save Changes":"Save (no invite)"}),s.jsxs(be,{onClick:()=>L(!0),disabled:c||p,className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[s.jsx(Qf,{className:"w-3.5 h-3.5"}),c?"Saving...":"Save & Send Invite"]})]}),o&&s.jsx("div",{className:"flex justify-end pt-2",children:s.jsx(be,{variant:"outline",onClick:()=>t(!1),children:"Close"})})]})]})})}var K_="rovingFocusGroup.onEntryFocus",Hwe={bubbles:!1,cancelable:!0},kp="RovingFocusGroup",[ME,T9,Wwe]=ix(kp),[Vwe,Sx]=di(kp,[Wwe]),[Gwe,Kwe]=Vwe(kp),R9=E.forwardRef((e,t)=>s.jsx(ME.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(ME.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Ywe,{...e,ref:t})})}));R9.displayName=kp;var Ywe=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=E.useRef(null),m=At(t,p),b=wp(a),[v,y]=Wr({prop:o,defaultProp:l??null,onChange:c,caller:kp}),[x,_]=E.useState(!1),S=Ia(u),w=T9(n),N=E.useRef(!1),[k,C]=E.useState(0);return E.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(K_,S),()=>P.removeEventListener(K_,S)},[S]),s.jsx(Gwe,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:v,onItemFocus:E.useCallback(P=>y(P),[y]),onItemShiftTab:E.useCallback(()=>_(!0),[]),onFocusableItemAdd:E.useCallback(()=>C(P=>P+1),[]),onFocusableItemRemove:E.useCallback(()=>C(P=>P-1),[]),children:s.jsx(ut.div,{tabIndex:x||k===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:Ge(e.onMouseDown,()=>{N.current=!0}),onFocus:Ge(e.onFocus,P=>{const L=!N.current;if(P.target===P.currentTarget&&L&&!x){const T=new CustomEvent(K_,Hwe);if(P.currentTarget.dispatchEvent(T),!T.defaultPrevented){const A=w().filter(W=>W.focusable),R=A.find(W=>W.active),I=A.find(W=>
vendor: 16,945 bytes, line 775
775W.id===v),B=[R,I,...A].filter(Boolean).map(W=>W.ref.current);D9(B,f)}}N.current=!1}),onBlur:Ge(e.onBlur,()=>_(!1))})})}),I9="RovingFocusGroupItem",M9=E.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,c=Ri(),u=a||c,f=Kwe(I9,n),d=f.currentTabStopId===u,p=T9(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return E.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),s.jsx(ME.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:s.jsx(ut.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:Ge(e.onMouseDown,y=>{r?f.onItemFocus(u):y.preventDefault()}),onFocus:Ge(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:Ge(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const x=Zwe(y,f.orientation,f.dir);if(x!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let S=p().filter(w=>w.focusable).map(w=>w.ref.current);if(x==="last")S.reverse();else if(x==="prev"||x==="next"){x==="prev"&&S.reverse();const w=S.indexOf(y.currentTarget);S=f.loop?Jwe(S,w+1):S.slice(w+1)}setTimeout(()=>D9(S))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:v!=null}):o})})});M9.displayName=I9;var Qwe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Xwe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Zwe(e,t,n){const r=Xwe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Qwe[r]}function D9(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Jwe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var L9=R9,$9=M9,DE=["Enter"," "],e1e=["ArrowDown","PageUp","Home"],F9=["ArrowUp","PageDown","End"],t1e=[...e1e,...F9],n1e={ltr:[...DE,"ArrowRight"],rtl:[...DE,"ArrowLeft"]},r1e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Op="Menu",[mh,i1e,a1e]=ix(Op),[ql,B9]=di(Op,[a1e,td,Sx]),jx=td(),q9=Sx(),[o1e,Ul]=ql(Op),[s1e,Cp]=ql(Op),U9=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,l=jx(t),[c,u]=E.useState(null),f=E.useRef(!1),d=Ia(a),p=wp(i);return E.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),s.jsx(_C,{...l,children:s.jsx(o1e,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:s.jsx(s1e,{scope:t,onClose:E.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:o,children:r})})})};U9.displayName=Op;var l1e="MenuAnchor",nA=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=jx(n);return s.jsx(cx,{...i,...r,ref:t})});nA.displayName=l1e;var rA="MenuPortal",[c1e,z9]=ql(rA,{forceMount:void 0}),H9=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=Ul(rA,t);return s.jsx(c1e,{scope:t,forceMount:n,children:s.jsx(Bi,{present:n||a.open,children:s.jsx(vp,{asChild:!0,container:i,children:r})})})};H9.displayName=rA;var Mi="MenuContent",[u1e,iA]=ql(Mi),W9=E.forwardRef((e,t)=>{const n=z9(Mi,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ul(Mi,e.__scopeMenu),o=Cp(Mi,e.__scopeMenu);return s.jsx(mh.Provider,{scope:e.__scopeMenu,children:s.jsx(Bi,{present:r||a.open,children:s.jsx(mh.Slot,{scope:e.__scopeMenu,children:o.modal?s.jsx(d1e,{...i,ref:t}):s.jsx(f1e,{...i,ref:t})})})})}),d1e=E.forwardRef((e,t)=>{const n=Ul(Mi,e.__scopeMenu),r=E.useRef(null),i=At(t,r);return E.useEffect(()=>{const a=r.current;if(a)return Wy(a)},[]),s.jsx(aA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ge(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),f1e=E.forwardRef((e,t)=>{const n=Ul(Mi,e.__scopeMenu);return s.jsx(aA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),h1e=ms("MenuContent.ScrollLock"),aA=E.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,disableOutsideScroll:b,...v}=e,y=Ul(Mi,n),x=Cp(Mi,n),_=jx(n),S=q9(n),w=i1e(n),[N,k]=E.useState(null),C=E.useRef(null),P=At(t,C,y.onContentChange),L=E.useRef(0),T=E.useRef(""),A=E.useRef(0),R=E.useRef(null),I=E.useRef("right"),M=E.useRef(0),B=b?yp:E.Fragment,W=b?{as:h1e,allowPinchZoom:!0}:void 0,G=K=>{var Z,ie;const $=T.current+K,F=w().filter(Y=>!Y.disabled),z=document.activeElement,U=(Z=F.find(Y=>Y.ref.current===z))==null?void 0:Z.textValue,ee=F.map(Y=>Y.textValue),re=N1e(ee,$,U),X=(ie=F.find(Y=>Y.textValue===re))==null?void 0:ie.ref.current;(function Y(J){T.current=J,window.clearTimeout(L.current),J!==""&&(L.current=window.setTimeout(()=>Y(""),1e3))})($),X&&setTimeout(()=>X.focus())};E.useEffect(()=>()=>window.clearTimeout(L.current),[]),zy();const H=E.useCallback(K=>{var F,z;return I.current===((F=R.current)==null?void 0:F.side)&&k1e(K,(z=R.current)==null?void 0:z.area)},[]);return s.jsx(u1e,{scope:n,searchRef:T,onItemEnter:E.useCallback(K=>{H(K)&&K.preventDefault()},[H]),onItemLeave:E.useCallback(K=>{var $;H(K)||(($=C.current)==null||$.focus(),k(null))},[H]),onTriggerLeave:E.useCallback(K=>{H(K)&&K.preventDefault()},[H]),pointerGraceTimerRef:A,onPointerGraceIntentChange:E.useCallback(K=>{R.current=K},[]),children:s.jsx(B,{...W,children:s.jsx(gp,{asChild:!0,trapped:i,onMountAutoFocus:Ge(a,K=>{var $;K.preventDefault(),($=C.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:s.jsx(mp,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,children:s.jsx(L9,{asChild:!0,...S,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:N,onCurrentTabStopIdChange:k,onEntryFocus:Ge(c,K=>{x.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(SC,{role:"menu","aria-orientation":"vertical","data-state":sH(y.open),"data-radix-menu-content":"",dir:x.dir,..._,...v,ref:P,style:{outline:"none",...v.style},onKeyDown:Ge(v.onKeyDown,K=>{const F=K.target.closest("[data-radix-menu-content]")===K.currentTarget,z=K.ctrlKey||K.altKey||K.metaKey,U=K.key.length===1;F&&(K.key==="Tab"&&K.preventDefault(),!z&&U&&G(K.key));const ee=C.current;if(K.target!==ee||!t1e.includes(K.key))return;K.preventDefault();const X=w().filter(Z=>!Z.disabled).map(Z=>Z.ref.current);F9.includes(K.key)&&X.reverse(),S1e(X)}),onBlur:Ge(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:Ge(e.onPointerMove,gh(K=>{const $=K.target,F=M.current!==K.clientX;if(K.currentTarget.contains($)&&F){const z=K.clientX>M.current?"right":"left";I.current=z,M.current=K.clientX}}))})})})})})})});W9.displayName=Mi;var p1e="MenuGroup",oA=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(ut.div,{role:"group",...r,ref:t})});oA.displayName=p1e;var m1e="MenuLabel",V9=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(ut.div,{...r,ref:t})});V9.displayName=m1e;var Pv="MenuItem",NL="menu.itemSelect",Nx=E.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=E.useRef(null),o=Cp(Pv,e.__scopeMenu),l=iA(Pv,e.__scopeMenu),c=At(t,a),u=E.useRef(!1),f=()=>{const d=a.current;if(!n&&d){const p=new CustomEvent(NL,{bubbles:!0,cancelable:!0});d.addEventListener(NL,m=>r==null?void 0:r(m),{once:!0}),h8(d,p),p.defaultPrevented?u.current=!1:o.onClose()}};return s.jsx(G9,{...i,ref:c,disabled:n,onClick:Ge(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),u.current=!0},onPointerUp:Ge(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:Ge(e.onKeyDown,d=>{const p=l.searchRef.current!=="";n||p&&d.key===" "||DE.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Nx.displayName=Pv;var G9=E.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=iA(Pv,n),l=q9(n),c=E.useRef(null),u=At(t,c),[f,d]=E.useState(!1),[p,m]=E.useState("");return E.useEffect(()=>{const b=c.current;b&&m((b.textContent??"").trim())},[a.children]),s.jsx(mh.ItemSlot,{scope:n,disabled:r,textValue:i??p,children:s.jsx($9,{asChild:!0,...l,focusable:!r,children:s.jsx(ut.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:Ge(e.onPointerMove,gh(b=>{r?o.onItemLeave(b):(o.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ge(e.onPointerLeave,gh(b=>o.onItemLeave(b))),onFocus:Ge(e.onFocus,()=>d(!0)),onBlur:Ge(e.onBlur,()=>d(!1))})})})}),g1e="MenuCheckboxItem",K9=E.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return s.jsx(J9,{scope:e.__scopeMenu,checked:n,children:s.jsx(Nx,{role:"menuitemcheckbox","aria-checked":Tv(n)?"mixed":n,...i,ref:t,"data-state":lA(n),onSelect:Ge(i.onSelect,()=>r==null?void 0:r(Tv(n)?!0:!n),{checkForDefaultPrevented:!1})})})});K9.displayName=g1e;var Y9="MenuRadioGroup",[v1e,y1e]=ql(Y9,{value:void 0,onValueChange:()=>{}}),Q9=E.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=Ia(r);return s.jsx(v1e,{scope:e.__scopeMenu,value:n,onValueChange:a,children:s.jsx(oA,{...i,ref:t})})});Q9.displayName=Y9;var X9="MenuRadioItem",Z9=E.forwardRef((e,t)=>{const{value:n,...r}=e,i=y1e(X9,e.__scopeMenu),a=n===i.value;return s.jsx(J9,{scope:e.__scopeMenu,checked:a,children:s.jsx(Nx,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":lA(a),onSelect:Ge(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});Z9.displayName=X9;var sA="MenuItemIndicator",[J9,x1e]=ql(sA,{checked:!1}),eH=E.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=x1e(sA,n);return s.jsx(Bi,{present:r||Tv(a.checked)||a.checked===!0,children:s.jsx(ut.span,{...i,ref:t,"data-state":lA(a.checked)})})});eH.displayName=sA;var b1e="MenuSeparator",tH=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return s.jsx(ut.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});tH.displayName=b1e;var w1e="MenuArrow",nH=E.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=jx(n);return s.jsx(jC,{...i,...r,ref:t})});nH.displayName=w1e;var _1e="MenuSub",[m3e,rH]=ql(_1e),Pf="MenuSubTrigger",iH=E.forwardRef((e,t)=>{const n=Ul(Pf,e.__scopeMenu),r=Cp(Pf,e.__scopeMenu),i=rH(Pf,e.__scopeMenu),a=iA(Pf,e.__scopeMenu),o=E.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=E.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return E.useEffect(()=>f,[f]),E.useEffect(()=>{const d=l.current;return()=>{window.clearTimeout(d),c(null)}},[l,c]),s.jsx(nA,{asChild:!0,...u,children:s.jsx(G9,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":sH(n.open),...e,ref:Uy(t,i.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ge(e.onPointerMove,gh(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:Ge(e.onPointerLeave,gh(d=>{var m,b;f();const p=(m=n.content)==null?void 0:m.getBoundingClientRect();if(p){const v=(b=n.content)==null?void 0:b.dataset.side,y=v==="right",x=y?-5:5,_=p[y?"left":"right"],S=p[y?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+x,y:d.clientY},{x:_,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x:_,y:p.bottom}],side:v}),window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:Ge(e.onKeyDown,d=>{var m;const p=a.searchRef.current!=="";e.disabled||p&&d.key===" "||n1e[r.dir].includes(d.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),d.preventDefault())})})})});iH.displayName=Pf;var aH="MenuSubContent",oH=E.forwardRef((e,t)=>{const n=z9(Mi,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=Ul(Mi,e.__scopeMenu),o=Cp(Mi,e.__scopeMenu),l=rH(aH,e.__scopeMenu),c=E.useRef(null),u=At(t,c);return s.jsx(mh.Provider,{scope:e.__scopeMenu,children:s.jsx(Bi,{present:r||a.open,children:s.jsx(mh.Slot,{scope:e.__scopeMenu,children:s.jsx(aA,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var d;o.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:Ge(e.onFocusOutside,f=>{f.target!==l.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:Ge(e.onEscapeKeyDown,f=>{o.onClose(),f.preventDefault()}),onKeyDown:Ge(e.onKeyDown,f=>{var m;const d=f.currentTarget.contains(f.target),p=r1e[o.dir].includes(f.key);d&&p&&(a.onOpenChange(!1),(m=l.trigger)==null||m.focus(),f.preventDefault())})})})})})});oH.displayName=aH;function sH(e){return e?"open":"closed"}function Tv(e){return e==="indeterminate"}function lA(e){return Tv(e)?"indeterminate":e?"checked":"unchecked"}function S1e(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function j1e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function N1e(e,t,n){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=j1e(e,Math.max(a,0));i.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return c!==n?c:void 0}function E1e(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,f=l.y,d=c.x,p=c.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(i=!i)}return i}function k1e(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return E1e(n,t)}function gh(e){return t=>t.pointerType==="mouse"?e(t):void 0}var O1e=U9,C1e=nA,A1e=H9,P1e=W9,T1e=oA,R1e=V9,I1e=Nx,M1e=K9,D1e=Q9,L1e=Z9,$1e=eH,F1e=tH,B1e=nH,q1e=iH,U1e=oH,Ex="DropdownMenu",[z1e]=di(Ex,[B9]),Ar=B9(),[H1e,lH]=z1e(Ex),cH=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:l=!0}=e,c=Ar(t),u=E.useRef(null),[f,d]=Wr({prop:i,defaultProp:a??!1,onChange:o,caller:Ex});return s.jsx(H1e,{scope:t,triggerId:Ri(),triggerRef:u,contentId:Ri(),open:f,onOpenChange:d,onOpenToggle:E.useCallback(()=>d(p=>!p),[d]),modal:l,children:s.jsx(O1e,{...c,open:f,onOpenChange:d,dir:r,modal:l,children:n})})};cH.displayName=Ex;var uH="DropdownMenuTrigger",dH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=lH(uH,n),o=Ar(n);return s.jsx(C1e,{asChild:!0,...o,children:s.jsx(ut.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Uy(t,a.triggerRef),onPointerDown:Ge(e.onPointerDown,l=>{!r&&l.button===0&&l.ctrlKey===!1&&(a.onOpenToggle(),a.open||l.preventDefault())}),onKeyDown:Ge(e.onKeyDown,l=>{r||(["Enter"," "].includes(l.key)&&a.onOpenToggle(),l.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())})})})});dH.displayName=uH;var W1e="DropdownMenuPortal",fH=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ar(t);return s.jsx(A1e,{...r,...n})};fH.displayName=W1e;var hH="DropdownMenuContent",pH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=lH(hH,n),a=Ar(n),o=E.useRef(!1);return s.jsx(P1e,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:Ge(e.onCloseAutoFocus,l=>{var c;o.current||(c=i.triggerRef.current)==null||c.focus(),o.current=!1,l.preventDefault()}),onInteractOutside:Ge(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!i.modal||f)&&(o.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)"}})});pH.displayName=hH;var V1e="DropdownMenuGroup",G1e=E.forwardRef((e,t)=>
775{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(T1e,{...i,...r,ref:t})});G1e.displayName=V1e;var K1e="DropdownMenuLabel",mH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(R1e,{...i,...r,ref:t})});mH.displayName=K1e;var Y1e="DropdownMenuItem",gH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(I1e,{...i,...r,ref:t})});gH.displayName=Y1e;var Q1e="DropdownMenuCheckboxItem",vH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(M1e,{...i,...r,ref:t})});vH.displayName=Q1e;var X1e="DropdownMenuRadioGroup",Z1e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(D1e,{...i,...r,ref:t})});Z1e.displayName=X1e;var J1e="DropdownMenuRadioItem",yH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(L1e,{...i,...r,ref:t})});yH.displayName=J1e;var e_e="DropdownMenuItemIndicator",xH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx($1e,{...i,...r,ref:t})});xH.displayName=e_e;var t_e="DropdownMenuSeparator",bH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(F1e,{...i,...r,ref:t})});bH.displayName=t_e;var n_e="DropdownMenuArrow",r_e=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(B1e,{...i,...r,ref:t})});r_e.displayName=n_e;var i_e="DropdownMenuSubTrigger",wH=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(q1e,{...i,...r,ref:t})});wH.displayName=i_e;var a_e="DropdownMenuSubContent",_H=E.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Ar(n);return s.jsx(U1e,{...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)"}})});_H.displayName=a_e;var o_e=cH,s_e=dH,l_e=fH,SH=pH,jH=mH,NH=gH,EH=vH,kH=yH,OH=xH,CH=bH,AH=wH,PH=_H;const cA=o_e,uA=s_e,c_e=E.forwardRef(({className:e,inset:t,children:n,...r},i)=>s.jsxs(AH,{ref:i,className:et("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,s.jsx(op,{className:"ml-auto"})]}));c_e.displayName=AH.displayName;const u_e=E.forwardRef(({className:e,...t},n)=>s.jsx(PH,{ref:n,className:et("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));u_e.displayName=PH.displayName;const kx=E.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(l_e,{children:s.jsx(SH,{ref:r,sideOffset:t,className:et("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-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=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));kx.displayName=SH.displayName;const lo=E.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(NH,{ref:r,className:et("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));lo.displayName=NH.displayName;const d_e=E.forwardRef(({className:e,children:t,checked:n,...r},i)=>s.jsxs(EH,{ref:i,className:et("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(OH,{children:s.jsx(Hr,{className:"h-4 w-4"})})}),t]}));d_e.displayName=EH.displayName;const f_e=E.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(kH,{ref:r,className:et("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(OH,{children:s.jsx(CX,{className:"h-2 w-2 fill-current"})})}),t]}));f_e.displayName=kH.displayName;const h_e=E.forwardRef(({className:e,inset:t,...n},r)=>s.jsx(jH,{ref:r,className:et("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));h_e.displayName=jH.displayName;const LE=E.forwardRef(({className:e,...t},n)=>s.jsx(CH,{ref:n,className:et("-mx-1 my-1 h-px bg-muted",e),...t}));LE.displayName=CH.displayName;function p_e({teamMember:e,onChanged:t}){const{toast:n}=ui(),[r,i]=E.useState(!1),[a,o]=E.useState(!1),[l,c]=E.useState(!1),u=!!(e!=null&&e.personal_gmail_email)&&!!(e!=null&&e.personal_gmail_refresh_token),f=e!=null&&e.personal_gmail_watch_expiration?new Date(e.personal_gmail_watch_expiration):null,d=!!f&&f.getTime()>Date.now(),p=async()=>{var v;if(e!=null&&e.id){c(!0);try{const y=await ve.functions.invoke("startGmailWatchForClinic",{teamMemberId:e.id});if((v=y==null?void 0:y.data)!=null&&v.error)throw new Error(y.data.error);n({title:"Real-time push enabled",description:"New replies will now arrive instantly."}),t==null||t()}catch(y){n({title:"Could not enable push",description:y==null?void 0:y.message,variant:"destructive"})}finally{c(!1)}}};E.useEffect(()=>{const v=y=>{var x;((x=y==null?void 0:y.data)==null?void 0:x.type)==="gmail-oauth"&&(y.data.success?(n({title:"Personal Gmail connected"}),t==null||t()):n({title:"Connection failed",description:"Please try again.",variant:"destructive"}),i(!1))};return window.addEventListener("message",v),()=>window.removeEventListener("message",v)}
775,[t,n]);const m=async()=>{var v,y;if(e!=null&&e.id){i(!0);try{const x=await ve.functions.invoke("gmailOAuthStart",{teamMemberId:e.id}),_=(v=x==null?void 0:x.data)==null?void 0:v.authUrl;if(!_)throw new Error(((y=x==null?void 0:x.data)==null?void 0:y.error)||"Could not start OAuth");const S=window.open(_,"_blank","width=520,height=640"),w=setInterval(()=>{(!S||S.closed)&&(clearInterval(w),setTimeout(()=>{i(!1),t==null||t()},500))},600)}catch(x){n({title:"Could not start Gmail connection",description:x==null?void 0:x.message,variant:"destructive"}),i(!1)}}},b=async()=>{if(e!=null&&e.id){o(!0);try{await ve.functions.invoke("disconnectClinicSharedGmail",{teamMemberId:e.id}),n({title:"Personal Gmail disconnected"}),t==null||t()}catch(v){n({title:"Disconnect failed",description:v==null?void 0:v.message,variant:"destructive"})}finally{o(!1)}}};return s.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hn,{className:"w-4 h-4 text-[#006e74]"}),s.jsx("div",{className:"font-semibold text-slate-800",children:"My Personal Gmail"})]}),s.jsx("p",{className:"text-xs text-slate-600",children:"Connect your own Gmail so that when you reply to a lead, the reply is sent from your personal address instead of the clinic's shared inbox. Automated emails and first-touch lead emails still come from the clinic."}),u?s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-green-200 bg-green-50 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx(oa,{className:"w-5 h-5 text-green-600 flex-none"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-slate-800 truncate",children:e.personal_gmail_email}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Connected",e.personal_gmail_connected_at?` · ${new Date(e.personal_gmail_connected_at).toLocaleDateString("en-GB")}`:""]}),s.jsx("div",{className:"mt-1 flex items-center gap-1.5 text-xs",children:d?s.jsxs(s.Fragment,{children:[s.jsx(nv,{className:"w-3 h-3 text-green-600"}),s.jsx("span",{className:"text-green-700 font-medium",children:"Real-time push active"}),s.jsxs("span",{className:"text-slate-400",children:["· renews ",f.toLocaleDateString("en-GB")]})]}):s.jsxs(s.Fragment,{children:[s.jsx(NB,{className:"w-3 h-3 text-slate-400"}),s.jsx("span",{className:"text-slate-500",children:"Push not enabled"})]})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[!d&&s.jsxs(be,{size:"sm",onClick:p,disabled:l,className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[l?s.jsx(Qt,{className:"w-3.5 h-3.5 animate-spin"}):s.jsx(nv,{className:"w-3.5 h-3.5"}),"Enable push"]}),s.jsxs(be,{variant:"outline",size:"sm",onClick:b,disabled:a,className:"gap-2",children:[a?s.jsx(Qt,{className:"w-3.5 h-3.5 animate-spin"}):s.jsx(SB,{className:"w-3.5 h-3.5"}),"Disconnect"]})]})]}):s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx(sp,{className:"w-5 h-5 text-amber-600 flex-none"}),s.jsx("div",{className:"text-sm text-slate-700",children:"No personal Gmail connected. Your replies will be sent from the clinic shared inbox."})]}),s.jsxs(be,{onClick:m,disabled:r,size:"sm",className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[r?s.jsx(Qt,{className:"w-4 h-4 animate-spin"}):s.jsx(hn,{className:"w-4 h-4"}),"Connect"]})]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-slate-50 border border-slate-200 p-2.5 text-xs text-slate-600",children:[s.jsx(bB,{className:"w-3.5 h-3.5 text-slate-400 flex-none mt-0.5"}),s.jsxs("div",{children:[s.jsx("strong",{children:"How it works:"})," The first email on a lead always comes from the clinic's shared inbox. Once a conversation is started, your replies will automatically switch to your personal Gmail (if connected), so the lead can reply directly to you."]})]})]})}function m_e({open:e,onOpenChange:t,user:n,onSaved:r}){const[i,a]=E.useState({first_name:"",last_name:"",phone:"",job_title:"",profile_image_url:""}),[o,l]=E.useState(!1),[c,u]=E.useState(!1),[f,d]=E.useState(!1),[p,m]=E.useState(null),b=async()=>
775{if(!(n!=null&&n.email))return;const x=await ve.entities.TeamMember.filter({email:n.email});m((x==null?void 0:x[0])||null)};E.useEffect(()=>{!e||!n||(async()=>{l(!0);try{const x=await ve.entities.TeamMember.filter({email:n.email}),_=x==null?void 0:x[0];if(m(_||null),_)a({first_name:_.first_name||"",last_name:_.last_name||"",phone:_.phone||"",job_title:_.job_title||"",profile_image_url:_.profile_image_url||n.profile_image_url||""});else{const[S="",...w]=(n.full_name||"").split(" ");a({first_name:S,last_name:w.join(" "),phone:"",job_title:"",profile_image_url:n.profile_image_url||""})}}finally{l(!1)}})()},[e,n]);const v=async x=>{var S;const _=(S=x.target.files)==null?void 0:S[0];if(_){d(!0);try{const{file_url:w}=await ve.integrations.Core.UploadFile({file:_});a(N=>({...N,profile_image_url:w}))}finally{d(!1)}}},y=async()=>{var x;u(!0);try{const _=await ve.functions.invoke("updateMyTeamMember",i);if((x=_==null?void 0:_.data)!=null&&x.error)throw new Error(_.data.error);r==null||r(),t(!1)}catch(_){alert("Failed to save: "+(_.message||"Unknown error"))}finally{u(!1)}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[s.jsx(En,{children:s.jsx(kn,{children:"My Profile"})}),o?s.jsx("div",{className:"py-10 flex items-center justify-center text-slate-500",children:s.jsx(Qt,{className:"w-5 h-5 animate-spin"})}):s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("img",{src:i.profile_image_url||`https://ui-avatars.com/api/?name=${encodeURIComponent((i.first_name||"")+" "+(i.last_name||""))}&background=006e74&color=fff`,alt:"",className:"w-16 h-16 rounded-full object-cover"}),s.jsxs("label",{className:"inline-flex items-center gap-1.5 px-3 py-1.5 text-sm border rounded cursor-pointer hover:bg-slate-50",children:[f?s.jsx(Qt,{className:"w-4 h-4 animate-spin"}):s.jsx(Bu,{className:"w-4 h-4"}),"Upload photo",s.jsx("input",{type:"file",accept:"image/*",onChange:v,className:"hidden"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"First name"}),s.jsx(Te,{value:i.first_name,onChange:x=>a({...i,first_name:x.target.value})})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Last name"}),s.jsx(Te,{value:i.last_name,onChange:x=>a({...i,last_name:x.target.value})})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Job title"}),s.jsx(Te,{value:i.job_title,onChange:x=>a({...i,job_title:x.target.value}),placeholder:"e.g., Reception Manager"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Phone"}),s.jsx(Te,{value:i.phone,onChange:x=>a({...i,phone:x.target.value})})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Email"}),s.jsx(Te,{value:(n==null?void 0:n.email)||"",disabled:!0}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Your login email can't be changed here."})]}),p&&s.jsx(p_e,{teamMember:p,onChanged:b}),s.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[s.jsx(be,{variant:"outline",onClick:()=>t(!1),children:"Cancel"}),s.jsxs(be,{onClick:y,disabled:c,className:"bg-[#006e74] hover:bg-[#005a60]",children:[c&&s.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}),"Save"]})]})]})]})})}function ws({clinic:e}){const t=Ba(),n=mr(),[r,i]=E.useState(null),[a,o]=E.useState(null),[l,c]=E.useState(!1),[u,f]=E.useState(!1),d=E.useCallback(async()=>{try{const y=await ve.auth.me();if(i(y),y!=null&&y.email){const x=await ve.entities.TeamMember.filter({email:y.email});o((x==null?void 0:x[0])||null)}}catch{i(null)}},[]);E.useEffect(()=>{d()},[d]);const p=(r==null?void 0:r.role)==="admin"||(a==null?void 0:a.role)==="admin",m=[{label:"Dashboard",path:"/ClinicDashboard",icon:nZ},{label:"All Leads",path:"/ClinicLeads",icon:Mf},{label:"Analytics",path:"/ClinicAnalytics",icon:mB},...p?[{label:"Experiments",path:"/EmbedExperiments",icon:_N},{label:"Clinic Details",path:"/ClinicDetails",icon:hs},{label:"Team Members",path:"/ClinicTeam",icon:qu}]:[]],b=async()=>{await ve.auth.logout(),n("/")},v=y=>t.pathname===y;return s.jsxs(s.Fragment,{children:[s.jsx("header",{className:"bg-white border-b border-slate-200 sticky top-0 z-30",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 h-16 flex items-center justify-between gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx("button",{className:"md:hidden p-2 -ml-2 roun
775ded hover:bg-slate-100",onClick:()=>f(!0),"aria-label":"Open menu",children:s.jsx(hO,{className:"w-5 h-5 text-slate-600"})}),e!=null&&e.logo_url?s.jsx("img",{src:e.logo_url,alt:e==null?void 0:e.name,className:"h-8 object-contain"}):s.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#006e74] flex items-center justify-center",children:s.jsx(hs,{className:"w-4 h-4 text-white"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"font-semibold text-slate-900 text-sm truncate",children:(e==null?void 0:e.name)||"Clinic Portal"}),s.jsx("div",{className:"text-xs text-slate-400 truncate",children:"Clinic Portal"})]})]}),s.jsx("nav",{className:"hidden md:flex items-center gap-1",children:m.map(y=>{const x=y.icon;return s.jsxs(qr,{to:y.path,className:`flex items-center gap-2 px-3 py-2 rounded-md text-sm transition-colors ${v(y.path)?"text-[#006e74] font-bold":"text-slate-600 font-medium hover:bg-slate-100"}`,children:[s.jsx(x,{className:"w-4 h-4"}),y.label]},y.path)})}),s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs(cA,{children:[s.jsx(uA,{asChild:!0,children:s.jsx("button",{className:"flex items-center gap-2 p-1 rounded-full hover:bg-slate-100",children:s.jsx("img",{src:(a==null?void 0:a.profile_image_url)||(r==null?void 0:r.profile_image_url)||`https://ui-avatars.com/api/?name=${encodeURIComponent((r==null?void 0:r.full_name)||(r==null?void 0:r.email)||"U")}&background=006e74&color=fff`,alt:"",className:"w-8 h-8 rounded-full object-cover"})})}),s.jsxs(kx,{align:"end",className:"w-56",children:[s.jsxs("div",{className:"px-2 py-2",children:[s.jsx("div",{className:"text-sm font-medium text-slate-900 truncate",children:(r==null?void 0:r.full_name)||"â"}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:r==null?void 0:r.email})]}),s.jsx(LE,{}),s.jsxs(lo,{onClick:()=>c(!0),children:[s.jsx(su,{className:"w-4 h-4 mr-2"})," Edit profile"]}),s.jsx(LE,{}),s.jsxs(lo,{onClick:b,className:"text-red-600",children:[s.jsx(SN,{className:"w-4 h-4 mr-2"})," Log out"]})]})]})})]})}),s.jsx(m9,{open:u,onOpenChange:f,children:s.jsxs(HC,{side:"left",className:"p-0 w-[260px]",children:[s.jsx(WC,{className:"px-4 py-3 border-b",children:s.jsx(VC,{children:(e==null?void 0:e.name)||"Clinic Portal"})}),s.jsx("div",{className:"p-3 space-y-1",children:m.map(y=>{const x=y.icon;return s.jsxs(qr,{to:y.path,onClick:()=>f(!1),className:`flex items-center gap-2 px-3 py-2.5 rounded-md text-sm ${v(y.path)?"text-[#006e74] font-bold":"text-slate-600 font-medium hover:bg-slate-100"}`,children:[s.jsx(x,{className:"w-4 h-4"}),y.label]},y.path)})})]})}),l&&s.jsx(m_e,{open:l,onOpenChange:c,user:r,onSaved:()=>{d()}})]})}async function Ap(e){if(!e)return{clinicId:null,teamMember:null};if(e.clinic_id)return{clinicId:e.clinic_id,teamMember:null};if(e.email){const t=await ve.entities.TeamMember.filter({email:e.email}),n=(t||[]).find(r=>r.is_active!==!1)||(t==null?void 0:t[0]);if(n!=null&&n.clinic_id)return{clinicId:n.clinic_id,teamMember:n}}return{clinicId:null,teamMember:null}}function TH({analysis:e}){return e?e.is_emergency?s.jsxs(Rt,{variant:"outline",className:"gap-1 text-[10px] font-semibold bg-red-100 text-red-700 border-red-300 mt-1",children:[s.jsx(Dg,{className:"w-3 h-3"}),"Emergency"]}):e.urgent_gp_review_recommended?s.jsxs(Rt,{variant:"outline",className:"gap-1 text-[10px] font-semibold bg-amber-100 text-amber-800 border-amber-300 mt-1",children:[s.jsx(sp,{className:"w-3 h-3"}),"Urgent GP"]}):null:null}function g_e(e){const t=(e||"").toLowerCase();return t.includes("symptom")||t==="ai_symptoms_checker"?"ai":t.includes("contact")?"contact":t.includes("email")?"email":t.includes("manual")?"manual":"other"}function dA({source:e}){const t=g_e(e),r={ai:{label:"AI Form",cls:"bg-purple-100 text-purple-700 border-purple-200",Icon:vO},contact:{label:"Contact Form",cls:"bg-sky-100 text-sky-700 border-sky-200",Icon:dO},email:{label:"Email Lead",cls:"bg-amber-100 text-amber-700 border-amber-200",Icon:hn},manual:{label:"Manual",cls:"bg-slate-100 text-slate-700 border-slate-200",Icon:_Z},other:{label:e||"â",cls:"bg-slate-100 text-slate-600 border-slate-200",Icon:fO}}[t],i=r.Icon;return s.jsxs(Rt,{variant:"outline",className:`gap-1 text-xs font-medium ${r.cls}`,children:[s.jsx(i,{className:"w-3 h-3"}),r.label]})}function fA({status:e}){const n={new:{label:"New",cls:"bg-blue-100 text-blue-700 border-blue-200"},response_received:{label:"Response Received",cls:"bg-violet-100 text-violet-700 border-violet-200"},contact_made:{label:"Contact Made",cls:"bg-amber-100 text-amber-700 border-amber-200"},won:{label:"Won",cls:"bg-green-100 text-green-700 border-green-200"},lost:{label:"Lost",cls:"bg-red-100 text-red-700 border-red-200"}}[e]||{label:e||"â",cls:"bg-slate-100 text-slate-700 border-slate-200"};return s.jsx(Rt,{variant:"outline",className:`text-xs ${n.cls}`,children:n.label})}var Ox="Popover",[RH]=di(Ox,[td]),Pp=td(),[v_e,ks]=RH(Ox),IH=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,l=Pp(t),c=E.useRef(null),[u,f]=E.useState(!1),[d,p]=Wr({prop:r,defaultProp:i??!1,onChange:a,caller:Ox});return s.jsx(_C,{...l,children:s.jsx(v_e,{scope:t,contentId:Ri(),triggerRef:c,open:d,onOpenChange:p,onOpenToggle:E.useCallback(()=>p(m=>!m),[p]),hasCustomAnchor:u,onCustomAnchorAdd:E.useCallback(()=>f(!0),[]),onCustomAnchorRemove:E.useCallback(()=>f(!1),[]),modal:o,children:n})})};IH.displayName=Ox;var MH="PopoverAnchor",y_e=E.forwardRef((e,t)=>
vendor: 4,472 bytes, line 775
775{const{__scopePopover:n,...r}=e,i=ks(MH,n),a=Pp(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=i;return E.useEffect(()=>(o(),()=>l()),[o,l]),s.jsx(cx,{...a,...r,ref:t})});y_e.displayName=MH;var DH="PopoverTrigger",LH=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ks(DH,n),a=Pp(n),o=At(t,i.triggerRef),l=s.jsx(ut.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":UH(i.open),...r,ref:o,onClick:Ge(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:s.jsx(cx,{asChild:!0,...a,children:l})});LH.displayName=DH;var hA="PopoverPortal",[x_e,b_e]=RH(hA,{forceMount:void 0}),$H=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=ks(hA,t);return s.jsx(x_e,{scope:t,forceMount:n,children:s.jsx(Bi,{present:n||a.open,children:s.jsx(vp,{asChild:!0,container:i,children:r})})})};$H.displayName=hA;var pu="PopoverContent",FH=E.forwardRef((e,t)=>{const n=b_e(pu,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=ks(pu,e.__scopePopover);return s.jsx(Bi,{present:r||a.open,children:a.modal?s.jsx(__e,{...i,ref:t}):s.jsx(S_e,{...i,ref:t})})});FH.displayName=pu;var w_e=ms("PopoverContent.RemoveScroll"),__e=E.forwardRef((e,t)=>{const n=ks(pu,e.__scopePopover),r=E.useRef(null),i=At(t,r),a=E.useRef(!1);return E.useEffect(()=>{const o=r.current;if(o)return Wy(o)},[]),s.jsx(yp,{as:w_e,allowPinchZoom:!0,children:s.jsx(BH,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ge(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),a.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Ge(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Ge(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),S_e=E.forwardRef((e,t)=>{const n=ks(pu,e.__scopePopover),r=E.useRef(!1),i=E.useRef(!1);return s.jsx(BH,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),BH=E.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...d}=e,p=ks(pu,n),m=Pp(n);return zy(),s.jsx(gp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:s.jsx(mp,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:s.jsx(SC,{"data-state":UH(p.open),role:"dialog",id:p.contentId,...m,...d,ref:t,style:{...d.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)"}})})})}),qH="PopoverClose",j_e=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=ks(qH,n);return s.jsx(ut.button,{type:"button",...r,ref:t,onClick:Ge(e.onClick,()=>i.onOpenChange(!1))})});j_e.displayName=qH;var N_e="PopoverArrow",E_e=E.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Pp(n);return s.jsx(jC,{...i,...r,ref:t})});E_e.displayName=N_e;function UH(e){return e?"open":"closed"}var k_e=IH,O_e=LH,C_e=$H,zH=FH;const pA=k_e,mA=O_e,Cx=E.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},i)=>s.jsx(C_e,{children:s.jsx(zH,{ref:i,align:t,sideOffset:n,className:et("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
775de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Cx.displayName=zH.displayName;function A_e(e){return`${(e.first_name||"")[0]||""}${(e.last_name||"")[0]||""}`.toUpperCase()}function EL({member:e,size:t=28}){const n={width:t,height:t};return e!=null&&e.profile_image_url?s.jsx("img",{src:e.profile_image_url,alt:"",className:"rounded-full object-cover border border-white shadow-sm",style:n}):s.jsx("div",{className:"rounded-full bg-slate-200 text-slate-600 flex items-center justify-center font-semibold text-xs border border-white shadow-sm",style:n,children:A_e(e)||"?"})}function P_e({lead:e,teamMembers:t=[],onAssign:n,size:r="sm"}){const[i,a]=E.useState(!1),o=e==null?void 0:e.assigned_team_member_id,l=e==null?void 0:e.assigned_to_email,c=t.find(f=>f.id===o)||(l?t.find(f=>{var d;return((d=f.email)==null?void 0:d.toLowerCase())===l.toLowerCase()}):null),u=async f=>{a(!1),await(n==null?void 0:n(f))};return s.jsxs(pA,{open:i,onOpenChange:a,children:[s.jsx(mA,{asChild:!0,children:s.jsx("button",{type:"button",onClick:f=>f.stopPropagation(),className:"inline-flex items-center gap-2 text-left hover:bg-slate-50 rounded-md px-1.5 py-1 border border-transparent hover:border-slate-200 transition",children:c?s.jsxs(s.Fragment,{children:[s.jsx(EL,{member:c,size:r==="sm"?26:30}),s.jsx("span",{className:"text-sm text-slate-800 font-medium",children:c.first_name})]}):s.jsxs("span",{className:"inline-flex items-center gap-1 text-xs font-medium text-[#006e74] bg-[#006e74]/10 border border-[#006e74]/20 px-2 py-1 rounded-md",children:[s.jsx(jB,{className:"w-3 h-3"})," Assign"]})})}),s.jsx(Cx,{className:"w-64 p-1",align:"start",onClick:f=>f.stopPropagation(),children:s.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[s.jsxs("button",{type:"button",onClick:()=>u(null),className:"w-full flex items-center gap-2 px-2 py-1.5 text-xs text-slate-600 hover:bg-slate-100 rounded",children:[s.jsx("div",{className:"w-6 h-6 rounded-full border border-dashed border-slate-300"}),"Unassigned",!c&&s.jsx(Hr,{className:"w-3 h-3 ml-auto text-[#006e74]"})]}),s.jsx("div",{className:"h-px bg-slate-100 my-1"}),t.length===0&&s.jsx("div",{className:"text-xs text-slate-400 px-2 py-3 text-center",children:"No team members yet."}),t.map(f=>s.jsxs("button",{type:"button",onClick:()=>u(f),className:"w-full flex items-center gap-2 px-2 py-1.5 hover:bg-slate-100 rounded",children:[s.jsx(EL,{member:f,size:24}),s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[s.jsxs("div",{className:"text-xs font-medium text-slate-800 truncate",children:[f.first_name," ",f.last_name]}),s.jsx("div",{className:"text-[10px] text-slate-500 truncate",children:f.job_title||f.role})]}),(c==null?void 0:c.id)===f.id&&s.jsx(Hr,{className:"w-3 h-3 text-[#006e74]"})]},f.id))]})})]})}function T_e(e){return e==null||e===""?"â":Array.isArray(e)?e.length?e.join(", "):"â":typeof e=="boolean"?e?"Yes":"No":typeof e=="object"?JSON.stringify(e):String(e)}const R_e=new Set(["ai_symptoms_consent","clinic_id","clinic_location_slug","signature"]);function I_e({responses:e,questions:t}){if(!e||typeof e!="object")return s.jsx("div",{className:"text-sm text-slate-500",children:"No form responses available."});const n={};(t||[]).forEach(i=>{i!=null&&i.question_id&&(n[i.question_id]=i)});const r=Object.entries(e).filter(([i,a])=>!(R_e.has(i)||a==null||a===""||Array.isArray(a)&&a.length===0));return r.length===0?s.jsx("div",{className:"text-sm text-slate-500",children:"No form responses to display."}):s.jsx("div",{className:"divide-y divide-slate-100 border rounded-md bg-white",children:r.map(([i,a])=>{const o=n[i],l=(o==null?void 0:o.question_text)||i.replace(/_/g," ");return s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[260px_1fr] gap-1 sm:gap-4 px-4 py-3",children:[s.jsx("div",{className:"text-xs font-medium text-slate-500",children:l}),s.jsx("div",{className:"text-sm text-slate-800 whitespace-pre-wrap",children:T_e(a)})]},i)})})}function Xi({label:e,value:t}){return s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-[200px_1fr] gap-1 sm:gap-4 py-3 border-b last:border-b-0 border-slate-100",children:[s.jsx("div",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500",children:e}),s.jsx("div",{className:"text-sm text-slate-800 whitespace-pre-wrap",children:t||"â"})]})}function M_e(e){const t=(e||"").toLowerCase();return t.includes("high")?"bg-red-100 text-red-800 border-red-200":t.includes("mod")?"bg-amber-100 text-amber-800 border-amber-200":"bg-slate-100 text-slate-700 border-slate-200"}function HH({open:e,onOpenChange:t,clinicianNotes:n,pdfUrl:r,formResponses:i,intakeQuestions:a}){const o=n||{},l=o.urgent_referral_required===!0,c=o.urgent_gp_review_required===!0&&!l;return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-4xl w-[95vw] max-h-[92vh] p-0 overflow-hidden flex flex-col",children:[s.jsxs(En,{className:"px-6 py-4 border-b flex-row items-center justify-between space-y-0",children:[s.jsxs(kn,{className:"flex items-center gap-2",children:[s.jsx(Oa,{className:"w-4 h-4 text-[#006e74]"}),"Full Clinician Report"]}),s.jsxs("div",{className:"flex items-center gap-2",children:[r&&s.jsx("a",{href:r,download:!0,children:s.jsxs(be,{variant:"outline",size:"sm",className:"gap-1.5",children:[s.jsx(Fu,{className:"w-3.5 h-3.5"})," Download PDF"]})}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>t(!1),children:s.jsx(Cr,{className:"w-4 h-4"})})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[l&&s.jsx("div",{className:"mb-5 bg-red-50 border-2 border-red-400 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Dg,{className:"w-6 h-6 text-red-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-bold text-red-900 text-base mb-1",children:"URGENT â Do Not Book For Treatment"}),s.jsx("div",{className:"text-sm text-red-900",children:o.urgent_referral_instruction||"Contact patient immediately and direct them to A&E or to call 999/111."})]})]})}),c&&s.jsx("div",{className:"mb-5 bg-amber-50 border-2 border-amber-400 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Dg,{className:"w-6 h-6 text-amber-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-bold text-amber-900 text-base mb-1",children:"GP Review Recommended Before Physiotherapy"}),s.jsx("div",{className:"text-sm text-amber-900",children:o.urgent_gp_review_instruction||"Advise patient to book urgent GP appointment for bloods and systemic workup before commencing physiotherapy."})]})]})}),s.jsxs("div",{className:"bg-white rounded-md border border-slate-200 p-5",children:[s.jsx(Xi,{label:"Presenting condition",value:o.presenting_condition_overview}),s.jsx(Xi,{label:"Working diagnosis",value:o.working_diagnosis}),s.jsx(Xi,{label:"Diagnostic reasoning",value:o.diagnosis_reasoning}),Array.isArray(o.bayesian_differentials)&&o.bayesian_differentials.length>0&&s.jsx(Xi,{label:"Differential diagnoses",value:s.jsx("ul",{className:"space-y-2",children:o.bayesian_differentials.map((u,f)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx("span",{className:`text-[10px] uppercase font-semibold px-2 py-0.5 rounded border flex-shrink-0 ${M_e(u.probability)}`,children:u.probability||"Unknown"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-slate-900",children:u.diagnosis}),s.jsx("div",{className:"text-xs text-slate-600 mt-0.5",children:u.rationale})]})]},f))})}),Array.isArray(o.suggested_clinical_tests)&&o.suggested_clinical_tests.length>0&&s.jsx(Xi,{label:"Suggested clinical tests",value:s.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.suggested_clinical_tests.map((u,f)=>s.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded bg-teal-50 border border-teal-200 text-xs text-teal-900",children:u},f))})}),Array.isArray(o.psychosocial_indicators)&&o.psychosocial_indicators.length>0&&s.jsx(Xi,{label:"Psychosocial indicators",value:s.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.psychosocial_indicators.map((u,f)=>s.jsx("span",{className:"inline-flex items-center px-2 py-1 rounded bg-amber-50 border border-amber-200 text-xs text-amber-900",children:u},f))})}),s.jsx(Xi,{label:"Recommended actions",value:Array.isArray(o.recommended_actions)&&o.recommended_actions.length>0?s.jsx("ul",{className:"list-disc pl-4 space-y-1",children:o.recommended_actions.map((u,f)=>s.jsx("li",{children:u},f))}):"â"}),s.jsx(Xi,{label:"Treatment plan outline",value:o.treatment_plan_outline}),s.jsx(Xi,{label:"Recommended sessions",value:o.recommended_session_count?`${o.recommended_session_count} initial sessions${o.recommended_sessions?` (${o.recommended_sessions})`:""}`:o.recommended_sessions}),o.recommended_review_point&&s.jsx(Xi,{label:"Review point",value:o.recommended_review_point}),s.jsx(Xi,{label:"Session progression",value:o.session_progression})]}),s.jsx("div",{className:"mt-5 bg-amber-50 border border-amber-300 rounded-lg p-4",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Dg,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-sm text-amber-900 leading-relaxed",children:[s.jsx("span",{className:"font-semibold",children:"AI-generated overview only."})," This report is a clinical decision-support aid produced from the patient's self-reported answers and does ",s.jsx("span",{className:"font-semibold",children:"not replace clinical judgement"}),". Before treating, review all of the patient's responses below, consider their full history, and perform a thorough in-person physical assessment. Any differentials, suggested tests and session counts are starting points only â confirm with your own examination findings."]})]})}),i&&s.jsxs("div",{className:"mt-6",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(Rf,{className:"w-4 h-4 text-[#006e74]"}),s.jsx("div",{className:"font-semibold text-slate-800",children:"Patient's form responses"})]}),s.jsx(I_e,{responses:i,questions:a})]})]})]})})}function WH({open:e,onOpenChange:t,pdfUrl:n,title:r="Report"}){return n?s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-5xl w-[95vw] h-[90vh] p-0 overflow-hidden flex flex-col",children:[s.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b bg-slate-50",children:[s.jsx("div",{className:"font-semibold text-slate-800 text-sm truncate",children:r}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("a",{href:n,download:!0,children:s.jsxs(be,{variant:"outline",size:"sm",className:"gap-1.5",children:[s.jsx(Fu,{className:"w-3.5 h-3.5"})," Download"]})}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>t(!1),children:s.jsx(Cr,{className:"w-4 h-4"})})]})]}),s.jsx("iframe",{src:n,title:r,className:"flex-1 w-full"})]})}):null}function D_e({lead:e,onOpen:t}){const[n,r]=E.useState(null);E.useEffect(()=>{let a=!1;return(async()=>
775{if(e!=null&&e.id)try{const l=await ve.entities.LeadActivity.filter({lead_id:e.id,type:"note"},"-sent_date",50);a||r((l==null?void 0:l.length)||0)}catch{a||r(0)}})(),()=>{a=!0}},[e==null?void 0:e.id]);const i=(n||0)>0;return s.jsxs("button",{type:"button",onClick:a=>{a.stopPropagation(),t==null||t()},title:i?`${n} note${n===1?"":"s"} â click to view`:"No notes â click to add",className:`relative inline-flex items-center justify-center w-9 h-9 rounded-md border transition-colors ${i?"border-amber-200 bg-amber-50 text-amber-700 hover:bg-amber-100":"border-slate-200 bg-white text-slate-400 hover:text-slate-600 hover:bg-slate-50"}`,children:[s.jsx(Xf,{className:"w-4 h-4"}),i&&s.jsx("span",{className:"absolute -top-1.5 -right-1.5 min-w-[18px] h-[18px] px-1 rounded-full bg-[#006e74] text-white text-[10px] font-semibold flex items-center justify-center shadow",children:n>99?"99+":n})]})}function L_e({lead:e,onOpen:t}){const[n,r]=E.useState(null);E.useEffect(()=>{let a=!1;return(async()=>{if(e!=null&&e.id)try{const l=await ve.entities.LeadActivity.filter({lead_id:e.id,channel:"email"},"-sent_date",100);a||r((l==null?void 0:l.length)||0)}catch{a||r(0)}})(),()=>{a=!0}},[e==null?void 0:e.id]);const i=(n||0)>0;return s.jsxs("button",{type:"button",onClick:a=>{a.stopPropagation(),t==null||t()},title:i?`${n} email${n===1?"":"s"} â click to view conversation`:"No emails â click to start",className:`relative inline-flex items-center justify-center w-9 h-9 rounded-md border transition-colors ${i?"border-sky-200 bg-sky-50 text-sky-700 hover:bg-sky-100":"border-slate-200 bg-white text-slate-400 hover:text-slate-600 hover:bg-slate-50"}`,children:[s.jsx(hn,{className:"w-4 h-4"}),i&&s.jsx("span",{className:"absolute -top-1.5 -right-1.5 min-w-[18px] h-[18px] px-1 rounded-full bg-[#006e74] text-white text-[10px] font-semibold flex items-center justify-center shadow",children:n>99?"99+":n})]})}function $E({open:e,onOpenChange:t,lead:n,teamMembers:r=[],currentUser:i,onChanged:a}){const[o,l]=E.useState([]),[c,u]=E.useState(!1),[f,d]=E.useState(""),[p,m]=E.useState(!1),[b,v]=E.useState(null),[y,x]=E.useState(""),_=E.useCallback(async()=>{if(n!=null&&n.id){u(!0);try{const P=await ve.entities.LeadActivity.filter({lead_id:n.id,type:"note"},"-sent_date",100);l(P||[])}finally{u(!1)}}},[n==null?void 0:n.id]);E.useEffect(()=>{e&&(d(""),v(null),x(""),_())},[e,_]);const S=P=>r.find(L=>(L.email||"").toLowerCase()===(P||"").toLowerCase()),w=E.useMemo(()=>S(n==null?void 0:n.assigned_to_email),[n==null?void 0:n.assigned_to_email,r]),N=async()=>{if((f||"").replace(/<[^>]*>/g,"").trim()){m(!0);try{await ve.entities.LeadActivity.create({lead_id:n.id,type:"note",channel:"note",content:f,sent_by_email:(i==null?void 0:i.email)||"",sent_date:new Date().toISOString(),clinic_id:n.clinic_id||""}),d(""),await _(),a==null||a()}finally{m(!1)}}},k=P=>{v(P.id),x(P.content||"")},C=async P=>{if((y||"").replace(/<[^>]*>/g,"").trim()){m(!0);try{await ve.entities.LeadActivity.update(P.id,{content:y}),v(null),x(""),await _(),a==null||a()}finally{m(!1)}}};return n?s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-3xl w-[95vw] h-[90vh] p-0 overflow-hidden flex flex-col bg-white",children:[s.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Xf,{className:"w-4 h-4 text-[#006e74]"}),s.jsx("div",{className:"font-semibold text-slate-900",children:"Lead Notes"})]}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>t(!1),children:s.jsx(Cr,{className:"w-4 h-4"})})]}),s.jsxs("div",{className:"px-5 py-4 border-b bg-slate-50",children:[s.jsxs("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-lg font-bold text-slate-900 truncate",children:[n.first_name," ",n.last_name]}),s.jsxs("div",{className:"text-xs text-slate-500 flex flex-wrap gap-x-3 gap-y-1 mt-1",children:[s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(hn,{className:"w-3 h-3"})," ",n.email]}),n.phone&&s.jsxs("span",{className:"inline-flex items-center gap-1",children:[s.jsx(Ai,{className:"w-3 h-3"})," ",n.phone]})]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(dA,{source:n.source}),s.jsx(fA,{status:n.status})]})]}),s.jsxs("div",{className:"mt-3 text-xs text-slate-500",children:["Assigned to:"," ",s.jsx("span",{className:"font-medium text-slate-700",children:w?`${w.first_name} ${w.last_name}`:n.assigned_to_email||"Unassigned"})]})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-4 space-y-3",children:[c&&s.jsx("div",{className:"text-sm text-slate-400",children:"Loading notes..."}),!c&&o.length===0&&s.jsx("div",{className:"text-sm text-slate-400 text-center py-8",children:"No notes yet. Add the first one below."}),o.map(P=>{const L=S(P.sent_by_email),T=L?`${L.first_name} ${L.last_name}`.trim():P.sent_by_email||"System",A=`${((L==null?void 0:L.first_name)||"")[0]||""}${((L==null?void 0:L.last_name)||"")[0]||""}`.toUpperCase()||"â¢",R=(i==null?void 0:i.email)&&(P.sent_by_email||"").toLowerCase()===i.email.toLowerCase(),I=b===P.id;return s.jsx("div",{className:"bg-white border rounded-lg p-3",children:s.jsxs("div",{className:"flex items-start gap-3",children:[L!=null&&L.profile_image_url?s.jsx("img",{src:L.profile_image_url,alt:T,className:"w-8 h-8 rounded-full flex-none object-cover"}):s.jsx("div",{className:"w-8 h-8 rounded-full bg-[#006e74] text-white text-xs flex-none flex items-center justify-center font-semibold",children:A}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm font-semibold text-slate-800",children:T}),s.jsx("div",{className:"text-xs text-slate-400",children:P.sent_date?Vr(new Date(P.sent_date),"d MMM yyyy, HH:mm"):""})]}),R&&!I&&s.jsx("button",{onClick:()=>k(P),className:"p-1 rounded hover:bg-slate-100 text-slate-400 hover:text-slate-700",title:"Edit note",children:s.jsx(gO,{className:"w-3.5 h-3.5"})})]}),I?s.jsxs("div",{className:"mt-2 space-y-2",children:[s.jsx(hu,{value:y,onChange:x,placeholder:"Edit note...",height:140}),s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsx(be,{variant:"outline",size:"sm",onClick:()=>v(null),children:"Cancel"}),s.jsxs(be,{size:"sm",onClick:()=>C(P),disabled:p,className:"bg-[#006e74] hover:bg-[#005a60] gap-1.5",children:[s.jsx(Hr,{className:"w-3.5 h-3.5"})," Save"]})]})]}):s.jsx("div",{className:"text-sm text-slate-700 prose prose-sm max-w-none mt-1",dangerouslySetInnerHTML:{__html:P.content||""}})]})]})},P.id)})]}),s.jsxs("div",{className:"border-t bg-white px-5 py-3 space-y-2",children:[s.jsx("div",{className:"text-xs font-semibold text-slate-700",children:"Add a new note"}),s.jsx(hu,{value:f,onChange:d,placeholder:"Type an internal note...",height:120}),s.jsx("div",{className:"flex justify-end",children:s.jsx(be,{onClick:N,disabled:p||!(f||"").replace(/<[^>]*>/g,"").trim(),className:"bg-slate-900 hover:bg-slate-800 text-white",children:p?"Saving...":"Add Note"})})]})]})}):null}function $_e(e=""){if(!e)return e;const t=e.indexOf('<div style="margin-top:24px;font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#9ca3af;line-height:1;">--');if(t!==-1)return e.slice(0,t);const n=e.search(/(^|<br\s*\/?>|\n)\s*--\s( |\s|<)/i);return n!==-1?e.slice(0,n):e}function VH({open:e,onOpenChange:t,activities:n=[],threadId:r,lead:i,clinic:a,onSent:o}){const l=E.useMemo(()=>n.filter(M=>M.channel==="email").slice().sort((M,B)=>new Date(M.sent_date||0)-new Date(B.sent_date||0)),[n]),c=l.length?l[l.length-1]:null,u=r||(c==null?void 0:c.gmail_thread_id)||null,f=(c==null?void 0:c.subject)||"",d=f?f.toLowerCase().startsWith("re:")?f:`Re: ${f}`:"",[p,m]=E.useState(!1),[b,v]=E.useState(""),[y,x]=E.useState(d),[_,S]=E.useState(!1),[w,N]=E.useState(""),k=E.useRef(null);E.useEffect(()=>{e&&(m(!1),v(""),x(d),N(""))},[e,d]),E.useEffect(()=>{if(!e)return;const M=()=>{const W=k.current;W&&(W.scrollTop=W.scrollHeight)},B=[0,50,150,300,600].map(W=>
775setTimeout(M,W));return()=>B.forEach(clearTimeout)},[e,l.length]);const C=!!(a!=null&&a.shared_gmail_refresh_token&&(a!=null&&a.shared_gmail_email)),P=l.length>0,T=((i==null?void 0:i.source)||"").toLowerCase()==="contact form"?{name:`${(i==null?void 0:i.first_name)||""} ${(i==null?void 0:i.last_name)||""}`.trim()||(i==null?void 0:i.email)||"Enquirer",email:(i==null?void 0:i.email)||"",phone:(i==null?void 0:i.phone)||"",enquiryType:(i==null?void 0:i.enquiry_type)||"Website Contact Form",message:((i==null?void 0:i.notes)||"").trim(),receivedAt:(i==null?void 0:i.created_date)||null}:null,A=!!(T&&(T.message||T.email)),R=P||A,I=async()=>{var M;if(b.trim()){S(!0),N("");try{const B=await ve.functions.invoke("sendGmailAsClinic",{clinicId:a==null?void 0:a.id,to:i==null?void 0:i.email,subject:y||d||"(no subject)",htmlBody:b,leadId:i==null?void 0:i.id,threadId:u||void 0});if((M=B==null?void 0:B.data)!=null&&M.error)throw new Error(B.data.error);o==null||o(),t(!1)}catch(B){N((B==null?void 0:B.message)||"Failed to send")}finally{S(!1)}}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:`max-w-3xl w-[95vw] p-0 overflow-hidden flex flex-col bg-white ${R?"h-[92vh]":"max-h-[90vh]"}`,children:[s.jsxs("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[s.jsx("div",{className:"font-semibold text-slate-900 flex-none",children:"Email Conversation"}),s.jsx("div",{className:"flex-1 min-w-0 text-xs text-slate-500 truncate",children:i==null?void 0:i.email}),s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>t(!1),className:"flex-none",children:s.jsx(Cr,{className:"w-4 h-4"})})]}),R&&s.jsxs("div",{ref:k,className:"flex-1 overflow-y-auto bg-slate-50 px-5 py-4 space-y-3",children:[A&&s.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 shadow-sm",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3 px-4 pt-3",children:[s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[s.jsx("div",{className:"w-9 h-9 rounded-full bg-emerald-100 text-emerald-700 flex items-center justify-center flex-none",children:s.jsx(hn,{className:"w-4 h-4"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-semibold text-slate-800 truncate",children:T.name}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:T.email})]})]}),s.jsxs("div",{className:"text-right flex-none",children:[s.jsx("div",{className:"text-xs text-slate-500",children:T.receivedAt?Vr(new Date(T.receivedAt),"MMM d, HH:mm"):""}),s.jsx("div",{className:"text-xs font-medium text-emerald-600",children:"Contact Form"})]})]}),s.jsxs("div",{className:"px-4 pb-3 pt-2",children:[s.jsxs("div",{className:"text-sm text-slate-600 mb-1",children:["From: ",T.email,T.phone?s.jsxs("span",{className:"ml-2 text-slate-400",children:["· ",T.phone]}):null]}),s.jsx("div",{className:"text-sm font-semibold text-slate-800 mb-2",children:T.enquiryType}),T.message?s.jsx("div",{className:"text-sm text-slate-700 whitespace-pre-wrap",children:T.message}):s.jsx("div",{className:"text-xs text-slate-400 italic",children:"No message body submitted."})]})]}),l.map(M=>{const B=M.type==="inbound",W=B?M.from_email||"Sender":M.sent_by_email||(a==null?void 0:a.shared_gmail_email)||"Sent",G=B?M.from_email||"":M.sent_by_email||(a==null?void 0:a.shared_gmail_email)||"";return s.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 shadow-sm",children:[s.jsxs("div",{className:"flex items-start justify-between gap-3 px-4 pt-3",children:[s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[s.jsx("div",{className:"w-9 h-9 rounded-full bg-sky-100 text-sky-700 flex items-center justify-center flex-none",children:s.jsx(hn,{className:"w-4 h-4"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-semibold text-slate-800 truncate",children:W}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:G})]})]}),s.jsxs("div",{className:"text-right flex-none",children:[s.jsx("div",{className:"text-xs text-slate-500",children:M.sent_date?Vr(new Date(M.sent_date),"MMM d, HH:mm"):""}),s.jsx("div",{className:`text-xs font-medium ${B?"text-green-600":"text-sky-600"}`,children:B?"Received":"Sent"})]})]}),s.jsxs("div",{className:"px-4 pb-3 pt-2",children:[s.jsx("div",{className:"text-sm text-slate-600 mb-1",children:B?`From: ${G}`:`To: ${i==null?void 0:i.email}`}),M.subject&&s.jsx("div",{className:"text-sm font-semibold text-slate-800 mb-2",children:M.subject}),M.content&&s.jsx("div",{className:"text-sm text-slate-700 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:$_e(M.content)}})]})]},M.id)})]}),s.jsxs("div",{className:"border-t bg-white",children:[s.jsxs("button",{type:"button",onClick:()=>m(M=>!M),className:"w-full flex items-center justify-between px-5 py-2 hover:bg-slate-50 border-b",title:p?"Expand composer":"Collapse composer to see more messages",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-600",children:[s.jsx(DX,{className:"w-3.5 h-3.5"}),s.jsxs("span",{children:["Reply to ",s.jsx("span",{className:"font-medium text-slate-800",children:i==null?void 0:i.email})]}),!C&&s.jsx("span",{className:"ml-2 text-amber-600",children:"Clinic Gmail not connected"})]}),s.jsxs("div",{className:"flex items-center gap-1 text-[11px] text-slate-500",children:[p?"Expand":"Collapse",p?s.jsx(Py,{className:"w-3.5 h-3.5"}):s.jsx(Or,{className:"w-3.5 h-3.5"})]})]}),!p&&s.jsxs("div",{className:"px-5 py-3 space-y-2",children:[s.jsx(Te,{value:y,onChange:M=>x(M.target.value),placeholder:"Subject",className:"h-9"}),s.jsx(hu,{value:b,onChange:v,placeholder:"Type your message...",height:160}),w&&s.jsx("div",{className:"text-xs text-red-600",children:w}),s.jsx("div",{className:"flex justify-end",children:s.jsxs(be,{onClick:I,disabled:_||!b.trim()||!C,className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[_?s.jsx(Qt,{className:"w-4 h-4 animate-spin"}):s.jsx(Qf,{className:"w-4 h-4"}),_?"Sending...":"Send"]})})]})]})]})})}function F_e({lead:e}){if(!e)return s.jsx("span",{className:"text-xs text-slate-300",children:"â"});const t=e.created_date?new Date(e.created_date):null,n=e.last_response_date?new Date(e.last_response_date):null,r=!["won","lost"].includes(e.status),i=t?r?GI(t,{addSuffix:!1}):"Closed":"â",a=n?GI(n,{addSuffix:!0}):"â",o=t?(()=>{try{return Vr(t,"d MMM yyyy, HH:mm")}catch{return"â"}})():"â";return s.jsxs("div",{className:"text-xs leading-snug space-y-0.5 whitespace-nowrap",children:[s.jsxs("div",{className:"text-slate-600",children:[s.jsx("span",{className:"text-slate-400",children:"Created:"})," ",o]}),s.jsxs("div",{className:"text-slate-600",children:[s.jsx("span",{className:"text-slate-400",children:"Time Open:"})," ",i]}),s.jsxs("div",{className:"text-slate-600",children:[s.jsx("span",{className:"text-slate-400",children:"Our last reply:"})," ",a]})]})}function GH({open:e,onOpenChange:t,onBookAppointment:n,onJustMarkWon:r,hasBookingUrl:i}){return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-md",children:[s.jsxs(En,{children:[s.jsx(kn,{children:"Mark Lead as Won"}),s.jsx(H8,{children:"How would you like to proceed?"})]}),s.jsxs("div",{className:"space-y-3 pt-2",children:[s.jsxs("button",{type:"button",onClick:n,disabled:!i,className:"w-full flex items-start gap-3 p-4 border rounded-lg hover:border-[#006e74] hover:bg-[#006e74]/5 transition disabled:opacity-50 disabled:cursor-not-allowed text-left",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-[#006e74]/10 flex items-center justify-center shrink-0",children:s.jsx(au,{className:"w-5 h-5 text-[#006e74]"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-semibold text-slate-900",children:"Book Appointment"}),s.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:"Opens your clinic's internal booking system in a new tab and marks this lead as won."}),!i&&s.jsx("div",{className:"text-xs text-amber-600 mt-1",children:"No internal booking URL set in Clinic Details."})]})]}),s.jsxs("button",{type:"button",onClick:r,className:"w-full flex items-start gap-3 p-4 border rounded-lg hover:border-green-600 hover:bg-green-50 transition text-left",children:[s.jsx("div",{className:"w-10 h-10 rounded-full bg-green-100 flex items-center justify-center shrink-0",children:s.jsx(oa,{className:"w-5 h-5 text-green-600"})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("div",{className:"font-semibold text-slate-900",children:"Just Mark as Won"}),s.jsx("div",{className:"text-sm text-slate-500 mt-0.5",children:"Marks this lead as won without booking. Use this if the appointment was already booked externally."})]})]})]})]})})}const B_e=["Could not contact","Chose competitor","Price too high","No longer interested","Insurance issue","Other"];function KH({open:e,onOpenChange:t,onConfirm:n}){const[r,i]=E.useState(""),[a,o]=E.useState(""),l=async()=>{r&&(await(n==null?void 0:n({reason:r,note:a})),i(""),o(""),t(!1))};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-md",children:[s.jsx(En,{children:s.jsx(kn,{children:"Mark Lead as Lost"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("div",{children:s.jsxs(Et,{value:r,onValueChange:i,children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Select reason"})}),s.jsx(jt,{children:B_e.map(c=>s.jsx(He,{value:c,children:c},c))})]})}),s.jsx(dn,{rows:5,value:a,onChange:c=>o(c.target.value),placeholder:"Optional note..."}),s.jsx("div",{className:"flex justify-end",children:s.jsx(be,{onClick:l,disabled:!r,children:"Confirm"})})]})]})})}const q_e=["Duplicate lead","Test / spam submission","Not a real patient enquiry","Wrong clinic / outside service area","Existing patient â not a new lead","Other"];function YH({open:e,onOpenChange:t,onConfirm:n}){const[r,i]=E.useState(""),[a,o]=E.useState(""),l=async()=>{r&&(await(n==null?void 0:n({reason:r,note:a})),i(""),o(""),t(!1))};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-md",children:[s.jsx(En,{children:s.jsx(kn,{children:"Mark Lead as N/A"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("p",{className:"text-sm text-slate-500",children:"Use this when the lead shouldn't count towards your win/lost stats (e.g. a duplicate, spam, or test submission). A reason is required."}),s.jsx("div",{children:s.jsxs(Et,{value:r,onValueChange:i,children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Select reason"})}),s.jsx(jt,{children:q_e.map(c=>s.jsx(He,{value:c,children:c},c))})]})}),s.jsx(dn,{rows:4,value:a,onChange:c=>o(c.target.value),placeholder:"Optional note for context..."}),s.jsx("div",{className:"flex justify-end",children:s.jsx(be,{onClick:l,disabled:!r,children:"Confirm"})})]})]})})}function U_e({lead:e,clinic:t,currentUserEmail:n,onChanged:r}){const[i,a]=E.useState(!1),[o,l]=E.useState(!1),[c,u]=E.useState(!1),f=(e==null?void 0:e.status)==="won",d=(e==null?void 0:e.status)==="lost",p=async x=>{await ve.entities.LeadActivity.create({lead_id:e.id,type:"status_change",channel:"system",content:x,sent_by_email:n||"",sent_date:new Date().toISOString(),clinic_id:e.clinic_id||""})},m=async()=>{const x=t==null?void 0:t.internal_booking_url;x&&window.open(x,"_blank","noopener,noreferrer"),await ve.entities.Lead.update(e.id,{status:"won",last_contact_date:new Date().toISOString()}),await p(`Appointment booked (via internal booking link) by ${n||"staff"}`),a(!1),r==null||r()},b=async()=>{await ve.entities.Lead.update(e.id,{status:"won",last_contact_date:new Date().toISOString()}),await p(`Marked as Won by ${n||"staff"}`),a(!1),r==null||r()},v=async({reason:x,note:_})=>{await ve.entities.Lead.update(e.id,{status:"lost"}),await p(`Marked as Lost. Reason: ${x}.${_?` Note: ${_}`:""}`),r==null||r()},y=async({reason:x,note:_})=>{await ve.entities.Lead.update(e.id,{is_archived:!0}),await p(`Marked as N/A. Reason: ${x}.${_?` Note: ${_}`:""}`),r==null||r()};return f?s.jsxs("div",{className:"inline-flex items-center gap-1.5 text-xs text-green-700 bg-green-50 border border-green-200 px-2 py-1 rounded-md",children:[s.jsx(oa,{className:"w-3.5 h-3.5"})," Won"]}):d?s.jsxs("div",{className:"inline-flex items-center gap-1.5 text-xs text-red-700 bg-red-50 border border-red-200 px-2 py-1 rounded-md",children:[s.jsx(If,{className:"w-3.5 h-3.5"})," Lost"]}):s.jsxs(s.Fragment,{children:[s.jsxs(cA,{children:[s.jsx(uA,{asChild:!0,children:s.jsxs(be,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1 px-2",onClick:x=>x.stopPropagation(),children:["Set",s.jsx(Or,{className:"w-3 h-3"})]})}),s.jsxs(kx,{align:"start",className:"w-40",onClick:x=>x.stopPropagation(),children:[s.jsxs(lo,{onClick:x=>{x.stopPropagation(),a(!0)},className:"gap-2 text-green-700 focus:text-green-700 focus:bg-green-50",children:[s.jsx(oa,{className:"w-4 h-4"})," Won"]}),s.jsxs(lo,{onClick:x=>{x.stopPropagation(),l(!0)},className:"gap-2 text-red-600 focus:text-red-700 focus:bg-red-50",children:[s.jsx(If,{className:"w-4 h-4"})," Lost"]}),s.jsxs(lo,{onClick:x=>{x.stopPropagation(),u(!0)},className:"gap-2 text-slate-700 focus:bg-slate-100",children:[s.jsx(hB,{className:"w-4 h-4"})," N/A"]})]})]}),s.jsx(GH,{open:i,onOpenChange:a,hasBookingUrl:!!(t!=null&&t.internal_booking_url),onBookAppointment:m,onJustMarkWon:b}),s.jsx(KH,{open:o,onOpenChange:l,onConfirm:v}),s.jsx(YH,{open:c,onOpenChange:u,onConfirm:y})]})}function QH({leads:e=[],teamMembers:t=[],onOpenLead:n,onAssign:r,emptyMessage:i="No leads found.",showOutcome:a=!0,responsesById:o={},questions:l=[],appBaseUrl:c="",onLeadChanged:u}){var I;const[f,d]=E.useState(null),[p,m]=E.useState(null),[b,v]=E.useState(null),[y,x]=E.useState(null),[_,S]=E.useState([]),[w,N]=E.useState(null),[k,C]=E.useState(null),[P,L]=E.useState({});E.useEffect(()=>{let M=!1;return(async()=>{const B=await ve.auth.me().catch(()=>null);M||C(B)})(),()=>{M=!0}},[]),E.useEffect(()=>{const B=Array.from(new Set(e.map(G=>
775G.clinic_id).filter(Boolean))).filter(G=>!P[G]);if(B.length===0)return;let W=!1;return(async()=>{const G=await Promise.all(B.map(H=>ve.entities.Clinic.filter({id:H}).then(K=>(K==null?void 0:K[0])||null)));W||L(H=>{const K={...H};return B.forEach(($,F)=>{G[F]&&(K[$]=G[F])}),K})})(),()=>{W=!0}},[e]);const T=f?o[f.id]:null;E.useEffect(()=>{if(!y){S([]),N(null);return}let M=!1;return(async()=>{const[B,W]=await Promise.all([ve.entities.LeadActivity.filter({lead_id:y.id},"-sent_date",200),y.clinic_id?ve.entities.Clinic.filter({id:y.clinic_id}):Promise.resolve([])]);M||(S(B||[]),N((W==null?void 0:W[0])||null))})(),()=>{M=!0}},[y]);const A=E.useMemo(()=>{const M=B=>{const W=B.last_response_date||B.last_contact_date||B.created_date||null;return W?new Date(W).getTime():0};return[...e].sort((B,W)=>M(W)-M(B))},[e]),R=M=>M?`${(c||"").replace(/\/+$/,"")}/assessment?response_id=${encodeURIComponent(M)}`:null;return s.jsxs("div",{className:"bg-white border rounded-lg overflow-x-auto",children:[s.jsxs("table",{className:"min-w-full text-sm",style:{tableLayout:"fixed"},children:[s.jsxs("colgroup",{children:[s.jsx("col",{style:{width:"150px"}}),s.jsx("col",{style:{width:"240px"}}),s.jsx("col",{style:{width:"140px"}}),s.jsx("col",{style:{width:"70px"}}),s.jsx("col",{style:{width:"70px"}}),s.jsx("col",{style:{width:"200px"}}),s.jsx("col",{style:{width:"120px"}}),s.jsx("col",{style:{width:"110px"}}),s.jsx("col",{style:{width:"280px"}})]}),s.jsx("thead",{className:"bg-slate-50 border-b",children:s.jsxs("tr",{className:"text-left text-slate-500",children:[s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Team Member"}),s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Patient"}),s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Source"}),s.jsx("th",{className:"px-3 py-2.5 font-medium text-center",children:"Notes"}),s.jsx("th",{className:"px-3 py-2.5 font-medium text-center",children:"Emails"}),s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Results"}),s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Status"}),s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Outcome"}),s.jsx("th",{className:"px-3 py-2.5 font-medium",children:"Timeline"})]})}),s.jsxs("tbody",{children:[A.map(M=>{const B=o[M.id],W=(B==null?void 0:B.ai_analysis_results)||null,G=!!W,H=B!=null&&B.id?R(B.id):null,K=!!M.patient_pdf_url,$=!!H||K;return s.jsxs("tr",{className:"border-b last:border-0 hover:bg-slate-50 transition-colors align-top",children:[s.jsx("td",{className:"px-3 py-2.5",children:s.jsx(P_e,{lead:M,teamMembers:t,onAssign:F=>r==null?void 0:r(M,F)})}),s.jsxs("td",{className:"px-3 py-2.5 cursor-pointer",onClick:()=>n==null?void 0:n(M),children:[s.jsxs("div",{className:"font-medium text-slate-800 truncate",children:[M.first_name," ",M.last_name]}),s.jsx("div",{className:"text-xs text-slate-500 truncate",children:M.email}),M.phone&&s.jsx("div",{className:"text-xs text-slate-500 truncate",children:M.phone}),M.clinic_location_name&&s.jsxs("div",{className:"text-xs text-[#006e74] font-medium truncate flex items-center gap-1 mt-0.5",children:[s.jsx(Li,{className:"w-3 h-3 flex-shrink-0"}),s.jsx("span",{className:"truncate",children:M.clinic_location_name})]})]}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsxs("div",{className:"flex flex-col items-start",children:[s.jsx(dA,{source:M.source}),s.jsx(TH,{analysis:W})]})}),s.jsx("td",{className:"px-3 py-2.5 text-center",children:s.jsx(D_e,{lead:M,onOpen:()=>v(M)})}),s.jsx("td",{className:"px-3 py-2.5 text-center",children:s.jsx(L_e,{lead:M,onOpen:()=>x(M)})}),s.jsx("td",{className:"px-3 py-2.5",children:G||$?s.jsxs("div",{className:"flex flex-col gap-1.5 items-start",children:[G&&s.jsxs(be,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 w-full justify-center",onClick:()=>d(M),children:[s.jsx(Ry,{className:"w-3 h-3"})," Clinician"]}),$&&(H?s.jsx("a",{href:H,target:"_blank",rel:"noopener noreferrer",className:"w-full",children:s.jsxs(be,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 w-full justify-center",children:[s.jsx(su,{className:"w-3 h-3"})," Patient"]})}):s.jsxs(be,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 w-full justify-center",onClick:()=>m(M),children:[s.jsx(su,{className:"w-3 h-3"})," Patient"]}))]}):s.jsx("span",{className:"text-xs text-slate-300",children:"â"})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx(fA,{status:M.status})}),s.jsx("td",{className:"px-3 py-2.5",onClick:F=>F.stopPropagation(),children:s.jsx(U_e,{lead:M,clinic:P[M.clinic_id]||null,currentUserEmail:(k==null?void 0:k.email)||"",onChanged:u})}),s.jsx("td",{className:"px-3 py-2.5",children:s.jsx(F_e,{lead:M})})]},M.id)}),A.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:9,className:"px-4 py-8 text-center text-slate-400 text-sm",children:i})})]})]}),s.jsx(HH,{open:!!f,onOpenChange:M=>{M||d(null)},clinicianNotes:(I=T==null?void 0:T.ai_analysis_results)==null?void 0:I.clinician_notes,pdfUrl:f==null?void 0:f.clinician_pdf_url,formResponses:T==null?void 0:T.responses,intakeQuestions:l}),s.jsx(WH,{open:!!p,onOpenChange:M=>{M||m(null)},pdfUrl:p==null?void 0:p.patient_pdf_url,title:"Patient response PDF"}),b&&s.jsx($E,{open:!!b,onOpenChange:M=>{M||v(null)},lead:b,teamMembers:t}),y&&s.jsx(VH,{open:!!y,onOpenChange:M=>{M||x(null)},activities:_,lead:y,clinic:w,onSent:()=>x(null)})]})}var XH="Toggle",gA=E.forwardRef((e,t)=>
775{const{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,l]=Wr({prop:n,onChange:i,defaultProp:r??!1,caller:XH});return s.jsx(ut.button,{type:"button","aria-pressed":o,"data-state":o?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Ge(e.onClick,()=>{e.disabled||l(!o)})})});gA.displayName=XH;var ZH=gA,Os="ToggleGroup",[JH]=di(Os,[Sx]),eW=Sx(),vA=ne.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return s.jsx(z_e,{...i,ref:t})}if(n==="multiple"){const i=r;return s.jsx(H_e,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Os}\``)});vA.displayName=Os;var[tW,nW]=JH(Os),z_e=ne.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,l]=Wr({prop:n,defaultProp:r??"",onChange:i,caller:Os});return s.jsx(tW,{scope:e.__scopeToggleGroup,type:"single",value:ne.useMemo(()=>o?[o]:[],[o]),onItemActivate:l,onItemDeactivate:ne.useCallback(()=>l(""),[l]),children:s.jsx(rW,{...a,ref:t})})}),H_e=ne.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,l]=Wr({prop:n,defaultProp:r??[],onChange:i,caller:Os}),c=ne.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=ne.useCallback(f=>l((d=[])=>d.filter(p=>p!==f)),[l]);return s.jsx(tW,{scope:e.__scopeToggleGroup,type:"multiple",value:o,onItemActivate:c,onItemDeactivate:u,children:s.jsx(rW,{...a,ref:t})})});vA.displayName=Os;var[W_e,V_e]=JH(Os),rW=ne.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:l=!0,...c}=e,u=eW(n),f=wp(o),d={role:"group",dir:f,...c};return s.jsx(W_e,{scope:n,rovingFocus:i,disabled:r,children:i?s.jsx(L9,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(ut.div,{...d,ref:t})}):s.jsx(ut.div,{...d,ref:t})})}),Rv="ToggleGroupItem",iW=ne.forwardRef((e,t)=>{const n=nW(Rv,e.__scopeToggleGroup),r=V_e(Rv,e.__scopeToggleGroup),i=eW(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,l={...e,pressed:a,disabled:o},c=ne.useRef(null);return r.rovingFocus?s.jsx($9,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:s.jsx(kL,{...l,ref:t})}):s.jsx(kL,{...l,ref:t})});iW.displayName=Rv;var kL=ne.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,a=nW(Rv,n),o={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?o:void 0;return s.jsx(gA,{...l,...i,ref:t,onPressedChange:c=>{c?a.onItemActivate(r):a.onItemDeactivate(r)}})}),aW=vA,oW=iW;const sW=ap("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),G_e=E.forwardRef(({className:e,variant:t,size:n,...r},i)=>s.jsx(ZH,{ref:i,className:et(sW({variant:t,size:n,className:e})),...r}));G_e.displayName=ZH.displayName;const lW=E.createContext({size:"default",variant:"default"}),cW=E.forwardRef(({className:e,variant:t,size:n,children:r,...i},a)=>s.jsx(aW,{ref:a,className:et("flex items-center justify-center gap-1",e),...i,children:s.jsx(lW.Provider,{value:{variant:t,size:n},children:r})}));cW.displayName=aW.displayName;const FE=E.forwardRef(({className:e,children:t,variant:n,size:r,...i},a)=>{const o=E.useContext(lW);return s.jsx(oW,{ref:a,className:et(sW({variant:o.variant||n,size:o.size||r}),e),...i,children:t})});FE.displayName=oW.displayName;function K_e(){const e=mr(),[t]=Dy(),[n,r]=E.useState(null),[i,a]=E.useState(null),[o,l]=E.useState(null),[c,u]=E.useState([]),[f,d]=E.useState([]),[p,m]=E.useState({}),[b,v]=E.useState([]),[y,x]=E.useState(""),[_,S]=E.useState([]),[w,N]=E.useState(!0),[k,C]=E.useState(!1),[P,L]=E.useState(!1),[T,A]=E.useState(null),[R,I]=E.useState(!1),[M,B]=E.useState(null),[W,G]=E.useState(null),H=E.useCallback(async()=>{N(!0);try{const me=await ve.auth.me();r(me);let je=t.get("id")||(me==null?void 0:me.clinic_id);if(je||(je=(await Ap(me)).clinicId),!je){N(!1);return}const te=async()=>{const ge=await ve.entities.Clinic.filter({id:je});return(ge==null?void 0:ge[0])||null};let oe=await te();oe||(await new Promise(ge=>setTimeout(ge,300)),oe=await te());const[le,ye,xe,Ce]=await Promise.all([ve.entities.TeamMember.filter({clinic_id:je}),ve.entities.Lead.filter({clinic_id:je,is_archived:{$ne:!0}},"-created_date",500),(me==null?void 0:me.role)==="admin"&&!(me!=null&&me.clinic_id)?ve.entities.Clinic.list():Promise.resolve([]),ve.entities.IntakeFormQuestion.list()]);a(oe),u(le||[]),d(ye||[]),S(xe||[]),v(Ce||[]),typeof window<"u"&&x(window.location.origin);const Be=(ye||[]).filter(ge=>ge.symptoms_analysis_response_id);if(Be.length>0){const ge=Be.map(at=>at.symptoms_analysis_response_id),ke=await ve.entities.PatientFormResponse.filter({id:{$in:ge}}),De={};for(const at of ke||[]){const tt=Be.find(Ae=>Ae.symptoms_analysis_response_id===at.id);tt&&(De[tt.id]=at)}m(De)}else m({});const Re=(le||[]).find(ge=>ge.email===(me==null?void 0:me.email));l(Re||null),G(ge=>ge??((Re==null?void 0:Re.role)==="admin"?"all":"mine"))}finally{N(!1)}},[t]);E.useEffect(()=>{H()},[H]);const K=(n==null?void 0:n.app_role)==="clinic"||(n==null?void 0:n.app_role)==="team_member"||(n==null?void 0:n.app_role)==="practitioner",$=(n==null?void 0:n.role)==="admin",F=(o==null?void 0:o.role)==="admin",z=$||F,U=i==null?void 0:i.id,ee=async me=>{await ve.entities.Clinic.update(U,me),C(!1),H()},re=async(me,je)=>{const te=je?{assigned_team_member_id:je.id,assigned_to_email:je.email||null}:{assigned_team_member_id:null,assigned_to_email:null};d(oe=>oe.map(le=>le.id===me.id?{...le,...te}:le));try{await ve.entities.Lead.update(me.id,te)}catch(oe){throw d(le=>le.map(ye=>ye.id===me.id?me:ye)),oe}},X=W==="mine"&&o?f.filter(me=>!me.assigned_team_member_id||me.assigned_team_member_id===o.id||(me.assigned_to_email||"").toLowerCase()===(o.email||"").toLowerCase()):f,Z=X.filter(me=>me.status==="new"||me.status==="contact_made"||me.status==="response_received"),ie=eU(new Date),Y=X.filter(me=>me.created_date&&rE(Kg(me.created_date),ie)),J=X.filter(me=>me.status==="won").length,se=X.length,V=X.filter(me=>me.status==="new"),fe=X.filter(me=>me.status==="response_received"),ce=X.filter(me=>me.status==="contact_made");if(w)return s.jsx("div",{className:"min-h-screen flex items-center justify-center text-slate-500",children:"Loading..."});if(!i)return s.jsx("div",{className:"min-h-screen flex items-center justify-center px-6",children:s.jsxs("div",{className:"max-w-md text-center space-y-3",children:[s.jsx("p",{className:"text-slate-700 font-medium",children:"We couldn't load your clinic."}),s.jsx("p",{className:"text-slate-500 text-sm",children:"This is usually a temporary loading issue. Please try again."}),s.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[s.jsx(be,{variant:"outline",onClick:()=>H(),children:"Retry"}),s.jsx(be,{onClick:()=>window.location.reload(),className:"bg-[#006e74] hover:bg-[#005a60]",children:"Reload page"})]})]})});const Ne=s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Dashboard"}),s.jsx("p",{className:"text-slate-500 text-sm",children:"Overview of your leads across every stage"})]}),s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsxs(cW,{type:"single",value:W||"mine",onValueChange:me=>{me&&G(me)},className:"bg-slate-200 rounded-full p-1 gap-0",children:[s.jsx(FE,{value:"mine",className:"text-xs px-4 h-8 rounded-full text-slate-500 data-[state=on]:bg-white data-[state=on]:text-slate-900 data-[state=on]:shadow-sm data-[state=on]:font-semibold",children:"My Leads"}),s.jsx(FE,{value:"all",className:"text-xs px-4 h-8 rounded-full text-slate-500 data-[state=on]:bg-white data-[state=on]:text-slate-900 data-[state=on]:shadow-sm data-[state=on]:font-semibold",children:"All Leads"})]}),s.jsxs(be,{onClick:()=>I(!0),className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[s.jsx(ir,{className:"w-4 h-4"})," Add Lead"]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsx(gg,{label:"Open Leads",value:Z.length,sub:"new + response + contact",icon:s.jsx(fO,{className:"w-4 h-4 text-blue-500"})}),s.jsx(gg,{label:"Leads This Month",value:Y.length,sub:"all sources",icon:s.jsx(jN,{className:"w-4 h-4 text-teal-500"})}),s.jsx(gg,{label:"Won Leads",value:J,sub:`${se}
775 total`,icon:s.jsx(Iy,{className:"w-4 h-4 text-green-500"})}),s.jsx(gg,{label:"Win Rate",value:`${se>0?Math.round(J/se*100):0}%`,sub:"of all leads",icon:s.jsx(jN,{className:"w-4 h-4 text-purple-500"})})]}),s.jsx(Y_,{title:"New Leads",leads:V,teamMembers:c,onOpenLead:me=>e(`/LeadDetails?id=${me.id}`,{state:{from:"dashboard"}}),onAssign:re,onOpenNotes:B,responsesById:p,questions:b,appBaseUrl:y,onLeadChanged:H}),s.jsx(Y_,{title:"Response Received",leads:fe,teamMembers:c,onOpenLead:me=>e(`/LeadDetails?id=${me.id}`,{state:{from:"dashboard"}}),onAssign:re,onOpenNotes:B,responsesById:p,questions:b,appBaseUrl:y,onLeadChanged:H}),s.jsx(Y_,{title:"Contact Made",leads:ce,teamMembers:c,onOpenLead:me=>e(`/LeadDetails?id=${me.id}`,{state:{from:"dashboard"}}),onAssign:re,onOpenNotes:B,responsesById:p,questions:b,appBaseUrl:y,onLeadChanged:H})]});return K?s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[s.jsx(ws,{clinic:i}),s.jsx("div",{className:"flex-1",children:s.jsx("div",{className:"max-w-[1600px] mx-auto w-full p-6 space-y-6",children:Ne})}),k&&s.jsx(jE,{open:k,onOpenChange:C,clinic:i,onSubmit:ee,readOnly:!z}),P&&s.jsx(Av,{open:P,onOpenChange:L,member:T,clinicId:U,allClinics:_,onSaved:()=>{L(!1),H()},readOnly:!z}),s.jsx(kv,{open:R,onOpenChange:I,clinicId:U,teamMembers:c,onCreated:()=>{I(!1),H()}}),s.jsx($E,{open:!!M,onOpenChange:me=>{me||B(null)},lead:M,teamMembers:c,currentUser:n,onChanged:H})]}):s.jsxs("div",{className:"min-h-screen bg-slate-50",children:[s.jsxs("div",{className:"border-b bg-white px-6 py-4 flex items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-3 flex-1",children:[i.logo_url?s.jsx("img",{src:i.logo_url,alt:i.name,className:"h-10 object-contain"}):s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(hs,{className:"w-5 h-5 text-[#006e74]"}),s.jsx("h1",{className:"text-lg font-bold text-slate-900",children:i.name})]}),s.jsx(Rt,{variant:"outline",className:i.is_active?"text-green-700 border-green-300 bg-green-50":"text-red-700 border-red-300 bg-red-50",children:i.is_active?"Active":"Inactive"})]}),z&&s.jsx(be,{variant:"outline",size:"sm",onClick:()=>C(!0),children:"Edit Clinic"})]}),s.jsx("div",{className:"max-w-[1600px] mx-auto w-full p-6",children:Ne}),k&&s.jsx(jE,{open:k,onOpenChange:C,clinic:i,onSubmit:ee}),P&&s.jsx(Av,{open:P,onOpenChange:L,member:T,clinicId:U,allClinics:_,onSaved:()=>{L(!1),H()}}),s.jsx(kv,{open:R,onOpenChange:I,clinicId:U,teamMembers:c,onCreated:()=>{I(!1),H()}}),s.jsx($E,{open:!!M,onOpenChange:me=>{me||B(null)},lead:M,teamMembers:c,currentUser:n,onChanged:H})]})}function Y_({title:e,leads:t,teamMembers:n,onOpenLead:r,onAssign:i,onOpenNotes:a,responsesById:o,questions:l,appBaseUrl:c,onLeadChanged:u}){return s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[s.jsx("h2",{className:"text-sm font-semibold text-slate-700 uppercase tracking-wide",children:e}),s.jsxs("span",{className:"text-xs text-slate-400",children:["(",t.length,")"]})]}),s.jsx(QH,{leads:t,teamMembers:n,onOpenLead:r,onAssign:i,onOpenNotes:a,emptyMessage:`No ${e.toLowerCase()} leads.`,showOutcome:!0,responsesById:o,questions:l,appBaseUrl:c,onLeadChanged:u})]})}function gg({label:e,value:t,sub:n,icon:r}){return s.jsx(yt,{children:s.jsxs(It,{className:"pt-4 pb-4",children:[s.jsxs("div",{className:"flex items-center justify-between mb-1",children:[s.jsx("span",{className:"text-xs text-slate-500",children:e}),r]}),s.jsx("div",{className:"text-2xl font-bold text-slate-900",children:t}),n&&s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:n})]})})}var Q_,OL;function ad(){if(OL)return Q_;OL=1;var e=xo(),t=bo(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return Q_=r,Q_}var X_,CL;function yA(){if(CL)return X_;CL=1;var e=Kr(),t=ad(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return X_=i,X_}var Z_,AL;function uW(){if(AL)return Z_;AL=1;var e=QC(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],c=a.cache;if(c.has(l))return c.get(l);var u=r.apply(this,o);return a.cache=c.set(l,u)||c,u};return a.cache=new(n.Cache||e),a}return n.Cache=e,Z_=n,Z_}var J_,PL;function Y_e(){if(PL)return J_;PL=1;var e=uW(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return J_=n,J_}var eS,TL;function Q_e(){if(TL)return eS;TL=1;var e=Y_e(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];
vendor: 10,091 bytes, lines 775-783
775return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,c,u){a.push(c?u.replace(n,"$1"):l||o)}),a});return eS=r,eS}var tS,RL;function xA(){if(RL)return tS;RL=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return tS=e,tS}var nS,IL;function X_e(){if(IL)return nS;IL=1;var e=Np(),t=xA(),n=Kr(),r=ad(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return a?a.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return nS=o,nS}var rS,ML;function dW(){if(ML)return rS;ML=1;var e=X_e();function t(n){return n==null?"":e(n)}return rS=t,rS}var iS,DL;function fW(){if(DL)return iS;DL=1;var e=Kr(),t=yA(),n=Q_e(),r=dW();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return iS=i,iS}var aS,LL;function Ax(){if(LL)return aS;LL=1;var e=ad();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return aS=t,aS}var oS,$L;function bA(){if($L)return oS;$L=1;var e=fW(),t=Ax();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return oS=n,oS}var sS,FL;function hW(){if(FL)return sS;FL=1;var e=bA();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return sS=t,sS}var Z_e=hW();const ci=Mt(Z_e);var lS,BL;function J_e(){if(BL)return lS;BL=1;function e(t){return t==null}return lS=e,lS}var eSe=J_e();const wt=Mt(eSe);var cS,qL;function tSe(){if(qL)return cS;qL=1;var e=xo(),t=Kr(),n=bo(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return cS=i,cS}var nSe=tSe();const Tl=Mt(nSe);var rSe=KC();const pt=Mt(rSe);var iSe=Es();const od=Mt(iSe);var uS={exports:{}},qt={};/** 776 * @license React 777 * react-is.production.min.js 778 * 779 * Copyright (c) Facebook, Inc. and its affiliates. 780 * 781 * This source code is licensed under the MIT license found in the 782 * LICENSE file in the root directory of this source tree. 783 */var UL;function aSe(){if(UL)return qt;UL=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"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function v(y){if(typeof y=="object"&&y!==null){var x=y.$$typeof;switch(x){case e:switch(y=y.type,y){case n:case i:case r:case u:case f:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case c:case p:case d:case a:return y;default:return x}}case t:return x}}}return qt.ContextConsumer=o,qt.ContextProvider=a,qt.Element=e,qt.ForwardRef=c,qt.Fragment=n,qt.Lazy=p,qt.Memo=d,qt.Portal=t,qt.Profiler=i,qt.StrictMode=r,qt.Suspense=u,qt.SuspenseList=f,qt.isAsyncMode=function(){return!1},qt.isConcurrentMode=function(){return!1},qt.isContextConsumer=function(y){return v(y)===o},qt.isContextProvider=function(y){return v(y)===a},qt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},qt.isForwardRef=function(y){return v(y)===c},qt.isFragment=function(y){return v(y)===n},qt.isLazy=function(y){return v(y)===p},qt.isMemo=function(y){return v(y)===d},qt.isPortal=function(y){return v(y)===t},qt.isProfiler=function(y){return v(y)===i},qt.isStrictMode=function(y){return v(y)===r},qt.isSuspense=function(y){return v(y)===u},qt.isSuspenseList=function(y){return v(y)===f},qt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===i||y===r||y===u||y===f||y===m||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===d||y.$$typeof===a||y.$$typeof===o||y.$$typeof===c||y.$$typeof===b||y.getModuleId!==void 0)},qt.typeOf=v,qt}var zL;function oSe(){return zL||(zL=1,uS.exports=aSe()),uS.exports}var sSe=oSe(),dS,HL;function pW(){if(HL)return dS;HL=1;var e=xo(),t=bo(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return dS=r,dS}var fS,WL;function lSe(){if(WL)return fS;WL=1;var e=pW();function t(n){return e(n)&&n!=+n}return fS=t,fS}var cSe=lSe();const Tp=Mt(cSe);var uSe=pW();const dSe=Mt(uSe);var Nr=function(t){return t===0?0:t>0?1:-1},sl=function(t){return Tl(t)&&t.indexOf("%")===t.length-1},qe=function(t){return dSe(t)&&!Tp(t)},fSe=function(t){return wt(t)},Fn=function(t){return qe(t)||Tl(t)},hSe=0,Rp=function(t){var n=++hSe;return"".concat(t||"").concat(n)},Er=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(!qe(t)&&!Tl(t))return r;var a;if(sl(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return Tp(a)&&(a=r),i&&a>n&&(a=n),a},Ko=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},pSe=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},Vo=function(t,n){return qe(t)&&qe(n)?function(r){return t+r*(n-t)}:function(){return n}};function BE(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):ci(r,t))===n})}var mSe=function(t,n){return qe(t)&&qe(n)?t-n:Tl(t)&&Tl(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function Hc(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 qE(e){"@babel/helpers - typeof";return qE=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},qE(e)}var gSe=["viewBox","children"],vSe=["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"],VL=["points","pathLength"],hS={svg:gSe,polygon:VL,polyline:VL},wA=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
783ocus","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"],Iv=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(E.isValidElement(t)&&(r=t.props),!od(r))return null;var i={};return Object.keys(r).forEach(function(a){wA.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},ySe=function(t,n,r){return function(i){return t(n,r,i),null}},Rl=function(t,n,r){if(!od(t)||qE(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];wA.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=ySe(o,n,r))}),i},xSe=["children"],bSe=["children"];function GL(e,t){if(e==null)return{};var n=wSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wSe(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 KL={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"},co=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},YL=null,pS=null,_A=function e(t){if(t===YL&&Array.isArray(pS))return pS;var n=[];return E.Children.forEach(t,function(r){wt(r)||(sSe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),pS=n,YL=t,n};function Di(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return co(i)}):r=[co(t)],_A(e).forEach(function(i){var a=ci(i,"type.displayName")||ci(i,"type.n
783ame");r.indexOf(a)!==-1&&n.push(i)}),n}function ti(e,t){var n=Di(e,t);return n&&n[0]}var QL=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!qe(r)||r<=0||!qe(i)||i<=0)},_Se=["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"],SSe=function(t){return t&&t.type&&Tl(t.type)&&_Se.indexOf(t.type)>=0},jSe=function(t,n,r,i){var a,o=(a=hS==null?void 0:hS[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!pt(t)&&(i&&o.includes(n)||vSe.includes(n))||r&&wA.includes(n)},dt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(E.isValidElement(t)&&(i=t.props),!od(i))return null;var a={};
vendor: 4,477 bytes, line 783
783return Object.keys(i).forEach(function(o){var l;jSe((l=i)===null||l===void 0?void 0:l[o],o,n,r)&&(a[o]=i[o])}),a},UE=function e(t,n){if(t===n)return!0;var r=E.Children.count(t);if(r!==E.Children.count(n))return!1;if(r===0)return!0;if(r===1)return XL(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!XL(a,o))return!1}return!0},XL=function(t,n){if(wt(t)&&wt(n))return!0;if(!wt(t)&&!wt(n)){var r=t.props||{},i=r.children,a=GL(r,xSe),o=n.props||{},l=o.children,c=GL(o,bSe);return i&&l?Hc(a,c)&&UE(i,l):!i&&!l?Hc(a,c):!1}return!1},ZL=function(t,n){var r=[],i={};return _A(t).forEach(function(a,o){if(SSe(a))r.push(a);else if(a){var l=co(a.type),c=n[l]||{},u=c.handler,f=c.once;if(u&&(!f||!i[l])){var d=u(a,l,o);r.push(d),i[l]=!0}}}),r},NSe=function(t){var n=t&&t.type;return n&&KL[n]?KL[n]:null},ESe=function(t,n){return _A(n).indexOf(t)},kSe=["children","width","height","viewBox","className","style","title","desc"];function zE(){return zE=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},zE.apply(this,arguments)}function OSe(e,t){if(e==null)return{};var n=CSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CSe(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 HE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,c=e.desc,u=OSe(e,kSe),f=i||{width:n,height:r,x:0,y:0},d=gt("recharts-surface",a);return ne.createElement("svg",zE({},dt(u,!0,"svg"),{className:d,width:n,height:r,style:o,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height)}),ne.createElement("title",null,l),ne.createElement("desc",null,c),t)}var ASe=["children","className"];function WE(){return WE=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},WE.apply(this,arguments)}function PSe(e,t){if(e==null)return{};var n=TSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TSe(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 Kt=ne.forwardRef(function(e,t){var n=e.children,r=e.className,i=PSe(e,ASe),a=gt("recharts-layer",r);return ne.createElement("g",WE({className:a},dt(i,!0),{ref:t}),n)}),sa=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]},mS,JL;function RSe(){if(JL)return mS;JL=1;function e(t,n,r){var i=-1,a=t.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+n];return o}return mS=e,mS}var gS,e5;function ISe(){if(e5)return gS;e5=1;var e=RSe();function t(n,r,i){var a=n.length;return i=i===void 0?a:i,!r&&i>=a?n:e(n,r,i)}return gS=t,gS}var vS,t5;function mW(){if(t5)return vS;t5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+a+"]");function c(u){return l.test(u)}return vS=c,vS}var yS,n5;function MSe(){if(n5)return yS;n5=1;function e(t){return t.split("")}return yS=e,yS}var xS,r5;function DSe(){if(r5)return xS;r5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",f="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",b=u+"?",v="["+a+"]?",y="(?:"+m+"(?:"+[f,d,p].join("|")+")"+v+b+")*",x=v+b+y,_="(?:"+[f+l+"?",l,d,p,o].join("|")+")",S=RegExp(c+"(?="+c+")|"+_+x,"g");function w(N){return N.match(S)||[]}return xS=w,xS}var bS,i5;function LSe(){if(i5)return bS;i5=1;var e=MSe(),t=mW(),n=DSe();function r(i){return t(i)?n(i):e(i)}return bS=r,bS}var wS,a5;function $Se(){if(a5)return wS;a5=1;var e=ISe(),t=mW(),n=LSe(),r=dW();function i(a){return function(o){o=r(o);
vendor: 4,702 bytes, line 783
783var l=t(o)?n(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[a]()+u}}return wS=i,wS}var _S,o5;function FSe(){if(o5)return _S;o5=1;var e=$Se(),t=e("toUpperCase");return _S=t,_S}var BSe=FSe();const Px=Mt(BSe);function nn(e){return function(){return e}}const gW=Math.cos,Mv=Math.sin,da=Math.sqrt,Dv=Math.PI,Tx=2*Dv,VE=Math.PI,GE=2*VE,tl=1e-6,qSe=GE-tl;function vW(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function USe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vW;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class zSe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vW:USe(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,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,c=r-t,u=i-n,f=o-t,d=l-n,p=f*f+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>tl)if(!(Math.abs(d*c-u*f)>tl)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let m=r-o,b=i-l,v=c*c+u*u,y=m*m+b*b,x=Math.sqrt(v),_=Math.sqrt(p),S=a*Math.tan((VE-Math.acos((v+p-y)/(2*x*_)))/2),w=S/_,N=S/x;Math.abs(w-1)>tl&&this._append`L${t+w*f},${n+w*d}`,this._append`A${a},${a},0,0,${+(d*m>f*b)},${this._x1=t+N*c},${this._y1=n+N*u}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=t+l,f=n+c,d=1^o,p=o?i-a:a-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>tl||Math.abs(this._y1-f)>tl)&&this._append`L${u},${f}`,r&&(p<0&&(p=p%GE+GE),p>qSe?this._append`A${r},${r},0,1,${d},${t-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:p>tl&&this._append`A${r},${r},0,${+(p>=VE)},${d},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}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 SA(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 zSe(t)}function jA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function yW(e){this._context=e}yW.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 Rx(e){return new yW(e)}function xW(e){return e[0]}function bW(e){return e[1]}function wW(e,t){var n=nn(!0),r=null,i=Rx,a=null,o=SA(l);e=typeof e=="function"?e:e===void 0?xW:nn(e),t=typeof t=="function"?t:t===void 0?bW:nn(t);function l(c){var u,f=(c=jA(c)).length,d,p=!1,m;for(r==null&&(a=i(m=o())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(d,u,c),+t(d,u,c));if(m)return a=null,m+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:nn(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:nn(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:nn(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(a=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=a=null:a=i(r=c),l):r},l}function vg(e,t,n){var r=null,i=nn(!0),a=null,o=Rx,l=null,c=SA(u);e=typeof e=="function"?e:e===void 0?xW:nn(+e),t=typeof t=="function"?t:nn(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?bW:nn(+n);function u(d){var p,m,b,v=(d=jA(d)).length,y,x=!1,_,S=new Array(v),w=new Array(v);for(a==null&&(l=o(_=c())),p=0;p<=v;++p){if(!(p<v&&i(y=d[p],p,d))===x)if(x=!x)m=p,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=p-1;b>=m;--b)l.point(S[b],w[b]);l.lineEnd(),l.areaEnd()}x&&(S[p]=+e(y,p,d),w[p]=+t(y,p,d),l.point(r?+r(y,p,d):S[p],n?+n(y,p,d):w[p]))}if(_)return l=null,_+""||null}function f(){return wW().defined(i).curve(o).context(a)}return u.x=function(d){return arguments.length?(e=typeof d=="function"?d:nn(+d),r
vendor: 9,497 bytes, line 783
783=null,u):e},u.x0=function(d){return arguments.length?(e=typeof d=="function"?d:nn(+d),u):e},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:nn(+d),u):r},u.y=function(d){return arguments.length?(t=typeof d=="function"?d:nn(+d),n=null,u):t},u.y0=function(d){return arguments.length?(t=typeof d=="function"?d:nn(+d),u):t},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:nn(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(e).y(t)},u.lineY1=function(){return f().x(e).y(n)},u.lineX1=function(){return f().x(r).y(t)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:nn(!!d),u):i},u.curve=function(d){return arguments.length?(o=d,a!=null&&(l=o(a)),u):o},u.context=function(d){return arguments.length?(d==null?a=l=null:l=o(a=d),u):a},u}class _W{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 HSe(e){return new _W(e,!0)}function WSe(e){return new _W(e,!1)}const NA={draw(e,t){const n=da(t/Dv);e.moveTo(n,0),e.arc(0,0,n,0,Tx)}},VSe={draw(e,t){const n=da(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()}},SW=da(1/3),GSe=SW*2,KSe={draw(e,t){const n=da(t/GSe),r=n*SW;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},YSe={draw(e,t){const n=da(t),r=-n/2;e.rect(r,r,n,n)}},QSe=.8908130915292852,jW=Mv(Dv/10)/Mv(7*Dv/10),XSe=Mv(Tx/10)*jW,ZSe=-gW(Tx/10)*jW,JSe={draw(e,t){const n=da(t*QSe),r=XSe*n,i=ZSe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Tx*a/5,l=gW(o),c=Mv(o);e.lineTo(c*n,-l*n),e.lineTo(l*r-c*i,c*r+l*i)}e.closePath()}},SS=da(3),eje={draw(e,t){const n=-da(t/(SS*3));e.moveTo(0,n*2),e.lineTo(-SS*n,-n),e.lineTo(SS*n,-n),e.closePath()}},bi=-.5,wi=da(3)/2,KE=1/da(12),tje=(KE/2+1)*3,nje={draw(e,t){const n=da(t/tje),r=n/2,i=n*KE,a=r,o=n*KE+n,l=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,c),e.lineTo(bi*r-wi*i,wi*r+bi*i),e.lineTo(bi*a-wi*o,wi*a+bi*o),e.lineTo(bi*l-wi*c,wi*l+bi*c),e.lineTo(bi*r+wi*i,bi*i-wi*r),e.lineTo(bi*a+wi*o,bi*o-wi*a),e.lineTo(bi*l+wi*c,bi*c-wi*l),e.closePath()}};function rje(e,t){let n=null,r=SA(i);e=typeof e=="function"?e:nn(e||NA),t=typeof t=="function"?t:nn(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:nn(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:nn(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function Lv(){}function $v(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 NW(e){this._context=e}NW.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:$v(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:$v(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ije(e){return new NW(e)}function EW(e){this._context=e}EW.prototype={areaStart:Lv,areaEnd:Lv,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:$v(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aje(e){return new EW(e)}function kW(e){this._context=e}kW.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:$v(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oje(e){return new kW(e)}function OW(e){this._context=e}OW.prototype={areaStart:Lv,areaEnd:Lv,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 sje(e){return new OW(e)}function s5(e){return e<0?-1:1}function l5(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(s5(a)+s5(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function c5(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function jS(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function Fv(e){this._context=e}Fv.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:jS(this,this._t0,c5(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,jS(this,c5(this,n=l5(this,e,t)),n);break;default:jS(this,this._t0,n=l5(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function CW(e){this._context=new AW(e)}(CW.prototype=Object.create(Fv.prototype)).point=function(e,t){Fv.prototype.point.call(this,t,e)};function AW(e){this._context=e}AW.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,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function lje(e){return new Fv(e)}function cje(e){return new CW(e)}function PW(e){this._context=e}PW.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=u5(e),i=u5(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(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 u5(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function uje(e){return new PW(e)}function Ix(e,t){this._context=e,this._t=t}Ix.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: 54,890 bytes, lines 783-793
783default:{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 dje(e){return new Ix(e,.5)}function fje(e){return new Ix(e,0)}function hje(e){return new Ix(e,1)}function mu(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function YE(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function pje(e,t){return e[t]}function mje(e){const t=[];return t.key=e,t}function gje(){var e=nn([]),t=YE,n=mu,r=pje;function i(a){var o=Array.from(e.apply(this,arguments),mje),l,c=o.length,u=-1,f;for(const d of a)for(l=0,++u;l<c;++l)(o[l][u]=[0,+r(d,o[l].key,u,a)]).data=d;for(l=0,f=jA(t(o));l<c;++l)o[f[l]].index=l;return n(o,f),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:nn(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:nn(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?YE:typeof a=="function"?a:nn(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??mu,i):n},i}function vje(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}mu(e,t)}}function yje(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}mu(e,t)}}function xje(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,c=0,u=0;l<o;++l){for(var f=e[t[l]],d=f[r][1]||0,p=f[r-1][1]||0,m=(d-p)/2,b=0;b<l;++b){var v=e[t[b]],y=v[r][1]||0,x=v[r-1][1]||0;m+=y-x}c+=d,u+=m*d}i[r-1][1]+=i[r-1][0]=n,c&&(n-=u/c)}i[r-1][1]+=i[r-1][0]=n,mu(e,t)}}function vh(e){"@babel/helpers - typeof";return vh=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},vh(e)}var bje=["type","size","sizeType"];function QE(){return QE=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},QE.apply(this,arguments)}function d5(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 f5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d5(Object(n),!0).forEach(function(r){wje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wje(e,t,n){return t=_je(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _je(e){var t=Sje(e,"string");return vh(t)=="symbol"?t:t+""}function Sje(e,t){if(vh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jje(e,t){if(e==null)return{};var n=Nje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nje(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 TW={symbolCircle:NA,symbolCross:VSe,symbolDiamond:KSe,symbolSquare:YSe,symbolStar:JSe,symbolTriangle:eje,symbolWye:nje},Eje=Math.PI/180,kje=function(t){var n="symbol".concat(Px(t));return TW[n]||NA},Oje=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*Eje;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}},Cje=function(t,n){TW["symbol".concat(Px(t))]=n},EA=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,c=jje(t,bje),u=f5(f5({},c),{},{type:r,size:a,sizeType:l}),f=function(){var y=kje(r),x=rje().type(y).size(Oje(a,l,r));return x()},d=u.className,p=u.cx,m=u.cy,b=dt(u,!0);return p===+p&&m===+m&&a===+a?ne.createElement("path",QE({},b,{className:gt("recharts-symbols",d),transform:"translate(".concat(p,", ").concat(m,")"),d:f()})):null};EA.registerSymbol=Cje;function gu(e){"@babel/helpers - typeof";return gu=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},gu(e)}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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},XE.apply(this,arguments)}function h5(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 Aje(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h5(Object(n),!0).forEach(function(r){yh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tje(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,IW(r.key),r)}}function Rje(e,t,n){return t&&Tje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ije(e,t,n){return t=Bv(t),Mje(e,RW()?Reflect.construct(t,n||[],Bv(e).constructor):t.apply(e,n))}function Mje(e,t){if(t&&(gu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dje(e)}function Dje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RW=function(){return!!e})()}function Bv(e){return Bv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bv(e)}function Lje(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&&ZE(e,t)}function ZE(e,t){return ZE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZE(e,t)}function yh(e,t,n){return t=IW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IW(e){var t=$je(e,"string");return gu(t)=="symbol"?t:t+""}function $je(e,t){if(gu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var _i=32,kA=(function(e){function t(){return Pje(this,t),Ije(this,t,arguments)}return Lje(t,e),Rje(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=_i/2,o=_i/6,l=_i/3,c=r.inactive?i:r.color;if(r.type==="plainline")return ne.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:_i,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return ne.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(a,"h").concat(l,` 784 A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,` 785 H`).concat(_i,"M").concat(2*l,",").concat(a,` 786 A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return ne.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(_i/8,"h").concat(_i,"v").concat(_i*3/4,"h").concat(-_i,"z"),className:"recharts-legend-icon"});if(ne.isValidElement(r.legendIcon)){var u=Aje({},r);return delete u.legendIcon,ne.cloneElement(r.legendIcon,u)}return ne.createElement(EA,{fill:c,cx:a,cy:a,size:_i,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,c=i.formatter,u=i.inactiveColor,f={x:0,y:0,width:_i,height:_i},d={display:l==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(m,b){var v=m.formatter||c,y=gt(yh(yh({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",m.inactive));if(m.type==="none")return null;var x=pt(m.value)?null:m.value;sa(!pt(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 _=m.inactive?u:m.color;return ne.createElement("li",XE({className:y,style:d,key:"legend-item-".concat(b)},Rl(r.props,m,b)),ne.createElement(HE,{width:o,height:o,viewBox:f,style:p},r.renderIcon(m)),ne.createElement("span",{className:"recharts-legend-item-text",style:{color:_}},v?v(x,m,b):x))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return ne.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(E.PureComponent);yh(kA,"displayName","Legend");yh(kA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var NS,p5;function Fje(){if(p5)return NS;p5=1;var e=b9(),t=tA(),n=1,r=2;function i(a,o,l,c){var u=l.length,f=u,d=!c;if(a==null)return!f;for(a=Object(a);u--;){var p=l[u];if(d&&p[2]?p[1]!==a[p[0]]:!(p[0]in a))return!1}for(;++u<f;){p=l[u];var m=p[0],b=a[m],v=p[1];if(d&&p[2]){if(b===void 0&&!(m in a))return!1}else{var y=new e;if(c)var x=c(b,v,m,a,o,y);if(!(x===void 0?t(v,b,n|r,c,y):x))return!1}}return!0}return NS=i,NS}var ES,m5;function MW(){if(m5)return ES;m5=1;var e=Es();function t(n){return n===n&&!e(n)}return ES=t,ES}var kS,g5;function Bje(){if(g5)return kS;g5=1;var e=MW(),t=_x();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],l=r[o];i[a]=[o,l,e(l)]}return i}return kS=n,kS}var OS,v5;function DW(){if(v5)return OS;v5=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return OS=e,OS}var CS,y5;function qje(){if(y5)return CS;y5=1;var e=Fje(),t=Bje(),n=DW();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return CS=r,CS}var AS,x5;function Uje(){if(x5)return AS;x5=1;function e(t,n){return t!=null&&n in Object(t)}return AS=e,AS}var PS,b5;function zje(){if(b5)return PS;b5=1;var e=fW(),t=ZC(),n=Kr(),r=JC(),i=eA(),a=Ax();function o(l,c,u){c=e(c,l);for(var f=-1,d=c.length,p=!1;++f<d;){var m=a(c[f]);if(!(p=l!=null&&u(l,m)))break;l=l[m]}return p||++f!=d?p:(d=l==null?0:l.length,!!d&&i(d)&&r(m,d)&&(n(l)||t(l)))}return PS=o,PS}var TS,w5;function Hje(){if(w5)return TS;w5=1;var e=Uje(),t=zje();function n(r,i){return r!=null&&t(r,i,e)}return TS=n,TS}var RS,_5;function Wje(){if(_5)return RS;_5=1;var e=tA(),t=hW(),n=Hje(),r=yA(),i=MW(),a=DW(),o=Ax(),l=1,c=2;function u(f,d){return r(f)&&i(d)?a(o(f),d):function(p){var m=t(p,f);return m===void 0&&m===d?n(p,f):e(d,m,l|c)}}return RS=u,RS}var IS,S5;function sd(){if(S5)return IS;S5=1;function e(t){return t}return IS=e,IS}var MS,j5;function Vje(){if(j5)return MS;j5=1;function e(t){return function(n){return n==null?void 0:n[t]}}return MS=e,MS}var DS,N5;function Gje(){if(N5)return DS;N5=1;var e=bA();function t(n){return function(r){return e(r,n)}}return DS=t,DS}var LS,E5;function Kje(){if(E5)return LS;E5=1;var e=Vje(),t=Gje(),n=yA(),r=Ax();function i(a){return n(a)?e(r(a)):t(a)}return LS=i,LS}var $S,k5;function za(){if(k5)return $S;k5=1;var e=qje(),t=Wje(),n=sd(),r=Kr(),i=Kje();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return $S=a,$S}var FS,O5;function LW(){if(O5)return FS;O5=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return FS=e,FS}var BS,C5;function Yje(){if(C5)return BS;C5=1;function e(t){return t!==t}return BS=e,BS}var qS,A5;function Qje(){if(A5)return qS;A5=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return qS=e,qS}var US,P5;function Xje(){if(P5)return US;P5=1;var e=LW(),t=Yje(),n=Qje();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return US=r,US}var zS,T5;function Zje(){if(T5)return zS;T5=1;var e=Xje();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return zS=t,zS}var HS,R5;function Jje(){if(R5)return HS;R5=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return HS=e,HS}var WS,I5;function eNe(){if(I5)return WS;I5=1;function e(){}return WS=e,WS}var VS,M5;function tNe(){if(M5)return VS;M5=1;var e=A9(),t=eNe(),n=XC(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return VS=i,VS}var GS,D5;function nNe(){if(D5)return GS;D5=1;var e=w9(),t=Zje(),n=Jje(),r=S9(),i=tNe(),a=XC(),o=200;function l(c,u,f){var d=-1,p=t,m=c.length,b=!0,v=[],y=v;if(f)b=!1,p=n;else if(m>=o){var x=u?null:i(c);if(x)return a(x);b=!1,p=r,y=new e}else y=u?[]:v;e:for(;++d<m;){var _=c[d],S=u?u(_):_;if(_=f||_!==0?_:0,b&&S===S){for(var w=y.length;w--;)if(y[w]===S)continue e;u&&y.push(S),v.push(_)}else p(y,S,f)||(y!==v&&y.push(S),v.push(_))}return v}return GS=l,GS}var KS,L5;function rNe(){if(L5)return KS;L5=1;var e=za(),t=nNe();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return KS=n,KS}var iNe=rNe();const $5=Mt(iNe);function $W(e,t,n){return t===!0?$5(e,n):pt(t)?$5(e,t):e}function vu(e){"@babel/helpers - typeof";return vu=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},vu(e)}var aNe=["ref"];function F5(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 Ja(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F5(Object(n),!0).forEach(function(r){Mx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function B5(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,BW(r.key),r)}}function sNe(e,t,n){return t&&B5(e.prototype,t),n&&B5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lNe(e,t,n){return t=qv(t),cNe(e,FW()?Reflect.construct(t,n||[],qv(e).constructor):t.apply(e,n))}function cNe(e,t){if(t&&(vu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uNe(e)}function uNe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FW=function(){return!!e})()}function qv(e){return qv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},qv(e)}function dNe(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&&JE(e,t)}function JE(e,t){return JE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},JE(e,t)}function Mx(e,t,n){return t=BW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BW(e){var t=fNe(e,"string");return vu(t)=="symbol"?t:t+""}function fNe(e,t){if(vu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function hNe(e,t){if(e==null)return{};var n=pNe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pNe(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 mNe(e){return e.value}function gNe(e,t){if(ne.isValidElement(e))return ne.cloneElement(e,t);if(typeof e=="function")return ne.createElement(e,t);t.ref;var n=hNe(t,aNe);return ne.createElement(kA,n)}var q5=1,uo=(function(e){function t(){var n;oNe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=lNe(this,t,[].concat(i)),Mx(n,"lastBoundingBox",{width:-1,height:-1}),n}return dNe(t,e),sNe(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)>q5||Math.abs(i.height-this.lastBoundingBox.height)>q5)&&(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?Ja({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,c=i.margin,u=i.chartWidth,f=i.chartHeight,d,p;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var m=this.getBBoxSnapshot();d={left:((u||0)-m.width)/2}}else d=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();p={top:((f||0)-b.height)/2}}else p=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return Ja(Ja({},d),p)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,l=i.height,c=i.wrapperStyle,u=i.payloadUniqBy,f=i.payload,d=Ja(Ja({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return ne.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(m){r.wrapperNode=m}},gNe(a,Ja(Ja({},this.props),{},{payload:$W(f,u,mNe)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Ja(Ja({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&qe(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(E.PureComponent);Mx(uo,"displayName","Legend");Mx(uo,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var YS,U5;function vNe(){if(U5)return YS;U5=1;var e=Np(),t=ZC(),n=Kr(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return YS=i,YS}var QS,z5;function qW(){if(z5)return QS;z5=1;var e=N9(),t=vNe();function n(r,i,a,o,l){var c=-1,u=r.length;for(a||(a=t),l||(l=[]);++c<u;){var f=r[c];i>0&&a(f)?i>1?n(f,i-1,a,o,l):e(l,f):o||(l[l.length]=f)}return l}return QS=n,QS}var XS,H5;function yNe(){if(H5)return XS;H5=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),l=i(n),c=l.length;c--;){var u=l[t?c:++a];if(r(o[u],u,o)===!1)break}return n}}return XS=e,XS}var ZS,W5;function xNe(){if(W5)return ZS;W5=1;var e=yNe(),t=e();return ZS=t,ZS}var JS,V5;function UW(){if(V5)return JS;V5=1;var e=xNe(),t=_x();function n(r,i){return r&&e(r,i,t)}return JS=n,JS}var ej,G5;function bNe(){if(G5)return ej;G5=1;var e=Ep();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,l=r?o:-1,c=Object(i);(r?l--:++l<o)&&a(c[l],l,c)!==!1;);return i}}return ej=t,ej}var tj,K5;function OA(){if(K5)return tj;K5=1;var e=UW(),t=bNe(),n=t(e);return tj=n,tj}var nj,Y5;function zW(){if(Y5)return nj;Y5=1;var e=OA(),t=Ep();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(l,c,u){o[++a]=i(l,c,u)}),o}return nj=n,nj}var rj,Q5;function wNe(){if(Q5)return rj;Q5=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return rj=e,rj}var ij,X5;function _Ne(){if(X5)return ij;X5=1;var e=ad();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,l=e(n),c=r!==void 0,u=r===null,f=r===r,d=e(r);if(!u&&!d&&!l&&n>r||l&&c&&f&&!u&&!d||a&&c&&f||!i&&f||!o)return 1;if(!a&&!l&&!d&&n<r||d&&i&&o&&!a&&!l||u&&i&&o||!c&&o||!f)return-1}return 0}return ij=t,ij}var aj,Z5;function SNe(){if(Z5)return aj;Z5=1;var e=_Ne();function t(n,r,i){for(var a=-1,o=n.criteria,l=r.criteria,c=o.length,u=i.length;++a<c;){var f=e(o[a],l[a]);if(f){if(a>=u)return f;var d=i[a];return f*(d=="desc"?-1:1)}}return n.index-r.index}return aj=t,aj}var oj,J5;function jNe(){if(J5)return oj;J5=1;var e=xA(),t=bA(),n=za(),r=zW(),i=wNe(),a=k9(),o=SNe(),l=sd(),c=Kr();function u(f,d,p){d.length?d=e(d,function(v){return c(v)?function(y){return t(y,v.length===1?v[0]:v)}:v}):d=[l];var m=-1;d=e(d,a(n));var b=r(f,function(v,y,x){var _=e(d,function(S){return S(v)});return{criteria:_,index:++m,value:v}});return i(b,function(v,y){return o(v,y,p)})}return oj=u,oj}var sj,e3;function NNe(){if(e3)return sj;e3=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 sj=e,sj}var lj,t3;function ENe(){if(t3)return lj;t3=1;var e=NNe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,l=-1,c=t(o.length-i,0),u=Array(c);++l<c;)u[l]=o[i+l];l=-1;for(var f=Array(i+1);++l<i;)f[l]=o[l];return f[i]=a(u),e(r,this,f)}}return lj=n,lj}var cj,n3;function kNe(){if(n3)return cj;n3=1;function e(t){return function(){return t}}return cj=e,cj}var uj,r3;function HW(){if(r3)return uj;r3=1;var e=Bl(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return uj=t,uj}var dj,i3;function ONe(){if(i3)return dj;i3=1;var e=kNe(),t=HW(),n=sd(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return dj=r,dj}var fj,a3;function CNe(){if(a3)return fj;a3=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var l=n(),c=t-(l-o);if(o=l,c>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return fj=r,fj}var hj,o3;function ANe(){if(o3)return hj;o3=1;var e=ONe(),t=CNe(),n=t(e);return hj=n,hj}var pj,s3;function PNe(){if(s3)return pj;s3=1;var e=sd(),t=ENe(),n=ANe();function r(i,a){return n(t(i,a,e),i+"")}return pj=r,pj}var mj,l3;function Dx(){if(l3)return mj;l3=1;var e=GC(),t=Ep(),n=JC(),r=Es();function i(a,o,l){if(!r(l))return!1;var c=typeof o;return(c=="number"?t(l)&&n(o,l.length):c=="string"&&o in l)?e(l[o],a):!1}return mj=i,mj}var gj,c3;function TNe(){if(c3)return gj;c3=1;var e=qW(),t=jNe(),n=PNe(),r=Dx(),i=n(function(a,o){if(a==null)return[];var l=o.length;return l>1&&r(a,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return gj=i,gj}var RNe=TNe();const CA=Mt(RNe);function xh(e){"@babel/helpers - typeof";return xh=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},xh(e)}function ek(){return ek=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},ek.apply(this,arguments)}function INe(e,t){return $Ne(e)||LNe(e,t)||DNe(e,t)||MNe()}function MNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 787In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function DNe(e,t){if(e){if(typeof e=="string")return u3(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 u3(e,t)}}function u3(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 LNe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function $Ne(e){if(Array.isArray(e))return e}function d3(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 vj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d3(Object(n),!0).forEach(function(r){FNe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FNe(e,t,n){return t=BNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BNe(e){var t=qNe(e,"string");return xh(t)=="symbol"?t:t+""}function qNe(e,t){if(xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UNe(e){return Array.isArray(e)&&Fn(e[0])&&Fn(e[1])?e.join(" ~ "):e}var zNe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,f=t.payload,d=t.formatter,p=t.itemSorter,m=t.wrapperClassName,b=t.labelClassName,v=t.label,y=t.labelFormatter,x=t.accessibilityLayer,_=x===void 0?!1:x,S=function(){if(f&&f.length){var R={padding:0,margin:0},I=(p?CA(f,p):f).map(function(M,B){if(M.type==="none")return null;var W=vj({display:"block",paddingTop:4,paddingBottom:4,color:M.color||"#000"},l),G=M.formatter||d||UNe,H=M.value,K=M.name,$=H,F=K;if(G&&$!=null&&F!=null){var z=G(H,K,M,B,f);if(Array.isArray(z)){var U=INe(z,2);$=U[0],F=U[1]}else $=z}return ne.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(B),style:W},Fn(F)?ne.createElement("span",{className:"recharts-tooltip-item-name"},F):null,Fn(F)?ne.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,ne.createElement("span",{className:"recharts-tooltip-item-value"},$),ne.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return ne.createElement("ul",{className:"recharts-tooltip-item-list",style:R},I)}return null},w=vj({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),N=vj({margin:0},u),k=!wt(v),C=k?v:"",P=gt("recharts-default-tooltip",m),L=gt("recharts-tooltip-label",b);k&&y&&f!==void 0&&f!==null&&(C=y(v,f));var T=_?{role:"status","aria-live":"assertive"}:{};return ne.createElement("div",ek({className:P,style:w},T),ne.createElement("p",{className:L,style:N},ne.isValidElement(C)?C:"".concat(C)),S())};function bh(e){"@babel/helpers - typeof";return bh=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},bh(e)}function yg(e,t,n){return t=HNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HNe(e){var t=WNe(e,"string");return bh(t)=="symbol"?t:t+""}function WNe(e,t){if(bh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var mf="recharts-tooltip-wrapper",VNe={visibility:"hidden"};function GNe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return gt(mf,yg(yg(yg(yg({},"".concat(mf,"-right"),qe(n)&&t&&qe(t.x)&&n>=t.x),"".concat(mf,"-left"),qe(n)&&t&&qe(t.x)&&n<t.x),"".concat(mf,"-bottom"),qe(r)&&t&&qe(t.y)&&r>=t.y),"".concat(mf,"-top"),qe(r)&&t&&qe(t.y)&&r<t.y))}function f3(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(a&&qe(a[r]))return a[r];var f=n[r]-l-i,d=n[r]+i;if(t[r])return o[r]?f:d;if(o[r]){var p=f,m=c[r];return p<m?Math.max(d,c[r]):Math.max(f,c[r])}var b=d+l,v=c[r]+u;return b>v?Math.max(f,c[r]):Math.max(d,c[r])}function KNe(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 YNe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,f,d;return o.height>0&&o.width>0&&n?(f=f3({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),d=f3({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=KNe({translateX:f,translateY:d,useTranslate3d:l})):u=VNe,{cssProperties:u,cssClasses:GNe({translateX:f,translateY:d,coordinate:n})}}function yu(e){"@babel/helpers - typeof";return yu=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},yu(e)}function h3(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 p3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h3(Object(n),!0).forEach(function(r){nk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XNe(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,VW(r.key),r)}}function ZNe(e,t,n){return t&&XNe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JNe(e,t,n){return t=Uv(t),eEe(e,WW()?Reflect.construct(t,n||[],Uv(e).constructor):t.apply(e,n))}function eEe(e,t){if(t&&(yu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tEe(e)}function tEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WW=function(){return!!e})()}function Uv(e){return Uv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Uv(e)}function nEe(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&&tk(e,t)}function tk(e,t){return tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},tk(e,t)}function nk(e,t,n){return t=VW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VW(e){var t=rEe(e,"string");return yu(t)=="symbol"?t:t+""}function rEe(e,t){if(yu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var m3=1,iEe=(function(e){function t(){var n;QNe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=JNe(this,t,[].concat(i)),nk(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),nk(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,f;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(f=n.props.coordinate)===null||f===void 0?void 0:f.y)!==null&&u!==void 0?u:0}})}}),n}return nEe(t,e),ZNe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>m3||Math.abs(r.height-this.state.lastBoundingBox.height)>m3)&&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,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.children,f=i.coordinate,d=i.hasPayload,p=i.isAnimationActive,m=i.offset,b=i.position,v=i.reverseDirection,y=i.useTranslate3d,x=i.viewBox,_=i.wrapperStyle,S=YNe({allowEscapeViewBox:o,coordinate:f,offsetTopLeft:m,position:b,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:x}),w=S.cssClasses,N=S.cssProperties,k=p3(p3({transition:p&&a?"transform ".concat(l,"ms ").concat(c):void 0},N),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&d?"visible":"hidden",position:"absolute",top:0,left:0},_);return ne.createElement("div",{tabIndex:-1,className:w,style:k,ref:function(P){r.wrapperNode=P}},u)}}])})(E.PureComponent),aEe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},ld={isSsr:aEe()};function xu(e){"@babel/helpers - typeof";return xu=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},xu(e)}function g3(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 v3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?g3(Object(n),!0).forEach(function(r){AA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sEe(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,KW(r.key),r)}}function lEe(e,t,n){return t&&sEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cEe(e,t,n){return t=zv(t),uEe(e,GW()?Reflect.construct(t,n||[],zv(e).constructor):t.apply(e,n))}function uEe(e,t){if(t&&(xu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dEe(e)}function dEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GW(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GW=function(){return!!e})()}function zv(e){return zv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zv(e)}function fEe(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&&rk(e,t)}function rk(e,t){return rk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rk(e,t)}function AA(e,t,n){return t=KW(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KW(e){var t=hEe(e,"string");return xu(t)=="symbol"?t:t+""}function hEe(e,t){if(xu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function pEe(e){return e.dataKey}function mEe(e,t){return ne.isValidElement(e)?ne.cloneElement(e,t):typeof e=="function"?ne.createElement(e,t):ne.createElement(zNe,t)}var Ei=(function(e){function t(){return oEe(this,t),cEe(this,t,arguments)}return fEe(t,e),lEe(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,c=i.animationEasing,u=i.content,f=i.coordinate,d=i.filterNull,p=i.isAnimationActive,m=i.offset,b=i.payload,v=i.payloadUniqBy,y=i.position,x=i.reverseDirection,_=i.useTranslate3d,S=i.viewBox,w=i.wrapperStyle,N=b??[];d&&N.length&&(N=$W(b.filter(function(C){return C.value!=null&&(C.hide!==!0||r.props.includeHidden)}),v,pEe));var k=N.length>0;return ne.createElement(iEe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:a,coordinate:f,hasPayload:k,offset:m,position:y,reverseDirection:x,useTranslate3d:_,viewBox:S,wrapperStyle:w},mEe(u,v3(v3({},this.props),{},{payload:N})))}}])})(E.PureComponent);AA(Ei,"displayName","Tooltip");AA(Ei,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ld.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 yj,y3;function gEe(){if(y3)return yj;y3=1;var e=Ua(),t=function(){return e.Date.now()};return yj=t,yj}var xj,x3;function vEe(){if(x3)return xj;x3=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return xj=t,xj}var bj,b3;function yEe(){if(b3)return bj;b3=1;var e=vEe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return bj=n,bj}var wj,w3;function YW(){if(w3)return wj;w3=1;var e=yEe(),t=Es(),n=ad(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var f=typeof u.valueOf=="function"?u.valueOf():u;u=t(f)?f+"":f}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=a.test(u);return d||o.test(u)?l(u.slice(2),d?2:8):i.test(u)?r:+u}return wj=c,wj}var _j,_3;function xEe(){if(_3)return _j;_3=1;var e=Es(),t=gEe(),n=YW(),r="Expected a function",i=Math.max,a=Math.min;function o(l,c,u){var f,d,p,m,b,v,y=0,x=!1,_=!1,S=!0;if(typeof l!="function")throw new TypeError(r);c=n(c)||0,e(u)&&(x=!!u.leading,_="maxWait"in u,p=_?i(n(u.maxWait)||0,c):p,S="trailing"in u?!!u.trailing:S);function w(I){var M=f,B=d;return f=d=void 0,y=I,m=l.apply(B,M),m}function N(I){return y=I,b=setTimeout(P,c),x?w(I):m}function k(I){var M=I-v,B=I-y,W=c-M;return _?a(W,p-B):W}function C(I){var M=I-v,B=I-y;return v===void 0||M>=c||M<0||_&&B>=p}function P(){var I=t();if(C(I))return L(I);b=setTimeout(P,k(I))}function L(I){return b=void 0,S&&f?w(I):(f=d=void 0,m)}function T(){b!==void 0&&clearTimeout(b),y=0,f=v=d=b=void 0}function A(){return b===void 0?m:L(t())}function R(){var I=t(),M=C(I);if(f=arguments,d=this,v=I,M){if(b===void 0)return N(v);if(_)return clearTimeout(b),b=setTimeout(P,c),w(v)}return b===void 0&&(b=setTimeout(P,c)),m}return R.cancel=T,R.flush=A,R}return _j=o,_j}var Sj,S3;function bEe(){if(S3)return Sj;S3=1;var e=xEe(),t=Es(),n="Expected a function";function r(i,a,o){var l=!0,c=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(i,a,{leading:l,maxWait:a,trailing:c})}return Sj=r,Sj}var wEe=bEe();const QW=Mt(wEe);function wh(e){"@babel/helpers - typeof";return wh=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},wh(e)}function j3(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 xg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j3(Object(n),!0).forEach(function(r){_Ee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _Ee(e,t,n){return t=SEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SEe(e){var t=jEe(e,"string");return wh(t)=="symbol"?t:t+""}function jEe(e,t){if(wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function NEe(e,t){return CEe(e)||OEe(e,t)||kEe(e,t)||EEe()}function EEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 788In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kEe(e,t){if(e){if(typeof e=="string")return N3(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 N3(e,t)}}function N3(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 OEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function CEe(e){if(Array.isArray(e))return e}var jj=E.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,f=u===void 0?0:u,d=e.minHeight,p=e.maxHeight,m=e.children,b=e.debounce,v=b===void 0?0:b,y=e.id,x=e.className,_=e.onResize,S=e.style,w=S===void 0?{}:S,N=E.useRef(null),k=E.useRef();k.current=_,E.useImperativeHandle(t,function(){return Object.defineProperty(N.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),N.current},configurable:!0})});var C=E.useState({containerWidth:i.width,containerHeight:i.height}),P=NEe(C,2),L=P[0],T=P[1],A=E.useCallback(function(I,M){T(function(B){var W=Math.round(I),G=Math.round(M);return B.containerWidth===W&&B.containerHeight===G?B:{containerWidth:W,containerHeight:G}})},[]);E.useEffect(function(){var I=function(K){var $,F=K[0].contentRect,z=F.width,U=F.height;A(z,U),($=k.current)===null||$===void 0||$.call(k,z,U)};v>0&&(I=QW(I,v,{trailing:!0,leading:!1}));var M=new ResizeObserver(I),B=N.current.getBoundingClientRect(),W=B.width,G=B.height;return A(W,G),M.observe(N.current),function(){M.disconnect()}},[A,v]);var R=E.useMemo(function(){var I=L.containerWidth,M=L.containerHeight;if(I<0||M<0)return null;sa(sl(o)||sl(c),`The width(%s) and height(%s) are both fixed numbers, 789 maybe you don't need to use a ResponsiveContainer.`,o,c),sa(!n||n>0,"The aspect(%s) must be greater than zero.",n);var B=sl(o)?I:o,W=sl(c)?M:c;n&&n>0&&(B?W=B/n:W&&(B=W*n),p&&W>p&&(W=p)),sa(B>0||W>0,`The width(%s) and height(%s) of chart should be greater than 0, 790 please check the style of container, or the props width(%s) and height(%s), 791 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 792 height and width.`,B,W,o,c,f,d,n);var G=!Array.isArray(m)&&co(m.type).endsWith("Chart");return ne.Children.map(m,function(H){return ne.isValidElement(H)?E.cloneElement(H,xg({width:B,height:W},G?{style:xg({height:"100%",width:"100%",maxHeight:W,maxWidth:B},H.props.style)}:{})):H})},[n,m,c,p,d,f,L,o]);return ne.createElement("div",{id:y?"".concat(y):void 0,className:gt("recharts-responsive-container",x),style:xg(xg({},w),{},{width:o,height:c,minWidth:f,minHeight:d,maxHeight:p}),ref:N},R)}),_h=function(t){return null};_h.displayName="Cell";function Sh(e){"@babel/helpers - typeof";return Sh=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},Sh(e)}function E3(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 ik(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?E3(Object(n),!0).forEach(function(r){AEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AEe(e,t,n){return t=PEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PEe(e){var t=TEe(e,"string");return Sh(t)=="symbol"?t:t+""}function TEe(e,t){if(Sh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ec={widthCache:{},cacheCount:0},REe=2e3,IEe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},k3="recharts_measurement_span";function MEe(e){var t=ik({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var zf=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ld.isSsr)return{width:0,height:0};var r=MEe(n),i=JSON.stringify({text:t,copyStyle:r});if(Ec.widthCache[i])return Ec.widthCache[i];try{var a=document.getElementById(k3);a||(a=document.createElement("span"),a.setAttribute("id",k3),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=ik(ik({},IEe),r);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),c={width:l.width,height:l.height};return Ec.widthCache[i]=c,++Ec.cacheCount>REe&&(Ec.cacheCount=0,Ec.widthCache={}),c}catch{return{width:0,height:0}}},DEe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function jh(e){"@babel/helpers - typeof";return jh=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},jh(e)}function Hv(e,t){return BEe(e)||FEe(e,t)||$Ee(e,t)||LEe()}function LEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 793In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ee(e,t){if(e){if(typeof e=="string")return O3(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 O3(e,t)}}function O3(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 FEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function BEe(e){if(Array.isArray(e))return e}function qEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function C3(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,zEe(r.key),r)}}function UEe(e,t,n){return t&&C3(e.prototype,t),n&&C3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function zEe(e){var t=HEe(e,"string");return jh(t)=="symbol"?t:t+""}function HEe(e,t){if(jh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var A3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,P3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,WEe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,VEe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,XW={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},GEe=Object.keys(XW),Rc="NaN";function KEe(e,t){return e*XW[t]}var bg=(function(){function e(t,n){qEe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!WEe.test(n)&&(this.num=NaN,this.unit=""),GEe.includes(n)&&(this.num=KEe(t,n),this.unit="px")}return UEe(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=VEe.exec(n))!==null&&r!==void 0?r:[],a=Hv(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])})();function ZW(e){if(e.includes(Rc))return Rc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=A3.exec(t))!==null&&n!==void 0?n:[],i=Hv(r,4),a=i[1],o=i[2],l=i[3],c=bg.parse(a??""),u=bg.parse(l??""),f=o==="*"?c.multiply(u):c.divide(u);if(f.isNaN())return Rc;t=t.replace(A3,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var d,p=(d=P3.exec(t))!==null&&d!==void 0?d:[],m=Hv(p,4),b=m[1],v=m[2],y=m[3],x=bg.parse(b??""),_=bg.parse(y??""),S=v==="+"?x.add(_):x.subtract(_);if(S.isNaN())return Rc;t=t.replace(P3,S.toString())}return t}var T3=/\(([^()]*)\)/;function YEe(e){for(var t=e;t.includes("(");){var n=T3.exec(t),r=Hv(n,2),i=r[1];t=t.replace(T3,ZW(i))}return t}function QEe(e){var t=e.replace(/\s+/g,"");return t=YEe(t),t=ZW(t),t}function XEe(e){try{return QEe(e)}catch{return Rc}}function Nj(e){var t=XEe(e.slice(5,-1));return t===Rc?"":t}var ZEe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],JEe=["dx","dy","angle","className","breakAll"];function ak(){return ak=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},ak.apply(this,arguments)}function R3(e,t){if(e==null)return{};var n=eke(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eke(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 I3(e,t){return ike(e)||rke(e,t)||nke(e,t)||tke()}
793function tke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 794In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nke(e,t){if(e){if(typeof e=="string")return M3(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 M3(e,t)}}function M3(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 rke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function ike(e){if(Array.isArray(e))return e}var JW=/[ \f\n\r\t\v\u2028\u2029]+/,eV=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];wt(n)||(r?a=n.toString().split(""):a=n.toString().split(JW));var o=a.map(function(c){return{word:c,width:zf(c,i).width}}),l=r?0:zf(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},ake=function(t,n,r,i,a){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,f=qe(o),d=l,p=function(){var B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return B.reduce(function(W,G){var H=G.word,K=G.width,$=W[W.length-1];if($&&(i==null||a||$.width+K+r<Number(i)))$.words.push(H),$.width+=K+r;else{var F={words:[H],width:K};W.push(F)}return W},[])},m=p(n),b=function(B){return B.reduce(function(W,G){return W.width>G.width?W:G})};if(!f)return m;for(var v="â¦",y=function(B){var W=d.slice(0,B),G=eV({breakAll:u,style:c,children:W+v}).wordsWithComputedWidth,H=p(G),K=H.length>o||b(H).width>Number(i);return[K,H]},x=0,_=d.length-1,S=0,w;x<=_&&S<=d.length-1;){var N=Math.floor((x+_)/2),k=N-1,C=y(k),P=I3(C,2),L=P[0],T=P[1],A=y(N),R=I3(A,1),I=R[0];if(!L&&!I&&(x=N+1),L&&I&&(_=N-1),!L&&I){w=T;break}S++}return w||m},D3=function(t){var n=wt(t)?[]:t.toString().split(JW);return[{words:n}]},oke=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!ld.isSsr){var c,u,f=eV({breakAll:o,children:i,style:a});if(f){var d=f.wordsWithComputedWidth,p=f.spaceWidth;c=d,u=p}else return D3(i);return ake({breakAll:o,children:i,maxLines:l,style:a},c,u,n,r)}return D3(i)},L3="#808080",Il=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,f=t.scaleToFit,d=f===void 0?!1:f,p=t.textAnchor,m=p===void 0?"start":p,b=t.verticalAnchor,v=b===void 0?"end":b,y=t.fill,x=y===void 0?L3:y,_=R3(t,ZEe),S=E.useMemo(function(){return oke({breakAll:_.breakAll,children:_.children,maxLines:_.maxLines,scaleToFit:d,style:_.style,width:_.width})},[_.breakAll,_.children,_.maxLines,d,_.style,_.width]),w=_.dx,N=_.dy,k=_.angle,C=_.className,P=_.breakAll,L=R3(_,JEe);if(!Fn(r)||!Fn(a))return null;var T=r+(qe(w)?w:0),A=a+(qe(N)?N:0),R;switch(v){case"start":R=Nj("calc(".concat(u,")"));break;case"middle":R=Nj("calc(".concat((S.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:R=Nj("calc(".concat(S.length-1," * -").concat(l,")"));break}var I=[];if(d){var M=S[0].width,B=_.width;I.push("scale(".concat((qe(B)?B/M:1)/M,")"))}return k&&I.push("rotate(".concat(k,", ").concat(T,", ").concat(A,")")),I.length&&(L.transform=I.join(" ")),ne.createElement("text",ak({},dt(L,!0),{x:T,y:A,className:gt("recharts-text",C),textAnchor:m,fill:x.includes("url")?L3:x}),S.map(function(W,G){var H=W.words.join(P?"":" ");return ne.createElement("tspan",{x:T,dy:G===0?R:l,key:"".concat(H,"-").concat(G)},H)}))};function ds(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ske(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function PA(e){let t,n,r;e.length!==2?(t=ds,n=(l,c)=>ds(e(l),c),r=(l,c)=>e(l)-c):(t=e===ds||e===ske?e:lke,n=e,r=e);function i(l,c,u=0,f=l.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function a(l,c,u=0,f=l.length){if(u<f){if(t(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:o,right:a}}function lke(){return 0}function tV(e){return e===null?NaN:+e}function*cke(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const uke=PA(ds),Ip=uke.right;PA(tV).center;class $3 extends Map{constructor(t,n=hke){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(F3(this,t))}has(t){return super.has(F3(this,t))}set(t,n){return super.set(dke(this,t),n)}delete(t){return super.delete(fke(this,t))}}function F3({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function dke({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function fke({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function hke(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pke(e=ds){if(e===ds)return nV;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 nV(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const mke=Math.sqrt(50),gke=Math.sqrt(10),vke=Math.sqrt(2);function Wv(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=mke?10:a>=gke?5:a>=vke?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,i)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?Wv(e,t,n*2):[l,c,u]}function ok(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Wv(t,e,n):Wv(e,t,n);if(!(a>=i))return[];const l=a-i+1,c=new Array(l);if(r)if(o<0)for(let u=0;u<l;++u)c[u]=(a-u)/-o;else for(let u=0;u<l;++u)c[u]=(a-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(i+u)/-o;else for(let u=0;u<l;++u)c[u]=(i+u)*o;return c}function sk(e,t,n){return t=+t,e=+e,n=+n,Wv(e,t,n)[2]}function lk(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?sk(t,e,n):sk(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function B3(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function q3(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}
794function rV(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?nV:pke(i);r>n;){if(r-n>600){const c=r-n+1,u=t-n+1,f=Math.log(c),d=.5*Math.exp(2*f/3),p=.5*Math.sqrt(f*d*(c-d)/c)*(u-c/2<0?-1:1),m=Math.max(n,Math.floor(t-u*d/c+p)),b=Math.min(r,Math.floor(t+(c-u)*d/c+p));rV(e,t,m,b,i)}const a=e[t];let o=n,l=r;for(gf(e,n,t),i(e[r],a)>0&&gf(e,n,r);o<l;){for(gf(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?gf(e,n,l):(++l,gf(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function gf(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function yke(e,t,n){if(e=Float64Array.from(cke(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return q3(e);if(t>=1)return B3(e);var r,i=(r-1)*t,a=Math.floor(i),o=B3(rV(e,a).subarray(0,a+1)),l=q3(e.subarray(a+1));return o+(l-o)*(i-a)}}function xke(e,t,n=tV){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,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function bke(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,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function qi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function wo(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 ck=Symbol("implicit");function TA(){var e=new $3,t=[],n=[],r=ck;function i(a){let o=e.get(a);if(o===void 0){if(r!==ck)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new $3;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return TA(t,n).unknown(r)},qi.apply(i,arguments),i}function Nh(){var e=TA().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,c=0,u=0,f=.5;delete e.unknown;function d(){var p=t().length,m=i<r,b=m?i:r,v=m?r:i;a=(v-b)/Math.max(1,p-c+u*2),l&&(a=Math.floor(a)),b+=(v-b-a*(p-c))*f,o=a*(1-c),l&&(b=Math.round(b),o=Math.round(o));var y=bke(p).map(function(x){return b+a*x});return n(m?y.reverse():y)}return e.domain=function(p){return arguments.length?(t(p),d()):t()},e.range=function(p){return arguments.length?([r,i]=p,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(p){return[r,i]=p,r=+r,i=+i,l=!0,d()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(p){return arguments.length?(l=!!p,d()):l},e.padding=function(p){return arguments.length?(c=Math.min(1,u=+p),d()):c},e.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),d()):c},e.paddingOuter=function(p){return arguments.length?(u=+p,d()):u},e.align=function(p){return arguments.length?(f=Math.max(0,Math.min(1,p)),d()):f},e.copy=function(){return Nh(t(),[r,i]).round(l).paddingInner(c).paddingOuter(u).align(f)},qi.apply(d(),arguments)}function iV(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return iV(t())},e}function Hf(){return iV(Nh.apply(null,arguments).paddingInner(1))}function RA(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function aV(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Mp(){}var Eh=.7,Vv=1/Eh,Wc="\\s*([+-]?\\d+)\\s*",kh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wke=/^#([0-9a-f]{3,8})$/,_ke=new RegExp(`^rgb\\(${Wc},${Wc},${Wc}\\)$`),Ske=new RegExp(`^rgb\\(${Pa},${Pa},${Pa}\\)$`),jke=new RegExp(`^rgba\\(${Wc},${Wc},${Wc},${kh}\\)$`),Nke=new RegExp(`^rgba\\(${Pa},${Pa},${Pa},${kh}\\)$`),Eke=new RegExp(`^hsl\\(${kh},${Pa},${Pa}\\)$`),kke=new RegExp(`^hsla\\(${kh},${Pa},${Pa},${kh}\\)$`),U3={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};RA(Mp,Oh,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:z3,formatHex:z3,formatHex8:Oke,formatHsl:Cke,formatRgb:H3,toString:H3});function z3(){return this.rgb().formatHex()}function Oke(){return this.rgb().formatHex8()}function Cke(){return oV(this).formatHsl()}function H3(){return this.rgb().formatRgb()}function Oh(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wke.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?W3(t):n===3?new Br(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wg(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wg(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=_ke.exec(e))?new Br(t[1],t[2],t[3],1):(t=Ske.exec(e))?new Br(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jke.exec(e))?wg(t[1],t[2],t[3],t[4]):(t=Nke.exec(e))?wg(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Eke.exec(e))?K3(t[1],t[2]/100,t[3]/100,1):(t=kke.exec(e))?K3(t[1],t[2]/100,t[3]/100,t[4]):U3.hasOwnProperty(e)?W3
vendor: 4,730 bytes, line 794
794(U3[e]):e==="transparent"?new Br(NaN,NaN,NaN,0):null}function W3(e){return new Br(e>>16&255,e>>8&255,e&255,1)}function wg(e,t,n,r){return r<=0&&(e=t=n=NaN),new Br(e,t,n,r)}function Ake(e){return e instanceof Mp||(e=Oh(e)),e?(e=e.rgb(),new Br(e.r,e.g,e.b,e.opacity)):new Br}function uk(e,t,n,r){return arguments.length===1?Ake(e):new Br(e,t,n,r??1)}function Br(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}RA(Br,uk,aV(Mp,{brighter(e){return e=e==null?Vv:Math.pow(Vv,e),new Br(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Eh:Math.pow(Eh,e),new Br(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Br(wl(this.r),wl(this.g),wl(this.b),Gv(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:V3,formatHex:V3,formatHex8:Pke,formatRgb:G3,toString:G3}));function V3(){return`#${ll(this.r)}${ll(this.g)}${ll(this.b)}`}function Pke(){return`#${ll(this.r)}${ll(this.g)}${ll(this.b)}${ll((isNaN(this.opacity)?1:this.opacity)*255)}`}function G3(){const e=Gv(this.opacity);return`${e===1?"rgb(":"rgba("}${wl(this.r)}, ${wl(this.g)}, ${wl(this.b)}${e===1?")":`, ${e})`}`}function Gv(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function wl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ll(e){return e=wl(e),(e<16?"0":"")+e.toString(16)}function K3(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ia(e,t,n,r)}function oV(e){if(e instanceof ia)return new ia(e.h,e.s,e.l,e.opacity);if(e instanceof Mp||(e=Oh(e)),!e)return new ia;if(e instanceof ia)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,c=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=c<.5?a+i:2-a-i,o*=60):l=c>0&&c<1?0:o,new ia(o,l,c,e.opacity)}function Tke(e,t,n,r){return arguments.length===1?oV(e):new ia(e,t,n,r??1)}function ia(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}RA(ia,Tke,aV(Mp,{brighter(e){return e=e==null?Vv:Math.pow(Vv,e),new ia(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Eh:Math.pow(Eh,e),new ia(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 Br(Ej(e>=240?e-240:e+120,i,r),Ej(e,i,r),Ej(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new ia(Y3(this.h),_g(this.s),_g(this.l),Gv(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=Gv(this.opacity);return`${e===1?"hsl(":"hsla("}${Y3(this.h)}, ${_g(this.s)*100}%, ${_g(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Y3(e){return e=(e||0)%360,e<0?e+360:e}function _g(e){return Math.max(0,Math.min(1,e||0))}function Ej(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 IA=e=>()=>e;function Rke(e,t){return function(n){return e+n*t}}function Ike(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 Mke(e){return(e=+e)==1?sV:function(t,n){return n-t?Ike(t,n,e):IA(isNaN(t)?n:t)}}function sV(e,t){var n=t-e;return n?Rke(e,n):IA(isNaN(e)?t:e)}const Q3=(function e(t){var n=Mke(t);function r(i,a){var o=n((i=uk(i)).r,(a=uk(a)).r),l=n(i.g,a.g),c=n(i.b,a.b),u=sV(i.opacity,a.opacity);return function(f){return i.r=o(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=e,r})(1);function Dke(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Lke(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $ke(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=cd(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function Fke(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Kv(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Bke(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]=cd(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var dk=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,kj=new RegExp(dk.source,"g");function qke(e){return function(){return e}}function Uke(e){return function(t){return e(t)+""}}function zke(e,t){var n=dk.lastIndex=kj.lastIndex=0,r,i,a,o=-1,l=[],c=[];for(e=e+"",t=t+"";(r=dk.exec(e))&&(i=kj.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,c.push({i:o,x:Kv(r,i)}
vendor: 9,096 bytes, line 794
794)),n=kj.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?c[0]?Uke(c[0].x):qke(t):(t=c.length,function(u){for(var f=0,d;f<t;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function cd(e,t){var n=typeof t,r;return t==null||n==="boolean"?IA(t):(n==="number"?Kv:n==="string"?(r=Oh(t))?(t=r,Q3):zke:t instanceof Oh?Q3:t instanceof Date?Fke:Lke(t)?Dke:Array.isArray(t)?$ke:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Bke:Kv)(e,t)}function MA(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function Hke(e,t){t===void 0&&(t=e,e=cd);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}function Wke(e){return function(){return e}}function Yv(e){return+e}var X3=[0,1];function kr(e){return e}function fk(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:Wke(isNaN(t)?NaN:.5)}function Vke(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Gke(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=fk(i,r),a=n(o,a)):(r=fk(r,i),a=n(a,o)),function(l){return a(r(l))}}function Kke(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=fk(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var c=Ip(e,l,1,r)-1;return a[c](i[c](l))}}function Dp(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Lx(){var e=X3,t=X3,n=cd,r,i,a,o=kr,l,c,u;function f(){var p=Math.min(e.length,t.length);return o!==kr&&(o=Vke(e[0],e[p-1])),l=p>2?Kke:Gke,c=u=null,d}function d(p){return p==null||isNaN(p=+p)?a:(c||(c=l(e.map(r),t,n)))(r(o(p)))}return d.invert=function(p){return o(i((u||(u=l(t,e.map(r),Kv)))(p)))},d.domain=function(p){return arguments.length?(e=Array.from(p,Yv),f()):e.slice()},d.range=function(p){return arguments.length?(t=Array.from(p),f()):t.slice()},d.rangeRound=function(p){return t=Array.from(p),n=MA,f()},d.clamp=function(p){return arguments.length?(o=p?!0:kr,f()):o!==kr},d.interpolate=function(p){return arguments.length?(n=p,f()):n},d.unknown=function(p){return arguments.length?(a=p,d):a},function(p,m){return r=p,i=m,f()}}function DA(){return Lx()(kr,kr)}function Yke(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Qv(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 bu(e){return e=Qv(Math.abs(e)),e?e[1]:NaN}function Qke(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),a.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function Xke(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Zke=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ch(e){if(!(t=Zke.exec(e)))throw new Error("invalid format: "+e);var t;return new LA({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]})}Ch.prototype=LA.prototype;function LA(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+""}LA.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 Jke(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 lV;function eOe(e,t){var n=Qv(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(lV=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Qv(e,Math.max(0,t+a-1))[0]}function Z3(e,t){var n=Qv(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 J3={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Yke,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)=>Z3(e*100,t),r:Z3,s:eOe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function e$(e){return e}var t$=Array.prototype.map,n$=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tOe(e){var t=e.grouping===void 0||e.thousands===void 0?e$:Qke(t$.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+"",a=e.numerals===void 0?e$:Xke(t$.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Ch(d);var p=d.fill,m=d.align,b=d.sign,v=d.symbol,y=d.zero,x=d.width,_=d.comma,S=d.precision,w=d.trim,N=d.type;N==="n"?(_=!0,N="g"):J3[N]||(S===void 0&&(S=12),w=!0,N="g"),(y||p==="0"&&m==="=")&&(y=!0,p="0",m="=");var k=v==="$"?n:v==="#"&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",C=v==="$"?r:/[%p]/.test(N)?o:"",P=J3[N],L=/[defgprs%]/.test(N);S=S===void 0?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function T(A){var R=k,I=C,M,B,W;if(N==="c")I=P(A)+I,A="";else{A=+A;var G=A<0||1/A<0;if(A=isNaN(A)?c:P(Math.abs(A),S),w&&(A=Jke(A)),G&&+A==0&&b!=="+"&&(G=!1),R=(G?b==="("?b:l:b==="-"||b==="("?"":b)+R,I=(N==="s"?n$[8+lV/3]:"")+I+(G&&b==="("?")":""),L){for(M=-1,B=A.length;++M<B;)if(W=A.charCodeAt(M),48>W||W>57){I=(W===46?i+A.slice(M+1):A.slice(M))+I,A=A.slice(0,M);break}}}_&&!y&&(A=t(A,1/0));var H=R.length+A.length+I.length,K=H<x?new Array(x-H+1).join(p):"";switch(_&&y&&(A=t(K+A,K.length?x-I.length:1/0),K=""),m){case"<":A=R+A+I+K;break;case"=":A=R+K+A+I;break;case"^":A=K.slice(0,H=K.length>>1)+R+A+I+K.slice(H);break;default:A=K+R+A+I;break}return a(A)}return T.toString=function(){return d+""},T}function f(d,p){var m=u((d=Ch(d),d.type="f",d)),b=Math.max(-8,Math.min(8,Math.floor(bu(p)/3)))*3,v=Math.pow(10,-b),y=n$[8+b/3];return function(x){return m(v*x)+y}}return{format:u,formatPrefix:f}}var Sg,$A,cV;nOe({thousands:",",grouping:[3],currency:["$",""]});function nOe(e){return Sg=tOe(e),$A=Sg.format,cV=Sg.formatPrefix,Sg}function rOe(e){return Math.max(0,-bu(Math.abs(e)))}function iOe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(bu(t)/3)))*3-bu(Math.abs(e)))}function aOe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,bu(t)-bu(e))+1}function uV(e,t,n,r){var i=lk(e,t,n),a;switch(r=Ch(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=iOe(i,o))&&(r.precision=a),cV(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=aOe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=rOe(i))&&(r.precision=a-(r.type==="%")*2);break}}return $A(r)}function Cs(e){var t=e.domain;return e.ticks=function(n){var r=t();return ok(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return uV(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],c,u,f=10;for(l<o&&(u=o,o=l,l=u,u=i,i=a,a=u);f-- >0;){if(u=sk(o,l,n),u===c)return r[i]=o,r[a]=l,t(r);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function Xv(){var e=DA();return e.copy=function(){return Dp(e,Xv())},qi.apply(e,arguments),Cs(e)}function dV(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,Yv),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return dV(e).unknown(t)},e=arguments.length?Array.from(e,Yv):[0,1],Cs(n)}function fV(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function r$(e){return Math.log(e)}function i$(e){return Math.exp(e)}function oOe(e){return-Math.log(-e)}function sOe(e){return-Math.exp(-e)}function lOe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function cOe(e){return e===10?lOe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function uOe(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 a$(e){return(t,n)=>-e(-t,n)}function FA(e){const t=e(r$,i$),n=t.domain;let r=10,i,a;
vendor: 4,731 bytes, line 794
794function o(){return i=uOe(r),a=cOe(r),n()[0]<0?(i=a$(i),a=a$(a),e(oOe,sOe)):e(r$,i$),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let p=i(u),m=i(f),b,v;const y=l==null?10:+l;let x=[];if(!(r%1)&&m-p<y){if(p=Math.floor(p),m=Math.ceil(m),u>0){for(;p<=m;++p)for(b=1;b<r;++b)if(v=p<0?b/a(-p):b*a(p),!(v<u)){if(v>f)break;x.push(v)}}else for(;p<=m;++p)for(b=r-1;b>=1;--b)if(v=p>0?b/a(-p):b*a(p),!(v<u)){if(v>f)break;x.push(v)}x.length*2<y&&(x=ok(u,f,y))}else x=ok(p,m,Math.min(m-p,y)).map(a);return d?x.reverse():x},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Ch(c)).precision==null&&(c.trim=!0),c=$A(c)),l===1/0)return c;const u=Math.max(1,r*l/t.ticks().length);return f=>{let d=f/a(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},t.nice=()=>n(fV(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function hV(){const e=FA(Lx()).domain([1,10]);return e.copy=()=>Dp(e,hV()).base(e.base()),qi.apply(e,arguments),e}function o$(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function s$(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function BA(e){var t=1,n=e(o$(t),s$(t));return n.constant=function(r){return arguments.length?e(o$(t=+r),s$(t)):t},Cs(n)}function pV(){var e=BA(Lx());return e.copy=function(){return Dp(e,pV()).constant(e.constant())},qi.apply(e,arguments)}function l$(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dOe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fOe(e){return e<0?-e*e:e*e}function qA(e){var t=e(kr,kr),n=1;function r(){return n===1?e(kr,kr):n===.5?e(dOe,fOe):e(l$(n),l$(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Cs(t)}function UA(){var e=qA(Lx());return e.copy=function(){return Dp(e,UA()).exponent(e.exponent())},qi.apply(e,arguments),e}function hOe(){return UA.apply(null,arguments).exponent(.5)}function c$(e){return Math.sign(e)*e*e}function pOe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function mV(){var e=DA(),t=[0,1],n=!1,r;function i(a){var o=pOe(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(c$(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Yv)).map(c$)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return mV(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},qi.apply(i,arguments),Cs(i)}function gV(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=xke(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Ip(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(ds),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return gV().domain(e).range(t).unknown(r)},qi.apply(a,arguments)}function vV(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(c){return c!=null&&c<=c?i[Ip(r,c,0,n)]:a}function l(){var c=-1;for(r=new Array(n);++c<n;)r[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(i=Array.from(c)).length-1,l()):i.slice()},o.invertExtent=function(c){var u=i.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},o.unknown=function(c){return arguments.length&&(a=c),o},o.thresholds=function(){return r.slice()},o.copy=function(){return vV().domain([e,t]).range(i).unknown(a)},qi.apply(Cs(o),arguments)}function yV(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Ip(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return yV().domain(e).range(t).unknown(n)},qi.apply(i,arguments)}
vendor: 5,736 bytes, line 794
794const Oj=new Date,Cj=new Date;function Bn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const c=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return c;let u;do c.push(u=new Date(+a)),t(a,l),e(a);while(u<a&&a<o);return c},i.filter=a=>Bn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Oj.setTime(+a),Cj.setTime(+o),e(Oj),e(Cj),Math.floor(n(Oj,Cj))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Zv=Bn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Zv.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Zv);Zv.range;const ao=1e3,Ti=ao*60,oo=Ti*60,mo=oo*24,zA=mo*7,u$=mo*30,Aj=mo*365,cl=Bn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ao)},(e,t)=>(t-e)/ao,e=>e.getUTCSeconds());cl.range;const HA=Bn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ao)},(e,t)=>{e.setTime(+e+t*Ti)},(e,t)=>(t-e)/Ti,e=>e.getMinutes());HA.range;const WA=Bn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ti)},(e,t)=>(t-e)/Ti,e=>e.getUTCMinutes());WA.range;const VA=Bn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ao-e.getMinutes()*Ti)},(e,t)=>{e.setTime(+e+t*oo)},(e,t)=>(t-e)/oo,e=>e.getHours());VA.range;const GA=Bn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*oo)},(e,t)=>(t-e)/oo,e=>e.getUTCHours());GA.range;const Lp=Bn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ti)/mo,e=>e.getDate()-1);Lp.range;const $x=Bn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/mo,e=>e.getUTCDate()-1);$x.range;const xV=Bn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/mo,e=>Math.floor(e/mo));xV.range;function zl(e){return Bn(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())*Ti)/zA)}const Fx=zl(0),Jv=zl(1),mOe=zl(2),gOe=zl(3),wu=zl(4),vOe=zl(5),yOe=zl(6);Fx.range;Jv.range;mOe.range;gOe.range;wu.range;vOe.range;yOe.range;function Hl(e){return Bn(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)/zA)}const Bx=Hl(0),ey=Hl(1),xOe=Hl(2),bOe=Hl(3),_u=Hl(4),wOe=Hl(5),_Oe=Hl(6);Bx.range;ey.range;xOe.range;bOe.range;_u.range;wOe.range;_Oe.range;const KA=Bn(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());KA.range;const YA=Bn(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());YA.range;const go=Bn(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());go.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bn(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)});go.range;const vo=Bn(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());vo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Bn(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)});vo.range;function bV(e,t,n,r,i,a){const o=[[cl,1,ao],[cl,5,5*ao],[cl,15,15*ao],[cl,30,30*ao],[a,1,Ti],[a,5,5*Ti],[a,15,15*Ti],[a,30,30*Ti],[i,1,oo],[i,3,3*oo],[i,6,6*oo],[i,12,12*oo],[r,1,mo],[r,2,2*mo],[n,1,zA],[t,1,u$],[t,3,3*u$],[e,1,Aj]];function l(u,f,d){const p=f<u;p&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),b=m?m.range(u,+f+1):[];return p?b.reverse():b}function c(u,f,d){const p=Math.abs(f-u)/d,m=PA(([,,y])=>y).right(o,p);if(m===o.length)return e.every(lk(u/Aj,f/Aj,d));if(m===0)return Zv.every(Math.max(lk(u,f,d),1));const[b,v]=o[p/o[m-1][2]<o[m][2]/p?m-1:m];return b.every(v)}return[l,c]}const[SOe,jOe]=bV(vo,YA,Bx,xV,GA,WA),[NOe,EOe]=bV(go,KA,Fx,Lp,VA,HA);function Pj(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 Tj(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 vf(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kOe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=yf(i),f=xf(i),d=yf(a),p=xf(a),m=yf(o),b=xf(o),v=yf(l),y=xf(l),x=yf(c),_=xf(c),S={a:G,A:H,b:K,B:$,c:null,d:g$,e:g$,f:QOe,g:oCe,G:lCe,H:GOe,I:KOe,j:YOe,L:wV,m:XOe,M:ZOe,p:F,q:z,Q:x$,s:b$,S:JOe,u:eCe,U:tCe,V:nCe,w:rCe,W:iCe,x:null,X:null,y:aCe,Y:sCe,Z:cCe,"%":y$},w={a:U,A:ee,b:re,B:X,c:null,d:v$,e:v$,f:hCe,g:SCe,G:NCe,H:uCe,I:dCe,j:fCe,L:SV,m:pCe,M:mCe,p:Z,q:ie,Q:x$,s:b$,S:gCe,u:vCe,U:yCe,V:xCe,w:bCe,W:wCe,x:null,X:null,y:_Ce,Y:jCe,Z:ECe,"%":y$},N={a:T,A,b:R,B:I,c:M,d:p$,e:p$,f:zOe,g:h$,G:f$,H:m$,I:m$,j:FOe,L:UOe,m:$Oe,M:BOe,p:L,q:LOe,Q:WOe,s:VOe,S:qOe,u:TOe,U:ROe,V:IOe,w:POe,W:MOe,x:B,X:W,y:h$,Y:f$,Z:DOe,"%":HOe};
vendor: 7,735 bytes, line 794
794S.x=k(n,S),S.X=k(r,S),S.c=k(t,S),w.x=k(n,w),w.X=k(r,w),w.c=k(t,w);function k(Y,J){return function(se){var V=[],fe=-1,ce=0,Ne=Y.length,me,je,te;for(se instanceof Date||(se=new Date(+se));++fe<Ne;)Y.charCodeAt(fe)===37&&(V.push(Y.slice(ce,fe)),(je=d$[me=Y.charAt(++fe)])!=null?me=Y.charAt(++fe):je=me==="e"?" ":"0",(te=J[me])&&(me=te(se,je)),V.push(me),ce=fe+1);return V.push(Y.slice(ce,fe)),V.join("")}}function C(Y,J){return function(se){var V=vf(1900,void 0,1),fe=P(V,Y,se+="",0),ce,Ne;if(fe!=se.length)return null;if("Q"in V)return new Date(V.Q);if("s"in V)return new Date(V.s*1e3+("L"in V?V.L:0));if(J&&!("Z"in V)&&(V.Z=0),"p"in V&&(V.H=V.H%12+V.p*12),V.m===void 0&&(V.m="q"in V?V.q:0),"V"in V){if(V.V<1||V.V>53)return null;"w"in V||(V.w=1),"Z"in V?(ce=Tj(vf(V.y,0,1)),Ne=ce.getUTCDay(),ce=Ne>4||Ne===0?ey.ceil(ce):ey(ce),ce=$x.offset(ce,(V.V-1)*7),V.y=ce.getUTCFullYear(),V.m=ce.getUTCMonth(),V.d=ce.getUTCDate()+(V.w+6)%7):(ce=Pj(vf(V.y,0,1)),Ne=ce.getDay(),ce=Ne>4||Ne===0?Jv.ceil(ce):Jv(ce),ce=Lp.offset(ce,(V.V-1)*7),V.y=ce.getFullYear(),V.m=ce.getMonth(),V.d=ce.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Ne="Z"in V?Tj(vf(V.y,0,1)).getUTCDay():Pj(vf(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Ne+5)%7:V.w+V.U*7-(Ne+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Tj(V)):Pj(V)}}function P(Y,J,se,V){for(var fe=0,ce=J.length,Ne=se.length,me,je;fe<ce;){if(V>=Ne)return-1;if(me=J.charCodeAt(fe++),me===37){if(me=J.charAt(fe++),je=N[me in d$?J.charAt(fe++):me],!je||(V=je(Y,se,V))<0)return-1}else if(me!=se.charCodeAt(V++))return-1}return V}function L(Y,J,se){var V=u.exec(J.slice(se));return V?(Y.p=f.get(V[0].toLowerCase()),se+V[0].length):-1}function T(Y,J,se){var V=m.exec(J.slice(se));return V?(Y.w=b.get(V[0].toLowerCase()),se+V[0].length):-1}function A(Y,J,se){var V=d.exec(J.slice(se));return V?(Y.w=p.get(V[0].toLowerCase()),se+V[0].length):-1}function R(Y,J,se){var V=x.exec(J.slice(se));return V?(Y.m=_.get(V[0].toLowerCase()),se+V[0].length):-1}function I(Y,J,se){var V=v.exec(J.slice(se));return V?(Y.m=y.get(V[0].toLowerCase()),se+V[0].length):-1}function M(Y,J,se){return P(Y,t,J,se)}function B(Y,J,se){return P(Y,n,J,se)}function W(Y,J,se){return P(Y,r,J,se)}function G(Y){return o[Y.getDay()]}function H(Y){return a[Y.getDay()]}function K(Y){return c[Y.getMonth()]}function $(Y){return l[Y.getMonth()]}function F(Y){return i[+(Y.getHours()>=12)]}function z(Y){return 1+~~(Y.getMonth()/3)}function U(Y){return o[Y.getUTCDay()]}function ee(Y){return a[Y.getUTCDay()]}function re(Y){return c[Y.getUTCMonth()]}function X(Y){return l[Y.getUTCMonth()]}function Z(Y){return i[+(Y.getUTCHours()>=12)]}function ie(Y){return 1+~~(Y.getUTCMonth()/3)}return{format:function(Y){var J=k(Y+="",S);return J.toString=function(){return Y},J},parse:function(Y){var J=C(Y+="",!1);return J.toString=function(){return Y},J},utcFormat:function(Y){var J=k(Y+="",w);return J.toString=function(){return Y},J},utcParse:function(Y){var J=C(Y+="",!0);return J.toString=function(){return Y},J}}}var d$={"-":"",_:" ",0:"0"},Qn=/^\s*\d+/,OOe=/^%/,COe=/[\\^$*+?|[\]().{}]/g;function Ft(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function AOe(e){return e.replace(COe,"\\$&")}function yf(e){return new RegExp("^(?:"+e.map(AOe).join("|")+")","i")}function xf(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function POe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function TOe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ROe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function IOe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function MOe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function f$(e,t,n){var r=Qn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function h$(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function DOe(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 LOe(e,t,n){var r=Qn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function $Oe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function p$(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function FOe(e,t,n){var r=Qn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function m$(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function BOe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function qOe(e,t,n){var r=Qn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function UOe(e,t,n){var r=Qn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function zOe(e,t,n){var r=Qn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function HOe(e,t,n){var r=OOe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function WOe(e,t,n){var r=Qn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function VOe(e,t,n){var r=Qn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function g$(e,t){return Ft(e.getDate(),t,2)}function GOe(e,t){return Ft(e.getHours(),t,2)}function KOe(e,t){return Ft(e.getHours()%12||12,t,2)}function YOe(e,t){return Ft(1+Lp.count(go(e),e),t,3)}function wV(e,t){return Ft(e.getMilliseconds(),t,3)}function QOe(e,t){return wV(e,t)+"000"}function XOe(e,t){return Ft(e.getMonth()+1,t,2)}function ZOe(e,t){return Ft(e.getMinutes(),t,2)}function JOe(e,t){return Ft(e.getSeconds(),t,2)}function eCe(e){var t=e.getDay();return t===0?7:t}function tCe(e,t){return Ft(Fx.count(go(e)-1,e),t,2)}function _V(e){var t=e.getDay();return t>=4||t===0?wu(e):wu.ceil(e)}function nCe(e,t){return e=_V(e),Ft(wu.count(go(e),e)+(go(e).getDay()===4),t,2)}function rCe(e){return e.getDay()}function iCe(e,t){return Ft(Jv.count(go(e)-1,e),t,2)}function aCe(e,t){return Ft(e.getFullYear()%100,t,2)}function oCe(e,t){return e=_V(e),Ft(e.getFullYear()%100,t,2)}function sCe(e,t){return Ft(e.getFullYear()%1e4,t,4)}function lCe(e,t){var n=e.getDay();return e=n>=4||n===0?wu(e):wu.ceil(e),Ft(e.getFullYear()%1e4,t,4)}function cCe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ft(t/60|0,"0",2)+Ft(t%60,"0",2)}function v$(e,t){return Ft(e.getUTCDate(),t,2)}function uCe(e,t){return Ft(e.getUTCHours(),t,2)}function dCe(e,t){return Ft(e.getUTCHours()%12||12,t,2)}function fCe(e,t){return Ft(1+$x.count(vo(e),e),t,3)}function SV(e,t){return Ft(e.getUTCMilliseconds(),t,3)}function hCe(e,t){return SV(e,t)+"000"}function pCe(e,t){return Ft(e.getUTCMonth()+1,t,2)}function mCe(e,t){return Ft(e.getUTCMinutes(),t,2)}function gCe(e,t){return Ft(e.getUTCSeconds(),t,2)}function vCe(e){var t=e.getUTCDay();return t===0?7:t}function yCe(e,t){return Ft(Bx.count(vo(e)-1,e),t,2)}function jV(e){var t=e.getUTCDay();return t>=4||t===0?_u(e):_u.ceil(e)}function xCe(e,t){return e=jV(e),Ft(_u.count(vo(e),e)+(vo(e).getUTCDay()===4),t,2)}function bCe(e){return e.getUTCDay()}function wCe(e,t){return Ft(ey.count(vo(e)-1,e),t,2)}function _Ce(e,t){return Ft(e.getUTCFullYear()%100,t,2)}function SCe(e,t){return e=jV(e),Ft(e.getUTCFullYear()%100,t,2)}function jCe(e,t){return Ft(e.getUTCFullYear()%1e4,t,4)}function NCe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?_u(e):_u.ceil(e),Ft(e.getUTCFullYear()%1e4,t,4)}function ECe(){return"+0000"}function y$(){return"%"}function x$(e){return+e}function b$(e){return Math.floor(+e/1e3)}var kc,NV,EV;kCe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
794ay","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 kCe(e){return kc=kOe(e),NV=kc.format,kc.parse,EV=kc.utcFormat,kc.utcParse,kc}function OCe(e){return new Date(e)}function CCe(e){return e instanceof Date?+e:+new Date(+e)}function QA(e,t,n,r,i,a,o,l,c,u){var f=DA(),d=f.invert,p=f.domain,m=u(".%L"),b=u(":%S"),v=u("%I:%M"),y=u("%I %p"),x=u("%a %d"),_=u("%b %d"),S=u("%B"),w=u("%Y");function N(k){return(c(k)<k?m:l(k)<k?b:o(k)<k?v:a(k)<k?y:r(k)<k?i(k)<k?x:_:n(k)<k?S:w)(k)}return f.invert=function(k){return new Date(d(k))},f.domain=function(k){return arguments.length?p(Array.from(k,CCe)):p().map(OCe)},f.ticks=function(k){var C=p();return e(C[0],C[C.length-1],k??10)},f.tickFormat=function(k,C){return C==null?N:u(C)},f.nice=function(k){var C=p();return(!k||typeof k.range!="function")&&(k=t(C[0],C[C.length-1],k??10)),k?p(fV(C,k)):f},f.copy=function(){return Dp(f,QA(e,t,n,r,i,a,o,l,c,u))},f}function ACe(){return qi.apply(QA(NOe,EOe,go,KA,Fx,Lp,VA,HA,cl,NV).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function PCe(){return qi.apply(QA(SOe,jOe,vo,YA,Bx,$x,GA,WA,cl,EV).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function qx(){var e=0,t=1,n,r,i,a,o=kr,l=!1,c;function u(d){return d==null||isNaN(d=+d)?c:o(i===0?.5:(d=(a(d)-n)*i,l?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(l=!!d,u):l},u.interpolator=function(d){return arguments.length?(o=d,u):o};function f(d){return function(p){var m,b;return arguments.length?([m,b]=p,o=d(m,b),u):[o(0),o(1)]}}return u.range=f(cd),u.rangeRound=f(MA),u.unknown=function(d){return arguments.length?(c=d,u):c},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function As(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function kV(){var e=Cs(qx()(kr));return e.copy=function(){return As(e,kV())},wo.apply(e,arguments)}function OV(){var e=FA(qx()).domain([1,10]);return e.copy=function(){return As(e,OV()).base(e.base())},wo.apply(e,arguments)}function CV(){var e=BA(qx());return e.copy=function(){return As(e,CV()).constant(e.constant())},wo.apply(e,arguments)}function XA(){var e=qA(qx());return e.copy=function(){return As(e,XA()).exponent(e.exponent())},wo.apply(e,arguments)}function TCe(){return XA.apply(null,arguments).exponent(.5)}function AV(){var e=[],t=kr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Ip(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(ds),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,a)=>yke(e,a/r))},n.copy=function(){return AV(t).domain(e)},wo.apply(n,arguments)}function Ux(){var e=0,t=.5,n=1,r=1,i,a,o,l,c,u=kr,f,d=!1,p;function m(v){return isNaN(v=+v)?p:(v=.5+((v=+f(v))-a)*(r*v<r*a?l:c),u(d?Math.max(0,Math.min(1,v)):v))}m.domain=function(v){return arguments.length?([e,t,n]=v,i=f(e=+e),a=f(t=+t),o=f(n=+n),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,m):[e,t,n]},m.clamp=function(v){return arguments.length?(d=!!v,m):d},m.interpolator=function(v){return arguments.length?(u=v,m):u};function b(v){return function(y){var x,_,S;return arguments.length?([x,_,S]=y,u=Hke(v,[x,_,S]),m):[u(0),u(.5),u(1)]}}return m.range=b(cd),m.rangeRound=b(MA),m.unknown=function(v){return arguments.length?(p=v,m):p},function(v){return f=v,i=v(e),a=v(t),o=v(n),l=i===a?0:.5/(a-i),c=a===o?0:.5/(o-a),r=a<i?-1:1,m}}function PV(){var e=Cs(Ux()(kr));return e.copy=function(){return As(e,PV())},wo.apply(e,arguments)}function TV(){var e=FA(Ux()).domain([.1,1,10]);return e.copy=function(){return As(e,TV()).base(e.base())},wo.apply(e,arguments)}function RV(){var e=BA(Ux());return e.copy=function(){return As(e,RV()).constant(e.constant())},wo.apply(e,arguments)}function ZA(){var e=qA(Ux());return e.copy=function(){return As(e,ZA()).exponent(e.exponent())},wo.apply(e,arguments)}function RCe(){return ZA.apply(null,arguments).exponent(.5)}const w$=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Nh,scaleDiverging:PV,scaleDivergingLog:TV,scaleDivergingPow:ZA,scaleDivergingSqrt:RCe,scaleDivergingSymlog:RV,scaleIdentity:dV,scaleImplicit:ck,scaleLinear:Xv,scaleLog:hV,scaleOrdinal:TA,scalePoint:Hf,scalePow:UA,scaleQuantile:gV,scaleQuantize:vV,scaleRadial:mV,scaleSequential:kV,scaleSequentialLog:OV,scaleSequentialPow:XA,scaleSequentialQuantile:AV,scaleSequentialSqrt:TCe,scaleSequentialSymlog:CV,scaleSqrt:hOe,scaleSymlog:pV,scaleThreshold:yV,scaleTime:ACe,scaleUtc:PCe,tickFormat:uV},Symbol.toStringTag,{value:"Module"}));var Rj,_$;function zx(){if(_$)return Rj;_$=1;var e=ad();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var l=n[a],c=r(l);
vendor: 69,406 bytes, lines 794-821
794if(c!=null&&(u===void 0?c===c&&!e(c):i(c,u)))var u=c,f=l}return f}return Rj=t,Rj}var Ij,S$;function IV(){if(S$)return Ij;S$=1;function e(t,n){return t>n}return Ij=e,Ij}var Mj,j$;function ICe(){if(j$)return Mj;j$=1;var e=zx(),t=IV(),n=sd();function r(i){return i&&i.length?e(i,n,t):void 0}return Mj=r,Mj}var MCe=ICe();const Hx=Mt(MCe);var Dj,N$;function MV(){if(N$)return Dj;N$=1;function e(t,n){return t<n}return Dj=e,Dj}var Lj,E$;function DCe(){if(E$)return Lj;E$=1;var e=zx(),t=MV(),n=sd();function r(i){return i&&i.length?e(i,n,t):void 0}return Lj=r,Lj}var LCe=DCe();const Wx=Mt(LCe);var $j,k$;function $Ce(){if(k$)return $j;k$=1;var e=xA(),t=za(),n=zW(),r=Kr();function i(a,o){var l=r(a)?e:n;return l(a,t(o,3))}return $j=i,$j}var Fj,O$;function FCe(){if(O$)return Fj;O$=1;var e=qW(),t=$Ce();function n(r,i){return e(t(r,i),1)}return Fj=n,Fj}var BCe=FCe();const qCe=Mt(BCe);var UCe=P9();const Vx=Mt(UCe);var ud=1e9,zCe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},eP,fn=!0,$i="[DecimalError] ",_l=$i+"Invalid argument: ",JA=$i+"Exponent out of range: ",dd=Math.floor,nl=Math.pow,HCe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ri,Wn=1e7,cn=7,DV=9007199254740991,ty=dd(DV/cn),Ye={};Ye.absoluteValue=Ye.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Ye.comparedTo=Ye.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};Ye.decimalPlaces=Ye.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*cn;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Ye.dividedBy=Ye.div=function(e){return fo(this,new this.constructor(e))};Ye.dividedToIntegerBy=Ye.idiv=function(e){var t=this,n=t.constructor;return Xt(fo(t,new n(e),0,1),n.precision)};Ye.equals=Ye.eq=function(e){return!this.cmp(e)};Ye.exponent=function(){return Rn(this)};Ye.greaterThan=Ye.gt=function(e){return this.cmp(e)>0};Ye.greaterThanOrEqualTo=Ye.gte=function(e){return this.cmp(e)>=0};Ye.isInteger=Ye.isint=function(){return this.e>this.d.length-2};Ye.isNegative=Ye.isneg=function(){return this.s<0};Ye.isPositive=Ye.ispos=function(){return this.s>0};Ye.isZero=function(){return this.s===0};Ye.lessThan=Ye.lt=function(e){return this.cmp(e)<0};Ye.lessThanOrEqualTo=Ye.lte=function(e){return this.cmp(e)<1};Ye.logarithm=Ye.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(ri))throw Error($i+"NaN");if(n.s<1)throw Error($i+(n.s?"NaN":"-Infinity"));return n.eq(ri)?new r(0):(fn=!1,t=fo(Ah(n,a),Ah(e,a),a),fn=!0,Xt(t,i))};Ye.minus=Ye.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?FV(t,e):LV(t,(e.s=-e.s,e))};Ye.modulo=Ye.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error($i+"NaN");return n.s?(fn=!1,t=fo(n,e,0,1).times(e),fn=!0,n.minus(t)):Xt(new r(n),i)};Ye.naturalExponential=Ye.exp=function(){return $V(this)};Ye.naturalLogarithm=Ye.ln=function(){return Ah(this)};Ye.negated=Ye.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Ye.plus=Ye.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?LV(t,e):FV(t,(e.s=-e.s,e))};Ye.precision=Ye.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(_l+e);if(t=Rn(i)+1,r=i.d.length-1,n=r*cn+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};Ye.squareRoot=Ye.sqrt=function(){var e,t,n,r,i,a,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error($i+"NaN")}for(e=Rn(l),fn=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=ka(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=dd((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 c(t)):r=new c(i.toString()),n=c.precision,i=o=n+3;;)if(a=r,r=a.plus(fo(l,a,o+2)).times(.5),ka(a.d).slice(0,o)===(t=ka(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Xt(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return fn=!0,Xt(r,n)};Ye.times=Ye.mul=function(e){var t,n,r,i,a,o,l,c,u,f=this,d=f.constructor,p=f.d,m=(e=new d(e)).d;if(!f.s||!e.s)return new d(0);for(e.s*=f.s,n=f.e+e.e,c=p.length,u=m.length,c<u&&(a=p,p=m,m=a,o=c,c=u,u=o),a=[],o=c+u,r=o;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,i=c+r;i>r;)l=a[i]+m[r]*p[i-r-1]+t,a[i--]=l%Wn|0,t=l/Wn|0;a[i]=(a[i]+t)%Wn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,fn?Xt(e,d.precision):e};Ye.toDecimalPlaces=Ye.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:($a(e,0,ud),t===void 0?t=r.rounding:$a(t,0,8),Xt(n,e+Rn(n)+1,t))};Ye.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Ml(r,!0):($a(e,0,ud),t===void 0?t=i.rounding:$a(t,0,8),r=Xt(new i(r),e+1,t),n=Ml(r,!0,e+1)),n};Ye.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Ml(i):($a(e,0,ud),t===void 0?t=a.rounding:$a(t,0,8),r=Xt(new a(i),e+Rn(i)+1,t),n=Ml(r.abs(),!1,e+Rn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Ye.toInteger=Ye.toint=function(){var e=this,t=e.constructor;return Xt(new t(e),Rn(e)+1,t.rounding)};Ye.toNumber=function(){return+this};Ye.toPower=Ye.pow=function(e){var t,n,r,i,a,o,l=this,c=l.constructor,u=12,f=+(e=new c(e));if(!e.s)return new c(ri);if(l=new c(l),!l.s){if(e.s<1)throw Error($i+"Infinity");return l}if(l.eq(ri))return l;if(r=c.precision,e.eq(ri))return Xt(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=f<0?-f:f)<=DV){for(i=new c(ri),t=Math.ceil(r/cn+4),fn=!1;n%2&&(i=i.times(l),A$(i.d,t)),n=dd(n/2),n!==0;)l=l.times(l),A$(l.d,t);return fn=!0,e.s<0?new c(ri).div(i):Xt(i,r)}}else if(a<0)throw Error($i+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,fn=!1,i=e.times(Ah(l,r+u)),fn=!0,i=$V(i),i.s=a,i};Ye.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=Rn(i),r=Ml(i,n<=a.toExpNeg||n>=a.toExpPos)):($a(e,1,ud),t===void 0?t=a.rounding:$a(t,0,8),i=Xt(new a(i),e,t),n=Rn(i),r=Ml(i,e<=n||n<=a.toExpNeg,e)),r};Ye.toSignificantDigits=Ye.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):($a(e,1,ud),t===void 0?t=r.rounding:$a(t,0,8)),Xt(new r(n),e,t)};Ye.toString=Ye.valueOf=Ye.val=Ye.toJSON=Ye[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Rn(e),n=e.constructor;return Ml(e,t<=n.toExpNeg||t>=n.toExpPos)};function LV(e,t){var n,r,i,a,o,l,c,u,f=e.constructor,d=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),fn?Xt(t,d):t;if(c=e.d,u=t.d,o=e.e,i=t.e,c=c.slice(),a=o-i,a){for(a<0?(r=c,a=-a,l=u.length):(r=u,i=o,l=c.length),o=Math.ceil(d/cn),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=c.length,a=u.length,l-a<0&&(a=l,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/Wn|0,c[a]%=Wn;for(n&&(c.unshift(n),++i),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=i,fn?Xt(t,d):t}function $a(e,t,n){if(e!==~~e||e<t||e>n)throw Error(_l+e)}function ka(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=cn-r.length,n&&(a+=Go(n)),a+=r;o=e[t],r=o+"",n=cn-r.length,n&&(a+=Go(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var fo=(function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%Wn|0,o=a/Wn|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,c;if(a!=o)c=a>o?1:-1;else for(l=c=0;l<a;l++)if(r[l]!=i[l]){c=r[l]>i[l]?1:-1;break}return c}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*Wn+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,c,u,f,d,p,m,b,v,y,x,_,S,w,N,k,C,P,L=r.constructor,T=r.s==i.s?1:-1,A=r.d,R=i.d;if(!r.s)return new L(r);if(!i.s)throw Error($i+"Division by zero");for(c=r.e-i.e,C=R.length,N=A.length,m=new L(T),b=m.d=[],u=0;R[u]==(A[u]||0);)++u;if(R[u]>(A[u]||0)&&--c,a==null?_=a=L.precision:o?_=a+(Rn(r)-Rn(i))+1:_=a,_<0)return new L(0);if(_=_/cn+2|0,u=0,C==1)for(f=0,R=R[0],_++;(u<N||f)&&_--;u++)S=f*Wn+(A[u]||0),b[u]=S/R|0,f=S%R|0;else{for(f=Wn/(R[0]+1)|0,f>1&&(R=e(R,f),A=e(A,f),C=R.length,N=A.length),w=C,v=A.slice(0,C),y=v.length;y<C;)v[y++]=0;P=R.slice(),P.unshift(0),k=R[0],R[1]>=Wn/2&&++k;do f=0,l=t(R,v,C,y),l<0?(x=v[0],C!=y&&(x=x*Wn+(v[1]||0)),f=x/k|0,f>1?(f>=Wn&&(f=Wn-1),d=e(R,f),p=d.length,y=v.length,l=t(d,v,p,y),l==1&&(f--,n(d,C<p?P:R,p))):(f==0&&(l=f=1),d=R.slice()),p=d.length,p<y&&d.unshift(0),n(v,d,y),l==-1&&(y=v.length,l=t(R,v,C,y),l<1&&(f++,n(v,C<y?P:R,y))),y=v.length):l===0&&(f++,v=[0]),b[u++]=f,l&&v[0]?v[y++]=A[w]||0:(v=[A[w]],y=1);while((w++<N||v[0]!==void 0)&&_--)}return b[0]||b.shift(),m.e=c,Xt(m,o?a+Rn(m)+1:a)}})();function $V(e,t){var n,r,i,a,o,l,c=0,u=0,f=e.constructor,d=f.precision;if(Rn(e)>16)throw Error(JA+Rn(e));if(!e.s)return new f(ri);for(fn=!1,l=d,o=new f(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(r=Math.log(nl(2,u))/Math.LN10*2+5|0,l+=r,n=i=a=new f(ri),f.precision=l;;){if(i=Xt(i.times(e),l),n=n.times(++c),o=a.plus(fo(i,n,l)),ka(o.d).slice(0,l)===ka(a.d).slice(0,l)){for(;u--;)a=Xt(a.times(a),l);return f.precision=d,t==null?(fn=!0,Xt(a,d)):a}a=o}}function Rn(e){for(var t=e.e*cn,n=e.d[0];n>=10;n/=10)t++;return t}function Bj(e,t,n){if(t>e.LN10.sd())throw fn=!0,n&&(e.precision=n),Error($i+"LN10 precision limit exceeded");return Xt(new e(e.LN10),t)}function Go(e){for(var t="";e--;)t+="0";return t}function Ah(e,t){var n,r,i,a,o,l,c,u,f,d=1,p=10,m=e,b=m.d,v=m.constructor,y=v.precision;if(m.s<1)throw Error($i+(m.s?"NaN":"-Infinity"));if(m.eq(ri))return new v(0);if(t==null?(fn=!1,u=y):u=t,m.eq(10))return t==null&&(fn=!0),Bj(v,u);if(u+=p,v.precision=u,n=ka(b),r=n.charAt(0),a=Rn(m),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)m=m.times(e),n=ka(m.d),r=n.charAt(0),d++;a=Rn(m),r>1?(m=new v("0."+n),a++):m=new v(r+"."+n.slice(1))}else return c=Bj(v,u+2,y).times(a+""),m=Ah(new v(r+"."+n.slice(1)),u-p).plus(c),v.precision=y,t==null?(fn=!0,Xt(m,y)):m;for(l=o=m=fo(m.minus(ri),m.plus(ri),u),f=Xt(m.times(m),u),i=3;;){if(o=Xt(o.times(f),u),c=l.plus(fo(o,new v(i),u)),ka(c.d).slice(0,u)===ka(l.d).slice(0,u))return l=l.times(2),a!==0&&(l=l.plus(Bj(v,u+2,y).times(a+""))),l=fo(l,new v(d),u),v.precision=y,t==null?(fn=!0,Xt(l,y)):l;l=c,i+=2}}function C$(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=dd(n/cn),e.d=[],r=(n+1)%cn,n<0&&(r+=cn),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=cn;r<i;)e.d.push(+t.slice(r,r+=cn));t=t.slice(r),r=cn-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),fn&&(e.e>ty||e.e<-ty))throw Error(JA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Xt(e,t,n){var r,i,a,o,l,c,u,f,d=e.d;for(o=1,a=d[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=cn,i=t,u=d[f=0];else{if(f=Math.ceil((r+1)/cn),a=d.length,f>=a)return e;for(u=a=d[f],o=1;a>=10;a/=10)o++;r%=cn,i=r-cn+o}if(n!==void 0&&(a=nl(10,o-i-1),l=u/a%10|0,c=t<0||d[f+1]!==void 0||u%a,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(r>0?i>0?u/nl(10,o-i):0:d[f-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return c?(a=Rn(e),d.length=1,t=t-a-1,d[0]=nl(10,(cn-t%cn)%cn),e.e=dd(-t/cn)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=f,a=1,f--):(d.length=f+1,a=nl(10,cn-r),d[f]=i>0?(u/nl(10,o-i)%nl(10,i)|0)*a:0),c)for(;;)if(f==0){(d[0]+=a)==Wn&&(d[0]=1,++e.e);break}else{if(d[f]+=a,d[f]!=Wn)break;d[f--]=0,a=1}for(r=d.length;d[--r]===0;)d.pop();if(fn&&(e.e>ty||e.e<-ty))throw Error(JA+Rn(e));return e}function FV(e,t){var n,r,i,a,o,l,c,u,f,d,p=e.constructor,m=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),fn?Xt(t,m):t;if(c=e.d,d=t.d,r=t.e,u=e.e,c=c.slice(),o=u-r,o){for(f=o<0,f?(n=c,o=-o,l=d.length):(n=d,r=u,l=c.length),i=Math.max(Math.ceil(m/cn),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=c.length,l=d.length,f=i<l,f&&(l=i),i=0;i<l;i++)if(c[i]!=d[i]){f=c[i]<d[i];break}o=0}for(f&&(n=c,c=d,d=n,t.s=-t.s),l=c.length,i=d.length-l;i>0;--i)c[l++]=0;for(i=d.length;i>o;){if(c[--i]<d[i]){for(a=i;a&&c[--a]===0;)c[a]=Wn-1;--c[a],c[i]+=Wn}c[i]-=d[i]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--r;return c[0]?(t.d=c,t.e=r,fn?Xt(t,m):t):new p(0)}function Ml(e,t,n){var r,i=Rn(e),a=ka(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+Go(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Go(-i-1)+a,n&&(r=n-o)>0&&(a+=Go(r))):i>=o?(a+=Go(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Go(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=Go(r))),e.s<0?"-"+a:a}function A$(e,t){if(e.length>t)return e.length=t,!0}function BV(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(_l+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return C$(o,a.toString())}else if(typeof a!="string")throw Error(_l+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,HCe.test(a))C$(o,a);else throw Error(_l+a)}if(i.prototype=Ye,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=BV,i.config=i.set=WCe,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 WCe(e){if(!e||typeof e!="object")throw Error($i+"Object expected");var t,n,r,i=["precision",1,ud,"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(dd(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(_l+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(_l+n+": "+r);return this}var eP=BV(zCe);ri=new eP(1);const Yt=eP;function VCe(e){return QCe(e)||YCe(e)||KCe(e)||GCe()}function GCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 795In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KCe(e,t){if(e){if(typeof e=="string")return hk(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 hk(e,t)}}function YCe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QCe(e){if(Array.isArray(e))return hk(e)}function hk(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 XCe=function(t){return t},qV={},UV=function(t){return t===qV},P$=function(t){return function n(){return arguments.length===0||arguments.length===1&&UV(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},ZCe=function e(t,n){return t===1?n:P$(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==qV}).length;return o>=t?n.apply(void 0,i):e(t-o,P$(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=i.map(function(d){return UV(d)?c.shift():d});return n.apply(void 0,VCe(f).concat(c))}))})},Gx=function(t){return ZCe(t.length,t)},pk=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},JCe=Gx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),eAe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return XCe;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,c){return c(l)},a.apply(void 0,arguments))}},mk=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},zV=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(l,c){return l===n[c]})||(n=a,r=t.apply(void 0,a)),r}};function tAe(e){var t;return e===0?t=1:t=Math.floor(new Yt(e).abs().log(10).toNumber())+1,t}function nAe(e,t,n){for(var r=new Yt(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var rAe=Gx(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),iAe=Gx(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),aAe=Gx(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Kx={rangeStep:nAe,getDigitCount:tAe,interpolateNumber:rAe,uninterpolateNumber:iAe,uninterpolateTruncation:aAe};function gk(e){return lAe(e)||sAe(e)||HV(e)||oAe()}function oAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 796In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sAe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function lAe(e){if(Array.isArray(e))return vk(e)}function Ph(e,t){return dAe(e)||uAe(e,t)||HV(e,t)||cAe()}function cAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 797In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HV(e,t){if(e){if(typeof e=="string")return vk(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 vk(e,t)}}function vk(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 uAe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(c){i=!0,a=c}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function dAe(e){if(Array.isArray(e))return e}function WV(e){var t=Ph(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function VV(e,t,n){if(e.lte(0))return new Yt(0);var r=Kx.getDigitCount(e.toNumber()),i=new Yt(10).pow(r),a=e.div(i),o=r!==1?.05:.1,l=new Yt(Math.ceil(a.div(o).toNumber())).add(n).mul(o),c=l.mul(i);return t?c:new Yt(Math.ceil(c))}function fAe(e,t,n){var r=1,i=new Yt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Yt(10).pow(Kx.getDigitCount(e)-1),i=new Yt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Yt(Math.floor(e)))}else e===0?i=new Yt(Math.floor((t-1)/2)):n||(i=new Yt(Math.floor(e)));var o=Math.floor((t-1)/2),l=eAe(JCe(function(c){return i.add(new Yt(c-o).mul(r)).toNumber()}),pk);return l(0,t)}function GV(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 Yt(0),tickMin:new Yt(0),tickMax:new Yt(0)};var a=VV(new Yt(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Yt(0):(o=new Yt(e).add(t).div(2),o=o.sub(new Yt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),c=Math.ceil(new Yt(t).sub(o).div(a).toNumber()),u=l+c+1;return u>n?GV(e,t,n,r,i+1):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:a,tickMin:o.sub(new Yt(l).mul(a)),tickMax:o.add(new Yt(c).mul(a))})}function hAe(e){var t=Ph(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=WV([n,r]),c=Ph(l,2),u=c[0],f=c[1];if(u===-1/0||f===1/0){var d=f===1/0?[u].concat(gk(pk(0,i-1).map(function(){return 1/0}))):[].concat(gk(pk(0,i-1).map(function(){return-1/0})),[f]);return n>r?mk(d):d}if(u===f)return fAe(u,i,a);var p=GV(u,f,o,a),m=p.step,b=p.tickMin,v=p.tickMax,y=Kx.rangeStep(b,v.add(new Yt(.1).mul(m)),m);return n>r?mk(y):y}function pAe(e,t){var n=Ph(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=WV([r,i]),l=Ph(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[r,i];if(c===u)return[c];var f=Math.max(t,2),d=VV(new Yt(u).sub(c).div(f-1),a,0),p=[].concat(gk(Kx.rangeStep(new Yt(c),new Yt(u).sub(new Yt(.99).mul(d)),d)),[u]);return r>i?mk(p):p}var mAe=zV(hAe),gAe=zV(pAe),vAe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Su(e){"@babel/helpers - typeof";return Su=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},Su(e)}function ny(){return ny=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},ny.apply(this,arguments)}function yAe(e,t){return _Ae(e)||wAe(e,t)||bAe(e,t)||xAe()}function xAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 798In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bAe(e,t){if(e){if(typeof e=="string")return T$(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 T$(e,t)}}function T$(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 wAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function _Ae(e){if(Array.isArray(e))return e}function SAe(e,t){if(e==null)return{};var n=jAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jAe(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 NAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EAe(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,QV(r.key),r)}}function kAe(e,t,n){return t&&EAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function OAe(e,t,n){return t=ry(t),CAe(e,KV()?Reflect.construct(t,n||[],ry(e).constructor):t.apply(e,n))}function CAe(e,t){if(t&&(Su(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return AAe(e)}function AAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KV=function(){return!!e})()}function ry(e){return ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ry(e)}function PAe(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&&yk(e,t)}function yk(e,t){return yk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},yk(e,t)}function YV(e,t,n){return t=QV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QV(e){var t=TAe(e,"string");return Su(t)=="symbol"?t:t+""}function TAe(e,t){if(Su(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Su(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yx=(function(e){function t(){return NAe(this,t),OAe(this,t,arguments)}return PAe(t,e),kAe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,l=r.dataKey,c=r.data,u=r.dataPointFormatter,f=r.xAxis,d=r.yAxis,p=SAe(r,vAe),m=dt(p,!1);this.props.direction==="x"&&f.type!=="number"&&vs();var b=c.map(function(v){var y=u(v,l),x=y.x,_=y.y,S=y.value,w=y.errorVal;if(!w)return null;var N=[],k,C;if(Array.isArray(w)){var P=yAe(w,2);k=P[0],C=P[1]}else k=C=w;if(a==="vertical"){var L=f.scale,T=_+i,A=T+o,R=T-o,I=L(S-k),M=L(S+C);N.push({x1:M,y1:A,x2:M,y2:R}),N.push({x1:I,y1:T,x2:M,y2:T}),N.push({x1:I,y1:A,x2:I,y2:R})}else if(a==="horizontal"){var B=d.scale,W=x+i,G=W-o,H=W+o,K=B(S-k),$=B(S+C);N.push({x1:G,y1:$,x2:H,y2:$}),N.push({x1:W,y1:K,x2:W,y2:$}),N.push({x1:G,y1:K,x2:H,y2:K})}return ne.createElement(Kt,ny({className:"recharts-errorBar",key:"bar-".concat(N.map(function(F){return"".concat(F.x1,"-").concat(F.x2,"-").concat(F.y1,"-").concat(F.y2)}))},m),N.map(function(F){return ne.createElement("line",ny({},F,{key:"line-".concat(F.x1,"-").concat(F.x2,"-").concat(F.y1,"-").concat(F.y2)}))}))});return ne.createElement(Kt,{className:"recharts-errorBars"},b)}}])})(ne.Component);YV(Yx,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});YV(Yx,"displayName","ErrorBar");function Th(e){"@babel/helpers - typeof";return Th=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},Th(e)}function R$(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 Ks(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(n),!0).forEach(function(r){RAe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RAe(e,t,n){return t=IAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IAe(e){var t=MAe(e,"string");return Th(t)=="symbol"?t:t+""}function MAe(e,t){if(Th(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Th(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XV=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=ti(n,uo);if(!o)return null;var l=uo.defaultProps,c=l!==void 0?Ks(Ks({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:a==="children"?u=(r||[]).reduce(function(f,d){var p=d.item,m=d.props,b=m.sectors||m.data||[];return f.concat(b.map(function(v){return{type:o.props.iconType||p.props.legendType,value:v.name,color:v.fill,payload:v}}))},[]):u=(r||[]).map(function(f){var d=f.item,p=d.type.defaultProps,m=p!==void 0?Ks(Ks({},p),d.props):{},b=m.dataKey,v=m.name,y=m.legendType,x=m.hide;return{inactive:x,dataKey:b,type:c.iconType||y||"square",color:tP(d),value:v||b,payload:m}}),Ks(Ks(Ks({},c),uo.getWithHeight(o,i)),{},{payload:u,item:o})};function Rh(e){"@babel/helpers - typeof";return Rh=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},Rh(e)}function I$(e){return FAe(e)||$Ae(e)||LAe(e)||DAe()}function DAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 799In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LAe(e,t){if(e){if(typeof e=="string")return xk(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 xk(e,t)}}function $Ae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FAe(e){if(Array.isArray(e))return xk(e)}function xk(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 M$(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 bn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M$(Object(n),!0).forEach(function(r){Vc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vc(e,t,n){return t=BAe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BAe(e){var t=qAe(e,"string");return Rh(t)=="symbol"?t:t+""}function qAe(e,t){if(Rh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hr(e,t,n){return wt(e)||wt(t)?n:Fn(t)?ci(e,t,n):pt(t)?t(e):n}function Wf(e,t,n,r){var i=qCe(e,function(l){return hr(l,t)});if(n==="number"){var a=i.filter(function(l){return qe(l)||parseFloat(l)});return a.length?[Wx(a),Hx(a)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!wt(l)}):i;return o.map(function(l){return Fn(l)||l instanceof Date?l:""})}var UAe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var c=a.range,u=0;u<l;u++){var f=u>0?i[u-1].coordinate:i[l-1].coordinate,d=i[u].coordinate,p=u>=l-1?i[0].coordinate:i[u+1].coordinate,m=void 0;if(Nr(d-f)!==Nr(p-d)){var b=[];if(Nr(p-d)===Nr(c[1]-c[0])){m=p;var v=d+c[1]-c[0];b[0]=Math.min(v,(v+f)/2),b[1]=Math.max(v,(v+f)/2)}else{m=f;var y=p+c[1]-c[0];b[0]=Math.min(d,(y+d)/2),b[1]=Math.max(d,(y+d)/2)}var x=[Math.min(d,(m+d)/2),Math.max(d,(m+d)/2)];if(t>x[0]&&t<=x[1]||t>=b[0]&&t<=b[1]){o=i[u].index;break}}else{var _=Math.min(f,p),S=Math.max(f,p);if(t>(_+d)/2&&t<=(S+d)/2){o=i[u].index;break}}}else for(var w=0;w<l;w++)if(w===0&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w>0&&w<l-1&&t>(r[w].coordinate+r[w-1].coordinate)/2&&t<=(r[w].coordinate+r[w+1].coordinate)/2||w===l-1&&t>(r[w].coordinate+r[w-1].coordinate)/2){o=r[w].index;break}return o},tP=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?bn(bn({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,c;switch(i){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},zAe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),c=0,u=l.length;c<u;c++)for(var f=a[l[c]].stackGroups,d=Object.keys(f),p=0,m=d.length;p<m;p++){var b=f[d[p]],v=b.items,y=b.cateAxisId,x=v.filter(function(C){return co(C.type).indexOf("Bar")>=0});if(x&&x.length){var _=x[0].type.defaultProps,S=_!==void 0?bn(bn({},_),x[0].props):x[0].props,w=S.barSize,N=S[y];o[N]||(o[N]=[]);var k=wt(w)?n:w;o[N].push({item:x[0],stackList:x.slice(1),barSize:wt(k)?void 0:Er(k,r,0)})}}return o},HAe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=Er(n,i,0,!0),f,d=[];if(o[0].barSize===+o[0].barSize){var p=!1,m=i/c,b=o.reduce(function(w,N){return w+N.barSize||0},0);b+=(c-1)*u,b>=i&&(b-=(c-1)*u,u=0),b>=i&&m>0&&(p=!0,m*=.9,b=c*m);var v=(i-b)/2>>0,y={offset:v-u,size:0};f=o.reduce(function(w,N){var k={item:N.item,position:{offset:y.offset+y.size+u,size:p?m:N.barSize}},C=[].concat(I$(w),[k]);return y=C[C.length-1].position,N.stackList&&N.stackList.length&&N.stackList.forEach(function(P){C.push({item:P,position:y})}),C},d)}else{var x=Er(r,i,0,!0);i-2*x-(c-1)*u<=0&&(u=0);var _=(i-2*x-(c-1)*u)/c;_>1&&(_>>=0);var S=l===+l?Math.min(_,l):_;f=o.reduce(function(w,N,k){var C=[].concat(I$(w),[{item:N.item,position:{offset:x+(_+u)*k+(_-S)/2,size:S}}]);return N.stackList&&N.stackList.length&&N.stackList.forEach(function(P){C.push({item:P,position:C[C.length-1].position})}),C},d)}return f},WAe=function(t,n,r,i){var a=r.children,o=r.width,l=r.margin,c=o-(l.left||0)-(l.right||0),u=XV({children:a,legendWidth:c});if(u){var f=i||{},d=f.width,p=f.height,m=u.align,b=u.verticalAlign,v=u.layout;if((v==="vertical"||v==="horizontal"&&b==="middle")&&m!=="center"&&qe(t[m]))return bn(bn({},t),{},Vc({},m,t[m]+(d||0)));if((v==="horizontal"||v==="vertical"&&m==="center")&&b!=="middle"&&qe(t[b]))return bn(bn({},t),{},Vc({},b,t[b]+(p||0)))}return t},VAe=function(t,n,r){return wt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},ZV=function(t,n,r,i,a){var o=n.props.children,l=Di(o,Yx).filter(function(u){return VAe(i,a,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,f){var d=hr(f,r);if(wt(d))return u;var p=Array.isArray(d)?[Wx(d),Hx(d)]:[d,d],m=c.reduce(function(b,v){var y=hr(f,v,0),x=p[0]-Math.abs(Array.isArray(y)?y[0]:y),_=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(x,b[0]),Math.max(_,b[1])]},[1/0,-1/0]);return[Math.min(m[0],u[0]),Math.max(m[1],u[1])]},[1/0,-1/0])}return null},GAe=function(t,n,r,i,a){var o=n.map(function(l){return ZV(t,l,r,a,i)}).filter(function(l){return!wt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},JV=function(t,n,r,i,a){var o=n.map(function(c){var u=c.props.dataKey;return r==="number"&&u&&ZV(t,c,u,i)||Wf(t,u,r,a)});if(r==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var f=0,d=u.length;f<d;f++)l[u[f]]||(l[u[f]]=!0,c.push(u[f]));return c},[])},eG=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},tG=function(t,n,r,i){if(i)return t.map(function(c){return c.coordinate});var a,o,l=t.map(function(c){return c.coordinate===n&&(a=!0),c.coordinate===r&&(o=!0),c.coordinate});return a||l.push(n),o||l.push(r),l},so=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,u=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Nr(l[0]-l[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var f=(t.ticks||t.niceTicks).map(function(d){var p=a?a.indexOf(d):d;return{coordinate:i(p)+u,value:d,offset:u}});return f.filter(function(d){return!Tp(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,p){return{coordinate:i(d)+u,value:d,index:p,offset:u}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(d){return{coordinate:i(d)+u,value:d,offset:u}}):i.domain().map(function(d,p){return{coordinate:i(d)+u,value:a?a[d]:d,index:p,offset:u}})},qj=new WeakMap,jg=function(t,n){if(typeof n!="function")return t;qj.has(t)||qj.set(t,new WeakMap);var r=qj.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},nG=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Nh(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Xv(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Hf(),realScaleType:"point"}:a==="category"?{scale:Nh(),realScaleType:"band"}:{scale:Xv(),realScaleType:"linear"};if(Tl(i)){var c="scale".concat(Px(i));return{scale:(w$[c]||Hf)(),realScaleType:w$[c]?c:"point"}}return pt(i)?{scale:i}:{scale:Hf(),realScaleType:"point"}},D$=1e-4,rG=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-D$,o=Math.max(i[0],i[1])+D$,l=t(n[0]),c=t(n[r-1]);(l<a||l>o||c<a||c>o)&&t.domain([n[0],n[r-1]])}},KAe=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},YAe=function(t,n){if(!n||n.length!==2||!qe(n[0])||!qe(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!qe(t[0])||t[0]<r)&&(a[0]=r),(!qe(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},QAe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,l=0;l<n;++l){var c=Tp(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=a,t[l][r][1]=a+c,a=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1])}},XAe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var l=Tp(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},ZAe={sign:QAe,expand:vje,none:mu,silhouette:yje,wiggle:xje,positive:XAe},JAe=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),a=ZAe[r],o=gje().keys(i).value(function(l,c){return+hr(l,c,0)}).order(YE).offset(a);return o(t)},ePe=function(t,n,r,i,a,o){if(!t)return null;var l=o?n.reverse():n,c={},u=l.reduce(function(d,p){var m,b=(m=p.type)!==null&&m!==void 0&&m.defaultProps?bn(bn({},p.type.defaultProps),p.props):p.props,v=b.stackId,y=b.hide;if(y)return d;var x=b[r],_=d[x]||{hasStack:!1,stackGroups:{}};if(Fn(v)){var S=_.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(p),_.hasStack=!0,_.stackGroups[v]=S}else _.stackGroups[Rp("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[p]};return bn(bn({},d),{},Vc({},x,_))},c),f={};return Object.keys(u).reduce(function(d,p){var m=u[p];if(m.hasStack){var b={};m.stackGroups=Object.keys(m.stackGroups).reduce(function(v,y){var x=m.stackGroups[y];return bn(bn({},v),{},Vc({},y,{numericAxisId:r,cateAxisId:i,items:x.items,stackedData:JAe(t,x.items,a)}))},b)}return bn(bn({},d),{},Vc({},p,m))},f)},iG=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,l=n.allowDecimals,c=r||n.scale;if(c!=="auto"&&c!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var f=mAe(u,a,l);return t.domain([Wx(f),Hx(f)]),{niceTicks:f}}if(a&&i==="number"){var d=t.domain(),p=gAe(d,a,l);return{niceTicks:p}}return null},L$=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var c=hr(o,n.dataKey,n.domain[l]);return wt(c)?null:n.scale(c)-a/2+i},tPe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},nPe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?bn(bn({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Fn(a)){var o=n[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},rPe=function(t){return t.reduce(function(n,r){return[Wx(r.concat([n[0]]).filter(qe)),Hx(r.concat([n[1]]).filter(qe))]},[1/0,-1/0])},aG=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,c=l.reduce(function(u,f){var d=rPe(f.slice(n,r+1));return[Math.min(u[0],d[0]),Math.max(u[1],d[1])]},[1/0,-1/0]);return[Math.min(c[0],i[0]),Math.max(c[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},$$=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,F$=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,bk=function(t,n,r){if(pt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(qe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if($$.test(t[0])){var a=+$$.exec(t[0])[1];i[0]=n[0]-a}else pt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(qe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(F$.test(t[1])){var o=+F$.exec(t[1])[1];i[1]=n[1]+o}else pt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},iy=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 a=CA(n,function(d){return d.coordinate}),o=1/0,l=1,c=a.length;l<c;l++){var u=a[l],f=a[l-1];o=Math.min((u.coordinate||0)-(f.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},B$=function(t,n,r){return!t||!t.length||Vx(t,ci(r,"type.defaultProps.domain"))?n:t},oG=function(t,n){var r=t.type.defaultProps?bn(bn({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,l=r.formatter,c=r.tooltipType,u=r.chartType,f=r.hide;return bn(bn({},dt(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:tP(t),value:hr(n,i),type:c,payload:n,chartType:u,hide:f})};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 q$(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 to(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q$(Object(n),!0).forEach(function(r){sG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sG(e,t,n){return t=iPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iPe(e){var t=aPe(e,"string");return Ih(t)=="symbol"?t:t+""}function aPe(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 oPe(e,t){return uPe(e)||cPe(e,t)||lPe(e,t)||sPe()}function sPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 800In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lPe(e,t){if(e){if(typeof e=="string")return U$(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 U$(e,t)}}function U$(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 cPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function uPe(e){if(Array.isArray(e))return e}var ay=Math.PI/180,dPe=function(t){return t*180/Math.PI},an=function(t,n,r,i){return{x:t+Math.cos(-ay*i)*r,y:n+Math.sin(-ay*i)*r}},lG=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},fPe=function(t,n,r,i,a){var o=t.width,l=t.height,c=t.startAngle,u=t.endAngle,f=Er(t.cx,o,o/2),d=Er(t.cy,l,l/2),p=lG(o,l,r),m=Er(t.innerRadius,p,0),b=Er(t.outerRadius,p,p*.8),v=Object.keys(n);return v.reduce(function(y,x){var _=n[x],S=_.domain,w=_.reversed,N;if(wt(_.range))i==="angleAxis"?N=[c,u]:i==="radiusAxis"&&(N=[m,b]),w&&(N=[N[1],N[0]]);else{N=_.range;var k=N,C=oPe(k,2);c=C[0],u=C[1]}var P=nG(_,a),L=P.realScaleType,T=P.scale;T.domain(S).range(N),rG(T);var A=iG(T,to(to({},_),{},{realScaleType:L})),R=to(to(to({},_),A),{},{range:N,radius:b,realScaleType:L,scale:T,cx:f,cy:d,innerRadius:m,outerRadius:b,startAngle:c,endAngle:u});return to(to({},y),{},sG({},x,R))},{})},hPe=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},pPe=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,l=hPe({x:r,y:i},{x:a,y:o});if(l<=0)return{radius:l};var c=(r-a)/l,u=Math.acos(c);return i>o&&(u=2*Math.PI-u),{radius:l,angle:dPe(u),angleInRadian:u}},mPe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},gPe=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},z$=function(t,n){var r=t.x,i=t.y,a=pPe({x:r,y:i},n),o=a.radius,l=a.angle,c=n.innerRadius,u=n.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var f=mPe(n),d=f.startAngle,p=f.endAngle,m=l,b;if(d<=p){for(;m>p;)m-=360;for(;m<d;)m+=360;b=m>=d&&m<=p}else{for(;m>d;)m-=360;for(;m<p;)m+=360;b=m>=p&&m<=d}return b?to(to({},n),{},{radius:o,angle:gPe(m,n)}):null},cG=function(t){return!E.isValidElement(t)&&!pt(t)&&typeof t!="boolean"?t.className:""};function Mh(e){"@babel/helpers - typeof";return Mh=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},Mh(e)}var vPe=["offset"];function yPe(e){return _Pe(e)||wPe(e)||bPe(e)||xPe()}function xPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 801In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bPe(e,t){if(e){if(typeof e=="string")return wk(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 wk(e,t)}}function wPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Pe(e){if(Array.isArray(e))return wk(e)}function wk(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 SPe(e,t){if(e==null)return{};var n=jPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jPe(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 H$(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 $n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H$(Object(n),!0).forEach(function(r){NPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NPe(e,t,n){return t=EPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EPe(e){var t=kPe(e,"string");return Mh(t)=="symbol"?t:t+""}function kPe(e,t){if(Mh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Dh(){return Dh=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},Dh.apply(this,arguments)}var OPe=function(t){var n=t.value,r=t.formatter,i=wt(t.children)?n:t.children;return pt(r)?r(i):i},CPe=function(t,n){var r=Nr(n-t),i=Math.min(Math.abs(n-t),360);return r*i},APe=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,c=a,u=c.cx,f=c.cy,d=c.innerRadius,p=c.outerRadius,m=c.startAngle,b=c.endAngle,v=c.clockWise,y=(d+p)/2,x=CPe(m,b),_=x>=0?1:-1,S,w;i==="insideStart"?(S=m+_*o,w=v):i==="insideEnd"?(S=b-_*o,w=!v):i==="end"&&(S=b+_*o,w=v),w=x<=0?w:!w;var N=an(u,f,y,S),k=an(u,f,y,S+(w?1:-1)*359),C="M".concat(N.x,",").concat(N.y,` 802 A`).concat(y,",").concat(y,",0,1,").concat(w?0:1,`, 803 `).concat(k.x,",").concat(k.y),P=wt(t.id)?Rp("recharts-radial-line-"):t.id;return ne.createElement("text",Dh({},r,{dominantBaseline:"central",className:gt("recharts-radial-bar-label",l)}),ne.createElement("defs",null,ne.createElement("path",{id:P,d:C})),ne.createElement("textPath",{xlinkHref:"#".concat(P)},n))},PPe=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,l=a.cy,c=a.innerRadius,u=a.outerRadius,f=a.startAngle,d=a.endAngle,p=(f+d)/2;if(i==="outside"){var m=an(o,l,u+r,p),b=m.x,v=m.y;return{x:b,y:v,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,x=an(o,l,y,p),_=x.x,S=x.y;return{x:_,y:S,textAnchor:"middle",verticalAnchor:"middle"}},TPe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,l=o.x,c=o.y,u=o.width,f=o.height,d=f>=0?1:-1,p=d*i,m=d>0?"end":"start",b=d>0?"start":"end",v=u>=0?1:-1,y=v*i,x=v>0?"end":"start",_=v>0?"start":"end";if(a==="top"){var S={x:l+u/2,y:c-d*i,textAnchor:"middle",verticalAnchor:m};return $n($n({},S),r?{height:Math.max(c-r.y,0),width:u}:{})}if(a==="bottom"){var w={x:l+u/2,y:c+f+p,textAnchor:"middle",verticalAnchor:b};return $n($n({},w),r?{height:Math.max(r.y+r.height-(c+f),0),width:u}:{})}if(a==="left"){var N={x:l-y,y:c+f/2,textAnchor:x,verticalAnchor:"middle"};return $n($n({},N),r?{width:Math.max(N.x-r.x,0),height:f}:{})}if(a==="right"){var k={x:l+u+y,y:c+f/2,textAnchor:_,verticalAnchor:"middle"};return $n($n({},k),r?{width:Math.max(r.x+r.width-k.x,0),height:f}:{})}var C=r?{width:u,height:f}:{};return a==="insideLeft"?$n({x:l+y,y:c+f/2,textAnchor:_,verticalAnchor:"middle"},C):a==="insideRight"?$n({x:l+u-y,y:c+f/2,textAnchor:x,verticalAnchor:"middle"},C):a==="insideTop"?$n({x:l+u/2,y:c+p,textAnchor:"middle",verticalAnchor:b},C):a==="insideBottom"?$n({x:l+u/2,y:c+f-p,textAnchor:"middle",verticalAnchor:m},C):a==="insideTopLeft"?$n({x:l+y,y:c+p,textAnchor:_,verticalAnchor:b},C):a==="insideTopRight"?$n({x:l+u-y,y:c+p,textAnchor:x,verticalAnchor:b},C):a==="insideBottomLeft"?$n({x:l+y,y:c+f-p,textAnchor:_,verticalAnchor:m},C):a==="insideBottomRight"?$n({x:l+u-y,y:c+f-p,textAnchor:x,verticalAnchor:m},C):od(a)&&(qe(a.x)||sl(a.x))&&(qe(a.y)||sl(a.y))?$n({x:l+Er(a.x,u),y:c+Er(a.y,f),textAnchor:"end",verticalAnchor:"end"},C):$n({x:l+u/2,y:c+f/2,textAnchor:"middle",verticalAnchor:"middle"},C)},RPe=function(t){return"cx"in t&&qe(t.cx)};function Vn(e){var t=e.offset,n=t===void 0?5:t,r=SPe(e,vPe),i=$n({offset:n},r),a=i.viewBox,o=i.position,l=i.value,c=i.children,u=i.content,f=i.className,d=f===void 0?"":f,p=i.textBreakAll;if(!a||wt(l)&&wt(c)&&!E.isValidElement(u)&&!pt(u))return null;if(E.isValidElement(u))return E.cloneElement(u,i);var m;if(pt(u)){if(m=E.createElement(u,i),E.isValidElement(m))return m}else m=OPe(i);var b=RPe(a),v=dt(i,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return APe(i,m,v);var y=b?PPe(i):TPe(i);return ne.createElement(Il,Dh({className:gt("recharts-label",d)},v,y,{breakAll:p}),m)}Vn.displayName="Label";var uG=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,f=t.outerRadius,d=t.x,p=t.y,m=t.top,b=t.left,v=t.width,y=t.height,x=t.clockWise,_=t.labelViewBox;if(_)return _;if(qe(v)&&qe(y)){if(qe(d)&&qe(p))return{x:d,y:p,width:v,height:y};if(qe(m)&&qe(b))return{x:m,y:b,width:v,height:y}}return qe(d)&&qe(p)?{x:d,y:p,width:0,height:0}:qe(n)&&qe(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:u||0,outerRadius:f||c||l||0,clockWise:x}:t.viewBox?t.viewBox:{}},IPe=function(t,n){return t?t===!0?ne.createElement(Vn,{key:"label-implicit",viewBox:n}):Fn(t)?ne.createElement(Vn,{key:"label-implicit",viewBox:n,value:t}):E.isValidElement(t)?t.type===Vn?E.cloneElement(t,{key:"label-implicit",viewBox:n}):ne.createElement(Vn,{key:"label-implicit",content:t,viewBox:n}):pt(t)?ne.createElement(Vn,{key:"label-implicit",content:t,viewBox:n}):od(t)?ne.createElement(Vn,Dh({viewBox:n},t,{key:"label-implicit"})):null:null},MPe=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,a=uG(t),o=Di(i,Vn).map(function(c,u){return E.cloneElement(c,{viewBox:n||a,key:"label-".concat(u)})});if(!r)return o;var l=IPe(t.label,n||a);return[l].concat(yPe(o))};Vn.parseViewBox=uG;Vn.renderCallByParent=MPe;var Uj,W$;function DPe(){if(W$)return Uj;W$=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return Uj=e,Uj}var LPe=DPe();const $Pe=Mt(LPe);function Lh(e){"@babel/helpers - typeof";return Lh=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},Lh(e)}var FPe=["valueAccessor"],BPe=["data","dataKey","clockWise","id","textBreakAll"];function qPe(e){return WPe(e)||HPe(e)||zPe(e)||UPe()}function UPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 804In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zPe(e,t){if(e){if(typeof e=="string")return _k(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 _k(e,t)}}function HPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function WPe(e){if(Array.isArray(e))return _k(e)}function _k(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 oy(){return oy=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},oy.apply(this,arguments)}function V$(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?V$(Object(n),!0).forEach(function(r){VPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VPe(e,t,n){return t=GPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GPe(e){var t=KPe(e,"string");return Lh(t)=="symbol"?t:t+""}function KPe(e,t){if(Lh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lh(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=YPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YPe(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 QPe=function(t){return Array.isArray(t.value)?$Pe(t.value):t.value};function fs(e){var t=e.valueAccessor,n=t===void 0?QPe:t,r=K$(e,FPe),i=r.data,a=r.dataKey,o=r.clockWise,l=r.id,c=r.textBreakAll,u=K$(r,BPe);return!i||!i.length?null:ne.createElement(Kt,{className:"recharts-label-list"},i.map(function(f,d){var p=wt(a)?n(f,d):hr(f&&f.payload,a),m=wt(l)?{}:{id:"".concat(l,"-").concat(d)};return ne.createElement(Vn,oy({},dt(f,!0),u,m,{parentViewBox:f.parentViewBox,value:p,textBreakAll:c,viewBox:Vn.parseViewBox(wt(o)?f:G$(G$({},f),{},{clockWise:o})),key:"label-".concat(d),index:d}))}))}fs.displayName="LabelList";function XPe(e,t){return e?e===!0?ne.createElement(fs,{key:"labelList-implicit",data:t}):ne.isValidElement(e)||pt(e)?ne.createElement(fs,{key:"labelList-implicit",data:t,content:e}):od(e)?ne.createElement(fs,oy({data:t},e,{key:"labelList-implicit"})):null:null}function ZPe(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=Di(r,fs).map(function(o,l){return E.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var a=XPe(e.label,t);return[a].concat(qPe(i))}fs.renderCallByParent=ZPe;function $h(e){"@babel/helpers - typeof";return $h=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},$h(e)}function Sk(){return Sk=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},Sk.apply(this,arguments)}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 Q$(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){JPe(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 JPe(e,t,n){return t=e2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e2e(e){var t=t2e(e,"string");return $h(t)=="symbol"?t:t+""}function t2e(e,t){if($h(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($h(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var n2e=function(t,n){var r=Nr(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Ng=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,f=c*(l?1:-1)+i,d=Math.asin(c/f)/ay,p=u?a:a+o*d,m=an(n,r,f,p),b=an(n,r,i,p),v=u?a-o*d:a,y=an(n,r,f*Math.cos(d*ay),v);return{center:m,circleTangency:b,lineTangency:y,theta:d}},dG=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,c=n2e(o,l),u=o+c,f=an(n,r,a,o),d=an(n,r,a,u),p="M ".concat(f.x,",").concat(f.y,` 805 A `).concat(a,",").concat(a,`,0, 806 `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`, 807 `).concat(d.x,",").concat(d.y,` 808 `);if(i>0){var m=an(n,r,i,o),b=an(n,r,i,u);p+="L ".concat(b.x,",").concat(b.y,` 809 A `).concat(i,",").concat(i,`,0, 810 `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, 811 `).concat(m.x,",").concat(m.y," Z")}else p+="L ".concat(n,",").concat(r," Z");return p},r2e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,f=t.endAngle,d=Nr(f-u),p=Ng({cx:n,cy:r,radius:a,angle:u,sign:d,cornerRadius:o,cornerIsExternal:c}),m=p.circleTangency,b=p.lineTangency,v=p.theta,y=Ng({cx:n,cy:r,radius:a,angle:f,sign:-d,cornerRadius:o,cornerIsExternal:c}),x=y.circleTangency,_=y.lineTangency,S=y.theta,w=c?Math.abs(u-f):Math.abs(u-f)-v-S;if(w<0)return l?"M ".concat(b.x,",").concat(b.y,` 812 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 813 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 814 `):dG({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:u,endAngle:f});var N="M ".concat(b.x,",").concat(b.y,` 815 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(m.x,",").concat(m.y,` 816 A`).concat(a,",").concat(a,",0,").concat(+(w>180),",").concat(+(d<0),",").concat(x.x,",").concat(x.y,` 817 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(_.x,",").concat(_.y,` 818 `);if(i>0){var k=Ng({cx:n,cy:r,radius:i,angle:u,sign:d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),C=k.circleTangency,P=k.lineTangency,L=k.theta,T=Ng({cx:n,cy:r,radius:i,angle:f,sign:-d,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),A=T.circleTangency,R=T.lineTangency,I=T.theta,M=c?Math.abs(u-f):Math.abs(u-f)-L-I;if(M<0&&o===0)return"".concat(N,"L").concat(n,",").concat(r,"Z");N+="L".concat(R.x,",").concat(R.y,` 819 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(A.x,",").concat(A.y,` 820 A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(d>0),",").concat(C.x,",").concat(C.y,` 821 A`).concat(o,",").concat(o,",0,0,").concat(+(d<0),",").concat(P.x,",").concat(P.y,"Z")}else N+="L".concat(n,",").concat(r,"Z");return N},i2e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fG=function(t){var n=Q$(Q$({},i2e),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,f=n.startAngle,d=n.endAngle,p=n.className;if(o<a||f===d)return null;var m=gt("recharts-sector",p),b=o-a,v=Er(l,b,0,!0),y;return v>0&&Math.abs(f-d)<360?y=r2e({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(v,b/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:f,endAngle:d}):y=dG({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:f,endAngle:d}),ne.createElement("path",Sk({},dt(n,!0),{className:m,d:y,role:"img"}))};function Fh(e){"@babel/helpers - typeof";return Fh=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},Fh(e)}function jk(){return jk=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},jk.apply(this,arguments)}function X$(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 Z$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X$(Object(n),!0).forEach(function(r){a2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X$(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function a2e(e,t,n){return t=o2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o2e(e){var t=s2e(e,"string");return Fh(t)=="symbol"?t:t+""}function s2e(e,t){if(Fh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var J$={curveBasisClosed:aje,curveBasisOpen:oje,curveBasis:ije,curveBumpX:HSe,curveBumpY:WSe,curveLinearClosed:sje,curveLinear:Rx,curveMonotoneX:lje,curveMonotoneY:cje,curveNatural:uje,curveStep:dje,curveStepAfter:hje,curveStepBefore:fje},Eg=function(t){return t.x===+t.x&&t.y===+t.y},bf=function(t){return t.x},wf=function(t){return t.y},l2e=function(t,n){if(pt(t))return t;var r="curve".concat(Px(t));return(r==="curveMonotone"||r==="curveBump")&&n?J$["".concat(r).concat(n==="vertical"?"Y":"X")]:J$[r]||Rx},c2e=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,f=l2e(r,l),d=u?a.filter(function(v){return Eg(v)}):a,p;if(Array.isArray(o)){var m=u?o.filter(function(v){return Eg(v)}):o,b=d.map(function(v,y){return Z$(Z$({},v),{},{base:m[y]})});return l==="vertical"?p=vg().y(wf).x1(bf).x0(function(v){return v.base.x}):p=vg().x(bf).y1(wf).y0(function(v){return v.base.y}),p.defined(Eg).curve(f),p(b)}return l==="vertical"&&qe(o)?p=vg().y(wf).x1(bf).x0(o):qe(o)?p=vg().x(bf).y1(wf).y0(o):p=wW().x(bf).y(wf),p.defined(Eg).curve(f),p(d)},Nk=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?c2e(t):i;return E.createElement("path",jk({},dt(t,!1),Iv(t),{className:gt("recharts-curve",n),d:o,ref:a}))},zj={exports:{}},Hj,e6;function u2e(){if(e6)return Hj;e6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hj=e,Hj}var Wj,t6;function d2e(){if(t6)return Wj;t6=1;var e=u2e();function t(){}function n(){}return n.resetWarningCache=t,Wj=function(){function r(o,l,c,u,f,d){if(d!==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 a={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 a.PropTypes=a,a},Wj}var n6;function f2e(){return n6||(n6=1,zj.exports=d2e()()),zj.exports}var h2e=f2e();const Ut=Mt(h2e);var p2e=Object.getOwnPropertyNames,m2e=Object.getOwnPropertySymbols,g2e=Object.prototype.hasOwnProperty;function r6(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function kg(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var a=i.cache,o=a.get(n),l=a.get(r);if(o&&l)return o===r&&l===n;a.set(n,r),a.set(r,n);var c=e(n,r,i);return a.delete(n),a.delete(r),c}}function i6(e){return p2e(e).concat(m2e(e))}var v2e=Object.hasOwn||(function(e,t){return g2e.call(e,t)});function Wl(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var y2e="__v",x2e="__o",b2e="_owner",a6=Object.getOwnPropertyDescriptor,o6=Object.keys;function w2e(e,t,n){var 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 _2e(e,t){return Wl(e.getTime(),t.getTime())}function S2e(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function j2e(e,t){return e===t}function s6(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.entries(),o,l,c=0;(o=a.next())&&!o.done;){for(var u=t.entries(),f=!1,d=0;(l=u.next())&&!l.done;){if(i[d]){d++;continue}var p=o.value,m=l.value;if(n.equals(p[0],m[0],c,d,e,t,n)&&n.equals(p[1],m[1],p[0],m[0],e,t,n)){f=i[d]=!0;break}d++}if(!f)return!1;c++}return!0}var N2e=Wl;function E2e(e,t,n){var r=o6(e),i=r.length;if(o6(t).length!==i)return!1;for(;i-- >0;)if(!hG(e,t,n,r[i]))return!1;return!0}function _f(e,t,n){var r=i6(e),i=r.length;if(i6(t).length!==i)return!1;for(var a,o,l;i-- >0;)if(a=r[i],!hG(e,t,n,a)||(o=a6(e,a),l=a6(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function k2e(e,t){return Wl(e.valueOf(),t.valueOf())}function O2e(e,t){return e.source===t.source&&e.flags===t.flags}function l6(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.values(),o,l;(o=a.next())&&!o.done;){for(var c=t.values(),u=!1,f=0;(l=c.next())&&!l.done;){if(!i[f]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){u=i[f]=!0;break}f++}if(!u)return!1}return!0}function C2e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function A2e(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 hG(e,t,n,r){return(r===b2e||r===x2e||r===y2e)&&(e.$$typeof||t.$$typeof)?!0:v2e(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var P2e="[object Arguments]",T2e="[object Boolean]",R2e="[object Date]",I2e="[object Error]",M2e="[object Map]",D2e="[object Number]",L2e="[object Object]",$2e="[object RegExp]",F2e="[object Set]",B2e="[object String]",q2e="[object URL]",U2e=Array.isArray,c6=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,u6=Object.assign,z2e=Object.prototype.toString.call.bind(Object.prototype.toString);function H2e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,l=e.areObjectsEqual,c=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,f=e.areSetsEqual,d=e.areTypedArraysEqual,p=e.areUrlsEqual;return function(b,v,y){if(b===v)return!0;
821if(b==null||v==null)return!1;var x=typeof b;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?o(b,v,y):x==="function"?i(b,v,y):!1;var _=b.constructor;if(_!==v.constructor)return!1;if(_===Object)return l(b,v,y);if(U2e(b))return t(b,v,y);if(c6!=null&&c6(b))return d(b,v,y);if(_===Date)return n(b,v,y);if(_===RegExp)return u(b,v,y);if(_===Map)return a(b,v,y);if(_===Set)return f(b,v,y);var S=z2e(b);return S===R2e?n(b,v,y):S===$2e?u(b,v,y):S===M2e?a(b,v,y):S===F2e?f(b,v,y):S===L2e?typeof b.then!="function"&&typeof v.then!="function"&&l(b,v,y):S===q2e?p(b,v,y):S===I2e?r(b,v,y):S===P2e?l(b,v,y):S===T2e||S===D2e||S===B2e?c(b,v,y):!1}}function W2e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?_f:w2e,areDatesEqual:_2e,areErrorsEqual:S2e,areFunctionsEqual:j2e,areMapsEqual:r?r6(s6,_f):s6,areNumbersEqual:N2e,areObjectsEqual:r?_f:E2e,arePrimitiveWrappersEqual:k2e,areRegExpsEqual:O2e,areSetsEqual:r?r6(l6,_f):l6,areTypedArraysEqual:r?_f:C2e,areUrlsEqual:A2e};if(n&&(i=u6({},i,n(i))),t){var a=kg(i.areArraysEqual),o=kg(i.areMapsEqual),l=kg(i.areObjectsEqual),c=kg(i.areSetsEqual);i=u6({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return i}function V2e(e){return function(t,n,r,i,a,o,l){return e(t,n,l)}}function G2e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(c,u){var f=r(),d=f.cache,p=d===void 0?t?new WeakMap:void 0:d,m=f.meta;return n(c,u,{cache:p,equals:i,meta:m,strict:a})};if(t)return function(c,u){return n(c,u,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(c,u){return n(c,u,o)}}var K2e=Ps();Ps({strict:!0});Ps({circular:!0});Ps({circular:!0,strict:!0});Ps({createInternalComparator:function(){return Wl}});Ps({strict:!0,createInternalComparator:function(){return Wl}});Ps({circular:!0,createInternalComparator:function(){return Wl}});Ps({circular:!0,createInternalComparator:function(){return Wl},strict:!0});function Ps(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,l=W2e(e),c=H2e(l),u=r?r(c):V2e(c);return G2e({circular:n,comparator:c,createState:i,equals:u,strict:o})}function Y2e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function d6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Y2e(i)};requestAnimationFrame(r)}function Ek(e){"@babel/helpers - typeof";return Ek=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},Ek(e)}function Q2e(e){return eTe(e)||J2e(e)||Z2e(e)||X2e()}function X2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 822In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z2e(e,t){if(e){if(typeof e=="string")return f6(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 f6(e,t)}}function f6(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 J2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function eTe(e){if(Array.isArray(e))return e}function tTe(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,l=Q2e(o),c=l[0],u=l.slice(1);if(typeof c=="number"){d6(i.bind(null,u),c);return}i(c),d6(i.bind(null,u));return}Ek(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function Bh(e){"@babel/helpers - typeof";return Bh=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},Bh(e)}function h6(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 p6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
vendor: 10,261 bytes, lines 822-827
822t%2?h6(Object(n),!0).forEach(function(r){pG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pG(e,t,n){return t=nTe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nTe(e){var t=rTe(e,"string");return Bh(t)==="symbol"?t:String(t)}function rTe(e,t){if(Bh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iTe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},aTe=function(t){return t},oTe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Vf=function(t,n){return Object.keys(n).reduce(function(r,i){return p6(p6({},r),{},pG({},i,t(i,n[i])))},{})},m6=function(t,n,r){return t.map(function(i){return"".concat(oTe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function sTe(e,t){return uTe(e)||cTe(e,t)||mG(e,t)||lTe()}function lTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 823In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cTe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function uTe(e){if(Array.isArray(e))return e}function dTe(e){return pTe(e)||hTe(e)||mG(e)||fTe()}function fTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 824In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mG(e,t){if(e){if(typeof e=="string")return kk(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 kk(e,t)}}function hTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pTe(e){if(Array.isArray(e))return kk(e)}function kk(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 sy=1e-4,gG=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},vG=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},g6=function(t,n){return function(r){var i=gG(t,n);return vG(i,r)}},mTe=function(t,n){return function(r){var i=gG(t,n),a=[].concat(dTe(i.map(function(o,l){return o*l}).slice(1)),[0]);return vG(a,r)}},v6=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),f=sTe(u,4);i=f[0],a=f[1],o=f[2],l=f[3]}}}var d=g6(i,o),p=g6(a,l),m=mTe(i,o),b=function(x){return x>1?1:x<0?0:x},v=function(x){for(var _=x>1?1:x,S=_,w=0;w<8;++w){var N=d(S)-_,k=m(S);if(Math.abs(N-_)<sy||k<sy)return p(S);S=b(S-N/k)}return p(S)};return v.isStepper=!1,v},gTe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,c=function(f,d,p){var m=-(f-d)*r,b=p*a,v=p+(m-b)*l/1e3,y=p*l/1e3+f;return Math.abs(y-d)<sy&&Math.abs(v)<sy?[d,0]:[y,v]};return c.isStepper=!0,c.dt=l,c},vTe=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 v6(i);case"spring":return gTe();default:if(i.split("(")[0]==="cubic-bezier")return v6(i)}return typeof i=="function"?i:null};function qh(e){"@babel/helpers - typeof";return qh=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},qh(e)}function y6(e){return bTe(e)||xTe(e)||yG(e)||yTe()}function yTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 825In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xTe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bTe(e){if(Array.isArray(e))return Ck(e)}function x6(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 tr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x6(Object(n),!0).forEach(function(r){Ok(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ok(e,t,n){return t=wTe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wTe(e){var t=_Te(e,"string");return qh(t)==="symbol"?t:String(t)}function _Te(e,t){if(qh(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qh(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function STe(e,t){return ETe(e)||NTe(e,t)||yG(e,t)||jTe()}function jTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 826In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yG(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 NTe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function ETe(e){if(Array.isArray(e))return e}var ly=function(t,n,r){return t+(n-t)*r},Ak=function(t){var n=t.from,r=t.to;return n!==r},kTe=function e(t,n,r){var i=Vf(function(a,o){if(Ak(o)){var l=t(o.from,o.to,o.velocity),c=STe(l,2),u=c[0],f=c[1];return tr(tr({},o),{},{from:u,velocity:f})}return o},n);return r<1?Vf(function(a,o){return Ak(o)?tr(tr({},o),{},{velocity:ly(o.velocity,i[a].velocity,r),from:ly(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const OTe=(function(e,t,n,r,i){var a=iTe(e,t),o=a.reduce(function(y,x){return tr(tr({},y),{},Ok({},x,[e[x],t[x]]))},{}),l=a.reduce(function(y,x){return tr(tr({},y),{},Ok({},x,{from:e[x],velocity:0,to:t[x]}))},{}),c=-1,u,f,d=function(){return null},p=function(){return Vf(function(x,_){return _.from},l)},m=function(){return!Object.values(l).filter(Ak).length},b=function(x){u||(u=x);var _=x-u,S=_/n.dt;l=kTe(n,l,S),i(tr(tr(tr({},e),t),p())),u=x,m()||(c=requestAnimationFrame(d))},v=function(x){f||(f=x);var _=(x-f)/r,S=Vf(function(N,k){return ly.apply(void 0,y6(k).concat([n(_)]))},o);if(i(tr(tr(tr({},e),t),S)),_<1)c=requestAnimationFrame(d);else{var w=Vf(function(N,k){return ly.apply(void 0,y6(k).concat([n(1)]))},o);i(tr(tr(tr({},e),t),w))}};return d=n.isStepper?b:v,function(){return requestAnimationFrame(d),function(){cancelAnimationFrame(c)}}});function ju(e){"@babel/helpers - typeof";return ju=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},ju(e)}var CTe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function ATe(e,t){if(e==null)return{};var n=PTe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PTe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Vj(e){return MTe(e)||ITe(e)||RTe(e)||TTe()}function TTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 827In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function RTe(e,t){if(e){if(typeof e=="string")return Pk(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 Pk(e,t)}}function ITe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function MTe(e){if(Array.isArray(e))return Pk(e)}function Pk(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 b6(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 Zi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};
827t%2?b6(Object(n),!0).forEach(function(r){Tf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tf(e,t,n){return t=xG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function LTe(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,xG(r.key),r)}}function $Te(e,t,n){return t&<e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xG(e){var t=FTe(e,"string");return ju(t)==="symbol"?t:String(t)}function FTe(e,t){if(ju(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ju(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BTe(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&&Tk(e,t)}
vendor: 47,217 bytes, lines 827-840
827function Tk(e,t){return Tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Tk(e,t)}function qTe(e){var t=UTe();return function(){var r=cy(e),i;if(t){var a=cy(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return Rk(this,i)}}function Rk(e,t){if(t&&(ju(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ik(e)}function Ik(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function UTe(){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 cy(e){return cy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cy(e)}var yo=(function(e){BTe(n,e);var t=qTe(n);function n(r,i){var a;DTe(this,n),a=t.call(this,r,i);var o=a.props,l=o.isActive,c=o.attributeName,u=o.from,f=o.to,d=o.steps,p=o.children,m=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Ik(a)),a.changeStyle=a.changeStyle.bind(Ik(a)),!l||m<=0)return a.state={style:{}},typeof p=="function"&&(a.state={style:f}),Rk(a);if(d&&d.length)a.state={style:d[0].style};else if(u){if(typeof p=="function")return a.state={style:u},Rk(a);a.state={style:c?Tf({},c,u):u}}else a.state={style:{}};return a}return $Te(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,c=a.attributeName,u=a.shouldReAnimate,f=a.to,d=a.from,p=this.state.style;if(l){if(!o){var m={style:c?Tf({},c,f):f};this.state&&p&&(c&&p[c]!==f||!c&&p!==f)&&this.setState(m);return}if(!(K2e(i.to,f)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=b||u?d:i.to;if(this.state&&p){var y={style:c?Tf({},c,v):v};(c&&p[c]!==v||!c&&p!==v)&&this.setState(y)}this.runAnimation(Zi(Zi({},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 a=this,o=i.from,l=i.to,c=i.duration,u=i.easing,f=i.begin,d=i.onAnimationEnd,p=i.onAnimationStart,m=OTe(o,l,vTe(u),c,this.changeStyle),b=function(){a.stopJSAnimation=m()};this.manager.start([p,f,b,c,d])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,c=i.onAnimationStart,u=o[0],f=u.style,d=u.duration,p=d===void 0?0:d,m=function(v,y,x){if(x===0)return v;var _=y.duration,S=y.easing,w=S===void 0?"ease":S,N=y.style,k=y.properties,C=y.onAnimationEnd,P=x>0?o[x-1]:y,L=k||Object.keys(N);if(typeof w=="function"||w==="spring")return[].concat(Vj(v),[a.runJSAnimation.bind(a,{from:P.style,to:N,duration:_,easing:w}),_]);var T=m6(L,_,w),A=Zi(Zi(Zi({},P.style),N),{},{transition:T});return[].concat(Vj(v),[A,_,C]).filter(aTe)};return this.manager.start([c].concat(Vj(o.reduce(m,[f,Math.max(p,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=tTe());var a=i.begin,o=i.duration,l=i.attributeName,c=i.to,u=i.easing,f=i.onAnimationStart,d=i.onAnimationEnd,p=i.steps,m=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof u=="function"||typeof m=="function"||u==="spring"){this.runJSAnimation(i);return}if(p.length>1){this.runStepAnimation(i);return}var v=l?Tf({},l,c):c,y=m6(Object.keys(v),o,u);b.start([f,a,Zi(Zi({},v),{},{transition:y}),o,d])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var c=ATe(i,CTe),u=E.Children.count(a),f=this.state.style;if(typeof a=="function")return a(f);if(!l||u===0||o<=0)return a;var d=function(m){var b=m.props,v=b.style,y=v===void 0?{}:v,x=b.className,_=E.cloneElement(m,Zi(Zi({},c),{},{style:Zi(Zi({},y),f),className:x}));return _};return u===1?d(E.Children.only(a)):ne.createElement("div",null,E.Children.map(a,function(p){return d(p)}))}}]),n})(E.PureComponent);yo.displayName="Animate";yo.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};yo.propTypes={from:Ut.oneOfType([Ut.object,Ut.string]),to:Ut.oneOfType([Ut.object,Ut.string]),attributeName:Ut.string,duration:Ut.number,begin:Ut.number,easing:Ut.oneOfType([Ut.string,Ut.func]),steps:Ut.arrayOf(Ut.shape({duration:Ut.number.isRequired,style:Ut.object.isRequired,easing:Ut.oneOfType([Ut.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ut.func]),properties:Ut.arrayOf("string"),onAnimationEnd:Ut.func})),children:Ut.oneOfType([Ut.node,Ut.func]),isActive:Ut.bool,canBegin:Ut.bool,onAnimationEnd:Ut.func,shouldReAnimate:Ut.bool,onAnimationStart:Ut.func,onAnimationReStart:Ut.func};function Uh(e){"@babel/helpers - typeof";return Uh=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},Uh(e)}function uy(){return uy=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},uy.apply(this,arguments)}function zTe(e,t){return GTe(e)||VTe(e,t)||WTe(e,t)||HTe()}function HTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 828In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WTe(e,t){if(e){if(typeof e=="string")return w6(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 w6(e,t)}}function w6(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 VTe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function GTe(e){if(Array.isArray(e))return e}function _6(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 S6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_6(Object(n),!0).forEach(function(r){KTe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KTe(e,t,n){return t=YTe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YTe(e){var t=QTe(e,"string");return Uh(t)=="symbol"?t:t+""}function QTe(e,t){if(Uh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j6=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),l=i>=0?1:-1,c=r>=0?1:-1,u=i>=0&&r>=0||i<0&&r<0?1:0,f;if(o>0&&a instanceof Array){for(var d=[0,0,0,0],p=0,m=4;p<m;p++)d[p]=a[p]>o?o:a[p];f="M".concat(t,",").concat(n+l*d[0]),d[0]>0&&(f+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(u,",").concat(t+c*d[0],",").concat(n)),f+="L ".concat(t+r-c*d[1],",").concat(n),d[1]>0&&(f+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(u,`, 829 `).concat(t+r,",").concat(n+l*d[1])),f+="L ".concat(t+r,",").concat(n+i-l*d[2]),d[2]>0&&(f+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(u,`, 830 `).concat(t+r-c*d[2],",").concat(n+i)),f+="L ".concat(t+c*d[3],",").concat(n+i),d[3]>0&&(f+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(u,`, 831 `).concat(t,",").concat(n+i-l*d[3])),f+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);f="M ".concat(t,",").concat(n+l*b,` 832 A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t+c*b,",").concat(n,` 833 L `).concat(t+r-c*b,",").concat(n,` 834 A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t+r,",").concat(n+l*b,` 835 L `).concat(t+r,",").concat(n+i-l*b,` 836 A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t+r-c*b,",").concat(n+i,` 837 L `).concat(t+c*b,",").concat(n+i,` 838 A `).concat(b,",").concat(b,",0,0,").concat(u,",").concat(t,",").concat(n+i-l*b," Z")}else f="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return f},XTe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(a,a+l),f=Math.max(a,a+l),d=Math.min(o,o+c),p=Math.max(o,o+c);return r>=u&&r<=f&&i>=d&&i<=p}return!1},ZTe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},nP=function(t){var n=S6(S6({},ZTe),t),r=E.useRef(),i=E.useState(-1),a=zTe(i,2),o=a[0],l=a[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var w=r.current.getTotalLength();w&&l(w)}catch{}},[]);var c=n.x,u=n.y,f=n.width,d=n.height,p=n.radius,m=n.className,b=n.animationEasing,v=n.animationDuration,y=n.animationBegin,x=n.isAnimationActive,_=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||f===0||d===0)return null;var S=gt("recharts-rectangle",m);return _?ne.createElement(yo,{canBegin:o>0,from:{width:f,height:d,x:c,y:u},to:{width:f,height:d,x:c,y:u},duration:v,animationEasing:b,isActive:_},function(w){var N=w.width,k=w.height,C=w.x,P=w.y;return ne.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,isActive:x,easing:b},ne.createElement("path",uy({},dt(n,!0),{className:S,d:j6(C,P,N,k,p),ref:r})))}):ne.createElement("path",uy({},dt(n,!0),{className:S,d:j6(c,u,f,d,p)}))},JTe=["points","className","baseLinePoints","connectNulls"];function Ic(){return Ic=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},Ic.apply(this,arguments)}function eRe(e,t){if(e==null)return{};var n=tRe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tRe(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 N6(e){return aRe(e)||iRe(e)||rRe(e)||nRe()}function nRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 839In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rRe(e,t){if(e){if(typeof e=="string")return Mk(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 Mk(e,t)}}function iRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aRe(e){if(Array.isArray(e))return Mk(e)}function Mk(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 E6=function(t){return t&&t.x===+t.x&&t.y===+t.y},oRe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){E6(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),E6(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Gf=function(t,n){var r=oRe(t);n&&(r=[r.reduce(function(a,o){return[].concat(N6(a),N6(o))},[])]);var i=r.map(function(a){return a.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},sRe=function(t,n,r){var i=Gf(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Gf(n.reverse(),r).slice(1))},lRe=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,a=t.connectNulls,o=eRe(t,JTe);if(!n||!n.length)return null;var l=gt("recharts-polygon",r);if(i&&i.length){var c=o.stroke&&o.stroke!=="none",u=sRe(n,i,a);return ne.createElement("g",{className:l},ne.createElement("path",Ic({},dt(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),c?ne.createElement("path",Ic({},dt(o,!0),{fill:"none",d:Gf(n,a)})):null,c?ne.createElement("path",Ic({},dt(o,!0),{fill:"none",d:Gf(i,a)})):null)}var f=Gf(n,a);return ne.createElement("path",Ic({},dt(o,!0),{fill:f.slice(-1)==="Z"?o.fill:"none",className:l,d:f}))};function Dk(){return Dk=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},Dk.apply(this,arguments)}var rP=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=gt("recharts-dot",a);return n===+n&&r===+r&&i===+i?E.createElement("circle",Dk({},dt(t,!1),Iv(t),{className:o,cx:n,cy:r,r:i})):null};function zh(e){"@babel/helpers - typeof";return zh=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},zh(e)}var cRe=["x","y","top","left","width","height","className"];function Lk(){return Lk=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},Lk.apply(this,arguments)}function k6(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 uRe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k6(Object(n),!0).forEach(function(r){dRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dRe(e,t,n){return t=fRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fRe(e){var t=hRe(e,"string");return zh(t)=="symbol"?t:t+""}function hRe(e,t){if(zh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pRe(e,t){if(e==null)return{};var n=mRe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mRe(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 gRe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},vRe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,f=t.width,d=f===void 0?0:f,p=t.height,m=p===void 0?0:p,b=t.className,v=pRe(t,cRe),y=uRe({x:r,y:a,top:l,left:u,width:d,height:m},v);return!qe(r)||!qe(a)||!qe(d)||!qe(m)||!qe(l)||!qe(u)?null:ne.createElement("path",Lk({},dt(y,!0),{className:gt("recharts-cross",b),d:gRe(r,a,d,m,l,u)}))},Gj,O6;function yRe(){if(O6)return Gj;O6=1;var e=zx(),t=IV(),n=za();function r(i,a){return i&&i.length?e(i,n(a,2),t):void 0}return Gj=r,Gj}var xRe=yRe();const bRe=Mt(xRe);var Kj,C6;function wRe(){if(C6)return Kj;C6=1;var e=zx(),t=za(),n=MV();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return Kj=r,Kj}var _Re=wRe();const SRe=Mt(_Re);var jRe=["cx","cy","angle","ticks","axisLine"],NRe=["ticks","tick","angle","tickFormatter","stroke"];function Nu(e){"@babel/helpers - typeof";return Nu=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},Nu(e)}function Kf(){return Kf=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},Kf.apply(this,arguments)}function A6(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 Ys(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A6(Object(n),!0).forEach(function(r){Qx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P6(e,t){if(e==null)return{};var n=ERe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ERe(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 kRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function T6(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,wG(r.key),r)}}function ORe(e,t,n){return t&&T6(e.prototype,t),n&&T6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CRe(e,t,n){return t=dy(t),ARe(e,bG()?Reflect.construct(t,n||[],dy(e).constructor):t.apply(e,n))}function ARe(e,t){if(t&&(Nu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PRe(e)}function PRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(bG=function(){return!!e})()}function dy(e){return dy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dy(e)}function TRe(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&&$k(e,t)}function $k(e,t){return $k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$k(e,t)}function Qx(e,t,n){return t=wG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wG(e){var t=RRe(e,"string");return Nu(t)=="symbol"?t:t+""}function RRe(e,t){if(Nu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Xx=(function(e){function t(){return kRe(this,t),CRe(this,t,arguments)}return TRe(t,e),ORe(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,a=this.props,o=a.angle,l=a.cx,c=a.cy;return an(l,c,i,o)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,l=r.ticks,c=bRe(l,function(f){return f.coordinate||0}),u=SRe(l,function(f){return f.coordinate||0});return{cx:i,cy:a,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.angle,l=r.ticks,c=r.axisLine,u=P6(r,jRe),f=l.reduce(function(b,v){return[Math.min(b[0],v.coordinate),Math.max(b[1],v.coordinate)]},[1/0,-1/0]),d=an(i,a,f[0],o),p=an(i,a,f[1],o),m=Ys(Ys(Ys({},dt(u,!1)),{},{fill:"none"},dt(c,!1)),{},{x1:d.x,y1:d.y,x2:p.x,y2:p.y});return ne.createElement("line",Kf({className:"recharts-polar-radius-axis-line"},m))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,l=i.angle,c=i.tickFormatter,u=i.stroke,f=P6(i,NRe),d=this.getTickTextAnchor(),p=dt(f,!1),m=dt(o,!1),b=a.map(function(v,y){var x=r.getTickValueCoord(v),_=Ys(Ys(Ys(Ys({textAnchor:d,transform:"rotate(".concat(90-l,", ").concat(x.x,", ").concat(x.y,")")},p),{},{stroke:"none",fill:u},m),{},{index:y},x),{},{payload:v});return ne.createElement(Kt,Kf({className:gt("recharts-polar-radius-axis-tick",cG(o)),key:"tick-".concat(v.coordinate)},Rl(r.props,v,y)),t.renderTickItem(o,_,c?c(v.value,y):v.value))});return ne.createElement(Kt,{className:"recharts-polar-radius-axis-ticks"},b)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.axisLine,o=r.tick;return!i||!i.length?null:ne.createElement(Kt,{className:gt("recharts-polar-radius-axis",this.props.className)},a&&this.renderAxisLine(),o&&this.renderTicks(),Vn.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return ne.isValidElement(r)?o=ne.cloneElement(r,i):pt(r)?o=r(i):o=ne.createElement(Il,Kf({},i,{className:"recharts-polar-radius-axis-tick-value"}),a),o}}])})(E.PureComponent);Qx(Xx,"displayName","PolarRadiusAxis");Qx(Xx,"axisType","radiusAxis");Qx(Xx,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Eu(e){"@babel/helpers - typeof";return Eu=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},Eu(e)}function il(){return il=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},il.apply(this,arguments)}function R6(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 Qs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?R6(Object(n),!0).forEach(function(r){Zx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I6(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,SG(r.key),r)}}function MRe(e,t,n){return t&&I6(e.prototype,t),n&&I6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DRe(e,t,n){return t=fy(t),LRe(e,_G()?Reflect.construct(t,n||[],fy(e).constructor):t.apply(e,n))}function LRe(e,t){if(t&&(Eu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $Re(e)}function $Re(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _G(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_G=function(){return!!e})()}function fy(e){return fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fy(e)}function FRe(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&&Fk(e,t)}function Fk(e,t){return Fk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Fk(e,t)}function Zx(e,t,n){return t=SG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SG(e){var t=BRe(e,"string");return Eu(t)=="symbol"?t:t+""}function BRe(e,t){if(Eu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Eu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qRe=Math.PI/180,M6=1e-5,Jx=(function(e){function t(){return IRe(this,t),DRe(this,t,arguments)}return FRe(t,e),MRe(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.cx,o=i.cy,l=i.radius,c=i.orientation,u=i.tickSize,f=u||8,d=an(a,o,l,r.coordinate),p=an(a,o,l+(c==="inner"?-1:1)*f,r.coordinate);return{x1:d.x,y1:d.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,a=Math.cos(-r.coordinate*qRe),o;return a>M6?o=i==="outer"?"start":"end":a<-M6?o=i==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,a=r.cy,o=r.radius,l=r.axisLine,c=r.axisLineType,u=Qs(Qs({},dt(this.props,!1)),{},{fill:"none"},dt(l,!1));if(c==="circle")return ne.createElement(rP,il({className:"recharts-polar-angle-axis-line"},u,{cx:i,cy:a,r:o}));var f=this.props.ticks,d=f.map(function(p){return an(i,a,o,p.coordinate)});return ne.createElement(lRe,il({className:"recharts-polar-angle-axis-line"},u,{points:d}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,a=i.ticks,o=i.tick,l=i.tickLine,c=i.tickFormatter,u=i.stroke,f=dt(this.props,!1),d=dt(o,!1),p=Qs(Qs({},f),{},{fill:"none"},dt(l,!1)),m=a.map(function(b,v){var y=r.getTickLineCoord(b),x=r.getTickTextAnchor(b),_=Qs(Qs(Qs({textAnchor:x},f),{},{stroke:"none",fill:u},d),{},{index:v,payload:b,x:y.x2,y:y.y2});return ne.createElement(Kt,il({className:gt("recharts-polar-angle-axis-tick",cG(o)),key:"tick-".concat(b.coordinate)},Rl(r.props,b,v)),l&&ne.createElement("line",il({className:"recharts-polar-angle-axis-tick-line"},p,y)),o&&t.renderTickItem(o,_,c?c(b.value,v):b.value))});return ne.createElement(Kt,{className:"recharts-polar-angle-axis-ticks"},m)}},{key:"render",value:function(){var r=this.props,i=r.ticks,a=r.radius,o=r.axisLine;return a<=0||!i||!i.length?null:ne.createElement(Kt,{className:gt("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,a){var o;return ne.isValidElement(r)?o=ne.cloneElement(r,i):pt(r)?o=r(i):o=ne.createElement(Il,il({},i,{className:"recharts-polar-angle-axis-tick-value"}),a),o}}])})(E.PureComponent);Zx(Jx,"displayName","PolarAngleAxis");Zx(Jx,"axisType","angleAxis");Zx(Jx,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var Yj,D6;function URe(){if(D6)return Yj;D6=1;var e=C9(),t=e(Object.getPrototypeOf,Object);return Yj=t,Yj}var Qj,L6;function zRe(){if(L6)return Qj;L6=1;var e=xo(),t=URe(),n=bo(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,c=o.call(Object);function u(f){if(!n(f)||e(f)!=r)return!1;var d=t(f);if(d===null)return!0;var p=l.call(d,"constructor")&&d.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==c}return Qj=u,Qj}var HRe=zRe();const WRe=Mt(HRe);var Xj,$6;function VRe(){if($6)return Xj;$6=1;var e=xo(),t=bo(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return Xj=r,Xj}var GRe=VRe();const KRe=Mt(GRe);function Hh(e){"@babel/helpers - typeof";return Hh=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},Hh(e)}function hy(){return hy=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},hy.apply(this,arguments)}function YRe(e,t){return JRe(e)||ZRe(e,t)||XRe(e,t)||QRe()}function QRe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 840In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XRe(e,t){if(e){if(typeof e=="string")return F6(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 F6(e,t)}}function F6(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 ZRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function JRe(e){if(Array.isArray(e))return e}function B6(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 q6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?B6(Object(n),!0).forEach(function(r){eIe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eIe(e,t,n){return t=tIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tIe(e){var t=nIe(e,"string");return Hh(t)=="symbol"?t:t+""}function nIe(e,t){if(Hh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U6=function(t,n,r,i,a){var o=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+a),l+="L ".concat(t+r-o/2-i,",").concat(n+a),l+="L ".concat(t,",").concat(n," Z"),l},rIe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},iIe=function(t){var n=q6(q6({},rIe),t),r=E.useRef(),i=E.useState(-1),a=YRe(i,2),o=a[0],l=a[1];E.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&l(S)}catch{}},[]);var c=n.x,u=n.y,f=n.upperWidth,d=n.lowerWidth,p=n.height,m=n.className,b=n.animationEasing,v=n.animationDuration,y=n.animationBegin,x=n.isUpdateAnimationActive;if(c!==+c||u!==+u||f!==+f||d!==+d||p!==+p||f===0&&d===0||p===0)return null;var _=gt("recharts-trapezoid",m);return x?ne.createElement(yo,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:u},to:{upperWidth:f,lowerWidth:d,height:p,x:c,y:u},duration:v,animationEasing:b,isActive:x},function(S){var w=S.upperWidth,N=S.lowerWidth,k=S.height,C=S.x,P=S.y;return ne.createElement(yo,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:v,easing:b},ne.createElement("path",hy({},dt(n,!0),{className:_,d:U6(C,P,w,N,k),ref:r})))}):ne.createElement("g",null,ne.createElement("path",hy({},dt(n,!0),{className:_,d:U6(c,u,f,d,p)})))},aIe=["option","shapeType","propTransformer","activeClassName","isActive"];function Wh(e){"@babel/helpers - typeof";return Wh=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},Wh(e)}function oIe(e,t){if(e==null)return{};var n=sIe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sIe(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 z6(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 py(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z6(Object(n),!0).forEach(function(r){lIe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lIe(e,t,n){return t=cIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cIe(e){var t=uIe(e,"string");return Wh(t)=="symbol"?t:t+""}function uIe(e,t){if(Wh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dIe(e,t){return py(py({},t),e)}function fIe(e,t){return e==="symbols"}function H6(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return ne.createElement(nP,n);case"trapezoid":return ne.createElement(iIe,n);case"sector":return ne.createElement(fG,n);case"symbols":if(fIe(t))return ne.createElement(EA,n);break;default:return null}}function hIe(e){return E.isValidElement(e)?e.props:e}function jG(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?dIe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,c=oIe(e,aIe),u;if(E.isValidElement(t))u=E.cloneElement(t,py(py({},c),hIe(t)));else if(pt(t))u=t(c);else if(WRe(t)&&!KRe(t)){var f=i(t,c);u=ne.createElement(H6,{shapeType:n,elementProps:f})}else{var d=c;u=ne.createElement(H6,{shapeType:n,elementProps:d})}return l?ne.createElement(Kt,{className:o},u):u}function e0(e,t){return t!=null&&"trapezoids"in e.props}function t0(e,t){return t!=null&&"sectors"in e.props}function Vh(e,t){return t!=null&&"points"in e.props}function pIe(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,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function mIe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function gIe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function vIe(e,t){var n;return e0(e,t)?n=pIe:t0(e,t)?n=mIe:Vh(e,t)&&(n=gIe),n}function yIe(e,t){var n;return e0(e,t)?n="trapezoids":t0(e,t)?n="sectors":Vh(e,t)&&(n="points"),n}function xIe(e,t){if(e0(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(t0(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 Vh(e,t)?t.payload:{}}function bIe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=yIe(n,t),a=xIe(n,t),o=r.filter(function(c,u){var f=Vx(a,c),d=n.props[i].filter(function(b){var v=vIe(n,t);return v(b,t)}),p=n.props[i].indexOf(d[d.length-1]),m=u===p;return f&&m}),l=r.indexOf(o[o.length-1]);return l}var ev;function ku(e){"@babel/helpers - typeof";return ku=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},ku(e)}function Mc(){return Mc=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},Mc.apply(this,arguments)}function W6(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 tn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W6(Object(n),!0).forEach(function(r){Ci(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V6(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,EG(r.key),r)}}function _Ie(e,t,n){return t&&V6(e.prototype,t),n&&V6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function SIe(e,t,n){return t=my(t),jIe(e,NG()?Reflect.construct(t,n||[],my(e).constructor):t.apply(e,n))}function jIe(e,t){if(t&&(ku(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return NIe(e)}function NIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NG=function(){return!!e})()}function my(e){return my=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},my(e)}function EIe(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&&Bk(e,t)}function Bk(e,t){return Bk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Bk(e,t)}function Ci(e,t,n){return t=EG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EG(e){var t=kIe(e,"string");return ku(t)=="symbol"?t:t+""}function kIe(e,t){if(ku(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ku(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fa=(function(e){function t(n){var r;return wIe(this,t),r=SIe(this,t,[n]),Ci(r,"pieRef",null),Ci(r,"sectorRefs",[]),Ci(r,"id",Rp("recharts-pie-")),Ci(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),pt(i)&&i()}),Ci(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),pt(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return EIe(t,e),_Ie(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.label,l=a.labelLine,c=a.dataKey,u=a.valueKey,f=dt(this.props,!1),d=dt(o,!1),p=dt(l,!1),m=o&&o.offsetRadius||20,b=r.map(function(v,y){var x=(v.startAngle+v.endAngle)/2,_=an(v.cx,v.cy,v.outerRadius+m,x),S=tn(tn(tn(tn({},f),v),{},{stroke:"none"},d),{},{index:y,textAnchor:t.getTextAnchor(_.x,v.cx)},_),w=tn(tn(tn(tn({},f),v),{},{fill:"none",stroke:v.fill},p),{},{index:y,points:[an(v.cx,v.cy,v.outerRadius,x),_]}),N=c;return wt(c)&&wt(u)?N="value":wt(c)&&(N=u),ne.createElement(Kt,{key:"label-".concat(v.startAngle,"-").concat(v.endAngle,"-").concat(v.midAngle,"-").concat(y)},l&&t.renderLabelLineItem(l,w,"line"),t.renderLabelItem(o,S,hr(v,N)))});return ne.createElement(Kt,{className:"recharts-pie-labels"},b)}},{key:"renderSectorsStatically",value:function(r){var i=this,a=this.props,o=a.activeShape,l=a.blendStroke,c=a.inactiveShape;return r.map(function(u,f){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&r.length!==1)return null;var d=i.isActiveIndex(f),p=c&&i.hasActiveIndex()?c:null,m=d?o:p,b=tn(tn({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return ne.createElement(Kt,Mc({ref:function(y){y&&!i.sectorRefs.includes(y)&&i.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Rl(i.props,u,f),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(f)}),ne.createElement(jG,Mc({option:m,isActive:d,shapeType:"sector"},b)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,a=i.sectors,o=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,u=i.animationEasing,f=i.animationId,d=this.state,p=d.prevSectors,m=d.prevIsAnimationActive;return ne.createElement(yo,{begin:l,duration:c,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(f,"-").concat(m),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(b){var v=b.t,y=[],x=a&&a[0],_=x.startAngle;return a.forEach(function(S,w){var N=p&&p[w],k=w>0?ci(S,"paddingAngle",0):0;if(N){var C=Vo(N.endAngle-N.startAngle,S.endAngle-S.startAngle),P=tn(tn({},S),{},{startAngle:_+k,endAngle:_+C(v)+k});y.push(P),_=P.endAngle}else{var L=S.endAngle,T=S.startAngle,A=Vo(0,L-T),R=A(v),I=tn(tn({},S),{},{startAngle:_+k,endAngle:_+R+k});y.push(I),_=I.endAngle}}),ne.createElement(Kt,null,r.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(a){if(!a.altKey)switch(a.key){case"ArrowLeft":{var o=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[o].focus(),i.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,a=r.isAnimationActive,o=this.state.prevSectors;return a&&i&&i.length&&(!o||!Vx(o,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,a=i.hide,o=i.sectors,l=i.className,c=i.label,u=i.cx,f=i.cy,d=i.innerRadius,p=i.outerRadius,m=i.isAnimationActive,b=this.state.isAnimationFinished;if(a||!o||!o.length||!qe(u)||!qe(f)||!qe(d)||!qe(p))return null;var v=gt("recharts-pie",l);return ne.createElement(Kt,{tabIndex:this.props.rootTabIndex,className:v,ref:function(x){r.pieRef=x}},this.renderSectors(),c&&this.renderLabels(o),Vn.renderCallByParent(this.props,null,!1),(!m||b)&&fs.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,a){if(ne.isValidElement(r))return ne.cloneElement(r,i);if(pt(r))return r(i);var o=gt("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return ne.createElement(Nk,Mc({},i,{key:a,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(r,i,a){if(ne.isValidElement(r))return ne.cloneElement(r,i);var o=a;if(pt(r)&&(o=r(i),ne.isValidElement(o)))return o;var l=gt("recharts-pie-label-text",typeof r!="boolean"&&!pt(r)?r.className:"");return ne.createElement(Il,Mc({},i,{alignmentBaseline:"middle",className:l}),o)}}])})(E.PureComponent);ev=Fa;Ci(Fa,"displayName","Pie");Ci(Fa,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!ld.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});Ci(Fa,"parseDeltaAngle",function(e,t){var n=Nr(t-e),r=Math.min(Math.abs(t-e),360);return n*r});Ci(Fa,"getRealPieData",function(e){var t=e.data,n=e.children,r=dt(e,!1),i=Di(n,_h);return t&&t.length?t.map(function(a,o){return tn(tn(tn({payload:a},r),a),i&&i[o]&&i[o].props)}):i&&i.length?i.map(function(a){return tn(tn({},r),a.props)}):[]});Ci(Fa,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,a=t.height,o=lG(i,a),l=r+Er(e.cx,i,i/2),c=n+Er(e.cy,a,a/2),u=Er(e.innerRadius,o,0),f=Er(e.outerRadius,o,o*.8),d=e.maxRadius||Math.sqrt(i*i+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}});Ci(Fa,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?tn(tn({},t.type.defaultProps),t.props):t.props,i=ev.getRealPieData(r);if(!i||!i.length)return null;var a=r.cornerRadius,o=r.startAngle,l=r.endAngle,c=r.paddingAngle,u=r.dataKey,f=r.nameKey,d=r.valueKey,p=r.tooltipType,m=Math.abs(r.minAngle),b=ev.parseCoordinateOfPie(r,n),v=ev.parseDeltaAngle(o,l),y=Math.abs(v),x=u;wt(u)&&wt(d)?(sa(!1,`Use "dataKey" to specify the value of pie,
841 the props "valueKey" will be deprecated in 1.1.0`),x="value"):wt(u)&&(sa(!1,`Use "dataKey" to specify the value of pie, 842 the props "valueKey" will be deprecated in 1.1.0`),x=d);var _=i.filter(function(P){return hr(P,x,0)!==0}).length,S=(y>=360?_:_-1)*c,w=y-_*m-S,N=i.reduce(function(P,L){var T=hr(L,x,0);return P+(qe(T)?T:0)},0),k;if(N>0){var C;k=i.map(function(P,L){var T=hr(P,x,0),A=hr(P,f,L),R=(qe(T)?T:0)/N,I;L?I=C.endAngle+Nr(v)*c*(T!==0?1:0):I=o;var M=I+Nr(v)*((T!==0?m:0)+R*w),B=(I+M)/2,W=(b.innerRadius+b.outerRadius)/2,G=[{name:A,value:T,payload:P,dataKey:x,type:p}],H=an(b.cx,b.cy,W,B);return C=tn(tn(tn({percent:R,cornerRadius:a,name:A,tooltipPayload:G,midAngle:B,middleRadius:W,tooltipPosition:H},P),b),{},{value:hr(P,x),startAngle:I,endAngle:M,payload:P,paddingAngle:Nr(v)*c}),C})}return tn(tn({},b),{},{sectors:k,data:i})});var Zj,G6;function OIe(){if(G6)return Zj;G6=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var l=-1,c=t(e((i-r)/(a||1)),0),u=Array(c);c--;)u[o?c:++l]=r,r+=a;return u}return Zj=n,Zj}var Jj,K6;function kG(){if(K6)return Jj;K6=1;var e=YW(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return Jj=r,Jj}var eN,Y6;function CIe(){if(Y6)return eN;Y6=1;var e=OIe(),t=Dx(),n=kG();function r(i){return function(a,o,l){return l&&typeof l!="number"&&t(a,o,l)&&(o=l=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),l=l===void 0?a<o?1:-1:n(l),e(a,o,l,i)}}return eN=r,eN}var tN,Q6;function AIe(){if(Q6)return tN;Q6=1;var e=CIe(),t=e();return tN=t,tN}var PIe=AIe();const gy=Mt(PIe);function Gh(e){"@babel/helpers - typeof";return Gh=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},Gh(e)}function X6(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 Z6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?X6(Object(n),!0).forEach(function(r){OG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OG(e,t,n){return t=TIe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TIe(e){var t=RIe(e,"string");return Gh(t)=="symbol"?t:t+""}function RIe(e,t){if(Gh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IIe=["Webkit","Moz","O","ms"],MIe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=IIe.reduce(function(a,o){return Z6(Z6({},a),{},OG({},o+r,n))},{});return i[t]=n,i};function Ou(e){"@babel/helpers - typeof";return Ou=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},Ou(e)}function vy(){return vy=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},vy.apply(this,arguments)}function J6(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 nN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J6(Object(n),!0).forEach(function(r){ei(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eF(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,AG(r.key),r)}}function LIe(e,t,n){return t&&eF(e.prototype,t),n&&eF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Ie(e,t,n){return t=yy(t),FIe(e,CG()?Reflect.construct(t,n||[],yy(e).constructor):t.apply(e,n))}function FIe(e,t){if(t&&(Ou(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BIe(e)}function BIe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function CG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CG=function(){return!!e})()}
vendor: 109,640 bytes, lines 842-846
842function yy(e){return yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yy(e)}function qIe(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&&qk(e,t)}function qk(e,t){return qk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qk(e,t)}function ei(e,t,n){return t=AG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AG(e){var t=UIe(e,"string");return Ou(t)=="symbol"?t:t+""}function UIe(e,t){if(Ou(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ou(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zIe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Hf().domain(gy(0,c)).range([a,a+o-l]),f=u.domain().map(function(d){return u(d)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(r),endX:u(i),scale:u,scaleValues:f}},tF=function(t){return t.changedTouches&&!!t.changedTouches.length},Cu=(function(e){function t(n){var r;return DIe(this,t),r=$Ie(this,t,[n]),ei(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),ei(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),ei(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),r.detachDragEndListener()}),ei(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),ei(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),ei(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),ei(r,"handleSlideDragStart",function(i){var a=tF(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return qIe(t,e),LIe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,f=u.length-1,d=Math.min(i,a),p=Math.max(i,a),m=t.getIndexInRange(o,d),b=t.getIndexInRange(o,p);return{startIndex:m-m%c,endIndex:b===f?f:b-b%c}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,c=hr(a[r],l,r);return pt(o)?o(c,r):c}},{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,a=i.slideMoveStartX,o=i.startX,l=i.endX,c=this.props,u=c.x,f=c.width,d=c.travellerWidth,p=c.startIndex,m=c.endIndex,b=c.onChange,v=r.pageX-a;v>0?v=Math.min(v,u+f-d-l,u+f-d-o):v<0&&(v=Math.max(v,u-o,u-l));var y=this.getIndex({startX:o+v,endX:l+v});(y.startIndex!==p||y.endIndex!==m)&&b&&b(y),this.setState({startX:o+v,endX:l+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=tF(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,c=i.startX,u=this.state[o],f=this.props,d=f.x,p=f.width,m=f.travellerWidth,b=f.onChange,v=f.gap,y=f.data,x={startX:this.state.startX,endX:this.state.endX},_=r.pageX-a;_>0?_=Math.min(_,d+p-m-u):_<0&&(_=Math.max(_,d-u)),x[o]=u+_;var S=this.getIndex(x),w=S.startIndex,N=S.endIndex,k=function(){var P=y.length-1;return o==="startX"&&(l>c?w%v===0:N%v===0)||l<c&&N===P||o==="endX"&&(l>c?N%v===0:w%v===0)||l>c&&N===P};this.setState(ei(ei({},o,u+_),"brushMoveStartX",r.pageX),function(){b&&k()&&b(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,f=this.state[i],d=l.indexOf(f);if(d!==-1){var p=d+r;if(!(p===-1||p>=l.length)){var m=l[p];i==="startX"&&m>=u||i==="endX"&&m<=c||this.setState(ei({},i,m),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,c=r.fill,u=r.stroke;return ne.createElement("rect",{stroke:u,fill:c,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,c=r.data,u=r.children,f=r.padding,d=E.Children.only(u);return d?ne.cloneElement(d,{x:i,y:a,width:o,height:l,margin:f,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,l=this,c=this.props,u=c.y,f=c.travellerWidth,d=c.height,p=c.traveller,m=c.ariaLabel,b=c.data,v=c.startIndex,y=c.endIndex,x=Math.max(r,this.props.x),_=nN(nN({},dt(this.props,!1)),{},{x,y:u,width:f,height:d}),S=m||"Min value: ".concat((a=b[v])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[y])===null||o===void 0?void 0:o.name);return ne.createElement(Kt,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(N){["ArrowLeft","ArrowRight"].includes(N.key)&&(N.preventDefault(),N.stopPropagation(),l.handleTravellerMoveKeyboard(N.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,_))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,l=a.height,c=a.stroke,u=a.travellerWidth,f=Math.min(r,i)+u,d=Math.max(Math.abs(i-r)-u,0);return ne.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:f,y:o,width:d,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,l=r.height,c=r.travellerWidth,u=r.stroke,f=this.state,d=f.startX,p=f.endX,m=5,b={pointerEvents:"none",fill:u};return ne.createElement(Kt,{className:"recharts-brush-texts"},ne.createElement(Il,vy({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,p)-m,y:o+l/2},b),this.getTextOfTick(i)),ne.createElement(Il,vy({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,p)+c+m,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,l=r.x,c=r.y,u=r.width,f=r.height,d=r.alwaysShowText,p=this.state,m=p.startX,b=p.endX,v=p.isTextActive,y=p.isSlideMoving,x=p.isTravellerMoving,_=p.isTravellerFocused;if(!i||!i.length||!qe(l)||!qe(c)||!qe(u)||!qe(f)||u<=0||f<=0)return null;var S=gt("recharts-brush",a),w=ne.Children.count(o)===1,N=MIe("userSelect","none");return ne.createElement(Kt,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:N},this.renderBackground(),w&&this.renderPanorama(),this.renderSlide(m,b),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(b,"endX"),(v||y||x||_||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,l=r.height,c=r.stroke,u=Math.floor(a+l/2)-1;return ne.createElement(ne.Fragment,null,ne.createElement("rect",{x:i,y:a,width:o,height:l,fill:c,stroke:"none"}),ne.createElement("line",{x1:i+1,y1:u,x2:i+o-1,y2:u,fill:"none",stroke:"#fff"}),ne.createElement("line",{x1:i+1,y1:u+2,x2:i+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return ne.isValidElement(r)?a=ne.cloneElement(r,i):pt(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,l=r.x,c=r.travellerWidth,u=r.updateId,f=r.startIndex,d=r.endIndex;if(a!==i.prevData||u!==i.prevUpdateId)return nN({prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},a&&a.length?zIe({data:a,width:o,x:l,travellerWidth:c,startIndex:f,endIndex:d}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||c!==i.prevTravellerWidth)){i.scale.range([l,l+o-c]);var p=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:a,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,l=a-1;l-o>1;){var c=Math.floor((o+l)/2);r[c]>i?l=c:o=c}return i>=r[l]?l:o}}])})(E.PureComponent);ei(Cu,"displayName","Brush");ei(Cu,"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 rN,nF;function HIe(){if(nF)return rN;nF=1;var e=OA();function t(n,r){var i;return e(n,function(a,o,l){return i=r(a,o,l),!i}),!!i}return rN=t,rN}var iN,rF;function WIe(){if(rF)return iN;rF=1;var e=_9(),t=za(),n=HIe(),r=Kr(),i=Dx();function a(o,l,c){var u=r(o)?e:n;return c&&i(o,l,c)&&(l=void 0),u(o,t(l,3))}return iN=a,iN}var VIe=WIe();const GIe=Mt(VIe);var Ta=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},aN,iF;function KIe(){if(iF)return aN;iF=1;var e=HW();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return aN=t,aN}var oN,aF;function YIe(){if(aF)return oN;aF=1;var e=KIe(),t=UW(),n=za();function r(i,a){var o={};return a=n(a,3),t(i,function(l,c,u){e(o,c,a(l,c,u))}),o}return oN=r,oN}var QIe=YIe();const XIe=Mt(QIe);var sN,oF;function ZIe(){if(oF)return sN;oF=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 sN=e,sN}var lN,sF;function JIe(){if(sF)return lN;sF=1;var e=OA();function t(n,r){var i=!0;return e(n,function(a,o,l){return i=!!r(a,o,l),i}),i}return lN=t,lN}var cN,lF;function eMe(){if(lF)return cN;lF=1;var e=ZIe(),t=JIe(),n=za(),r=Kr(),i=Dx();function a(o,l,c){var u=r(o)?e:t;return c&&i(o,l,c)&&(l=void 0),u(o,n(l,3))}return cN=a,cN}var tMe=eMe();const PG=Mt(tMe);var nMe=["x","y"];function Kh(e){"@babel/helpers - typeof";return Kh=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},Kh(e)}function Uk(){return Uk=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},Uk.apply(this,arguments)}function cF(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 Sf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cF(Object(n),!0).forEach(function(r){rMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rMe(e,t,n){return t=iMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iMe(e){var t=aMe(e,"string");return Kh(t)=="symbol"?t:t+""}function aMe(e,t){if(Kh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oMe(e,t){if(e==null)return{};var n=sMe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sMe(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 lMe(e,t){var n=e.x,r=e.y,i=oMe(e,nMe),a="".concat(n),o=parseInt(a,10),l="".concat(r),c=parseInt(l,10),u="".concat(t.height||i.height),f=parseInt(u,10),d="".concat(t.width||i.width),p=parseInt(d,10);return Sf(Sf(Sf(Sf(Sf({},t),i),o?{x:o}:{}),c?{y:c}:{}),{},{height:f,width:p,name:t.name,radius:t.radius})}function uF(e){return ne.createElement(jG,Uk({shapeType:"rectangle",propTransformer:lMe,activeClassName:"recharts-active-bar"},e))}var cMe=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 a=qe(r)||fSe(r);return a?t(r,i):(a||vs(),n)}},uMe=["value","background"],TG;function Au(e){"@babel/helpers - typeof";return Au=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},Au(e)}function dMe(e,t){if(e==null)return{};var n=fMe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fMe(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 xy(){return xy=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},xy.apply(this,arguments)}function dF(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 An(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dF(Object(n),!0).forEach(function(r){is(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fF(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,IG(r.key),r)}}function pMe(e,t,n){return t&&fF(e.prototype,t),n&&fF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mMe(e,t,n){return t=by(t),gMe(e,RG()?Reflect.construct(t,n||[],by(e).constructor):t.apply(e,n))}function gMe(e,t){if(t&&(Au(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vMe(e)}function vMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function RG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(RG=function(){return!!e})()}function by(e){return by=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},by(e)}function yMe(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&&zk(e,t)}function zk(e,t){return zk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zk(e,t)}function is(e,t,n){return t=IG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IG(e){var t=xMe(e,"string");return Au(t)=="symbol"?t:t+""}function xMe(e,t){if(Au(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Au(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Vl=(function(e){function t(){var n;hMe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=mMe(this,t,[].concat(i)),is(n,"state",{isAnimationFinished:!1}),is(n,"id",Rp("recharts-bar-")),is(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),is(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return yMe(t,e),pMe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,l=a.dataKey,c=a.activeIndex,u=a.activeBar,f=dt(this.props,!1);return r&&r.map(function(d,p){var m=p===c,b=m?u:o,v=An(An(An({},f),d),{},{isActive:m,option:b,index:p,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return ne.createElement(Kt,xy({className:"recharts-bar-rectangle"},Rl(i.props,d,p),{key:"rectangle-".concat(d==null?void 0:d.x,"-").concat(d==null?void 0:d.y,"-").concat(d==null?void 0:d.value,"-").concat(p)}),ne.createElement(uF,v))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,c=i.animationBegin,u=i.animationDuration,f=i.animationEasing,d=i.animationId,p=this.state.prevData;return ne.createElement(yo,{begin:c,duration:u,isActive:l,easing:f,from:{t:0},to:{t:1},key:"bar-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var b=m.t,v=a.map(function(y,x){var _=p&&p[x];if(_){var S=Vo(_.x,y.x),w=Vo(_.y,y.y),N=Vo(_.width,y.width),k=Vo(_.height,y.height);return An(An({},y),{},{x:S(b),y:w(b),width:N(b),height:k(b)})}if(o==="horizontal"){var C=Vo(0,y.height),P=C(b);return An(An({},y),{},{y:y.y+y.height-P,height:P})}var L=Vo(0,y.width),T=L(b);return An(An({},y),{},{width:T})});return ne.createElement(Kt,null,r.renderRectanglesStatically(v))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Vx(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,c=dt(this.props.background,!1);return a.map(function(u,f){u.value;var d=u.background,p=dMe(u,uMe);if(!d)return null;var m=An(An(An(An(An({},p),{},{fill:"#eee"},d),c),Rl(r.props,u,f)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:f,className:"recharts-bar-background-rectangle"});return ne.createElement(uF,xy({key:"background-bar-".concat(f),option:r.props.background,isActive:f===l},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,c=a.yAxis,u=a.layout,f=a.children,d=Di(f,Yx);if(!d)return null;var p=u==="vertical"?o[0].height/2:o[0].width/2,m=function(y,x){var _=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:_,errorVal:hr(y,x)}},b={clipPath:r?"url(#clipPath-".concat(i,")"):null};return ne.createElement(Kt,b,d.map(function(v){return ne.cloneElement(v,{key:"error-bar-".concat(i,"-").concat(v.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:p,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,l=r.xAxis,c=r.yAxis,u=r.left,f=r.top,d=r.width,p=r.height,m=r.isAnimationActive,b=r.background,v=r.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,x=gt("recharts-bar",o),_=l&&l.allowDataOverflow,S=c&&c.allowDataOverflow,w=_||S,N=wt(v)?this.id:v;return ne.createElement(Kt,{className:x},_||S?ne.createElement("defs",null,ne.createElement("clipPath",{id:"clipPath-".concat(N)},ne.createElement("rect",{x:_?u:u-d/2,y:S?f:f-p/2,width:_?d:d*2,height:S?p:p*2}))):null,ne.createElement(Kt,{className:"recharts-bar-rectangles",clipPath:w?"url(#clipPath-".concat(N,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(w,N),(!m||y)&&fs.renderCallByParent(this.props,a))}}],[{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}}])})(E.PureComponent);TG=Vl;is(Vl,"displayName","Bar");is(Vl,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ld.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});is(Vl,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,f=e.dataStartIndex,d=e.displayedData,p=e.offset,m=KAe(r,n);if(!m)return null;var b=t.layout,v=n.type.defaultProps,y=v!==void 0?An(An({},v),n.props):n.props,x=y.dataKey,_=y.children,S=y.minPointSize,w=b==="horizontal"?o:a,N=u?w.scale.domain():null,k=tPe({numericAxis:w}),C=Di(_,_h),P=d.map(function(L,T){var A,R,I,M,B,W;u?A=YAe(u[f+T],N):(A=hr(L,x),Array.isArray(A)||(A=[k,A]));var G=cMe(S,TG.defaultProps.minPointSize)(A[1],T);if(b==="horizontal"){var H,K=[o.scale(A[0]),o.scale(A[1])],$=K[0],F=K[1];R=L$({axis:a,ticks:l,bandSize:i,offset:m.offset,entry:L,index:T}),I=(H=F??$)!==null&&H!==void 0?H:void 0,M=m.size;var z=$-F;if(B=Number.isNaN(z)?0:z,W={x:R,y:o.y,width:M,height:o.height},Math.abs(G)>0&&Math.abs(B)<Math.abs(G)){var U=Nr(B||G)*(Math.abs(G)-Math.abs(B));I-=U,B+=U}}else{var ee=[a.scale(A[0]),a.scale(A[1])],re=ee[0],X=ee[1];if(R=re,I=L$({axis:o,ticks:c,bandSize:i,offset:m.offset,entry:L,index:T}),M=X-re,B=m.size,W={x:a.x,y:I,width:a.width,height:B},Math.abs(G)>0&&Math.abs(M)<Math.abs(G)){var Z=Nr(M||G)*(Math.abs(G)-Math.abs(M));M+=Z}}return An(An(An({},L),{},{x:R,y:I,width:M,height:B,value:u?A:A[1],payload:L,background:W},C&&C[T]&&C[T].props),{},{tooltipPayload:[oG(n,L)],tooltipPosition:{x:R+M/2,y:I+B/2}})});return An({data:P,layout:b},p)});function Yh(e){"@babel/helpers - typeof";return Yh=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},Yh(e)}function bMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hF(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,MG(r.key),r)}}function wMe(e,t,n){return t&&hF(e.prototype,t),n&&hF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pF(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 ra(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pF(Object(n),!0).forEach(function(r){n0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function n0(e,t,n){return t=MG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MG(e){var t=_Me(e,"string");return Yh(t)=="symbol"?t:t+""}function _Me(e,t){if(Yh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var SMe=function(t,n,r,i,a){var o=t.width,l=t.height,c=t.layout,u=t.children,f=Object.keys(n),d={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},p=!!ti(u,Vl);return f.reduce(function(m,b){var v=n[b],y=v.orientation,x=v.domain,_=v.padding,S=_===void 0?{}:_,w=v.mirror,N=v.reversed,k="".concat(y).concat(w?"Mirror":""),C,P,L,T,A;if(v.type==="number"&&(v.padding==="gap"||v.padding==="no-gap")){var R=x[1]-x[0],I=1/0,M=v.categoricalDomain.sort(mSe);if(M.forEach(function(ee,re){re>0&&(I=Math.min((ee||0)-(M[re-1]||0),I))}),Number.isFinite(I)){var B=I/R,W=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(C=B*W/2),v.padding==="no-gap"){var G=Er(t.barCategoryGap,B*W),H=B*W/2;C=H-G-(H-G)/W*G}}}i==="xAxis"?P=[r.left+(S.left||0)+(C||0),r.left+r.width-(S.right||0)-(C||0)]:i==="yAxis"?P=c==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(C||0),r.top+r.height-(S.bottom||0)-(C||0)]:P=v.range,N&&(P=[P[1],P[0]]);var K=nG(v,a,p),$=K.scale,F=K.realScaleType;$.domain(x).range(P),rG($);var z=iG($,ra(ra({},v),{},{realScaleType:F}));i==="xAxis"?(A=y==="top"&&!w||y==="bottom"&&w,L=r.left,T=d[k]-A*v.height):i==="yAxis"&&(A=y==="left"&&!w||y==="right"&&w,L=d[k]-A*v.width,T=r.top);var U=ra(ra(ra({},v),z),{},{realScaleType:F,x:L,y:T,scale:$,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return U.bandSize=iy(U,z),!v.hide&&i==="xAxis"?d[k]+=(A?-1:1)*U.height:v.hide||(d[k]+=(A?-1:1)*U.width),ra(ra({},m),{},n0({},b,U))},{})},DG=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},jMe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return DG({x:n,y:r},{x:i,y:a})},LG=(function(){function e(t){bMe(this,e),this.scale=t}return wMe(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,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();n0(LG,"EPS",1e-4);var iP=function(t){var n=Object.keys(t).reduce(function(r,i){return ra(ra({},r),{},n0({},i,LG.create(t[i])))},{});return ra(ra({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return XIe(i,function(c,u){return n[u].apply(c,{bandAware:o,position:l})})},isInRange:function(i){return PG(i,function(a,o){return n[o].isInRange(a)})}})};function NMe(e){return(e%180+180)%180}var EMe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=NMe(i),o=a*Math.PI/180,l=Math.atan(r/n),c=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(c)},uN,mF;function kMe(){if(mF)return uN;mF=1;var e=za(),t=Ep(),n=_x();function r(i){return function(a,o,l){var c=Object(a);if(!t(a)){var u=e(o,3);a=n(a),o=function(d){return u(c[d],d,c)}}var f=i(a,o,l);return f>-1?c[u?a[f]:f]:void 0}}return uN=r,uN}var dN,gF;function OMe(){if(gF)return dN;gF=1;var e=kG();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return dN=t,dN}var fN,vF;function CMe(){if(vF)return fN;vF=1;var e=LW(),t=za(),n=OMe(),r=Math.max;function i(a,o,l){var c=a==null?0:a.length;if(!c)return-1;var u=l==null?0:n(l);return u<0&&(u=r(c+u,0)),e(a,t(o,3),u)}return fN=i,fN}var hN,yF;function AMe(){if(yF)return hN;yF=1;var e=kMe(),t=CMe(),n=e(t);return hN=n,hN}var PMe=AMe();const TMe=Mt(PMe);var RMe=uW();const IMe=Mt(RMe);var MMe=IMe(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("")}),aP=E.createContext(void 0),oP=E.createContext(void 0),$G=E.createContext(void 0),FG=E.createContext({}),BG=E.createContext(void 0),qG=E.createContext(0),UG=E.createContext(0),xF=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,f=MMe(a);return ne.createElement(aP.Provider,{value:r},ne.createElement(oP.Provider,{value:i},ne.createElement(FG.Provider,{value:a},ne.createElement($G.Provider,{value:f},ne.createElement(BG.Provider,{value:o},ne.createElement(qG.Provider,{value:u},ne.createElement(UG.Provider,{value:c},l)))))))},DMe=function(){return E.useContext(BG)},zG=function(t){var n=E.useContext(aP);n==null&&vs();var r=n[t];return r==null&&vs(),r},LMe=function(){var t=E.useContext(aP);return Ko(t)},$Me=function(){var t=E.useContext(oP),n=TMe(t,function(r){return PG(r.domain,Number.isFinite)});return n||Ko(t)},HG=function(t){var n=E.useContext(oP);n==null&&vs();var r=n[t];return r==null&&vs(),r},FMe=function(){var t=E.useContext($G);return t},BMe=function(){return E.useContext(FG)},sP=function(){return E.useContext(UG)},lP=function(){return E.useContext(qG)};function Pu(e){"@babel/helpers - typeof";return Pu=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},Pu(e)}function qMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UMe(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,VG(r.key),r)}}function zMe(e,t,n){return t&&UMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HMe(e,t,n){return t=wy(t),WMe(e,WG()?Reflect.construct(t,n||[],wy(e).constructor):t.apply(e,n))}function WMe(e,t){if(t&&(Pu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return VMe(e)}function VMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WG=function(){return!!e})()}function wy(e){return wy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},wy(e)}function GMe(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&&Hk(e,t)}function Hk(e,t){return Hk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Hk(e,t)}function bF(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 wF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bF(Object(n),!0).forEach(function(r){cP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cP(e,t,n){return t=VG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VG(e){var t=KMe(e,"string");return Pu(t)=="symbol"?t:t+""}function KMe(e,t){if(Pu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Pu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function YMe(e,t){return JMe(e)||ZMe(e,t)||XMe(e,t)||QMe()}function QMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 843In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XMe(e,t){if(e){if(typeof e=="string")return _F(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 _F(e,t)}}function _F(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 ZMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function JMe(e){if(Array.isArray(e))return e}function Wk(){return Wk=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},Wk.apply(this,arguments)}var eDe=function(t,n){var r;return ne.isValidElement(t)?r=ne.cloneElement(t,n):pt(t)?r=t(n):r=ne.createElement("line",Wk({},n,{className:"recharts-reference-line-line"})),r},tDe=function(t,n,r,i,a,o,l,c,u){var f=a.x,d=a.y,p=a.width,m=a.height;if(r){var b=u.y,v=t.y.apply(b,{position:o});if(Ta(u,"discard")&&!t.y.isInRange(v))return null;var y=[{x:f+p,y:v},{x:f,y:v}];return c==="left"?y.reverse():y}if(n){var x=u.x,_=t.x.apply(x,{position:o});if(Ta(u,"discard")&&!t.x.isInRange(_))return null;var S=[{x:_,y:d+m},{x:_,y:d}];return l==="top"?S.reverse():S}if(i){var w=u.segment,N=w.map(function(k){return t.apply(k,{position:o})});return Ta(u,"discard")&&GIe(N,function(k){return!t.isInRange(k)})?null:N}return null};function nDe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=DMe(),f=zG(i),d=HG(a),p=FMe();if(!u||!p)return null;sa(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=iP({x:f.scale,y:d.scale}),b=Fn(t),v=Fn(n),y=r&&r.length===2,x=tDe(m,b,v,y,p,e.position,f.orientation,d.orientation,e);if(!x)return null;var _=YMe(x,2),S=_[0],w=S.x,N=S.y,k=_[1],C=k.x,P=k.y,L=Ta(e,"hidden")?"url(#".concat(u,")"):void 0,T=wF(wF({clipPath:L},dt(e,!0)),{},{x1:w,y1:N,x2:C,y2:P});return ne.createElement(Kt,{className:gt("recharts-reference-line",l)},eDe(o,T),Vn.renderCallByParent(e,jMe({x1:w,y1:N,x2:C,y2:P})))}var uP=(function(e){function t(){return qMe(this,t),HMe(this,t,arguments)}return GMe(t,e),zMe(t,[{key:"render",value:function(){return ne.createElement(nDe,this.props)}}])})(ne.Component);cP(uP,"displayName","ReferenceLine");cP(uP,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Vk(){return Vk=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},Vk.apply(this,arguments)}function Tu(e){"@babel/helpers - typeof";return Tu=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},Tu(e)}function SF(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 jF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SF(Object(n),!0).forEach(function(r){r0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iDe(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,KG(r.key),r)}}function aDe(e,t,n){return t&&iDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function oDe(e,t,n){return t=_y(t),sDe(e,GG()?Reflect.construct(t,n||[],_y(e).constructor):t.apply(e,n))}function sDe(e,t){if(t&&(Tu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lDe(e)}function lDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GG=function(){return!!e})()}function _y(e){return _y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_y(e)}function cDe(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&&Gk(e,t)}function Gk(e,t){return Gk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Gk(e,t)}function r0(e,t,n){return t=KG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KG(e){var t=uDe(e,"string");return Tu(t)=="symbol"?t:t+""}function uDe(e,t){if(Tu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dDe=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=iP({x:i.scale,y:a.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return Ta(t,"discard")&&!o.isInRange(l)?null:l},i0=(function(e){function t(){return rDe(this,t),oDe(this,t,arguments)}return cDe(t,e),aDe(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,l=r.alwaysShow,c=r.clipPathId,u=Fn(i),f=Fn(a);if(sa(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!f)return null;var d=dDe(this.props);if(!d)return null;var p=d.x,m=d.y,b=this.props,v=b.shape,y=b.className,x=Ta(this.props,"hidden")?"url(#".concat(c,")"):void 0,_=jF(jF({clipPath:x},dt(this.props,!0)),{},{cx:p,cy:m});return ne.createElement(Kt,{className:gt("recharts-reference-dot",y)},t.renderDot(v,_),Vn.renderCallByParent(this.props,{x:p-o,y:m-o,width:2*o,height:2*o}))}}])})(ne.Component);r0(i0,"displayName","ReferenceDot");r0(i0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});r0(i0,"renderDot",function(e,t){var n;return ne.isValidElement(e)?n=ne.cloneElement(e,t):pt(e)?n=e(t):n=ne.createElement(rP,Vk({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Kk(){return Kk=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},Kk.apply(this,arguments)}function Ru(e){"@babel/helpers - typeof";return Ru=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},Ru(e)}function NF(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 EF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NF(Object(n),!0).forEach(function(r){a0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function fDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hDe(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,QG(r.key),r)}}function pDe(e,t,n){return t&&hDe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mDe(e,t,n){return t=Sy(t),gDe(e,YG()?Reflect.construct(t,n||[],Sy(e).constructor):t.apply(e,n))}function gDe(e,t){if(t&&(Ru(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vDe(e)}function vDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YG=function(){return!!e})()}function Sy(e){return Sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sy(e)}function yDe(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&&Yk(e,t)}function Yk(e,t){return Yk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yk(e,t)}function a0(e,t,n){return t=QG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QG(e){var t=xDe(e,"string");return Ru(t)=="symbol"?t:t+""}function xDe(e,t){if(Ru(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ru(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bDe=function(t,n,r,i,a){var o=a.x1,l=a.x2,c=a.y1,u=a.y2,f=a.xAxis,d=a.yAxis;if(!f||!d)return null;var p=iP({x:f.scale,y:d.scale}),m={x:t?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:r?p.y.apply(c,{position:"start"}):p.y.rangeMin},b={x:n?p.x.apply(l,{position:"end"}):p.x.rangeMax,y:i?p.y.apply(u,{position:"end"}):p.y.rangeMax};return Ta(a,"discard")&&(!p.isInRange(m)||!p.isInRange(b))?null:DG(m,b)},o0=(function(e){function t(){return fDe(this,t),mDe(this,t,arguments)}return yDe(t,e),pDe(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,l=r.y2,c=r.className,u=r.alwaysShow,f=r.clipPathId;sa(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var d=Fn(i),p=Fn(a),m=Fn(o),b=Fn(l),v=this.props.shape;if(!d&&!p&&!m&&!b&&!v)return null;var y=bDe(d,p,m,b,this.props);if(!y&&!v)return null;var x=Ta(this.props,"hidden")?"url(#".concat(f,")"):void 0;return ne.createElement(Kt,{className:gt("recharts-reference-area",c)},t.renderRect(v,EF(EF({clipPath:x},dt(this.props,!0)),y)),Vn.renderCallByParent(this.props,y))}}])})(ne.Component);a0(o0,"displayName","ReferenceArea");a0(o0,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});a0(o0,"renderRect",function(e,t){var n;return ne.isValidElement(e)?n=ne.cloneElement(e,t):pt(e)?n=e(t):n=ne.createElement(nP,Kk({},t,{className:"recharts-reference-area-rect"})),n});function XG(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 wDe(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return EMe(r,n)}function _De(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:r?i:a,end:r?i+o:a+l}:{start:r?i+o:a+l,end:r?i:a}}function jy(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function SDe(e,t){return XG(e,t+1)}function jDe(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,l=t.end,c=0,u=1,f=o,d=function(){var b=r==null?void 0:r[c];if(b===void 0)return{v:XG(r,u)};var v=c,y,x=function(){return y===void 0&&(y=n(b,v)),y},_=b.coordinate,S=c===0||jy(e,_,x,f,l);S||(c=0,f=o,u+=1),S&&(f=_+e*(x()/2+i),c+=u)},p;u<=a.length;)if(p=d(),p)return p.v;return[]}function Qh(e){"@babel/helpers - typeof";return Qh=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},Qh(e)}function kF(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?kF(Object(n),!0).forEach(function(r){NDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function NDe(e,t,n){return t=EDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EDe(e){var t=kDe(e,"string");return Qh(t)=="symbol"?t:t+""}function kDe(e,t){if(Qh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ODe(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,l=t.start,c=t.end,u=function(p){var m=a[p],b,v=function(){return b===void 0&&(b=n(m,p)),b};if(p===o-1){var y=e*(m.coordinate+e*v()/2-c);a[p]=m=dr(dr({},m),{},{tickCoord:y>0?m.coordinate-y*e:m.coordinate})}else a[p]=m=dr(dr({},m),{},{tickCoord:m.coordinate});var x=jy(e,m.tickCoord,v,l,c);x&&(c=m.tickCoord-e*(v()/2+i),a[p]=dr(dr({},m),{},{isShow:!0}))},f=o-1;f>=0;f--)u(f);return a}function CDe(e,t,n,r,i,a){var o=(r||[]).slice(),l=o.length,c=t.start,u=t.end;if(a){var f=r[l-1],d=n(f,l-1),p=e*(f.coordinate+e*d/2-u);o[l-1]=f=dr(dr({},f),{},{tickCoord:p>0?f.coordinate-p*e:f.coordinate});var m=jy(e,f.tickCoord,function(){return d},c,u);m&&(u=f.tickCoord-e*(d/2+i),o[l-1]=dr(dr({},f),{},{isShow:!0}))}for(var b=a?l-1:l,v=function(_){var S=o[_],w,N=function(){return w===void 0&&(w=n(S,_)),w};if(_===0){var k=e*(S.coordinate-e*N()/2-c);o[_]=S=dr(dr({},S),{},{tickCoord:k<0?S.coordinate-k*e:S.coordinate})}else o[_]=S=dr(dr({},S),{},{tickCoord:S.coordinate});var C=jy(e,S.tickCoord,N,c,u);C&&(c=S.tickCoord+e*(N()/2+i),o[_]=dr(dr({},S),{},{isShow:!0}))},y=0;y<b;y++)v(y);return o}function dP(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,f=e.unit,d=e.angle;if(!i||!i.length||!r)return[];if(qe(c)||ld.isSsr)return SDe(i,typeof c=="number"&&qe(c)?c:0);var p=[],m=l==="top"||l==="bottom"?"width":"height",b=f&&m==="width"?zf(f,{fontSize:t,letterSpacing:n}):{width:0,height:0},v=function(S,w){var N=pt(u)?u(S.value,w):S.value;return m==="width"?wDe(zf(N,{fontSize:t,letterSpacing:n}),b,d):zf(N,{fontSize:t,letterSpacing:n})[m]},y=i.length>=2?Nr(i[1].coordinate-i[0].coordinate):1,x=_De(a,y,m);return c==="equidistantPreserveStart"?jDe(y,x,v,i,o):(c==="preserveStart"||c==="preserveStartEnd"?p=CDe(y,x,v,i,o,c==="preserveStartEnd"):p=ODe(y,x,v,i,o),p.filter(function(_){return _.isShow}))}var ADe=["viewBox"],PDe=["viewBox"],TDe=["ticks"];function Iu(e){"@babel/helpers - typeof";return Iu=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},Iu(e)}function Dc(){return Dc=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},Dc.apply(this,arguments)}function OF(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 Ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OF(Object(n),!0).forEach(function(r){fP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pN(e,t){if(e==null)return{};var n=RDe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RDe(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 IDe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CF(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,JG(r.key),r)}}function MDe(e,t,n){return t&&CF(e.prototype,t),n&&CF(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function DDe(e,t,n){return t=Ny(t),LDe(e,ZG()?Reflect.construct(t,n||[],Ny(e).constructor):t.apply(e,n))}function LDe(e,t){if(t&&(Iu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $De(e)}function $De(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZG(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZG=function(){return!!e})()}function Ny(e){return Ny=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ny(e)}function FDe(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&&Qk(e,t)}function Qk(e,t){return Qk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Qk(e,t)}function fP(e,t,n){return t=JG(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JG(e){var t=BDe(e,"string");return Iu(t)=="symbol"?t:t+""}function BDe(e,t){if(Iu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Iu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fd=(function(e){function t(n){var r;return IDe(this,t),r=DDe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return FDe(t,e),MDe(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=pN(r,ADe),l=this.props,c=l.viewBox,u=pN(l,PDe);return!Hc(a,c)||!Hc(o,u)||!Hc(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,a=i.x,o=i.y,l=i.width,c=i.height,u=i.orientation,f=i.tickSize,d=i.mirror,p=i.tickMargin,m,b,v,y,x,_,S=d?-1:1,w=r.tickSize||f,N=qe(r.tickCoord)?r.tickCoord:r.coordinate;switch(u){case"top":m=b=r.coordinate,y=o+ +!d*c,v=y-S*w,_=v-S*p,x=N;break;case"left":v=y=r.coordinate,b=a+ +!d*l,m=b-S*w,x=m-S*p,_=N;break;case"right":v=y=r.coordinate,b=a+ +d*l,m=b+S*w,x=m+S*p,_=N;break;default:m=b=r.coordinate,y=o+ +d*c,v=y+S*w,_=v+S*p,x=N;break}return{line:{x1:m,y1:v,x2:b,y2:y},tick:{x,y:_}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,c=r.orientation,u=r.mirror,f=r.axisLine,d=Ln(Ln(Ln({},dt(this.props,!1)),dt(f,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var p=+(c==="top"&&!u||c==="bottom"&&u);d=Ln(Ln({},d),{},{x1:i,y1:a+p*l,x2:i+o,y2:a+p*l})}else{var m=+(c==="left"&&!u||c==="right"&&u);d=Ln(Ln({},d),{},{x1:i+m*o,y1:a,x2:i+m*o,y2:a+l})}return ne.createElement("line",Dc({},d,{className:gt("recharts-cartesian-axis-line",ci(f,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,l=this.props,c=l.tickLine,u=l.stroke,f=l.tick,d=l.tickFormatter,p=l.unit,m=dP(Ln(Ln({},this.props),{},{ticks:r}),i,a),b=this.getTickTextAnchor(),v=this.getTickVerticalAnchor(),y=dt(this.props,!1),x=dt(f,!1),_=Ln(Ln({},y),{},{fill:"none"},dt(c,!1)),S=m.map(function(w,N){var k=o.getTickLineCoord(w),C=k.line,P=k.tick,L=Ln(Ln(Ln(Ln({textAnchor:b,verticalAnchor:v},y),{},{stroke:"none",fill:u},x),P),{},{index:N,payload:w,visibleTicksCount:m.length,tickFormatter:d});return ne.createElement(Kt,Dc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(w.value,"-").concat(w.coordinate,"-").concat(w.tickCoord)},Rl(o.props,w,N)),c&&ne.createElement("line",Dc({},_,C,{className:gt("recharts-cartesian-axis-tick-line",ci(c,"className"))})),f&&t.renderTickItem(f,L,"".concat(pt(d)?d(w.value,N):w.value).concat(p||"")))});return ne.createElement("g",{className:"recharts-cartesian-axis-ticks"},S)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,c=i.ticksGenerator,u=i.className,f=i.hide;if(f)return null;var d=this.props,p=d.ticks,m=pN(d,TDe),b=p;return pt(c)&&(b=p&&p.length>0?c(this.props):c(m)),o<=0||l<=0||!b||!b.length?null:ne.createElement(Kt,{className:gt("recharts-cartesian-axis",u),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Vn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,l=gt(i.className,"recharts-cartesian-axis-tick-value");return ne.isValidElement(r)?o=ne.cloneElement(r,Ln(Ln({},i),{},{className:l})):pt(r)?o=r(Ln(Ln({},i),{},{className:l})):o=ne.createElement(Il,Dc({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(E.Component);fP(fd,"displayName","CartesianAxis");fP(fd,"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 qDe=["x1","y1","x2","y2","key"],UDe=["offset"];function Dl(e){"@babel/helpers - typeof";return Dl=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},Dl(e)}function AF(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 fr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?AF(Object(n),!0).forEach(function(r){zDe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zDe(e,t,n){return t=HDe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HDe(e){var t=WDe(e,"string");return Dl(t)=="symbol"?t:t+""}function WDe(e,t){if(Dl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ul(){return ul=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},ul.apply(this,arguments)}function PF(e,t){if(e==null)return{};var n=VDe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[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}var GDe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,c=t.ry;return ne.createElement("rect",{x:i,y:a,ry:c,width:o,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function eK(e,t){var n;if(ne.isValidElement(e))n=ne.cloneElement(e,t);else if(pt(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,c=PF(t,qDe),u=dt(c,!1);u.offset;var f=PF(u,UDe);n=ne.createElement("line",ul({},f,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:l}))}return n}function KDe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var u=fr(fr({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(c),index:c});return eK(i,u)});return ne.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function YDe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,c){var u=fr(fr({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(c),index:c});return eK(i,u)});return ne.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function QDe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var f=l.map(function(p){return Math.round(p+i-i)}).sort(function(p,m){return p-m});i!==f[0]&&f.unshift(0);var d=f.map(function(p,m){var b=!f[m+1],v=b?i+o-p:f[m+1]-p;if(v<=0)return null;var y=m%t.length;return ne.createElement("rect",{key:"react-".concat(m),y:p,x:r,height:v,width:a,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return ne.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function XDe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!n||!r||!r.length)return null;var f=u.map(function(p){return Math.round(p+a-a)}).sort(function(p,m){return p-m});a!==f[0]&&f.unshift(0);var d=f.map(function(p,m){var b=!f[m+1],v=b?a+l-p:f[m+1]-p;if(v<=0)return null;var y=m%r.length;return ne.createElement("rect",{key:"react-".concat(m),x:p,y:o,width:v,height:c,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return ne.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var ZDe=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return tG(dP(fr(fr(fr({},fd.defaultProps),r),{},{ticks:so(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},JDe=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return tG(dP(fr(fr(fr({},fd.defaultProps),r),{},{ticks:so(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},Oc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function tK(e){var t,n,r,i,a,o,l=sP(),c=lP(),u=BMe(),f=fr(fr({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Oc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Oc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Oc.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Oc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:Oc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Oc.verticalFill,x:qe(e.x)?e.x:u.left,y:qe(e.y)?e.y:u.top,width:qe(e.width)?e.width:u.width,height:qe(e.height)?e.height:u.height}),d=f.x,p=f.y,m=f.width,b=f.height,v=f.syncWithTicks,y=f.horizontalValues,x=f.verticalValues,_=LMe(),S=$Me();if(!qe(m)||m<=0||!qe(b)||b<=0||!qe(d)||d!==+d||!qe(p)||p!==+p)return null;var w=f.verticalCoordinatesGenerator||ZDe,N=f.horizontalCoordinatesGenerator||JDe,k=f.horizontalPoints,C=f.verticalPoints;if((!k||!k.length)&&pt(N)){var P=y&&y.length,L=N({yAxis:S?fr(fr({},S),{},{ticks:P?y:S.ticks}):void 0,width:l,height:c,offset:u},P?!0:v);sa(Array.isArray(L),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Dl(L),"]")),Array.isArray(L)&&(k=L)}if((!C||!C.length)&&pt(w)){var T=x&&x.length,A=w({xAxis:_?fr(fr({},_),{},{ticks:T?x:_.ticks}):void 0,width:l,height:c,offset:u},T?!0:v);sa(Array.isArray(A),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Dl(A),"]")),Array.isArray(A)&&(C=A)}return ne.createElement("g",{className:"recharts-cartesian-grid"},ne.createElement(GDe,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),ne.createElement(KDe,ul({},f,{offset:u,horizontalPoints:k,xAxis:_,yAxis:S})),ne.createElement(YDe,ul({},f,{offset:u,verticalPoints:C,xAxis:_,yAxis:S})),ne.createElement(QDe,ul({},f,{horizontalPoints:k})),ne.createElement(XDe,ul({},f,{verticalPoints:C})))}tK.displayName="CartesianGrid";function Mu(e){"@babel/helpers - typeof";return Mu=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},Mu(e)}function e4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t4e(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,iK(r.key),r)}}function n4e(e,t,n){return t&&t4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function r4e(e,t,n){return t=Ey(t),i4e(e,nK()?Reflect.construct(t,n||[],Ey(e).constructor):t.apply(e,n))}function i4e(e,t){if(t&&(Mu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a4e(e)}function a4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nK=function(){return!!e})()}function Ey(e){return Ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ey(e)}function o4e(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&&Xk(e,t)}function Xk(e,t){return Xk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xk(e,t)}function rK(e,t,n){return t=iK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iK(e){var t=s4e(e,"string");return Mu(t)=="symbol"?t:t+""}function s4e(e,t){if(Mu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Zk(){return Zk=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},Zk.apply(this,arguments)}function l4e(e){var t=e.xAxisId,n=sP(),r=lP(),i=zG(t);return i==null?null:E.createElement(fd,Zk({},i,{className:gt("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return so(o,!0)}}))}var s0=(function(e){function t(){return e4e(this,t),r4e(this,t,arguments)}return o4e(t,e),n4e(t,[{key:"render",value:function(){return E.createElement(l4e,this.props)}}])})(E.Component);rK(s0,"displayName","XAxis");rK(s0,"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 Du(e){"@babel/helpers - typeof";return Du=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},Du(e)}function c4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u4e(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,sK(r.key),r)}}function d4e(e,t,n){return t&&u4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f4e(e,t,n){return t=ky(t),h4e(e,aK()?Reflect.construct(t,n||[],ky(e).constructor):t.apply(e,n))}function h4e(e,t){if(t&&(Du(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return p4e(e)}function p4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(aK=function(){return!!e})()}function ky(e){return ky=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ky(e)}function m4e(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&&Jk(e,t)}function Jk(e,t){return Jk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Jk(e,t)}function oK(e,t,n){return t=sK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sK(e){var t=g4e(e,"string");return Du(t)=="symbol"?t:t+""}function g4e(e,t){if(Du(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Du(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function eO(){return eO=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},eO.apply(this,arguments)}var v4e=function(t){var n=t.yAxisId,r=sP(),i=lP(),a=HG(n);return a==null?null:E.createElement(fd,eO({},a,{className:gt("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return so(l,!0)}}))},l0=(function(e){function t(){return c4e(this,t),f4e(this,t,arguments)}return m4e(t,e),d4e(t,[{key:"render",value:function(){return E.createElement(v4e,this.props)}}])})(E.Component);oK(l0,"displayName","YAxis");oK(l0,"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 TF(e){return w4e(e)||b4e(e)||x4e(e)||y4e()}function y4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 844In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x4e(e,t){if(e){if(typeof e=="string")return tO(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 tO(e,t)}}function b4e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function w4e(e){if(Array.isArray(e))return tO(e)}function tO(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 nO=function(t,n,r,i,a){var o=Di(t,uP),l=Di(t,i0),c=[].concat(TF(o),TF(l)),u=Di(t,o0),f="".concat(i,"Id"),d=i[0],p=n;if(c.length&&(p=c.reduce(function(v,y){if(y.props[f]===r&&Ta(y.props,"extendDomain")&&qe(y.props[d])){var x=y.props[d];return[Math.min(v[0],x),Math.max(v[1],x)]}return v},p)),u.length){var m="".concat(d,"1"),b="".concat(d,"2");p=u.reduce(function(v,y){if(y.props[f]===r&&Ta(y.props,"extendDomain")&&qe(y.props[m])&&qe(y.props[b])){var x=y.props[m],_=y.props[b];return[Math.min(v[0],x,_),Math.max(v[1],x,_)]}return v},p)}return a&&a.length&&(p=a.reduce(function(v,y){return qe(y)?[Math.min(v[0],y),Math.max(v[1],y)]:v},p)),p},mN={exports:{}},RF;function _4e(){return RF||(RF=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(c,u,f){this.fn=c,this.context=u,this.once=f||!1}function a(c,u,f,d,p){if(typeof f!="function")throw new TypeError("The listener must be a function");var m=new i(f,d||c,p),b=n?n+u:u;return c._events[b]?c._events[b].fn?c._events[b]=[c._events[b],m]:c._events[b].push(m):(c._events[b]=m,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],f,d;if(this._eventsCount===0)return u;for(d in f=this._events)t.call(f,d)&&u.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(f)):u},l.prototype.listeners=function(u){var f=n?n+u:u,d=this._events[f];if(!d)return[];if(d.fn)return[d.fn];for(var p=0,m=d.length,b=new Array(m);p<m;p++)b[p]=d[p].fn;return b},l.prototype.listenerCount=function(u){var f=n?n+u:u,d=this._events[f];return d?d.fn?1:d.length:0},l.prototype.emit=function(u,f,d,p,m,b){var v=n?n+u:u;if(!this._events[v])return!1;var y=this._events[v],x=arguments.length,_,S;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),x){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,f),!0;case 3:return y.fn.call(y.context,f,d),!0;case 4:return y.fn.call(y.context,f,d,p),!0;case 5:return y.fn.call(y.context,f,d,p,m),!0;case 6:return y.fn.call(y.context,f,d,p,m,b),!0}for(S=1,_=new Array(x-1);S<x;S++)_[S-1]=arguments[S];y.fn.apply(y.context,_)}else{var w=y.length,N;for(S=0;S<w;S++)switch(y[S].once&&this.removeListener(u,y[S].fn,void 0,!0),x){case 1:y[S].fn.call(y[S].context);break;case 2:y[S].fn.call(y[S].context,f);break;case 3:y[S].fn.call(y[S].context,f,d);break;case 4:y[S].fn.call(y[S].context,f,d,p);break;default:if(!_)for(N=1,_=new Array(x-1);N<x;N++)_[N-1]=arguments[N];y[S].fn.apply(y[S].context,_)}}return!0},l.prototype.on=function(u,f,d){return a(this,u,f,d,!1)},l.prototype.once=function(u,f,d){return a(this,u,f,d,!0)},l.prototype.removeListener=function(u,f,d,p){var m=n?n+u:u;if(!this._events[m])return this;if(!f)return o(this,m),this;var b=this._events[m];if(b.fn)b.fn===f&&(!p||b.once)&&(!d||b.context===d)&&o(this,m);else{for(var v=0,y=[],x=b.length;v<x;v++)(b[v].fn!==f||p&&!b[v].once||d&&b[v].context!==d)&&y.push(b[v]);y.length?this._events[m]=y.length===1?y[0]:y:o(this,m)}return this},l.prototype.removeAllListeners=function(u){var f;return u?(f=n?n+u:u,this._events[f]&&o(this,f)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(mN)),mN.exports}var S4e=_4e();const j4e=Mt(S4e);var gN=new j4e,vN="recharts.syncMouseEvents";function Xh(e){"@babel/helpers - typeof";return Xh=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},Xh(e)}function N4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E4e(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,lK(r.key),r)}}function k4e(e,t,n){return t&&E4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yN(e,t,n){return t=lK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lK(e){var t=O4e(e,"string");return Xh(t)=="symbol"?t:t+""}function O4e(e,t){if(Xh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var C4e=(function(){function e(){N4e(this,e),yN(this,"activeIndex",0),yN(this,"coordinateList",[]),yN(this,"layout","horizontal")}return k4e(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,l=o===void 0?null:o,c=n.layout,u=c===void 0?null:c,f=n.offset,d=f===void 0?null:f,p=n.mouseHandlerCallback,m=p===void 0?null:p;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=d??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(),a=i.x,o=i.y,l=i.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,f=((r=window)===null||r===void 0?void 0:r.scrollY)||0,d=a+c+u,p=o+this.offset.top+l/2+f;this.mouseHandlerCallback({pageX:d,pageY:p})}}}])})();function A4e(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&&qe(r)&&qe(i))return!0}return!1}function P4e(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 cK(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=an(t,n,r,i),l=an(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function T4e(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,f=t.outerRadius,d=t.angle,p=an(l,c,u,d),m=an(l,c,f,d);r=p.x,i=p.y,a=m.x,o=m.y}else return cK(t);return[{x:r,y:i},{x:a,y:o}]}function Zh(e){"@babel/helpers - typeof";return Zh=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},Zh(e)}function IF(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 Og(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IF(Object(n),!0).forEach(function(r){R4e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function R4e(e,t,n){return t=I4e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function I4e(e){var t=M4e(e,"string");return Zh(t)=="symbol"?t:t+""}function M4e(e,t){if(Zh(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zh(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function D4e(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,f=e.tooltipAxisBandSize,d=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||!a||!o||p!=="ScatterChart"&&i!=="axis")return null;var b,v=Nk;if(p==="ScatterChart")b=o,v=vRe;else if(p==="BarChart")b=P4e(d,o,c,f),v=nP;else if(d==="radial"){var y=cK(o),x=y.cx,_=y.cy,S=y.radius,w=y.startAngle,N=y.endAngle;b={cx:x,cy:_,startAngle:w,endAngle:N,innerRadius:S,outerRadius:S},v=fG}else b={points:T4e(d,o,c)},v=Nk;var k=Og(Og(Og(Og({stroke:"#ccc",pointerEvents:"none"},c),b),dt(m,!1)),{},{payload:l,payloadIndex:u,className:gt("recharts-tooltip-cursor",m.className)});return E.isValidElement(m)?E.cloneElement(m,k):E.createElement(v,k)}var L4e=["item"],$4e=["children","className","width","height","style","compact","title","desc"];function Lu(e){"@babel/helpers - typeof";return Lu=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},Lu(e)}function Lc(){return Lc=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},Lc.apply(this,arguments)}function MF(e,t){return q4e(e)||B4e(e,t)||dK(e,t)||F4e()}function F4e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 845In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B4e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(f){u=!0,i=f}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return l}}function q4e(e){if(Array.isArray(e))return e}function DF(e,t){if(e==null)return{};var n=U4e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function U4e(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 z4e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function H4e(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,fK(r.key),r)}}function W4e(e,t,n){return t&&H4e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function V4e(e,t,n){return t=Oy(t),G4e(e,uK()?Reflect.construct(t,n||[],Oy(e).constructor):t.apply(e,n))}function G4e(e,t){if(t&&(Lu(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K4e(e)}function K4e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uK=function(){return!!e})()}function Oy(e){return Oy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Oy(e)}function Y4e(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&&rO(e,t)}function rO(e,t){return rO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rO(e,t)}function $u(e){return Z4e(e)||X4e(e)||dK(e)||Q4e()}function Q4e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 846In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dK(e,t){if(e){if(typeof e=="string")return iO(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 iO(e,t)}}function X4e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Z4e(e){if(Array.isArray(e))return iO(e)}function iO(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 LF(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 Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LF(Object(n),!0).forEach(function(r){ct(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ct(e,t,n){return t=fK(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fK(e){var t=J4e(e,"string");return Lu(t)=="symbol"?t:t+""}function J4e(e,t){if(Lu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var eLe={xAxis:["bottom","top"],yAxis:["left","right"]},tLe={width:"100%",height:"100%"},hK={x:0,y:0};function Cg(e){return e}var nLe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},rLe=function(t,n,r,i){var a=n.find(function(f){return f&&f.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return Oe(Oe(Oe({},i),an(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var c=a.coordinate,u=i.angle;return Oe(Oe(Oe({},i),an(i.cx,i.cy,c,u)),{},{angle:u,radius:c})}return hK},c0=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat($u(l),$u(u)):l},[]);return o.length>0?o:t&&t.length&&qe(i)&&qe(a)?t.slice(i,a+1):[]};function pK(e){return e==="number"?[0,"auto"]:void 0}var aO=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,l=c0(n,t);return r<0||!a||!a.length||r>=l.length?null:a.reduce(function(c,u){var f,d=(f=u.props.data)!==null&&f!==void 0?f:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var m=d===void 0?l:d;p=BE(m,o.dataKey,i)}else p=d&&d[r]||l[r];return p?[].concat($u(c),[oG(u,p)]):c},[])},$F=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=nLe(a,r),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,f=UAe(o,l,u,c);if(f>=0&&u){var d=u[f]&&u[f].value,p=aO(t,n,f,d),m=rLe(r,l,f,a);return{activeTooltipIndex:f,activeLabel:d,activePayload:p,activeCoordinate:m}}return null},iLe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=t.stackOffset,m=eG(f,a);return r.reduce(function(b,v){var y,x=v.type.defaultProps!==void 0?Oe(Oe({},v.type.defaultProps),v.props):v.props,_=x.type,S=x.dataKey,w=x.allowDataOverflow,N=x.allowDuplicatedCategory,k=x.scale,C=x.ticks,P=x.includeHidden,L=x[o];if(b[L])return b;var T=c0(t.data,{graphicalItems:i.filter(function(z){var U,ee=o in z.props?z.props[o]:(U=z.type.defaultProps)===null||U===void 0?void 0:U[o];return ee===L}),dataStartIndex:c,dataEndIndex:u}),A=T.length,R,I,M;A4e(x.domain,w,_)&&(R=bk(x.domain,null,w),m&&(_==="number"||k!=="auto")&&(M=Wf(T,S,"category")));var B=pK(_);if(!R||R.length===0){var W,G=(W=x.domain)!==null&&W!==void 0?W:B;if(S){if(R=Wf(T,S,_),_==="category"&&m){var H=pSe(R);N&&H?(I=R,R=gy(0,A)):N||(R=B$(G,R,v).reduce(function(z,U){return z.indexOf(U)>=0?z:[].concat($u(z),[U])},[]))}else if(_==="category")N?R=R.filter(function(z){return z!==""&&!wt(z)}):R=B$(G,R,v).reduce(function(z,U){return z.indexOf(U)>=0||U===""||wt(U)?z:[].concat($u(z),[U])},[]);else if(_==="number"){var K=GAe(T,i.filter(function(z){var U,ee,re=o in z.props?z.props[o]:(U=z.type.defaultProps)===null||U===void 0?void 0:U[o],X="hide"in z.props?z.props.hide:(ee=z.type.defaultProps)===null||ee===void 0?void 0:ee.hide;return re===L&&(P||!X)}),S,a,f);K&&(R=K)}m&&(_==="number"||k!=="auto")&&(M=Wf(T,S,"category"))}else m?R=gy(0,A):l&&l[L]&&l[L].hasStack&&_==="number"?R=p==="expand"?[0,1]:aG(l[L].stackGroups,c,u):R=JV(T,i.filter(function(z){var U=o in z.props?z.props[o]:z.type.defaultProps[o],ee="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return U===L&&(P||!ee)}),_,f,!0);if(_==="number")R=nO(d,R,L,a,C),G&&(R=bk(G,R,w));else if(_==="category"&&G){var $=G,F=R.every(function(z){return $.indexOf(z)>=0});F&&(R=$)}}return Oe(Oe({},b),{},ct({},L,Oe(Oe({},x),{},{axisType:a,domain:R,categoricalDomain:M,duplicateDomain:I,originalDomain:(y=x.domain)!==null&&y!==void 0?y:B,isCategorical:m,layout:f})))},{})},aLe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.layout,d=t.children,p=c0(t.data,{graphicalItems:r,dataStartIndex:c,dataEndIndex:u}),m=p.length,b=eG(f,a),v=-1;return r.reduce(function(y,x){var _=x.type.defaultProps!==void 0?Oe(Oe({},x.type.defaultProps),x.props):x.props,S=_[o],w=pK("number");if(!y[S]){v++;var N;return b?N=gy(0,m):l&&l[S]&&l[S].hasStack?(N=aG(l[S].stackGroups,c,u),N=nO(d,N,S,a)):(N=bk(w,JV(p,r.filter(function(k){var C,P,L=o in k.props?k.props[o]:(C=k.type.defaultProps)===null||C===void 0?void 0:C[o],T="hide"in k.props?k.props.hide:(P=k.type.defaultProps)===null||P===void 0?void 0:P.hide;return L===S&&!T}),"number",f),i.defaultProps.allowDataOverflow),N=nO(d,N,S,a)),Oe(Oe({},y),{},ct({},S,Oe(Oe({axisType:a},i.defaultProps),{},{hide:!0,orientation:ci(eLe,"".concat(a,".").concat(v%2),null),domain:N,originalDomain:w,isCategorical:b,layout:f})))}return y},{})},oLe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,f=t.children,d="".concat(i,"Id"),p=Di(f,a),m={};return p&&p.length?m=iLe(t,{axes:p,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(m=aLe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:d,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),m},sLe=function(t){var n=Ko(t),r=so(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:CA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:iy(n,r)}},FF=function(t){var n=t.children,r=t.defaultShowTooltip,i=ti(n,Cu),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},lLe=function(t){return!t||!t.length?!1:t.some(function(n){var r=co(n&&n.type);return r&&r.indexOf("Bar")>=0})},BF=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"}},cLe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,c=l===void 0?{}:l,u=r.width,f=r.height,d=r.children,p=r.margin||{},m=ti(d,Cu),b=ti(d,uo),v=Object.keys(c).reduce(function(N,k){var C=c[k],P=C.orientation;return!C.mirror&&!C.hide?Oe(Oe({},N),{},ct({},P,N[P]+C.width)):N},{left:p.left||0,right:p.right||0}),y=Object.keys(o).reduce(function(N,k){var C=o[k],P=C.orientation;return!C.mirror&&!C.hide?Oe(Oe({},N),{},ct({},P,ci(N,"".concat(P))+C.height)):N},{top:p.top||0,bottom:p.bottom||0}),x=Oe(Oe({},y),v),_=x.bottom;m&&(x.bottom+=m.props.height||Cu.defaultProps.height),b&&n&&(x=WAe(x,i,r,n));var S=u-x.left-x.right,w=f-x.top-x.bottom;return Oe(Oe({brushBottom:_},x),{},{width:Math.max(S,0),height:Math.max(w,0)})},uLe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},mK=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,f=t.formatAxisMap,d=t.defaultProps,p=function(x,_){var S=_.graphicalItems,w=_.stackGroups,N=_.offset,k=_.updateId,C=_.dataStartIndex,P=_.dataEndIndex,L=x.barSize,T=x.layout,A=x.barGap,R=x.barCategoryGap,I=x.maxBarSize,M=BF(T),B=M.numericAxisName,W=M.cateAxisName,G=lLe(S),H=[];return S.forEach(function(K,$){var F=c0(x.data,{graphicalItems:[K],dataStartIndex:C,dataEndIndex:P}),z=K.type.defaultProps!==void 0?Oe(Oe({},K.type.defaultProps),K.props):K.props,U=z.dataKey,ee=z.maxBarSize,re=z["".concat(B,"Id")],X=z["".concat(W,"Id")],Z={},ie=c.reduce(function(ye,xe){var Ce=_["".concat(xe.axisType,"Map")],Be=z["".concat(xe.axisType,"Id")];Ce&&Ce[Be]||xe.axisType==="zAxis"||vs();var Re=Ce[Be];return Oe(Oe({},ye),{},ct(ct({},xe.axisType,Re),"".concat(xe.axisType,"Ticks"),so(Re)))},Z),Y=ie[W],J=ie["".concat(W,"Ticks")],se=w&&w[re]&&w[re].hasStack&&nPe(K,w[re].stackGroups),V=co(K.type).indexOf("Bar")>=0,fe=iy(Y,J),ce=[],Ne=G&&zAe({barSize:L,stackGroups:w,totalSize:uLe(ie,W)});if(V){var me,je,te=wt(ee)?I:ee,oe=(me=(je=iy(Y,J,!0))!==null&&je!==void 0?je:te)!==null&&me!==void 0?me:0;ce=HAe({barGap:A,barCategoryGap:R,bandSize:oe!==fe?oe:fe,sizeList:Ne[X],maxBarSize:te}),oe!==fe&&(ce=ce.map(function(ye){return Oe(Oe({},ye),{},{position:Oe(Oe({},ye.position),{},{offset:ye.position.offset-oe/2})})}))}var le=K&&K.type&&K.type.getComposedData;le&&H.push({props:Oe(Oe({},le(Oe(Oe({},ie),{},{displayedData:F,props:x,dataKey:U,item:K,bandSize:fe,barPosition:ce,offset:N,stackedData:se,layout:T,dataStartIndex:C,dataEndIndex:P}))),{},ct(ct(ct({key:K.key||"item-".concat($)},B,ie[B]),W,ie[W]),"animationId",k)),childIndex:ESe(K,x.children),item:K})}),H},m=function(x,_){var S=x.props,w=x.dataStartIndex,N=x.dataEndIndex,k=x.updateId;if(!QL({props:S}))return null;var C=S.children,P=S.layout,L=S.stackOffset,T=S.data,A=S.reverseStackOrder,R=BF(P),I=R.numericAxisName,M=R.cateAxisName,B=Di(C,r),W=ePe(T,B,"".concat(I,"Id"),"".concat(M,"Id"),L,A),G=c.reduce(function(z,U){var ee="".concat(U.axisType,"Map");return Oe(Oe({},z),{},ct({},ee,oLe(S,Oe(Oe({},U),{},{graphicalItems:B,stackGroups:U.axisType===I&&W,dataStartIndex:w,dataEndIndex:N}))))},{}),H=cLe(Oe(Oe({},G),{},{props:S,graphicalItems:B}),_==null?void 0:_.legendBBox);Object.keys(G).forEach(function(z){G[z]=f(S,G[z],H,z.replace("Map",""),n)});var K=G["".concat(M,"Map")],$=sLe(K),F=p(S,Oe(Oe({},G),{},{dataStartIndex:w,dataEndIndex:N,updateId:k,graphicalItems:B,stackGroups:W,offset:H}));return Oe(Oe({formattedGraphicalItems:F,graphicalItems:B,offset:H,stackGroups:W},$),G)},b=(function(y){function x(_){var S,w,N;return z4e(this,x),N=V4e(this,x,[_]),ct(N,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ct(N,"accessibilityManager",new C4e),ct(N,"handleLegendBBoxUpdate",function(k){if(k){var C=N.state,P=C.dataStartIndex,L=C.dataEndIndex,T=C.updateId;N.setState(Oe({legendBBox:k},m({props:N.props,dataStartIndex:P,dataEndIndex:L,updateId:T},Oe(Oe({},N.state),{},{legendBBox:k}))))}}),ct(N,"handleReceiveSyncEvent",function(k,C,P){if(N.props.syncId===k){if(P===N.eventEmitterSymbol&&typeof N.props.syncMethod!="function")return;N.applySyncEvent(C)}}),ct(N,"handleBrushChange",function(k){var C=k.startIndex,P=k.endIndex;if(C!==N.state.dataStartIndex||P!==N.state.dataEndIndex){var L=N.state.updateId;N.setState(function(){return Oe({dataStartIndex:C,dataEndIndex:P},m({props:N.props,dataStartIndex:C,dataEndIndex:P,updateId:L},N.state))}),N.triggerSyncEvent({dataStartIndex:C,dataEndIndex:P})}}),ct(N,"handleMouseEnter",function(k){var C=N.getMouseInfo(k);if(C){var P=Oe(Oe({},C),{},{isTooltipActive:!0});N.setState(P),N.triggerSyncEvent(P);var L=N.props.onMouseEnter;pt(L)&&L(P,k)}}),ct(N,"triggeredAfterMouseMove",function(k){var C=N.getMouseInfo(k),P=C?Oe(Oe({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};N.setState(P),N.triggerSyncEvent(P);var L=N.props.onMouseMove;pt(L)&&L(P,k)}),ct(N,"handleItemMouseEnter",function(k){N.setState(function(){return{isTooltipActive:!0,activeItem:k,activePayload:k.tooltipPayload,activeCoordinate:k.tooltipPosition||{x:k.cx,y:k.cy}}})}),ct(N,"handleItemMouseLeave",function(){N.setState(function(){return{isTooltipActive:!1}})}),ct(N,"handleMouseMove",function(k){k.persist(),N.throttleTriggeredAfterMouseMove(k)}),ct(N,"handleMouseLeave",function(k){N.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};N.setState(C),N.triggerSyncEvent(C);var P=N.props.onMouseLeave;pt(P)&&P(C,k)}),ct(N,"handleOuterEvent",function(k){var C=NSe(k),P=ci(N.props,"".concat(C));if(C&&pt(P)){var L,T;/.*touch.*/i.test(C)?T=N.getMouseInfo(k.changedTouches[0]):T=N.getMouseInfo(k),P((L=T)!==null&&L!==void 0?L:{},k)}}),ct(N,"handleClick",function(k){var C=N.getMouseInfo(k);if(C){var P=Oe(Oe({},C),{},{isTooltipActive:!0});N.setState(P),N.triggerSyncEvent(P);var L=N.props.onClick;pt(L)&&L(P,k)}}),ct(N,"handleMouseDown",function(k){var C=N.props.onMouseDown;if(pt(C)){var P=N.getMouseInfo(k);C(P,k)}}),ct(N,"handleMouseUp",function(k){var C=N.props.onMouseUp;if(pt(C)){var P=N.getMouseInfo(k);C(P,k)}}),ct(N,"handleTouchMove",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&N.throttleTriggeredAfterMouseMove(k.changedTouches[0])}),ct(N,"handleTouchStart",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&N.handleMouseDown(k.changedTouches[0])}),ct(N,"handleTouchEnd",function(k){k.changedTouches!=null&&k.changedTouches.length>0&&N.handleMouseUp(k.changedTouches[0])}),ct(N,"handleDoubleClick",function(k){var C=N.props.onDoubleClick;if(pt(C)){var P=N.getMouseInfo(k);C(P,k)}}),ct(N,"handleContextMenu",function(k){var C=N.props.onContextMenu;if(pt(C)){var P=N.getMouseInfo(k);C(P,k)}}),ct(N,"triggerSyncEvent",function(k){N.props.syncId!==void 0&&gN.emit(vN,N.props.syncId,k,N.eventEmitterSymbol)}),ct(N,"applySyncEvent",function(k){var C=N.props,P=C.layout,L=C.syncMethod,T=N.state.updateId,A=k.dataStartIndex,R=k.dataEndIndex;if(k.dataStartIndex!==void 0||k.dataEndIndex!==void 0)N.setState(Oe({dataStartIndex:A,dataEndIndex:R},m({props:N.props,dataStartIndex:A,dataEndIndex:R,updateId:T},N.state)));else if(k.activeTooltipIndex!==void 0){var I=k.chartX,M=k.chartY,B=k.activeTooltipIndex,W=N.state,G=W.offset,H=W.tooltipTicks;if(!G)return;if(typeof L=="function")B=L(H,k);else if(L==="value"){B=-1;for(var K=0;K<H.length;K++)if(H[K].value===k.activeLabel){B=K;break}}var $=Oe(Oe({},G),{},{x:G.left,y:G.top}),F=Math.min(I,$.x+$.width),z=Math.min(M,$.y+$.height),U=H[B]&&H[B].value,ee=aO(N.state,N.props.data,B),re=H[B]?{x:P==="horizontal"?H[B].coordinate:F,y:P==="horizontal"?z:H[B].coordinate}:hK;N.setState(Oe(Oe({},k),{},{activeLabel:U,activeCoordinate:re,activePayload:ee,activeTooltipIndex:B}))}else N.setState(k)}),ct(N,"renderCursor",function(k){var C,P=N.state,L=P.isTooltipActive,T=P.activeCoordinate,A=P.activePayload,R=P.offset,I=P.activeTooltipIndex,M=P.tooltipAxisBandSize,B=N.getTooltipEventType(),W=(C=k.props.active)!==null&&C!==void 0?C:L,G=N.props.layout,H=k.key||"_recharts-cursor";return ne.createElement(D4e,{key:H,activeCoordinate:T,activePayload:A,activeTooltipIndex:I,chartName:n,element:k,isActive:W,layout:G,offset:R,tooltipAxisBandSize:M,tooltipEventType:B})}),ct(N,"renderPolarAxis",function(k,C,P){var L=ci(k,"type.axisType"),T=ci(N.state,"".concat(L,"Map")),A=k.type.defaultProps,R=A!==void 0?Oe(Oe({},A),k.props):k.props,I=T&&T[R["".concat(L,"Id")]];return E.cloneElement(k,Oe(Oe({},I),{},{className:gt(L,I.className),key:k.key||"".concat(C,"-").concat(P),ticks:so(I,!0)}))}),ct(N,"renderPolarGrid",function(k){var C=k.props,P=C.radialLines,L=C.polarAngles,T=C.polarRadius,A=N.state,R=A.radiusAxisMap,I=A.angleAxisMap,M=Ko(R),B=Ko(I),W=B.cx,G=B.cy,H=B.innerRadius,K=B.outerRadius;return E.cloneElement(k,{polarAngles:Array.isArray(L)?L:so(B,!0).map(function($){return $.coordinate}),polarRadius:Array.isArray(T)?T:so(M,!0).map(function($){return $.coordinate}),cx:W,cy:G,innerRadius:H,outerRadius:K,key:k.key||"polar-grid",radialLines:P})}),ct(N,"renderLegend",function(){var k=N.state.formattedGraphicalItems,C=N.props,P=C.children,L=C.width,T=C.height,A=N.props.margin||{},R=L-(A.left||0)-(A.right||0),I=XV({children:P,formattedGraphicalItems:k,legendWidth:R,legendContent:u});if(!I)return null;var M=I.item,B=DF(I,L4e);return E.cloneElement(M,Oe(Oe({},B),{},{chartWidth:L,chartHeight:T,margin:A,onBBoxUpdate:N.handleLegendBBoxUpdate}))}),ct(N,"renderTooltip",function(){var k,C=N.props,P=C.children,L=C.accessibilityLayer,T=ti(P,Ei);if(!T)return null;var A=N.state,R=A.isTooltipActive,I=A.activeCoordinate,M=A.activePayload,B=A.activeLabel,W=A.offset,G=(k=T.props.active)!==null&&k!==void 0?k:R;return E.cloneElement(T,{viewBox:Oe(Oe({},W),{},{x:W.left,y:W.top}),active:G,label:B,payload:G?M:[],coordinate:I,accessibilityLayer:L})}),ct(N,"renderBrush",function(k){var C=N.props,P=C.margin,L=C.data,T=N.state,A=T.offset,R=T.dataStartIndex,I=T.dataEndIndex,M=T.updateId;return E.cloneElement(k,{key:k.key||"_recharts-brush",onChange:jg(N.handleBrushChange,k.props.onChange),data:L,x:qe(k.props.x)?k.props.x:A.left,y:qe(k.props.y)?k.props.y:A.top+A.height+A.brushBottom-(P.bottom||0),width:qe(k.props.width)?k.props.width:A.width,startIndex:R,endIndex:I,updateId:"brush-".concat(M)})}),ct(N,"renderReferenceElement",function(k,C,P){if(!k)return null;var L=N,T=L.clipPathId,A=N.state,R=A.xAxisMap,I=A.yAxisMap,M=A.offset,B=k.type.defaultProps||{},W=k.props,G=W.xAxisId,H=G===void 0?B.xAxisId:G,K=W.yAxisId,$=K===void 0?B.yAxisId:K;return E.cloneElement(k,{key:k.key||"".concat(C,"-").concat(P),xAxis:R[H],yAxis:I[$],viewBox:{x:M.left,y:M.top,width:M.width,height:M.height},clipPathId:T})}),ct(N,"renderActivePoints",function(k){var C=k.item,P=k.activePoint,L=k.basePoint,T=k.childIndex,A=k.isRange,R=[],I=C.props.key,M=C.item.type.defaultProps!==void 0?Oe(Oe({},C.item.type.defaultProps),C.item.props):C.item.props,B=M.activeDot,W=M.dataKey,G=Oe(Oe({index:T,dataKey:W,cx:P.x,cy:P.y,r:4,fill:tP(C.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},dt(B,!1)),Iv(B));return R.push(x.renderActiveDot(B,G,"".concat(I,"-activePoint-").concat(T))),L?R.push(x.renderActiveDot(B,Oe(Oe({},G),{},{cx:L.x,cy:L.y}),"".concat(I,"-basePoint-").concat(T))):A&&R.push(null),R}),ct(N,"renderGraphicChild",function(k,C,P){var L=N.filterFormatItem(k,C,P);if(!L)return null;var T=N.getTooltipEventType(),A=N.state,R=A.isTooltipActive,I=A.tooltipAxis,M=A.activeTooltipIndex,B=A.activeLabel,W=N.props.children,G=ti(W,Ei),H=L.props,K=H.points,$=H.isRange,F=H.baseLine,z=L.item.type.defaultProps!==void 0?Oe(Oe({},L.item.type.defaultProps),L.item.props):L.item.props,U=z.activeDot,ee=z.hide,re=z.activeBar,X=z.activeShape,Z=!!(!ee&&R&&G&&(U||re||X)),ie={};T!=="axis"&&G&&G.props.trigger==="click"?ie={onClick:jg(N.handleItemMouseEnter,k.props.onClick)}:T!=="axis"&&(ie={onMouseLeave:jg(N.handleItemMouseLeave,k.props.onMouseLeave),onMouseEnter:jg(N.handleItemMouseEnter,k.props.onMouseEnter)});var Y=E.cloneElement(k,Oe(Oe({},L.props),ie));function J(xe){return typeof I.dataKey=="function"?I.dataKey(xe.payload):null}if(Z)if(M>=0){var se,V;if(I.dataKey&&!I.allowDuplicatedCategory){var fe=typeof I.dataKey=="function"?J:"payload.".concat(I.dataKey.toString());se=BE(K,fe,B),V=$&&F&&BE(F,fe,B)}else se=K==null?void 0:K[M],V=$&&F&&F[M];if(X||re){var ce=k.props.activeIndex!==void 0?k.props.activeIndex:M;return[E.cloneElement(k,Oe(Oe(Oe({},L.props),ie),{},{activeIndex:ce})),null,null]}if(!wt(se))return[Y].concat($u(N.renderActivePoints({item:L,activePoint:se,basePoint:V,childIndex:M,isRange:$})))}else{var Ne,me=(Ne=N.getItemByXY(N.state.activeCoordinate))!==null&&Ne!==void 0?Ne:{graphicalItem:Y},je=me.graphicalItem,te=je.item,oe=te===void 0?k:te,le=je.childIndex,ye=Oe(Oe(Oe({},L.props),ie),{},{activeIndex:le});return[E.cloneElement(oe,ye),null,null]}return $?[Y,null,null]:[Y,null]}),ct(N,"renderCustomized",function(k,C,P){return E.cloneElement(k,Oe(Oe({key:"recharts-customized-".concat(P)},N.props),N.state))}),ct(N,"renderMap",{CartesianGrid:{handler:Cg,once:!0},ReferenceArea:{handler:N.renderReferenceElement},ReferenceLine:{handler:Cg},ReferenceDot:{handler:N.renderReferenceElement},XAxis:{handler:Cg},YAxis:{handler:Cg},Brush:{handler:N.renderBrush,once:!0},Bar:{handler:N.renderGraphicChild},Line:{handler:N.renderGraphicChild},Area:{handler:N.renderGraphicChild},Radar:{handler:N.renderGraphicChild},RadialBar:{handler:N.renderGraphicChild},Scatter:{handler:N.renderGraphicChild},Pie:{handler:N.renderGraphicChild},Funnel:{handler:N.renderGraphicChild},Tooltip:{handler:N.renderCursor,once:!0},PolarGrid:{handler:N.renderPolarGrid,once:!0},PolarAngleAxis:{handler:N.renderPolarAxis},PolarRadiusAxis:{handler:N.renderPolarAxis},Customized:{handler:N.renderCustomized}}),N.clipPathId="".concat((S=_.id)!==null&&S!==void 0?S:Rp("recharts"),"-clip"),N.throttleTriggeredAfterMouseMove=QW(N.triggeredAfterMouseMove,(w=_.throttleDelay)!==null&&w!==void 0?w:1e3/60),N.state={},N}return Y4e(x,y),W4e(x,[{key:"componentDidMount",value:function(){var S,w;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(w=this.props.margin.top)!==null&&w!==void 0?w:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,w=S.children,N=S.data,k=S.height,C=S.layout,P=ti(w,Ei);if(P){var L=P.props.defaultIndex;if(!(typeof L!="number"||L<0||L>this.state.tooltipTicks.length-1)){var T=this.state.tooltipTicks[L]&&this.state.tooltipTicks[L].value,A=aO(this.state,N,L,T),R=this.state.tooltipTicks[L].coordinate,I=(this.state.offset.top+k)/2,M=C==="horizontal",B=M?{x:R,y:I}:{y:R,x:I},W=this.state.formattedGraphicalItems.find(function(H){var K=H.item;return K.type.name==="Scatter"});W&&(B=Oe(Oe({},B),W.props.points[L].tooltipPosition),A=W.props.points[L].tooltipPayload);var G={activeTooltipIndex:L,isTooltipActive:!0,activeLabel:T,activePayload:A,activeCoordinate:B};this.setState(G),this.renderCursor(P),this.accessibilityManager.setIndex(L)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,w){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==w.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var N,k;this.accessibilityManager.setDetails({offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(k=this.props.margin.top)!==null&&k!==void 0?k:0}})}return null}},{key:"componentDidUpdate",value:function(S){UE([ti(S.children,Ei)],[ti(this.props.children,Ei)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=ti(this.props.children,Ei);if(S&&typeof S.props.shared=="boolean"){var w=S.props.shared?"axis":"item";return l.indexOf(w)>=0?w:a}return a}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var w=this.container,N=w.getBoundingClientRect(),k=DEe(N),C={chartX:Math.round(S.pageX-k.left),chartY:Math.round(S.pageY-k.top)},P=N.width/w.offsetWidth||1,L=this.inRange(C.chartX,C.chartY,P);if(!L)return null;var T=this.state,A=T.xAxisMap,R=T.yAxisMap,I=this.getTooltipEventType(),M=$F(this.state,this.props.data,this.props.layout,L);if(I!=="axis"&&A&&R){var B=Ko(A).scale,W=Ko(R).scale,G=B&&B.invert?B.invert(C.chartX):null,H=W&&W.invert?W.invert(C.chartY):null;return Oe(Oe({},C),{},{xValue:G,yValue:H},M)}return M?Oe(Oe({},C),M):null}},{key:"inRange",value:function(S,w){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,k=this.props.layout,C=S/N,P=w/N;if(k==="horizontal"||k==="vertical"){var L=this.state.offset,T=C>=L.left&&C<=L.left+L.width&&P>=L.top&&P<=L.top+L.height;return T?{x:C,y:P}:null}var A=this.state,R=A.angleAxisMap,I=A.radiusAxisMap;if(R&&I){var M=Ko(R);return z$({x:C,y:P},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,w=this.getTooltipEventType(),N=ti(S,Ei),k={};N&&w==="axis"&&(N.props.trigger==="click"?k={onClick:this.handleClick}:k={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 C=Iv(this.props,this.handleOuterEvent);return Oe(Oe({},C),k)}},{key:"addListener",value:function(){gN.on(vN,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){gN.removeListener(vN,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,w,N){for(var k=this.state.formattedGraphicalItems,C=0,P=k.length;C<P;C++){var L=k[C];if(L.item===S||L.props.key===S.key||w===co(L.item.type)&&N===L.childIndex)return L}return null}},{key:"renderClipPath",value:function(){var S=this.clipPathId,w=this.state.offset,N=w.left,k=w.top,C=w.height,P=w.width;return ne.createElement("defs",null,ne.createElement("clipPath",{id:S},ne.createElement("rect",{x:N,y:k,height:C,width:P})))}},{key:"getXScales",value:function(){var S=this.state.xAxisMap;return S?Object.entries(S).reduce(function(w,N){var k=MF(N,2),C=k[0],P=k[1];return Oe(Oe({},w),{},ct({},C,P.scale))},{}):null}},{key:"getYScales",value:function(){var S=this.state.yAxisMap;return S?Object.entries(S).reduce(function(w,N){var k=MF(N,2),C=k[0],P=k[1];return Oe(Oe({},w),{},ct({},C,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(S){var w;return(w=this.state.xAxisMap)===null||w===void 0||(w=w[S])===null||w===void 0?void 0:w.scale}},{key:"getYScaleByAxisId",value:function(S){var w;return(w=this.state.yAxisMap)===null||w===void 0||(w=w[S])===null||w===void 0?void 0:w.scale}},{key:"getItemByXY",value:function(S){var w=this.state,N=w.formattedGraphicalItems,k=w.activeItem;if(N&&N.length)for(var C=0,P=N.length;C<P;C++){var L=N[C],T=L.props,A=L.item,R=A.type.defaultProps!==void 0?Oe(Oe({},A.type.defaultProps),A.props):A.props,I=co(A.type);if(I==="Bar"){var M=(T.data||[]).find(function(H){return XTe(S,H)});if(M)return{graphicalItem:L,payload:M}}else if(I==="RadialBar"){var B=(T.data||[]).find(function(H){return z$(S,H)});if(B)return{graphicalItem:L,payload:B}}else if(e0(L,k)||t0(L,k)||Vh(L,k)){var W=bIe({graphicalItem:L,activeTooltipItem:k,itemData:R.data}),G=R.activeIndex===void 0?W:R.activeIndex;return{graphicalItem:Oe(Oe({},L),{},{childIndex:G}),payload:Vh(L,k)?R.data[W]:L.props.data[W]}}}return null}},{key:"render",value:function(){var S=this;if(!QL(this))return null;
846var w=this.props,N=w.children,k=w.className,C=w.width,P=w.height,L=w.style,T=w.compact,A=w.title,R=w.desc,I=DF(w,$4e),M=dt(I,!1);if(T)return ne.createElement(xF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ne.createElement(HE,Lc({},M,{width:C,height:P,title:A,desc:R}),this.renderClipPath(),ZL(N,this.renderMap)));if(this.props.accessibilityLayer){var B,W;M.tabIndex=(B=this.props.tabIndex)!==null&&B!==void 0?B:0,M.role=(W=this.props.role)!==null&&W!==void 0?W:"application",M.onKeyDown=function(H){S.accessibilityManager.keyboardEvent(H)},M.onFocus=function(){S.accessibilityManager.focus()}}var G=this.parseEventsOfWrapper();return ne.createElement(xF,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ne.createElement("div",Lc({className:gt("recharts-wrapper",k),style:Oe({position:"relative",cursor:"default",width:C,height:P},L)},G,{ref:function(K){S.container=K}}),ne.createElement(HE,Lc({},M,{width:C,height:P,title:A,desc:R,style:tLe}),this.renderClipPath(),ZL(N,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(E.Component);ct(b,"displayName",n),ct(b,"defaultProps",Oe({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},d)),ct(b,"getDerivedStateFromProps",function(y,x){var _=y.dataKey,S=y.data,w=y.children,N=y.width,k=y.height,C=y.layout,P=y.stackOffset,L=y.margin,T=x.dataStartIndex,A=x.dataEndIndex;if(x.updateId===void 0){var R=FF(y);return Oe(Oe(Oe({},R),{},{updateId:0},m(Oe(Oe({props:y},R),{},{updateId:0}),x)),{},{prevDataKey:_,prevData:S,prevWidth:N,prevHeight:k,prevLayout:C,prevStackOffset:P,prevMargin:L,prevChildren:w})}if(_!==x.prevDataKey||S!==x.prevData||N!==x.prevWidth||k!==x.prevHeight||C!==x.prevLayout||P!==x.prevStackOffset||!Hc(L,x.prevMargin)){var I=FF(y),M={chartX:x.chartX,chartY:x.chartY,isTooltipActive:x.isTooltipActive},B=Oe(Oe({},$F(x,S,C)),{},{updateId:x.updateId+1}),W=Oe(Oe(Oe({},I),M),B);return Oe(Oe(Oe({},W),m(Oe({props:y},W),x)),{},{prevDataKey:_,prevData:S,prevWidth:N,prevHeight:k,prevLayout:C,prevStackOffset:P,prevMargin:L,prevChildren:w})}if(!UE(w,x.prevChildren)){var G,H,K,$,F=ti(w,Cu),z=F&&(G=(H=F.props)===null||H===void 0?void 0:H.startIndex)!==null&&G!==void 0?G:T,U=F&&(K=($=F.props)===null||$===void 0?void 0:$.endIndex)!==null&&K!==void 0?K:A,ee=z!==T||U!==A,re=!wt(S),X=re&&!ee?x.updateId:x.updateId+1;return Oe(Oe({updateId:X},m(Oe(Oe({props:y},x),{},{updateId:X,dataStartIndex:z,dataEndIndex:U}),x)),{},{prevChildren:w,dataStartIndex:z,dataEndIndex:U})}return null}),ct(b,"renderActiveDot",function(y,x,_){var S;return E.isValidElement(y)?S=E.cloneElement(y,x):pt(y)?S=y(x):S=ne.createElement(rP,x),ne.createElement(Kt,{className:"recharts-active-dot",key:_},S)});var v=E.forwardRef(function(x,_){return ne.createElement(b,Lc({},x,{ref:_}))});return v.displayName=b.displayName,v},dLe=mK({chartName:"BarChart",GraphicalChild:Vl,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:s0},{axisType:"yAxis",AxisComp:l0}],formatAxisMap:SMe}),qF=mK({chartName:"PieChart",GraphicalChild:Fa,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:Jx},{axisType:"radiusAxis",AxisComp:Xx}],formatAxisMap:fPe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const Ag=e=>{const t=(e||"").toLowerCase();return t.includes("symptom")?"AI Symptoms Checker":t.includes("contact")?"Contact Us Form":t.includes("email")?"Email":t.includes("phone")||t.includes("call")||t.includes("reception")?"Phone":t.includes("manual")?"Manual Entry":e||"Unknown"},UF={"AI Symptoms Checker":"#8b5cf6","Contact Us Form":"#0ea5e9",Email:"#f59e0b",Phone:"#10b981","Manual Entry":"#64748b",Unknown:"#cbd5e1"},fLe={new:"#3b82f6",contact_made:"#f59e0b",won:"#10b981",lost:"#ef4444"};function hLe(){const[e]=Dy(),[t,n]=E.useState(null),[r,i]=E.useState([]),[a,o]=E.useState([]),[l,c]=E.useState(!0),[u,f]=E.useState("12"),[d,p]=E.useState("all"),m=E.useCallback(async()=>{c(!0);try{const M=await ve.auth.me();let B=e.get("id")||(M==null?void 0:M.clinic_id);if(B||(B=(await Ap(M)).clinicId),!B){c(!1);return}const[W,G,H]=await Promise.all([ve.entities.Clinic.filter({id:B}).then(K=>K[0]||null),ve.entities.Lead.filter({clinic_id:B,is_archived:{$ne:!0}},"-created_date",1e3),ve.entities.PatientFormResponse.filter({clinic_id:B},"-created_date",1e3)]);n(W),i(G||[]),o(H||[])}finally{c(!1)}},[e]);E.useEffect(()=>{m()},[m]);const b=E.useMemo(()=>{const M=new Set(r.map(B=>
846Ag(B.source)));return Array.from(M)},[r]),v=E.useMemo(()=>{const M=Pw(new Date,Number(u));return r.filter(B=>!(!B.created_date||!rE(Kg(B.created_date),M)||d!=="all"&&Ag(B.source)!==d))},[r,u,d]),y=E.useMemo(()=>{const M={},B=Number(u);for(let W=B-1;W>=0;W--){const G=gs(Pw(new Date,W),{weekStartsOn:1}),H=Vr(G,"d MMM");M[H]={week:H,total:0},b.forEach(K=>{M[H][K]=0})}return v.forEach(W=>{const G=gs(Kg(W.created_date),{weekStartsOn:1}),H=Vr(G,"d MMM");if(M[H]){const K=Ag(W.source);M[H][K]=(M[H][K]||0)+1,M[H].total+=1}}),Object.values(M)},[v,u,b]),x=E.useMemo(()=>{const M={new:0,contact_made:0,won:0,lost:0};return v.forEach(B=>{M[B.status]=(M[B.status]||0)+1}),Object.entries(M).filter(([,B])=>B>0).map(([B,W])=>({name:B.replace("_"," "),value:W,key:B}))},[v]),_=E.useMemo(()=>{const M={};return v.forEach(B=>{const W=Ag(B.source);M[W]||(M[W]={name:W,value:0}),B.status==="won"&&(M[W].value+=1)}),Object.values(M).filter(B=>B.value>0)},[v]),S=v.length,w=v.filter(M=>M.status==="won").length,N=S>0?Math.round(w/S*100):0,k=y.length>0?(S/y.length).toFixed(1):"0",C=Pw(new Date,Number(u)),P=a.filter(M=>M.created_date&&rE(Kg(M.created_date),C)),L=P.length,T=P.filter(M=>M.status==="completed").length,A=P.filter(M=>M.responses&&Object.keys(M.responses).length>0).length,R=P.filter(M=>{var B;return(B=M.ai_analysis_results)==null?void 0:B.preliminary_assessment}).length,I=L>0?Math.round(T/L*100):0;return l?s.jsx("div",{className:"min-h-screen flex items-center justify-center text-slate-500",children:"Loadingâ¦"}):s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[s.jsx(ws,{clinic:t}),s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"max-w-7xl mx-auto p-6 space-y-6",children:[s.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-4",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Analytics"}),s.jsxs("p",{className:"text-slate-500 text-sm",children:[t==null?void 0:t.name," · Lead performance & funnel"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(Et,{value:u,onValueChange:f,children:[s.jsx(St,{className:"w-[140px] h-9",children:s.jsx(kt,{})}),s.jsxs(jt,{children:[s.jsx(He,{value:"4",children:"Last 4 weeks"}),s.jsx(He,{value:"8",children:"Last 8 weeks"}),s.jsx(He,{value:"12",children:"Last 12 weeks"}),s.jsx(He,{value:"26",children:"Last 26 weeks"})]})]}),s.jsxs(Et,{value:d,onValueChange:p,children:[s.jsx(St,{className:"w-[200px] h-9",children:s.jsx(kt,{placeholder:"All sources"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All sources"}),b.map(M=>s.jsx(He,{value:M,children:M},M))]})]})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[s.jsx(Pg,{label:"Total Leads",value:S,sub:`in last ${u} weeks`}),s.jsx(Pg,{label:"Won",value:w,sub:`${N}% win rate`}),s.jsx(Pg,{label:"Avg / week",value:k}),s.jsx(Pg,{label:"Active Sources",value:b.length})]}),s.jsxs(yt,{children:[s.jsx(wn,{className:"pb-3",children:s.jsx(_n,{className:"text-sm font-semibold text-slate-700",children:"AI Symptom Checker Funnel"})}),s.jsxs(It,{children:[s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-center",children:[s.jsx(Tg,{label:"Form Started",value:L,color:"bg-blue-500"}),s.jsx(Tg,{label:"Step 1 Done",value:A,color:"bg-teal-500",sub:L>0?`${Math.round(A/L*100)}%`:"â"}),s.jsx(Tg,{label:"AI Analysis",value:R,color:"bg-indigo-500",sub:A>0?`${Math.round(R/A*100)}%`:"â"}),s.jsx(Tg,{label:"Submitted",value:T,color:"bg-green-500",sub:R>0?`${Math.round(T/R*100)}%`:"â"})]}),s.jsxs("div",{className:"mt-4 text-sm text-slate-600 border-t pt-4",children:["Overall conversion: ",s.jsxs("span",{className:"font-semibold text-green-600",children:[I,"%"]}),s.jsx("span",{className:"mx-2 text-slate-300",children:"·"}),L," starts in the last ",u," weeks"]})]})]}),s.jsxs(yt,{children:[s.jsx(wn,{className:"pb-3",children:s.jsx(_n,{className:"text-sm font-semibold text-slate-700",children:"Leads per week by source"})}),s.jsx(It,{children:s.jsx("div",{style:{width:"100%",height:320},children:s.jsx(jj,{children:s.jsxs(dLe,{data:y,children:[s.jsx(tK,{strokeDasharray:"3 3",vertical:!1,stroke:"#e2e8f0"}
846),s.jsx(s0,{dataKey:"week",tick:{fontSize:12}}),s.jsx(l0,{allowDecimals:!1,tick:{fontSize:12}}),s.jsx(Ei,{}),s.jsx(uo,{wrapperStyle:{fontSize:12}}),b.map(M=>s.jsx(Vl,{dataKey:M,stackId:"a",fill:UF[M]||"#94a3b8"},M))]})})})})]}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs(yt,{children:[s.jsx(wn,{className:"pb-3",children:s.jsx(_n,{className:"text-sm font-semibold text-slate-700",children:"Lead status breakdown"})}),s.jsx(It,{children:x.length===0?s.jsx("p",{className:"text-sm text-slate-400 text-center py-10",children:"No leads in this range."}):s.jsx("div",{style:{width:"100%",height:280},children:s.jsx(jj,{children:s.jsxs(qF,{children:[s.jsx(Fa,{data:x,dataKey:"value",nameKey:"name",outerRadius:100,label:!0,children:x.map((M,B)=>s.jsx(_h,{fill:fLe[M.key]||"#94a3b8"},B))}),s.jsx(Ei,{}),s.jsx(uo,{wrapperStyle:{fontSize:12}})]})})})})]}),s.jsxs(yt,{children:[s.jsx(wn,{className:"pb-3",children:s.jsx(_n,{className:"text-sm font-semibold text-slate-700",children:"Wins by source"})}),s.jsx(It,{children:_.length===0?s.jsx("p",{className:"text-sm text-slate-400 text-center py-10",children:"No wins in this range."}):s.jsx("div",{style:{width:"100%",height:280},children:s.jsx(jj,{children:s.jsxs(qF,{children:[s.jsx(Fa,{data:_,dataKey:"value",nameKey:"name",outerRadius:100,label:!0,children:_.map((M,B)=>s.jsx(_h,{fill:UF[M.name]||"#94a3b8"},B))}),s.jsx(Ei,{}),s.jsx(uo,{wrapperStyle:{fontSize:12}})]})})})})]})]})]})})]})}function Pg({label:e,value:t,sub:n}){return s.jsx(yt,{children:s.jsxs(It,{className:"pt-4 pb-4",children:[s.jsx("div",{className:"text-xs text-slate-500 mb-1",children:e}),s.jsx("div",{className:"text-2xl font-bold text-slate-900",children:t}),n&&s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:n})]})})}function Tg({label:e,value:t,color:n,sub:r}){return s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:`w-14 h-14 rounded-full ${n} flex items-center justify-center text-white font-bold text-lg mx-auto mb-2`,children:t}),s.jsx("div",{className:"text-xs text-slate-600 font-medium",children:e}),r&&s.jsxs("div",{className:"text-xs text-slate-400",children:[r," from prev"]})]})}function pLe(){const{toast:e}=ui(),[t,n]=E.useState(null),[r,i]=E.useState(null),[a,o]=E.useState(null),[l,c]=E.useState([]),[u,f]=E.useState([]),[d,p]=E.useState(!0),[m,b]=E.useState(!1),[v,y]=E.useState(null),[x,_]=E.useState(null),S=async(C,P)=>{if(C.stopPropagation(),!!r){_(P.id);try{await ve.functions.invoke("sendClinicInviteEmail",{email:P.email,clinicId:r.id,clinicName:r.name,teamMemberId:P.id,appRole:P.role||"team_member"}),e({title:"Invite resent",description:`Invitation sent to ${P.email}`}),w()}catch(L){e({title:"Failed to resend invite",description:L.message,variant:"destructive"})}finally{_(null)}}},w=E.useCallback(async()=>{p(!0);try{const C=await ve.auth.me();n(C);let P=C==null?void 0:C.clinic_id;if(P||(P=(await Ap(C)).clinicId),!P){p(!1);return}const[L,T,A]=await Promise.all([ve.entities.Clinic.filter({id:P}).then(I=>I[0]||null),ve.entities.TeamMember.filter({clinic_id:P}),ve.entities.Clinic.list()]);i(L),c(T||[]),f(A||[]);const R=(T||[]).find(I=>I.email===(C==null?void 0:C.email));o(R||null)}finally{p(!1)}},[]);E.useEffect(()=>{w()},[w]);const N=(a==null?void 0:a.role)==="admin",k={admin:"bg-purple-100 text-purple-700",practitioner:"bg-blue-100 text-blue-700",team_member:"bg-slate-100 text-slate-700"};return d?s.jsx("div",{className:"min-h-screen flex items-center justify-center text-slate-500",children:"Loading..."}):s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[s.jsx(ws,{clinic:r}),s.jsxs("div",{className:"max-w-5xl mx-auto w-full p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Team Members"}),s.jsxs("p",{className:"text-slate-500 text-sm",children:[l.length," member",l.length!==1?"s":""]})]}),N&&s.jsxs(be,{onClick:()=>{y(null),b(!0)},className:"bg-[#006e74] hover:bg-[#005a60]",children:[s.jsx(ir,{className:"w-4 h-4 mr-1"})," Add Team Member"]})]}),s.jsxs("div",{className:"space-y-3",children:[l.map(C=>{var T,A;
846const P=[C.clinic_id,...C.additional_clinic_ids||[]].filter(Boolean),L=u.filter(R=>P.includes(R.id));return s.jsx(yt,{className:`w-full hover:shadow-md transition-shadow ${N?"cursor-pointer":""}`,onClick:()=>{N&&(y(C),b(!0))},children:s.jsx(It,{className:"p-5",children:s.jsxs("div",{className:"flex items-start gap-5",children:[C.profile_image_url?s.jsx("img",{src:C.profile_image_url,alt:"",className:"w-24 h-24 rounded-full object-cover shrink-0 border-2 border-white shadow"}):s.jsxs("div",{className:"w-24 h-24 rounded-full bg-slate-200 flex items-center justify-center text-2xl font-semibold text-slate-600 shrink-0 border-2 border-white shadow",children:[(T=C.first_name)==null?void 0:T[0],(A=C.last_name)==null?void 0:A[0]]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-lg font-semibold text-slate-900",children:[C.first_name," ",C.last_name]}),C.job_title&&s.jsx("div",{className:"text-sm text-slate-600",children:C.job_title}),s.jsx("div",{className:"text-sm text-slate-500 mt-0.5 truncate",children:C.email}),C.phone&&s.jsx("div",{className:"text-xs text-slate-500 mt-0.5",children:C.phone})]}),N&&!C.linked_user_id&&s.jsxs(be,{size:"sm",variant:"outline",onClick:R=>S(R,C),disabled:x===C.id,className:"gap-1",children:[s.jsx(Qf,{className:"w-3.5 h-3.5"}),x===C.id?"Sending...":C.invite_sent_date?"Resend":"Send Invite"]})]}),s.jsxs("div",{className:"flex items-center gap-2 mt-3 flex-wrap",children:[s.jsx(Rt,{className:`text-xs ${k[C.role]||k.team_member}`,children:C.role}),C.linked_user_id?s.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600",children:[s.jsx(Iy,{className:"w-3 h-3"})," Linked"]}):s.jsxs("span",{className:"flex items-center gap-1 text-xs text-amber-500",children:[s.jsx(Ty,{className:"w-3 h-3"})," Invite pending"]})]}),L.length>0&&s.jsxs("div",{className:"mt-3 pt-3 border-t border-slate-100",children:[s.jsx("div",{className:"text-[11px] uppercase tracking-wide text-slate-400 font-medium mb-1.5",children:"Clinics"}),s.jsx("div",{className:"flex flex-wrap gap-1.5",children:L.map(R=>s.jsxs(Rt,{variant:"outline",className:"gap-1 text-xs font-normal bg-[#006e74]/5 border-[#006e74]/20 text-[#006e74]",children:[s.jsx(hs,{className:"w-3 h-3"})," ",R.name]},R.id))})]})]})]})})},C.id)}),l.length===0&&s.jsx("div",{className:"text-center py-12 text-slate-400",children:"No team members yet."})]})]}),m&&s.jsx(Av,{open:m,onOpenChange:b,member:v,clinicId:r==null?void 0:r.id,allClinics:u,onSaved:()=>{b(!1),w()}})]})}const Si=e=>Vr(e,"yyyy-MM-dd");function mLe(e){const t=new Date;switch(e){case"today":return{from:Si(t),to:Si(t)};case"yesterday":{const n=Cw(t,1);return{from:Si(n),to:Si(n)}}case"7d":return{from:Si(Cw(t,6)),to:Si(t)};case"30d":return{from:Si(Cw(t,29)),to:Si(t)};case"week":return{from:Si(gs(t,{weekStartsOn:1})),to:Si(Vse(t,{weekStartsOn:1}))};case"month":return{from:Si(eU(t)),to:Si(Z8(t))};default:return{from:"",to:""}}}function gLe({from:e,to:t,onChange:n}){const[r,i]=E.useState(!1),a=!!(e||t),o=a?`${e?Vr(new Date(e),"d MMM"):"â¦"} â ${t?Vr(new Date(t),"d MMM"):"â¦"}`:"Dates",l=c=>{n(c)};return s.jsxs(pA,{open:r,onOpenChange:i,children:[s.jsx(mA,{asChild:!0,children:s.jsxs(be,{variant:"outline",size:"sm",className:"h-9 gap-1.5 font-normal",children:[s.jsx(dX,{className:"w-4 h-4 text-slate-500"}),s.jsx("span",{className:a?"text-slate-900":"text-slate-500",children:o}),a&&s.jsx("span",{role:"button",tabIndex:0,onClick:c=>{c.stopPropagation(),l({from:"",to:""})},className:"ml-1 p-0.5 rounded hover:bg-slate-200 cursor-pointer",children:s.jsx(Cr,{className:"w-3 h-3 text-slate-400"})})]})}),s.jsxs(Cx,{align:"start",className:"w-[300px] p-3",children:[s.jsx("div",{className:"grid grid-cols-2 gap-1.5 mb-3",children:[["today","Today"],["yesterday","Yesterday"],["7d","Last 7 days"],["30d","Last 30 days"],["week","This week"],["month","This month"]].map(([c,u])=>s.jsx(be,{variant:"outline",size:"sm",className:"h-8 text-xs justify-start font-normal",onClick:()=>{l(mLe(c)),i(!1)},children:u},c))}),s.jsxs("div",{className:"border-t pt-3 space-y-2",children:[s.jsx("div",{className:"text-xs text-slate-500",children:"Custom range"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Te,{type:"date",value:e,onCh
846ange:c=>l({from:c.target.value,to:t}),className:"h-8 text-xs"}),s.jsx("span",{className:"text-slate-400 text-xs",children:"to"}),s.jsx(Te,{type:"date",value:t,onChange:c=>l({from:e,to:c.target.value}),className:"h-8 text-xs"})]}),a&&s.jsx(be,{variant:"ghost",size:"sm",className:"h-7 text-xs w-full text-slate-500",onClick:()=>{l({from:"",to:""}),i(!1)},children:"Clear dates"})]})]})]})}const vLe=["AI Symptoms Checker","Contact Form","Email Lead","Manual Entry"];function yLe(){const e=mr(),[t,n]=E.useState(null),[r,i]=E.useState([]),[a,o]=E.useState([]),[l,c]=E.useState({}),[u,f]=E.useState([]),[d,p]=E.useState(""),[m,b]=E.useState(!0),[v,y]=E.useState(""),[x,_]=E.useState("all"),[S,w]=E.useState("all"),[N,k]=E.useState("all"),[C,P]=E.useState("all"),[L,T]=E.useState({from:"",to:""}),[A,R]=E.useState(!1),I=E.useCallback(async()=>{var H;b(!0);try{const K=await ve.auth.me();let $=K==null?void 0:K.clinic_id;if($||($=(await Ap(K)).clinicId),!$){b(!1);return}const[F,z,U,ee,re]=await Promise.all([ve.entities.Clinic.filter({id:$}).then(Z=>Z[0]||null),ve.entities.Lead.filter({clinic_id:$,is_archived:{$ne:!0}},"-created_date",500),ve.entities.TeamMember.filter({clinic_id:$,is_active:!0}),ve.entities.IntakeFormQuestion.list(),ve.functions.invoke("getAppBaseUrl",{}).catch(()=>null)]);if(n(F),i(z||[]),o(U||[]),f(ee||[]),(H=re==null?void 0:re.data)!=null&&H.base_url&&p(re.data.base_url),(z||[]).map(Z=>Z.symptoms_analysis_response_id).filter(Boolean).length>0){const Z=await ve.entities.PatientFormResponse.filter({clinic_id:$},"-created_date",500),ie={};(Z||[]).forEach(J=>{ie[J.id]=J});const Y={};(z||[]).forEach(J=>{J.symptoms_analysis_response_id&&ie[J.symptoms_analysis_response_id]&&(Y[J.id]=ie[J.symptoms_analysis_response_id])}),c(Y)}else c({})}finally{b(!1)}},[]);E.useEffect(()=>{I()},[I]);const M=async(H,K)=>{const $=K?{assigned_team_member_id:K.id,assigned_to_email:K.email||null}:{assigned_team_member_id:null,assigned_to_email:null};i(F=>F.map(z=>z.id===H.id?{...z,...$}:z));try{await ve.entities.Lead.update(H.id,$)}catch(F){throw i(z=>z.map(U=>U.id===H.id?H:U)),F}},B=E.useMemo(()=>{const H=v.toLowerCase(),K=L.from?new Date(L.from+"T00:00:00").getTime():null,$=L.to?new Date(L.to+"T23:59:59").getTime():null;return r.filter(F=>{if(H&&!`${F.first_name} ${F.last_name} ${F.email} ${F.phone||""}`.toLowerCase().includes(H)||x!=="all"&&F.status!==x||S!=="all"&&(F.source||"")!==S)return!1;if(N!=="all"){if(N==="__unassigned__"){if(F.assigned_team_member_id)return!1}else if(F.assigned_team_member_id!==N)return!1}if(C!=="all"){if(C==="tbc"){if(F.status==="won"||F.status==="lost")return!1}else if(F.status!==C)return!1}if(K||$){const z=F.created_date?new Date(F.created_date).getTime():null;if(!z||K&&z<K||$&&z>$)return!1}return!0})},[r,v,x,S,N,C,L]),W=()=>{y(""),_("all"),w("all"),k("all"),P("all"),T({from:"",to:""})},G=v||x!=="all"||S!=="all"||N!=="all"||C!=="all"||L.from||L.to;return m?s.jsx("div",{className:"min-h-screen flex items-center justify-center text-slate-500",children:"Loading..."}):s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[s.jsx(ws,{clinic:t}),s.jsxs("div",{className:"max-w-7xl mx-auto w-full p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"All Leads"}),s.jsxs("p",{className:"text-slate-500 text-sm",children:[B.length," of ",r.length," leads"]})]}),s.jsxs(be,{onClick:()=>R(!0),className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[s.jsx(ir,{className:"w-4 h-4"}),"Add Lead"]})]}),s.jsx("div",{className:"bg-white border rounded-lg p-3 mb-4",children:s.jsxs("div",{className:"flex flex-nowrap items-center gap-2 overflow-x-auto",children:[s.jsxs("div",{className:"relative flex-1 min-w-[220px] max-w-sm",children:[s.jsx(DZ,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-400"}),s.jsx(Te,{placeholder:"Search name, email, phone...",value:v,onChange:H=>y(H.target.value),className:"pl-9 h-9"})]}),s.jsxs(Et,{value:N,onValueChange:k,children:[s.jsx(St,{className:"w-40 h-9 flex-shrink-0",children:s.jsx(kt,{placeholder:"Team member"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All team members"}),s.jsx(He,{value:"__unassigned__",children:"Unassigned"}),a.map(H=>s.jsxs(He,{value:H.id,children:[H.first_name," ",H.last_name]}
846,H.id))]})]}),s.jsxs(Et,{value:S,onValueChange:w,children:[s.jsx(St,{className:"w-36 h-9 flex-shrink-0",children:s.jsx(kt,{placeholder:"Source"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All sources"}),vLe.map(H=>s.jsx(He,{value:H,children:H},H))]})]}),s.jsxs(Et,{value:x,onValueChange:_,children:[s.jsx(St,{className:"w-40 h-9 flex-shrink-0",children:s.jsx(kt,{placeholder:"Status"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All statuses"}),s.jsx(He,{value:"new",children:"New"}),s.jsx(He,{value:"response_received",children:"Response Received"}),s.jsx(He,{value:"contact_made",children:"Contact Made"}),s.jsx(He,{value:"won",children:"Won"}),s.jsx(He,{value:"lost",children:"Lost"})]})]}),s.jsxs(Et,{value:C,onValueChange:P,children:[s.jsx(St,{className:"w-32 h-9 flex-shrink-0",children:s.jsx(kt,{placeholder:"Outcome"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All outcomes"}),s.jsx(He,{value:"tbc",children:"TBC"}),s.jsx(He,{value:"won",children:"Won"}),s.jsx(He,{value:"lost",children:"Lost"})]})]}),s.jsx("div",{className:"flex-shrink-0",children:s.jsx(gLe,{from:L.from,to:L.to,onChange:T})}),G&&s.jsxs(be,{variant:"ghost",size:"sm",onClick:W,className:"gap-1 text-slate-500 flex-shrink-0",children:[s.jsx(Cr,{className:"w-3.5 h-3.5"})," Clear"]})]})}),s.jsx(QH,{leads:B,teamMembers:a,onOpenLead:H=>e(`/LeadDetails?id=${H.id}`,{state:{from:"leads"}}),onAssign:M,responsesById:l,questions:u,appBaseUrl:d,showOutcome:!0,onLeadChanged:I})]}),s.jsx(kv,{open:A,onOpenChange:R,clinicId:t==null?void 0:t.id,teamMembers:a,onCreated:()=>{R(!1),I()}})]})}function Cy({clinic:e}){const t=new Date().getFullYear(),n=(e==null?void 0:e.name)||"Apollo Clinics";return s.jsx("footer",{className:"mt-auto border-t border-slate-200 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 py-4 flex flex-col md:flex-row md:items-center md:justify-between gap-2 text-xs text-slate-500",children:[s.jsxs("div",{children:["© ",t," ",n," · Clinic Portal powered by Apollo Clinics"]}),s.jsxs("div",{className:"flex items-center gap-4",children:[(e==null?void 0:e.email)&&s.jsx("a",{href:`mailto:${e.email}`,className:"hover:text-slate-700",children:e.email}),(e==null?void 0:e.phone_number)&&s.jsx("a",{href:`tel:${e.phone_number.replace(/\s/g,"")}`,className:"hover:text-slate-700",children:e.phone_number}),(e==null?void 0:e.website_url)&&s.jsx("a",{href:e.website_url,target:"_blank",rel:"noopener noreferrer",className:"hover:text-slate-700",children:"Website"})]})]})})}function xLe({clinic:e,canEdit:t,onChanged:n}){const{toast:r}=ui(),[i,a]=E.useState(!1),[o,l]=E.useState(!1),[c,u]=E.useState(!1),[f,d]=E.useState(!1),p=!!(e!=null&&e.shared_gmail_email)&&!!(e!=null&&e.shared_gmail_refresh_token),m=e!=null&&e.shared_gmail_watch_expiration?new Date(e.shared_gmail_watch_expiration):null,b=!!m&&m.getTime()>Date.now();E.useEffect(()=>{const S=w=>{var N;((N=w==null?void 0:w.data)==null?void 0:N.type)==="gmail-oauth"&&(w.data.success?(r({title:"Shared Gmail connected"}),n==null||n()):r({title:"Connection failed",description:"Please try again.",variant:"destructive"}),a(!1))};return window.addEventListener("message",S),()=>window.removeEventListener("message",S)},[n,r]);const v=async()=>{var S,w;if(e!=null&&e.id){a(!0);try{const N=await ve.functions.invoke("gmailOAuthStart",{clinicId:e.id}),k=(S=N==null?void 0:N.data)==null?void 0:S.authUrl;if(!k)throw new Error(((w=N==null?void 0:N.data)==null?void 0:w.error)||"Could not start OAuth");const C=window.open(k,"_blank","width=520,height=640"),P=setInterval(()=>{(!C||C.closed)&&(clearInterval(P),setTimeout(()=>{a(!1),n==null||n()},500))},600)}catch(N){r({title:"Could not start Gmail connection",description:N==null?void 0:N.message,variant:"destructive"}),a(!1)}}},y=async()=>{var S;u(!0);try{const w=await ve.functions.invoke("syncGmailNewLeads",{}),N=((S=w==null?void 0:w.data)==null?void 0:S.imported)??0;r({title:N>0?`Imported ${N} new lead${N===1?"":"s"}`:"No new leads found",description:N>0?'Emails labelled "New Lead" have been imported.':'Label a Gmail thread "New Lead" to import it.'}),n==null||n()}catch(w){r({title:"Sync failed",description:w==null?void 0:w.message,variant:"destructive"})}finally{u(!1)}},x=async()=>{var S;if(e!=null&&e.id){d(!0);try{const w=await ve.functions.invoke("startGmailWatchForClinic",{clinicId:e.id});if((S=w==null?void 0:w.data)!=null&&S.error)throw new Error(w.data.error);r({title:"Real-time push enabled",description:"New emails will now arrive instantly."}),n==null||n()}catch(w){r({title:"Could not enable push",description:w==null?void 0:w.message,variant:"destructive"})}finally{d(!1)}}},_=async()=>
846{if(e!=null&&e.id){l(!0);try{await ve.functions.invoke("disconnectClinicSharedGmail",{clinicId:e.id}),r({title:"Shared Gmail disconnected"}),n==null||n()}catch(S){r({title:"Disconnect failed",description:S==null?void 0:S.message,variant:"destructive"})}finally{l(!1)}}};return s.jsxs(yt,{children:[s.jsx(wn,{children:s.jsxs(_n,{className:"text-base flex items-center gap-2",children:[s.jsx(hn,{className:"w-4 h-4 text-[#006e74]"}),"Clinic Shared Gmail Inbox"]})}),s.jsxs(It,{className:"space-y-4",children:[s.jsxs("p",{className:"text-sm text-slate-600",children:["Connect a single Gmail address for the whole clinic (e.g."," ",s.jsx("code",{className:"text-xs bg-slate-100 px-1 rounded",children:"[email protected]"}),"). Every team member will send lead emails from this shared address and see all replies â no per-user connection required."]}),p?s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-green-200 bg-green-50 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx(oa,{className:"w-5 h-5 text-green-600 flex-none"}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("div",{className:"text-sm font-medium text-slate-800 truncate",children:e.shared_gmail_email}),s.jsxs("div",{className:"text-xs text-slate-500",children:["Connected",e.shared_gmail_connected_at?` · ${new Date(e.shared_gmail_connected_at).toLocaleDateString("en-GB")}`:"",e.shared_gmail_connected_by?` · by ${e.shared_gmail_connected_by}`:""]}),s.jsx("div",{className:"mt-1 flex items-center gap-1.5 text-xs",children:b?s.jsxs(s.Fragment,{children:[s.jsx(nv,{className:"w-3 h-3 text-green-600"}),s.jsx("span",{className:"text-green-700 font-medium",children:"Real-time push active"}),s.jsxs("span",{className:"text-slate-400",children:["· renews ",m.toLocaleDateString("en-GB")]})]}):s.jsxs(s.Fragment,{children:[s.jsx(NB,{className:"w-3 h-3 text-slate-400"}),s.jsx("span",{className:"text-slate-500",children:"Push not enabled â polling every 10 min"})]})})]})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[t&&!b&&s.jsxs(be,{size:"sm",onClick:x,disabled:f,className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[f?s.jsx(Qt,{className:"w-3.5 h-3.5 animate-spin"}):s.jsx(nv,{className:"w-3.5 h-3.5"}),"Enable push"]}),s.jsxs(be,{variant:"outline",size:"sm",onClick:y,disabled:c,className:"gap-2",children:[c?s.jsx(Qt,{className:"w-3.5 h-3.5 animate-spin"}):s.jsx(CZ,{className:"w-3.5 h-3.5"}),"Sync now"]}),t&&s.jsxs(be,{variant:"outline",size:"sm",onClick:_,disabled:o,className:"gap-2",children:[o?s.jsx(Qt,{className:"w-3.5 h-3.5 animate-spin"}):s.jsx(SB,{className:"w-3.5 h-3.5"}),"Disconnect"]})]})]}):s.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-md border border-amber-200 bg-amber-50 p-3",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[s.jsx(sp,{className:"w-5 h-5 text-amber-600 flex-none"}),s.jsx("div",{className:"text-sm text-slate-700",children:"No shared Gmail connected. Team members won't be able to send emails from the clinic address."})]}),t&&s.jsxs(be,{onClick:v,disabled:i,className:"bg-[#006e74] hover:bg-[#005a60] gap-2",children:[i?s.jsx(Qt,{className:"w-4 h-4 animate-spin"}):s.jsx(hn,{className:"w-4 h-4"}),"Connect Gmail"]})]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-slate-50 border border-slate-200 p-3 text-xs text-slate-600",children:[s.jsx(bB,{className:"w-4 h-4 text-slate-400 flex-none mt-0.5"}),s.jsxs("div",{children:[s.jsx("div",{className:"font-medium text-slate-700 mb-1",children:"How lead syncing works"}),"In Gmail, add the label ",s.jsx("strong",{children:'"New Lead"'})," to any email you want imported as a lead. The app checks every 10 minutes and imports matching threads. Replies to leads you've emailed from the app are synced automatically."]})]})]})]})}function bLe({member:e,clinic:t,location:n,footer:r,footerImageUrl:i}){if(!e||!t)return"";const a=`${e.first_name||""} ${e.last_name||""}`.trim(),o=e.job_title||"",l=(n==null?void 0:n.phone)||t.phone_number||"",c=(n==null?void 0:n.email)||t.email||"",u=(n==null?void 0:n.address)||t.address||"",f=t.website_url||"",d=t.logo_url||"",p=t.primary_color||"#006e74",m='<span style="color:#d1d5db;margin:0 8px">|</span>',b=[];c&&b.push(`<strong style="color:${p}">E:</strong> <a href="mailto:${c}" style="color:#374151;text-decoration:none">${c}</a>
846`),l&&b.push(`<strong style="color:${p}">T:</strong> <a href="tel:${l.replace(/\s+/g,"")}" style="color:#374151;text-decoration:none">${l}</a>`),f&&b.push(`<strong style="color:${p}">W:</strong> <a href="${f}" style="color:#374151;text-decoration:none">${f}</a>`);const v=b.join(m),y=[t.name,u].filter(Boolean).join(", ");return` 847 <table cellpadding="0" cellspacing="0" border="0" style="font-family:Arial,Helvetica,sans-serif;border-collapse:collapse"> 848 <!-- Row 1: Logo (left) | Name + Job title (right, stacked) --> 849 <tr> 850 <td style="padding-bottom:10px"> 851 <table cellpadding="0" cellspacing="0" border="0" style="border-collapse:collapse"> 852 <tr> 853 ${d?`<td style="padding-right:14px;vertical-align:middle"><img src="${d}" alt="${t.name||""}" style="max-height:56px;max-width:140px;display:block" /></td>`:""} 854 <td style="vertical-align:middle"> 855 <div style="font-size:16px;font-weight:bold;color:${p};line-height:1.2">${a||""}</div> 856 ${o?`<div style="font-size:12px;color:#6b7280;line-height:1.3;margin-top:2px">${o}</div>`:""} 857 </td> 858 </tr> 859 </table> 860 </td> 861 </tr> 862 <!-- Row 2: Clinic name + address on a single line --> 863 ${y?`<tr><td style="padding-bottom:4px;font-size:13px;color:#111827">${y}</td></tr>`:""} 864 <!-- Row 3: Email ⢠Tel ⢠Website --> 865 ${v?`<tr><td style="padding-bottom:10px;font-size:13px;color:#374151">${v}</td></tr>`:""} 866 <!-- Row 4: Footer image --> 867 ${i?`<tr><td style="padding-top:6px"><img src="${i}" alt="" style="max-width:500px;display:block;border:0" /></td></tr>`:""} 868 <!-- Row 5: Footer text --> 869 ${r?`<tr><td style="padding-top:10px;border-top:1px solid #e5e7eb"><div style="font-size:11px;color:#6b7280;line-height:1.5;padding-top:6px">${r}</div></td></tr>`:""} 870 </table> 871 `}function wLe({clinic:e,footer:t,onFooterChange:n,footerImageUrl:r,onFooterImageChange:i,onSave:a,saving:o,canEdit:l}){const[c,u]=E.useState([]),[f,d]=E.useState(""),[p,m]=E.useState(!1);E.useEffect(()=>{e!=null&&e.id&&ve.entities.TeamMember.filter({clinic_id:e.id}).then(_=>{const S=(_||[]).filter(w=>w.is_active!==!1);u(S),!f&&S[0]&&d(S[0].id)}).catch(()=>u([]))},[e==null?void 0:e.id]);const b=E.useMemo(()=>c.find(_=>_.id===f)||null,[c,f]),v=E.useMemo(()=>{var S;if(!((S=e==null?void 0:e.locations)!=null&&S.length))return null;const _=b==null?void 0:b.primary_location_slug;return _&&e.locations.find(w=>w.slug===_)||e.locations[0]||null},[e,b]),y=E.useMemo(()=>bLe({member:b,clinic:e,location:v,footer:t,footerImageUrl:r}),[b,e,v,t,r]),x=async _=>{var w;const S=(w=_.target.files)==null?void 0:w[0];if(S){m(!0);try{const{file_url:N}=await ve.integrations.Core.UploadFile({file:S});i==null||i(N)}finally{m(!1)}}};return s.jsxs(yt,{children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"text-base flex items-center gap-2",children:[s.jsx(hn,{className:"w-4 h-4 text-[#006e74]"})," Email Signature Builder"]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Auto-generated from clinic logo, each team member's main location, and your shared footer."})]}),s.jsxs(It,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Preview Team Member"}),s.jsxs(Et,{value:f,onValueChange:d,children:[s.jsx(St,{className:"mt-1",children:s.jsx(kt,{placeholder:"Select a team member"})}),s.jsx(jt,{children:c.map(_=>s.jsxs(He,{value:_.id,children:[_.first_name," ",_.last_name," ",_.job_title?`â ${_.job_title}`:""]},_.id))})]})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block",children:"Signature Preview"}),s.jsx("div",{className:"border rounded-lg bg-white p-4 overflow-x-auto",children:b?s.jsx("div",{dangerouslySetInnerHTML:{__html:y}}):s.jsx("div",{className:"text-sm text-slate-400",children:"Add team members to preview the signature."})})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Footer Image (optional)"}),s.jsx("p",{className:"text-[11px] text-slate-500 mb-2",children:"E.g. reviews banner, awards, or seasonal promo. Appears below the contact line."}),r?s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("img",{src:r,alt:"Footer",className:"max-h-20 border rounded bg-slate-50 p-2"}),l&&s.jsxs(be,{type:"button",variant:"outline",size:"sm",onClick:()=>i==null?void 0:i(""),className:"gap-1",children:[s.jsx(Cr,{className:"w-3.5 h-3.5"})," Remove"]})]}):l?s.jsxs("label",{className:"flex items-center gap-2 cursor-pointer border border-dashed rounded-lg px-4 py-3 hover:bg-slate-50 transition-colors",children:[p?s.jsx(Qt,{className:"w-4 h-4 animate-spin text-slate-400"}):s.jsx(Bu,{className:"w-4 h-4 text-slate-400"}),s.jsx("span",{className:"text-sm text-slate-500",children:p?"Uploading...":"Upload footer image"}),s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:x,disabled:p})]}):s.jsx("p",{className:"text-sm text-slate-400",children:"No footer image set"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Footer Text"}),s.jsx("p",{className:"text-[11px] text-slate-500 mb-2",children:"Small print shown at the bottom of the signature (e.g. disclaimer, opening hours, awards)."}),s.jsx(dn,{value:t||"",onChange:_=>n==null?void 0:n(_.target.value),placeholder:"e.g. Registered in England & Wales. Company No. 12345678...",rows:4,disabled:!l,className:"bg-white"})]}),l&&s.jsx("div",{className:"pt-1 flex justify-end",children:s.jsx(be,{onClick:a,disabled:o,className:"bg-[#006e74] hover:bg-[#005a60]",children:o?"Saving...":"Save Signature Settings"})})]})]})}function _Le({slug:e,onSlugChange:t,canEdit:n}){const{toast:r}=ui(),[i,a]=E.useState(!1),o=typeof window<"u"?window.location.origin:"",l=(e||"").trim(),c=l?`${o}/${l}`:"",u=async()=>
871{if(c)try{await navigator.clipboard.writeText(c),a(!0),r({title:"Link copied",description:c}),setTimeout(()=>a(!1),1800)}catch{r({title:"Could not copy link",variant:"destructive"})}};return s.jsxs(yt,{children:[s.jsxs(wn,{children:[s.jsxs(_n,{className:"text-base flex items-center gap-2",children:[s.jsx(wB,{className:"w-4 h-4 text-[#006e74]"}),"TriageFlow Form Link"]}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Share this link on your website to let patients complete the AI symptoms checker for your clinic."})]}),s.jsxs(It,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"URL Slug"}),s.jsx(Te,{value:e||"",onChange:f=>t==null?void 0:t(f.target.value),className:"mt-1",disabled:!n,placeholder:"apollo-clinics"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Changing this will change your clinic's short URL."})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Your Form URL"}),s.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[s.jsx(Te,{value:c,readOnly:!0,className:"bg-slate-50 font-mono text-sm"}),s.jsxs(be,{type:"button",variant:"outline",onClick:u,disabled:!c,className:"gap-1.5 shrink-0",children:[i?s.jsx(Hr,{className:"w-4 h-4 text-green-600"}):s.jsx(lp,{className:"w-4 h-4"}),i?"Copied":"Copy"]}),c&&s.jsx(be,{type:"button",variant:"outline",onClick:()=>window.open(c,"_blank","noopener,noreferrer"),className:"gap-1.5 shrink-0",title:"Open form",children:s.jsx(yB,{className:"w-4 h-4"})})]})]})]})]})}function SLe({items:e=[]}){var i;const[t,n]=E.useState((i=e[0])==null?void 0:i.id);E.useEffect(()=>{const a=()=>{var l;let o=(l=e[0])==null?void 0:l.id;for(const c of e){const u=document.getElementById(c.id);if(!u)continue;u.getBoundingClientRect().top<=120&&(o=c.id)}n(o)};return window.addEventListener("scroll",a,{passive:!0}),a(),()=>window.removeEventListener("scroll",a)},[e]);const r=a=>{const o=document.getElementById(a);if(!o)return;const l=o.getBoundingClientRect().top+window.scrollY-80;window.scrollTo({top:l,behavior:"smooth"})};return s.jsxs("nav",{className:"hidden lg:block sticky top-6 self-start",children:[s.jsx("div",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wide px-3 mb-2",children:"On this page"}),s.jsx("ul",{className:"space-y-0.5",children:e.map(a=>{const o=a.icon,l=t===a.id;return s.jsx("li",{children:s.jsxs("button",{type:"button",onClick:()=>r(a.id),className:et("w-full flex items-center gap-2 text-left px-3 py-2 rounded-md text-sm transition-colors",l?"bg-[#006e74]/10 text-[#006e74] font-medium":"text-slate-600 hover:bg-slate-100"),children:[o&&s.jsx(o,{className:"w-4 h-4"}),s.jsx("span",{children:a.label})]})},a.id)})})]})}const jLe=[{id:"section-triageflow",label:"TriageFlow Form Link",icon:wB},{id:"section-info",label:"Clinic Information",icon:hs},{id:"section-locations",label:"Clinic Locations",icon:Li},{id:"section-signature",label:"Email Signature",icon:hn},{id:"section-gmail",label:"Shared Gmail Inbox",icon:fO}];function NLe(){const{toast:e}=ui(),[t,n]=E.useState(null),[r,i]=E.useState(null),[a,o]=E.useState(null),[l,c]=E.useState(!0),[u,f]=E.useState(!1),[d,p]=E.useState(!1),[m,b]=E.useState({name:"",slug:"",website_url:"",logo_url:"",primary_color:"#006e74",is_active:!0,booking_url:"",internal_booking_url:"",about:"",locations:[],email_signature_footer:"",email_signature_footer_image_url:""}),v=E.useCallback(async()=>{c(!0);try{const S=await ve.auth.me();n(S);let w=S==null?void 0:S.clinic_id;if(w||(w=(await Ap(S)).clinicId),!w){c(!1);return}const[N,k]=await Promise.all([ve.entities.Clinic.filter({id:w}).then(P=>P[0]||null),ve.entities.TeamMember.filter({clinic_id:w})]);if(i(N),N){let P=Array.isArray(N.locations)?N.locations:[];P.length===0&&(N.phone_number||N.email||N.address)&&(P=[{name:N.name||"Main",slug:N.slug||"main",address:N.address||"",phone:N.phone_number||"",email:N.email||""}]),b({name:N.name||"",slug:N.slug||"",website_url:N.website_url||"",logo_url:N.logo_url||"",primary_color:N.primary_color||"#006e74",is_active:N.is_active!==!1,booking_url:N.booking_url||"",internal_booking_url:N.internal_booking_url||"",about:N.about||"",locations:P,email_signature_footer:N.email_signature_footer||"",email_signature_footer_image_url:N.email_signature_footer_image_url||""})}const C=(k||[]).find(P=>P.email===(S==null?void 0:S.email));o(C||null)}finally{c(!1)}},[]);E.useEffect(()=>
871{v()},[v]);const y=(a==null?void 0:a.role)==="admin",x=async S=>{var N;const w=(N=S.target.files)==null?void 0:N[0];if(w){p(!0);try{const{file_url:k}=await ve.integrations.Core.UploadFile({file:w});b(C=>({...C,logo_url:k}))}finally{p(!1)}}},_=async()=>{if(y){f(!0);try{const S=m.locations&&m.locations[0]||{};await ve.entities.Clinic.update(r.id,{...m,phone_number:S.phone||"",email:S.email||"",address:S.address||""}),e({title:"Clinic details saved"}),v()}finally{f(!1)}}};return l?s.jsx("div",{className:"min-h-screen flex items-center justify-center text-slate-500",children:"Loading..."}):s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[s.jsx(ws,{clinic:r}),s.jsxs("div",{className:"max-w-6xl mx-auto w-full p-6 flex-1",children:[s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Clinic Details"}),!y&&s.jsx(Rt,{variant:"outline",className:"text-slate-500",children:"Read Only"})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[220px,1fr] gap-6",children:[s.jsx(SLe,{items:jLe}),s.jsxs("div",{className:"space-y-6 min-w-0",children:[s.jsxs("section",{id:"section-triageflow",className:"scroll-mt-24",children:[s.jsx(_Le,{slug:m.slug,onSlugChange:S=>b(w=>({...w,slug:S})),canEdit:y}),y&&s.jsx("div",{className:"flex justify-end mt-2",children:s.jsx(be,{onClick:_,disabled:u,size:"sm",variant:"outline",children:u?"Saving...":"Save slug"})})]}),s.jsx("section",{id:"section-info",className:"scroll-mt-24",children:s.jsxs(yt,{children:[s.jsx(wn,{children:s.jsx(_n,{className:"text-base",children:"Clinic Information"})}),s.jsxs(It,{className:"space-y-4",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Clinic Name"}),s.jsx(Te,{value:m.name,onChange:S=>b(w=>({...w,name:S.target.value})),className:"mt-1",disabled:!y})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Website URL"}),s.jsx(Te,{type:"url",value:m.website_url,onChange:S=>b(w=>({...w,website_url:S.target.value})),className:"mt-1",disabled:!y,placeholder:"https://..."})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Public Booking URL"}),s.jsx(Te,{type:"url",value:m.booking_url,onChange:S=>b(w=>({...w,booking_url:S.target.value})),className:"mt-1",disabled:!y,placeholder:"https://example.com/book"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Shown to patients in the symptoms checker results."})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Internal Booking URL"}),s.jsx(Te,{type:"url",value:m.internal_booking_url,onChange:S=>b(w=>({...w,internal_booking_url:S.target.value})),className:"mt-1",disabled:!y,placeholder:"https://staff.example.com/book"}),s.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Used by clinic staff from the lead details page."})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Clinic Logo"}),m.logo_url&&s.jsx("div",{className:"mt-2 mb-2",children:s.jsx("img",{src:m.logo_url,alt:"Logo",className:"h-16 object-contain border rounded-lg p-2 bg-slate-50"})}),y&&s.jsxs("label",{className:"mt-2 flex items-center gap-2 cursor-pointer border border-dashed rounded-lg px-4 py-3 hover:bg-slate-50 transition-colors",children:[d?s.jsx(Qt,{className:"w-4 h-4 animate-spin text-slate-400"}):s.jsx(Bu,{className:"w-4 h-4 text-slate-400"}),s.jsx("span",{className:"text-sm text-slate-500",children:d?"Uploading...":"Upload logo image"}),s.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:x,disabled:d})]}),!y&&!m.logo_url&&s.jsx("p",{className:"text-sm text-slate-400 mt-1",children:"No logo uploaded"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Primary Brand Color"}),s.jsxs("div",{className:"flex gap-2 mt-1",children:[s.jsx(Te,{type:"color",value:m.primary_color,onChange:S=>b(w=>({...w,primary_color:S.target.value})),className:"w-14 h-9 p-1",disabled:!y}),s.jsx(Te,{value:m.primary_color,onChange:S=>b(w=>({...w,primary_color:S.target.value})),className:"flex-1",disabled:!y})]})]}),s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Ee,{children:"Active Status"}),s.jsx(kC,{checked:m.is_active,onCheckedChange:S=>b(w=>({...w,is_active:S})),disabled:!y})]})]})]})}),s.jsx("section",{id:"section-locations",className:"scroll-mt-24",children:s.jsxs(yt,{children:[s.jsx(wn,{children:s.jsxs(_n,{className:"text-base flex items-center gap-2",children:[s.jsx(Li,{className:"w-4 h-4 text-[#006e74]"}),"Clinic Locations"]})}),s.jsxs(It,{className:"space-y-3",children:[s.jsxs("p",{className:"text-xs text-slate-500",children:["Add one row per physical location. Each location has its own contact details and a slug that can be used in ",s.jsx("code",{children:"?location=<slug>"})," on the symptoms form to pre-select it."]}),s.jsx(Ez,{locations:m.locations,onChange:S=>b(w=>({...w,locations:S})),disabled:!y}),y&&s.jsx("div",{className:"pt-2",children:s.jsx(be,{onClick:_,disabled:u,className:"bg-[#006e74] hover:bg-[#005a60] w-full",children:u?"Saving...":"Save Changes"})})]})]})}),s.jsx("section",{id:"section-signature",className:"scroll-mt-24",children:s.jsx(wLe,{clinic:{...r,...m},footer:m.email_signature_footer,onFooterChange:S=>b(w=>({...w,email_signature_footer:S}
871)),footerImageUrl:m.email_signature_footer_image_url,onFooterImageChange:S=>b(w=>({...w,email_signature_footer_image_url:S})),onSave:_,saving:u,canEdit:y})}),s.jsx("section",{id:"section-gmail",className:"scroll-mt-24",children:s.jsx(xLe,{clinic:r,canEdit:y,onChanged:v})})]})]})]}),s.jsx(Cy,{clinic:r})]})}function ELe(){const e=mr(),[t]=Dy(),n=t.get("id"),[r,i]=E.useState(null),[a,o]=E.useState([]),[l,c]=E.useState([]),[u,f]=E.useState(!0),[d,p]=E.useState(!1),[m,b]=E.useState(null),v=E.useCallback(async()=>{if(n){f(!0);try{const[x,_,S]=await Promise.all([ve.entities.Clinic.filter({id:n}).then(w=>w[0]||null),ve.entities.TeamMember.filter({clinic_id:n}),ve.entities.Clinic.list()]);i(x),o(_||[]),c(S||[])}finally{f(!1)}}},[n]);E.useEffect(()=>{v()},[v]);const y={admin:"bg-purple-100 text-purple-700",practitioner:"bg-blue-100 text-blue-700",team_member:"bg-slate-100 text-slate-700"};return u?s.jsx("div",{className:"p-8 text-center text-slate-500",children:"Loading..."}):s.jsxs("div",{className:"min-h-screen bg-slate-50",children:[s.jsxs("div",{className:"border-b bg-white px-6 py-4 flex items-center gap-4",children:[s.jsx(be,{variant:"ghost",size:"icon",onClick:()=>e("/ManageClinics"),children:s.jsx(dB,{className:"w-4 h-4"})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("h1",{className:"text-lg font-bold text-slate-900",children:["Team â ",r==null?void 0:r.name]}),s.jsxs("p",{className:"text-xs text-slate-500",children:[a.length," team member",a.length!==1?"s":""]})]}),s.jsxs(be,{onClick:()=>{b(null),p(!0)},className:"bg-[#006e74] hover:bg-[#005a60]",children:[s.jsx(ir,{className:"w-4 h-4 mr-1"})," Add Team Member"]})]}),s.jsx("div",{className:"max-w-4xl mx-auto p-6",children:s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.map(x=>{var _,S;return s.jsx(yt,{className:"cursor-pointer hover:shadow-md transition-shadow",onClick:()=>{b(x),p(!0)},children:s.jsx(It,{className:"pt-4 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[x.profile_image_url?s.jsx("img",{src:x.profile_image_url,alt:"",className:"w-12 h-12 rounded-full object-cover"}):s.jsxs("div",{className:"w-12 h-12 rounded-full bg-slate-200 flex items-center justify-center text-base font-semibold text-slate-600",children:[(_=x.first_name)==null?void 0:_[0],(S=x.last_name)==null?void 0:S[0]]}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"font-semibold text-slate-800",children:[x.first_name," ",x.last_name]}),x.job_title&&s.jsx("div",{className:"text-sm text-slate-500",children:x.job_title}),s.jsx("div",{className:"text-xs text-slate-400",children:x.email}),s.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[s.jsx(Rt,{className:`text-xs px-1.5 py-0 ${y[x.role]||y.team_member}`,children:x.role}),x.linked_user_id?s.jsxs("span",{className:"flex items-center gap-1 text-xs text-green-600",children:[s.jsx(Iy,{className:"w-3 h-3"})," Linked"]}):s.jsxs("span",{className:"flex items-center gap-1 text-xs text-amber-500",children:[s.jsx(Ty,{className:"w-3 h-3"})," Invite pending"]})]})]})]})})},x.id)}),a.length===0&&s.jsx("div",{className:"col-span-2 text-center py-12 text-slate-400",children:"No team members yet. Add one to get started."})]})}),d&&s.jsx(Av,{open:d,onOpenChange:p,member:m,clinicId:n,allClinics:l,onSaved:()=>{p(!1),v()}})]})}const kLe=ve.entities.EmailTemplate;function zF(e,t,n){if(!e)return"";const r={"{{first_name}}":(t==null?void 0:t.first_name)||"","{{last_name}}":(t==null?void 0:t.last_name)||"","{{full_name}}":`${(t==null?void 0:t.first_name)||""} ${(t==null?void 0:t.last_name)||""}`.trim(),"{{email}}":(t==null?void 0:t.email)||"","{{phone}}":(t==null?void 0:t.phone)||"","{{clinic_name}}":(n==null?void 0:n.name)||"","{{enquiry_type}}":(t==null?void 0:t.enquiry_type)||"","{{status}}":(t==null?void 0:t.status)||"","{{notes}}":(t==null?void 0:t.notes)||"","{{submission_date}}":new Date().toLocaleDateString("en-GB"),"{{portal_url}}":""};let i=e;return Object.entries(r).forEach(([a,o])=>{i=i.split(a).join(o)}),i}function OLe({open:e,onOpenChange:t,toEmail:n,lead:r,clinic:i,threadId:a,onSent:o}){const[l,c]=E.useState(""),[u,f]=E.useState(""),[d,p]=E.useState(!1),[m,b]=E.useState([]),[v,y]=E.useState(""),[x,_]=E.useState(null),S=(i==null?void 0:i.shared_gmail_email)||null,w=!!(i!=null&&i.shared_gmail_refresh_token&&(i!=null&&i.shared_gmail_email)),N=!!a&&!!(x!=null&&x.personal_gmail_email)&&!!(x!=null&&x.personal_gmail_refresh_token),k=N?x.personal_gmail_email:S;E.useEffect(()=>{e&&(async()=>{const L=await kLe.filter({is_active:!0}
871).catch(()=>[]);b(L||[]);try{const T=await ve.auth.me(),A=await ve.entities.TeamMember.filter({email:T.email});_((A==null?void 0:A[0])||null)}catch{_(null)}})()},[e]);const C=L=>{const T=m.find(A=>A.id===L);T&&(c(zF(T.subject||"",r,i)),f(zF(T.body_html||"",r,i)))},P=async()=>{var L,T;y(""),p(!0);try{const A=await ve.functions.invoke("sendGmailAsClinic",{clinicId:i==null?void 0:i.id,to:n,subject:l||"(no subject)",htmlBody:u||"",leadId:r==null?void 0:r.id,threadId:a||void 0});if((L=A==null?void 0:A.data)!=null&&L.error)throw new Error(A.data.error);o==null||o({subject:l,body:u,threadId:(T=A==null?void 0:A.data)==null?void 0:T.threadId}),t(!1),c(""),f("")}catch(A){y(A.message||"Failed to send email")}finally{p(!1)}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-2xl",children:[s.jsx(En,{children:s.jsx(kn,{children:"Send Email"})}),w?s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-1.5 flex-wrap",children:[s.jsx(hn,{className:"w-3.5 h-3.5"}),"Sending from ",s.jsx("span",{className:"font-medium text-slate-700",children:k}),N&&s.jsx("span",{className:"text-[11px] bg-[#006e74]/10 text-[#006e74] px-1.5 py-0.5 rounded",children:"your personal Gmail"}),!N&&a&&x&&!x.personal_gmail_email&&s.jsx("span",{className:"text-[11px] text-slate-400",children:"(connect your personal Gmail in profile to reply from your own address)"})]}),s.jsx(Te,{value:n||"",disabled:!0,placeholder:"To"}),s.jsxs(Et,{onValueChange:C,children:[s.jsx(St,{children:s.jsx(kt,{placeholder:"Choose email template (optional)"})}),s.jsx(jt,{children:m.map(L=>s.jsxs(He,{value:L.id,children:[L.name," ",L.category?`⢠${L.category}`:""]},L.id))})]}),s.jsx(Te,{value:l,onChange:L=>c(L.target.value),placeholder:"Subject"}),s.jsx(hu,{value:u,onChange:f,placeholder:"Write your email...",height:260}),v&&s.jsx("div",{className:"text-sm text-red-600 bg-red-50 border border-red-200 rounded p-2",children:v}),s.jsx("div",{className:"flex justify-end",children:s.jsxs(be,{onClick:P,disabled:d||!l,children:[d&&s.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}),"Send via Gmail"]})})]}):s.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 flex gap-3",children:[s.jsx(sp,{className:"w-5 h-5 text-amber-600 flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-sm",children:[s.jsx("div",{className:"font-semibold text-amber-900 mb-1",children:"Clinic Gmail not connected"}),s.jsxs("div",{className:"text-amber-800",children:["Connect the shared clinic inbox in ",s.jsx("strong",{children:"Clinic Details"})," to send emails and capture replies."]})]})]})]})})}const CLe=e=>e.type==="note"?{Icon:Xf,color:"text-amber-500",bg:"bg-amber-50"}:e.type==="status_change"?(e.content||"").toLowerCase().includes("clinician report")?{Icon:Oa,color:"text-[#006e74]",bg:"bg-teal-50"}:(e.content||"").toLowerCase().includes("new lead created")?{Icon:vO,color:"text-indigo-500",bg:"bg-indigo-50"}:{Icon:SX,color:"text-slate-500",bg:"bg-slate-100"}:e.channel==="email"?e.type==="inbound"?{Icon:fZ,color:"text-green-600",bg:"bg-green-50"}:{Icon:hn,color:"text-blue-500",bg:"bg-blue-50"}:e.channel==="phone"?{Icon:Ai,color:"text-purple-500",bg:"bg-purple-50"}:{Icon:Xf,color:"text-slate-500",bg:"bg-slate-100"},ALe=e=>{if(e.type==="note")return"Note";if(e.type==="status_change"){const t=(e.content||"").toLowerCase();return t.includes("clinician report")?"Clinician Report Generated":t.includes("new lead created")?"New Lead Created":"Status Change"}return e.type==="inbound"&&e.channel==="email"?"Email Reply Received":e.type==="outbound"&&e.channel==="email"?"Email Sent":e.type==="inbound"?`Inbound ${e.channel||""}`.trim():e.type==="outbound"?`Outbound ${e.channel||""}`.trim():e.type};function PLe({activities:e=[],onOpenEmailThread:t}){return e.length?s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute left-5 top-3 bottom-3 w-px bg-slate-200","aria-hidden":"true"}),s.jsx("div",{className:"space-y-5",children:e.map(n=>{const{Icon:r,color:i,bg:a}=CLe(n),o=n.channel==="email"&&!!n.gmail_thread_id,l=o&&!!t;return s.jsxs("div",{className:"relative flex gap-4",children:[s.jsx("div",{className:`relative z-10 w-10 h-10 rounded-full ${a} ${i} flex items-center justify-center flex-shrink-0 border-2 border-white`,children:s.jsx(r,{className:"w-4 h-4"})}),s.jsxs("div",{className:`flex-1 min-w-0 bg-white border rounded-lg p-4 ${l?"curs
871or-pointer hover:border-[#006e74] hover:shadow-sm transition":""}`,onClick:l?()=>t(n.gmail_thread_id):void 0,role:l?"button":void 0,tabIndex:l?0:void 0,children:[s.jsxs("div",{className:"flex items-center justify-between mb-1 gap-2",children:[s.jsx("div",{className:"text-sm font-semibold text-slate-800",children:ALe(n)}),s.jsx("div",{className:"text-xs text-slate-400 whitespace-nowrap",children:n.sent_date?Vr(new Date(n.sent_date),"MMM d, yyyy, h:mm a"):""})]}),n.sent_by_email&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 mb-2",children:[s.jsx("div",{className:"w-5 h-5 rounded-full bg-amber-400 text-white flex items-center justify-center text-[10px] font-bold",children:(n.sent_by_email[0]||"").toUpperCase()}),s.jsx("span",{children:n.sent_by_email})]}),n.subject&&n.channel==="email"&&s.jsxs("div",{className:"text-sm font-medium text-slate-800 mb-1",children:["Subject: ",n.subject]}),n.content&&(o?s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"text-sm text-slate-700 prose prose-sm max-w-none overflow-hidden",style:{maxHeight:"110px"},dangerouslySetInnerHTML:{__html:n.content}}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-8 bg-gradient-to-t from-white to-transparent pointer-events-none"}),s.jsx("div",{className:"mt-2 text-xs font-medium text-[#006e74]",children:"Click to view full conversation â"})]}):s.jsx("div",{className:"text-sm text-slate-700 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:n.content}}))]})]},n.id)})})]}):s.jsx("div",{className:"text-center py-8 text-sm text-slate-400",children:"No activity yet."})}const TLe=ve.entities.Lead;function RLe(e){if(!e)return!1;const t=e.trim();return!(!/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(t)||t.includes("..")||(t.match(/@/g)||[]).length!==1)}function ILe({open:e,onOpenChange:t,lead:n,onSaved:r}){const[i,a]=E.useState(()=>({first_name:(n==null?void 0:n.first_name)||"",last_name:(n==null?void 0:n.last_name)||"",email:(n==null?void 0:n.email)||"",phone:(n==null?void 0:n.phone)||"",source:(n==null?void 0:n.source)||"",enquiry_type:(n==null?void 0:n.enquiry_type)||""})),[o,l]=E.useState(!1),[c,u]=E.useState(""),f=(p,m)=>{a(b=>({...b,[p]:m})),p==="email"&&u("")},d=async()=>{if(n!=null&&n.id){if(!RLe(i.email)){u("Please enter a valid email address");return}l(!0),await TLe.update(n.id,i),l(!1),r==null||r(),t(!1)}};return s.jsx(vn,{open:e,onOpenChange:t,children:s.jsxs(pn,{className:"max-w-md",children:[s.jsx(En,{children:s.jsx(kn,{children:"Edit Lead"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[s.jsx(Te,{value:i.first_name,onChange:p=>f("first_name",p.target.value),placeholder:"First name"}),s.jsx(Te,{value:i.last_name,onChange:p=>f("last_name",p.target.value),placeholder:"Last name"})]}),s.jsxs("div",{children:[s.jsx(Te,{type:"email",value:i.email,onChange:p=>f("email",p.target.value),placeholder:"Email",className:c?"border-red-500":""}),c&&s.jsx("p",{className:"text-xs text-red-600 mt-1",children:c})]}),s.jsx(Te,{value:i.phone,onChange:p=>f("phone",p.target.value),placeholder:"Phone"}),s.jsx(Te,{value:i.source,onChange:p=>f("source",p.target.value),placeholder:"Source (e.g., Website form)"}),s.jsx(Te,{value:i.enquiry_type,onChange:p=>f("enquiry_type",p.target.value),placeholder:"Enquiry type"}),s.jsx("div",{className:"flex justify-end",children:s.jsx(be,{onClick:d,disabled:o,children:o?"Saving...":"Save"})})]})]})})}function MLe({lead:e}){const[t,n]=E.useState(null),[r,i]=E.useState(null),[a,o]=E.useState([]),[l,c]=E.useState(!1),[u,f]=E.useState(!1),[d,p]=E.useState(!1);return E.useEffect(()=>{if(!(e!=null&&e.symptoms_analysis_response_id))return;let m=!1;return(async()=>{var b;c(!0);try{const[v,y]=await Promise.all([ve.entities.PatientFormResponse.filter({id:e.symptoms_analysis_response_id}),ve.entities.IntakeFormQuestion.list()]);if(m)return;const x=v==null?void 0:v[0];n(((b=x==null?void 0:x.ai_analysis_results)==null?void 0:b.clinician_notes)||null),i((x==null?void 0:x.responses)||null),o(y||[])}finally{m||c(!1)}})(),()=>{m=!0}},[e==null?void 0:e.symptoms_analysis_response_id]),!(e!=null&&e.symptoms_analysis_response_id)||!l&&!t&&!(e!=null&&e.clinician_pdf_url)?null:s.jsxs(s.Fragment,{children:[s.jsx(yt,{className:"border-[#006e74]/30 bg-[#006e74]/5",children:s.jsxs(It,{className:"pt-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(Ry,{className:"w-4 h-4 text-[#006e74]"}),s.jsx("div",{className:"font-semibold text-slate-800",children:"Clinician Notes (AI)"}),s.jsx("span",{className:"text-[10px] uppercase tracking-wide font-semibold bg-[#006e74] text-white px-2 py-0.5 rounded",children:"Not for patient"})]}),s.jsx("div",{className:"flex flex-wrap gap-2 mb-4",children:e.clinician_pdf_url&&s.jsxs(s.Fragment,{children:[s.jsxs(be,{variant:"outline",size:"sm",className:"gap-1.5 h-8",onClick:()=>f(!0),children:[s.jsx(Oa,{className:"w-3.5 h-3.5"})," View PDF"]}),s.jsxs("a",{href:e.clinician_pdf_url,download:!0,className:"inline-flex items-center gap-1.5 h-8 px-3 text-xs rounded-md border border-input bg-background hover:bg-accent",children:[s.jsx(Fu,{className:"w-3.5 h-3.5"})," Download"]})]})}),l&&s.jsx("div",{className:"text-sm text-slate-500",children:"Loadingâ¦"}),t&&s.jsxs("div",{className:"bg-white rounded-md border border-slate-200 p-3",children:[s.jsx("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-slate-500 mb-1",children:"Presenting condition"}),s.jsx("div",{className:"text-sm text-slate-800 whitespace-pre-wrap mb-3",children:t.presenting_condition_overview||"â"}),s.jsxs(be,{size:"sm",variant:"outline",className:"gap-1.5 w-full",onClick:()=>p(!0),children:[s.jsx(FX,{className:"w-3.5 h-3.5"})," View Full Notes"]})]})]})}),s.jsx(WH,{open:u,onOpenChange:f,pdfUrl:e.clinician_pdf_url,title:"Clinician Report"}),s.jsx(HH,{open:d,onOpenChange:p,clinicianNotes:t,pdfUrl:e.clinician_pdf_url,formResponses:r,intakeQuestions:a})]})}function DLe(e){return`${((e==null?void 0:e.first_name)||"")[0]||""}${((e==null?void 0:e.last_name)||"")[0]||""}`.toUpperCase()}function HF({member:e,size:t=28}){const n={width:t,height:t};return e!=null&&e.profile_image_url?s.jsx("img",{src:e.profile_image_url,alt:"",className:"rounded-full object-cover",style:n}):s.jsx("div",{className:"rounded-full bg-slate-200 text-slate-600 flex items-center justify-center font-semibold",style:{...n,fontSize:t*.4},children:DLe(e)||s.jsx(jB,{className:"w-3.5 h-3.5"})})}function LLe({lead:e,teamMembers:t=[],onAssign:n}){const[r,i]=ne.useState(!1),a=e==null?void 0:e.assigned_team_member_id,o=e==null?void 0:e.assigned_to_email,l=t.find(u=>u.id===a)||(o?t.find(u=>(u.email||"").toLowerCase()===o.toLowerCase()):null),c=async u=>
871{i(!1),await(n==null?void 0:n(u))};return s.jsxs(pA,{open:r,onOpenChange:i,children:[s.jsx(mA,{asChild:!0,children:s.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-2.5 py-1.5 rounded-md border border-slate-200 bg-white hover:bg-slate-50 transition text-sm",title:"Click to change assignee",children:[s.jsx("span",{className:"text-[11px] uppercase tracking-wide text-slate-400 font-medium",children:"Assigned"}),l?s.jsxs(s.Fragment,{children:[s.jsx(HF,{member:l,size:22}),s.jsxs("span",{className:"font-medium text-slate-800 max-w-[110px] truncate",children:[l.first_name," ",l.last_name]})]}):s.jsx("span",{className:"text-slate-500",children:"Unassigned"}),s.jsx(Or,{className:"w-3 h-3 text-slate-400"})]})}),s.jsx(Cx,{className:"w-64 p-1",align:"end",children:s.jsxs("div",{className:"max-h-64 overflow-y-auto",children:[s.jsxs("button",{type:"button",onClick:()=>c(null),className:"w-full flex items-center gap-2 px-2 py-1.5 text-xs text-slate-600 hover:bg-slate-100 rounded",children:[s.jsx("div",{className:"w-6 h-6 rounded-full border border-dashed border-slate-300"}),"Unassigned",!l&&s.jsx(Hr,{className:"w-3 h-3 ml-auto text-[#006e74]"})]}),s.jsx("div",{className:"h-px bg-slate-100 my-1"}),t.length===0&&s.jsx("div",{className:"text-xs text-slate-400 px-2 py-3 text-center",children:"No team members yet."}),t.map(u=>s.jsxs("button",{type:"button",onClick:()=>c(u),className:"w-full flex items-center gap-2 px-2 py-1.5 hover:bg-slate-100 rounded",children:[s.jsx(HF,{member:u,size:24}),s.jsxs("div",{className:"flex-1 min-w-0 text-left",children:[s.jsxs("div",{className:"text-xs font-medium text-slate-800 truncate",children:[u.first_name," ",u.last_name]}),s.jsx("div",{className:"text-[10px] text-slate-500 truncate",children:u.job_title||u.role})]}),(l==null?void 0:l.id)===u.id&&s.jsx(Hr,{className:"w-3 h-3 text-[#006e74]"})]},u.id))]})})]})}function WF(e){if(!e)return"â";const t=J8(new Date,new Date(e));return t<60?`${t} seconds ago`:Vle(new Date(e),{addSuffix:!0})}const VF=["Website Contact Form","AI Symptoms Checker","Email Lead","Phone Enquiry","Referral","Walk-in","Other"];function GF({member:e,size:t=20}){if(!e)return null;const n={width:t,height:t};if(e.profile_image_url)return s.jsx("img",{src:e.profile_image_url,alt:"",className:"rounded-full object-cover",style:n});const r=`${(e.first_name||"")[0]||""}${(e.last_name||"")[0]||""}`.toUpperCase();return s.jsx("div",{className:"rounded-full bg-slate-200 text-slate-600 flex items-center justify-center font-semibold",style:{...n,fontSize:t*.42},children:r||"?"})}function $Le(){var at,tt;const[e]=Dy(),t=mr(),n=Ba(),r=e.get("id"),i=((at=n.state)==null?void 0:at.from)==="leads"?"leads":"dashboard",a=i==="leads"?"/ClinicLeads":"/ClinicDashboard",o=i==="leads"?"Back to All Leads":"Back to Dashboard",[l,c]=E.useState(null),[u,f]=E.useState(null),[d,p]=E.useState(null),[m,b]=E.useState(null),[v,y]=E.useState([]),[x,_]=E.useState([]),[S,w]=E.useState(!0),[N,k]=E.useState(!1),[C,P]=E.useState(""),[L,T]=E.useState("all"),[A,R]=E.useState(!1),[I,M]=E.useState(!1),[B,W]=E.useState(!1),[G,H]=E.useState(!1),[K,$]=E.useState(!1),[F,z]=E.useState(!1),[U,ee]=E.useState(null),[re,X]=E.useState(null),Z=E.useCallback(async()=>{var Ae;if(!r){w(!1);return}w(!0);try{const _t=await ve.auth.me().catch(()=>null);c(_t);const Pt=await ve.entities.Lead.filter({id:r}),rt=(Pt==null?void 0:Pt[0])||null;if(p(rt),rt!=null&&rt.clinic_id){const[Tt,fi]=await Promise.all([ve.entities.Clinic.filter({id:rt.clinic_id}),ve.entities.TeamMember.filter({clinic_id:rt.clinic_id})]);f((Tt==null?void 0:Tt[0])||null),_((fi||[]).filter(vr=>vr.is_active!==!1))}const Ui=await ve.entities.LeadActivity.filter({lead_id:r},"-sent_date",200);if(y(Ui||[]),rt!=null&&rt.symptoms_analysis_response_id)try{const Tt=await ve.entities.PatientFormResponse.filter({id:rt.symptoms_analysis_response_id});b(((Ae=Tt==null?void 0:Tt[0])==null?void 0:Ae.ai_analysis_results)||null)}catch{b(null)}else b(null)}finally{w(!1)}},[r]);E.useEffect(()=>{Z()},[Z]);const ie=E.useCallback(async()=>{if(!r)return;const Ae=await ve.entities.Lead.filter({id:r});Ae!=null&&Ae[0]&&p(Ae[0])},[r]),Y=E.useCallback(async()=>
871{if(!r)return;const Ae=await ve.entities.LeadActivity.filter({lead_id:r},"-sent_date",200);y(Ae||[])},[r]),J=(l==null?void 0:l.app_role)==="clinic"||(l==null?void 0:l.app_role)==="team_member"||(l==null?void 0:l.app_role)==="practitioner",se=E.useMemo(()=>L==="all"?v:L==="notes"?v.filter(Ae=>Ae.type==="note"):L==="email"?v.filter(Ae=>Ae.channel==="email"):L==="status"?v.filter(Ae=>Ae.type==="status_change"):v,[v,L]),V=E.useMemo(()=>{const Ae=v.find(_t=>_t.channel==="email"&&_t.gmail_thread_id);return(Ae==null?void 0:Ae.gmail_thread_id)||null},[v]),fe=E.useMemo(()=>{const Ae=v.find(_t=>_t.type==="outbound"||_t.type==="note"||_t.type==="status_change");return(Ae==null?void 0:Ae.sent_date)||null},[v]),ce=async()=>{if(!(!(C||"").replace(/<[^>]*>/g,"").trim()||!r)){k(!0);try{const _t=await ve.entities.LeadActivity.create({lead_id:r,type:"note",channel:"note",content:C,sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(Pt=>[_t,...Pt]),P("")}finally{k(!1)}}},Ne=async(Ae,_t)=>{if(!r)return;p(rt=>rt&&{...rt,status:Ae,last_contact_date:new Date().toISOString()}),await ve.entities.Lead.update(r,{status:Ae,last_contact_date:new Date().toISOString()});const Pt=await ve.entities.LeadActivity.create({lead_id:r,type:"status_change",channel:"system",content:_t||`Status changed to ${Ae}`,sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(rt=>[Pt,...rt])},me=async()=>{const Ae=u==null?void 0:u.internal_booking_url;Ae&&window.open(Ae,"_blank","noopener,noreferrer"),await Ne("won",`Appointment booked (via internal booking link) by ${(l==null?void 0:l.email)||"staff"}`),W(!1)},je=async()=>{await Ne("won",`Marked as Won by ${(l==null?void 0:l.email)||"staff"}`),W(!1)},te=()=>{Y()},oe=async({reason:Ae,note:_t})=>{p(rt=>rt&&{...rt,status:"lost"}),await ve.entities.Lead.update(r,{status:"lost"});const Pt=await ve.entities.LeadActivity.create({lead_id:r,type:"status_change",channel:"system",content:`Marked as Lost. Reason: ${Ae}.${_t?` Note: ${_t}`:""}`,sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(rt=>[Pt,...rt])},le=async({reason:Ae,note:_t})=>{p(rt=>rt&&{...rt,is_archived:!0}),await ve.entities.Lead.update(r,{is_archived:!0});const Pt=await ve.entities.LeadActivity.create({lead_id:r,type:"status_change",channel:"system",content:`Marked as N/A. Reason: ${Ae}.${_t?` Note: ${_t}`:""}`,sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(rt=>[Pt,...rt])},ye=async Ae=>{if(!r)return;const _t=Ae?{assigned_team_member_id:Ae.id,assigned_to_email:Ae.email||""}:{assigned_team_member_id:"",assigned_to_email:""};p(rt=>rt&&{...rt,..._t}),await ve.entities.Lead.update(r,_t);const Pt=await ve.entities.LeadActivity.create({lead_id:r,type:"status_change",channel:"system",content:Ae?`Assigned to ${Ae.first_name||""} ${Ae.last_name||""} (${Ae.email||""}).`:"Unassigned.",sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(rt=>[Pt,...rt]),Ae!=null&&Ae.id&&ve.functions.invoke("sendLeadAssignmentEmail",{leadId:r,teamMemberId:Ae.id}).catch(rt=>console.warn("Assignment email failed:",rt==null?void 0:rt.message))},xe=async Ae=>{if(!r||Ae===((d==null?void 0:d.clinic_location_slug)||""))return;const _t=(d==null?void 0:d.clinic_location_name)||"â",Pt=((u==null?void 0:u.locations)||[]).find(Tt=>Tt.slug===Ae),rt=(Pt==null?void 0:Pt.name)||"";p(Tt=>Tt&&{...Tt,clinic_location_slug:Ae,clinic_location_name:rt}),await ve.entities.Lead.update(r,{clinic_location_slug:Ae,clinic_location_name:rt});const Ui=await ve.entities.LeadActivity.create({lead_id:r,type:"status_change",channel:"system",content:`Clinic location changed from "${_t}" to "${rt||"â"}".`,sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(Tt=>[Ui,...Tt])},Ce=async Ae=>{if(!r||Ae===(d==null?void 0:d.enquiry_type))return;const _t=d==null?void 0:d.enquiry_type;p(rt=>rt&&{...rt,enquiry_type:Ae}),await ve.entities.Lead.update(r,{enquiry_type:Ae});const Pt=await ve.entities.LeadActivity.create({lead_id:r,type:"status_change",channel:"system",content:`Enquiry type changed from "${_t||"â"}" to "${Ae}".`,sent_by_email:(l==null?void 0:l.email)||"",sent_date:new Date().toISOString(),clinic_id:(d==null?void 0:d.clinic_id)||""});y(rt=>[Pt,...rt])};if(S)return s.jsx("div",{className:"min-h-screen flex items-center justify-center text-slate-500",children:"Loading lead..."});if(!d)return s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[J&&s.jsx(ws,{clinic:u}),s.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:s.jsx(yt,{className:"max-w-md",children:s.jsxs(It,{className:"pt-6 text-center",children:[s.jsx(kX,{className:"w-10 h-10 text-red-400 mx-auto mb-3"}),s.jsx("div",{className:"font-semibold text-slate-800 mb-1",children:"Lead not found"}),s.jsx("div",{className:"text-sm text-slate-500 mb-4",children:"This lead may have been deleted or the link is invali
871d."}),s.jsx(be,{variant:"outline",onClick:()=>t(J?"/ClinicLeads":"/LeadsPipeline"),children:"Back to Leads"})]})})}),J&&s.jsx(Cy,{clinic:u})]});const Be=`${(d.first_name||"")[0]||""}${(d.last_name||"")[0]||""}`.toUpperCase(),Re=`${d.first_name||""} ${d.last_name||""}`.trim(),ge=d.status==="won",ke=d.status==="lost",De=x.find(Ae=>Ae.id===d.assigned_team_member_id)||(d.assigned_to_email?x.find(Ae=>(Ae.email||"").toLowerCase()===d.assigned_to_email.toLowerCase()):null);return s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[J&&s.jsx(ws,{clinic:u}),s.jsxs("div",{className:"max-w-6xl mx-auto w-full p-4 md:p-6 flex-1",children:[s.jsx("div",{className:"mb-3",children:s.jsxs("button",{type:"button",onClick:()=>t(a),className:"inline-flex items-center gap-1.5 text-sm text-slate-600 hover:text-[#006e74] transition-colors",children:[s.jsx(dB,{className:"w-4 h-4"}),o]})}),s.jsxs("div",{className:"flex items-center justify-between mb-4 gap-3 flex-wrap",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx(su,{className:"w-5 h-5 text-[#006e74]"}),s.jsx("h1",{className:"text-xl font-bold text-slate-800",children:"Lead Details Manager"}),m&&(m.is_emergency||m.urgent_gp_review_recommended)&&s.jsx("div",{className:"ml-1 -mt-1",children:s.jsx(TH,{analysis:m})})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap justify-end",children:[!ge&&!ke&&s.jsxs(s.Fragment,{children:[s.jsxs(be,{size:"sm",onClick:()=>W(!0),className:"bg-green-600 hover:bg-green-700 text-white gap-1.5 h-9",children:[s.jsx(oa,{className:"w-4 h-4"})," Mark Won"]}),s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>M(!0),className:"gap-1.5 h-9 text-red-600 hover:text-red-700 border-red-200 hover:bg-red-50",children:[s.jsx(If,{className:"w-4 h-4"})," Mark Lost"]})]}),ge&&s.jsxs("div",{className:"inline-flex items-center gap-1.5 text-sm text-green-700 bg-green-50 border border-green-200 px-3 py-1.5 rounded-md",children:[s.jsx(oa,{className:"w-4 h-4"})," Won"]}),ke&&s.jsxs("div",{className:"inline-flex items-center gap-1.5 text-sm text-red-700 bg-red-50 border border-red-200 px-3 py-1.5 rounded-md",children:[s.jsx(If,{className:"w-4 h-4"})," Lost"]}),s.jsx(LLe,{lead:d,teamMembers:x,onAssign:ye})]})]}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-5",children:[s.jsxs("div",{className:"lg:col-span-1 space-y-5",children:[s.jsx(yt,{children:s.jsxs(It,{className:"pt-6 relative",children:[s.jsx("button",{onClick:()=>$(!0),className:"absolute top-3 right-3 p-1.5 rounded hover:bg-slate-100 text-slate-400 hover:text-slate-700",title:"Edit lead",children:s.jsx(gO,{className:"w-4 h-4"})}),s.jsxs("div",{className:"flex flex-col items-center text-center",children:[s.jsx("div",{className:"w-20 h-20 rounded-full bg-slate-200 flex items-center justify-center text-xl font-semibold text-slate-600 mb-3",children:Be||s.jsx(su,{className:"w-8 h-8"})}),s.jsx("div",{className:"font-semibold text-slate-900",children:Re||"â"}),s.jsx("div",{className:"text-sm text-slate-500 break-all",children:d.email}),d.phone&&s.jsxs("div",{className:"text-sm text-slate-500 mt-0.5 flex items-center gap-1",children:[s.jsx(Ai,{className:"w-3 h-3"})," ",d.phone]}),s.jsx("div",{className:"mt-3",children:s.jsx(fA,{status:d.status})}),s.jsx("div",{className:"mt-2",children:s.jsxs(cA,{children:[s.jsx(uA,{asChild:!0,children:s.jsxs(be,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1.5",children:["Set Outcome",s.jsx(Or,{className:"w-3.5 h-3.5"})]})}),s.jsxs(kx,{align:"center",className:"w-44",children:[s.jsxs(lo,{onClick:()=>W(!0),className:"gap-2 text-green-700 focus:text-green-700 focus:bg-green-50",children:[s.jsx(oa,{className:"w-4 h-4"})," Mark as Won"]}),s.jsxs(lo,{onClick:()=>M(!0),className:"gap-2 text-red-600 focus:text-red-700 focus:bg-red-50",children:[s.jsx(If,{className:"w-4 h-4"})," Mark as Lost"]}),s.jsxs(lo,{onClick:()=>H(!0),className:"gap-2 text-slate-700 focus:bg-slate-100",children:[s.jsx(hB,{className:"w-4 h-4"})," Mark as N/A"]})]})]})})]}),s.jsxs("div",{className:"mt-5 space-y-2",children:[s.jsxs(be,{variant:"outline",className:"w-full gap-2",onClick:()=>{ee(V||null),z(!0)},children:[s.jsx(hn,{className:"w-4 h-4"})," Send Email"]}),s.jsxs(be,{className:"w-full gap-2 bg-green-600 hover:bg-green-700 text-white shadow",onClick:()=>W(!0),disabled:ge,children:[s.jsx(au,{className:"w-4 h-4"})," ",ge?"Booked (Won)":"Book Appointment"]})]})]})}),s.jsx(yt,{children:s.jsxs(It,{className:"pt-6",children:[s.jsx("div",{className:"font-semibold text-slate-800 mb-4",children:"Lead Details"}),s.jsxs("dl",{className:"space-y-3 text-sm",children:[s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("dt",{className:"text-slate-500",children:"Date created"}),s.jsx("dd",{className:"text-slate-800 text-right",children:d.created_date?new Date(d.created_date).toLocaleStr
871ing("en-GB",{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit"}):"â"})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("dt",{className:"text-slate-500",children:"Total time open"}),s.jsx("dd",{className:"text-slate-800 text-right",children:WF(d.created_date)})]}),s.jsxs("div",{className:"flex justify-between gap-3",children:[s.jsx("dt",{className:"text-slate-500",children:"Since our last response"}),s.jsx("dd",{className:"text-slate-800 text-right",children:fe?WF(fe):"â"})]}),s.jsxs("div",{className:"flex justify-between items-center gap-3",children:[s.jsx("dt",{className:"text-slate-500",children:"Source"}),s.jsx("dd",{className:"text-right",children:s.jsx(dA,{source:d.source})})]}),s.jsxs("div",{className:"flex justify-between items-center gap-3",children:[s.jsx("dt",{className:"text-slate-500",children:"Enquiry type"}),s.jsx("dd",{className:"text-right",children:s.jsxs(Et,{value:d.enquiry_type||"",onValueChange:Ce,children:[s.jsx(St,{className:"h-7 text-xs px-2 border-slate-200 bg-white min-w-[140px] justify-between",children:s.jsx(kt,{placeholder:"Set type"})}),s.jsxs(jt,{children:[VF.map(Ae=>s.jsx(He,{value:Ae,children:Ae},Ae)),d.enquiry_type&&!VF.includes(d.enquiry_type)&&s.jsx(He,{value:d.enquiry_type,children:d.enquiry_type})]})]})})]}),s.jsxs("div",{className:"flex justify-between items-center gap-3",children:[s.jsx("dt",{className:"text-slate-500",children:"Clinic location"}),s.jsx("dd",{className:"text-right",children:s.jsxs(Et,{value:d.clinic_location_slug||"__none__",onValueChange:Ae=>xe(Ae==="__none__"?"":Ae),disabled:!((tt=u==null?void 0:u.locations)!=null&&tt.length),children:[s.jsx(St,{className:"h-7 text-xs px-2 border-slate-200 bg-white min-w-[140px] justify-between",children:s.jsx(kt,{placeholder:"Select location"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"__none__",children:"â"}),((u==null?void 0:u.locations)||[]).map(Ae=>s.jsx(He,{value:Ae.slug,children:Ae.name},Ae.slug)),d.clinic_location_slug&&!((u==null?void 0:u.locations)||[]).some(Ae=>Ae.slug===d.clinic_location_slug)&&s.jsx(He,{value:d.clinic_location_slug,children:d.clinic_location_name||d.clinic_location_slug})]})]})})]}),s.jsxs("div",{className:"flex justify-between gap-3 items-center",children:[s.jsx("dt",{className:"text-slate-500",children:"Assigned to"}),s.jsx("dd",{className:"text-right",children:s.jsxs(Et,{value:d.assigned_team_member_id||"__unassigned__",onValueChange:Ae=>{const _t=Ae==="__unassigned__"?null:x.find(Pt=>Pt.id===Ae);ye(_t||null)},children:[s.jsx(St,{className:"h-8 text-xs px-2 border-slate-200 bg-white min-w-[180px] justify-between",children:De?s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(GF,{member:De,size:20}),s.jsxs("span",{className:"truncate",children:[De.first_name," ",De.last_name]})]}):s.jsx(kt,{placeholder:"Unassigned"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"__unassigned__",children:"Unassigned"}),x.map(Ae=>s.jsx(He,{value:Ae.id,children:s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(GF,{member:Ae,size:20}),s.jsxs("span",{children:[Ae.first_name," ",Ae.last_name]})]})},Ae.id))]})]})})]})]})]})}),s.jsx(MLe,{lead:d})]}),s.jsxs("div",{className:"lg:col-span-2 space-y-5",children:[s.jsx(yt,{className:"bg-yellow-50 border-yellow-200",children:s.jsxs(It,{className:"pt-5",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[s.jsx(Xf,{className:"w-4 h-4 text-slate-700"}),s.jsx("div",{className:"font-semibold text-slate-800",children:"Add Note"})]}),s.jsx("div",{className:"bg-white rounded-md",children:s.jsx(hu,{value:C,onChange:P,placeholder:"Type an internal note...",height:180})}),s.jsx("div",{className:"flex justify-end mt-3",children:s.jsx(be,{onClick:ce,disabled:N||!(C||"").replace(/<[^>]*>/g,"").trim(),className:"bg-slate-900 hover:bg-slate-800 text-white",children:N?"Saving...":"Add Note"})})]})}),s.jsx(yt,{children:s.jsxs(It,{className:"pt-5",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4 gap-3 flex-wrap",children:[s.jsx("div",{className:"font-semibold text-slate-800",children:"Activity"}),s.jsxs("div",{className:"flex items-center gap-2",children:[V&&s.jsxs(be,{size:"sm",onClick:()=>{ee(V),z(!0)},className:"bg-[#006e74] hover:bg-[#005a60] gap-1.5 h-8",children:[s.jsx(PZ,{className:"w-3.5 h-3.5"}),"Reply"]}),s.jsx(WX,{className:"w-4 h-4 text-slate-400"}),s.jsxs(Et,{value:L,onValueChange:T,children:[s.jsx(St,{className:"w-32 h-8 text-xs",children:s.jsx(kt,{placeholder:"All"})}),s.jsxs(jt,{children:[s.jsx(He,{value:"all",children:"All"}),s.jsx(He,{value:"notes",children:"Notes"}),s.jsx(He,{value:"email",children:"Emails"}),s.jsx(He,{value:"status",children:"Status Changes"})]})]})]})]}),s.jsx(PLe,{activities:se,onOpenEmailThread:Ae=>{ee(Ae),z(!0)}})]})})]})]})]}),s.jsx(OLe,{open:A,onOpenChange:Ae=>{R(Ae),Ae||X(null)},toEmail:d.email,lead:d,clinic:u,threadId:re||V,onSent:te}),s.jsx(VH,{open:F,onOpenChange:z,activities:v,threadId:U,lead:d,clinic:u,onSent:()=>{z(!1),Y()}}),s.jsx(KH,{open:I,onOpenChange:M,onConfirm:oe}),s.jsx(GH,{open:B,onOpenChange:W,hasBookingUrl:!!(u!=null&&u.internal_booking_url),onBookAppointment:me,onJustMarkWon:je}),s.jsx(YH,{open:G,onOpenChange:H,onConfirm:le}),s.jsx(ILe,{open:K,onOpenChange:$,lead:d,onSaved:()=>{$(!1),ie()}}),J&&s.jsx(Cy,{clinic:u})]})}const FLe="https://media.base44.com/images/public/696f865eaed283c6951e030b/02c79c1b1_TriageFlowAILogo.jpg";function BLe(){const[e,t]=E.useState(!1),n=[{label:"Features",href:"#features"}
871,{label:"How it works",href:"#how-it-works"},{label:"Benefits",href:"#benefits"},{label:"Pricing",href:"#pricing"},{label:"FAQ",href:"#faq"}];return s.jsxs("header",{className:"sticky top-0 z-50 bg-white/90 backdrop-blur-sm border-b border-slate-200",children:[s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 h-16 flex items-center justify-between",children:[s.jsx(qr,{to:"/",className:"flex items-center",children:s.jsx("img",{src:FLe,alt:"TriageFlow",className:"h-9 w-auto"})}),s.jsx("nav",{className:"hidden md:flex items-center gap-8",children:n.map(r=>s.jsx("a",{href:r.href,className:"text-sm text-slate-600 hover:text-[#006e74] font-medium transition-colors",children:r.label},r.href))}),s.jsxs("div",{className:"hidden md:flex items-center gap-3",children:[s.jsx(be,{variant:"ghost",className:"text-slate-700",onClick:()=>ve.auth.redirectToLogin(`${window.location.origin}/ClinicDashboard`),children:"Sign in"}),s.jsx(qr,{to:"/Register",children:s.jsx(be,{className:"bg-[#006e74] hover:bg-[#005560]",children:"Get started"})})]}),s.jsx("button",{className:"md:hidden p-2",onClick:()=>t(r=>!r),"aria-label":"Toggle menu",children:e?s.jsx(Cr,{className:"w-6 h-6"}):s.jsx(hO,{className:"w-6 h-6"})})]}),e&&s.jsx("div",{className:"md:hidden border-t border-slate-200 bg-white",children:s.jsxs("div",{className:"px-4 py-4 space-y-3",children:[n.map(r=>s.jsx("a",{href:r.href,onClick:()=>t(!1),className:"block text-sm text-slate-700 font-medium py-2",children:r.label},r.href)),s.jsxs("div",{className:"pt-3 border-t border-slate-200 flex flex-col gap-2",children:[s.jsx(be,{variant:"outline",className:"w-full",onClick:()=>{t(!1),ve.auth.redirectToLogin(`${window.location.origin}/ClinicDashboard`)},children:"Sign in"}),s.jsx(qr,{to:"/Register",onClick:()=>t(!1),children:s.jsx(be,{className:"w-full bg-[#006e74] hover:bg-[#005560]",children:"Get started"})})]})]})})]})}function qLe(){return s.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-slate-50 via-white to-teal-50/40",children:[s.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_20%_0%,rgba(0,110,116,0.08),transparent_50%)]"}),s.jsx("div",{className:"relative max-w-7xl mx-auto px-4 md:px-6 py-20 md:py-28",children:s.jsxs("div",{className:"grid md:grid-cols-2 gap-12 items-center",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-teal-50 border border-teal-100 rounded-full text-xs font-semibold text-[#006e74] mb-6",children:[s.jsx(vO,{className:"w-3.5 h-3.5"}),"AI-powered triage for MSK clinics"]}),s.jsxs("h1",{className:"text-4xl md:text-6xl font-bold text-slate-900 leading-tight tracking-tight mb-6",children:["Turn enquiries into"," ",s.jsx("span",{className:"text-[#006e74]",children:"booked appointments"})]}),s.jsx("p",{className:"text-lg text-slate-600 mb-8 max-w-xl leading-relaxed",children:"TriageFlow is the all-in-one lead management and AI symptoms assessment platform built for physiotherapy, osteopathy and sports therapy clinics. Capture, qualify and convert leads automatically â while giving patients a world-class first impression."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-8",children:[s.jsx(qr,{to:"/Register",children:s.jsxs(be,{size:"lg",className:"bg-[#006e74] hover:bg-[#005560] w-full sm:w-auto",children:["Start free trial",s.jsx(fB,{className:"w-4 h-4 ml-2"})]})}),s.jsx("a",{href:"#how-it-works",children:s.jsx(be,{size:"lg",variant:"outline",className:"w-full sm:w-auto",children:"See how it works"})})]}),s.jsx("div",{className:"flex flex-wrap gap-x-6 gap-y-2 text-sm text-slate-600",children:["14-day free trial","No credit card required","Cancel anytime"].map(e=>s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(oa,{className:"w-4 h-4 text-[#006e74]"}),s.jsx("span",{children:e})]},e))})]}),s.jsxs("div",{className:"relative",children:[s.jsx("div",{className:"absolute -inset-4 bg-gradient-to-br from-[#006e74]/20 to-teal-400/20 rounded-3xl blur-2xl"}),s.jsxs("div",{className:"relative rounded-2xl overflow-hidden shadow-2xl border border-slate-200 bg-white",children:[s.jsx("img",{src:"https://media.base44.com/images/public/696f865eaed283c6951e030b/c13b2bf8a_TriageFlowAIImage.png",alt:"TriageFlow AI pain triage assessment â body chart with pain points",className:"w-full h-auto object-cover bg-white"}),s.jsxs("div",{className:"absolute top-4 left-4 bg-white/95 backdrop-blur rounded-lg shadow-lg px-4 py-3 border border-slate-200",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs font-semibold text-[#006e74] mb-1",children:[s.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),"New lead captured"]}),s.jsx("div",{className:"text-sm font-semibold text-slate-900",children:"Sarah M. · Lower back pain"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Triaged · High intent"})]})]})]})]})})]})}const ULe=[{icon:pB,title:"AI Symptoms Assessment",desc:"Patients complete a smart, adaptive symptom check that generates a clinical summary, red-flag alerts and a personalised treatment plan â before they even pick up the phone."},{icon:Mf,title:"Lead Pipeline",desc:"Every enquiry lands in a kanban-style pipeline. Track new, responded, contacted, won and lost leads with full activity history."},{icon:hn,title:"Gmail Integration",desc:"Connect your clinic or personal Gmail. Send templated emails, track replies, and keep every conversation linked to the lead."},{icon:qu,title:"Team Collaboration",desc:"Invite admins and practitioners, assign leads, add internal notes and comments, and react to activity â all in one place."},{icon:Oa,title:"Custom Intake Forms",desc:"Build your own lead form with conditional logic, body chart selection and outcome measures. Embed anyw
871here."},{icon:mB,title:"Analytics & Reporting",desc:"See conversion rates, response times, source performance and team activity at a glance."},{icon:dO,title:"Multi-Location",desc:"Run multiple clinic locations with their own contact details, team members and booking links â from one account."},{icon:UZ,title:"Secure & Compliant",desc:"GDPR-friendly, role-based access control and encrypted data storage. Built for healthcare from day one."}];function zLe(){return s.jsx("section",{id:"features",className:"py-20 md:py-28 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6",children:[s.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16",children:[s.jsx("div",{className:"text-sm font-semibold text-[#006e74] uppercase tracking-wider mb-3",children:"Features"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-4",children:"Everything your clinic needs to convert more leads"}),s.jsx("p",{className:"text-lg text-slate-600",children:"Purpose-built tools that replace a patchwork of spreadsheets, inboxes and CRMs."})]}),s.jsx("div",{className:"grid sm:grid-cols-2 lg:grid-cols-4 gap-6",children:ULe.map(e=>s.jsxs("div",{className:"group p-6 rounded-xl border border-slate-200 hover:border-[#006e74] hover:shadow-lg transition-all bg-white",children:[s.jsx("div",{className:"w-11 h-11 rounded-lg bg-teal-50 flex items-center justify-center mb-4 group-hover:bg-[#006e74] transition-colors",children:s.jsx(e.icon,{className:"w-5 h-5 text-[#006e74] group-hover:text-white transition-colors"})}),s.jsx("h3",{className:"font-semibold text-slate-900 mb-2",children:e.title}),s.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:e.desc})]},e.title))})]})})}const HLe=[{num:"01",title:"Patient starts the AI assessment",desc:"Embed your branded TriageFlow link on your website, Google Business profile or social. Patients answer a short, adaptive set of questions."},{num:"02",title:"AI generates a clinical summary",desc:"Our AI produces a preliminary diagnosis, red-flag alerts and a personalised 3-phase treatment plan â instantly visible to you and the patient."},{num:"03",title:"Lead lands in your pipeline",desc:"A new lead is created with full context, clinician notes and a PDF report. Your team is notified and can reply in seconds."},{num:"04",title:"Convert to a booked appointment",desc:"Reply from your connected Gmail, share your booking link, and watch conversion rates climb."}];function WLe(){return s.jsx("section",{id:"how-it-works",className:"py-20 md:py-28 bg-slate-50",children:s.jsxs("div",{className:"max-w-6xl mx-auto px-4 md:px-6",children:[s.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16",children:[s.jsx("div",{className:"text-sm font-semibold text-[#006e74] uppercase tracking-wider mb-3",children:"How it works"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-4",children:"From first click to first appointment"}),s.jsx("p",{className:"text-lg text-slate-600",children:"A smoother patient journey and less admin for your team."})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:HLe.map(e=>s.jsxs("div",{className:"flex gap-5 p-6 rounded-xl bg-white border border-slate-200 shadow-sm",children:[s.jsx("div",{className:"flex-shrink-0 text-3xl font-bold text-[#006e74] tabular-nums",children:e.num}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-semibold text-slate-900 text-lg mb-2",children:e.title}),s.jsx("p",{className:"text-slate-600 leading-relaxed",children:e.desc})]})]},e.num))})]})})}const VLe=[{icon:jN,stat:"3Ã",title:"Higher lead conversion",desc:"Respond faster with context already gathered. Clinics using AI triage consistently outperform traditional forms."},{icon:Ty,stat:"80%",title:"Less admin time",desc:"Automated lead capture, clinical summaries and email logging free up your reception team for high-value work."},{icon:XX,stat:"5â
",title:"Better patient experience",desc:"Patients feel heard before they arrive. Give them an immediate, personalised plan that builds trust."}];
vendor: 4,247 bytes, line 871
871function GLe(){return s.jsx("section",{id:"benefits",className:"py-20 md:py-28 bg-white",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6",children:[s.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16",children:[s.jsx("div",{className:"text-sm font-semibold text-[#006e74] uppercase tracking-wider mb-3",children:"Why clinics love TriageFlow"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-4",children:"Built for the way modern MSK clinics work"})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:VLe.map(e=>s.jsxs("div",{className:"p-8 rounded-xl bg-gradient-to-br from-slate-50 to-white border border-slate-200",children:[s.jsx("div",{className:"w-12 h-12 rounded-lg bg-[#006e74] flex items-center justify-center mb-5",children:s.jsx(e.icon,{className:"w-6 h-6 text-white"})}),s.jsx("div",{className:"text-4xl font-bold text-[#006e74] mb-2",children:e.stat}),s.jsx("h3",{className:"font-semibold text-slate-900 text-lg mb-2",children:e.title}),s.jsx("p",{className:"text-slate-600 leading-relaxed",children:e.desc})]},e.title))})]})})}const KLe=[{name:"Starter",price:"£49",period:"/month",desc:"For single-location clinics getting started with AI triage.",features:["Up to 100 leads/month","1 clinic location","AI Symptoms Assessment","Lead pipeline","Email support"],cta:"Start free trial",featured:!1},{name:"Growth",price:"£149",period:"/month",desc:"For growing clinics with multiple practitioners.",features:["Unlimited leads","Up to 5 locations","Gmail integration","Team collaboration","Custom email templates","Priority support"],cta:"Start free trial",featured:!0},{name:"Enterprise",price:"Custom",period:"",desc:"For multi-site groups needing custom integrations.",features:["Everything in Growth","Unlimited locations","Custom integrations","Dedicated account manager","SLA & onboarding","Training included"],cta:"Contact sales",featured:!1}];function YLe(){return s.jsx("section",{id:"pricing",className:"py-20 md:py-28 bg-slate-50",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6",children:[s.jsxs("div",{className:"text-center max-w-2xl mx-auto mb-16",children:[s.jsx("div",{className:"text-sm font-semibold text-[#006e74] uppercase tracking-wider mb-3",children:"Pricing"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-4",children:"Simple pricing that scales with your clinic"}),s.jsx("p",{className:"text-lg text-slate-600",children:"14-day free trial on all plans. No credit card required."})]}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6 max-w-5xl mx-auto",children:KLe.map(e=>s.jsxs("div",{className:`rounded-2xl p-8 border ${e.featured?"border-[#006e74] bg-white shadow-xl ring-2 ring-[#006e74]/20 relative":"border-slate-200 bg-white"}`,children:[e.featured&&s.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2 bg-[#006e74] text-white text-xs font-semibold px-3 py-1 rounded-full",children:"Most popular"}),s.jsx("h3",{className:"font-bold text-xl text-slate-900 mb-2",children:e.name}),s.jsxs("div",{className:"flex items-baseline gap-1 mb-3",children:[s.jsx("span",{className:"text-4xl font-bold text-slate-900",children:e.price}),s.jsx("span",{className:"text-slate-500",children:e.period})]}),s.jsx("p",{className:"text-sm text-slate-600 mb-6 min-h-[40px]",children:e.desc}),s.jsx(qr,{to:"/Register",children:s.jsx(be,{className:`w-full mb-6 ${e.featured?"bg-[#006e74] hover:bg-[#005560]":"bg-slate-900 hover:bg-slate-800"}`,children:e.cta})}),s.jsx("ul",{className:"space-y-3",children:e.features.map(t=>s.jsxs("li",{className:"flex items-start gap-2 text-sm text-slate-700",children:[s.jsx(Hr,{className:"w-4 h-4 text-[#006e74] flex-shrink-0 mt-0.5"}),s.jsx("span",{children:t})]},t))})]},e.name))})]})})}var u0="Collapsible",[QLe,gK]=di(u0),[XLe,hP]=QLe(u0),vK=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...l}=e,[c,u]=Wr({prop:r,defaultProp:i??!1,onChange:o,caller:u0});return s.jsx(XLe,{scope:n,disabled:a,contentId:Ri(),open:c,onOpenToggle:E.useCallback(()=>u(f=>!f),[u]),children:s.jsx(ut.div,{"data-state":mP(c),"data-disabled":a?"":void 0,...l,ref:t})})});vK.displayName=u0;var yK="CollapsibleTrigger",xK=E.forwardRef((e,t)=>
vendor: 4,209 bytes, line 871
871{const{__scopeCollapsible:n,...r}=e,i=hP(yK,n);return s.jsx(ut.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":mP(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ge(e.onClick,i.onOpenToggle)})});xK.displayName=yK;var pP="CollapsibleContent",bK=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=hP(pP,e.__scopeCollapsible);return s.jsx(Bi,{present:n||i.open,children:({present:a})=>s.jsx(ZLe,{...r,ref:t,present:a})})});bK.displayName=pP;var ZLe=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=hP(pP,n),[l,c]=E.useState(r),u=E.useRef(null),f=At(t,u),d=E.useRef(0),p=d.current,m=E.useRef(0),b=m.current,v=o.open||l,y=E.useRef(v),x=E.useRef(void 0);return E.useEffect(()=>{const _=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(_)},[]),ar(()=>{const _=u.current;if(_){x.current=x.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const S=_.getBoundingClientRect();d.current=S.height,m.current=S.width,y.current||(_.style.transitionDuration=x.current.transitionDuration,_.style.animationName=x.current.animationName),c(r)}},[o.open,r]),s.jsx(ut.div,{"data-state":mP(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&i})});function mP(e){return e?"open":"closed"}var JLe=vK,e5e=xK,t5e=bK,fa="Accordion",n5e=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[gP,r5e,i5e]=ix(fa),[d0]=di(fa,[i5e,gK]),vP=gK(),wK=ne.forwardRef((e,t)=>{const{type:n,...r}=e,i=r,a=r;return s.jsx(gP.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?s.jsx(l5e,{...a,ref:t}):s.jsx(s5e,{...i,ref:t})})});wK.displayName=fa;var[_K,a5e]=d0(fa),[SK,o5e]=d0(fa,{collapsible:!1}),s5e=ne.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[l,c]=Wr({prop:n,defaultProp:r??"",onChange:i,caller:fa});return s.jsx(_K,{scope:e.__scopeAccordion,value:ne.useMemo(()=>l?[l]:[],[l]),onItemOpen:c,onItemClose:ne.useCallback(()=>a&&c(""),[a,c]),children:s.jsx(SK,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(jK,{...o,ref:t})})})}),l5e=ne.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,l]=Wr({prop:n,defaultProp:r??[],onChange:i,caller:fa}),c=ne.useCallback(f=>l((d=[])=>[...d,f]),[l]),u=ne.useCallback(f=>l((d=[])=>d.filter(p=>p!==f)),[l]);return s.jsx(_K,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:u,children:s.jsx(SK,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(jK,{...a,ref:t})})})}),[c5e,f0]=d0(fa),jK=ne.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:a="vertical",...o}=e,l=ne.useRef(null),c=At(l,t),u=r5e(n),d=wp(i)==="ltr",p=Ge(e.onKeyDown,m=>{var P;if(!n5e.includes(m.key))return;const b=m.target,v=u().filter(L=>{var T;return!((T=L.ref.current)!=null&&T.disabled)}),y=v.findIndex(L=>L.ref.current===b),x=v.length;if(y===-1)return;m.preventDefault();let _=y;const S=0,w=x-1,N=()=>{_=y+1,_>w&&(_=S)},k=()=>{_=y-1,_<S&&(_=w)};switch(m.key){case"Home":_=S;break;case"End":_=w;break;case"ArrowRight":a==="horizontal"&&(d?N():k());break;case"ArrowDown":a==="vertical"&&N();break;case"ArrowLeft":a==="horizontal"&&(d?k():N());break;case"ArrowUp":a==="vertical"&&k();break}const C=_%x;(P=v[C].ref.current)==null||P.focus()});return s.jsx(c5e,{scope:n,disabled:r,direction:i,orientation:a,children:s.jsx(gP.Slot,{scope:n,children:s.jsx(ut.div,{...o,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),Ay="AccordionItem",[u5e,yP]=d0(Ay),NK=ne.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...i}=e,a=f0(Ay,n),o=a5e(Ay,n),l=vP(n),c=Ri(),u=r&&o.value.includes(r)||!1,f=a.disabled||e.disabled;return s.jsx(u5e,{scope:n,open:u,disabled:f,triggerId:c,children:s.jsx(JLe,{"data-orientation":a.orientation,"data-state":PK(u),...l,...i,ref:t,disabled:f,open:u,onOpenChange:d=>{d?o.onItemOpen(r):o.onItemClose(r)}})})});NK.displayName=Ay;var EK="AccordionHeader",kK=ne.forwardRef((e,t)=>
871{const{__scopeAccordion:n,...r}=e,i=f0(fa,n),a=yP(EK,n);return s.jsx(ut.h3,{"data-orientation":i.orientation,"data-state":PK(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});kK.displayName=EK;var oO="AccordionTrigger",OK=ne.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=f0(fa,n),a=yP(oO,n),o=o5e(oO,n),l=vP(n);return s.jsx(gP.ItemSlot,{scope:n,children:s.jsx(e5e,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...l,...r,ref:t})})});OK.displayName=oO;var CK="AccordionContent",AK=ne.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,i=f0(fa,n),a=yP(CK,n),o=vP(n);return s.jsx(t5e,{role:"region","aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});AK.displayName=CK;function PK(e){return e?"open":"closed"}var d5e=wK,f5e=NK,h5e=kK,TK=OK,RK=AK;const p5e=d5e,IK=E.forwardRef(({className:e,...t},n)=>s.jsx(f5e,{ref:n,className:et("border-b",e),...t}));IK.displayName="AccordionItem";const MK=E.forwardRef(({className:e,children:t,...n},r)=>s.jsx(h5e,{className:"flex",children:s.jsxs(TK,{ref:r,className:et("flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline text-left [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,s.jsx(Or,{className:"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200"})]})}));MK.displayName=TK.displayName;const DK=E.forwardRef(({className:e,children:t,...n},r)=>s.jsx(RK,{ref:r,className:"overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:s.jsx("div",{className:et("pb-4 pt-0",e),children:t})}));DK.displayName=RK.displayName;const m5e=[{q:"How does the AI symptoms assessment work?",a:"Patients complete a short, adaptive questionnaire. Our AI reviews their responses against clinical red flags, generates a preliminary diagnosis and creates a personalised 3-phase treatment plan. Everything is sent straight to your team as a new lead with a full PDF report."},{q:"Can I use my own clinic branding?",a:"Yes. You can upload your logo, set your primary colour, customise email templates, and add your booking URL. Patients see your brand throughout the journey."},{q:"Does TriageFlow work with my existing systems?",a:"TriageFlow connects to Gmail out of the box. You can share your existing booking link (Cliniko, Jane, Calendly, etc.) and we're continuously adding integrations."},{q:"Is my patient data secure?",a:"Yes. All data is encrypted in transit and at rest. We use role-based access control, and all team members authenticate with verified email addresses. The platform is built with healthcare compliance in mind."},{q:"How long does setup take?",a:"Most clinics are live in under an hour. Sign up, invite your team, customise your lead form, connect Gmail, and share your triage link."},{q:"Do you offer a free trial?",a:"Yes â every plan comes with a 14-day free trial. No credit card required, cancel anytime."}];function g5e(){return s.jsx("section",{id:"faq",className:"py-20 md:py-28 bg-white",children:s.jsxs("div",{className:"max-w-3xl mx-auto px-4 md:px-6",children:[s.jsxs("div",{className:"text-center mb-12",children:[s.jsx("div",{className:"text-sm font-semibold text-[#006e74] uppercase tracking-wider mb-3",children:"FAQ"}),s.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-4",children:"Frequently asked questions"})]}),s.jsx(p5e,{type:"single",collapsible:!0,className:"w-full",children:m5e.map((e,t)=>s.jsxs(IK,{value:`item-${t}`,children:[s.jsx(MK,{className:"text-left font-semibold text-slate-900",children:e.q}),s.jsx(DK,{className:"text-slate-600 leading-relaxed",children:e.a})]},t))})]})})}function v5e(){return s.jsx("section",{className:"py-20 md:py-28 bg-gradient-to-br from-[#006e74] to-teal-700 text-white",children:s.jsxs("div",{className:"max-w-4xl mx-auto px-4 md:px-6 text-center",children:[s.jsx("h2",{className:"text-3xl md:text-5xl font-bold mb-6 leading-tight",children:"Ready to turn more enquiries into appointments?"}),s.jsx("p",{className:"text-lg md:text-xl text-white/90 mb-8 max-w-2xl mx-auto",children:"Join forward-thinking clinics using TriageFlow to deliver better patient experiences and grow bookings."}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[s.jsx(qr,{to:"/Register",children:s.jsxs(be,{size:"lg",className:"bg-white text-[#006e74] hover:bg-slate-100 w-full sm:w-auto",children:["Start your free trial",s.jsx(fB,{className:"w-4 h-4 ml-2"})]})}),s.jsx("a",{href:"mailto:[email protected]",children:s.jsx(be,{size:"lg",variant:"outline",className:"border-white/40 bg-white/10 text-white hover:bg-white/20 w-full sm:w-auto",children:"Talk to sales"})})]})]})})}const y5e="https://media.base44.com/images/public/696f865eaed283c6951e030b/02c79c1b1_TriageFlowAILogo.jpg";function x5e(){return s.jsx("footer",{className:"bg-slate-900 text-slate-400 py-12",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6",children:[s.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start gap-8",children:[s.jsxs("div",{children:[s.jsx("div",{className:"mb-3 bg-white rounded-lg p-2 inline-block",children:s.jsx("img",{src:y5e,alt:"TriageFlow",className:"h-8 w-auto"})}),s.jsx("p",{className:"text-sm max-w-xs",children:"AI-powered lead management and symptoms assessment for MSK clinics."})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-8 text-sm",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-white font-semibold mb-3",children:"Product"}),s.jsxs("ul",{className:"space-y-2",children:[s.jsx("li",{children:s.jsx("a",{href:"#features",className:"hover:text-white",children:"Features"})}),s.jsx("li",{children:s.jsx("a",{href:"#how-it-works",className:"hover:text-white",children:"How it works"})}),s.jsx("li",{children:s.jsx("a",{href:"#pricing",className:"hover:text-white",children:"Pricing"})})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-white font-semibold mb-3",children:"Company"}),s.jsxs("ul",{className:"space-y-2",children:[s.jsx("li",{children:s.jsx("a",{href:"#faq",className:"hover:text-white",children:"FAQ"})}),s.jsx("li",{children:s.jsx("a",{href:"mailto:[email protected]",className:"hover:text-white",children:"Contact"})})]})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-white font-semibold mb-3",children:"Legal"}),s.jsxs("ul",{className:"space-y-2",children:[s.jsx("li",{children:s.jsx("a",{href:"#",className:"hover:text-white",children:"Privacy"})}),s.jsx("li",{children:s.jsx("a",{href:"#",className:"hover:text-white",children:"Terms"})})]})]})]})]}),s.jsxs("div",{className:"border-t border-slate-800 mt-10 pt-6 text-xs text-slate-500 flex flex-col md:flex-row justify-between gap-2",children:[s.jsxs("div",{children:["© ",new Date().getFullYear()," TriageFlow. All rights reserved."]}),s.jsx("div",{children:"Made for MSK clinics."})]})]})})}function b5e(){const e=mr(),{isAuthenticated:t,isLoadingAuth:n,user:r}=$O();return E.useEffect(()=>{document.title="TriageFlow â AI lead management for MSK clinics"},[]),E.useEffect(()=>{if(n||!t||!r)return;(["admin","clinic","team_member","practitioner"].includes(r.app_role)||r.role==="admin")&&e("/ClinicDashboard",{replace:!0})},[t,n,r,e]),s.jsxs("div",{className:"min-h-screen bg-white text-slate-900",children:[s.jsx(BLe,{}),s.jsxs("main",{children:[s.jsx(qLe,{}),s.jsx(zLe,{}),s.jsx(WLe,{}),s.jsx(GLe,{}),s.jsx(YLe,{}),s.jsx(g5e,{}),s.jsx(v5e,{})]}),s.jsx(x5e,{})]})}function LK({clinic:e}){if(!e)return s.jsx("div",{className:"bg-white border-b border-slate-200 h-16"});const t=e.phone_number?`tel:${e.phone_number.replace(/\s/g,"")}`:null;return s.jsx("header",{className:"bg-white border-b border-slate-200 lg:sticky lg:top-0 z-40 shadow-sm",children:s.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 h-16 flex items-center justify-between gap-4",children:[s.jsx("a",{href:e.website_url||"#",target:e.website_url?"_blank":void 0,rel:e.website_url?"noopener noreferrer":void 0,className:"flex items-center gap-3 min-w-0",children:e.logo_url?s.jsx("img",{src:e.logo_url,alt:e.name,className:"h-10 md:h-12 object-contain"}):s.jsx("span",{className:"text-lg md:text-xl font-bold text-slate-900 truncate",children:e.name})}),t&&s.jsxs("a",{href:t,className:"inline-flex items-center gap-2 text-[#006e74] hover:text-[#005560] font-semibold text-sm md:text-base",children:[s.jsx(Ai,{className:"w-4 h-4 md:w-5 md:h-5"}),s.jsx("span",{className:"hidden sm:inline",children:e.phone_number}),s.jsx("span",{className:"sm:hidden",children:"Call"})]})]})})}function $K({clinic:e}){const t=new Date().getFullYear(),n=e!=null&&e.phone_number?`tel:${e.phone_number.replace(/\s/g,"")}`:null;return s.jsx("footer",{className:"mt-12 border-t border-slate-200 bg-slate-50",children:s.jsx("div",{className:"max-w-7xl mx-auto px-5 py-8",children:s.jsxs("div",{className:"flex flex-col md:flex-row md:items-start md:justify-between gap-6 text-sm",children:[s.jsxs("div",{className:"text-slate-600 leading-relaxed",children:[s.jsx("span",{className:"font-semibold text-slate-900",children:(e==null?void 0:e.name)||"Apollo Clinics"}),[e==null?void 0:e.address,e==null?void 0:e.phone_number,e==null?void 0:e.email].filter(
871Boolean).map((r,i)=>s.jsxs(ne.Fragment,{children:[s.jsx("span",{className:"mx-2 text-slate-400",children:"·"}),r===(e==null?void 0:e.phone_number)?s.jsx("a",{href:n,className:"hover:underline",children:r}):r===(e==null?void 0:e.email)?s.jsx("a",{href:`mailto:${e.email}`,className:"hover:underline break-all",children:r}):s.jsx("span",{children:r})]},i))]}),s.jsxs("div",{className:"md:text-right",children:[s.jsxs("div",{className:"flex flex-wrap md:justify-end gap-x-5 gap-y-2 text-slate-600",children:[s.jsx("a",{href:e!=null&&e.website_url?`${e.website_url.replace(/\/$/,"")}/privacy-policy`:"#",target:e!=null&&e.website_url?"_blank":void 0,rel:e!=null&&e.website_url?"noopener noreferrer":void 0,className:"hover:text-slate-900 hover:underline",children:"Privacy Policy"}),s.jsx("a",{href:e!=null&&e.website_url?`${e.website_url.replace(/\/$/,"")}/terms-of-use`:"#",target:e!=null&&e.website_url?"_blank":void 0,rel:e!=null&&e.website_url?"noopener noreferrer":void 0,className:"hover:text-slate-900 hover:underline",children:"Terms of Use"})]}),s.jsxs("p",{className:"text-xs text-slate-500 mt-2",children:["© ",t," ",(e==null?void 0:e.name)||"Apollo Clinics",". All rights reserved."]})]})]})})})}function w5e({locations:e=[],value:t,onChange:n,isRequired:r=!1,hasError:i=!1}){return!e||e.length===0?null:s.jsxs("div",{id:"question-clinic_location",className:"w-full mb-4 border-b border-gray-200 pb-5 pt-5",children:[s.jsxs(Ee,{className:"mb-3 block text-sm md:text-base font-semibold",children:["My nearest clinic is",r&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),i&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"Please select your nearest clinic"}),s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:"Select the clinic location closest to you."}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:e.map(a=>{const o=t===a.slug;return s.jsxs("label",{className:`flex items-start gap-3 p-3 rounded-lg cursor-pointer transition-all border ${o?"bg-teal-50 border-[#006e74]":"bg-white border-slate-300 hover:border-slate-400"}`,children:[s.jsx("input",{type:"radio",name:"clinic_location",value:a.slug,checked:o,onChange:()=>n(a.slug),className:"sr-only"}),s.jsx("div",{className:`flex-shrink-0 w-5 h-5 rounded-full border-2 flex items-center justify-center mt-0.5 ${o?"border-[#006e74]":"border-slate-300"}`,children:o&&s.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-[#006e74]"})}),s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"text-sm font-medium text-slate-800 flex items-center gap-1",children:[s.jsx(Li,{className:"w-3.5 h-3.5 text-[#006e74]"}),a.name]}),a.address&&s.jsx("div",{className:"text-xs text-slate-500 truncate mt-0.5",children:a.address})]})]},a.slug)})})]})}const _5e={BUPA:"https://media.base44.com/images/public/696f865eaed283c6951e030b/63c0eb1d9_BUPA.png",AXA:"https://media.base44.com/images/public/696f865eaed283c6951e030b/f48e9b1e7_ApolloClinicsAxaOsteopathyLogo.png",WPA:"https://media.base44.com/images/public/696f865eaed283c6951e030b/298a80777_wpa.png",Vitality:"https://media.base44.com/images/public/696f865eaed283c6951e030b/62c157fed_Vitality.png",Cigna:"https://media.base44.com/images/public/696f865eaed283c6951e030b/eba394156_CignaLogoforApolloClinicsSevenoaks.png",Aviva:"https://media.base44.com/images/public/696f865eaed283c6951e030b/28bfecd6f_AvivaHealth.png"};function S5e({name:e,size:t="md",className:n=""}){const r={sm:"h-7",md:"h-9",lg:"h-12"},i=_5e[e],a=/\bh-\d/.test(n);return i?s.jsx("img",{src:i,alt:e,title:e,className:`${a?"":r[t]||r.md} w-auto object-contain ${n}`,loading:"lazy"}):s.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-slate-100 text-slate-700 text-[11px] font-medium border border-slate-200 whitespace-nowrap ${n}`,title:e,children:[s.jsx(_B,{className:"w-3 h-3"}),e||"Other"]})}function j5e({clinic:e,teamMembers:t=[]}){var u,f,d;if(!e)return null;const n=Array.isArray(e.locations)?e.locations:[],r=n.length>0?n.filter(p=>p&&(p.address||p.phone||p.email||p.name)):[{name:e.name||"",address:e.address||"",phone:e.phone_number||"",email:e.email||""}],i=e.booking_url||null,a=((u=r.find(p=>p.phone))==null?void 0:u.phone)||e.phone_number||null,o=a?`tel:${a.replace(/\s/g,"")}`:null,l=r.filter(p=>p.address);let c=null;if(l.length===1)c=`https://www.google.com/maps?q=${encodeURIComponent(l[0].address)}&output=embed`;else if(l.length>1){const[p,m,...b]=l;c=`https://www.google.com/maps?${new URLSearchParams({saddr:p.address,daddr:[m.address,...b.map(y=>y.address)].join(" to:"),output:"embed"}).toString()}`}return s.jsx("section",{className:"bg-white rounded-xl shadow-md border border-slate-200 overflow-hidden",children:s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2",children:[s.jsxs("div",{className:"p-6 md:p-8 space-y-6 order-2 lg:order-1",children:[s.jsxs("div",{children:[e.logo_url?s.jsx("img",{src:e.logo_url,alt:e.name,className:"h-14 object-contain mb-3"}):null,s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900",children:e.name}),e.about&&s.jsx("p",{className:"text-base text-slate-600 leading-relaxed mt-2",children:e.about})]}),((f=e.treatments_provided)==null?void 0:f.length)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"font-semibold text-slate-900 text-sm mb-3 flex items-center gap-1.5",children:[s.jsx(Ry,{className:"w-4 h-4 text-[#006e74]"}),"Treatments Provided"]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:e.treatments_provided.map(p=>s.jsx("span",{className:"px-3 py-1.5 bg-teal-50 text-[#006e74] rounded-full text-xs md:text-sm font-medium",children:p},p))})]}),((d=e.health_insurance_covered)==null?void 0:d.length)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"font-semibold text-slate-900 text-sm mb-3 flex items-center gap-1.5",children:[s.jsx(_B,{className:"w-4 h-4 text-[#006e74]"}),"Health Insurance Covered"]}),s.jsx("div",{className:"flex flex-wrap items-center gap-4",children:e.health_insurance_covered.map(p=>s.jsx(S5e,{name:p,size:"md"},p))})]}),(t==null?void 0:t.length)>0&&s.jsxs("div",{children:[s.jsxs("h4",{className:"font-semibold text-slate-900 text-sm mb-3 flex items-center gap-1.5",children:[s.jsx(qu,{className:"w-4 h-4 text-[#006e74]"}),"Meet the Team"]}),s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-5 ga
871p-3",children:t.map(p=>{var m,b;return s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"w-full aspect-square rounded-full overflow-hidden bg-slate-100 mb-1.5",children:p.profile_image_url?s.jsx("img",{src:p.profile_image_url,alt:`${p.first_name} ${p.last_name||""}`,className:"w-full h-full object-cover"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-400 text-lg font-medium",children:(((m=p.first_name)==null?void 0:m[0])||"")+(((b=p.last_name)==null?void 0:b[0])||"")})}),s.jsxs("p",{className:"text-xs font-semibold text-slate-900 leading-tight",children:[p.first_name," ",p.last_name]}),p.job_title&&s.jsx("p",{className:"text-[11px] text-slate-500 leading-tight mt-0.5",children:p.job_title})]},p.id)})})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-slate-900 text-sm mb-3",children:r.length>1?"Our Locations":"Contact"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:r.map((p,m)=>s.jsxs("div",{className:"rounded-lg border border-slate-200 bg-slate-50/60 p-3 space-y-1.5 text-sm",children:[p.name&&s.jsxs("div",{className:"font-semibold text-slate-900 flex items-center gap-1.5",children:[s.jsx(Li,{className:"w-4 h-4 text-[#006e74] flex-shrink-0"}),p.name]}),p.address&&s.jsx("div",{className:"text-slate-600 text-xs leading-relaxed",children:p.address}),p.phone&&s.jsxs("div",{className:"flex items-center gap-1.5 text-slate-700",children:[s.jsx(Ai,{className:"w-3.5 h-3.5 text-[#006e74] flex-shrink-0"}),s.jsx("a",{href:`tel:${p.phone.replace(/\s/g,"")}`,className:"hover:underline",children:p.phone})]}),p.email&&s.jsxs("div",{className:"flex items-center gap-1.5 text-slate-700",children:[s.jsx(hn,{className:"w-3.5 h-3.5 text-[#006e74] flex-shrink-0"}),s.jsx("a",{href:`mailto:${p.email}`,className:"hover:underline break-all",children:p.email})]})]},p.slug||`${p.name||"loc"}-${m}`))}),e.website_url&&s.jsxs("div",{className:"flex items-start gap-2 text-slate-700 text-sm mt-3",children:[s.jsx(dO,{className:"w-4 h-4 mt-0.5 text-[#006e74] flex-shrink-0"}),s.jsx("a",{href:e.website_url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline break-all",children:e.website_url.replace(/^https?:\/\//,"")})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 pt-2",children:[i&&s.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:s.jsxs(be,{className:"w-full bg-[#006e74] hover:bg-[#005560]",children:[s.jsx(au,{className:"w-4 h-4 mr-2"}),"Book Appointment"]})}),o&&s.jsx("a",{href:o,className:"flex-1",children:s.jsxs(be,{variant:"outline",className:"w-full border-[#006e74] text-[#006e74] hover:bg-teal-50",children:[s.jsx(Ai,{className:"w-4 h-4 mr-2"}),"Call Us ",a]})})]})]}),s.jsx("div",{className:"bg-slate-100 min-h-[250px] lg:min-h-full order-1 lg:order-2",children:c?s.jsx("iframe",{src:c,className:"w-full h-full min-h-[300px] lg:min-h-[500px] border-0",title:"Clinic locations",loading:"lazy"}):s.jsx("div",{className:"w-full h-full flex items-center justify-center text-slate-400 p-8",children:s.jsx(Li,{className:"w-10 h-10"})})})]})})}function N5e({clinic:e}){if(!e)return null;const t=e.phone_number?`tel:${e.phone_number.replace(/\s/g,"")}`:null,n=e.booking_url||null;return!t&&!n?null:s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"h-24 lg:hidden","aria-hidden":"true"}),s.jsx("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-white border-t border-slate-200 shadow-[0_-2px_10px_rgba(0,0,0,0.06)] lg:hidden",children:s.jsxs("div",{className:"grid grid-cols-2 gap-2 p-3",children:[n?s.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:s.jsxs(be,{className:"w-full bg-[#006e74] hover:bg-[#005560] h-11",children:[s.jsx(au,{className:"w-4 h-4 mr-2"}),"Book"]})}):s.jsx("span",{}),t?s.jsx("a",{href:t,children:s.jsxs(be,{variant:"outline",className:"w-full border-[#006e74] text-[#006e74] hover:bg-teal-50 h-11",children:[s.jsx(Ai,{className:"w-4 h-4 mr-2"}),"Call Us"]})}):s.jsx("span",{})]})})]})}function E5e({aiResults:e,clinic:t,teamMembers:n,selectedLocationSlug:r}){var p;const i=e.is_emergency===!0||((p=e.red_flags)==null?void 0:p.some(m=>(m==null?void 0:m.toLowerCase().includes("111"))||(m==null?void 0:m.toLowerCase().includes("a&e"))||(m==null?void 0:m.toLowerCase().includes("a & e"))||(m==null?void 0:m.toLowerCase().includes("emergency"))||(m==null?void 0:m.toLowerCase().includes("urgent medical"))||(m==null?void 0:m.toLowerCase().includes("seek immediate"))))||/A&E|999|111|emergency|seek immediate|urgent medical/i.test(e.brief_diagnosis||""),a=!i&&e.urgent_gp_review_recommended===!0,o=i||a,l=Array.isArray(t==null?void 0:t.locations)?t.locations.find(m=>(m.slug||"").toLowerCase()===(r||"").toLowerCase())||t.locations[0]:null,c=(l==null?void 0:l.phone)||(t==null?void 0:t.phone_number)||"",u=c?`tel:${c.replace(/\s/g,"")}`:null,f=(t==null?void 0:t.booking_url)||null,d=(m="onTeal")=>{if(i){const b="w-full bg-red-600 hover:bg-red-700 text-white font-semibold",v=m==="onTeal"?"w-full bg-white/10 border-2 border-white text-white hover:bg-white/20 font-semibold":"w-full border-red-600 text-red-600 hover:bg-red-50 font-semibold";return s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsx("a",{href:"tel:999",className:"flex-1",children:s.jsxs(be,{className:b,children:[s.jsx(Ai,{className:"w-5 h-5 mr-2"}),"Call 999 Now"]})}),s.jsx("a",{href:"tel:111",className:"flex-1",children:s.jsxs(be,{variant:m==="onTeal"?"default":"outline",className:v,children:[s.jsx(Ai,{className:"w-5 h-5 mr-2"}),"Call NHS 111"]})})]})}return m==="onTeal"?s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[f&&s.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:s.jsxs(be,{className:"w-full bg-white text-[#006e74] hover:bg-slate-100 font-semibold",children:[s.jsx(au,{className:"w-5 h-5 mr-2"}),"Book Appointment"]})}),u&&s.jsx("a",{href:u,className:"flex-1",children:s.jsxs(be,{className:"w-full bg-white/10 border-2 border-white text-white hover:bg-white/20 font-semibold",children:[s.jsx(Ai,{className:"w-5 h-5 mr-2"}),"Call Us ",c||""]})})]}):s.jsxs("div",{className:"flex flex-col sm:flex-row justify-center gap-3 max-w-xl mx-auto",children:[f&&s.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",className:"flex-1",children:s.jsxs(be,{className:"w-full bg-[#006e74] hover:bg-[#005560]",children:[s.jsx(au,{className:"w-4 h-4 mr-2"}),"Book Appointment"]})}),u&&s.jsx("a",{href:u,className:"flex-1",children:s.jsxs(be,{variant:"outline",className:"w-full border-[#006e74] text-[#006e74] hover:bg-teal-50",children:[s.jsx(Ai,{className:"w-4 h-4 mr-2"}),"Call Us ",c||""]})})]})};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-slate-50 to-white",children:[s.jsx(LK,{clinic:t}),s.jsxs("div",{className:"max-w-7xl mx-auto p-5",children:[s.jsxs("div",{className:"text-center pt-6 pb-6 md:pb-8",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 bg-gradient-to-br from-teal-500 to-[#006e74] rounded-full mb-4 shadow-lg",children:s.jsx(oa,{className:"w-8 h-8 text-white"})}),s.jsx("h1",{className:"text-3xl md:text-4xl font-bold text-slate-900 mb-3",children:"Your Personalized Assessment"}),s.jsx("p",{className:"text-base md:text-lg text-slate-600 max-w-2xl mx-auto",children:"We've analyzed your symptoms to help you understand what's happening and how we
871can support your recovery."})]}),s.jsx("div",{className:"max-w-3xl mx-auto",children:s.jsxs("div",{className:"space-y-8",children:[(i||a||Array.isArray(e.red_flags)&&e.red_flags.length>0)&&s.jsxs("div",{className:`border-2 rounded-xl p-6 shadow-lg ${i?"bg-red-50 border-red-400":"bg-amber-50 border-amber-400"}`,children:[s.jsxs("h3",{className:`text-xl font-bold mb-4 flex items-center gap-2 ${i?"text-red-900":"text-amber-900"}`,children:[s.jsx("span",{className:"text-2xl",children:"â ï¸"}),i?"Urgent â Please Seek Medical Attention Now":a?"Please See Your GP Before Starting Treatment":"Important Health Alerts"]}),i?s.jsx("p",{className:"text-base mb-4 text-red-900 whitespace-pre-wrap",children:e.emergency_reason||e.brief_diagnosis||"Your responses suggest symptoms that need urgent medical attention."}):a?s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-base mb-4 text-amber-900 whitespace-pre-wrap",children:e.urgent_gp_review_reason||"Some of the things you mentioned are worth getting checked by your GP before starting physiotherapy or osteopathy, so they can arrange any tests that might be helpful."}),Array.isArray(e.red_flags)&&e.red_flags.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-base mb-2 text-amber-900",children:"We noted the following:"}),s.jsx("ul",{className:"space-y-2 mb-4 list-disc list-inside text-amber-900",children:e.red_flags.map((m,b)=>s.jsx("li",{className:"text-base",children:m},b))})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-base mb-4 text-amber-900",children:"You mentioned the following symptoms which could be indicative of a more serious and urgent problem:"}),s.jsx("ul",{className:"space-y-2 mb-6 list-disc list-inside text-amber-900",children:e.red_flags.map((m,b)=>s.jsx("li",{className:"text-base",children:m},b))})]}),s.jsx("div",{className:`p-5 rounded-lg ${i?"bg-red-100/50":"bg-amber-100/50"}`,children:s.jsxs("p",{className:`text-base ${i?"text-red-900":"text-amber-900"}`,children:["This is an AI overview only and is not a replacement for professional clinical advice."," ",i?"Please call 999 or attend your nearest A&E department immediately. Do NOT wait for a physiotherapy or osteopathy appointment.":a?"Please book an urgent GP appointment in the next 48 hours. Once they've reviewed you, we'll be happy to support your recovery.":"One of our clinicians will review your information and contact you, however if you are concerned or need urgent attention, please contact your GP, NHS 111, or attend the nearest emergency department."]})}),i&&s.jsx("div",{className:"mt-4",children:d("onRed")})]}),s.jsxs("div",{className:"bg-white rounded-xl shadow-md border border-slate-200 p-6 md:p-8",children:[s.jsxs("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900 mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center",children:s.jsx("span",{className:"text-2xl",children:"ð"})}),"Understanding Your Symptoms"]}),s.jsx("div",{className:"prose prose-slate max-w-none",children:s.jsx("p",{className:"text-base md:text-lg text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.overview})})]}),s.jsxs("div",{className:"bg-white rounded-xl shadow-md border border-slate-200 p-6 md:p-8",children:[s.jsxs("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900 mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-teal-100 rounded-lg flex items-center justify-center",children:s.jsx(Ry,{className:"w-6 h-6 text-[#006e74]"})}),"Assessment Summary"]}),s.jsx("div",{className:"prose prose-slate max-w-none",children:s.jsx("p",{className:"text-base md:text-lg text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.preliminary_assessment})}),e.return_to_activity_goal&&s.jsxs("div",{className:"mt-6 pt-6 border-t border-slate-200",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:"Your Goal:"}),s.jsxs("p",{className:"text-base text-slate-700 italic",children:['"',e.return_to_activity_goal,'"']})]}),e.activities_limited&&e.activities_limited.length>0&&s.jsxs("div",{className:"mt-6 pt-6 border-t border-slate-200",children:[s.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-3",children:"Activities Being Affected:"}),s.jsx("ul",{className:"space-y-2",children:e.activities_limited.map((m,b)=>s.jsxs("li",{className:"flex items-start gap-3 text-slate-700",children:[s.jsx("span",{className:"flex-shrink-0 w-6 h-6 bg-red-100 rounded-full flex items-center justify-center mt-0.5",children:s.jsx("span",{className:"text-red-600 text-sm",children:"â"})}),s.jsx("span",{className:"text-base",children:m})]},b))})]})]}),e.how_we_can_help&&s.jsxs("div",{className:"bg-gradient-to-br from-[#006e74] to-teal-700 rounded-xl shadow-lg p-6 md:p-8 text-white",children:[s.jsxs("h2",{className:"text-2xl md:text-3xl font-bold mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-white/20 rounded-lg flex items-center justify-center",children:s.jsx("span",{className:"text-2xl",children:"ð"})}),"How We Can Help You"]}),s.jsx("p",{className:"text-base md:text-lg leading-relaxed whitespace-pre-wrap opacity-95 mb-6",children:e.how_we_can_help}),d("onTeal")]}),!o&&s.jsxs("div",{className:"bg-white rounded-xl shadow-md border border-slate-200 p-6 md:p-8",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900 mb-6 text-center",children:"Your Treatment Journey"}),s.jsx("p",{className:"text-center text-slate-600 mb-8 max-w-2xl mx-auto",children:"We use a structured, evidence-based approach to ensure lasting results, not just temporary relief."}),s.jsxs("div",{className:"space-y-6",children:[e.phase_1_relief&&s.jsxs("div",{className:"relative pl-8 pb-6 border-l-2 border-teal-300",children:[s.jsx("div",{className:"absolute -left-4 top-0 w-8 h-8 bg-teal-500 text-white rounded-full flex items-center justify-center font-bold shadow-md",children:"1"}),s.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:"Relief & Recovery"}),s.jsx("div",{className:"prose prose-slate max-w-none",children:s.jsx("p",{className:"text-base text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.phase_1_relief})})]}
871),e.phase_2_correction&&s.jsxs("div",{className:"relative pl-8 pb-6 border-l-2 border-teal-300",children:[s.jsx("div",{className:"absolute -left-4 top-0 w-8 h-8 bg-teal-600 text-white rounded-full flex items-center justify-center font-bold shadow-md",children:"2"}),s.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:"Correction & Strengthening"}),s.jsx("div",{className:"prose prose-slate max-w-none",children:s.jsx("p",{className:"text-base text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.phase_2_correction})})]}),e.phase_3_maintenance&&s.jsxs("div",{className:"relative pl-8",children:[s.jsx("div",{className:"absolute -left-4 top-0 w-8 h-8 bg-[#006e74] text-white rounded-full flex items-center justify-center font-bold shadow-md",children:"3"}),s.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-3",children:"Maintenance & Prevention"}),s.jsx("div",{className:"prose prose-slate max-w-none",children:s.jsx("p",{className:"text-base text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.phase_3_maintenance})})]})]})]}),!o&&e.why_this_works&&s.jsxs("div",{className:"bg-slate-50 rounded-xl border border-slate-200 p-6 md:p-8",children:[s.jsxs("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900 mb-4 flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-lg flex items-center justify-center",children:s.jsx("span",{className:"text-2xl",children:"â"})}),"Why This Approach Works"]}),s.jsx("div",{className:"prose prose-slate max-w-none",children:s.jsx("p",{className:"text-base md:text-lg text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.why_this_works})})]}),!o&&e.your_next_step&&s.jsxs("div",{className:"bg-gradient-to-br from-green-50 to-teal-50 rounded-xl border-2 border-teal-200 p-6 md:p-8 shadow-lg",children:[s.jsx("h2",{className:"text-2xl md:text-3xl font-bold text-slate-900 mb-4 text-center",children:"Your Next Step"}),s.jsx("div",{className:"text-center mb-6",children:s.jsx("p",{className:"text-base text-slate-700 leading-relaxed whitespace-pre-wrap",children:e.your_next_step})}),d("onLight"),s.jsx("p",{className:"text-sm text-slate-600 mt-4 text-center",children:"Free 15-minute clinical review available ⢠No obligation"})]})]})}),s.jsx("div",{className:"mt-12 mb-12 bg-amber-50 border-l-4 border-amber-500 p-4 md:p-5 rounded",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"text-xl md:text-2xl flex-shrink-0",children:"â ï¸"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-amber-900 mb-1 text-base",children:"Important Disclaimer"}),s.jsx("p",{className:"text-base text-amber-800 leading-relaxed",children:"This AI symptoms checker is provided for informational purposes only. We take no responsibility for the information provided. This is not a substitute for professional medical advice, diagnosis, or treatment. You must always consult with a qualified healthcare professional for an accurate diagnosis and appropriate treatment plan."})]})]})}),s.jsx("div",{children:s.jsx(j5e,{clinic:t,teamMembers:n})})]}),!o&&s.jsx(N5e,{clinic:t}),s.jsx($K,{clinic:t})]})}function k5e(){if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search),t=e.get("exp"),n=e.get("var"),r=e.get("vid");return!t||!n||!r?null:{experiment_id:t,variant_id:n,visitor_id:r,clinic_slug:e.get("clinic")||""}}function Rg(e,t={}){const n=k5e();if(!n)return;const r={clinic_id:t.clinic_id||"",experiment_id:n.experiment_id,variant_id:n.variant_id,event_type:e,visitor_id:n.visitor_id,lead_id:t.lead_id||void 0,mode:"inline",page_url:window.location.href,referrer:document.referrer||""};try{fetch("/functions/trackEmbedEvent",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),keepalive:!0}).catch(()=>{})}catch{}}function O5e(){var se;console.log("[AISymptomsChecker] ========== COMPONENT RENDER ==========");const[e,t]=E.useState(!0),[n,r]=E.useState([]),[i,a]=E.useState(null),[o,l]=E.useState({}),[c,u]=E.useState(0),[f,d]=E.useState({first_name:"",last_name:"",email:"",ph
871one:""}),[p,m]=E.useState(!1),[b,v]=E.useState(null),[y,x]=E.useState(""),[_,S]=E.useState({}),[w,N]=E.useState({}),[k,C]=E.useState([]),[P,L]=E.useState(!1),[T,A]=E.useState(null),[R,I]=E.useState([]),[M,B]=E.useState("");console.log("[AISymptomsChecker] State:",{questionsCount:n.length,responsesCount:Object.keys(o).length,currentStep:c,loading:e});const W=[{key:"initial",label:"Assessment",labelMobile:"Assess"},{key:"followup",label:"Follow-Up",labelMobile:"Follow-up"},{key:"contact",label:"Details",labelMobile:"Details"},{key:"results",label:"Results",labelMobile:"Results"}],G=(se=W[c])==null?void 0:se.key,[H,K]=E.useState(0);E.useEffect(()=>{$()},[]),E.useEffect(()=>{const V=new URLSearchParams(window.location.search);V.get("exp")&&V.get("var")&&V.get("vid")&&Rg("assessment_started")},[]),E.useEffect(()=>{fetch("https://api.ipify.org?format=json").then(V=>V.json()).then(V=>x(V.ip)).catch(()=>x("Unknown"))},[]);const $=async()=>{console.log("[AISymptomsChecker] loadData called"),t(!0);try{const fe=new URLSearchParams(window.location.search).get("response_id");if(fe)try{const te=await ve.entities.PatientFormResponse.filter({id:fe}),oe=te==null?void 0:te[0];if(oe!=null&&oe.ai_analysis_results){if(v(oe.ai_analysis_results),l(oe.responses||{}),u(3),oe.clinic_id)try{const le=await ve.entities.Clinic.filter({id:oe.clinic_id}),ye=(le==null?void 0:le[0])||null;if(A(ye),ye!=null&&ye.id){const xe=await ve.entities.TeamMember.filter({clinic_id:ye.id,is_active:!0});I(xe||[])}}catch(le){console.error("[AISymptomsChecker] Error loading clinic for saved response:",le)}t(!1);return}}catch(te){console.error("[AISymptomsChecker] Error loading saved response:",te)}const[ce,Ne]=await Promise.all([ve.entities.IntakeFormQuestion.list("-order"),ve.entities.IntakeFormSettings.list()]);console.log("[AISymptomsChecker] Loaded questions:",ce==null?void 0:ce.length),console.log("[AISymptomsChecker] Questions data:",ce),console.log("[AISymptomsChecker] Settings:",Ne==null?void 0:Ne[0]);const me=(ce==null?void 0:ce.map(te=>te.question_id))||[],je=me.filter((te,oe)=>me.indexOf(te)!==oe);je.length>0&&console.error("[AISymptomsChecker] DUPLICATE QUESTION IDs FOUND:",je),r(ce||[]),a((Ne==null?void 0:Ne[0])||{});try{const te=new URLSearchParams(window.location.search),oe=te.get("clinic_id"),le=te.get("slug");let ye=null;if(oe){const Ce=await ve.entities.Clinic.filter({id:oe});ye=(Ce==null?void 0:Ce[0])||null}else if(le){const Ce=await ve.entities.Clinic.filter({slug:le});ye=(Ce==null?void 0:Ce[0])||null}if(!ye){const Ce=await ve.entities.Clinic.filter({is_active:!0});ye=(Ce==null?void 0:Ce[0])||null}if(A(ye),ye!=null&&ye.id){const Ce=await ve.entities.TeamMember.filter({clinic_id:ye.id,is_active:!0});I(Ce||[])}const xe=te.get("location");if(xe&&Array.isArray(ye==null?void 0:ye.locations)){const Ce=ye.locations.find(Be=>(Be.slug||"").toLowerCase()===xe.toLowerCase());Ce&&B(Ce.slug)}}catch(te){console.error("[AISymptomsChecker] Error loading clinic:",te)}}catch(V){console.error("[AISymptomsChecker] Error loading data:",V)}finally{t(!1)}},F=E.useCallback((V,fe)=>{if(V.parent_question_id){const oe=n.find(le=>le.question_id===V.parent_question_id);if(oe&&!F(oe,fe))return!1}if(!V.conditional_logic)return!0;const{conditions:ce,logic_operator:Ne,action:me}=V.conditional_logic;if(!ce||ce.length===0)return!0;const je=ce.map(oe=>{const le=fe[oe.source_question_id],{operator:ye,value:xe}=oe;if(ye==="is_empty")return!le||le===""||Array.isArray(le)&&le.length===0;if(ye==="is_not_empty")return le&&le!==""&&(!Array.isArray(le)||le.length>0);if(le==null)return!1;if(typeof le=="boolean"){const Re=xe==="true"||xe===!0;return ye==="equals"?le===Re:ye==="not_equals"?le!==Re:!1}if(Array.isArray(le)){const Re=le.map(ke=>String(ke).toLowerCase()),ge=String(xe||"").toLowerCase();switch(ye){case"equals":return Re.length===1&&Re[0]===ge;case"not_equals":return Re.length!==1||Re[0]!==ge;case"contains":return Re.some(ke=>ke.includes(ge));case"not_contains":return!Re.some(ke=>ke.includes(ge));default:return!1}}const Ce=String(le).toLowerCase(),Be=String(xe||"").toLowerCase();switch(ye){case"equals":return Ce===Be;case"not_equals":return Ce!==Be;case"contains":return Ce.includes(Be);case"not_contains":return!Ce.includes(Be);case"starts_with":return Ce.startsWith(Be);case"ends_with":return Ce.endsWith(Be);default:return!1}}),te=Ne==="AND"?je.every(oe=>oe):je.some(oe=>oe);return me==="show"?te:!te},[n]),z=(V,fe)=>{if(!V){console.error("[AISymptomsChecker] handleInputChange called with undefined questionId");return}console.log("[AISymptomsChecker] handleInputChange CALLED:",{questionId:V,valueOrUpdater:fe,isFunction:typeof fe=="function"}),l(ce=>{const Ne=typeof fe=="function"?fe(ce[V]):fe;console.log("[AISymptomsChecker] Setting response:",{questionId:V,oldValue:ce[V],newValue:Ne,valueType:typeof Ne});const me={...ce};me[V]=Ne;const je=n.find(te=>te.question_id===V)||k.find(te=>te.question_id===V);if(je&&je.response_type==="problem_area"){const te=n.find(oe=>oe.response_type==="major_regions");if(te){const le=(Array.isArray(Ne)?Ne:[]).map(xe=>{const Ce=xe.toLowerCase().replace(/\s+/g,"_").replace(/[()]/g,"");if(Tc[Ce])return Tc[Ce];const Be=Object.keys(Tc).find(Re=>Re.split("_").map(ke=>ke.charAt(0).toUpperCase()+ke.slice(1)).join(" ").toLowerCase()===xe.toLowerCase());return Be?Tc[Be]:null}
871).filter(Boolean),ye=[...new Set(le)];me[te.question_id]=ye}}return me}),w[V]&&N(ce=>{const Ne={...ce};return delete Ne[V],Ne})},U=V=>{S(fe=>({...fe,[V]:!fe[V]}))},ee=()=>{console.log("[AISymptomsChecker] getInitialStepQuestions called"),console.log("[AISymptomsChecker] Total questions:",n.length);const V=n.filter(Ne=>(Ne.step==="problem"||Ne.step==="medical")&&Ne.region==="Global"&&!Ne.parent_question_id&&Ne.is_active!==!1).filter(Ne=>F(Ne,o));console.log("[AISymptomsChecker] Global questions found:",V.length),console.log("[AISymptomsChecker] Global question IDs:",V.map(Ne=>Ne.question_id));const fe=V.filter(Ne=>Ne.step==="problem").sort((Ne,me)=>(Ne.order||0)-(me.order||0)),ce=V.filter(Ne=>Ne.step==="medical").sort((Ne,me)=>(Ne.order||0)-(me.order||0));return console.log("[AISymptomsChecker] Problem questions:",fe.length),console.log("[AISymptomsChecker] Medical questions:",ce.length),[...fe,...ce]},re=()=>{if(G==="initial"){const V=ee(),fe={};for(const ce of V)if(ce.is_required&&!["field_group_container","static_text","heading"].includes(ce.response_type)){const Ne=o[ce.question_id];(Ne==null||Ne===""||Array.isArray(Ne)&&Ne.length===0)&&(fe[ce.question_id]=!0)}return N(fe),Object.keys(fe).length===0}if(G==="followup"){const V={};for(const fe of k)if(fe.is_required&&!["field_group_container","static_text","heading"].includes(fe.response_type)){const ce=o[fe.question_id];(ce==null||ce===""||Array.isArray(ce)&&ce.length===0)&&(V[fe.question_id]=!0)}return N(V),Object.keys(V).length===0}return!0},X=()=>{const V={};if(f.first_name||(V.first_name=!0),f.last_name||(V.last_name=!0),!f.email)V.email="required";else{const ce=f.email.trim();(!/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(ce)||ce.includes("..")||(ce.match(/@/g)||[]).length!==1)&&(V.email="invalid")}const fe=n.find(ce=>ce.question_id==="ai_symptoms_consent");return fe&&fe.is_required&&!o.ai_symptoms_consent&&(V.ai_symptoms_consent=!0),N(V),Object.keys(V).length===0},Z=async()=>{var V,fe,ce;if(!re()){const Ne=Object.keys(w)[0];if(Ne){const me=document.getElementById(`question-${Ne}`);me&&me.scrollIntoView({behavior:"smooth",block:"center"})}return}if(G==="initial"){L(!0),K(0);try{const me=ee().map(te=>({question_id:te.question_id,question_text:te.question_text,response_type:te.response_type,options:te.options||[],patient_response:o[te.question_id]||null}));setTimeout(()=>K(1),1500),setTimeout(()=>K(2),3e3),setTimeout(()=>K(3),4500);const je=await ve.functions.invoke("generateFollowUpQuestions",{responses:o,questionsContext:me});if((V=je==null?void 0:je.data)!=null&&V.followup_questions&&Array.isArray(je.data.followup_questions))C(je.data.followup_questions),Rg("step1_complete",{clinic_id:T==null?void 0:T.id}),u(c+1),window.scrollTo(0,0);else throw console.error("[AISymptomsChecker] Invalid response structure:",je),new Error("No follow-up questions received from AI. Please try again.")}catch(Ne){console.error("[AISymptomsChecker] Error generating follow-up questions:",Ne),alert("Failed to generate follow-up questions: "+(((ce=(fe=Ne.response)==null?void 0:fe.data)==null?void 0:ce.error)||Ne.message||"Unknown error")+". Please try again.")}finally{L(!1),K(0)}return}c<W.length-1&&(G==="followup"&&Rg("step2_complete",{clinic_id:T==null?void 0:T.id}),u(c+1),window.scrollTo(0,0))},ie=()=>{c>0&&(u(c-1),window.scrollTo(0,0))},Y=async()=>{var V,fe,ce,Ne,me,je,te,oe;if(!X()){const le=Object.keys(w)[0];if(le){const ye=document.getElementById(`contact-${le}`);ye&&ye.scrollIntoView({behavior:"smooth",block:"center"})}return}m(!0),K(0);try{console.log("[AISymptomsChecker] ========== SUBMITTING TO STEP 3 =========="),console.log("[AISymptomsChecker] Total responses:",Object.keys(o).length),console.log("[AISymptomsChecker] Response keys:",Object.keys(o)),setTimeout(()=>K(1),1500),setTimeout(()=>K(2),3e3),setTimeout(()=>K(3),4500),console.log("[AISymptomsChecker] Creating lead and form response...");const le=new URLSearchParams(window.location.search),ye=le.get("clinic_id")||(T==null?void 0:T.id)||(i==null?void 0:i.default_clinic_id)||null,xe={embed_experiment_id:le.get("exp")||null,embed_variant_id:le.get("var")||null,embed_visitor_id:le.get("vid")||null},Ce=await ve.functions.invoke("createLeadAndSymptomsResponse",{contactDetails:f,responses:o,ipAddress:y,clinicId:ye,selectedLocationSlug:M||null,embedAttribution:xe});if(!((V=Ce==null?void 0:Ce.data)!=null&&V.formResponseId))throw new Error("Failed to create lead and save responses");const Be=Ce.data.formResponseId;console.log("[AISymptomsChecker] Form response ID:",Be);let Re;try{if(console.log("[AISymptomsChecker] Calling analysis (30s timeout)..."),Re=await Promise.race([ve.functions.invoke("analyzeIntakeResponses",{formResponseId:Be}),new Promise((De,at)=>setTimeout(()=>at(new Error("Analysis timeout - AI service may be slow")),35e3))]),console.log("[AISymptomsChecker] â Analysis complete"),console.log("[AISymptomsChecker] Analysis type:",typeof((fe=Re==null?void 0:Re.data)==null?void 0:fe.analysis)),typeof((ce=Re==null?void 0:Re.data)==null?void 0:ce.analysis)=="string")throw console.error("[AISymptomsChecker] BUG DETECTED: Analysis is a string, not an object!"),console.error("[AISymptomsChecker] String content:",Re.data.analysis.substring(0,500)),new Error("AI returned invali
871d format. Please try again or contact support.")}catch(De){console.error("[AISymptomsChecker] Analysis failed:",De.message),alert("Analysis took too long or failed. Your information has been saved and our team will review it shortly."),window.location.href="/";return}let ge;try{if(console.log("[AISymptomsChecker] Calling recommendation (30s timeout)..."),ge=await Promise.race([ve.functions.invoke("recommendPractitionerDiscipline",{formResponseId:Be}),new Promise((De,at)=>setTimeout(()=>at(new Error("Recommendation timeout")),35e3))]),console.log("[AISymptomsChecker] â Recommendation complete"),console.log("[AISymptomsChecker] Recommendation type:",typeof((Ne=ge==null?void 0:ge.data)==null?void 0:Ne.recommendation)),typeof((me=ge==null?void 0:ge.data)==null?void 0:me.recommendation)=="string")throw console.error("[AISymptomsChecker] BUG DETECTED: Recommendation is a string, not an object!"),console.error("[AISymptomsChecker] String content:",ge.data.recommendation.substring(0,500)),new Error("AI returned invalid format. Please try again or contact support.")}catch(De){console.error("[AISymptomsChecker] Recommendation failed:",De.message),v({...Re.data.analysis,how_we_can_help:"Our practitioners can help you with your symptoms and develop a personalized treatment plan.",phase_1_relief:"We'll focus on reducing your pain and restoring basic function.",phase_2_correction:"We'll address underlying issues and build strength.",phase_3_maintenance:"We'll help you maintain your progress and prevent recurrence.",why_this_works:"A structured approach addresses root causes, not just symptoms.",your_next_step:"Book an initial assessment to start your recovery journey."}),u(3);return}const ke={...Re.data.analysis,...ge.data.recommendation};console.log("[AISymptomsChecker] ========== SUCCESS =========="),console.log("[AISymptomsChecker] Final results type:",typeof ke),console.log("[AISymptomsChecker] Final keys:",Object.keys(ke)),v(ke),Rg("assessment_completed",{clinic_id:ye,lead_id:(je=Ce==null?void 0:Ce.data)==null?void 0:je.leadId}),ve.functions.invoke("processAISymptomsSubmissionBackground",{formResponseId:Be,contactDetails:f}).catch(De=>{console.error("[AISymptomsChecker] Background processing failed (non-critical):",De)}),u(3)}catch(le){console.error("[AISymptomsChecker] Fatal error:",le);const ye=((oe=(te=le==null?void 0:le.response)==null?void 0:te.data)==null?void 0:oe.error)||(le==null?void 0:le.message)||"Unknown error occurred";alert(`Error: ${ye}. Your information may have been saved. Please contact us if you don't hear from us within 24 hours.`)}finally{m(!1),K(0)}},J=V=>{if(!V||!V.question_id)return console.error("[AISymptomsChecker] renderQuestion called with invalid question:",V),null;if(console.log("[AISymptomsChecker] renderQuestion:",{questionId:V.question_id,responseType:V.response_type,currentValue:o[V.question_id],step:V.step}),!F(V,o))return console.log("[AISymptomsChecker] Question hidden by conditional logic:",V.question_id),null;if(V.is_hidden)return console.log("[AISymptomsChecker] Question marked as hidden:",V.question_id),null;if(V.response_type==="major_regions")return console.log("[AISymptomsChecker] Hiding major_regions field"),null;if(["digital_signature","health_insurer","payment_method_confirmation"].includes(V.response_type))return console.log("[AISymptomsChecker] Skipping special response type:",V.response_type),null;const fe=w[V.question_id],ce=G==="initial"||G==="followup",Ne=V.step==="medical";if(V.response_type==="heading")return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-6 ${ce?"border-b border-gray-200 pb-4 pt-6":""}`,children:[s.jsx("h2",{className:"text-xl md:text-2xl font-bold text-slate-900",children:V.question_text}),V.help_text&&s.jsx("p",{className:"text-sm text-slate-600 mt-2",children:V.help_text})]},V.question_id);if(V.response_type==="field_group_container"){const me=(G==="followup"?k:n).filter(te=>te.parent_question_id===V.question_id&&te.is_active).sort((te,oe)=>(te.order||0)-(oe.order||0));return console.log("[AISymptomsChecker] Field group container:",{groupId:V.question_id,childrenCount:me.length,childIds:me.map(te=>te.question_id)}),me.filter(te=>F(te,o)).length===0?(console.log("[AISymptomsChecker] Field group has no visible children:",V.question_id),null):s.jsxs("div",{id:`question-${V.question_id}`,className:"w-full mb-6",children:[s.jsxs("div",{className:"border-l-4 border-[#006e74] pl-4 mb-4 p-5 bg-slate-50 rounded-lg",children:[s.jsx("h3",{className:"text-base md:text-lg font-semibold text-slate-900",children:V.question_text}),V.help_text&&s.jsx("p",{className:"text-sm text-slate-600 mt-1",children:V.help_text})]}),s.jsx("div",{className:"space-y-4",children:me.map(te=>(console.log("[AISymptomsChecker] Rendering child in field group:",te.question_id),J(te)))})]},V.question_id)}if(V.response_type==="problem_area"){const me=Array.isArray(o[V.question_id])?o[V.question_id]:[];return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs(Ee,{className:"mb-3 block text-sm md:text-base font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-sm text-slate-600 mb-3",children:V.help_text}),s.jsx("div",{className:"-mx-2.5 md:mx-0",children:s.jsx(Gge,{svgFileUrl:i==null?void 0:i.body_chart_svg_url,selectedRegions:me,onRegionClick:je=>{z(V.question_id,te=>{const oe=Array.isArray(te)?te:[],le=Ac(je);return oe.includes(le)?oe.filter(xe=>xe!==le):[...oe,le]})},showSidebar:!1})}),me.length>0&&s.jsx("div",{className:"mt-4 flex flex-wrap gap-2",children:me.map(je=>s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 bg-[#006e74] text-white rounded-full text-sm",children:[s.jsx("span",{children:je}),s.jsx("button",{type:"button",onClick:()=>{z(V.question_id,te=>(Array.isArray(te)?te:[]).filter(le=>le!==je))},className:"hover:bg-white/20 rounded-full p-0.5 transition-colors",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},je))})]},V.question_id)}if(V.response_type==="static_text")return s.jsx("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:s.jsxs("div",{className:"text-slate-700 prose prose-sm max-w-none",children:[s.jsx("p",{children:V.question_text}),V.help_text&&s.jsx("p",{className:"text-sm text-slate-500 mt-1",children:V.help_text})]})},V.question_id);if(V.response_type==="text_input"){const me=typeof o[V.question_id]=="string"?o[V.question_id]:"";return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"md:flex md:items-start md:gap-4 border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-2 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:V.help_text})]}),s.jsx("div",{className:ce?"md:w-1/3 mt-2 md:mt-0":"w-full",children:s.jsx(Te,{value:me,onChange:je=>{je.stopPropagation(),z(V.question_id,je.target.value)},placeholder:V.help_text,className:fe?"border-red-500":""})})]},V.question_id)}if(V.response_type==="textarea"){const me=typeof o[V.question_id]=="string"?o[V.question_id]:"";return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs(Ee,{className:"mb-2 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:V.help_text}),s.jsx(dn,{value:me,onChange:je=>{je.stopPropagation(),z(V.question_id,je.target.value)},placeholder:V.help_text,rows:4,className:fe?"border-red-500":""})]},V.question_id)}if(V.response_type==="yes_no"){const me=o[V.question_id];return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"md:flex md:items-start md:gap-4 border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-3 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:V.help_text})]}),s.jsx("div",{className:ce?"md:w-1/3 mt-2 md:mt-0":"w-full",children:s.jsx("div",{className:"flex gap-2",children:["Yes","No"].map(je=>s.jsx("button",{type:"button",onClick:te=>{te.preventDefault(),te.stopPropagation(),z(V.question_id,je)},className:`flex-1 px-4 py-3 rounded-lg border-2 transition-all text-sm font-medium ${me===je?"border-[#006e74] bg-teal-50 text-[#006e74]":fe?"border-red-300 hover:border-red-400":"border-slate-300 hover:border-slate-400"}`,children:je},`${V.question_id}-${je}`))})})]},V.question_id)}if(V.response_type==="radio"){const me=_[V.question_id]||!1,je=typeof o[V.question_id]=="string"?o[V.question_id]:"",te=je==="Other",oe=`${V.question_id}_other_details`;return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:flex md:items-start md:gap-4":"",children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-3 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:V.help_text}),je&&s.jsx("div",{className:"mb-2",children:s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-[#006e74] text-white rounded-full text-xs",children:[s.jsx("span",{children:je}),s.jsx("button",{type:"button",onClick:le=>{le.preventDefault(),le.stopPropagation(),z(V.question_id,"")},className:"hover:bg-white/20 rounded-full p-0.5 transition-colors",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})})]}),s.jsx("div",{className:ce?"md:w-1/3 mt-2 md:mt-0":"w-full",children:s.jsxs(be,{type:"button",variant:"outline",onClick:le=>{le.preventDefault(),le.stopPropagation(),U(V.question_id)},className:`w-full ${fe?"border-red-500":""}`,children:[me?"Hide Options":"Select Option",s.jsx(Or,{className:`w-4 h-4 ml-2 transition-transform ${me?"rotate-180":""}`})]})})]}),me&&s.jsx("div",{className:`mt-3 grid grid-cols-1 gap-2 ${ce?Ne?"md:grid-cols-2":"md:grid-cols-4":"sm:grid-cols-2"}`,children:(V.options||[]).map((le,ye)=>{const xe=je===le;return s.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all border ${xe?"bg-teal-50 border-[#006e74]":"bg-white border-slate-300 hover:border-slate-400"}`,children:[s.jsx("input",{type:"radio",name:`radio-${V.question_id}
871`,value:le,checked:xe,onChange:Ce=>{Ce.stopPropagation(),z(V.question_id,le),setTimeout(()=>U(V.question_id),150)},className:"sr-only"}),s.jsx("span",{className:"text-sm text-slate-700",children:le})]},`${V.question_id}-option-${ye}`)})}),te&&s.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[s.jsx(Ee,{className:"mb-2 block text-sm font-medium text-slate-700",children:'You selected "Other" - please provide more details:'}),s.jsx(dn,{value:o[oe]||"",onChange:le=>{le.stopPropagation(),z(oe,le.target.value)},placeholder:"Please describe...",rows:3,className:"w-full bg-white"})]})]},V.question_id)}if(V.response_type==="multi_select"){const me=Array.isArray(o[V.question_id])?o[V.question_id]:[],je=_[V.question_id]||!1,te=me.includes("Other"),oe=`${V.question_id}_other_details`;return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:flex md:items-start md:gap-4":"",children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-3 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:V.help_text}),me.length>0&&s.jsx("div",{className:"mb-2 flex flex-wrap gap-1",children:me.map((le,ye)=>s.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 bg-[#006e74] text-white rounded-full text-xs",children:[s.jsx("span",{children:le}),s.jsx("button",{type:"button",onClick:()=>z(V.question_id,me.filter(xe=>xe!==le)),className:"hover:bg-white/20 rounded-full p-0.5 transition-colors",children:s.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},ye))})]}),s.jsx("div",{className:ce?"md:w-1/3 mt-2 md:mt-0":"w-full",children:s.jsxs(be,{type:"button",variant:"outline",onClick:()=>U(V.question_id),className:`w-full ${fe?"border-red-500":""}`,children:[je?"Hide Options":`Select Options${me.length>0?` (${me.length})`:""}`,s.jsx(Or,{className:`w-4 h-4 ml-2 transition-transform ${je?"rotate-180":""}`})]})})]}),je&&s.jsx("div",{className:`mt-3 grid grid-cols-1 gap-2 ${ce?Ne?"md:grid-cols-2":"md:grid-cols-4":"sm:grid-cols-2"}`,children:(V.options||[]).map((le,ye)=>{const xe=me.includes(le);return s.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all border ${xe?"bg-teal-50 border-[#006e74]":"bg-white border-slate-300 hover:border-slate-400"}`,children:[s.jsx("div",{className:`flex-shrink-0 w-5 h-5 rounded border-2 flex items-center justify-center ${xe?"bg-[#006e74] border-[#006e74]":"border-slate-300 bg-white"}`,children:xe&&s.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),s.jsx("input",{type:"checkbox",checked:xe,onChange:Ce=>{Ce.target.checked?z(V.question_id,[...me,le]):z(V.question_id,me.filter(Be=>Be!==le))},className:"sr-only"}),s.jsx("span",{className:"text-sm text-slate-700",children:le})]},ye)})}),te&&s.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[s.jsx(Ee,{className:"mb-2 block text-sm font-medium text-slate-700",children:'You selected "Other" - please provide more details:'}),s.jsx(dn,{value:o[oe]||"",onChange:le=>z(oe,le.target.value),placeholder:"Please describe...",rows:3,className:"w-full bg-white"})]})]},V.question_id)}if(V.response_type==="dropdown"){const je=o[V.question_id]==="Other",te=`${V.question_id}_other_details`;return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"md:flex md:items-start md:gap-4 border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-2 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:V.help_text})]}),s.jsxs("div",{className:`${ce?"md:w-1/3 mt-2 md:mt-0":"w-full"} ${je?"w-full md:w-full":""}`,children:[s.jsxs(Et,{value:o[V.question_id]||"",onValueChange:oe=>z(V.question_id,oe),children:[s.jsx(St,{className:fe?"border-red-500":"",children:s.jsx(kt,{placeholder:"Select an option"})}),s.jsx(jt,{children:(V.options||[]).map((oe,le)=>s.jsx(He,{value:oe,children:oe},le))})]}),je&&s.jsxs("div",{className:"mt-4 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[s.jsx(Ee,{className:"mb-2 block text-sm font-medium text-slate-700",children:'You selected "Other" - please provide more details:'}),s.jsx(dn,{value:o[te]||"",onChange:oe=>z(te,oe.target.value),placeholder:"Please describe...",rows:3,className:"w-full bg-white"})]})]})]},V.question_id)}if(V.response_type==="range_scale"||V.response_type==="numeric_slider"){const me=V.min_value||0,je=V.max_value||10,te=V.step_value||1,oe=V.unit||"";let le=me;const ye=o[V.question_id];if(typeof ye=="number")le=ye;else if(ye!=null){const Ce=parseFloat(ye);le=isNaN(Ce)?me:Ce}const xe=(le-me)/(je-me)*100;return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs(Ee,{className:"mb-3 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:V.help_text}),s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsx("input",{type:"range",min:me,max:je,step:te,value:le,onChange:Ce=>{Ce.stopPropagation(),z(V.question_id,parseFloat(Ce.target.value))},className:"flex-1 h-2 rounded-lg appearance-none cursor-pointer accent-[#006e74]",style:{background:`linear-gradient(to right, #006e74 0%, #006e74 ${xe}%, #e5e7eb ${xe}%, #e5e7eb 100%)`}}),s.jsxs("div",{className:"text-lg font-semibold w-20 text-center",children:[le," ",oe&&s.jsx("span",{className:"text-sm text-slate-600",children:oe})]})]}),s.jsxs("div",{className:"flex justify-between text-xs text-slate-500 mt-2",children:[s.jsxs("span",{children:[me," ",oe]}),s.jsxs("span",{children:[je," ",oe]})]})]},V.question_id)}if(V.response_type==="major_regions"){const me=["Head / Face / Jaw","Neck (Cervical)","Shoulder / Upper Back (Scapular Mechanics)","Elbow / Forearm","Wrist / Hand","Thorax / Chest / Ribs","Abdomen / Core","Lumbar / Lower Back","Hip / Groin / Glute","Knee / Thigh","Ankle / Foot"];return s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs(Ee,{className:"mb-3 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-3",children:V.help_text}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:me.map(je=>{const te=(o[V.question_id]||[]).includes(je);return s.jsxs("label",{className:`flex items-center gap-3 p-3 rounded-lg cursor-pointer transition-all border ${te?"bg-teal-50 border-[#006e74]":"bg-white border-slate-300 hover:border-slate-400"}`,children:[s.jsx("div",{className:`flex-shrink-0 w-5 h-5 rounded border-2 flex items-center justify-center ${te?"bg-[#006e74] border-[#006e74]":"border-slate-300 bg-white"}
871`,children:te&&s.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),s.jsx("input",{type:"checkbox",checked:te,onChange:oe=>{const le=o[V.question_id]||[],ye=oe.target.checked?[...le,je]:le.filter(xe=>xe!==je);z(V.question_id,ye)},className:"sr-only"}),s.jsx("span",{className:"text-sm text-slate-700",children:je})]},je)})})]},V.question_id)}return V.response_type==="number_input"?s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"md:flex md:items-start md:gap-4 border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-2 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:V.help_text})]}),s.jsx("div",{className:ce?"md:w-1/3 mt-2 md:mt-0":"w-full",children:s.jsx(Te,{type:"number",value:o[V.question_id]||"",onChange:me=>z(V.question_id,me.target.value),placeholder:V.help_text,className:fe?"border-red-500":""})})]},V.question_id):V.response_type==="date_picker"?s.jsxs("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"md:flex md:items-start md:gap-4 border-b border-gray-200 pb-5 pt-5":""}`,children:[s.jsxs("div",{className:ce?"md:w-2/3":"w-full",children:[s.jsxs(Ee,{className:"mb-2 block text-sm font-semibold",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mb-2",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mb-2",children:V.help_text})]}),s.jsx("div",{className:ce?"md:w-1/3 mt-2 md:mt-0":"w-full",children:s.jsx(Te,{type:"date",value:o[V.question_id]||"",onChange:me=>z(V.question_id,me.target.value),className:fe?"border-red-500":""})})]},V.question_id):V.response_type==="single_checkbox"?s.jsx("div",{id:`question-${V.question_id}`,className:`w-full mb-4 ${ce?"border-b border-gray-200 pb-5 pt-5":""}`,children:s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:o[V.question_id]===!0,onChange:me=>z(V.question_id,me.target.checked),className:"mt-1 accent-[#006e74]"}),s.jsxs("div",{children:[s.jsxs("span",{className:"font-semibold text-slate-900",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"This field is required"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:V.help_text})]})]})},V.question_id):null};return e?s.jsx("div",{className:"min-h-screen flex items-center justify-center bg-white",children:s.jsx(Qt,{className:"w-8 h-8 animate-spin text-[#006e74]"})}):G==="results"&&b?s.jsx(E5e,{aiResults:b,clinic:T,teamMembers:R,selectedLocationSlug:M}):s.jsxs("div",{className:"min-h-screen bg-white",children:[s.jsx(LK,{clinic:T}),s.jsxs("div",{className:"max-w-5xl mx-auto p-5 md:p-8",children:[s.jsxs("div",{className:"mb-6 md:mb-8 text-center",children:[s.jsx("h1",{className:"text-2xl md:text-3xl font-bold text-slate-900 mb-2",children:"AI Pain Triage Flow"}),s.jsx("p",{className:"text-sm md:text-base text-slate-600",children:"Get a preliminary assessment and find the right practitioner for you"})]}),s.jsx("div",{className:"mb-8",children:s.jsx("div",{className:"flex items-center justify-center mb-4",children:W.map((V,fe)=>s.jsxs(ne.Fragment,{children:[s.jsxs("div",{className:"flex flex-col items-center",children:[s.jsx("div",{className:`flex items-center justify-center w-7 h-7 md:w-10 md:h-10 rounded-full border-2 ${fe<c?"bg-[#006e74] border-[#006e74] text-white":fe===c?"border-[#006e74] text-[#006e74] font-semibold":"border-slate-300 text-slate-400"}`,children:fe<c?s.jsx(oa,{className:"w-3.5 h-3.5 md:w-5 md:h-5"}):fe+1}),s.jsxs("div",{className:`text-[11px] md:text-sm mt-1 font-medium text-center whitespace-nowrap ${fe<=c?"text-slate-900":"text-slate-400"}`,children:[s.jsx("span",{className:"md:hidden",children:V.labelMobile}),s.jsx("span",{className:"hidden md:inline",children:V.label})]})]}),fe<W.length-1&&s.jsx("div",{className:`h-0.5 w-5 sm:w-8 md:w-16 mx-1 md:mx-2 mb-4 ${fe<c?"bg-[#006e74]":"bg-slate-300"}`})]},V.key))})}),s.jsxs("div",{className:"mb-8",children:[G==="initial"&&s.jsx("div",{className:"space-y-4",children:(()=>{const V=ee();return console.log("[AISymptomsChecker] Rendering initial step, questions count:",V.length),V.map(fe=>J(fe))})()}),G==="followup"&&s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"border-l-4 border-[#006e74] pl-4 mb-6 p-5 bg-slate-50 rounded-lg",children:[s.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Follow-Up Questions"}),s.jsx("p",{className:"text-sm text-slate-600",children:"Based on your initial responses, we have a few more specific questions to better understand your condition."})]}),k.map(V=>J(V))]}),G==="contact"&&s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx("div",{className:"border-l-4 border-[#006e74] pl-4 mb-6 p-5 bg-slate-50 rounded-lg",children:s.jsx("h2",{className:"text-xl font-semibold text-slate-900 mb-2",children:"Get Your AI Preliminary Assessment"})}),s.jsx("p",{className:"text-sm text-slate-700 mb-6",children:"Your personalized results will generate on the next page based on your responses. One of our expert clinicians will follow up with you for a free, no-obligation clinical review to discu
871ss your results and answer any questions. A comprehensive PDF report of your AI assessment will also be sent to your email address for your records."}),Array.isArray(T==null?void 0:T.locations)&&T.locations.length>0&&s.jsx("div",{className:"mb-6",children:s.jsx(w5e,{locations:T.locations,value:M,onChange:B})}),s.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[s.jsxs("div",{id:"contact-first_name",children:[s.jsx(Ee,{htmlFor:"first_name",children:"First Name *"}),s.jsx(Te,{id:"first_name",value:f.first_name,onChange:V=>{d({...f,first_name:V.target.value}),w.first_name&&N(fe=>{const ce={...fe};return delete ce.first_name,ce})},placeholder:"John",className:w.first_name?"border-red-500":""}),w.first_name&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"First name is required"})]}),s.jsxs("div",{id:"contact-last_name",children:[s.jsx(Ee,{htmlFor:"last_name",children:"Last Name *"}),s.jsx(Te,{id:"last_name",value:f.last_name,onChange:V=>{d({...f,last_name:V.target.value}),w.last_name&&N(fe=>{const ce={...fe};return delete ce.last_name,ce})},placeholder:"Smith",className:w.last_name?"border-red-500":""}),w.last_name&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"Last name is required"})]}),s.jsxs("div",{id:"contact-email",children:[s.jsx(Ee,{htmlFor:"email",children:"Email *"}),s.jsx(Te,{id:"email",type:"email",value:f.email,onChange:V=>{d({...f,email:V.target.value}),w.email&&N(fe=>{const ce={...fe};return delete ce.email,ce})},placeholder:"[email protected]",className:w.email?"border-red-500":""}),w.email==="invalid"&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"Please enter a valid email address"}),w.email==="required"&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"Email is required"}),w.email===!0&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"Email is required"})]}),s.jsxs("div",{id:"contact-phone",children:[s.jsx(Ee,{htmlFor:"phone",children:"Phone"}),s.jsx(Te,{id:"phone",type:"tel",value:f.phone,onChange:V=>d({...f,phone:V.target.value}),placeholder:"07700 900000"})]})]}),s.jsx("div",{className:"mt-6",children:n.filter(V=>V.question_id==="ai_symptoms_consent").map(V=>{const fe=w.ai_symptoms_consent;return s.jsx("div",{id:`contact-${V.question_id}`,className:"w-full mb-4 pt-4 border-t",children:s.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[s.jsx("input",{type:"checkbox",checked:o[V.question_id]===!0,onChange:ce=>z(V.question_id,ce.target.checked),className:`mt-1 accent-[#006e74] ${fe?"border-red-500":""}`}),s.jsxs("div",{children:[s.jsxs("span",{className:"font-semibold text-slate-900",children:[V.question_text,V.is_required&&s.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),fe&&s.jsx("p",{className:"text-sm text-red-600 mt-1",children:"You must agree to the terms"}),V.help_text&&s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:V.help_text})]})]})},V.question_id)})})]}),s.jsx("div",{className:"mt-8 bg-amber-50 border-l-4 border-amber-500 p-4 rounded",children:s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("span",{className:"text-xl flex-shrink-0",children:"â ï¸"}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold text-amber-900 mb-1",children:"Important Disclaimer"}),s.jsx("p",{className:"text-sm text-amber-800",children:"This AI symptoms checker is provided for informational purposes only. We take no responsibility for the information provided. This is not a substitute for professional medical advice, diagnosis, or treatment. You must always consult with a qualified healthcare professional for an accurate diagnosis and appropriate treatment plan."})]})]})})]}),s.jsx("div",{className:"pt-6 border-t",children:s.jsxs("div",{className:"flex justify-between items-center gap-3",children:[s.jsxs(be,{variant:"outline",onClick:ie,disabled:c===0||p||P,className:"flex-1 md:flex-none",children:[s.jsx(gB,{className:"w-4 h-4 mr-2"}),"Back"]}),G==="contact"?s.jsx(be,{onClick:Y,disabled:p,className:"bg-[#006e74] hover:bg-[#005560] flex-1 md:flex-none",children:p?s.jsxs(s.Fragment,{children:[s.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):"Get My Results"}):s.jsx(be,{onClick:Z,disabled:P,className:"bg-[#006e74] hover:bg-[#005560] flex-1 md:flex-none",children:P?s.jsxs(s.Fragment,{children:[s.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating..."]}):s.jsxs(s.Fragment,{children:["Next",s.jsx(op,{className:"w-4 h-4 ml-2"})]})})]})})]}),p&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:s.jsx(yt,{className:"p-8 max-w-lg mx-auto w-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Qt,{className:"w-16 h-16 mx-auto mb-6 text-[#006e74] animate-spin"}),s.jsx("h3",{className:"text-2xl font-bold text-slate-900 mb-6",children:"Analysing Your Symptoms"}),s.jsxs("div",{className:"space-y-3 text-sm text-slate-600",children:[s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=0?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===0?"animate-pulse":""}`}),s.jsxs("span",{children:["Identifying any urgent actions needed",H===0&&"..."]}),H>=1&&s.jsx("span",{className:"text-green-600 ml-2",children:"â"})]}),s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=1?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===1?"animate-pulse":""}`}),s.jsxs("span",{children:["Establishing a preliminary working diagnosis",H===1&&"..."]}),H>=2&&s.jsx("span",{className:"text-green-600 ml-2",children:"â"})]}),s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=2?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===2?"animate-pulse":""}`}),s.jsxs("span",{children:["Compiling your personalized treatment plan",H===2&&"..."]}),H>=3&&s.jsx("span",{className:"text-green-600 ml-2",children:"â"})]}),s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=3?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===3?"animate-pulse":""}`}),s.jsx("span",{children:"Preparing your comprehensive report..."})]})]})]})})}),s.jsx($K,{clinic:T}),P&&s.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:s.jsx(yt,{className:"p-8 max-w-lg mx-auto w-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Qt,{className:"w-16 h-16 mx-auto mb-6 text-[#006e74] animate-spin"}),s.jsx("h3",{className:"text-2xl font-bold text-slate-900 mb-6",children:"Generating Follow-Up Questions"}),s.jsxs("div",{className:"space-y-3 text-sm text-slate-600",children:[s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=0?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===0?"animate-pulse":""}`}),s.jsxs("span",{children:["Reviewing your problem presentation",H===0&&"..."]}),H>=1&&s.jsx("span",{className:"text-green-600 ml-2",children:"â"})]}),s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=1?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===1?"animate-pulse":""}`}),s.jsxs("span",{children:["Checking for medical red flags",H===1&&"..."]}),H>=2&&s.jsx("span",{className:"text-green-600 ml-2",children:"â"})]}),s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=2?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===2?"animate-pulse":""}`}),s.jsxs("span",{children:["Generating personalized follow-up questions",H===2&&"..."]}),H>=3&&s.jsx("span",{className:"text-green-600 ml-2",children:"â"})]}),s.jsxs("div",{className:`flex items-center justify-center gap-2 transition-opacity duration-500 ${H>=3?"opacity-100":"opacity-0"}`,children:[s.jsx("div",{className:`w-2 h-2 rounded-full bg-teal-500 ${H===3?"animate-pulse":""}`}),s.jsx("span",{children:"Tailoring to your specific symptoms..."})]})]})]})})})]})}const C5e=[{id:"inline",title:"Inline section",description:"A full hero block (headline, subheadline, CTA) embedded inside a chosen spot on the page.",test:"Tests headline + subheadline + CTA copy.",icon:Yf},{id:"button",title:"Inline button",description:"Replaces the text of existing buttons on your site (e.g. Elementor) with the active variant.",test:"Tests button label copy.",icon:mO},{id:"floating",title:"Floating button",description:"A sticky floating CTA on every page that opens the assessment.",test:"Tests floating button label copy.",icon:pO}];function A5e({open:e,onClose:t,onCreate:n}){const[r,i]=E.useState(""),[a,o]=E.useState("inline"),[l,c]=E.useState(!1);E.useEffect(()=>{e&&(i(""),o("inline"),c(!1))},[e]);const u=async()=>
871{if(r.trim()){c(!0);try{await n({name:r.trim(),mode:a}),t()}finally{c(!1)}}};return s.jsx(vn,{open:e,onOpenChange:f=>!f&&!l&&t(),children:s.jsxs(pn,{className:"max-w-2xl",children:[s.jsx(En,{children:s.jsx(kn,{children:"New experiment"})}),s.jsxs("div",{className:"space-y-5",children:[s.jsxs("div",{children:[s.jsx(Ee,{htmlFor:"exp-name",children:"Experiment name"}),s.jsx(Te,{id:"exp-name",value:r,onChange:f=>i(f.target.value),placeholder:"e.g. Homepage hero â headline & CTA test",autoFocus:!0})]}),s.jsxs("div",{children:[s.jsx(Ee,{className:"mb-2 block",children:"What are you testing?"}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:C5e.map(f=>{const d=a===f.id,p=f.icon;return s.jsxs("button",{type:"button",onClick:()=>o(f.id),className:`relative text-left rounded-lg border p-4 transition ${d?"border-[#006e74] ring-2 ring-[#006e74]/20 bg-[#006e74]/5":"border-slate-200 hover:border-slate-300 bg-white"}`,children:[d&&s.jsx("div",{className:"absolute top-2 right-2 w-5 h-5 rounded-full bg-[#006e74] text-white flex items-center justify-center",children:s.jsx(Hr,{className:"w-3 h-3"})}),s.jsx("div",{className:`w-9 h-9 rounded-lg flex items-center justify-center mb-3 ${d?"bg-[#006e74] text-white":"bg-slate-100 text-slate-600"}`,children:s.jsx(p,{className:"w-4 h-4"})}),s.jsx("div",{className:"font-semibold text-slate-900 text-sm",children:f.title}),s.jsx("div",{className:"text-xs text-slate-600 mt-1 leading-relaxed",children:f.description}),s.jsx("div",{className:"text-[11px] text-slate-500 mt-2 italic",children:f.test})]},f.id)})})]})]}),s.jsxs(Ku,{children:[s.jsx(be,{variant:"outline",onClick:t,disabled:l,children:"Cancel"}),s.jsx(be,{onClick:u,disabled:!r.trim()||l,children:l?"Creatingâ¦":"Create experiment"})]})]})})}function sO({clinic:e,children:t,maxWidth:n="max-w-6xl"}){return s.jsxs("div",{className:"min-h-screen flex flex-col bg-slate-50",children:[s.jsx(ws,{clinic:e}),s.jsx("main",{className:"flex-1",children:s.jsx("div",{className:`${n} mx-auto w-full p-4 md:p-6`,children:t})}),s.jsx(Cy,{clinic:e})]})}const KF={inline:{label:"Inline section",icon:Yf,color:"bg-blue-50 text-blue-700 border-blue-200"},button:{label:"Inline button",icon:mO,color:"bg-purple-50 text-purple-700 border-purple-200"},floating:{label:"Floating button",icon:pO,color:"bg-amber-50 text-amber-700 border-amber-200"},both:{label:"Inline + Floating",icon:Yf,color:"bg-slate-50 text-slate-700 border-slate-200"}},P5e={draft:"bg-slate-100 text-slate-700",running:"bg-emerald-100 text-emerald-700",paused:"bg-amber-100 text-amber-700",completed:"bg-slate-200 text-slate-700"};function T5e({mode:e}){const t=KF[e]||KF.inline,n=t.icon;return s.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs border ${t.color}`,children:[s.jsx(n,{className:"w-3 h-3"}),t.label]})}function R5e(){const e=mr(),[t,n]=E.useState(null),[r,i]=E.useState([]),[a,o]=E.useState(""),[l,c]=E.useState([]),[u,f]=E.useState(!0),[d,p]=E.useState(!1);E.useEffect(()=>{(async()=>{const y=await ve.auth.me();if(n(y),y!=null&&y.clinic_id){o(y.clinic_id);const x=await ve.entities.Clinic.filter({id:y.clinic_id});i(x||[])}else{const x=await ve.entities.Clinic.filter({is_active:!0});i(x||[]),x!=null&&x[0]&&o(x[0].id)}})()},[]),E.useEffect(()=>{a&&m()},[a]);const m=async()=>{f(!0);const y=await ve.entities.EmbedExperiment.filter({clinic_id:a},"-created_date");c(y||[]),f(!1)},b=async({name:y,mode:x})=>{const _=await ve.entities.EmbedExperiment.create({clinic_id:a,name:y,status:"draft",mode:x,variants:[]});e(`/EmbedExperimentDetails?id=${_.id}`)},v=r.find(y=>y.id===a);return s.jsx(sO,{clinic:v,children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"w-10 h-10 bg-[#006e74] rounded-lg flex items-center justify-center",children:s.jsx(_N,{className:"w-5 h-5 text-white"})}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold text-slate-900",children:"Website embed & A/B tests"}),s.jsx("p",{className:"text-sm text-slate-500",children:"Test which embed variants drive the most completed asse
871ssments."})]})]}),!(t!=null&&t.clinic_id)&&s.jsxs(Et,{value:a,onValueChange:o,children:[s.jsx(St,{className:"w-64",children:s.jsx(kt,{placeholder:"Select clinic"})}),s.jsx(jt,{children:r.map(y=>s.jsx(He,{value:y.id,children:y.name},y.id))})]})]}),s.jsxs(yt,{children:[s.jsxs(wn,{className:"flex flex-row items-center justify-between",children:[s.jsxs("div",{children:[s.jsx(_n,{className:"text-base",children:"Experiments"}),s.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Click an experiment to view variants, performance and embed code."})]}),s.jsxs(be,{size:"sm",onClick:()=>p(!0),disabled:!a,children:[s.jsx(ir,{className:"w-4 h-4 mr-1"}),"New experiment"]})]}),s.jsx(It,{children:u?s.jsx("div",{className:"py-12 text-center",children:s.jsx(Qt,{className:"w-5 h-5 animate-spin inline text-slate-400"})}):l.length===0?s.jsxs("div",{className:"py-12 text-center",children:[s.jsx(_N,{className:"w-10 h-10 text-slate-300 mx-auto mb-3"}),s.jsx("div",{className:"text-sm font-medium text-slate-700",children:"No experiments yet"}),s.jsx("div",{className:"text-xs text-slate-500 mt-1",children:"Create your first experiment to start A/B testing."})]}):s.jsx("div",{className:"space-y-2",children:l.map(y=>{const x=(y.variants||[]).length;return s.jsxs("button",{onClick:()=>e(`/EmbedExperimentDetails?id=${y.id}`),className:"w-full text-left border border-slate-200 rounded-lg p-4 hover:border-[#006e74] hover:shadow-sm transition flex items-center justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("div",{className:"font-semibold text-slate-900 truncate",children:y.name}),s.jsx("span",{className:`inline-flex px-2 py-0.5 rounded-full text-xs font-medium ${P5e[y.status]||"bg-slate-100 text-slate-700"}`,children:y.status}),s.jsx(T5e,{mode:y.mode||"inline"})]}),s.jsxs("div",{className:"text-xs text-slate-500 mt-1",children:[x," variant",x===1?"":"s"]})]}),s.jsx(op,{className:"w-4 h-4 text-slate-400 flex-shrink-0"})]},y.id)})})})]}),s.jsx(A5e,{open:d,onClose:()=>p(!1),onCreate:b})]})})}const YF=()=>({id:"v"+Math.random().toString(36).slice(2,6),name:"",headline:"",subheadline:"",cta_text:"",badge_text:"",floating_button_text:"",button_text:"",button_subtext:"",weight:1,is_active:!0});function I5e({open:e,mode:t,onClose:n,variant:r,onSave:i}){const[a,o]=E.useState(YF()),l=t==="button";E.useEffect(()=>{e&&o(r?{...r}:YF())},[e,r]);const c=(d,p)=>o(m=>({...m,[d]:p})),u=l?!!(a.name&&a.button_text):!!(a.name&&a.headline&&a.cta_text),f=()=>{const d={...a};l&&(d.cta_text=d.button_text||d.cta_text||"Start",d.headline||(d.headline=d.button_text||d.name)),i(d),n()};return s.jsx(vn,{open:e,onOpenChange:d=>!d&&n(),children:s.jsxs(pn,{className:"max-w-2xl",children:[s.jsx(En,{children:s.jsx(kn,{children:r!=null&&r.id?"Edit variant":"New variant"})}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Variant name (internal)"}),s.jsx(Te,{value:a.name,onChange:d=>c("name",d.target.value),placeholder:"e.g. Control, Outcome-led, Urgency"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Weight (traffic %)"}),s.jsx(Te,{type:"number",min:"1",value:a.weight,onChange:d=>c("weight",Number(d.target.value))})]})]}),l?s.jsxs("div",{className:"pt-2",children:[s.jsx("p",{className:"text-xs font-semibold text-slate-700 uppercase tracking-wide mb-3",children:"Inline button text variation"}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Button text *"}),s.jsx(Te,{value:a.button_text||"",onChange:d=>c("button_text",d.target.value),placeholder:"Check My Symptoms â"})]}),s.jsx("p",{className:"text-xs text-slate-500 mt-2",children:"The embed script will rewrite every matching button on the page with this text and track impressions + clicks against this variant."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"Badge / eyebrow text (optional)"}),s.jsx(Te,{value:a.badge_text||"",onChange:d=>c("badge_text",d.target.value),placeholder:"e.g. FREE AI ASSESSMENT"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Headline *"}),s.jsx(Te,{value:a.headline,onChange:d=>c("headline",d.target.value),placeholder:"e.g. Get a free AI-powered asse
871ssment of your pain in 2 minutes"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Subheadline"}),s.jsx(dn,{rows:2,value:a.subheadline||"",onChange:d=>c("subheadline",d.target.value),placeholder:"Answer a few quick questions to understand what's causing your symptoms and how we can help."})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{children:[s.jsx(Ee,{children:"CTA button text *"}),s.jsx(Te,{value:a.cta_text,onChange:d=>c("cta_text",d.target.value),placeholder:"Start My Free Assessment"})]}),s.jsxs("div",{children:[s.jsx(Ee,{children:"Floating button text (shorter)"}),s.jsx(Te,{value:a.floating_button_text||"",onChange:d=>c("floating_button_text",d.target.value),placeholder:"Check your symptoms"})]})]})]})]}),s.jsxs(Ku,{children:[s.jsx(be,{variant:"outline",onClick:n,children:"Cancel"}),s.jsx(be,{disabled:!u,onClick:f,children:"Save variant"})]})]})})}function xN({code:e}){const[t,n]=E.useState(!1);return s.jsxs("div",{className:"relative",children:[s.jsx("pre",{className:"bg-slate-900 text-slate-100 text-xs rounded-lg p-4 overflow-x-auto",children:s.jsx("code",{children:e})}),s.jsxs(be,{size:"sm",variant:"secondary",className:"absolute top-2 right-2 h-7",onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)},children:[t?s.jsx(Hr,{className:"w-3 h-3"}):s.jsx(lp,{className:"w-3 h-3"}),s.jsx("span",{className:"ml-1",children:t?"Copied":"Copy"})]})]})}function M5e({clinicSlug:e,appBaseUrl:t,mode:n}){const[r,i]=E.useState(t||"");E.useEffect(()=>{t||(async()=>{var p;try{const m=await ve.functions.invoke("getAppBaseUrl",{});(p=m==null?void 0:m.data)!=null&&p.base_url&&i(m.data.base_url)}catch{}})()},[t]);const a=(r||"https://app.triageflow.io").replace(/\/$/,""),o=`<!-- TriageFlow inline assessment section --> 872<div id="triageflow-embed"></div> 873<script src="${a}/functions/embedWidget?clinic=${e}" 874 data-clinic="${e}" 875 data-mode="inline" 876 data-target="#triageflow-embed" 877 async><\/script>`,l=`<!-- TriageFlow floating CTA (add before </body> on every page) --> 878<script src="${a}/functions/embedWidget?clinic=${e}" 879 data-clinic="${e}" 880 data-mode="floating" 881 data-position="bottom-right" 882 async><\/script>`,c=`<script src="${a}/functions/embedWidget?clinic=${e}" 883 data-clinic="${e}" 884 data-mode="button" 885 data-selector=".tf-cta" 886 async><\/script>`,u=!n||n==="inline"||n==="both",f=!n||n==="button",d=!n||n==="floating"||n==="both";return s.jsxs("div",{className:"space-y-6",children:[u&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-semibold text-slate-900",children:"Inline section (full hero with image & copy)"}),s.jsx("span",{className:"text-xs text-slate-500",children:"Paste inside a specific spot on the page."})]}),s.jsx(xN,{code:o})]}),f&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-semibold text-slate-900",children:"Inline button"}),s.jsx("span",{className:"text-xs text-slate-500",children:"A/B test button text on existing site buttons."})]}),s.jsxs("div",{className:"mb-2 text-xs text-slate-600 bg-slate-50 border border-slate-200 rounded-md p-3 leading-relaxed",children:["Give any button on your site the CSS class ",s.jsx("code",{className:"bg-white px-1.5 py-0.5 rounded border",children:"tf-cta"})," (in Elementor: Advanced â CSS Classes â you can use it on as many buttons as you like). Then paste this script ",s.jsxs("strong",{children:["as high as possible inside your page ",s.jsx("code",{className:"bg-white px-1.5 py-0.5 rounded border",children:"<head>"})]}),". The script automatically pulls the button-text variations from your active experiment, rewrites every ",s.jsx("code",{children:".tf-cta"})," button on the page, and tracks impressions + clicks per variant."]}),s.jsx(xN,{code:c})]}),d&&s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("h3",{className:"font-semibold text-slate-900",children:"Floating button"}),s.jsxs("span",{className:"text-xs text-slate-500",children:["Paste once site-wide, before ",s.jsx("code",{children:"</body>"}),". Appears on every page."]})]}),s.jsx(xN,{code:l})]})]})}const D5e={impression:"Impressions",cta_click:"CTA clicks",assessment_started:"Started",step1_complete:"Step 1",step2_complete:"Step 2",assessment_completed:"⨠C
886ompleted",appointment_booked:"Booked"};function L5e({experimentId:e,mode:t,onDeclareWinner:n}){const[r,i]=E.useState(!0),[a,o]=E.useState(null),l=async()=>{i(!0);try{const p=await ve.functions.invoke("getEmbedStats",{experimentId:e});o((p==null?void 0:p.data)||null)}finally{i(!1)}};if(E.useEffect(()=>{e&&l()},[e]),r)return s.jsx("div",{className:"py-12 text-center",children:s.jsx(Qt,{className:"w-5 h-5 animate-spin inline"})});if(!a)return s.jsx("div",{className:"py-8 text-center text-sm text-slate-500",children:"No data yet."});const{variants:c=[],funnel_steps:u=[],experiment:f}=a,d=Math.max(0,...c.map(p=>p.counts.assessment_completed||0));return s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"text-sm text-slate-600",children:["Key conversion = ",s.jsx("strong",{children:"assessment completed"}),". Higher is better."]}),s.jsx(be,{size:"sm",variant:"outline",onClick:l,children:"Refresh"})]}),s.jsx("div",{className:"overflow-x-auto border rounded-lg",children:s.jsxs("table",{className:"w-full text-sm",children:[s.jsx("thead",{className:"bg-slate-50 text-left",children:s.jsxs("tr",{children:[s.jsx("th",{className:"px-3 py-2 font-semibold",children:"Variant"}),u.map(p=>s.jsx("th",{className:"px-3 py-2 font-semibold text-right whitespace-nowrap",children:D5e[p]||p},p)),s.jsx("th",{className:"px-3 py-2 font-semibold text-right",children:"Conv. %"}),s.jsx("th",{className:"px-3 py-2"})]})}),s.jsx("tbody",{children:c.map(p=>{const m=(p.counts.assessment_completed||0)===d&&d>0,b=f.winner_variant_id===p.id,v=t==="button"?p.button_text||p.cta_text||"":p.headline||"";return s.jsxs("tr",{className:"border-t",children:[s.jsxs("td",{className:"px-3 py-3",children:[s.jsxs("div",{className:"font-medium text-slate-900 flex items-center gap-2",children:[p.name,b&&s.jsx(eJ,{className:"w-3.5 h-3.5 text-amber-500"})]}),s.jsx("div",{className:"text-xs text-slate-500 truncate max-w-xs",children:v})]}),u.map(y=>s.jsx("td",{className:`px-3 py-3 text-right tabular-nums ${y==="assessment_completed"&&m?"text-green-600 font-semibold":""}`,children:p.counts[y]||0},y)),s.jsxs("td",{className:"px-3 py-3 text-right tabular-nums font-semibold",children:[p.conversion_rate,"%"]}),s.jsx("td",{className:"px-3 py-3 text-right",children:!b&&s.jsx(be,{size:"sm",variant:"ghost",onClick:()=>n==null?void 0:n(p.id),children:"Mark winner"})})]},p.id)})})]})})]})}const QF={inline:{label:"Inline section",icon:Yf,color:"bg-blue-50 text-blue-700 border-blue-200"},button:{label:"Inline button",icon:mO,color:"bg-purple-50 text-purple-700 border-purple-200"},floating:{label:"Floating button",icon:pO,color:"bg-amber-50 text-amber-700 border-amber-200"},both:{label:"Inline + Floating",icon:Yf,color:"bg-slate-50 text-slate-700 border-slate-200"}},$5e={draft:"bg-slate-100 text-slate-700",running:"bg-emerald-100 text-emerald-700",paused:"bg-amber-100 text-amber-700",completed:"bg-slate-200 text-slate-700"};function F5e({mode:e}){const t=QF[e]||QF.inline,n=t.icon;return s.jsxs("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs border ${t.color}`,children:[s.jsx(n,{className:"w-3 h-3"}),t.label]})}function B5e(){var k;const e=mr(),[t,n]=E.useState(null),[r,i]=E.useState(null),[a,o]=E.useState(!0),[l,c]=E.useState(null),[u,f]=E.useState(!1),[d,p]=E.useState(!1),b=new URLSearchParams(window.location.search).get("id");E.useEffect(()=>{if(!b){e("/EmbedExperiments");return}v()},[b]);const v=async()=>{o(!0);const C=await ve.entities.EmbedExperiment.filter({id:b}),P=C==null?void 0:C[0];if(!P){e("/EmbedExperiments");return}n(P);const L=await ve.entities.Clinic.filter({id:P.clinic_id});i((L==null?void 0:L[0])||null),o(!1)},y=async C=>{const P=[...t.variants||[]],L=P.findIndex(A=>A.id===C.id);L>=0?P[L]=C:P.push(C);const T=await ve.entities.EmbedExperiment.update(t.id,{variants:P});n(T)},x=async C=>{const P=(t.variants||[]).filter(T=>T.id!==C),L=await ve.entities.EmbedExperiment.update(t.id,{variants:P});n(L)},_=async C=>{const P=await ve.entities.EmbedExperiment.update(t.id,{status:C});n(P)},S=async C=>{const P=await ve.entities.EmbedExperiment.update(t.id,{winner_variant_id:C});n(P)},w=async()=>{confirm("Delete this experiment? Stats will be kept but unlinked.")&&(await ve.entities.EmbedExperiment.delete(t.id),e("/EmbedExperiments"))},N=async()=>{var C;if(t&&confirm(`This will: 887 888⢠Delete ALL tracked events (impressions, clicks, completions) for "${t.name}" 889⢠Clear the tf_vid cookie in this browser so you re-enter the experiment as a new visitor
890 891Use this before going live so you start with clean stats. Continue?`)){p(!0);try{document.cookie="tf_vid=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/";const P=await ve.functions.invoke("resetEmbedExperimentData",{experimentId:t.id}),L=((C=P==null?void 0:P.data)==null?void 0:C.deleted)??0;alert(`Reset complete. 892 893${L} tracked event${L===1?"":"s"} deleted. 894tf_vid cookie cleared.`)}catch(P){alert(`Reset failed: ${P.message||P}`)}finally{p(!1)}}};return a||!t?s.jsx(sO,{clinic:r,children:s.jsx("div",{className:"py-16 text-center",children:s.jsx(Qt,{className:"w-6 h-6 animate-spin inline text-slate-400"})})}):s.jsx(sO,{clinic:r,children:s.jsxs("div",{className:"space-y-6",children:[s.jsxs(be,{variant:"ghost",size:"sm",onClick:()=>e("/EmbedExperiments"),className:"gap-1 -ml-2",children:[s.jsx(gB,{className:"w-4 h-4"}),"Back to experiments"]}),s.jsx(yt,{children:s.jsxs(wn,{className:"flex flex-row items-start justify-between gap-3 flex-wrap",children:[s.jsxs("div",{className:"min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[s.jsx(_n,{className:"text-lg",children:t.name}),s.jsx("span",{className:`inline-flex px-2 py-0.5 rounded-full text-xs font-medium ${$5e[t.status]||"bg-slate-100 text-slate-700"}`,children:t.status}),s.jsx(F5e,{mode:t.mode||"inline"})]}),s.jsx("div",{className:"text-xs text-slate-500 max-w-xl",children:t.status==="running"?"Experiment is live â the embed script is splitting traffic between your variants and tracking funnel stats.":"Click Start to activate this experiment. Only running experiments have their variants served by the embed script and tracked in the funnel stats."})]}),s.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[t.status!=="running"?s.jsxs(be,{size:"sm",onClick:()=>_("running"),disabled:!((k=t.variants)!=null&&k.length),title:"Activate this experiment so visitors see its variants",children:[s.jsx(EZ,{className:"w-4 h-4 mr-1"}),"Start"]}):s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>_("paused"),title:"Pause â visitors will see the default content until resumed",children:[s.jsx(bZ,{className:"w-4 h-4 mr-1"}),"Pause"]}),s.jsxs(be,{size:"sm",variant:"outline",onClick:N,disabled:d,title:"Delete all tracked test events for this experiment and clear your browser's visitor cookie â use before going live",children:[d?s.jsx(Qt,{className:"w-4 h-4 mr-1 animate-spin"}):s.jsx(RZ,{className:"w-4 h-4 mr-1"}),"Reset test data"]}),s.jsx(be,{size:"sm",variant:"ghost",className:"text-red-600",onClick:w,children:s.jsx(Na,{className:"w-4 h-4"})})]})]})}),s.jsxs(yt,{children:[s.jsxs(wn,{className:"flex flex-row items-center justify-between",children:[s.jsx(_n,{className:"text-base",children:"Variants"}),s.jsxs(be,{size:"sm",variant:"outline",onClick:()=>{c(null),f(!0)},children:[s.jsx(ir,{className:"w-4 h-4 mr-1"}),"Add variant"]})]}),s.jsx(It,{children:(t.variants||[]).length===0?s.jsx("div",{className:"text-sm text-slate-500 py-6 text-center border border-dashed rounded-lg",children:"Add at least one variant to start testing."}):s.jsx("div",{className:"space-y-2",children:t.variants.map(C=>s.jsxs("div",{className:"border rounded-lg p-3 flex items-start justify-between gap-3",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"font-medium text-slate-900",children:[C.name," ",s.jsxs("span",{className:"text-xs text-slate-400",children:["· weight ",C.weight||1]})]}),t.mode==="button"?s.jsxs("div",{className:"text-sm text-slate-700 truncate",children:["Button: ",s.jsx("span",{className:"font-medium",children:C.button_text||C.cta_text||"â"})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"text-sm text-slate-700 truncate",children:C.headline}),C.subheadline&&s.jsx("div",{className:"text-xs text-slate-500 truncate",children:C.subheadline}),s.jsxs("div",{className:"text-xs text-slate-600 mt-1",children:["CTA: ",s.jsx("span",{className:"font-medium",children:C.cta_text})]})]})]}),s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(be,{size:"sm",variant:"ghost",onClick:()=>{c(C),f(!0)},children:s.jsx(gO,{className:"w-4 h-4"})}),s.jsx(be,{size:"sm",variant:"ghost",className:"text-red-600",onClick:()=>x(C.id),children:s.jsx(Na,{className:"w-4 h-4"})})]})]},C.id))})})]}),s.jsxs(yt,{children:[s.jsx(wn,{children:s.jsx(_n,{className:"text-base",children:t.mode==="button"?"Inline button performance":t.mode==="floating"?"Floating button performance":"Funnel performance"})}),s.jsx(It,{children:s.jsx(L5e,{experimentId:t.id,mode:t.mode,onDeclareWinner:S})})]}),s.jsxs(yt,{children:[s.jsxs(wn,{children:[s.jsx(_n,{className:"text-base",children:"Embed code"}),s.jsx("div",{className:"text-xs text-slate-500",children:"Paste onto the clinic's website. The script automatically loads the active experiment's variant."})]}),s.jsx(It,{children:r!=null&&r.slug?s.jsx(M5e,{clinicSlug:r.slug,mode:t.mode||"inline"}):s.jsx("div",{className:"text-sm text-amber-700",children:"Set a slug on this clinic first."})})]}),s.jsx(I5e,{open:u,mode:t==null?void 0:t.mode,variant:l,onClose:()=>f(!1),onSave:y})]})})}const q5e=()=>s.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:s.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:s.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),s.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),s.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),s.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[s.jsx("p",{children:"If you believe this is an error, you can:"}),s.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[s.jsx("li",{children:"Verify you are logged in with the correct account"}),s.jsx("li",{children:"Contact the app administrator for access"}),s.jsx("li",{children:"Try logging out and back in again"})]})]})]})})}),{Pages:FK,Layout:XF,mainPage:U5e}=v9,z5e=U5e;FK[z5e];const bN=({children:e,currentPageName:t})=>XF?s.jsx(XF,{currentPageName:t,children:e}):s.jsx(s.Fragment,{children:e}),H5e=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=$O();if(t||e)return s.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:s.jsx("div",{className:"w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return s.jsx(q5e,{});if(n.type==="auth_required")return r(),null}return s.jsxs(_te,{children:[s.jsx(Jn,{path:"/",element:s.jsx(b5e,{})}),s.jsx(Jn,{path:"/assessment",element:s.jsx(O5e,{})}),Object.entries(FK).map(([i,a])=>s.jsx(Jn,{path:`/${i}`,element:s.jsx(bN,{currentPageName:i,children:s.jsx(a,{})})},i)),s.jsx(Jn,{path:"/check/:slug",element:s.jsx(SL,{})}),s.jsx(Jn,{path:"/LeadDetails",element:s.jsx($Le,{})}),s.jsx(Jn,{path:"/:slug",element:s.jsx(SL,{})}),s.jsx(Jn,{path:"/ClinicDashboard",element:s.jsx(K_e,{})}),s.jsx(Jn,{path:"/ClinicAnalytics",element:s.jsx(hLe,{})}),s.jsx(Jn,{path:"/ClinicTeam",element:s.jsx(pLe,{})}),s.jsx(Jn,{path:"/ClinicLeads",element:s.jsx(yLe,{})}
894),s.jsx(Jn,{path:"/ClinicDetails",element:s.jsx(NLe,{})}),s.jsx(Jn,{path:"/ClinicTeamAdmin",element:s.jsx(bN,{currentPageName:"ClinicTeamAdmin",children:s.jsx(ELe,{})})}),s.jsx(Jn,{path:"/EmailTemplates",element:s.jsx(bN,{currentPageName:"EmailTemplates",children:s.jsx(Uwe,{})})}),s.jsx(Jn,{path:"/EmbedExperiments",element:s.jsx(R5e,{})}),s.jsx(Jn,{path:"/EmbedExperimentDetails",element:s.jsx(B5e,{})}),s.jsx(Jn,{path:"*",element:s.jsx(Mbe,{})})]})};function W5e(){return s.jsx(Jae,{children:s.jsxs(vee,{client:Aee,children:[s.jsxs(Ate,{children:[s.jsx(Ibe,{}),s.jsx(H5e,{})]}),s.jsx(ON,{})]})})}VQ.createRoot(document.getElementById("root")).render(s.jsx(W5e,{}));
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.