@runflow-ai/cli 0.2.30 → 0.2.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r);!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i={exports:{}},o={},a={exports:{}},s={},l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),h=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.iterator;var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||x}function S(){}function C(e,t,n){this.props=e,this.context=t,this.refs=k,this.updater=n||x}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},S.prototype=_.prototype;var E=C.prototype=new S;E.constructor=C,w(E,_.prototype),E.isPureReactComponent=!0;var I=Array.isArray,N=Object.prototype.hasOwnProperty,O={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var r,i={},o=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(o=""+t.key),t)N.call(t,r)&&!T.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(1===s)i.children=n;else if(1<s){for(var c=Array(s),u=0;u<s;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===i[r]&&(i[r]=s[r]);return{$$typeof:l,type:e,key:o,ref:a,props:i,_owner:O.current}}function j(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var A=/\/+/g;function P(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function M(e,t,n,r,i){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var a=!1;if(null===e)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case l:case c:a=!0}}if(a)return i=i(a=e),e=""===r?"."+P(a,0):r,I(i)?(n="",null!=e&&(n=e.replace(A,"$&/")+"/"),M(i,t,n,"",function(e){return e})):null!=i&&(j(i)&&(i=function(e,t){return{$$typeof:l,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(A,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=""===r?".":r+":",I(e))for(var s=0;s<e.length;s++){var u=r+P(o=e[s],s);a+=M(o,t,n,u,i)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),s=0;!(o=e.next()).done;)a+=M(o=o.value,t,n,u=r+P(o,s++),i);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function L(e,t,n){if(null==e)return e;var r=[],i=0;return M(e,r,"","",function(e){return t.call(n,e,i++)}),r}function D(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var F={current:null},z={transition:null},U={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:z,ReactCurrentOwner:O};function B(){throw Error("act(...) is not supported in production builds of React.")}s.Children={map:L,forEach:function(e,t,n){L(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return L(e,function(){t++}),t},toArray:function(e){return L(e,function(e){return e})||[]},only:function(e){if(!j(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},s.Component=_,s.Fragment=u,s.Profiler=p,s.PureComponent=C,s.StrictMode=d,s.Suspense=g,s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U,s.act=B,s.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=w({},e.props),i=e.key,o=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,a=O.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)N.call(t,c)&&!T.hasOwnProperty(c)&&(r[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)r.children=n;else if(1<c){s=Array(c);for(var u=0;u<c;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:l,type:e.type,key:i,ref:o,props:r,_owner:a}},s.createContext=function(e){return(e={$$typeof:h,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:f,_context:e},e.Consumer=e},s.createElement=R,s.createFactory=function(e){var t=R.bind(null,e);return t.type=e,t},s.createRef=function(){return{current:null}},s.forwardRef=function(e){return{$$typeof:m,render:e}},s.isValidElement=j,s.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:D}},s.memo=function(e,t){return{$$typeof:v,type:e,compare:void 0===t?null:t}},s.startTransition=function(e){var t=z.transition;z.transition={};try{e()}finally{z.transition=t}},s.unstable_act=B,s.useCallback=function(e,t){return F.current.useCallback(e,t)},s.useContext=function(e){return F.current.useContext(e)},s.useDebugValue=function(){},s.useDeferredValue=function(e){return F.current.useDeferredValue(e)},s.useEffect=function(e,t){return F.current.useEffect(e,t)},s.useId=function(){return F.current.useId()},s.useImperativeHandle=function(e,t,n){return F.current.useImperativeHandle(e,t,n)},s.useInsertionEffect=function(e,t){return F.current.useInsertionEffect(e,t)},s.useLayoutEffect=function(e,t){return F.current.useLayoutEffect(e,t)},s.useMemo=function(e,t){return F.current.useMemo(e,t)},s.useReducer=function(e,t,n){return F.current.useReducer(e,t,n)},s.useRef=function(e){return F.current.useRef(e)},s.useState=function(e){return F.current.useState(e)},s.useSyncExternalStore=function(e,t,n){return F.current.useSyncExternalStore(e,t,n)},s.useTransition=function(){return F.current.useTransition()},s.version="18.3.1",a.exports=s;var $=a.exports;const V=r($);
|
|
2
|
+
/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.min.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var W=$,q=Symbol.for("react.element"),H=Symbol.for("react.fragment"),K=Object.prototype.hasOwnProperty,Z=W.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,G={key:!0,ref:!0,__self:!0,__source:!0};function J(e,t,n){var r,i={},o=null,a=null;for(r in void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),void 0!==t.ref&&(a=t.ref),t)K.call(t,r)&&!G.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:q,type:e,key:o,ref:a,props:i,_owner:Z.current}}o.Fragment=H,o.jsx=J,o.jsxs=J,i.exports=o;var Y=i.exports,X={},Q={exports:{}},ee={},te={exports:{}},ne={};
|
|
11
|
+
/**
|
|
12
|
+
* @license React
|
|
13
|
+
* scheduler.production.min.js
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE file in the root directory of this source tree.
|
|
19
|
+
*/
|
|
20
|
+
!function(e){function t(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function n(e){return 0===e.length?null:e[0]}function r(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>i(l,n))c<o&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<o&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,p=3,f=!1,h=!1,m=!1,g="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var i=n(c);null!==i;){if(null===i.callback)r(c);else{if(!(i.startTime<=e))break;r(c),i.sortIndex=i.expirationTime,t(l,i)}i=n(c)}}function x(e){if(m=!1,b(e),!h)if(null!==n(l))h=!0,j(w);else{var t=n(c);null!==t&&A(x,t.startTime-e)}}function w(t,i){h=!1,m&&(m=!1,v(C),C=-1),f=!0;var o=p;try{for(b(i),d=n(l);null!==d&&(!(d.expirationTime>i)||t&&!N());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var s=a(d.expirationTime<=i);i=e.unstable_now(),"function"==typeof s?d.callback=s:d===n(l)&&r(l),b(i)}else r(l);d=n(l)}if(null!==d)var u=!0;else{var g=n(c);null!==g&&A(x,g.startTime-i),u=!1}return u}finally{d=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,_=!1,S=null,C=-1,E=5,I=-1;function N(){return!(e.unstable_now()-I<E)}function O(){if(null!==S){var t=e.unstable_now();I=t;var n=!0;try{n=S(!0,t)}finally{n?k():(_=!1,S=null)}}else _=!1}if("function"==typeof y)k=function(){y(O)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,R=T.port2;T.port1.onmessage=O,k=function(){R.postMessage(null)}}else k=function(){g(O,0)};function j(e){S=e,_||(_=!0,k())}function A(t,n){C=g(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_continueExecution=function(){h||f||(h=!0,j(w))},e.unstable_forceFrameRate=function(e){0>e||125<e||(E=0<e?Math.floor(1e3/e):5)},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_scheduleCallback=function(r,i,o){var a=e.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return r={id:u++,callback:i,priorityLevel:r,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(r.sortIndex=o,t(c,r),null===n(l)&&r===n(c)&&(m?(v(C),C=-1):m=!0,A(x,o-a))):(r.sortIndex=s,t(l,r),h||f||(h=!0,j(w))),r},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}(ne),te.exports=ne;var re=te.exports,ie=$,oe=re;
|
|
21
|
+
/**
|
|
22
|
+
* @license React
|
|
23
|
+
* react-dom.production.min.js
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the MIT license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/function ae(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var se=new Set,le={};function ce(e,t){ue(e,t),ue(e+"Capture",t)}function ue(e,t){for(le[e]=t,e=0;e<t.length;e++)se.add(t[e])}var de=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),pe=Object.prototype.hasOwnProperty,fe=/^[: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]*$/,he={},me={};function ge(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new ge(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new ge(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new ge(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new ge(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ve[e]=new ge(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new ge(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){ve[e]=new ge(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){ve[e]=new ge(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){ve[e]=new ge(e,5,!1,e.toLowerCase(),null,!1,!1)});var ye=/[\-:]([a-z])/g;function be(e){return e[1].toUpperCase()}function xe(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!pe.call(me,e)||!pe.call(he,e)&&(fe.test(e)?me[e]=!0:(he[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ye,be);ve[t]=new ge(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ye,be);ve[t]=new ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ye,be);ve[t]=new ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new ge(e,1,!1,e.toLowerCase(),null,!1,!1)}),ve.xlinkHref=new ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){ve[e]=new ge(e,1,!1,e.toLowerCase(),null,!0,!0)});var we=ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ke=Symbol.for("react.element"),_e=Symbol.for("react.portal"),Se=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),Ee=Symbol.for("react.profiler"),Ie=Symbol.for("react.provider"),Ne=Symbol.for("react.context"),Oe=Symbol.for("react.forward_ref"),Te=Symbol.for("react.suspense"),Re=Symbol.for("react.suspense_list"),je=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),Pe=Symbol.for("react.offscreen"),Me=Symbol.iterator;function Le(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=Me&&e[Me]||e["@@iterator"])?e:null}var De,Fe=Object.assign;function ze(e){if(void 0===De)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||""}return"\n"+De+e}var Ue=!1;function Be(e,t){if(!e||Ue)return"";Ue=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&"string"==typeof c.stack){for(var i=c.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{Ue=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ze(e):""}function $e(e){switch(e.tag){case 5:return ze(e.type);case 16:return ze("Lazy");case 13:return ze("Suspense");case 19:return ze("SuspenseList");case 0:case 2:case 15:return e=Be(e.type,!1);case 11:return e=Be(e.type.render,!1);case 1:return e=Be(e.type,!0);default:return""}}function Ve(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case Se:return"Fragment";case _e:return"Portal";case Ee:return"Profiler";case Ce:return"StrictMode";case Te:return"Suspense";case Re:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case Ne:return(e.displayName||"Context")+".Consumer";case Ie:return(e._context.displayName||"Context")+".Provider";case Oe:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case je:return null!==(t=e.displayName||null)?t:Ve(e.type)||"Memo";case Ae:t=e._payload,e=e._init;try{return Ve(e(t))}catch(n){}}return null}function We(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ve(t);case 8:return t===Ce?"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("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function qe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function He(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Ke(e){e._valueTracker||(e._valueTracker=function(e){var t=He(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function Ze(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=He(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ge(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function Je(e,t){var n=t.checked;return Fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Ye(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=qe(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Xe(e,t){null!=(t=t.checked)&&xe(e,"checked",t,!1)}function Qe(e,t){Xe(e,t);var n=qe(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?tt(e,t.type,n):t.hasOwnProperty("defaultValue")&&tt(e,t.type,qe(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function et(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function tt(e,t,n){"number"===t&&Ge(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var nt=Array.isArray;function rt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+qe(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function it(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(ae(91));return Fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ot(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(ae(92));if(nt(n)){if(1<n.length)throw Error(ae(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:qe(n)}}function at(e,t){var n=qe(t.value),r=qe(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function st(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function lt(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ct(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?lt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ut,dt,pt=(dt=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ut=ut||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ut.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction(function(){return dt(e,t)})}:dt);function ft(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ht={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},mt=["Webkit","ms","Moz","O"];function gt(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ht.hasOwnProperty(e)&&ht[e]?(""+t).trim():t+"px"}function vt(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=gt(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(ht).forEach(function(e){mt.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ht[t]=ht[e]})});var yt=Fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bt(e,t){if(t){if(yt[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(ae(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(ae(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(ae(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(ae(62))}}function xt(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var wt=null;function kt(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var _t=null,St=null,Ct=null;function Et(e){if(e=wo(e)){if("function"!=typeof _t)throw Error(ae(280));var t=e.stateNode;t&&(t=_o(t),_t(e.stateNode,e.type,t))}}function It(e){St?Ct?Ct.push(e):Ct=[e]:St=e}function Nt(){if(St){var e=St,t=Ct;if(Ct=St=null,Et(e),t)for(e=0;e<t.length;e++)Et(t[e])}}function Ot(e,t){return e(t)}function Tt(){}var Rt=!1;function jt(e,t,n){if(Rt)return e(t,n);Rt=!0;try{return Ot(e,t,n)}finally{Rt=!1,(null!==St||null!==Ct)&&(Tt(),Nt())}}function At(e,t){var n=e.stateNode;if(null===n)return null;var r=_o(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(ae(231,t,typeof n));return n}var Pt=!1;if(de)try{var Mt={};Object.defineProperty(Mt,"passive",{get:function(){Pt=!0}}),window.addEventListener("test",Mt,Mt),window.removeEventListener("test",Mt,Mt)}catch(dt){Pt=!1}function Lt(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var Dt=!1,Ft=null,zt=!1,Ut=null,Bt={onError:function(e){Dt=!0,Ft=e}};function $t(e,t,n,r,i,o,a,s,l){Dt=!1,Ft=null,Lt.apply(Bt,arguments)}function Vt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{!!(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Wt(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function qt(e){if(Vt(e)!==e)throw Error(ae(188))}function Ht(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Vt(e)))throw Error(ae(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return qt(i),e;if(o===r)return qt(i),t;o=o.sibling}throw Error(ae(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(ae(189))}}if(n.alternate!==r)throw Error(ae(190))}if(3!==n.tag)throw Error(ae(188));return n.stateNode.current===n?e:t}(e))?Kt(e):null}function Kt(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Kt(e);if(null!==t)return t;e=e.sibling}return null}var Zt=oe.unstable_scheduleCallback,Gt=oe.unstable_cancelCallback,Jt=oe.unstable_shouldYield,Yt=oe.unstable_requestPaint,Xt=oe.unstable_now,Qt=oe.unstable_getCurrentPriorityLevel,en=oe.unstable_ImmediatePriority,tn=oe.unstable_UserBlockingPriority,nn=oe.unstable_NormalPriority,rn=oe.unstable_LowPriority,on=oe.unstable_IdlePriority,an=null,sn=null;var ln=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(cn(e)/un|0)|0},cn=Math.log,un=Math.LN2;var dn=64,pn=4194304;function fn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hn(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=fn(s):0!==(o&=a)&&(r=fn(o))}else 0!==(a=n&~i)?r=fn(a):0!==o&&(r=fn(o));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&4194240&o))return t;if(4&r&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ln(t)),r|=e[n],t&=~i;return r}function mn(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function gn(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function vn(){var e=dn;return!(4194240&(dn<<=1))&&(dn=64),e}function yn(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function bn(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ln(t)]=n}function xn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ln(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var wn=0;function kn(e){return 1<(e&=-e)?4<e?268435455&e?16:536870912:4:1}var _n,Sn,Cn,En,In,Nn=!1,On=[],Tn=null,Rn=null,jn=null,An=new Map,Pn=new Map,Mn=[],Ln="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 Dn(e,t){switch(e){case"focusin":case"focusout":Tn=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":jn=null;break;case"pointerover":case"pointerout":An.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pn.delete(t.pointerId)}}function Fn(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=wo(t))&&Sn(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function zn(e){var t=xo(e.target);if(null!==t){var n=Vt(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Wt(n)))return e.blockedOn=t,void In(e.priority,function(){Cn(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Un(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Yn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=wo(n))&&Sn(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);wt=r,n.target.dispatchEvent(r),wt=null,t.shift()}return!0}function Bn(e,t,n){Un(e)&&n.delete(t)}function $n(){Nn=!1,null!==Tn&&Un(Tn)&&(Tn=null),null!==Rn&&Un(Rn)&&(Rn=null),null!==jn&&Un(jn)&&(jn=null),An.forEach(Bn),Pn.forEach(Bn)}function Vn(e,t){e.blockedOn===t&&(e.blockedOn=null,Nn||(Nn=!0,oe.unstable_scheduleCallback(oe.unstable_NormalPriority,$n)))}function Wn(e){function t(t){return Vn(t,e)}if(0<On.length){Vn(On[0],e);for(var n=1;n<On.length;n++){var r=On[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tn&&Vn(Tn,e),null!==Rn&&Vn(Rn,e),null!==jn&&Vn(jn,e),An.forEach(t),Pn.forEach(t),n=0;n<Mn.length;n++)(r=Mn[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Mn.length&&null===(n=Mn[0]).blockedOn;)zn(n),null===n.blockedOn&&Mn.shift()}var qn=we.ReactCurrentBatchConfig,Hn=!0;function Kn(e,t,n,r){var i=wn,o=qn.transition;qn.transition=null;try{wn=1,Gn(e,t,n,r)}finally{wn=i,qn.transition=o}}function Zn(e,t,n,r){var i=wn,o=qn.transition;qn.transition=null;try{wn=4,Gn(e,t,n,r)}finally{wn=i,qn.transition=o}}function Gn(e,t,n,r){if(Hn){var i=Yn(e,t,n,r);if(null===i)qi(e,t,r,Jn,n),Dn(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tn=Fn(Tn,e,t,n,r,i),!0;case"dragenter":return Rn=Fn(Rn,e,t,n,r,i),!0;case"mouseover":return jn=Fn(jn,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return An.set(o,Fn(An.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Pn.set(o,Fn(Pn.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Dn(e,r),4&t&&-1<Ln.indexOf(e)){for(;null!==i;){var o=wo(i);if(null!==o&&_n(o),null===(o=Yn(e,t,n,r))&&qi(e,t,r,Jn,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else qi(e,t,r,null,n)}}var Jn=null;function Yn(e,t,n,r){if(Jn=null,null!==(e=xo(e=kt(r))))if(null===(t=Vt(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Wt(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Jn=e,null}function Xn(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qt()){case en:return 1;case tn:return 4;case nn:case rn:return 16;case on:return 536870912;default:return 16}default:return 16}}var Qn=null,er=null,tr=null;function nr(){if(tr)return tr;var e,t,n=er,r=n.length,i="value"in Qn?Qn.value:Qn.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return tr=i.slice(e,1<t?1-t:void 0)}function rr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function ir(){return!0}function or(){return!1}function ar(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?ir:or,this.isPropagationStopped=or,this}return Fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ir)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ir)},persist:function(){},isPersistent:ir}),t}var sr,lr,cr,ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dr=ar(ur),pr=Fe({},ur,{view:0,detail:0}),fr=ar(pr),hr=Fe({},pr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Er,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cr&&(cr&&"mousemove"===e.type?(sr=e.screenX-cr.screenX,lr=e.screenY-cr.screenY):lr=sr=0,cr=e),sr)},movementY:function(e){return"movementY"in e?e.movementY:lr}}),mr=ar(hr),gr=ar(Fe({},hr,{dataTransfer:0})),vr=ar(Fe({},pr,{relatedTarget:0})),yr=ar(Fe({},ur,{animationName:0,elapsedTime:0,pseudoElement:0})),br=Fe({},ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xr=ar(br),wr=ar(Fe({},ur,{data:0})),kr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_r={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"},Sr={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sr[e])&&!!t[e]}function Er(){return Cr}var Ir=Fe({},pr,{key:function(e){if(e.key){var t=kr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_r[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Er,charCode:function(e){return"keypress"===e.type?rr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Nr=ar(Ir),Or=ar(Fe({},hr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tr=ar(Fe({},pr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Er})),Rr=ar(Fe({},ur,{propertyName:0,elapsedTime:0,pseudoElement:0})),jr=Fe({},hr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ar=ar(jr),Pr=[9,13,27,32],Mr=de&&"CompositionEvent"in window,Lr=null;de&&"documentMode"in document&&(Lr=document.documentMode);var Dr=de&&"TextEvent"in window&&!Lr,Fr=de&&(!Mr||Lr&&8<Lr&&11>=Lr),zr=String.fromCharCode(32),Ur=!1;function Br(e,t){switch(e){case"keyup":return-1!==Pr.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $r(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Vr=!1;var Wr={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 qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Wr[e.type]:"textarea"===t}function Hr(e,t,n,r){It(r),0<(t=Ki(t,"onChange")).length&&(n=new dr("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kr=null,Zr=null;function Gr(e){zi(e,0)}function Jr(e){if(Ze(ko(e)))return e}function Yr(e,t){if("change"===e)return t}var Xr=!1;if(de){var Qr;if(de){var ei="oninput"in document;if(!ei){var ti=document.createElement("div");ti.setAttribute("oninput","return;"),ei="function"==typeof ti.oninput}Qr=ei}else Qr=!1;Xr=Qr&&(!document.documentMode||9<document.documentMode)}function ni(){Kr&&(Kr.detachEvent("onpropertychange",ri),Zr=Kr=null)}function ri(e){if("value"===e.propertyName&&Jr(Zr)){var t=[];Hr(t,Zr,e,kt(e)),jt(Gr,t)}}function ii(e,t,n){"focusin"===e?(ni(),Zr=n,(Kr=t).attachEvent("onpropertychange",ri)):"focusout"===e&&ni()}function oi(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jr(Zr)}function ai(e,t){if("click"===e)return Jr(t)}function si(e,t){if("input"===e||"change"===e)return Jr(t)}var li="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ci(e,t){if(li(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!pe.call(t,i)||!li(e[i],t[i]))return!1}return!0}function ui(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function di(e,t){var n,r=ui(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ui(r)}}function pi(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pi(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fi(){for(var e=window,t=Ge();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=Ge((e=t.contentWindow).document)}return t}function hi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function mi(e){var t=fi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&pi(n.ownerDocument.documentElement,n)){if(null!==r&&hi(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=di(n,o);var a=di(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gi=de&&"documentMode"in document&&11>=document.documentMode,vi=null,yi=null,bi=null,xi=!1;function wi(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xi||null==vi||vi!==Ge(r)||("selectionStart"in(r=vi)&&hi(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},bi&&ci(bi,r)||(bi=r,0<(r=Ki(yi,"onSelect")).length&&(t=new dr("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vi)))}function ki(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _i={animationend:ki("Animation","AnimationEnd"),animationiteration:ki("Animation","AnimationIteration"),animationstart:ki("Animation","AnimationStart"),transitionend:ki("Transition","TransitionEnd")},Si={},Ci={};function Ei(e){if(Si[e])return Si[e];if(!_i[e])return e;var t,n=_i[e];for(t in n)if(n.hasOwnProperty(t)&&t in Ci)return Si[e]=n[t];return e}de&&(Ci=document.createElement("div").style,"AnimationEvent"in window||(delete _i.animationend.animation,delete _i.animationiteration.animation,delete _i.animationstart.animation),"TransitionEvent"in window||delete _i.transitionend.transition);var Ii=Ei("animationend"),Ni=Ei("animationiteration"),Oi=Ei("animationstart"),Ti=Ei("transitionend"),Ri=new Map,ji="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 Ai(e,t){Ri.set(e,t),ce(t,[e])}for(var Pi=0;Pi<ji.length;Pi++){var Mi=ji[Pi];Ai(Mi.toLowerCase(),"on"+(Mi[0].toUpperCase()+Mi.slice(1)))}Ai(Ii,"onAnimationEnd"),Ai(Ni,"onAnimationIteration"),Ai(Oi,"onAnimationStart"),Ai("dblclick","onDoubleClick"),Ai("focusin","onFocus"),Ai("focusout","onBlur"),Ai(Ti,"onTransitionEnd"),ue("onMouseEnter",["mouseout","mouseover"]),ue("onMouseLeave",["mouseout","mouseover"]),ue("onPointerEnter",["pointerout","pointerover"]),ue("onPointerLeave",["pointerout","pointerover"]),ce("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ce("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ce("onBeforeInput",["compositionend","keypress","textInput","paste"]),ce("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ce("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ce("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Li="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(" "),Di=new Set("cancel close invalid load scroll toggle".split(" ").concat(Li));function Fi(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,a,s,l){if($t.apply(this,arguments),Dt){if(!Dt)throw Error(ae(198));var c=Ft;Dt=!1,Ft=null,zt||(zt=!0,Ut=c)}}(r,t,void 0,e),e.currentTarget=null}function zi(e,t){t=!!(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Fi(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Fi(i,s,c),o=l}}}if(zt)throw e=Ut,zt=!1,Ut=null,e}function Ui(e,t){var n=t[vo];void 0===n&&(n=t[vo]=new Set);var r=e+"__bubble";n.has(r)||(Wi(t,e,2,!1),n.add(r))}function Bi(e,t,n){var r=0;t&&(r|=4),Wi(n,e,r,t)}var $i="_reactListening"+Math.random().toString(36).slice(2);function Vi(e){if(!e[$i]){e[$i]=!0,se.forEach(function(t){"selectionchange"!==t&&(Di.has(t)||Bi(t,!1,e),Bi(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[$i]||(t[$i]=!0,Bi("selectionchange",!1,t))}}function Wi(e,t,n,r){switch(Xn(t)){case 1:var i=Kn;break;case 4:i=Zn;break;default:i=Gn}n=i.bind(null,t,n,e),i=void 0,!Pt||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function qi(e,t,n,r,i){var o=r;if(!(1&t||2&t||null===r))e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=xo(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}jt(function(){var r=o,i=kt(n),a=[];e:{var s=Ri.get(e);if(void 0!==s){var l=dr,c=e;switch(e){case"keypress":if(0===rr(n))break e;case"keydown":case"keyup":l=Nr;break;case"focusin":c="focus",l=vr;break;case"focusout":c="blur",l=vr;break;case"beforeblur":case"afterblur":l=vr;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=mr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=gr;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tr;break;case Ii:case Ni:case Oi:l=yr;break;case Ti:l=Rr;break;case"scroll":l=fr;break;case"wheel":l=Ar;break;case"copy":case"cut":case"paste":l=xr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Or}var u=!!(4&t),d=!u&&"scroll"===e,p=u?null!==s?s+"Capture":null:s;u=[];for(var f,h=r;null!==h;){var m=(f=h).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==p&&(null!=(m=At(h,p))&&u.push(Hi(h,m,f)))),d)break;h=h.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(!(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===wt||!(c=n.relatedTarget||n.fromElement)||!xo(c)&&!c[go])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?xo(c):null)&&(c!==(d=Vt(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=mr,m="onMouseLeave",p="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(u=Or,m="onPointerLeave",p="onPointerEnter",h="pointer"),d=null==l?s:ko(l),f=null==c?s:ko(c),(s=new u(m,h+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,xo(i)===r&&((u=new u(p,h+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(p=c,h=0,f=u=l;f;f=Zi(f))h++;for(f=0,m=p;m;m=Zi(m))f++;for(;0<h-f;)u=Zi(u),h--;for(;0<f-h;)p=Zi(p),f--;for(;h--;){if(u===p||null!==p&&u===p.alternate)break e;u=Zi(u),p=Zi(p)}u=null}else u=null;null!==l&&Gi(a,s,l,u,!1),null!==c&&null!==d&&Gi(a,d,c,u,!0)}if("select"===(l=(s=r?ko(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Yr;else if(qr(s))if(Xr)g=si;else{g=oi;var v=ii}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=ai);switch(g&&(g=g(e,r))?Hr(a,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&tt(s,"number",s.value)),v=r?ko(r):window,e){case"focusin":(qr(v)||"true"===v.contentEditable)&&(vi=v,yi=r,bi=null);break;case"focusout":bi=yi=vi=null;break;case"mousedown":xi=!0;break;case"contextmenu":case"mouseup":case"dragend":xi=!1,wi(a,n,i);break;case"selectionchange":if(gi)break;case"keydown":case"keyup":wi(a,n,i)}var y;if(Mr)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Vr?Br(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Fr&&"ko"!==n.locale&&(Vr||"onCompositionStart"!==b?"onCompositionEnd"===b&&Vr&&(y=nr()):(er="value"in(Qn=i)?Qn.value:Qn.textContent,Vr=!0)),0<(v=Ki(r,b)).length&&(b=new wr(b,e,null,n,i),a.push({event:b,listeners:v}),y?b.data=y:null!==(y=$r(n))&&(b.data=y))),(y=Dr?function(e,t){switch(e){case"compositionend":return $r(t);case"keypress":return 32!==t.which?null:(Ur=!0,zr);case"textInput":return(e=t.data)===zr&&Ur?null:e;default:return null}}(e,n):function(e,t){if(Vr)return"compositionend"===e||!Mr&&Br(e,t)?(e=nr(),tr=er=Qn=null,Vr=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Fr&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Ki(r,"onBeforeInput")).length&&(i=new wr("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}zi(a,t)})}function Hi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ki(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=At(e,n))&&r.unshift(Hi(e,o,i)),null!=(o=At(e,t))&&r.push(Hi(e,o,i))),e=e.return}return r}function Zi(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Gi(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=At(n,o))&&a.unshift(Hi(n,l,s)):i||null!=(l=At(n,o))&&a.push(Hi(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Ji=/\r\n?/g,Yi=/\u0000|\uFFFD/g;function Xi(e){return("string"==typeof e?e:""+e).replace(Ji,"\n").replace(Yi,"")}function Qi(e,t,n){if(t=Xi(t),Xi(e)!==t&&n)throw Error(ae(425))}function eo(){}var to=null,no=null;function ro(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var io="function"==typeof setTimeout?setTimeout:void 0,oo="function"==typeof clearTimeout?clearTimeout:void 0,ao="function"==typeof Promise?Promise:void 0,so="function"==typeof queueMicrotask?queueMicrotask:void 0!==ao?function(e){return ao.resolve(null).then(e).catch(lo)}:io;function lo(e){setTimeout(function(){throw e})}function co(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Wn(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Wn(t)}function uo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function po(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),ho="__reactFiber$"+fo,mo="__reactProps$"+fo,go="__reactContainer$"+fo,vo="__reactEvents$"+fo,yo="__reactListeners$"+fo,bo="__reactHandles$"+fo;function xo(e){var t=e[ho];if(t)return t;for(var n=e.parentNode;n;){if(t=n[go]||n[ho]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=po(e);null!==e;){if(n=e[ho])return n;e=po(e)}return t}n=(e=n).parentNode}return null}function wo(e){return!(e=e[ho]||e[go])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ko(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(ae(33))}function _o(e){return e[mo]||null}var So=[],Co=-1;function Eo(e){return{current:e}}function Io(e){0>Co||(e.current=So[Co],So[Co]=null,Co--)}function No(e,t){Co++,So[Co]=e.current,e.current=t}var Oo={},To=Eo(Oo),Ro=Eo(!1),jo=Oo;function Ao(e,t){var n=e.type.contextTypes;if(!n)return Oo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Po(e){return null!=(e=e.childContextTypes)}function Mo(){Io(Ro),Io(To)}function Lo(e,t,n){if(To.current!==Oo)throw Error(ae(168));No(To,t),No(Ro,n)}function Do(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(ae(108,We(e)||"Unknown",i));return Fe({},n,r)}function Fo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Oo,jo=To.current,No(To,e),No(Ro,Ro.current),!0}function zo(e,t,n){var r=e.stateNode;if(!r)throw Error(ae(169));n?(e=Do(e,t,jo),r.__reactInternalMemoizedMergedChildContext=e,Io(Ro),Io(To),No(To,e)):Io(Ro),No(Ro,n)}var Uo=null,Bo=!1,$o=!1;function Vo(e){null===Uo?Uo=[e]:Uo.push(e)}function Wo(){if(!$o&&null!==Uo){$o=!0;var e=0,t=wn;try{var n=Uo;for(wn=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Uo=null,Bo=!1}catch(rh){throw null!==Uo&&(Uo=Uo.slice(e+1)),Zt(en,Wo),rh}finally{wn=t,$o=!1}}return null}var qo=[],Ho=0,Ko=null,Zo=0,Go=[],Jo=0,Yo=null,Xo=1,Qo="";function ea(e,t){qo[Ho++]=Zo,qo[Ho++]=Ko,Ko=e,Zo=t}function ta(e,t,n){Go[Jo++]=Xo,Go[Jo++]=Qo,Go[Jo++]=Yo,Yo=e;var r=Xo;e=Qo;var i=32-ln(r)-1;r&=~(1<<i),n+=1;var o=32-ln(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Xo=1<<32-ln(t)+i|n<<i|r,Qo=o+e}else Xo=1<<o|n<<i|r,Qo=e}function na(e){null!==e.return&&(ea(e,1),ta(e,1,0))}function ra(e){for(;e===Ko;)Ko=qo[--Ho],qo[Ho]=null,Zo=qo[--Ho],qo[Ho]=null;for(;e===Yo;)Yo=Go[--Jo],Go[Jo]=null,Qo=Go[--Jo],Go[Jo]=null,Xo=Go[--Jo],Go[Jo]=null}var ia=null,oa=null,aa=!1,sa=null;function la(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ca(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,ia=e,oa=uo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,ia=e,oa=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Yo?{id:Xo,overflow:Qo}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(18,null,null,0)).stateNode=t,n.return=e,e.child=n,ia=e,oa=null,!0);default:return!1}}function ua(e){return!(!(1&e.mode)||128&e.flags)}function da(e){if(aa){var t=oa;if(t){var n=t;if(!ca(e,t)){if(ua(e))throw Error(ae(418));t=uo(n.nextSibling);var r=ia;t&&ca(e,t)?la(r,n):(e.flags=-4097&e.flags|2,aa=!1,ia=e)}}else{if(ua(e))throw Error(ae(418));e.flags=-4097&e.flags|2,aa=!1,ia=e}}}function pa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;ia=e}function fa(e){if(e!==ia)return!1;if(!aa)return pa(e),aa=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ro(e.type,e.memoizedProps)),t&&(t=oa)){if(ua(e))throw ha(),Error(ae(418));for(;t;)la(e,t),t=uo(t.nextSibling)}if(pa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(ae(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){oa=uo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}oa=null}}else oa=ia?uo(e.stateNode.nextSibling):null;return!0}function ha(){for(var e=oa;e;)e=uo(e.nextSibling)}function ma(){oa=ia=null,aa=!1}function ga(e){null===sa?sa=[e]:sa.push(e)}var va=we.ReactCurrentBatchConfig;function ya(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(ae(309));var r=n.stateNode}if(!r)throw Error(ae(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=i.refs;null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(ae(284));if(!n._owner)throw Error(ae(290,e))}return e}function ba(e,t){throw e=Object.prototype.toString.call(t),Error(ae(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function xa(e){return(0,e._init)(e._payload)}function wa(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Au(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function a(t){return e&&null===t.alternate&&(t.flags|=2),t}function s(e,t,n,r){return null===t||6!==t.tag?((t=Du(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function l(e,t,n,r){var o=n.type;return o===Se?u(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===Ae&&xa(o)===t.type)?((r=i(t,n.props)).ref=ya(e,t,n),r.return=e,r):((r=Pu(n.type,n.key,n.props,null,e.mode,r)).ref=ya(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Fu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function u(e,t,n,r,o){return null===t||7!==t.tag?((t=Mu(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Du(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ke:return(n=Pu(t.type,t.key,t.props,null,e.mode,n)).ref=ya(e,null,t),n.return=e,n;case _e:return(t=Fu(t,e.mode,n)).return=e,t;case Ae:return d(e,(0,t._init)(t._payload),n)}if(nt(t)||Le(t))return(t=Mu(t,e.mode,n,null)).return=e,t;ba(e,t)}return null}function p(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ke:return n.key===i?l(e,t,n,r):null;case _e:return n.key===i?c(e,t,n,r):null;case Ae:return p(e,t,(i=n._init)(n._payload),r)}if(nt(n)||Le(n))return null!==i?null:u(e,t,n,r,null);ba(e,n)}return null}function f(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ke:return l(t,e=e.get(null===r.key?n:r.key)||null,r,i);case _e:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case Ae:return f(e,t,n,(0,r._init)(r._payload),i)}if(nt(r)||Le(r))return u(t,e=e.get(n)||null,r,i,null);ba(t,r)}return null}return function s(l,c,u,h){if("object"==typeof u&&null!==u&&u.type===Se&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case ke:e:{for(var m=u.key,g=c;null!==g;){if(g.key===m){if((m=u.type)===Se){if(7===g.tag){n(l,g.sibling),(c=i(g,u.props.children)).return=l,l=c;break e}}else if(g.elementType===m||"object"==typeof m&&null!==m&&m.$$typeof===Ae&&xa(m)===g.type){n(l,g.sibling),(c=i(g,u.props)).ref=ya(l,g,u),c.return=l,l=c;break e}n(l,g);break}t(l,g),g=g.sibling}u.type===Se?((c=Mu(u.props.children,l.mode,h,u.key)).return=l,l=c):((h=Pu(u.type,u.key,u.props,null,l.mode,h)).ref=ya(l,c,u),h.return=l,l=h)}return a(l);case _e:e:{for(g=u.key;null!==c;){if(c.key===g){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(c=i(c,u.children||[])).return=l,l=c;break e}n(l,c);break}t(l,c),c=c.sibling}(c=Fu(u,l.mode,h)).return=l,l=c}return a(l);case Ae:return s(l,c,(g=u._init)(u._payload),h)}if(nt(u))return function(i,a,s,l){for(var c=null,u=null,h=a,m=a=0,g=null;null!==h&&m<s.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=p(i,h,s[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,h=g}if(m===s.length)return n(i,h),aa&&ea(i,m),c;if(null===h){for(;m<s.length;m++)null!==(h=d(i,s[m],l))&&(a=o(h,a,m),null===u?c=h:u.sibling=h,u=h);return aa&&ea(i,m),c}for(h=r(i,h);m<s.length;m++)null!==(g=f(h,i,m,s[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach(function(e){return t(i,e)}),aa&&ea(i,m),c}(l,c,u,h);if(Le(u))return function(i,a,s,l){var c=Le(s);if("function"!=typeof c)throw Error(ae(150));if(null==(s=c.call(s)))throw Error(ae(151));for(var u=c=null,h=a,m=a=0,g=null,v=s.next();null!==h&&!v.done;m++,v=s.next()){h.index>m?(g=h,h=null):g=h.sibling;var y=p(i,h,v.value,l);if(null===y){null===h&&(h=g);break}e&&h&&null===y.alternate&&t(i,h),a=o(y,a,m),null===u?c=y:u.sibling=y,u=y,h=g}if(v.done)return n(i,h),aa&&ea(i,m),c;if(null===h){for(;!v.done;m++,v=s.next())null!==(v=d(i,v.value,l))&&(a=o(v,a,m),null===u?c=v:u.sibling=v,u=v);return aa&&ea(i,m),c}for(h=r(i,h);!v.done;m++,v=s.next())null!==(v=f(h,i,m,v.value,l))&&(e&&null!==v.alternate&&h.delete(null===v.key?m:v.key),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v);return e&&h.forEach(function(e){return t(i,e)}),aa&&ea(i,m),c}(l,c,u,h);ba(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(c=i(c,u)).return=l,l=c):(n(l,c),(c=Du(u,l.mode,h)).return=l,l=c),a(l)):n(l,c)}}var ka=wa(!0),_a=wa(!1),Sa=Eo(null),Ca=null,Ea=null,Ia=null;function Na(){Ia=Ea=Ca=null}function Oa(e){var t=Sa.current;Io(Sa),e._currentValue=t}function Ta(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ra(e,t){Ca=e,Ia=Ea=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(bl=!0),e.firstContext=null)}function ja(e){var t=e._currentValue;if(Ia!==e)if(e={context:e,memoizedValue:t,next:null},null===Ea){if(null===Ca)throw Error(ae(308));Ea=e,Ca.dependencies={lanes:0,firstContext:e}}else Ea=Ea.next=e;return t}var Aa=null;function Pa(e){null===Aa?Aa=[e]:Aa.push(e)}function Ma(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Pa(t)):(n.next=i.next,i.next=n),t.interleaved=n,La(e,r)}function La(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Da=!1;function Fa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function za(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ua(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&Nc){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,La(e,n)}return null===(i=r.interleaved)?(t.next=t,Pa(r)):(t.next=i.next,i.next=t),r.interleaved=t,La(e,n)}function $a(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xn(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Wa(e,t,n,r){var i=e.updateQueue;Da=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var d=i.baseState;for(a=0,u=c=l=null,s=o;;){var p=s.lane,f=s.eventTime;if((r&p)===p){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(p=t,f=n,m.tag){case 1:if("function"==typeof(h=m.payload)){d=h.call(f,d,p);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(p="function"==typeof(h=m.payload)?h.call(f,d,p):h))break e;d=Fe({},d,p);break e;case 2:Da=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[s]:p.push(s))}else f={eventTime:f,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,a|=p;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(p=s).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);Lc|=a,e.lanes=a,e.memoizedState=d}}function qa(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(ae(191,i));i.call(r)}}}var Ha={},Ka=Eo(Ha),Za=Eo(Ha),Ga=Eo(Ha);function Ja(e){if(e===Ha)throw Error(ae(174));return e}function Ya(e,t){switch(No(Ga,t),No(Za,e),No(Ka,Ha),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ct(null,"");break;default:t=ct(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Io(Ka),No(Ka,t)}function Xa(){Io(Ka),Io(Za),Io(Ga)}function Qa(e){Ja(Ga.current);var t=Ja(Ka.current),n=ct(t,e.type);t!==n&&(No(Za,e),No(Ka,n))}function es(e){Za.current===e&&(Io(Ka),Io(Za))}var ts=Eo(0);function ns(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(128&t.flags)return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=[];function is(){for(var e=0;e<rs.length;e++)rs[e]._workInProgressVersionPrimary=null;rs.length=0}var os=we.ReactCurrentDispatcher,as=we.ReactCurrentBatchConfig,ss=0,ls=null,cs=null,us=null,ds=!1,ps=!1,fs=0,hs=0;function ms(){throw Error(ae(321))}function gs(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!li(e[n],t[n]))return!1;return!0}function vs(e,t,n,r,i,o){if(ss=o,ls=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,os.current=null===e||null===e.memoizedState?el:tl,e=n(r,i),ps){o=0;do{if(ps=!1,fs=0,25<=o)throw Error(ae(301));o+=1,us=cs=null,t.updateQueue=null,os.current=nl,e=n(r,i)}while(ps)}if(os.current=Qs,t=null!==cs&&null!==cs.next,ss=0,us=cs=ls=null,ds=!1,t)throw Error(ae(300));return e}function ys(){var e=0!==fs;return fs=0,e}function bs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===us?ls.memoizedState=us=e:us=us.next=e,us}function xs(){if(null===cs){var e=ls.alternate;e=null!==e?e.memoizedState:null}else e=cs.next;var t=null===us?ls.memoizedState:us.next;if(null!==t)us=t,cs=e;else{if(null===e)throw Error(ae(310));e={memoizedState:(cs=e).memoizedState,baseState:cs.baseState,baseQueue:cs.baseQueue,queue:cs.queue,next:null},null===us?ls.memoizedState=us=e:us=us.next=e}return us}function ws(e,t){return"function"==typeof t?t(e):t}function ks(e){var t=xs(),n=t.queue;if(null===n)throw Error(ae(311));n.lastRenderedReducer=e;var r=cs,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((ss&u)===u)null!==l&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===l?(s=l=d,a=r):l=l.next=d,ls.lanes|=u,Lc|=u}c=c.next}while(null!==c&&c!==o);null===l?a=r:l.next=s,li(r,t.memoizedState)||(bl=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,ls.lanes|=o,Lc|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _s(e){var t=xs(),n=t.queue;if(null===n)throw Error(ae(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=e(o,a.action),a=a.next}while(a!==i);li(o,t.memoizedState)||(bl=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ss(){}function Cs(e,t){var n=ls,r=xs(),i=t(),o=!li(r.memoizedState,i);if(o&&(r.memoizedState=i,bl=!0),r=r.queue,Ds(Ns.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==us&&1&us.memoizedState.tag){if(n.flags|=2048,js(9,Is.bind(null,n,r,i,t),void 0,null),null===Oc)throw Error(ae(349));30&ss||Es(n,t,i)}return i}function Es(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ls.updateQueue)?(t={lastEffect:null,stores:null},ls.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Is(e,t,n,r){t.value=n,t.getSnapshot=r,Os(t)&&Ts(e)}function Ns(e,t,n){return n(function(){Os(t)&&Ts(e)})}function Os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!li(e,n)}catch(r){return!0}}function Ts(e){var t=La(e,1);null!==t&&nu(t,e,1,-1)}function Rs(e){var t=bs();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},t.queue=e,e=e.dispatch=Gs.bind(null,ls,e),[t.memoizedState,e]}function js(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ls.updateQueue)?(t={lastEffect:null,stores:null},ls.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function As(){return xs().memoizedState}function Ps(e,t,n,r){var i=bs();ls.flags|=e,i.memoizedState=js(1|t,n,void 0,void 0===r?null:r)}function Ms(e,t,n,r){var i=xs();r=void 0===r?null:r;var o=void 0;if(null!==cs){var a=cs.memoizedState;if(o=a.destroy,null!==r&&gs(r,a.deps))return void(i.memoizedState=js(t,n,o,r))}ls.flags|=e,i.memoizedState=js(1|t,n,o,r)}function Ls(e,t){return Ps(8390656,8,e,t)}function Ds(e,t){return Ms(2048,8,e,t)}function Fs(e,t){return Ms(4,2,e,t)}function zs(e,t){return Ms(4,4,e,t)}function Us(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Bs(e,t,n){return n=null!=n?n.concat([e]):null,Ms(4,4,Us.bind(null,t,e),n)}function $s(){}function Vs(e,t){var n=xs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gs(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ws(e,t){var n=xs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&gs(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function qs(e,t,n){return 21&ss?(li(n,t)||(n=vn(),ls.lanes|=n,Lc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,bl=!0),e.memoizedState=n)}function Hs(e,t){var n=wn;wn=0!==n&&4>n?n:4,e(!0);var r=as.transition;as.transition={};try{e(!1),t()}finally{wn=n,as.transition=r}}function Ks(){return xs().memoizedState}function Zs(e,t,n){var r=tu(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Js(e))Ys(t,n);else if(null!==(n=Ma(e,t,n,r))){nu(n,e,r,eu()),Xs(n,t,r)}}function Gs(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Js(e))Ys(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,li(s,a)){var l=t.interleaved;return null===l?(i.next=i,Pa(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(c){}null!==(n=Ma(e,t,i,r))&&(nu(n,e,r,i=eu()),Xs(n,t,r))}}function Js(e){var t=e.alternate;return e===ls||null!==t&&t===ls}function Ys(e,t){ps=ds=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xs(e,t,n){if(4194240&n){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,xn(e,n)}}var Qs={readContext:ja,useCallback:ms,useContext:ms,useEffect:ms,useImperativeHandle:ms,useInsertionEffect:ms,useLayoutEffect:ms,useMemo:ms,useReducer:ms,useRef:ms,useState:ms,useDebugValue:ms,useDeferredValue:ms,useTransition:ms,useMutableSource:ms,useSyncExternalStore:ms,useId:ms,unstable_isNewReconciler:!1},el={readContext:ja,useCallback:function(e,t){return bs().memoizedState=[e,void 0===t?null:t],e},useContext:ja,useEffect:Ls,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Ps(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ps(4,2,e,t)},useMemo:function(e,t){var n=bs();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bs();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Zs.bind(null,ls,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},bs().memoizedState=e},useState:Rs,useDebugValue:$s,useDeferredValue:function(e){return bs().memoizedState=e},useTransition:function(){var e=Rs(!1),t=e[0];return e=Hs.bind(null,e[1]),bs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ls,i=bs();if(aa){if(void 0===n)throw Error(ae(407));n=n()}else{if(n=t(),null===Oc)throw Error(ae(349));30&ss||Es(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Ls(Ns.bind(null,r,o,e),[e]),r.flags|=2048,js(9,Is.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bs(),t=Oc.identifierPrefix;if(aa){var n=Qo;t=":"+t+"R"+(n=(Xo&~(1<<32-ln(Xo)-1)).toString(32)+n),0<(n=fs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=hs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},tl={readContext:ja,useCallback:Vs,useContext:ja,useEffect:Ds,useImperativeHandle:Bs,useInsertionEffect:Fs,useLayoutEffect:zs,useMemo:Ws,useReducer:ks,useRef:As,useState:function(){return ks(ws)},useDebugValue:$s,useDeferredValue:function(e){return qs(xs(),cs.memoizedState,e)},useTransition:function(){return[ks(ws)[0],xs().memoizedState]},useMutableSource:Ss,useSyncExternalStore:Cs,useId:Ks,unstable_isNewReconciler:!1},nl={readContext:ja,useCallback:Vs,useContext:ja,useEffect:Ds,useImperativeHandle:Bs,useInsertionEffect:Fs,useLayoutEffect:zs,useMemo:Ws,useReducer:_s,useRef:As,useState:function(){return _s(ws)},useDebugValue:$s,useDeferredValue:function(e){var t=xs();return null===cs?t.memoizedState=e:qs(t,cs.memoizedState,e)},useTransition:function(){return[_s(ws)[0],xs().memoizedState]},useMutableSource:Ss,useSyncExternalStore:Cs,useId:Ks,unstable_isNewReconciler:!1};function rl(e,t){if(e&&e.defaultProps){for(var n in t=Fe({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}function il(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:Fe({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var ol={isMounted:function(e){return!!(e=e._reactInternals)&&Vt(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),o=Ua(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Ba(e,o,i))&&(nu(t,e,i,r),$a(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),o=Ua(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Ba(e,o,i))&&(nu(t,e,i,r),$a(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=Ua(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Ba(e,i,r))&&(nu(t,e,r,n),$a(t,e,r))}};function al(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!ci(n,r)||!ci(i,o))}function sl(e,t,n){var r=!1,i=Oo,o=t.contextType;return"object"==typeof o&&null!==o?o=ja(o):(i=Po(t)?jo:To.current,o=(r=null!=(r=t.contextTypes))?Ao(e,i):Oo),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=ol,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function ll(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ol.enqueueReplaceState(t,t.state,null)}function cl(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Fa(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=ja(o):(o=Po(t)?jo:To.current,i.context=Ao(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(il(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&ol.enqueueReplaceState(i,i.state,null),Wa(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function ul(e,t){try{var n="",r=t;do{n+=$e(r),r=r.return}while(r);var i=n}catch(o){i="\nError generating stack: "+o.message+"\n"+o.stack}return{value:e,source:t,stack:i,digest:null}}function dl(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}var pl="function"==typeof WeakMap?WeakMap:Map;function fl(e,t,n){(n=Ua(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wc||(Wc=!0,qc=r)},n}function hl(e,t,n){(n=Ua(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Hc?Hc=new Set([this]):Hc.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ml(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new pl;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Cu.bind(null,e,t,n),t.then(e,e))}function gl(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vl(e,t,n,r,i){return 1&e.mode?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ua(-1,1)).tag=2,Ba(n,t,1))),n.lanes|=1),e)}var yl=we.ReactCurrentOwner,bl=!1;function xl(e,t,n,r){t.child=null===e?_a(t,null,n,r):ka(t,e.child,n,r)}function wl(e,t,n,r,i){n=n.render;var o=t.ref;return Ra(t,i),r=vs(e,t,n,r,o,i),n=ys(),null===e||bl?(aa&&n&&na(t),t.flags|=1,xl(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wl(e,t,i))}function kl(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||ju(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,_l(e,t,o,r,i))}if(o=e.child,0===(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:ci)(a,r)&&e.ref===t.ref)return Wl(e,t,i)}return t.flags|=1,(e=Au(o,r)).ref=t.ref,e.return=t,t.child=e}function _l(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(ci(o,r)&&e.ref===t.ref){if(bl=!1,t.pendingProps=r=o,0===(e.lanes&i))return t.lanes=e.lanes,Wl(e,t,i);131072&e.flags&&(bl=!0)}}return El(e,t,n,r,i)}function Sl(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(1&t.mode){if(!(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,No(Ac,jc),jc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,No(Ac,jc),jc|=r}else t.memoizedState={baseLanes:0,cachePool:null,transitions:null},No(Ac,jc),jc|=n;else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,No(Ac,jc),jc|=r;return xl(e,t,i,n),t.child}function Cl(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function El(e,t,n,r,i){var o=Po(n)?jo:To.current;return o=Ao(t,o),Ra(t,i),n=vs(e,t,n,r,o,i),r=ys(),null===e||bl?(aa&&r&&na(t),t.flags|=1,xl(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wl(e,t,i))}function Il(e,t,n,r,i){if(Po(n)){var o=!0;Fo(t)}else o=!1;if(Ra(t,i),null===t.stateNode)Vl(e,t),sl(t,n,r),cl(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=ja(c):c=Ao(t,c=Po(n)?jo:To.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;d||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&ll(t,a,r,c),Da=!1;var p=t.memoizedState;a.state=p,Wa(t,r,a,i),l=t.memoizedState,s!==r||p!==l||Ro.current||Da?("function"==typeof u&&(il(t,n,u,r),l=t.memoizedState),(s=Da||al(t,n,s,r,p,l,c))?(d||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,za(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:rl(t.type,s),a.props=c,d=t.pendingProps,p=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=ja(l):l=Ao(t,l=Po(n)?jo:To.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==d||p!==l)&&ll(t,a,r,l),Da=!1,p=t.memoizedState,a.state=p,Wa(t,r,a,i);var h=t.memoizedState;s!==d||p!==h||Ro.current||Da?("function"==typeof f&&(il(t,n,f,r),h=t.memoizedState),(c=Da||al(t,n,c,r,p,h,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Nl(e,t,n,r,o,i)}function Nl(e,t,n,r,i,o){Cl(e,t);var a=!!(128&t.flags);if(!r&&!a)return i&&zo(t,n,!1),Wl(e,t,o);r=t.stateNode,yl.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=ka(t,e.child,null,o),t.child=ka(t,null,s,o)):xl(e,t,s,o),t.memoizedState=r.state,i&&zo(t,n,!0),t.child}function Ol(e){var t=e.stateNode;t.pendingContext?Lo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Lo(0,t.context,!1),Ya(e,t.containerInfo)}function Tl(e,t,n,r,i){return ma(),ga(i),t.flags|=256,xl(e,t,n,r),t.child}var Rl,jl,Al,Pl,Ml={dehydrated:null,treeContext:null,retryLane:0};function Ll(e){return{baseLanes:e,cachePool:null,transitions:null}}function Dl(e,t,n){var r,i=t.pendingProps,o=ts.current,a=!1,s=!!(128&t.flags);if((r=s)||(r=(null===e||null!==e.memoizedState)&&!!(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),No(ts,1&o),null===e)return da(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(1&t.mode?"$!"===e.data?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=i.children,e=i.fallback,a?(i=t.mode,a=t.child,s={mode:"hidden",children:s},1&i||null===a?a=Lu(s,i,0,null):(a.childLanes=0,a.pendingProps=s),e=Mu(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Ll(n),t.memoizedState=Ml,e):Fl(t,s));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,a){if(n)return 256&t.flags?(t.flags&=-257,zl(e,t,a,r=dl(Error(ae(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Lu({mode:"visible",children:r.children},i,0,null),(o=Mu(o,i,a,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,1&t.mode&&ka(t,e.child,null,a),t.child.memoizedState=Ll(a),t.memoizedState=Ml,o);if(!(1&t.mode))return zl(e,t,a,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var s=r.dgst;return r=s,zl(e,t,a,r=dl(o=Error(ae(419)),r,void 0))}if(s=0!==(a&e.childLanes),bl||s){if(null!==(r=Oc)){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!==(i&(r.suspendedLanes|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,La(e,i),nu(r,e,i,-1))}return mu(),zl(e,t,a,r=dl(Error(ae(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Iu.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,oa=uo(i.nextSibling),ia=t,aa=!0,sa=null,null!==e&&(Go[Jo++]=Xo,Go[Jo++]=Qo,Go[Jo++]=Yo,Xo=e.id,Qo=e.overflow,Yo=t),t=Fl(t,r.children),t.flags|=4096,t)}(e,t,s,i,r,o,n);if(a){a=i.fallback,s=t.mode,r=(o=e.child).sibling;var l={mode:"hidden",children:i.children};return 1&s||t.child===o?(i=Au(o,l)).subtreeFlags=14680064&o.subtreeFlags:((i=t.child).childLanes=0,i.pendingProps=l,t.deletions=null),null!==r?a=Au(r,a):(a=Mu(a,s,n,null)).flags|=2,a.return=t,i.return=t,i.sibling=a,t.child=i,i=a,a=t.child,s=null===(s=e.child.memoizedState)?Ll(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=e.childLanes&~n,t.memoizedState=Ml,i}return e=(a=e.child).sibling,i=Au(a,{mode:"visible",children:i.children}),!(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Fl(e,t){return(t=Lu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zl(e,t,n,r){return null!==r&&ga(r),ka(t,e.child,null,n),(e=Fl(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ul(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ta(e.return,t,n)}function Bl(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function $l(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(xl(e,t,r.children,n),2&(r=ts.current))r=1&r|2,t.flags|=128;else{if(null!==e&&128&e.flags)e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ul(e,n,t);else if(19===e.tag)Ul(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(No(ts,r),1&t.mode)switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ns(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bl(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ns(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bl(t,!0,n,null,o);break;case"together":Bl(t,!1,null,null,void 0);break;default:t.memoizedState=null}else t.memoizedState=null;return t.child}function Vl(e,t){!(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wl(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Lc|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(ae(153));if(null!==t.child){for(n=Au(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Au(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ql(e,t){if(!aa)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Kl(e,t,n){var r=t.pendingProps;switch(ra(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hl(t),null;case 1:case 17:return Po(t.type)&&Mo(),Hl(t),null;case 3:return r=t.stateNode,Xa(),Io(Ro),Io(To),is(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(fa(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&!(256&t.flags)||(t.flags|=1024,null!==sa&&(au(sa),sa=null))),jl(e,t),Hl(t),null;case 5:es(t);var i=Ja(Ga.current);if(n=t.type,null!==e&&null!=t.stateNode)Al(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(ae(166));return Hl(t),null}if(e=Ja(Ka.current),fa(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ho]=t,r[mo]=o,e=!!(1&t.mode),n){case"dialog":Ui("cancel",r),Ui("close",r);break;case"iframe":case"object":case"embed":Ui("load",r);break;case"video":case"audio":for(i=0;i<Li.length;i++)Ui(Li[i],r);break;case"source":Ui("error",r);break;case"img":case"image":case"link":Ui("error",r),Ui("load",r);break;case"details":Ui("toggle",r);break;case"input":Ye(r,o),Ui("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ui("invalid",r);break;case"textarea":ot(r,o),Ui("invalid",r)}for(var a in bt(n,o),i=null,o)if(o.hasOwnProperty(a)){var s=o[a];"children"===a?"string"==typeof s?r.textContent!==s&&(!0!==o.suppressHydrationWarning&&Qi(r.textContent,s,e),i=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(!0!==o.suppressHydrationWarning&&Qi(r.textContent,s,e),i=["children",""+s]):le.hasOwnProperty(a)&&null!=s&&"onScroll"===a&&Ui("scroll",r)}switch(n){case"input":Ke(r),et(r,o,!0);break;case"textarea":Ke(r),st(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=eo)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{a=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=lt(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=a.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),"select"===n&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ho]=t,e[mo]=r,Rl(e,t,!1,!1),t.stateNode=e;e:{switch(a=xt(n,r),n){case"dialog":Ui("cancel",e),Ui("close",e),i=r;break;case"iframe":case"object":case"embed":Ui("load",e),i=r;break;case"video":case"audio":for(i=0;i<Li.length;i++)Ui(Li[i],e);i=r;break;case"source":Ui("error",e),i=r;break;case"img":case"image":case"link":Ui("error",e),Ui("load",e),i=r;break;case"details":Ui("toggle",e),i=r;break;case"input":Ye(e,r),i=Je(e,r),Ui("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Fe({},r,{value:void 0}),Ui("invalid",e);break;case"textarea":ot(e,r),i=it(e,r),Ui("invalid",e)}for(o in bt(n,i),s=i)if(s.hasOwnProperty(o)){var l=s[o];"style"===o?vt(e,l):"dangerouslySetInnerHTML"===o?null!=(l=l?l.__html:void 0)&&pt(e,l):"children"===o?"string"==typeof l?("textarea"!==n||""!==l)&&ft(e,l):"number"==typeof l&&ft(e,""+l):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(le.hasOwnProperty(o)?null!=l&&"onScroll"===o&&Ui("scroll",e):null!=l&&xe(e,o,l,a))}switch(n){case"input":Ke(e),et(e,r,!1);break;case"textarea":Ke(e),st(e);break;case"option":null!=r.value&&e.setAttribute("value",""+qe(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?rt(e,!!r.multiple,o,!1):null!=r.defaultValue&&rt(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=eo)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Hl(t),null;case 6:if(e&&null!=t.stateNode)Pl(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(ae(166));if(n=Ja(Ga.current),Ja(Ka.current),fa(t)){if(r=t.stateNode,n=t.memoizedProps,r[ho]=t,(o=r.nodeValue!==n)&&null!==(e=ia))switch(e.tag){case 3:Qi(r.nodeValue,n,!!(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qi(r.nodeValue,n,!!(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ho]=t,t.stateNode=r}return Hl(t),null;case 13:if(Io(ts),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(aa&&null!==oa&&1&t.mode&&!(128&t.flags))ha(),ma(),t.flags|=98560,o=!1;else if(o=fa(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(ae(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(ae(317));o[ho]=t}else ma(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Hl(t),o=!1}else null!==sa&&(au(sa),sa=null),o=!0;if(!o)return 65536&t.flags?t:null}return 128&t.flags?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,1&t.mode&&(null===e||1&ts.current?0===Pc&&(Pc=3):mu())),null!==t.updateQueue&&(t.flags|=4),Hl(t),null);case 4:return Xa(),jl(e,t),null===e&&Vi(t.stateNode.containerInfo),Hl(t),null;case 10:return Oa(t.type._context),Hl(t),null;case 19:if(Io(ts),null===(o=t.memoizedState))return Hl(t),null;if(r=!!(128&t.flags),null===(a=o.rendering))if(r)ql(o,!1);else{if(0!==Pc||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(a=ns(e))){for(t.flags|=128,ql(o,!1),null!==(r=a.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(a=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return No(ts,1&ts.current|2),t.child}e=e.sibling}null!==o.tail&&Xt()>$c&&(t.flags|=128,r=!0,ql(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ns(a))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ql(o,!0),null===o.tail&&"hidden"===o.tailMode&&!a.alternate&&!aa)return Hl(t),null}else 2*Xt()-o.renderingStartTime>$c&&1073741824!==n&&(t.flags|=128,r=!0,ql(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(null!==(n=o.last)?n.sibling=a:t.child=a,o.last=a)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Xt(),t.sibling=null,n=ts.current,No(ts,r?1&n|2:1&n),t):(Hl(t),null);case 22:case 23:return du(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&1&t.mode?!!(1073741824&jc)&&(Hl(t),6&t.subtreeFlags&&(t.flags|=8192)):Hl(t),null;case 24:case 25:return null}throw Error(ae(156,t.tag))}function Zl(e,t){switch(ra(t),t.tag){case 1:return Po(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Xa(),Io(Ro),Io(To),is(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 5:return es(t),null;case 13:if(Io(ts),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(ae(340));ma()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Io(ts),null;case 4:return Xa(),null;case 10:return Oa(t.type._context),null;case 22:case 23:return du(),null;default:return null}}Rl=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},jl=function(){},Al=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ja(Ka.current);var o,a=null;switch(n){case"input":i=Je(e,i),r=Je(e,r),a=[];break;case"select":i=Fe({},i,{value:void 0}),r=Fe({},r,{value:void 0}),a=[];break;case"textarea":i=it(e,i),r=it(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=eo)}for(c in bt(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var s=i[c];for(o in s)s.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(le.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var l=r[c];if(s=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(null!=l||null!=s))if("style"===c)if(s){for(o in s)!s.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&s[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(a||(a=[]),a.push(c,n)),n=l;else"dangerouslySetInnerHTML"===c?(l=l?l.__html:void 0,s=s?s.__html:void 0,null!=l&&s!==l&&(a=a||[]).push(c,l)):"children"===c?"string"!=typeof l&&"number"!=typeof l||(a=a||[]).push(c,""+l):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(le.hasOwnProperty(c)?(null!=l&&"onScroll"===c&&Ui("scroll",e),a||s===l||(a=[])):(a=a||[]).push(c,l))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},Pl=function(e,t,n,r){n!==r&&(t.flags|=4)};var Gl=!1,Jl=!1,Yl="function"==typeof WeakSet?WeakSet:Set,Xl=null;function Ql(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(r){Su(e,t,r)}else n.current=null}function ec(e,t,n){try{n()}catch(r){Su(e,t,r)}}var tc=!1;function nc(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&ec(t,n,o)}i=i.next}while(i!==r)}}function rc(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ic(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function oc(e){var t=e.alternate;null!==t&&(e.alternate=null,oc(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[ho],delete t[mo],delete t[vo],delete t[yo],delete t[bo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ac(e){return 5===e.tag||3===e.tag||4===e.tag}function sc(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function lc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=eo));else if(4!==r&&null!==(e=e.child))for(lc(e,t,n),e=e.sibling;null!==e;)lc(e,t,n),e=e.sibling}function cc(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(cc(e,t,n),e=e.sibling;null!==e;)cc(e,t,n),e=e.sibling}var uc=null,dc=!1;function pc(e,t,n){for(n=n.child;null!==n;)fc(e,t,n),n=n.sibling}function fc(e,t,n){if(sn&&"function"==typeof sn.onCommitFiberUnmount)try{sn.onCommitFiberUnmount(an,n)}catch(s){}switch(n.tag){case 5:Jl||Ql(n,t);case 6:var r=uc,i=dc;uc=null,pc(e,t,n),dc=i,null!==(uc=r)&&(dc?(e=uc,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):uc.removeChild(n.stateNode));break;case 18:null!==uc&&(dc?(e=uc,n=n.stateNode,8===e.nodeType?co(e.parentNode,n):1===e.nodeType&&co(e,n),Wn(e)):co(uc,n.stateNode));break;case 4:r=uc,i=dc,uc=n.stateNode.containerInfo,dc=!0,pc(e,t,n),uc=r,dc=i;break;case 0:case 11:case 14:case 15:if(!Jl&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(2&o||4&o)&&ec(n,t,a),i=i.next}while(i!==r)}pc(e,t,n);break;case 1:if(!Jl&&(Ql(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Su(n,t,s)}pc(e,t,n);break;case 21:pc(e,t,n);break;case 22:1&n.mode?(Jl=(r=Jl)||null!==n.memoizedState,pc(e,t,n),Jl=r):pc(e,t,n);break;default:pc(e,t,n)}}function hc(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Yl),t.forEach(function(t){var r=Nu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function mc(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;null!==s;){switch(s.tag){case 5:uc=s.stateNode,dc=!1;break e;case 3:case 4:uc=s.stateNode.containerInfo,dc=!0;break e}s=s.return}if(null===uc)throw Error(ae(160));fc(o,a,i),uc=null,dc=!1;var l=i.alternate;null!==l&&(l.return=null),i.return=null}catch(c){Su(i,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gc(t,e),t=t.sibling}function gc(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(mc(t,e),vc(e),4&r){try{nc(3,e,e.return),rc(3,e)}catch(jC){Su(e,e.return,jC)}try{nc(5,e,e.return)}catch(jC){Su(e,e.return,jC)}}break;case 1:mc(t,e),vc(e),512&r&&null!==n&&Ql(n,n.return);break;case 5:if(mc(t,e),vc(e),512&r&&null!==n&&Ql(n,n.return),32&e.flags){var i=e.stateNode;try{ft(i,"")}catch(jC){Su(e,e.return,jC)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,a=null!==n?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,null!==l)try{"input"===s&&"radio"===o.type&&null!=o.name&&Xe(i,o),xt(s,a);var c=xt(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];"style"===u?vt(i,d):"dangerouslySetInnerHTML"===u?pt(i,d):"children"===u?ft(i,d):xe(i,u,d,c)}switch(s){case"input":Qe(i,o);break;case"textarea":at(i,o);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var f=o.value;null!=f?rt(i,!!o.multiple,f,!1):p!==!!o.multiple&&(null!=o.defaultValue?rt(i,!!o.multiple,o.defaultValue,!0):rt(i,!!o.multiple,o.multiple?[]:"",!1))}i[mo]=o}catch(jC){Su(e,e.return,jC)}}break;case 6:if(mc(t,e),vc(e),4&r){if(null===e.stateNode)throw Error(ae(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(jC){Su(e,e.return,jC)}}break;case 3:if(mc(t,e),vc(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Wn(t.containerInfo)}catch(jC){Su(e,e.return,jC)}break;case 4:default:mc(t,e),vc(e);break;case 13:mc(t,e),vc(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Bc=Xt())),4&r&&hc(e);break;case 22:if(u=null!==n&&null!==n.memoizedState,1&e.mode?(Jl=(c=Jl)||u,mc(t,e),Jl=c):mc(t,e),vc(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!u&&1&e.mode)for(Xl=e,u=e.child;null!==u;){for(d=Xl=u;null!==Xl;){switch(f=(p=Xl).child,p.tag){case 0:case 11:case 14:case 15:nc(4,p,p.return);break;case 1:Ql(p,p.return);var h=p.stateNode;if("function"==typeof h.componentWillUnmount){r=p,n=p.return;try{t=r,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(jC){Su(r,n,jC)}}break;case 5:Ql(p,p.return);break;case 22:if(null!==p.memoizedState){wc(d);continue}}null!==f?(f.return=p,Xl=f):wc(d)}u=u.sibling}e:for(u=null,d=e;;){if(5===d.tag){if(null===u){u=d;try{i=d.stateNode,c?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(s=d.stateNode,a=null!=(l=d.memoizedProps.style)&&l.hasOwnProperty("display")?l.display:null,s.style.display=gt("display",a))}catch(jC){Su(e,e.return,jC)}}}else if(6===d.tag){if(null===u)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(jC){Su(e,e.return,jC)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:mc(t,e),vc(e),4&r&&hc(e);case 21:}}function vc(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(ac(n)){var r=n;break e}n=n.return}throw Error(ae(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(ft(i,""),r.flags&=-33),cc(e,sc(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;lc(e,sc(e),o);break;default:throw Error(ae(161))}}catch(a){Su(e,e.return,a)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yc(e,t,n){Xl=e,bc(e)}function bc(e,t,n){for(var r=!!(1&e.mode);null!==Xl;){var i=Xl,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||Gl;if(!a){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Jl;s=Gl;var c=Jl;if(Gl=a,(Jl=l)&&!c)for(Xl=i;null!==Xl;)l=(a=Xl).child,22===a.tag&&null!==a.memoizedState?kc(i):null!==l?(l.return=a,Xl=l):kc(i);for(;null!==o;)Xl=o,bc(o),o=o.sibling;Xl=i,Gl=s,Jl=c}xc(e)}else 8772&i.subtreeFlags&&null!==o?(o.return=i,Xl=o):xc(e)}}function xc(e){for(;null!==Xl;){var t=Xl;if(8772&t.flags){var n=t.alternate;try{if(8772&t.flags)switch(t.tag){case 0:case 11:case 15:Jl||rc(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Jl)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:rl(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&qa(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}qa(t,a,n)}break;case 5:var s=t.stateNode;if(null===n&&4&t.flags){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Wn(d)}}}break;default:throw Error(ae(163))}Jl||512&t.flags&&ic(t)}catch(p){Su(t,t.return,p)}}if(t===e){Xl=null;break}if(null!==(n=t.sibling)){n.return=t.return,Xl=n;break}Xl=t.return}}function wc(e){for(;null!==Xl;){var t=Xl;if(t===e){Xl=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xl=n;break}Xl=t.return}}function kc(e){for(;null!==Xl;){var t=Xl;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rc(4,t)}catch(l){Su(t,n,l)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(l){Su(t,i,l)}}var o=t.return;try{ic(t)}catch(l){Su(t,o,l)}break;case 5:var a=t.return;try{ic(t)}catch(l){Su(t,a,l)}}}catch(l){Su(t,t.return,l)}if(t===e){Xl=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xl=s;break}Xl=t.return}}var _c,Sc=Math.ceil,Cc=we.ReactCurrentDispatcher,Ec=we.ReactCurrentOwner,Ic=we.ReactCurrentBatchConfig,Nc=0,Oc=null,Tc=null,Rc=0,jc=0,Ac=Eo(0),Pc=0,Mc=null,Lc=0,Dc=0,Fc=0,zc=null,Uc=null,Bc=0,$c=1/0,Vc=null,Wc=!1,qc=null,Hc=null,Kc=!1,Zc=null,Gc=0,Jc=0,Yc=null,Xc=-1,Qc=0;function eu(){return 6&Nc?Xt():-1!==Xc?Xc:Xc=Xt()}function tu(e){return 1&e.mode?2&Nc&&0!==Rc?Rc&-Rc:null!==va.transition?(0===Qc&&(Qc=vn()),Qc):0!==(e=wn)?e:e=void 0===(e=window.event)?16:Xn(e.type):1}function nu(e,t,n,r){if(50<Jc)throw Jc=0,Yc=null,Error(ae(185));bn(e,n,r),2&Nc&&e===Oc||(e===Oc&&(!(2&Nc)&&(Dc|=n),4===Pc&&su(e,Rc)),ru(e,r),1===n&&0===Nc&&!(1&t.mode)&&($c=Xt()+500,Bo&&Wo()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-ln(o),s=1<<a,l=i[a];-1===l?0!==(s&n)&&0===(s&r)||(i[a]=mn(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=hn(e,e===Oc?Rc:0);if(0===r)null!==n&&Gt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Gt(n),1===t)0===e.tag?function(e){Bo=!0,Vo(e)}(lu.bind(null,e)):Vo(lu.bind(null,e)),so(function(){!(6&Nc)&&Wo()}),n=null;else{switch(kn(r)){case 1:n=en;break;case 4:n=tn;break;case 16:default:n=nn;break;case 536870912:n=on}n=Ou(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Xc=-1,Qc=0,6&Nc)throw Error(ae(327));var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=hn(e,e===Oc?Rc:0);if(0===r)return null;if(30&r||0!==(r&e.expiredLanes)||t)t=gu(e,r);else{t=r;var i=Nc;Nc|=2;var o=hu();for(Oc===e&&Rc===t||(Vc=null,$c=Xt()+500,pu(e,t));;)try{yu();break}catch(s){fu(e,s)}Na(),Cc.current=o,Nc=i,null!==Tc?t=0:(Oc=null,Rc=0,t=Pc)}if(0!==t){if(2===t&&(0!==(i=gn(e))&&(r=i,t=ou(e,i))),1===t)throw n=Mc,pu(e,0),su(e,r),ru(e,Xt()),n;if(6===t)su(e,r);else{if(i=e.current.alternate,!(30&r||function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!li(o(),i))return!1}catch(a){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)||(t=gu(e,r),2===t&&(o=gn(e),0!==o&&(r=o,t=ou(e,o))),1!==t)))throw n=Mc,pu(e,0),su(e,r),ru(e,Xt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(ae(345));case 2:case 5:wu(e,Uc,Vc);break;case 3:if(su(e,r),(130023424&r)===r&&10<(t=Bc+500-Xt())){if(0!==hn(e,0))break;if(((i=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=io(wu.bind(null,e,Uc,Vc),t);break}wu(e,Uc,Vc);break;case 4:if(su(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-ln(r);o=1<<a,(a=t[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=Xt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sc(r/1960))-r)){e.timeoutHandle=io(wu.bind(null,e,Uc,Vc),r);break}wu(e,Uc,Vc);break;default:throw Error(ae(329))}}}return ru(e,Xt()),e.callbackNode===n?iu.bind(null,e):null}function ou(e,t){var n=zc;return e.current.memoizedState.isDehydrated&&(pu(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Uc,Uc=n,null!==t&&au(t)),e}function au(e){null===Uc?Uc=e:Uc.push.apply(Uc,e)}function su(e,t){for(t&=~Fc,t&=~Dc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ln(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(6&Nc)throw Error(ae(327));ku();var t=hn(e,0);if(!(1&t))return ru(e,Xt()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var r=gn(e);0!==r&&(t=r,n=ou(e,r))}if(1===n)throw n=Mc,pu(e,0),su(e,t),ru(e,Xt()),n;if(6===n)throw Error(ae(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wu(e,Uc,Vc),ru(e,Xt()),null}function cu(e,t){var n=Nc;Nc|=1;try{return e(t)}finally{0===(Nc=n)&&($c=Xt()+500,Bo&&Wo())}}function uu(e){null!==Zc&&0===Zc.tag&&!(6&Nc)&&ku();var t=Nc;Nc|=1;var n=Ic.transition,r=wn;try{if(Ic.transition=null,wn=1,e)return e()}finally{wn=r,Ic.transition=n,!(6&(Nc=t))&&Wo()}}function du(){jc=Ac.current,Io(Ac)}function pu(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Tc)for(n=Tc.return;null!==n;){var r=n;switch(ra(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Mo();break;case 3:Xa(),Io(Ro),Io(To),is();break;case 5:es(r);break;case 4:Xa();break;case 13:case 19:Io(ts);break;case 10:Oa(r.type._context);break;case 22:case 23:du()}n=n.return}if(Oc=e,Tc=e=Au(e.current,null),Rc=jc=t,Pc=0,Mc=null,Fc=Dc=Lc=0,Uc=zc=null,null!==Aa){for(t=0;t<Aa.length;t++)if(null!==(r=(n=Aa[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Aa=null}return e}function fu(e,t){for(;;){var n=Tc;try{if(Na(),os.current=Qs,ds){for(var r=ls.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}ds=!1}if(ss=0,us=cs=ls=null,ps=!1,fs=0,Ec.current=null,null===n||null===n.return){Pc=1,Mc=t,Tc=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Rc,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var c=l,u=s,d=u.tag;if(!(1&u.mode||0!==d&&11!==d&&15!==d)){var p=u.alternate;p?(u.updateQueue=p.updateQueue,u.memoizedState=p.memoizedState,u.lanes=p.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=gl(a);if(null!==f){f.flags&=-257,vl(f,a,s,0,t),1&f.mode&&ml(o,c,t),l=c;var h=(t=f).updateQueue;if(null===h){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}if(!(1&t)){ml(o,c,t),mu();break e}l=Error(ae(426))}else if(aa&&1&s.mode){var g=gl(a);if(null!==g){!(65536&g.flags)&&(g.flags|=256),vl(g,a,s,0,t),ga(ul(l,s));break e}}o=l=ul(l,s),4!==Pc&&(Pc=2),null===zc?zc=[o]:zc.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Va(o,fl(0,l,t));break e;case 1:s=l;var v=o.type,y=o.stateNode;if(!(128&o.flags||"function"!=typeof v.getDerivedStateFromError&&(null===y||"function"!=typeof y.componentDidCatch||null!==Hc&&Hc.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t,Va(o,hl(o,s,t));break e}}o=o.return}while(null!==o)}xu(n)}catch(b){t=b,Tc===n&&null!==n&&(Tc=n=n.return);continue}break}}function hu(){var e=Cc.current;return Cc.current=Qs,null===e?Qs:e}function mu(){0!==Pc&&3!==Pc&&2!==Pc||(Pc=4),null===Oc||!(268435455&Lc)&&!(268435455&Dc)||su(Oc,Rc)}function gu(e,t){var n=Nc;Nc|=2;var r=hu();for(Oc===e&&Rc===t||(Vc=null,pu(e,t));;)try{vu();break}catch(rh){fu(e,rh)}if(Na(),Nc=n,Cc.current=r,null!==Tc)throw Error(ae(261));return Oc=null,Rc=0,Pc}function vu(){for(;null!==Tc;)bu(Tc)}function yu(){for(;null!==Tc&&!Jt();)bu(Tc)}function bu(e){var t=_c(e.alternate,e,jc);e.memoizedProps=e.pendingProps,null===t?xu(e):Tc=t,Ec.current=null}function xu(e){var t=e;do{var n=t.alternate;if(e=t.return,32768&t.flags){if(null!==(n=Zl(n,t)))return n.flags&=32767,void(Tc=n);if(null===e)return Pc=6,void(Tc=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}else if(null!==(n=Kl(n,t,jc)))return void(Tc=n);if(null!==(t=t.sibling))return void(Tc=t);Tc=t=e}while(null!==t);0===Pc&&(Pc=5)}function wu(e,t,n){var r=wn,i=Ic.transition;try{Ic.transition=null,wn=1,function(e,t,n,r){do{ku()}while(null!==Zc);if(6&Nc)throw Error(ae(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(ae(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ln(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,o),e===Oc&&(Tc=Oc=null,Rc=0),!(2064&n.subtreeFlags)&&!(2064&n.flags)||Kc||(Kc=!0,Ou(nn,function(){return ku(),null})),o=!!(15990&n.flags),!!(15990&n.subtreeFlags)||o){o=Ic.transition,Ic.transition=null;var a=wn;wn=1;var s=Nc;Nc|=4,Ec.current=null,function(e,t){if(to=Hn,hi(e=fi())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(x){n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,p=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(s=a+i),d!==o||0!==r&&3!==d.nodeType||(l=a+r),3===d.nodeType&&(a+=d.nodeValue.length),null!==(f=d.firstChild);)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++c===i&&(s=a),p===o&&++u===r&&(l=a),null!==(f=d.nextSibling))break;p=(d=p).parentNode}d=f}n=-1===s||-1===l?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(no={focusedElem:e,selectionRange:n},Hn=!1,Xl=t;null!==Xl;)if(e=(t=Xl).child,1028&t.subtreeFlags&&null!==e)e.return=t,Xl=e;else for(;null!==Xl;){t=Xl;try{var h=t.alternate;if(1024&t.flags)switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==h){var m=h.memoizedProps,g=h.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:rl(t.type,m),g);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(ae(163))}}catch(x){Su(t,t.return,x)}if(null!==(e=t.sibling)){e.return=t.return,Xl=e;break}Xl=t.return}h=tc,tc=!1}(e,n),gc(n,e),mi(no),Hn=!!to,no=to=null,e.current=n,yc(n),Yt(),Nc=s,wn=a,Ic.transition=o}else e.current=n;if(Kc&&(Kc=!1,Zc=e,Gc=i),o=e.pendingLanes,0===o&&(Hc=null),function(e){if(sn&&"function"==typeof sn.onCommitFiberRoot)try{sn.onCommitFiberRoot(an,e,void 0,!(128&~e.current.flags))}catch(t){}}(n.stateNode),ru(e,Xt()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Wc)throw Wc=!1,e=qc,qc=null,e;!!(1&Gc)&&0!==e.tag&&ku(),o=e.pendingLanes,1&o?e===Yc?Jc++:(Jc=0,Yc=e):Jc=0,Wo()}(e,t,n,r)}finally{Ic.transition=i,wn=r}return null}function ku(){if(null!==Zc){var e=kn(Gc),t=Ic.transition,n=wn;try{if(Ic.transition=null,wn=16>e?16:e,null===Zc)var r=!1;else{if(e=Zc,Zc=null,Gc=0,6&Nc)throw Error(ae(331));var i=Nc;for(Nc|=4,Xl=e.current;null!==Xl;){var o=Xl,a=o.child;if(16&Xl.flags){var s=o.deletions;if(null!==s){for(var l=0;l<s.length;l++){var c=s[l];for(Xl=c;null!==Xl;){var u=Xl;switch(u.tag){case 0:case 11:case 15:nc(8,u,o)}var d=u.child;if(null!==d)d.return=u,Xl=d;else for(;null!==Xl;){var p=(u=Xl).sibling,f=u.return;if(oc(u),u===c){Xl=null;break}if(null!==p){p.return=f,Xl=p;break}Xl=f}}}var h=o.alternate;if(null!==h){var m=h.child;if(null!==m){h.child=null;do{var g=m.sibling;m.sibling=null,m=g}while(null!==m)}}Xl=o}}if(2064&o.subtreeFlags&&null!==a)a.return=o,Xl=a;else e:for(;null!==Xl;){if(2048&(o=Xl).flags)switch(o.tag){case 0:case 11:case 15:nc(9,o,o.return)}var v=o.sibling;if(null!==v){v.return=o.return,Xl=v;break e}Xl=o.return}}var y=e.current;for(Xl=y;null!==Xl;){var b=(a=Xl).child;if(2064&a.subtreeFlags&&null!==b)b.return=a,Xl=b;else e:for(a=y;null!==Xl;){if(2048&(s=Xl).flags)try{switch(s.tag){case 0:case 11:case 15:rc(9,s)}}catch(w){Su(s,s.return,w)}if(s===a){Xl=null;break e}var x=s.sibling;if(null!==x){x.return=s.return,Xl=x;break e}Xl=s.return}}if(Nc=i,Wo(),sn&&"function"==typeof sn.onPostCommitFiberRoot)try{sn.onPostCommitFiberRoot(an,e)}catch(w){}r=!0}return r}finally{wn=n,Ic.transition=t}}return!1}function _u(e,t,n){e=Ba(e,t=fl(0,t=ul(n,t),1),1),t=eu(),null!==e&&(bn(e,1,t),ru(e,t))}function Su(e,t,n){if(3===e.tag)_u(e,e,n);else for(;null!==t;){if(3===t.tag){_u(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Hc||!Hc.has(r))){t=Ba(t,e=hl(t,e=ul(n,e),1),1),e=eu(),null!==t&&(bn(t,1,e),ru(t,e));break}}t=t.return}}function Cu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Oc===e&&(Rc&n)===n&&(4===Pc||3===Pc&&(130023424&Rc)===Rc&&500>Xt()-Bc?pu(e,0):Fc|=n),ru(e,t)}function Eu(e,t){0===t&&(1&e.mode?(t=pn,!(130023424&(pn<<=1))&&(pn=4194304)):t=1);var n=eu();null!==(e=La(e,t))&&(bn(e,t,n),ru(e,n))}function Iu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Nu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ae(314))}null!==r&&r.delete(t),Eu(e,n)}function Ou(e,t){return Zt(e,t)}function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new Tu(e,t,n,r)}function ju(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Au(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pu(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)ju(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case Se:return Mu(n.children,i,o,t);case Ce:a=8,i|=8;break;case Ee:return(e=Ru(12,n,t,2|i)).elementType=Ee,e.lanes=o,e;case Te:return(e=Ru(13,n,t,i)).elementType=Te,e.lanes=o,e;case Re:return(e=Ru(19,n,t,i)).elementType=Re,e.lanes=o,e;case Pe:return Lu(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case Ie:a=10;break e;case Ne:a=9;break e;case Oe:a=11;break e;case je:a=14;break e;case Ae:a=16,r=null;break e}throw Error(ae(130,null==e?e:typeof e,""))}return(t=Ru(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Mu(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Lu(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=Pe,e.lanes=n,e.stateNode={isHidden:!1},e}function Du(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function Fu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=yn(0),this.expirationTimes=yn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uu(e,t,n,r,i,o,a,s,l){return e=new zu(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Ru(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fa(o),e}function Bu(e){if(!e)return Oo;e:{if(Vt(e=e._reactInternals)!==e||1!==e.tag)throw Error(ae(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Po(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(ae(171))}if(1===e.tag){var n=e.type;if(Po(n))return Do(e,n,t)}return t}function $u(e,t,n,r,i,o,a,s,l){return(e=Uu(n,r,!0,e,0,o,0,s,l)).context=Bu(null),n=e.current,(o=Ua(r=eu(),i=tu(n))).callback=null!=t?t:null,Ba(n,o,i),e.current.lanes=i,bn(e,i,r),ru(e,r),e}function Vu(e,t,n,r){var i=t.current,o=eu(),a=tu(i);return n=Bu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ua(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ba(i,t,a))&&(nu(e,i,a,o),$a(e,i,a)),a}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function qu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Hu(e,t){qu(e,t),(e=e.alternate)&&qu(e,t)}_c=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ro.current)bl=!0;else{if(0===(e.lanes&n)&&!(128&t.flags))return bl=!1,function(e,t,n){switch(t.tag){case 3:Ol(t),ma();break;case 5:Qa(t);break;case 1:Po(t.type)&&Fo(t);break;case 4:Ya(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;No(Sa,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(No(ts,1&ts.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Dl(e,t,n):(No(ts,1&ts.current),null!==(e=Wl(e,t,n))?e.sibling:null);No(ts,1&ts.current);break;case 19:if(r=0!==(n&t.childLanes),128&e.flags){if(r)return $l(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),No(ts,ts.current),r)break;return null;case 22:case 23:return t.lanes=0,Sl(e,t,n)}return Wl(e,t,n)}(e,t,n);bl=!!(131072&e.flags)}else bl=!1,aa&&1048576&t.flags&&ta(t,Zo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vl(e,t),e=t.pendingProps;var i=Ao(t,To.current);Ra(t,n),i=vs(null,t,r,e,i,n);var o=ys();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Po(r)?(o=!0,Fo(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Fa(t),i.updater=ol,t.stateNode=i,i._reactInternals=t,cl(t,r,e,n),t=Nl(null,t,r,!0,o,n)):(t.tag=0,aa&&o&&na(t),xl(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vl(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return ju(e)?1:0;if(null!=e){if((e=e.$$typeof)===Oe)return 11;if(e===je)return 14}return 2}(r),e=rl(r,e),i){case 0:t=El(null,t,r,e,n);break e;case 1:t=Il(null,t,r,e,n);break e;case 11:t=wl(null,t,r,e,n);break e;case 14:t=kl(null,t,r,rl(r.type,e),n);break e}throw Error(ae(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,El(e,t,r,i=t.elementType===r?i:rl(r,i),n);case 1:return r=t.type,i=t.pendingProps,Il(e,t,r,i=t.elementType===r?i:rl(r,i),n);case 3:e:{if(Ol(t),null===e)throw Error(ae(387));r=t.pendingProps,i=(o=t.memoizedState).element,za(e,t),Wa(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Tl(e,t,r,n,i=ul(Error(ae(423)),t));break e}if(r!==i){t=Tl(e,t,r,n,i=ul(Error(ae(424)),t));break e}for(oa=uo(t.stateNode.containerInfo.firstChild),ia=t,aa=!0,sa=null,n=_a(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ma(),r===i){t=Wl(e,t,n);break e}xl(e,t,r,n)}t=t.child}return t;case 5:return Qa(t),null===e&&da(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,a=i.children,ro(r,i)?a=null:null!==o&&ro(r,o)&&(t.flags|=32),Cl(e,t),xl(e,t,a,n),t.child;case 6:return null===e&&da(t),null;case 13:return Dl(e,t,n);case 4:return Ya(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ka(t,null,r,n):xl(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,wl(e,t,r,i=t.elementType===r?i:rl(r,i),n);case 7:return xl(e,t,t.pendingProps,n),t.child;case 8:case 12:return xl(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,No(Sa,r._currentValue),r._currentValue=a,null!==o)if(li(o.value,a)){if(o.children===i.children&&!Ro.current){t=Wl(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var s=o.dependencies;if(null!==s){a=o.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===o.tag){(l=Ua(-1,n&-n)).tag=2;var c=o.updateQueue;if(null!==c){var u=(c=c.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ta(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(10===o.tag)a=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(a=o.return))throw Error(ae(341));a.lanes|=n,null!==(s=a.alternate)&&(s.lanes|=n),Ta(a,n,t),a=o.sibling}else a=o.child;if(null!==a)a.return=o;else for(a=o;null!==a;){if(a===t){a=null;break}if(null!==(o=a.sibling)){o.return=a.return,a=o;break}a=a.return}o=a}xl(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ra(t,n),r=r(i=ja(i)),t.flags|=1,xl(e,t,r,n),t.child;case 14:return i=rl(r=t.type,t.pendingProps),kl(e,t,r,i=rl(r.type,i),n);case 15:return _l(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:rl(r,i),Vl(e,t),t.tag=1,Po(r)?(e=!0,Fo(t)):e=!1,Ra(t,n),sl(t,r,i),cl(t,r,i,n),Nl(null,t,r,!0,e,n);case 19:return $l(e,t,n);case 22:return Sl(e,t,n)}throw Error(ae(156,t.tag))};var Ku="function"==typeof reportError?reportError:function(e){};function Zu(e){this._internalRoot=e}function Gu(e){this._internalRoot=e}function Ju(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Yu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Xu(){}function Qu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Wu(a);s.call(e)}}Vu(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Wu(a);o.call(e)}}var a=$u(t,r,e,0,null,!1,0,"",Xu);return e._reactRootContainer=a,e[go]=a.current,Vi(8===e.nodeType?e.parentNode:e),uu(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Wu(l);s.call(e)}}var l=Uu(e,0,!1,null,0,!1,0,"",Xu);return e._reactRootContainer=l,e[go]=l.current,Vi(8===e.nodeType?e.parentNode:e),uu(function(){Vu(t,l,n,r)}),l}(n,t,e,i,r);return Wu(a)}Gu.prototype.render=Zu.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(ae(409));Vu(e,t,null,null)},Gu.prototype.unmount=Zu.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uu(function(){Vu(null,e,null,null)}),t[go]=null}},Gu.prototype.unstable_scheduleHydration=function(e){if(e){var t=En();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mn.length&&0!==t&&t<Mn[n].priority;n++);Mn.splice(n,0,e),0===n&&zn(e)}},_n=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fn(t.pendingLanes);0!==n&&(xn(t,1|n),ru(t,Xt()),!(6&Nc)&&($c=Xt()+500,Wo()))}break;case 13:uu(function(){var t=La(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}}),Hu(e,1)}},Sn=function(e){if(13===e.tag){var t=La(e,134217728);if(null!==t)nu(t,e,134217728,eu());Hu(e,134217728)}},Cn=function(e){if(13===e.tag){var t=tu(e),n=La(e,t);if(null!==n)nu(n,e,t,eu());Hu(e,t)}},En=function(){return wn},In=function(e,t){var n=wn;try{return wn=e,t()}finally{wn=n}},_t=function(e,t,n){switch(t){case"input":if(Qe(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_o(r);if(!i)throw Error(ae(90));Ze(r),Qe(r,i)}}}break;case"textarea":at(e,n);break;case"select":null!=(t=n.value)&&rt(e,!!n.multiple,t,!1)}},Ot=cu,Tt=uu;var ed={usingClientEntryPoint:!1,Events:[wo,ko,_o,It,Nt,cu]},td={findFiberByHostInstance:xo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nd={bundleType:td.bundleType,version:td.version,rendererPackageName:td.rendererPackageName,rendererConfig:td.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:we.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ht(e))?null:e.stateNode},findFiberByHostInstance:td.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rd.isDisabled&&rd.supportsFiber)try{an=rd.inject(nd),sn=rd}catch(dt){}}ee.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed,ee.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ju(t))throw Error(ae(200));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:_e,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},ee.createRoot=function(e,t){if(!Ju(e))throw Error(ae(299));var n=!1,r="",i=Ku;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Uu(e,1,!1,null,0,n,0,r,i),e[go]=t.current,Vi(8===e.nodeType?e.parentNode:e),new Zu(t)},ee.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(ae(188));throw e=Object.keys(e).join(","),Error(ae(268,e))}return e=null===(e=Ht(t))?null:e.stateNode},ee.flushSync=function(e){return uu(e)},ee.hydrate=function(e,t,n){if(!Yu(t))throw Error(ae(200));return Qu(null,e,t,!0,n)},ee.hydrateRoot=function(e,t,n){if(!Ju(e))throw Error(ae(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",a=Ku;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(a=n.onRecoverableError)),t=$u(t,null,e,1,null!=n?n:null,i,0,o,a),e[go]=t.current,Vi(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Gu(t)},ee.render=function(e,t,n){if(!Yu(t))throw Error(ae(200));return Qu(null,e,t,!1,n)},ee.unmountComponentAtNode=function(e){if(!Yu(e))throw Error(ae(40));return!!e._reactRootContainer&&(uu(function(){Qu(null,null,e,!1,function(){e._reactRootContainer=null,e[go]=null})}),!0)},ee.unstable_batchedUpdates=cu,ee.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Yu(n))throw Error(ae(200));if(null==e||void 0===e._reactInternals)throw Error(ae(38));return Qu(e,t,n,!1,r)},ee.version="18.3.1-next-f1338f8080-20240426",function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){}}(),Q.exports=ee;var id=Q.exports;X.createRoot=id.createRoot,X.hydrateRoot=id.hydrateRoot;
|
|
30
|
+
/**
|
|
31
|
+
* react-router v7.10.1
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Remix Software Inc.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
37
|
+
*
|
|
38
|
+
* @license MIT
|
|
39
|
+
*/
|
|
40
|
+
var od="popstate";function ad(e={}){return function(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",l=null,c=u();null==c&&(c=0,a.replaceState({...a.state,idx:c},""));function u(){return(a.state||{idx:null}).idx}function d(){s="POP";let e=u(),t=null==e?null:e-c;c=e,l&&l({action:s,location:m.location,delta:t})}function p(e,t){s="PUSH";let n=ud(m.location,e,t);c=u()+1;let r=cd(n,c),d=m.createHref(n);try{a.pushState(r,"",d)}catch(vE){if(vE instanceof DOMException&&"DataCloneError"===vE.name)throw vE;i.location.assign(d)}o&&l&&l({action:s,location:m.location,delta:1})}function f(e,t){s="REPLACE";let n=ud(m.location,e,t);c=u();let r=cd(n,c),i=m.createHref(n);a.replaceState(r,"",i),o&&l&&l({action:s,location:m.location,delta:0})}function h(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href);sd(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:dd(e);r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r);return new URL(r,n)}(e)}let m={get action(){return s},get location(){return e(i,a)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(od,d),l=e,()=>{i.removeEventListener(od,d),l=null}},createHref:e=>t(i,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:p,replace:f,go:e=>a.go(e)};return m}(function(e,t){let{pathname:n,search:r,hash:i}=e.location;return ud("",{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:dd(t)},0,e)}function sd(e,t){if(!1===e||null==e)throw new Error(t)}function ld(e,t){if(!e)try{throw new Error(t)}catch(rh){}}function cd(e,t){return{usr:e.state,key:e.key,idx:t}}function ud(e,t,n=null,r){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?pd(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)}}function dd({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function pd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function fd(e,t,n="/"){return function(e,t,n,r){let i="string"==typeof t?pd(t):t,o=Id(i.pathname||"/",n);if(null==o)return null;let a=hd(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let s=null;for(let l=0;null==s&&l<a.length;++l){let e=Ed(o);s=Sd(a[l],e,r)}return s}(e,t,n,!1)}function hd(e,t=[],n=[],r="",i=!1){let o=(e,o,a=i,s)=>{let l={relativePath:void 0===s?e.path||"":s,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&a)return;sd(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length)}let c=Pd([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(sd(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),hd(e.children,t,u,c,a)),(null!=e.path||e.index)&&t.push({path:c,score:_d(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&(null==(n=e.path)?void 0:n.includes("?")))for(let r of md(e.path))o(e,t,!0,r);else o(e,t)}),t}function md(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return i?[o,""]:[o];let a=md(r.join("/")),s=[];return s.push(...a.map(e=>""===e?o:[o,e].join("/"))),i&&s.push(...a),s.map(t=>e.startsWith("/")&&""===t?"/":t)}var gd=/^:[\w-]+$/,vd=3,yd=2,bd=1,xd=10,wd=-2,kd=e=>"*"===e;function _d(e,t){let n=e.split("/"),r=n.length;return n.some(kd)&&(r+=wd),t&&(r+=yd),n.filter(e=>!kd(e)).reduce((e,t)=>e+(gd.test(t)?vd:""===t?bd:xd),r)}function Sd(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let e=r[s],l=s===r.length-1,c="/"===o?t:t.slice(o.length)||"/",u=Cd({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=Cd({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;Object.assign(i,u.params),a.push({params:i,pathname:Pd([o,u.pathname]),pathnameBase:Md(Pd([o,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(o=Pd([o,u.pathnameBase]))}return a}function Cd(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){ld("*"===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,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");e.endsWith("*")?(r.push({paramName:"*"}),i+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":""!==e&&"/"!==e&&(i+="(?:(?=\\/|$))");let o=new RegExp(i,t?void 0:"i");return[o,r]}(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=s[r]||"";a=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const i=s[r];return e[t]=n&&!i?void 0:(i||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:a,pattern:e}}function Ed(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(vE){return ld(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${vE}).`),e}}function Id(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)||"/"}var Nd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Od(e,t="/"){let n,{pathname:r,search:i="",hash:o=""}="string"==typeof e?pd(e):e;if(r)if(a=r,Nd.test(a))n=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),ld(!1,`Pathnames cannot have embedded double slashes - normalizing ${e} -> ${r}`)}n=r.startsWith("/")?Td(r.substring(1),"/"):Td(r,t)}else n=t;var a;return{pathname:n,search:Ld(i),hash:Dd(o)}}function Td(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function Rd(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 jd(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Ad(e,t,n,r=!1){let i;"string"==typeof e?i=pd(e):(i={...e},sd(!i.pathname||!i.pathname.includes("?"),Rd("?","pathname","search",i)),sd(!i.pathname||!i.pathname.includes("#"),Rd("#","pathname","hash",i)),sd(!i.search||!i.search.includes("#"),Rd("#","search","hash",i)));let o,a=""===e||""===i.pathname,s=a?"/":i.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=Od(i,o),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}var Pd=e=>e.join("/").replace(/\/\/+/g,"/"),Md=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ld=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Dd=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";function Fd(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var zd=["POST","PUT","PATCH","DELETE"];new Set(zd);var Ud=["GET",...zd];new Set(Ud);var Bd=$.createContext(null);Bd.displayName="DataRouter";var $d=$.createContext(null);$d.displayName="DataRouterState",$.createContext(!1);var Vd=$.createContext({isTransitioning:!1});Vd.displayName="ViewTransition",$.createContext(new Map).displayName="Fetchers",$.createContext(null).displayName="Await";var Wd=$.createContext(null);Wd.displayName="Navigation";var qd=$.createContext(null);qd.displayName="Location";var Hd=$.createContext({outlet:null,matches:[],isDataRoute:!1});Hd.displayName="Route";var Kd=$.createContext(null);function Zd(){return null!=$.useContext(qd)}function Gd(){return sd(Zd(),"useLocation() may be used only in the context of a <Router> component."),$.useContext(qd).location}Kd.displayName="RouteError";var Jd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yd(e){$.useContext(Wd).static||$.useLayoutEffect(e)}function Xd(){let{isDataRoute:e}=$.useContext(Hd);return e?function(){let{router:e}=function(e){let t=$.useContext(Bd);return sd(t,op(e)),t}("useNavigate"),t=ap("useNavigate"),n=$.useRef(!1);return Yd(()=>{n.current=!0}),$.useCallback(async(r,i={})=>{ld(n.current,Jd),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}():function(){sd(Zd(),"useNavigate() may be used only in the context of a <Router> component.");let e=$.useContext(Bd),{basename:t,navigator:n}=$.useContext(Wd),{matches:r}=$.useContext(Hd),{pathname:i}=Gd(),o=JSON.stringify(jd(r)),a=$.useRef(!1);return Yd(()=>{a.current=!0}),$.useCallback((r,s={})=>{if(ld(a.current,Jd),!a.current)return;if("number"==typeof r)return void n.go(r);let l=Ad(r,JSON.parse(o),i,"path"===s.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Pd([t,l.pathname])),(s.replace?n.replace:n.push)(l,s.state,s)},[t,n,o,i,e])}()}function Qd(e,{relative:t}={}){let{matches:n}=$.useContext(Hd),{pathname:r}=Gd(),i=JSON.stringify(jd(n));return $.useMemo(()=>Ad(e,JSON.parse(i),r,"path"===t),[e,i,r,t])}function ep(e,t,n,r,i){var o;sd(Zd(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=$.useContext(Wd),{matches:s}=$.useContext(Hd),l=s[s.length-1],c=l?l.params:{},u=l?l.pathname:"/",d=l?l.pathnameBase:"/",p=l&&l.route;{let e=p&&p.path||"";lp(u,!p||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let f,h=Gd();if(t){let e="string"==typeof t?pd(t):t;sd("/"===d||(null==(o=e.pathname)?void 0:o.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=h;let m=f.pathname||"/",g=m;if("/"!==d){let e=d.replace(/^\//,"").split("/");g="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let v=fd(e,{pathname:g});ld(p||null!=v,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),ld(null==v||void 0!==v[v.length-1].route.element||void 0!==v[v.length-1].route.Component||void 0!==v[v.length-1].route.lazy,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let y=function(e,t=[],n=null,r=null){if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,o=null==n?void 0:n.errors;if(null!=o){let e=i.findIndex(e=>e.route.id&&void 0!==(null==o?void 0:o[e.route.id]));sd(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,e+1))}let a=!1,s=-1;if(n)for(let c=0;c<i.length;c++){let e=i[c];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(s=c),e.route.id){let{loaderData:t,errors:r}=n,o=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||o){a=!0,i=s>=0?i.slice(0,s+1):[i[0]];break}}}let l=n&&r?(e,t)=>{var i,o;r(e,{location:n.location,params:(null==(o=null==(i=n.matches)?void 0:i[0])?void 0:o.params)??{},unstable_pattern:Fd(n.matches),errorInfo:t})}:void 0;return i.reduceRight((e,r,c)=>{let u,d=!1,p=null,f=null;n&&(u=o&&r.route.id?o[r.route.id]:void 0,p=r.route.errorElement||np,a&&(s<0&&0===c?(lp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):s===c&&(d=!0,f=r.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),m=()=>{let t;return t=u?p:d?f:r.route.Component?$.createElement(r.route.Component,null):r.route.element?r.route.element:e,$.createElement(ip,{match:r,routeContext:{outlet:e,matches:h,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?$.createElement(rp,{location:n.location,revalidation:n.revalidation,component:p,error:u,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):m()},null)}(v&&v.map(e=>Object.assign({},e,{params:Object.assign({},c,e.params),pathname:Pd([d,a.encodeLocation?a.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?d:Pd([d,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),s,n,r,i);return t&&y?$.createElement(qd.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...f},navigationType:"POP"}},y):y}function tp(){let e=function(){var e;let t=$.useContext(Kd),n=function(e){let t=$.useContext($d);return sd(t,op(e)),t}("useRouteError"),r=ap("useRouteError");if(void 0!==t)return t;return null==(e=n.errors)?void 0:e[r]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},a=null;return a=$.createElement($.Fragment,null,$.createElement("p",null,"💿 Hey developer 👋"),$.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",$.createElement("code",{style:o},"ErrorBoundary")," or"," ",$.createElement("code",{style:o},"errorElement")," prop on your route.")),$.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},t),n?$.createElement("pre",{style:i},n):null,a)}$.createContext(null);var np=$.createElement(tp,null),rp=class extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){return void 0!==this.state.error?$.createElement(Hd.Provider,{value:this.props.routeContext},$.createElement(Kd.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ip({routeContext:e,match:t,children:n}){let r=$.useContext(Bd);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),$.createElement(Hd.Provider,{value:e},n)}function op(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ap(e){let t=function(e){let t=$.useContext(Hd);return sd(t,op(e)),t}(e),n=t.matches[t.matches.length-1];return sd(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var sp={};function lp(e,t,n){t||sp[e]||(sp[e]=!0,ld(!1,n))}function cp(e){sd(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function up({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1,unstable_useTransitions:a}){sd(!Zd(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),l=$.useMemo(()=>({basename:s,navigator:i,static:o,unstable_useTransitions:a,future:{}}),[s,i,o,a]);"string"==typeof n&&(n=pd(n));let{pathname:c="/",search:u="",hash:d="",state:p=null,key:f="default"}=n,h=$.useMemo(()=>{let e=Id(c,s);return null==e?null:{location:{pathname:e,search:u,hash:d,state:p,key:f},navigationType:r}},[s,c,u,d,p,f,r]);return ld(null!=h,`<Router basename="${s}"> is not able to match the URL "${c}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==h?null:$.createElement(Wd.Provider,{value:l},$.createElement(qd.Provider,{children:t,value:h}))}function dp({children:e,location:t}){return ep(pp(e),t)}function pp(e,t=[]){let n=[];return $.Children.forEach(e,(e,r)=>{if(!$.isValidElement(e))return;let i=[...t,r];if(e.type===$.Fragment)return void n.push.apply(n,pp(e.props.children,i));sd(e.type===cp,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),sd(!e.props.index||!e.props.children,"An index route cannot have child routes.");let o={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(o.children=pp(e.props.children,i)),n.push(o)}),n}$.memo(function({routes:e,future:t,state:n,unstable_onError:r}){return ep(e,void 0,n,r,t)});var fp="get",hp="application/x-www-form-urlencoded";function mp(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function gp(e=""){return new URLSearchParams("string"==typeof e||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(e=>[n,e]):[[n,r]])},[]))}var vp=null;var yp=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bp(e){return null==e||yp.has(e)?e:(ld(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${hp}"`),null)}function xp(e,t){let n,r,i,o,a;if(mp(s=e)&&"form"===s.tagName.toLowerCase()){let a=e.getAttribute("action");r=a?Id(a,t):null,n=e.getAttribute("method")||fp,i=bp(e.getAttribute("enctype"))||hp,o=new FormData(e)}else if(function(e){return mp(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return mp(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let a=e.form;if(null==a)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||a.getAttribute("action");if(r=s?Id(s,t):null,n=e.getAttribute("formmethod")||a.getAttribute("method")||fp,i=bp(e.getAttribute("formenctype"))||bp(a.getAttribute("enctype"))||hp,o=new FormData(a,e),!function(){if(null===vp)try{new FormData(document.createElement("form"),0),vp=!1}catch(rh){vp=!0}return vp}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(mp(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=fp,r=null,i=hp,a=e}var s;return o&&"text/plain"===i&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}function wp(e,t){if(!1===e||null==e)throw new Error(t)}function kp(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function _p(e,t,n){return function(e,t){let n=new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(vE){return window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(kp).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}function Sp(e,t,n,r,i,o){let a=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null==(r=n[t].route.path)?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===o?t.filter((e,t)=>a(e,t)||s(e,t)):"data"===o?t.filter((t,o)=>{var l;let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(a(t,o)||s(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:(null==(l=n[0])?void 0:l.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Cp(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1),[...new Set(r)];var r}function Ep(){let e=$.useContext(Bd);return wp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ip=$.createContext(void 0);function Np(){let e=$.useContext(Ip);return wp(e,"You must render this element inside a <HydratedRouter> element"),e}function Op(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Tp({page:e,...t}){let{router:n}=Ep(),r=$.useMemo(()=>fd(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?$.createElement(Rp,{page:e,matches:r,...t}):null}function Rp({page:e,matches:t,...n}){let r=Gd(),{manifest:i,routeModules:o}=Np(),{basename:a}=Ep(),{loaderData:s,matches:l}=function(){let e=$.useContext($d);return wp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),c=$.useMemo(()=>Sp(e,t,l,i,r,"data"),[e,t,l,i,r]),u=$.useMemo(()=>Sp(e,t,l,i,r,"assets"),[e,t,l,i,r]),d=$.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{var t;let r=i.routes[e.route.id];r&&r.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&(null==(t=o[e.route.id])?void 0:t.shouldRevalidate)||r.hasClientLoader?l=!0:n.add(e.route.id))}),0===n.size)return[];let u=function(e,t,n){let r="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname=`_root.${n}`:t&&"/"===Id(r.pathname,t)?r.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${n}`,r}(e,a,"data");return l&&n.size>0&&u.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[a,s,r,i,c,t,e,o]),p=$.useMemo(()=>Cp(u,i),[u,i]),f=function(e){let{manifest:t,routeModules:n}=Np(),[r,i]=$.useState([]);return $.useEffect(()=>{let r=!1;return _p(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}(u);return $.createElement($.Fragment,null,d.map(e=>$.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),p.map(e=>$.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),f.map(({key:e,link:t})=>$.createElement("link",{key:e,nonce:n.nonce,...t})))}function jp(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}Ip.displayName="FrameworkContext";var Ap="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Ap&&(window.__reactRouterVersion="7.10.1")}catch(rh){}function Pp({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=$.useRef();null==i.current&&(i.current=ad({window:r,v5Compat:!0}));let o=i.current,[a,s]=$.useState({action:o.action,location:o.location}),l=$.useCallback(e=>{!1===n?s(e):$.startTransition(()=>s(e))},[n]);return $.useLayoutEffect(()=>o.listen(l),[o,l]),$.createElement(up,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o,unstable_useTransitions:!0===n})}var Mp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Lp=$.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:i,replace:o,state:a,target:s,to:l,preventScrollReset:c,viewTransition:u,...d},p){let f,{basename:h,unstable_useTransitions:m}=$.useContext(Wd),g="string"==typeof l&&Mp.test(l),v=!1;if("string"==typeof l&&g&&(f=l,Ap))try{let e=new URL(window.location.href),t=l.startsWith("//")?new URL(e.protocol+l):new URL(l),n=Id(t.pathname,h);t.origin===e.origin&&null!=n?l=n+t.search+t.hash:v=!0}catch(rh){ld(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let y=function(e,{relative:t}={}){sd(Zd(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=$.useContext(Wd),{hash:i,pathname:o,search:a}=Qd(e,{relative:t}),s=o;return"/"!==n&&(s="/"===o?n:Pd([n,o])),r.createHref({pathname:s,search:a,hash:i})}(l,{relative:r}),[b,x,w]=function(e,t){let n=$.useContext(Ip),[r,i]=$.useState(!1),[o,a]=$.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:c,onMouseLeave:u,onTouchStart:d}=t,p=$.useRef(null);$.useEffect(()=>{if("render"===e&&a(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{a(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),$.useEffect(()=>{if(r){let e=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(e)}}},[r]);let f=()=>{i(!0)},h=()=>{i(!1),a(!1)};return n?"intent"!==e?[o,p,{}]:[o,p,{onFocus:Op(s,f),onBlur:Op(l,h),onMouseEnter:Op(c,f),onMouseLeave:Op(u,h),onTouchStart:Op(d,f)}]:[!1,p,{}]}(n,d),k=function(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:a,unstable_useTransitions:s}={}){let l=Xd(),c=Gd(),u=Qd(e,{relative:o});return $.useCallback(d=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(d,t)){d.preventDefault();let t=void 0!==n?n:dd(c)===dd(u),p=()=>l(e,{replace:t,state:r,preventScrollReset:i,relative:o,viewTransition:a});s?$.startTransition(()=>p()):p()}},[c,l,u,n,r,t,e,i,o,a,s])}(l,{replace:o,state:a,target:s,preventScrollReset:c,relative:r,viewTransition:u,unstable_useTransitions:m});let _=$.createElement("a",{...d,...w,href:f||y,onClick:v||i?e:function(t){e&&e(t),t.defaultPrevented||k(t)},ref:jp(p,x),target:s,"data-discover":g||"render"!==t?void 0:"true"});return b&&!g?$.createElement($.Fragment,null,_,$.createElement(Tp,{page:y})):_});function Dp(e){let t=$.useContext(Bd);return sd(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function Fp(e){ld("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=$.useRef(gp(e)),n=$.useRef(!1),r=Gd(),i=$.useMemo(()=>function(e,t){let n=gp(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}(r.search,n.current?null:t.current),[r.search]),o=Xd(),a=$.useCallback((e,t)=>{const r=gp("function"==typeof e?e(new URLSearchParams(i)):e);n.current=!0,o("?"+r,t)},[o,i]);return[i,a]}Lp.displayName="Link",$.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:i,to:o,viewTransition:a,children:s,...l},c){let u=Qd(o,{relative:l.relative}),d=Gd(),p=$.useContext($d),{navigator:f,basename:h}=$.useContext(Wd),m=null!=p&&function(e,{relative:t}={}){let n=$.useContext(Vd);sd(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Dp("useViewTransitionState"),i=Qd(e,{relative:t});if(!n.isTransitioning)return!1;let o=Id(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=Id(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=Cd(i.pathname,a)||null!=Cd(i.pathname,o)}(u)&&!0===a,g=f.encodeLocation?f.encodeLocation(u).pathname:u.pathname,v=d.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&h&&(y=Id(y,h)||y);const b="/"!==g&&g.endsWith("/")?g.length-1:g.length;let x,w=v===g||!r&&v.startsWith(g)&&"/"===v.charAt(b),k=null!=y&&(y===g||!r&&y.startsWith(g)&&"/"===y.charAt(g.length)),_={isActive:w,isPending:k,isTransitioning:m},S=w?e:void 0;x="function"==typeof n?n(_):[n,w?"active":null,k?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof i?i(_):i;return $.createElement(Lp,{...l,"aria-current":S,className:x,ref:c,style:C,to:o,viewTransition:a},"function"==typeof s?s(_):s)}).displayName="NavLink",$.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:a=fp,action:s,onSubmit:l,relative:c,preventScrollReset:u,viewTransition:d,...p},f)=>{let{unstable_useTransitions:h}=$.useContext(Wd),m=function(){let{router:e}=Dp("useSubmit"),{basename:t}=$.useContext(Wd),n=ap("useRouteId"),r=e.fetch,i=e.navigate;return $.useCallback(async(e,o={})=>{let{action:a,method:s,encType:l,formData:c,body:u}=xp(e,t);if(!1===o.navigate){let e=o.fetcherKey||Up();await r(e,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||s,formEncType:o.encType||l,flushSync:o.flushSync})}else await i(o.action||a,{preventScrollReset:o.preventScrollReset,formData:c,body:u,formMethod:o.method||s,formEncType:o.encType||l,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,i,t,n])}(),g=function(e,{relative:t}={}){let{basename:n}=$.useContext(Wd),r=$.useContext(Hd);sd(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Qd(e||".",{relative:t})},a=Gd();if(null==e){o.search=a.search;let e=new URLSearchParams(o.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();o.search=n?`?${n}`:""}}e&&"."!==e||!i.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(o.pathname="/"===o.pathname?n:Pd([n,o.pathname]));return dd(o)}(s,{relative:c}),v="get"===a.toLowerCase()?"get":"post",y="string"==typeof s&&Mp.test(s);return $.createElement("form",{ref:f,method:v,action:g,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=(null==r?void 0:r.getAttribute("formmethod"))||a,p=()=>m(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:o,relative:c,preventScrollReset:u,viewTransition:d});h&&!1!==n?$.startTransition(()=>p()):p()},...p,"data-discover":y||"render"!==e?void 0:"true"})}).displayName="Form";var zp=0,Up=()=>`__${String(++zp)}__`;var Bp=function(e,t){return(Bp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var $p=function(){return $p=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$p.apply(this,arguments)};function Vp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(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 Wp(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(rh){o(rh)}}function s(e){try{l(r.throw(e))}catch(rh){o(rh)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}function qp(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(rh){s=[6,rh],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Hp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(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"==typeof SuppressedError&&SuppressedError,"function"==typeof SuppressedError&&SuppressedError;var Kp="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Zp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gp(e,t){return e(t={exports:{}},t.exports),t.exports}var Jp=Gp(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())})},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();t.default=function(){return n.getInstance()}});Zp(Jp);var Yp=Zp(Gp(function(e,t){var n=Kp&&Kp.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(a,s)}l((r=r.apply(e,t||[])).next())})},r=Kp&&Kp.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(s){o=[6,s],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},i=Kp;Object.defineProperty(t,"__esModule",{value:!0});var o="browser-tabs-lock-key",a={key:function(e){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},clear:function(){return n(i,void 0,void 0,function(){return r(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return n(i,void 0,void 0,function(){return r(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function s(e){return new Promise(function(t){return setTimeout(t,e)})}function l(e){for(var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",n="",r=0;r<e;r++)n+=t[Math.floor(61*Math.random())];return n}var c=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+l(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,i){return void 0===i&&(i=5e3),n(this,void 0,void 0,function(){var n,c,u,d,p,f,h;return r(this,function(r){switch(r.label){case 0:n=Date.now()+l(4),c=Date.now()+i,u=o+"-"+t,d=void 0===this.storageHandler?a:this.storageHandler,r.label=1;case 1:return Date.now()<c?[4,s(30)]:[3,8];case 2:return r.sent(),null!==d.getItemSync(u)?[3,5]:(p=this.id+"-"+t+"-"+n,[4,s(Math.floor(25*Math.random()))]);case 3:return r.sent(),d.setItemSync(u,JSON.stringify({id:this.id,iat:n,timeoutKey:p,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return r.sent(),null!==(f=d.getItemSync(u))&&(h=JSON.parse(f)).id===this.id&&h.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(u,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?a:this.storageHandler),[4,this.waitForSomethingToChange(c)];case 6:r.sent(),r.label=7;case 7:return n=Date.now()+l(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return n(this,void 0,void 0,function(){var i=this;return r(this,function(o){return setTimeout(function(){return n(i,void 0,void 0,function(){var n,i,o;return r(this,function(r){switch(r.label){case 0:return[4,Jp.default().lock(t)];case 1:return r.sent(),this.acquiredIatSet.has(t)?(n=void 0===this.storageHandler?a:this.storageHandler,null===(i=n.getItemSync(e))?(Jp.default().unlock(t),[2]):((o=JSON.parse(i)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(o)),Jp.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(Jp.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return n(this,void 0,void 0,function(){return r(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n){var r=!1,i=Date.now(),o=!1;function a(){if(o||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),o=!0),!r){r=!0;var t=50-(Date.now()-i);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return n(this,void 0,void 0,function(){return r(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return n(this,void 0,void 0,function(){var n,i,s,l;return r(this,function(r){switch(r.label){case 0:return n=void 0===this.storageHandler?a:this.storageHandler,i=o+"-"+t,null===(s=n.getItemSync(i))?[2]:(l=JSON.parse(s)).id!==this.id?[3,2]:[4,Jp.default().lock(l.iat)];case 1:r.sent(),this.acquiredIatSet.delete(l.iat),n.removeItemSync(i),Jp.default().unlock(l.iat),e.notifyWaiters(),r.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,i=[],a=0;;){var s=r.keySync(a);if(null===s)break;i.push(s),a++}for(var l=!1,c=0;c<i.length;c++){var u=i[c];if(u.includes(o)){var d=r.getItemSync(u);if(null!==d){var p=JSON.parse(d);(void 0===p.timeRefreshed&&p.timeAcquired<n||void 0!==p.timeRefreshed&&p.timeRefreshed<n)&&(r.removeItemSync(u),l=!0)}}}l&&e.notifyWaiters()},e.waiters=void 0,e}();t.default=c}));const Xp={timeoutInSeconds:60},Qp={name:"auth0-spa-js",version:"2.11.0"},ef=()=>Date.now();class tf extends Error{constructor(e,t){super(t),this.error=e,this.error_description=t,Object.setPrototypeOf(this,tf.prototype)}static fromPayload({error:e,error_description:t}){return new tf(e,t)}}class nf extends tf{constructor(e,t,n,r=null){super(e,t),this.state=n,this.appState=r,Object.setPrototypeOf(this,nf.prototype)}}let rf=class e extends tf{constructor(t,n,r,i,o=null){super(t,n),this.connection=r,this.state=i,this.appState=o,Object.setPrototypeOf(this,e.prototype)}},of=class e extends tf{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,e.prototype)}};class af extends of{constructor(e){super(),this.popup=e,Object.setPrototypeOf(this,af.prototype)}}class sf extends tf{constructor(e){super("cancelled","Popup closed"),this.popup=e,Object.setPrototypeOf(this,sf.prototype)}}class lf extends tf{constructor(){super("popup_open","Unable to open a popup for loginWithPopup - window.open returned `null`"),Object.setPrototypeOf(this,lf.prototype)}}class cf extends tf{constructor(e,t,n){super(e,t),this.mfa_token=n,Object.setPrototypeOf(this,cf.prototype)}}class uf extends tf{constructor(e,t){super("missing_refresh_token",`Missing Refresh Token (audience: '${ff(e,["default"])}', scope: '${ff(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,uf.prototype)}}class df extends tf{constructor(e,t){super("missing_scopes",`Missing requested scopes after refresh (audience: '${ff(e,["default"])}', missing scope: '${ff(t)}')`),this.audience=e,this.scope=t,Object.setPrototypeOf(this,df.prototype)}}class pf extends tf{constructor(e){super("use_dpop_nonce","Server rejected DPoP proof: wrong nonce"),this.newDpopNonce=e,Object.setPrototypeOf(this,pf.prototype)}}function ff(e,t=[]){return e&&!t.includes(e)?e:""}const hf=()=>window.crypto,mf=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(hf().getRandomValues(new Uint8Array(43))).forEach(n=>t+=e[n%66]),t},gf=e=>btoa(e),vf=[{key:"name",type:["string"]},{key:"version",type:["string","number"]},{key:"env",type:["object"]}],yf=e=>{var t,{clientId:n}=e,r=Hp(e,["clientId"]);return new URLSearchParams((t=Object.assign({client_id:n},r),Object.keys(t).filter(e=>void 0!==t[e]).reduce((e,n)=>Object.assign(Object.assign({},e),{[n]:t[n]}),{}))).toString()},bf=async e=>{const t=hf().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(e));return await t},xf=e=>{return t=e.replace(/_/g,"/").replace(/-/g,"+"),decodeURIComponent(atob(t).split("").map(e=>"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)).join(""));var t},wf=e=>{const t=new Uint8Array(e);return(e=>{const t={"+":"-","/":"_","=":""};return e.replace(/[+/=]/g,e=>t[e])})(window.btoa(String.fromCharCode(...Array.from(t))))},kf=new TextEncoder,_f=new TextDecoder;function Sf(e){return"string"==typeof e?kf.encode(e):_f.decode(e)}function Cf(e){if("number"!=typeof e.modulusLength||e.modulusLength<2048)throw new Of(`${e.name} modulusLength must be at least 2048 bits`)}let Ef;if(Uint8Array.prototype.toBase64)Ef=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;Ef=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r<t.byteLength;r+=e)n.push(String.fromCharCode.apply(null,t.subarray(r,r+e)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function If(e){return Ef(e)}class Nf extends Error{constructor(e){var t;super(null!=e?e:"operation not supported"),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}class Of extends Error{constructor(e){var t;super(e),this.name=this.constructor.name,null===(t=Error.captureStackTrace)||void 0===t||t.call(Error,this,this.constructor)}}function Tf(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){if("SHA-256"===e.algorithm.hash.name)return"PS256";throw new Nf("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"RSASSA-PKCS1-v1_5":return function(e){if("SHA-256"===e.algorithm.hash.name)return"RS256";throw new Nf("unsupported RsaHashedKeyAlgorithm hash name")}(e);case"ECDSA":return function(e){if("P-256"===e.algorithm.namedCurve)return"ES256";throw new Nf("unsupported EcKeyAlgorithm namedCurve")}(e);case"Ed25519":return"Ed25519";default:throw new Nf("unsupported CryptoKey algorithm name")}}function Rf(e){return e instanceof CryptoKey}function jf(e){return Rf(e)&&"public"===e.type}async function Af(e,t,n,r,i,o){const a=null==e?void 0:e.privateKey,s=null==e?void 0:e.publicKey;if(!Rf(l=a)||"private"!==l.type)throw new TypeError('"keypair.privateKey" must be a private CryptoKey');var l;if(!jf(s))throw new TypeError('"keypair.publicKey" must be a public CryptoKey');if(!0!==s.extractable)throw new TypeError('"keypair.publicKey.extractable" must be true');if("string"!=typeof t)throw new TypeError('"htu" must be a string');if("string"!=typeof n)throw new TypeError('"htm" must be a string');if(void 0!==r&&"string"!=typeof r)throw new TypeError('"nonce" must be a string or undefined');if(void 0!==i&&"string"!=typeof i)throw new TypeError('"accessToken" must be a string or undefined');return async function(e,t,n){if(!1===n.usages.includes("sign"))throw new TypeError('private CryptoKey instances used for signing assertions must include "sign" in their "usages"');const r=`${If(Sf(JSON.stringify(e)))}.${If(Sf(JSON.stringify(t)))}`;return`${r}.${If(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:"SHA-256"};case"RSA-PSS":return Cf(e.algorithm),{name:e.algorithm.name,saltLength:32};case"RSASSA-PKCS1-v1_5":return Cf(e.algorithm),{name:e.algorithm.name};case"Ed25519":return{name:e.algorithm.name}}throw new Nf}(n),n,Sf(r)))}`}({alg:Tf(a),typ:"dpop+jwt",jwk:await Pf(s)},Object.assign(Object.assign({},o),{iat:Math.floor(Date.now()/1e3),jti:crypto.randomUUID(),htm:n,nonce:r,htu:t,ath:i?If(await crypto.subtle.digest("SHA-256",Sf(i))):void 0}),a)}async function Pf(e){const{kty:t,e:n,n:r,x:i,y:o,crv:a}=await crypto.subtle.exportKey("jwk",e);return{kty:t,crv:a,e:n,n:r,x:i,y:o}}const Mf=["authorization_code","refresh_token","urn:ietf:params:oauth:grant-type:token-exchange"];const Lf=async(e,t)=>{const n=await fetch(e,t);return{ok:n.ok,json:await n.json(),headers:(r=n.headers,[...r].reduce((e,[t,n])=>(e[t]=n,e),{}))};var r},Df=async(e,t,n,r,i,o,a=1e4,s)=>i?(async(e,t,n,r,i,o,a,s)=>{return l={auth:{audience:t,scope:n},timeout:i,fetchUrl:e,fetchOptions:r,useFormData:a,useMrrt:s},c=o,new Promise(function(e,t){const n=new MessageChannel;n.port1.onmessage=function(r){r.data.error?t(new Error(r.data.error)):e(r.data),n.port1.close()},c.postMessage(l,[n.port2])});var l,c})(e,t,n,r,a,i,o,s):(async(e,t,n)=>{const r=new AbortController;let i;return t.signal=r.signal,Promise.race([Lf(e,t),new Promise((e,t)=>{i=setTimeout(()=>{r.abort(),t(new Error("Timeout when executing 'fetch'"))},n)})]).finally(()=>{clearTimeout(i)})})(e,r,a);async function Ff(e,t,n,r,i,o,a,s,l,c){if(l){const t=await l.generateProof({url:e,method:i.method||"GET",nonce:await l.getNonce()});i.headers=Object.assign(Object.assign({},i.headers),{dpop:t})}let u,d=null;for(let x=0;x<3;x++)try{u=await Df(e,n,r,i,o,a,t,s),d=null;break}catch(b){d=b}if(d)throw d;const p=u.json,{error:f,error_description:h}=p,m=Hp(p,["error","error_description"]),{headers:g,ok:v}=u;let y;if(l&&(y=g["dpop-nonce"],y&&await l.setNonce(y)),!v){const u=h||`HTTP error. Unable to fetch ${e}`;if("mfa_required"===f)throw new cf(f,u,m.mfa_token);if("missing_refresh_token"===f)throw new uf(n,r);if("use_dpop_nonce"===f){if(!l||!y||c)throw new pf(y);return Ff(e,t,n,r,i,o,a,s,l,!0)}throw new tf(f||"request_error",u)}return m}async function zf(e,t){var{baseUrl:n,timeout:r,audience:i,scope:o,auth0Client:a,useFormData:s,useMrrt:l,dpop:c}=e,u=Hp(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData","useMrrt","dpop"]);const d="urn:ietf:params:oauth:grant-type:token-exchange"===u.grant_type,p="refresh_token"===u.grant_type&&l,f=Object.assign(Object.assign(Object.assign(Object.assign({},u),d&&i&&{audience:i}),d&&o&&{scope:o}),p&&{audience:i,scope:o}),h=s?yf(f):JSON.stringify(f),m=(g=u.grant_type,Mf.includes(g));var g,v;return await Ff(`${n}/oauth/token`,r,i||"default",o,{method:"POST",body:h,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify((v=a||Qp,Object.keys(v).reduce((e,t)=>{const n=vf.find(e=>e.key===t);return n&&n.type.includes(typeof v[t])&&(e[t]=v[t]),e},{}))))}},t,s,l,m?c:void 0)}const Uf=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t},Bf=(e,t,n)=>{let r;return n&&(r=e[n]),r||(r=e.default),Uf(r,t)};class $f{constructor(e,t="@@auth0spajs@@",n){this.prefix=t,this.suffix=n,this.clientId=e.clientId,this.scope=e.scope,this.audience=e.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(e){const[t,n,r,i]=e.split("::");return new $f({clientId:n,scope:i,audience:r},t)}static fromCacheEntry(e){const{scope:t,audience:n,client_id:r}=e;return new $f({scope:t,audience:n,clientId:r})}}class Vf{set(e,t){localStorage.setItem(e,JSON.stringify(t))}get(e){const t=window.localStorage.getItem(e);if(t)try{return JSON.parse(t)}catch(n){return}}remove(e){localStorage.removeItem(e)}allKeys(){return Object.keys(window.localStorage).filter(e=>e.startsWith("@@auth0spajs@@"))}}let Wf=class{constructor(){this.enclosedCache=function(){let e={};return{set(t,n){e[t]=n},get(t){const n=e[t];if(n)return n},remove(t){delete e[t]},allKeys:()=>Object.keys(e)}}()}},qf=class{constructor(e,t,n){this.cache=e,this.keyManifest=t,this.nowProvider=n||ef}async setIdToken(e,t,n){var r;const i=this.getIdTokenCacheKey(e);await this.cache.set(i,{id_token:t,decodedToken:n}),await(null===(r=this.keyManifest)||void 0===r?void 0:r.add(i))}async getIdToken(e){const t=await this.cache.get(this.getIdTokenCacheKey(e.clientId));if(!t&&e.scope&&e.audience){const t=await this.get(e);if(!t)return;if(!t.id_token||!t.decodedToken)return;return{id_token:t.id_token,decodedToken:t.decodedToken}}if(t)return{id_token:t.id_token,decodedToken:t.decodedToken}}async get(e,t=0,n=!1,r){var i;let o=await this.cache.get(e.toKey());if(!o){const t=await this.getCacheKeys();if(!t)return;const i=this.matchExistingCacheKey(e,t);if(i&&(o=await this.cache.get(i)),!i&&n&&"cache-only"!==r)return this.getEntryWithRefreshToken(e,t)}if(!o)return;const a=await this.nowProvider(),s=Math.floor(a/1e3);return o.expiresAt-t<s?o.body.refresh_token?this.modifiedCachedEntry(o,e):(await this.cache.remove(e.toKey()),void(await(null===(i=this.keyManifest)||void 0===i?void 0:i.remove(e.toKey())))):o.body}async modifiedCachedEntry(e,t){return e.body={refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope},await this.cache.set(t.toKey(),e),{refresh_token:e.body.refresh_token,audience:e.body.audience,scope:e.body.scope}}async set(e){var t;const n=new $f({clientId:e.client_id,scope:e.scope,audience:e.audience}),r=await this.wrapCacheEntry(e);await this.cache.set(n.toKey(),r),await(null===(t=this.keyManifest)||void 0===t?void 0:t.add(n.toKey()))}async remove(e,t,n){const r=new $f({clientId:e,scope:n,audience:t});await this.cache.remove(r.toKey())}async clear(e){var t;const n=await this.getCacheKeys();n&&(await n.filter(t=>!e||t.includes(e)).reduce(async(e,t)=>{await e,await this.cache.remove(t)},Promise.resolve()),await(null===(t=this.keyManifest)||void 0===t?void 0:t.clear()))}async wrapCacheEntry(e){const t=await this.nowProvider();return{body:e,expiresAt:Math.floor(t/1e3)+e.expires_in}}async getCacheKeys(){var e;return this.keyManifest?null===(e=await this.keyManifest.get())||void 0===e?void 0:e.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(e){return new $f({clientId:e},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(e,t){return t.filter(t=>{var n;const r=$f.fromKey(t),i=new Set(r.scope&&r.scope.split(" ")),o=(null===(n=e.scope)||void 0===n?void 0:n.split(" "))||[],a=r.scope&&o.reduce((e,t)=>e&&i.has(t),!0);return"@@auth0spajs@@"===r.prefix&&r.clientId===e.clientId&&r.audience===e.audience&&a})[0]}async getEntryWithRefreshToken(e,t){var n;for(const r of t){const t=$f.fromKey(r);if("@@auth0spajs@@"===t.prefix&&t.clientId===e.clientId){const t=await this.cache.get(r);if(null===(n=null==t?void 0:t.body)||void 0===n?void 0:n.refresh_token)return this.modifiedCachedEntry(t,e)}}}async updateEntry(e,t){var n;const r=await this.getCacheKeys();if(r)for(const i of r){const r=await this.cache.get(i);if((null===(n=null==r?void 0:r.body)||void 0===n?void 0:n.refresh_token)===e){const e=Object.assign(Object.assign({},r.body),{refresh_token:t});await this.set(e)}}}},Hf=class{constructor(e,t,n){this.storage=e,this.clientId=t,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(e){this.storage.save(this.storageKey,e,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Kf=e=>"number"==typeof e,Zf=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var Gf=Gp(function(e,t){var n=Kp&&Kp.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t){if(!t)return"";var n="; "+e;return!0===t?n:n+"="+t}function i(e,t,n){return encodeURIComponent(e).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(t).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(e){if("number"==typeof e.expires){var t=new Date;t.setMilliseconds(t.getMilliseconds()+864e5*e.expires),e.expires=t}return r("Expires",e.expires?e.expires.toUTCString():"")+r("Domain",e.domain)+r("Path",e.path)+r("Secure",e.secure)+r("SameSite",e.sameSite)}(n)}function o(e){for(var t={},n=e?e.split("; "):[],r=/(%[\dA-F]{2})+/gi,i=0;i<n.length;i++){var o=n[i].split("="),a=o.slice(1).join("=");'"'===a.charAt(0)&&(a=a.slice(1,-1));try{t[o[0].replace(r,decodeURIComponent)]=a.replace(r,decodeURIComponent)}catch(s){}}return t}function a(){return o(document.cookie)}function s(e,t,r){document.cookie=i(e,t,n({path:"/"},r))}t.__esModule=!0,t.encode=i,t.parse=o,t.getAll=a,t.get=function(e){return a()[e]},t.set=s,t.remove=function(e,t){s(e,"",n(n({},t),{expires:-1}))}});Zp(Gf),Gf.encode,Gf.parse,Gf.getAll;var Jf=Gf.get,Yf=Gf.set,Xf=Gf.remove;const Qf={get(e){const t=Jf(e);if(void 0!==t)return JSON.parse(t)},save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0,sameSite:"none"}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Yf(e,JSON.stringify(t),r)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Xf(e,n)}},eh={get:e=>Qf.get(e)||Qf.get(`_legacy_${e}`),save(e,t,n){let r={};"https:"===window.location.protocol&&(r={secure:!0}),(null==n?void 0:n.daysUntilExpire)&&(r.expires=n.daysUntilExpire),(null==n?void 0:n.cookieDomain)&&(r.domain=n.cookieDomain),Yf(`_legacy_${e}`,JSON.stringify(t),r),Qf.save(e,t,n)},remove(e,t){let n={};(null==t?void 0:t.cookieDomain)&&(n.domain=t.cookieDomain),Xf(e,n),Qf.remove(e,t),Qf.remove(`_legacy_${e}`,t)}},th={get(e){if("undefined"==typeof sessionStorage)return;const t=sessionStorage.getItem(e);return null!=t?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};var nh,rh;(rh=nh||(nh={})).Code="code",rh.ConnectCode="connect_code";var ih,oh=function(e){return ih=ih||function(e,t,n){var r=void 0===t?null:t,i=function(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),i=0,o=n.length;i<o;++i)r[i]=n.charCodeAt(i);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}(e,void 0!==n&&n),o=i.indexOf("\n",10)+1,a=i.substring(o)+(r?"//# sourceMappingURL="+r:""),s=new Blob([a],{type:"application/javascript"});return URL.createObjectURL(s)}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YSx1c2VNcnJ0OmZ9LHBvcnRzOltwXX0pPT57bGV0IGgsdSxsPXt9O2NvbnN0e2F1ZGllbmNlOmQsc2NvcGU6eX09cnx8e307dHJ5e2NvbnN0IHI9YT8oZT0+e2NvbnN0IHQ9bmV3IFVSTFNlYXJjaFBhcmFtcyhlKSxyPXt9O3JldHVybiB0LmZvckVhY2goKChlLHQpPT57clt0XT1lfSkpLHJ9KShjLmJvZHkpOkpTT04ucGFyc2UoYy5ib2R5KTtpZighci5yZWZyZXNoX3Rva2VuJiYicmVmcmVzaF90b2tlbiI9PT1yLmdyYW50X3R5cGUpe2lmKHU9KChlLHQpPT5vW24oZSx0KV0pKGQseSksIXUmJmYpe2NvbnN0IGU9by5sYXRlc3RfcmVmcmVzaF90b2tlbix0PSgoZSx0KT0+e2NvbnN0IHI9T2JqZWN0LmtleXMobykuZmluZCgocj0+e2lmKCJsYXRlc3RfcmVmcmVzaF90b2tlbiIhPT1yKXtjb25zdCBzPSgoZSx0KT0+dC5zdGFydHNXaXRoKGAke2V9fGApKSh0LHIpLG89ci5zcGxpdCgifCIpWzFdLnNwbGl0KCIgIiksbj1lLnNwbGl0KCIgIikuZXZlcnkoKGU9Pm8uaW5jbHVkZXMoZSkpKTtyZXR1cm4gcyYmbn19KSk7cmV0dXJuISFyfSkoeSxkKTtlJiYhdCYmKHU9ZSl9aWYoIXUpdGhyb3cgbmV3IHQoZCx5KTtjLmJvZHk9YT9zKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpOkpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxyKSx7cmVmcmVzaF90b2tlbjp1fSkpfWxldCBqLGs7ImZ1bmN0aW9uIj09dHlwZW9mIEFib3J0Q29udHJvbGxlciYmKGo9bmV3IEFib3J0Q29udHJvbGxlcixjLnNpZ25hbD1qLnNpZ25hbCk7dHJ5e2s9YXdhaXQgUHJvbWlzZS5yYWNlKFsoXz1lLG5ldyBQcm9taXNlKChlPT5zZXRUaW1lb3V0KGUsXykpKSksZmV0Y2goaSxPYmplY3QuYXNzaWduKHt9LGMpKV0pfWNhdGNoKGUpe3JldHVybiB2b2lkIHAucG9zdE1lc3NhZ2Uoe2Vycm9yOmUubWVzc2FnZX0pfWlmKCFrKXJldHVybiBqJiZqLmFib3J0KCksdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjoiVGltZW91dCB3aGVuIGV4ZWN1dGluZyAnZmV0Y2gnIn0pO2c9ay5oZWFkZXJzLGw9Wy4uLmddLnJlZHVjZSgoKGUsW3Qscl0pPT4oZVt0XT1yLGUpKSx7fSksaD1hd2FpdCBrLmpzb24oKSxoLnJlZnJlc2hfdG9rZW4/KGYmJihvLmxhdGVzdF9yZWZyZXNoX3Rva2VuPWgucmVmcmVzaF90b2tlbixPPXUsYj1oLnJlZnJlc2hfdG9rZW4sT2JqZWN0LmVudHJpZXMobykuZm9yRWFjaCgoKFtlLHRdKT0+e3Q9PT1PJiYob1tlXT1iKX0pKSksKChlLHQscik9PntvW24odCxyKV09ZX0pKGgucmVmcmVzaF90b2tlbixkLHkpLGRlbGV0ZSBoLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KShkLHkpLHAucG9zdE1lc3NhZ2Uoe29rOmsub2ssanNvbjpoLGhlYWRlcnM6bH0pfWNhdGNoKGUpe3AucG9zdE1lc3NhZ2Uoe29rOiExLGpzb246e2Vycm9yOmUuZXJyb3IsZXJyb3JfZGVzY3JpcHRpb246ZS5tZXNzYWdlfSxoZWFkZXJzOmx9KX12YXIgTyxiLGcsX30pKX0oKTsKCg==",null,false),new Worker(ih,e)};const ah={};class sh{constructor(e,t){this.cache=e,this.clientId=t,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(e){var t;const n=new Set((null===(t=await this.cache.get(this.manifestKey))||void 0===t?void 0:t.keys)||[]);n.add(e),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(e){const t=await this.cache.get(this.manifestKey);if(t){const n=new Set(t.keys);return n.delete(e),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(e){return`@@auth0spajs@@::${e}`}}const lh={memory:()=>(new Wf).enclosedCache,localstorage:()=>new Vf},ch=e=>lh[e],uh=e=>{const{openUrl:t,onRedirect:n}=e,r=Hp(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},r),{openUrl:!1===t||t?t:n})},dh=(e,t)=>{const n=(null==t?void 0:t.split(" "))||[];return((null==e?void 0:e.split(" "))||[]).every(e=>n.includes(e))},ph={NONCE:"nonce",KEYPAIR:"keypair"};class fh{constructor(e){this.clientId=e}getVersion(){return 1}createDbHandle(){const e=window.indexedDB.open("auth0-spa-js",this.getVersion());return new Promise((t,n)=>{e.onupgradeneeded=()=>Object.values(ph).forEach(t=>e.result.createObjectStore(t)),e.onerror=()=>n(e.error),e.onsuccess=()=>t(e.result)})}async getDbHandle(){return this.dbHandle||(this.dbHandle=await this.createDbHandle()),this.dbHandle}async executeDbRequest(e,t,n){const r=n((await this.getDbHandle()).transaction(e,t).objectStore(e));return new Promise((e,t)=>{r.onsuccess=()=>e(r.result),r.onerror=()=>t(r.error)})}buildKey(e){const t=e?`_${e}`:"auth0";return`${this.clientId}::${t}`}setNonce(e,t){return this.save(ph.NONCE,this.buildKey(t),e)}setKeyPair(e){return this.save(ph.KEYPAIR,this.buildKey(),e)}async save(e,t,n){await this.executeDbRequest(e,"readwrite",e=>e.put(n,t))}findNonce(e){return this.find(ph.NONCE,this.buildKey(e))}findKeyPair(){return this.find(ph.KEYPAIR,this.buildKey())}find(e,t){return this.executeDbRequest(e,"readonly",e=>e.get(t))}async deleteBy(e,t){const n=await this.executeDbRequest(e,"readonly",e=>e.getAllKeys());null==n||n.filter(t).map(t=>this.executeDbRequest(e,"readwrite",e=>e.delete(t)))}deleteByClientId(e,t){return this.deleteBy(e,e=>"string"==typeof e&&e.startsWith(`${t}::`))}clearNonces(){return this.deleteByClientId(ph.NONCE,this.clientId)}clearKeyPairs(){return this.deleteByClientId(ph.KEYPAIR,this.clientId)}}let hh=class{constructor(e){this.storage=new fh(e)}getNonce(e){return this.storage.findNonce(e)}setNonce(e,t){return this.storage.setNonce(e,t)}async getOrGenerateKeyPair(){let e=await this.storage.findKeyPair();return e||(e=await async function(e,t){var n;let r;return r={name:"ECDSA",namedCurve:"P-256"},crypto.subtle.generateKey(r,null!==(n=null==t?void 0:t.extractable)&&void 0!==n&&n,["sign","verify"])}(0,{extractable:!1}),await this.storage.setKeyPair(e)),e}async generateProof(e){const t=await this.getOrGenerateKeyPair();return function({keyPair:e,url:t,method:n,nonce:r,accessToken:i}){return Af(e,function(e){const t=new URL(e);return t.search="",t.hash="",t.href}(t),n,r,i)}(Object.assign({keyPair:t},e))}async calculateThumbprint(){return function(e){return async function(e){if(!jf(e))throw new TypeError('"publicKey" must be a public CryptoKey');if(!0!==e.extractable)throw new TypeError('"publicKey.extractable" must be true');const t=await Pf(e);let n;switch(t.kty){case"EC":n={crv:t.crv,kty:t.kty,x:t.x,y:t.y};break;case"OKP":n={crv:t.crv,kty:t.kty,x:t.x};break;case"RSA":n={e:t.e,kty:t.kty,n:t.n};break;default:throw new Nf("unsupported JWK kty")}return If(await crypto.subtle.digest({name:"SHA-256"},Sf(JSON.stringify(n))))}(e.publicKey)}(await this.getOrGenerateKeyPair())}async clear(){await Promise.all([this.storage.clearNonces(),this.storage.clearKeyPairs()])}};var mh;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(mh||(mh={}));class gh{constructor(e,t){this.hooks=t,this.config=Object.assign(Object.assign({},e),{fetch:e.fetch||("undefined"==typeof window?fetch:window.fetch.bind(window))})}isAbsoluteUrl(e){return/^(https?:)?\/\//i.test(e)}buildUrl(e,t){if(t){if(this.isAbsoluteUrl(t))return t;if(e)return`${e.replace(/\/?\/$/,"")}/${t.replace(/^\/+/,"")}`}throw new TypeError("`url` must be absolute or `baseUrl` non-empty.")}getAccessToken(e){return this.config.getAccessToken?this.config.getAccessToken(e):this.hooks.getAccessToken(e)}extractUrl(e){return"string"==typeof e?e:e instanceof URL?e.href:e.url}buildBaseRequest(e,t){if(!this.config.baseUrl)return new Request(e,t);const n=this.buildUrl(this.config.baseUrl,this.extractUrl(e)),r=e instanceof Request?new Request(n,e):n;return new Request(r,t)}setAuthorizationHeader(e,t,n=mh.Bearer){e.headers.set("authorization",`${n} ${t}`)}async setDpopProofHeader(e,t){if(!this.config.dpopNonceId)return;const n=await this.hooks.getDpopNonce(),r=await this.hooks.generateDpopProof({accessToken:t,method:e.method,nonce:n,url:e.url});e.headers.set("dpop",r)}async prepareRequest(e,t){const n=await this.getAccessToken(t);let r,i;"string"==typeof n?(r=this.config.dpopNonceId?mh.DPoP:mh.Bearer,i=n):(r=n.token_type,i=n.access_token),this.setAuthorizationHeader(e,i,r),r===mh.DPoP&&await this.setDpopProofHeader(e,i)}getHeader(e,t){return Array.isArray(e)?new Headers(e).get(t)||"":"function"==typeof e.get?e.get(t)||"":e[t]||""}hasUseDpopNonceError(e){if(401!==e.status)return!1;const t=this.getHeader(e.headers,"www-authenticate");return t.includes("invalid_dpop_nonce")||t.includes("use_dpop_nonce")}async handleResponse(e,t){const n=this.getHeader(e.headers,"dpop-nonce");if(n&&await this.hooks.setDpopNonce(n),!this.hasUseDpopNonceError(e))return e;if(!n||!t.onUseDpopNonceError)throw new pf(n);return t.onUseDpopNonceError()}async internalFetchWithAuth(e,t,n,r){const i=this.buildBaseRequest(e,t);await this.prepareRequest(i,r);const o=await this.config.fetch(i);return this.handleResponse(o,n)}fetchWithAuth(e,t,n){const r={onUseDpopNonceError:()=>this.internalFetchWithAuth(e,t,Object.assign(Object.assign({},r),{onUseDpopNonceError:void 0}),n)};return this.internalFetchWithAuth(e,t,r,n)}}let vh=class{constructor(e,t){this.myAccountFetcher=e,this.apiBase=t}async connectAccount(e){const t=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/connect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async completeAccount(e){const t=await this.myAccountFetcher.fetchWithAuth(`${this.apiBase}v1/connected-accounts/complete`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});return this._handleResponse(t)}async _handleResponse(e){let t;try{t=await e.text(),t=JSON.parse(t)}catch(n){throw new yh({type:"invalid_json",status:e.status,title:"Invalid JSON response",detail:t||String(n)})}if(e.ok)return t;throw new yh(t)}};class yh extends Error{constructor({type:e,status:t,title:n,detail:r,validation_errors:i}){super(r),this.name="MyAccountApiError",this.type=e,this.status=t,this.title=n,this.detail=r,this.validation_errors=i,Object.setPrototypeOf(this,yh.prototype)}}const bh=new Yp;class xh{constructor(e){let t,n;if(this.userCache=(new Wf).enclosedCache,this.activeLockKeys=new Set,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{const e=Array.from(this.activeLockKeys);for(const t of e)await bh.releaseLock(t);this.activeLockKeys.clear(),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),e),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),e.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!hf())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===hf().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),e.cache&&e.cacheLocation,e.cache)n=e.cache;else{if(t=e.cacheLocation||"memory",!ch(t))throw new Error(`Invalid cache location "${t}"`);n=ch(t)()}this.httpTimeoutMs=e.httpTimeoutInSeconds?1e3*e.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===e.legacySameSiteCookie?Qf:eh,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(()=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=e.sessionCheckExpiryDays||1;const r=e.useCookiesForTransactions?this.cookieStorage:th;var i,o,a;this.scope=((e,t,...n)=>{if("object"!=typeof e)return{default:Uf(t,e,...n)};let r={default:Uf(t,...n)};return Object.keys(e).forEach(i=>{const o=e[i];r[i]=Uf(t,o,...n)}),r})(this.options.authorizationParams.scope,"openid",this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new Hf(r,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||ef,this.cacheManager=new qf(n,n.allKeys?void 0:new sh(n,this.options.clientId),this.nowProvider),this.dpop=this.options.useDpop?new hh(this.options.clientId):void 0,this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=(o=this.options.issuer,a=this.domainUrl,o?o.startsWith("https://")?o:`https://${o}/`:`${a}/`);const s=`${this.domainUrl}/me/`,l=this.createFetcher(Object.assign(Object.assign({},this.options.useDpop&&{dpopNonceId:"__auth0_my_account_api__"}),{getAccessToken:()=>this.getTokenSilently({authorizationParams:{scope:"create:me:connected_accounts",audience:s},detailedResponse:!0})}));this.myAccountApi=new vh(l,s),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===t&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new oh)}_url(e){const t=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||Qp)));return`${this.domainUrl}${e}&auth0Client=${t}`}_authorizeUrl(e){return this._url(`/authorize?${yf(e)}`)}async _verifyIdToken(e,t,n){const r=await this.nowProvider();return(e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(e=>{const t=e.split("."),[n,r,i]=t;if(3!==t.length||!n||!r||!i)throw new Error("ID token could not be decoded");const o=JSON.parse(xf(r)),a={__raw:e},s={};return Object.keys(o).forEach(e=>{a[e]=o[e],Zf.includes(e)||(s[e]=o[e])}),{encoded:{header:n,payload:r,signature:i},header:JSON.parse(xf(n)),claims:a,user:s}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==t.header.alg)throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||"string"!=typeof t.claims.aud&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!Kf(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==t.claims.exp||!Kf(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Kf(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const n=e.leeway||60,r=new Date(e.now||Date.now()),i=new Date(0);if(i.setUTCSeconds(t.claims.exp+n),r>i)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${r}) is after expiration time (${i})`);if(null!=t.claims.nbf&&Kf(t.claims.nbf)){const e=new Date(0);if(e.setUTCSeconds(t.claims.nbf-n),r<e)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${r}) is before ${e}`)}if(null!=t.claims.auth_time&&Kf(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+n),r>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${r}) is after last auth at ${i}`)}if(e.organization){const n=e.organization.trim();if(n.startsWith("org_")){const e=n;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(e!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_id}"`)}else{const e=n.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(e!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${e}", found "${t.claims.org_name}"`)}}return t})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:e,nonce:t,organization:n,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,"string"!=typeof i?i:parseInt(i,10)||void 0),now:r});var i}_processOrgHint(e){e?this.cookieStorage.save(this.orgHintCookieName,e,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(e,t,n){var r;const i=gf(mf()),o=gf(mf()),a=mf(),s=await bf(a),l=wf(s),c=await(null===(r=this.dpop)||void 0===r?void 0:r.calculateThumbprint()),u=(p=this.options,f=this.scope,h=e,m=i,g=o,v=l,y=e.redirect_uri||this.options.authorizationParams.redirect_uri||n,b=null==t?void 0:t.response_mode,x=c,Object.assign(Object.assign(Object.assign({client_id:p.clientId},p.authorizationParams),h),{scope:Bf(f,h.scope,h.audience),response_type:"code",response_mode:b||"query",state:m,nonce:g,redirect_uri:y||p.authorizationParams.redirect_uri,code_challenge:v,code_challenge_method:"S256",dpop_jkt:x})),d=this._authorizeUrl(u);var p,f,h,m,g,v,y,b,x;return{nonce:o,code_verifier:a,scope:u.scope,audience:u.audience||"default",redirect_uri:u.redirect_uri,state:i,url:d}}async loginWithPopup(e,t){var n;if(e=e||{},!(t=t||{}).popup&&(t.popup=(()=>{const e=window.screenX+(window.innerWidth-400)/2,t=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${e},top=${t},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!t.popup))throw new lf;const r=await this._prepareAuthorizeUrl(e.authorizationParams||{},{response_mode:"web_message"},window.location.origin);t.popup.location.href=r.url;const i=await(o=Object.assign(Object.assign({},t),{timeoutInSeconds:t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}),new Promise((e,t)=>{let n;const r=setInterval(()=>{o.popup&&o.popup.closed&&(clearInterval(r),clearTimeout(i),window.removeEventListener("message",n,!1),t(new sf(o.popup)))},1e3),i=setTimeout(()=>{clearInterval(r),t(new af(o.popup)),window.removeEventListener("message",n,!1)},1e3*(o.timeoutInSeconds||60));n=function(a){if(a.data&&"authorization_response"===a.data.type){if(clearTimeout(i),clearInterval(r),window.removeEventListener("message",n,!1),o.popup.close(),a.data.response.error)return t(tf.fromPayload(a.data.response));e(a.data.response)}},window.addEventListener("message",n)}));var o;if(r.state!==i.state)throw new tf("state_mismatch","Invalid state");const a=(null===(n=e.authorizationParams)||void 0===n?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:r.audience,scope:r.scope,code_verifier:r.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:r.redirect_uri},{nonceIn:r.nonce,organization:a})}async getUser(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.user}async getIdTokenClaims(){var e;const t=await this._getIdTokenFromCache();return null===(e=null==t?void 0:t.decodedToken)||void 0===e?void 0:e.claims}async loginWithRedirect(e={}){var t;const n=uh(e),{openUrl:r,fragment:i,appState:o}=n,a=Hp(n,["openUrl","fragment","appState"]),s=(null===(t=a.authorizationParams)||void 0===t?void 0:t.organization)||this.options.authorizationParams.organization,l=await this._prepareAuthorizeUrl(a.authorizationParams||{}),{url:c}=l,u=Hp(l,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},u),{appState:o,response_type:nh.Code}),s&&{organization:s}));const d=i?`${c}#${i}`:c;r?await r(d):window.location.assign(d)}async handleRedirectCallback(e=window.location.href){const t=e.split("?").slice(1);if(0===t.length)throw new Error("There are no query params available for parsing.");const n=this.transactionManager.get();if(!n)throw new tf("missing_transaction","Invalid state");this.transactionManager.remove();const r=(e=>{e.indexOf("#")>-1&&(e=e.substring(0,e.indexOf("#")));const t=new URLSearchParams(e);return{state:t.get("state"),code:t.get("code")||void 0,connect_code:t.get("connect_code")||void 0,error:t.get("error")||void 0,error_description:t.get("error_description")||void 0}})(t.join(""));return n.response_type===nh.ConnectCode?this._handleConnectAccountRedirectCallback(r,n):this._handleLoginRedirectCallback(r,n)}async _handleLoginRedirectCallback(e,t){const{code:n,state:r,error:i,error_description:o}=e;if(i)throw new nf(i,o||i,r,t.appState);if(!t.code_verifier||t.state&&t.state!==r)throw new tf("state_mismatch","Invalid state");const a=t.organization,s=t.nonce,l=t.redirect_uri;return await this._requestToken(Object.assign({audience:t.audience,scope:t.scope,code_verifier:t.code_verifier,grant_type:"authorization_code",code:n},l?{redirect_uri:l}:{}),{nonceIn:s,organization:a}),{appState:t.appState,response_type:nh.Code}}async _handleConnectAccountRedirectCallback(e,t){const{connect_code:n,state:r,error:i,error_description:o}=e;if(i)throw new rf(i,o||i,t.connection,r,t.appState);if(!n)throw new tf("missing_connect_code","Missing connect code");if(!(t.code_verifier&&t.state&&t.auth_session&&t.redirect_uri&&t.state===r))throw new tf("state_mismatch","Invalid state");const a=await this.myAccountApi.completeAccount({auth_session:t.auth_session,connect_code:n,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier});return Object.assign(Object.assign({},a),{appState:t.appState,response_type:nh.ConnectCode})}async checkSession(e){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(e)}catch(t){}}async getTokenSilently(e={}){var t,n;const r=Object.assign(Object.assign({cacheMode:"on"},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Bf(this.scope,null===(t=e.authorizationParams)||void 0===t?void 0:t.scope,(null===(n=e.authorizationParams)||void 0===n?void 0:n.audience)||this.options.authorizationParams.audience)})}),i=await((e,t)=>{let n=ah[t];return n||(n=e().finally(()=>{delete ah[t],n=null}),ah[t]=n),n})(()=>this._getTokenSilently(r),`${this.options.clientId}::${r.authorizationParams.audience}::${r.authorizationParams.scope}`);return e.detailedResponse?i:null==i?void 0:i.access_token}async _getTokenSilently(e){const{cacheMode:t}=e,n=Hp(e,["cacheMode"]);if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId,cacheMode:t});if(e)return e}if("cache-only"===t)return;const r=`auth0.lock.getTokenSilently.${this.options.clientId}.${n.authorizationParams.audience||"default"}`;if(!(await(async(e,t=3)=>{for(let n=0;n<t;n++)if(await e())return!0;return!1})(()=>bh.acquireLock(r,5e3),10)))throw new of;this.activeLockKeys.add(r),1===this.activeLockKeys.size&&window.addEventListener("pagehide",this._releaseLockOnPageHide);try{if("off"!==t){const e=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(e)return e}const e=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:r,token_type:i,access_token:o,oauthTokenScope:a,expires_in:s}=e;return Object.assign(Object.assign({id_token:r,token_type:i,access_token:o},a?{scope:a}:null),{expires_in:s})}finally{await bh.releaseLock(r),this.activeLockKeys.delete(r),0===this.activeLockKeys.size&&window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}async getTokenWithPopup(e={},t={}){var n,r;const i=Object.assign(Object.assign({},e),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),e.authorizationParams),{scope:Bf(this.scope,null===(n=e.authorizationParams)||void 0===n?void 0:n.scope,(null===(r=e.authorizationParams)||void 0===r?void 0:r.audience)||this.options.authorizationParams.audience)})});return t=Object.assign(Object.assign({},Xp),t),await this.loginWithPopup(i,t),(await this.cacheManager.get(new $f({scope:i.authorizationParams.scope,audience:i.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt)).access_token}async isAuthenticated(){return!!(await this.getUser())}_buildLogoutUrl(e){null!==e.clientId?e.clientId=e.clientId||this.options.clientId:delete e.clientId;const t=e.logoutParams||{},{federated:n}=t,r=Hp(t,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${yf(Object.assign({clientId:e.clientId},r))}`)+i}async logout(e={}){var t;const n=uh(e),{openUrl:r}=n,i=Hp(n,["openUrl"]);null===e.clientId?await this.cacheManager.clear():await this.cacheManager.clear(e.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@"),await(null===(t=this.dpop)||void 0===t?void 0:t.clear());const o=this._buildLogoutUrl(i);r?await r(o):!1!==r&&window.location.assign(o)}async _getTokenFromIFrame(e){const t=Object.assign(Object.assign({},e.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!t.organization&&(t.organization=n);const{url:r,state:i,nonce:o,code_verifier:a,redirect_uri:s,scope:l,audience:c}=await this._prepareAuthorizeUrl(t,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new tf("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const n=e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds;let d;try{d=new URL(this.domainUrl).origin}catch(u){d=this.domainUrl}const p=await((e,t,n=60)=>new Promise((r,i)=>{const o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";const a=()=>{window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",s,!1))};let s;const l=setTimeout(()=>{i(new of),a()},1e3*n);s=function(e){if(e.origin!=t)return;if(!e.data||"authorization_response"!==e.data.type)return;const n=e.source;n&&n.close(),e.data.response.error?i(tf.fromPayload(e.data.response)):r(e.data.response),clearTimeout(l),window.removeEventListener("message",s,!1),setTimeout(a,2e3)},window.addEventListener("message",s,!1),window.document.body.appendChild(o),o.setAttribute("src",e)}))(r,d,n);if(i!==p.state)throw new tf("state_mismatch","Invalid state");const f=await this._requestToken(Object.assign(Object.assign({},e.authorizationParams),{code_verifier:a,code:p.code,grant_type:"authorization_code",redirect_uri:s,timeout:e.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:t.organization});return Object.assign(Object.assign({},f),{scope:l,oauthTokenScope:f.scope,audience:c})}catch(u){throw"login_required"===u.error&&this.logout({openUrl:!1}),u}}async _getTokenUsingRefreshToken(e){const t=await this.cacheManager.get(new $f({scope:e.authorizationParams.scope,audience:e.authorizationParams.audience||"default",clientId:this.options.clientId}),void 0,this.options.useMrrt);if(!(t&&t.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw new uf(e.authorizationParams.audience||"default",e.authorizationParams.scope)}const n=e.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,r="number"==typeof e.timeoutInSeconds?1e3*e.timeoutInSeconds:null,i=((e,t,n,r)=>{var i;if(e&&n&&r){if(t.audience!==n)return t.scope;const e=r.split(" "),o=(null===(i=t.scope)||void 0===i?void 0:i.split(" "))||[],a=o.every(t=>e.includes(t));return e.length>=o.length&&a?r:t.scope}return t.scope})(this.options.useMrrt,e.authorizationParams,null==t?void 0:t.audience,null==t?void 0:t.scope);try{const c=await this._requestToken(Object.assign(Object.assign(Object.assign({},e.authorizationParams),{grant_type:"refresh_token",refresh_token:t&&t.refresh_token,redirect_uri:n}),r&&{timeout:r}),{scopesToRequest:i});if(c.refresh_token&&this.options.useMrrt&&(null==t?void 0:t.refresh_token)&&await this.cacheManager.updateEntry(t.refresh_token,c.refresh_token),this.options.useMrrt&&!(o=null==t?void 0:t.audience,a=null==t?void 0:t.scope,s=e.authorizationParams.audience,l=e.authorizationParams.scope,o===s&&dh(l,a)||dh(i,c.scope))){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);await this.cacheManager.remove(this.options.clientId,e.authorizationParams.audience,e.authorizationParams.scope);const t=((e,t)=>{const n=(null==e?void 0:e.split(" "))||[],r=(null==t?void 0:t.split(" "))||[];return n.filter(e=>-1==r.indexOf(e)).join(",")})(i,c.scope);throw new df(e.authorizationParams.audience||"default",t)}return Object.assign(Object.assign({},c),{scope:e.authorizationParams.scope,oauthTokenScope:c.scope,audience:e.authorizationParams.audience||"default"})}catch(c){if((c.message.indexOf("Missing Refresh Token")>-1||c.message&&c.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(e);throw c}var o,a,s,l}async _saveEntryInCache(e){const{id_token:t,decodedToken:n}=e,r=Hp(e,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:t,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,e.id_token,e.decodedToken),await this.cacheManager.set(r)}async _getIdTokenFromCache(){const e=this.options.authorizationParams.audience||"default",t=this.scope[e],n=await this.cacheManager.getIdToken(new $f({clientId:this.options.clientId,audience:e,scope:t})),r=this.userCache.get("@@user@@");return n&&n.id_token===(null==r?void 0:r.id_token)?r:(this.userCache.set("@@user@@",n),n)}async _getEntryFromCache({scope:e,audience:t,clientId:n,cacheMode:r}){const i=await this.cacheManager.get(new $f({scope:e,audience:t,clientId:n}),60,this.options.useMrrt,r);if(i&&i.access_token){const{token_type:e,access_token:t,oauthTokenScope:n,expires_in:r}=i,o=await this._getIdTokenFromCache();return o&&Object.assign(Object.assign({id_token:o.id_token,token_type:e||"Bearer",access_token:t},n?{scope:n}:null),{expires_in:r})}}async _requestToken(e,t){const{nonceIn:n,organization:r,scopesToRequest:i}=t||{},o=await zf(Object.assign(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs,useMrrt:this.options.useMrrt,dpop:this.dpop},e),{scope:i||e.scope}),this.worker),a=await this._verifyIdToken(o.id_token,n,r);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},o),{decodedToken:a,scope:e.scope,audience:e.audience||"default"}),o.scope?{oauthTokenScope:o.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(r||a.claims.org_id),Object.assign(Object.assign({},o),{decodedToken:a})}async exchangeToken(e){return this._requestToken({grant_type:"urn:ietf:params:oauth:grant-type:token-exchange",subject_token:e.subject_token,subject_token_type:e.subject_token_type,scope:Bf(this.scope,e.scope,e.audience||this.options.authorizationParams.audience),audience:e.audience||this.options.authorizationParams.audience,organization:e.organization||this.options.authorizationParams.organization})}_assertDpop(e){if(!e)throw new Error("`useDpop` option must be enabled before using DPoP.")}getDpopNonce(e){return this._assertDpop(this.dpop),this.dpop.getNonce(e)}setDpopNonce(e,t){return this._assertDpop(this.dpop),this.dpop.setNonce(e,t)}generateDpopProof(e){return this._assertDpop(this.dpop),this.dpop.generateProof(e)}createFetcher(e={}){return new gh(e,{isDpopEnabled:()=>!!this.options.useDpop,getAccessToken:e=>{var t;return this.getTokenSilently({authorizationParams:{scope:null===(t=null==e?void 0:e.scope)||void 0===t?void 0:t.join(" "),audience:null==e?void 0:e.audience},detailedResponse:!0})},getDpopNonce:()=>this.getDpopNonce(e.dpopNonceId),setDpopNonce:t=>this.setDpopNonce(t,e.dpopNonceId),generateDpopProof:e=>this.generateDpopProof(e)})}async connectAccountWithRedirect(e){const{openUrl:t,appState:n,connection:r,scopes:i,authorization_params:o,redirectUri:a=this.options.authorizationParams.redirect_uri||window.location.origin}=e;if(!r)throw new Error("connection is required");const s=gf(mf()),l=mf(),c=await bf(l),u=wf(c),{connect_uri:d,connect_params:p,auth_session:f}=await this.myAccountApi.connectAccount({connection:r,scopes:i,redirect_uri:a,state:s,code_challenge:u,code_challenge_method:"S256",authorization_params:o});this.transactionManager.create({state:s,code_verifier:l,auth_session:f,redirect_uri:a,appState:n,connection:r,response_type:nh.ConnectCode});const h=new URL(d);h.searchParams.set("ticket",p.ticket),t?await t(h.toString()):window.location.assign(h)}}var wh={isAuthenticated:!1,isLoading:!0,error:void 0,user:void 0},kh=function(){throw new Error("You forgot to wrap your component in <Auth0Provider>.")},_h=$p($p({},wh),{buildAuthorizeUrl:kh,buildLogoutUrl:kh,getAccessTokenSilently:kh,getAccessTokenWithPopup:kh,getIdTokenClaims:kh,exchangeToken:kh,loginWithRedirect:kh,loginWithPopup:kh,connectAccountWithRedirect:kh,logout:kh,handleRedirectCallback:kh,getDpopNonce:kh,setDpopNonce:kh,generateDpopProof:kh,createFetcher:kh}),Sh=$.createContext(_h),Ch=function(e){function t(n,r){var i=e.call(this,null!=r?r:n)||this;return i.error=n,i.error_description=r,Object.setPrototypeOf(i,t.prototype),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Bp(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(Error),Eh=/[?&](?:connect_)?code=[^&]+/,Ih=/[?&]state=[^&]+/,Nh=/[?&]error=[^&]+/,Oh=function(e){return function(t){if(t instanceof Error)return t;if(null!==t&&"object"==typeof t&&"error"in t&&"string"==typeof t.error){if("error_description"in t&&"string"==typeof t.error_description){var n=t;return new Ch(n.error,n.error_description)}return new Ch(t.error)}return new Error(e)}},Th=Oh("Login failed"),Rh=Oh("Get access token failed"),jh=function(e){var t,n;(null==e?void 0:e.redirectUri)&&(e.authorizationParams=null!==(t=e.authorizationParams)&&void 0!==t?t:{},e.authorizationParams.redirect_uri=e.redirectUri,delete e.redirectUri),(null===(n=null==e?void 0:e.authorizationParams)||void 0===n?void 0:n.redirectUri)&&(e.authorizationParams.redirect_uri=e.authorizationParams.redirectUri,delete e.authorizationParams.redirectUri)},Ah=function(e,t){switch(t.type){case"LOGIN_POPUP_STARTED":return $p($p({},e),{isLoading:!0});case"LOGIN_POPUP_COMPLETE":case"INITIALISED":return $p($p({},e),{isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"HANDLE_REDIRECT_COMPLETE":case"GET_ACCESS_TOKEN_COMPLETE":return e.user===t.user?e:$p($p({},e),{isAuthenticated:!!t.user,user:t.user});case"LOGOUT":return $p($p({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return $p($p({},e),{isLoading:!1,error:t.error})}},Ph=function(e){var t;window.history.replaceState({},document.title,null!==(t=e.returnTo)&&void 0!==t?t:window.location.pathname)},Mh=function(e){var t=e.children,n=e.skipRedirectCallback,r=e.onRedirectCallback,i=void 0===r?Ph:r,o=e.context,a=void 0===o?Sh:o,s=Vp(e,["children","skipRedirectCallback","onRedirectCallback","context"]),l=$.useState(function(){return new xh(function(e){return jh(e),$p($p({},e),{auth0Client:{name:"auth0-react",version:"2.11.0"}})}(s))})[0],c=$.useReducer(Ah,wh),u=c[0],d=c[1],p=$.useRef(!1),f=$.useCallback(function(e){return d({type:"ERROR",error:e}),e},[]);$.useEffect(function(){p.current||(p.current=!0,Wp(void 0,void 0,void 0,function(){var e,t,r,o,a,s,c;return qp(this,function(u){switch(u.label){case 0:return u.trys.push([0,7,,8]),e=void 0,void 0===p&&(p=window.location.search),!Eh.test(p)&&!Nh.test(p)||!Ih.test(p)||n?[3,3]:[4,l.handleRedirectCallback()];case 1:return t=u.sent(),r=t.appState,o=void 0===r?{}:r,a=t.response_type,s=Vp(t,["appState","response_type"]),[4,l.getUser()];case 2:return e=u.sent(),o.response_type=a,a===nh.ConnectCode&&(o.connectedAccount=s),i(o,e),[3,6];case 3:return[4,l.checkSession()];case 4:return u.sent(),[4,l.getUser()];case 5:e=u.sent(),u.label=6;case 6:return d({type:"INITIALISED",user:e}),[3,8];case 7:return c=u.sent(),f(Th(c)),[3,8];case 8:return[2]}var p})}))},[l,i,n,f]);var h=$.useCallback(function(e){return jh(e),l.loginWithRedirect(e)},[l]),m=$.useCallback(function(e,t){return Wp(void 0,void 0,void 0,function(){var n,r;return qp(this,function(i){switch(i.label){case 0:d({type:"LOGIN_POPUP_STARTED"}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,l.loginWithPopup(e,t)];case 2:return i.sent(),[3,4];case 3:return n=i.sent(),f(Th(n)),[2];case 4:return[4,l.getUser()];case 5:return r=i.sent(),d({type:"LOGIN_POPUP_COMPLETE",user:r}),[2]}})})},[l,f]),g=$.useCallback(function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Wp(void 0,function(e,t){for(var n,r=0,i=t.length;r<i;r++)!n&&r in t||(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}([],e),void 0,function(e){return void 0===e&&(e={}),qp(this,function(t){switch(t.label){case 0:return[4,l.logout(e)];case 1:return t.sent(),(e.openUrl||!1===e.openUrl)&&d({type:"LOGOUT"}),[2]}})})},[l]),v=$.useCallback(function(e){return Wp(void 0,void 0,void 0,function(){var t,n,r,i;return qp(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,l.getTokenSilently(e)];case 1:return t=o.sent(),[3,5];case 2:throw n=o.sent(),Rh(n);case 3:return r=d,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return r.apply(void 0,[(i.user=o.sent(),i)]),[7];case 5:return[2,t]}})})},[l]),y=$.useCallback(function(e,t){return Wp(void 0,void 0,void 0,function(){var n,r,i,o;return qp(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,3,5]),[4,l.getTokenWithPopup(e,t)];case 1:return n=a.sent(),[3,5];case 2:throw r=a.sent(),Rh(r);case 3:return i=d,o={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return i.apply(void 0,[(o.user=a.sent(),o)]),[7];case 5:return[2,n]}})})},[l]),b=$.useCallback(function(e){return l.connectAccountWithRedirect(e)},[l]),x=$.useCallback(function(){return l.getIdTokenClaims()},[l]),w=$.useCallback(function(e){return Wp(void 0,void 0,void 0,function(){var t,n,r,i;return qp(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,3,5]),[4,l.exchangeToken(e)];case 1:return t=o.sent(),[3,5];case 2:throw n=o.sent(),Rh(n);case 3:return r=d,i={type:"GET_ACCESS_TOKEN_COMPLETE"},[4,l.getUser()];case 4:return r.apply(void 0,[(i.user=o.sent(),i)]),[7];case 5:return[2,t]}})})},[l]),k=$.useCallback(function(e){return Wp(void 0,void 0,void 0,function(){var t,n,r;return qp(this,function(i){switch(i.label){case 0:return i.trys.push([0,2,3,5]),[4,l.handleRedirectCallback(e)];case 1:return[2,i.sent()];case 2:throw t=i.sent(),Rh(t);case 3:return n=d,r={type:"HANDLE_REDIRECT_COMPLETE"},[4,l.getUser()];case 4:return n.apply(void 0,[(r.user=i.sent(),r)]),[7];case 5:return[2]}})})},[l]),_=$.useCallback(function(e){return l.getDpopNonce(e)},[l]),S=$.useCallback(function(e,t){return l.setDpopNonce(e,t)},[l]),C=$.useCallback(function(e){return l.generateDpopProof(e)},[l]),E=$.useCallback(function(e){return l.createFetcher(e)},[l]),I=$.useMemo(function(){return $p($p({},u),{getAccessTokenSilently:v,getAccessTokenWithPopup:y,getIdTokenClaims:x,exchangeToken:w,loginWithRedirect:h,loginWithPopup:m,connectAccountWithRedirect:b,logout:g,handleRedirectCallback:k,getDpopNonce:_,setDpopNonce:S,generateDpopProof:C,createFetcher:E})},[u,v,y,x,w,h,m,b,g,k,_,S,C,E]);return V.createElement(a.Provider,{value:I},t)};const Lh={},Dh=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},Fh=(...e)=>e.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),zh=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};
|
|
41
|
+
/**
|
|
42
|
+
* @license lucide-react v0.561.0 - ISC
|
|
43
|
+
*
|
|
44
|
+
* This source code is licensed under the ISC license.
|
|
45
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
+
*/
|
|
47
|
+
var Uh={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"};
|
|
48
|
+
/**
|
|
49
|
+
* @license lucide-react v0.561.0 - ISC
|
|
50
|
+
*
|
|
51
|
+
* This source code is licensed under the ISC license.
|
|
52
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
53
|
+
*/const Bh=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>$.createElement("svg",{ref:l,...Uh,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Fh("lucide",i),...!o&&!zh(s)&&{"aria-hidden":"true"},...s},[...a.map(([e,t])=>$.createElement(e,t)),...Array.isArray(o)?o:[o]])),$h=(e,t)=>{const n=$.forwardRef(({className:n,...r},i)=>{return $.createElement(Bh,{ref:i,iconNode:t,className:Fh(`lucide-${o=Dh(e),o.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...r});var o});return n.displayName=Dh(e),n},Vh=$h("activity",[["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-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),Wh=$h("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),qh=$h("bot",[["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"}]]),Hh=$h("calendar",[["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"}]]),Kh=$h("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Zh=$h("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Gh=$h("circle-alert",[["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"}]]),Jh=$h("circle-arrow-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]),Yh=$h("circle-arrow-up",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),Xh=$h("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),Qh=$h("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),em=$h("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]),tm=$h("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]),nm=$h("eye",[["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"}]]),rm=$h("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]),im=$h("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),om=$h("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),am=$h("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]),sm=$h("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),lm=$h("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),cm=$h("refresh-cw",[["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"}]]),um=$h("send",[["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"}]]),dm=$h("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),pm=$h("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]),fm=$h("triangle-alert",[["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"}]]),hm=$h("user",[["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"}]]),mm=$h("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),gm=$h("zap",[["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"}]]);
|
|
54
|
+
/**
|
|
55
|
+
* @license lucide-react v0.561.0 - ISC
|
|
56
|
+
*
|
|
57
|
+
* This source code is licensed under the ISC license.
|
|
58
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
+
*/var vm,ym={};if("undefined"==typeof window){var bm={hostname:""};vm={crypto:{randomUUID:function(){throw Error("unsupported")}},navigator:{userAgent:"",onLine:!0},document:{createElement:function(){return{}},location:bm,referrer:""},screen:{width:0,height:0},location:bm,addEventListener:function(){},removeEventListener:function(){}}}else vm=window;function xm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wm(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(vE){return void n(vE)}s.done?t(l):Promise.resolve(l).then(r,i)}function km(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function a(e){wm(o,r,i,a,s,"next",e)}function s(e){wm(o,r,i,a,s,"throw",e)}a(void 0)})}}function _m(e,t,n){return _m=Am()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Tm(i,n.prototype),i},_m.apply(null,arguments)}function Sm(e,t,n){return t&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}function Cm(){return Cm=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cm.apply(this,arguments)}function Em(e){return(Em=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Im(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tm(e,t)}function Nm(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Om(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}function Tm(e,t){return(Tm=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Rm(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function jm(e){var t="function"==typeof Map?new Map:void 0;return jm=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _m(e,arguments,Em(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Tm(r,e)},jm(e)}function Am(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Am=function(){return!!e})()}function Pm(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xm(e,t):void 0}}(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Mm(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(rh){o=[6,rh],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function Lm(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}var Dm,Fm=Object.defineProperty,zm=function(e,t,n){return function(e,t,n){return t in e?Fm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Rm(t))?t+"":t,n)},Um=Object.defineProperty,Bm=function(e,t,n){return function(e,t,n){return t in e?Um(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Rm(t))?t+"":t,n)},$m=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}($m||{}),Vm={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wm={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qm={};function Hm(e){if(qm[e])return qm[e];var t=globalThis[e],n=t.prototype,r=e in Vm?Vm[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in Wm?Wm[e]:void 0,a=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&a&&!globalThis.Zone)return qm[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?qm[e]=c:n}catch(rh){return n}}var Km={};function Zm(e,t,n){var r,i=e+"."+String(n);if(Km[i])return Km[i].call(t);var o=Hm(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(Km[i]=a,a.call(t)):t[n]}var Gm={};function Jm(e,t,n){var r=e+"."+String(n);if(Gm[r])return Gm[r].bind(t);var i=Hm(e)[n];return"function"!=typeof i?t[n]:(Gm[r]=i,i.bind(t))}var Ym={childNodes:function(e){return Zm("Node",e,"childNodes")},parentNode:function(e){return Zm("Node",e,"parentNode")},parentElement:function(e){return Zm("Node",e,"parentElement")},textContent:function(e){return Zm("Node",e,"textContent")},contains:function(e,t){return Jm("Node",e,"contains")(t)},getRootNode:function(e){return Jm("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Zm("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Zm("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Zm("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Zm("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Hm("MutationObserver").constructor},patch:function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(rh){return function(){}}}};function Xm(e){return e.nodeType===e.ELEMENT_NODE}function Qm(e){var t=e&&"host"in e&&"mode"in e&&Ym.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Ym.shadowRoot(t)===e)}function eg(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function tg(e){try{var t=e.rules||e.cssRules;if(!t)return null;var n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);var r=Array.from(t,function(e){return ng(e,n)}).join("");return(i=r).includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}catch(vE){return null}var i}function ng(e,t){if(function(e){return"styleSheet"in e}(e)){var n;try{n=tg(e.styleSheet)||function(e){var t=e.cssText;if(t.split('"').length<3)return t;var n=["@import","url("+JSON.stringify(e.href)+")"];return""===e.layerName?n.push("layer"):e.layerName&&n.push("layer("+e.layerName+")"),e.supportsText&&n.push("supports("+e.supportsText+")"),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}(e)}catch(vE){n=e.cssText}return e.styleSheet.href?fg(n,e.styleSheet.href):n}var r,i=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,i=i.replace(r,"$1\\$2")),t?fg(i,t):i}var rg=function(){function e(){Bm(this,"idNodeMap",new Map),Bm(this,"nodeMetaMap",new WeakMap)}var t=e.prototype;return t.getId=function(e){var t;if(!e)return-1;var n=null==(t=this.getMeta(e))?void 0:t.id;return null!=n?n:-1},t.getNode=function(e){return this.idNodeMap.get(e)||null},t.getIds=function(){return Array.from(this.idNodeMap.keys())},t.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.removeNodeFromMap=function(e){var t=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(e){return t.removeNodeFromMap(e)})},t.has=function(e){return this.idNodeMap.has(e)},t.hasNode=function(e){return this.nodeMetaMap.has(e)},t.add=function(e,t){var n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)},t.replace=function(e,t){var n=this.getNode(e);if(n){var r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)},t.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e}();function ig(e){var t=e.element,n=e.maskInputOptions,r=e.tagName,i=e.type,o=e.value,a=e.maskInputFn,s=o||"",l=i&&og(i);return(n[r.toLowerCase()]||l&&n[l])&&(s=a?a(s,t):"*".repeat(s.length)),s}function og(e){return e.toLowerCase()}var ag="__rrweb_original__";function sg(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?og(t):null}function lg(e,t){var n;try{n=new URL(e,null!=t?t:window.location.href)}catch(o){return null}var r,i=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!=(r=null==i?void 0:i[1])?r:null}var cg=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ug=/^(?:[a-z+]+:)?\/\//i,dg=/^www\..*/i,pg=/^(data:)([^,]*),(.*)/i;function fg(e,t){return(e||"").replace(cg,function(e,n,r,i,o,a){var s,l=r||o||a,c=n||i||"";if(!l)return e;if(ug.test(l)||dg.test(l))return"url("+c+l+c+")";if(pg.test(l))return"url("+c+l+c+")";if("/"===l[0])return"url("+c+(((s=t).indexOf("//")>-1?s.split("/").slice(0,3).join("/"):s.split("/")[0]).split("?")[0]+l)+c+")";var u=t.split("/"),d=l.split("/");u.pop();for(var p,f=Pm(d);!(p=f()).done;){var h=p.value;"."!==h&&(".."===h?u.pop():u.push(h))}return"url("+c+u.join("/")+c+")"})}function hg(e,t){return void 0===t&&(t=!1),t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function mg(e,t){return function(e,t,n){void 0===n&&(n=!1);var r=Array.from(t.childNodes),i=[],o=0;if(r.length>1&&e&&"string"==typeof e)for(var a=hg(e,n),s=a.length/e.length,l=1;l<r.length;l++)if(r[l].textContent&&"string"==typeof r[l].textContent){for(var c=hg(r[l].textContent,n),u=3;u<c.length&&(c[u].match(/[a-zA-Z0-9]/)||-1!==c.indexOf(c.substring(0,u),1));u++);for(;u<c.length;u++){var d=c.substring(0,u),p=a.split(d),f=-1;if(2===p.length)f=p[0].length;else if(p.length>2&&""===p[0]&&""!==r[l-1].textContent)f=a.indexOf(d,1);else if(1===p.length){if(d=d.substring(0,d.length-1),(p=a.split(d)).length<=1)return i.push(e),i;u=101}else u===c.length-1&&(f=a.indexOf(d));if(p.length>=2&&u>100){var h=r[l-1].textContent;if(h&&"string"==typeof h){var m=hg(h).length;f=a.indexOf(d,m)}-1===f&&(f=p[0].length)}if(-1!==f){for(var g=Math.floor(f/s);g>0&&g<e.length;){if((o+=1)>50*r.length)return i.push(e),i;var v=hg(e.substring(0,g),n);if(v.length===f){i.push(e.substring(0,g)),e=e.substring(g),a=a.substring(f);break}v.length<f?g+=Math.max(1,Math.floor((f-v.length)/s)):g-=Math.max(1,Math.floor((v.length-f)*s))}break}}}return i.push(e),i}(e,t).join("/* rr_split */")}var gg,vg,yg=1,bg=new RegExp("[^a-z0-9-_:]");function xg(){return yg++}var wg=/^[^ \t\n\r\u000c]+/,kg=/^[, \t\n\r\u000c]+/;var _g=new WeakMap;function Sg(e,t){return t&&""!==t.trim()?Eg(e,t):t}function Cg(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Eg(e,t){var n=_g.get(e);if(n||(n=e.createElement("a"),_g.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function Ig(e,t,n,r){return r?"src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]?Sg(e,r):"background"!==n||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):""}for(var i=[];r(kg),!(n>=t.length);){var o=r(wg);if(","===o.slice(-1))o=Sg(e,o.substring(0,o.length-1)),i.push(o);else{var a="";o=Sg(e,o);for(var s=!1;;){var l=t.charAt(n);if(""===l){i.push((o+a).trim());break}if(s)")"===l&&(s=!1);else{if(","===l){n+=1,i.push((o+a).trim());break}"("===l&&(s=!0)}a+=l,n+=1}}}return i.join(", ")}(e,r):"style"===n?fg(r,Eg(e)):"object"===t&&"data"===n?Sg(e,r):r:Sg(e,r):r}function Ng(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Og(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!n&&Og(Ym.parentNode(e),t,n);for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}return!!n&&Og(Ym.parentNode(e),t,n)}function Tg(e,t,n,r){var i;if(Xm(e)){if(i=e,!Ym.childNodes(i).length)return!1}else{if(null===Ym.parentElement(e))return!1;i=Ym.parentElement(e)}try{if("string"==typeof t){if(r){if(i.closest("."+t))return!0}else if(i.classList.contains(t))return!0}else if(Og(i,t,r))return!0;if(n)if(r){if(i.closest(n))return!0}else if(i.matches(n))return!0}catch(rh){}return!1}function Rg(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,a=t.needsMask,s=t.inlineStylesheet,l=t.maskInputOptions,c=void 0===l?{}:l,u=t.maskTextFn,d=t.maskInputFn,p=t.dataURLOptions,f=void 0===p?{}:p,h=t.inlineImages,m=t.recordCanvas,g=t.keepIframeSrcFn,v=t.newlyAddedElement,y=void 0!==v&&v,b=t.cssCaptured,x=void 0!==b&&b,w=function(e,t){if(!t.hasNode(e))return;var n=t.getId(e);return 1===n?void 0:n}(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:$m.Document,childNodes:[],compatMode:e.compatMode}:{type:$m.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:$m.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){for(var n,r=t.doc,i=t.blockClass,o=t.blockSelector,a=t.inlineStylesheet,s=t.maskInputOptions,l=void 0===s?{}:s,c=t.maskInputFn,u=t.dataURLOptions,d=void 0===u?{}:u,p=t.inlineImages,f=t.recordCanvas,h=t.keepIframeSrcFn,m=t.newlyAddedElement,g=void 0!==m&&m,v=t.rootId,y=function(e,t,n){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var i=e.classList[r];if(t.test(i))return!0}if(n)return e.matches(n)}catch(rh){}return!1}(e,i,o),b=function(e){if(Nm(e,HTMLFormElement))return"form";var t=og(e.tagName);return bg.test(t)?"div":t}(e),x={},w=e.attributes.length,k=0;k<w;k++){var _=e.attributes[k];Ng(b,_.name,_.value)||(x[_.name]=Ig(r,b,og(_.name),_.value))}if("link"===b&&a){var S=Array.from(r.styleSheets).find(function(t){return t.href===e.href}),C=null;S&&(C=tg(S)),C&&(delete x.rel,delete x.href,x._cssText=C)}if("style"===b&&e.sheet){var E=tg(e.sheet);E&&(e.childNodes.length>1&&(E=mg(E,e)),x._cssText=E)}if("input"===b||"textarea"===b||"select"===b){var I=e.value,N=e.checked;"radio"!==x.type&&"checkbox"!==x.type&&"submit"!==x.type&&"button"!==x.type&&I?x.value=ig({element:e,type:sg(e),tagName:b,value:I,maskInputOptions:l,maskInputFn:c}):N&&(x.checked=N)}"option"===b&&(e.selected&&!l.select?x.selected=!0:delete x.selected);"dialog"===b&&e.open&&(x.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===b&&f)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var i=t.getImageData,o=ag in i?i[ag]:i;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(function(e){return 0!==e}))return!1}return!0})(e)||(x.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){var O=e.toDataURL(d.type,d.quality),T=r.createElement("canvas");T.width=e.width,T.height=e.height,O!==T.toDataURL(d.type,d.quality)&&(x.rr_dataURL=O)}if("img"===b&&p){gg||(gg=r.createElement("canvas"),vg=gg.getContext("2d"));var R=e,j=(R.currentSrc||R.getAttribute("src"),R.crossOrigin),A=function(){R.removeEventListener("load",A);try{gg.width=R.naturalWidth,gg.height=R.naturalHeight,vg.drawImage(R,0,0),x.rr_dataURL=gg.toDataURL(d.type,d.quality)}catch(e){if("anonymous"!==R.crossOrigin)return R.crossOrigin="anonymous",void(R.complete&&0!==R.naturalWidth?A():R.addEventListener("load",A))}"anonymous"===R.crossOrigin&&(j?x.crossOrigin=j:R.removeAttribute("crossorigin"))};R.complete&&0!==R.naturalWidth?A():R.addEventListener("load",A)}if("audio"===b||"video"===b){var P=x;P.rr_mediaState=e.paused?"paused":"played",P.rr_mediaCurrentTime=e.currentTime,P.rr_mediaPlaybackRate=e.playbackRate,P.rr_mediaMuted=e.muted,P.rr_mediaLoop=e.loop,P.rr_mediaVolume=e.volume}g||(e.scrollLeft&&(x.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(x.rr_scrollTop=e.scrollTop));if(y){var M=e.getBoundingClientRect(),L=M.width,D=M.height;x={class:x.class,rr_width:L+"px",rr_height:D+"px"}}"iframe"!==b||h(x.src)||(e.contentDocument||(x.rr_src=x.src),delete x.src);try{customElements.get(b)&&(n=!0)}catch(rh){}return{type:$m.Element,tagName:b,attributes:x,childNodes:[],isSVG:Cg(e)||void 0,needBlock:y,rootId:v,isCustom:n}}(e,{doc:n,blockClass:i,blockSelector:o,inlineStylesheet:s,maskInputOptions:c,maskInputFn:d,dataURLOptions:f,inlineImages:h,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:y,rootId:w});case e.TEXT_NODE:return function(e,t){var n=t.needsMask,r=t.maskTextFn,i=t.rootId,o=t.cssCaptured,a=Ym.parentNode(e),s=a&&a.tagName,l="",c="STYLE"===s||void 0,u="SCRIPT"===s||void 0;u?l="SCRIPT_PLACEHOLDER":o||(l=Ym.textContent(e),c&&l&&(l=fg(l,Eg(t.doc))));!c&&!u&&l&&n&&(l=r?r(l,Ym.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:$m.Text,textContent:l||"",rootId:i}}(e,{doc:n,needsMask:a,maskTextFn:u,rootId:w,cssCaptured:x});case e.CDATA_SECTION_NODE:return{type:$m.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:$m.Comment,textContent:Ym.textContent(e)||"",rootId:w};default:return!1}}function jg(e){return null==e?"":e.toLowerCase()}function Ag(e,t){var n=t.doc,r=t.mirror,i=t.blockClass,o=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.skipChild,c=void 0!==l&&l,u=t.inlineStylesheet,d=void 0===u||u,p=t.maskInputOptions,f=void 0===p?{}:p,h=t.maskTextFn,m=t.maskInputFn,g=t.slimDOMOptions,v=t.dataURLOptions,y=void 0===v?{}:v,b=t.inlineImages,x=void 0!==b&&b,w=t.recordCanvas,k=void 0!==w&&w,_=t.onSerialize,S=t.onIframeLoad,C=t.iframeLoadTimeout,E=void 0===C?5e3:C,I=t.onStylesheetLoad,N=t.stylesheetLoadTimeout,O=void 0===N?5e3:N,T=t.keepIframeSrcFn,R=void 0===T?function(){return!1}:T,j=t.newlyAddedElement,A=void 0!==j&&j,P=t.cssCaptured,M=void 0!==P&&P,L=t.needsMask,D=t.preserveWhiteSpace,F=void 0===D||D;L||(L=Tg(e,a,s,void 0===L));var z,U=Rg(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:L,inlineStylesheet:d,maskInputOptions:f,maskTextFn:h,maskInputFn:m,dataURLOptions:y,inlineImages:x,recordCanvas:k,keepIframeSrcFn:R,newlyAddedElement:A,cssCaptured:M});if(!U)return null;z=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===$m.Comment)return!0;if(e.type===$m.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===lg(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(jg(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===jg(e.attributes.name)||"icon"===jg(e.attributes.rel)||"apple-touch-icon"===jg(e.attributes.rel)||"shortcut icon"===jg(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&jg(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(jg(e.attributes.property).match(/^(og|twitter|fb):/)||jg(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===jg(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===jg(e.attributes.name)||"googlebot"===jg(e.attributes.name)||"bingbot"===jg(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===jg(e.attributes.name)||"generator"===jg(e.attributes.name)||"framework"===jg(e.attributes.name)||"publisher"===jg(e.attributes.name)||"progid"===jg(e.attributes.name)||jg(e.attributes.property).match(/^article:/)||jg(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===jg(e.attributes.name)||"yandex-verification"===jg(e.attributes.name)||"csrf-token"===jg(e.attributes.name)||"p:domain_verify"===jg(e.attributes.name)||"verify-v1"===jg(e.attributes.name)||"verification"===jg(e.attributes.name)||"shopify-checkout-api-token"===jg(e.attributes.name)))return!0}}return!1}(U,g)||!F&&U.type===$m.Text&&!U.textContent.replace(/^\s+|\s+$/gm,"").length?-2:xg();var B=Object.assign(U,{id:z});if(r.add(e,B),-2===z)return null;_&&_(e);var $=!c;if(B.type===$m.Element){$=$&&!B.needBlock,delete B.needBlock;var V=Ym.shadowRoot(e);V&&eg(V)&&(B.isShadowHost=!0)}if((B.type===$m.Document||B.type===$m.Element)&&$){g.headWhitespace&&B.type===$m.Element&&"head"===B.tagName&&(F=!1);var W={doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:s,skipChild:c,inlineStylesheet:d,maskInputOptions:f,maskTextFn:h,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:x,recordCanvas:k,preserveWhiteSpace:F,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:R,cssCaptured:!1};if(B.type===$m.Element&&"textarea"===B.tagName&&void 0!==B.attributes.value);else{B.type===$m.Element&&void 0!==B.attributes._cssText&&"string"==typeof B.attributes._cssText&&(W.cssCaptured=!0);for(var q,H=Pm(Array.from(Ym.childNodes(e)));!(q=H()).done;){var K=Ag(q.value,W);K&&B.childNodes.push(K)}}var Z=null;if(Xm(e)&&(Z=Ym.shadowRoot(e)))for(var G,J=Pm(Array.from(Ym.childNodes(Z)));!(G=J()).done;){var Y=Ag(G.value,W);Y&&(eg(Z)&&(Y.isShadow=!0),B.childNodes.push(Y))}}var X=Ym.parentNode(e);return X&&Qm(X)&&eg(X)&&(B.isShadow=!0),B.type===$m.Element&&"iframe"===B.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var i,o=!1;try{i=r.document.readyState}catch(vE){return}if("complete"===i){var a="about:blank";if(r.location.href!==a||e.src===a||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}else{var s=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(s),o=!0,t()})}}}(e,function(){var t=e.contentDocument;if(t&&S){var n=Ag(t,{doc:t,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:h,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:x,recordCanvas:k,preserveWhiteSpace:F,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:R});n&&S(e,n)}},E),B.type===$m.Element&&"link"===B.tagName&&"string"==typeof B.attributes.rel&&("stylesheet"===B.attributes.rel||"preload"===B.attributes.rel&&"string"==typeof B.attributes.href&&"css"===lg(B.attributes.href))&&function(e,t,n){var r,i=!1;try{r=e.sheet}catch(vE){return}if(!r){var o=setTimeout(function(){i||(t(),i=!0)},n);e.addEventListener("load",function(){clearTimeout(o),i=!0,t()})}}(e,function(){if(I){var t=Ag(e,{doc:n,mirror:r,blockClass:i,blockSelector:o,needsMask:L,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:f,maskTextFn:h,maskInputFn:m,slimDOMOptions:g,dataURLOptions:y,inlineImages:x,recordCanvas:k,preserveWhiteSpace:F,onSerialize:_,onIframeLoad:S,iframeLoadTimeout:E,onStylesheetLoad:I,stylesheetLoadTimeout:O,keepIframeSrcFn:R});t&&I(e,t)}},O),B}function Pg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Mg(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return Nm(this,e)?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(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var Lg={exports:{}},Dg=String,Fg=function(){return{isColorSupported:!1,reset:Dg,bold:Dg,dim:Dg,italic:Dg,underline:Dg,inverse:Dg,hidden:Dg,strikethrough:Dg,black:Dg,red:Dg,green:Dg,yellow:Dg,blue:Dg,magenta:Dg,cyan:Dg,white:Dg,gray:Dg,bgBlack:Dg,bgRed:Dg,bgGreen:Dg,bgYellow:Dg,bgBlue:Dg,bgMagenta:Dg,bgCyan:Dg,bgWhite:Dg}};Lg.exports=Fg(),Lg.exports.createColors=Fg;var zg=Lg.exports,Ug=Mg(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),Bg=zg,$g=Ug,Vg=function(e){function t(n,r,i,o,a,s){var l;return(l=e.call(this,n)||this).name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),s&&(l.plugin=s),void 0!==r&&void 0!==i&&("number"==typeof r?(l.line=r,l.column=i):(l.line=r.line,l.column=r.column,l.endLine=i.line,l.endColumn=i.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}Im(t,e);var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=Bg.isColorSupported),$g&&e&&(n=$g(n));var r,i,o=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,o.length),l=String(s).length;if(e){var c=Bg.createColors(!0),u=c.bold,d=c.gray,p=c.red;r=function(e){return u(p(e))},i=function(e){return d(e)}}else r=i=function(e){return e};return o.slice(a,s).map(function(e,n){var o=a+1+n,s=" "+(" "+o).slice(-l)+" | ";if(o===t.line){var c=i(s.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(s)+e+"\n "+c+r("^")}return" "+i(s)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(jm(Error)),Wg=Vg;Vg.default=Vg;var qg={};qg.isClean=Symbol("isClean"),qg.my=Symbol("my");var Hg={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var Kg=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n},t.block=function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)},t.decl=function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||(n=t),t&&void 0!==(r=e.raws[t]))return r;var i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return Hg[n];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var a,s="raw"+((a=n)[0].toUpperCase()+a.slice(1));return this[s]?r=this[s](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=Hg[n]),o.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),Zg=Kg;Kg.default=Kg;var Gg=Zg;function Jg(e,t){new Gg(t).stringify(e)}var Yg=Jg;Jg.default=Jg;var Xg=qg.isClean,Qg=qg.my,ev=Wg,tv=Zg,nv=Yg;function rv(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":Rm(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return rv(e,n)}):("object"===o&&null!==i&&(i=rv(i)),n[r]=i)}return n}var iv=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[Xg]=!1,this[Qg]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=Pm(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=rv(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new ev(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},t.markDirty=function(){if(this[Xg]){this[Xg]=!1;for(var e=this;e=e.parent;)e[Xg]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return(new tv).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){for(var r,i=this,o=!1,a=Pm(t);!(r=a()).done;){var s=r.value;s===this?o=!0:o?(this.parent.insertAfter(i,s),i=s):this.parent.insertBefore(i,s)}o||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var a=this[o];if(Array.isArray(a))n[o]=a.map(function(e){return"object"===(void 0===e?"undefined":Rm(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===a?"undefined":Rm(a))&&a.toJSON)n[o]=a.toJSON(null,t);else if("source"===o){var s=t.get(a.input);null==s&&(s=i,t.set(a.input,i),i++),n[o]={end:a.end,inputId:s,start:a.start}}else n[o]=a}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=nv),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},Sm(e,[{key:"proxyOf",get:function(){return this}}]),e}(),ov=iv;iv.default=iv;var av=function(e){function t(t){var n;return t&&void 0!==t.value&&"string"!=typeof t.value&&(t=Cm({},t,{value:String(t.value)})),(n=e.call(this,t)||this).type="decl",n}return Im(t,e),Sm(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}(ov),sv=av;av.default=av;var lv=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},cv=Ug.SourceMapConsumer,uv=Ug.SourceMapGenerator,dv=Ug.existsSync,pv=Ug.readFileSync,fv=Ug.dirname,hv=Ug.join;var mv=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=fv(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new cv(this.text)),this.consumerCache},t.decodeInline=function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(void 0===e?"undefined":Rm(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=fv(e),dv(e))return this.mapFile=e,pv(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(Nm(t,cv))return uv.fromSourceMap(t).toString();if(Nm(t,uv))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=hv(fv(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),gv=mv;mv.default=mv;var vv=Ug.SourceMapConsumer,yv=Ug.SourceMapGenerator,bv=Ug.fileURLToPath,xv=Ug.pathToFileURL,wv=Ug.isAbsolute,kv=Ug.resolve,_v=lv,Sv=Ug,Cv=Wg,Ev=gv,Iv=Symbol("fromOffsetCache"),Nv=Boolean(vv&&yv),Ov=Boolean(kv&&wv),Tv=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":Rm(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ov||/^\w+:\/\//.test(t.from)||wv(t.from)?this.file=t.from:this.file=kv(t.from)),Ov&&Nv){var n=new Ev(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+_v(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,a;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":Rm(t))){var s=t,l=n;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);t=c.line,n=c.col}else t=s.line,n=s.column;if("number"==typeof l.offset){var u=this.fromOffset(l.offset);o=u.line,a=u.col}else o=l.line,a=l.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var p=this.origin(t,n,o,a);return(i=p?new Cv(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,r.plugin):new Cv(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:a,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(xv&&(i.input.url=xv(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[Iv])t=this[Iv];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[Iv]=t}var a=0;if(e>=t[t.length-1])a=t.length-1;else for(var s,l=t.length-2;a<l;)if(e<t[s=a+(l-a>>1)])l=s-1;else{if(!(e>=t[s+1])){a=s;break}a=s+1}return{col:e-t[a]+1,line:a+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:kv(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(i=a.originalPositionFor({column:r,line:n})),o=wv(s.source)?xv(s.source):new URL(s.source,this.map.consumer().sourceRoot||xv(this.map.mapFile));var l={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(!bv)throw new Error("file: protocol is not available in this PostCSS build");l.file=bv(o)}var c=a.sourceContentFor(s.source);return c&&(l.source=c),l},t.toJSON=function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Cm({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},Sm(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),Rv=Tv;Tv.default=Tv,Sv&&Sv.registerInput&&Sv.registerInput(Tv);var jv=Ug.SourceMapConsumer,Av=Ug.SourceMapGenerator,Pv=Ug.dirname,Mv=Ug.relative,Lv=Ug.resolve,Dv=Ug.sep,Fv=Ug.pathToFileURL,zv=Rv,Uv=Boolean(jv&&Av),Bv=Boolean(Pv&&Lv&&Mv&&Dv),$v=function(){function e(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=Pm(this.previous());!(e=t()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||Pv(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new jv(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),Bv&&Uv&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Av.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Av({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new Av({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,l,c){if(e.css+=s,l&&"end"!==c&&(a.generated.line=r,a.generated.column=i-1,l.source&&l.source.start?(a.source=e.sourcePath(l),a.original.line=l.source.start.line,a.original.column=l.source.start.column-1,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(t=s.match(/\n/g))?(r+=t.length,n=s.lastIndexOf("\n"),i=s.length-n):i+=s.length,l&&"start"!==c){var u=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===u.last&&!u.raws.semicolon||(l.source&&l.source.end?(a.source=e.sourcePath(l),a.original.line=l.source.end.line,a.original.column=l.source.end.column-1,a.generated.line=r,a.generated.column=i-2,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=i-1,e.map.addMapping(a)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?Pv(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=Pv(Lv(n,this.mapOpts.annotation)));var r=Mv(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new zv(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(Fv){var n=Fv(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===Dv&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),Vv=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return Im(t,e),t}(ov),Wv=Vv;Vv.default=Vv;var qv,Hv,Kv,Zv,Gv=qg.isClean,Jv=qg.my,Yv=sv,Xv=Wv;function Qv(e){return e.map(function(e){return e.nodes&&(e.nodes=Qv(e.nodes)),delete e.source,e})}function ey(e){if(e[Gv]=!1,e.proxyOf.nodes)for(var t,n=Pm(e.proxyOf.nodes);!(t=n()).done;){ey(t.value)}}var ty=function(e){function t(){return e.apply(this,arguments)||this}Im(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Pm(t);!(r=i()).done;)for(var o,a=r.value,s=Pm(this.normalize(a,this.last));!(o=s()).done;){var l=o.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n,r=Pm(this.nodes);!(n=r()).done;){n.value.cleanRaws(t)}},n.each=function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,[].concat(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[].concat([e.toProxy()],r))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}},n.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n,r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(var o,a=Pm(i);!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(r+1,0,s)}for(var l in this.indexes)r<(n=this.indexes[l])&&(this.indexes[l]=n+i.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n,r=this.index(e),i=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(var a,s=Pm(o);!(a=s()).done;){var l=a.value;this.proxyOf.nodes.splice(r,0,l)}for(var c in this.indexes)r<=(n=this.indexes[c])&&(this.indexes[c]=n+o.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if("string"==typeof e)e=Qv(qv(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var i,o=Pm(e=e.slice(0));!(i=o()).done;){var a=i.value;a.parent&&a.parent.removeChild(a,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var s,l=Pm(e=e.nodes.slice(0));!(s=l()).done;){var c=s.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Yv(e)]}else if(e.selector)e=[new Hv(e)];else if(e.name)e=[new Kv(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Xv(e)]}return e.map(function(e){return e[Jv]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Gv]&&ey(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=r.proxyOf,e})},n.prepend=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Pm(t=t.reverse());!(r=i()).done;){for(var o,a=r.value,s=this.normalize(a,this.first,"prepend").reverse(),l=Pm(s);!(o=l()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}for(var u in this.indexes)this.indexes[u]=this.indexes[u]+s.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e,t=Pm(this.proxyOf.nodes);!(e=t()).done;){e.value.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(rh){throw t.addToError(rh)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?Nm(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?Nm(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?Nm(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},Sm(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}(ov);ty.registerParse=function(e){qv=e},ty.registerRule=function(e){Hv=e},ty.registerAtRule=function(e){Kv=e},ty.registerRoot=function(e){Zv=e};var ny=ty;ty.default=ty,ty.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Kv.prototype):"rule"===e.type?Object.setPrototypeOf(e,Hv.prototype):"decl"===e.type?Object.setPrototypeOf(e,Yv.prototype):"comment"===e.type?Object.setPrototypeOf(e,Xv.prototype):"root"===e.type&&Object.setPrototypeOf(e,Zv.prototype),e[Jv]=!0,e.nodes&&e.nodes.forEach(function(e){ty.rebuild(e)})};var ry,iy,oy=function(e){function t(t){var n;return(n=e.call(this,Cm({type:"document"},t))||this).nodes||(n.nodes=[]),n}return Im(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new ry(new iy,this,e).stringify()},t}(ny);oy.registerLazyResult=function(e){ry=e},oy.registerProcessor=function(e){iy=e};var ay=oy;oy.default=oy;var sy=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),ly=sy;sy.default=sy;var cy=ly,uy=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new cy(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},Sm(e,[{key:"content",get:function(){return this.css}}]),e}(),dy=uy;uy.default=uy;var py="'".charCodeAt(0),fy='"'.charCodeAt(0),hy="\\".charCodeAt(0),my="/".charCodeAt(0),gy="\n".charCodeAt(0),vy=" ".charCodeAt(0),yy="\f".charCodeAt(0),by="\t".charCodeAt(0),xy="\r".charCodeAt(0),wy="[".charCodeAt(0),ky="]".charCodeAt(0),_y="(".charCodeAt(0),Sy=")".charCodeAt(0),Cy="{".charCodeAt(0),Ey="}".charCodeAt(0),Iy=";".charCodeAt(0),Ny="*".charCodeAt(0),Oy=":".charCodeAt(0),Ty="@".charCodeAt(0),Ry=/[\t\n\f\r "#'()/;[\\\]{}]/g,jy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ay=/.[\r\n"'(/\\]/,Py=/[\da-f]/i,My=ny,Ly=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}Im(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.append).call.apply(i,[].concat([this],n))},n.prepend=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.prepend).call.apply(i,[].concat([this],n))},t}(My),Dy=Ly;Ly.default=Ly,My.registerAtRule(Ly);var Fy,zy,Uy=ny,By=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="root",n.nodes||(n.nodes=[]),n}Im(t,e);var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n)if("prepend"===r)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,a=Pm(i);!(o=a()).done;){o.value.raws.before=n.raws.before}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new Fy(new zy,this,e).stringify()},t}(Uy);By.registerLazyResult=function(e){Fy=e},By.registerProcessor=function(e){zy=e};var $y=By;By.default=By,Uy.registerRoot(By);var Vy={comma:function(e){return Vy.split(e,[","],!0)},space:function(e){return Vy.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",a=!1,s=0,l=!1,c="",u=!1,d=Pm(e);!(r=d()).done;){var p=r.value;u?u=!1:"\\"===p?u=!0:l?p===c&&(l=!1):'"'===p||"'"===p?(l=!0,c=p):"("===p?s+=1:")"===p?s>0&&(s-=1):0===s&&t.includes(p)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=p}return(n||""!==o)&&i.push(o.trim()),i}},Wy=Vy;Vy.default=Vy;var qy=ny,Hy=Wy,Ky=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return Im(t,e),Sm(t,[{key:"selectors",get:function(){return Hy.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(qy),Zy=Ky;Ky.default=Ky,qy.registerRule(Ky);var Gy=sv,Jy=function(e,t){void 0===t&&(t={});var n,r,i,o,a,s,l,c,u,d,p=e.css.valueOf(),f=t.ignoreErrors,h=p.length,m=0,g=[],v=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&m>=h},nextToken:function(e){if(v.length)return v.pop();if(!(m>=h)){var t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(m)){case gy:case vy:case by:case xy:case yy:r=m;do{r+=1,n=p.charCodeAt(r)}while(n===vy||n===gy||n===by||n===xy||n===yy);d=["space",p.slice(m,r)],m=r-1;break;case wy:case ky:case Cy:case Ey:case Oy:case Iy:case Sy:var b=String.fromCharCode(n);d=[b,b,m];break;case _y:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==py&&u!==fy&&u!==vy&&u!==gy&&u!==by&&u!==yy&&u!==xy){r=m;do{if(s=!1,-1===(r=p.indexOf(")",r+1))){if(f||t){r=m;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===hy;)l-=1,s=!s}while(s);d=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),o=p.slice(m,r+1),-1===r||Ay.test(o)?d=["(","(",m]:(d=["brackets",o,m,r],m=r);break;case py:case fy:i=n===py?"'":'"',r=m;do{if(s=!1,-1===(r=p.indexOf(i,r+1))){if(f||t){r=m+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===hy;)l-=1,s=!s}while(s);d=["string",p.slice(m,r+1),m,r],m=r;break;case Ty:Ry.lastIndex=m+1,Ry.test(p),r=0===Ry.lastIndex?p.length-1:Ry.lastIndex-2,d=["at-word",p.slice(m,r+1),m,r],m=r;break;case hy:for(r=m,a=!0;p.charCodeAt(r+1)===hy;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==my&&n!==vy&&n!==gy&&n!==by&&n!==xy&&n!==yy&&(r+=1,Py.test(p.charAt(r)))){for(;Py.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===vy&&(r+=1)}d=["word",p.slice(m,r+1),m,r],m=r;break;default:n===my&&p.charCodeAt(m+1)===Ny?(0===(r=p.indexOf("*/",m+2)+1)&&(f||t?r=p.length:y("comment")),d=["comment",p.slice(m,r+1),m,r],m=r):(jy.lastIndex=m+1,jy.test(p),r=0===jy.lastIndex?p.length-1:jy.lastIndex-2,d=["word",p.slice(m,r+1),m,r],g.push(d),m=r)}return m++,d}},position:function(){return m}}},Yy=Wv,Xy=Dy,Qy=$y,eb=Zy,tb={empty:!0,space:!0};var nb=function(){function e(e){this.input=e,this.root=new Qy,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new Xy;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,a=Pm(e.entries());!(i=a()).done;){var s=i.value,l=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new Yy;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=Jy(this.input)},t.decl=function(e,t){var n=new Gy;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(n.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),d="",p=l;p>0;p--){var f=u[p][0];if(0===d.trim().indexOf("!")&&"space"!==f)break;d=u.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=u)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new eb;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],l=e;l;){if(n=l[0],s.push(l),"("===n||"["===n)i||(i=l),o.push("("===n?")":"]");else if(a&&r&&"{"===n)i||(i=l),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;s.length&&("space"===(l=s[s.length-1][0])||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,a,s,l=n.length,c="",u=!0,d=0;d<l;d+=1)"space"!==(o=(i=n[d])[0])||d!==l-1||r?"comment"===o?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",tb[s]||tb[a]||","===c.slice(-1)?u=!1:c+=i[1]):c+=i[1]:u=!1;if(!u){var p=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:p,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new eb;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),rb=ny,ib=nb,ob=Rv;function ab(e,t){var n=new ob(e,t),r=new ib(n);try{r.parse()}catch(rh){throw rh}return r.root}var sb=ab;ab.default=ab,rb.registerParse(ab);var lb=qg.isClean,cb=qg.my,ub=$v,db=Yg,pb=ny,fb=ay,hb=dy,mb=sb,gb=$y,vb={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},yb={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},bb={Once:!0,postcssPlugin:!0,prepare:!0};function xb(e){return"object"===(void 0===e?"undefined":Rm(e))&&"function"==typeof e.then}function wb(e){var t=!1,n=vb[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function kb(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:wb(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function _b(e){return e[lb]=!1,e.nodes&&e.nodes.forEach(function(e){return _b(e)}),e}var Sb={},Cb=function(){function e(t,n,r){var i,o=this;if(this.stringified=!1,this.processed=!1,"object"!==(void 0===n?"undefined":Rm(n))||null===n||"root"!==n.type&&"document"!==n.type)if(Nm(n,e)||Nm(n,hb))i=_b(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var a=mb;r.syntax&&(a=r.syntax.parse),r.parser&&(a=r.parser),a.parse&&(a=a.parse);try{i=a(n,r)}catch(vE){this.processed=!0,this.error=vE}i&&!i[cb]&&pb.rebuild(i)}else i=_b(n);this.result=new hb(t,i,r),this.helpers=Cm({},Sb,{postcss:Sb,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":Rm(e))&&e.prepare?Cm({},e,e.prepare(o.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion){0}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(r){console&&console.error}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,n=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},r=Pm(this.plugins);!(t=r()).done;){var i=t.value;if("object"===(void 0===i?"undefined":Rm(i)))for(var o in i){if(!yb[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event "+o+" in "+i.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!bb[o])if("object"===Rm(i[o]))for(var a in i[o])n(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&n(i,o,i[o])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return km(function(){var t,n,r,i,o,a,s,l,c,u,d,p;return Mm(this,function(f){switch(f.label){case 0:e.plugin=0,t=0,f.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],!xb(r=e.runOnRoot(n)))return[3,5];f.label=2;case 2:return f.trys.push([2,4,,5]),[4,r];case 3:return f.sent(),[3,5];case 4:throw i=f.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];o=e.result.root,f.label=7;case 7:if(o[lb])return[3,14];o[lb]=!0,a=[kb(o)],f.label=8;case 8:if(!(a.length>0))return[3,13];if(!xb(s=e.visitTick(a)))return[3,12];f.label=9;case 9:return f.trys.push([9,11,,12]),[4,s];case 10:return f.sent(),[3,12];case 11:throw l=f.sent(),c=a[a.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,a;return Mm(this,function(s){switch(s.label){case 0:t=p.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return s.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw a=s.sent(),e.handleError(a);case 7:return[2]}})},d=Pm(e.listeners.OnceExit),f.label=15;case 15:return(p=d()).done?[3,18]:[5,Lm(u())];case 16:f.sent(),f.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":Rm(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return xb(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(vE){throw this.handleError(vE)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=db;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new ub(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=Pm(this.plugins);!(e=t()).done;){var n=e.value;if(xb(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[lb];)r[lb]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=Pm(r.nodes);!(i=o()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=Pm(e);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];this.result.lastPlugin=o;var s=void 0;try{s=a(t,this.helpers)}catch(rh){throw this.handleError(rh,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(xb(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],o=i[0],a=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(n.toProxy(),this.helpers)}catch(rh){throw this.handleError(rh,n)}}if(0!==t.iterator){for(var s,l=t.iterator;s=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!s[lb])return s[lb]=!0,void e.push(kb(s));t.iterator=0,delete n.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var u=c[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[lb]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[lb]=!0;for(var n,r=Pm(wb(e));!(n=r()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[lb]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},Sm(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();Cb.registerPostcss=function(e){Sb=e};var Eb=Cb;Cb.default=Cb,gb.registerLazyResult(Cb),fb.registerLazyResult(Cb);var Ib=$v,Nb=Yg,Ob=sb,Tb=dy,Rb=function(){function e(e,t,n){var r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var i=Nb;this.result=new Tb(this._processor,r,this._opts),this.result.css=t;var o=this;Object.defineProperty(this.result,"root",{get:function(){return o.root}});var a=new Ib(i,r,this._opts,t);if(a.isMap()){var s=a.generate(),l=s[0],c=s[1];l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},Sm(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=Ob;try{e=t(this._css,this._opts)}catch(vE){this.error=vE}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),jb=Rb;Rb.default=Rb;var Ab=jb,Pb=Eb,Mb=ay,Lb=$y,Db=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,n=[],r=Pm(e);!(t=r()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===(void 0===i?"undefined":Rm(i))&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===(void 0===i?"undefined":Rm(i))&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else if("object"!==(void 0===i?"undefined":Rm(i))||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin")}return n},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new Pb(this,e,t):new Ab(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),Fb=Db;Db.default=Db,Lb.registerProcessor(Db),Mb.registerProcessor(Db);var zb=sv,Ub=gv,Bb=Wv,$b=Dy,Vb=Rv,Wb=$y,qb=Zy;function Hb(e,t){if(Array.isArray(e))return e.map(function(e){return Hb(e)});var n=e.inputs,r=Om(e,["inputs"]);if(n){t=[];for(var i,o=Pm(n);!(i=o()).done;){var a=Cm({},i.value,{__proto__:Vb.prototype});a.map&&(a.map=Cm({},a.map,{__proto__:Ub.prototype})),t.push(a)}}if(r.nodes&&(r.nodes=e.nodes.map(function(e){return Hb(e,t)})),r.source){var s=r.source,l=s.inputId,c=Om(s,["inputId"]);r.source=c,null!=l&&(r.source.input=t[l])}if("root"===r.type)return new Wb(r);if("decl"===r.type)return new zb(r);if("rule"===r.type)return new qb(r);if("comment"===r.type)return new Bb(r);if("atrule"===r.type)return new $b(r);throw new Error("Unknown node type: "+e.type)}var Kb=Hb;Hb.default=Hb;var Zb=Wg,Gb=sv,Jb=Eb,Yb=ny,Xb=Fb,Qb=Yg,ex=Kb,tx=ay,nx=ly,rx=Wv,ix=Dy,ox=dy,ax=Rv,sx=sb,lx=Wy,cx=Zy,ux=$y,dx=ov;function px(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new Xb(t)}px.plugin=function(e,t){var n,r=!1;function i(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];console&&console.warn&&!r&&(r=!0,ym.LANG&&ym.LANG.startsWith("cn"));var a=t.apply(void 0,[].concat(i));return a.postcssPlugin=e,a.postcssVersion=(new Xb).version,a}return Object.defineProperty(i,"postcss",{get:function(){return n||(n=i()),n}}),i.process=function(e,t,n){return px([i(n)]).process(e,t)},i},px.stringify=Qb,px.parse=sx,px.fromJSON=ex,px.list=lx,px.comment=function(e){return new rx(e)},px.atRule=function(e){return new ix(e)},px.decl=function(e){return new Gb(e)},px.rule=function(e){return new cx(e)},px.root=function(e){return new ux(e)},px.document=function(e){return new tx(e)},px.CssSyntaxError=Zb,px.Declaration=Gb,px.Container=Yb,px.Processor=Xb,px.Document=tx,px.Comment=rx,px.Warning=nx,px.AtRule=ix,px.Result=ox,px.Input=ax,px.Rule=cx,px.Root=ux,px.Node=dx,Jb.registerPostcss(px);var fx=px;px.default=px;var hx=Pg(fx);hx.stringify,hx.fromJSON,hx.plugin,hx.parse,hx.list,hx.document,hx.comment,hx.atRule,hx.rule,hx.decl,hx.root,hx.CssSyntaxError,hx.Declaration,hx.Container,hx.Processor,hx.Document,hx.Comment,hx.Warning,hx.AtRule,hx.Result,hx.Input,hx.Rule,hx.Root,hx.Node;var mx=Object.defineProperty,gx=function(e,t,n){return function(e,t,n){return t in e?mx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Rm(t))?t+"":t,n)};function vx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function yx(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return Nm(this,e)?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(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}var bx={exports:{}},xx=String,wx=function(){return{isColorSupported:!1,reset:xx,bold:xx,dim:xx,italic:xx,underline:xx,inverse:xx,hidden:xx,strikethrough:xx,black:xx,red:xx,green:xx,yellow:xx,blue:xx,magenta:xx,cyan:xx,white:xx,gray:xx,bgBlack:xx,bgRed:xx,bgGreen:xx,bgYellow:xx,bgBlue:xx,bgMagenta:xx,bgCyan:xx,bgWhite:xx}};bx.exports=wx(),bx.exports.createColors=wx;var kx=bx.exports,_x=yx(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),Sx=kx,Cx=_x,Ex=function(e){function t(n,r,i,o,a,s){var l;return(l=e.call(this,n)||this).name="CssSyntaxError",l.reason=n,a&&(l.file=a),o&&(l.source=o),s&&(l.plugin=s),void 0!==r&&void 0!==i&&("number"==typeof r?(l.line=r,l.column=i):(l.line=r.line,l.column=r.column,l.endLine=i.line,l.endColumn=i.column)),l.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(l,t),l}Im(t,e);var n=t.prototype;return n.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},n.showSourceCode=function(e){var t=this;if(!this.source)return"";var n=this.source;null==e&&(e=Sx.isColorSupported),Cx&&e&&(n=Cx(n));var r,i,o=n.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,o.length),l=String(s).length;if(e){var c=Sx.createColors(!0),u=c.bold,d=c.gray,p=c.red;r=function(e){return u(p(e))},i=function(e){return d(e)}}else r=i=function(e){return e};return o.slice(a,s).map(function(e,n){var o=a+1+n,s=" "+(" "+o).slice(-l)+" | ";if(o===t.line){var c=i(s.replace(/\d/g," "))+e.slice(0,t.column-1).replace(/[^\t]/g," ");return r(">")+i(s)+e+"\n "+c+r("^")}return" "+i(s)+e}).join("\n")},n.toString=function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e},t}(jm(Error)),Ix=Ex;Ex.default=Ex;var Nx={};Nx.isClean=Symbol("isClean"),Nx.my=Symbol("my");var Ox={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};var Tx=function(){function e(e){this.builder=e}var t=e.prototype;return t.atrule=function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var i=(e.raws.between||"")+(t?";":"");this.builder(n+r+i,e)}},t.beforeAfter=function(e,t){var n;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,i=0;r&&"root"!==r.type;)i+=1,r=r.parent;if(n.includes("\n")){var o=this.raw(e,null,"indent");if(o.length)for(var a=0;a<i;a++)n+=o}return n},t.block=function(e,t){var n,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),n=this.raw(e,"after")):n=this.raw(e,"after","emptyBody"),n&&this.builder(n),this.builder("}",e,"end")},t.body=function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var i=e.nodes[r],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,t!==r||n)}},t.comment=function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)},t.decl=function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)},t.document=function(e){this.body(e)},t.raw=function(e,t,n){var r;if(n||(n=t),t&&void 0!==(r=e.raws[t]))return r;var i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return Ox[n];var o=e.root();if(o.rawCache||(o.rawCache={}),void 0!==o.rawCache[n])return o.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var a,s="raw"+((a=n)[0].toUpperCase()+a.slice(1));return this[s]?r=this[s](o,e):o.walk(function(e){if(void 0!==(r=e.raws[t]))return!1}),void 0===r&&(r=Ox[n]),o.rawCache[n]=r,r},t.rawBeforeClose=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawBeforeComment=function(e,t){var n;return e.walkComments(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeDecl=function(e,t){var n;return e.walkDecls(function(e){if(void 0!==e.raws.before)return(n=e.raws.before).includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n},t.rawBeforeOpen=function(e){var t;return e.walk(function(e){if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t},t.rawBeforeRule=function(e){var t;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return(t=n.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t},t.rawColon=function(e){var t;return e.walkDecls(function(e){if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t},t.rawEmptyBody=function(e){var t;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t},t.rawIndent=function(e){return e.raws.indent?e.raws.indent:(e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){var i=n.raws.before.split("\n");return t=(t=i[i.length-1]).replace(/\S/g,""),!1}}),t);var t},t.rawSemicolon=function(e){var t;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t},t.rawValue=function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n},t.root=function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)},t.rule=function(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")},t.stringify=function(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)},e}(),Rx=Tx;Tx.default=Tx;var jx=Rx;function Ax(e,t){new jx(t).stringify(e)}var Px=Ax;Ax.default=Ax;var Mx=Nx.isClean,Lx=Nx.my,Dx=Ix,Fx=Rx,zx=Px;function Ux(e,t){var n=new e.constructor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&"proxyCache"!==r){var i=e[r],o=void 0===i?"undefined":Rm(i);"parent"===r&&"object"===o?t&&(n[r]=t):"source"===r?n[r]=i:Array.isArray(i)?n[r]=i.map(function(e){return Ux(e,n)}):("object"===o&&null!==i&&(i=Ux(i)),n[r]=i)}return n}var Bx=function(){function e(e){for(var t in void 0===e&&(e={}),this.raws={},this[Mx]=!1,this[Lx]=!0,e)if("nodes"===t){this.nodes=[];for(var n,r=Pm(e[t]);!(n=r()).done;){var i=n.value;"function"==typeof i.clone?this.append(i.clone()):this.append(i)}}else this[t]=e[t]}var t=e.prototype;return t.addToError=function(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){var t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,"$&"+t.input.from+":"+t.start.line+":"+t.start.column+"$&")}return e},t.after=function(e){return this.parent.insertAfter(this,e),this},t.assign=function(e){for(var t in void 0===e&&(e={}),e)this[t]=e[t];return this},t.before=function(e){return this.parent.insertBefore(this,e),this},t.cleanRaws=function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between},t.clone=function(e){void 0===e&&(e={});var t=Ux(this);for(var n in e)t[n]=e[n];return t},t.cloneAfter=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertAfter(this,t),t},t.cloneBefore=function(e){void 0===e&&(e={});var t=this.clone(e);return this.parent.insertBefore(this,t),t},t.error=function(e,t){if(void 0===t&&(t={}),this.source){var n=this.rangeBy(t),r=n.end,i=n.start;return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Dx(e)},t.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:"root"===t?function(){return e.root().toProxy()}:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0}}},t.markDirty=function(){if(this[Mx]){this[Mx]=!1;for(var e=this;e=e.parent;)e[Mx]=!1}},t.next=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e+1]}},t.positionBy=function(e,t){var n=this.source.start;if(e.index)n=this.positionInside(e.index,t);else if(e.word){var r=(t=this.toString()).indexOf(e.word);-1!==r&&(n=this.positionInside(r,t))}return n},t.positionInside=function(e,t){for(var n=t||this.toString(),r=this.source.start.column,i=this.source.start.line,o=0;o<e;o++)"\n"===n[o]?(r=1,i+=1):r+=1;return{column:r,line:i}},t.prev=function(){if(this.parent){var e=this.parent.index(this);return this.parent.nodes[e-1]}},t.rangeBy=function(e){var t={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){var r=this.toString(),i=r.indexOf(e.word);-1!==i&&(t=this.positionInside(i,r),n=this.positionInside(i+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?n={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?n=this.positionInside(e.endIndex):e.index&&(n=this.positionInside(e.index+1));return(n.line<t.line||n.line===t.line&&n.column<=t.column)&&(n={column:t.column+1,line:t.line}),{end:n,start:t}},t.raw=function(e,t){return(new Fx).raw(this,e,t)},t.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},t.replaceWith=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(this.parent){for(var r,i=this,o=!1,a=Pm(t);!(r=a()).done;){var s=r.value;s===this?o=!0:o?(this.parent.insertAfter(i,s),i=s):this.parent.insertBefore(i,s)}o||this.remove()}return this},t.root=function(){for(var e=this;e.parent&&"document"!==e.parent.type;)e=e.parent;return e},t.toJSON=function(e,t){var n={},r=null==t;t=t||new Map;var i=0;for(var o in this)if(Object.prototype.hasOwnProperty.call(this,o)&&"parent"!==o&&"proxyCache"!==o){var a=this[o];if(Array.isArray(a))n[o]=a.map(function(e){return"object"===(void 0===e?"undefined":Rm(e))&&e.toJSON?e.toJSON(null,t):e});else if("object"===(void 0===a?"undefined":Rm(a))&&a.toJSON)n[o]=a.toJSON(null,t);else if("source"===o){var s=t.get(a.input);null==s&&(s=i,t.set(a.input,i),i++),n[o]={end:a.end,inputId:s,start:a.start}}else n[o]=a}return r&&(n.inputs=[].concat(t.keys()).map(function(e){return e.toJSON()})),n},t.toProxy=function(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache},t.toString=function(e){void 0===e&&(e=zx),e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t},t.warn=function(e,t,n){var r={node:this};for(var i in n)r[i]=n[i];return e.warn(t,r)},Sm(e,[{key:"proxyOf",get:function(){return this}}]),e}(),$x=Bx;Bx.default=Bx;var Vx=function(e){function t(t){var n;return t&&void 0!==t.value&&"string"!=typeof t.value&&(t=Cm({},t,{value:String(t.value)})),(n=e.call(this,t)||this).type="decl",n}return Im(t,e),Sm(t,[{key:"variable",get:function(){return this.prop.startsWith("--")||"$"===this.prop[0]}}]),t}($x),Wx=Vx;Vx.default=Vx;var qx=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},Hx=_x.SourceMapConsumer,Kx=_x.SourceMapGenerator,Zx=_x.existsSync,Gx=_x.readFileSync,Jx=_x.dirname,Yx=_x.join;var Xx=function(){function e(e,t){if(!1!==t.map){this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");var n=t.map?t.map.prev:void 0,r=this.loadMap(t.from,n);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Jx(this.mapFile)),r&&(this.text=r)}}var t=e.prototype;return t.consumer=function(){return this.consumerCache||(this.consumerCache=new Hx(this.text)),this.consumerCache},t.decodeInline=function(e){var t;if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)},t.getAnnotationURL=function(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()},t.isMap=function(e){return"object"===(void 0===e?"undefined":Rm(e))&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))},t.loadAnnotation=function(e){var t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(t){var n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}},t.loadFile=function(e){if(this.root=Jx(e),Zx(e))return this.mapFile=e,Gx(e,"utf-8").toString().trim()},t.loadMap=function(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(Nm(t,Hx))return Kx.fromSourceMap(t).toString();if(Nm(t,Kx))return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}var n=t(e);if(n){var r=this.loadFile(n);if(!r)throw new Error("Unable to load previous source map: "+n.toString());return r}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var i=this.annotation;return e&&(i=Yx(Jx(e),i)),this.loadFile(i)}}},t.startWith=function(e,t){return!!e&&e.substr(0,t.length)===t},t.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e}(),Qx=Xx;Xx.default=Xx;var ew=_x.SourceMapConsumer,tw=_x.SourceMapGenerator,nw=_x.fileURLToPath,rw=_x.pathToFileURL,iw=_x.isAbsolute,ow=_x.resolve,aw=qx,sw=_x,lw=Ix,cw=Qx,uw=Symbol("fromOffsetCache"),dw=Boolean(ew&&tw),pw=Boolean(ow&&iw),fw=function(){function e(e,t){if(void 0===t&&(t={}),null==e||"object"===(void 0===e?"undefined":Rm(e))&&!e.toString)throw new Error("PostCSS received "+e+" instead of CSS string");if(this.css=e.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!pw||/^\w+:\/\//.test(t.from)||iw(t.from)?this.file=t.from:this.file=ow(t.from)),pw&&dw){var n=new cw(this.css,t);if(n.text){this.map=n;var r=n.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+aw(6)+">"),this.map&&(this.map.file=this.from)}var t=e.prototype;return t.error=function(e,t,n,r){var i,o,a;if(void 0===r&&(r={}),t&&"object"===(void 0===t?"undefined":Rm(t))){var s=t,l=n;if("number"==typeof s.offset){var c=this.fromOffset(s.offset);t=c.line,n=c.col}else t=s.line,n=s.column;if("number"==typeof l.offset){var u=this.fromOffset(l.offset);o=u.line,a=u.col}else o=l.line,a=l.column}else if(!n){var d=this.fromOffset(t);t=d.line,n=d.col}var p=this.origin(t,n,o,a);return(i=p?new lw(e,void 0===p.endLine?p.line:{column:p.column,line:p.line},void 0===p.endLine?p.column:{column:p.endColumn,line:p.endLine},p.source,p.file,r.plugin):new lw(e,void 0===o?t:{column:n,line:t},void 0===o?n:{column:a,line:o},this.css,this.file,r.plugin)).input={column:n,endColumn:a,endLine:o,line:t,source:this.css},this.file&&(rw&&(i.input.url=rw(this.file).toString()),i.input.file=this.file),i},t.fromOffset=function(e){var t;if(this[uw])t=this[uw];else{var n=this.css.split("\n");t=new Array(n.length);for(var r=0,i=0,o=n.length;i<o;i++)t[i]=r,r+=n[i].length+1;this[uw]=t}var a=0;if(e>=t[t.length-1])a=t.length-1;else for(var s,l=t.length-2;a<l;)if(e<t[s=a+(l-a>>1)])l=s-1;else{if(!(e>=t[s+1])){a=s;break}a=s+1}return{col:e-t[a]+1,line:a+1}},t.mapResolve=function(e){return/^\w+:\/\//.test(e)?e:ow(this.map.consumer().sourceRoot||this.map.root||".",e)},t.origin=function(e,t,n,r){if(!this.map)return!1;var i,o,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(i=a.originalPositionFor({column:r,line:n})),o=iw(s.source)?rw(s.source):new URL(s.source,this.map.consumer().sourceRoot||rw(this.map.mapFile));var l={column:s.column,endColumn:i&&i.column,endLine:i&&i.line,line:s.line,url:o.toString()};if("file:"===o.protocol){if(!nw)throw new Error("file: protocol is not available in this PostCSS build");l.file=nw(o)}var c=a.sourceContentFor(s.source);return c&&(l.source=c),l},t.toJSON=function(){for(var e={},t=0,n=["hasBOM","css","file","id"];t<n.length;t++){var r=n[t];null!=this[r]&&(e[r]=this[r])}return this.map&&(e.map=Cm({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e},Sm(e,[{key:"from",get:function(){return this.file||this.id}}]),e}(),hw=fw;fw.default=fw,sw&&sw.registerInput&&sw.registerInput(fw);var mw=_x.SourceMapConsumer,gw=_x.SourceMapGenerator,vw=_x.dirname,yw=_x.relative,bw=_x.resolve,xw=_x.sep,ww=_x.pathToFileURL,kw=hw,_w=Boolean(mw&&gw),Sw=Boolean(vw&&bw&&yw&&xw),Cw=function(){function e(e,t,n,r){this.stringify=e,this.mapOpts=n.map||{},this.root=t,this.opts=n,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}var t=e.prototype;return t.addAnnotation=function(){var e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"},t.applyPrevMaps=function(){for(var e,t=Pm(this.previous());!(e=t()).done;){var n=e.value,r=this.toUrl(this.path(n.file)),i=n.root||vw(n.file),o=void 0;!1===this.mapOpts.sourcesContent?(o=new mw(n.text)).sourcesContent&&(o.sourcesContent=null):o=n.consumer(),this.map.applySourceMap(o,r,this.toUrl(this.path(i)))}},t.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)if(this.root)for(var e,t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t);else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))},t.generate=function(){if(this.clearAnnotation(),Sw&&_w&&this.isMap())return this.generateMap();var e="";return this.stringify(this.root,function(t){e+=t}),[e]},t.generateMap=function(){if(this.root)this.generateString();else if(1===this.previous().length){var e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=gw.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new gw({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},t.generateString=function(){var e=this;this.css="",this.map=new gw({file:this.outputFile(),ignoreInvalidMapping:!0});var t,n,r=1,i=1,o="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,function(s,l,c){if(e.css+=s,l&&"end"!==c&&(a.generated.line=r,a.generated.column=i-1,l.source&&l.source.start?(a.source=e.sourcePath(l),a.original.line=l.source.start.line,a.original.column=l.source.start.column-1,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,e.map.addMapping(a))),(t=s.match(/\n/g))?(r+=t.length,n=s.lastIndexOf("\n"),i=s.length-n):i+=s.length,l&&"start"!==c){var u=l.parent||{raws:{}};("decl"===l.type||"atrule"===l.type&&!l.nodes)&&l===u.last&&!u.raws.semicolon||(l.source&&l.source.end?(a.source=e.sourcePath(l),a.original.line=l.source.end.line,a.original.column=l.source.end.column-1,a.generated.line=r,a.generated.column=i-2,e.map.addMapping(a)):(a.source=o,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=i-1,e.map.addMapping(a)))}})},t.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(function(e){return e.annotation}))},t.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(function(e){return e.inline}))},t.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},t.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(function(e){return e.withContent()})},t.outputFile=function(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"},t.path=function(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;var t=this.memoizedPaths.get(e);if(t)return t;var n=this.opts.to?vw(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=vw(bw(n,this.mapOpts.annotation)));var r=yw(n,e);return this.memoizedPaths.set(e,r),r},t.previous=function(){var e=this;if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(function(t){if(t.source&&t.source.input.map){var n=t.source.input.map;e.previousMaps.includes(n)||e.previousMaps.push(n)}});else{var t=new kw(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps},t.setSourcesContent=function(){var e=this,t={};if(this.root)this.root.walk(function(n){if(n.source){var r=n.source.input.from;if(r&&!t[r]){t[r]=!0;var i=e.usesFileUrls?e.toFileUrl(r):e.toUrl(e.path(r));e.map.setSourceContent(i,n.source.input.css)}}});else if(this.css){var n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}},t.sourcePath=function(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))},t.toBase64=function(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))},t.toFileUrl=function(e){var t=this.memoizedFileURLs.get(e);if(t)return t;if(ww){var n=ww(e).toString();return this.memoizedFileURLs.set(e,n),n}throw new Error("`map.absolute` option is not available in this PostCSS build")},t.toUrl=function(e){var t=this.memoizedURLs.get(e);if(t)return t;"\\"===xw&&(e=e.replace(/\\/g,"/"));var n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n},e}(),Ew=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="comment",n}return Im(t,e),t}($x),Iw=Ew;Ew.default=Ew;var Nw,Ow,Tw,Rw,jw=Nx.isClean,Aw=Nx.my,Pw=Wx,Mw=Iw;function Lw(e){return e.map(function(e){return e.nodes&&(e.nodes=Lw(e.nodes)),delete e.source,e})}function Dw(e){if(e[jw]=!1,e.proxyOf.nodes)for(var t,n=Pm(e.proxyOf.nodes);!(t=n()).done;){Dw(t.value)}}var Fw=function(e){function t(){return e.apply(this,arguments)||this}Im(t,e);var n=t.prototype;return n.append=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Pm(t);!(r=i()).done;)for(var o,a=r.value,s=Pm(this.normalize(a,this.last));!(o=s()).done;){var l=o.value;this.proxyOf.nodes.push(l)}return this.markDirty(),this},n.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var n,r=Pm(this.nodes);!(n=r()).done;){n.value.cleanRaws(t)}},n.each=function(e){if(this.proxyOf.nodes){for(var t,n,r=this.getIterator();this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],!1!==(n=e(this.proxyOf.nodes[t],t)));)this.indexes[r]+=1;return delete this.indexes[r],n}},n.every=function(e){return this.nodes.every(e)},n.getIterator=function(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;return this.indexes[e]=0,e},n.getProxyProcessor=function(){return{get:function(e,t){return"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o;return(o=e)[t].apply(o,[].concat(r.map(function(e){return"function"==typeof e?function(t,n){return e(t.toProxy(),n)}:e})))}:"every"===t||"some"===t?function(n){return e[t](function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];return n.apply(void 0,[].concat([e.toProxy()],r))})}:"root"===t?function(){return e.root().toProxy()}:"nodes"===t?e.nodes.map(function(e){return e.toProxy()}):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t]},set:function(e,t,n){return e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0}}},n.index=function(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))},n.insertAfter=function(e,t){var n,r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(var o,a=Pm(i);!(o=a()).done;){var s=o.value;this.proxyOf.nodes.splice(r+1,0,s)}for(var l in this.indexes)r<(n=this.indexes[l])&&(this.indexes[l]=n+i.length);return this.markDirty(),this},n.insertBefore=function(e,t){var n,r=this.index(e),i=0===r&&"prepend",o=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(var a,s=Pm(o);!(a=s()).done;){var l=a.value;this.proxyOf.nodes.splice(r,0,l)}for(var c in this.indexes)r<=(n=this.indexes[c])&&(this.indexes[c]=n+o.length);return this.markDirty(),this},n.normalize=function(e,n){var r=this;if("string"==typeof e)e=Lw(Nw(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var i,o=Pm(e=e.slice(0));!(i=o()).done;){var a=i.value;a.parent&&a.parent.removeChild(a,"ignore")}else if("root"===e.type&&"document"!==this.type)for(var s,l=Pm(e=e.nodes.slice(0));!(s=l()).done;){var c=s.value;c.parent&&c.parent.removeChild(c,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Pw(e)]}else if(e.selector)e=[new Ow(e)];else if(e.name)e=[new Tw(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Mw(e)]}return e.map(function(e){return e[Aw]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[jw]&&Dw(e),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=r.proxyOf,e})},n.prepend=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r,i=Pm(t=t.reverse());!(r=i()).done;){for(var o,a=r.value,s=this.normalize(a,this.first,"prepend").reverse(),l=Pm(s);!(o=l()).done;){var c=o.value;this.proxyOf.nodes.unshift(c)}for(var u in this.indexes)this.indexes[u]=this.indexes[u]+s.length}return this.markDirty(),this},n.push=function(e){return e.parent=this,this.proxyOf.nodes.push(e),this},n.removeAll=function(){for(var e,t=Pm(this.proxyOf.nodes);!(e=t()).done;){e.value.parent=void 0}return this.proxyOf.nodes=[],this.markDirty(),this},n.removeChild=function(e){var t;for(var n in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[n])>=e&&(this.indexes[n]=t-1);return this.markDirty(),this},n.replaceValues=function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,n))}),this.markDirty(),this},n.some=function(e){return this.nodes.some(e)},n.walk=function(e){return this.each(function(t,n){var r;try{r=e(t,n)}catch(rh){throw t.addToError(rh)}return!1!==r&&t.walk&&(r=t.walk(e)),r})},n.walkAtRules=function(e,t){return t?Nm(e,RegExp)?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))},n.walkComments=function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})},n.walkDecls=function(e,t){return t?Nm(e,RegExp)?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))},n.walkRules=function(e,t){return t?Nm(e,RegExp)?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))},Sm(t,[{key:"first",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}},{key:"last",get:function(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}]),t}($x);Fw.registerParse=function(e){Nw=e},Fw.registerRule=function(e){Ow=e},Fw.registerAtRule=function(e){Tw=e},Fw.registerRoot=function(e){Rw=e};var zw=Fw;Fw.default=Fw,Fw.rebuild=function(e){"atrule"===e.type?Object.setPrototypeOf(e,Tw.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ow.prototype):"decl"===e.type?Object.setPrototypeOf(e,Pw.prototype):"comment"===e.type?Object.setPrototypeOf(e,Mw.prototype):"root"===e.type&&Object.setPrototypeOf(e,Rw.prototype),e[Aw]=!0,e.nodes&&e.nodes.forEach(function(e){Fw.rebuild(e)})};var Uw,Bw,$w=function(e){function t(t){var n;return(n=e.call(this,Cm({type:"document"},t))||this).nodes||(n.nodes=[]),n}return Im(t,e),t.prototype.toResult=function(e){return void 0===e&&(e={}),new Uw(new Bw,this,e).stringify()},t}(zw);$w.registerLazyResult=function(e){Uw=e},$w.registerProcessor=function(e){Bw=e};var Vw=$w;$w.default=$w;var Ww=function(){function e(e,t){if(void 0===t&&(t={}),this.type="warning",this.text=e,t.node&&t.node.source){var n=t.node.rangeBy(t);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var r in t)this[r]=t[r]}return e.prototype.toString=function(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},e}(),qw=Ww;Ww.default=Ww;var Hw=qw,Kw=function(){function e(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css=void 0,this.map=void 0}var t=e.prototype;return t.toString=function(){return this.css},t.warn=function(e,t){void 0===t&&(t={}),t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new Hw(e,t);return this.messages.push(n),n},t.warnings=function(){return this.messages.filter(function(e){return"warning"===e.type})},Sm(e,[{key:"content",get:function(){return this.css}}]),e}(),Zw=Kw;Kw.default=Kw;var Gw="'".charCodeAt(0),Jw='"'.charCodeAt(0),Yw="\\".charCodeAt(0),Xw="/".charCodeAt(0),Qw="\n".charCodeAt(0),ek=" ".charCodeAt(0),tk="\f".charCodeAt(0),nk="\t".charCodeAt(0),rk="\r".charCodeAt(0),ik="[".charCodeAt(0),ok="]".charCodeAt(0),ak="(".charCodeAt(0),sk=")".charCodeAt(0),lk="{".charCodeAt(0),ck="}".charCodeAt(0),uk=";".charCodeAt(0),dk="*".charCodeAt(0),pk=":".charCodeAt(0),fk="@".charCodeAt(0),hk=/[\t\n\f\r "#'()/;[\\\]{}]/g,mk=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gk=/.[\r\n"'(/\\]/,vk=/[\da-f]/i,yk=zw,bk=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="atrule",n}Im(t,e);var n=t.prototype;return n.append=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.append).call.apply(i,[].concat([this],n))},n.prepend=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i;return this.proxyOf.nodes||(this.nodes=[]),(i=e.prototype.prepend).call.apply(i,[].concat([this],n))},t}(yk),xk=bk;bk.default=bk,yk.registerAtRule(bk);var wk,kk,_k=zw,Sk=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="root",n.nodes||(n.nodes=[]),n}Im(t,e);var n=t.prototype;return n.normalize=function(t,n,r){var i=e.prototype.normalize.call(this,t);if(n)if("prepend"===r)this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(var o,a=Pm(i);!(o=a()).done;){o.value.raws.before=n.raws.before}return i},n.removeChild=function(t,n){var r=this.index(t);return!n&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),e.prototype.removeChild.call(this,t)},n.toResult=function(e){return void 0===e&&(e={}),new wk(new kk,this,e).stringify()},t}(_k);Sk.registerLazyResult=function(e){wk=e},Sk.registerProcessor=function(e){kk=e};var Ck=Sk;Sk.default=Sk,_k.registerRoot(Sk);var Ek={comma:function(e){return Ek.split(e,[","],!0)},space:function(e){return Ek.split(e,[" ","\n","\t"])},split:function(e,t,n){for(var r,i=[],o="",a=!1,s=0,l=!1,c="",u=!1,d=Pm(e);!(r=d()).done;){var p=r.value;u?u=!1:"\\"===p?u=!0:l?p===c&&(l=!1):'"'===p||"'"===p?(l=!0,c=p):"("===p?s+=1:")"===p?s>0&&(s-=1):0===s&&t.includes(p)&&(a=!0),a?(""!==o&&i.push(o.trim()),o="",a=!1):o+=p}return(n||""!==o)&&i.push(o.trim()),i}},Ik=Ek;Ek.default=Ek;var Nk=zw,Ok=Ik,Tk=function(e){function t(t){var n;return(n=e.call(this,t)||this).type="rule",n.nodes||(n.nodes=[]),n}return Im(t,e),Sm(t,[{key:"selectors",get:function(){return Ok.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}}]),t}(Nk),Rk=Tk;Tk.default=Tk,Nk.registerRule(Tk);var jk=Wx,Ak=function(e,t){void 0===t&&(t={});var n,r,i,o,a,s,l,c,u,d,p=e.css.valueOf(),f=t.ignoreErrors,h=p.length,m=0,g=[],v=[];function y(t){throw e.error("Unclosed "+t,m)}return{back:function(e){v.push(e)},endOfFile:function(){return 0===v.length&&m>=h},nextToken:function(e){if(v.length)return v.pop();if(!(m>=h)){var t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(m)){case Qw:case ek:case nk:case rk:case tk:r=m;do{r+=1,n=p.charCodeAt(r)}while(n===ek||n===Qw||n===nk||n===rk||n===tk);d=["space",p.slice(m,r)],m=r-1;break;case ik:case ok:case lk:case ck:case pk:case uk:case sk:var b=String.fromCharCode(n);d=[b,b,m];break;case ak:if(c=g.length?g.pop()[1]:"",u=p.charCodeAt(m+1),"url"===c&&u!==Gw&&u!==Jw&&u!==ek&&u!==Qw&&u!==nk&&u!==tk&&u!==rk){r=m;do{if(s=!1,-1===(r=p.indexOf(")",r+1))){if(f||t){r=m;break}y("bracket")}for(l=r;p.charCodeAt(l-1)===Yw;)l-=1,s=!s}while(s);d=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),o=p.slice(m,r+1),-1===r||gk.test(o)?d=["(","(",m]:(d=["brackets",o,m,r],m=r);break;case Gw:case Jw:i=n===Gw?"'":'"',r=m;do{if(s=!1,-1===(r=p.indexOf(i,r+1))){if(f||t){r=m+1;break}y("string")}for(l=r;p.charCodeAt(l-1)===Yw;)l-=1,s=!s}while(s);d=["string",p.slice(m,r+1),m,r],m=r;break;case fk:hk.lastIndex=m+1,hk.test(p),r=0===hk.lastIndex?p.length-1:hk.lastIndex-2,d=["at-word",p.slice(m,r+1),m,r],m=r;break;case Yw:for(r=m,a=!0;p.charCodeAt(r+1)===Yw;)r+=1,a=!a;if(n=p.charCodeAt(r+1),a&&n!==Xw&&n!==ek&&n!==Qw&&n!==nk&&n!==rk&&n!==tk&&(r+=1,vk.test(p.charAt(r)))){for(;vk.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ek&&(r+=1)}d=["word",p.slice(m,r+1),m,r],m=r;break;default:n===Xw&&p.charCodeAt(m+1)===dk?(0===(r=p.indexOf("*/",m+2)+1)&&(f||t?r=p.length:y("comment")),d=["comment",p.slice(m,r+1),m,r],m=r):(mk.lastIndex=m+1,mk.test(p),r=0===mk.lastIndex?p.length-1:mk.lastIndex-2,d=["word",p.slice(m,r+1),m,r],g.push(d),m=r)}return m++,d}},position:function(){return m}}},Pk=Iw,Mk=xk,Lk=Ck,Dk=Rk,Fk={empty:!0,space:!0};var zk=function(){function e(e){this.input=e,this.root=new Lk,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}var t=e.prototype;return t.atrule=function(e){var t,n,r,i=new Mk;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);for(var o=!1,a=!1,s=[],l=[];!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(n=s[r=s.length-1];n&&"space"===n[0];)n=s[--r];n&&(i.source.end=this.getPosition(n[3]||n[2]),i.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(i.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(i,"params",s),o&&(e=s[s.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),a&&(i.nodes=[],this.current=i)},t.checkMissedSemicolon=function(e){var t=this.colon(e);if(!1!==t){for(var n,r=0,i=t-1;i>=0&&("space"===(n=e[i])[0]||2!==(r+=1));i--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}},t.colon=function(e){for(var t,n,r,i,o=0,a=Pm(e.entries());!(i=a()).done;){var s=i.value,l=s[0];if("("===(n=(t=s[1])[0])&&(o+=1),")"===n&&(o-=1),0===o&&":"===n){if(r){if("word"===r[0]&&"progid"===r[1])continue;return l}this.doubleColon(t)}r=t}return!1},t.comment=function(e){var t=new Pk;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}},t.createTokenizer=function(){this.tokenizer=Ak(this.input)},t.decl=function(e,t){var n=new jk;this.init(n,e[0][2]);var r,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(i[3]||i[2]||function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=n[3]||n[2];if(r)return r}}(e)),n.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),n.raws.before+=e.shift()[1];for(n.source.start=this.getPosition(e[0][2]),n.prop="";e.length;){var o=e[0][0];if(":"===o||"space"===o||"comment"===o)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(":"===(r=e.shift())[0]){n.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),n.raws.between+=r[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));for(var a,s=[];e.length&&("space"===(a=e[0][0])||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(var l=e.length-1;l>=0;l--){if("!important"===(r=e[l])[1].toLowerCase()){n.important=!0;var c=this.stringFrom(e,l);" !important"!==(c=this.spacesFromEnd(e)+c)&&(n.raws.important=c);break}if("important"===r[1].toLowerCase()){for(var u=e.slice(0),d="",p=l;p>0;p--){var f=u[p][0];if(0===d.trim().indexOf("!")&&"space"!==f)break;d=u.pop()[1]+d}0===d.trim().indexOf("!")&&(n.important=!0,n.raws.important=d,e=u)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(function(e){return"space"!==e[0]&&"comment"!==e[0]})&&(n.raws.between+=s.map(function(e){return e[1]}).join(""),s=[]),this.raw(n,"value",s.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)},t.doubleColon=function(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})},t.emptyRule=function(e){var t=new Dk;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t},t.end=function(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)},t.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())},t.freeSemicolon=function(e){if(this.spaces+=e[1],this.current.nodes){var t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}},t.getPosition=function(e){var t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}},t.init=function(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)},t.other=function(e){for(var t=!1,n=null,r=!1,i=null,o=[],a=e[1].startsWith("--"),s=[],l=e;l;){if(n=l[0],s.push(l),"("===n||"["===n)i||(i=l),o.push("("===n?")":"]");else if(a&&r&&"{"===n)i||(i=l),o.push("}");else if(0===o.length){if(";"===n){if(r)return void this.decl(s,a);break}if("{"===n)return void this.rule(s);if("}"===n){this.tokenizer.back(s.pop()),t=!0;break}":"===n&&(r=!0)}else n===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;s.length&&("space"===(l=s[s.length-1][0])||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)},t.parse=function(){for(var e;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()},t.precheckMissedSemicolon=function(){},t.raw=function(e,t,n,r){for(var i,o,a,s,l=n.length,c="",u=!0,d=0;d<l;d+=1)"space"!==(o=(i=n[d])[0])||d!==l-1||r?"comment"===o?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",Fk[s]||Fk[a]||","===c.slice(-1)?u=!1:c+=i[1]):c+=i[1]:u=!1;if(!u){var p=n.reduce(function(e,t){return e+t[1]},"");e.raws[t]={raw:p,value:c}}e[t]=c},t.rule=function(e){e.pop();var t=new Dk;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t},t.spacesAndCommentsFromEnd=function(e){for(var t,n="";e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)n=e.pop()[1]+n;return n},t.spacesAndCommentsFromStart=function(e){for(var t,n="";e.length&&("space"===(t=e[0][0])||"comment"===t);)n+=e.shift()[1];return n},t.spacesFromEnd=function(e){for(var t="";e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t},t.stringFrom=function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n},t.unclosedBlock=function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)},t.unclosedBracket=function(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})},t.unexpectedClose=function(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})},t.unknownWord=function(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})},t.unnamedAtrule=function(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})},e}(),Uk=zw,Bk=zk,$k=hw;function Vk(e,t){var n=new $k(e,t),r=new Bk(n);try{r.parse()}catch(rh){throw rh}return r.root}var Wk=Vk;Vk.default=Vk,Uk.registerParse(Vk);var qk=Nx.isClean,Hk=Nx.my,Kk=Cw,Zk=Px,Gk=zw,Jk=Vw,Yk=Zw,Xk=Wk,Qk=Ck,e_={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},t_={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},n_={Once:!0,postcssPlugin:!0,prepare:!0};function r_(e){return"object"===(void 0===e?"undefined":Rm(e))&&"function"==typeof e.then}function i_(e){var t=!1,n=e_[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,0,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,0,n+"Exit"]:[n,n+"Exit"]}function o_(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:i_(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function a_(e){return e[qk]=!1,e.nodes&&e.nodes.forEach(function(e){return a_(e)}),e}var s_={},l_=function(){function e(t,n,r){var i,o=this;if(this.stringified=!1,this.processed=!1,"object"!==(void 0===n?"undefined":Rm(n))||null===n||"root"!==n.type&&"document"!==n.type)if(Nm(n,e)||Nm(n,Yk))i=a_(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var a=Xk;r.syntax&&(a=r.syntax.parse),r.parser&&(a=r.parser),a.parse&&(a=a.parse);try{i=a(n,r)}catch(vE){this.processed=!0,this.error=vE}i&&!i[Hk]&&Gk.rebuild(i)}else i=a_(n);this.result=new Yk(t,i,r),this.helpers=Cm({},s_,{postcss:s_,result:this.result}),this.plugins=this.processor.plugins.map(function(e){return"object"===(void 0===e?"undefined":Rm(e))&&e.prepare?Cm({},e,e.prepare(o.result)):e})}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.getAsyncError=function(){throw new Error("Use process(css).then(cb) to work with async plugins")},t.handleError=function(e,t){var n=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(n.postcssVersion){0}}else e.plugin=n.postcssPlugin,e.setMessage()}catch(r){console&&console.error}return e},t.prepareVisitors=function(){var e=this;this.listeners={};for(var t,n=function(t,n,r){e.listeners[n]||(e.listeners[n]=[]),e.listeners[n].push([t,r])},r=Pm(this.plugins);!(t=r()).done;){var i=t.value;if("object"===(void 0===i?"undefined":Rm(i)))for(var o in i){if(!t_[o]&&/^[A-Z]/.test(o))throw new Error("Unknown event "+o+" in "+i.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!n_[o])if("object"===Rm(i[o]))for(var a in i[o])n(i,"*"===a?o:o+"-"+a.toLowerCase(),i[o][a]);else"function"==typeof i[o]&&n(i,o,i[o])}}this.hasListener=Object.keys(this.listeners).length>0},t.runAsync=function(){var e=this;return km(function(){var t,n,r,i,o,a,s,l,c,u,d,p;return Mm(this,function(f){switch(f.label){case 0:e.plugin=0,t=0,f.label=1;case 1:if(!(t<e.plugins.length))return[3,6];if(n=e.plugins[t],!r_(r=e.runOnRoot(n)))return[3,5];f.label=2;case 2:return f.trys.push([2,4,,5]),[4,r];case 3:return f.sent(),[3,5];case 4:throw i=f.sent(),e.handleError(i);case 5:return t++,[3,1];case 6:if(e.prepareVisitors(),!e.hasListener)return[3,18];o=e.result.root,f.label=7;case 7:if(o[qk])return[3,14];o[qk]=!0,a=[o_(o)],f.label=8;case 8:if(!(a.length>0))return[3,13];if(!r_(s=e.visitTick(a)))return[3,12];f.label=9;case 9:return f.trys.push([9,11,,12]),[4,s];case 10:return f.sent(),[3,12];case 11:throw l=f.sent(),c=a[a.length-1].node,e.handleError(l,c);case 12:return[3,8];case 13:return[3,7];case 14:if(!e.listeners.OnceExit)return[3,18];u=function(){var t,n,r,i,a;return Mm(this,function(s){switch(s.label){case 0:t=p.value,n=t[0],r=t[1],e.result.lastPlugin=n,s.label=1;case 1:return s.trys.push([1,6,,7]),"document"!==o.type?[3,3]:(i=o.nodes.map(function(t){return r(t,e.helpers)}),[4,Promise.all(i)]);case 2:return s.sent(),[3,5];case 3:return[4,r(o,e.helpers)];case 4:s.sent(),s.label=5;case 5:return[3,7];case 6:throw a=s.sent(),e.handleError(a);case 7:return[2]}})},d=Pm(e.listeners.OnceExit),f.label=15;case 15:return(p=d()).done?[3,18]:[5,Lm(u())];case 16:f.sent(),f.label=17;case 17:return[3,15];case 18:return e.processed=!0,[2,e.stringify()]}})})()},t.runOnRoot=function(e){var t=this;this.result.lastPlugin=e;try{if("object"===(void 0===e?"undefined":Rm(e))&&e.Once){if("document"===this.result.root.type){var n=this.result.root.nodes.map(function(n){return e.Once(n,t.helpers)});return r_(n[0])?Promise.all(n):n}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(vE){throw this.handleError(vE)}},t.stringify=function(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=Zk;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n=new Kk(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result},t.sync=function(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var e,t=Pm(this.plugins);!(e=t()).done;){var n=e.value;if(r_(this.runOnRoot(n)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){for(var r=this.result.root;!r[qk];)r[qk]=!0,this.walkSync(r);if(this.listeners.OnceExit)if("document"===r.type)for(var i,o=Pm(r.nodes);!(i=o()).done;){var a=i.value;this.visitSync(this.listeners.OnceExit,a)}else this.visitSync(this.listeners.OnceExit,r)}return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this.css},t.visitSync=function(e,t){for(var n,r=Pm(e);!(n=r()).done;){var i=n.value,o=i[0],a=i[1];this.result.lastPlugin=o;var s=void 0;try{s=a(t,this.helpers)}catch(rh){throw this.handleError(rh,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(r_(s))throw this.getAsyncError()}},t.visitTick=function(e){var t=e[e.length-1],n=t.node,r=t.visitors;if("root"===n.type||"document"===n.type||n.parent){if(r.length>0&&t.visitorIndex<r.length){var i=r[t.visitorIndex],o=i[0],a=i[1];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return a(n.toProxy(),this.helpers)}catch(rh){throw this.handleError(rh,n)}}if(0!==t.iterator){for(var s,l=t.iterator;s=n.nodes[n.indexes[l]];)if(n.indexes[l]+=1,!s[qk])return s[qk]=!0,void e.push(o_(s));t.iterator=0,delete n.indexes[l]}for(var c=t.events;t.eventIndex<c.length;){var u=c[t.eventIndex];if(t.eventIndex+=1,0===u)return void(n.nodes&&n.nodes.length&&(n[qk]=!0,t.iterator=n.getIterator()));if(this.listeners[u])return void(t.visitors=this.listeners[u])}e.pop()}else e.pop()},t.walkSync=function(e){var t=this;e[qk]=!0;for(var n,r=Pm(i_(e));!(n=r()).done;){var i=n.value;if(0===i)e.nodes&&e.each(function(e){e[qk]||t.walkSync(e)});else{var o=this.listeners[i];if(o&&this.visitSync(o,e.toProxy()))return}}},t.warnings=function(){return this.sync().warnings()},Sm(e,[{key:"content",get:function(){return this.stringify().content}},{key:"css",get:function(){return this.stringify().css}},{key:"map",get:function(){return this.stringify().map}},{key:"messages",get:function(){return this.sync().messages}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){return this.sync().root}},{key:Symbol.toStringTag,get:function(){return"LazyResult"}}]),e}();l_.registerPostcss=function(e){s_=e};var c_=l_;l_.default=l_,Qk.registerLazyResult(l_),Jk.registerLazyResult(l_);var u_=Cw,d_=Px,p_=Wk,f_=Zw,h_=function(){function e(e,t,n){var r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;var i=d_;this.result=new f_(this._processor,r,this._opts),this.result.css=t;var o=this;Object.defineProperty(this.result,"root",{get:function(){return o.root}});var a=new u_(i,r,this._opts,t);if(a.isMap()){var s=a.generate(),l=s[0],c=s[1];l&&(this.result.css=l),c&&(this.result.map=c)}else a.clearAnnotation(),this.result.css=a.css}var t=e.prototype;return t.async=function(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)},t.catch=function(e){return this.async().catch(e)},t.finally=function(e){return this.async().then(e,e)},t.sync=function(){if(this.error)throw this.error;return this.result},t.then=function(e,t){return this.async().then(e,t)},t.toString=function(){return this._css},t.warnings=function(){return[]},Sm(e,[{key:"content",get:function(){return this.result.css}},{key:"css",get:function(){return this.result.css}},{key:"map",get:function(){return this.result.map}},{key:"messages",get:function(){return[]}},{key:"opts",get:function(){return this.result.opts}},{key:"processor",get:function(){return this.result.processor}},{key:"root",get:function(){if(this._root)return this._root;var e,t=p_;try{e=t(this._css,this._opts)}catch(vE){this.error=vE}if(this.error)throw this.error;return this._root=e,e}},{key:Symbol.toStringTag,get:function(){return"NoWorkResult"}}]),e}(),m_=h_;h_.default=h_;var g_=m_,v_=c_,y_=Vw,b_=Ck,x_=function(){function e(e){void 0===e&&(e=[]),this.version="8.4.38",this.plugins=this.normalize(e)}var t=e.prototype;return t.normalize=function(e){for(var t,n=[],r=Pm(e);!(t=r()).done;){var i=t.value;if(!0===i.postcss?i=i():i.postcss&&(i=i.postcss),"object"===(void 0===i?"undefined":Rm(i))&&Array.isArray(i.plugins))n=n.concat(i.plugins);else if("object"===(void 0===i?"undefined":Rm(i))&&i.postcssPlugin)n.push(i);else if("function"==typeof i)n.push(i);else if("object"!==(void 0===i?"undefined":Rm(i))||!i.parse&&!i.stringify)throw new Error(i+" is not a PostCSS plugin")}return n},t.process=function(e,t){return void 0===t&&(t={}),this.plugins.length||t.parser||t.stringifier||t.syntax?new v_(this,e,t):new g_(this,e,t)},t.use=function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this},e}(),w_=x_;x_.default=x_,b_.registerProcessor(x_),y_.registerProcessor(x_);var k_=Wx,__=Qx,S_=Iw,C_=xk,E_=hw,I_=Ck,N_=Rk;function O_(e,t){if(Array.isArray(e))return e.map(function(e){return O_(e)});var n=e.inputs,r=Om(e,["inputs"]);if(n){t=[];for(var i,o=Pm(n);!(i=o()).done;){var a=Cm({},i.value,{__proto__:E_.prototype});a.map&&(a.map=Cm({},a.map,{__proto__:__.prototype})),t.push(a)}}if(r.nodes&&(r.nodes=e.nodes.map(function(e){return O_(e,t)})),r.source){var s=r.source,l=s.inputId,c=Om(s,["inputId"]);r.source=c,null!=l&&(r.source.input=t[l])}if("root"===r.type)return new I_(r);if("decl"===r.type)return new k_(r);if("rule"===r.type)return new N_(r);if("comment"===r.type)return new S_(r);if("atrule"===r.type)return new C_(r);throw new Error("Unknown node type: "+e.type)}var T_=O_;O_.default=O_;var R_=Ix,j_=Wx,A_=c_,P_=zw,M_=w_,L_=Px,D_=T_,F_=Vw,z_=qw,U_=Iw,B_=xk,$_=Zw,V_=hw,W_=Wk,q_=Ik,H_=Rk,K_=Ck,Z_=$x;function G_(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])&&(t=t[0]),new M_(t)}G_.plugin=function(e,t){var n,r=!1;function i(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];console&&console.warn&&!r&&(r=!0,ym.LANG&&ym.LANG.startsWith("cn"));var a=t.apply(void 0,[].concat(i));return a.postcssPlugin=e,a.postcssVersion=(new M_).version,a}return Object.defineProperty(i,"postcss",{get:function(){return n||(n=i()),n}}),i.process=function(e,t,n){return G_([i(n)]).process(e,t)},i},G_.stringify=L_,G_.parse=W_,G_.fromJSON=D_,G_.list=q_,G_.comment=function(e){return new U_(e)},G_.atRule=function(e){return new B_(e)},G_.decl=function(e){return new j_(e)},G_.rule=function(e){return new H_(e)},G_.root=function(e){return new K_(e)},G_.document=function(e){return new F_(e)},G_.CssSyntaxError=R_,G_.Declaration=j_,G_.Container=P_,G_.Processor=M_,G_.Document=F_,G_.Comment=U_,G_.Warning=z_,G_.AtRule=B_,G_.Result=$_,G_.Input=V_,G_.Rule=H_,G_.Root=K_,G_.Node=Z_,A_.registerPostcss(G_);var J_=G_;G_.default=G_;var Y_=vx(J_);Y_.stringify,Y_.fromJSON,Y_.plugin,Y_.parse,Y_.list,Y_.document,Y_.comment,Y_.atRule,Y_.rule,Y_.decl,Y_.root,Y_.CssSyntaxError,Y_.Declaration,Y_.Container,Y_.Processor,Y_.Document,Y_.Comment,Y_.Warning,Y_.AtRule,Y_.Result,Y_.Input,Y_.Rule,Y_.Root,Y_.Node;var X_=function(){function e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];gx(this,"parentElement",null),gx(this,"parentNode",null),gx(this,"ownerDocument"),gx(this,"firstChild",null),gx(this,"lastChild",null),gx(this,"previousSibling",null),gx(this,"nextSibling",null),gx(this,"ELEMENT_NODE",1),gx(this,"TEXT_NODE",3),gx(this,"nodeType"),gx(this,"nodeName"),gx(this,"RRNodeType")}var t=e.prototype;return t.contains=function(t){if(!Nm(t,e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1},t.appendChild=function(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")},t.insertBefore=function(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")},t.removeChild=function(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")},t.toString=function(){return"RRNode"},Sm(e,[{key:"childNodes",get:function(){for(var e=[],t=this.firstChild;t;)e.push(t),t=t.nextSibling;return e}}]),e}(),Q_={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},eS={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tS={};function nS(e){if(tS[e])return tS[e];var t=globalThis[e],n=t.prototype,r=e in Q_?Q_[e]:void 0,i=Boolean(r&&r.every(function(e){var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(n,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),o=e in eS?eS[e]:void 0,a=Boolean(o&&o.every(function(e){var t;return"function"==typeof n[e]&&(null==(t=n[e])?void 0:t.toString().includes("[native code]"))}));if(i&&a&&!globalThis.Zone)return tS[e]=t.prototype,t.prototype;try{var s=document.createElement("iframe");document.body.appendChild(s);var l=s.contentWindow;if(!l)return t.prototype;var c=l[e].prototype;return document.body.removeChild(s),c?tS[e]=c:n}catch(rh){return n}}var rS={};function iS(e,t,n){var r,i=e+"."+String(n);if(rS[i])return rS[i].call(t);var o=nS(e),a=null==(r=Object.getOwnPropertyDescriptor(o,n))?void 0:r.get;return a?(rS[i]=a,a.call(t)):t[n]}var oS={};function aS(e,t,n){var r=e+"."+String(n);if(oS[r])return oS[r].bind(t);var i=nS(e)[n];return"function"!=typeof i?t[n]:(oS[r]=i,i.bind(t))}function sS(){return nS("MutationObserver").constructor}function lS(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(rh){return function(){}}}var cS={childNodes:function(e){return iS("Node",e,"childNodes")},parentNode:function(e){return iS("Node",e,"parentNode")},parentElement:function(e){return iS("Node",e,"parentElement")},textContent:function(e){return iS("Node",e,"textContent")},contains:function(e,t){return aS("Node",e,"contains")(t)},getRootNode:function(e){return aS("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?iS("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?iS("Element",e,"shadowRoot"):null},querySelector:function(e,t){return iS("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return iS("Element",e,"querySelectorAll")(t)},mutationObserver:sS,patch:lS};function uS(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}var dS={map:{},getId:function(){return-1},getNode:function(){return null},removeNodeFromMap:function(){},has:function(){return!1},reset:function(){}};function pS(e,t,n){void 0===n&&(n={});var r=null,i=0;return function(){for(var o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];var l=Date.now();i||!1!==n.leading||(i=l);var c=t-(l-i),u=this;c<=0||c>t?(r&&(clearTimeout(r),r=null),i=l,e.apply(u,a)):r||!1===n.trailing||(r=setTimeout(function(){i=!1===n.leading?0:Date.now(),r=null,e.apply(u,a)},c))}}function fS(e,t,n,r,i){void 0===i&&(i=window);var o=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout(function(){n.set.call(t,e)},0),o&&o.set&&o.set.call(this,e)}}),function(){return fS(e,t,o||{},!0)}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(dS=new Proxy(dS,{get:function(e,t,n){return Reflect.get(e,t,n)}}));var hS=Date.now;function mS(e){var t,n,r,i,o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=cS.parentElement(o.body))?void 0:t.scrollLeft)||(null==(n=null==o?void 0:o.body)?void 0:n.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(r=cS.parentElement(o.body))?void 0:r.scrollTop)||(null==(i=null==o?void 0:o.body)?void 0:i.scrollTop)||0}}function gS(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function vS(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function yS(e){return e?e.nodeType===e.ELEMENT_NODE?e:cS.parentElement(e):null}function bS(e,t,n,r){if(!e)return!1;var i=yS(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t))return!0;if(r&&null!==i.closest("."+t))return!0}else if(Og(i,t,r))return!0}catch(rh){}if(n){if(i.matches(n))return!0;if(r&&null!==i.closest(n))return!0}return!1}function xS(e,t,n){return!("TITLE"!==e.tagName||!n.headTitleMutations)||-2===t.getId(e)}function wS(e,t){if(Qm(e))return!1;var n=t.getId(e);if(!t.has(n))return!0;var r=cS.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||wS(r,t))}function kS(e){return Boolean(e.changedTouches)}function _S(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function SS(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function CS(e){return!!e&&(Nm(e,X_)&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(cS.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(hS=function(){return(new Date).getTime()});var ES=function(){function e(){zm(this,"id",1),zm(this,"styleIDMap",new WeakMap),zm(this,"idStyleMap",new Map)}var t=e.prototype;return t.getId=function(e){var t;return null!=(t=this.styleIDMap.get(e))?t:-1},t.has=function(e){return this.styleIDMap.has(e)},t.add=function(e,t){return this.has(e)?this.getId(e):(n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n);var n},t.getStyle=function(e){return this.idStyleMap.get(e)||null},t.reset=function(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1},t.generateId=function(){return this.id++},e}();function IS(e){var t,n=null;return"getRootNode"in e&&(null==(t=cS.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&cS.host(cS.getRootNode(e))&&(n=cS.host(cS.getRootNode(e))),n}function NS(e){var t=e.ownerDocument;if(!t)return!1;var n=function(e){for(var t,n=e;t=IS(n);)n=t;return n}(e);return cS.contains(t,n)}function OS(e){var t=e.ownerDocument;return!!t&&(cS.contains(t,e)||NS(e))}var TS=function(e){return e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e}(TS||{}),RS=function(e){return e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e}(RS||{}),jS=function(e){return e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e}(jS||{}),AS=function(e){return e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e}(AS||{}),PS=function(e){return e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e}(PS||{}),MS=function(e){return e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e}(MS||{}),LS=function(e){return e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e}(LS||{});function DS(e){return"__ln"in e}var FS,zS=function(){function e(){zm(this,"length",0),zm(this,"head",null),zm(this,"tail",null)}var t=e.prototype;return t.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},t.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&DS(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&DS(e.nextSibling)&&e.nextSibling.__ln.previous){var r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++},t.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)},e}(),US=function(e,t){return e+"@"+t},BS=function(){function e(){var e=this;zm(this,"frozen",!1),zm(this,"locked",!1),zm(this,"texts",[]),zm(this,"attributes",[]),zm(this,"attributeMap",new WeakMap),zm(this,"removes",[]),zm(this,"mapRemoves",[]),zm(this,"movedMap",{}),zm(this,"addedSet",new Set),zm(this,"movedSet",new Set),zm(this,"droppedSet",new Set),zm(this,"removesSubTreeCache",new Set),zm(this,"mutationCb"),zm(this,"blockClass"),zm(this,"blockSelector"),zm(this,"maskTextClass"),zm(this,"maskTextSelector"),zm(this,"inlineStylesheet"),zm(this,"maskInputOptions"),zm(this,"maskTextFn"),zm(this,"maskInputFn"),zm(this,"keepIframeSrcFn"),zm(this,"recordCanvas"),zm(this,"inlineImages"),zm(this,"slimDOMOptions"),zm(this,"dataURLOptions"),zm(this,"doc"),zm(this,"mirror"),zm(this,"iframeManager"),zm(this,"stylesheetManager"),zm(this,"shadowDomManager"),zm(this,"canvasManager"),zm(this,"processedNodeManager"),zm(this,"unattachedDoc"),zm(this,"processMutations",function(t){t.forEach(e.processMutation),e.emit()}),zm(this,"emit",function(){if(!e.frozen&&!e.locked){for(var t=[],n=new Set,r=new zS,i=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},o=function(o){var a=cS.parentNode(o);if(a&&OS(o)){var s=!1;if(o.nodeType===Node.TEXT_NODE){var l=a.tagName;if("TEXTAREA"===l)return;"STYLE"===l&&e.addedSet.has(a)&&(s=!0)}var c=Qm(a)?e.mirror.getId(IS(o)):e.mirror.getId(a),u=i(o);if(-1===c||-1===u)return r.addNode(o);var d=Ag(o,{doc:e.doc,mirror:e.mirror,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,dataURLOptions:e.dataURLOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(t){_S(t,e.mirror)&&e.iframeManager.addIframe(t),SS(t,e.mirror)&&e.stylesheetManager.trackLinkElement(t),CS(o)&&e.shadowDomManager.addShadowRoot(cS.shadowRoot(o),e.doc)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)},onStylesheetLoad:function(t,n){e.stylesheetManager.attachLinkElement(t,n)},cssCaptured:s});d&&(t.push({parentId:c,nextId:u,node:d}),n.add(d.id))}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());for(var a,s=Pm(e.movedSet);!(a=s()).done;){var l=a.value;VS(e.removesSubTreeCache,l,e.mirror)&&!e.movedSet.has(cS.parentNode(l))||o(l)}for(var c,u=Pm(e.addedSet);!(c=u()).done;){var d=c.value;WS(e.droppedSet,d)||VS(e.removesSubTreeCache,d,e.mirror)?WS(e.movedSet,d)?o(d):e.droppedSet.add(d):o(d)}for(var p=null;r.length;){var f=null;if(p){var h=e.mirror.getId(cS.parentNode(p.value)),m=i(p.value);-1!==h&&-1!==m&&(f=p)}if(!f)for(var g=r.tail;g;){var v=g;if(g=g.previous,v){var y=e.mirror.getId(cS.parentNode(v.value));if(-1===i(v.value))continue;if(-1!==y){f=v;break}var b=v.value,x=cS.parentNode(b);if(x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var w=cS.host(x);if(-1!==e.mirror.getId(w)){f=v;break}}}}if(!f){for(;r.head;)r.removeNode(r.head.value);break}p=f.previous,r.removeNode(f.value),o(f.value)}var k={texts:e.texts.map(function(t){var n=t.node,r=cS.parentNode(n);return r&&"TEXTAREA"===r.tagName&&e.genTextAreaValueMutation(r),{id:e.mirror.getId(n),value:t.value}}).filter(function(e){return!n.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),attributes:e.attributes.map(function(t){var n=t.attributes;if("string"==typeof n.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);r.length<n.style.length&&(r+i).split("var(").length===n.style.split("var(").length&&(n.style=t.styleDiff)}return{id:e.mirror.getId(t.node),attributes:n}}).filter(function(e){return!n.has(e.id)}).filter(function(t){return e.mirror.has(t.id)}),removes:e.removes,adds:t};(k.texts.length||k.attributes.length||k.removes.length||k.adds.length)&&(e.texts=[],e.attributes=[],e.attributeMap=new WeakMap,e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.removesSubTreeCache=new Set,e.movedMap={},e.mutationCb(k))}}),zm(this,"genTextAreaValueMutation",function(t){var n=e.attributeMap.get(t);n||(n={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(n),e.attributeMap.set(t,n));var r=Array.from(cS.childNodes(t),function(e){return cS.textContent(e)||""}).join("");n.attributes.value=ig({element:t,maskInputOptions:e.maskInputOptions,tagName:t.tagName,type:sg(t),value:r,maskInputFn:e.maskInputFn})}),zm(this,"processMutation",function(t){if(!xS(t.target,e.mirror,e.slimDOMOptions))switch(t.type){case"characterData":var n=cS.textContent(t.target);bS(t.target,e.blockClass,e.blockSelector,!1)||n===t.oldValue||e.texts.push({value:Tg(t.target,e.maskTextClass,e.maskTextSelector,!0)&&n?e.maskTextFn?e.maskTextFn(n,yS(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break;case"attributes":var r=t.target,i=t.attributeName,o=t.target.getAttribute(i);if("value"===i){var a=sg(r);o=ig({element:r,maskInputOptions:e.maskInputOptions,tagName:r.tagName,type:a,value:o,maskInputFn:e.maskInputFn})}if(bS(t.target,e.blockClass,e.blockSelector,!1)||o===t.oldValue)return;var s=e.attributeMap.get(t.target);if("IFRAME"===r.tagName&&"src"===i&&!e.keepIframeSrcFn(o)){if(r.contentDocument)return;i="rr_src"}if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},e.attributes.push(s),e.attributeMap.set(t.target,s)),"type"===i&&"INPUT"===r.tagName&&"password"===(t.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Ng(r.tagName,i))if(s.attributes[i]=Ig(e.doc,og(r.tagName),og(i),o),"style"===i){if(!e.unattachedDoc)try{e.unattachedDoc=document.implementation.createHTMLDocument()}catch(rh){e.unattachedDoc=e.doc}var l=e.unattachedDoc.createElement("span");t.oldValue&&l.setAttribute("style",t.oldValue);for(var c,u=Pm(Array.from(r.style));!(c=u()).done;){var d=c.value,p=r.style.getPropertyValue(d),f=r.style.getPropertyPriority(d);p!==l.style.getPropertyValue(d)||f!==l.style.getPropertyPriority(d)?s.styleDiff[d]=""===f?p:[p,f]:s._unchangedStyles[d]=[p,f]}for(var h,m=Pm(Array.from(l.style));!(h=m()).done;){var g=h.value;""===r.style.getPropertyValue(g)&&(s.styleDiff[g]=!1)}}else"open"===i&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal");break;case"childList":if(bS(t.target,e.blockClass,e.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void e.genTextAreaValueMutation(t.target);t.addedNodes.forEach(function(n){return e.genAdds(n,t.target)}),t.removedNodes.forEach(function(n){var r=e.mirror.getId(n),i=Qm(t.target)?e.mirror.getId(cS.host(t.target)):e.mirror.getId(t.target);bS(t.target,e.blockClass,e.blockSelector,!1)||xS(n,e.mirror,e.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(n,e.mirror)||(e.addedSet.has(n)?($S(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||wS(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[US(r,i)]?$S(e.movedSet,n):(e.removes.push({parentId:i,id:r,isShadow:!(!Qm(t.target)||!eg(t.target))||void 0}),function(e,t){var n=[e];for(;n.length;){var r=n.pop();t.has(r)||(t.add(r),cS.childNodes(r).forEach(function(e){return n.push(e)}))}}(n,e.removesSubTreeCache))),e.mapRemoves.push(n))})}}),zm(this,"genAdds",function(t,n){if(!e.processedNodeManager.inOtherBuffer(t,e)&&!e.addedSet.has(t)&&!e.movedSet.has(t)){if(e.mirror.hasNode(t)){if(xS(t,e.mirror,e.slimDOMOptions))return;e.movedSet.add(t);var r=null;n&&e.mirror.hasNode(n)&&(r=e.mirror.getId(n)),r&&-1!==r&&(e.movedMap[US(e.mirror.getId(t),r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);bS(t,e.blockClass,e.blockSelector,!1)||(cS.childNodes(t).forEach(function(t){return e.genAdds(t)}),CS(t)&&cS.childNodes(cS.shadowRoot(t)).forEach(function(n){e.processedNodeManager.add(n,e),e.genAdds(n,t)}))}})}var t=e.prototype;return t.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(function(n){t[n]=e[n]})},t.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},t.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},t.isFrozen=function(){return this.frozen},t.lock=function(){this.locked=!0,this.canvasManager.lock()},t.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},t.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function $S(e,t){e.delete(t),cS.childNodes(t).forEach(function(t){return $S(e,t)})}function VS(e,t,n){return 0!==e.size&&function(e,t){var n=cS.parentNode(t);return!!n&&e.has(n)}(e,t)}function WS(e,t){return 0!==e.size&&qS(e,t)}function qS(e,t){var n=cS.parentNode(t);return!!n&&(!!e.has(n)||qS(e,n))}var HS=function(e){if(!FS)return e;return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];try{return e.apply(void 0,[].concat(n))}catch(vE){if(FS&&!0===FS(vE))return;throw vE}}},KS=[];function ZS(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(rh){}return e&&e.target}function GS(e,t){var n=new BS;KS.push(n),n.init(e);var r=new(sS())(HS(n.processMutations.bind(n)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function JS(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;if(!1===a.mouseInteraction)return function(){};var s=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,l=[],c=null;return Object.keys(jS).filter(function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e]}).forEach(function(e){var a=og(e),s=function(e){return function(n){var a=ZS(n);if(!bS(a,i,o,!0)){var s=null,l=e;if("pointerType"in n){switch(n.pointerType){case"mouse":s=AS.Mouse;break;case"touch":s=AS.Touch;break;case"pen":s=AS.Pen}s===AS.Touch?jS[e]===jS.MouseDown?l="TouchStart":jS[e]===jS.MouseUp&&(l="TouchEnd"):AS.Pen}else kS(n)&&(s=AS.Touch);null!==s?(c=s,(l.startsWith("Touch")&&s===AS.Touch||l.startsWith("Mouse")&&s===AS.Mouse)&&(s=null)):jS[e]===jS.Click&&(s=c,c=null);var u=kS(n)?n.changedTouches[0]:n;if(u){var d=r.getId(a),p=u.clientX,f=u.clientY;HS(t)(Cm({type:jS[l],id:d,x:p,y:f},null!==s&&{pointerType:s}))}}}}(e);if(window.PointerEvent)switch(jS[e]){case jS.MouseDown:case jS.MouseUp:a=a.replace("mouse","pointer");break;case jS.TouchStart:case jS.TouchEnd:return}l.push(uS(a,s,n))}),HS(function(){l.forEach(function(e){return e()})})}function YS(e){var t=e.scrollCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.sampling;return uS("scroll",HS(pS(HS(function(e){var a=ZS(e);if(a&&!bS(a,i,o,!0)){var s=r.getId(a);if(a===n&&n.defaultView){var l=mS(n.defaultView);t({id:s,x:l.left,y:l.top})}else t({id:s,x:a.scrollLeft,y:a.scrollTop})}}),a.scroll||100)),n)}var XS=["INPUT","TEXTAREA","SELECT"],QS=new WeakMap;function eC(e){return function(e,t){if(iC("CSSGroupingRule")&&Nm(e.parentRule,CSSGroupingRule)||iC("CSSMediaRule")&&Nm(e.parentRule,CSSMediaRule)||iC("CSSSupportsRule")&&Nm(e.parentRule,CSSSupportsRule)||iC("CSSConditionRule")&&Nm(e.parentRule,CSSConditionRule)){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){var r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function tC(e,t,n){var r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function nC(e,t){var n,r,i,o=e.mirror,a=e.stylesheetManager,s=null;s="#document"===t.nodeName?o.getId(t):o.getId(cS.host(t));var l="#document"===t.nodeName?null==(n=t.defaultView)?void 0:n.Document:null==(i=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:i.ShadowRoot,c=(null==l?void 0:l.prototype)?Object.getOwnPropertyDescriptor(null==l?void 0:l.prototype,"adoptedStyleSheets"):void 0;return null!==s&&-1!==s&&l&&c?(Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:function(){var e;return null==(e=c.get)?void 0:e.call(this)},set:function(e){var t,n=null==(t=c.set)?void 0:t.call(this,e);if(null!==s&&-1!==s)try{a.adoptStyleSheets(e,s)}catch(rh){}return n}}),HS(function(){Object.defineProperty(t,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})})):function(){}}function rC(e,t){void 0===t&&(t={});var n,r=e.doc.defaultView;if(!r)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,i=e.mouseInteractionCb,o=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,l=e.mediaInteractionCb,c=e.styleSheetRuleCb,u=e.styleDeclarationCb,d=e.canvasMutationCb,p=e.fontCb,f=e.selectionCb,h=e.customElementCb;e.mutationCb=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];var o;t.mutation&&(o=t).mutation.apply(o,[].concat(r)),n.apply(void 0,[].concat(r))},e.mousemoveCb=function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var o;t.mousemove&&(o=t).mousemove.apply(o,[].concat(n)),r.apply(void 0,[].concat(n))},e.mouseInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var o;t.mouseInteraction&&(o=t).mouseInteraction.apply(o,[].concat(n)),i.apply(void 0,[].concat(n))},e.scrollCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.scroll&&(i=t).scroll.apply(i,[].concat(n)),o.apply(void 0,[].concat(n))},e.viewportResizeCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.viewportResize&&(i=t).viewportResize.apply(i,[].concat(n)),a.apply(void 0,[].concat(n))},e.inputCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.input&&(i=t).input.apply(i,[].concat(n)),s.apply(void 0,[].concat(n))},e.mediaInteractionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.mediaInteaction&&(i=t).mediaInteaction.apply(i,[].concat(n)),l.apply(void 0,[].concat(n))},e.styleSheetRuleCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleSheetRule&&(i=t).styleSheetRule.apply(i,[].concat(n)),c.apply(void 0,[].concat(n))},e.styleDeclarationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.styleDeclaration&&(i=t).styleDeclaration.apply(i,[].concat(n)),u.apply(void 0,[].concat(n))},e.canvasMutationCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.canvasMutation&&(i=t).canvasMutation.apply(i,[].concat(n)),d.apply(void 0,[].concat(n))},e.fontCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.font&&(i=t).font.apply(i,[].concat(n)),p.apply(void 0,[].concat(n))},e.selectionCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.selection&&(i=t).selection.apply(i,[].concat(n)),f.apply(void 0,[].concat(n))},e.customElementCb=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i;t.customElement&&(i=t).customElement.apply(i,[].concat(n)),h.apply(void 0,[].concat(n))}}(e,t),e.recordDOM&&(n=GS(e,e.doc));var i,o,a,s,l,c=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,i=e.mirror;if(!1===n.mousemove)return function(){};var o,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,l=[],c=pS(HS(function(e){var n=Date.now()-o;t(l.map(function(e){return e.timeOffset-=n,e}),e),l=[],o=null}),s),u=HS(pS(HS(function(e){var t=ZS(e),n=kS(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;o||(o=hS()),l.push({x:r,y:a,id:i.getId(t),timeOffset:hS()-o}),c("undefined"!=typeof DragEvent&&Nm(e,DragEvent)?RS.Drag:Nm(e,MouseEvent)?RS.MouseMove:RS.TouchMove)}),a,{trailing:!1})),d=[uS("mousemove",u,r),uS("touchmove",u,r),uS("drag",u,r)];return HS(function(){d.forEach(function(e){return e()})})}(e),u=JS(e),d=YS(e),p=(i={win:r},o=e.viewportResizeCb,a=i.win,s=-1,l=-1,uS("resize",HS(pS(HS(function(){var e=gS(),t=vS();s===e&&l===t||(o({width:Number(t),height:Number(e)}),s=e,l=t)}),200)),a)),f=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,i=e.blockClass,o=e.blockSelector,a=e.ignoreClass,s=e.ignoreSelector,l=e.maskInputOptions,c=e.maskInputFn,u=e.sampling,d=e.userTriggeredOnInput;function p(e){var t=ZS(e),r=e.isTrusted,u=t&&t.tagName;if(t&&"OPTION"===u&&(t=cS.parentElement(t)),t&&u&&!(XS.indexOf(u)<0)&&!bS(t,i,o,!0)&&!(t.classList.contains(a)||s&&t.matches(s))){var p=t.value,h=!1,m=sg(t)||"";"radio"===m||"checkbox"===m?h=t.checked:(l[u.toLowerCase()]||l[m])&&(p=ig({element:t,maskInputOptions:l,tagName:u,type:m,value:p,maskInputFn:c})),f(t,d?{text:p,isChecked:h,userTriggered:r}:{text:p,isChecked:h});var g=t.name;"radio"===m&&g&&h&&n.querySelectorAll('input[type="radio"][name="'+g+'"]').forEach(function(e){if(e!==t){var n=e.value;f(e,d?{text:n,isChecked:!h,userTriggered:!1}:{text:n,isChecked:!h})}})}}function f(e,n){var i=QS.get(e);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){QS.set(e,n);var o=r.getId(e);HS(t)(Cm({},n,{id:o}))}}var h=("last"===u.input?["change"]:["input","change"]).map(function(e){return uS(e,HS(p),n)}),m=n.defaultView;if(!m)return function(){h.forEach(function(e){return e()})};var g,v=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),y=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&(g=h).push.apply(g,[].concat(y.map(function(e){return fS(e[0],e[1],{set:function(){HS(p)({target:this,isTrusted:!1})}},!1,m)}))),HS(function(){h.forEach(function(e){return e()})})}(e),h=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.blockSelector,i=e.mirror,o=e.sampling,a=e.doc,s=HS(function(e){return pS(HS(function(o){var a=ZS(o);if(a&&!bS(a,n,r,!0)){var s=a.currentTime,l=a.volume,c=a.muted,u=a.playbackRate,d=a.loop;t({type:e,id:i.getId(a),currentTime:s,volume:l,muted:c,playbackRate:u,loop:d})}}),o.media||500)}),l=[uS("play",s(MS.Play),a),uS("pause",s(MS.Pause),a),uS("seeked",s(MS.Seeked),a),uS("volumechange",s(MS.VolumeChange),a),uS("ratechange",s(MS.RateChange),a)];return HS(function(){l.forEach(function(e){return e()})})}(e),m=function(){},g=function(){},v=function(){},y=function(){};e.recordDOM&&(m=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,i=e.stylesheetManager,o=t.win;if(!o.CSSStyleSheet||!o.CSSStyleSheet.prototype)return function(){};var a=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:HS(function(e,t,o){var a=o[0],s=o[1],l=tC(t,r,i.styleMirror),c=l.id,u=l.styleId;return(c&&-1!==c||u&&-1!==u)&&n({id:c,styleId:u,adds:[{rule:a,index:s}]}),e.apply(t,o)})}),o.CSSStyleSheet.prototype.addRule=function(e,t,n){void 0===n&&(n=this.cssRules.length);var r=e+" { "+t+" }";return o.CSSStyleSheet.prototype.insertRule.apply(this,[r,n])};var s,l,c=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:HS(function(e,t,o){var a=o[0],s=tC(t,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,removes:[{index:a}]}),e.apply(t,o)})}),o.CSSStyleSheet.prototype.removeRule=function(e){return o.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},o.CSSStyleSheet.prototype.replace&&(s=o.CSSStyleSheet.prototype.replace,o.CSSStyleSheet.prototype.replace=new Proxy(s,{apply:HS(function(e,t,o){var a=o[0],s=tC(t,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,replace:a}),e.apply(t,o)})})),o.CSSStyleSheet.prototype.replaceSync&&(l=o.CSSStyleSheet.prototype.replaceSync,o.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:HS(function(e,t,o){var a=o[0],s=tC(t,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,replaceSync:a}),e.apply(t,o)})}));var u={};oC("CSSGroupingRule")?u.CSSGroupingRule=o.CSSGroupingRule:(oC("CSSMediaRule")&&(u.CSSMediaRule=o.CSSMediaRule),oC("CSSConditionRule")&&(u.CSSConditionRule=o.CSSConditionRule),oC("CSSSupportsRule")&&(u.CSSSupportsRule=o.CSSSupportsRule));var d={};return Object.entries(u).forEach(function(e){var t=e[0],o=e[1];d[t]={insertRule:o.prototype.insertRule,deleteRule:o.prototype.deleteRule},o.prototype.insertRule=new Proxy(d[t].insertRule,{apply:HS(function(e,t,o){var a=o[0],s=o[1],l=tC(t.parentStyleSheet,r,i.styleMirror),c=l.id,u=l.styleId;return(c&&-1!==c||u&&-1!==u)&&n({id:c,styleId:u,adds:[{rule:a,index:[].concat(eC(t),[s||0])}]}),e.apply(t,o)})}),o.prototype.deleteRule=new Proxy(d[t].deleteRule,{apply:HS(function(e,t,o){var a=o[0],s=tC(t.parentStyleSheet,r,i.styleMirror),l=s.id,c=s.styleId;return(l&&-1!==l||c&&-1!==c)&&n({id:l,styleId:c,removes:[{index:[].concat(eC(t),[a])}]}),e.apply(t,o)})})}),HS(function(){o.CSSStyleSheet.prototype.insertRule=a,o.CSSStyleSheet.prototype.deleteRule=c,s&&(o.CSSStyleSheet.prototype.replace=s),l&&(o.CSSStyleSheet.prototype.replaceSync=l),Object.entries(u).forEach(function(e){var t=e[0],n=e[1];n.prototype.insertRule=d[t].insertRule,n.prototype.deleteRule=d[t].deleteRule})})}(e,{win:r}),g=nC(e,e.doc),v=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,i=e.ignoreCSSAttributes,o=e.stylesheetManager,a=t.win,s=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:HS(function(e,t,a){var l,c=a[0],u=a[1],d=a[2];if(i.has(c))return s.apply(t,[c,u,d]);var p=tC(null==(l=t.parentRule)?void 0:l.parentStyleSheet,r,o.styleMirror),f=p.id,h=p.styleId;return(f&&-1!==f||h&&-1!==h)&&n({id:f,styleId:h,set:{property:c,value:u,priority:d},index:eC(t.parentRule)}),e.apply(t,a)})});var l=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(l,{apply:HS(function(e,t,a){var s,c=a[0];if(i.has(c))return l.apply(t,[c]);var u=tC(null==(s=t.parentRule)?void 0:s.parentStyleSheet,r,o.styleMirror),d=u.id,p=u.styleId;return(d&&-1!==d||p&&-1!==p)&&n({id:d,styleId:p,remove:{property:c},index:eC(t.parentRule)}),e.apply(t,a)})}),HS(function(){a.CSSStyleDeclaration.prototype.setProperty=s,a.CSSStyleDeclaration.prototype.removeProperty=l})}(e,{win:r}),e.collectFonts&&(y=function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var i=[],o=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return o.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=lS(n.fonts,"add",function(e){return function(n){return setTimeout(HS(function(){var e=o.get(n);e&&(t(e),o.delete(n))}),0),e.apply(this,[n])}});return i.push(function(){r.FontFace=a}),i.push(s),HS(function(){i.forEach(function(e){return e()})})}(e)));for(var b,x=function(e){var t=e.doc,n=e.mirror,r=e.blockClass,i=e.blockSelector,o=e.selectionCb,a=!0,s=HS(function(){var e=t.getSelection();if(!(!e||a&&(null==e?void 0:e.isCollapsed))){a=e.isCollapsed||!1;for(var s=[],l=e.rangeCount||0,c=0;c<l;c++){var u=e.getRangeAt(c),d=u.startContainer,p=u.startOffset,f=u.endContainer,h=u.endOffset;bS(d,r,i,!0)||bS(f,r,i,!0)||s.push({start:n.getId(d),startOffset:p,end:n.getId(f),endOffset:h})}o({ranges:s})}});return s(),uS("selectionchange",s)}(e),w=function(e){var t=e.doc,n=e.customElementCb,r=t.defaultView;return r&&r.customElements?lS(r.customElements,"define",function(e){return function(t,r,i){try{n({define:{name:t}})}catch(rh){}return e.apply(this,[t,r,i])}}):function(){}}(e),k=[],_=Pm(e.plugins);!(b=_()).done;){var S=b.value;k.push(S.observer(S.callback,r,S.options))}return HS(function(){KS.forEach(function(e){return e.reset()}),null==n||n.disconnect(),c(),u(),d(),p(),f(),h(),m(),g(),v(),y(),x(),w(),k.forEach(function(e){return e()})})}function iC(e){return void 0!==window[e]}function oC(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}for(var aC=function(){function e(e){zm(this,"iframeIdToRemoteIdMap",new WeakMap),zm(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}var t=e.prototype;return t.getId=function(e,t,n,r){var i=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e),a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),o.set(a,t)),a},t.getIds=function(e,t){var n=this,r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getId(e,t,r,i)})},t.getRemoteId=function(e,t,n){var r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;var i=r.get(t);return i||-1},t.getRemoteIds=function(e,t){var n=this,r=this.getRemoteIdToIdMap(e);return t.map(function(t){return n.getRemoteId(e,t,r)})},t.reset=function(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)},t.getIdToRemoteIdMap=function(e){var t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t},t.getRemoteIdToIdMap=function(e){var t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t},e}(),sC=function(){function e(e){zm(this,"iframes",new WeakMap),zm(this,"crossOriginIframeMap",new WeakMap),zm(this,"crossOriginIframeMirror",new aC(xg)),zm(this,"crossOriginIframeStyleMirror"),zm(this,"crossOriginIframeRootIdMap",new WeakMap),zm(this,"mirror"),zm(this,"mutationCb"),zm(this,"wrappedEmit"),zm(this,"loadListener"),zm(this,"stylesheetManager"),zm(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new aC(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}var t=e.prototype;return t.addIframe=function(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)},t.addLoadListener=function(e){this.loadListener=e},t.attachIframe=function(e,t){var n,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(n=e.contentWindow)||n.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))},t.handleMessage=function(e){var t=e;if("rrweb"===t.data.type&&t.origin===t.data.origin&&e.source){var n=this.crossOriginIframeMap.get(e.source);if(n){var r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}}},t.transformCrossOriginEvent=function(e,t){var n,r=this;switch(t.type){case TS.FullSnapshot:this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);var i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:TS.IncrementalSnapshot,data:{source:RS.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case TS.Meta:case TS.Load:case TS.DomContentLoaded:return!1;case TS.Plugin:return t;case TS.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case TS.IncrementalSnapshot:switch(t.data.source){case RS.Mutation:return t.data.adds.forEach(function(t){r.replaceIds(t,e,["parentId","nextId","previousId"]),r.replaceIdOnNode(t.node,e);var n=r.crossOriginIframeRootIdMap.get(e);n&&r.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(function(t){r.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(function(t){r.replaceIds(t,e,["id"])}),t.data.texts.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case RS.Drag:case RS.TouchMove:case RS.MouseMove:return t.data.positions.forEach(function(t){r.replaceIds(t,e,["id"])}),t;case RS.ViewportResize:return!1;case RS.MediaInteraction:case RS.MouseInteraction:case RS.Scroll:case RS.CanvasMutation:case RS.Input:return this.replaceIds(t.data,e,["id"]),t;case RS.StyleSheetRule:case RS.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case RS.Font:return t;case RS.Selection:return t.data.ranges.forEach(function(t){r.replaceIds(t,e,["start","end"])}),t;case RS.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(n=t.data.styles)||n.forEach(function(t){r.replaceStyleIds(t,e,["styleId"])}),t}}return!1},t.replace=function(e,t,n,r){for(var i,o=Pm(r);!(i=o()).done;){var a=i.value;(Array.isArray(t[a])||"number"==typeof t[a])&&(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]))}return t},t.replaceIds=function(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)},t.replaceStyleIds=function(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)},t.replaceIdOnNode=function(e,t){var n=this;this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(function(e){n.replaceIdOnNode(e,t)})},t.patchRootIdOnNode=function(e,t){var n=this;e.type===LS.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(function(e){n.patchRootIdOnNode(e,t)})},e}(),lC=function(){function e(e){zm(this,"shadowDoms",new WeakSet),zm(this,"mutationCb"),zm(this,"scrollCb"),zm(this,"bypassOptions"),zm(this,"mirror"),zm(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}var t=e.prototype;return t.init=function(){this.reset(),this.patchAttachShadow(Element,document)},t.addShadowRoot=function(e,t){var n=this;if(eg(e)&&!this.shadowDoms.has(e)){this.shadowDoms.add(e);var r=GS(Cm({},this.bypassOptions,{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(function(){return r.disconnect()}),this.restoreHandlers.push(YS(Cm({},this.bypassOptions,{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(function(){e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&n.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,n.mirror.getId(cS.host(e))),n.restoreHandlers.push(nC({mirror:n.mirror,stylesheetManager:n.bypassOptions.stylesheetManager},e))},0)}},t.observeAttachShadow=function(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)},t.patchAttachShadow=function(e,t){var n=this;this.restoreHandlers.push(lS(e.prototype,"attachShadow",function(e){return function(r){var i=e.call(this,r),o=cS.shadowRoot(this);return o&&OS(this)&&n.addShadowRoot(o,t),i}}))},t.reset=function(){this.restoreHandlers.forEach(function(e){try{e()}catch(rh){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet},e}(),cC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uC="undefined"==typeof Uint8Array?[]:new Uint8Array(256),dC=0;dC<64;dC++)uC[cC.charCodeAt(dC)]=dC;var pC=new Map;var fC=function(e,t,n){if(e&&(gC(e,t)||"object"===(void 0===e?"undefined":Rm(e)))){var r=function(e,t){var n=pC.get(e);return n||(n=new Map,pC.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),i=r.indexOf(e);return-1===i&&(i=r.length,r.push(e)),i}};function hC(e,t,n){if(Nm(e,Array))return e.map(function(e){return hC(e,t,n)});if(null===e)return e;if(Nm(e,Float32Array)||Nm(e,Float64Array)||Nm(e,Int32Array)||Nm(e,Uint32Array)||Nm(e,Uint8Array)||Nm(e,Uint16Array)||Nm(e,Int16Array)||Nm(e,Int8Array)||Nm(e,Uint8ClampedArray))return{rr_type:e.constructor.name,args:[Object.values(e)]};if(Nm(e,ArrayBuffer))return{rr_type:e.constructor.name,base64:function(e){var t,n=new Uint8Array(e),r=n.length,i="";for(t=0;t<r;t+=3)i+=cC[n[t]>>2],i+=cC[(3&n[t])<<4|n[t+1]>>4],i+=cC[(15&n[t+1])<<2|n[t+2]>>6],i+=cC[63&n[t+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(e)};if(Nm(e,DataView))return{rr_type:e.constructor.name,args:[hC(e.buffer,t,n),e.byteOffset,e.byteLength]};if(Nm(e,HTMLImageElement))return{rr_type:e.constructor.name,src:e.src};if(Nm(e,HTMLCanvasElement)){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}return Nm(e,ImageData)?{rr_type:e.constructor.name,args:[hC(e.data,t,n),e.width,e.height]}:gC(e,t)||"object"===(void 0===e?"undefined":Rm(e))?{rr_type:e.constructor.name,index:fC(e,t,n)}:e}var mC=function(e,t,n){return e.map(function(e){return hC(e,t,n)})},gC=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(function(e){return"function"==typeof t[e]});return Boolean(n.find(function(n){return Nm(e,t[n])}))};function vC(e,t,n,r){var i=[];try{var o=lS(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i){for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s<o;s++)a[s-1]=arguments[s];if(!bS(this,t,n,!0)){var l=function(e){return"experimental-webgl"===e?"webgl":e}(i);if("__context"in this||(this.__context=l),r&&["webgl","webgl2"].includes(l))if(a[0]&&"object"===Rm(a[0])){var c=a[0];c.preserveDrawingBuffer||(c.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[].concat([i],a))}});i.push(o)}catch(rh){}return function(){i.forEach(function(e){return e()})}}function yC(e,t,n,r,i,o){for(var a,s=function(){var s=a.value;if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(s))return"continue";try{if("function"!=typeof e[s])return"continue";var c=lS(e,s,function(e){return function(){for(var a=arguments.length,l=new Array(a),c=0;c<a;c++)l[c]=arguments[c];var u=e.apply(this,l);if(fC(u,o,this),"tagName"in this.canvas&&!bS(this.canvas,r,i,!0)){var d=mC(l,o,this),p={type:t,property:s,args:d};n(this.canvas,p)}return u}});l.push(c)}catch(rh){var u=fS(e,s,{set:function(e){n(this.canvas,{type:t,property:s,args:[e],setter:!0})}});l.push(u)}},l=[],c=Pm(Object.getOwnPropertyNames(e));!(a=c()).done;)s();return l}var bC,xC="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",wC="undefined"!=typeof window&&window.Blob&&new Blob([(bC=xC,Uint8Array.from(atob(bC),function(e){return e.charCodeAt(0)}))],{type:"text/javascript;charset=utf-8"});function kC(e){var t;try{if(!(t=wC&&(window.URL||window.webkitURL).createObjectURL(wC)))throw"";var n=new Worker(t,{name:null==e?void 0:e.name});return n.addEventListener("error",function(){(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch(rh){return new Worker("data:text/javascript;base64,"+xC,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}var _C,SC,CC,EC=function(){function e(e){var t=this;zm(this,"pendingCanvasMutations",new Map),zm(this,"rafStamps",{latestId:0,invokeId:null}),zm(this,"mirror"),zm(this,"mutationCb"),zm(this,"resetObservers"),zm(this,"frozen",!1),zm(this,"locked",!1),zm(this,"processMutation",function(e,n){!(t.rafStamps.invokeId&&t.rafStamps.latestId!==t.rafStamps.invokeId)&&t.rafStamps.invokeId||(t.rafStamps.invokeId=t.rafStamps.latestId),t.pendingCanvasMutations.has(e)||t.pendingCanvasMutations.set(e,[]),t.pendingCanvasMutations.get(e).push(n)});var n=e.sampling,r=void 0===n?"all":n,i=e.win,o=e.blockClass,a=e.blockSelector,s=e.recordCanvas,l=e.dataURLOptions;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===r&&this.initCanvasMutationObserver(i,o,a),s&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,o,a,{dataURLOptions:l})}var t=e.prototype;return t.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},t.freeze=function(){this.frozen=!0},t.unfreeze=function(){this.frozen=!1},t.lock=function(){this.locked=!0},t.unlock=function(){this.locked=!1},t.initCanvasFPSObserver=function(e,t,n,r,i){var o=this,a=vC(t,n,r,!0),s=new Map,l=new kC;l.onmessage=function(e){var t=e.data.id;if(s.set(t,!1),"base64"in e.data){var n=e.data,r=n.base64,i=n.type,a=n.width,l=n.height;o.mutationCb({id:t,type:PS["2D"],commands:[{property:"clearRect",args:[0,0,a,l]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:i}]},0,0]}]})}};var c,u=1e3/e,d=0,p=function(e){if(d&&e-d<u)c=requestAnimationFrame(p);else{d=e;var a,f=o;(a=[],t.document.querySelectorAll("canvas").forEach(function(e){bS(e,n,r,!0)||a.push(e)}),a).forEach(km(function(e){var t,n,r,o;return Mm(this,function(a){switch(a.label){case 0:return n=f.mirror.getId(e),s.get(n)?[2]:0===e.width||0===e.height?[2]:(s.set(n,!0),["webgl","webgl2"].includes(e.__context)&&(r=e.getContext(e.__context),!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)),[4,createImageBitmap(e)]);case 1:return o=a.sent(),l.postMessage({id:n,bitmap:o,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[o]),[2]}})})),c=requestAnimationFrame(p)}};c=requestAnimationFrame(p),this.resetObservers=function(){a(),cancelAnimationFrame(c)}},t.initCanvasMutationObserver=function(e,t,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var r=vC(e,t,n,!1),i=function(e,t,n,r){for(var i,o=function(){var o=i.value;try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])return"continue";var s=lS(t.CanvasRenderingContext2D.prototype,o,function(i){return function(){for(var a=this,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return bS(this.canvas,n,r,!0)||setTimeout(function(){var n=mC(l,t,a);e(a.canvas,{type:PS["2D"],property:o,args:n})},0),i.apply(this,l)}});a.push(s)}catch(rh){var l=fS(t.CanvasRenderingContext2D.prototype,o,{set:function(t){e(this.canvas,{type:PS["2D"],property:o,args:[t],setter:!0})}});a.push(l)}},a=[],s=Pm(Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype));!(i=s()).done;)o();return function(){a.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n),o=function(e,t,n,r){var i,o,a=[];return(i=a).push.apply(i,[].concat(yC(t.WebGLRenderingContext.prototype,PS.WebGL,e,n,r,t))),void 0!==t.WebGL2RenderingContext&&(o=a).push.apply(o,[].concat(yC(t.WebGL2RenderingContext.prototype,PS.WebGL2,e,n,r,t))),function(){a.forEach(function(e){return e()})}}(this.processMutation.bind(this),e,t,n);this.resetObservers=function(){r(),i(),o()}},t.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},t.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach(function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(function(){return e.flushPendingCanvasMutations()})},t.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map(function(e){return e.type,Om(e,["type"])}),i=n[0].type;this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}(),IC=function(){function e(e){zm(this,"trackedLinkElements",new WeakSet),zm(this,"mutationCb"),zm(this,"adoptedStyleSheetCb"),zm(this,"styleMirror",new ES),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}var t=e.prototype;return t.attachLinkElement=function(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)},t.trackLinkElement=function(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))},t.adoptStyleSheets=function(e,t){var n,r=function(){var e=i.value,t=void 0;n.styleMirror.has(e)?t=n.styleMirror.getId(e):(t=n.styleMirror.add(e),a.push({styleId:t,rules:Array.from(e.rules||CSSRule,function(t,n){return{rule:ng(t,e.href),index:n}})})),o.styleIds.push(t)};if(0!==e.length){for(var i,o={id:t,styleIds:[]},a=[],s=Pm(e);!(i=s()).done;)n=this,r();a.length>0&&(o.styles=a),this.adoptedStyleSheetCb(o)}},t.reset=function(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet},t.trackStylesheetInLinkElement=function(e){},e}(),NC=function(){function e(){zm(this,"nodeMap",new WeakMap),zm(this,"active",!1)}var t=e.prototype;return t.inOtherBuffer=function(e,t){var n=this.nodeMap.get(e);return n&&Array.from(n).some(function(e){return e!==t})},t.add=function(e,t){var n=this;this.active||(this.active=!0,requestAnimationFrame(function(){n.nodeMap=new WeakMap,n.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))},t.destroy=function(){},e}(),OC=!1;try{if(2!==Array.from([1],function(e){return 2*e})[0]){var TC=document.createElement("iframe");document.body.appendChild(TC),Array.from=(null==(Dm=TC.contentWindow)?void 0:Dm.Array.from)||Array.from,document.body.removeChild(TC)}}catch(vF){}var RC,jC,AC=new rg;function PC(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,i=e.blockClass,o=void 0===i?"rr-block":i,a=e.blockSelector,s=void 0===a?null:a,l=e.ignoreClass,c=void 0===l?"rr-ignore":l,u=e.ignoreSelector,d=void 0===u?null:u,p=e.maskTextClass,f=void 0===p?"rr-mask":p,h=e.maskTextSelector,m=void 0===h?null:h,g=e.inlineStylesheet,v=void 0===g||g,y=e.maskAllInputs,b=e.maskInputOptions,x=e.slimDOMOptions,w=e.maskInputFn,k=e.maskTextFn,_=e.hooks,S=e.packFn,C=e.sampling,E=void 0===C?{}:C,I=e.dataURLOptions,N=void 0===I?{}:I,O=e.mousemoveWait,T=e.recordDOM,R=void 0===T||T,j=e.recordCanvas,A=void 0!==j&&j,P=e.recordCrossOriginIframes,M=void 0!==P&&P,L=e.recordAfter,D=void 0===L?"DOMContentLoaded"===e.recordAfter?e.recordAfter:"load":L,F=e.userTriggeredOnInput,z=void 0!==F&&F,U=e.collectFonts,B=void 0!==U&&U,$=e.inlineImages,V=void 0!==$&&$,W=e.plugins,q=e.keepIframeSrcFn,H=void 0===q?function(){return!1}:q,K=e.ignoreCSSAttributes,Z=void 0===K?new Set([]):K,G=e.errorHandler;FS=G;var J=!M||window.parent===window,Y=!1;if(!J)try{window.parent.document&&(Y=!1)}catch(rh){Y=!0}if(J&&!t)throw new Error("emit function is required");if(!J&&!Y)return function(){};void 0!==O&&void 0===E.mousemove&&(E.mousemove=O),AC.reset();var X,Q,ee=!0===y?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:void 0!==b?b:{password:!0},te=!0===x||"all"===x?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===x,headMetaDescKeywords:"all"===x,headTitleMutations:"all"===x}:x||{};void 0===X&&(X=window),"NodeList"in X&&!X.NodeList.prototype.forEach&&(X.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in X&&!X.DOMTokenList.prototype.forEach&&(X.DOMTokenList.prototype.forEach=Array.prototype.forEach);var ne=0,re=function(e){for(var t,n=Pm(W||[]);!(t=n()).done;){var r=t.value;r.eventProcessor&&(e=r.eventProcessor(e))}return S&&!Y&&(e=S(e)),e};_C=function(e,i){var o,a=e;if(a.timestamp=hS(),!(null==(o=KS[0])?void 0:o.isFrozen())||a.type===TS.FullSnapshot||a.type===TS.IncrementalSnapshot&&a.data.source===RS.Mutation||KS.forEach(function(e){return e.unfreeze()}),J)null==t||t(re(a),i);else if(Y){var s={type:"rrweb",event:re(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(s,"*")}if(a.type===TS.FullSnapshot)Q=a,ne=0;else if(a.type===TS.IncrementalSnapshot){if(a.data.source===RS.Mutation&&a.data.isAttachIframe)return;ne++;var l=r&&ne>=r,c=n&&a.timestamp-Q.timestamp>n;(l||c)&&SC(!0)}};for(var ie,oe=function(e){_C({type:TS.IncrementalSnapshot,data:Cm({source:RS.Mutation},e)})},ae=function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.Scroll},e)})},se=function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.CanvasMutation},e)})},le=new IC({mutationCb:oe,adoptedStyleSheetCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.AdoptedStyleSheet},e)})}}),ce=new sC({mirror:AC,mutationCb:oe,stylesheetManager:le,recordCrossOriginIframes:M,wrappedEmit:_C}),ue=Pm(W||[]);!(ie=ue()).done;){var de=ie.value;de.getMirror&&de.getMirror({nodeMirror:AC,crossOriginIframeMirror:ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:ce.crossOriginIframeStyleMirror})}var pe=new NC;CC=new EC({recordCanvas:A,mutationCb:se,win:window,blockClass:o,blockSelector:s,mirror:AC,sampling:E.canvas,dataURLOptions:N});var fe=new lC({mutationCb:oe,scrollCb:ae,bypassOptions:{blockClass:o,blockSelector:s,maskTextClass:f,maskTextSelector:m,inlineStylesheet:v,maskInputOptions:ee,dataURLOptions:N,maskTextFn:k,maskInputFn:w,recordCanvas:A,inlineImages:V,sampling:E,slimDOMOptions:te,iframeManager:ce,stylesheetManager:le,canvasManager:CC,keepIframeSrcFn:H,processedNodeManager:pe},mirror:AC});SC=function(e){if(void 0===e&&(e=!1),R){_C({type:TS.Meta,data:{href:window.location.href,width:vS(),height:gS()}},e),le.reset(),fe.init(),KS.forEach(function(e){return e.lock()});var t=function(e,t){var n=t||{},r=n.mirror,i=void 0===r?new rg:r,o=n.blockClass,a=void 0===o?"rr-block":o,s=n.blockSelector,l=void 0===s?null:s,c=n.maskTextClass,u=void 0===c?"rr-mask":c,d=n.maskTextSelector,p=void 0===d?null:d,f=n.inlineStylesheet,h=void 0===f||f,m=n.inlineImages,g=void 0!==m&&m,v=n.recordCanvas,y=void 0!==v&&v,b=n.maskAllInputs,x=void 0!==b&&b,w=n.maskTextFn,k=n.maskInputFn,_=n.slimDOM,S=void 0!==_&&_,C=n.dataURLOptions,E=n.preserveWhiteSpace,I=n.onSerialize,N=n.onIframeLoad,O=n.iframeLoadTimeout,T=n.onStylesheetLoad,R=n.stylesheetLoadTimeout,j=n.keepIframeSrcFn;return Ag(e,{doc:e,mirror:i,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:p,skipChild:!1,inlineStylesheet:h,maskInputOptions:!0===x?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0,hidden:!0}:!1===x?{password:!0}:x,maskTextFn:w,maskInputFn:k,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,dataURLOptions:C,inlineImages:g,recordCanvas:y,preserveWhiteSpace:E,onSerialize:I,onIframeLoad:N,iframeLoadTimeout:O,onStylesheetLoad:T,stylesheetLoadTimeout:R,keepIframeSrcFn:void 0===j?function(){return!1}:j,newlyAddedElement:!1})}(document,{mirror:AC,blockClass:o,blockSelector:s,maskTextClass:f,maskTextSelector:m,inlineStylesheet:v,maskAllInputs:ee,maskTextFn:k,maskInputFn:w,slimDOM:te,dataURLOptions:N,recordCanvas:A,inlineImages:V,onSerialize:function(e){_S(e,AC)&&ce.addIframe(e),SS(e,AC)&&le.trackLinkElement(e),CS(e)&&fe.addShadowRoot(cS.shadowRoot(e),document)},onIframeLoad:function(e,t){ce.attachIframe(e,t),fe.observeAttachShadow(e)},onStylesheetLoad:function(e,t){le.attachLinkElement(e,t)},keepIframeSrcFn:H});t&&(_C({type:TS.FullSnapshot,data:{node:t,initialOffset:mS(window)}},e),KS.forEach(function(e){return e.unlock()}),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&le.adoptStyleSheets(document.adoptedStyleSheets,AC.getId(document)))}};try{var he=[],me=function(e){var t;return HS(rC)({mutationCb:oe,mousemoveCb:function(e,t){return _C({type:TS.IncrementalSnapshot,data:{source:t,positions:e}})},mouseInteractionCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.MouseInteraction},e)})},scrollCb:ae,viewportResizeCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.ViewportResize},e)})},inputCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.Input},e)})},mediaInteractionCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.MediaInteraction},e)})},styleSheetRuleCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.StyleSheetRule},e)})},styleDeclarationCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.StyleDeclaration},e)})},canvasMutationCb:se,fontCb:function(e){return _C({type:TS.IncrementalSnapshot,data:Cm({source:RS.Font},e)})},selectionCb:function(e){_C({type:TS.IncrementalSnapshot,data:Cm({source:RS.Selection},e)})},customElementCb:function(e){_C({type:TS.IncrementalSnapshot,data:Cm({source:RS.CustomElement},e)})},blockClass:o,ignoreClass:c,ignoreSelector:d,maskTextClass:f,maskTextSelector:m,maskInputOptions:ee,inlineStylesheet:v,sampling:E,recordDOM:R,recordCanvas:A,inlineImages:V,userTriggeredOnInput:z,collectFonts:B,doc:e,maskInputFn:w,maskTextFn:k,keepIframeSrcFn:H,blockSelector:s,slimDOMOptions:te,dataURLOptions:N,mirror:AC,iframeManager:ce,stylesheetManager:le,shadowDomManager:fe,processedNodeManager:pe,canvasManager:CC,ignoreCSSAttributes:Z,plugins:(null==(t=null==W?void 0:W.filter(function(e){return e.observer}))?void 0:t.map(function(e){return{observer:e.observer,options:e.options,callback:function(t){return _C({type:TS.Plugin,data:{plugin:e.name,payload:t}})}}}))||[]},_)};ce.addLoadListener(function(e){try{he.push(me(e.contentDocument))}catch(vE){}});var ge=function(){SC(),he.push(me(document)),OC=!0};return"interactive"===document.readyState||"complete"===document.readyState?ge():(he.push(uS("DOMContentLoaded",function(){_C({type:TS.DomContentLoaded,data:{}}),"DOMContentLoaded"===D&&ge()})),he.push(uS("load",function(){_C({type:TS.Load,data:{}}),"load"===D&&ge()},window))),function(){he.forEach(function(e){try{e()}catch(vE){String(vE).toLowerCase().includes("cross-origin")}}),pe.destroy(),OC=!1,FS=void 0}}catch(vE){}}PC.addCustomEvent=function(e,t){if(!OC)throw new Error("please add custom event after start recording");_C({type:TS.Custom,data:{tag:e,payload:t}})},PC.freezePage=function(){KS.forEach(function(e){return e.freeze()})},PC.takeFullSnapshot=function(e){if(!OC)throw new Error("please take full snapshot after start recording");SC(e)},PC.mirror=AC,(jC=RC||(RC={}))[jC.NotStarted=0]="NotStarted",jC[jC.Running=1]="Running",jC[jC.Stopped=2]="Stopped",PC.addCustomEvent,PC.freezePage,PC.takeFullSnapshot;var MC=Object.defineProperty,LC=function(e,t,n){return function(e,t,n){return t in e?MC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==(void 0===t?"undefined":Rm(t))?t+"":t,n)};var DC=function(){function e(e){LC(this,"fileName"),LC(this,"functionName"),LC(this,"lineNumber"),LC(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}return e.prototype.toString=function(){var e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?this.functionName+" ("+this.fileName+":"+e+":"+t+")":this.fileName+":"+e+":"+t},e}(),FC=/(^|@)\S+:\d+/,zC=/^\s*at .*(\S+:\d+|\(native\))/m,UC=/^(eval@)?(\[native code])?$/,BC={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(zC)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):[]:[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error("Cannot parse given url: "+e);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(zC)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),i=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||void 0,a=["eval","<anonymous>"].indexOf(i[0])>-1?void 0:i[0];return new DC({functionName:o,fileName:a,lineNumber:i[1],columnNumber:i[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(UC)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new DC({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,i=this.extractLocation(e.replace(t,""));return new DC({functionName:r,fileName:i[0],lineNumber:i[1],columnNumber:i[2]})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],i=2,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new DC({fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],i=0,o=n.length;i<o;i+=2){var a=t.exec(n[i]);a&&r.push(new DC({functionName:a[3]||void 0,fileName:a[2],lineNumber:parseFloat(a[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(FC)&&!e.match(/^Error created at/)},this).map(function(e){var t=e.split("@"),n=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new DC({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})},this)}};function $C(e){if(!e||!e.outerHTML)return"";for(var t="";e.parentElement;){var n=e.localName;if(!n)break;n=n.toLowerCase();var r=e.parentElement,i=[];if(r.children&&r.children.length>0)for(var o=0;o<r.children.length;o++){var a=r.children[o];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===n&&i.push(a)}i.length>1&&(n+=":eq("+i.indexOf(e)+")"),t=n+(t?">"+t:""),e=r}return t}function VC(e){return"[object Object]"===Object.prototype.toString.call(e)}function WC(e,t){if(0===t)return!0;for(var n,r=Pm(Object.keys(e));!(n=r()).done;){var i=n.value;if(VC(e[i])&&WC(e[i],t-1))return!0}return!1}function qC(e,t){var n={numOfKeysLimit:50,depthOfLimit:4};Object.assign(n,t);var r=[],i=[];return JSON.stringify(e,function(e,t){if(r.length>0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?i.splice(o,1/0,e):i.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+i.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(VC(e)&&Object.keys(e).length>n.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(VC(e)&&WC(e,n.depthOfLimit))return!0;return!1}(t))return function(e){var t=e.toString();n.stringLengthLimit&&t.length>n.stringLengthLimit&&(t=t.slice(0,n.stringLengthLimit)+"...");return t}(t);if("bigint"===(void 0===t?"undefined":Rm(t)))return t.toString()+"n";if(Nm(t,Event)){var a={};for(var s in t){var l=t[s];Array.isArray(l)?a[s]=$C(l.length?l[0]:null):a[s]=l}return a}return Nm(t,Node)?Nm(t,HTMLElement)?t?t.outerHTML:"":t.nodeName:Nm(t,Error)?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}var HC={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function KC(e,t,n){var r,i=n?Object.assign({},HC,n):HC,o=i.logger;if(!o)return function(){};r="string"==typeof o?t[o]:o;var a=0,s=!1,l=[];if(i.level.includes("error")){var c=function(t){var n=t.message,r=t.error,o=BC.parse(r).map(function(e){return e.toString()}),a=[qC(n,i.stringifyOptions)];e({level:"error",trace:o,payload:a})};t.addEventListener("error",c),l.push(function(){t.removeEventListener("error",c)});var u=function(t){var n,r;Nm(t.reason,Error)?r=[qC("Uncaught (in promise) "+(n=t.reason).name+": "+n.message,i.stringifyOptions)]:(n=new Error,r=[qC("Uncaught (in promise)",i.stringifyOptions),qC(t.reason,i.stringifyOptions)]);var o=BC.parse(n).map(function(e){return e.toString()});e({level:"error",trace:o,payload:r})};t.addEventListener("unhandledrejection",u),l.push(function(){t.removeEventListener("unhandledrejection",u)})}for(var d,p=Pm(i.level);!(d=p()).done;){var f=d.value;l.push(h(r,f))}return function(){l.forEach(function(e){return e()})};function h(t,n){var r=this;return t[n]?function(e,t,n){try{if(!(t in e))return function(){};var r=e[t],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,function(){e[t]=r}}catch(rh){return function(){}}}(t,n,function(t){var o=r;return function(){for(var r=arguments.length,l=new Array(r),c=0;c<r;c++)l[c]=arguments[c];if(t.apply(o,l),!("assert"===n&&l[0]||s)){s=!0;try{var u=BC.parse(new Error).map(function(e){return e.toString()}).splice(1),d=("assert"===n?l.slice(1):l).map(function(e){return qC(e,i.stringifyOptions)});++a<i.lengthThreshold?e({level:n,trace:u,payload:d}):a===i.lengthThreshold&&e({level:"warn",trace:[],payload:[qC("The number of log records reached the threshold.")]})}catch(vE){t.apply(void 0,[].concat(["rrweb logger error:",vE],l))}finally{s=!1}}}}):function(){}}}var ZC,GC,JC,YC=vm.setImmediate,XC=Object.prototype.toString,QC=void 0!==YC?function(e){return YC(e)}:setTimeout;try{Object.defineProperty({},"x",{}),ZC=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(vF){ZC=function(e,t,n){return e[t]=n,e}}function eE(e,t){JC.add(e,t),GC||(GC=QC(JC.drain))}function tE(e){var t,n=typeof e;return null===e||"object"!==n&&"function"!==n||(t=e.then),"function"==typeof t&&t}function nE(){for(var e=0;e<this.chain.length;e++)rE(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function rE(e,t,n){var r,i;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(i=tE(r))?i.call(r,n.resolve,n.reject):n.resolve(r)}catch(vF){n.reject(vF)}}function iE(e){var t,n=this;if(!n.triggered){n.triggered=!0,n.def&&(n=n.def);try{(t=tE(e))?eE(function(){var r=new sE(n);try{t.call(e,function(){iE.apply(r,arguments)},function(){oE.apply(r,arguments)})}catch(vF){oE.call(r,vF)}}):(n.msg=e,n.state=1,n.chain.length>0&&eE(nE,n))}catch(vF){oE.call(new sE(n),vF)}}}function oE(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&eE(nE,t))}function aE(e,t,n,r){for(var i=0;i<t.length;i++)(function(i){e.resolve(t[i]).then(function(e){n(i,e)},r)})(i)}function sE(e){this.def=e,this.triggered=!1}function lE(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function cE(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var t=new lE(this);this.then=function(e,n){var r={success:"function"!=typeof e||e,failure:"function"==typeof n&&n};return r.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");r.resolve=e,r.reject=t}),t.chain.push(r),0!==t.state&&eE(nE,t),r.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){iE.call(t,e)},function(e){oE.call(t,e)})}catch(vF){oE.call(t,vF)}}JC=function(){var e,t,n;function r(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(i,o){n=new r(i,o),t?t.next=n:e=n,t=n,n=void 0},drain:function(){var n=e;for(e=t=GC=void 0;n;)n.fn.call(n.self),n=n.next}}}();var uE,dE=ZC({},"constructor",cE,!1);cE.prototype=dE,ZC(dE,"__NPO__",0,!1),ZC(cE,"resolve",function(e){return e&&"object"==typeof e&&1===e.__NPO__?e:new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");t(e)})}),ZC(cE,"reject",function(e){return new this(function(t,n){if("function"!=typeof t||"function"!=typeof n)throw TypeError("Not a function");n(e)})}),ZC(cE,"all",function(e){var t=this;return"[object Array]"!==XC.call(e)?t.reject(TypeError("Not an array")):0===e.length?t.resolve([]):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");var i=e.length,o=Array(i),a=0;aE(t,e,function(e,t){o[e]=t,++a===i&&n(o)},r)})}),ZC(cE,"race",function(e){var t=this;return"[object Array]"!==XC.call(e)?t.reject(TypeError("Not an array")):new t(function(n,r){if("function"!=typeof n||"function"!=typeof r)throw TypeError("Not a function");aE(t,e,function(e,t){n(t)},r)})}),uE="undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")?Promise:cE;var pE,fE,hE,mE,gE,vE,yE,bE,xE,wE,kE={DEBUG:!1,LIB_VERSION:"2.72.0"},_E=864e5,SE=8e3,CE=Array.prototype,EE=Function.prototype,IE=Object.prototype,NE=CE.slice,OE=IE.toString,TE=IE.hasOwnProperty,RE=vm.console,jE=vm.navigator,AE=vm.document,PE=vm.opera,ME=vm.screen,LE=jE.userAgent,DE=EE.bind,FE=CE.forEach,zE=CE.indexOf,UE=CE.map,BE=Array.isArray,$E={},VE={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},WE={log:function(){if(kE.DEBUG&&!VE.isUndefined(RE)&&RE)try{RE.log.apply(RE,arguments)}catch(vF){VE.each(arguments,function(e){RE.log(e)})}},warn:function(){if(kE.DEBUG&&!VE.isUndefined(RE)&&RE){var e=["Mixpanel warning:"].concat(VE.toArray(arguments));try{RE.warn.apply(RE,e)}catch(vF){VE.each(e,function(e){RE.warn(e)})}}},error:function(){if(kE.DEBUG&&!VE.isUndefined(RE)&&RE){var e=["Mixpanel error:"].concat(VE.toArray(arguments));try{RE.error.apply(RE,e)}catch(vF){VE.each(e,function(e){RE.error(e)})}}},critical:function(){if(!VE.isUndefined(RE)&&RE){var e=["Mixpanel error:"].concat(VE.toArray(arguments));try{RE.error.apply(RE,e)}catch(vF){VE.each(e,function(e){RE.error(e)})}}}},qE=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(WE,arguments)}},HE=function(e){return{log:qE(WE.log,e),error:qE(WE.error,e),critical:qE(WE.critical,e)}},KE=function(e){return function(){try{return e.apply(this,arguments)}catch(rh){WE.critical("Implementation error. Please turn on debug and contact support@mixpanel.com."),kE.DEBUG&&WE.critical(rh)}}},ZE=function(e){var t=e.prototype;for(var n in t)"function"==typeof t[n]&&(t[n]=KE(t[n]))};VE.bind=function(e,t){var n,r;if(DE&&e.bind===DE)return DE.apply(e,NE.call(arguments,1));if(!VE.isFunction(e))throw new TypeError;return n=NE.call(arguments,2),r=function(){if(!(this instanceof r))return e.apply(t,n.concat(NE.call(arguments)));var i={};i.prototype=e.prototype;var o=new i;i.prototype=null;var a=e.apply(o,n.concat(NE.call(arguments)));return Object(a)===a?a:o},r},VE.each=function(e,t,n){if(null!=e)if(FE&&e.forEach===FE)e.forEach(t,n);else if(e.length===+e.length){for(var r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===$E)return}else for(var o in e)if(TE.call(e,o)&&t.call(n,e[o],o,e)===$E)return},VE.extend=function(e){return VE.each(NE.call(arguments,1),function(t){for(var n in t)void 0!==t[n]&&(e[n]=t[n])}),e},VE.isArray=BE||function(e){return"[object Array]"===OE.call(e)},VE.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(t){return!1}},VE.isArguments=function(e){return!(!e||!TE.call(e,"callee"))},VE.toArray=function(e){return e?e.toArray?e.toArray():VE.isArray(e)||VE.isArguments(e)?NE.call(e):VE.values(e):[]},VE.map=function(e,t,n){if(UE&&e.map===UE)return e.map(t,n);var r=[];return VE.each(e,function(e){r.push(t.call(n,e))}),r},VE.keys=function(e){var t=[];return null===e||VE.each(e,function(e,n){t[t.length]=n}),t},VE.values=function(e){var t=[];return null===e||VE.each(e,function(e){t[t.length]=e}),t},VE.include=function(e,t){var n=!1;return null===e?n:zE&&e.indexOf===zE?-1!=e.indexOf(t):(VE.each(e,function(e){if(n||(n=e===t))return $E}),n)},VE.includes=function(e,t){return-1!==e.indexOf(t)},VE.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e},VE.isObject=function(e){return e===Object(e)&&!VE.isArray(e)},VE.isEmptyObject=function(e){if(VE.isObject(e)){for(var t in e)if(TE.call(e,t))return!1;return!0}return!1},VE.isUndefined=function(e){return void 0===e},VE.isString=function(e){return"[object String]"==OE.call(e)},VE.isDate=function(e){return"[object Date]"==OE.call(e)},VE.isNumber=function(e){return"[object Number]"==OE.call(e)},VE.isElement=function(e){return!(!e||1!==e.nodeType)},VE.encodeDates=function(e){return VE.each(e,function(t,n){VE.isDate(t)?e[n]=VE.formatDate(t):VE.isObject(t)&&(e[n]=VE.encodeDates(t))}),e},VE.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},VE.formatDate=function(e){function t(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())},VE.strip_empty_properties=function(e){var t={};return VE.each(e,function(e,n){VE.isString(e)&&e.length>0&&(t[n]=e)}),t},VE.truncate=function(e,t){var n;return"string"==typeof e?n=e.slice(0,t):VE.isArray(e)?(n=[],VE.each(e,function(e){n.push(VE.truncate(e,t))})):VE.isObject(e)?(n={},VE.each(e,function(e,r){n[r]=VE.truncate(e,t)})):n=e,n},VE.JSONEncode=function(){return function(e){var t=function(e){var t=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return t.lastIndex=0,t.test(e)?'"'+e.replace(t,function(e){var t=n[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'},n=function(e,r){var i="",o=0,a="",s="",l=0,c=i,u=[],d=r[e];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(e)),typeof d){case"string":return t(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+=" ",u=[],"[object Array]"===OE.apply(d)){for(l=d.length,o=0;o<l;o+=1)u[o]=n(o,d)||"null";return s=0===u.length?"[]":i?"[\n"+i+u.join(",\n"+i)+"\n"+c+"]":"["+u.join(",")+"]",i=c,s}for(a in d)TE.call(d,a)&&(s=n(a,d))&&u.push(t(a)+(i?": ":":")+s);return s=0===u.length?"{}":i?"{"+u.join(",")+c+"}":"{"+u.join(",")+"}",i=c,s}};return n("",{"":e})}}(),VE.JSONDecode=(gE={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},vE=function(e){var t=new SyntaxError(e);throw t.at=pE,t.text=hE,t},yE=function(e){return e&&e!==fE&&vE("Expected '"+e+"' instead of '"+fE+"'"),fE=hE.charAt(pE),pE+=1,fE},bE=function(){var e,t="";for("-"===fE&&(t="-",yE("-"));fE>="0"&&fE<="9";)t+=fE,yE();if("."===fE)for(t+=".";yE()&&fE>="0"&&fE<="9";)t+=fE;if("e"===fE||"E"===fE)for(t+=fE,yE(),"-"!==fE&&"+"!==fE||(t+=fE,yE());fE>="0"&&fE<="9";)t+=fE,yE();if(e=+t,isFinite(e))return e;vE("Bad number")},xE=function(){var e,t,n,r="";if('"'===fE)for(;yE();){if('"'===fE)return yE(),r;if("\\"===fE)if(yE(),"u"===fE){for(n=0,t=0;t<4&&(e=parseInt(yE(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof gE[fE])break;r+=gE[fE]}else r+=fE}vE("Bad string")},wE=function(){for(;fE&&fE<=" ";)yE()},mE=function(){switch(wE(),fE){case"{":return function(){var e,t={};if("{"===fE){if(yE("{"),wE(),"}"===fE)return yE("}"),t;for(;fE;){if(e=xE(),wE(),yE(":"),Object.hasOwnProperty.call(t,e)&&vE('Duplicate key "'+e+'"'),t[e]=mE(),wE(),"}"===fE)return yE("}"),t;yE(","),wE()}}vE("Bad object")}();case"[":return function(){var e=[];if("["===fE){if(yE("["),wE(),"]"===fE)return yE("]"),e;for(;fE;){if(e.push(mE()),wE(),"]"===fE)return yE("]"),e;yE(","),wE()}}vE("Bad array")}();case'"':return xE();case"-":return bE();default:return fE>="0"&&fE<="9"?bE():function(){switch(fE){case"t":return yE("t"),yE("r"),yE("u"),yE("e"),!0;case"f":return yE("f"),yE("a"),yE("l"),yE("s"),yE("e"),!1;case"n":return yE("n"),yE("u"),yE("l"),yE("l"),null}vE('Unexpected "'+fE+'"')}()}},function(e){var t;return hE=e,pE=0,fE=" ",t=mE(),wE(),fE&&vE("Syntax error"),t}),VE.base64Encode=function(e){var t,n,r,i,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,l=0,c="",u=[];if(!e)return e;e=VE.utf8Encode(e);do{t=(o=e.charCodeAt(s++)<<16|e.charCodeAt(s++)<<8|e.charCodeAt(s++))>>18&63,n=o>>12&63,r=o>>6&63,i=63&o,u[l++]=a.charAt(t)+a.charAt(n)+a.charAt(r)+a.charAt(i)}while(s<e.length);switch(c=u.join(""),e.length%3){case 1:c=c.slice(0,-2)+"==";break;case 2:c=c.slice(0,-1)+"="}return c},VE.utf8Encode=function(e){var t,n,r,i,o="";for(t=n=0,r=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,i=0;i<r;i++){var a=e.charCodeAt(i),s=null;a<128?n++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(n>t&&(o+=e.substring(t,n)),o+=s,t=n=i+1)}return n>t&&(o+=e.substring(t,e.length)),o},VE.UUID=function(){try{return vm.crypto.randomUUID()}catch(vF){for(var e=new Array(36),t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",VE.map(e,function(e){return e.toString(16)}).join("")}};var GE=["ahrefsbot","ahrefssiteaudit","amazonbot","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandex","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];VE.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<GE.length;t++)if(-1!==e.indexOf(GE[t]))return!0;return!1},VE.HTTPBuildQuery=function(e,t){var n,r,i=[];return VE.isUndefined(t)&&(t="&"),VE.each(e,function(e,t){n=encodeURIComponent(e.toString()),r=encodeURIComponent(t),i[i.length]=r+"="+n}),i.join(t)},VE.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var n=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var r=n[1];try{r=decodeURIComponent(r)}catch(vF){WE.error("Skipping decoding for malformed query param: "+r)}return r.replace(/\+/g," ")},VE.cookie={get:function(e){for(var t=e+"=",n=AE.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "==i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null},parse:function(e){var t;try{t=VE.JSONDecode(VE.cookie.get(e))||{}}catch(vF){}return t},set_seconds:function(e,t,n,r,i,o,a){var s="",l="",c="";if(a)s="; domain="+a;else if(r){var u=sI(AE.location.hostname);s=u?"; domain=."+u:""}if(n){var d=new Date;d.setTime(d.getTime()+1e3*n),l="; expires="+d.toGMTString()}o&&(i=!0,c="; SameSite=None"),i&&(c+="; secure"),AE.cookie=e+"="+encodeURIComponent(t)+l+"; path=/"+s+c},set:function(e,t,n,r,i,o,a){var s="",l="",c="";if(a)s="; domain="+a;else if(r){var u=sI(AE.location.hostname);s=u?"; domain=."+u:""}if(n){var d=new Date;d.setTime(d.getTime()+24*n*60*60*1e3),l="; expires="+d.toGMTString()}o&&(i=!0,c="; SameSite=None"),i&&(c+="; secure");var p=e+"="+encodeURIComponent(t)+l+"; path=/"+s+c;return AE.cookie=p,p},remove:function(e,t,n){VE.cookie.set(e,"",-1,t,!1,!1,n)}};var JE=function(e){var t=!0;try{var n="__mplss_"+iI(8);e.setItem(n,"xyz"),"xyz"!==e.getItem(n)&&(t=!1),e.removeItem(n)}catch(vF){t=!1}return t},YE=null,XE=function(e,t){return null===YE||t?YE=JE(e||vm.localStorage):YE},QE=null;function eI(e,t,n){var r=function(e){WE.error(t+" error: "+e)};return{is_supported:function(r){var i=n(e,r);return i||WE.error(t+" unsupported"),i},error:r,get:function(t){try{return e.getItem(t)}catch(vF){r(vF)}return null},parse:function(t){try{return VE.JSONDecode(e.getItem(t))||{}}catch(vF){}return null},set:function(t,n){try{e.setItem(t,n)}catch(vF){r(vF)}},remove:function(t){try{e.removeItem(t)}catch(vF){r(vF)}}}}VE.localStorage=eI(vm.localStorage,"localStorage",XE),VE.sessionStorage=eI(vm.sessionStorage,"sessionStorage",function(e,t){return null===QE||t?QE=JE(e||vm.sessionStorage):QE}),VE.register_event=function(){function e(t){return t&&(t.preventDefault=e.preventDefault,t.stopPropagation=e.stopPropagation),t}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(t,n,r,i,o){if(t)if(t.addEventListener&&!i)t.addEventListener(n,r,!!o);else{var a="on"+n,s=t[a];t[a]=function(t,n,r){var i=function(i){if(i=i||e(vm.event)){var o,a,s=!0;return VE.isFunction(r)&&(o=r(i)),a=n.call(t,i),!1!==o&&!1!==a||(s=!1),s}};return i}(t,r,s)}else WE.error("No valid element provided to register_event")}}();var tI=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');VE.dom_query=function(){function e(e){return e.all?e.all:e.getElementsByTagName("*")}var t=/[\t\r\n]/g;function n(e,n){var r=" "+n+" ";return(" "+e.className+" ").replace(t," ").indexOf(r)>=0}function r(t){if(!AE.getElementsByTagName)return[];var r,i,o,a,s,l,c,u,d,p,f=t.split(" "),h=[AE];for(l=0;l<f.length;l++)if((r=f[l].replace(/^\s+/,"").replace(/\s+$/,"")).indexOf("#")>-1){o=(i=r.split("#"))[0];var m=i[1],g=AE.getElementById(m);if(!g||o&&g.nodeName.toLowerCase()!=o)return[];h=[g]}else if(r.indexOf(".")>-1){o=(i=r.split("."))[0];var v=i[1];for(o||(o="*"),a=[],s=0,c=0;c<h.length;c++)for(d="*"==o?e(h[c]):h[c].getElementsByTagName(o),u=0;u<d.length;u++)a[s++]=d[u];for(h=[],p=0,c=0;c<a.length;c++)a[c].className&&VE.isString(a[c].className)&&n(a[c],v)&&(h[p++]=a[c])}else{var y=r.match(tI);if(y){o=y[1];var b,x=y[2],w=y[3],k=y[4];for(o||(o="*"),a=[],s=0,c=0;c<h.length;c++)for(d="*"==o?e(h[c]):h[c].getElementsByTagName(o),u=0;u<d.length;u++)a[s++]=d[u];switch(h=[],p=0,w){case"=":b=function(e){return e.getAttribute(x)==k};break;case"~":b=function(e){return e.getAttribute(x).match(new RegExp("\\b"+k+"\\b"))};break;case"|":b=function(e){return e.getAttribute(x).match(new RegExp("^"+k+"-?"))};break;case"^":b=function(e){return 0===e.getAttribute(x).indexOf(k)};break;case"$":b=function(e){return e.getAttribute(x).lastIndexOf(k)==e.getAttribute(x).length-k.length};break;case"*":b=function(e){return e.getAttribute(x).indexOf(k)>-1};break;default:b=function(e){return e.getAttribute(x)}}for(h=[],p=0,c=0;c<a.length;c++)b(a[c])&&(h[p++]=a[c])}else{for(o=r,a=[],s=0,c=0;c<h.length;c++)for(d=h[c].getElementsByTagName(o),u=0;u<d.length;u++)a[s++]=d[u];h=a}}return h}return function(e){return VE.isElement(e)?[e]:VE.isObject(e)&&!VE.isUndefined(e.length)?e:r.call(this,e)}}();var nI=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],rI=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];VE.info={campaignParams:function(e){var t="",n={};return VE.each(nI,function(r){(t=VE.getQueryParam(AE.URL,r)).length?n[r]=t:void 0!==e&&(n[r]=e)}),n},clickParams:function(){var e="",t={};return VE.each(rI,function(n){(e=VE.getQueryParam(AE.URL,n)).length&&(t[n]=e)}),t},marketingParams:function(){return VE.extend(VE.info.campaignParams(),VE.info.clickParams())},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var t=VE.info.searchEngine(e),n="yahoo"!=t?"q":"p",r={};if(null!==t){r.$search_engine=t;var i=VE.getQueryParam(e,n);i.length&&(r.mp_keyword=i)}return r},browser:function(e,t,n){return t=t||"",n||VE.includes(e," OPR/")?VE.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":VE.includes(e,"IEMobile")||VE.includes(e,"WPDesktop")?"Internet Explorer Mobile":VE.includes(e,"SamsungBrowser/")?"Samsung Internet":VE.includes(e,"Edge")||VE.includes(e,"Edg/")?"Microsoft Edge":VE.includes(e,"FBIOS")?"Facebook Mobile":VE.includes(e,"Whale/")?"Whale Browser":VE.includes(e,"Chrome")?"Chrome":VE.includes(e,"CriOS")?"Chrome iOS":VE.includes(e,"UCWEB")||VE.includes(e,"UCBrowser")?"UC Browser":VE.includes(e,"FxiOS")?"Firefox iOS":VE.includes(t,"Apple")?VE.includes(e,"Mobile")?"Mobile Safari":"Safari":VE.includes(e,"Android")?"Android Mobile":VE.includes(e,"Konqueror")?"Konqueror":VE.includes(e,"Firefox")?"Firefox":VE.includes(e,"MSIE")||VE.includes(e,"Trident/")?"Internet Explorer":VE.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,n){var r={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/,"Whale Browser":/Whale\/(\d+(\.\d+)?)/}[VE.info.browser(e,t,n)];if(void 0===r)return null;var i=e.match(r);return i?parseFloat(i[i.length-2]):null},os:function(){var e=LE;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return vm.location.href},properties:function(e){return"object"!=typeof e&&(e={}),VE.extend(VE.strip_empty_properties({$os:VE.info.os(),$browser:VE.info.browser(LE,jE.vendor,PE),$referrer:AE.referrer,$referring_domain:VE.info.referringDomain(AE.referrer),$device:VE.info.device(LE)}),{$current_url:VE.info.currentUrl(),$browser_version:VE.info.browserVersion(LE,jE.vendor,PE),$screen_height:ME.height,$screen_width:ME.width,mp_lib:"web",$lib_version:kE.LIB_VERSION,$insert_id:iI(),time:VE.timestamp()/1e3},VE.strip_empty_properties(e))},people_properties:function(){return VE.extend(VE.strip_empty_properties({$os:VE.info.os(),$browser:VE.info.browser(LE,jE.vendor,PE)}),{$browser_version:VE.info.browserVersion(LE,jE.vendor,PE)})},mpPageViewProperties:function(){return VE.strip_empty_properties({current_page_title:AE.title,current_domain:vm.location.hostname,current_url_path:vm.location.pathname,current_url_protocol:vm.location.protocol,current_url_search:vm.location.search})}};var iI=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},oI=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,aI=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,sI=function(e){var t=aI,n=e.split("."),r=n[n.length-1];(r.length>4||"com"===r||"org"===r)&&(t=oI);var i=e.match(t);return i?i[0]:""},lI=function(){},cI=null,uI=null;"undefined"!=typeof JSON&&(cI=JSON.stringify,uI=JSON.parse),cI=cI||VE.JSONEncode,uI=uI||VE.JSONDecode;VE.info=VE.info,VE.info.browser=VE.info.browser,VE.info.browserVersion=VE.info.browserVersion,VE.info.device=VE.info.device,VE.info.properties=VE.info.properties,VE.isBlockedUA=VE.isBlockedUA,VE.isEmptyObject=VE.isEmptyObject,VE.isObject=VE.isObject,VE.JSONDecode=VE.JSONDecode,VE.JSONEncode=VE.JSONEncode,VE.toArray=VE.toArray,VE.NPO=cE;var dI="mixpanelRecordingEvents",pI="mixpanelRecordingRegistry",fI=[dI,pI],hI=function(e){this.dbPromise=null,this.storeName=e};hI.prototype._openDb=function(){return new uE(function(e,t){var n=vm.indexedDB.open("mixpanelBrowserDb",1);n.onerror=function(){t(n.error)},n.onsuccess=function(){e(n.result)},n.onupgradeneeded=function(e){var t=e.target.result;fI.forEach(function(e){t.createObjectStore(e)})}})},hI.prototype.init=function(){return vm.indexedDB?(this.dbPromise||(this.dbPromise=this._openDb()),this.dbPromise.then(function(e){return e instanceof vm.IDBDatabase?uE.resolve():uE.reject(e)})):uE.reject("indexedDB is not supported in this browser")},hI.prototype.isInitialized=function(){return!!this.dbPromise},hI.prototype.makeTransaction=function(e,t){var n=this.storeName,r=function(r){return new uE(function(i,o){var a=r.transaction(n,e);a.oncomplete=function(){i(a)},a.onabort=a.onerror=function(){o(a.error)},t(a.objectStore(n))})};return this.dbPromise.then(r).catch(function(e){return e&&"InvalidStateError"===e.name?(this.dbPromise=this._openDb(),this.dbPromise.then(r)):uE.reject(e)}.bind(this))},hI.prototype.setItem=function(e,t){return this.makeTransaction("readwrite",function(n){n.put(t,e)})},hI.prototype.getItem=function(e){var t;return this.makeTransaction("readonly",function(n){t=n.get(e)}).then(function(){return t.result})},hI.prototype.removeItem=function(e){return this.makeTransaction("readwrite",function(t){t.delete(e)})},hI.prototype.getAll=function(){var e;return this.makeTransaction("readonly",function(t){e=t.getAll()}).then(function(){return e.result})};function mI(e,t){EI(!0,e,t)}function gI(e,t){EI(!1,e,t)}function vI(e,t){return"1"===CI(e,t)}function yI(e,t){if(function(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||vm,n=t.navigator||{},r=!1;return VE.each([n.doNotTrack,n.msDoNotTrack,t.doNotTrack],function(e){VE.includes([!0,1,"1","yes"],e)&&(r=!0)}),r}(t))return WE.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var n="0"===CI(e,t);return n&&WE.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),n}function bI(e){return II(e,function(e){return this.get_config(e)})}function xI(e){return II(e,function(e){return this._get_config(e)})}function wI(e){return II(e,function(e){return this._get_config(e)})}function kI(e,t){_I(t=t||{}).remove(SI(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function _I(e){return"localStorage"===(e=e||{}).persistenceType?VE.localStorage:VE.cookie}function SI(e,t){return((t=t||{}).persistencePrefix||"__mp_opt_in_out_")+e}function CI(e,t){return _I(t).get(SI(e,t))}function EI(e,t,n){VE.isString(t)&&t.length?(_I(n=n||{}).set(SI(t,n),e?1:0,VE.isNumber(n.cookieExpiration)?n.cookieExpiration:null,!!n.crossSubdomainCookie,!!n.secureCookie,!!n.crossSiteCookie,n.cookieDomain),n.track&&e&&n.track(n.trackEventName||"$opt_in",n.trackProperties,{send_immediately:!0})):WE.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token")}function II(e,t){return function(){var n=!1;try{var r=t.call(this,"token"),i=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),s=t.call(this,"window");r&&(n=yI(r,{ignoreDnt:i,persistenceType:o,persistencePrefix:a,window:s}))}catch(vF){WE.error("Unexpected error when checking tracking opt-out status: "+vF)}if(!n)return e.apply(this,arguments);var l=arguments[arguments.length-1];"function"==typeof l&&l(0)}}var NI=HE("lock"),OI=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||vm.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3,this.promiseImpl=t.promiseImpl||uE};OI.prototype.withLock=function(e,t){return new(0,this.promiseImpl)(VE.bind(function(n,r){var i=t||(new Date).getTime()+"|"+Math.random(),o=(new Date).getTime(),a=this.storageKey,s=this.pollIntervalMS,l=this.timeoutMS,c=this.storage,u=a+":X",d=a+":Y",p=a+":Z",f=function(e){if((new Date).getTime()-o>l)return NI.error("Timeout waiting for mutex on "+a+"; clearing lock. ["+i+"]"),c.removeItem(p),c.removeItem(d),void g();setTimeout(function(){try{e()}catch(vF){r(vF)}},s*(Math.random()+.1))},h=function(e,t){e()?t():f(function(){h(e,t)})},m=function(){var e=c.getItem(d);return(!e||e===i)&&(c.setItem(d,i),c.getItem(d)===i||(XE(c,!0)||r(new Error("localStorage support dropped while acquiring lock")),!1))},g=function(){c.setItem(u,i),h(m,function(){c.getItem(u)!==i?f(function(){c.getItem(d)===i?h(function(){return!c.getItem(p)},v):g()}):v()})},v=function(){c.setItem(p,"1");var t=function(){c.removeItem(p),c.getItem(d)===i&&c.removeItem(d),c.getItem(u)===i&&c.removeItem(u)};e().then(function(e){t(),n(e)}).catch(function(e){t(),r(e)})};try{if(!XE(c,!0))throw new Error("localStorage support check failed");g()}catch(vF){r(vF)}},this))};var TI=function(e){this.storage=e||vm.localStorage};TI.prototype.init=function(){return uE.resolve()},TI.prototype.isInitialized=function(){return!0},TI.prototype.setItem=function(e,t){return new uE(VE.bind(function(n,r){try{this.storage.setItem(e,cI(t))}catch(rh){r(rh)}n()},this))},TI.prototype.getItem=function(e){return new uE(VE.bind(function(t,n){var r;try{r=uI(this.storage.getItem(e))}catch(rh){n(rh)}t(r)},this))},TI.prototype.removeItem=function(e){return new uE(VE.bind(function(t,n){try{this.storage.removeItem(e)}catch(rh){n(rh)}t()},this))};var RI=HE("batch"),jI=function(e,t){var n,r,i,o;t=t||{},this.storageKey=e,this.usePersistence=t.usePersistence,this.usePersistence&&(this.queueStorage=t.queueStorage||new TI,this.lock=new OI(e,{storage:t.sharedLockStorage||vm.localStorage,timeoutMS:t.sharedLockTimeoutMS})),this.reportError=t.errorReporter||VE.bind(RI.error,RI),this.pid=t.pid||null,this.memQueue=[],this.initialized=!1,t.enqueueThrottleMs?this.enqueuePersisted=(n=VE.bind(this._enqueuePersisted,this),r=t.enqueueThrottleMs,i=null,o=[],function(e){var t=this;return o.push(e),i||(i=new uE(function(e){setTimeout(function(){var r=n.apply(t,[o]);i=null,o=[],e(r)},r)})),i}):this.enqueuePersisted=VE.bind(function(e){return this._enqueuePersisted([e])},this)};jI.prototype.ensureInit=function(){return this.initialized||!this.usePersistence?uE.resolve():this.queueStorage.init().then(VE.bind(function(){this.initialized=!0},this)).catch(VE.bind(function(e){this.reportError("Error initializing queue persistence. Disabling persistence",e),this.initialized=!0,this.usePersistence=!1},this))},jI.prototype.enqueue=function(e,t){var n={id:iI(),flushAfter:(new Date).getTime()+2*t,payload:e};return this.usePersistence?this.enqueuePersisted(n):(this.memQueue.push(n),uE.resolve(!0))},jI.prototype._enqueuePersisted=function(e){var t=VE.bind(function(){return this.ensureInit().then(VE.bind(function(){return this.readFromStorage()},this)).then(VE.bind(function(t){return this.saveToStorage(t.concat(e))},this)).then(VE.bind(function(t){return t&&(this.memQueue=this.memQueue.concat(e)),t},this)).catch(VE.bind(function(t){return this.reportError("Error enqueueing items",t,e),!1},this))},this);return this.lock.withLock(t,this.pid).catch(VE.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this))},jI.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);return this.usePersistence&&t.length<e?this.ensureInit().then(VE.bind(function(){return this.readFromStorage()},this)).then(VE.bind(function(n){if(n.length){var r={};VE.each(t,function(e){r[e.id]=!0});for(var i=0;i<n.length;i++){var o=n[i];if((new Date).getTime()>o.flushAfter&&!r[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}return t},this)):uE.resolve(t)};var AI=function(e,t){var n=[];return VE.each(e,function(e){e.id&&!t[e.id]&&n.push(e)}),n};jI.prototype.removeItemsByID=function(e){var t={};if(VE.each(e,function(e){t[e]=!0}),this.memQueue=AI(this.memQueue,t),this.usePersistence){var n=VE.bind(function(){return this.ensureInit().then(VE.bind(function(){return this.readFromStorage()},this)).then(VE.bind(function(e){return e=AI(e,t),this.saveToStorage(e)},this)).then(VE.bind(function(){return this.readFromStorage()},this)).then(VE.bind(function(e){for(var n=0;n<e.length;n++){var r=e[n];if(r.id&&t[r.id])throw new Error("Item not removed from storage")}return!0},this)).catch(VE.bind(function(t){return this.reportError("Error removing items",t,e),!1},this))},this);return this.lock.withLock(n,this.pid).catch(VE.bind(function(e){return this.reportError("Error acquiring storage lock",e),!XE(this.lock.storage,!0)&&n().then(VE.bind(function(e){return e||this.queueStorage.removeItem(this.storageKey).then(function(){return e})},this)).catch(VE.bind(function(e){return this.reportError("Error clearing queue",e),!1},this))},this))}return uE.resolve(!0)};var PI=function(e,t){var n=[];return VE.each(e,function(e){var r=e.id;if(r in t){var i=t[r];null!==i&&(e.payload=i,n.push(e))}else n.push(e)}),n};jI.prototype.updatePayloads=function(e){return this.memQueue=PI(this.memQueue,e),this.usePersistence?this.lock.withLock(VE.bind(function(){return this.ensureInit().then(VE.bind(function(){return this.readFromStorage()},this)).then(VE.bind(function(t){return t=PI(t,e),this.saveToStorage(t)},this)).catch(VE.bind(function(t){return this.reportError("Error updating items",e,t),!1},this))},this),this.pid).catch(VE.bind(function(e){return this.reportError("Error acquiring storage lock",e),!1},this)):uE.resolve(!0)},jI.prototype.readFromStorage=function(){return this.ensureInit().then(VE.bind(function(){return this.queueStorage.getItem(this.storageKey)},this)).then(VE.bind(function(e){return e&&(VE.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null)),e||[]},this)).catch(VE.bind(function(e){return this.reportError("Error retrieving queue",e),[]},this))},jI.prototype.saveToStorage=function(e){return this.ensureInit().then(VE.bind(function(){return this.queueStorage.setItem(this.storageKey,e)},this)).then(function(){return!0}).catch(VE.bind(function(e){return this.reportError("Error saving queue",e),!1},this))},jI.prototype.clear=function(){return this.memQueue=[],this.usePersistence?this.ensureInit().then(VE.bind(function(){return this.queueStorage.removeItem(this.storageKey)},this)):uE.resolve()};var MI=HE("batch"),LI=function(e,t){this.errorReporter=t.errorReporter,this.queue=new jI(e,{errorReporter:VE.bind(this.reportError,this),queueStorage:t.queueStorage,sharedLockStorage:t.sharedLockStorage,sharedLockTimeoutMS:t.sharedLockTimeoutMS,usePersistence:t.usePersistence,enqueueThrottleMs:t.enqueueThrottleMs}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1,this._flushPromise=null};LI.prototype.enqueue=function(e){return this.queue.enqueue(e,this.flushInterval)},LI.prototype.start=function(){return this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()},LI.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)},LI.prototype.clear=function(){return this.queue.clear()},LI.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size},LI.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)},LI.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(VE.bind(function(){this.stopped||(this._flushPromise=this.flush())},this),this.flushInterval))},LI.prototype.sendRequestPromise=function(e,t){return new uE(VE.bind(function(n){this.sendRequest(e,t,n)},this))},LI.prototype.flush=function(e){if(this.requestInProgress)return MI.log("Flush: Request already in progress"),uE.resolve();this.requestInProgress=!0,e=e||{};var t=this.libConfig.batch_request_timeout_ms,n=(new Date).getTime(),r=this.batchSize;return this.queue.fillBatch(r).then(VE.bind(function(i){var o=i.length===r,a=[],s={};if(VE.each(i,function(e){var t=e.payload;if(this.beforeSendHook&&!e.orphaned&&(t=this.beforeSendHook(t)),t){t.event&&t.properties&&(t.properties=VE.extend({},t.properties,{mp_sent_by_lib_version:kE.LIB_VERSION}));var n=!0,r=e.id;r?(this.itemIdsSentSuccessfully[r]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[r]}),n=!1):this.reportError("[dupe] found item with no ID",{item:e}),n&&a.push(t)}s[e.id]=t},this),a.length<1)return this.requestInProgress=!1,this.resetFlush(),uE.resolve();var l=VE.bind(function(){return this.queue.removeItemsByID(VE.map(i,function(e){return e.id})).then(VE.bind(function(e){return VE.each(i,VE.bind(function(e){var t=e.id;t?(this.itemIdsSentSuccessfully[t]=this.itemIdsSentSuccessfully[t]||0,this.itemIdsSentSuccessfully[t]++,this.itemIdsSentSuccessfully[t]>5&&this.reportError("[dupe] item ID sent too many times",{item:e,batchSize:i.length,timesSent:this.itemIdsSentSuccessfully[t]})):this.reportError("[dupe] found item with no ID while removing",{item:e})},this)),e?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?(this.resetFlush(),uE.resolve()):this.flush()):(++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush(),uE.resolve())},this))},this),c=VE.bind(function(o){this.requestInProgress=!1;try{if(e.unloading)return this.queue.updatePayloads(s);if(VE.isObject(o)&&"timeout"===o.error&&(new Date).getTime()-n>=t)return this.reportError("Network timeout; retrying"),this.flush();if(VE.isObject(o)&&(o.httpStatusCode>=500||429===o.httpStatusCode||o.httpStatusCode<=0&&(u=vm.navigator.onLine,!VE.isUndefined(u)&&!u)||"timeout"===o.error)){var a=2*this.flushInterval;return o.retryAfter&&(a=1e3*parseInt(o.retryAfter,10)||a),a=Math.min(6e5,a),this.reportError("Error; retry in "+a+" ms"),this.scheduleFlush(a),uE.resolve()}if(VE.isObject(o)&&413===o.httpStatusCode){if(i.length>1){var c=Math.max(1,Math.floor(r/2));return this.batchSize=Math.min(this.batchSize,c,i.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush(),uE.resolve()}return this.reportError("Single-event request too large; dropping",i),this.resetBatchSize(),l()}return l()}catch(vF){this.reportError("Error handling API response",vF),this.resetFlush()}var u},this),u={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};return e.unloading&&(u.transport="sendBeacon"),MI.log("MIXPANEL REQUEST:",a),this.sendRequestPromise(a,u).then(c)},this)).catch(VE.bind(function(e){this.reportError("Error flushing request queue",e),this.resetFlush()},this))},LI.prototype.reportError=function(e,t){if(MI.error.apply(MI.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(n){MI.error(n)}};var DI=function(e){var t=Date.now();return!e||t>e.maxExpires||t>e.idleExpires},FI=HE("recorder"),zI=vm.CompressionStream,UI={batch_size:1e3,batch_flush_interval_ms:1e4,batch_request_timeout_ms:9e4,batch_autostart:!0},BI=new Set([RS.MouseMove,RS.MouseInteraction,RS.Scroll,RS.ViewportResize,RS.Input,RS.TouchMove,RS.MediaInteraction,RS.Drag,RS.Selection]);var $I=function(e){this._mixpanel=e.mixpanelInstance,this._onIdleTimeout=e.onIdleTimeout||lI,this._onMaxLengthReached=e.onMaxLengthReached||lI,this._onBatchSent=e.onBatchSent||lI,this._rrwebRecord=e.rrwebRecord||null,this._stopRecording=null,this.replayId=e.replayId,this.batchStartUrl=e.batchStartUrl||null,this.replayStartUrl=e.replayStartUrl||null,this.idleExpires=e.idleExpires||null,this.maxExpires=e.maxExpires||null,this.replayStartTime=e.replayStartTime||null,this.lastEventTimestamp=e.lastEventTimestamp||null,this.seqNo=e.seqNo||0,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=_E,this.recordMinMs=0;var t=XE(e.sharedLockStorage,!0)&&!this.getConfig("disable_persistence");this.batcherKey="__mprec_"+this.getConfig("name")+"_"+this.getConfig("token")+"_"+this.replayId,this.queueStorage=new hI(dI),this.batcher=new LI(this.batcherKey,{errorReporter:this.reportError.bind(this),flushOnlyOnInterval:!0,libConfig:UI,sendRequestFunc:this.flushEventsWithOptOut.bind(this),queueStorage:this.queueStorage,sharedLockStorage:e.sharedLockStorage,usePersistence:t,stopAllBatchingFunc:this.stopRecording.bind(this),enqueueThrottleMs:250,sharedLockTimeoutMS:1e4})};$I.prototype.getUserIdInfo=function(){if(this.finalFlushUserIdInfo)return this.finalFlushUserIdInfo;var e={distinct_id:String(this._mixpanel.get_distinct_id())},t=this._mixpanel.get_property("$device_id");t&&(e.$device_id=t);var n=this._mixpanel.get_property("$user_id");return n&&(e.$user_id=n),e},$I.prototype.unloadPersistedData=function(){return this.batcher.stop(),this.queueStorage.init().catch(function(){this.reportError("Error initializing IndexedDB storage for unloading persisted data.")}.bind(this)).then(function(){return this.getDurationMs()<this._getRecordMinMs()?this.queueStorage.removeItem(this.batcherKey):this.batcher.flush().then(function(){return this.queueStorage.removeItem(this.batcherKey)}.bind(this))}.bind(this))},$I.prototype.getConfig=function(e){return this._mixpanel.get_config(e)},$I.prototype.get_config=function(e){return this.getConfig(e)},$I.prototype.startRecording=function(e){if(null!==this._rrwebRecord)if(null===this._stopRecording){this.recordMaxMs=this.getConfig("record_max_ms"),this.recordMaxMs>_E&&(this.recordMaxMs=_E,FI.critical("record_max_ms cannot be greater than "+_E+"ms. Capping value.")),this.maxExpires||(this.maxExpires=(new Date).getTime()+this.recordMaxMs),this.recordMinMs=this._getRecordMinMs(),this.replayStartTime||(this.replayStartTime=(new Date).getTime(),this.batchStartUrl=VE.info.currentUrl(),this.replayStartUrl=VE.info.currentUrl()),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=function(){clearTimeout(this.idleTimeoutId);var e=this.getConfig("record_idle_timeout_ms");this.idleTimeoutId=setTimeout(this._onIdleTimeout,e),this.idleExpires=(new Date).getTime()+e}.bind(this);t();var n,r=this.getConfig("record_block_selector");""!==r&&null!==r||(r=void 0);try{this._stopRecording=this._rrwebRecord({emit:function(e){this.idleExpires&&this.idleExpires<e.timestamp?this._onIdleTimeout():(function(e){return e.type===TS.IncrementalSnapshot&&BI.has(e.data.source)}(e)&&(this.batcher.stopped&&(new Date).getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t()),this.__enqueuePromise=this.batcher.enqueue(e),(null===this.lastEventTimestamp||e.timestamp>this.lastEventTimestamp)&&(this.lastEventTimestamp=e.timestamp))}.bind(this),blockClass:this.getConfig("record_block_class"),blockSelector:r,collectFonts:this.getConfig("record_collect_fonts"),dataURLOptions:{type:"image/webp",quality:.6},maskAllInputs:!0,maskTextClass:this.getConfig("record_mask_text_class"),maskTextSelector:this.getConfig("record_mask_text_selector"),recordCanvas:this.getConfig("record_canvas"),sampling:{canvas:15},plugins:this.getConfig("record_console")?[(n={stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:50,depthOfLimit:2}},{name:"rrweb/console@1",observer:KC,options:n})]:[]})}catch(vF){this.reportError("Unexpected error when starting rrweb recording.",vF)}if("function"!=typeof this._stopRecording)return this.reportError("rrweb failed to start, skipping this recording."),this._stopRecording=null,void this.stopRecording();var i=this.maxExpires-(new Date).getTime();this.maxTimeoutId=setTimeout(this._onMaxLengthReached.bind(this),i)}else FI.log("Recording already in progress, skipping startRecording.");else this.reportError("rrweb record function not provided. ")},$I.prototype.stopRecording=function(e){if(this.finalFlushUserIdInfo=this.getUserIdInfo(),!this.isRrwebStopped()){try{this._stopRecording()}catch(vF){this.reportError("Error with rrweb stopRecording",vF)}this._stopRecording=null}var t;return this.batcher.stopped?t=this.batcher.clear():e||(t=this.batcher.flush()),this.batcher.stop(),clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId),t},$I.prototype.isRrwebStopped=function(){return null===this._stopRecording},$I.prototype.flushEventsWithOptOut=function(e,t,n){var r=function(e){0===e&&(this.stopRecording(),n({error:"Tracking has been opted out, stopping recording."}))}.bind(this);this._flushEvents(e,t,n,r)},$I.prototype.serialize=function(){var e;try{e=this._mixpanel.get_tab_id()}catch(rh){this.reportError("Error getting tab ID for serialization ",rh),e=null}return{replayId:this.replayId,seqNo:this.seqNo,replayStartTime:this.replayStartTime,batchStartUrl:this.batchStartUrl,replayStartUrl:this.replayStartUrl,lastEventTimestamp:this.lastEventTimestamp,idleExpires:this.idleExpires,maxExpires:this.maxExpires,tabId:e}},$I.deserialize=function(e,t){return new $I(VE.extend({},t,{replayId:e.replayId,batchStartUrl:e.batchStartUrl,replayStartUrl:e.replayStartUrl,idleExpires:e.idleExpires,maxExpires:e.maxExpires,replayStartTime:e.replayStartTime,lastEventTimestamp:e.lastEventTimestamp,seqNo:e.seqNo,sharedLockStorage:t.sharedLockStorage}))},$I.prototype._sendRequest=function(e,t,n,r){var i=function(t,n){200===t.status&&this.replayId===e&&(this.seqNo++,this.batchStartUrl=VE.info.currentUrl()),this._onBatchSent(),r({status:0,httpStatusCode:t.status,responseBody:n,retryAfter:t.headers.get("Retry-After")})}.bind(this),o=this._mixpanel.get_api_host&&this._mixpanel.get_api_host("record")||this.getConfig("api_host");vm.fetch(o+"/"+this.getConfig("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.getConfig("token")+":"),"Content-Type":"application/octet-stream"},body:n}).then(function(e){e.json().then(function(t){i(e,t)}).catch(function(e){r({error:e})})}).catch(function(e){r({error:e,httpStatusCode:0})})},$I.prototype._flushEvents=bI(function(e,t,n){var r=e.length;if(r>0){for(var i=this.replayId,o=1/0,a=-1/0,s=!1,l=0;l<r;l++)o=Math.min(o,e[l].timestamp),a=Math.max(a,e[l].timestamp),e[l].type===TS.FullSnapshot&&(s=!0);if(0===this.seqNo){if(!s)return n({error:"First batch does not contain a full snapshot. Aborting recording."}),void this.stopRecording(!0);this.replayStartTime=o}else this.replayStartTime||(this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var c=a-this.replayStartTime,u={$current_url:this.batchStartUrl,$lib_version:kE.LIB_VERSION,batch_start_time:o/1e3,mp_lib:"web",replay_id:i,replay_length_ms:c,replay_start_time:this.replayStartTime/1e3,replay_start_url:this.replayStartUrl,seq:this.seqNo},d=JSON.stringify(e);if(Object.assign(u,this.getUserIdInfo()),function(e,t,n){if(!vm.CompressionStream)return!1;var r=VE.info.browser(e,t,n),i=VE.info.browserVersion(e,t,n);return!(("Safari"===r||"Mobile Safari"===r)&&i>=16.4&&i<16.6)}(LE,jE.vendor,PE)){var p=new Blob([d],{type:"application/json"}).stream().pipeThrough(new zI("gzip"));new Response(p).blob().then(function(e){u.format="gzip",this._sendRequest(i,u,e,n)}.bind(this))}else u.format="body",this._sendRequest(i,u,d,n)}}),$I.prototype.reportError=function(e,t){FI.error.apply(FI.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.getConfig("error_reporter")(e,t)}catch(n){FI.error(n)}},$I.prototype.getDurationMs=function(){return null===this.replayStartTime?0:null===this.lastEventTimestamp?(new Date).getTime()-this.replayStartTime:this.lastEventTimestamp-this.replayStartTime},$I.prototype._getRecordMinMs=function(){var e=this.getConfig("record_min_ms");return e>SE?(FI.critical("record_min_ms cannot be greater than 8000ms. Capping value."),SE):e};var VI=function(e){this.idb=new hI(pI),this.errorReporter=e.errorReporter,this.mixpanelInstance=e.mixpanelInstance,this.sharedLockStorage=e.sharedLockStorage};VI.prototype.isPersistenceEnabled=function(){return!this.mixpanelInstance.get_config("disable_persistence")},VI.prototype.handleError=function(e){this.errorReporter("IndexedDB error: ",e)},VI.prototype.setActiveRecording=function(e){if(!this.isPersistenceEnabled())return uE.resolve();var t=e.tabId;return t?this.idb.init().then(function(){return this.idb.setItem(t,e)}.bind(this)).catch(this.handleError.bind(this)):uE.resolve()},VI.prototype.getActiveRecording=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getItem(this.mixpanelInstance.get_tab_id())}.bind(this)).then(function(e){return DI(e)?null:e}.bind(this)).catch(this.handleError.bind(this)):uE.resolve(null)},VI.prototype.clearActiveRecording=function(){return this.isPersistenceEnabled()?this.markActiveRecordingExpired():this.deleteActiveRecording()},VI.prototype.markActiveRecordingExpired=function(){return this.getActiveRecording().then(function(e){if(e)return e.maxExpires=0,this.setActiveRecording(e)}.bind(this)).catch(this.handleError.bind(this))},VI.prototype.deleteActiveRecording=function(){return this.idb.isInitialized()?this.idb.removeItem(this.mixpanelInstance.get_tab_id()).catch(this.handleError.bind(this)):uE.resolve()},VI.prototype.flushInactiveRecordings=function(){return this.isPersistenceEnabled()?this.idb.init().then(function(){return this.idb.getAll()}.bind(this)).then(function(e){var t=e.filter(function(e){return DI(e)}).map(function(e){return $I.deserialize(e,{mixpanelInstance:this.mixpanelInstance,sharedLockStorage:this.sharedLockStorage}).unloadPersistedData().then(function(){return this.idb.removeItem(e.tabId)}.bind(this)).catch(this.handleError.bind(this))}.bind(this));return uE.all(t)}.bind(this)).catch(this.handleError.bind(this)):uE.resolve([])};var WI=HE("recorder"),qI=function(e,t,n){this.mixpanelInstance=e,this.rrwebRecord=t||PC,this.sharedLockStorage=n,this.recordingRegistry=new VI({mixpanelInstance:this.mixpanelInstance,errorReporter:WI.error,sharedLockStorage:n}),this._flushInactivePromise=this.recordingRegistry.flushInactiveRecordings(),this.activeRecording=null,this.stopRecordingInProgress=!1};qI.prototype.startRecording=function(e){if(e=e||{},!this.activeRecording||this.activeRecording.isRrwebStopped()){var t=function(){WI.log("Idle timeout reached, restarting recording."),this.resetRecording()}.bind(this),n=function(){WI.log("Max recording length reached, stopping recording."),this.resetRecording()}.bind(this),r=function(){this.recordingRegistry.setActiveRecording(this.activeRecording.serialize()),this.__flushPromise=this.activeRecording.batcher._flushPromise}.bind(this),i={mixpanelInstance:this.mixpanelInstance,onBatchSent:r,onIdleTimeout:t,onMaxLengthReached:n,replayId:VE.UUID(),rrwebRecord:this.rrwebRecord,sharedLockStorage:this.sharedLockStorage};return e.activeSerializedRecording?this.activeRecording=$I.deserialize(e.activeSerializedRecording,i):this.activeRecording=new $I(i),this.activeRecording.startRecording(e.shouldStopBatcher),this.recordingRegistry.setActiveRecording(this.activeRecording.serialize())}WI.log("Recording already in progress, skipping startRecording.")},qI.prototype.stopRecording=function(){return this.stopRecordingInProgress=!0,this._stopCurrentRecording(!1,!0).then(function(){return this.recordingRegistry.clearActiveRecording()}.bind(this)).then(function(){this.stopRecordingInProgress=!1}.bind(this))},qI.prototype.pauseRecording=function(){return this._stopCurrentRecording(!1)},qI.prototype._stopCurrentRecording=function(e,t){if(this.activeRecording){var n=this.activeRecording.stopRecording(e);return t&&(this.activeRecording=null),n}return uE.resolve()},qI.prototype.resumeRecording=function(e){return this.activeRecording&&this.activeRecording.isRrwebStopped()?(this.activeRecording.startRecording(!1),uE.resolve(null)):this.recordingRegistry.getActiveRecording().then(function(t){return t&&!this.stopRecordingInProgress?this.startRecording({activeSerializedRecording:t}):e?this.startRecording({shouldStopBatcher:!1}):(WI.log("No resumable recording found."),null)}.bind(this))},qI.prototype.resetRecording=function(){this.stopRecording(),this.startRecording({shouldStopBatcher:!0})},qI.prototype.getActiveReplayId=function(){return this.activeRecording&&!this.activeRecording.isRrwebStopped()?this.activeRecording.replayId:null},Object.defineProperty(qI.prototype,"replayId",{get:function(){return this.getActiveReplayId()}}),vm.__mp_recorder=qI;var HI="change",KI="click",ZI="hashchange",GI="load",JI="mp_locationchange",YI="popstate",XI="scrollend",QI="scroll",eN="submit",tN="visibilitychange",nN=["clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","x","y"],rN=["mp-include"],iN=["mp-no-track"],oN=iN.concat(["mp-sensitive"]),aN=["aria-label","aria-labelledby","aria-describedby","href","name","role","title","type"],sN={button:!0,checkbox:!0,combobox:!0,grid:!0,link:!0,listbox:!0,menu:!0,menubar:!0,menuitem:!0,menuitemcheckbox:!0,menuitemradio:!0,navigation:!0,option:!0,radio:!0,radiogroup:!0,searchbox:!0,slider:!0,spinbutton:!0,switch:!0,tab:!0,tablist:!0,textbox:!0,tree:!0,treegrid:!0,treeitem:!0},lN={base:!0,head:!0,html:!0,link:!0,meta:!0,script:!0,style:!0,title:!0,br:!0,hr:!0,wbr:!0,noscript:!0,picture:!0,source:!0,template:!0,track:!0},cN={article:!0,div:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,p:!0,section:!0,span:!0},uN=["onclick","onmousedown","onmouseup","onpointerdown","onpointerup","ontouchend","ontouchstart"],dN=HE("autocapture");function pN(e){for(var t={},n=fN(e).split(" "),r=0;r<n.length;r++){var i=n[r];i&&(t[i]=!0)}return t}function fN(e){switch(typeof e.className){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function hN(e){if(e.previousElementSibling)return e.previousElementSibling;do{e=e.previousSibling}while(e&&!xN(e));return e}function mN(e,t,n,r,i,o){var a={$classes:fN(e).split(" "),$tag_name:e.tagName.toLowerCase()},s=e.id;s&&(a.$id=s),_N(e,t,i,o)&&VE.each(aN.concat(r),function(t){if(e.hasAttribute(t)&&!n[t]){var r=e.getAttribute(t);SN(r)&&(a["$attr-"+t]=r)}});for(var l=1,c=1,u=e;u=hN(u);)l++,u.tagName===e.tagName&&c++;return a.$nth_child=l,a.$nth_of_type=c,a}function gN(e,t){var n=t.allowElementCallback,r=t.allowSelectors||[],i=t.blockAttrs||[],o=t.blockElementCallback,a=t.blockSelectors||[],s=t.captureTextContent||!1,l=t.captureExtraAttrs||[],c=t.capturedForHeatMap||!1,u={};VE.each(i,function(e){u[e]=!0});var d=null,p=void 0===e.target?e.srcElement:e.target;if(kN(p)&&(p=p.parentNode),function(e,t){if(!e||wN(e,"html")||!xN(e))return!1;switch(e.tagName.toLowerCase()){case"form":return t.type===eN;case"input":return-1===["button","submit"].indexOf(e.getAttribute("type"))?t.type===HI:t.type===KI;case"select":case"textarea":return t.type===HI;default:return t.type===KI}}(p,e)&&yN(p,e,n,r)&&!bN(p,e,o,a)){for(var f=[p],h=p;h.parentNode&&!wN(h,"body");)f.push(h.parentNode),h=h.parentNode;var m,g=[],v=!1;if(VE.each(f,function(t){var i=_N(t,e,n,r);u.href||"a"!==t.tagName.toLowerCase()||(m=t.getAttribute("href"),m=i&&SN(m)&&m),bN(t,e,o,a)&&(v=!0),g.push(mN(t,e,u,l,n,r))},this),!v){var y=AE.documentElement;if(d={$event_type:e.type,$host:vm.location.host,$pathname:vm.location.pathname,$elements:g,$el_attr__href:m,$viewportHeight:Math.max(y.clientHeight,vm.innerHeight||0),$viewportWidth:Math.max(y.clientWidth,vm.innerWidth||0),$pageHeight:AE.body.offsetHeight||0,$pageWidth:AE.body.offsetWidth||0},VE.each(l,function(e){if(!u[e]&&p.hasAttribute(e)){var t=p.getAttribute(e);SN(t)&&(d["$el_attr__"+e]=t)}}),s&&(b=vN(p,e,n,r))&&b.length&&(d.$el_text=b),e.type===KI&&(VE.each(nN,function(t){t in e&&(d["$"+t]=e[t])}),c&&(d.$captured_for_heatmap=!0),p=function(e){for(var t=e.target,n=e.composedPath(),r=0;r<n.length;r++){var i=n[r];if(wN(i,"a")||wN(i,"button")||wN(i,"input")||wN(i,"select")||i.getAttribute&&"button"===i.getAttribute("role")){t=i;break}if(i===t)break}return t}(e)),s){var b=vN(p,e,n,r);b&&b.length&&(d.$el_text=b)}if(p){if(!yN(p,e,n,r)||bN(p,e,o,a))return null;var x=mN(p,e,u,l,n,r);d.$target=x,d.$el_classes=x.$classes,VE.extend(d,VE.strip_empty_properties({$el_id:x.$id,$el_tag_name:x.$tag_name}))}}}return d}function vN(e,t,n,r){var i="";return _N(e,t,n,r)&&e.childNodes&&e.childNodes.length&&VE.each(e.childNodes,function(e){kN(e)&&e.textContent&&(i+=VE.trim(e.textContent).split(/(\s+)/).filter(SN).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),VE.trim(i)}function yN(e,t,n,r){if(n)try{if(!n(e,t))return!1}catch(vF){return dN.critical("Error while checking element in allowElementCallback",vF),!1}if(!r.length)return!0;for(var i=0;i<r.length;i++){var o=r[i];try{if(e.matches(o))return!0}catch(vF){dN.critical("Error while checking selector: "+o,vF)}}return!1}function bN(e,t,n,r){var i;if(n)try{if(n(e,t))return!0}catch(vF){return dN.critical("Error while checking element in blockElementCallback",vF),!0}if(r&&r.length)for(i=0;i<r.length;i++){var o=r[i];try{if(e.matches(o))return!0}catch(vF){dN.critical("Error while checking selector: "+o,vF)}}var a=pN(e);for(i=0;i<iN.length;i++)if(a[iN[i]])return!0;return!1}function xN(e){return e&&1===e.nodeType}function wN(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function kN(e){return e&&3===e.nodeType}function _N(e,t,n,r){var i;if(!yN(e,t,n,r))return!1;for(var o=e;o.parentNode&&!wN(o,"body");o=o.parentNode){var a=pN(o);for(i=0;i<oN.length;i++)if(a[oN[i]])return!1}var s=pN(e);for(i=0;i<rN.length;i++)if(s[rN[i]])return!0;if(wN(e,"input")||wN(e,"select")||wN(e,"textarea")||"true"===e.getAttribute("contenteditable"))return!1;var l=e.type||"";if("string"==typeof l)switch(l.toLowerCase()){case"hidden":case"password":return!1}var c=e.name||e.id||"";if("string"==typeof c){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(c.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function SN(e){if(null===e||VE.isUndefined(e))return!1;if("string"==typeof e){e=VE.trim(e);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((e||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(e))return!1}return!0}function CN(e){var t="onscrollend"in vm,n=KE(e),r=XI;if(!t){var i=null;n=KE(function(){clearTimeout(i),i=setTimeout(e,100)}),r=QI}return{listener:n,eventType:r}}function EN(e){var t=e.tagName.toLowerCase();return"button"===t||"input"===t||"select"===t||"textarea"===t||"details"===t||"dialog"===t||(!!e.isContentEditable||(!!(e.onclick||e.onmousedown||e.onmouseup||e.ontouchstart||e.ontouchend)||(!!function(e){for(var t=0;t<uN.length;t++)if(e.hasAttribute(uN[t]))return!0;return!1}(e)||(!!function(e){var t=e.getAttribute("role");if(!t)return!1;var n=t.trim().split(/\s+/)[0].toLowerCase();return sN[n]}(e)||(!("a"!==t||!e.hasAttribute("href"))||!!e.hasAttribute("tabindex"))))))}function IN(e){if(!e||!e.tagName)return!0;var t=e.tagName.toLowerCase();if(lN[t])return!0;if(EN(e))return!1;for(var n=e.parentElement,r=0;n&&r<5;){if(EN(n))return!1;if(n.getRootNode&&n.getRootNode()!==AE){var i=n.getRootNode();if(i.host&&EN(i.host))return!1}n=n.parentElement,r++}return!!cN[t]}function NN(e){return"composedPath"in e?e.composedPath():[]}function ON(e){var t=NN(e);return t&&t.length>0?t[0]:e.target||e.srcElement}function TN(){this.clicks=[]}function RN(e,t){this.changeCallback=e||function(){},this.observerConfig=t,this.observedShadowRoots=null,this.shadowObservers=[]}TN.prototype.isRageClick=function(e,t){var n=(t=t||{}).threshold_px||30,r=t.timeout_ms||1e3,i=t.click_count||4;if(t.interactive_elements_only||false){var o=ON(e);if(!o||IN(o))return!1}var a=Date.now(),s=e.pageX,l=e.pageY,c=this.clicks[this.clicks.length-1];if(c&&a-c.timestamp<r&&Math.sqrt(Math.pow(s-c.x,2)+Math.pow(l-c.y,2))<n){if(this.clicks.push({x:s,y:l,timestamp:a}),this.clicks.length>=i)return this.clicks=[],!0}else this.clicks=[{x:s,y:l,timestamp:a}];return!1},RN.prototype.getEventTarget=function(e){if(this.observedShadowRoots)return ON(e)},RN.prototype.observeFromEvent=function(e){if(this.observedShadowRoots)for(var t=NN(e),n=0;n<t.length;n++){var r=t[n];r&&r.shadowRoot&&this.observeShadowRoot(r.shadowRoot)}},RN.prototype.observeShadowRoot=function(e){if(this.observedShadowRoots&&!this.observedShadowRoots.has(e)){var t=this;try{this.observedShadowRoots.add(e);var n=new window.MutationObserver(function(){t.changeCallback()});n.observe(e,this.observerConfig),this.shadowObservers.push(n)}catch(rh){dN.critical("Error while observing shadow root",rh)}}},RN.prototype.start=function(){this.observedShadowRoots||("undefined"!=typeof WeakSet?this.observedShadowRoots=new WeakSet:dN.critical("Shadow DOM observation unavailable: WeakSet not supported"))},RN.prototype.stop=function(){if(this.observedShadowRoots){for(var e=0;e<this.shadowObservers.length;e++)try{this.shadowObservers[e].disconnect()}catch(rh){dN.critical("Error while disconnecting shadow DOM observer",rh)}this.shadowObservers=[],this.observedShadowRoots=null}};var jN=[HI,"input",eN,"select","toggle"],AN=[XI],PN=[ZI],MN={characterData:!0,childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden","checked","selected","value","display","visibility"]};function LN(e){this.eventListeners=[],this.mutationObserver=null,this.shadowDOMObserver=null,this.isTracking=!1,this.lastChangeEventTimestamp=0,this.pendingClicks=[],this.onDeadClickCallback=e,this.processingActive=!1,this.processingTimeout=null}LN.prototype.addClick=function(e){var t=this.shadowDOMObserver&&this.shadowDOMObserver.getEventTarget(e);return t||(t=e.target||e.srcElement),!(!t||IN(t))&&(this.shadowDOMObserver&&this.shadowDOMObserver.observeFromEvent(e),this.pendingClicks.push({element:t,event:e,timestamp:Date.now()}),!0)},LN.prototype.trackClick=function(e,t){if(!this.isTracking)return!1;var n=this.addClick(e);return n&&this.triggerProcessing(t),n},LN.prototype.getDeadClicks=function(e){if(0===this.pendingClicks.length)return[];var t=e.timeout_ms,n=Date.now(),r=this.pendingClicks.slice();this.pendingClicks=[];for(var i=[],o=0;o<r.length;o++){var a=r[o];n-a.timestamp>=t?this.hasChangesAfter(a.timestamp)||i.push(a):this.pendingClicks.push(a)}return i},LN.prototype.hasChangesAfter=function(e){return this.lastChangeEventTimestamp>=e-100},LN.prototype.recordChangeEvent=function(){this.lastChangeEventTimestamp=Date.now()},LN.prototype.triggerProcessing=function(e){this.processingActive||(this.processingActive=!0,this.processRecursively(e))},LN.prototype.processRecursively=function(e){if(this.isTracking&&this.onDeadClickCallback){var t=e.timeout_ms,n=this;this.processingTimeout=setTimeout(function(){if(n.processingActive){for(var t=n.getDeadClicks(e),r=0;r<t.length;r++)n.onDeadClickCallback(t[r].event);n.pendingClicks.length>0?n.processRecursively(e):n.processingActive=!1}},t)}else this.processingActive=!1},LN.prototype.startTracking=function(){if(!this.isTracking){this.isTracking=!0;var e=this;jN.forEach(function(t){var n=function(){e.recordChangeEvent()};document.addEventListener(t,n,{capture:!0,passive:!0}),e.eventListeners.push({target:document,event:t,handler:n,options:{capture:!0,passive:!0}})}),PN.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n),e.eventListeners.push({target:window,event:t,handler:n})}),AN.forEach(function(t){var n=function(){e.recordChangeEvent()};window.addEventListener(t,n,{passive:!0}),e.eventListeners.push({target:window,event:t,handler:n,options:{passive:!0}})});var t=function(){e.recordChangeEvent()};if(document.addEventListener("selectionchange",t),e.eventListeners.push({target:document,event:"selectionchange",handler:t}),window.MutationObserver)try{this.mutationObserver=new window.MutationObserver(function(){e.recordChangeEvent()}),this.mutationObserver.observe(document.body||document.documentElement,MN)}catch(rh){dN.critical("Error while setting up mutation observer",rh)}if(window.customElements)try{this.shadowDOMObserver=new RN(function(){e.recordChangeEvent()},MN),this.shadowDOMObserver.start()}catch(rh){dN.critical("Error while setting up shadow DOM observer",rh),this.shadowDOMObserver=null}}},LN.prototype.stopTracking=function(){if(this.isTracking){this.isTracking=!1,this.pendingClicks=[],this.lastChangeEventTimestamp=0,this.processingActive=!1,this.processingTimeout&&(clearTimeout(this.processingTimeout),this.processingTimeout=null);for(var e=0;e<this.eventListeners.length;e++){var t=this.eventListeners[e];try{t.target.removeEventListener(t.event,t.handler,t.options)}catch(rh){dN.critical("Error while removing event listener",rh)}}if(this.eventListeners=[],this.mutationObserver){try{this.mutationObserver.disconnect()}catch(rh){dN.critical("Error while disconnecting mutation observer",rh)}this.mutationObserver=null}if(this.shadowDOMObserver){try{this.shadowDOMObserver.stop()}catch(rh){dN.critical("Error while stopping shadow DOM observer",rh)}this.shadowDOMObserver=null}}};var DN="autocapture",FN="full-url",zN="allow_selectors",UN="allow_url_regexes",BN="block_attrs",$N="block_element_callback",VN="block_selectors",WN="block_url_regexes",qN="capture_extra_attrs",HN="capture_text_content",KN="scroll_capture_all",ZN="scroll_depth_percent_checkpoints",GN="click",JN="dead_click",YN="input",XN="pageview",QN="rage_click",eO="scroll",tO="page_leave",nO="submit",rO={};rO[zN]=[],rO[UN]=[],rO[BN]=[],rO[$N]=null,rO[VN]=[],rO[WN]=[],rO[qN]=[],rO[HN]=!1,rO[KN]=!1,rO[ZN]=[25,50,75,100],rO[GN]=!0,rO[JN]=!0,rO[YN]=!0,rO[XN]=FN,rO[QN]=!0,rO[eO]=!0,rO[tO]=!1,rO[nO]=!0;var iO={$mp_autocapture:!0},oO="$mp_click",aO="$mp_dead_click",sO="$mp_rage_click",lO=function(e){this.mp=e,this.maxScrollViewDepth=0,this.hasTrackedScrollSession=!1,this.previousScrollHeight=0};lO.prototype.init=function(){!function(){try{return!!AE.createElement("div").matches}catch(vF){return!1}}()?dN.critical("Autocapture unavailable: missing required DOM APIs"):(this.initPageListeners(),this.initPageviewTracking(),this.initClickTracking(),this.initDeadClickTracking(),this.initInputTracking(),this.initScrollTracking(),this.initSubmitTracking(),this.initRageClickTracking(),this.initPageLeaveTracking())},lO.prototype.getFullConfig=function(){var e=this.mp.get_config(DN);return e?VE.isObject(e)?VE.extend({},rO,e):rO:{}},lO.prototype.getConfig=function(e){return this.getFullConfig()[e]},lO.prototype.currentUrlBlocked=function(){var e,t=VE.info.currentUrl(),n=this.getConfig(UN)||[];if(n.length){var r=!1;for(e=0;e<n.length;e++){var i=n[e];try{if(t.match(i)){r=!0;break}}catch(vF){return dN.critical("Error while checking block URL regex: "+i,vF),!0}}if(!r)return!0}var o=this.getConfig(WN)||[];if(!o||!o.length)return!1;for(e=0;e<o.length;e++)try{if(t.match(o[e]))return!0}catch(vF){return dN.critical("Error while checking block URL regex: "+o[e],vF),!0}return!1},lO.prototype.pageviewTrackingConfig=function(){return this.mp.get_config(DN)?this.getConfig(XN):this.mp.get_config("track_pageview")},lO.prototype.trackDomEvent=function(e,t){if(!this.currentUrlBlocked()){var n=this.mp.is_recording_heatmap_data()&&(t===oO&&!this.getConfig(GN)||t===sO&&!this._getClickTrackingConfig(QN)||t===aO&&!this._getClickTrackingConfig(JN)),r=gN(e,{allowElementCallback:this.getConfig("allow_element_callback"),allowSelectors:this.getConfig(zN),blockAttrs:this.getConfig(BN),blockElementCallback:this.getConfig($N),blockSelectors:this.getConfig(VN),captureExtraAttrs:this.getConfig(qN),captureTextContent:this.getConfig(HN),capturedForHeatMap:n});r&&(VE.extend(r,iO),this.mp.track(t,r))}},lO.prototype.initPageListeners=function(){if(vm.removeEventListener(YI,this.listenerPopstate),vm.removeEventListener(ZI,this.listenerHashchange),this.pageviewTrackingConfig()||this.getConfig(tO)||this.mp.get_config("record_heatmap_data")){this.listenerPopstate=function(){vm.dispatchEvent(new Event(JI))},this.listenerHashchange=function(){vm.dispatchEvent(new Event(JI))},vm.addEventListener(YI,this.listenerPopstate),vm.addEventListener(ZI,this.listenerHashchange);var e=vm.history.pushState;"function"==typeof e&&(vm.history.pushState=function(t,n,r){e.call(vm.history,t,n,r),vm.dispatchEvent(new Event(JI))});var t=vm.history.replaceState;"function"==typeof t&&(vm.history.replaceState=function(e,n,r){t.call(vm.history,e,n,r),vm.dispatchEvent(new Event(JI))})}},lO.prototype._getClickTrackingConfig=function(e){var t=this.getConfig(e);return t?!0===t?{}:"object"==typeof t?t:{}:null},lO.prototype._trackPageLeave=function(e,t,n){if(!this.hasTrackedScrollSession&&(this.getConfig(tO)||this.mp.is_recording_heatmap_data())){this.hasTrackedScrollSession=!0;var r=Math.max(AE.documentElement.clientHeight,vm.innerHeight||0),i=Math.round(Math.max(this.maxScrollViewDepth-r,0)/(n-r)*100),o=Math.round(r/n*100);n<=r&&(i=100,o=100);var a=VE.extend({$max_scroll_view_depth:this.maxScrollViewDepth,$max_scroll_percentage:i,$fold_line_percentage:o,$scroll_height:n,$event_type:e.type,$current_url:t||VE.info.currentUrl(),$viewportHeight:r,$viewportWidth:Math.max(AE.documentElement.clientWidth,vm.innerWidth||0),$captured_for_heatmap:this.mp.is_recording_heatmap_data()},iO);this.mp.track("$mp_page_leave",a,{transport:"sendBeacon"})}},lO.prototype._initScrollDepthTracking=function(){if(vm.removeEventListener(QI,this.listenerScrollDepth),vm.removeEventListener(XI,this.listenerScrollDepth),this.mp.get_config("record_heatmap_data")){dN.log("Initializing scroll depth tracking"),this.maxScrollViewDepth=Math.max(AE.documentElement.clientHeight,vm.innerHeight||0);var e=CN(function(){if(!this.currentUrlBlocked()){var e=Math.max(AE.documentElement.clientHeight,vm.innerHeight||0)+vm.scrollY;e>this.maxScrollViewDepth&&(this.maxScrollViewDepth=e),this.previousScrollHeight=AE.body.scrollHeight}}.bind(this));this.listenerScrollDepth=e.listener,vm.addEventListener(e.eventType,this.listenerScrollDepth)}},lO.prototype.initClickTracking=function(){vm.removeEventListener(KI,this.listenerClick),(this.getConfig(GN)||this.mp.get_config("record_heatmap_data"))&&(dN.log("Initializing click tracking"),this.listenerClick=function(e){(this.getConfig(GN)||this.mp.is_recording_heatmap_data())&&this.trackDomEvent(e,oO)}.bind(this),vm.addEventListener(KI,this.listenerClick))},lO.prototype.initDeadClickTracking=function(){this._getClickTrackingConfig(JN)||this.mp.get_config("record_heatmap_data")?(dN.log("Initializing dead click tracking"),this._deadClickTracker||(this._deadClickTracker=new LN(function(e){this.trackDomEvent(e,aO)}.bind(this)),this._deadClickTracker.startTracking()),this.listenerDeadClick||(this.listenerDeadClick=function(e){var t=this._getClickTrackingConfig(JN);if((t||this.mp.is_recording_heatmap_data())&&!this.currentUrlBlocked()){var n=t||{};n.timeout_ms||(n.timeout_ms=500),this._deadClickTracker.trackClick(e,n)}}.bind(this),vm.addEventListener(KI,this.listenerDeadClick))):this.stopDeadClickTracking()},lO.prototype.initInputTracking=function(){vm.removeEventListener(HI,this.listenerChange),this.getConfig(YN)&&(dN.log("Initializing input tracking"),this.listenerChange=function(e){this.getConfig(YN)&&this.trackDomEvent(e,"$mp_input_change")}.bind(this),vm.addEventListener(HI,this.listenerChange))},lO.prototype.initPageviewTracking=function(){if(vm.removeEventListener(JI,this.listenerLocationchange),this.pageviewTrackingConfig()){dN.log("Initializing pageview tracking");var e="",t=!1;this.currentUrlBlocked()||(t=this.mp.track_pageview(iO)),t&&(e=VE.info.currentUrl()),this.listenerLocationchange=KE(function(){if(!this.currentUrlBlocked()){var t=VE.info.currentUrl(),n=!1,r=t.split("#")[0].split("?")[0]!==e.split("#")[0].split("?")[0],i=this.pageviewTrackingConfig();if(i===FN?n=t!==e:"url-with-path-and-query-string"===i?n=t.split("#")[0]!==e.split("#")[0]:"url-with-path"===i&&(n=r),n)this.mp.track_pageview(iO)&&(e=t),r&&(this.lastScrollCheckpoint=0,dN.log("Path change: re-initializing scroll depth checkpoints"))}}.bind(this)),vm.addEventListener(JI,this.listenerLocationchange)}},lO.prototype.initRageClickTracking=function(){vm.removeEventListener(KI,this.listenerRageClick),(this._getClickTrackingConfig(QN)||this.mp.get_config("record_heatmap_data"))&&(dN.log("Initializing rage click tracking"),this._rageClickTracker||(this._rageClickTracker=new TN),this.listenerRageClick=function(e){var t=this._getClickTrackingConfig(QN);(t||this.mp.is_recording_heatmap_data())&&(this.currentUrlBlocked()||this._rageClickTracker.isRageClick(e,t)&&this.trackDomEvent(e,sO))}.bind(this),vm.addEventListener(KI,this.listenerRageClick))},lO.prototype.initScrollTracking=function(){if(vm.removeEventListener(XI,this.listenerScroll),vm.removeEventListener(QI,this.listenerScroll),this.getConfig(eO)){dN.log("Initializing scroll tracking"),this.lastScrollCheckpoint=0;var e=function(){if(this.getConfig(eO)&&!this.currentUrlBlocked()){var e=this.getConfig(KN),t=(this.getConfig(ZN)||[]).slice().sort(function(e,t){return e-t}),n=vm.scrollY,r=VE.extend({$scroll_top:n},iO);try{var i=AE.body.scrollHeight,o=Math.round(n/(i-vm.innerHeight)*100);if(r.$scroll_height=i,r.$scroll_percentage=o,o>this.lastScrollCheckpoint)for(var a=0;a<t.length;a++){var s=t[a];o>=s&&this.lastScrollCheckpoint<s&&(r.$scroll_checkpoint=s,this.lastScrollCheckpoint=s,e=!0)}}catch(vF){dN.critical("Error while calculating scroll percentage",vF)}e&&this.mp.track("$mp_scroll",r)}}.bind(this),t=CN(e);this.listenerScroll=t.listener,vm.addEventListener(t.eventType,this.listenerScroll)}},lO.prototype.initSubmitTracking=function(){vm.removeEventListener(eN,this.listenerSubmit),this.getConfig(nO)&&(dN.log("Initializing submit tracking"),this.listenerSubmit=function(e){this.getConfig(nO)&&this.trackDomEvent(e,"$mp_submit")}.bind(this),vm.addEventListener(eN,this.listenerSubmit))},lO.prototype.initPageLeaveTracking=function(){if(AE.removeEventListener(tN,this.listenerPageLeaveVisibilitychange),vm.removeEventListener(JI,this.listenerPageLeaveLocationchange),vm.removeEventListener(GI,this.listenerPageLoad),this.getConfig(tO)||this.mp.get_config("record_heatmap_data")){dN.log("Initializing page visibility tracking."),this._initScrollDepthTracking();var e=VE.info.currentUrl();this.listenerPageLoad=function(){this.previousScrollHeight=AE.body.scrollHeight}.bind(this),vm.addEventListener(GI,this.listenerPageLoad),this.listenerPageLeaveLocationchange=KE(function(t){if(!this.currentUrlBlocked()){var n=VE.info.currentUrl();n!==e&&(this._trackPageLeave(t,e,this.previousScrollHeight),e=n,this.maxScrollViewDepth=Math.max(AE.documentElement.clientHeight,vm.innerHeight||0),this.previousScrollHeight=AE.body.scrollHeight,this.hasTrackedScrollSession=!1)}}.bind(this)),vm.addEventListener(JI,this.listenerPageLeaveLocationchange),this.listenerPageLeaveVisibilitychange=function(t){AE.hidden&&this._trackPageLeave(t,e,this.previousScrollHeight)}.bind(this),AE.addEventListener(tN,this.listenerPageLeaveVisibilitychange)}},lO.prototype.stopDeadClickTracking=function(){this.listenerDeadClick&&(vm.removeEventListener(KI,this.listenerDeadClick),this.listenerDeadClick=null),this._deadClickTracker&&(this._deadClickTracker.stopTracking(),this._deadClickTracker=null)},ZE(lO);var cO=HE("flags"),uO="flags",dO="context",pO={};pO[dO]={};var fO=function(e){this.fetch=vm.fetch,this.getFullApiRoute=e.getFullApiRoute,this.getMpConfig=e.getConfigFunc,this.setMpConfig=e.setConfigFunc,this.getMpProperty=e.getPropertyFunc,this.track=e.trackingFunc};fO.prototype.init=function(){this.minApisSupported()?(this.flags=null,this.fetchFlags(),this.trackedFeatures=new Set):cO.critical("Feature Flags unavailable: missing minimum required APIs")},fO.prototype.getFullConfig=function(){var e=this.getMpConfig(uO);return e?VE.isObject(e)?VE.extend({},pO,e):pO:{}},fO.prototype.getConfig=function(e){return this.getFullConfig()[e]},fO.prototype.isSystemEnabled=function(){return!!this.getMpConfig(uO)},fO.prototype.updateContext=function(e,t){if(!this.isSystemEnabled())return cO.critical("Feature Flags not enabled, cannot update context"),Promise.resolve();var n=this.getMpConfig(uO);VE.isObject(n)||(n={});var r=t&&t.replace?{}:this.getConfig(dO);return n[dO]=VE.extend({},r,e),this.setMpConfig(uO,n),this.fetchFlags()},fO.prototype.areFlagsReady=function(){return this.isSystemEnabled()||cO.error("Feature Flags not enabled"),!!this.flags},fO.prototype.fetchFlags=function(){if(!this.isSystemEnabled())return Promise.resolve();var e=this.getMpProperty("distinct_id"),t=this.getMpProperty("$device_id"),n="00-"+VE.UUID().replace(/-/g,"")+"-"+VE.UUID().replace(/-/g,"").substring(0,16)+"-01";cO.log("Fetching flags for distinct ID: "+e);var r=VE.extend({distinct_id:e,device_id:t},this.getConfig(dO)),i=new URLSearchParams;i.set("context",JSON.stringify(r)),i.set("token",this.getMpConfig("token")),i.set("mp_lib","web"),i.set("$lib_version",kE.LIB_VERSION);var o=this.getFullApiRoute()+"?"+i.toString();return this._fetchInProgressStartTime=Date.now(),this.fetchPromise=this.fetch.call(vm,o,{method:"GET",headers:{Authorization:"Basic "+btoa(this.getMpConfig("token")+":"),traceparent:n}}).then(function(e){return this.markFetchComplete(),e.json().then(function(e){var t=e.flags;if(!t)throw new Error("No flags in API response");var r=new Map;VE.each(t,function(e,t){r.set(t,{key:e.variant_key,value:e.variant_value,experiment_id:e.experiment_id,is_experiment_active:e.is_experiment_active,is_qa_tester:e.is_qa_tester})}),this.flags=r,this._traceparent=n}.bind(this)).catch(function(e){this.markFetchComplete(),cO.error(e)}.bind(this))}.bind(this)).catch(function(e){this.markFetchComplete(),cO.error(e)}.bind(this)),this.fetchPromise},fO.prototype.markFetchComplete=function(){this._fetchInProgressStartTime?(this._fetchStartTime=this._fetchInProgressStartTime,this._fetchCompleteTime=Date.now(),this._fetchLatency=this._fetchCompleteTime-this._fetchStartTime,this._fetchInProgressStartTime=null):cO.error("Fetch in progress started time not set, cannot mark fetch complete")},fO.prototype.getVariant=function(e,t){return this.fetchPromise?this.fetchPromise.then(function(){return this.getVariantSync(e,t)}.bind(this)).catch(function(e){return cO.error(e),t}):new Promise(function(e){cO.critical("Feature Flags not initialized"),e(t)})},fO.prototype.getVariantSync=function(e,t){if(!this.areFlagsReady())return cO.log("Flags not loaded yet"),t;var n=this.flags.get(e);return n?(this.trackFeatureCheck(e,n),n):(cO.log('No flag found: "'+e+'"'),t)},fO.prototype.getVariantValue=function(e,t){return this.getVariant(e,{value:t}).then(function(e){return e.value}).catch(function(e){return cO.error(e),t})},fO.prototype.getFeatureData=function(e,t){return cO.critical("mixpanel.flags.get_feature_data() is deprecated and will be removed in a future release. Use mixpanel.flags.get_variant_value() instead."),this.getVariantValue(e,t)},fO.prototype.getVariantValueSync=function(e,t){return this.getVariantSync(e,{value:t}).value},fO.prototype.isEnabled=function(e,t){return this.getVariantValue(e).then(function(){return this.isEnabledSync(e,t)}.bind(this)).catch(function(e){return cO.error(e),t})},fO.prototype.isEnabledSync=function(e,t){t=t||!1;var n=this.getVariantValueSync(e,t);return!0!==n&&!1!==n&&(cO.error('Feature flag "'+e+'" value: '+n+" is not a boolean; returning fallback value: "+t),n=t),n},fO.prototype.trackFeatureCheck=function(e,t){if(!this.trackedFeatures.has(e)){this.trackedFeatures.add(e);var n={"Experiment name":e,"Variant name":t.key,$experiment_type:"feature_flag","Variant fetch start time":new Date(this._fetchStartTime).toISOString(),"Variant fetch complete time":new Date(this._fetchCompleteTime).toISOString(),"Variant fetch latency (ms)":this._fetchLatency,"Variant fetch traceparent":this._traceparent};"undefined"!==t.experiment_id&&(n.$experiment_id=t.experiment_id),"undefined"!==t.is_experiment_active&&(n.$is_experiment_active=t.is_experiment_active),"undefined"!==t.is_qa_tester&&(n.$is_qa_tester=t.is_qa_tester),this.track("$experiment_started",n)}},fO.prototype.minApisSupported=function(){return!!this.fetch&&"undefined"!=typeof Promise&&"undefined"!=typeof Map&&"undefined"!=typeof Set},ZE(fO),fO.prototype.are_flags_ready=fO.prototype.areFlagsReady,fO.prototype.get_variant=fO.prototype.getVariant,fO.prototype.get_variant_sync=fO.prototype.getVariantSync,fO.prototype.get_variant_value=fO.prototype.getVariantValue,fO.prototype.get_variant_value_sync=fO.prototype.getVariantValueSync,fO.prototype.is_enabled=fO.prototype.isEnabled,fO.prototype.is_enabled_sync=fO.prototype.isEnabledSync,fO.prototype.update_context=fO.prototype.updateContext,fO.prototype.get_feature_data=fO.prototype.getFeatureData;var hO=function(){};hO.prototype.create_properties=function(){},hO.prototype.event_handler=function(){},hO.prototype.after_track_handler=function(){},hO.prototype.init=function(e){return this.mp=e,this},hO.prototype.track=function(e,t,n,r){var i=this,o=VE.dom_query(e);if(0!==o.length)return VE.each(o,function(e){VE.register_event(e,this.override_event,function(e){var o={},a=i.create_properties(n,this),s=i.mp.get_config("track_links_timeout");i.event_handler(e,this,o),window.setTimeout(i.track_callback(r,a,o,!0),s),i.mp.track(t,a,i.track_callback(r,a,o))})},this),!0;WE.error("The DOM query ("+e+") returned 0 elements")},hO.prototype.track_callback=function(e,t,n,r){r=r||!1;var i=this;return function(){n.callback_fired||(n.callback_fired=!0,e&&!1===e(r,t)||i.after_track_handler(t,n,r))}},hO.prototype.create_properties=function(e,t){return"function"==typeof e?e(t):VE.extend({},e)};var mO=function(){this.override_event="click"};VE.inherit(mO,hO),mO.prototype.create_properties=function(e,t){var n=mO.superclass.create_properties.apply(this,arguments);return t.href&&(n.url=t.href),n},mO.prototype.event_handler=function(e,t,n){n.new_tab=2===e.which||e.metaKey||e.ctrlKey||"_blank"===t.target,n.href=t.href,n.new_tab||e.preventDefault()},mO.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var gO=function(){this.override_event="submit"};VE.inherit(gO,hO),gO.prototype.event_handler=function(e,t,n){n.element=t,e.preventDefault()},gO.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var vO="$set",yO="$set_once",bO="$unset",xO="$add",wO="$append",kO="$union",_O="$remove",SO={set_action:function(e,t){var n={},r={};return VE.isObject(e)?VE.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[vO]=r,n},unset_action:function(e){var t={},n=[];return VE.isArray(e)||(e=[e]),VE.each(e,function(e){this._is_reserved_property(e)||n.push(e)},this),t[bO]=n,t},set_once_action:function(e,t){var n={},r={};return VE.isObject(e)?VE.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[yO]=r,n},union_action:function(e,t){var n={},r={};return VE.isObject(e)?VE.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=VE.isArray(e)?e:[e])},this):r[e]=VE.isArray(t)?t:[t],n[kO]=r,n},append_action:function(e,t){var n={},r={};return VE.isObject(e)?VE.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[wO]=r,n},remove_action:function(e,t){var n={},r={};return VE.isObject(e)?VE.each(e,function(e,t){this._is_reserved_property(t)||(r[t]=e)},this):r[e]=t,n[_O]=r,n},delete_action:function(){var e={$delete:""};return e}},CO=function(){};VE.extend(CO.prototype,SO),CO.prototype._init=function(e,t,n){this._mixpanel=e,this._group_key=t,this._group_id=n},CO.prototype.set=wI(function(e,t,n){var r=this.set_action(e,t);return VE.isObject(e)&&(n=t),this._send_request(r,n)}),CO.prototype.set_once=wI(function(e,t,n){var r=this.set_once_action(e,t);return VE.isObject(e)&&(n=t),this._send_request(r,n)}),CO.prototype.unset=wI(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)}),CO.prototype.union=wI(function(e,t,n){VE.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)}),CO.prototype.delete=wI(function(e){var t=this.delete_action();return this._send_request(t,e)}),CO.prototype.remove=wI(function(e,t,n){var r=this.remove_action(e,t);return this._send_request(r,n)}),CO.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var n=VE.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:n,endpoint:this._mixpanel.get_api_host("groups")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)},CO.prototype._is_reserved_property=function(e){return"$group_key"===e||"$group_id"===e},CO.prototype._get_config=function(e){return this._mixpanel.get_config(e)},CO.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id},CO.prototype.remove=CO.prototype.remove,CO.prototype.set=CO.prototype.set,CO.prototype.set_once=CO.prototype.set_once,CO.prototype.union=CO.prototype.union,CO.prototype.unset=CO.prototype.unset,CO.prototype.toString=CO.prototype.toString;var EO=function(){};VE.extend(EO.prototype,SO),EO.prototype._init=function(e){this._mixpanel=e},EO.prototype.set=xI(function(e,t,n){var r=this.set_action(e,t);return VE.isObject(e)&&(n=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),r[vO]=VE.extend({},VE.info.people_properties(),r[vO]),this._send_request(r,n)}),EO.prototype.set_once=xI(function(e,t,n){var r=this.set_once_action(e,t);return VE.isObject(e)&&(n=t),this._send_request(r,n)}),EO.prototype.unset=xI(function(e,t){var n=this.unset_action(e);return this._send_request(n,t)}),EO.prototype.increment=xI(function(e,t,n){var r={},i={};return VE.isObject(e)?(VE.each(e,function(e,t){if(!this._is_reserved_property(t)){if(isNaN(parseFloat(e)))return void WE.error("Invalid increment value passed to mixpanel.people.increment - must be a number");i[t]=e}},this),n=t):(VE.isUndefined(t)&&(t=1),i[e]=t),r[xO]=i,this._send_request(r,n)}),EO.prototype.append=xI(function(e,t,n){VE.isObject(e)&&(n=t);var r=this.append_action(e,t);return this._send_request(r,n)}),EO.prototype.remove=xI(function(e,t,n){VE.isObject(e)&&(n=t);var r=this.remove_action(e,t);return this._send_request(r,n)}),EO.prototype.union=xI(function(e,t,n){VE.isObject(e)&&(n=t);var r=this.union_action(e,t);return this._send_request(r,n)}),EO.prototype.track_charge=xI(function(){WE.error("mixpanel.people.track_charge() is deprecated and no longer has any effect.")}),EO.prototype.clear_charges=function(e){return this.set("$transactions",[],e)},EO.prototype.delete_user=function(){if(this._identify_called()){var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)}WE.error("mixpanel.people.delete_user() requires you to call identify() first")},EO.prototype.toString=function(){return this._mixpanel.toString()+".people"},EO.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var n=this._mixpanel.get_property("$device_id"),r=this._mixpanel.get_property("$user_id"),i=this._mixpanel.get_property("$had_persisted_distinct_id");n&&(e.$device_id=n),r&&(e.$user_id=r),i&&(e.$had_persisted_distinct_id=i);var o=VE.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._mixpanel.get_api_host("people")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),VE.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),VE.truncate(o,255))},EO.prototype._get_config=function(e){return this._mixpanel.get_config(e)},EO.prototype._identify_called=function(){return!0===this._mixpanel._flags.identify_called},EO.prototype._enqueue=function(e){vO in e?this._mixpanel.persistence._add_to_people_queue(vO,e):yO in e?this._mixpanel.persistence._add_to_people_queue(yO,e):bO in e?this._mixpanel.persistence._add_to_people_queue(bO,e):xO in e?this._mixpanel.persistence._add_to_people_queue(xO,e):wO in e?this._mixpanel.persistence._add_to_people_queue(wO,e):_O in e?this._mixpanel.persistence._add_to_people_queue(_O,e):kO in e?this._mixpanel.persistence._add_to_people_queue(kO,e):WE.error("Invalid call to _enqueue():",e)},EO.prototype._flush_one_queue=function(e,t,n,r){var i=this,o=VE.extend({},this._mixpanel.persistence.load_queue(e)),a=o;VE.isUndefined(o)||!VE.isObject(o)||VE.isEmptyObject(o)||(i._mixpanel.persistence._pop_from_people_queue(e,o),i._mixpanel.persistence.save(),r&&(a=r(o)),t.call(i,a,function(t,r){0===t&&i._mixpanel.persistence._add_to_people_queue(e,o),VE.isUndefined(n)||n(t,r)}))},EO.prototype._flush=function(e,t,n,r,i,o,a){var s=this;this._flush_one_queue(vO,this.set,e),this._flush_one_queue(yO,this.set_once,r),this._flush_one_queue(bO,this.unset,o,function(e){return VE.keys(e)}),this._flush_one_queue(xO,this.increment,t),this._flush_one_queue(kO,this.union,i);var l=this._mixpanel.persistence.load_queue(wO);if(!VE.isUndefined(l)&&VE.isArray(l)&&l.length)for(var c,u=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue(wO,c),VE.isUndefined(n)||n(e,t)},d=l.length-1;d>=0;d--)l=this._mixpanel.persistence.load_queue(wO),c=l.pop(),s._mixpanel.persistence.save(),VE.isEmptyObject(c)||s.append(c,u);var p=this._mixpanel.persistence.load_queue(_O);if(!VE.isUndefined(p)&&VE.isArray(p)&&p.length)for(var f,h=function(e,t){0===e&&s._mixpanel.persistence._add_to_people_queue(_O,f),VE.isUndefined(a)||a(e,t)},m=p.length-1;m>=0;m--)p=this._mixpanel.persistence.load_queue(_O),f=p.pop(),s._mixpanel.persistence.save(),VE.isEmptyObject(f)||s.remove(f,h)},EO.prototype._is_reserved_property=function(e){return"$distinct_id"===e||"$token"===e||"$device_id"===e||"$user_id"===e||"$had_persisted_distinct_id"===e},EO.prototype.set=EO.prototype.set,EO.prototype.set_once=EO.prototype.set_once,EO.prototype.unset=EO.prototype.unset,EO.prototype.increment=EO.prototype.increment,EO.prototype.append=EO.prototype.append,EO.prototype.remove=EO.prototype.remove,EO.prototype.union=EO.prototype.union,EO.prototype.track_charge=EO.prototype.track_charge,EO.prototype.clear_charges=EO.prototype.clear_charges,EO.prototype.delete_user=EO.prototype.delete_user,EO.prototype.toString=EO.prototype.toString;var IO,NO="__mps",OO="__mpso",TO="__mpus",RO="__mpa",jO="__mpap",AO="__mpr",PO="__mpu",MO="$people_distinct_id",LO="__alias",DO="__timers",FO=[NO,OO,TO,RO,jO,AO,PO,MO,LO,DO],zO=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;"cookie"!==t&&"localStorage"!==t&&(WE.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),"localStorage"===t&&VE.localStorage.is_supported()?this.storage=VE.localStorage:this.storage=VE.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};zO.prototype.properties=function(){var e={};return this.load(),VE.each(this.props,function(t,n){VE.include(FO,n)||(e[n]=t)}),e},zO.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=VE.extend({},e))}},zO.prototype.upgrade=function(){var e,t;this.storage===VE.localStorage?(e=VE.cookie.parse(this.name),VE.cookie.remove(this.name),VE.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===VE.cookie&&(t=VE.localStorage.parse(this.name),VE.localStorage.remove(this.name),t&&this.register_once(t))},zO.prototype.save=function(){this.disabled||this.storage.set(this.name,cI(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)},zO.prototype.load_prop=function(e){return this.load(),this.props[e]},zO.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)},zO.prototype.clear=function(){this.remove(),this.props={}},zO.prototype.register_once=function(e,t,n){return!!VE.isObject(e)&&(void 0===t&&(t="None"),this.expire_days=void 0===n?this.default_expiry:n,this.load(),VE.each(e,function(e,n){this.props.hasOwnProperty(n)&&this.props[n]!==t||(this.props[n]=e)},this),this.save(),!0)},zO.prototype.register=function(e,t){return!!VE.isObject(e)&&(this.expire_days=void 0===t?this.default_expiry:t,this.load(),VE.extend(this.props,e),this.save(),!0)},zO.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())},zO.prototype.update_search_keyword=function(e){this.register(VE.info.searchInfo(e))},zO.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:VE.info.referringDomain(e)||"$direct"},"")},zO.prototype.get_referrer_info=function(){return VE.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},zO.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},zO.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},zO.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())},zO.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())},zO.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},zO.prototype.get_cross_subdomain=function(){return this.cross_subdomain},zO.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},zO.prototype._add_to_people_queue=function(e,t){var n=this._get_queue_key(e),r=t[e],i=this._get_or_create_queue(vO),o=this._get_or_create_queue(yO),a=this._get_or_create_queue(bO),s=this._get_or_create_queue(xO),l=this._get_or_create_queue(kO),c=this._get_or_create_queue(_O,[]),u=this._get_or_create_queue(wO,[]);n===NO?(VE.extend(i,r),this._pop_from_people_queue(xO,r),this._pop_from_people_queue(kO,r),this._pop_from_people_queue(bO,r)):n===OO?(VE.each(r,function(e,t){t in o||(o[t]=e)}),this._pop_from_people_queue(bO,r)):n===TO?VE.each(r,function(e){VE.each([i,o,s,l],function(t){e in t&&delete t[e]}),VE.each(u,function(t){e in t&&delete t[e]}),a[e]=!0}):n===RO?(VE.each(r,function(e,t){t in i?i[t]+=e:(t in s||(s[t]=0),s[t]+=e)},this),this._pop_from_people_queue(bO,r)):n===PO?(VE.each(r,function(e,t){VE.isArray(e)&&(t in l||(l[t]=[]),VE.each(e,function(e){VE.include(l[t],e)||l[t].push(e)}))}),this._pop_from_people_queue(bO,r)):n===AO?(c.push(r),this._pop_from_people_queue(wO,r)):n===jO&&(u.push(r),this._pop_from_people_queue(bO,r)),WE.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),WE.log(t),this.save()},zO.prototype._pop_from_people_queue=function(e,t){var n=this.props[this._get_queue_key(e)];VE.isUndefined(n)||VE.each(t,function(t,r){e===wO||e===_O?VE.each(n,function(e){e[r]===t&&delete e[r]}):delete n[r]},this)},zO.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))},zO.prototype._get_queue_key=function(e){return e===vO?NO:e===yO?OO:e===bO?TO:e===xO?RO:e===wO?jO:e===_O?AO:e===kO?PO:void WE.error("Invalid queue:",e)},zO.prototype._get_or_create_queue=function(e,t){var n=this._get_queue_key(e);return t=VE.isUndefined(t)?{}:t,this.props[n]||(this.props[n]=t)},zO.prototype.set_event_timer=function(e,t){var n=this.load_prop(DO)||{};n[e]=t,this.props[DO]=n,this.save()},zO.prototype.remove_event_timer=function(e){var t=(this.load_prop(DO)||{})[e];return VE.isUndefined(t)||(delete this.props[DO][e],this.save()),t};var UO,BO=function(e,t){throw new Error(e+" not available in this build.")},$O=function(e){return e},VO="mixpanel",WO="base64",qO="$device:",HO=vm.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,KO=!HO&&-1===LE.indexOf("MSIE")&&-1===LE.indexOf("Mozilla"),ZO=null;jE.sendBeacon&&(ZO=function(){return jE.sendBeacon.apply(jE,arguments)});var GO={track:"track/",engage:"engage/",groups:"groups/",record:"record/",flags:"flags/"},JO={api_host:"https://api-js.mixpanel.com",api_hosts:{},api_routes:GO,api_extra_query_params:{},api_method:"POST",api_transport:"XHR",api_payload_format:WO,app_host:"https://mixpanel.com",autocapture:!1,cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:lI,flags:!1,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:lI,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video, audio",record_canvas:!1,record_collect_fonts:!1,record_console:!0,record_heatmap_data:!1,record_idle_timeout_ms:18e5,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:_E,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},YO=!1,XO=function(){},QO=function(e,t,n){var r,i=n===VO?UO:UO[n];if(i&&0===IO)r=i;else{if(i&&!VE.isArray(i))return void WE.error("You have already initialized "+n);r=new XO}if(r._cached_groups={},r._init(e,t,n),r.people=new EO,r.people._init(r),!r.get_config("skip_first_touch_marketing")){var o=VE.info.campaignParams(null),a={},s=!1;VE.each(o,function(e,t){a["initial_"+t]=e,e&&(s=!0)}),s&&r.people.set_once(a)}return kE.DEBUG=kE.DEBUG||r.get_config("debug"),!VE.isUndefined(i)&&VE.isArray(i)&&(r._execute_array.call(r.people,i.people),r._execute_array(i)),r};XO.prototype.init=function(e,t,n){if(VE.isUndefined(n))this.report_error("You must name your new library: init(token, config, name)");else{if(n!==VO){var r=QO(e,t,n);return UO[n]=r,r._loaded(),r}this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet")}},XO.prototype._init=function(e,t,n){t=t||{},this.__loaded=!0,this.config={};var r={};"api_payload_format"in t||(t.api_host||JO.api_host).match(/\.mixpanel\.com/)&&(r.api_payload_format="json");if(this.set_config(VE.extend({},JO,r,t,{name:n,token:e,callback_fn:(n===VO?n:VO+"."+n)+"._jsc"})),this._jsc=lI,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests)if(VE.localStorage.is_supported(!0)&&HO){if(this.init_batchers(),ZO&&vm.addEventListener){var i=VE.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);vm.addEventListener("pagehide",function(e){e.persisted&&i()}),vm.addEventListener("visibilitychange",function(){"hidden"===AE.visibilityState&&i()})}}else this._batch_requests=!1,WE.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),VE.each(this.get_batcher_configs(),function(e){WE.log("Clearing batch queue "+e.queue_key),VE.localStorage.remove(e.queue_key)});this.persistence=this.cookie=new zO(this.config),this.unpersisted_superprops={},this._gdpr_init();var o=VE.UUID();this.get_distinct_id()||this.register_once({distinct_id:qO+o,$device_id:o},""),this.flags=new fO({getFullApiRoute:VE.bind(function(){return this.get_api_host("flags")+"/"+this.get_config("api_routes").flags},this),getConfigFunc:VE.bind(this.get_config,this),setConfigFunc:VE.bind(this.set_config,this),getPropertyFunc:VE.bind(this.get_property,this),trackingFunc:VE.bind(this.track,this)}),this.flags.init(),this.flags=this.flags,this.autocapture=new lO(this),this.autocapture.init(),this._init_tab_id(),this._check_and_start_session_recording()},XO.prototype._init_tab_id=function(){if(this.get_config("disable_persistence"))WE.log("Tab ID initialization skipped due to disable_persistence config");else if(VE.sessionStorage.is_supported())try{var e=this.get_config("name")+"_"+this.get_config("token"),t="mp_tab_id_"+e,n="mp_gen_new_tab_id_"+e;!VE.sessionStorage.get(n)&&VE.sessionStorage.get(t)||VE.sessionStorage.set(t,"$tab-"+VE.UUID()),VE.sessionStorage.set(n,"1"),this.tab_id=VE.sessionStorage.get(t),vm.addEventListener("beforeunload",function(){VE.sessionStorage.remove(n)})}catch(vF){this.report_error("Error initializing tab id",vF)}else this.report_error("Session storage is not supported, cannot keep track of unique tab ID.")},XO.prototype.get_tab_id=function(){return this.tab_id||null},XO.prototype._should_load_recorder=function(){if(this.get_config("disable_persistence"))return WE.log("Load recorder check skipped due to disable_persistence config"),Promise.resolve(!1);var e=new hI(pI),t=this.get_tab_id();return e.init().then(function(){return e.getAll()}).then(function(e){for(var n=0;n<e.length;n++)if(DI(e[n])||e[n].tabId===t)return!0;return!1}).catch(VE.bind(function(e){this.report_error("Error checking recording registry",e)},this))},XO.prototype._check_and_start_session_recording=bI(function(e){if(vm.MutationObserver){var t=VE.bind(function(e){var t=VE.bind(function(){this._recorder=this._recorder||new vm.__mp_recorder(this),this._recorder.resumeRecording(e)},this);VE.isUndefined(vm.__mp_recorder)?BO(this.get_config("recorder_src"),t):t()},this),n=this.get_config("record_sessions_percent")>0&&100*Math.random()<=this.get_config("record_sessions_percent");e||n?t(!0):this._should_load_recorder().then(function(e){e&&t(!1)})}else WE.critical("Browser does not support MutationObserver; skipping session recording")}),XO.prototype.start_session_recording=function(){this._check_and_start_session_recording(!0)},XO.prototype.stop_session_recording=function(){return this._recorder?this._recorder.stopRecording():Promise.resolve()},XO.prototype.pause_session_recording=function(){return this._recorder?this._recorder.pauseRecording():Promise.resolve()},XO.prototype.resume_session_recording=function(){return this._recorder?this._recorder.resumeRecording():Promise.resolve()},XO.prototype.is_recording_heatmap_data=function(){return this._get_session_replay_id()&&this.get_config("record_heatmap_data")},XO.prototype.get_session_recording_properties=function(){var e={},t=this._get_session_replay_id();return t&&(e.$mp_replay_id=t),e},XO.prototype.get_session_replay_url=function(){var e=null,t=this._get_session_replay_id();t&&(e="https://mixpanel.com/projects/replay-redirect?"+VE.HTTPBuildQuery({replay_id:t,distinct_id:this.get_distinct_id(),token:this.get_config("token")}));return e},XO.prototype._get_session_replay_id=function(){var e=null;return this._recorder&&(e=this._recorder.replayId),e||null},XO.prototype.__get_recorder=function(){return this._recorder},XO.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=VE.info.campaignParams(null);VE.each(e,function(e,t){this.unregister(t)}.bind(this))}},XO.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(AE.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(VE.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(AE.referrer)},XO.prototype._dom_loaded=function(){VE.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||VE.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue},XO.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!YO)return this.__dom_loaded_queue.push([e,t]),!1;var n=(new e).init(this);return n.track.apply(n,t)},XO.prototype._prepare_callback=function(e,t){if(VE.isUndefined(e))return null;if(HO){return function(n){e(n,t)}}var n=this._jsc,r=""+Math.floor(1e8*Math.random()),i=this.get_config("callback_fn")+"["+r+"]";return n[r]=function(i){delete n[r],e(i,t)},i},XO.prototype._send_request=function(e,t,n,r){var i=!0;if(KO)return this.__request_queue.push(arguments),i;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")},a=null;r||!VE.isFunction(n)&&"string"!=typeof n||(r=n,n=null),n=VE.extend(o,n||{}),HO||(n.method="GET");var s="POST"===n.method,l=ZO&&s&&"sendbeacon"===n.transport.toLowerCase(),c=n.verbose;t.verbose&&(c=!0),this.get_config("test")&&(t.test=1),c&&(t.verbose=1),this.get_config("img")&&(t.img=1),HO||(r?t.callback=r:(c||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=(new Date).getTime().toString(),s&&(a="data="+encodeURIComponent(t.data),delete t.data),VE.extend(t,this.get_config("api_extra_query_params")),e+="?"+VE.HTTPBuildQuery(t);var u=this;if("img"in t){var d=AE.createElement("img");d.src=e,AE.body.appendChild(d)}else if(l){try{i=ZO(e,a)}catch(rh){u.report_error(rh),i=!1}try{r&&r(i?1:0)}catch(rh){u.report_error(rh)}}else if(HO)try{var p=new XMLHttpRequest;p.open(n.method,e,!0);var f=this.get_config("xhr_headers");if(s&&(f["Content-Type"]="application/x-www-form-urlencoded"),VE.each(f,function(e,t){p.setRequestHeader(t,e)}),n.timeout_ms&&void 0!==p.timeout){p.timeout=n.timeout_ms;var h=(new Date).getTime()}p.withCredentials=!0,p.onreadystatechange=function(){var e;if(4===p.readyState)if(200===p.status){if(r)if(c){var t;try{t=VE.JSONDecode(p.responseText)}catch(rh){if(u.report_error(rh),!n.ignore_json_errors)return;t=p.responseText}r(t)}else r(Number(p.responseText))}else if(e=p.timeout&&!p.status&&(new Date).getTime()-h>=p.timeout?"timeout":"Bad HTTP status: "+p.status+" "+p.statusText,u.report_error(e),r)if(c){var i=p.responseHeaders||{};r({status:0,httpStatusCode:p.status,error:e,retryAfter:i["Retry-After"]})}else r(0)},p.send(a)}catch(rh){u.report_error(rh),i=!1}else{var m=AE.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var g=AE.getElementsByTagName("script")[0];g.parentNode.insertBefore(m,g)}return i},XO.prototype._execute_array=function(e){var t,n=[],r=[],i=[];VE.each(e,function(e){e&&(t=e[0],VE.isArray(t)?i.push(e):"function"==typeof e?e.call(this):VE.isArray(e)&&"alias"===t?n.push(e):VE.isArray(e)&&-1!==t.indexOf("track")&&"function"==typeof this[t]?i.push(e):r.push(e))},this);var o=function(e,t){VE.each(e,function(e){if(VE.isArray(e[0])){var n=t;VE.each(e,function(e){n=n[e[0]].apply(n,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};o(n,this),o(r,this),o(i,this)},XO.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events},XO.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token");return this._batcher_configs=this._batcher_configs||{events:{type:"events",api_name:"track",queue_key:e+"_ev"},people:{type:"people",api_name:"engage",queue_key:e+"_pp"},groups:{type:"groups",api_name:"groups",queue_key:e+"_gr"}},this._batcher_configs},XO.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=VE.bind(function(e){return new LI(e.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:VE.bind(function(t,n,r){var i=this.get_config("api_routes");this._send_request(this.get_api_host(e.api_name)+"/"+i[e.api_name],this._encode_data_for_request(t),n,this._prepare_callback(r,t))},this),beforeSendHook:VE.bind(function(t){return this._run_hook("before_send_"+e.type,t)},this),stopAllBatchingFunc:VE.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()},XO.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,VE.each(this.request_batchers,function(e){e.start()}))},XO.prototype.stop_batch_senders=function(){this._batch_requests=!1,VE.each(this.request_batchers,function(e){e.stop(),e.clear()})},XO.prototype.push=function(e){this._execute_array([e])},XO.prototype.disable=function(e){void 0===e?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)},XO.prototype._encode_data_for_request=function(e){var t=cI(e);return this.get_config("api_payload_format")===WO&&(t=VE.base64Encode(t)),{data:t}},XO.prototype._track_or_batch=function(e,t){var n=VE.truncate(e.data,255),r=e.endpoint,i=e.batcher,o=e.should_send_immediately,a=e.send_request_options||{};t=t||lI;var s=!0,l=VE.bind(function(){return a.skip_hooks||(n=this._run_hook("before_send_"+e.type,n)),n?(WE.log("MIXPANEL REQUEST:"),WE.log(n),this._send_request(r,this._encode_data_for_request(n),a,this._prepare_callback(t,n))):null},this);return this._batch_requests&&!o?i.enqueue(n).then(function(e){e?t(1,n):l()}):s=l(),s&&n},XO.prototype.track=bI(function(e,t,n,r){r||"function"!=typeof n||(r=n,n=null);var i=(n=n||{}).transport;i&&(n.transport=i);var o=n.send_immediately;if("function"!=typeof r&&(r=lI),VE.isUndefined(e))this.report_error("No event name provided to mixpanel.track");else{if(!this._event_is_disabled(e)){(t=VE.extend({},t)).token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!VE.isUndefined(a)){var s=(new Date).getTime()-a;t.$duration=parseFloat((s/1e3).toFixed(3))}this._set_default_superprops();var l=this.get_config("track_marketing")?VE.info.marketingParams():{};t=VE.extend({},VE.info.properties({mp_loader:this.get_config("mp_loader")}),l,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var c=this.get_config("property_blacklist");VE.isArray(c)?VE.each(c,function(e){delete t[e]}):this.report_error("Invalid value for property_blacklist config: "+c);var u={event:e,properties:t};return this._track_or_batch({type:"events",data:u,endpoint:this.get_api_host("events")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:n},r)}r(0)}}),XO.prototype.set_group=bI(function(e,t,n){VE.isArray(t)||(t=[t]);var r={};return r[e]=t,this.register(r),this.people.set(e,t,n)}),XO.prototype.add_group=bI(function(e,t,n){var r=this.get_property(e),i={};return void 0===r?(i[e]=[t],this.register(i)):-1===r.indexOf(t)&&(r.push(t),i[e]=r,this.register(i)),this.people.union(e,t,n)}),XO.prototype.remove_group=bI(function(e,t,n){var r=this.get_property(e);if(void 0!==r){var i=r.indexOf(t);i>-1&&(r.splice(i,1),this.register({group_key:r})),0===r.length&&this.unregister(e)}return this.people.remove(e,t,n)}),XO.prototype.track_with_groups=bI(function(e,t,n,r){var i=VE.extend({},t||{});return VE.each(n,function(e,t){null!=e&&(i[t]=e)}),this.track(e,i,r)}),XO.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)},XO.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]},XO.prototype.get_group=function(e,t){var n=this._create_map_key(e,t),r=this._cached_groups[n];return void 0!==r&&r._group_key===e&&r._group_id===t||((r=new CO)._init(this,e,t),this._cached_groups[n]=r),r},XO.prototype.track_pageview=bI(function(e,t){"object"!=typeof e&&(e={});var n=(t=t||{}).event_name||"$mp_web_page_view",r=VE.extend(VE.info.mpPageViewProperties(),VE.info.campaignParams(),VE.info.clickParams()),i=VE.extend({},r,e);return this.track(n,i)}),XO.prototype.track_links=function(){return this._track_dom.call(this,mO,arguments)},XO.prototype.track_forms=function(){return this._track_dom.call(this,gO,arguments)},XO.prototype.time_event=function(e){VE.isUndefined(e)?this.report_error("No event name provided to mixpanel.time_event"):this._event_is_disabled(e)||this.persistence.set_event_timer(e,(new Date).getTime())};var eT={persistent:!0},tT=function(e){var t;return t=VE.isObject(e)?e:VE.isUndefined(e)?{}:{days:e},VE.extend({},eT,t)};XO.prototype.register=function(e,t){var n=tT(t);n.persistent?this.persistence.register(e,n.days):VE.extend(this.unpersisted_superprops,e)},XO.prototype.register_once=function(e,t,n){var r=tT(n);r.persistent?this.persistence.register_once(e,t,r.days):(void 0===t&&(t="None"),VE.each(e,function(e,n){this.unpersisted_superprops.hasOwnProperty(n)&&this.unpersisted_superprops[n]!==t||(this.unpersisted_superprops[n]=e)},this))},XO.prototype.unregister=function(e,t){(t=tT(t)).persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]},XO.prototype._register_single=function(e,t){var n={};n[e]=t,this.register(n)},XO.prototype.identify=function(e,t,n,r,i,o,a,s){var l=this.get_distinct_id();if(e&&l!==e){if("string"==typeof e&&0===e.indexOf(qO))return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var c=l;this.register_once({$had_persisted_distinct_id:!0,$device_id:c},"")}e!==l&&e!==this.get_property(LO)&&(this.unregister(LO),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,n,r,i,o,a,s),e!==l&&this.track("$identify",{distinct_id:e,$anon_distinct_id:l},{skip_hooks:!0}),e!==l&&this.flags.fetchFlags()},XO.prototype.reset=function(){this.stop_session_recording(),this.persistence.clear(),this._flags.identify_called=!1;var e=VE.UUID();this.register_once({distinct_id:qO+e,$device_id:e},""),this._check_and_start_session_recording()},XO.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},XO.prototype.alias=function(e,t){if(e===this.get_property(MO))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var n=this;return VE.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(LO,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){n.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},XO.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)},XO.prototype.set_config=function(e){VE.isObject(e)&&(VE.extend(this.config,e),e.batch_size&&VE.each(this.request_batchers,function(e){e.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),kE.DEBUG=kE.DEBUG||this.get_config("debug"),("autocapture"in e||"record_heatmap_data"in e)&&this.autocapture&&this.autocapture.init())},XO.prototype.get_config=function(e){return this.config[e]},XO.prototype._run_hook=function(e){var t=(this.config.hooks[e]||$O).apply(this,NE.call(arguments,1));return void 0===t&&(this.report_error(e+" hook did not return a value"),t=null),t},XO.prototype.get_property=function(e){return this.persistence.load_prop([e])},XO.prototype.get_api_host=function(e){return this.get_config("api_hosts")[e]||this.get_config("api_host")},XO.prototype.toString=function(){var e=this.get_config("name");return e!==VO&&(e=VO+"."+e),e},XO.prototype._event_is_disabled=function(e){return VE.isBlockedUA(LE)||this._flags.disable_all_events||VE.include(this.__disabled_events,e)},XO.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_tracking_persistence_type")&&VE.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_tracking()||!this.get_config("opt_out_tracking_by_default")&&!VE.cookie.get("mp_optout")||(VE.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},XO.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t),t?(this.stop_batch_senders(),this.stop_session_recording()):this._batchers_were_started&&this.start_batch_senders()},XO.prototype._gdpr_call_func=function(e,t){return t=VE.extend({track:VE.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),VE.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})},XO.prototype.opt_in_tracking=function(e){e=VE.extend({enable_persistence:!0},e),this._gdpr_call_func(mI,e),this._gdpr_update_persistence(e)},XO.prototype.opt_out_tracking=function(e){(e=VE.extend({clear_persistence:!0,delete_user:!0},e)).delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(gI,e),this._gdpr_update_persistence(e)},XO.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(vI,e)},XO.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(yI,e)},XO.prototype.clear_opt_in_out_tracking=function(e){e=VE.extend({enable_persistence:!0},e),this._gdpr_call_func(kI,e),this._gdpr_update_persistence(e)},XO.prototype.report_error=function(e,t){WE.error.apply(WE.error,arguments);try{t||e instanceof Error||(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(n){WE.error(n)}},XO.prototype.init=XO.prototype.init,XO.prototype.reset=XO.prototype.reset,XO.prototype.disable=XO.prototype.disable,XO.prototype.time_event=XO.prototype.time_event,XO.prototype.track=XO.prototype.track,XO.prototype.track_links=XO.prototype.track_links,XO.prototype.track_forms=XO.prototype.track_forms,XO.prototype.track_pageview=XO.prototype.track_pageview,XO.prototype.register=XO.prototype.register,XO.prototype.register_once=XO.prototype.register_once,XO.prototype.unregister=XO.prototype.unregister,XO.prototype.identify=XO.prototype.identify,XO.prototype.alias=XO.prototype.alias,XO.prototype.name_tag=XO.prototype.name_tag,XO.prototype.set_config=XO.prototype.set_config,XO.prototype.get_config=XO.prototype.get_config,XO.prototype.get_api_host=XO.prototype.get_api_host,XO.prototype.get_property=XO.prototype.get_property,XO.prototype.get_distinct_id=XO.prototype.get_distinct_id,XO.prototype.toString=XO.prototype.toString,XO.prototype.opt_out_tracking=XO.prototype.opt_out_tracking,XO.prototype.opt_in_tracking=XO.prototype.opt_in_tracking,XO.prototype.has_opted_out_tracking=XO.prototype.has_opted_out_tracking,XO.prototype.has_opted_in_tracking=XO.prototype.has_opted_in_tracking,XO.prototype.clear_opt_in_out_tracking=XO.prototype.clear_opt_in_out_tracking,XO.prototype.get_group=XO.prototype.get_group,XO.prototype.set_group=XO.prototype.set_group,XO.prototype.add_group=XO.prototype.add_group,XO.prototype.remove_group=XO.prototype.remove_group,XO.prototype.track_with_groups=XO.prototype.track_with_groups,XO.prototype.start_batch_senders=XO.prototype.start_batch_senders,XO.prototype.stop_batch_senders=XO.prototype.stop_batch_senders,XO.prototype.start_session_recording=XO.prototype.start_session_recording,XO.prototype.stop_session_recording=XO.prototype.stop_session_recording,XO.prototype.pause_session_recording=XO.prototype.pause_session_recording,XO.prototype.resume_session_recording=XO.prototype.resume_session_recording,XO.prototype.get_session_recording_properties=XO.prototype.get_session_recording_properties,XO.prototype.get_session_replay_url=XO.prototype.get_session_replay_url,XO.prototype.get_tab_id=XO.prototype.get_tab_id,XO.prototype.DEFAULT_API_ROUTES=GO,XO.prototype.__get_recorder=XO.prototype.__get_recorder,zO.prototype.properties=zO.prototype.properties,zO.prototype.update_search_keyword=zO.prototype.update_search_keyword,zO.prototype.update_referrer_info=zO.prototype.update_referrer_info,zO.prototype.get_cross_subdomain=zO.prototype.get_cross_subdomain,zO.prototype.clear=zO.prototype.clear;var nT={},rT=function(){UO.init=function(e,t,n){if(n)return UO[n]||(UO[n]=nT[n]=QO(e,t,n),UO[n]._loaded()),UO[n];var r=UO;nT[VO]?r=nT[VO]:e&&((r=QO(e,t,VO))._loaded(),nT[VO]=r),UO=r,1===IO&&(vm[VO]=UO),VE.each(nT,function(e,t){t!==VO&&(UO[t]=e)}),UO._=VE}};BO=function(e,t){t()},IO=0,UO=new XO,rT(),UO.init(),function(){function e(){e.done||(e.done=!0,YO=!0,KO=!1,VE.each(nT,function(e){e._dom_loaded()}))}if(AE.addEventListener)"complete"===AE.readyState?e():AE.addEventListener("DOMContentLoaded",e,!1);else if(AE.attachEvent){AE.attachEvent("onreadystatechange",e);var t=!1;try{t=null===vm.frameElement}catch(rh){}AE.documentElement.doScroll&&t&&function t(){try{AE.documentElement.doScroll("left")}catch(rh){return void setTimeout(t,1)}e()}()}VE.register_event(vm,"load",e,!0)}();const iT=(e,t)=>{(()=>{if("undefined"==typeof window)return!1;const e=window.location.hostname,t=window.location.port;"localhost"===e||"127.0.0.1"===e||e.startsWith("192.168.")})()};function oT(){}function aT(){}const sT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cT={};function uT(e,t){return(cT.jsx?lT:sT).test(e)}const dT=/[ \t\n\f\r]/g;function pT(e){return""===e.replace(dT,"")}class fT{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function hT(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new fT(n,r,t)}function mT(e){return e.toLowerCase()}fT.prototype.normal={},fT.prototype.property={},fT.prototype.space=void 0;class gT{constructor(e,t){this.attribute=t,this.property=e}}gT.prototype.attribute="",gT.prototype.booleanish=!1,gT.prototype.boolean=!1,gT.prototype.commaOrSpaceSeparated=!1,gT.prototype.commaSeparated=!1,gT.prototype.defined=!1,gT.prototype.mustUseProperty=!1,gT.prototype.number=!1,gT.prototype.overloadedBoolean=!1,gT.prototype.property="",gT.prototype.spaceSeparated=!1,gT.prototype.space=void 0;let vT=0;const yT=CT(),bT=CT(),xT=CT(),wT=CT(),kT=CT(),_T=CT(),ST=CT();function CT(){return 2**++vT}const ET=Object.freeze(Object.defineProperty({__proto__:null,boolean:yT,booleanish:bT,commaOrSpaceSeparated:ST,commaSeparated:_T,number:wT,overloadedBoolean:xT,spaceSeparated:kT},Symbol.toStringTag,{value:"Module"})),IT=Object.keys(ET);class NT extends gT{constructor(e,t,n,r){let i=-1;if(super(e,t),OT(this,"space",r),"number"==typeof n)for(;++i<IT.length;){const e=IT[i];OT(this,IT[i],(n&ET[e])===ET[e])}}}function OT(e,t,n){n&&(e[t]=n)}function TT(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new NT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[mT(r)]=r,n[mT(o.attribute)]=r}return new fT(t,n,e.space)}NT.prototype.defined=!0;const RT=TT({properties:{ariaActiveDescendant:null,ariaAtomic:bT,ariaAutoComplete:null,ariaBusy:bT,ariaChecked:bT,ariaColCount:wT,ariaColIndex:wT,ariaColSpan:wT,ariaControls:kT,ariaCurrent:null,ariaDescribedBy:kT,ariaDetails:null,ariaDisabled:bT,ariaDropEffect:kT,ariaErrorMessage:null,ariaExpanded:bT,ariaFlowTo:kT,ariaGrabbed:bT,ariaHasPopup:null,ariaHidden:bT,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kT,ariaLevel:wT,ariaLive:null,ariaModal:bT,ariaMultiLine:bT,ariaMultiSelectable:bT,ariaOrientation:null,ariaOwns:kT,ariaPlaceholder:null,ariaPosInSet:wT,ariaPressed:bT,ariaReadOnly:bT,ariaRelevant:null,ariaRequired:bT,ariaRoleDescription:kT,ariaRowCount:wT,ariaRowIndex:wT,ariaRowSpan:wT,ariaSelected:bT,ariaSetSize:wT,ariaSort:null,ariaValueMax:wT,ariaValueMin:wT,ariaValueNow:wT,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function jT(e,t){return t in e?e[t]:t}function AT(e,t){return jT(e,t.toLowerCase())}const PT=TT({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_T,acceptCharset:kT,accessKey:kT,action:null,allow:null,allowFullScreen:yT,allowPaymentRequest:yT,allowUserMedia:yT,alt:null,as:null,async:yT,autoCapitalize:null,autoComplete:kT,autoFocus:yT,autoPlay:yT,blocking:kT,capture:null,charSet:null,checked:yT,cite:null,className:kT,cols:wT,colSpan:null,content:null,contentEditable:bT,controls:yT,controlsList:kT,coords:wT|_T,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yT,defer:yT,dir:null,dirName:null,disabled:yT,download:xT,draggable:bT,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yT,formTarget:null,headers:kT,height:wT,hidden:xT,high:wT,href:null,hrefLang:null,htmlFor:kT,httpEquiv:kT,id:null,imageSizes:null,imageSrcSet:null,inert:yT,inputMode:null,integrity:null,is:null,isMap:yT,itemId:null,itemProp:kT,itemRef:kT,itemScope:yT,itemType:kT,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yT,low:wT,manifest:null,max:null,maxLength:wT,media:null,method:null,min:null,minLength:wT,multiple:yT,muted:yT,name:null,nonce:null,noModule:yT,noValidate:yT,onAbort:null,onAfterPrint:null,onAuxClick: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:yT,optimum:wT,pattern:null,ping:kT,placeholder:null,playsInline:yT,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:yT,referrerPolicy:null,rel:kT,required:yT,reversed:yT,rows:wT,rowSpan:wT,sandbox:kT,scope:null,scoped:yT,seamless:yT,selected:yT,shadowRootClonable:yT,shadowRootDelegatesFocus:yT,shadowRootMode:null,shape:null,size:wT,sizes:null,slot:null,span:wT,spellCheck:bT,src:null,srcDoc:null,srcLang:null,srcSet:null,start:wT,step:null,style:null,tabIndex:wT,target:null,title:null,translate:null,type:null,typeMustMatch:yT,useMap:null,value:bT,width:wT,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kT,axis:null,background:null,bgColor:null,border:wT,borderColor:null,bottomMargin:wT,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yT,declare:yT,event:null,face:null,frame:null,frameBorder:null,hSpace:wT,leftMargin:wT,link:null,longDesc:null,lowSrc:null,marginHeight:wT,marginWidth:wT,noResize:yT,noHref:yT,noShade:yT,noWrap:yT,object:null,profile:null,prompt:null,rev:null,rightMargin:wT,rules:null,scheme:null,scrolling:bT,standby:null,summary:null,text:null,topMargin:wT,valueType:null,version:null,vAlign:null,vLink:null,vSpace:wT,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yT,disableRemotePlayback:yT,prefix:null,property:null,results:wT,security:null,unselectable:null},space:"html",transform:AT}),MT=TT({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-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:ST,accentHeight:wT,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:wT,amplitude:wT,arabicForm:null,ascent:wT,attributeName:null,attributeType:null,azimuth:wT,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:wT,by:null,calcMode:null,capHeight:wT,className:kT,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:wT,diffuseConstant:wT,direction:null,display:null,dur:null,divisor:wT,dominantBaseline:null,download:yT,dx:null,dy:null,edgeMode:null,editable:null,elevation:wT,enableBackground:null,end:null,event:null,exponent:wT,externalResourcesRequired:null,fill:null,fillOpacity:wT,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:_T,g2:_T,glyphName:_T,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:wT,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:wT,horizOriginX:wT,horizOriginY:wT,id:null,ideographic:wT,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:wT,k:wT,k1:wT,k2:wT,k3:wT,k4:wT,kernelMatrix:ST,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:wT,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:wT,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,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:wT,overlineThickness:wT,paintOrder:null,panose1:null,path:null,pathLength:wT,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kT,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:wT,pointsAtY:wT,pointsAtZ:wT,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ST,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ST,rev:ST,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ST,requiredFeatures:ST,requiredFonts:ST,requiredFormats:ST,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:wT,specularExponent:wT,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:wT,strikethroughThickness:wT,string:null,stroke:null,strokeDashArray:ST,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:wT,strokeOpacity:wT,strokeWidth:null,style:null,surfaceScale:wT,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ST,tabIndex:wT,tableValues:null,target:null,targetX:wT,targetY:wT,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ST,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:wT,underlineThickness:wT,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:wT,values:null,vAlphabetic:wT,vMathematical:wT,vectorEffect:null,vHanging:wT,vIdeographic:wT,version:null,vertAdvY:wT,vertOriginX:wT,vertOriginY:wT,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:wT,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jT}),LT=TT({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),DT=TT({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:AT}),FT=TT({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),zT={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"},UT=/[A-Z]/g,BT=/-[a-z]/g,$T=/^data[-\w.:]+$/i;function VT(e){return"-"+e.toLowerCase()}function WT(e){return e.charAt(1).toUpperCase()}const qT=hT([RT,PT,LT,DT,FT],"html"),HT=hT([RT,MT,LT,DT,FT],"svg");var KT={},ZT=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,GT=/\n/g,JT=/^\s*/,YT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,XT=/^:\s*/,QT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eR=/^[;\s]*/,tR=/^\s+|\s+$/g,nR="";function rR(e){return e?e.replace(tR,nR):nR}var iR=function(e,t){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(e){var t=e.match(GT);t&&(n+=t.length);var i=e.lastIndexOf("\n");r=~i?e.length-i:r+e.length}function o(){var e={line:n,column:r};return function(t){return t.position=new a(e),c(),t}}function a(e){this.start=e,this.end={line:n,column:r},this.source=t.source}function s(i){var o=new Error(t.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=t.source,o.line=n,o.column=r,o.source=e,!t.silent)throw o}function l(t){var n=t.exec(e);if(n){var r=n[0];return i(r),e=e.slice(r.length),n}}function c(){l(JT)}function u(e){var t;for(e=e||[];t=d();)!1!==t&&e.push(t);return e}function d(){var t=o();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;nR!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,nR===e.charAt(n-1))return s("End of comment missing");var a=e.slice(2,n-2);return r+=2,i(a),e=e.slice(n),r+=2,t({type:"comment",comment:a})}}function p(){var e=o(),t=l(YT);if(t){if(d(),!l(XT))return s("property missing ':'");var n=l(QT),r=e({type:"declaration",property:rR(t[0].replace(ZT,nR)),value:n?rR(n[0].replace(ZT,nR)):nR});return l(eR),r}}return a.prototype.content=e,c(),function(){var e,t=[];for(u(t);e=p();)!1!==e&&(t.push(e),u(t));return t}()},oR=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(KT,"__esModule",{value:!0}),KT.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,aR.default)(e),i="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;i?t(r,o,e):o&&(n=n||{},n[r]=o)}),n};const aR=oR(iR);var sR={};Object.defineProperty(sR,"__esModule",{value:!0}),sR.camelCase=void 0;var lR=/^--[a-zA-Z0-9_-]+$/,cR=/-([a-z])/g,uR=/^[^-]+$/,dR=/^-(webkit|moz|ms|o|khtml)-/,pR=/^-(ms)-/,fR=function(e,t){return t.toUpperCase()},hR=function(e,t){return"".concat(t,"-")};sR.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||uR.test(e)||lR.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(pR,hR):e.replace(dR,hR)).replace(cR,fR))};var mR=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(KT),gR=sR;function vR(e,t){var n={};return e&&"string"==typeof e?((0,mR.default)(e,function(e,r){e&&r&&(n[(0,gR.camelCase)(e,t)]=r)}),n):n}vR.default=vR;const yR=r(vR),bR=wR("end"),xR=wR("start");function wR(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function kR(e){return e&&"object"==typeof e?"position"in e||"type"in e?SR(e.position):"start"in e||"end"in e?SR(e):"line"in e||"column"in e?_R(e):"":""}function _R(e){return CR(e&&e.line)+":"+CR(e&&e.column)}function SR(e){return _R(e&&e.start)+"-"+_R(e&&e.end)}function CR(e){return e&&"number"==typeof e?e:1}class ER extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",i={},o=!1;if(t&&(i="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!i.cause&&e&&(o=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){const e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}const a=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=a?a.line:void 0,this.name=kR(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=o&&i.cause&&"string"==typeof i.cause.stack?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}ER.prototype.file="",ER.prototype.name="",ER.prototype.reason="",ER.prototype.message="",ER.prototype.stack="",ER.prototype.column=void 0,ER.prototype.line=void 0,ER.prototype.ancestors=void 0,ER.prototype.cause=void 0,ER.prototype.fatal=void 0,ER.prototype.place=void 0,ER.prototype.ruleId=void 0,ER.prototype.source=void 0;const IR={}.hasOwnProperty,NR=new Map,OR=/[A-Z]/g,TR=new Set(["table","tbody","thead","tfoot","tr"]),RR=new Set(["td","th"]),jR="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function AR(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,i,o){const a=Array.isArray(i.children),s=xR(n);return t(r,i,o,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,i,o){const a=Array.isArray(i.children)?n:t;return o?a(r,i,o):a(r,i)}}(0,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:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?HT:qT,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},o=PR(i,e,void 0);return o&&"string"!=typeof o?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function PR(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(i=HT,e.schema=i);e.ancestors.push(t);const o=zR(e,t.tagName,!1),a=function(e,t){const n={};let r,i;for(i in t.properties)if("children"!==i&&IR.call(t.properties,i)){const o=FR(e,i,t.properties[i]);if(o){const[i,a]=o;e.tableCellAlignToStyle&&"align"===i&&"string"==typeof a&&RR.has(t.tagName)?r=a:n[i]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=DR(e,t);TR.has(t.tagName)&&(s=s.filter(function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&pT(t.value):pT(t));var t}));return MR(e,a,o,t),LR(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}UR(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let i=r;"svg"===t.name&&"html"===r.space&&(i=HT,e.schema=i);e.ancestors.push(t);const o=null===t.name?e.Fragment:zR(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];oT(t.type);const i=t.expression;oT(i.type);const o=i.properties[0];oT(o.type),Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else UR(e,t.position);else{const i=r.name;let o;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];oT(t.type),o=e.evaluater.evaluateExpression(t.expression)}else UR(e,t.position);else o=null===r.value||r.value;n[i]=o}return n}(e,t),s=DR(e,t);return MR(e,a,o,t),LR(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);UR(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return LR(r,DR(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function MR(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function LR(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function DR(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:NR;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const e="element"===o.type?o.tagName:"mdxJsxFlowElement"===o.type||"mdxJsxTextElement"===o.type?o.name:void 0;if(e){const t=i.get(e)||0;a=e+"-"+t,i.set(e,t+1)}}const s=PR(e,o,a);void 0!==s&&n.push(s)}return n}function FR(e,t,n){const r=function(e,t){const n=mT(t);let r=t,i=gT;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&$T.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(BT,WT);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!BT.test(e)){let n=e.replace(UT,VT);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}i=NT}return new i(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):n.join(" ").trim()),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return yR(t,{reactCompat:!0})}catch(vE){if(e.ignoreInvalidStyle)return{};const n=vE,r=new ER("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=jR+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)IR.call(e,n)&&(t[BR(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?zT[r.property]||r.property:r.attribute,n]}}function zR(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,i=-1;for(;++i<e.length;){const t=uT(e[i])?{type:"Identifier",name:e[i]}:{type:"Literal",value:e[i]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(i&&"Literal"===t.type),optional:!1}:t}r=n}else r=uT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return IR.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);UR(e)}function UR(e,t){const n=new ER("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=jR+"#cannot-handle-mdx-estrees-without-createevaluater",n}function BR(e){let t=e.replace(OR,$R);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function $R(e){return"-"+e.toLowerCase()}const VR={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"]},WR={};function qR(e,t){return HR(e,"boolean"!=typeof WR.includeImageAlt||WR.includeImageAlt,"boolean"!=typeof WR.includeHtml||WR.includeHtml)}function HR(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return KR(e.children,t,n)}return Array.isArray(e)?KR(e,t,n):""}function KR(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=HR(e[i],t,n);return r.join("")}const ZR=document.createElement("i");function GR(e){const t="&"+e+";";ZR.innerHTML=t;const n=ZR.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function JR(e,t,n,r){const i=e.length;let o,a=0;if(t=t<0?-t>i?0:i+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 YR(e,t){return e.length>0?(JR(e,e.length,0,t),e):t}const XR={}.hasOwnProperty;function QR(e){const t={};let n=-1;for(;++n<e.length;)ej(t,e[n]);return t}function ej(e,t){let n;for(n in t){const r=(XR.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let o;if(i)for(o in i){XR.call(r,o)||(r[o]=[]);const e=i[o];tj(r[o],Array.isArray(e)?e:e?[e]:[])}}}function tj(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);JR(e,0,0,r)}function nj(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function rj(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ij=gj(/[A-Za-z]/),oj=gj(/[\dA-Za-z]/),aj=gj(/[#-'*+\--9=?A-Z^-~]/);function sj(e){return null!==e&&(e<32||127===e)}const lj=gj(/\d/),cj=gj(/[\dA-Fa-f]/),uj=gj(/[!-/:-@[-`{-~]/);function dj(e){return null!==e&&e<-2}function pj(e){return null!==e&&(e<0||32===e)}function fj(e){return-2===e||-1===e||32===e}const hj=gj(new RegExp("\\p{P}|\\p{S}","u")),mj=gj(/\s/);function gj(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function vj(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(37===o&&oj(e.charCodeAt(n+1))&&oj(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const t=e.charCodeAt(n+1);o<56320&&t>56319&&t<57344?(a=String.fromCharCode(o,t),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function yj(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return function(r){if(fj(r))return e.enter(n),a(r);return t(r)};function a(r){return fj(r)&&o++<i?(e.consume(r),a):(e.exit(n),t(r))}}const bj={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),yj(e,t,"linePrefix")},function(t){return e.enter("paragraph"),r(t)});let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,i(t)}function i(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):dj(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),i)}}};const xj={tokenize:function(e){const t=this,n=[];let r,i,o,a=0;return s;function s(r){if(a<n.length){const i=n[a];return t.containerState=i[1],e.attempt(i[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&y();const n=t.events.length;let i,o=n;for(;o--;)if("exit"===t.events[o][0]&&"chunkFlow"===t.events[o][1].type){i=t.events[o][1].end;break}v(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...i},s++;return JR(t.events,o+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(i){if(a===n.length){if(!r)return p(i);if(r.currentConstruct&&r.currentConstruct.concrete)return h(i);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(wj,u,d)(i)}function u(e){return r&&y(),v(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(wj,f,h)(n)}function f(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&y(),v(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),v(0),void e.consume(n)):dj(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=i,i&&(i.next=e),i=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<o&&(!r.events[e][1].end||r.events[e][1].end.offset>o))return;const n=t.events.length;let i,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(i){s=t.events[l][1].end;break}i=!0}for(v(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;JR(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function v(r){let i=n.length;for(;i-- >r;){const r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}},wj={tokenize:function(e,t,n){return yj(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function kj(e){return null===e||pj(e)||mj(e)?1:hj(e)?2:void 0}function _j(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Sj={name:"attention",resolveAll:function(e,t){let n,r,i,o,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},p={...e[u][1].start};Cj(d,-s),Cj(p,s),o={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:p},i={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[n][1].end={...o.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=YR(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=YR(l,[["enter",r,t],["enter",o,t],["exit",o,t],["enter",i,t]]),l=YR(l,_j(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=YR(l,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=YR(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,JR(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=kj(r);let o;return function(t){return o=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===o)return e.consume(s),a;const l=e.exit("attentionSequence"),c=kj(s),u=!c||2===c&&i||n.includes(s),d=!i||2===i&&c||n.includes(r);return l._open=Boolean(42===o?u:u&&(i||!d)),l._close=Boolean(42===o?d:d&&(c||!u)),t(s)}}};function Cj(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ej={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i};function i(t){return ij(t)?(e.consume(t),o):64===t?n(t):l(t)}function o(e){return 43===e||45===e||46===e||oj(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||oj(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||sj(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):aj(t)?(e.consume(t),l):n(t)}function c(e){return oj(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||oj(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const Ij={partial:!0,tokenize:function(e,t,n){return function(t){return fj(t)?yj(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||dj(e)?t(e):n(e)}}};const Nj={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(fj(t))return yj(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return i(t)};function i(r){return e.attempt(Nj,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),i}return n(t)};function i(n){return fj(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const Oj={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return uj(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const Tj={name:"characterReference",tokenize:function(e,t,n){const r=this;let i,o,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,o=oj,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,o=cj,c):(e.enter("characterReferenceValue"),i=7,o=lj,c(t))}function c(s){if(59===s&&a){const i=e.exit("characterReferenceValue");return o!==oj||GR(r.sliceSerialize(i))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return o(s)&&a++<i?(e.consume(s),c):n(s)}}};const Rj={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},jj={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,i={partial:!0,tokenize:function(e,t,n){let i=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),fj(t)?yj(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===o?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===o?(i++,e.consume(t),u):i>=s?(e.exit("codeFencedFenceSequence"),fj(t)?yj(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||dj(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let o,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,o=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===o?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),fj(t)?yj(e,c,"whitespace")(t):c(t))}function c(n){return null===n||dj(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(Rj,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||dj(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):fj(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),yj(e,d,"whitespace")(t)):96===t&&t===o?n(t):(e.consume(t),u)}function d(t){return null===t||dj(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||dj(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===o?n(t):(e.consume(t),p)}function f(t){return e.attempt(i,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&fj(t)?yj(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||dj(t)?e.check(Rj,f,y)(t):(e.enter("codeFlowValue"),v(t))}function v(t){return null===t||dj(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),v)}function y(n){return e.exit("codeFenced"),t(n)}}};const Aj={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),yj(e,i,"linePrefix",5)(t)};function i(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return null===t?s(t):dj(t)?e.attempt(Pj,o,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||dj(t)?(e.exit("codeFlowValue"),o(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},Pj={partial:!0,tokenize:function(e,t,n){const r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):dj(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i):yj(e,o,"linePrefix",5)(t)}function o(e){const o=r.events[r.events.length-1];return o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(e):dj(e)?i(e):n(e)}}};const Mj={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,i=3;if(!("lineEnding"!==e[i][1].type&&"space"!==e[i][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=i;++t<r;)if("codeTextData"===e[t][1].type){e[i][1].type="codeTextPadding",e[r][1].type="codeTextPadding",i+=2,r-=2;break}t=i-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,i,o=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),o++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(i=e.enter("codeTextSequence"),r=0,c(t)):dj(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||dj(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(i.type="codeTextData",l(n))}}};class Lj{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&Dj(this.left,n),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Dj(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Dj(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);Dj(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Dj(this.left,t.reverse())}}}function Dj(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 Fj(e){const t={};let n,r,i,o,a,s,l,c=-1;const u=new Lj(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,i=0,i<s.length&&"lineEndingBlank"===s[i][1].type&&(i+=2),i<s.length&&"content"===s[i][1].type))for(;++i<s.length&&"content"!==s[i][1].type;)"chunkText"===s[i][1].type&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,zj(u,c)),c=t[c],l=!0);else if(n[1]._container){for(i=c,r=void 0;i--;)if(o=u.get(i),"lineEnding"===o[1].type||"lineEndingBlank"===o[1].type)"enter"===o[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=i);else if("linePrefix"!==o[1].type&&"listItemIndent"!==o[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return JR(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function zj(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,p=-1,f=n,h=0,m=0;const g=[m];for(;f;){for(;e.get(++i)[1]!==f;);o.push(i),f._tokenizer||(u=r.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++p<s.length;)"exit"===s[p][0]&&"enter"===s[p-1][0]&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(m=p+1,g.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):g.pop(),p=g.length;p--;){const t=s.slice(g[p],g[p+1]),n=o.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),p=-1;++p<l.length;)c[h+l[p][0]]=h+l[p][1],h+=l[p][1]-l[p][0]-1;return c}const Uj={resolve:function(e){return Fj(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?i(t):dj(t)?e.check(Bj,o,i)(t):(e.consume(t),r)}function i(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function o(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},Bj={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),yj(e,i,"linePrefix")};function i(i){if(null===i||dj(i))return n(i);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&"linePrefix"===o[1].type&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}};function $j(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(i),e.enter(o),e.consume(t),e.exit(o),d;if(null===t||32===t||41===t||sj(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(n))}function p(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||dj(t)?n(t):(e.consume(t),92===t?f:p)}function f(t){return 60===t||62===t||92===t?(e.consume(t),p):p(t)}function h(i){return u||null!==i&&41!==i&&!pj(i)?u<c&&40===i?(e.consume(i),u++,h):41===i?(e.consume(i),u--,h):null===i||32===i||40===i||sj(i)?n(i):(e.consume(i),92===i?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(i))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function Vj(e,t,n,r,i,o){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(o),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):dj(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||dj(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!fj(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function Wj(e,t,n,r,i,o){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(i),e.consume(t),e.exit(i),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(o),l(n))}function l(t){return t===a?(e.exit(o),s(a)):null===t?n(t):dj(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),yj(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||dj(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function qj(e,t){let n;return function r(i){if(dj(i))return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r;if(fj(i))return yj(e,r,n?"linePrefix":"lineSuffix")(i);return t(i)}}const Hj={name:"definition",tokenize:function(e,t,n){const r=this;let i;return function(t){return e.enter("definition"),function(t){return Vj.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function o(t){return i=rj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return pj(t)?qj(e,s)(t):s(t)}function s(t){return $j(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Kj,c,c)(t)}function c(t){return fj(t)?yj(e,u,"whitespace")(t):u(t)}function u(o){return null===o||dj(o)?(e.exit("definition"),r.parser.defined.push(i),t(o)):n(o)}}},Kj={partial:!0,tokenize:function(e,t,n){return function(t){return pj(t)?qj(e,r)(t):n(t)};function r(t){return Wj(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function i(t){return fj(t)?yj(e,o,"whitespace")(t):o(t)}function o(e){return null===e||dj(e)?t(e):n(e)}}};const Zj={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return dj(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const Gj={name:"headingAtx",resolve:function(e,t){let n,r,i=e.length-2,o=3;"whitespace"===e[o][1].type&&(o+=2);i-2>o&&"whitespace"===e[i][1].type&&(i-=2);"atxHeadingSequence"===e[i][1].type&&(o===i-1||i-4>o&&"whitespace"===e[i-2][1].type)&&(i-=o+1===i?2:4);i>o&&(n={type:"atxHeadingText",start:e[o][1].start,end:e[i][1].end},r={type:"chunkText",start:e[o][1].start,end:e[i][1].end,contentType:"text"},JR(e,o,i-o+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),i(t)}(t)};function i(t){return 35===t&&r++<6?(e.consume(t),i):null===t||pj(t)?(e.exit("atxHeadingSequence"),o(t)):n(t)}function o(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||dj(n)?(e.exit("atxHeading"),t(n)):fj(n)?yj(e,o,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),o(t))}function s(t){return null===t||35===t||pj(t)?(e.exit("atxHeadingText"),o(t)):(e.consume(t),s)}}};const Jj=["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"],Yj=["pre","script","style","textarea"],Xj={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let i,o,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),o=!0,f):63===s?(e.consume(s),i=3,r.interrupt?t:P):ij(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(o){return 45===o?(e.consume(o),i=2,d):91===o?(e.consume(o),i=5,s=0,p):ij(o)?(e.consume(o),i=4,r.interrupt?t:P):n(o)}function d(i){return 45===i?(e.consume(i),r.interrupt?t:P):n(i)}function p(i){const o="CDATA[";return i===o.charCodeAt(s++)?(e.consume(i),6===s?r.interrupt?t:E:p):n(i)}function f(t){return ij(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||pj(s)){const l=47===s,c=a.toLowerCase();return l||o||!Yj.includes(c)?Jj.includes(a.toLowerCase())?(i=6,l?(e.consume(s),m):r.interrupt?t(s):E(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):o?g(s):v(s)):(i=1,r.interrupt?t(s):E(s))}return 45===s||oj(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(i){return 62===i?(e.consume(i),r.interrupt?t:E):n(i)}function g(t){return fj(t)?(e.consume(t),g):S(t)}function v(t){return 47===t?(e.consume(t),S):58===t||95===t||ij(t)?(e.consume(t),y):fj(t)?(e.consume(t),v):S(t)}function y(t){return 45===t||46===t||58===t||95===t||oj(t)?(e.consume(t),y):b(t)}function b(t){return 61===t?(e.consume(t),x):fj(t)?(e.consume(t),b):v(t)}function x(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,w):fj(t)?(e.consume(t),x):k(t)}function w(t){return t===l?(e.consume(t),l=null,_):null===t||dj(t)?n(t):(e.consume(t),w)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||pj(t)?b(t):(e.consume(t),k)}function _(e){return 47===e||62===e||fj(e)?v(e):n(e)}function S(t){return 62===t?(e.consume(t),C):n(t)}function C(t){return null===t||dj(t)?E(t):fj(t)?(e.consume(t),C):n(t)}function E(t){return 45===t&&2===i?(e.consume(t),T):60===t&&1===i?(e.consume(t),R):62===t&&4===i?(e.consume(t),M):63===t&&3===i?(e.consume(t),P):93===t&&5===i?(e.consume(t),A):!dj(t)||6!==i&&7!==i?null===t||dj(t)?(e.exit("htmlFlowData"),I(t)):(e.consume(t),E):(e.exit("htmlFlowData"),e.check(Qj,L,I)(t))}function I(t){return e.check(eA,N,L)(t)}function N(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),O}function O(t){return null===t||dj(t)?I(t):(e.enter("htmlFlowData"),E(t))}function T(t){return 45===t?(e.consume(t),P):E(t)}function R(t){return 47===t?(e.consume(t),a="",j):E(t)}function j(t){if(62===t){const n=a.toLowerCase();return Yj.includes(n)?(e.consume(t),M):E(t)}return ij(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),j):E(t)}function A(t){return 93===t?(e.consume(t),P):E(t)}function P(t){return 62===t?(e.consume(t),M):45===t&&2===i?(e.consume(t),P):E(t)}function M(t){return null===t||dj(t)?(e.exit("htmlFlowData"),L(t)):(e.consume(t),M)}function L(n){return e.exit("htmlFlow"),t(n)}}},Qj={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(Ij,t,n)}}},eA={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(dj(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),i;return n(t)};function i(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const tA={name:"htmlText",tokenize:function(e,t,n){const r=this;let i,o,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),x):63===t?(e.consume(t),y):ij(t)?(e.consume(t),_):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),o=0,f):ij(t)?(e.consume(t),v):n(t)}function c(t){return 45===t?(e.consume(t),p):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):dj(t)?(a=u,j(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?R(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(o++)?(e.consume(t),6===o?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):dj(t)?(a=h,j(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function v(t){return null===t||62===t?R(t):dj(t)?(a=v,j(t)):(e.consume(t),v)}function y(t){return null===t?n(t):63===t?(e.consume(t),b):dj(t)?(a=y,j(t)):(e.consume(t),y)}function b(e){return 62===e?R(e):y(e)}function x(t){return ij(t)?(e.consume(t),w):n(t)}function w(t){return 45===t||oj(t)?(e.consume(t),w):k(t)}function k(t){return dj(t)?(a=k,j(t)):fj(t)?(e.consume(t),k):R(t)}function _(t){return 45===t||oj(t)?(e.consume(t),_):47===t||62===t||pj(t)?S(t):n(t)}function S(t){return 47===t?(e.consume(t),R):58===t||95===t||ij(t)?(e.consume(t),C):dj(t)?(a=S,j(t)):fj(t)?(e.consume(t),S):R(t)}function C(t){return 45===t||46===t||58===t||95===t||oj(t)?(e.consume(t),C):E(t)}function E(t){return 61===t?(e.consume(t),I):dj(t)?(a=E,j(t)):fj(t)?(e.consume(t),E):S(t)}function I(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),i=t,N):dj(t)?(a=I,j(t)):fj(t)?(e.consume(t),I):(e.consume(t),O)}function N(t){return t===i?(e.consume(t),i=void 0,T):null===t?n(t):dj(t)?(a=N,j(t)):(e.consume(t),N)}function O(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||pj(t)?S(t):(e.consume(t),O)}function T(e){return 47===e||62===e||pj(e)?S(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function j(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return fj(t)?yj(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),a(t)}}};const nA={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&JR(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,i,o,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(i){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(i=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[i][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[i-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=YR(o,e.slice(r+1,r+s+3)),o=YR(o,[["enter",u,t]]),o=YR(o,_j(t.parser.constructs.insideSpan.null,e.slice(r+s+4,i-3),t)),o=YR(o,[["exit",u,t],e[i-2],e[i-1],["exit",c,t]]),o=YR(o,e.slice(i+1)),o=YR(o,[["exit",l,t]]),JR(e,r,e.length,o),e},tokenize:function(e,t,n){const r=this;let i,o,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){i=r.events[a][1];break}return function(t){if(!i)return n(t);if(i._inactive)return u(t);return o=r.parser.defined.includes(rj(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(rA,c,o?c:u)(t):91===t?e.attempt(iA,c,o?l:u)(t):o?c(t):u(t)}function l(t){return e.attempt(oA,c,u)(t)}function c(e){return t(e)}function u(e){return i._balanced=!0,n(e)}}},rA={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return pj(t)?qj(e,i)(t):i(t)}function i(t){return 41===t?c(t):$j(e,o,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function o(t){return pj(t)?qj(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?Wj(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return pj(t)?qj(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},iA={tokenize:function(e,t,n){const r=this;return function(t){return Vj.call(r,e,i,o,"reference","referenceMarker","referenceString")(t)};function i(e){return r.parser.defined.includes(rj(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}},oA={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const aA={name:"labelStartImage",resolveAll:nA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),i};function i(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),o):n(t)}function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const sA={name:"labelStartLink",resolveAll:nA.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),i};function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const lA={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),yj(e,t,"linePrefix")}}};const cA={name:"thematicBreak",tokenize:function(e,t,n){let r,i=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,o(e)}(t)};function o(o){return o===r?(e.enter("thematicBreakSequence"),a(o)):i>=3&&(null===o||dj(o))?(e.exit("thematicBreak"),t(o)):n(o)}function a(t){return t===r?(e.consume(t),i++,a):(e.exit("thematicBreakSequence"),fj(t)?yj(e,o,"whitespace")(t):o(t))}}};const uA={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ij,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,yj(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!fj(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pA,t,i)(n)});function i(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,yj(e,e.attempt(uA,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(i)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&"linePrefix"===i[1].type?i[2].sliceSerialize(i[1],!0).length:0,a=0;return function(t){const i=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===i?!r.containerState.marker||t===r.containerState.marker:lj(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),"listUnordered"===i)return e.enter("listItemPrefix"),42===t||45===t?e.check(cA,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return lj(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(Ij,r.interrupt?n:c,e.attempt(dA,d,u))}function c(e){return r.containerState.initialBlankLine=!0,o++,d(e)}function u(t){return fj(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},dA={partial:!0,tokenize:function(e,t,n){const r=this;return yj(e,function(e){const i=r.events[r.events.length-1];return!fj(e)&&i&&"listItemPrefixWhitespace"===i[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},pA={partial:!0,tokenize:function(e,t,n){const r=this;return yj(e,function(e){const i=r.events[r.events.length-1];return i&&"listItemIndent"===i[1].type&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}};const fA={name:"setextUnderline",resolveTo:function(e,t){let n,r,i,o=e.length;for(;o--;)if("enter"===e[o][0]){if("content"===e[o][1].type){n=o;break}"paragraph"===e[o][1].type&&(r=o)}else"content"===e[o][1].type&&e.splice(o,1),i||"definition"!==e[o][1].type||(i=o);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end={...e[i][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let i;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),i=t,function(t){return e.enter("setextHeadingLineSequence"),o(t)}(t);return n(t)};function o(t){return t===i?(e.consume(t),o):(e.exit("setextHeadingLineSequence"),fj(t)?yj(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||dj(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const hA={tokenize:function(e){const t=this,n=e.attempt(Ij,function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n},e.attempt(this.parser.constructs.flowInitial,r,yj(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Uj,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const mA={resolveAll:bA()},gA=yA("string"),vA=yA("text");function yA(e){return{resolveAll:bA("text"===e?xA:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],i=t.attempt(r,o,a);return o;function o(e){return l(e)?i(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),i(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let i=-1;if(t)for(;++i<t.length;){const e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function bA(e){return function(t,n){let r,i=-1;for(;++i<=t.length;)void 0===r?t[i]&&"data"===t[i][1].type&&(r=i,i++):t[i]&&"data"===t[i][1].type||(i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(t,n):t}}function xA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],i=t.sliceStream(r);let o,a=i.length,s=-1,l=0;for(;a--;){const e=i[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)o=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const i={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,["enter",i,t],["exit",i,t]),n+=2)}n++}return e}const wA={42:uA,43:uA,45:uA,48:uA,49:uA,50:uA,51:uA,52:uA,53:uA,54:uA,55:uA,56:uA,57:uA,62:Nj},kA={91:Hj},_A={[-2]:Aj,[-1]:Aj,32:Aj},SA={35:Gj,42:cA,45:[fA,cA],60:Xj,61:fA,95:cA,96:jj,126:jj},CA={38:Tj,92:Oj},EA={[-5]:lA,[-4]:lA,[-3]:lA,33:aA,38:Tj,42:Sj,60:[Ej,tA],91:sA,92:[Zj,Oj],93:nA,95:Sj,96:Mj},IA={null:[Sj,mA]},NA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:kA,disable:{null:[]},document:wA,flow:SA,flowInitial:_A,insideSpan:IA,string:CA,text:EA},Symbol.toStringTag,{value:"Module"}));function OA(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:g(function(e,t){v(e,t.from)}),check:g(m),consume:function(e){dj(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,y()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=p(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=p(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){i[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if("string"==typeof o)a=o;else switch(o){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&i)continue;a=" ";break;default:a=String.fromCharCode(o)}i=-2===o,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=YR(a,e),f(),null!==a[a.length-1])return[];return v(t,0),c.events=_j(o,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:i,offset:o}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:o}}function f(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,i,o){let a,u,d,f;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?o:m(e[u])}function m(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,i=c.events.length,o=Array.from(s);return{from:i,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=i,s=o,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return v();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,v)(n)}}function g(t){return e(d,f),i}function v(e){return f.restore(),++u<a.length?m(a[u]):o}}}function v(e,t){e.resolveAll&&!o.includes(e)&&o.push(e),e.resolve&&JR(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function y(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}const TA=/[\0\t\n\r]/g;const RA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jA(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return nj(n.slice(t?2:1),t?16:10)}return GR(n)||e}const AA={}.hasOwnProperty;function PA(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:C,autolinkEmail:C,atxHeading:o(Y),blockQuote:o(H),characterEscape:C,characterReference:C,codeFenced:o(K),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(K,a),codeText:o(Z,a),codeTextData:C,data:C,codeFlowValue:C,definition:o(G),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(J),hardBreakEscape:o(X),hardBreakTrailing:o(X),htmlFlow:o(Q,a),htmlFlowData:C,htmlText:o(Q,a),htmlTextData:C,image:o(ee),label:a,link:o(te),listItem:o(re),listItemValue:p,listOrdered:o(ne,d),listUnordered:o(ne),paragraph:o(ie),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(Y),strong:o(oe),thematicBreak:o(se)},exit:{atxHeading:l(),atxHeadingSequence:w,autolink:l(),autolinkEmail:q,autolinkProtocol:W,blockQuote:l(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:$,characterReference:V,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:E,codeIndented:l(v),codeText:l(R),codeTextData:E,data:E,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(N),hardBreakTrailing:l(N),htmlFlow:l(O),htmlFlowData:E,htmlText:l(T),htmlTextData:E,image:l(A),label:M,labelText:P,lineEnding:I,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:U,resourceDestinationString:L,resourceTitleString:D,resource:F,setextHeading:l(S),setextHeadingLineSequence:_,setextHeadingText:k,strong:l(),thematicBreak:l()}};LA(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const o={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=i(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];AA.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},o),e[d][1])}if(o.tokenStack.length>0){const e=o.tokenStack[o.tokenStack.length-1];(e[1]||FA).call(o,void 0,e[0])}for(r.position={start:MA(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:MA(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r,i,o,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||o||(o=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(i=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;i&&(e[i][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",i=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}o&&(!i||o<i)&&(r._spread=!0),r.end=Object.assign({},i?e[i][1].start:t[1].end),e.splice(i||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const i={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=i,e.splice(s,0,["enter",i,t[2]]),s++,n++,o=void 0,a=!0}}}return e[t][1]._spread=c,n}function o(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:MA(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+kR({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||FA).call(this,e,r[0])}n.position.end=MA(e.end)}function u(){return qR(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function f(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function y(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rj(this.sliceSerialize(e)).toLowerCase()}function b(){const e=this.resume();this.stack[this.stack.length-1].title=e}function x(){const e=this.resume();this.stack[this.stack.length-1].url=e}function w(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function _(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function S(){this.data.setextHeadingSlurpLineEnding=void 0}function C(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:MA(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=MA(e.end)}function I(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=MA(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(C.call(this,e),E.call(this,e))}function N(){this.data.atHardBreak=!0}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function j(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function A(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(RA,jA)}(t),n.identifier=rj(t).toLowerCase()}function M(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function L(){const e=this.resume();this.stack[this.stack.length-1].url=e}function D(){const e=this.resume();this.stack[this.stack.length-1].title=e}function F(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function U(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=rj(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function B(e){this.data.characterReferenceType=e.type}function $(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=nj(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=GR(t)}this.stack[this.stack.length-1].value+=r}function V(e){this.stack.pop().position.end=MA(e.end)}function W(e){E.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function q(e){E.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function H(){return{type:"blockquote",children:[]}}function K(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function G(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function Y(){return{type:"heading",depth:0,children:[]}}function X(){return{type:"break"}}function Q(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function ie(){return{type:"paragraph",children:[]}}function oe(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!Fj(e););return e}(function(e){const t={constructs:QR([NA,...(e||{}).extensions||[]]),content:n(bj),defined:[],document:n(xj),flow:n(hA),lazy:{},string:n(gA),text:n(vA)};return t;function n(e){return function(n){return OA(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(i,o,a){const s=[];let l,c,u,d,p;for(i=n+("string"==typeof i?i.toString():new TextDecoder(o||void 0).decode(i)),u=0,n="",r&&(65279===i.charCodeAt(0)&&u++,r=void 0);u<i.length;){if(TA.lastIndex=u,l=TA.exec(i),d=l&&void 0!==l.index?l.index:i.length,p=i.charCodeAt(d),!l){n=i.slice(u);break}if(10===p&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(i.slice(u,d)),t+=d-u),p){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function MA(e){return{line:e.line,column:e.column,offset:e.offset}}function LA(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?LA(e,r):DA(e,r)}}function DA(e,t){let n;for(n in t)if(AA.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 FA(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kR({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kR({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kR({start:t.start,end:t.end})+") is still open")}function zA(e){const t=this;t.parser=function(n){return PA(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function UA(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&"text"===o.type?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&"text"===a.type?a.value+=r:i.push({type:"text",value:r}),i}function BA(e){const t=e.spread;return null==t?e.children.length>1:t}function $A(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(VA(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(VA(t.slice(i),i>0,!1)),o.join("")}function VA(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;9===t||32===t;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}const WA={blockquote:function(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)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=vj(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return UA(e,t);const i={src:vj(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)},image:function(e,t){const n={src:vj(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(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)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return UA(e,t);const i={href:vj(r.url||"")};null!==r.title&&void 0!==r.title&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)},link:function(e,t){const n={href:vj(t.url)};null!==t.title&&void 0!==t.title&&(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)},listItem:function(e,t,n){const r=e.all(t),i=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=BA(n[r])}return t}(n):BA(t),o={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(i||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||i?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(i||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let i=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++i<r.length;){const e=r[i];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=xR(t.children[1]),a=bR(t.children[t.children.length-1]);o&&a&&(r.position={start:o,end:a}),i.push(r)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,i=0===(r?r.indexOf(t):1)?"th":"td",o=n&&"table"===n.type?n.align:void 0,a=o?o.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=o?o[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:i,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:$A(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:qA,yaml:qA,definition:qA,footnoteDefinition:qA};function qA(){}const HA="object"==typeof self?self:globalThis,KA=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case 0:case-1:return n(a,i);case 1:{const e=n([],i);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},i);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),i);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),i)}case 5:{const e=n(new Map,i);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,i);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new HA[e](t),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new HA[o](a),i)};return r})(new Map,e)(0),ZA="",{toString:GA}={},{keys:JA}=Object,YA=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=GA.call(e).slice(8,-1);switch(n){case"Array":return[1,ZA];case"Object":return[2,ZA];case"Date":return[3,ZA];case"RegExp":return[4,ZA];case"Map":return[5,ZA];case"Set":return[6,ZA];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},XA=([e,t])=>0===e&&("function"===t||"symbol"===t),QA=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const i=(e,t)=>{const i=r.push(e)-1;return n.set(t,i),i},o=r=>{if(n.has(r))return n.get(r);let[a,s]=YA(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return i([-1],r)}return i([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),i([s,[...e]],r)}const e=[],t=i([a,e],r);for(const n of r)e.push(o(n));return t}case 2:{if(s)switch(s){case"BigInt":return i([s,r.toString()],r);case"Boolean":case"Number":case"String":return i([s,r.valueOf()],r)}if(t&&"toJSON"in r)return o(r.toJSON());const n=[],l=i([a,n],r);for(const t of JA(r))!e&&XA(YA(r[t]))||n.push([o(t),o(r[t])]);return l}case 3:return i([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return i([a,{source:e,flags:t}],r)}case 5:{const t=[],n=i([a,t],r);for(const[i,a]of r)(e||!XA(YA(i))&&!XA(YA(a)))&&t.push([o(i),o(a)]);return n}case 6:{const t=[],n=i([a,t],r);for(const i of r)!e&&XA(YA(i))||t.push(o(i));return n}}const{message:l}=r;return i([a,{name:s,message:l}],r)};return o})(!(t||n),!!t,new Map,r)(e),r},eP="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?KA(QA(e,t)):structuredClone(e):(e,t)=>KA(QA(e,t));function tP(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 nP(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const rP=function(e){if(null==e)return oP;if("function"==typeof e)return iP(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=rP(e[n]);return iP(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return iP(n);function n(n){const r=n;let i;for(i in e)if(r[i]!==t[i])return!1;return!0}}(e);if("string"==typeof e)return function(e){return iP(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function iP(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function oP(){return!0}const aP=[],sP=!0,lP=!1;function cP(e,t,n,r){let i;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):i=t;const o=rP(i),a=r?-1:1;!function e(i,s,l){const c=i&&"object"==typeof i?i:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+i.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,p=aP;if((!t||o(i,s,l[l.length-1]||void 0))&&(p=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[sP,e];return null==e?aP:[e]}(n(i,l)),p[0]===lP))return p;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==p[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===lP)return c;u="number"==typeof c[1]?c[1]:u+a}}return p}}(e,void 0,[])()}function uP(e,t,n,r){let i,o,a;"function"==typeof t&&"function"!=typeof n?(o=void 0,a=t,i=n):(o=t,a=n,i=r),cP(e,o,function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)},i)}const dP={}.hasOwnProperty,pP={};function fP(e,t){e.position&&(t.position=function(e){const t=xR(e),n=bR(e);if(t&&n)return{start:t,end:n}}(e))}function hP(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&i&&Object.assign(n.properties,eP(i)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function mP(e,t){const n=t.data||{},r=!("value"in t)||dP.call(n,"hProperties")||dP.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function gP(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function vP(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function yP(e,t){const n=function(e,t){const n=t||pP,r=new Map,i=new Map,o=new Map,a={...WA,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const i=s.one(n[r],e);if(i){if(r&&"break"===n[r-1].type&&(Array.isArray(i)||"text"!==i.type||(i.value=vP(i.value)),!Array.isArray(i)&&"element"===i.type)){const e=i.children[0];e&&"text"===e.type&&(e.value=vP(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t},applyData:hP,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(dP.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=eP(n);return r.children=s.all(e),r}return eP(e)}return(s.options.unknownHandler||mP)(s,e,t)},options:n,patch:fP,wrap:gP};return uP(e,function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),s}(e,t),r=n.one(e,void 0),i=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||tP,r=e.options.footnoteBackLabel||nP,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const i=e.footnoteById.get(e.footnoteOrder[l]);if(!i)continue;const o=e.all(i),a=String(i.identifier).toUpperCase(),c=vj(a.toLowerCase());let u=0;const d=[],p=e.footnoteCounts.get(a);for(;void 0!==p&&++u<=p;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const f=o[o.length-1];if(f&&"element"===f.type&&"p"===f.tagName){const e=f.children[f.children.length-1];e&&"text"===e.type?e.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...d)}else o.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(o,!0)};e.patch(i,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...eP(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:"\n"},i),o}function bP(e,t){return e&&"run"in e?async function(n,r){const i=yP(n,{file:r,...t});await e.run(i,r)}:function(n,r){return yP(n,{file:r,...e||t})}}function xP(e){if(e)throw e}var wP=Object.prototype.hasOwnProperty,kP=Object.prototype.toString,_P=Object.defineProperty,SP=Object.getOwnPropertyDescriptor,CP=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===kP.call(e)},EP=function(e){if(!e||"[object Object]"!==kP.call(e))return!1;var t,n=wP.call(e,"constructor"),r=e.constructor&&e.constructor.prototype&&wP.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!r)return!1;for(t in e);return void 0===t||wP.call(e,t)},IP=function(e,t){_P&&"__proto__"===t.name?_P(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},NP=function(e,t){if("__proto__"===t){if(!wP.call(e,t))return;if(SP)return SP(e,t).value}return e[t]};const OP=r(function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[1]||{},l=2),(null==s||"object"!=typeof s&&"function"!=typeof s)&&(s={});l<c;++l)if(null!=(t=arguments[l]))for(n in t)r=NP(s,n),s!==(i=NP(t,n))&&(u&&i&&(EP(i)||(o=CP(i)))?(o?(o=!1,a=r&&CP(r)?r:[]):a=r&&EP(r)?r:{},IP(s,{name:n,newValue:e(u,a,i)})):void 0!==i&&IP(s,{name:n,newValue:i}));return s});function TP(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function RP(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function i(o,...a){const s=e[++n];let l=-1;if(o)r(o);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let s;r&&t.push(i);try{s=e.apply(this,t)}catch(o){if(r&&n)throw o;return i(o)}r||(s&&s.then&&"function"==typeof s.then?s.then(a,i):s instanceof Error?i(s):a(s))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}(s,i)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const jP={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');AP(e);let n,r=0,i=-1,o=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else i<0&&(n=!0,i=o+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(47===e.codePointAt(o)){if(n){r=o+1;break}}else a<0&&(n=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(i=o):(s=-1,i=a));r===i?i=a:i<0&&(i=e.length);return e.slice(r,i)},dirname:function(e){if(AP(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){AP(e);let t,n=e.length,r=-1,i=0,o=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?o<0?o=n:1!==a&&(a=1):o>-1&&(a=-1);else if(t){i=n+1;break}}if(o<0||r<0||0===a||1===a&&o===r-1&&o===i+1)return"";return e.slice(o,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)AP(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){AP(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,i="",o=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(i.length<2||2!==o||46!==i.codePointAt(i.length-1)||46!==i.codePointAt(i.length-2))if(i.length>2){if(r=i.lastIndexOf("/"),r!==i.length-1){r<0?(i="",o=0):(i=i.slice(0,r),o=i.length-1-i.lastIndexOf("/")),a=l,s=0;continue}}else if(i.length>0){i="",o=0,a=l,s=0;continue}t&&(i=i.length>0?i+"/..":"..",o=2)}else i.length>0?i+="/"+e.slice(a+1,l):i=e.slice(a+1,l),o=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return i}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function AP(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const PP={cwd:function(){return"/"}};function MP(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function LP(e){if("string"==typeof e)e=new URL(e);else if(!MP(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("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const DP=["history","path","basename","stem","extname","dirname"];class FP{constructor(e){let t;t=e?MP(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":PP.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<DP.length;){const e=DP[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)DP.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?jP.basename(this.path):void 0}set basename(e){UP(e,"basename"),zP(e,"basename"),this.path=jP.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?jP.dirname(this.path):void 0}set dirname(e){BP(this.basename,"dirname"),this.path=jP.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?jP.extname(this.path):void 0}set extname(e){if(zP(e,"extname"),BP(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=jP.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){MP(e)&&(e=LP(e)),UP(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?jP.basename(this.path,this.extname):void 0}set stem(e){UP(e,"stem"),zP(e,"stem"),this.path=jP.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new ER(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function zP(e,t){if(e&&e.includes(jP.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jP.sep+"`")}function UP(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function BP(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const $P=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},VP={}.hasOwnProperty;class WP extends $P{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=RP()}copy(){const e=new WP;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(OP(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(ZP("data",this.frozen),this.namespace[e]=t,this):VP.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ZP("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=YP(e),n=this.parser||this.Parser;return HP("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),HP("process",this.parser||this.Parser),KP("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){const o=YP(e),a=n.parse(o);function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}n.run(a,o,function(e,t,r){if(e||!t||!r)return s(e);const i=t,o=n.stringify(i,r);!function(e){return"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)}(o)?r.result=o:r.value=o,s(e,r)})}}processSync(e){let t,n=!1;return this.freeze(),HP("processSync",this.parser||this.Parser),KP("processSync",this.compiler||this.Compiler),this.process(e,function(e,r){n=!0,xP(e),t=r}),JP("processSync","process",n),t}run(e,t,n){GP(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,o){const a=YP(t);r.run(e,a,function(t,r,a){const s=r||e;t?o(t):i?i(s):n(void 0,s,a)})}}runSync(e,t){let n,r=!1;return this.run(e,t,function(e,t){xP(e),n=t,r=!0}),JP("runSync","run",r),n}stringify(e,t){this.freeze();const n=YP(t),r=this.compiler||this.Compiler;return KP("stringify",r),GP(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(ZP("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):o(e)}return this;function i(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else o(e)}}function o(e){if(!("plugins"in e)&&!("settings"in e))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");a(e.plugins),e.settings&&(r.settings=OP(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){i(e[t])}}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(-1===i)n.push([e,...t]);else if(t.length>0){let[r,...o]=t;const a=n[i][1];TP(a)&&TP(r)&&(r=OP(!0,a,r)),n[i]=[e,r,...o]}}}}const qP=(new WP).freeze();function HP(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function KP(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function ZP(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 GP(e){if(!TP(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function JP(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function YP(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new FP(e)}const XP=[],QP={allowDangerousHtml:!0},eM=/^(https?|ircs?|mailto|xmpp)$/i,tM=[{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:"className",id:"remove-classname"},{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 nM(e){const t=function(e){const t=e.rehypePlugins||XP,n=e.remarkPlugins||XP,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...QP}:QP,i=qP().use(zA).use(n).use(bP,r).use(t);return i}(e),n=function(e){const t=e.children||"",n=new FP;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||rM;for(const u of tM)Object.hasOwn(t,u.from)&&aT((u.from,u.to&&u.to,u.id));return uP(e,c),AR(e,{Fragment:Y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Y.jsx,jsxs:Y.jsxs,passKeys:!0,passNode:!0});function c(e,t,i){if("raw"===e.type&&i&&"number"==typeof t)return a?i.children.splice(t,1):i.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in VR)if(Object.hasOwn(VR,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=VR[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!o&&o.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,i)),a&&i&&"number"==typeof t)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function rM(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return-1===t||-1!==i&&t>i||-1!==n&&t>n||-1!==r&&t>r||eM.test(e.slice(0,t))?e:""}function iM(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;-1!==i;)r++,i=n.indexOf(t,i+t.length);return r}function oM(e,t,n){const r=rP((n||{}).ignore||[]),i=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([aM(e[0]),sM(e[1])])}return t}(t);let o=-1;for(;++o<i.length;)cP(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],i=n?n.children:void 0;if(r(e,i?i.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=i[o][0],a=i[o][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,i={index:d.index,input:d.input,stack:[...t,e]};let o=a(...d,i);if("string"==typeof o&&(o=o.length>0?{type:"text",value:o}:void 0),!1===o?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(o)?u.push(...o):o&&u.push(o),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function aM(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function sM(e){return"function"==typeof e?e:function(){return e}}const lM="phrasing",cM=["autolink","link","image","label"];function uM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function dM(e){this.config.enter.autolinkProtocol.call(this,e)}function pM(e){this.config.exit.autolinkProtocol.call(this,e)}function fM(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function hM(e){this.config.exit.autolinkEmail.call(this,e)}function mM(e){this.exit(e)}function gM(e){oM(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),yM]],{ignore:["link","linkReference"]})}function vM(e,t,n,r,i){let o="";if(!bM(i))return!1;if(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=iM(e,"(");let o=iM(e,")");for(;-1!==r&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function yM(e,t,n,r){return!(!bM(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function bM(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||mj(n)||hj(n))&&(!t||47!==n)}function xM(){this.buffer()}function wM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kM(){this.buffer()}function _M(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function SM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function CM(e){this.exit(e)}function EM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=rj(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IM(e){this.exit(e)}function NM(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function OM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,i){const o=r.createTracker(i);let a=o.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=o.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=o.move("]:"),e.children&&e.children.length>0&&(o.shift(4),a+=o.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,o.current()),t?RM:TM)));return s(),a},footnoteReference:NM},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function TM(e,t,n){return 0===t?e:RM(e,t,n)}function RM(e,t,n){return(n?"":" ")+e}NM.peek=function(){return"["};const jM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function AM(e){this.enter({type:"delete",children:[]},e)}function PM(e){this.exit(e)}function MM(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function LM(e){return e.length}function DM(e){return null==e?"":String(e)}function FM(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function zM(e,t,n){return">"+(n?"":" ")+e}function UM(e,t){return BM(e,t.inConstruct,!0)&&!BM(e,t.notInConstruct,!1)}function BM(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function $M(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if("\n"===n.unsafe[i].character&&UM(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return"\\\n"}function VM(e,t,n){return(n?"":" ")+e}function WM(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function qM(e){return"&#x"+e.toString(16).toUpperCase()+";"}function HM(e,t,n){const r=kj(e),i=kj(t);return void 0===r?void 0===i?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===i?{inside:!1,outside:!1}:1===i?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function KM(e,t,n,r){const i=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),o=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const c=l.charCodeAt(0),u=HM(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=qM(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=HM(r.after.charCodeAt(0),d,i);p.inside&&(l=l.slice(0,-1)+qM(d));const f=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}function ZM(e){return e.value||""}function GM(e,t,n,r){const i=WM(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),a(),c}function JM(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function YM(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const e=n.unsafe[o],t=n.compilePattern(e);let i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(i.index+1)}}return i+r+i}function XM(e,t){const n=qR(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function QM(e,t,n,r){const i=WM(n),o='"'===i?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(XM(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function eL(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,o(),"full"!==i&&c&&c===d?"shortcut"===i?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function tL(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function nL(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}MM.peek=function(){return"~"},KM.peek=function(e,t,n){return n.options.emphasis||"*"},ZM.peek=function(){return"<"},GM.peek=function(){return"!"},JM.peek=function(){return"!"},YM.peek=function(){return"`"},QM.peek=function(e,t,n){return XM(e,n)?"<":"["},eL.peek=function(){return"["};const rL=rP(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function iL(e,t,n,r){const i=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),o=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const c=l.charCodeAt(0),u=HM(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=qM(c)+l.slice(1));const d=l.charCodeAt(l.length-1),p=HM(r.after.charCodeAt(0),d,i);p.inside&&(l=l.slice(0,-1)+qM(d));const f=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:p.outside,before:u.outside},s+l+f}iL.peek=function(e,t,n){return n.options.strong||"*"};const oL={blockquote:function(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),zM);return i(),a},break:$M,code:function(e,t,n,r){const i=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),o=e.value||"",a="`"===i?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(o,VM);return e(),t}const s=n.createTracker(r),l=i.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}(o,i)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),o&&(u+=s.move(o+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const i=WM(n),o='"'===i?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),a(),c},emphasis:KM,hardBreak:$M,heading:function(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(function(e,t){let n=!1;return uP(e,function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,lP}),Boolean((!e.depth||e.depth<3)&&qR(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...o.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===i?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...o.current()});return/^[\t ]/.test(c)&&(c=qM(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:ZM,image:GM,imageReference:JM,inlineCode:YM,link:QM,linkReference:eL,list:function(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):tL(n);const s=e.ordered?"."===a?")":".":function(e){const t=tL(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),nL(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c},listItem:function(e,t,n,r){const i=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let o=n.bulletCurrent||tL(n);t&&"list"===t.type&&t.ordered&&(o=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+o);let a=o.length+1;("tab"===i||"mixed"===i&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?o:o+" ".repeat(a-o.length))+e});return l(),c},paragraph:function(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a},root:function(e,t,n,r){return(e.children.some(function(e){return rL(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:iL,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(nL(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function aL(e){const t=e._align;this.enter({type:"table",align:t.map(function(e){return"none"===e?null:e}),children:[]},e),this.data.inTable=!0}function sL(e){this.exit(e),this.data.inTable=void 0}function lL(e){this.enter({type:"tableRow",children:[]},e)}function cL(e){this.exit(e)}function uL(e){this.enter({type:"tableCell",children:[]},e)}function dL(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,pL));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function pL(e,t){return"|"===t?t:e}function fL(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=oL.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let i=-1;const o=[],a=t.enter("table");for(;++i<r.length;)o[i]=l(r[i],t,n);return a(),o}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const i=s([l(e,n,r)]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const i=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:o,after:o});return a(),i(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||LM,o=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let o=-1;for(e[u].length>c&&(c=e[u].length);++o<e[u].length;){const a=DM(e[u][o]);if(!1!==n.alignDelimiters){const e=i(a);r[o]=e,(void 0===l[o]||e>l[o])&&(l[o]=e)}t.push(a)}a[u]=t,s[u]=r}let d=-1;if("object"==typeof r&&"length"in r)for(;++d<c;)o[d]=FM(r[d]);else{const e=FM(r);for(;++d<c;)o[d]=e}d=-1;const p=[],f=[];for(;++d<c;){const e=o[d];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let i=!1===n.alignDelimiters?1:Math.max(1,l[d]-t.length-r.length);const a=t+"-".repeat(i)+r;!1!==n.alignDelimiters&&(i=t.length+i+r.length,i>l[d]&&(l[d]=i),f[d]=i),p[d]=a}a.splice(1,0,p),s.splice(1,0,f),u=-1;const h=[];for(;++u<a.length;){const e=a[u],t=s[u];d=-1;const r=[];for(;++d<c;){const i=e[d]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[d]-(t[d]||0),n=o[d];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||d||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===i||!1===n.delimiterStart&&!d||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(i),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&d===c-1||r.push("|")}h.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return h.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function l(e,t,n){const r=e.children;let i=-1;const o=[],s=t.enter("tableRow");for(;++i<r.length;)o[i]=a(r[i],0,t,n);return s(),o}}function hL(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function mL(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let i,o=-1;for(;++o<r.length;){const e=r[o];if("paragraph"===e.type){i=e;break}}i===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function gL(e,t,n,r){const i=e.children[0],o="boolean"==typeof e.checked&&i&&"paragraph"===i.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=oL.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,function(e){return e+a})),l}const vL={tokenize:function(e,t,n){let r=0;return function t(o){if((87===o||119===o)&&r<3)return r++,e.consume(o),t;if(46===o&&3===r)return e.consume(o),i;return n(o)};function i(e){return null===e?n(e):t(e)}},partial:!0},yL={tokenize:function(e,t,n){let r,i,o;return a;function a(t){return 46===t||95===t?e.check(xL,l,s)(t):null===t||pj(t)||mj(t)||45!==t&&hj(t)?l(t):(o=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(i=r,r=void 0),e.consume(t),a}function l(e){return i||r||!o?n(e):t(e)}},partial:!0},bL={tokenize:function(e,t){let n=0,r=0;return i;function i(a){return 40===a?(n++,e.consume(a),i):41===a&&r<n?o(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(xL,t,o)(a):null===a||pj(a)||mj(a)?t(a):(e.consume(a),i)}function o(t){return 41===t&&r++,e.consume(t),i}},partial:!0},xL={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),o):93===a?(e.consume(a),i):60===a||null===a||pj(a)||mj(a)?t(a):n(a)}function i(e){return null===e||40===e||91===e||pj(e)||mj(e)?t(e):r(e)}function o(e){return ij(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):ij(t)?(e.consume(t),a):n(t)}},partial:!0},wL={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return oj(e)?n(e):t(e)}},partial:!0},kL={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!IL.call(r,r.previous)||RL(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(vL,e.attempt(yL,e.attempt(bL,i),n),n)(t)};function i(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:IL},_L={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let i="",o=!1;return function(t){if((72===t||104===t)&&NL.call(r,r.previous)&&!RL(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(ij(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=i.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),o?l:(o=!0,s)):n(t)}function l(t){return null===t||sj(t)||pj(t)||mj(t)||hj(t)?n(t):e.attempt(yL,e.attempt(bL,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:NL},SL={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let i,o;return function(t){if(!TL(t)||!OL.call(r,r.previous)||RL(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return TL(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(wL,c,l)(t):45===t||95===t||oj(t)?(o=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),i=!0,s}function c(a){return o&&i&&ij(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:OL},CL={};let EL=48;for(;EL<123;)CL[EL]=SL,EL++,58===EL?EL=65:91===EL&&(EL=97);function IL(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||pj(e)}function NL(e){return!ij(e)}function OL(e){return!(47===e||TL(e))}function TL(e){return 43===e||45===e||46===e||95===e||oj(e)}function RL(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}CL[43]=SL,CL[45]=SL,CL[46]=SL,CL[95]=SL,CL[72]=[SL,_L],CL[104]=[SL,_L],CL[87]=[SL,kL],CL[119]=[SL,kL];const jL={tokenize:function(e,t,n){const r=this;return yj(e,function(e){const i=r.events[r.events.length-1];return i&&"gfmFootnoteDefinitionIndent"===i[1].type&&4===i[2].sliceSerialize(i[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)},partial:!0};function AL(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const e=r.events[i][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(i){if(!a||!a._balanced)return n(i);const s=rj(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!o.includes(s.slice(1)))return n(i);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(i),e.exit("gfmFootnoteCallLabelMarker"),t(i)}}function PL(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function ML(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!o||null===s||91===s||pj(s))return n(s);if(93===s){e.exit("chunkString");const o=e.exit("gfmFootnoteCallString");return i.includes(rj(r.sliceSerialize(o)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return pj(s)||(o=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function LL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||pj(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return o=rj(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return pj(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),i.includes(o)||i.push(o),yj(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function DL(e,t,n){return e.check(Ij,t,e.attempt(jL,t,n))}function FL(e){e.exit("gfmFootnoteDefinition")}function zL(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const i=this.previous,o=this.events;let a=0;return function(t){if(126===i&&"characterEscape"!==o[o.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(o){const l=kj(i);if(126===o)return a>1?r(o):(e.consume(o),a++,s);if(a<2&&!t)return r(o);const c=e.exit("strikethroughSequenceTemporary"),u=kj(o);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(o)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const i={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},o={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",i,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",o,t]],s=t.parser.constructs.insideSpan.null;s&&JR(a,a.length,0,_j(s,e.slice(r+1,n),t)),JR(a,a.length,0,[["exit",o,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",i,t]]),JR(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class UL{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let i=0;if(0===n&&0===r.length)return;for(;i<e.map.length;){if(e.map[i][0]===t)return e.map[i][1]+=n,void e.map[i][2].push(...r);i+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function BL(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if("enter"===i[0])"tableContent"===i[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===i[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===i[1].type)break}else"enter"===i[0]&&"tableDelimiterRow"===i[1].type&&(n=!0);t+=1}return r}function $L(e,t,n){const r=this;let i,o=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const i=t>-1?r.events[t][1].type:null,o="tableHead"===i||"tableRow"===i?x:s;if(o===x&&r.parser.lazy[r.now().line])return n(e);return o(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return i=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):dj(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):fj(t)?yj(e,l,"whitespace")(t):(a+=1,i&&(i=!1,o+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),i=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||pj(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),i=!1,fj(t)?yj(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):p(t))}function p(t){return 45===t||58===t?h(t):124===t?(i=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):b(t)}function f(t){return fj(t)?yj(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||dj(t)?y(t):b(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):b(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(t))}function v(t){return fj(t)?yj(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||dj(n))&&i&&o===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):b(n)}function b(e){return n(e)}function x(t){return e.enter("tableRow"),w(t)}function w(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),w):null===n||dj(n)?(e.exit("tableRow"),t(n)):fj(n)?yj(e,w,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||pj(t)?(e.exit("data"),w(t)):(e.consume(t),92===t?_:k)}function _(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function VL(e,t){let n,r,i,o=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new UL;for(;++o<e.length;){const f=e[o],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(qL(p,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,i=void 0,l=[0,0,0,0],c=[0,o+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(o,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],i=WL(p,t,l,s,void 0,i)),l=c,c=[l[1],o,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],i=WL(p,t,l,s,void 0,i),l=[0,0,0,0]),c[2]=o)):"tableHead"===h.type?(u=!0,d=o):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=o,0!==l[1]?(c[0]=c[1],i=WL(p,t,l,s,o,i)):0!==c[1]&&(i=WL(p,t,c,s,o,i)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=o)}for(0!==d&&qL(p,t,d,n,r),p.consume(t.events),o=-1;++o<t.events.length;){const e=t.events[o];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=BL(t.events,o))}return e}function WL(e,t,n,r,i,o){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(o.end=Object.assign({},HL(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const s=HL(t.events,n[1]);if(o={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",o,t]]),0!==n[2]){const i=HL(t.events,n[2]),o=HL(t.events,n[3]),a={type:"tableContent",start:Object.assign({},i),end:Object.assign({},o)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==i&&(o.end=Object.assign({},HL(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function qL(e,t,n,r,i){const o=[],a=HL(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function HL(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const KL={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),i};function i(t){return pj(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),o):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),o):n(t)}function o(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return dj(r)?t(r):fj(r)?e.check({tokenize:ZL},t,n)(r):n(r)}}};function ZL(e,t,n){return yj(e,function(e){return null===e?n(e):t(e)},"whitespace")}const GL={};function JL(e){const t=e||GL,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),o=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return QR([{text:CL},{document:{91:{name:"gfmFootnoteDefinition",tokenize:LL,continuation:{tokenize:DL},exit:FL}},text:{91:{name:"gfmFootnoteCall",tokenize:ML},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:AL,resolveTo:PL}}},zL(e),{flow:{null:{name:"table",tokenize:$L,resolveAll:VL}}},{text:{91:KL}}])}(t)),i.push([{transforms:[gM],enter:{literalAutolink:uM,literalAutolinkEmail:dM,literalAutolinkHttp:dM,literalAutolinkWww:dM},exit:{literalAutolink:mM,literalAutolinkEmail:hM,literalAutolinkHttp:pM,literalAutolinkWww:fM}},{enter:{gfmFootnoteCallString:xM,gfmFootnoteCall:wM,gfmFootnoteDefinitionLabelString:kM,gfmFootnoteDefinition:_M},exit:{gfmFootnoteCallString:SM,gfmFootnoteCall:CM,gfmFootnoteDefinitionLabelString:EM,gfmFootnoteDefinition:IM}},{canContainEols:["delete"],enter:{strikethrough:AM},exit:{strikethrough:PM}},{enter:{table:aL,tableData:uL,tableHeader:uL,tableRow:lL},exit:{codeText:dL,table:sL,tableData:cL,tableHeader:cL,tableRow:cL}},{exit:{taskListCheckValueChecked:hL,taskListCheckValueUnchecked:hL,paragraph:mL}}]),o.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lM,notInConstruct:cM},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lM,notInConstruct:cM},{character:":",before:"[ps]",after:"\\/",inConstruct:lM,notInConstruct:cM}]},OM(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:jM}],handlers:{delete:MM}},fL(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gL}}]}}(t))}const YL={h1:({children:e})=>Y.jsx("h1",{className:"mb-4 mt-6 text-xl font-bold tracking-tight first:mt-0 last:mb-0",children:e}),h2:({children:e})=>Y.jsx("h2",{className:"mb-3 mt-5 text-lg font-semibold tracking-tight first:mt-0 last:mb-0",children:e}),h3:({children:e})=>Y.jsx("h3",{className:"mb-2 mt-4 text-base font-semibold tracking-tight first:mt-0 last:mb-0",children:e}),p:({children:e})=>Y.jsx("p",{className:"my-4 leading-relaxed text-inherit first:mt-0 last:mb-0",children:e}),ul:({children:e})=>Y.jsx("ul",{className:"my-4 ml-5 list-disc space-y-2 first:mt-0 last:mb-0",children:e}),ol:({children:e})=>Y.jsx("ol",{className:"my-4 ml-5 list-decimal space-y-2 first:mt-0 last:mb-0",children:e}),li:({children:e})=>Y.jsx("li",{className:"leading-relaxed text-inherit",children:e}),blockquote:({children:e})=>Y.jsx("blockquote",{className:"my-4 border-l-2 border-border-default pl-4 italic text-secondary first:mt-0 last:mb-0",children:e}),a:({href:e,children:t})=>Y.jsx("a",{href:e,className:"font-medium text-blue-600 dark:text-blue-400 underline underline-offset-2 hover:text-blue-800 dark:text-blue-400",children:t}),code:({className:e,children:t})=>!e?Y.jsx("code",{className:"rounded bg-surface-hover px-1.5 py-0.5 text-sm font-medium text-primary",children:t}):Y.jsx("code",{className:e,children:t}),pre:({children:e})=>Y.jsx("pre",{className:"my-4 overflow-x-auto rounded-lg bg-primary p-3 text-sm text-gray-100 first:mt-0 last:mb-0",children:e}),strong:({children:e})=>Y.jsx("strong",{className:"font-semibold",children:e}),em:({children:e})=>Y.jsx("em",{className:"italic",children:e}),hr:()=>Y.jsx("hr",{className:"my-4 border-border-default"}),table:({children:e})=>Y.jsx("div",{className:"my-4 overflow-x-auto first:mt-0 last:mb-0",children:Y.jsx("table",{className:"min-w-full divide-y divide-border-default text-sm",children:e})}),th:({children:e})=>Y.jsx("th",{className:"bg-surface-subtle px-3 py-2 text-left font-semibold text-primary",children:e}),td:({children:e})=>Y.jsx("td",{className:"border-b border-border-default px-3 py-2",children:e})},XL=({agent:e,initialIdentity:t="",onIdentityChange:n,onMessageSent:r,mode:i="portal",customEndpoint:o})=>{const a={trackDashboardView:()=>iT(),trackDashboardRefresh:()=>iT(),trackDashboardExport:()=>iT(),trackMetricCardClick:e=>iT(),trackAlertAction:(e,t)=>iT(),trackAgentListViewed:()=>iT(),trackAgentCreated:e=>iT(),trackAgentUpdated:(e,t)=>iT(),trackAgentDeleted:e=>iT(),trackAgentViewed:(e,t)=>iT(),trackAgentSearch:e=>iT(),trackAgentFilter:(e,t)=>iT(),trackAgentViewModeChanged:e=>iT(),trackAgentDetailTabChanged:(e,t)=>iT(),trackAgentTestStarted:(e,t)=>iT(),trackAgentTestMessageSent:(e,t)=>iT(),trackAgentTestCompleted:(e,t)=>iT(),trackAgentCodeEdited:e=>iT(),trackAgentTriggerCreated:(e,t)=>iT(),trackAgentMemoryAccessed:e=>iT(),trackAgentMetricsViewed:e=>iT(),trackAgentObservabilityViewed:e=>iT(),trackConnectorsListViewed:()=>iT(),trackConnectorTemplateViewed:(e,t)=>iT(),trackConnectorInstanceCreated:(e,t)=>iT(),trackConnectorInstanceDeleted:e=>iT(),trackConnectorDetailViewed:e=>iT(),trackConnectorTabChanged:(e,t)=>iT(),trackConnectorResourceCreated:(e,t)=>iT(),trackConnectorResourceUpdated:(e,t)=>iT(),trackConnectorResourceDeleted:(e,t)=>iT(),trackConnectorResourceTested:(e,t)=>iT(),trackConnectorSearch:e=>iT(),trackDataSourcesListViewed:()=>iT(),trackDataSourceCreated:(e,t)=>iT(),trackDataSourceUpdated:e=>iT(),trackDataSourceDeleted:(e,t)=>iT(),trackDataSourceViewed:e=>iT(),trackDataSourceConnectionTested:(e,t)=>iT(),trackDataSourceSynced:e=>iT(),trackCredentialsListViewed:()=>iT(),trackCredentialCreated:e=>iT(),trackCredentialUpdated:e=>iT(),trackCredentialDeleted:e=>iT(),trackCredentialViewed:e=>iT(),trackPromptsListViewed:()=>iT(),trackPromptCreated:e=>iT(),trackPromptUpdated:e=>iT(),trackPromptDeleted:e=>iT(),trackPromptViewed:e=>iT(),trackTriggersListViewed:()=>iT(),trackTriggerCreated:(e,t)=>iT(),trackTriggerUpdated:e=>iT(),trackTriggerDeleted:e=>iT(),trackTriggerViewed:e=>iT(),trackTriggerActivated:e=>iT(),trackTriggerDeactivated:e=>iT(),trackVectorSearchViewed:()=>iT(),trackVectorSearchPerformed:(e,t)=>iT(),trackKnowledgeBaseViewed:()=>iT(),trackAdminDashboardViewed:()=>iT(),trackTenantCreated:e=>iT(),trackTenantUpdated:e=>iT(),trackUserAccessGranted:(e,t)=>iT(),trackUserAccessRevoked:(e,t)=>iT(),trackProfileViewed:()=>iT(),trackProfileUpdated:()=>iT(),trackDocumentationViewed:()=>iT(),trackNavigationClick:(e,t)=>iT(),trackSidebarToggled:e=>iT()},[s,l]=$.useState([]),[c,u]=$.useState(""),[d,p]=$.useState(t),[f,h]=$.useState(!1),[m,g]=$.useState("disconnected"),[v,y]=$.useState(!1),[b,x]=$.useState(!1),[w,k]=$.useState(!1),[_,S]=$.useState("fields"),[C,E]=$.useState(null),[I,N]=$.useState([{key:"",value:""}]),[O,T]=$.useState('{\n "metadata": {\n "email": ""\n }\n}'),[R,j]=$.useState(null),[A,P]=$.useState(!1),M=$.useRef(null),L=$.useRef(null),D=$.useRef(null),F=$.useRef(null);$.useEffect(()=>()=>{F.current&&clearInterval(F.current)},[]);const z=(e=!1)=>{var t;!e&&A||null==(t=M.current)||t.scrollIntoView({behavior:"smooth"})};$.useEffect(()=>{A||z()},[s,A]),$.useEffect(()=>{g("testing"),U()},[e]);const U=async(e=3,t=2e3)=>{let n=0;for(;n<e;){n++,n>1&&(l([{id:"1",type:"system",content:`🔄 Connecting to agent... (Attempt ${n}/${e})\n\nWaiting for server to be ready...`,timestamp:(new Date).toISOString()}]),await new Promise(e=>setTimeout(e,t)));if(await B())return;if(n===e)return}};$.useEffect(()=>{n&&d!==t&&n(d)},[d,n,t]);const B=async()=>{let t;if(t=o?`${o}/api/v1/agents/execute`:e.endpointUrl,!t)return l([{id:"1",type:"error",content:`❌ **Configuration Error**\n\nAgent "${e.name}" doesn't have an endpoint URL configured.`,timestamp:(new Date).toISOString()}]),g("disconnected"),!1;try{return g("connected"),l([{id:"1",type:"system",content:"✅ Connected to agent. Ready to receive messages."+(o?`\n\n**Local Mode:** ${t}`:""),timestamp:(new Date).toISOString()}]),!0}catch(vE){return g("disconnected"),l([{id:"1",type:"error",content:`❌ **Connection Failed**\n\nCouldn't connect to agent "${e.name}".\n\n**Endpoint:** ${t}\n**Error:** ${vE instanceof Error?vE.message:"Unknown error"}`,timestamp:(new Date).toISOString()}]),!1}},V=(e,t)=>({memory_load:"carregando memória",memory_save:"salvando contexto",tool_call:t?`usando ${t}`:"usando ferramenta",tool_result:"processando",rag_search:"buscando informações"}[e]||"pensando"),W=async()=>{if(!c.trim()||f||"connected"!==m)return;F.current&&(clearInterval(F.current),F.current=null,j(null)),P(!1);const t={id:Date.now().toString(),type:"user",content:c,timestamp:(new Date).toISOString()};a.trackAgentTestMessageSent(e.id,c.length),l(e=>[...e,t]);const n=c;let i;if(u(""),h(!0),w){i=(Date.now()+1).toString();const e={id:i,type:"agent",content:"",timestamp:(new Date).toISOString(),thinkingStatus:null};l(t=>[...t,e])}try{if(w)await(async(t,n=null,r)=>{var i,a,s;let c;if(o)c=`${o}/api/v1/agents/execute/stream`;else{const t=new URL(e.endpointUrl);t.pathname=t.pathname.replace(/\/?$/,"/stream"),c=t.toString()}let u={};if("json"===_)try{O.trim()&&(u=JSON.parse(O))}catch(vE){throw new Error(`Invalid JSON in metadata: ${vE instanceof Error?vE.message:"Parse error"}`)}else I.forEach(({key:e,value:t})=>{e.trim()&&t.trim()&&(u[e.trim()]=t.trim())});const p={message:t,...u};D.current=new AbortController;const f={"Content-Type":"application/json",Accept:"text/event-stream"};n&&(f["X-Session-Id"]=n),d&&(f["X-Thread-Id"]=d);try{const e=await fetch(c,{method:"POST",headers:f,body:JSON.stringify(p),signal:D.current.signal});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);const t=e.headers.get("x-session-id");t&&E(t);const n=null==(i=e.body)?void 0:i.getReader();if(!n)throw new Error("Response body is not readable");const o=new TextDecoder;let u="",d="";const m=r||(Date.now()+1).toString();if(r)l(e=>e.map(e=>e.id===m?{...e,rawRequest:p}:e));else{const e={id:m,type:"agent",content:"",timestamp:(new Date).toISOString(),rawRequest:p,thinkingStatus:null};l(t=>[...t,e])}for(;;){const{done:e,value:t}=await n.read();if(e)break;u+=o.decode(t,{stream:!0});const r=u.split("\n");u=r.pop()||"";for(const n of r)if(n.startsWith("data: ")){const e=n.slice(6);if("[DONE]"===e)continue;try{const t=JSON.parse(e);if("content"===t.type)d+=t.data.content,l(e=>e.map(e=>e.id===m?{...e,content:d}:e));else if("internal_process"===t.type){const e=t.data;if("started"===e.status){const t=V(e.processType,null==(a=e.process)?void 0:a.name);l(e=>e.map(e=>e.id===m?{...e,thinkingStatus:t}:e))}else"completed"===e.status&&l(e=>e.map(e=>e.id===m?{...e,thinkingStatus:null}:e))}else if("done"===t.type){l(e=>e.map(e=>e.id===m?{...e,content:t.data.message||d,metadata:t.data.metadata,rawResponse:t.data}:e));const e=t.data.sessionId||t.data.session_id||t.data["x-session-id"]||(null==(s=t.data.metadata)?void 0:s.sessionId);e&&E(e)}else if("error"===t.type)throw new Error(t.data.error)}catch(h){}}}}catch(vE){if(vE instanceof Error&&"AbortError"===vE.name)throw new Error("Request cancelled by user");throw vE}})(n,C,i);else{const t=await(async(t,n=null)=>{var r;let i;if(i=o?`${o}/api/v1/agents/execute`:e.newEngine?e.endpointUrl.replace("executions","executor"):e.endpointUrl,!i)return{content:"",error:"Endpoint URL not configured"};let a={};if("ping"!==t)if("json"===_)try{O.trim()&&(a=JSON.parse(O))}catch(vE){return{content:"",error:`Invalid JSON in metadata: ${vE instanceof Error?vE.message:"Parse error"}`,rawRequest:{message:t,metadata_error:O},rawResponse:null}}else I.forEach(({key:e,value:t})=>{e.trim()&&t.trim()&&(a[e.trim()]=t.trim())});const s="ping"===t?{message:t}:{message:t,...a};try{const e=Date.now(),o={"Content-Type":"application/json"};n&&"ping"!==t&&(o["X-Session-Id"]=n),d&&"ping"!==t&&(o["X-Thread-Id"]=d),D.current=new AbortController;const a=await fetch(i,{method:"POST",headers:o,body:JSON.stringify(s),signal:D.current.signal});if(!a.ok)throw new Error(`HTTP ${a.status}: ${a.statusText}`);const l="ping"!==t?a.headers.get("x-session-id"):void 0,c=await a.json(),u=c.processingTime||(null==(r=c.metadata)?void 0:r.processingTime)||Date.now()-e,p=c.sessionId||c.session_id||c["x-session-id"];let f="";return f="string"==typeof c?c:c.response?"string"==typeof c.response?c.response:JSON.stringify(c.response,null,2):c.message?"string"==typeof c.message?c.message:"object"==typeof c.message&&c.message.output?c.message.output:JSON.stringify(c.message,null,2):c.content?"string"==typeof c.content?c.content:JSON.stringify(c.content,null,2):JSON.stringify(c,null,2),{content:f,metadata:{processingTime:u,...c.metadata},rawRequest:s,rawResponse:c,sessionId:l||p||void 0}}catch(vE){return vE instanceof Error&&"AbortError"===vE.name?{content:"",error:"Request cancelled by user",rawRequest:s,rawResponse:null}:{content:"",error:vE instanceof Error?vE.message:"Error communicating with agent",rawRequest:s,rawResponse:null}}})(n,C);if(t.error){const e={id:(Date.now()+1).toString(),type:"error",content:`❌ **Communication Error**\n\n${t.error}`,timestamp:(new Date).toISOString(),rawRequest:t.rawRequest,rawResponse:t.rawResponse};l(t=>[...t,e])}else{t.sessionId&&E(t.sessionId);((e,t,n,r,i)=>{F.current&&clearInterval(F.current);const o=t.split(/(\s+)/);let a=0,s="";j(e);const c={id:e,type:"agent",content:"",timestamp:(new Date).toISOString(),thinkingStatus:"digitando"};l(e=>[...e,c]),F.current=setInterval(()=>{a<o.length?(s+=o[a],a++,l(t=>t.map(t=>t.id===e?{...t,content:s,thinkingStatus:(o.length,null)}:t))):(F.current&&(clearInterval(F.current),F.current=null),j(null),l(o=>o.map(o=>o.id===e?{...o,content:t,metadata:n,rawRequest:r,rawResponse:i,thinkingStatus:null}:o)))},25+15*Math.random())})((Date.now()+1).toString(),t.content,t.metadata,t.rawRequest,t.rawResponse)}}r&&r()}catch(vE){const t={id:(Date.now()+1).toString(),type:"error",content:`❌ **Unexpected Error**\n\n${vE instanceof Error?vE.message:"Unknown error"}`,timestamp:(new Date).toISOString()};l(e=>[...e,t])}finally{h(!1),D.current=null}},q=(e,t,n)=>{const r=[...I];r[e][t]=n,N(r)},H="connected"===m?[{label:"Hello, how can you help?",value:"Hello, how can you help?"},{label:"What's your purpose?",value:"What's your purpose?"},{label:"Give me an example",value:"Give me an example"}]:[];return Y.jsxs("div",{className:"flex flex-col h-full bg-surface",children:[Y.jsx("div",{className:"px-4 py-3 border-b border-border-default flex-shrink-0",children:Y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[Y.jsx("h3",{className:"text-sm font-semibold text-primary",children:"Test Agent"}),Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx("button",{onClick:()=>k(!w),className:"p-1.5 rounded transition-colors "+(w?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-secondary hover:text-secondary hover:bg-surface-hover"),title:w?"Streaming Enabled":"Streaming Disabled",children:Y.jsx(gm,{className:"h-3.5 w-3.5"})}),Y.jsx("button",{onClick:()=>x(!b),className:"p-1.5 rounded transition-colors "+(b?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-secondary hover:text-secondary hover:bg-surface-hover"),title:"Debug Mode",children:Y.jsx(em,{className:"h-3.5 w-3.5"})}),Y.jsx("button",{onClick:()=>y(!v),className:"p-1.5 rounded transition-colors "+(v?"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400":"text-secondary hover:text-secondary hover:bg-surface-hover"),title:"Advanced Settings",children:Y.jsx(dm,{className:"h-3.5 w-3.5"})})]})]})}),v&&Y.jsxs("div",{className:"border-b border-border-default p-3 bg-surface-subtle flex-shrink-0 max-h-48 overflow-y-auto",children:[Y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[Y.jsx("h4",{className:"text-xs font-medium text-primary",children:"Custom Metadata"}),Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx("button",{type:"button",onClick:()=>S("fields"),className:"px-2 py-0.5 text-xs rounded transition-colors "+("fields"===_?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 border border-blue-300":"bg-surface text-secondary border border-border-default hover:bg-surface-subtle"),children:"Fields"}),Y.jsx("button",{type:"button",onClick:()=>S("json"),className:"px-2 py-0.5 text-xs rounded transition-colors "+("json"===_?"bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400 border border-blue-300":"bg-surface text-secondary border border-border-default hover:bg-surface-subtle"),children:"JSON"})]})]}),"fields"===_?Y.jsxs("div",{className:"space-y-1.5",children:[I.map((e,t)=>Y.jsxs("div",{className:"flex items-center space-x-2",children:[Y.jsx("input",{type:"text",placeholder:"Key",value:e.key,onChange:e=>q(t,"key",e.target.value),className:"flex-1 px-2 py-1 text-xs border border-border-default rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}),Y.jsx("input",{type:"text",placeholder:"Value",value:e.value,onChange:e=>q(t,"value",e.target.value),className:"flex-1 px-2 py-1 text-xs border border-border-default rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}),I.length>1&&Y.jsx("button",{type:"button",onClick:()=>(e=>{I.length>1&&N(I.filter((t,n)=>n!==e))})(t),className:"text-red-500 hover:text-red-700 dark:text-red-400 p-1",children:Y.jsx(pm,{className:"h-3 w-3"})})]},t)),Y.jsxs("button",{type:"button",onClick:()=>{N([...I,{key:"",value:""}])},className:"inline-flex items-center text-xs text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:text-blue-400",children:[Y.jsx(lm,{className:"h-3 w-3 mr-1"}),"Add field"]})]}):Y.jsx("div",{className:"space-y-1.5",children:Y.jsx("textarea",{value:O,onChange:e=>T(e.target.value),placeholder:'{\\n "metadata": {...}\\n}',className:"w-full px-2 py-1.5 text-xs font-mono border border-border-default rounded focus:outline-none focus:ring-1 focus:ring-blue-500 resize-none",rows:3})})]}),Y.jsxs("div",{ref:L,onScroll:()=>{const e=(()=>{const e=L.current;return!e||e.scrollHeight-e.scrollTop-e.clientHeight<100})();P(!e)},className:"flex-1 overflow-y-auto p-4 space-y-3 min-h-0",children:[s.map(e=>{return Y.jsx("div",{className:"flex "+("user"===e.type?"justify-end":"justify-start"),children:Y.jsx("div",{className:"max-w-[85%] px-3 py-2 rounded-lg "+("user"===e.type?"bg-active text-white":"system"===e.type?"bg-blue-50 dark:bg-blue-900/20 text-blue-800 dark:text-blue-400 border border-blue-200 dark:border-blue-800":"error"===e.type?"bg-red-50 dark:bg-red-900/20 text-red-800 dark:text-red-400 border border-red-200 dark:border-red-800":"bg-surface-hover text-primary"),children:Y.jsxs("div",{className:"flex items-start space-x-2",children:["error"===e.type&&Y.jsx(Gh,{className:"h-3.5 w-3.5 mt-0.5 text-red-600 flex-shrink-0"}),Y.jsxs("div",{className:"flex-1",children:[e.content&&Y.jsx("div",{className:"text-sm",children:"agent"===e.type?Y.jsx("div",{className:"max-w-none text-primary",children:Y.jsx(nM,{remarkPlugins:[JL],components:YL,children:e.content})}):Y.jsx("div",{className:"whitespace-pre-line",children:e.content})}),e.thinkingStatus&&Y.jsxs("div",{className:"flex items-center space-x-1 mt-1.5 text-xs text-secondary italic",children:[Y.jsx(im,{className:"h-2.5 w-2.5 animate-spin"}),Y.jsxs("span",{children:[e.thinkingStatus,"..."]})]}),!e.content&&!e.thinkingStatus&&"agent"===e.type&&Y.jsxs("div",{className:"flex items-center space-x-1 text-xs text-secondary italic",children:[Y.jsx(im,{className:"h-2.5 w-2.5 animate-spin"}),Y.jsx("span",{children:"pensando..."})]}),Y.jsx("div",{className:"text-xs opacity-70 mt-1",children:(t=e.timestamp,new Date(t).toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"}))}),b&&("agent"===e.type||"error"===e.type)&&Y.jsxs("div",{className:"mt-2 space-y-1.5",children:[e.rawRequest&&Y.jsxs("details",{className:"text-xs bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded",children:[Y.jsxs("summary",{className:"cursor-pointer px-2 py-1.5 flex items-center space-x-1.5 text-blue-700 dark:text-blue-400 hover:bg-blue-100 dark:bg-blue-900/30 transition-colors",children:[Y.jsx(Yh,{className:"h-3.5 w-3.5"}),Y.jsx("span",{className:"font-medium",children:"Request Sent"})]}),Y.jsx("pre",{className:"mt-1 mx-2 mb-2 p-2 bg-gray-900 text-green-400 rounded text-xs overflow-x-auto font-mono",children:JSON.stringify(e.rawRequest,null,2)})]}),e.rawResponse&&Y.jsxs("details",{className:"text-xs bg-purple-50 dark:bg-purple-900/20 border border-purple-200 rounded",children:[Y.jsxs("summary",{className:"cursor-pointer px-2 py-1.5 flex items-center space-x-1.5 text-purple-700 dark:text-purple-400 hover:bg-purple-100 dark:bg-purple-900/30 transition-colors",children:[Y.jsx(Jh,{className:"h-3.5 w-3.5"}),Y.jsx("span",{className:"font-medium",children:"Response Received"})]}),Y.jsx("pre",{className:"mt-1 mx-2 mb-2 p-2 bg-gray-900 text-cyan-400 rounded text-xs overflow-x-auto font-mono",children:JSON.stringify(e.rawResponse,null,2)})]})]})]})]})})},e.id);var t}),f&&!w&&Y.jsx("div",{className:"flex justify-start",children:Y.jsx("div",{className:"bg-surface-hover text-primary px-3 py-2 rounded-lg",children:Y.jsxs("div",{className:"flex items-center space-x-2",children:[Y.jsx(im,{className:"h-3.5 w-3.5 animate-spin text-secondary"}),Y.jsx("span",{className:"text-xs",children:"Processing..."})]})})}),Y.jsx("div",{ref:M}),A&&Y.jsxs("button",{onClick:()=>{P(!1),z(!0)},className:"sticky bottom-2 left-1/2 -translate-x-1/2 px-3 py-1.5 bg-active text-white text-xs rounded-full shadow-lg hover:opacity-80 transition-all flex items-center gap-1.5 opacity-90 hover:opacity-100",children:[Y.jsx(Jh,{className:"h-3.5 w-3.5"}),"Novas mensagens"]})]}),s.length<=1&&"connected"===m&&H.length>0&&Y.jsxs("div",{className:"px-4 py-2 border-t border-border-default flex-shrink-0",children:[Y.jsx("div",{className:"text-xs text-secondary mb-1.5",children:"Quick start:"}),Y.jsx("div",{className:"flex flex-wrap gap-1.5",children:H.map((e,t)=>Y.jsx("button",{onClick:()=>u(e.value),className:"text-xs px-2 py-1 bg-surface-hover text-primary rounded hover:bg-surface-hover transition-colors",children:e.label},t))})]}),Y.jsxs("div",{className:"p-4 border-t border-border-default flex-shrink-0",children:[Y.jsxs("div",{className:"flex space-x-2",children:[Y.jsx("textarea",{value:c,onChange:e=>u(e.target.value),onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),W())},placeholder:"Type your message...",className:"flex-1 border border-border-default rounded-lg px-2 py-1.5 text-sm focus:outline-none focus:ring-1 focus:ring-primary focus:border-transparent resize-none",rows:2,disabled:"connected"!==m}),Y.jsx("button",{onClick:f?()=>{D.current&&(D.current.abort(),D.current=null,h(!1))}:W,disabled:!c.trim()&&!f||"connected"!==m,className:"px-3 py-1.5 rounded-lg transition-colors flex items-center self-end "+(f?"bg-red-600 hover:bg-red-700 text-white":"bg-active hover:bg-active/90 text-white disabled:opacity-50 disabled:cursor-not-allowed"),children:f?Y.jsxs(Y.Fragment,{children:[Y.jsx(mm,{className:"h-4 w-4 mr-1"}),Y.jsx("span",{className:"text-xs font-medium",children:"Stop"})]}):Y.jsx(um,{className:"h-4 w-4"})})]}),Y.jsx("div",{className:"mt-1.5 text-xs text-secondary",children:"connected"===m?Y.jsx("span",{children:"🔗 Connected • Press Enter to send"}):"testing"===m?Y.jsx("span",{children:"⏳ Testing connection..."}):Y.jsx("span",{children:"❌ Disconnected"})})]})]})};const QL="runflow_token_cache";let eD=(()=>{try{const e=localStorage.getItem(QL);if(e){const t=JSON.parse(e);if(t.expiresAt>Date.now())return t;localStorage.removeItem(QL)}}catch(vE){}return{token:null,expiresAt:0}})();const tD=new class{constructor(e="https://api.runflow.ai/api/v1"){t(this,"baseURL"),t(this,"tenantId",null),this.baseURL=e}setTenantId(e){this.tenantId=e}async getAccessToken(){return null}async request(e,t={},n=!1){var r;const i=`${this.baseURL}${e}`,o={"Content-Type":"application/json",...t.headers};try{const e=await this.getAccessToken();e&&(o.Authorization=`Bearer ${e}`)}catch(vE){}this.tenantId&&(o["X-Tenant-ID"]=this.tenantId);const a={headers:o,...t};try{const e=await fetch(i,a);if(401===e.status)return this.clearLocalData(),{data:null,success:!1,message:"Sessão expirada. Você será redirecionado para o login."};if(!e.ok){let t=null;try{t=await e.json()}catch(rh){}const n=null==t?void 0:t.message,r=Array.isArray(n)?n.join(". "):n||(null==t?void 0:t.error),i=r&&e.status>=400&&e.status<500?r:`HTTP error! status: ${e.status} - ${e.statusText}`,o=new Error(i);throw o.response={data:t,status:e.status},o.data=t,o.status=e.status,o}if(204===e.status||"0"===e.headers.get("content-length"))return{data:null,success:!0};const t=await e.text();if(!t||""===t.trim())return{data:null,success:!0};try{return{data:JSON.parse(t),success:!0}}catch(s){return{data:null,success:!0}}}catch(vE){if(null==(r=null==vE?void 0:vE.response)?void 0:r.data)throw vE;return{data:null,success:!1,message:vE instanceof Error?vE.message:"Unknown error"}}}clearLocalData(){eD={token:null,expiresAt:0};try{localStorage.removeItem(QL),localStorage.removeItem("currentTenantId")}catch(vE){}this.tenantId=null}async get(e){return this.request(e,{method:"GET"})}async post(e,t){return this.request(e,{method:"POST",body:JSON.stringify(t)})}async put(e,t){return this.request(e,{method:"PUT",body:JSON.stringify(t)})}async patch(e,t){return this.request(e,{method:"PATCH",body:JSON.stringify(t)})}async delete(e){return this.request(e,{method:"DELETE"})}},nD=e=>{var t,n,r;return{id:e.id,name:e.name,description:e.description,category:{CUSTOMER_SUPPORT:"customer-support",SALES:"sales",VOICE:"voice",OPERATIONS:"operations",FINANCIAL_PREVENTION:"financial-prevention",FINANCIAL_RECOVERY:"financial-recovery",MARKETING:"marketing",ANALYTICS:"analytics"}[e.category]||(null==(t=e.category)?void 0:t.toLowerCase().replace("_","-"))||"other",subcategory:e.subcategory,status:(null==(n=e.status)?void 0:n.toLowerCase())||"inactive",lastDeploy:e.lastDeploy,updatedAt:e.updatedAt,logo:e.logo,repositoryUrl:e.repositoryUrl,dataSources:[],triggers:[],tags:e.tags||[],code:e.code||"",language:(null==(r=e.language)?void 0:r.toLowerCase())||"typescript",prompts:[],branch:e.branch||"main",commit:e.commit||"N/A",newEngine:e.newEngine,fileTree:e.fileTree&&Array.isArray(e.fileTree.data)?{data:e.fileTree.data,success:!0}:{data:[],success:!0},repositoryName:e.repositoryName||"N/A",endpointUrl:e.endpointUrl||"N/A",readme:e.readme||void 0}},rD=e=>{var t,n,r;return{name:e.name,description:e.description,category:{"customer-support":"CUSTOMER_SUPPORT",sales:"SALES",voice:"VOICE",operations:"OPERATIONS","financial-prevention":"FINANCIAL_PREVENTION","financial-recovery":"FINANCIAL_RECOVERY",marketing:"MARKETING",analytics:"ANALYTICS"}[e.category]||(null==(t=e.category)?void 0:t.toUpperCase()),subcategory:e.subcategory,newEngine:e.newEngine,status:{active:"ACTIVE",inactive:"INACTIVE",error:"ERROR",deploying:"DEPLOYING"}[e.status]||(null==(n=e.status)?void 0:n.toUpperCase())||"INACTIVE",code:e.code||"// Agent code",language:(null==(r=e.language)?void 0:r.toUpperCase())||"TYPESCRIPT",branch:e.branch||"main",tags:e.tags||[]}},iD={getAll:()=>tD.get("/agents").then(e=>{if(e.success&&e.data&&e.data.data){const t=e.data.data.map(nD);return{...e,data:{...e.data,data:t}}}return e}),getById:e=>tD.get(`/agents/${e}`).then(e=>{if(e.success&&e.data){const t=nD(e.data);return{...e,data:t}}return e}),create:e=>{const t=rD(e);return tD.post("/agents",t)},update:(e,t)=>{const n=rD(t);return tD.patch(`/agents/${e}`,n)},delete:e=>tD.delete(`/agents/${e}`),execute:(e,t)=>tD.post(`/agents/${e}/execute`,t),commitCode:(e,t)=>tD.patch(`/agents/${e}/code`,t),getFileTree:e=>tD.get(`/agents/${e}/tree`),getCategories:()=>tD.get("/agents/categories"),getMetrics:(e,t=30)=>tD.get(`/agents/${e}/business-metrics?days=${t}`),getExecutions:(e,t)=>{const n=new URLSearchParams;null!=(null==t?void 0:t.limit)&&n.set("limit",String(t.limit)),null!=(null==t?void 0:t.offset)&&n.set("offset",String(t.offset));const r=n.toString()?`?${n.toString()}`:"";return tD.get(`/agents/${e}/executions${r}`)},getCategoryMetrics:e=>tD.get(`/agents/category/${e}/metrics`),clearMetricsCache:e=>tD.delete(`/agents/${e}/metrics/cache`),clearCategoryMetricsCache:e=>tD.delete(`/agents/category/${e}/metrics/cache`),testEndpoint:async(e,t)=>{try{const n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t}),signal:AbortSignal.timeout(3e4)});if(!n.ok)throw new Error(`HTTP ${n.status}: ${n.statusText}`);return{success:!0,data:await n.json(),error:null}}catch(vE){return{success:!1,data:null,error:vE instanceof Error?vE.message:"Erro desconhecido"}}},resetData:e=>tD.post("/agent-data/reset",e)},oD=Object.freeze(Object.defineProperty({__proto__:null,agentsApi:iD,apiClient:tD},Symbol.toStringTag,{value:"Module"})),aD=$.createContext(void 0);function sD(){const{getAccessTokenSilently:e}=(void 0===t&&(t=Sh),$.useContext(t));var t;const{currentTenant:n}=(()=>{const e=$.useContext(aD);if(void 0===e)throw new Error("useTenant must be used within a TenantProvider");return e})(),r=async(t,r={})=>{const{includeTenantId:i=!0,headers:o={},...a}=r;try{const r=await e(),s="https://api.runflow.ai/api/v1",l=t.startsWith("http")?t:`${s}${t}`,c={Authorization:`Bearer ${r}`,"Content-Type":"application/json",...o};i&&(null==n?void 0:n.id)&&(c["X-Tenant-ID"]=n.id);return await fetch(l,{...a,headers:c})}catch(vE){throw vE}},i=async(e,t={})=>{const n=await r(e,t);if(!n.ok){const e=await n.text();throw new Error(`API Error ${n.status}: ${e}`)}return 204===n.status?{success:!0,message:"Operation completed successfully"}:n.json()};return{apiCall:r,apiCallJson:i,get:(e,t={})=>i(e,{...t,method:"GET"}),post:(e,t,n={})=>i(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),put:(e,t,n={})=>i(e,{...n,method:"PUT",body:t?JSON.stringify(t):void 0}),patch:(e,t,n={})=>i(e,{...n,method:"PATCH",body:t?JSON.stringify(t):void 0}),delete:(e,t={})=>i(e,{...t,method:"DELETE"}),currentTenantId:null==n?void 0:n.id,currentTenantDomain:null==n?void 0:n.domain}}const lD=({threadId:e,entityValue:t,executions:n,loading:r,onBack:i,onExecutionClick:o,onRefresh:a})=>{const s=e=>{switch(e){case"success":return Y.jsx(Xh,{className:"h-4 w-4 text-green-600 dark:text-green-400"});case"error":return Y.jsx(Gh,{className:"h-4 w-4 text-red-600"});default:return Y.jsx(Qh,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-400"})}};n.reduce((e,t)=>e+t.totalDurationMs,0);const l=n.reduce((e,t)=>e+(t.totalTokens||0),0),c=n.filter(e=>"success"===e.status).length,u=n.filter(e=>"error"===e.status).length;return Y.jsxs("div",{className:"flex flex-col h-full bg-surface",children:[Y.jsxs("div",{className:"px-4 py-3 border-b border-border-default flex-shrink-0",children:[Y.jsxs("div",{className:"flex items-center justify-between mb-2",children:[Y.jsxs("div",{className:"flex items-center space-x-3",children:[Y.jsx("button",{onClick:i,className:"p-1 text-secondary hover:text-primary hover:bg-surface-hover rounded transition-colors",title:"Back to threads",children:Y.jsx(Wh,{className:"h-4 w-4"})}),Y.jsx(am,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"}),Y.jsxs("div",{children:[Y.jsx("h3",{className:"text-sm font-semibold text-primary",children:"Messages"}),Y.jsxs("p",{className:"text-xs text-secondary",children:["Thread: ",Y.jsx("span",{className:"font-mono",children:t})]})]})]}),a&&Y.jsx("button",{onClick:a,className:"p-1.5 text-secondary hover:text-primary hover:bg-surface-hover rounded transition-colors",title:"Refresh",children:Y.jsx(cm,{className:"h-3.5 w-3.5 "+(r?"animate-spin":"")})})]}),n.length>0&&Y.jsxs("div",{className:"grid grid-cols-4 gap-2 mt-2 p-2 bg-surface-subtle rounded",children:[Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Mensagens"}),Y.jsx("div",{className:"text-sm font-semibold text-primary",children:n.length})]}),Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Sucesso"}),Y.jsx("div",{className:"text-sm font-semibold text-green-600 dark:text-green-400",children:c})]}),Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Erros"}),Y.jsx("div",{className:"text-sm font-semibold text-red-600",children:u})]}),Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Tokens"}),Y.jsx("div",{className:"text-sm font-semibold text-primary",children:l.toLocaleString()})]})]})]}),Y.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 min-h-0",children:r&&0===n.length?Y.jsx("div",{className:"space-y-3",children:[...Array(3)].map((e,t)=>Y.jsx("div",{className:"bg-surface-subtle border border-border-default rounded-lg p-3 animate-pulse",children:Y.jsxs("div",{className:"flex items-start space-x-3",children:[Y.jsx("div",{className:"w-6 h-6 bg-surface-hover rounded-full"}),Y.jsxs("div",{className:"flex-1 space-y-2",children:[Y.jsx("div",{className:"h-3 bg-surface-hover rounded w-3/4"}),Y.jsx("div",{className:"h-3 bg-surface-hover rounded w-1/2"})]})]})},t))}):0===n.length?Y.jsx("div",{className:"flex items-center justify-center h-full",children:Y.jsxs("div",{className:"text-center",children:[Y.jsx(am,{className:"h-10 w-10 text-secondary mx-auto mb-3"}),Y.jsx("h3",{className:"text-sm font-medium text-primary mb-1",children:"Nenhuma mensagem ainda"}),Y.jsx("p",{className:"text-xs text-secondary",children:"As mensagens aparecerão aqui quando disponíveis"})]})}):n.sort((e,t)=>new Date(e.completedAt||e.startedAt).getTime()-new Date(t.completedAt||t.startedAt).getTime()).map((e,t)=>{return Y.jsx("div",{className:"bg-surface border border-border-default rounded-lg hover:shadow-sm transition-all",children:Y.jsxs("div",{className:"p-3 space-y-2",children:[Y.jsxs("div",{className:"flex items-center justify-between",children:[Y.jsxs("div",{className:"flex items-center space-x-2",children:[s(e.status),Y.jsx("span",{className:"text-xs text-secondary",children:(r=e.startedAt,new Date(r).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}))})]}),Y.jsxs("div",{className:"flex items-center space-x-2 text-xs text-secondary",children:[Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx(Qh,{className:"h-3 w-3"}),Y.jsx("span",{children:(n=e.totalDurationMs,n<1e3?`${n}ms`:n<6e4?`${(n/1e3).toFixed(1)}s`:`${(n/6e4).toFixed(1)}m`)})]}),e.totalTokens&&e.totalTokens>0&&Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx(gm,{className:"h-3 w-3"}),Y.jsx("span",{children:e.totalTokens})]})]})]}),Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx(hm,{className:"h-4 w-4 text-secondary mt-0.5 flex-shrink-0"}),Y.jsx("div",{className:"flex-1 bg-surface-subtle rounded-lg p-2",children:Y.jsx("p",{className:"text-xs text-primary",children:e.inputMessage||"(no message)"})})]}),"error"===e.status?Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx(Gh,{className:"h-4 w-4 text-red-500 mt-0.5 flex-shrink-0"}),Y.jsxs("div",{className:"flex-1 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-2",children:[Y.jsx("p",{className:"text-xs text-red-700 dark:text-red-400 font-medium",children:"Error"}),Y.jsx("p",{className:"text-xs text-red-600 mt-1",children:e.error||e.outputMessage||"Unknown error"})]})]}):Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx(qh,{className:"h-4 w-4 text-blue-500 mt-0.5 flex-shrink-0"}),Y.jsx("div",{className:"flex-1 bg-blue-50 dark:bg-blue-900/20 rounded-lg p-2",children:Y.jsx("p",{className:"text-xs text-primary",children:e.outputMessage||"(processing...)"})})]}),Y.jsx("div",{className:"flex justify-end",children:Y.jsxs("button",{onClick:()=>o(e),className:"flex items-center space-x-1 px-2 py-1 text-xs text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:text-blue-400 hover:bg-blue-50 dark:bg-blue-900/20 rounded transition-colors",children:[Y.jsx(nm,{className:"h-3 w-3"}),Y.jsx("span",{children:"View traces"})]})})]})},e.executionId);var n,r})})]})},cD={agent_execution:"bg-blue-500",llm_call:"bg-purple-500",tool_call:"bg-green-500",rag_search:"bg-orange-500",memory_operation:"bg-indigo-500",workflow_execution:"bg-pink-500",connector_call:"bg-teal-500"},uD=({traces:e,onTraceSelect:t,selectedTraceId:n})=>{const[r,i]=$.useState(new Set);$.useEffect(()=>{const t=e=>{const n=[];for(const r of e)r.children&&r.children.length>0&&(n.push(r.traceId),n.push(...t(r.children)));return n},n=t(e);n.length>0&&i(new Set(n))},[e]);const o=e=>{if("custom_event"===e.operation&&e.metadata&&"object"==typeof e.metadata){const t=e.metadata.operation;if(t)return t}return e.operation},a=(e,s=0)=>{const l=r.has(e.traceId),c=e.children&&e.children.length>0,u=(e=>"tool_call"!==e.type?null:e.metadata&&"object"==typeof e.metadata&&e.metadata.toolName||null)(e),d=n===e.traceId;return Y.jsxs("div",{className:s>0?"ml-6 relative":"",children:[s>0&&Y.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-px bg-surface-hover",style:{left:"-12px"}}),s>0&&Y.jsx("div",{className:"absolute top-4 h-px bg-surface-hover",style:{left:"-12px",width:"12px"}}),Y.jsx("div",{className:"border rounded-lg cursor-pointer transition-all mb-2 "+(d?"border-blue-400 bg-blue-50 dark:bg-blue-900/20":"error"===e.status?"border-red-300 bg-red-50 dark:bg-red-900/20 hover:border-red-400":"border-border-default bg-surface hover:border-border-default"),onClick:()=>null==t?void 0:t(e),children:Y.jsx("div",{className:"px-2 py-2",children:Y.jsxs("div",{className:"flex items-center gap-1.5",children:[c?Y.jsx("button",{onClick:t=>{var n;t.stopPropagation(),n=e.traceId,i(e=>{const t=new Set(e);return t.has(n)?t.delete(n):t.add(n),t})},className:"hover:bg-surface-hover rounded transition-colors flex-shrink-0",children:l?Y.jsx(Kh,{className:"h-3 w-3 text-secondary"}):Y.jsx(Zh,{className:"h-3 w-3 text-secondary"})}):Y.jsx("div",{className:"w-3 flex-shrink-0"}),Y.jsx("div",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${cD[e.type]||"bg-gray-400"}`}),Y.jsxs("div",{className:"flex-1 min-w-0",children:[Y.jsx("span",{className:"font-medium text-primary text-xs",children:o(e)}),u&&Y.jsx("span",{className:"text-[10px] text-secondary font-mono ml-2",children:u})]}),Y.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:["llm_call"===e.type&&e.metadata&&e.metadata.totalTokens&&Y.jsxs("span",{className:"text-[10px] text-secondary tabular-nums",children:[e.metadata.totalTokens.toLocaleString()," tokens"]}),"error"===e.status&&Y.jsx("span",{className:"text-[10px] font-medium text-red-600",children:"erro"}),e.durationMs>0&&Y.jsx("span",{className:"text-[10px] text-secondary tabular-nums",children:(p=e.durationMs,p<1e3?`${p}ms`:p<6e4?`${(p/1e3).toFixed(1)}s`:`${(p/6e4).toFixed(1)}m`)})]})]})})}),c&&l&&Y.jsx("div",{className:"relative",children:e.children.map(e=>a(e,s+1))})]},e.traceId);var p};return 0===e.length?Y.jsxs("div",{className:"text-center py-8 bg-surface border border-border-default rounded-lg",children:[Y.jsx(Vh,{className:"h-6 w-6 text-secondary mx-auto mb-2"}),Y.jsx("p",{className:"text-secondary text-sm",children:"Nenhum trace encontrado."})]}):Y.jsx("div",{className:"space-y-2",children:e.map(e=>a(e))})},dD=$.createContext(null);function pD(){const{theme:e}=function(){const e=$.useContext(dD);if(!e)throw new Error("useTheme must be used inside ThemeProvider");return e}();return"dark"===e?"vs-dark":"vs-light"}function fD(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hD(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mD(Object(n),!0).forEach(function(t){hD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function vD(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yD(Object(n),!0).forEach(function(t){vD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xD(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var e=arguments.length,r=new Array(e),o=0;o<e;o++)r[o]=arguments[o];return t.apply(n,[].concat(i,r))}}}function wD(e){return{}.toString.call(e).includes("Object")}function kD(e){return"function"==typeof e}var _D=xD(function(e,t){throw new Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),SD={changes:function(e,t){return wD(t)||_D("changeType"),Object.keys(t).some(function(t){return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r})&&_D("changeField"),t},selector:function(e){kD(e)||_D("selectorType")},handler:function(e){kD(e)||wD(e)||_D("handlerType"),wD(e)&&Object.values(e).some(function(e){return!kD(e)})&&_D("handlersType")},initial:function(e){var t;e||_D("initialIsRequired"),wD(e)||_D("initialType"),t=e,Object.keys(t).length||_D("initialContent")}};function CD(e,t){return kD(t)?t(e.current):t}function ED(e,t){return e.current=bD(bD({},e.current),t),t}function ID(e,t,n){return kD(t)?t(e.current):Object.keys(n).forEach(function(n){var r;return null===(r=t[n])||void 0===r?void 0:r.call(t,e.current[n])}),n}var ND={create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};SD.initial(e),SD.handler(t);var n={current:e},r=xD(ID)(n,t),i=xD(ED)(n),o=xD(SD.changes)(e),a=xD(CD)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return SD.selector(e),e(n.current)},function(e){!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(r,i,o,a)(e)}]}};var OD,TD=(OD=function(e,t){throw new Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.length>=OD.length?OD.apply(this,r):function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];return e.apply(t,[].concat(r,i))}})({configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "}),RD={config:function(e){return e||TD("configIsRequired"),function(e){return{}.toString.call(e).includes("Object")}(e)||TD("configType"),e.urls?{paths:{vs:e.urls.monacoBase}}:e}};function jD(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],jD(e[n],t[n]))}),gD(gD({},e),t)}var AD={type:"cancelation",msg:"operation is manually canceled"};function PD(e){var t=!1,n=new Promise(function(n,r){e.then(function(e){return t?r(AD):n(e)}),e.catch(r)});return n.cancel=function(){return t=!0},n}var MD=["monaco"],LD=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t);else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return fD(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fD(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(ND.create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),2),DD=LD[0],FD=LD[1];function zD(e){return document.body.appendChild(e)}function UD(e){var t,n,r=DD(function(e){return{config:e.config,reject:e.reject}}),i=(t="".concat(r.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return i.onload=function(){return e()},i.onerror=r.reject,i}function BD(){var e=DD(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m||t;$D(n),e.resolve(n)},function(t){e.reject(t)})}function $D(e){DD().monaco||FD({monaco:e})}var VD=new Promise(function(e,t){return FD({resolve:e,reject:t})}),WD={config:function(e){var t=RD.config(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(t,MD);FD(function(e){return{config:jD(e.config,r),monaco:n}})},init:function(){var e=DD(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(FD({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),PD(VD);if(window.monaco&&window.monaco.editor)return $D(window.monaco),e.resolve(window.monaco),PD(VD);!function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}(zD,UD)(BD)}return PD(VD)},__getMonacoInstance:function(){return DD(function(e){return e.monaco})}},qD={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},HD={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}};var KD=function({children:e}){return V.createElement("div",{style:HD.container},e)},ZD=KD;var GD=function({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return V.createElement("section",{style:{...qD.wrapper,width:e,height:t},...a},!n&&V.createElement(ZD,null,r),V.createElement("div",{ref:i,style:{...qD.fullWidth,...!n&&qD.hide},className:o}))},JD=$.memo(GD);var YD=function(e){$.useEffect(e,[])};var XD=function(e,t,n=!0){let r=$.useRef(!0);$.useEffect(r.current||!n?()=>{r.current=!1}:e,t)};function QD(){}function eF(e,t,n,r){return function(e,t){return e.editor.getModel(tF(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?tF(e,r):void 0)}(e,t,n,r)}function tF(e,t){return e.Uri.parse(t)}var nF=function({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:p="100%",width:f="100%",className:h,wrapperProps:m={},beforeMount:g=QD,onMount:v=QD}){let[y,b]=$.useState(!1),[x,w]=$.useState(!0),k=$.useRef(null),_=$.useRef(null),S=$.useRef(null),C=$.useRef(v),E=$.useRef(g),I=$.useRef(!1);YD(()=>{let e=WD.init();return e.then(e=>(_.current=e)&&w(!1)).catch(e=>"cancelation"!==(null==e?void 0:e.type)&&void 0),()=>k.current?function(){var e,t,n,r;let i=null==(e=k.current)?void 0:e.getModel();s||null==(t=null==i?void 0:i.original)||t.dispose(),l||null==(n=null==i?void 0:i.modified)||n.dispose(),null==(r=k.current)||r.dispose()}():e.cancel()}),XD(()=>{if(k.current&&_.current){let t=k.current.getOriginalEditor(),i=eF(_.current,e||"",r||n||"text",o||"");i!==t.getModel()&&t.setModel(i)}},[o],y),XD(()=>{if(k.current&&_.current){let e=k.current.getModifiedEditor(),r=eF(_.current,t||"",i||n||"text",a||"");r!==e.getModel()&&e.setModel(r)}},[a],y),XD(()=>{let e=k.current.getModifiedEditor();e.getOption(_.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),XD(()=>{var t,n;null==(n=null==(t=k.current)?void 0:t.getModel())||n.original.setValue(e||"")},[e],y),XD(()=>{let{original:e,modified:t}=k.current.getModel();_.current.editor.setModelLanguage(e,r||n||"text"),_.current.editor.setModelLanguage(t,i||n||"text")},[n,r,i],y),XD(()=>{var e;null==(e=_.current)||e.editor.setTheme(c)},[c],y),XD(()=>{var e;null==(e=k.current)||e.updateOptions(d)},[d],y);let N=$.useCallback(()=>{var s;if(!_.current)return;E.current(_.current);let l=eF(_.current,e||"",r||n||"text",o||""),c=eF(_.current,t||"",i||n||"text",a||"");null==(s=k.current)||s.setModel({original:l,modified:c})},[n,t,i,e,r,o,a]),O=$.useCallback(()=>{var e;!I.current&&S.current&&(k.current=_.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...d}),N(),null==(e=_.current)||e.editor.setTheme(c),b(!0),I.current=!0)},[d,c,N]);return $.useEffect(()=>{y&&C.current(k.current,_.current)},[y]),$.useEffect(()=>{!x&&!y&&O()},[x,y,O]),V.createElement(JD,{width:f,height:p,isEditorReady:y,loading:u,_ref:S,className:h,wrapperProps:m})};$.memo(nF);var rF=function(e){let t=$.useRef();return $.useEffect(()=>{t.current=e},[e]),t.current},iF=new Map;var oF=function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:p=!1,width:f="100%",height:h="100%",className:m,wrapperProps:g={},beforeMount:v=QD,onMount:y=QD,onChange:b,onValidate:x=QD}){let[w,k]=$.useState(!1),[_,S]=$.useState(!0),C=$.useRef(null),E=$.useRef(null),I=$.useRef(null),N=$.useRef(y),O=$.useRef(v),T=$.useRef(),R=$.useRef(r),j=rF(o),A=$.useRef(!1),P=$.useRef(!1);YD(()=>{let e=WD.init();return e.then(e=>(C.current=e)&&S(!1)).catch(e=>"cancelation"!==(null==e?void 0:e.type)&&void 0),()=>{return E.current?(null==(t=T.current)||t.dispose(),p?d&&iF.set(o,E.current.saveViewState()):null==(n=E.current.getModel())||n.dispose(),void E.current.dispose()):e.cancel();var t,n}}),XD(()=>{var a,s,l,c;let u=eF(C.current,e||r||"",t||i||"",o||n||"");u!==(null==(a=E.current)?void 0:a.getModel())&&(d&&iF.set(j,null==(s=E.current)?void 0:s.saveViewState()),null==(l=E.current)||l.setModel(u),d&&(null==(c=E.current)||c.restoreViewState(iF.get(o))))},[o],w),XD(()=>{var e;null==(e=E.current)||e.updateOptions(c)},[c],w),XD(()=>{!E.current||void 0===r||(E.current.getOption(C.current.editor.EditorOption.readOnly)?E.current.setValue(r):r!==E.current.getValue()&&(P.current=!0,E.current.executeEdits("",[{range:E.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),E.current.pushUndoStop(),P.current=!1))},[r],w),XD(()=>{var e,t;let n=null==(e=E.current)?void 0:e.getModel();n&&i&&(null==(t=C.current)||t.editor.setModelLanguage(n,i))},[i],w),XD(()=>{var e;void 0!==s&&(null==(e=E.current)||e.revealLine(s))},[s],w),XD(()=>{var e;null==(e=C.current)||e.editor.setTheme(a)},[a],w);let M=$.useCallback(()=>{var l;if(I.current&&C.current&&!A.current){O.current(C.current);let p=o||n,f=eF(C.current,r||e||"",t||i||"",p||"");E.current=null==(l=C.current)?void 0:l.editor.create(I.current,{model:f,automaticLayout:!0,...c},u),d&&E.current.restoreViewState(iF.get(p)),C.current.editor.setTheme(a),void 0!==s&&E.current.revealLine(s),k(!0),A.current=!0}},[e,t,n,r,i,o,c,u,d,a,s]);return $.useEffect(()=>{w&&N.current(E.current,C.current)},[w]),$.useEffect(()=>{!_&&!w&&M()},[_,w,M]),R.current=r,$.useEffect(()=>{var e,t;w&&b&&(null==(e=T.current)||e.dispose(),T.current=null==(t=E.current)?void 0:t.onDidChangeModelContent(e=>{P.current||b(E.current.getValue(),e)}))},[w,b]),$.useEffect(()=>{if(w){let e=C.current.editor.onDidChangeMarkers(e=>{var t;let n=null==(t=E.current.getModel())?void 0:t.uri;if(n&&e.find(e=>e.path===n.path)){let e=C.current.editor.getModelMarkers({resource:n});null==x||x(e)}});return()=>{null==e||e.dispose()}}return()=>{}},[w,x]),V.createElement(JD,{width:f,height:h,isEditorReady:w,loading:l,_ref:I,className:m,wrapperProps:g})},aF=$.memo(oF);const sF=({data:e,title:t,maxHeight:n="300px",showLineNumbers:r=!1,isExpanded:i=!1,onToggleExpand:o})=>{const a=pD(),s=JSON.stringify(e,null,2);return o?Y.jsxs("div",{className:"bg-surface border border-border-default rounded-lg overflow-hidden transition-all flex flex-col",children:[Y.jsxs("button",{onClick:o,className:"w-full px-3 py-1.5 bg-surface-subtle border-b border-border-default flex items-center justify-between hover:bg-surface-hover transition-colors flex-shrink-0",children:[Y.jsx("h4",{className:"text-xs font-medium text-primary",children:t}),i?Y.jsx(sm,{className:"h-3.5 w-3.5 text-secondary"}):Y.jsx(om,{className:"h-3.5 w-3.5 text-secondary"})]}),Y.jsx("div",{style:{height:i?"calc(100vh - 200px)":n},children:Y.jsx(aF,{height:"100%",language:"json",theme:a,value:s,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:11,lineNumbers:r?"on":"off",wordWrap:"on",automaticLayout:!0,selectOnLineNumbers:!0,roundedSelection:!1,cursorStyle:"line",scrollbar:{vertical:"auto",horizontal:"auto"}}})})]}):Y.jsxs("div",{className:"bg-surface border border-border-default rounded-lg overflow-hidden flex flex-col",children:[t&&Y.jsx("div",{className:"px-4 py-2 bg-surface-subtle border-b border-border-default flex-shrink-0",children:Y.jsx("h4",{className:"text-sm font-medium text-primary",children:t})}),Y.jsx("div",{style:{height:n},className:"overflow-hidden",children:Y.jsx(aF,{height:"100%",language:"json",theme:a,value:s,options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:11,lineNumbers:r?"on":"off",wordWrap:"on",automaticLayout:!0,selectOnLineNumbers:!0,roundedSelection:!1,cursorStyle:"line",scrollbar:{vertical:"auto",horizontal:"auto"}}})})]})},lF=({trace:e,onClose:t,isMaximized:n=!1,onToggleMaximize:r,onTraceSelect:i})=>{const[o,a]=$.useState(null),[s,l]=$.useState(!1),c=e=>e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`;return Y.jsxs("div",{className:"h-full bg-surface border-l border-border-default flex flex-col overflow-hidden",children:[Y.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-border-default bg-surface-subtle flex-shrink-0",children:[Y.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-1.5",children:[Y.jsx("h3",{className:"text-xs font-semibold text-primary truncate",children:e.operation}),Y.jsx("span",{className:"px-1 py-0.5 bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-400 rounded text-[10px] flex-shrink-0",children:(d=e.type,{agent_execution:"Agent Execution",llm_call:"LLM Call",tool_call:"Tool Call",memory_operation:"Memory Operation",rag_search:"RAG Search",workflow_execution:"Workflow Execution",connector_call:"Connector Call"}[d]||d)}),Y.jsx("span",{className:"px-1 py-0.5 rounded text-[10px] flex-shrink-0 "+("success"===e.status?"bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-400":"error"===e.status?"bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-400":"bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-400"),children:e.status}),Y.jsxs("span",{className:"text-[10px] text-secondary flex-shrink-0",children:[c(e.durationMs)," • ",(u=e.startedAt,new Date(u).toLocaleString("pt-BR"))]}),Y.jsx("button",{onClick:()=>{navigator.clipboard.writeText(e.traceId),l(!0),setTimeout(()=>l(!1),2e3)},className:"text-[10px] font-mono flex-shrink-0 px-1 py-0.5 rounded transition-colors "+(s?"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/20":"text-secondary hover:text-secondary hover:bg-surface-hover"),title:`Copiar ID: ${e.traceId}`,children:s?"✓ Copiado!":`ID: ${e.traceId.slice(-8)}`})]}),Y.jsxs("div",{className:"flex items-center space-x-0.5 ml-2 flex-shrink-0",children:[Y.jsx("button",{onClick:()=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`trace-${e.traceId}-${(new Date).toISOString().split("T")[0]}.json`,i.click()},className:"p-1 text-secondary hover:text-primary hover:bg-surface-hover rounded",title:"Exportar",children:Y.jsx(tm,{className:"h-3.5 w-3.5"})}),r&&Y.jsx("button",{onClick:r,className:"p-1 text-secondary hover:text-primary hover:bg-surface-hover rounded",title:n?"Restaurar":"Maximizar",children:n?Y.jsx(sm,{className:"h-3.5 w-3.5"}):Y.jsx(om,{className:"h-3.5 w-3.5"})}),Y.jsx("button",{onClick:t,className:"p-1 text-secondary hover:text-primary hover:bg-surface-hover rounded",title:"Fechar",children:Y.jsx(mm,{className:"h-3.5 w-3.5"})})]})]}),Y.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:["llm_call"===e.type&&e.metadata&&e.metadata.totalTokens&&!o&&Y.jsxs("div",{className:"flex items-center gap-2 flex-wrap text-[10px]",children:[e.metadata.model&&Y.jsx("span",{className:"bg-surface-hover text-secondary px-2 py-1 rounded",children:e.metadata.model}),Y.jsxs("span",{className:"bg-surface-hover text-secondary px-2 py-1 rounded",children:[Y.jsx("span",{className:"text-secondary",children:"input:"})," ",(e.metadata.promptTokens||0).toLocaleString()]}),Y.jsxs("span",{className:"bg-surface-hover text-secondary px-2 py-1 rounded",children:[Y.jsx("span",{className:"text-secondary",children:"output:"})," ",(e.metadata.completionTokens||0).toLocaleString()]}),Y.jsxs("span",{className:"bg-active text-white px-2 py-1 rounded font-medium",children:[(e.metadata.totalTokens||0).toLocaleString()," tokens"]})]}),(()=>{const t=e.input&&Object.keys(e.input).length>0,n=e.output&&Object.keys(e.output).length>0,r=e.metadata&&Object.keys(e.metadata).length>0,i=[t,n,r].filter(Boolean).length,s=1===i?"400px":2===i?"280px":"200px";return Y.jsxs("div",{className:"flex flex-col space-y-2 min-w-0",children:[t&&(!o||"input"===o)&&Y.jsx(sF,{data:e.input,title:"Input",showLineNumbers:!0,maxHeight:s,isExpanded:"input"===o,onToggleExpand:()=>a("input"===o?null:"input")}),n&&(!o||"output"===o)&&Y.jsx(sF,{data:e.output,title:"Output",showLineNumbers:!0,maxHeight:s,isExpanded:"output"===o,onToggleExpand:()=>a("output"===o?null:"output")}),r&&(!o||"metadata"===o)&&Y.jsx(sF,{data:e.metadata,title:"Metadata",showLineNumbers:!0,maxHeight:s,isExpanded:"metadata"===o,onToggleExpand:()=>a("metadata"===o?null:"metadata")})]})})(),!o&&e.children&&e.children.length>0&&Y.jsxs("div",{className:"bg-surface-subtle rounded-lg p-3",children:[Y.jsxs("h4",{className:"text-xs font-medium text-primary mb-2",children:["Traces Filhos (",e.children.length,")"]}),Y.jsx("div",{className:"space-y-1",children:e.children.map(e=>Y.jsxs("button",{onClick:()=>null==i?void 0:i(e),className:"w-full flex items-center justify-between text-xs p-1.5 rounded hover:bg-surface-hover transition-colors text-left",children:[Y.jsx("span",{className:"text-primary truncate",children:e.operation}),Y.jsx("span",{className:"flex-shrink-0 ml-2 "+("success"===e.status?"text-green-600 dark:text-green-400":"error"===e.status?"text-red-600":"text-secondary"),children:c(e.durationMs)})]},e.traceId))})]})]})]});var u,d},cF=({execution:e,agentId:t,isOpen:n,onClose:r,mode:i="portal",customApiUrl:o})=>{const[a,s]=$.useState([]),[l,c]=$.useState(null),[u,d]=$.useState(!1),[p,f]=$.useState(null),[h,m]=$.useState(!1),[g,v]=$.useState(!1),[y,b]=$.useState(!1),x=sD();if(!n||!e)return null;$.useEffect(()=>{n&&(null==e?void 0:e.executionId)&&w()},[n,null==e?void 0:e.executionId]),$.useEffect(()=>{const e=e=>{"Escape"===e.key&&r()};if(n)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[n,r]);const w=async()=>{if(e&&t){d(!0),f(null);try{let n;if("local"===i||o){const r=`${o||"http://localhost:3030"}/api/v1/observability/executions/${e.executionId}?agentId=${t}`,i=await fetch(r,{headers:{"Content-Type":"application/json"}});if(!i.ok)throw new Error(`Failed to fetch traces: ${i.statusText}`);n=await i.json()}else{const r=`/observability/executions/${e.executionId}?agentId=${t}`;n=await x.get(r)}const r=n.traces||[];s(r),r.length>0&&c(r[0])}catch(vF){f(vF.message||"Erro ao carregar traces"),s([])}finally{d(!1)}}},k=e=>{c(e)};return Y.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-50 flex justify-end",onClick:e=>{e.target===e.currentTarget&&r()},children:Y.jsxs("div",{className:"bg-surface shadow-2xl w-[85%] h-full flex flex-col animate-slide-in-right overflow-hidden",children:[Y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-default bg-surface-subtle",children:[Y.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[Y.jsx("h2",{className:"text-sm font-semibold text-primary whitespace-nowrap",children:"Execução"}),Y.jsxs("div",{className:"flex items-center gap-2 text-xs text-secondary flex-wrap",children:[Y.jsxs("div",{className:"flex items-center gap-1",children:[(e=>{switch(e){case"success":return Y.jsx(Xh,{className:"h-4 w-4 text-green-600 dark:text-green-400"});case"error":return Y.jsx(Gh,{className:"h-4 w-4 text-red-600"});default:return Y.jsx(Qh,{className:"h-4 w-4 text-yellow-600 dark:text-yellow-400"})}})(e.status),Y.jsx("span",{className:"capitalize",children:e.status})]}),Y.jsx("span",{className:"text-secondary",children:"•"}),Y.jsx("span",{children:(S=e.totalDurationMs>0?e.totalDurationMs:a.reduce((e,t)=>e+(t.durationMs||0),0),S<1e3?`${S}ms`:S<6e4?`${(S/1e3).toFixed(1)}s`:`${(S/6e4).toFixed(1)}m`)}),Y.jsx("span",{className:"text-secondary",children:"•"}),Y.jsx("span",{children:(_=e.startedAt,new Date(_).toLocaleString("pt-BR"))}),Y.jsx("span",{className:"text-secondary",children:"•"}),Y.jsxs("span",{children:[a.length," traces"]}),Y.jsx("button",{onClick:()=>{navigator.clipboard.writeText(e.executionId),b(!0),setTimeout(()=>b(!1),2e3)},className:"font-mono px-1.5 py-0.5 rounded transition-colors "+(y?"text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-900/20":"text-secondary hover:text-secondary hover:bg-surface-hover"),title:`Copiar ID: ${e.executionId}`,children:y?"✓ Copiado!":`ID: ${e.executionId.slice(-8)}`})]})]}),Y.jsxs("div",{className:"flex items-center space-x-1 flex-shrink-0",children:[Y.jsx("button",{onClick:()=>{const t=JSON.stringify(e,null,2),n=new Blob([t],{type:"application/json"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=`execution-${e.executionId}-${(new Date).toISOString().split("T")[0]}.json`,i.click()},className:"p-1.5 text-secondary hover:text-primary hover:bg-surface-hover rounded",title:"Exportar execução",children:Y.jsx(tm,{className:"h-4 w-4"})}),Y.jsx("button",{onClick:r,className:"p-1.5 text-secondary hover:text-primary hover:bg-surface-hover rounded",title:"Fechar",children:Y.jsx(mm,{className:"h-4 w-4"})})]})]}),Y.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col p-4",children:[!h&&Y.jsxs("div",{className:"mb-4 flex-shrink-0 border border-border-default rounded-lg bg-surface overflow-hidden",children:[Y.jsxs("button",{onClick:()=>v(!g),className:"w-full flex items-center justify-between px-3 py-2 bg-surface-subtle hover:bg-surface-hover transition-colors",children:[Y.jsx("h4",{className:"text-xs font-semibold text-primary",children:"Input & Output"}),g?Y.jsx(sm,{className:"h-3.5 w-3.5 text-secondary"}):Y.jsx(om,{className:"h-3.5 w-3.5 text-secondary"})]}),g&&Y.jsxs("div",{className:"p-3 space-y-3 border-t border-border-default",children:[e.inputMessage&&""!==e.inputMessage.trim()&&Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx("div",{className:"w-6 h-6 bg-blue-100 dark:bg-blue-900/30 rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",children:Y.jsx(hm,{className:"h-3 w-3 text-blue-600 dark:text-blue-400"})}),Y.jsxs("div",{className:"flex-1 bg-blue-50 dark:bg-blue-900/20 border border-blue-100 rounded-lg p-2",children:[Y.jsx("p",{className:"text-[10px] font-semibold text-blue-900 mb-1 uppercase tracking-wide",children:"Input"}),Y.jsx("p",{className:"text-xs text-primary leading-relaxed",children:e.inputMessage})]})]}),e.outputMessage&&Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx("div",{className:"w-6 h-6 bg-primary rounded-full flex items-center justify-center flex-shrink-0 mt-0.5",children:Y.jsx(qh,{className:"h-3 w-3 text-white"})}),Y.jsxs("div",{className:"flex-1 bg-surface-subtle border border-border-default rounded-lg p-2",children:[Y.jsx("p",{className:"text-[10px] font-semibold text-primary mb-1 uppercase tracking-wide",children:"Output"}),Y.jsx("p",{className:"text-xs text-primary leading-relaxed",children:e.outputMessage})]})]})]})]}),Y.jsx("div",{className:"flex-1 overflow-hidden",children:u?Y.jsx("div",{className:"flex items-center justify-center h-full",children:Y.jsx("div",{className:"text-secondary text-sm",children:"Carregando traces..."})}):p?Y.jsx("div",{className:"flex items-center justify-center h-full",children:Y.jsxs("div",{className:"text-red-500 text-center",children:[Y.jsx(Gh,{className:"h-6 w-6 mx-auto mb-2"}),Y.jsx("p",{className:"font-medium text-sm",children:"Erro ao carregar traces"}),Y.jsx("p",{className:"text-xs mt-1",children:p}),Y.jsx("button",{onClick:w,className:"mt-3 px-3 py-1.5 text-xs bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Tentar novamente"})]})}):a.length>0?Y.jsxs("div",{className:"flex h-full gap-3",children:[!h&&Y.jsx("div",{className:"w-1/3 min-w-[280px] max-w-[400px] flex-shrink-0 overflow-y-auto pr-2 scrollbar-thin scrollbar-thumb-gray-300 scrollbar-track-gray-100",children:Y.jsx(uD,{traces:a,onTraceSelect:k,selectedTraceId:null==l?void 0:l.traceId})}),l&&Y.jsx("div",{className:(h?"w-full":"flex-1")+" border-l border-border-default",children:Y.jsx(lF,{trace:l,onClose:()=>{c(null),m(!1)},isMaximized:h,onToggleMaximize:()=>m(!h),onTraceSelect:k})})]}):Y.jsx("div",{className:"flex items-center justify-center h-full",children:Y.jsxs("div",{className:"text-secondary text-center",children:[Y.jsx(Qh,{className:"h-6 w-6 mx-auto mb-2"}),Y.jsx("p",{className:"font-medium text-sm",children:"Nenhum trace encontrado"}),Y.jsx("p",{className:"text-xs mt-1",children:"Esta execução não possui traces disponíveis"})]})})})]})]})});var _,S},uF=({traces:e,loading:t,onRefresh:n,selectedThreadId:r,onThreadSelect:i,agentId:o,mode:a="portal",customApiUrl:s})=>{const[l,c]=$.useState("threads"),[u,d]=$.useState(null),[p,f]=$.useState(null),[h,m]=$.useState(!1),{executions:g,loading:v,refetch:y}=(({threadId:e,agentId:t,mode:n="portal",enabled:r=!0,customApiUrl:i})=>{const[o,a]=$.useState([]),[s,l]=$.useState(!1),[c,u]=$.useState(null),[d,p]=$.useState(0),f=sD(),h=$.useCallback(async()=>{var o,s;if(!r||!e||!t)return a([]),void p(0);try{let r;if(l(!0),u(null),"local"===n||i){const n=`${i||"http://localhost:3030"}/api/v1/observability/threads/${e}/executions?agentId=${t}`,o=await fetch(n,{headers:{"Content-Type":"application/json"}});if(!o.ok)throw new Error(`Failed to fetch executions: ${o.statusText}`);r=await o.json()}else r=await f.get(`/observability/threads/${e}/executions?agentId=${t}`);const c=r.executions||(null==(o=r.data)?void 0:o.executions)||r.data||[];a(Array.isArray(c)?c:[]),p(r.total||(null==(s=r.data)?void 0:s.total)||c.length)}catch(vF){const t=vF instanceof Error?vF.message:"Failed to fetch executions";u(t)}finally{l(!1)}},[e,t,r,n,i]);return $.useEffect(()=>{r&&e&&t&&h()},[e,t,r]),{executions:o,loading:s,error:c,refetch:h,total:d}})({threadId:null==u?void 0:u.threadId,agentId:o,mode:a,enabled:"executions"===l&&!!u,customApiUrl:s}),b=e=>{const t=new Date(e),n=new Date,r=n.getTime()-t.getTime();if(r<6e4)return"agora";if(r<36e5)return`${Math.floor(r/6e4)}m atrás`;const i=t.toLocaleTimeString("pt-BR",{hour:"2-digit",minute:"2-digit"});if(t.toDateString()===n.toDateString())return`hoje às ${i}`;const o=new Date(n);o.setDate(o.getDate()-1);if(t.toDateString()===o.toDateString())return`ontem às ${i}`;if(r<6048e5){return`${t.toLocaleDateString("pt-BR",{weekday:"short"})} às ${i}`}const a=t.getFullYear()===n.getFullYear();return`${t.toLocaleDateString("pt-BR",{day:"2-digit",month:"short",...a?{}:{year:"numeric"}})} às ${i}`},x=e=>{const t={whatsapp:{label:"WhatsApp",bg:"bg-green-50 dark:bg-green-900/20",text:"text-green-700 dark:text-green-400"},email:{label:"Email",bg:"bg-blue-50 dark:bg-blue-900/20",text:"text-blue-700 dark:text-blue-400"},api:{label:"API",bg:"bg-purple-50 dark:bg-purple-900/20",text:"text-purple-700 dark:text-purple-400"},widget:{label:"Widget",bg:"bg-indigo-50 dark:bg-indigo-900/20",text:"text-indigo-700 dark:text-indigo-400"},sdk:{label:"SDK",bg:"bg-surface-subtle",text:"text-primary"}}[e]||{label:e,bg:"bg-surface-subtle",text:"text-primary"};return Y.jsx("span",{className:`inline-flex px-2 py-0.5 rounded text-xs font-medium ${t.bg} ${t.text}`,children:t.label})},w=()=>{c("threads"),d(null)},k=e=>{f(e),m(!0)},_=()=>{m(!1),f(null)};e.reduce((e,t)=>e+t.totalDurationMs,0);const S=e.reduce((e,t)=>e+t.totalTokens,0),C=e.filter(e=>"success"===e.status).length,E=e.filter(e=>"error"===e.status).length;return"executions"===l&&u?Y.jsxs(Y.Fragment,{children:[Y.jsx(lD,{threadId:u.threadId,entityValue:u.entityValue||u.threadId,executions:g,loading:v,onBack:w,onExecutionClick:k,onRefresh:y}),p&&o&&Y.jsx(cF,{execution:p,agentId:o,isOpen:h,onClose:_,mode:a,customApiUrl:s})]}):Y.jsxs("div",{className:"flex flex-col h-full bg-surface",children:[Y.jsx("div",{className:"px-4 py-3 border-b border-border-default flex-shrink-0",children:Y.jsxs("div",{className:"flex items-center justify-between",children:[Y.jsxs("div",{className:"flex items-center space-x-3",children:[Y.jsx(Vh,{className:"h-5 w-5 text-blue-600 dark:text-blue-400"}),Y.jsxs("div",{children:[Y.jsx("h3",{className:"text-sm font-semibold text-primary",children:"Real-time Monitoring"}),Y.jsxs("p",{className:"text-xs text-secondary",children:[e.length," thread",1!==e.length?"s":""," found",r&&Y.jsxs("span",{className:"ml-2",children:["• ",Y.jsxs("span",{className:"font-mono text-blue-600 dark:text-blue-400",children:[r.slice(0,20),"..."]})," selected"]})]})]})]}),Y.jsx("div",{className:"flex items-center space-x-2",children:n&&Y.jsx("button",{onClick:n,className:"p-1.5 text-secondary hover:text-primary hover:bg-surface-hover rounded transition-colors",title:"Refresh",children:Y.jsx(cm,{className:"h-3.5 w-3.5 "+(t?"animate-spin":"")})})})]})}),e.length>0&&Y.jsx("div",{className:"px-4 py-2 bg-surface-subtle border-b border-border-default flex-shrink-0",children:Y.jsxs("div",{className:"grid grid-cols-4 gap-3",children:[Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Traces"}),Y.jsx("div",{className:"text-sm font-semibold text-primary",children:e.length})]}),Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Success"}),Y.jsx("div",{className:"text-sm font-semibold text-green-600 dark:text-green-400",children:C})]}),Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Errors"}),Y.jsx("div",{className:"text-sm font-semibold text-red-600",children:E})]}),Y.jsxs("div",{className:"text-center",children:[Y.jsx("div",{className:"text-xs text-secondary",children:"Tokens"}),Y.jsx("div",{className:"text-sm font-semibold text-primary",children:S.toLocaleString()})]})]})}),Y.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:t&&0===e.length?Y.jsx("div",{className:"p-4 space-y-3",children:[...Array(3)].map((e,t)=>Y.jsx("div",{className:"bg-surface-subtle border border-border-default rounded-lg p-3 animate-pulse",children:Y.jsxs("div",{className:"flex items-start space-x-3",children:[Y.jsx("div",{className:"w-6 h-6 bg-surface-hover rounded"}),Y.jsxs("div",{className:"flex-1 space-y-2",children:[Y.jsx("div",{className:"h-3 bg-surface-hover rounded w-1/3"}),Y.jsx("div",{className:"h-3 bg-surface-hover rounded w-1/2"})]})]})},t))}):0===e.length?Y.jsx("div",{className:"flex items-center justify-center h-full p-8",children:Y.jsxs("div",{className:"text-center",children:[Y.jsx(am,{className:"h-10 w-10 text-secondary mx-auto mb-3"}),Y.jsx("h3",{className:"text-sm font-medium text-primary mb-1",children:"Nenhuma thread ainda"}),Y.jsx("p",{className:"text-xs text-secondary",children:"Envie mensagens para ver as threads aparecerem aqui"})]})}):Y.jsx("div",{className:"p-4 space-y-2",children:e.sort((e,t)=>{const n=new Date(e.completedAt||e.startedAt).getTime();return new Date(t.completedAt||t.startedAt).getTime()-n}).map(e=>{return Y.jsx("div",{onClick:()=>{return d(t=e),c("executions"),void(null==i||i(t));var t},className:"bg-surface border rounded-lg hover:shadow-sm transition-all cursor-pointer "+(r===e.threadId?"border-blue-400 bg-blue-50 dark:bg-blue-900/20 shadow-sm":"border-border-default hover:border-border-default"),children:Y.jsxs("div",{className:"p-3",children:[Y.jsxs("div",{className:"flex items-start gap-3",children:[Y.jsx("div",{className:"flex-shrink-0 mt-1 w-2 h-2 rounded-full "+("success"===e.status?"bg-green-500":"error"===e.status?"bg-red-500":"bg-yellow-500")}),Y.jsxs("div",{className:"flex-1 min-w-0",children:[Y.jsxs("div",{className:"flex items-center flex-wrap gap-2 mb-1",children:[r===e.threadId&&Y.jsxs("div",{className:"flex items-center space-x-1 bg-blue-600 text-white px-2 py-0.5 rounded text-xs font-medium",children:[Y.jsx(Xh,{className:"h-3 w-3"}),Y.jsx("span",{children:"Selecionado"})]}),e.channel&&x(e.channel),Y.jsx("span",{className:"text-xs text-secondary",children:b(e.completedAt||e.startedAt)})]}),Y.jsx("p",{className:"text-xs text-primary truncate mb-1",children:e.outputMessage||e.inputMessage||"Sem mensagem"}),e.entityValue&&Y.jsx("div",{className:"flex items-center space-x-1 mb-1",children:Y.jsx("span",{className:"text-xs font-semibold text-primary",children:e.entityValue})}),Y.jsxs("div",{className:"flex items-center space-x-3 text-xs text-secondary",children:[Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx(Qh,{className:"h-3 w-3"}),Y.jsx("span",{children:(t=e.totalDurationMs,t<1e3?`${t}ms`:t<6e4?`${(t/1e3).toFixed(1)}s`:`${(t/6e4).toFixed(1)}m`)})]}),Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx(am,{className:"h-3 w-3"}),Y.jsx("span",{children:e.totalTraces||0})]}),e.totalTokens>0&&Y.jsxs("div",{className:"flex items-center space-x-1",children:[Y.jsx(gm,{className:"h-3 w-3"}),Y.jsx("span",{children:e.totalTokens.toLocaleString()})]})]})]})]}),"error"===e.status&&e.error&&Y.jsx("div",{className:"mt-2 p-2 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded",children:Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx(Gh,{className:"h-3.5 w-3.5 text-red-600 mt-0.5 flex-shrink-0"}),Y.jsxs("div",{children:[Y.jsx("p",{className:"text-xs font-medium text-red-800 dark:text-red-400",children:"Erro"}),Y.jsx("p",{className:"text-xs text-red-700 dark:text-red-400 mt-0.5",children:e.error})]})]})})]})},e.id);var t})})}),t&&e.length>0&&Y.jsx("div",{className:"px-4 py-2 border-t border-border-default flex-shrink-0",children:Y.jsxs("div",{className:"flex items-center justify-center space-x-2 text-xs text-secondary",children:[Y.jsx(cm,{className:"h-3 w-3 animate-spin"}),Y.jsx("span",{children:"Atualizando..."})]})})]})},dF=({isOpen:e,onClose:t,title:n,subtitle:r,icon:i,children:o,size:a="lg",showCloseButton:s=!0,footer:l})=>{if(!e)return null;return Y.jsx("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:Y.jsxs("div",{className:"flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[Y.jsx("div",{className:"fixed inset-0 bg-primary/60 backdrop-blur-sm transition-opacity",onClick:t}),Y.jsxs("div",{className:`inline-block align-bottom bg-surface rounded-xl text-left overflow-hidden shadow-2xl transform transition-all sm:my-8 sm:align-middle ${{sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg",xl:"sm:max-w-xl","2xl":"sm:max-w-2xl","3xl":"sm:max-w-3xl","4xl":"sm:max-w-4xl"}[a]} sm:w-full`,children:[Y.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border-default",children:[Y.jsxs("div",{className:"flex items-center gap-3",children:[i,Y.jsxs("div",{children:[Y.jsx("h3",{className:"text-lg font-semibold text-primary",children:n}),r&&Y.jsx("p",{className:"text-sm text-secondary",children:r})]})]}),s&&Y.jsx("button",{onClick:t,className:"p-1.5 rounded-lg text-secondary hover:text-primary hover:bg-surface-hover transition-colors",children:Y.jsx(mm,{className:"h-5 w-5"})})]}),Y.jsx("div",{className:"px-6 py-6 max-h-[60vh] overflow-y-auto",children:o}),l&&Y.jsx("div",{className:"px-6 py-4 border-t border-border-default bg-surface-subtle",children:l})]})]})})},pF=({status:e,successMessage:t="Operação realizada com sucesso!",errorMessage:n="Erro ao realizar operação",className:r=""})=>"success"===e?Y.jsxs("div",{className:`flex items-center p-3 bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800 rounded-lg ${r}`,children:[Y.jsx(Xh,{className:"h-5 w-5 text-green-600 dark:text-green-400 mr-3"}),Y.jsx("span",{className:"text-green-800 dark:text-green-400 font-medium",children:t})]}):"error"===e?Y.jsxs("div",{className:`flex items-start p-3 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg ${r}`,children:[Y.jsx(Gh,{className:"h-5 w-5 text-red-600 mr-3 mt-0.5"}),Y.jsxs("div",{children:[Y.jsx("div",{className:"text-red-800 dark:text-red-400 font-medium",children:"Erro"}),n&&Y.jsx("div",{className:"text-red-700 dark:text-red-400 text-sm mt-1",children:n})]})]}):null,fF=({isOpen:e,onClose:t,agent:n,onConfirm:r})=>{const[i,o]=$.useState("both"),[a,s]=$.useState(!1),[l,c]=$.useState(!1),[u,d]=$.useState("idle"),[p,f]=$.useState(""),[h,m]=$.useState({threadId:"",entityType:"",entityValue:"",sessionId:"",dateFrom:"",dateTo:""}),g=()=>{l||(d("idle"),f(""),m({threadId:"",entityType:"",entityValue:"",sessionId:"",dateFrom:"",dateTo:""}),s(!1),t())},v=Object.values(h).some(e=>""!==e.trim());return Y.jsx(dF,{isOpen:e,onClose:g,title:"Resetar Dados do Agente",size:"lg",children:Y.jsxs("div",{className:"space-y-6",children:[Y.jsxs("div",{className:"flex items-start space-x-3 p-4 bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg",children:[Y.jsx(fm,{className:"h-5 w-5 text-red-600 mt-0.5 flex-shrink-0"}),Y.jsxs("div",{children:[Y.jsx("h4",{className:"text-red-800 dark:text-red-400 font-medium mb-1",children:"⚠️ Ação Irreversível"}),Y.jsx("p",{className:"text-red-700 dark:text-red-400 text-sm",children:"Esta operação não pode ser desfeita. Os dados removidos serão perdidos permanentemente."})]})]}),Y.jsx("div",{className:"bg-surface-subtle rounded-lg p-4",children:Y.jsxs("div",{className:"flex items-center space-x-3",children:[Y.jsx("div",{className:"w-10 h-10 bg-active text-white rounded-lg flex items-center justify-center font-semibold text-sm",children:n.name.substring(0,2).toUpperCase()}),Y.jsxs("div",{children:[Y.jsx("h3",{className:"font-medium text-primary",children:n.name}),Y.jsxs("p",{className:"text-sm text-secondary",children:["ID: ",n.id]})]})]})}),Y.jsxs("div",{className:"space-y-3",children:[Y.jsx("label",{className:"block text-sm font-medium text-primary",children:"Tipo de Dados para Resetar"}),Y.jsxs("div",{className:"space-y-2",children:[Y.jsxs("label",{className:"flex items-start space-x-3 p-3 border border-border-default rounded-lg hover:bg-surface-subtle cursor-pointer",children:[Y.jsx("input",{type:"radio",name:"target",value:"memory",checked:"memory"===i,onChange:e=>o(e.target.value),className:"mt-1"}),Y.jsxs("div",{children:[Y.jsx("div",{className:"font-medium text-primary",children:"Memória (Sessions)"}),Y.jsx("div",{className:"text-sm text-secondary",children:"Conversas, mensagens e histórico de sessões"})]})]}),Y.jsxs("label",{className:"flex items-start space-x-3 p-3 border border-border-default rounded-lg hover:bg-surface-subtle cursor-pointer",children:[Y.jsx("input",{type:"radio",name:"target",value:"observability",checked:"observability"===i,onChange:e=>o(e.target.value),className:"mt-1"}),Y.jsxs("div",{children:[Y.jsx("div",{className:"font-medium text-primary",children:"Observabilidade (Traces)"}),Y.jsx("div",{className:"text-sm text-secondary",children:"Traces de execução, logs e métricas"})]})]}),Y.jsxs("label",{className:"flex items-start space-x-3 p-3 border border-border-default rounded-lg hover:bg-surface-subtle cursor-pointer",children:[Y.jsx("input",{type:"radio",name:"target",value:"both",checked:"both"===i,onChange:e=>o(e.target.value),className:"mt-1"}),Y.jsxs("div",{children:[Y.jsx("div",{className:"font-medium text-primary",children:"Ambos (Completo)"}),Y.jsx("div",{className:"text-sm text-secondary",children:"Todos os dados do agente serão removidos"})]})]})]}),Y.jsxs("p",{className:"text-sm text-secondary bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg",children:["📝 ",(()=>{switch(i){case"memory":return"Apenas dados de memória (conversas e mensagens) serão removidos.";case"observability":return"Apenas dados de observabilidade (traces e execuções) serão removidos.";case"both":return"Todos os dados (memória e observabilidade) serão removidos.";default:return""}})()]})]}),Y.jsxs("div",{className:"border-t pt-4",children:[Y.jsxs("button",{type:"button",onClick:()=>s(!a),className:"flex items-center space-x-2 text-sm font-medium text-primary hover:text-primary",children:[Y.jsx(rm,{className:"h-4 w-4"}),Y.jsx("span",{children:"Filtros Avançados (Opcional)"}),a?Y.jsx(mm,{className:"h-4 w-4"}):Y.jsx("span",{className:"text-secondary",children:"+"})]}),a&&Y.jsxs("div",{className:"mt-4 space-y-4 bg-surface-subtle p-4 rounded-lg",children:[Y.jsx("p",{className:"text-sm text-secondary mb-4",children:"Use filtros para remover apenas dados específicos. Deixe em branco para remover todos os dados do tipo selecionado."}),Y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[Y.jsxs("div",{children:[Y.jsx("label",{className:"block text-sm font-medium text-primary mb-1",children:"Thread ID"}),Y.jsx("input",{type:"text",value:h.threadId,onChange:e=>m(t=>({...t,threadId:e.target.value})),placeholder:"ex: phone_acme_5511999999999",className:"w-full px-3 py-2 border border-border-default rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block text-sm font-medium text-primary mb-1",children:"Session ID"}),Y.jsx("input",{type:"text",value:h.sessionId,onChange:e=>m(t=>({...t,sessionId:e.target.value})),placeholder:"ID da sessão específica",className:"w-full px-3 py-2 border border-border-default rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block text-sm font-medium text-primary mb-1",children:"Tipo de Entidade"}),Y.jsx("input",{type:"text",value:h.entityType,onChange:e=>m(t=>({...t,entityType:e.target.value})),placeholder:"ex: phone, email, user",className:"w-full px-3 py-2 border border-border-default rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block text-sm font-medium text-primary mb-1",children:"Valor da Entidade"}),Y.jsx("input",{type:"text",value:h.entityValue,onChange:e=>m(t=>({...t,entityValue:e.target.value})),placeholder:"ex: +5511999999999",className:"w-full px-3 py-2 border border-border-default rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block text-sm font-medium text-primary mb-1",children:"Data Inicial"}),Y.jsx("input",{type:"datetime-local",value:h.dateFrom,onChange:e=>m(t=>({...t,dateFrom:e.target.value})),className:"w-full px-3 py-2 border border-border-default rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]}),Y.jsxs("div",{children:[Y.jsx("label",{className:"block text-sm font-medium text-primary mb-1",children:"Data Final"}),Y.jsx("input",{type:"datetime-local",value:h.dateTo,onChange:e=>m(t=>({...t,dateTo:e.target.value})),className:"w-full px-3 py-2 border border-border-default rounded-lg text-sm focus:outline-none focus:ring-1 focus:ring-[#1654A2]/40"})]})]}),v&&Y.jsx("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-3",children:Y.jsxs("div",{className:"flex items-start space-x-2",children:[Y.jsx(Hh,{className:"h-4 w-4 text-blue-600 dark:text-blue-400 mt-0.5"}),Y.jsxs("div",{className:"text-sm text-blue-700 dark:text-blue-400",children:[Y.jsx("strong",{children:"Filtros aplicados:"})," Apenas dados que correspondam aos filtros especificados serão removidos."]})]})})]})]}),"idle"!==u&&Y.jsx(pF,{status:u,successMessage:"✅ Dados do agente resetados com sucesso!",errorMessage:p||"Erro ao resetar dados do agente"}),Y.jsxs("div",{className:"flex justify-end space-x-3 pt-4 border-t",children:[Y.jsx("button",{type:"button",onClick:g,disabled:l,className:"px-4 py-2 border border-border-default text-primary rounded-lg hover:bg-surface-subtle disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Cancelar"}),Y.jsx("button",{type:"button",onClick:async()=>{if(!l){c(!0),d("idle"),f("");try{const e={target:i,filters:{agentId:n.id,...h.threadId&&{threadId:h.threadId},...h.entityType&&{entityType:h.entityType},...h.entityValue&&{entityValue:h.entityValue},...h.sessionId&&{sessionId:h.sessionId},...h.dateFrom&&{dateFrom:h.dateFrom},...h.dateTo&&{dateTo:h.dateTo}}};await r(e),d("success"),setTimeout(()=>{t()},2e3)}catch(vE){d("error"),f(vE instanceof Error?vE.message:"Erro desconhecido")}finally{c(!1)}}},disabled:l||"success"===u,className:"flex items-center px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:l?Y.jsxs(Y.Fragment,{children:[Y.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-white mr-2"}),"Resetando..."]}):Y.jsxs(Y.Fragment,{children:[Y.jsx(pm,{className:"h-4 w-4 mr-2"}),"Confirmar Reset"]})})]})]})})},hF=({mode:e="portal"})=>{const{agentId:t}=function(){let{matches:e}=$.useContext(Hd),t=e[e.length-1];return t?t.params:{}}(),[n]=Fp(),r=Xd(),[i,o]=$.useState(null),[a,s]=$.useState(!0),[l,c]=$.useState(null),[u,d]=$.useState(n.get("threadId")||""),[p,f]=$.useState(n.get("threadId")||void 0),[h,m]=$.useState(!1),[g,v]=$.useState("both"),[y,b]=$.useState(!1),x=n.get("apiUrl")||void 0,w=x,{traces:k,loading:_,refreshTraces:S}=(({threadId:e,mode:t="portal",agentId:n,enabled:r=!0,pollingInterval:i=5e3,customApiUrl:o}={})=>{const[a,s]=$.useState([]),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,f]=$.useState(0),h=$.useRef(null),m=$.useRef(!0),g=sD();$.useEffect(()=>(m.current=!0,()=>{m.current=!1,h.current&&clearTimeout(h.current)}),[]);const v=$.useCallback(async()=>{var i,a;if(r){if(!n)return s([]),f(0),void c(!1);try{c(!0),d(null);const r=new URLSearchParams;let l;if(e&&r.append("threadId",e),n&&r.append("agentId",n),r.append("limit","50"),r.append("orderBy","created_at"),r.append("order","desc"),"local"===t||o){const e=`${o||"http://localhost:3030"}/api/v1/observability/threads?${r.toString()}`,t=await fetch(e,{headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error(`Failed to fetch traces: ${t.statusText}`);l=await t.json()}else l=await g.get(`/observability/threads?${r.toString()}`);const u=l.threads||(null==(i=l.data)?void 0:i.threads)||l.traces||l.data||[],p=l.total||(null==(a=l.data)?void 0:a.total)||u.length;m.current&&(s(Array.isArray(u)?u:[]),f(p))}catch(vF){if(m.current){const t=vF instanceof Error?vF.message:"Failed to fetch traces";d(t)}}finally{m.current&&c(!1)}}},[e,n,r,t,o]);return $.useEffect(()=>{r&&n&&v()},[e,n,r]),{traces:a,loading:l,error:u,refreshTraces:v,totalTraces:p}})({threadId:void 0,agentId:t||void 0,mode:e,customApiUrl:x,enabled:!!t,pollingInterval:5e3});$.useEffect(()=>{(async()=>{if(!t)return c("No agent ID provided"),void s(!1);if("local"===e||x){const e={id:t,name:n.get("agentName")||"Local Agent Test",description:n.get("agentDescription")||"Testing agent in local mode",endpointUrl:n.get("agentEndpoint")||x||"http://localhost:3030",status:"active",category:"test",triggers:[],dataSources:[],createdAt:(new Date).toISOString(),updatedAt:(new Date).toISOString(),fileTree:{data:[],success:!0}};return o(e),void s(!1)}try{s(!0);const e=await iD.getById(t);o(e.data),c(null)}catch(vF){c(vF instanceof Error?vF.message:"Failed to load agent")}finally{s(!1)}})()},[t,e,x,n]);const C=()=>{r(-1)},E="test"===g?{test:"w-full",monitoring:"hidden"}:"monitoring"===g?{test:"hidden",monitoring:"w-full"}:{test:"w-2/5",monitoring:"w-3/5"};return a?Y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50",children:Y.jsx("div",{className:"bg-surface rounded-lg p-8",children:Y.jsxs("div",{className:"flex items-center space-x-3",children:[Y.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-gray-900"}),Y.jsx("span",{className:"text-primary",children:"Loading agent..."})]})})}):l||!i?Y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-gray-900 bg-opacity-50",children:Y.jsxs("div",{className:"bg-surface rounded-lg p-8 max-w-md",children:[Y.jsx("h3",{className:"text-lg font-semibold text-red-600 mb-2",children:"Error"}),Y.jsx("p",{className:"text-primary mb-4",children:l||"Agent not found"}),Y.jsx("button",{onClick:C,className:"px-4 py-2 bg-active text-white rounded hover:bg-active/90",children:"Close"})]})}):Y.jsxs("div",{className:"fixed inset-0 z-50 bg-surface-hover "+(h?"":"p-4"),children:[Y.jsxs("div",{className:`bg-surface ${h?"h-full":"h-full rounded-lg shadow-xl"} flex flex-col overflow-hidden`,children:[Y.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border-default bg-surface",children:[Y.jsxs("div",{className:"flex items-center space-x-4",children:[Y.jsxs("div",{className:"flex items-center space-x-3",children:[Y.jsx("div",{className:"w-10 h-10 bg-active text-white rounded-lg flex items-center justify-center font-semibold text-sm flex-shrink-0",children:i.logo||i.name.substring(0,2).toUpperCase()}),Y.jsxs("div",{className:"min-w-0",children:[Y.jsxs("h2",{className:"text-lg font-semibold text-primary truncate",children:[i.name," - Test & Monitor"]}),Y.jsx("p",{className:"text-sm text-secondary truncate max-w-xs",title:i.description,children:i.description})]})]}),Y.jsxs("div",{className:"flex items-center space-x-1 ml-8 bg-surface-hover rounded-lg p-1",children:[Y.jsx("button",{onClick:()=>v("test"),className:"px-3 py-1 text-xs rounded transition-colors "+("test"===g?"bg-surface text-primary shadow-sm":"text-secondary hover:text-primary"),children:"Test Only"}),Y.jsx("button",{onClick:()=>v("both"),className:"px-3 py-1 text-xs rounded transition-colors "+("both"===g?"bg-surface text-primary shadow-sm":"text-secondary hover:text-primary"),children:"Split View"}),Y.jsx("button",{onClick:()=>v("monitoring"),className:"px-3 py-1 text-xs rounded transition-colors "+("monitoring"===g?"bg-surface text-primary shadow-sm":"text-secondary hover:text-primary"),children:"Monitor Only"})]})]}),Y.jsxs("div",{className:"flex items-center space-x-2",children:[k.length>0&&Y.jsxs("div",{className:"flex items-center space-x-2 px-3 py-1 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[Y.jsx("div",{className:"w-2 h-2 bg-blue-500 rounded-full animate-pulse"}),Y.jsxs("span",{className:"text-sm font-medium text-blue-700 dark:text-blue-400",children:[k.length," trace",1!==k.length?"s":""]})]}),Y.jsx("button",{onClick:()=>{m(!h)},className:"p-2 text-secondary hover:text-primary hover:bg-surface-hover rounded transition-colors",title:h?"Exit fullscreen":"Fullscreen",children:h?Y.jsx(sm,{className:"h-5 w-5"}):Y.jsx(om,{className:"h-5 w-5"})}),Y.jsx("button",{onClick:C,className:"p-2 text-secondary hover:text-primary hover:bg-surface-hover rounded transition-colors",title:"Close",children:Y.jsx(mm,{className:"h-5 w-5"})})]})]}),Y.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[Y.jsx("div",{className:`${E.test} border-r border-border-default transition-all duration-300`,children:Y.jsx(XL,{agent:i,initialIdentity:u,onIdentityChange:e=>{d(e)},onMessageSent:async()=>{const e=[...k];setTimeout(async()=>{await S();const t=(new Date).getTime(),n=k.find(n=>{const r=new Date(n.completedAt||n.startedAt).getTime(),i=t-r<1e4,o=e.find(e=>e.threadId===n.threadId);return i&&(!o||n.completedAt!==o.completedAt)});n&&(f(n.threadId),u||d(n.threadId))},3e3)},mode:e,customEndpoint:w})}),Y.jsx("div",{className:`${E.monitoring} transition-all duration-300`,children:Y.jsx(uF,{traces:k,loading:_,onRefresh:S,selectedThreadId:p,onThreadSelect:e=>{f(e.threadId),d(e.threadId)},agentId:t,mode:e,customApiUrl:x})})]})]}),i&&y&&Y.jsx(fF,{agent:i,isOpen:y,onClose:()=>b(!1),onConfirm:async e=>{const{agentsApi:t}=await function(e,t){let n=Promise.resolve();if(t&&t.length>0){document.getElementsByTagName("link");const e=document.querySelector("meta[property=csp-nonce]"),r=(null==e?void 0:e.nonce)||(null==e?void 0:e.getAttribute("nonce"));n=Promise.allSettled(t.map(e=>{if((e=function(e){return"/"+e}(e))in Lh)return;Lh[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script"),i.crossOrigin="",i.href=e,r&&i.setAttribute("nonce",r),document.head.appendChild(i),t?new Promise((t,n)=>{i.addEventListener("load",t),i.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function r(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return n.then(t=>{for(const e of t||[])"rejected"===e.status&&r(e.reason);return e().catch(r)})}(async()=>{const{agentsApi:e}=await Promise.resolve().then(()=>oD);return{agentsApi:e}},[]);await t.resetData(e),await S()}})]})};function mF({children:e}){const t={id:"local-test",domain:"local.test",role:"ADMIN"},n={currentTenant:t,availableTenants:[t],isSuperAdmin:!1,switchTenant:()=>{},isLoading:!1,error:null};return Y.jsx(aD.Provider,{value:n,children:e})}function gF(){return Y.jsx(Mh,{domain:"dummy.auth0.com",clientId:"dummy-client-id",authorizationParams:{redirect_uri:window.location.origin},skipRedirectCallback:!0,children:Y.jsx(Pp,{children:Y.jsx(mF,{children:Y.jsxs(dp,{children:[Y.jsx(cp,{path:"/agents/:agentId/test-monitor",element:Y.jsx(hF,{mode:"local"})}),Y.jsx(cp,{path:"*",element:Y.jsx("div",{className:"flex items-center justify-center h-screen bg-gray-50",children:Y.jsxs("div",{className:"text-center max-w-md",children:[Y.jsx("h1",{className:"text-3xl font-bold text-gray-900 mb-3",children:"Runflow Local Test"}),Y.jsx("p",{className:"text-gray-600 mb-4",children:"This is a minimal build for local agent testing."}),Y.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4 text-left",children:[Y.jsx("p",{className:"text-sm text-blue-800 font-medium mb-2",children:"Navigate to:"}),Y.jsx("code",{className:"text-xs bg-blue-100 px-2 py-1 rounded text-blue-900 block",children:"/agents/YOUR_AGENT_ID/test-monitor?mode=local"})]})]})})})]})})})})}X.createRoot(document.getElementById("root")).render(Y.jsx(V.StrictMode,{children:Y.jsx(gF,{})}));
|