@backtest-kit/ui 12.4.0 → 12.6.0

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.
Files changed (38) hide show
  1. package/README.md +254 -254
  2. package/build/index.cjs +8 -3
  3. package/build/index.mjs +8 -3
  4. package/build/modules/frontend/build/3rdparty/ace_1.4.12/ace.js +21337 -21337
  5. package/build/modules/frontend/build/3rdparty/ace_1.4.12/mode-javascript.js +797 -797
  6. package/build/modules/frontend/build/3rdparty/ace_1.4.12/theme-chrome.js +137 -137
  7. package/build/modules/frontend/build/3rdparty/ace_1.4.12/theme-twilight.js +115 -115
  8. package/build/modules/frontend/build/3rdparty/ace_1.4.12/worker-javascript.js +15012 -15012
  9. package/build/modules/frontend/build/3rdparty/qfchart_0.8.7/echarts.min.js +45 -45
  10. package/build/modules/frontend/build/assets/{Article-O0o3hpW3.js → Article-DqGj0oHP.js} +1 -1
  11. package/build/modules/frontend/build/assets/{Background-CMWFDg5H.js → Background-Ju3gyOQW.js} +1 -1
  12. package/build/modules/frontend/build/assets/{IconPhoto-bus4BUds.js → IconPhoto-DJxFMbZN.js} +1 -1
  13. package/build/modules/frontend/build/assets/{KeyboardArrowLeft-DiwoIhl6.js → KeyboardArrowLeft-D-dH861E.js} +1 -1
  14. package/build/modules/frontend/build/assets/{PictureAsPdfOutlined-C6GukYFm.js → PictureAsPdfOutlined-CNmNuM9m.js} +1 -1
  15. package/build/modules/frontend/build/assets/{Refresh-CthzzypR.js → Refresh-DMMj-ez_.js} +1 -1
  16. package/build/modules/frontend/build/assets/emitters-COYeGAVf.js +1 -0
  17. package/build/modules/frontend/build/assets/{hasRouteMatch-BUocCfU0.js → hasRouteMatch-CJ8MG-Z5.js} +1 -1
  18. package/build/modules/frontend/build/assets/{html2canvas-BXjd5VwI.js → html2canvas-ZRtDT2Xj.js} +1 -1
  19. package/build/modules/frontend/build/assets/{index-B0dOv27L.js → index-B4vT2oz0.js} +1 -1
  20. package/build/modules/frontend/build/assets/{index-C8ijdPgO.js → index-BZ-2tIjS.js} +1 -1
  21. package/build/modules/frontend/build/assets/{index-DS8hcHEz.js → index-BfI1t1CW.js} +1 -1
  22. package/build/modules/frontend/build/assets/{index-Kb9MP8oH.js → index-CAeruUt8.js} +1 -1
  23. package/build/modules/frontend/build/assets/{index-C65iKnLV.js → index-CAw70V5N.js} +1 -1
  24. package/build/modules/frontend/build/assets/{index-BfCHul3t.js → index-CWF7zgn2.js} +1 -1
  25. package/build/modules/frontend/build/assets/{index-BxYTS9U5.js → index-CaNx_Ck6.js} +1 -1
  26. package/build/modules/frontend/build/assets/{index-xnM4Hc3g.js → index-Chady3cO.js} +1 -1
  27. package/build/modules/frontend/build/assets/{index-D-QQ3ARh.js → index-DMi0YxbU.js} +1 -1
  28. package/build/modules/frontend/build/assets/{index--6o4qI0k.js → index-DoJ5J0eu.js} +1 -1
  29. package/build/modules/frontend/build/assets/{index-xD1NB5cz.js → index-DqU1KnNK.js} +1 -1
  30. package/build/modules/frontend/build/assets/{index-DfAakW_X.js → index-Ds77hvVx.js} +1 -1
  31. package/build/modules/frontend/build/assets/{index-BWbOCqgp.js → index-hEQ0fPsL.js} +5 -5
  32. package/build/modules/frontend/build/assets/{index.es-CeK1bA6Z.js → index.es-C3fgp50D.js} +1 -1
  33. package/build/modules/frontend/build/assets/{markdownit-BIaVjXBV.js → markdownit-B8WXvttx.js} +1 -1
  34. package/build/modules/frontend/build/index.html +87 -87
  35. package/build/modules/frontend/build/manifest.json +23 -23
  36. package/package.json +118 -118
  37. package/types.d.ts +2 -1
  38. package/build/modules/frontend/build/assets/emitters-DwSgdWL_.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Kb9MP8oH.js","assets/emitters-DwSgdWL_.js","assets/Refresh-CthzzypR.js","assets/index-C8ijdPgO.js","assets/hasRouteMatch-BUocCfU0.js","assets/PictureAsPdfOutlined-C6GukYFm.js","assets/KeyboardArrowLeft-DiwoIhl6.js","assets/index-xD1NB5cz.js","assets/IconPhoto-bus4BUds.js","assets/Background-CMWFDg5H.js","assets/index-DS8hcHEz.js","assets/index--6o4qI0k.js","assets/index-B0dOv27L.js","assets/Article-O0o3hpW3.js","assets/index-D-QQ3ARh.js","assets/index-C65iKnLV.js","assets/index-DfAakW_X.js","assets/index-BxYTS9U5.js","assets/index-BfCHul3t.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-CAeruUt8.js","assets/emitters-COYeGAVf.js","assets/Refresh-DMMj-ez_.js","assets/index-BZ-2tIjS.js","assets/hasRouteMatch-CJ8MG-Z5.js","assets/PictureAsPdfOutlined-CNmNuM9m.js","assets/KeyboardArrowLeft-D-dH861E.js","assets/index-DqU1KnNK.js","assets/IconPhoto-DJxFMbZN.js","assets/Background-Ju3gyOQW.js","assets/index-BfI1t1CW.js","assets/index-DoJ5J0eu.js","assets/index-B4vT2oz0.js","assets/Article-DqGj0oHP.js","assets/index-DMi0YxbU.js","assets/index-CAw70V5N.js","assets/index-Ds77hvVx.js","assets/index-CaNx_Ck6.js","assets/index-CWF7zgn2.js"])))=>i.map(i=>d[i]);
2
2
  function _mergeNamespaces(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}!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 commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof 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 react={exports:{}},react_production_min={},l$5=Symbol.for("react.element"),n$4=Symbol.for("react.portal"),p$5=Symbol.for("react.fragment"),q$4=Symbol.for("react.strict_mode"),r$5=Symbol.for("react.profiler"),t$4=Symbol.for("react.provider"),u$3=Symbol.for("react.context"),v$5=Symbol.for("react.forward_ref"),w$4=Symbol.for("react.suspense"),x$6=Symbol.for("react.memo"),y$4=Symbol.for("react.lazy"),z$4=Symbol.iterator;function A$4(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=z$4&&e[z$4]||e["@@iterator"])?e:null}var B$4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C$6=Object.assign,D$3={};function E$3(e,t,n){this.props=e,this.context=t,this.refs=D$3,this.updater=n||B$4}function F$2(){}function G$3(e,t,n){this.props=e,this.context=t,this.refs=D$3,this.updater=n||B$4}E$3.prototype.isReactComponent={},E$3.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")},E$3.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},F$2.prototype=E$3.prototype;var H$3=G$3.prototype=new F$2;H$3.constructor=G$3,C$6(H$3,E$3.prototype),H$3.isPureReactComponent=!0;var I$4=Array.isArray,J$3=Object.prototype.hasOwnProperty,K$3={current:null},L$3={key:!0,ref:!0,__self:!0,__source:!0};function M$4(e,t,n){var r,o={},i=null,a=null;if(null!=t)for(r in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(i=""+t.key),t)J$3.call(t,r)&&!L$3.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(1===s)o.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];o.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===o[r]&&(o[r]=s[r]);return{$$typeof:l$5,type:e,key:i,ref:a,props:o,_owner:K$3.current}}function N$3(e,t){return{$$typeof:l$5,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function O$4(e){return"object"==typeof e&&null!==e&&e.$$typeof===l$5}function escape$3(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}var P$4=/\/+/g;function Q$3(e,t){return"object"==typeof e&&null!==e&&null!=e.key?escape$3(""+e.key):t.toString(36)}function R$3(e,t,n,r,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case l$5:case n$4:a=!0}}if(a)return o=o(a=e),e=""===r?"."+Q$3(a,0):r,I$4(o)?(n="",null!=e&&(n=e.replace(P$4,"$&/")+"/"),R$3(o,t,n,"",function(e){return e})):null!=o&&(O$4(o)&&(o=N$3(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(P$4,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=""===r?".":r+":",I$4(e))for(var s=0;s<e.length;s++){var l=r+Q$3(i=e[s],s);a+=R$3(i,t,n,l,o)}else if("function"==typeof(l=A$4(e)))for(e=l.call(e),s=0;!(i=e.next()).done;)a+=R$3(i=i.value,t,n,l=r+Q$3(i,s++),o);else if("object"===i)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 S$3(e,t,n){if(null==e)return e;var r=[],o=0;return R$3(e,r,"","",function(e){return t.call(n,e,o++)}),r}function T$3(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 U$3={current:null},V$3={transition:null},W$3={ReactCurrentDispatcher:U$3,ReactCurrentBatchConfig:V$3,ReactCurrentOwner:K$3};function X$3(){throw Error("act(...) is not supported in production builds of React.")}react_production_min.Children={map:S$3,forEach:function(e,t,n){S$3(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return S$3(e,function(){t++}),t},toArray:function(e){return S$3(e,function(e){return e})||[]},only:function(e){if(!O$4(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},react_production_min.Component=E$3,react_production_min.Fragment=p$5,react_production_min.Profiler=r$5,react_production_min.PureComponent=G$3,react_production_min.StrictMode=q$4,react_production_min.Suspense=w$4,react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W$3,react_production_min.act=X$3,react_production_min.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=C$6({},e.props),o=e.key,i=e.ref,a=e._owner;if(null!=t){if(void 0!==t.ref&&(i=t.ref,a=K$3.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)J$3.call(t,l)&&!L$3.hasOwnProperty(l)&&(r[l]=void 0===t[l]&&void 0!==s?s[l]:t[l])}var l=arguments.length-2;if(1===l)r.children=n;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:l$5,type:e.type,key:o,ref:i,props:r,_owner:a}},react_production_min.createContext=function(e){return(e={$$typeof:u$3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:t$4,_context:e},e.Consumer=e},react_production_min.createElement=M$4,react_production_min.createFactory=function(e){var t=M$4.bind(null,e);return t.type=e,t},react_production_min.createRef=function(){return{current:null}},react_production_min.forwardRef=function(e){return{$$typeof:v$5,render:e}},react_production_min.isValidElement=O$4,react_production_min.lazy=function(e){return{$$typeof:y$4,_payload:{_status:-1,_result:e},_init:T$3}},react_production_min.memo=function(e,t){return{$$typeof:x$6,type:e,compare:void 0===t?null:t}},react_production_min.startTransition=function(e){var t=V$3.transition;V$3.transition={};try{e()}finally{V$3.transition=t}},react_production_min.unstable_act=X$3,react_production_min.useCallback=function(e,t){return U$3.current.useCallback(e,t)},react_production_min.useContext=function(e){return U$3.current.useContext(e)},react_production_min.useDebugValue=function(){},react_production_min.useDeferredValue=function(e){return U$3.current.useDeferredValue(e)},react_production_min.useEffect=function(e,t){return U$3.current.useEffect(e,t)},react_production_min.useId=function(){return U$3.current.useId()},react_production_min.useImperativeHandle=function(e,t,n){return U$3.current.useImperativeHandle(e,t,n)},react_production_min.useInsertionEffect=function(e,t){return U$3.current.useInsertionEffect(e,t)},react_production_min.useLayoutEffect=function(e,t){return U$3.current.useLayoutEffect(e,t)},react_production_min.useMemo=function(e,t){return U$3.current.useMemo(e,t)},react_production_min.useReducer=function(e,t,n){return U$3.current.useReducer(e,t,n)},react_production_min.useRef=function(e){return U$3.current.useRef(e)},react_production_min.useState=function(e){return U$3.current.useState(e)},react_production_min.useSyncExternalStore=function(e,t,n){return U$3.current.useSyncExternalStore(e,t,n)},react_production_min.useTransition=function(){return U$3.current.useTransition()},react_production_min.version="18.3.1",react.exports=react_production_min;var reactExports=react.exports;const React=getDefaultExportFromCjs$1(reactExports),React$1=_mergeNamespaces({__proto__:null,default:React},[reactExports]),factory$1=(e,t)=>window.Translate?window.Translate.jss(e,t):React.createElement(e,t),{Fragment:Fragment}=React,jsxRuntime=Object.freeze(Object.defineProperty({__proto__:null,Fragment:Fragment,jsx:factory$1,jsxs:factory$1},Symbol.toStringTag,{value:"Module"}));var extendStatics=function(e,t){return(extendStatics=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)};function __extends$1(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}extendStatics(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var __assign$2=function(){return __assign$2=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign$2.apply(this,arguments)};function __rest(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function __awaiter(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(e2){i(e2)}}function s(e){try{l(r.throw(e))}catch(e2){i(e2)}}function l(e){var t;e.done?o(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 __generator(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[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]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e2){s=[6,e2],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function __values(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.")}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function __spreadArray(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function __await(e){return this instanceof __await?(this.v=e,this):new __await(e)}function __asyncGenerator(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,c)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(e2){u(i[0][3],e2)}var n}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function __makeTemplateObject(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(null,arguments)}function _objectWithoutPropertiesLoose(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}function memoize$1(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}"function"==typeof SuppressedError&&SuppressedError;var reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize$1(function(e){return reactPropsRegex.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91});const global$1=globalThis||self;function sheetForTag(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function createStyleElement(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var StyleSheet=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(createStyleElement(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=sheetForTag(t);try{n.insertRule(e,n.cssRules.length)}catch(e2){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT$1="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs$2=Math.abs,from$1=String.fromCharCode,assign$4=Object.assign;function hash$2(e,t){return 45^charat(e,0)?(((t<<2^charat(e,0))<<2^charat(e,1))<<2^charat(e,2))<<2^charat(e,3):0}function trim(e){return e.trim()}function match$1(e,t){return(e=t.exec(e))?e[0]:e}function replace$2(e,t,n){return e.replace(t,n)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return 0|e.charCodeAt(t)}function substr(e,t,n){return e.slice(t,n)}function strlen(e){return e.length}function sizeof(e){return e.length}function append$1(e,t){return t.push(e),e}function combine$1(e,t){return e.map(t).join("")}var line=1,column=1,length=0,position=0,character=0,characters="";function node$2(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:line,column:column,length:a,return:""}}function copy(e,t){return assign$4(node$2("",null,null,"",null,null,0),e,{length:-e.length},t)}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,10===character&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,10===character&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(e,t){return substr(characters,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return line=column=1,length=strlen(characters=e),position=0,[]}function dealloc(e){return characters="",e}function delimit(e){return trim(slice(position-1,delimiter$1(91===e?e+2:40===e?e+1:e)))}function whitespace(e){for(;(character=peek())&&character<33;)next();return token(e)>2||token(character)>3?"":" "}function escaping(e,t){for(;--t&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(e,caret()+(t<6&&32==peek()&&32==next()))}function delimiter$1(e){for(;next();)switch(character){case e:return position;case 34:case 39:34!==e&&39!==e&&delimiter$1(character);break;case 40:41===e&&delimiter$1(e);break;case 92:next()}return position}function commenter(e,t){for(;next()&&e+character!==57&&(e+character!==84||47!==peek()););return"/*"+slice(t,position-1)+"*"+from$1(47===e?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,position)}function compile$1(e){return dealloc(parse$c("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse$c(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,f=0,h=0,A=1,m=1,g=1,y=0,v="",b=o,x=i,w=r,C=v;m;)switch(h=y,y=next()){case 40:if(108!=h&&58==charat(C,d-1)){-1!=indexof(C+=replace$2(delimit(y),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:C+=delimit(y);break;case 9:case 10:case 13:case 32:C+=whitespace(h);break;case 92:C+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append$1(comment$2(commenter(next(),caret()),t,n),l);break;default:C+="/"}break;case 123*A:s[c++]=strlen(C)*g;case 125*A:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+u:-1==g&&(C=replace$2(C,/\f/g,"")),f>0&&strlen(C)-d&&append$1(f>32?declaration$2(C+";",r,n,d-1):declaration$2(replace$2(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(append$1(w=ruleset(C,t,n,c,u,o,s,v,b=[],x=[],d),i),123===y)if(0===u)parse$c(C,t,w,w,b,i,d,s,x);else switch(99===p&&110===charat(C,3)?100:p){case 100:case 108:case 109:case 115:parse$c(e,w,w,r&&append$1(ruleset(e,w,w,0,0,o,s,v,o,b=[],d),x),o,x,d,s,r?b:x);break;default:parse$c(C,w,w,w,[""],x,0,s,x)}}c=u=f=0,A=g=1,v=C="",d=a;break;case 58:d=1+strlen(C),f=h;default:if(A<1)if(123==y)--A;else if(125==y&&0==A++&&125==prev())continue;switch(C+=from$1(y),y*A){case 38:g=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(strlen(C)-1)*g,g=1;break;case 64:45===peek()&&(C+=delimit(next())),p=peek(),u=d=strlen(v=C+=identifier(caret())),y++;break;case 45:45===h&&2==strlen(C)&&(A=0)}}return i}function ruleset(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],f=sizeof(p),h=0,A=0,m=0;h<r;++h)for(var g=0,y=substr(e,d+1,d=abs$2(A=a[h])),v=e;g<f;++g)(v=trim(A>0?p[g]+" "+y:replace$2(y,/&\f/g,p[g])))&&(l[m++]=v);return node$2(e,t,n,0===o?RULESET:s,l,c,u)}function comment$2(e,t,n){return node$2(e,t,n,COMMENT$1,from$1(char()),substr(e,2,-2),0)}function declaration$2(e,t,n,r){return node$2(e,t,n,DECLARATION,substr(e,0,r),substr(e,r+1,-1),r)}function prefix$1(e,t,n){switch(hash$2(e,t)){case 5103:return WEBKIT+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+e+e;case 4789:return MOZ+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+e+MOZ+e+MS+e+e;case 5936:switch(charat(e,t+11)){case 114:return WEBKIT+e+MS+replace$2(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return WEBKIT+e+MS+replace$2(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return WEBKIT+e+MS+replace$2(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return WEBKIT+e+MS+e+e;case 6165:return WEBKIT+e+MS+"flex-"+e+e;case 5187:return WEBKIT+e+replace$2(e,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+e;case 5443:return WEBKIT+e+MS+"flex-item-"+replace$2(e,/flex-|-self/g,"")+(match$1(e,/flex-|baseline/)?"":MS+"grid-row-"+replace$2(e,/flex-|-self/g,""))+e;case 4675:return WEBKIT+e+MS+"flex-line-pack"+replace$2(e,/align-content|flex-|-self/g,"")+e;case 5548:return WEBKIT+e+MS+replace$2(e,"shrink","negative")+e;case 5292:return WEBKIT+e+MS+replace$2(e,"basis","preferred-size")+e;case 6060:return WEBKIT+"box-"+replace$2(e,"-grow","")+WEBKIT+e+MS+replace$2(e,"grow","positive")+e;case 4554:return WEBKIT+replace$2(e,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+e;case 6187:return replace$2(replace$2(replace$2(e,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),e,"")+e;case 5495:case 3959:return replace$2(e,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$2(replace$2(e,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+e+e;case 4200:if(!match$1(e,/flex-|baseline/))return MS+"grid-column-align"+substr(e,t)+e;break;case 2592:case 3360:return MS+replace$2(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(e,n){return t=n,match$1(e.props,/grid-\w+-end/)})?~indexof(e+(n=n[t].value),"span")?e:MS+replace$2(e,"-start","")+e+MS+"grid-row-span:"+(~indexof(n,"span")?match$1(n,/\d+/):+match$1(n,/\d+/)-+match$1(e,/\d+/))+";":MS+replace$2(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(e){return match$1(e.props,/grid-\w+-start/)})?e:MS+replace$2(replace$2(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return replace$2(e,/(.+)-inline(.+)/,WEBKIT+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(e)-1-t>6)switch(charat(e,t+1)){case 109:if(45!==charat(e,t+4))break;case 102:return replace$2(e,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(108==charat(e,t+3)?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?prefix$1(replace$2(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return replace$2(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(t,n,r,o,i,a,s){return MS+n+":"+r+s+(o?MS+n+"-span:"+(i?a:+a-+r)+s:"")+e});case 4949:if(121===charat(e,t+6))return replace$2(e,":",":"+WEBKIT)+e;break;case 6444:switch(charat(e,45===charat(e,14)?18:11)){case 120:return replace$2(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+WEBKIT+(45===charat(e,14)?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+e;case 100:return replace$2(e,":",":"+MS)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return replace$2(e,"scroll-","scroll-snap-")+e}return e}function serialize(e,t){for(var n="",r=sizeof(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function stringify$8(e,t,n,r){switch(e.type){case LAYER:if(e.children.length)break;case IMPORT:case DECLARATION:return e.return=e.return||e.value;case COMMENT$1:return"";case KEYFRAMES:return e.return=e.value+"{"+serialize(e.children,r)+"}";case RULESET:e.value=e.props.join(",")}return strlen(n=serialize(e.children,r))?e.return=e.value+"{"+n+"}":""}function middleware(e){var t=sizeof(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function rulesheet(e){return function(t){t.root||(t=t.return)&&e(t)}}function prefixer$1(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case DECLARATION:return void(e.return=prefix$1(e.value,e.length,n));case KEYFRAMES:return serialize([copy(e,{value:replace$2(e.value,"@","@"+WEBKIT)})],r);case RULESET:if(e.length)return combine$1(e.props,function(t){switch(match$1(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(e,{props:[replace$2(t,/:(read-\w+)/,":"+MOZ+"$1")]})],r);case"::placeholder":return serialize([copy(e,{props:[replace$2(t,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(e,{props:[replace$2(t,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(e,{props:[replace$2(t,/:(plac\w+)/,MS+"input-$1")]})],r)}return""})}}var identifierWithPointTracking=function(e,t,n){for(var r=0,o=0;r=o,o=peek(),38===r&&12===o&&(t[n]=1),!token(o);)next();return slice(e,position)},toRules=function(e,t){var n=-1,r=44;do{switch(token(r)){case 0:38===r&&12===peek()&&(t[n]=1),e[n]+=identifierWithPointTracking(position-1,t,n);break;case 2:e[n]+=delimit(r);break;case 4:if(44===r){e[++n]=58===peek()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=from$1(r)}}while(r=next());return e},getRules=function(e,t){return dealloc(toRules(alloc(e),t))},fixedElements=new WeakMap,compat=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||fixedElements.get(n))&&!r){fixedElements.set(e,!0);for(var o=[],i=getRules(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},removeLabel=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function prefix(e,t){switch(hash$2(e,t)){case 5103:return WEBKIT+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+e+MOZ+e+MS+e+e;case 6828:case 4268:return WEBKIT+e+MS+e+e;case 6165:return WEBKIT+e+MS+"flex-"+e+e;case 5187:return WEBKIT+e+replace$2(e,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+e;case 5443:return WEBKIT+e+MS+"flex-item-"+replace$2(e,/flex-|-self/,"")+e;case 4675:return WEBKIT+e+MS+"flex-line-pack"+replace$2(e,/align-content|flex-|-self/,"")+e;case 5548:return WEBKIT+e+MS+replace$2(e,"shrink","negative")+e;case 5292:return WEBKIT+e+MS+replace$2(e,"basis","preferred-size")+e;case 6060:return WEBKIT+"box-"+replace$2(e,"-grow","")+WEBKIT+e+MS+replace$2(e,"grow","positive")+e;case 4554:return WEBKIT+replace$2(e,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+e;case 6187:return replace$2(replace$2(replace$2(e,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),e,"")+e;case 5495:case 3959:return replace$2(e,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$2(replace$2(e,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+e+e;case 4095:case 3583:case 4068:case 2532:return replace$2(e,/(.+)-inline(.+)/,WEBKIT+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(e)-1-t>6)switch(charat(e,t+1)){case 109:if(45!==charat(e,t+4))break;case 102:return replace$2(e,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(108==charat(e,t+3)?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?prefix(replace$2(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==charat(e,t+1))break;case 6444:switch(charat(e,strlen(e)-3-(~indexof(e,"!important")&&10))){case 107:return replace$2(e,":",":"+WEBKIT)+e;case 101:return replace$2(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(45===charat(e,14)?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+e}break;case 5936:switch(charat(e,t+11)){case 114:return WEBKIT+e+MS+replace$2(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return WEBKIT+e+MS+replace$2(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return WEBKIT+e+MS+replace$2(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return WEBKIT+e+MS+e+e}return e}var prefixer=function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case DECLARATION:e.return=prefix(e.value,e.length);break;case KEYFRAMES:return serialize([copy(e,{value:replace$2(e.value,"@","@"+WEBKIT)})],r);case RULESET:if(e.length)return combine$1(e.props,function(t){switch(match$1(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(e,{props:[replace$2(t,/:(read-\w+)/,":"+MOZ+"$1")]})],r);case"::placeholder":return serialize([copy(e,{props:[replace$2(t,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(e,{props:[replace$2(t,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(e,{props:[replace$2(t,/:(plac\w+)/,MS+"input-$1")]})],r)}return""})}},defaultStylisPlugins=[prefixer],createCache=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||defaultStylisPlugins,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c=[compat,removeLabel],u=[stringify$8,rulesheet(function(e){l.insert(e)})],d=middleware(c.concat(i,u));o=function(e,t,n,r){l=n,serialize(compile$1(e?e+"{"+t.styles+"}":t.styles),d),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new StyleSheet({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return p.sheet.hydrate(s),p},reactIs$1={exports:{}},reactIs_production_min$1={},b$5="function"==typeof Symbol&&Symbol.for,c$4=b$5?Symbol.for("react.element"):60103,d$4=b$5?Symbol.for("react.portal"):60106,e$3=b$5?Symbol.for("react.fragment"):60107,f$4=b$5?Symbol.for("react.strict_mode"):60108,g$4=b$5?Symbol.for("react.profiler"):60114,h$3=b$5?Symbol.for("react.provider"):60109,k$5=b$5?Symbol.for("react.context"):60110,l$4=b$5?Symbol.for("react.async_mode"):60111,m$4=b$5?Symbol.for("react.concurrent_mode"):60111,n$3=b$5?Symbol.for("react.forward_ref"):60112,p$4=b$5?Symbol.for("react.suspense"):60113,q$3=b$5?Symbol.for("react.suspense_list"):60120,r$4=b$5?Symbol.for("react.memo"):60115,t$3=b$5?Symbol.for("react.lazy"):60116,v$4=b$5?Symbol.for("react.block"):60121,w$3=b$5?Symbol.for("react.fundamental"):60117,x$5=b$5?Symbol.for("react.responder"):60118,y$3=b$5?Symbol.for("react.scope"):60119;function z$3(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case c$4:switch(e=e.type){case l$4:case m$4:case e$3:case g$4:case f$4:case p$4:return e;default:switch(e=e&&e.$$typeof){case k$5:case n$3:case t$3:case r$4:case h$3:return e;default:return t}}case d$4:return t}}}function A$3(e){return z$3(e)===m$4}reactIs_production_min$1.AsyncMode=l$4,reactIs_production_min$1.ConcurrentMode=m$4,reactIs_production_min$1.ContextConsumer=k$5,reactIs_production_min$1.ContextProvider=h$3,reactIs_production_min$1.Element=c$4,reactIs_production_min$1.ForwardRef=n$3,reactIs_production_min$1.Fragment=e$3,reactIs_production_min$1.Lazy=t$3,reactIs_production_min$1.Memo=r$4,reactIs_production_min$1.Portal=d$4,reactIs_production_min$1.Profiler=g$4,reactIs_production_min$1.StrictMode=f$4,reactIs_production_min$1.Suspense=p$4,reactIs_production_min$1.isAsyncMode=function(e){return A$3(e)||z$3(e)===l$4},reactIs_production_min$1.isConcurrentMode=A$3,reactIs_production_min$1.isContextConsumer=function(e){return z$3(e)===k$5},reactIs_production_min$1.isContextProvider=function(e){return z$3(e)===h$3},reactIs_production_min$1.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===c$4},reactIs_production_min$1.isForwardRef=function(e){return z$3(e)===n$3},reactIs_production_min$1.isFragment=function(e){return z$3(e)===e$3},reactIs_production_min$1.isLazy=function(e){return z$3(e)===t$3},reactIs_production_min$1.isMemo=function(e){return z$3(e)===r$4},reactIs_production_min$1.isPortal=function(e){return z$3(e)===d$4},reactIs_production_min$1.isProfiler=function(e){return z$3(e)===g$4},reactIs_production_min$1.isStrictMode=function(e){return z$3(e)===f$4},reactIs_production_min$1.isSuspense=function(e){return z$3(e)===p$4},reactIs_production_min$1.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===e$3||e===m$4||e===g$4||e===f$4||e===p$4||e===q$3||"object"==typeof e&&null!==e&&(e.$$typeof===t$3||e.$$typeof===r$4||e.$$typeof===h$3||e.$$typeof===k$5||e.$$typeof===n$3||e.$$typeof===w$3||e.$$typeof===x$5||e.$$typeof===y$3||e.$$typeof===v$4)},reactIs_production_min$1.typeOf=z$3,reactIs$1.exports=reactIs_production_min$1;var reactIsExports=reactIs$1.exports,reactIs=reactIsExports,FORWARD_REF_STATICS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};TYPE_STATICS[reactIs.ForwardRef]=FORWARD_REF_STATICS,TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;var isBrowser=!0;function getRegisteredStyles(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}var registerStyles=function(e,t,n){var r=e.key+"-"+t.name;!1!==n&&!1!==isBrowser||void 0!==e.registered[r]||(e.registered[r]=t.styles)},insertStyles=function(e,t,n){registerStyles(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};function murmur2(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(e){return 45===e.charCodeAt(1)},isProcessableValue=function(e){return null!=e&&"boolean"!=typeof e},processStyleName=memoize$1(function(e){return isCustomProperty(e)?e:e.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(animationRegex,function(e,t,n){return cursor={name:t,styles:n,next:cursor},t})}return 1===unitlessKeys[e]||isCustomProperty(e)||"number"!=typeof t||0===t?t:t+"px"};function handleInterpolation(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return cursor={name:o.name,styles:o.styles,next:cursor},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)cursor={name:a.name,styles:a.styles,next:cursor},a=a.next;return i.styles+";"}return createStringFromObject(e,t,n);case"function":if(void 0!==e){var s=cursor,l=n(e);return cursor=s,handleInterpolation(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}function createStringFromObject(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=handleInterpolation(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":isProcessableValue(s)&&(r+=processStyleName(i)+":"+processStyleValue(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=handleInterpolation(e,t,a);switch(i){case"animation":case"animationName":r+=processStyleName(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)isProcessableValue(a[c])&&(r+=processStyleName(i)+":"+processStyleValue(i,a[c])+";")}return r}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor;function serializeStyles(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";cursor=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=handleInterpolation(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=handleInterpolation(n,t,e[a]),r)o+=i[a]}labelPattern.lastIndex=0;for(var s,l="";null!==(s=labelPattern.exec(o));)l+="-"+s[1];return{name:murmur2(o)+l,styles:o,next:cursor}}var syncFallback=function(e){return e()},useInsertionEffect$1=!!React$1.useInsertionEffect&&React$1.useInsertionEffect,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect$1||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect$1||reactExports.useLayoutEffect,EmotionCacheContext=reactExports.createContext("undefined"!=typeof HTMLElement?createCache({key:"css"}):null),CacheProvider=EmotionCacheContext.Provider,__unsafe_useEmotionCache=function(){return reactExports.useContext(EmotionCacheContext)},withEmotionCache=function(e){return reactExports.forwardRef(function(t,n){var r=reactExports.useContext(EmotionCacheContext);return e(t,r,n)})},ThemeContext$1=reactExports.createContext({}),Global=withEmotionCache(function(e,t){var n=serializeStyles([e.styles],void 0,reactExports.useContext(ThemeContext$1)),r=reactExports.useRef();return useInsertionEffectWithLayoutFallback(function(){var e=t.key+"-global",o=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,a=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return t.sheet.tags.length&&(o.before=t.sheet.tags[0]),null!==a&&(i=!0,a.setAttribute("data-emotion",e),o.hydrate([a])),r.current=[o,i],function(){o.flush()}},[t]),useInsertionEffectWithLayoutFallback(function(){var e=r.current,o=e[0];if(e[1])e[1]=!1;else{if(void 0!==n.next&&insertStyles(t,n.next,!0),o.tags.length){var i=o.tags[o.tags.length-1].nextElementSibling;o.before=i,o.flush()}t.insert("",n,o,!1)}},[t,n.name]),null});function css(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return serializeStyles(t)}var keyframes=function(){var e=css.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},testOmitPropsOnStringTag=isPropValid,testOmitPropsOnComponent=function(e){return"theme"!==e},getDefaultShouldForwardProp=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},Insertion=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return registerStyles(t,n,r),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(t,n,r)}),null},createStyled$1=function e(t,n){var r,o,i=t.__emotion_real===t,a=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var s=composeShouldForwardProps(t,n,i),l=s||getDefaultShouldForwardProp(a),c=!l("as");return function(){var u=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var p=u.length,f=1;f<p;f++)d.push(u[f],u[0][f])}var h=withEmotionCache(function(e,t,n){var r=c&&e.as||a,i="",u=[],p=e;if(null==e.theme){for(var f in p={},e)p[f]=e[f];p.theme=reactExports.useContext(ThemeContext$1)}"string"==typeof e.className?i=getRegisteredStyles(t.registered,u,e.className):null!=e.className&&(i=e.className+" ");var h=serializeStyles(d.concat(u),t.registered,p);i+=t.key+"-"+h.name,void 0!==o&&(i+=" "+o);var A=c&&void 0===s?getDefaultShouldForwardProp(r):l,m={};for(var g in e)c&&"as"===g||A(g)&&(m[g]=e[g]);return m.className=i,m.ref=n,reactExports.createElement(reactExports.Fragment,null,reactExports.createElement(Insertion,{cache:t,serialized:h,isStringTag:"string"==typeof r}),reactExports.createElement(r,m))});return h.displayName=void 0!==r?r:"Styled("+("string"==typeof a?a:a.displayName||a.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=a,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,r){return e(t,_extends({},n,r,{shouldForwardProp:composeShouldForwardProps(h,r,!0)})).apply(void 0,d)},h}},tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],newStyled=createStyled$1.bind();function isEmpty$4(e){return null==e||0===Object.keys(e).length}function GlobalStyles$1(e){const{styles:t,defaultTheme:n={}}=e;return factory$1(Global,{styles:"function"==typeof t?e=>t(isEmpty$4(e)?n:e):t})}function styled$1(e,t){return newStyled(e,t)}tags.forEach(function(e){newStyled[e]=newStyled(e)});const internal_processStyles=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))};function isPlainObject$3(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 deepClone(e){if(reactExports.isValidElement(e)||!isPlainObject$3(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=deepClone(e[n])}),t}function deepmerge$2(e,t,n={clone:!0}){const r=n.clone?_extends({},e):e;return isPlainObject$3(e)&&isPlainObject$3(t)&&Object.keys(t).forEach(o=>{reactExports.isValidElement(t[o])?r[o]=t[o]:isPlainObject$3(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&isPlainObject$3(e[o])?r[o]=deepmerge$2(e[o],t[o],n):n.clone?r[o]=isPlainObject$3(t[o])?deepClone(t[o]):t[o]:r[o]=t[o]}),r}function formatMuiErrorMessage(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n<arguments.length;n+=1)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified MUI error #"+e+"; visit "+t+" for the full message."}function capitalize$2(e){if("string"!=typeof e)throw new Error(formatMuiErrorMessage(7));return e.charAt(0).toUpperCase()+e.slice(1)}function createChainedFunction(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}function debounce$2(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}return r.clear=()=>{clearTimeout(n)},r}function deprecatedPropType(e,t){return()=>null}function isMuiElement(e,t){var n,r;return reactExports.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(r=e.type)||null==(r=r._payload)||null==(r=r.value)?void 0:r.muiName)}function ownerDocument(e){return e&&e.ownerDocument||document}function ownerWindow(e){return ownerDocument(e).defaultView||window}function requirePropFactory(e,t){return()=>null}function setRef(e,t){"function"==typeof e?e(t):e&&(e.current=t)}const useEnhancedEffect="undefined"!=typeof window?reactExports.useLayoutEffect:reactExports.useEffect;let globalId=0;function useGlobalId(e){const[t,n]=reactExports.useState(e),r=e||t;return reactExports.useEffect(()=>{null==t&&(globalId+=1,n(`mui-${globalId}`))},[t]),r}const maybeReactUseId=React$1["useId".toString()];function useId$2(e){if(void 0!==maybeReactUseId){const t=maybeReactUseId();return null!=e?e:t}return useGlobalId(e)}function unsupportedProp(e,t,n,r,o){return null}function useControlled({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=reactExports.useRef(void 0!==e),[i,a]=reactExports.useState(t);return[o?e:i,reactExports.useCallback(e=>{o||a(e)},[])]}function useEventCallback(e){const t=reactExports.useRef(e);return useEnhancedEffect(()=>{t.current=e}),reactExports.useRef((...e)=>(0,t.current)(...e)).current}function useForkRef(...e){return reactExports.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{setRef(e,t)})},e)}class Timeout{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new Timeout}start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}}let hadKeyboardEvent=!0,hadFocusVisibleRecently=!1;const hadFocusVisibleRecentlyTimeout=new Timeout,inputTypesWhitelist={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function focusTriggersKeyboardModality(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!inputTypesWhitelist[t]||e.readOnly)||("TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable)}function handleKeyDown(e){e.metaKey||e.altKey||e.ctrlKey||(hadKeyboardEvent=!0)}function handlePointerDown(){hadKeyboardEvent=!1}function handleVisibilityChange(){"hidden"===this.visibilityState&&hadFocusVisibleRecently&&(hadKeyboardEvent=!0)}function prepare(e){e.addEventListener("keydown",handleKeyDown,!0),e.addEventListener("mousedown",handlePointerDown,!0),e.addEventListener("pointerdown",handlePointerDown,!0),e.addEventListener("touchstart",handlePointerDown,!0),e.addEventListener("visibilitychange",handleVisibilityChange,!0)}function isFocusVisible(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return hadKeyboardEvent||focusTriggersKeyboardModality(t)}function useIsFocusVisible(){const e=reactExports.useCallback(e=>{null!=e&&prepare(e.ownerDocument)},[]),t=reactExports.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!isFocusVisible(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(hadFocusVisibleRecently=!0,hadFocusVisibleRecentlyTimeout.start(100,()=>{hadFocusVisibleRecently=!1}),t.current=!1,!0)},ref:e}}function getScrollbarSize(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let cachedType;function detectScrollType(){if(cachedType)return cachedType;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),cachedType="reverse",e.scrollLeft>0?cachedType="default":(e.scrollLeft=1,0===e.scrollLeft&&(cachedType="negative")),document.body.removeChild(e),cachedType}function getNormalizedScrollLeft(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(detectScrollType()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const usePreviousProps=e=>{const t=reactExports.useRef({});return reactExports.useEffect(()=>{t.current=e}),t.current},visuallyHidden={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function resolveProps(e,t){const n=_extends({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=_extends({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const o=e[r]||{},i=t[r];n[r]={},i&&Object.keys(i)?o&&Object.keys(o)?(n[r]=_extends({},i),Object.keys(o).forEach(e=>{n[r][e]=resolveProps(o[e],i[e])})):n[r]=i:n[r]=o}else void 0===n[r]&&(n[r]=e[r])}),n}function composeClasses(e,t,n=void 0){const r={};return Object.keys(e).forEach(o=>{r[o]=e[o].reduce((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}const defaultGenerator=e=>e,createClassNameGenerator=()=>{let e=defaultGenerator;return{configure(t){e=t},generate:t=>e(t),reset(){e=defaultGenerator}}},ClassNameGenerator=createClassNameGenerator(),globalStateClasses={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(e,t,n="Mui"){const r=globalStateClasses[t];return r?`${n}-${r}`:`${ClassNameGenerator.generate(e)}-${t}`}function generateUtilityClasses(e,t,n="Mui"){const r={};return t.forEach(t=>{r[t]=generateUtilityClass(e,t,n)}),r}function r$3(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r$3(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function clsx$2(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r$3(e))&&(r&&(r+=" "),r+=t);return r}function merge$2(e,t){return t?deepmerge$2(e,t,{clone:!1}):e}const values$2={xs:0,sm:600,md:900,lg:1200,xl:1536},defaultBreakpoints={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${values$2[e]}px)`};function handleBreakpoints(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||defaultBreakpoints;return t.reduce((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r),{})}if("object"==typeof t){const e=r.breakpoints||defaultBreakpoints;return Object.keys(t).reduce((r,o)=>{if(-1!==Object.keys(e.values||values$2).indexOf(o)){r[e.up(o)]=n(t[o],o)}else{const e=o;r[e]=t[e]}return r},{})}return n(t)}function createEmptyBreakpointObject(e={}){var t;return(null==(t=e.keys)?void 0:t.reduce((t,n)=>(t[e.up(n)]={},t),{}))||{}}function removeUnusedBreakpoints(e,t){return e.reduce((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e},t)}function mergeBreakpointsInOrder(e,...t){const n=createEmptyBreakpointObject(e),r=[n,...t].reduce((e,t)=>deepmerge$2(e,t),{});return removeUnusedBreakpoints(Object.keys(n),r)}function computeBreakpointsBase(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((t,r)=>{r<e.length&&(n[t]=!0)}):r.forEach(t=>{null!=e[t]&&(n[t]=!0)}),n}function resolveBreakpointValues({values:e,breakpoints:t,base:n}){const r=n||computeBreakpointsBase(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t),{})}function getPath(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce((e,t)=>e&&e[t]?e[t]:null,e);if(null!=n)return n}return t.split(".").reduce((e,t)=>e&&null!=e[t]?e[t]:null,e)}function getStyleValue$1(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:getPath(e,n)||r,t&&(o=t(o,r,e)),o}function style$2(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=getPath(e.theme,r)||{};return handleBreakpoints(e,i,e=>{let r=getStyleValue$1(a,o,e);return e===r&&"string"==typeof e&&(r=getStyleValue$1(a,o,`${t}${"default"===e?"":capitalize$2(e)}`,e)),!1===n?r:{[n]:r}})};return i.propTypes={},i.filterProps=[t],i}function compose(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(n=>{e[n]=t}),e),{}),n=e=>Object.keys(e).reduce((n,r)=>t[r]?merge$2(n,t[r](e)):n,{});return n.propTypes={},n.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),n}function memoize(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}const properties={m:"margin",p:"padding"},directions={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},aliases$1={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},getCssProperties=memoize(e=>{if(e.length>2){if(!aliases$1[e])return[e];e=aliases$1[e]}const[t,n]=e.split(""),r=properties[t],o=directions[n]||"";return Array.isArray(o)?o.map(e=>r+e):[r+o]}),marginKeys=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],paddingKeys=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function createUnaryUnit(e,t,n,r){var o;const i=null!=(o=getPath(e,t,!1))?o:n;return"number"==typeof i?e=>"string"==typeof e?e:i*e:Array.isArray(i)?e=>"string"==typeof e?e:i[e]:"function"==typeof i?i:()=>{}}function createUnarySpacing(e){return createUnaryUnit(e,"spacing",8)}function getValue(e,t){if("string"==typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"==typeof n?-n:`-${n}`}function getStyleFromPropValue(e,t){return n=>e.reduce((e,r)=>(e[r]=getValue(t,n),e),{})}function resolveCssProperty(e,t,n,r){if(-1===t.indexOf(n))return null;const o=getStyleFromPropValue(getCssProperties(n),r);return handleBreakpoints(e,e[n],o)}function style$1(e,t){const n=createUnarySpacing(e.theme);return Object.keys(e).map(r=>resolveCssProperty(e,t,r,n)).reduce(merge$2,{})}function margin(e){return style$1(e,marginKeys)}function padding(e){return style$1(e,paddingKeys)}function borderTransform(e){return"number"!=typeof e?e:`${e}px solid`}margin.propTypes={},margin.filterProps=marginKeys,padding.propTypes={},padding.filterProps=paddingKeys;const border=style$2({prop:"border",themeKey:"borders",transform:borderTransform}),borderTop=style$2({prop:"borderTop",themeKey:"borders",transform:borderTransform}),borderRight=style$2({prop:"borderRight",themeKey:"borders",transform:borderTransform}),borderBottom=style$2({prop:"borderBottom",themeKey:"borders",transform:borderTransform}),borderLeft=style$2({prop:"borderLeft",themeKey:"borders",transform:borderTransform}),borderColor=style$2({prop:"borderColor",themeKey:"palette"}),borderTopColor=style$2({prop:"borderTopColor",themeKey:"palette"}),borderRightColor=style$2({prop:"borderRightColor",themeKey:"palette"}),borderBottomColor=style$2({prop:"borderBottomColor",themeKey:"palette"}),borderLeftColor=style$2({prop:"borderLeftColor",themeKey:"palette"}),borderRadius=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=createUnaryUnit(e.theme,"shape.borderRadius",4),n=e=>({borderRadius:getValue(t,e)});return handleBreakpoints(e,e.borderRadius,n)}return null};borderRadius.propTypes={},borderRadius.filterProps=["borderRadius"],compose(border,borderTop,borderRight,borderBottom,borderLeft,borderColor,borderTopColor,borderRightColor,borderBottomColor,borderLeftColor,borderRadius);const gap=e=>{if(void 0!==e.gap&&null!==e.gap){const t=createUnaryUnit(e.theme,"spacing",8),n=e=>({gap:getValue(t,e)});return handleBreakpoints(e,e.gap,n)}return null};gap.propTypes={},gap.filterProps=["gap"];const columnGap=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=createUnaryUnit(e.theme,"spacing",8),n=e=>({columnGap:getValue(t,e)});return handleBreakpoints(e,e.columnGap,n)}return null};columnGap.propTypes={},columnGap.filterProps=["columnGap"];const rowGap=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=createUnaryUnit(e.theme,"spacing",8),n=e=>({rowGap:getValue(t,e)});return handleBreakpoints(e,e.rowGap,n)}return null};rowGap.propTypes={},rowGap.filterProps=["rowGap"];const gridColumn=style$2({prop:"gridColumn"}),gridRow=style$2({prop:"gridRow"}),gridAutoFlow=style$2({prop:"gridAutoFlow"}),gridAutoColumns=style$2({prop:"gridAutoColumns"}),gridAutoRows=style$2({prop:"gridAutoRows"}),gridTemplateColumns=style$2({prop:"gridTemplateColumns"}),gridTemplateRows=style$2({prop:"gridTemplateRows"}),gridTemplateAreas=style$2({prop:"gridTemplateAreas"}),gridArea=style$2({prop:"gridArea"});function paletteTransform(e,t){return"grey"===t?t:e}compose(gap,columnGap,rowGap,gridColumn,gridRow,gridAutoFlow,gridAutoColumns,gridAutoRows,gridTemplateColumns,gridTemplateRows,gridTemplateAreas,gridArea);const color$1=style$2({prop:"color",themeKey:"palette",transform:paletteTransform}),bgcolor=style$2({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),backgroundColor=style$2({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform});function sizingTransform(e){return e<=1&&0!==e?100*e+"%":e}compose(color$1,bgcolor,backgroundColor);const width=style$2({prop:"width",transform:sizingTransform}),maxWidth=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r,o;return{maxWidth:(null==(n=e.theme)||null==(r=n.breakpoints)||null==(o=r.values)?void 0:o[t])||values$2[t]||sizingTransform(t)}};return handleBreakpoints(e,e.maxWidth,t)}return null};maxWidth.filterProps=["maxWidth"];const minWidth=style$2({prop:"minWidth",transform:sizingTransform}),height=style$2({prop:"height",transform:sizingTransform}),maxHeight=style$2({prop:"maxHeight",transform:sizingTransform}),minHeight=style$2({prop:"minHeight",transform:sizingTransform});style$2({prop:"size",cssProperty:"width",transform:sizingTransform}),style$2({prop:"size",cssProperty:"height",transform:sizingTransform});const boxSizing=style$2({prop:"boxSizing"});compose(width,maxWidth,minWidth,height,maxHeight,minHeight,boxSizing);const defaultSxConfig={border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding},paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function objectsHaveSameKeys(...e){const t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]),n=new Set(t);return e.every(e=>n.size===Object.keys(e).length)}function callIfFn(e,t){return"function"==typeof e?e(t):e}function unstable_createStyleFunctionSx(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;const u=getPath(n,s)||{};if(c)return c(o);return handleBreakpoints(o,t,t=>{let n=getStyleValue$1(u,l,t);return t===n&&"string"==typeof t&&(n=getStyleValue$1(u,l,`${e}${"default"===t?"":capitalize$2(t)}`,t)),!1===a?n:{[a]:n}})}return function t(n){var r;const{sx:o,theme:i={}}=n||{};if(!o)return null;const a=null!=(r=i.unstable_sxConfig)?r:defaultSxConfig;function s(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const o=createEmptyBreakpointObject(i.breakpoints),s=Object.keys(o);let l=o;return Object.keys(r).forEach(n=>{const o=callIfFn(r[n],i);if(null!=o)if("object"==typeof o)if(a[n])l=merge$2(l,e(n,o,i,a));else{const e=handleBreakpoints({theme:i},o,e=>({[n]:e}));objectsHaveSameKeys(e,o)?l[n]=t({sx:o,theme:i}):l=merge$2(l,e)}else l=merge$2(l,e(n,o,i,a))}),removeUnusedBreakpoints(s,l)}return Array.isArray(o)?o.map(s):s(o)}}const styleFunctionSx=unstable_createStyleFunctionSx();styleFunctionSx.filterProps=["sx"];const _excluded$1G=["sx"],splitProps=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:defaultSxConfig;return Object.keys(e).forEach(t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]}),r};function extendSxProp(e){const{sx:t}=e,n=_objectWithoutPropertiesLoose(e,_excluded$1G),{systemProps:r,otherProps:o}=splitProps(n);let i;return i=Array.isArray(t)?[r,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return isPlainObject$3(n)?_extends({},r,n):r}:_extends({},r,t),_extends({},o,{sx:i})}function r$2(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r$2(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function clsx$1(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=r$2(e))&&(r&&(r+=" "),r+=t);return r}const _excluded$1F=["values","unit","step"],sortBreakpointsValues=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>_extends({},e,{[t.key]:t.val}),{})};function createBreakpoints(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=_objectWithoutPropertiesLoose(e,_excluded$1F),i=sortBreakpointsValues(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return _extends({keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},o)}const shape={borderRadius:4};function createSpacing(e=8){if(e.mui)return e;const t=createUnarySpacing({spacing:e}),n=(...e)=>(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?`${n}px`:n}).join(" ");return n.mui=!0,n}const _excluded$1E=["breakpoints","palette","spacing","shape"];function createTheme$2(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={}}=e,a=_objectWithoutPropertiesLoose(e,_excluded$1E),s=createBreakpoints(n),l=createSpacing(o);let c=deepmerge$2({breakpoints:s,direction:"ltr",components:{},palette:_extends({mode:"light"},r),spacing:l,shape:_extends({},shape,i)},a);return c=t.reduce((e,t)=>deepmerge$2(e,t),c),c.unstable_sxConfig=_extends({},defaultSxConfig,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return styleFunctionSx({sx:e,theme:this})},c}const ThemeContext=reactExports.createContext(null);function useTheme$3(){return reactExports.useContext(ThemeContext)}const hasSymbol$1="function"==typeof Symbol&&Symbol.for,nested=hasSymbol$1?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(e,t){if("function"==typeof t){return t(e)}return _extends({},e,t)}function ThemeProvider$1(e){const{children:t,theme:n}=e,r=useTheme$3(),o=reactExports.useMemo(()=>{const e=null===r?n:mergeOuterLocalTheme(r,n);return null!=e&&(e[nested]=null!==r),e},[n,r]);return factory$1(ThemeContext.Provider,{value:o,children:t})}function isObjectEmpty(e){return 0===Object.keys(e).length}function useTheme$2(e=null){const t=useTheme$3();return!t||isObjectEmpty(t)?e:t}const systemDefaultTheme$1=createTheme$2();function useTheme$1(e=systemDefaultTheme$1){return useTheme$2(e)}const _excluded$1D=["className","component"];function createBox(e={}){const{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:r}=e,o=styled$1("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(styleFunctionSx);return reactExports.forwardRef(function(e,i){const a=useTheme$1(t),s=extendSxProp(e),{className:l,component:c="div"}=s,u=_objectWithoutPropertiesLoose(s,_excluded$1D);return factory$1(o,_extends({as:c,ref:i,className:clsx$1(l,r?r(n):n),theme:a},u))})}const _excluded$1C=["variant"];function isEmpty$3(e){return 0===e.length}function propsToClassKey(e){const{variant:t}=e,n=_objectWithoutPropertiesLoose(e,_excluded$1C);let r=t||"";return Object.keys(n).sort().forEach(t=>{r+="color"===t?isEmpty$3(r)?e[t]:capitalize$2(e[t]):`${isEmpty$3(r)?t:capitalize$2(t)}${capitalize$2(e[t].toString())}`}),r}const _excluded$1B=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],_excluded2$6=["theme"],_excluded3=["theme"];function isEmpty$2(e){return 0===Object.keys(e).length}function isStringTag(e){return"string"==typeof e&&e.charCodeAt(0)>96}const getStyleOverrides=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,getVariantStyles=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach(e=>{const t=propsToClassKey(e.props);r[t]=e.style}),r},variantsResolver=(e,t,n,r)=>{var o,i;const{ownerState:a={}}=e,s=[],l=null==n||null==(o=n.components)||null==(i=o[r])?void 0:i.variants;return l&&l.forEach(n=>{let r=!0;Object.keys(n.props).forEach(t=>{a[t]!==n.props[t]&&e[t]!==n.props[t]&&(r=!1)}),r&&s.push(t[propsToClassKey(n.props)])}),s};function shouldForwardProp(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const systemDefaultTheme=createTheme$2();function createStyled(e={}){const{defaultTheme:t=systemDefaultTheme,rootShouldForwardProp:n=shouldForwardProp,slotShouldForwardProp:r=shouldForwardProp}=e,o=e=>{const n=isEmpty$2(e.theme)?t:e.theme;return styleFunctionSx(_extends({},e,{theme:n}))};return o.__mui_systemSx=!0,(e,i={})=>{internal_processStyles(e,e=>e.filter(e=>!(null!=e&&e.__mui_systemSx)));const{name:a,slot:s,skipVariantsResolver:l,skipSx:c,overridesResolver:u}=i,d=_objectWithoutPropertiesLoose(i,_excluded$1B),p=void 0!==l?l:s&&"Root"!==s||!1,f=c||!1;let h=shouldForwardProp;"Root"===s?h=n:s?h=r:isStringTag(e)&&(h=void 0);const A=styled$1(e,_extends({shouldForwardProp:h,label:void 0},d)),m=(e,...n)=>{const r=n?n.map(e=>"function"==typeof e&&e.__emotion_real!==e?n=>{let{theme:r}=n,o=_objectWithoutPropertiesLoose(n,_excluded2$6);return e(_extends({theme:isEmpty$2(r)?t:r},o))}:e):[];let i=e;a&&u&&r.push(e=>{const n=isEmpty$2(e.theme)?t:e.theme,r=getStyleOverrides(a,n);if(r){const t={};return Object.entries(r).forEach(([r,o])=>{t[r]="function"==typeof o?o(_extends({},e,{theme:n})):o}),u(e,t)}return null}),a&&!p&&r.push(e=>{const n=isEmpty$2(e.theme)?t:e.theme;return variantsResolver(e,getVariantStyles(a,n),n,a)}),f||r.push(o);const s=r.length-n.length;if(Array.isArray(e)&&s>0){const t=new Array(s).fill("");i=[...e,...t],i.raw=[...e.raw,...t]}else"function"==typeof e&&e.__emotion_real!==e&&(i=n=>{let{theme:r}=n,o=_objectWithoutPropertiesLoose(n,_excluded3);return e(_extends({theme:isEmpty$2(r)?t:r},o))});return A(i,...r)};return A.withConfig&&(m.withConfig=A.withConfig),m}}function getThemeProps(e){const{theme:t,name:n,props:r}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?resolveProps(t.components[n].defaultProps,r):r}function useThemeProps$1({props:e,name:t,defaultTheme:n}){return getThemeProps({theme:useTheme$1(n),name:t,props:e})}function clamp$6(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function hexToRgb(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(e){if(e.type)return e;if("#"===e.charAt(0))return decomposeColor(hexToRgb(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(formatMuiErrorMessage(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error(formatMuiErrorMessage(10,r))}else o=o.split(",");return o=o.map(e=>parseFloat(e)),{type:n,values:o,colorSpace:r}}function recomposeColor(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function hslToRgb(e){e=decomposeColor(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),recomposeColor({type:s,values:l})}function getLuminance(e){let t="hsl"===(e=decomposeColor(e)).type||"hsla"===e.type?decomposeColor(hslToRgb(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function getContrastRatio(e,t){const n=getLuminance(e),r=getLuminance(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function alpha$2(e,t){return e=decomposeColor(e),t=clamp$6(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,recomposeColor(e)}function darken$1(e,t){if(e=decomposeColor(e),t=clamp$6(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return recomposeColor(e)}function lighten(e,t){if(e=decomposeColor(e),t=clamp$6(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return recomposeColor(e)}function emphasize(e,t=.15){return getLuminance(e)>.5?darken$1(e,t):lighten(e,t)}const EMPTY_THEME={};function InnerThemeProvider(e){const t=useTheme$1();return factory$1(ThemeContext$1.Provider,{value:"object"==typeof t?t:EMPTY_THEME,children:e.children})}function ThemeProvider(e){const{children:t,theme:n}=e;return factory$1(ThemeProvider$1,{theme:n,children:factory$1(InnerThemeProvider,{children:t})})}function createMixins(e,t){return _extends({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const common$1={black:"#000",white:"#fff"},grey={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},purple={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2",900:"#4a148c"},red={200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828",900:"#b71c1c"},orange={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},blue={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",500:"#2196f3",700:"#1976d2",800:"#1565c0",900:"#0d47a1"},lightBlue={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},green={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},_excluded$1A=["mode","contrastThreshold","tonalOffset"],light={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:common$1.white,default:common$1.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},dark={text:{primary:common$1.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:common$1.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function addLightOrDark(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=lighten(e.main,o):"dark"===t&&(e.dark=darken$1(e.main,i)))}function getDefaultPrimary(e="light"){return"dark"===e?{main:blue[200],light:blue[50],dark:blue[400]}:{main:blue[700],light:blue[400],dark:blue[800]}}function getDefaultSecondary(e="light"){return"dark"===e?{main:purple[200],light:purple[50],dark:purple[400]}:{main:purple[500],light:purple[300],dark:purple[700]}}function getDefaultError(e="light"){return"dark"===e?{main:red[500],light:red[300],dark:red[700]}:{main:red[700],light:red[400],dark:red[800]}}function getDefaultInfo(e="light"){return"dark"===e?{main:lightBlue[400],light:lightBlue[300],dark:lightBlue[700]}:{main:lightBlue[700],light:lightBlue[500],dark:lightBlue[900]}}function getDefaultSuccess(e="light"){return"dark"===e?{main:green[400],light:green[300],dark:green[700]}:{main:green[800],light:green[500],dark:green[900]}}function getDefaultWarning(e="light"){return"dark"===e?{main:orange[400],light:orange[300],dark:orange[700]}:{main:"#ed6c02",light:orange[500],dark:orange[900]}}function createPalette(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,o=_objectWithoutPropertiesLoose(e,_excluded$1A),i=e.primary||getDefaultPrimary(t),a=e.secondary||getDefaultSecondary(t),s=e.error||getDefaultError(t),l=e.info||getDefaultInfo(t),c=e.success||getDefaultSuccess(t),u=e.warning||getDefaultWarning(t);function d(e){return getContrastRatio(e,dark.text.primary)>=n?dark.text.primary:light.text.primary}const p=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e=_extends({},e)).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error(formatMuiErrorMessage(12,t?` (${t})`:"",JSON.stringify(e.main)));return addLightOrDark(e,"light",o,r),addLightOrDark(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e},f={dark:dark,light:light};return deepmerge$2(_extends({common:_extends({},common$1),mode:t,primary:p({color:i,name:"primary"}),secondary:p({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:p({color:s,name:"error"}),warning:p({color:u,name:"warning"}),info:p({color:l,name:"info"}),success:p({color:c,name:"success"}),grey:grey,contrastThreshold:n,getContrastText:d,augmentColor:p,tonalOffset:r},f[t]),o)}const _excluded$1z=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function round$6(e){return Math.round(1e5*e)/1e5}const caseAllCaps={textTransform:"uppercase"},defaultFontFamily='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(e,t){const n="function"==typeof t?t(e):t,{fontFamily:r=defaultFontFamily,fontSize:o=14,fontWeightLight:i=300,fontWeightRegular:a=400,fontWeightMedium:s=500,fontWeightBold:l=700,htmlFontSize:c=16,allVariants:u,pxToRem:d}=n,p=_objectWithoutPropertiesLoose(n,_excluded$1z),f=o/14,h=d||(e=>e/c*f+"rem"),A=(e,t,n,o,i)=>_extends({fontFamily:r,fontWeight:e,fontSize:h(t),lineHeight:n},r===defaultFontFamily?{letterSpacing:`${round$6(o/t)}em`}:{},i,u),m={h1:A(i,96,1.167,-1.5),h2:A(i,60,1.2,-.5),h3:A(a,48,1.167,0),h4:A(a,34,1.235,.25),h5:A(a,24,1.334,0),h6:A(s,20,1.6,.15),subtitle1:A(a,16,1.75,.15),subtitle2:A(s,14,1.57,.1),body1:A(a,16,1.5,.15),body2:A(a,14,1.43,.15),button:A(s,14,1.75,.4,caseAllCaps),caption:A(a,12,1.66,.4),overline:A(a,12,2.66,1,caseAllCaps)};return deepmerge$2(_extends({htmlFontSize:c,pxToRem:h,fontFamily:r,fontSize:o,fontWeightLight:i,fontWeightRegular:a,fontWeightMedium:s,fontWeightBold:l},m),p,{clone:!1})}const shadowKeyUmbraOpacity=.2,shadowKeyPenumbraOpacity=.14,shadowAmbientShadowOpacity=.12;function createShadow(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",")}const shadows=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],_excluded$1y=["duration","easing","delay"],easing={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},duration={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(e){return`${Math.round(e)}ms`}function getAutoHeightDuration(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function createTransitions(e){const t=_extends({},easing,e.easing),n=_extends({},duration,e.duration);return _extends({getAutoHeightDuration:getAutoHeightDuration,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0}=r;return _objectWithoutPropertiesLoose(r,_excluded$1y),(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof o?o:formatMs(o)} ${i} ${"string"==typeof a?a:formatMs(a)}`).join(",")}},e,{easing:t,duration:n})}const zIndex={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},_excluded$1x=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function createTheme$1(e={},...t){const{mixins:n={},palette:r={},transitions:o={},typography:i={}}=e,a=_objectWithoutPropertiesLoose(e,_excluded$1x);if(e.vars)throw new Error(formatMuiErrorMessage(18));const s=createPalette(r),l=createTheme$2(e);let c=deepmerge$2(l,{mixins:createMixins(l.breakpoints,n),palette:s,shadows:shadows.slice(),typography:createTypography(s,i),transitions:createTransitions(o),zIndex:_extends({},zIndex)});return c=deepmerge$2(c,a),c=t.reduce((e,t)=>deepmerge$2(e,t),c),c.unstable_sxConfig=_extends({},defaultSxConfig,null==a?void 0:a.unstable_sxConfig),c.unstable_sx=function(e){return styleFunctionSx({sx:e,theme:this})},c}const defaultTheme$1=createTheme$1();function useTheme(){return useTheme$1(defaultTheme$1)}function useThemeProps({props:e,name:t}){return useThemeProps$1({props:e,name:t,defaultTheme:defaultTheme$1})}const rootShouldForwardProp=e=>shouldForwardProp(e)&&"classes"!==e,slotShouldForwardProp=shouldForwardProp,styled=createStyled({defaultTheme:defaultTheme$1,rootShouldForwardProp:rootShouldForwardProp}),getOverlayAlpha=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)},objectFromEntries=Object.fromEntries?Object.fromEntries:e=>{if(!e||!e[Symbol.iterator])throw new Error("Object.fromEntries() requires a single iterable argument");const t={};return Object.keys(e).forEach(n=>{const[r,o]=e[n];t[r]=o}),t};function objectKeys(e){return Object.keys(e)}function assert(e,t){if(!e)throw new Error(t)}function typeGuard(e,t){return t}const classnames=e=>{const t=e.length;let n=0,r="";for(;n<t;n++){const t=e[n];if(null==t)continue;let o;switch(typeof t){case"boolean":break;case"object":if(Array.isArray(t))o=classnames(t);else{assert(!typeGuard(t,!1)),o="";for(const e in t)t[e]&&e&&(o&&(o+=" "),o+=e)}break;default:o=t}o&&(r&&(r+=" "),r+=o)}return r};function useGuaranteedMemo(e,t){var n;const r=reactExports.useRef();return(!r.current||t.length!==(null===(n=r.current.prevDeps)||void 0===n?void 0:n.length)||r.current.prevDeps.map((e,n)=>e===t[n]).indexOf(!1)>=0)&&(r.current={v:e(),prevDeps:[...t]}),r.current.v}function matchCSSObject(e){return e instanceof Object&&!("styles"in e)&&!("length"in e)&&!("__emotion_styles"in e)}const{createCssAndCx:createCssAndCx}=(()=>({createCssAndCx:function(e){const{cache:t}=e,n=(...e)=>{const n=serializeStyles(e,t.registered);insertStyles(t,n,!1);const r=`${t.key}-${n.name}`;{const n=e[0];matchCSSObject(n)&&increaseSpecificityToTakePrecedenceOverMediaQueries.saveClassNameCSSObjectMapping(t,r,n)}return r};return{css:n,cx:(...e)=>{const r=classnames(e),o=increaseSpecificityToTakePrecedenceOverMediaQueries.fixClassName(t,r,n);return function(e,t,n){const r=[],o=getRegisteredStyles(e,r,n);return r.length<2?n:o+t(r)}(t.registered,n,o)}}}}))();function createUseCssAndCx(e){const{useCache:t}=e;return{useCssAndCx:function(){const e=t(),{css:n,cx:r}=useGuaranteedMemo(()=>createCssAndCx({cache:e}),[e]);return{css:n,cx:r}}}}const increaseSpecificityToTakePrecedenceOverMediaQueries=(()=>{const e=new WeakMap;return{saveClassNameCSSObjectMapping:(t,n,r)=>{let o=e.get(t);void 0===o&&(o=new Map,e.set(t,o)),o.set(n,r)},fixClassName:(()=>(t,n,r)=>{const o=e.get(t);return classnames(function(e){let t=!1;return e.map(([e,n])=>{if(void 0===n)return e;let r;if(t)r={"&&":n};else{r=e;for(const e in n)if(e.startsWith("@media")){t=!0;break}}return r})}(n.split(" ").map(e=>[e,null==o?void 0:o.get(e)])).map(e=>"string"==typeof e?e:r(e)))})()}})();function getDependencyArrayRef(e){if(!(e instanceof Object)||"function"==typeof e)return e;const t=[];for(const n in e){const r=e[n],o=typeof r;if("string"!==o&&("number"!==o||isNaN(r))&&"boolean"!==o&&null!=r)return e;t.push(`${n}:${o}_${r}`)}return"xSqLiJdLMd9s"+t.join("|")}function mergeClasses(e,t,n){if(!(t instanceof Object))return e;const r={};return objectKeys(e).forEach(o=>r[o]=n(e[o],t[o])),objectKeys(t).forEach(n=>{if(n in e)return;const o=t[n];"string"==typeof o&&(r[n]=o)}),r}const useMuiThemeStyleOverridesPlugin=({classes:e,theme:t,muiStyleOverridesParams:n,css:r,cx:o,name:i})=>{var a,s;if("makeStyle no name"!==i){if(void 0!==n&&void 0===i)throw new Error("To use muiStyleOverridesParams, you must specify a name using .withName('MyComponent')")}else i=void 0;let l;try{l=void 0===i?void 0:(null===(s=null===(a=t.components)||void 0===a?void 0:a[i])||void 0===s?void 0:s.styleOverrides)||void 0}catch(u){}const c=reactExports.useMemo(()=>{if(void 0===l)return;const e={};for(const o in l){const i=l[o];i instanceof Object&&(e[o]=r("function"==typeof i?i({theme:t,ownerState:null==n?void 0:n.ownerState,...null==n?void 0:n.props}):i))}return e},[l,getDependencyArrayRef(null==n?void 0:n.props),getDependencyArrayRef(null==n?void 0:n.ownerState),r]);return{classes:e=reactExports.useMemo(()=>mergeClasses(e,c,o),[e,c,o])}},useContextualCache=__unsafe_useEmotionCache;let counter$1=0;function createMakeStyles(e){const{useTheme:t,cache:n}=e,{useCache:r}=createUseCache({cacheProvidedAtInception:n}),{useCssAndCx:o}=createUseCssAndCx({useCache:r});return{makeStyles:function(e){const{name:n,uniqId:i=""+counter$1++}=null!=e?e:{},a="object"!=typeof n?n:Object.keys(n)[0];return function(e){const n="function"==typeof e?e:()=>e;return function(e,s){const l=t();let{css:c,cx:u}=o();const d=r();let p=reactExports.useMemo(()=>{const t={},r="undefined"!=typeof Proxy&&new Proxy({},{get:(e,n)=>("symbol"==typeof n&&assert(!1),t[n]=`${d.key}-${i}${void 0!==a?`-${a}`:""}-${n}-ref`)}),o=n(l,e,r||{}),s=objectFromEntries(objectKeys(o).map(e=>{const n=o[e];return n.label||(n.label=`${void 0!==a?`${a}-`:""}${e}`),[e,`${c(n)}${typeGuard(e,e in t)?` ${t[e]}`:""}`]}));return objectKeys(t).forEach(e=>{e in s||(s[e]=t[e])}),s},[d,c,u,l,getDependencyArrayRef(e)]);{const e=null==s?void 0:s.props.classes;p=reactExports.useMemo(()=>mergeClasses(p,e,u),[p,getDependencyArrayRef(e),u])}{const e=useMuiThemeStyleOverridesPlugin({classes:p,css:c,cx:u,name:null!=a?a:"makeStyle no name",muiStyleOverridesParams:s,theme:l});void 0!==e.classes&&(p=e.classes),void 0!==e.css&&(c=e.css),void 0!==e.cx&&(u=e.cx)}return{classes:p,theme:l,css:c,cx:u}}}},useStyles:function(){const e=t(),{css:n,cx:r}=o();return{theme:e,css:n,cx:r}}}}const reactContext=reactExports.createContext(void 0),{createUseCache:createUseCache}=(()=>({createUseCache:function(e){const{cacheProvidedAtInception:t}=e;return{useCache:function(){var e;const n=useContextualCache(),r=reactExports.useContext(reactContext),o=null!==(e=null!=t?t:r)&&void 0!==e?e:n;if(null===o)throw new Error(["In order to get SSR working with tss-react you need to explicitly provide an Emotion cache.","MUI users be aware: This is not an error strictly related to tss-react, with or without tss-react,","MUI needs an Emotion cache to be provided for SSR to work.","Here is the MUI documentation related to SSR setup: https://mui.com/material-ui/guides/server-rendering/","TSS provides helper that makes the process of setting up SSR easier: https://docs.tss-react.dev/ssr"].join("\n"));return o}}}}))();function capitalize$1(e){return e.charAt(0).toUpperCase()+e.slice(1)}function createWithStyles(e){const{useTheme:t,cache:n}=e,{makeStyles:r}=createMakeStyles({useTheme:t,cache:n});function o(e,t,n){const o="string"==typeof e?(()=>{const t=e,n=function({children:e,...n}){return reactExports.createElement(t,n,e)};return Object.defineProperty(n,"name",{value:capitalize$1(t)}),n})():e,i=(()=>{{const{name:e}=null!=n?n:{};if(void 0!==e)return"object"!=typeof e?e:Object.keys(e)[0]}let e;{const t=o.displayName;"string"==typeof t&&""!==t&&(e=t)}e:{if(void 0!==e)break e;const t=o.name;"string"==typeof t&&""!==t&&(e=t)}if(void 0!==e)return e=e.replace(/\$/g,"usd"),e=e.replace(/\(/g,"_").replace(/\)/g,"_"),e=e.replace(/[^a-zA-Z0-9-_]/g,"_"),e})(),a=r({...n,name:i})("function"==typeof t?(e,n,r)=>incorporateMediaQueries(t(e,n,r)):incorporateMediaQueries(t));function s(e){for(const t in e)if("root"!==t)return!0;return!1}const l=reactExports.forwardRef(function(t,n){const{className:r,classes:i,...l}=t,{classes:c,cx:u}=a(t,{props:t}),d=u(c.root,r);return fixedClassesByClasses.set(c,{...c,root:d}),React.createElement(o,{ref:n,className:s(c)?r:d,..."string"==typeof e?{}:{classes:c},...l})});return void 0!==i&&(l.displayName=`${capitalize$1(i)}WithStyles`,Object.defineProperty(l,"name",{value:l.displayName})),l}return o.getClasses=getClasses,{withStyles:o}}const fixedClassesByClasses=new WeakMap,errorMessageGetClasses="getClasses should only be used in conjunction with withStyles";function getClasses(e){const t=e.classes;if(void 0===t)throw new Error(errorMessageGetClasses);const n=fixedClassesByClasses.get(t);if(void 0===n)throw new Error(errorMessageGetClasses);return n}function incorporateMediaQueries(e){const t={},n={};return Object.keys(e).forEach(r=>(r.startsWith("@media")?n:t)[r]=e[r]),Object.keys(n).forEach(e=>{const r=n[e];Object.keys(r).forEach(n=>{var o;return t[n]={...null!==(o=t[n])&&void 0!==o?o:{},[e]:r[n]}})}),t}const isSSR=(()=>{const e="object"==typeof document&&"function"==typeof(null===document||void 0===document?void 0:document.getElementById),t="undefined"!=typeof jest,n="undefined"!=typeof mocha,r="undefined"!=typeof __vitest_worker__;return!(e||t||n||r)})();function createTss(e){counter=0,nestedSelectorUsageTrackRecord.splice(0,nestedSelectorUsageTrackRecord.length);const{useContext:t,usePlugin:n,cache:r}=e,{useCache:o}=createUseCache({cacheProvidedAtInception:r}),{useCssAndCx:i}=createUseCssAndCx({useCache:o});return{tss:createTss_internal({useContext:t,useCache:o,useCssAndCx:i,usePlugin:null!=n?n:({classes:e,cx:t,css:n})=>({classes:e,cx:t,css:n}),name:void 0,doesUseNestedSelectors:!1})}}let counter=0;const nestedSelectorUsageTrackRecord=[];function createTss_internal(e){const{useContext:t,useCache:n,useCssAndCx:r,usePlugin:o,name:i,doesUseNestedSelectors:a}=e;return{withParams:()=>createTss_internal({...e}),withName:t=>createTss_internal({...e,name:"object"!=typeof t?t:Object.keys(t)[0]}),withNestedSelectors:()=>createTss_internal({...e,doesUseNestedSelectors:!0}),create:e=>{const s="x"+counter++;if(void 0!==i)for(;;){const e=nestedSelectorUsageTrackRecord.find(e=>e.name===i);if(void 0===e)break;nestedSelectorUsageTrackRecord.splice(nestedSelectorUsageTrackRecord.indexOf(e),1)}const l="function"==typeof e?e:()=>e;return function(c){var u,d,p;const{classesOverrides:f,...h}=null!=c?c:{},A=t(),{css:m,cx:g}=r(),y=n(),v=runGetClassesOrUseCache({cache:y,cssObjectByRuleNameOrGetCssObjectByRuleName:e,classesOverridesRef:getDependencyArrayRef(f),paramsAndPluginParamsRef:getDependencyArrayRef(h),idOfUseStyles:s,context:A,getClasses:()=>{const e={},t=l({...c,...A,...a?{classes:"undefined"==typeof Proxy?{}:new Proxy({},{get:(t,n)=>{if("symbol"==typeof n&&assert(!1),isSSR&&void 0===i)throw new Error(["tss-react: In SSR setups, in order to use nested selectors, you must also give a unique name to the useStyle function.",'Solution: Use tss.withName("ComponentName").withNestedSelectors<...>()... to set a name.'].join("\n"));e:{if(void 0===i)break e;let e=nestedSelectorUsageTrackRecord.find(e=>e.name===i&&e.idOfUseStyles===s);void 0===e&&(e={name:i,idOfUseStyles:s,nestedSelectorRuleNames:new Set},nestedSelectorUsageTrackRecord.push(e)),e.nestedSelectorRuleNames.add(n)}e:{if(void 0===i)break e;if(void 0!==nestedSelectorUsageTrackRecord.find(e=>e.name===i&&e.idOfUseStyles!==s&&e.nestedSelectorRuleNames.has(n)))throw new Error([`tss-react: There are in your codebase two different useStyles named "${i}" that`,`both use use the nested selector ${n}.\n`,"This may lead to CSS class name collisions, causing nested selectors to target elements outside of the intended scope.\n","Solution: Ensure each useStyles using nested selectors has a unique name.\n",'Use: tss.withName("UniqueName").withNestedSelectors<...>()...'].join(" "))}return e[n]=`${y.key}-${void 0!==i?i:s}-${n}-ref`}})}:{}});let n=objectFromEntries(objectKeys(t).map(n=>{const r=t[n];return r.label||(r.label=`${void 0!==i?`${i}-`:""}${n}`),[n,`${m(r)}${typeGuard(n,n in e)?` ${e[n]}`:""}`]}));return objectKeys(e).forEach(t=>{t in n||(n[t]=e[t])}),n=mergeClasses(n,f,g),n}}),b=o({classes:v,css:m,cx:g,idOfUseStyles:s,name:i,...A,...h});return{classes:null!==(u=b.classes)&&void 0!==u?u:v,css:null!==(d=b.css)&&void 0!==d?d:m,cx:null!==(p=b.cx)&&void 0!==p?p:g,...A}}}}}const mapCache=new WeakMap;function runGetClassesOrUseCache(e){const{cache:t,cssObjectByRuleNameOrGetCssObjectByRuleName:n,classesOverridesRef:r,paramsAndPluginParamsRef:o,idOfUseStyles:i,context:a,getClasses:s}=e;e:{const e=mapCache.get(t);if(void 0===e)break e;const s=e.get(n);if(void 0===s)break e;const l=s.get(r);if(void 0===l)break e;const c=l.get(o);if(void 0===c)break e;const u=c.find(({context:e})=>{if(e===a)return!0;if(objectKeys(e).length!==objectKeys(a).length)return!1;for(const t in e)if(getDependencyArrayRef(e[t])!==getDependencyArrayRef(a[t]))return!1;return!0});if(void 0!==u){if((null==u?void 0:u.idOfUseStyles)===i)return u.result;c.splice(c.indexOf(u),1)}}const l=s();{mapCache.has(t)||mapCache.set(t,new WeakMap);const e=mapCache.get(t);assert(void 0!==e),e.has(n)||e.set(n,new Map);const s=e.get(n);assert(void 0!==s),s.has(r)||(s.size>200&&s.clear(),s.set(r,new Map));const c=s.get(r);if(assert(void 0!==c),!c.has(o)){{const e="string"==typeof o?257:5;c.size<e||c.clear()}c.set(o,[])}let u=c.get(o);assert(void 0!==u),u.length>5&&(u=[]),u.push({idOfUseStyles:i,context:a,result:l})}return l}function createMakeAndWithStyles(e){return{...createMakeStyles(e),...createWithStyles(e)}}const{tss:tss}=createTss({useContext:()=>({})});tss.create({});const defaultTheme=createTheme$1(),Box$1=createBox({defaultTheme:defaultTheme,defaultClassName:"MuiBox-root",generateClassName:ClassNameGenerator.generate});function r$1(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=r$1(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function clsx(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=r$1(e))&&(r&&(r+=" "),r+=t);return r}function isHostComponent(e){return"string"==typeof e}function appendOwnerState(e,t,n){return void 0===e||isHostComponent(e)?t:_extends({},t,{ownerState:_extends({},t.ownerState,n)})}function extractEventHandlers(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter(n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n)).forEach(t=>{n[t]=e[t]}),n}function resolveComponentProps(e,t){return"function"==typeof e?e(t):e}function omitEventHandlers(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(n=>{t[n]=e[n]}),t}function mergeSlotProps(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=clsx(null==o?void 0:o.className,null==r?void 0:r.className,i,null==n?void 0:n.className),t=_extends({},null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),a=_extends({},n,o,r);return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=extractEventHandlers(_extends({},o,r)),s=omitEventHandlers(r),l=omitEventHandlers(o),c=t(a),u=clsx(null==c?void 0:c.className,null==n?void 0:n.className,i,null==o?void 0:o.className,null==r?void 0:r.className),d=_extends({},null==c?void 0:c.style,null==n?void 0:n.style,null==o?void 0:o.style,null==r?void 0:r.style),p=_extends({},c,n,l,s);return u.length>0&&(p.className=u),Object.keys(d).length>0&&(p.style=d),{props:p,internalRef:c.ref}}const _excluded$1w=["elementType","externalSlotProps","ownerState"];function useSlotProps(e){var t;const{elementType:n,externalSlotProps:r,ownerState:o}=e,i=_objectWithoutPropertiesLoose(e,_excluded$1w),a=resolveComponentProps(r,o),{props:s,internalRef:l}=mergeSlotProps(_extends({},i,{externalSlotProps:a}));return appendOwnerState(n,_extends({},s,{ref:useForkRef(l,null==a?void 0:a.ref,null==(t=e.additionalProps)?void 0:t.ref)}),o)}function stripDiacritics(e){return void 0!==e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function createFilterOptions(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(e,{inputValue:s,getOptionLabel:l})=>{let c=a?s.trim():s;n&&(c=c.toLowerCase()),t&&(c=stripDiacritics(c));const u=c?e.filter(e=>{let r=(i||l)(e);return n&&(r=r.toLowerCase()),t&&(r=stripDiacritics(r)),"start"===o?0===r.indexOf(c):r.indexOf(c)>-1}):e;return"number"==typeof r?u.slice(0,r):u}}function findIndex(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const defaultFilterOptions=createFilterOptions(),pageSize=5,defaultIsActiveElementInListbox=e=>{var t;return null!==e.current&&(null==(t=e.current.parentElement)?void 0:t.contains(document.activeElement))};function useAutocomplete(e){const{unstable_isActiveElementInListbox:t=defaultIsActiveElementInListbox,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=(e.multiple?[]:null),disableClearable:d=!1,disableCloseOnSelect:p=!1,disabled:f,disabledItemsFocusable:h=!1,disableListWrap:A=!1,filterOptions:m=defaultFilterOptions,filterSelectedOptions:g=!1,freeSolo:y=!1,getOptionDisabled:v,getOptionLabel:b=e=>{var t;return null!=(t=e.label)?t:e},groupBy:x,handleHomeEndKeys:w=!e.freeSolo,id:C,includeInputInList:$=!1,inputValue:_,isOptionEqualToValue:S=(e,t)=>e===t,multiple:E=!1,onChange:k,onClose:P,onHighlightChange:B,onInputChange:T,onOpen:I,open:L,openOnFocus:M=!1,options:D,readOnly:N=!1,selectOnFocus:O=!e.freeSolo,value:F}=e,R=useId$2(C);let U=b;U=e=>{const t=b(e);return"string"!=typeof t?String(t):t};const j=reactExports.useRef(!1),H=reactExports.useRef(!0),Q=reactExports.useRef(null),z=reactExports.useRef(null),[V,W]=reactExports.useState(null),[Y,G]=reactExports.useState(-1),K=o?0:-1,q=reactExports.useRef(K),[J,Z]=useControlled({controlled:F,default:u,name:c}),[X,ee]=useControlled({controlled:_,default:"",name:c,state:"inputValue"}),[te,ne]=reactExports.useState(!1),re=reactExports.useCallback((e,t)=>{if(!(E?J.length<t.length:null!==t)&&!s)return;let n;if(E)n="";else if(null==t)n="";else{const e=U(t);n="string"==typeof e?e:""}X!==n&&(ee(n),T&&T(e,n,"reset"))},[U,X,E,T,ee,s,J]),oe=reactExports.useRef();reactExports.useEffect(()=>{const e=J!==oe.current;oe.current=J,te&&!e||y&&!e||re(null,J)},[J,re,te,oe,y]);const[ie,ae]=useControlled({controlled:L,default:!1,name:c,state:"open"}),[se,le]=reactExports.useState(!0),ce=!E&&null!=J&&X===U(J),ue=ie&&!N,de=ue?m(D.filter(e=>!g||!(E?J:[J]).some(t=>null!==t&&S(e,t))),{inputValue:ce&&se?"":X,getOptionLabel:U}):[],pe=ie&&de.length>0&&!N,fe=useEventCallback(e=>{-1===e?Q.current.focus():V.querySelector(`[data-tag-index="${e}"]`).focus()});reactExports.useEffect(()=>{E&&Y>J.length-1&&(G(-1),fe(-1))},[J,E,Y,fe]);const he=useEventCallback(({event:e,index:t,reason:r="auto"})=>{if(q.current=t,-1===t?Q.current.removeAttribute("aria-activedescendant"):Q.current.setAttribute("aria-activedescendant",`${R}-option-${t}`),B&&B(e,-1===t?null:de[t],r),!z.current)return;const o=z.current.querySelector(`[role="option"].${n}-focused`);o&&(o.classList.remove(`${n}-focused`),o.classList.remove(`${n}-focusVisible`));const i=z.current.parentElement.querySelector('[role="listbox"]');if(!i)return;if(-1===t)return void(i.scrollTop=0);const a=z.current.querySelector(`[data-option-index="${t}"]`);if(a&&(a.classList.add(`${n}-focused`),"keyboard"===r&&a.classList.add(`${n}-focusVisible`),i.scrollHeight>i.clientHeight&&"mouse"!==r)){const e=a,t=i.clientHeight+i.scrollTop,n=e.offsetTop+e.offsetHeight;n>t?i.scrollTop=n-i.clientHeight:e.offsetTop-e.offsetHeight*(x?1.3:0)<i.scrollTop&&(i.scrollTop=e.offsetTop-e.offsetHeight*(x?1.3:0))}}),Ae=useEventCallback(({event:e,diff:t,direction:n="next",reason:o="auto"})=>{if(!ue)return;const i=function(e,t){if(!z.current||-1===e)return-1;let n=e;for(;;){if("next"===t&&n===de.length||"previous"===t&&-1===n)return-1;const e=z.current.querySelector(`[data-option-index="${n}"]`),r=!h&&(!e||e.disabled||"true"===e.getAttribute("aria-disabled"));if(!(e&&!e.hasAttribute("tabindex")||r))return n;n+="next"===t?1:-1}}((()=>{const e=de.length-1;if("reset"===t)return K;if("start"===t)return 0;if("end"===t)return e;const n=q.current+t;return n<0?-1===n&&$?-1:A&&-1!==q.current||Math.abs(t)>1?0:e:n>e?n===e+1&&$?-1:A||Math.abs(t)>1?e:0:n})(),n);if(he({index:i,reason:o,event:e}),r&&"reset"!==t)if(-1===i)Q.current.value=X;else{const e=U(de[i]);Q.current.value=e;0===e.toLowerCase().indexOf(X.toLowerCase())&&X.length>0&&Q.current.setSelectionRange(X.length,e.length)}}),me=reactExports.useCallback(()=>{if(!ue)return;const e=E?J[0]:J;if(0!==de.length&&null!=e){if(z.current){if(null!=e){const t=de[q.current];if(E&&t&&-1!==findIndex(J,e=>S(t,e)))return;const n=findIndex(de,t=>S(t,e));return void(-1===n?Ae({diff:"reset"}):he({index:n}))}q.current>=de.length-1?he({index:de.length-1}):he({index:q.current})}}else Ae({diff:"reset"})},[de.length,!E&&J,g,Ae,he,ue,X,E]),ge=useEventCallback(e=>{setRef(z,e),e&&me()});reactExports.useEffect(()=>{me()},[me]);const ye=e=>{ie||(ae(!0),le(!0),I&&I(e))},ve=(e,t)=>{ie&&(ae(!1),P&&P(e,t))},be=(e,t,n,r)=>{if(E){if(J.length===t.length&&J.every((e,n)=>e===t[n]))return}else if(J===t)return;k&&k(e,t,n,r),Z(t)},xe=reactExports.useRef(!1),we=(e,t,n="selectOption",r="options")=>{let o=n,i=t;if(E){i=Array.isArray(J)?J.slice():[];const e=findIndex(i,e=>S(t,e));-1===e?i.push(t):"freeSolo"!==r&&(i.splice(e,1),o="removeOption")}re(e,i),be(e,i,o,{option:t}),p||e&&(e.ctrlKey||e.metaKey)||ve(e,o),(!0===a||"touch"===a&&xe.current||"mouse"===a&&!xe.current)&&Q.current.blur()};const Ce=(e,t)=>{if(!E)return;""===X&&ve(e,"toggleInput");let n=Y;-1===Y?""===X&&"previous"===t&&(n=J.length-1):(n+="next"===t?1:-1,n<0&&(n=0),n===J.length&&(n=-1)),n=function(e,t){if(-1===e)return-1;let n=e;for(;;){if("next"===t&&n===J.length||"previous"===t&&-1===n)return-1;const e=V.querySelector(`[data-tag-index="${n}"]`);if(e&&e.hasAttribute("tabindex")&&!e.disabled&&"true"!==e.getAttribute("aria-disabled"))return n;n+="next"===t?1:-1}}(n,t),G(n),fe(n)},$e=e=>{j.current=!0,ee(""),T&&T(e,"","clear"),be(e,E?[]:null,"clear")},_e=e=>t=>{if(e.onKeyDown&&e.onKeyDown(t),!t.defaultMuiPrevented&&(-1!==Y&&-1===["ArrowLeft","ArrowRight"].indexOf(t.key)&&(G(-1),fe(-1)),229!==t.which))switch(t.key){case"Home":ue&&w&&(t.preventDefault(),Ae({diff:"start",direction:"next",reason:"keyboard",event:t}));break;case"End":ue&&w&&(t.preventDefault(),Ae({diff:"end",direction:"previous",reason:"keyboard",event:t}));break;case"PageUp":t.preventDefault(),Ae({diff:-pageSize,direction:"previous",reason:"keyboard",event:t}),ye(t);break;case"PageDown":t.preventDefault(),Ae({diff:pageSize,direction:"next",reason:"keyboard",event:t}),ye(t);break;case"ArrowDown":t.preventDefault(),Ae({diff:1,direction:"next",reason:"keyboard",event:t}),ye(t);break;case"ArrowUp":t.preventDefault(),Ae({diff:-1,direction:"previous",reason:"keyboard",event:t}),ye(t);break;case"ArrowLeft":Ce(t,"previous");break;case"ArrowRight":Ce(t,"next");break;case"Enter":if(-1!==q.current&&ue){const e=de[q.current],n=!!v&&v(e);if(t.preventDefault(),n)return;we(t,e,"selectOption"),r&&Q.current.setSelectionRange(Q.current.value.length,Q.current.value.length)}else y&&""!==X&&!1===ce&&(E&&t.preventDefault(),we(t,X,"createOption","freeSolo"));break;case"Escape":ue?(t.preventDefault(),t.stopPropagation(),ve(t,"escape")):l&&(""!==X||E&&J.length>0)&&(t.preventDefault(),t.stopPropagation(),$e(t));break;case"Backspace":if(E&&!N&&""===X&&J.length>0){const e=-1===Y?J.length-1:Y,n=J.slice();n.splice(e,1),be(t,n,"removeOption",{option:J[e]})}break;case"Delete":if(E&&!N&&""===X&&J.length>0&&-1!==Y){const e=Y,n=J.slice();n.splice(e,1),be(t,n,"removeOption",{option:J[e]})}}},Se=e=>{ne(!0),M&&!j.current&&ye(e)},Ee=e=>{t(z)?Q.current.focus():(ne(!1),H.current=!0,j.current=!1,i&&-1!==q.current&&ue?we(e,de[q.current],"blur"):i&&y&&""!==X?we(e,X,"blur","freeSolo"):s&&re(e,J),ve(e,"blur"))},ke=e=>{const t=e.target.value;X!==t&&(ee(t),le(!1),T&&T(e,t,"input")),""===t?d||E||be(e,null,"clear"):ye(e)},Pe=e=>{he({event:e,index:Number(e.currentTarget.getAttribute("data-option-index")),reason:"mouse"})},Be=()=>{xe.current=!0},Te=e=>{const t=Number(e.currentTarget.getAttribute("data-option-index"));we(e,de[t],"selectOption"),xe.current=!1},Ie=e=>t=>{const n=J.slice();n.splice(e,1),be(t,n,"removeOption",{option:J[e]})},Le=e=>{ie?ve(e,"toggleInput"):ye(e)},Me=e=>{e.target.getAttribute("id")!==R&&e.preventDefault()},De=()=>{Q.current.focus(),O&&H.current&&Q.current.selectionEnd-Q.current.selectionStart===0&&Q.current.select(),H.current=!1},Ne=e=>{""!==X&&ie||Le(e)};let Oe=y&&X.length>0;Oe=Oe||(E?J.length>0:null!==J);let Fe=de;return x&&(Fe=de.reduce((e,t,n)=>{const r=x(t);return e.length>0&&e[e.length-1].group===r?e[e.length-1].options.push(t):e.push({key:n,index:n,group:r,options:[t]}),e},[])),f&&te&&Ee(),{getRootProps:(e={})=>_extends({"aria-owns":pe?`${R}-listbox`:null},e,{onKeyDown:_e(e),onMouseDown:Me,onClick:De}),getInputLabelProps:()=>({id:`${R}-label`,htmlFor:R}),getInputProps:()=>({id:R,value:X,onBlur:Ee,onFocus:Se,onChange:ke,onMouseDown:Ne,"aria-activedescendant":ue?"":null,"aria-autocomplete":r?"both":"list","aria-controls":pe?`${R}-listbox`:void 0,"aria-expanded":pe,autoComplete:"off",ref:Q,autoCapitalize:"none",spellCheck:"false",role:"combobox"}),getClearProps:()=>({tabIndex:-1,onClick:$e}),getPopupIndicatorProps:()=>({tabIndex:-1,onClick:Le}),getTagProps:({index:e})=>_extends({key:e,"data-tag-index":e,tabIndex:-1},!N&&{onDelete:Ie(e)}),getListboxProps:()=>({role:"listbox",id:`${R}-listbox`,"aria-labelledby":`${R}-label`,ref:ge,onMouseDown:e=>{e.preventDefault()}}),getOptionProps:({index:e,option:t})=>{const n=(E?J:[J]).some(e=>null!=e&&S(t,e)),r=!!v&&v(t);return{key:U(t),tabIndex:-1,role:"option",id:`${R}-option-${e}`,onMouseOver:Pe,onClick:Te,onTouchStart:Be,"data-option-index":e,"aria-disabled":r,"aria-selected":n}},id:R,inputValue:X,value:J,dirty:Oe,popupOpen:ue,focused:te||-1!==Y,anchorEl:V,setAnchorEl:W,focusedTag:Y,groupedOptions:Fe}}function useBadge(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=usePreviousProps({badgeContent:t,max:r});let a=n;!1!==n||0!==t||o||(a=!0);const{badgeContent:s,max:l=r}=a?i:e;return{badgeContent:s,invisible:a,max:l,displayValue:s&&Number(s)>l?`${l}+`:s}}function getBadgeUnstyledUtilityClass(e){return generateUtilityClass("MuiBadge",e)}generateUtilityClasses("MuiBadge",["root","badge","invisible"]);const _excluded$1v=["badgeContent","component","children","invisible","max","slotProps","slots","showZero"],useUtilityClasses$1f=e=>{const{invisible:t}=e;return composeClasses({root:["root"],badge:["badge",t&&"invisible"]},getBadgeUnstyledUtilityClass,void 0)},BadgeUnstyled=reactExports.forwardRef(function(e,t){const{component:n,children:r,max:o=99,slotProps:i={},slots:a={},showZero:s=!1}=e,l=_objectWithoutPropertiesLoose(e,_excluded$1v),{badgeContent:c,max:u,displayValue:d,invisible:p}=useBadge(_extends({},e,{max:o})),f=_extends({},e,{badgeContent:c,invisible:p,max:u,showZero:s}),h=useUtilityClasses$1f(f),A=n||a.root||"span",m=useSlotProps({elementType:A,externalSlotProps:i.root,externalForwardedProps:l,additionalProps:{ref:t},ownerState:f,className:h.root}),g=a.badge||"span",y=useSlotProps({elementType:g,externalSlotProps:i.badge,ownerState:f,className:h.badge});return factory$1(A,_extends({},m,{children:[r,factory$1(g,_extends({},y,{children:d}))]}))});function mapEventPropToEvent(e){return e.substring(2).toLowerCase()}function clickedRootScrollbar(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function ClickAwayListener(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:o,touchEvent:i="onTouchEnd"}=e,a=reactExports.useRef(!1),s=reactExports.useRef(null),l=reactExports.useRef(!1),c=reactExports.useRef(!1);reactExports.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=useForkRef(t.ref,s),d=useEventCallback(e=>{const t=c.current;c.current=!1;const r=ownerDocument(s.current);if(!l.current||!s.current||"clientX"in e&&clickedRootScrollbar(e,r))return;if(a.current)return void(a.current=!1);let i;i=e.composedPath?e.composedPath().indexOf(s.current)>-1:!r.documentElement.contains(e.target)||s.current.contains(e.target),i||!n&&t||o(e)}),p=e=>n=>{c.current=!0;const r=t.props[e];r&&r(n)},f={ref:u};return!1!==i&&(f[i]=p(i)),reactExports.useEffect(()=>{if(!1!==i){const e=mapEventPropToEvent(i),t=ownerDocument(s.current),n=()=>{a.current=!0};return t.addEventListener(e,d),t.addEventListener("touchmove",n),()=>{t.removeEventListener(e,d),t.removeEventListener("touchmove",n)}}},[d,i]),!1!==r&&(f[r]=p(r)),reactExports.useEffect(()=>{if(!1!==r){const e=mapEventPropToEvent(r),t=ownerDocument(s.current);return t.addEventListener(e,d),()=>{t.removeEventListener(e,d)}}},[d,r]),factory$1(reactExports.Fragment,{children:reactExports.cloneElement(t,f)})}const candidatesSelector=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(e){const t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}function isNonTabbableRadio(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function isNodeMatchingSelectorFocusable(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||isNonTabbableRadio(e))}function defaultGetTabbable(e){const t=[],n=[];return Array.from(e.querySelectorAll(candidatesSelector)).forEach((e,r)=>{const o=getTabIndex(e);-1!==o&&isNodeMatchingSelectorFocusable(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))}),n.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function defaultIsEnabled(){return!0}function FocusTrap$1(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=defaultGetTabbable,isEnabled:a=defaultIsEnabled,open:s}=e,l=reactExports.useRef(),c=reactExports.useRef(null),u=reactExports.useRef(null),d=reactExports.useRef(null),p=reactExports.useRef(null),f=reactExports.useRef(!1),h=reactExports.useRef(null),A=useForkRef(t.ref,h),m=reactExports.useRef(null);reactExports.useEffect(()=>{s&&h.current&&(f.current=!n)},[n,s]),reactExports.useEffect(()=>{if(!s||!h.current)return;const e=ownerDocument(h.current);return h.current.contains(e.activeElement)||(h.current.hasAttribute("tabIndex")||h.current.setAttribute("tabIndex",-1),f.current&&h.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),reactExports.useEffect(()=>{if(!s||!h.current)return;const e=ownerDocument(h.current),t=t=>{const{current:n}=h;if(null!==n)if(e.hasFocus()&&!r&&a()&&!l.current){if(!n.contains(e.activeElement)){if(t&&p.current!==t.target||e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let r=[];if(e.activeElement!==c.current&&e.activeElement!==u.current||(r=i(h.current)),r.length>0){var o,s;const e=Boolean((null==(o=m.current)?void 0:o.shiftKey)&&"Tab"===(null==(s=m.current)?void 0:s.key)),t=r[0],n=r[r.length-1];e?n.focus():t.focus()}else n.focus()}}else l.current=!1},n=t=>{m.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===h.current&&t.shiftKey&&(l.current=!0,u.current.focus())};e.addEventListener("focusin",t),e.addEventListener("keydown",n,!0);const o=setInterval(()=>{"BODY"===e.activeElement.tagName&&t()},50);return()=>{clearInterval(o),e.removeEventListener("focusin",t),e.removeEventListener("keydown",n,!0)}},[n,r,o,a,s,i]);const g=e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0};return factory$1(reactExports.Fragment,{children:[factory$1("div",{tabIndex:s?0:-1,onFocus:g,ref:c,"data-testid":"sentinelStart"}),reactExports.cloneElement(t,{ref:A,onFocus:e=>{null===d.current&&(d.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),factory$1("div",{tabIndex:s?0:-1,onFocus:g,ref:u,"data-testid":"sentinelEnd"})]})}var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference$1="reference",variationPlacements=basePlacements.reduce(function(e,t){return e.concat([t+"-"+start,t+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName$1(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow$1(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement$3(e){return e instanceof getWindow$1(e).Element||e instanceof Element}function isHTMLElement$1(e){return e instanceof getWindow$1(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot$1(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow$1(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];isHTMLElement$1(o)&&getNodeName$1(o)&&(Object.assign(o.style,n),Object.keys(r).forEach(function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)}))})}function effect$2(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]="",e},{});isHTMLElement$1(r)&&getNodeName$1(r)&&(Object.assign(r.style,i),Object.keys(o).forEach(function(e){r.removeAttribute(e)}))})}}const applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max$4=Math.max,min$3=Math.min,round$5=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect$1(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&isHTMLElement$1(e)&&(o=e.offsetWidth>0&&round$5(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&round$5(r.height)/e.offsetHeight||1);var a=(isElement$3(e)?getWindow$1(e):window).visualViewport,s=!isLayoutViewport()&&n,l=(r.left+(s&&a?a.offsetLeft:0))/o,c=(r.top+(s&&a?a.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function getLayoutRect(e){var t=getBoundingClientRect$1(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function contains(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&isShadowRoot$1(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function getComputedStyle$3(e){return getWindow$1(e).getComputedStyle(e)}function isTableElement$1(e){return["table","td","th"].indexOf(getNodeName$1(e))>=0}function getDocumentElement$1(e){return((isElement$3(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode$1(e){return"html"===getNodeName$1(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot$1(e)?e.host:null)||getDocumentElement$1(e)}function getTrueOffsetParent$1(e){return isHTMLElement$1(e)&&"fixed"!==getComputedStyle$3(e).position?e.offsetParent:null}function getContainingBlock$1(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement$1(e)&&"fixed"===getComputedStyle$3(e).position)return null;var n=getParentNode$1(e);for(isShadowRoot$1(n)&&(n=n.host);isHTMLElement$1(n)&&["html","body"].indexOf(getNodeName$1(n))<0;){var r=getComputedStyle$3(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}function getOffsetParent$1(e){for(var t=getWindow$1(e),n=getTrueOffsetParent$1(e);n&&isTableElement$1(n)&&"static"===getComputedStyle$3(n).position;)n=getTrueOffsetParent$1(n);return n&&("html"===getNodeName$1(n)||"body"===getNodeName$1(n)&&"static"===getComputedStyle$3(n).position)?t:n||getContainingBlock$1(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,n){return max$4(e,min$3(t,n))}function withinMaxClamp(e,t,n){var r=within(e,t,n);return r>n?n:r}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow$4(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=getBasePlacement(n.placement),l=getMainAxisFromPlacement(s),c=[left,right].indexOf(s)>=0?"height":"width";if(i&&a){var u=toPaddingObject(o.padding,n),d=getLayoutRect(i),p="y"===l?top:left,f="y"===l?bottom:right,h=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],A=a[l]-n.rects.reference[l],m=getOffsetParent$1(i),g=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,y=h/2-A/2,v=u[p],b=g-d[c]-u[f],x=g/2-d[c]/2+y,w=within(v,x,b),C=l;n.modifiersData[r]=((t={})[C]=w,t.centerOffset=w-x,t)}}function effect$1(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&contains(t.elements.popper,r)&&(t.elements.arrow=r)}const arrow$5={name:"arrow",enabled:!0,phase:"main",fn:arrow$4,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:round$5(n*o)/o||0,y:round$5(r*o)/o||0}}function mapToStyles(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=a.x,f=void 0===p?0:p,h=a.y,A=void 0===h?0:h,m="function"==typeof u?u({x:f,y:A}):{x:f,y:A};f=m.x,A=m.y;var g=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),v=left,b=top,x=window;if(c){var w=getOffsetParent$1(n),C="clientHeight",$="clientWidth";if(w===getWindow$1(n)&&"static"!==getComputedStyle$3(w=getDocumentElement$1(n)).position&&"absolute"===s&&(C="scrollHeight",$="scrollWidth"),o===top||(o===left||o===right)&&i===end)b=bottom,A-=(d&&w===x&&x.visualViewport?x.visualViewport.height:w[C])-r.height,A*=l?1:-1;if(o===left||(o===top||o===bottom)&&i===end)v=right,f-=(d&&w===x&&x.visualViewport?x.visualViewport.width:w[$])-r.width,f*=l?1:-1}var _,S=Object.assign({position:s},c&&unsetSides),E=!0===u?roundOffsetsByDPR({x:f,y:A},getWindow$1(n)):{x:f,y:A};return f=E.x,A=E.y,l?Object.assign({},S,((_={})[b]=y?"0":"",_[v]=g?"0":"",_.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+A+"px)":"translate3d("+f+"px, "+A+"px, 0)",_)):Object.assign({},S,((t={})[b]=y?A+"px":"",t[v]=g?f+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,s=n.roundOffsets,l=void 0===s||s,c={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}};var passive={passive:!0};function effect(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,a=r.resize,s=void 0===a||a,l=getWindow$1(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(e){e.addEventListener("scroll",n.update,passive)}),s&&l.addEventListener("resize",n.update,passive),function(){i&&c.forEach(function(e){e.removeEventListener("scroll",n.update,passive)}),s&&l.removeEventListener("resize",n.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}};var hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement$1(e){return e.replace(/left|right|bottom|top/g,function(e){return hash$1[e]})}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,function(e){return hash[e]})}function getWindowScroll(e){var t=getWindow$1(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX$1(e){return getBoundingClientRect$1(getDocumentElement$1(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect$1(e,t){var n=getWindow$1(e),r=getDocumentElement$1(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=isLayoutViewport();(c||!c&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+getWindowScrollBarX$1(e),y:l}}function getDocumentRect$1(e){var t,n=getDocumentElement$1(e),r=getWindowScroll(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=max$4(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=max$4(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+getWindowScrollBarX$1(e),l=-r.scrollTop;return"rtl"===getComputedStyle$3(o||n).direction&&(s+=max$4(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function isScrollParent(e){var t=getComputedStyle$3(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName$1(e))>=0?e.ownerDocument.body:isHTMLElement$1(e)&&isScrollParent(e)?e:getScrollParent(getParentNode$1(e))}function listScrollParents(e,t){var n;void 0===t&&(t=[]);var r=getScrollParent(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=getWindow$1(r),a=o?[i].concat(i.visualViewport||[],isScrollParent(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(listScrollParents(getParentNode$1(a)))}function rectToClientRect$1(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect$1(e,t){var n=getBoundingClientRect$1(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function getClientRectFromMixedType(e,t,n){return t===viewport?rectToClientRect$1(getViewportRect$1(e,n)):isElement$3(t)?getInnerBoundingClientRect$1(t,n):rectToClientRect$1(getDocumentRect$1(getDocumentElement$1(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode$1(e)),n=["absolute","fixed"].indexOf(getComputedStyle$3(e).position)>=0&&isHTMLElement$1(e)?getOffsetParent$1(e):e;return isElement$3(n)?t.filter(function(e){return isElement$3(e)&&contains(e,n)&&"body"!==getNodeName$1(e)}):[]}function getClippingRect$1(e,t,n,r){var o="clippingParents"===t?getClippingParents(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(t,n){var o=getClientRectFromMixedType(e,n,r);return t.top=max$4(o.top,t.top),t.right=min$3(o.right,t.right),t.bottom=min$3(o.bottom,t.bottom),t.left=max$4(o.left,t.left),t},getClientRectFromMixedType(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function computeOffsets(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?getBasePlacement(o):null,a=o?getVariation(o):null,s=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case top:t={x:s,y:n.y-r.height};break;case bottom:t={x:s,y:n.y+n.height};break;case right:t={x:n.x+n.width,y:l};break;case left:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?getMainAxisFromPlacement(i):null;if(null!=c){var u="y"===c?"height":"width";switch(a){case start:t[c]=t[c]-(n[u]/2-r[u]/2);break;case end:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function detectOverflow$1(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,s=n.boundary,l=void 0===s?clippingParents:s,c=n.rootBoundary,u=void 0===c?viewport:c,d=n.elementContext,p=void 0===d?popper:d,f=n.altBoundary,h=void 0!==f&&f,A=n.padding,m=void 0===A?0:A,g=mergePaddingObject("number"!=typeof m?m:expandToHashMap(m,basePlacements)),y=p===popper?reference$1:popper,v=e.rects.popper,b=e.elements[h?y:p],x=getClippingRect$1(isElement$3(b)?b:b.contextElement||getDocumentElement$1(e.elements.popper),l,u,a),w=getBoundingClientRect$1(e.elements.reference),C=computeOffsets({reference:w,element:v,placement:o}),$=rectToClientRect$1(Object.assign({},v,C)),_=p===popper?$:w,S={top:x.top-_.top+g.top,bottom:_.bottom-x.bottom+g.bottom,left:x.left-_.left+g.left,right:_.right-x.right+g.right},E=e.modifiersData.offset;if(p===popper&&E){var k=E[o];Object.keys(S).forEach(function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,n=[top,bottom].indexOf(e)>=0?"y":"x";S[e]+=k[n]*t})}return S}function computeAutoPlacement(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?placements:l,u=getVariation(r),d=u?s?variationPlacements:variationPlacements.filter(function(e){return getVariation(e)===u}):basePlacements,p=d.filter(function(e){return c.indexOf(e)>=0});0===p.length&&(p=d);var f=p.reduce(function(t,n){return t[n]=detectOverflow$1(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[getBasePlacement(n)],t},{});return Object.keys(f).sort(function(e,t){return f[e]-f[t]})}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement$1(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip$3(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0===a||a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,A=n.allowedAutoPlacements,m=t.options.placement,g=getBasePlacement(m),y=l||(g===m||!h?[getOppositePlacement$1(m)]:getExpandedFallbackPlacements(m)),v=[m].concat(y).reduce(function(e,n){return e.concat(getBasePlacement(n)===auto?computeAutoPlacement(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:A}):n)},[]),b=t.rects.reference,x=t.rects.popper,w=new Map,C=!0,$=v[0],_=0;_<v.length;_++){var S=v[_],E=getBasePlacement(S),k=getVariation(S)===start,P=[top,bottom].indexOf(E)>=0,B=P?"width":"height",T=detectOverflow$1(t,{placement:S,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),I=P?k?right:left:k?bottom:top;b[B]>x[B]&&(I=getOppositePlacement$1(I));var L=getOppositePlacement$1(I),M=[];if(i&&M.push(T[E]<=0),s&&M.push(T[I]<=0,T[L]<=0),M.every(function(e){return e})){$=S,C=!1;break}w.set(S,M)}if(C)for(var D=function(e){var t=v.find(function(t){var n=w.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return $=t,"break"},N=h?3:1;N>0;N--){if("break"===D(N))break}t.placement!==$&&(t.modifiersData[r]._skip=!0,t.placement=$,t.reset=!0)}}const flip$4={name:"flip",enabled:!0,phase:"main",fn:flip$3,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some(function(t){return e[t]>=0})}function hide(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=detectOverflow$1(t,{elementContext:"reference"}),s=detectOverflow$1(t,{altBoundary:!0}),l=getSideOffsets(a,r),c=getSideOffsets(s,o,i),u=isAnySideFullyClipped(l),d=isAnySideFullyClipped(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,n){var r=getBasePlacement(e),o=[left,top].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[left,right].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function offset$3(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=placements.reduce(function(e,n){return e[n]=distanceAndSkiddingToXY(n,t.rects,i),e},{}),s=a[t.placement],l=s.x,c=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const offset$4={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$3};function popperOffsets(e){var t=e.state,n=e.name;t.modifiersData[n]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,s=void 0!==a&&a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,A=void 0===h?0:h,m=detectOverflow$1(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=getBasePlacement(t.placement),y=getVariation(t.placement),v=!y,b=getMainAxisFromPlacement(g),x=getAltAxis(b),w=t.modifiersData.popperOffsets,C=t.rects.reference,$=t.rects.popper,_="function"==typeof A?A(Object.assign({},t.rects,{placement:t.placement})):A,S="number"==typeof _?{mainAxis:_,altAxis:_}:Object.assign({mainAxis:0,altAxis:0},_),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,k={x:0,y:0};if(w){if(i){var P,B="y"===b?top:left,T="y"===b?bottom:right,I="y"===b?"height":"width",L=w[b],M=L+m[B],D=L-m[T],N=f?-$[I]/2:0,O=y===start?C[I]:$[I],F=y===start?-$[I]:-C[I],R=t.elements.arrow,U=f&&R?getLayoutRect(R):{width:0,height:0},j=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),H=j[B],Q=j[T],z=within(0,C[I],U[I]),V=v?C[I]/2-N-z-H-S.mainAxis:O-z-H-S.mainAxis,W=v?-C[I]/2+N+z+Q+S.mainAxis:F+z+Q+S.mainAxis,Y=t.elements.arrow&&getOffsetParent$1(t.elements.arrow),G=Y?"y"===b?Y.clientTop||0:Y.clientLeft||0:0,K=null!=(P=null==E?void 0:E[b])?P:0,q=L+W-K,J=within(f?min$3(M,L+V-K-G):M,L,f?max$4(D,q):D);w[b]=J,k[b]=J-L}if(s){var Z,X="x"===b?top:left,ee="x"===b?bottom:right,te=w[x],ne="y"===x?"height":"width",re=te+m[X],oe=te-m[ee],ie=-1!==[top,left].indexOf(g),ae=null!=(Z=null==E?void 0:E[x])?Z:0,se=ie?re:te-C[ne]-$[ne]-ae+S.altAxis,le=ie?te+C[ne]+$[ne]-ae-S.altAxis:oe,ce=f&&ie?withinMaxClamp(se,te,le):within(f?se:re,te,f?le:oe);w[x]=ce,k[x]=ce-te}t.modifiersData[r]=k}}const preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll$1(e){return e!==getWindow$1(e)&&isHTMLElement$1(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),n=round$5(t.width)/e.offsetWidth||1,r=round$5(t.height)/e.offsetHeight||1;return 1!==n||1!==r}function getCompositeRect(e,t,n){void 0===n&&(n=!1);var r=isHTMLElement$1(t),o=isHTMLElement$1(t)&&isElementScaled(t),i=getDocumentElement$1(t),a=getBoundingClientRect$1(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==getNodeName$1(t)||isScrollParent(i))&&(s=getNodeScroll$1(t)),isHTMLElement$1(t)?((l=getBoundingClientRect$1(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=getWindowScrollBarX$1(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function order(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}}),r.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){n.has(e.name)||o(e)}),r}function orderModifiers(e){var t=order(e);return modifierPhases.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function debounce$1(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function mergeByName(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var DEFAULT_OPTIONS$1={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function popperGenerator(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?DEFAULT_OPTIONS$1:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS$1,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},a=[],s=!1,l={state:o,setOptions:function(n){var s="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,s),o.scrollParents={reference:isElement$3(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var u=orderModifiers(mergeByName([].concat(r,o.options.modifiers)));return o.orderedModifiers=u.filter(function(e){return e.enabled}),o.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var s=i({state:o,name:t,instance:l,options:r}),c=function(){};a.push(s||c)}}),l.update()},forceUpdate:function(){if(!s){var e=o.elements,t=e.reference,n=e.popper;if(areValidElements(t,n)){o.rects={reference:getCompositeRect(t,getOffsetParent$1(n),"fixed"===o.options.strategy),popper:getLayoutRect(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach(function(e){return o.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<o.orderedModifiers.length;r++)if(!0!==o.reset){var i=o.orderedModifiers[r],a=i.fn,c=i.options,u=void 0===c?{}:c,d=i.name;"function"==typeof a&&(o=a({state:o,options:u,name:d,instance:l})||o)}else o.reset=!1,r=-1}}},update:debounce$1(function(){return new Promise(function(e){l.forceUpdate(),e(o)})}),destroy:function(){c(),s=!0}};if(!areValidElements(e,t))return l;function c(){a.forEach(function(e){return e()}),a=[]}return l.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)}),l}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$4,flip$4,preventOverflow$1,arrow$5,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers}),reactDom={exports:{}},reactDom_production_min={},scheduler={exports:{}},scheduler_production_min={};
3
3
  /**
4
4
  * @license React
@@ -331,7 +331,7 @@ function(e){var t=function(e){var t,n,r,o,i,a,s,l,c,u;for(n=[],r=0,o=(e+=t="\0\0
331
331
  * Licensed under the MIT License.
332
332
  * http://opensource.org/licenses/mit-license
333
333
  */
334
- function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,o=0,i=function(e){var t=e.length,n=[],r=String.fromCharCode;for(o=0;o<t;o+=1)n.push(r(255&e.charCodeAt(o)));return n.join("")};if(r.open("GET",e,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){200===r.status?n(i(this.responseText)):n(void 0)}),r.send(null),t&&200===r.status)return i(r.responseText)}(e,t,n)}catch(i2){}return r}(e,t,n)},e.loadImageFile=e.loadFile}(E$1.API),function(e){function t(){return(i$2.html2canvas?Promise.resolve(i$2.html2canvas):__vitePreload(()=>import("./html2canvas-BXjd5VwI.js").then(e=>e.h),[])).catch(function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))}).then(function(e){return e.default?e.default:e})}function n(){return(i$2.DOMPurify?Promise.resolve(i$2.DOMPurify):__vitePreload(()=>import("./purify.es-DpMHVkxQ.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load dompurify: "+e))}).then(function(e){return e.default?e.default:e})}var r=function(e){var t=_typeof(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},o=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},i=function e(t,n){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),o=t.firstChild;o;o=o.nextSibling)!0!==n&&1===o.nodeType&&"SCRIPT"===o.nodeName||r.appendChild(e(o,n));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},a=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(e,t){return e.__proto__=t||a.prototype,e},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(e,t){return this.then(function(){switch(t=t||function(e){switch(r(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(n).then(function(t){return this.set({src:o("div",{innerHTML:e,dompurify:t})})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}})},a.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},t=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,o=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete o.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var i=0;i<n.length;++i){var a=n[i],s=a.src.find(function(e){return"truetype"===e.format});s&&t.addFont(s.url,a.ref.name,a.ref.style)}return o.windowHeight=o.windowHeight||0,o.windowHeight=0==o.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):o.windowHeight,t.context2d.save(!0),e(this.prop.container,o)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(e,t,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},a.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},a.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+e+'" is not supported.'}})},a.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(e){if("object"!==r(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in a.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},a.prototype.get=function(e,t){return this.then(function(){var n=e in a.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},a.prototype.setMargin=function(e){return this.then(function(){switch(r(e)){case"number":e=[e,e,e,e];case"array":if(2===e.length&&(e=[e[0],e[1],e[0],e[1]]),4===e.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e}).then(this.setPageSize)},a.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e=e||E$1.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},a.prototype.setProgress=function(e,t,n,r){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},a.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},a.prototype.thenCore=function(e,t,n){n=n||Promise.prototype.then;var r=this;e&&(e=e.bind(r)),t&&(t=t.bind(r));var o=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?r:a.convert(Object.assign({},r),Promise.prototype),i=n.call(o,e,t);return a.convert(i,r.__proto__)},a.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},a.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},a.prototype.catch=function(e){e&&(e=e.bind(this));var t=Promise.prototype.catch.call(this,e);return a.convert(t,this)},a.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},a.prototype.error=function(e){return this.then(function(){throw new Error(e)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,E$1.getPageSize=function(e,t,n){if("object"===_typeof(e)){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t=t||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var o,i=(""+n).toLowerCase(),a={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":o=1;break;case"mm":o=72/25.4;break;case"cm":o=72/2.54;break;case"in":o=72;break;case"px":o=.75;break;case"pc":case"em":o=12;break;case"ex":o=6;break;default:throw"Invalid unit: "+t}var s,l=0,c=0;if(a.hasOwnProperty(i))l=a[i][1]/o,c=a[i][0]/o;else try{l=n[1],c=n[0]}catch(u){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",c>l&&(s=c,c=l,l=s);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",l>c&&(s=c,c=l,l=s)}return{width:c,height:l,unit:t,k:o,orientation:e}},e.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(Ct$1):null;var n=new a(t);return t.worker?n:n.from(e).doCallback()}}(E$1.API),E$1.API.addJS=function(e){return Ut$1=e,this.internal.events.subscribe("postPutResources",function(){Tt$1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Tt$1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt$1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ut$1+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==Tt$1&&void 0!==zt$1&&this.internal.out("/Names <</JavaScript "+Tt$1+" 0 R>>")}),this},
334
+ function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,o=0,i=function(e){var t=e.length,n=[],r=String.fromCharCode;for(o=0;o<t;o+=1)n.push(r(255&e.charCodeAt(o)));return n.join("")};if(r.open("GET",e,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){200===r.status?n(i(this.responseText)):n(void 0)}),r.send(null),t&&200===r.status)return i(r.responseText)}(e,t,n)}catch(i2){}return r}(e,t,n)},e.loadImageFile=e.loadFile}(E$1.API),function(e){function t(){return(i$2.html2canvas?Promise.resolve(i$2.html2canvas):__vitePreload(()=>import("./html2canvas-ZRtDT2Xj.js").then(e=>e.h),[])).catch(function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))}).then(function(e){return e.default?e.default:e})}function n(){return(i$2.DOMPurify?Promise.resolve(i$2.DOMPurify):__vitePreload(()=>import("./purify.es-DpMHVkxQ.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load dompurify: "+e))}).then(function(e){return e.default?e.default:e})}var r=function(e){var t=_typeof(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},o=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},i=function e(t,n){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),o=t.firstChild;o;o=o.nextSibling)!0!==n&&1===o.nodeType&&"SCRIPT"===o.nodeName||r.appendChild(e(o,n));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},a=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(e,t){return e.__proto__=t||a.prototype,e},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(e,t){return this.then(function(){switch(t=t||function(e){switch(r(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(n).then(function(t){return this.set({src:o("div",{innerHTML:e,dompurify:t})})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}})},a.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},t=i(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(o("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,o=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete o.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var i=0;i<n.length;++i){var a=n[i],s=a.src.find(function(e){return"truetype"===e.format});s&&t.addFont(s.url,a.ref.name,a.ref.style)}return o.windowHeight=o.windowHeight||0,o.windowHeight=0==o.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):o.windowHeight,t.context2d.save(!0),e(this.prop.container,o)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(e,t,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},a.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},a.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+e+'" is not supported.'}})},a.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(e){if("object"!==r(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in a.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},a.prototype.get=function(e,t){return this.then(function(){var n=e in a.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},a.prototype.setMargin=function(e){return this.then(function(){switch(r(e)){case"number":e=[e,e,e,e];case"array":if(2===e.length&&(e=[e[0],e[1],e[0],e[1]]),4===e.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e}).then(this.setPageSize)},a.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e=e||E$1.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},a.prototype.setProgress=function(e,t,n,r){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},a.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},a.prototype.thenCore=function(e,t,n){n=n||Promise.prototype.then;var r=this;e&&(e=e.bind(r)),t&&(t=t.bind(r));var o=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?r:a.convert(Object.assign({},r),Promise.prototype),i=n.call(o,e,t);return a.convert(i,r.__proto__)},a.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},a.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},a.prototype.catch=function(e){e&&(e=e.bind(this));var t=Promise.prototype.catch.call(this,e);return a.convert(t,this)},a.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},a.prototype.error=function(e){return this.then(function(){throw new Error(e)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,E$1.getPageSize=function(e,t,n){if("object"===_typeof(e)){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t=t||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var o,i=(""+n).toLowerCase(),a={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":o=1;break;case"mm":o=72/25.4;break;case"cm":o=72/2.54;break;case"in":o=72;break;case"px":o=.75;break;case"pc":case"em":o=12;break;case"ex":o=6;break;default:throw"Invalid unit: "+t}var s,l=0,c=0;if(a.hasOwnProperty(i))l=a[i][1]/o,c=a[i][0]/o;else try{l=n[1],c=n[0]}catch(u){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",c>l&&(s=c,c=l,l=s);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",l>c&&(s=c,c=l,l=s)}return{width:c,height:l,unit:t,k:o,orientation:e}},e.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(Ct$1):null;var n=new a(t);return t.worker?n:n.from(e).doCallback()}}(E$1.API),E$1.API.addJS=function(e){return Ut$1=e,this.internal.events.subscribe("postPutResources",function(){Tt$1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Tt$1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt$1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ut$1+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==Tt$1&&void 0!==zt$1&&this.internal.out("/Names <</JavaScript "+Tt$1+" 0 R>>")}),this},
335
335
  /**
336
336
  * @license
337
337
  * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv
@@ -368,7 +368,7 @@ function(e){e.processWEBP=function(t,n,r,o){var i=new le$1(t),a=i.width,s=i.heig
368
368
  * Licensed under the MIT License.
369
369
  * http://opensource.org/licenses/mit-license
370
370
  */
371
- function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push(["addFont",function(n){var r,o,i=void 0,a=n.font,s=n.instance;if(!a.isStandardFont){if(void 0===s)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if("string"!=typeof(i=!1===s.existsFileInVFS(a.postScriptName)?s.loadFile(a.postScriptName):s.getFileFromVFS(a.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");r=a,o=/^\x00\x01\x00\x00/.test(o=i)?t(o):t(f$2(o)),r.metadata=e.API.TTFFont.open(o),r.metadata.Unicode=r.metadata.Unicode||{encoding:{},kerning:{},widths:[]},r.metadata.glyIdsUsed=[0]}}])}(E$1),E$1.API.addSvgAsImage=function(e,t,n,r,o,i,a,s){if(isNaN(t)||isNaN(n))throw o$2.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(o))throw o$2.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=o;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(i$2.canvg?Promise.resolve(i$2.canvg):__vitePreload(()=>import("./index.es-CeK1bA6Z.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(c,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(e){return e.render(u)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),t,n,r,o,a,s)})},E$1.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var o=0;o<this.internal.pages[r].length;o++)this.internal.pages[r][o]=this.internal.pages[r][o].replace(t,n);return this},E$1.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,o,i,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(a),l=[],c=0,u=0,d=0;function p(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var f=s.length;for(d=0;d<f;d+=1)n[s[d]].value=n[s[d]].defaultValue,n[s[d]].explicitSet=!1}if("object"===_typeof(e))for(o in e)if(i=e[o],p(s,o)&&void 0!==i){if("boolean"===n[o].type&&"boolean"==typeof i)n[o].value=i;else if("name"===n[o].type&&p(n[o].valueSet,i))n[o].value=i;else if("integer"===n[o].type&&Number.isInteger(i))n[o].value=i;else if("array"===n[o].type){for(c=0;c<i.length;c+=1)if(r=!0,1===i[c].length&&"number"==typeof i[c][0])l.push(String(i[c]-1));else if(i[c].length>1){for(u=0;u<i[c].length;u+=1)"number"!=typeof i[c][u]&&(r=!1);!0===r&&l.push([i[c][0]-1,i[c][1]-1].join(" "))}n[o].value="["+l.join(" ")+"]"}else n[o].value=n[o].defaultValue;n[o].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&("name"===n[e].type?t.push("/"+e+" /"+n[e].value):t.push("/"+e+" "+n[e].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
371
+ function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push(["addFont",function(n){var r,o,i=void 0,a=n.font,s=n.instance;if(!a.isStandardFont){if(void 0===s)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if("string"!=typeof(i=!1===s.existsFileInVFS(a.postScriptName)?s.loadFile(a.postScriptName):s.getFileFromVFS(a.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");r=a,o=/^\x00\x01\x00\x00/.test(o=i)?t(o):t(f$2(o)),r.metadata=e.API.TTFFont.open(o),r.metadata.Unicode=r.metadata.Unicode||{encoding:{},kerning:{},widths:[]},r.metadata.glyIdsUsed=[0]}}])}(E$1),E$1.API.addSvgAsImage=function(e,t,n,r,o,i,a,s){if(isNaN(t)||isNaN(n))throw o$2.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(o))throw o$2.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=o;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(i$2.canvg?Promise.resolve(i$2.canvg):__vitePreload(()=>import("./index.es-C3fgp50D.js"),[])).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(c,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(e){return e.render(u)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),t,n,r,o,a,s)})},E$1.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var o=0;o<this.internal.pages[r].length;o++)this.internal.pages[r][o]=this.internal.pages[r][o].replace(t,n);return this},E$1.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,o,i,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(a),l=[],c=0,u=0,d=0;function p(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var f=s.length;for(d=0;d<f;d+=1)n[s[d]].value=n[s[d]].defaultValue,n[s[d]].explicitSet=!1}if("object"===_typeof(e))for(o in e)if(i=e[o],p(s,o)&&void 0!==i){if("boolean"===n[o].type&&"boolean"==typeof i)n[o].value=i;else if("name"===n[o].type&&p(n[o].valueSet,i))n[o].value=i;else if("integer"===n[o].type&&Number.isInteger(i))n[o].value=i;else if("array"===n[o].type){for(c=0;c<i.length;c+=1)if(r=!0,1===i[c].length&&"number"==typeof i[c][0])l.push(String(i[c]-1));else if(i[c].length>1){for(u=0;u<i[c].length;u+=1)"number"!=typeof i[c][u]&&(r=!1);!0===r&&l.push([i[c][0]-1,i[c][1]-1].join(" "))}n[o].value="["+l.join(" ")+"]"}else n[o].value=n[o].defaultValue;n[o].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&("name"===n[e].type?t.push("/"+e+" /"+n[e].value):t.push("/"+e+" "+n[e].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},
372
372
  /** ====================================================================
373
373
  * @license
374
374
  * jsPDF XMP metadata plugin
@@ -1536,7 +1536,7 @@ o.r(i);var e=o(
1536
1536
  /*! ./plugin/pagebreaks.js */
1537
1537
  "./src/plugin/pagebreaks.js"),o(
1538
1538
  /*! ./plugin/hyperlinks.js */
1539
- "./src/plugin/hyperlinks.js");var t=function e(t,n){var r=new e.Worker(n);return t?r.from(t).save():r};t.Worker=e.default,i.default=t}(),i=i.default}()},html2pdf$1.exports=factory2(require$$0$2,requireHtml2canvas());var html2pdfExports=html2pdf$1.exports;const html2pdf=getDefaultExportFromCjs$1(html2pdfExports),getError=()=>new Error("Node APIs are not available in browser context."),throwForSync=()=>{throw getError()},fs={access:(e,t)=>t(getError()),accessSync:throwForSync,readFile:(e,t,n)=>n(getError()),readFileSync:throwForSync},os={};var helpers$2={},shared={},flatTokensSymbol$1=shared.flatTokensSymbol=Symbol("flat-tokens"),htmlFlowSymbol$1=shared.htmlFlowSymbol=Symbol("html-flow"),newLineRe$1=shared.newLineRe=/\r\n?|\n/g;shared.nextLinesRe=/[\r\n][\s\S]*$/;const{flatTokensSymbol:flatTokensSymbol,htmlFlowSymbol:htmlFlowSymbol}=shared;function inHtmlFlow(e){return Boolean(e[htmlFlowSymbol])}function isHtmlFlowComment(e){const{text:t,type:n}=e;if("htmlFlow"===n&&t.startsWith("\x3c!--")&&t.endsWith("--\x3e")){const e=t.slice(4,-3);return!e.startsWith(">")&&!e.startsWith("->")&&!e.endsWith("-")}return!1}function addRangeToSet(e,t,n){for(let r=t;r<=n;r++)e.add(r)}function filterByPredicate(e,t,n){const r=[],o=[{array:e,index:0}];for(;o.length>0;){const e=o[o.length-1],{array:i,index:a}=e;if(a<i.length){const a=i[e.index++];t(a)&&r.push(a);const{children:s}=a;if(s.length>0){const e=n?n(a):s;o.push({array:e,index:0})}}else o.pop()}return r}function filterByTypes(e,t,n){const r=e=>t.includes(e.type)&&(n||!inHtmlFlow(e)),o=e[flatTokensSymbol];return o?o.filter(r):filterByPredicate(e,r)}function getBlockQuotePrefixText(e,t,n=1){return filterByTypes(e,["blockQuotePrefix","linePrefix"]).filter(e=>e.startLine===t).map(e=>e.text).join("").trimEnd().concat("\n").repeat(n)}function getDescendantsByType(e,t){let n=Array.isArray(e)?e:[e];for(const r of t){const e=e=>Array.isArray(r)?r.includes(e.type):r===e.type;n=n.flatMap(t=>t.children.filter(e))}return n}function getHeadingLevel(e){let t=1;const n=e.children.find(e=>["atxHeadingSequence","setextHeadingLine"].includes(e.type)),{text:r}=n;return"#"===r[0]?t=Math.min(r.length,6):"-"===r[0]&&(t=2),t}function getHeadingStyle(e){if("setextHeading"===e.type)return"setext";return 1===e.children.filter(e=>"atxHeadingSequence"===e.type).length?"atx":"atx_closed"}function getHeadingText(e){return getDescendantsByType(e,[["atxHeadingText","setextHeadingText"]]).flatMap(e=>e.children.filter(e=>"htmlText"!==e.type)).map(e=>e.text).join("").replace(/[\r\n]+/g," ")||""}function getHtmlTagInfo(e){const t=/^<([^!>][^/\s>]*)/;if("htmlText"===e.type){const n=t.exec(e.text);if(n){const e=n[1],t=e.startsWith("/");return{close:t,name:t?e.slice(1):e}}}return null}function getParentOfType(e,t){let n=e;for(;(n=n.parent)&&!t.includes(n.type););return n}const docfxTabSyntaxRe=/^#tab\//;function isDocfxTab(e){if("atxHeading"===(null==e?void 0:e.type)){const t=getDescendantsByType(e,["atxHeadingText"]);if(1===t.length&&1===t[0].children.length&&"link"===t[0].children[0].type){const e=filterByTypes(t[0].children[0].children,["resourceDestinationString"]);return 1===e.length&&docfxTabSyntaxRe.test(e[0].text)}}return!1}const nonContentTokens=new Set(["blockQuoteMarker","blockQuotePrefix","blockQuotePrefixWhitespace","lineEnding","lineEndingBlank","linePrefix","listItemIndent","undefinedReference","undefinedReferenceCollapsed","undefinedReferenceFull","undefinedReferenceShortcut"]);var micromarkHelpers={addRangeToSet:addRangeToSet,filterByPredicate:filterByPredicate,filterByTypes:filterByTypes,getBlockQuotePrefixText:getBlockQuotePrefixText,getDescendantsByType:getDescendantsByType,getHeadingLevel:getHeadingLevel,getHeadingStyle:getHeadingStyle,getHeadingText:getHeadingText,getHtmlTagInfo:getHtmlTagInfo,getParentOfType:getParentOfType,inHtmlFlow:inHtmlFlow,isDocfxTab:isDocfxTab,isHtmlFlowComment:isHtmlFlowComment,nonContentTokens:nonContentTokens};const micromark=micromarkHelpers,{newLineRe:newLineRe,nextLinesRe:nextLinesRe}=shared;var newLineRe_1=helpers$2.newLineRe=newLineRe,nextLinesRe_1=helpers$2.nextLinesRe=nextLinesRe,frontMatterRe=helpers$2.frontMatterRe=/((^---[^\S\r\n\u2028\u2029]*$[\s\S]+?^---\s*)|(^\+\+\+[^\S\r\n\u2028\u2029]*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{[^\S\r\n\u2028\u2029]*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m;const inlineCommentStartRe=/(<!--\s*markdownlint-(disable|enable|capture|restore|disable-file|enable-file|disable-line|disable-next-line|configure-file))(?:\s|-->)/gi;var inlineCommentStartRe_1=helpers$2.inlineCommentStartRe=inlineCommentStartRe,endOfLineHtmlEntityRe=helpers$2.endOfLineHtmlEntityRe=/&(?:#\d+|#[xX][\da-fA-F]+|[a-zA-Z]{2,31}|blk\d{2}|emsp1[34]|frac\d{2}|sup\d|there4);$/,endOfLineGemojiCodeRe=helpers$2.endOfLineGemojiCodeRe=/:(?:[abmovx]|[-+]1|100|1234|(?:1st|2nd|3rd)_place_medal|8ball|clock\d{1,4}|e-mail|non-potable_water|o2|t-rex|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7981|u7a7a|[a-z]{2,15}2?|[a-z]{1,14}(?:_[a-z\d]{1,16})+):$/;const allPunctuation=".,;:!?。,;:!?";var allPunctuation_1=helpers$2.allPunctuation=allPunctuation,allPunctuationNoQuestion=helpers$2.allPunctuationNoQuestion=allPunctuation.replace(/[??]/gu,"");function isNumber$2(e){return"number"==typeof e}var isNumber_1=helpers$2.isNumber=isNumber$2;function isString$3(e){return"string"==typeof e}var isString_1=helpers$2.isString=isString$3;function isEmptyString(e){return 0===e.length}var isEmptyString_1=helpers$2.isEmptyString=isEmptyString;function isObject$2(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}var isObject_1=helpers$2.isObject=isObject$2;function isUrl(e){return!!e&&Object.getPrototypeOf(e)===URL.prototype}var isUrl_1=helpers$2.isUrl=isUrl;function cloneIfArray(e){return Array.isArray(e)?[...e]:e}var cloneIfArray_1=helpers$2.cloneIfArray=cloneIfArray;function cloneIfUrl(e){return isUrl(e)?new URL(e):e}var cloneIfUrl_1=helpers$2.cloneIfUrl=cloneIfUrl,getHtmlAttributeRe=helpers$2.getHtmlAttributeRe=function(e){return new RegExp(`\\s${e}\\s*=\\s*['"]?([^'"\\s>]*)`,"iu")};function isBlankLine(e){const t="--\x3e";return!e||!e.trim()||!(e=>{for(;;){const n=e.indexOf("\x3c!--"),r=e.indexOf(t);if(-1!==r&&(-1===n||r<n))e=e.slice(r+3);else if(-1!==n&&-1!==r)e=e.slice(0,n)+e.slice(r+3);else{if(-1===n||-1!==r)return e;e=e.slice(0,n)}}})(e).replace(/>/g,"").trim()}var isBlankLine_1=helpers$2.isBlankLine=isBlankLine;const htmlCommentBegin="\x3c!--",htmlCommentEnd="--\x3e",safeCommentCharacter=".",startsWithPipeRe=/^ *\|/,notCrLfRe=/[^\r\n]/g,notSpaceCrLfRe=/[^ \r\n]/g,trailingSpaceRe=/ +[\r\n]/g,replaceTrailingSpace=e=>e.replace(notCrLfRe,safeCommentCharacter);var clearHtmlCommentText=helpers$2.clearHtmlCommentText=function(e){let t=0;for(;-1!==(t=e.indexOf(htmlCommentBegin,t));){const n=e.indexOf(htmlCommentEnd,t+2);if(-1===n)break;if(n>t+htmlCommentBegin.length){const r=e.slice(t+htmlCommentBegin.length,n),o=e.lastIndexOf("\n",t)+1,i=e.slice(o,t),a=0===i.trim().length,s=startsWithPipeRe.test(i)&&r.includes("\n");if(a||!(s||r.startsWith(">")||r.startsWith("->")||r.endsWith("-")||r.includes("--"))){const o=r.replace(notSpaceCrLfRe,safeCommentCharacter).replace(trailingSpaceRe,replaceTrailingSpace);e=e.slice(0,t+htmlCommentBegin.length)+o+e.slice(n)}}t=n+htmlCommentEnd.length}return e},escapeForRegExp=helpers$2.escapeForRegExp=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")};function ellipsify(e,t,n){return e.length<=30||(e=t&&n?e.slice(0,15)+"..."+e.slice(-15):n?"..."+e.slice(-30):e.slice(0,30)+"..."),e}var ellipsify_1=helpers$2.ellipsify=ellipsify;function addError$1(e,t,n,r,o,i){e({lineNumber:t,detail:n,context:r,range:o,fixInfo:i})}var addError_1=helpers$2.addError=addError$1;function addErrorDetailIf(e,t,n,r,o,i,a,s){n!==r&&addError$1(e,t,"Expected: "+n+"; Actual: "+r+(o?"; "+o:""),i,a,s)}var addErrorDetailIf_1=helpers$2.addErrorDetailIf=addErrorDetailIf;function addErrorContext(e,t,n,r,o,i,a){addError$1(e,t,void 0,n=ellipsify(n.replace(newLineRe,"\n"),r,o),i,a)}var addErrorContext_1=helpers$2.addErrorContext=addErrorContext;const positionLessThanOrEqual=(e,t,n,r)=>e<n||e===n&&t<=r;var hasOverlap=helpers$2.hasOverlap=function(e,t){const n=positionLessThanOrEqual(e.startLine,e.startColumn,t.startLine,t.startColumn),r=n?e:t,o=n?t:e;return positionLessThanOrEqual(o.startLine,o.startColumn,r.endLine,r.endColumn)},frontMatterHasTitle=helpers$2.frontMatterHasTitle=function(e,t){const n=void 0!==t&&!t,r=new RegExp(String(t||'^\\s*"?title"?\\s*[:=]'),"i");return!n&&e.some(e=>r.test(e))};function getReferenceLinkImageData$1(e){var t;const n=e=>e.toLowerCase().trim().replace(/\s+/g," "),r=e=>null==e?void 0:e.children.filter(e=>"blockQuotePrefix"!==e.type).map(e=>e.text).join(""),o=new Map,i=new Map,a=(e,t,r)=>{const a=[e.startLine-1,e.startColumn-1,e.text.length],s=n(t),l=r?i:o,c=l.get(s)||[];c.push(a),l.set(s,c)},s=new Map,l=[],c=[],u=micromark.filterByTypes(e,["definition","gfmFootnoteDefinition","definitionLabelString","gfmFootnoteDefinitionLabelString","gfmFootnoteCall","image","link","undefinedReferenceCollapsed","undefinedReferenceFull","undefinedReferenceShortcut"]);for(const d of u){let e="";switch(d.type){case"definition":case"gfmFootnoteDefinition":for(let e=d.startLine;e<=d.endLine;e++)l.push(e-1);break;case"gfmFootnoteDefinitionLabelString":e="^";case"definitionLabelString":{const r=n(`${e}${d.text}`);if(s.has(r))c.push([r,d.startLine-1]);else{const e=micromark.getParentOfType(d,["definition"]),n=e&&(null==(t=micromark.getDescendantsByType(e,["definitionDestination","definitionDestinationRaw","definitionDestinationString"])[0])?void 0:t.text);s.set(r,[d.startLine-1,n])}}break;case"gfmFootnoteCall":case"image":case"link":{let e=1===d.children.length;const t=2===d.children.length&&!d.children.some(e=>"resource"===e.type),[n]=micromark.getDescendantsByType(d,["label","labelText"]),[o]=micromark.getDescendantsByType(d,["reference","referenceString"]);let i=r(n);if(!e&&!t){const[t,n]=d.children.filter(e=>["gfmFootnoteCallMarker","gfmFootnoteCallString"].includes(e.type));t&&n&&(i=`${t.text}${n.text}`,e=!0)}(e||t)&&a(d,r(o)||i,e)}break;case"undefinedReferenceCollapsed":case"undefinedReferenceFull":case"undefinedReferenceShortcut":{const e=micromark.getDescendantsByType(d,["undefinedReference"])[0].children.map(e=>e.text).join("");a(d,e,"undefinedReferenceShortcut"===d.type)}}}return{references:o,shortcuts:i,definitions:s,duplicateDefinitions:c,definitionLineIndices:l}}var getReferenceLinkImageData_1=helpers$2.getReferenceLinkImageData=getReferenceLinkImageData$1;function getPreferredLineEnding(e,t){let n=0,r=0,o=0;const i=e.match(newLineRe)||[];for(const s of i)switch(s){case"\r":n++;break;case"\n":r++;break;case"\r\n":o++}let a=null;return a=n||r||o?r>=o&&r>=n?"\n":o>=n?"\r\n":"\r":t&&t.EOL||"\n",a}var getPreferredLineEnding_1=helpers$2.getPreferredLineEnding=getPreferredLineEnding;function expandTildePath(e,t){const n=t&&t.homedir&&t.homedir();return n?e.replace(/^~($|\/|\\)/,`${n}$1`):e}helpers$2.expandTildePath=expandTildePath;const map$1=new Map;let params;function initialize(e){map$1.clear(),params=e}function micromarkTokens(){return(null==params?void 0:params.parsers.micromark.tokens)||[]}function getCached(e,t){if(map$1.has(e))return map$1.get(e);const n=t();return map$1.set(e,n),n}function filterByTypesCached(e,t){return getCached(JSON.stringify(arguments),()=>micromarkHelpers.filterByTypes(micromarkTokens(),e,t))}function getReferenceLinkImageData(){return getCached(getReferenceLinkImageData.name,()=>getReferenceLinkImageData_1(micromarkTokens()))}const homepage="https://github.com/DavidAnson/markdownlint",version="0.38.0";var markdownit,hasRequiredMarkdownit;function requireMarkdownit(){if(hasRequiredMarkdownit)return markdownit;hasRequiredMarkdownit=1;const{newLineRe:e}=helpers$2;function t(t,n){const r=/`+/g;let o=null;const i=[];for(;null!==(o=r.exec(t));)i.push([o[0].length,o.index]);const a=[];for(;null!==(o=e.exec(t));)a.push(o.index);let s=0,l=0,c=0;for(let e=0;e<i.length-1;e++){const[r,o]=i[e];if(0===o||"\\"!==t[o-1])for(let u=e+1;u<i.length;u++){const[d,p]=i[u];if(r===d){for(;c<a.length;c++){const e=a[c];if(o<e)break;s++,l=e+1}const i=o-l+r;n(t.slice(o+r,p),s,i,r),e=u;break}}}}function n(e){if(e.attrs){for(const t of e.attrs)Object.freeze(t);Object.freeze(e.attrs)}if(e.children){for(const t of e.children)n(t);Object.freeze(e.children)}e.map&&Object.freeze(e.map),Object.freeze(e)}return markdownit={forEachInlineCodeSpan:t,getMarkdownItTokens:function(r,o,i){const a=r.parse(o,{});return function(r,o){let i=null;const a=r;for(const s of a){if("tr_open"===s.type?i=s.map:"tr_close"===s.type&&(i=null),!s.map&&i&&(s.map=[...i]),s.map)for(s.line=o[s.map[0]],s.lineNumber=s.map[0]+1;s.map[1]&&!(o[s.map[1]-1]||"").trim();)s.map[1]--;if(s.children){const n=[];s.children.some(e=>"code_inline"===e.type)&&t(s.content,t=>{n.push(t.split(e).length-1)});let r=s.lineNumber;for(const e of s.children)e.lineNumber=r,e.line=o[r-1],"softbreak"===e.type||"hardbreak"===e.type?r++:"code_inline"===e.type&&(r+=n.shift())}n(s)}Object.freeze(r)}(a,i),a}}}function requireMarkdownItCjs(){return requireMarkdownit()}var deferRequire={requireMarkdownItCjs:requireMarkdownItCjs};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}"undefined"==typeof __non_webpack_require__||__non_webpack_require__;const md001={names:["MD001","heading-increment"],description:"Heading levels should only increment by one level at a time",tags:["headings"],parser:"micromark",function:function(e,t){let n=Number.MAX_SAFE_INTEGER;for(const r of filterByTypesCached(["atxHeading","setextHeading"])){const e=micromarkHelpers.getHeadingLevel(r);e>n&&addErrorDetailIf_1(t,r.startLine,`h${n+1}`,`h${e}`),n=e}}},md003={names:["MD003","heading-style"],description:"Heading style",tags:["headings"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(const r of filterByTypesCached(["atxHeading","setextHeading"])){const e=micromarkHelpers.getHeadingStyle(r);if("consistent"===n&&(n=e),e!==n){const o=micromarkHelpers.getHeadingLevel(r)<=2;if(!("setext_with_atx"===n&&(o&&"setext"===e||!o&&"atx"===e))&&!("setext_with_atx_closed"===n&&(o&&"setext"===e||!o&&"atx_closed"===e))){let i=n;"setext_with_atx"===n?i=o?"setext":"atx":"setext_with_atx_closed"===n&&(i=o?"setext":"atx_closed"),addErrorDetailIf_1(t,r.startLine,i,e)}}}}},markerToStyle={"-":"dash","+":"plus","*":"asterisk"},styleToMarker={dash:"-",plus:"+",asterisk:"*"},differentItemStyle={dash:"plus",plus:"asterisk",asterisk:"dash"},validStyles=new Set(["asterisk","consistent","dash","plus","sublist"]),md004={names:["MD004","ul-style"],description:"Unordered list style",tags:["bullet","ul"],parser:"micromark",function:function(e,t){const n=String(e.config.style||"consistent");let r=validStyles.has(n)?n:"dash";const o=[];for(const i of filterByTypesCached(["listUnordered"])){let e=0;if("sublist"===n){let t=i;for(;t=micromarkHelpers.getParentOfType(t,["listOrdered","listUnordered"]);)e++}const a=micromarkHelpers.getDescendantsByType(i,["listItemPrefix","listItemMarker"]);for(const i of a){const a=markerToStyle[i.text];"sublist"===n?(o[e]||(o[e]=a===o[e-1]?differentItemStyle[a]:a),r=o[e]):"consistent"===r&&(r=a);const s=i.startColumn,l=i.endColumn-i.startColumn;addErrorDetailIf_1(t,i.startLine,r,a,void 0,void 0,[s,l],{editColumn:s,deleteCount:l,insertText:styleToMarker[r]})}}}},md005={names:["MD005","list-indent"],description:"Inconsistent indentation for list items at the same level",tags:["bullet","ul","indentation"],parser:"micromark",function:function(e,t){for(const n of filterByTypesCached(["listOrdered","listUnordered"])){const e=n.startColumn-1;let r=0,o=!1;const i=n.children.filter(e=>"listItemPrefix"===e.type);for(const a of i){const i=a.startLine,s=a.startColumn-1,l=[1,a.endColumn-1];if("listUnordered"===n.type)addErrorDetailIf_1(t,i,e,s,void 0,void 0,l);else{const n=a.text.trim().length,c=a.startColumn+n-1;if(r=r||c,e!==s||o)if(r===c)o=!0;else{const a=o?r-n:e,u=o?c-n:s;addError_1(t,i,o?`Expected: (${r}); Actual: (${c})`:`Expected: ${e}; Actual: ${s}`,void 0,l,{editColumn:Math.min(u,a)+1,deleteCount:Math.max(u-a,0),insertText:"".padEnd(Math.max(a-u,0))})}}}}}},unorderedListTypes=["blockQuotePrefix","listItemPrefix","listUnordered"],unorderedParentTypes=["blockQuote","listOrdered","listUnordered"],md007={names:["MD007","ul-indent"],description:"Unordered list indentation",tags:["bullet","ul","indentation"],parser:"micromark",function:function(e,t){const n=Number(e.config.indent||2),r=!!e.config.start_indented,o=Number(e.config.start_indent||n),i=new Map;let a=null;const s=filterByTypesCached(unorderedListTypes);for(const l of s){const{endColumn:e,parent:s,startColumn:c,startLine:u,type:d}=l;if("blockQuotePrefix"===d)a=l;else if("listUnordered"===d){let e=0,t=l;for(;t=micromarkHelpers.getParentOfType(t,unorderedParentTypes);){if("listUnordered"!==t.type){"listOrdered"===t.type&&(e=-1);break}e++}e>=0&&i.set(l,e)}else{const l=i.get(s);if(void 0!==l){const i=(r?o:0)+l*n,s=c-1-((null==a?void 0:a.endLine)===u?a.endColumn-1:0),d=[1,e-1],p={editColumn:c-s,deleteCount:Math.max(s-i,0),insertText:"".padEnd(Math.max(i-s,0))};addErrorDetailIf_1(t,u,i,s,void 0,void 0,d,p)}}}}},md009={names:["MD009","no-trailing-spaces"],description:"Trailing spaces",tags:["whitespace"],parser:"micromark",function:function(e,t){let n=e.config.br_spaces;n=Number(void 0===n?2:n);const r=!!e.config.list_item_empty_lines,o=!!e.config.strict,i=new Set;for(const u of filterByTypesCached(["codeFenced"]))micromarkHelpers.addRangeToSet(i,u.startLine+1,u.endLine-1);for(const u of filterByTypesCached(["codeIndented"]))micromarkHelpers.addRangeToSet(i,u.startLine,u.endLine);const a=new Set;if(r)for(const u of filterByTypesCached(["listOrdered","listUnordered"])){micromarkHelpers.addRangeToSet(a,u.startLine,u.endLine);let e=!0;for(let t=u.children.length-1;t>=0;t--){const n=u.children[t];switch(n.type){case"content":e=!1;break;case"listItemIndent":e&&a.delete(n.startLine);break;case"listItemPrefix":e=!0}}}const s=new Set,l=new Set;if(o){for(const e of filterByTypesCached(["paragraph"]))micromarkHelpers.addRangeToSet(s,e.startLine,e.endLine-1);for(const e of filterByTypesCached(["codeText"]))micromarkHelpers.addRangeToSet(l,e.startLine,e.endLine-1)}const c=n<2?0:n;for(let u=0;u<e.lines.length;u++){const n=e.lines[u],r=u+1,d=n.length-n.trimEnd().length;if(d&&!i.has(r)&&!a.has(r)&&(c!==d||o&&(!s.has(r)||l.has(r)))){const e=n.length-d+1;addError_1(t,r,"Expected: "+(0===c?"":"0 or ")+c+"; Actual: "+d,void 0,[e,d],{editColumn:e,deleteCount:d})}}}},tabRe=/\t+/g,md010={names:["MD010","no-hard-tabs"],description:"Hard tabs",tags:["whitespace","hard_tab"],parser:"micromark",function:function(e,t){const n=e.config.code_blocks,r=void 0===n||!!n,o=new Set((e.config.ignore_code_languages||[]).map(e=>e.toLowerCase())),i=e.config.spaces_per_tab,a=void 0===i?1:Math.max(0,Number(i)),s=[];r?o.size>0&&s.push("codeFenced"):s.push("codeFenced","codeIndented","codeText");const l=filterByTypesCached(s).filter(e=>{if("codeFenced"===e.type&&o.size>0){return micromarkHelpers.getDescendantsByType(e,["codeFencedFence","codeFencedFenceInfo"]).every(e=>o.has(e.text.toLowerCase()))}return!0}).map(e=>{const{type:t,startLine:n,startColumn:r,endLine:o,endColumn:i}=e,a="codeFenced"===t;return{startLine:n+(a?1:0),startColumn:a?0:r,endLine:o-(a?1:0),endColumn:a?Number.MAX_SAFE_INTEGER:i}});for(let c=0;c<e.lines.length;c++){const n=e.lines[c];let r=null;for(;null!==(r=tabRe.exec(n));){const e=c+1,n=r.index+1,o=r[0].length,i={startLine:e,startColumn:n,endLine:e,endColumn:n+o-1};l.some(e=>hasOverlap(e,i))||addError_1(t,e,"Column: "+n,void 0,[n,o],{editColumn:n,deleteCount:o,insertText:"".padEnd(o*a)})}}}},reversedLinkRe=/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)\](?!\()/g,md011={names:["MD011","no-reversed-links"],description:"Reversed link syntax",tags:["links"],parser:"micromark",function:function(e,t){const n=new Set;for(const o of filterByTypesCached(["codeFenced","codeIndented"]))micromarkHelpers.addRangeToSet(n,o.startLine,o.endLine);const r=filterByTypesCached(["codeText"]);for(const[o,i]of e.lines.entries()){const e=o+1;if(!n.has(e)){let n=null;for(;null!==(n=reversedLinkRe.exec(i));){const[o,i,a,s]=n;if(!a.endsWith("\\")&&!s.endsWith("\\")){const l=n.index+i.length+1,c=n[0].length-i.length,u={startLine:e,startColumn:l,endLine:e,endColumn:l+c-1};r.some(e=>hasOverlap(e,u))||addError_1(t,e,o.slice(i.length),void 0,[l,c],{editColumn:l,deleteCount:c,insertText:`[${a}](${s})`})}}}}}},md012={names:["MD012","no-multiple-blanks"],description:"Multiple consecutive blank lines",tags:["whitespace","blank_lines"],parser:"micromark",function:function(e,t){const n=Number(e.config.maximum||1),{lines:r}=e,o=new Set;for(const a of filterByTypesCached(["codeFenced","codeIndented"]))micromarkHelpers.addRangeToSet(o,a.startLine,a.endLine);let i=0;for(const[a,s]of r.entries()){i=o.has(a+1)||s.trim().length>0?0:i+1,n<i&&addErrorDetailIf_1(t,a+1,n,i,void 0,void 0,void 0,{deleteCount:-1})}}},longLineRePrefix="^.{",longLineRePostfixRelaxed="}.*\\s.*$",longLineRePostfixStrict="}.+$",sternModeRe=/^(?:[#>\s]*\s)?\S*$/,md013={names:["MD013","line-length"],description:"Line length",tags:["line_length"],parser:"micromark",function:function(e,t){const n=Number(e.config.line_length||80),r=Number(e.config.heading_line_length||n),o=Number(e.config.code_block_line_length||n),i=!!e.config.strict,a=!!e.config.stern,s=i||a?longLineRePostfixStrict:longLineRePostfixRelaxed,l=new RegExp(longLineRePrefix+n+s),c=new RegExp(longLineRePrefix+r+s),u=new RegExp(longLineRePrefix+o+s),d=e.config.code_blocks,p=void 0===d||!!d,f=e.config.tables,h=void 0===f||!!f,A=e.config.headings,m=void 0===A||!!A,g=new Set;for(const $ of filterByTypesCached(["atxHeading","setextHeading"]))micromarkHelpers.addRangeToSet(g,$.startLine,$.endLine);const y=new Set;for(const $ of filterByTypesCached(["codeFenced","codeIndented"]))micromarkHelpers.addRangeToSet(y,$.startLine,$.endLine);const v=new Set;for(const $ of filterByTypesCached(["table"]))micromarkHelpers.addRangeToSet(v,$.startLine,$.endLine);const b=new Set;for(const $ of filterByTypesCached(["autolink","image","link","literalAutolink"]))micromarkHelpers.addRangeToSet(b,$.startLine,$.endLine);const x=new Set;for(const $ of filterByTypesCached(["paragraph"]))for(const e of micromarkHelpers.getDescendantsByType($,["data"]))micromarkHelpers.addRangeToSet(x,e.startLine,e.endLine);const w=new Set;for(const $ of b)x.has($)||w.add($);const C=new Set(getReferenceLinkImageData().definitionLineIndices);for(let $=0;$<e.lines.length;$++){const s=e.lines[$],d=$+1,f=g.has(d),A=y.has(d),b=v.has(d),x=A?o:f?r:n,_=A?u:f?c:l;!p&&A||!h&&b||!m&&f||C.has($)||!i&&(a&&sternModeRe.test(s)||w.has(d))||!_.test(s)||addErrorDetailIf_1(t,d,x,s.length,void 0,void 0,[x+1,s.length-x])}}},dollarCommandRe=/^(\s*)(\$\s+)/,md014={names:["MD014","commands-show-output"],description:"Dollar signs used before commands without showing output",tags:["code"],parser:"micromark",function:function(e,t){for(const n of filterByTypesCached(["codeFenced","codeIndented"])){const e=n.children.filter(e=>"codeFlowValue"===e.type),r=e.map(e=>({result:e.text.match(dollarCommandRe),startColumn:e.startColumn,startLine:e.startLine,text:e.text})).filter(e=>e.result);if(r.length===e.length)for(const n of r){const e=n.startColumn+n.result[1].length,r=n.result[2].length;addErrorContext_1(t,n.startLine,n.text,void 0,void 0,[e,r],{editColumn:e,deleteCount:r})}}}},md018={names:["MD018","no-missing-space-atx"],description:"No space after hash on atx style heading",tags:["headings","atx","spaces"],parser:"micromark",function:function(e,t){const{lines:n}=e,r=new Set;for(const o of filterByTypesCached(["codeFenced","codeIndented","htmlFlow"]))micromarkHelpers.addRangeToSet(r,o.startLine,o.endLine);for(const[o,i]of n.entries())if(!r.has(o+1)&&/^#+[^# \t]/.test(i)&&!/#\s*$/.test(i)&&!i.startsWith("#️⃣")){const e=/^#+/.exec(i)[0].length;addErrorContext_1(t,o+1,i.trim(),void 0,void 0,[1,e+1],{editColumn:e+1,insertText:" "})}}};function validateHeadingSpaces(e,t,n){const{children:r,startLine:o,text:i}=t;let a=n>0?0:r.length-1;for(;r[a]&&"atxHeadingSequence"!==r[a].type;)a+=n;const s=r[a],l=r[a+n];if("atxHeadingSequence"===(null==s?void 0:s.type)&&"whitespace"===(null==l?void 0:l.type)&&l.text.length>1){const t=l.startColumn+1,r=l.endColumn-t;addErrorContext_1(e,o,i.trim(),n>0,n<0,[t,r],{editColumn:t,deleteCount:r})}}const md019md021=[{names:["MD019","no-multiple-space-atx"],description:"Multiple spaces after hash on atx style heading",tags:["headings","atx","spaces"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["atxHeading"]).filter(e=>"atx"===micromarkHelpers.getHeadingStyle(e));for(const r of n)validateHeadingSpaces(t,r,1)}},{names:["MD021","no-multiple-space-closed-atx"],description:"Multiple spaces inside hashes on closed atx style heading",tags:["headings","atx_closed","spaces"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["atxHeading"]).filter(e=>"atx_closed"===micromarkHelpers.getHeadingStyle(e));for(const r of n)validateHeadingSpaces(t,r,1),validateHeadingSpaces(t,r,-1)}}],md020={names:["MD020","no-missing-space-closed-atx"],description:"No space inside hashes on closed atx style heading",tags:["headings","atx_closed","spaces"],parser:"micromark",function:function(e,t){const{lines:n}=e,r=new Set;for(const o of filterByTypesCached(["codeFenced","codeIndented","htmlFlow"]))micromarkHelpers.addRangeToSet(r,o.startLine,o.endLine);for(const[o,i]of n.entries())if(!r.has(o+1)){const e=/^(#+)([ \t]*)([^# \t\\]|[^# \t][^#]*?[^# \t\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(i);if(e){const[,n,{length:r},a,{length:s},l,c,{length:u}]=e,d=n.length,p=c.length,f=!r,h=!s||!!l,A=l?`${l} `:"";if(f||h){const e=f?[1,d+1]:[i.length-u-p,p+1];addErrorContext_1(t,o+1,i.trim(),f,h,e,{editColumn:1,deleteCount:i.length,insertText:`${n} ${a} ${A}${c}`})}}}}},defaultLines=1,getLinesFunction=e=>{if(Array.isArray(e)){const t=new Array(6).fill(defaultLines);for(const[n,r]of[...e.entries()].slice(0,6))t[n]=r;return e=>t[micromarkHelpers.getHeadingLevel(e)-1]}const t=void 0===e?defaultLines:Number(e);return()=>t},md022={names:["MD022","blanks-around-headings"],description:"Headings should be surrounded by blank lines",tags:["headings","blank_lines"],parser:"micromark",function:function(e,t){const n=getLinesFunction(e.config.lines_above),r=getLinesFunction(e.config.lines_below),{lines:o}=e,i=filterByTypesCached(["blockQuotePrefix","linePrefix"]);for(const a of filterByTypesCached(["atxHeading","setextHeading"])){const{startLine:e,endLine:s}=a,l=o[e-1].trim(),c=n(a);if(c>=0){let n=0;for(let t=0;t<c&&isBlankLine_1(o[e-2-t]);t++)n++;addErrorDetailIf_1(t,e,c,n,"Above",l,void 0,{insertText:micromarkHelpers.getBlockQuotePrefixText(i,e-1,c-n)})}const u=r(a);if(u>=0){let n=0;for(let e=0;e<u&&isBlankLine_1(o[s+e]);e++)n++;addErrorDetailIf_1(t,e,u,n,"Below",l,void 0,{lineNumber:s+1,insertText:micromarkHelpers.getBlockQuotePrefixText(i,s+1,u-n)})}}}},md023={names:["MD023","heading-start-left"],description:"Headings must start at the beginning of the line",tags:["headings","spaces"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["atxHeading","linePrefix","setextHeading"]);for(let r=0;r<n.length-1;r++)if("linePrefix"===n[r].type&&"linePrefix"!==n[r+1].type&&n[r].startLine===n[r+1].startLine){const{endColumn:o,startColumn:i,startLine:a}=n[r],s=o-i;addErrorContext_1(t,a,e.lines[a-1],!0,!1,[i,s],{editColumn:i,deleteCount:s})}}},md024={names:["MD024","no-duplicate-heading"],description:"Multiple headings with the same content",tags:["headings"],parser:"micromark",function:function(e,t){const n=!!e.config.siblings_only||!1,r=[null,[]];let o=1,i=r[o];for(const a of filterByTypesCached(["atxHeading","setextHeading"])){const e=micromarkHelpers.getHeadingText(a);if(n){const e=micromarkHelpers.getHeadingLevel(a);for(;o<e;)o++,r[o]=[];for(;o>e;)r[o]=[],o--;i=r[e]}i.includes(e)?addErrorContext_1(t,a.startLine,e.trim()):i.push(e)}}},md025={names:["MD025","single-title","single-h1"],description:"Multiple top-level headings in the same document",tags:["headings"],parser:"micromark",function:function(e,t){const n=Number(e.config.level||1),{tokens:r}=e.parsers.micromark,o=filterByTypesCached(["atxHeading","setextHeading"]).filter(e=>n===micromarkHelpers.getHeadingLevel(e)&&!micromarkHelpers.isDocfxTab(e));if(o.length>0){const n=frontMatterHasTitle(e.frontMatterLines,e.config.front_matter_title);let i=n;if(!i){i=r.slice(0,r.indexOf(o[0])).every(e=>micromarkHelpers.nonContentTokens.has(e.type)||micromarkHelpers.isHtmlFlowComment(e))}if(i)for(const e of o.slice(n?0:1))addErrorContext_1(t,e.startLine,micromarkHelpers.getHeadingText(e))}}},md026={names:["MD026","no-trailing-punctuation"],description:"Trailing punctuation in heading",tags:["headings"],parser:"micromark",function:function(e,t){let n=e.config.punctuation;n=String(void 0===n?allPunctuationNoQuestion:n);const r=new RegExp("\\s*["+escapeForRegExp(n)+"]+$"),o=filterByTypesCached(["atxHeadingText","setextHeadingText"]);for(const i of o){const{endColumn:e,endLine:n,text:o}=i,a=r.exec(o);if(a&&!endOfLineHtmlEntityRe.test(o)&&!endOfLineGemojiCodeRe.test(o)){const r=a[0],o=r.length,i=e-o;addError_1(t,n,`Punctuation: '${r}'`,void 0,[i,o],{editColumn:i,deleteCount:o})}}}},listTypes=["listOrdered","listUnordered"],md027={names:["MD027","no-multiple-space-blockquote"],description:"Multiple spaces after blockquote symbol",tags:["blockquote","whitespace","indentation"],parser:"micromark",function:function(e,t){var n,r;const o=e.config.list_items,i=void 0===o||!!o,{tokens:a}=e.parsers.micromark;for(const s of filterByTypesCached(["linePrefix"])){const o=s.parent,l="codeIndented"===(null==o?void 0:o.type),c=(null==o?void 0:o.children)||a;if(!l&&"blockQuotePrefix"===(null==(n=c[c.indexOf(s)-1])?void 0:n.type)&&(i||!listTypes.includes(null==(r=c[c.indexOf(s)+1])?void 0:r.type)&&!micromarkHelpers.getParentOfType(s,listTypes))){const{startColumn:n,startLine:r,text:o}=s,{length:i}=o,a=e.lines[r-1];addErrorContext_1(t,r,a,void 0,void 0,[n,i],{editColumn:n,deleteCount:i})}}}},ignoreTypes=new Set(["lineEnding","listItemIndent","linePrefix"]),md028={names:["MD028","no-blanks-blockquote"],description:"Blank line inside blockquote",tags:["blockquote","whitespace"],parser:"micromark",function:function(e,t){var n;for(const r of filterByTypesCached(["blockQuote"])){const o=[],i=(null==(n=r.parent)?void 0:n.children)||e.parsers.micromark.tokens;for(let e=i.indexOf(r)+1;e<i.length;e++){const n=i[e],{startLine:r,type:a}=n;if("lineEndingBlank"===a)o.push(r);else if(!ignoreTypes.has(a)){if("blockQuote"===a){for(const e of o)addError_1(t,e);break}break}}}}},listStyleExamples={one:"1/1/1",ordered:"1/2/3",zero:"0/0/0"};function getOrderedListItemValue(e){return Number(micromarkHelpers.getDescendantsByType(e,["listItemValue"])[0].text)}const md029={names:["MD029","ol-prefix"],description:"Ordered list item prefix",tags:["ol"],parser:"micromark",function:function(e,t){const n=String(e.config.style||"one_or_ordered");for(const r of filterByTypesCached(["listOrdered"])){const e=micromarkHelpers.getDescendantsByType(r,["listItemPrefix"]);let o=1,i=!1;if(e.length>=2){const t=getOrderedListItemValue(e[0]);1===getOrderedListItemValue(e[1])&&0!==t||(i=!0,0===t&&(o=0))}let a=n;"one_or_ordered"===a?a=i?"ordered":"one":"zero"===a?o=0:"one"===a&&(o=1);for(const n of e){const e=getOrderedListItemValue(n);addErrorDetailIf_1(t,n.startLine,o,e,"Style: "+listStyleExamples[a],void 0,[n.startColumn,n.endColumn-n.startColumn]),"ordered"===a&&o++}}}},md030={names:["MD030","list-marker-space"],description:"Spaces after list markers",tags:["ol","ul","whitespace"],parser:"micromark",function:function(e,t){const n=Number(e.config.ul_single||1),r=Number(e.config.ol_single||1),o=Number(e.config.ul_multi||1),i=Number(e.config.ol_multi||1);for(const a of filterByTypesCached(["listOrdered","listUnordered"])){const e="listOrdered"===a.type,s=a.children.filter(e=>"listItemPrefix"===e.type),l=a.endLine-a.startLine+1===s.length,c=e?l?r:i:l?n:o;for(const n of s){const e=[n.startColumn,n.endColumn-n.startColumn],r=n.children.filter(e=>"listItemPrefixWhitespace"===e.type);for(const n of r){const{endColumn:r,startColumn:o,startLine:i}=n,a=r-o,s={editColumn:o,deleteCount:a,insertText:"".padEnd(c)};addErrorDetailIf_1(t,i,c,a,void 0,void 0,e,s)}}}}},codeFencePrefixRe=/^(.*?)[`~]/;function addError(e,t,n,r){const o=t[n-1],[,i]=o.match(codeFencePrefixRe)||[],a=void 0===i?void 0:{lineNumber:n+(r?0:1),insertText:`${i.replace(/[^>]/g," ").trim()}\n`};addErrorContext_1(e,n,o.trim(),void 0,void 0,void 0,a)}const md031={names:["MD031","blanks-around-fences"],description:"Fenced code blocks should be surrounded by blank lines",tags:["code","blank_lines"],parser:"micromark",function:function(e,t){const n=e.config.list_items,r=void 0===n||!!n,{lines:o}=e;for(const i of filterByTypesCached(["codeFenced"]))!r&&micromarkHelpers.getParentOfType(i,["listOrdered","listUnordered"])||(isBlankLine_1(o[i.startLine-2])||addError(t,o,i.startLine,!0),isBlankLine_1(o[i.endLine])||isBlankLine_1(o[i.endLine-1])||addError(t,o,i.endLine,!1))}},isList=e=>"listOrdered"===e.type||"listUnordered"===e.type,md032={names:["MD032","blanks-around-lists"],description:"Lists should be surrounded by blank lines",tags:["bullet","ul","ol","blank_lines"],parser:"micromark",function:function(e,t){const{lines:n,parsers:r}=e,o=filterByTypesCached(["blockQuotePrefix","linePrefix"]),i=micromarkHelpers.filterByPredicate(r.micromark.tokens,isList,e=>isList(e)||"htmlFlow"===e.type?[]:e.children);for(const a of i){const e=a.startLine;isBlankLine_1(n[e-2])||addErrorContext_1(t,e,n[e-1].trim(),void 0,void 0,void 0,{insertText:micromarkHelpers.getBlockQuotePrefixText(o,e)});const r=micromarkHelpers.filterByPredicate(a.children,e=>!micromarkHelpers.nonContentTokens.has(e.type),e=>micromarkHelpers.nonContentTokens.has(e.type)?[]:e.children);let i=a.endLine;r.length>0&&(i=r[r.length-1].endLine);const s=i;isBlankLine_1(n[s])||addErrorContext_1(t,s,n[s-1].trim(),void 0,void 0,void 0,{lineNumber:s+1,insertText:micromarkHelpers.getBlockQuotePrefixText(o,s)})}}},md033={names:["MD033","no-inline-html"],description:"Inline HTML",tags:["html"],parser:"micromark",function:function(e,t){let n=e.config.allowed_elements;n=Array.isArray(n)?n:[],n=n.map(e=>e.toLowerCase());for(const r of filterByTypesCached(["htmlText"],!0)){const e=micromarkHelpers.getHtmlTagInfo(r);if(e&&!e.close&&!n.includes(e.name.toLowerCase())){const n=[r.startColumn,r.text.replace(nextLinesRe_1,"").length];addError_1(t,r.startLine,"Element: "+e.name,void 0,n)}}}},md034={names:["MD034","no-bare-urls"],description:"Bare URL used",tags:["links","url"],parser:"micromark",function:function(e,t){for(const r of(n=e.parsers.micromark.tokens,micromarkHelpers.filterByPredicate(n,e=>{var t;if("literalAutolink"===e.type&&!micromarkHelpers.inHtmlFlow(e)){const n=null==(t=e.parent)?void 0:t.children,r=null==n?void 0:n.indexOf(e),o=null==n?void 0:n.at(r-1),i=null==n?void 0:n.at(r+1);return!(o&&i&&"data"===o.type&&"data"===i.type&&o.text.endsWith("<")&&i.text.startsWith(">"))}return!1},e=>{const{children:t}=e,n=[];for(let r=0;r<t.length;r++){const e=t[r],o=micromarkHelpers.getHtmlTagInfo(e);if(o&&!o.close){let e=1;for(let n=r+1;n<t.length;n++){const i=t[n],a=micromarkHelpers.getHtmlTagInfo(i);if(a&&o.name===a.name)if(a.close){if(e--,0===e){r=n;break}}else e++}}else n.push(e)}return n}))){const e=[r.startColumn,r.endColumn-r.startColumn],n={editColumn:e[0],deleteCount:e[1],insertText:`<${r.text}>`};addErrorContext_1(t,r.startLine,r.text,void 0,void 0,e,n)}var n}},md035={names:["MD035","hr-style"],description:"Horizontal rule style",tags:["hr"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent").trim();const r=filterByTypesCached(["thematicBreak"]);for(const o of r){const{startLine:e,text:r}=o;"consistent"===n&&(n=r),addErrorDetailIf_1(t,e,n,r)}}},emphasisTypes=[["emphasis","emphasisText"],["strong","strongText"]],isParagraphChildMeaningful=e=>!("htmlText"===e.type||"data"===e.type&&0===e.text.trim().length),md036={names:["MD036","no-emphasis-as-heading"],description:"Emphasis used instead of a heading",tags:["headings","emphasis"],parser:"micromark",function:function(e,t){let n=e.config.punctuation;n=String(void 0===n?allPunctuation_1:n);const r=new RegExp("["+n+"]$"),o=filterByTypesCached(["paragraph"],!0).filter(e=>{var t,n,r,o,i,a;return"content"===(null==(t=e.parent)?void 0:t.type)&&(!(null==(n=e.parent)?void 0:n.parent)||"htmlFlow"===(null==(o=null==(r=e.parent)?void 0:r.parent)?void 0:o.type)&&!(null==(a=null==(i=e.parent)?void 0:i.parent)?void 0:a.parent))&&1===e.children.filter(isParagraphChildMeaningful).length});for(const i of emphasisTypes){const e=micromarkHelpers.getDescendantsByType(o,i);for(const n of e)1!==n.children.length||"data"!==n.children[0].type||r.test(n.text)||addErrorContext_1(t,n.startLine,n.text)}}},md037={names:["MD037","no-space-in-emphasis"],description:"Spaces inside emphasis markers",tags:["whitespace","emphasis"],parser:"micromark",function:function(e,t){const{lines:n,parsers:r}=e,o=new Map;for(const a of["_","__","___","*","**","***"])o.set(a,[]);const i=micromarkHelpers.filterByPredicate(r.micromark.tokens,e=>e.children.some(e=>"data"===e.type));for(const a of i){for(const e of o.values())e.length=0;for(const e of a.children){const{text:t,type:n}=e;if("data"===n&&t.length<=3){const n=o.get(t);n&&!micromarkHelpers.inHtmlFlow(e)&&n.push(e)}}for(const e of o.entries()){const[r,o]=e;for(let e=0;e+1<o.length;e+=2){const i=o[e],a=n[i.startLine-1].slice(i.endColumn-1).match(/^\s+\S/);if(a){const[e]=a,n=`${r}${e}`;addError_1(t,i.startLine,void 0,n,[i.startColumn,n.length],{editColumn:i.endColumn,deleteCount:e.length-1})}const s=o[e+1],l=n[s.startLine-1].slice(0,s.startColumn-1).match(/\S\s+$/);if(l){const[e]=l,n=`${e}${r}`;addError_1(t,s.startLine,void 0,n,[s.endColumn-n.length,n.length],{editColumn:s.startColumn-(e.length-1),deleteCount:e.length-1})}}}}}},md038={names:["MD038","no-space-in-code"],description:"Spaces inside code span elements",tags:["whitespace","code"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["codeText"]);for(const r of n){const e=micromarkHelpers.getDescendantsByType(r,["codeTextData"]);if(e.length>0){const n=micromarkHelpers.getDescendantsByType(r,["codeTextPadding"]),o=n[0],i=e[0],a=/^(\s+)(\S)/.exec(i.text)||[null,"",""],s="`"===a[2],l=a[1].length-(s&&!o?1:0),c=l>0,u=n[n.length-1],d=e[e.length-1],p=/(\S)(\s+)$/.exec(d.text)||[null,"",""],f="`"===p[1],h=p[2].length-(f&&!u?1:0),A=h>0,m=c&&A&&o&&u&&!s&&!f,g=r.text;if(c){const e=(m?o:i).startColumn,n=l+(m?o.text.length:0);addErrorContext_1(t,i.startLine,g,!0,!1,[e,n],{editColumn:e,deleteCount:n})}if(A){const e=(m?u:d).endColumn,n=h+(m?u.text.length:0);addErrorContext_1(t,d.endLine,g,!1,!0,[e-n,n],{editColumn:e-n,deleteCount:n})}}}}};function addLabelSpaceError(e,t,n,r){const o=n.text.match(r?/^[^\S\r\n]+/:/[^\S\r\n]+$/),i=o?[r?n.startColumn:n.endColumn-o[0].length,o[0].length]:void 0;addErrorContext_1(e,r?n.startLine+(o?0:1):n.endLine-(o?0:1),t.text.replace(/\s+/g," "),r,!r,i,i?{editColumn:i[0],deleteCount:i[1]}:void 0)}const md039={names:["MD039","no-space-in-links"],description:"Spaces inside link text",tags:["whitespace","links"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["label"]).filter(e=>{var t;return"link"===(null==(t=e.parent)?void 0:t.type)});for(const r of n){const e=r.children.filter(e=>"labelText"===e.type);for(const n of e)n.text.trimStart().length!==n.text.length&&addLabelSpaceError(t,r,n,!0),n.text.trimEnd().length!==n.text.length&&addLabelSpaceError(t,r,n,!1)}}},md040={names:["MD040","fenced-code-language"],description:"Fenced code blocks should have a language specified",tags:["code","language"],parser:"micromark",function:function(e,t){var n;let r=e.config.allowed_languages;r=Array.isArray(r)?r:[];const o=!!e.config.language_only,i=filterByTypesCached(["codeFenced"]);for(const a of i){const e=micromarkHelpers.getDescendantsByType(a,["codeFencedFence"])[0],{startLine:i,text:s}=e,l=null==(n=micromarkHelpers.getDescendantsByType(e,["codeFencedFenceInfo"])[0])?void 0:n.text;l?r.length>0&&!r.includes(l)&&addError_1(t,i,`"${l}" is not allowed`):addErrorContext_1(t,i,s),o&&micromarkHelpers.getDescendantsByType(e,["codeFencedFenceMeta"]).length>0&&addError_1(t,i,`Info string contains more than language: "${s}"`)}}},headingTagNameRe=/^h[1-6]$/;function getHtmlFlowTagName(e){const{children:t,type:n}=e;if("htmlFlow"===n){const e=micromarkHelpers.filterByTypes(t,["htmlText"],!0),n=e.length>0&&micromarkHelpers.getHtmlTagInfo(e[0]);if(n)return n.name.toLowerCase()}return null}const md041={names:["MD041","first-line-heading","first-line-h1"],description:"First line in a file should be a top-level heading",tags:["headings"],parser:"micromark",function:function(e,t){const n=!!e.config.allow_preamble,r=Number(e.config.level||1),{tokens:o}=e.parsers.micromark;if(!frontMatterHasTitle(e.frontMatterLines,e.config.front_matter_title)){let i=0;for(const e of o){const{startLine:t,type:o}=e;if(!micromarkHelpers.nonContentTokens.has(o)&&!micromarkHelpers.isHtmlFlowComment(e)){let a=null;if("atxHeading"===o||"setextHeading"===o){micromarkHelpers.getHeadingLevel(e)!==r&&(i=t);break}if((a=getHtmlFlowTagName(e))&&headingTagNameRe.test(a)){a!==`h${r}`&&(i=t);break}if(!n){i=t;break}}}i>0&&addErrorContext_1(t,i,e.lines[i-1])}}},md042={names:["MD042","no-empty-links"],description:"No empty links",tags:["links"],parser:"micromark",function:function(e,t){const{definitions:n}=getReferenceLinkImageData(),r=e=>{const t=n.get(e.text.trim());return t&&"#"===t[1]},o=filterByTypesCached(["link"]);for(const i of o){const e=micromarkHelpers.getDescendantsByType(i,["label","labelText"]),n=micromarkHelpers.getDescendantsByType(i,["reference"]),o=micromarkHelpers.getDescendantsByType(i,["resource"]),a=micromarkHelpers.getDescendantsByType(n,["referenceString"]),s=micromarkHelpers.getDescendantsByType(o,["resourceDestination",["resourceDestinationLiteral","resourceDestinationRaw"],"resourceDestinationString"]),l=e.length>0,c=n.length>0,u=o.length>0,d=a.length>0,p=s.length>0;let f=!1;l&&(!c&&!u||c&&!d)?f=r(e[0]):d&&!p?f=r(a[0]):!d&&p?f="#"===s[0].text.trim():d||p||(f=!0),f&&addErrorContext_1(t,i.startLine,i.text,void 0,void 0,[i.startColumn,i.endColumn-i.startColumn])}}},md043={names:["MD043","required-headings"],description:"Required heading structure",tags:["headings"],parser:"micromark",function:function(e,t){const n=e.config.headings;if(!Array.isArray(n))return;const r=e.config.match_case||!1;let o=0,i=!1,a=!1,s=!1;const l=()=>n[o++]||"[None]",c=e=>r?e:e.toLowerCase();for(const d of filterByTypesCached(["atxHeading","setextHeading"]))if(!a){const e=micromarkHelpers.getHeadingText(d),n=micromarkHelpers.getHeadingLevel(d);s=!0;const r=`${"".padEnd(n,"#")} ${e}`,u=l();if("*"===u){c(l())!==c(r)&&(i=!0,o--)}else"+"===u?i=!0:"?"===u||(c(u)===c(r)?i=!1:i?o--:(addErrorDetailIf_1(t,d.startLine,u,r),a=!0))}const u=n.length-o;a||!(u>1||1===u&&"*"!==n[o])||!s&&n.every(e=>"*"===e)||addErrorContext_1(t,e.lines.length,n[o])}},asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(e){return null!==e&&(e<32||127===e)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(e){return null!==e&&e<-2}function markdownLineEndingOrSpace(e){return null!==e&&(e<0||32===e)}function markdownSpace(e){return-2===e||-1===e||32===e}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function factorySpace(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(markdownSpace(r))return e.enter(n),a(r);return t(r)};function a(r){return markdownSpace(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}function factoryWhitespace(e,t){let n;return function r(o){if(markdownLineEnding(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(markdownSpace(o))return factorySpace(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}function factoryAttributes(e,t,n,r,o,i,a,s,l,c,u,d,p,f,h){let A,m;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),g};function g(t){return 35===t?(A=a,y(t)):46===t?(A=s,y(t)):h&&markdownSpace(t)?factorySpace(e,g,"whitespace")(t):!h&&markdownLineEndingOrSpace(t)?factoryWhitespace(e,g)(t):null===t||markdownLineEnding(t)||unicodeWhitespace(t)||unicodePunctuation(t)&&45!==t&&95!==t?P(t):(e.enter(i),e.enter(l),e.consume(t),x)}function y(t){const n=A+"Marker";return e.enter(i),e.enter(A),e.enter(n),e.consume(t),e.exit(n),v}function v(t){if(null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||markdownLineEndingOrSpace(t))return n(t);const r=A+"Value";return e.enter(r),e.consume(t),b}function b(t){if(null===t||34===t||39===t||60===t||61===t||62===t||96===t)return n(t);if(35===t||46===t||125===t||markdownLineEndingOrSpace(t)){const n=A+"Value";return e.exit(n),e.exit(A),e.exit(i),g(t)}return e.consume(t),b}function x(t){return null===t||markdownLineEnding(t)||unicodeWhitespace(t)||unicodePunctuation(t)&&45!==t&&46!==t&&58!==t&&95!==t?(e.exit(l),h&&markdownSpace(t)?factorySpace(e,w,"whitespace")(t):!h&&markdownLineEndingOrSpace(t)?factoryWhitespace(e,w)(t):w(t)):(e.consume(t),x)}function w(t){return 61===t?(e.enter(c),e.consume(t),e.exit(c),C):(e.exit(i),g(t))}function C(t){return null===t||60===t||61===t||62===t||96===t||125===t||h&&markdownLineEnding(t)?n(t):34===t||39===t?(e.enter(u),e.enter(p),e.consume(t),e.exit(p),m=t,_):h&&markdownSpace(t)?factorySpace(e,C,"whitespace")(t):!h&&markdownLineEndingOrSpace(t)?factoryWhitespace(e,C)(t):(e.enter(d),e.enter(f),e.consume(t),m=void 0,$)}function $(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?n(t):125===t||markdownLineEndingOrSpace(t)?(e.exit(f),e.exit(d),e.exit(i),g(t)):(e.consume(t),$)}function _(t){return t===m?(e.enter(p),e.consume(t),e.exit(p),e.exit(u),e.exit(i),k):(e.enter(d),S(t))}function S(t){return t===m?(e.exit(d),_(t)):null===t?n(t):markdownLineEnding(t)?h?n(t):factoryWhitespace(e,S)(t):(e.enter(f),e.consume(t),E)}function E(t){return t===m||null===t||markdownLineEnding(t)?(e.exit(f),S(t)):(e.consume(t),E)}function k(e){return 125===e||markdownLineEndingOrSpace(e)?g(e):P(e)}function P(i){return 125===i?(e.enter(o),e.consume(i),e.exit(o),e.exit(r),t):n(i)}}function factoryLabel$1(e,t,n,r,o,i,a){let s,l=0,c=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),u};function u(n){return 93===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),d(n))}function d(t){if(93===t&&!c)return h(t);const n=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:s});return s&&(s.next=n),s=n,p(t)}function p(t){return null===t||l>999||91===t&&++c>32?n(t):93!==t||c--?markdownLineEnding(t)?a?n(t):(e.consume(t),e.exit("chunkText"),d):(e.consume(t),92===t?f:p):(e.exit("chunkText"),h(t))}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,p):p(t)}function h(n){return e.exit(i),e.enter(o),e.consume(n),e.exit(o),e.exit(r),t}}function factoryName(e,t,n,r){const o=this;return function(t){if(null===t||markdownLineEnding(t)||unicodePunctuation(t)||unicodeWhitespace(t))return n(t);return e.enter(r),e.consume(t),i};function i(a){return null===a||markdownLineEnding(a)||unicodeWhitespace(a)||unicodePunctuation(a)&&45!==a&&95!==a?(e.exit(r),45===o.previous||95===o.previous?n(a):t(a)):(e.consume(a),i)}}const directiveContainer={tokenize:tokenizeDirectiveContainer,concrete:!0},label$2={tokenize:tokenizeLabel$2,partial:!0},attributes$2={tokenize:tokenizeAttributes$2,partial:!0},nonLazyLine={tokenize:tokenizeNonLazyLine,partial:!0};function tokenizeDirectiveContainer(e,t,n){const r=this,o=r.events[r.events.length-1],i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let a,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(t)};function l(t){return 58===t?(e.consume(t),s++,l):s<3?n(t):(e.exit("directiveContainerSequence"),factoryName.call(r,e,c,n,"directiveContainerName")(t))}function c(t){return 91===t?e.attempt(label$2,u,u)(t):u(t)}function u(t){return 123===t?e.attempt(attributes$2,d,d)(t):d(t)}function d(t){return factorySpace(e,p,"whitespace")(t)}function p(o){return e.exit("directiveContainerFence"),null===o?w(o):markdownLineEnding(o)?r.interrupt?t(o):e.attempt(nonLazyLine,f,w)(o):n(o)}function f(t){return null===t?w(t):markdownLineEnding(t)?e.check(nonLazyLine,y,w)(t):(e.enter("directiveContainerContent"),h(t))}function h(t){return e.attempt({tokenize:C,partial:!0},x,i?factorySpace(e,A,"linePrefix",i+1):A)(t)}function A(t){return null===t?x(t):markdownLineEnding(t)?e.check(nonLazyLine,g,x)(t):g(t)}function m(t){if(null===t){const n=e.exit("chunkDocument");return r.parser.lazy[n.start.line]=!1,x(t)}return markdownLineEnding(t)?e.check(nonLazyLine,v,b)(t):(e.consume(t),m)}function g(t){const n=e.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=n),a=n,m(t)}function y(t){return e.enter("directiveContainerContent"),h(t)}function v(t){e.consume(t);const n=e.exit("chunkDocument");return r.parser.lazy[n.start.line]=!1,h}function b(t){const n=e.exit("chunkDocument");return r.parser.lazy[n.start.line]=!1,x(t)}function x(t){return e.exit("directiveContainerContent"),w(t)}function w(n){return e.exit("directiveContainer"),t(n)}function C(e,t,n){let o=0;return factorySpace(e,function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return 58===t?(e.consume(t),o++,i):o<s?n(t):(e.exit("directiveContainerSequence"),factorySpace(e,a,"whitespace")(t))}function a(r){return null===r||markdownLineEnding(r)?(e.exit("directiveContainerFence"),t(r)):n(r)}}}function tokenizeLabel$2(e,t,n){return factoryLabel$1(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function tokenizeAttributes$2(e,t,n){return factoryAttributes(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function tokenizeNonLazyLine(e,t,n){const r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const directiveLeaf={tokenize:tokenizeDirectiveLeaf},label$1={tokenize:tokenizeLabel$1,partial:!0},attributes$1={tokenize:tokenizeAttributes$1,partial:!0};function tokenizeDirectiveLeaf(e,t,n){const r=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),o};function o(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),factoryName.call(r,e,i,n,"directiveLeafName")):n(t)}function i(t){return 91===t?e.attempt(label$1,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(attributes$1,s,s)(t):s(t)}function s(t){return factorySpace(e,l,"whitespace")(t)}function l(r){return null===r||markdownLineEnding(r)?(e.exit("directiveLeaf"),t(r)):n(r)}}function tokenizeLabel$1(e,t,n){return factoryLabel$1(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function tokenizeAttributes$1(e,t,n){return factoryAttributes(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const directiveText={tokenize:tokenizeDirectiveText,previous:previous$2},label={tokenize:tokenizeLabel,partial:!0},attributes={tokenize:tokenizeAttributes,partial:!0};function previous$2(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeDirectiveText(e,t,n){const r=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),factoryName.call(r,e,o,n,"directiveTextName")};function o(t){return 58===t?n(t):91===t?e.attempt(label,i,i)(t):i(t)}function i(t){return 123===t?e.attempt(attributes,a,a)(t):a(t)}function a(n){return e.exit("directiveText"),t(n)}}function tokenizeLabel(e,t,n){return factoryLabel$1(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function tokenizeAttributes(e,t,n){return factoryAttributes(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function directive(){return{text:{58:directiveText},flow:{58:[directiveContainer,directiveLeaf]}}}const element=document.createElement("i");function decodeNamedCharacterReference(e){const t="&"+e+";";element.innerHTML=t;const n=element.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const wwwPrefix={tokenize:tokenizeWwwPrefix,partial:!0},domain={tokenize:tokenizeDomain,partial:!0},path={tokenize:tokenizePath,partial:!0},trail={tokenize:tokenizeTrail,partial:!0},emailDomainDotTrail={tokenize:tokenizeEmailDomainDotTrail,partial:!0},wwwAutolink={name:"wwwAutolink",tokenize:tokenizeWwwAutolink,previous:previousWww},protocolAutolink={name:"protocolAutolink",tokenize:tokenizeProtocolAutolink,previous:previousProtocol},emailAutolink={name:"emailAutolink",tokenize:tokenizeEmailAutolink,previous:previousEmail},text$3={};function gfmAutolinkLiteral(){return{text:text$3}}let code$2=48;for(;code$2<123;)text$3[code$2]=emailAutolink,code$2++,58===code$2?code$2=65:91===code$2&&(code$2=97);function tokenizeEmailAutolink(e,t,n){const r=this;let o,i;return function(t){if(!gfmAtext(t)||!previousEmail.call(r,r.previous)||previousUnbalanced(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return gfmAtext(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(emailDomainDotTrail,c,l)(t):45===t||95===t||asciiAlphanumeric(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&asciiAlpha(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}}function tokenizeWwwAutolink(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!previousWww.call(r,r.previous)||previousUnbalanced(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wwwPrefix,e.attempt(domain,e.attempt(path,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}}function tokenizeProtocolAutolink(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&previousProtocol.call(r,r.previous)&&!previousUnbalanced(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(asciiAlpha(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||asciiControl(t)||markdownLineEndingOrSpace(t)||unicodeWhitespace(t)||unicodePunctuation(t)?n(t):e.attempt(domain,e.attempt(path,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}}function tokenizeWwwPrefix(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}}function tokenizeDomain(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(trail,l,s)(t):null===t||markdownLineEndingOrSpace(t)||unicodeWhitespace(t)||45!==t&&unicodePunctuation(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}}function tokenizePath(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(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(trail,t,i)(a):null===a||markdownLineEndingOrSpace(a)||unicodeWhitespace(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}}function tokenizeTrail(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),i):93===a?(e.consume(a),o):60===a||null===a||markdownLineEndingOrSpace(a)||unicodeWhitespace(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?t(e):r(e)}function i(e){return asciiAlpha(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):asciiAlpha(t)?(e.consume(t),a):n(t)}}function tokenizeEmailDomainDotTrail(e,t,n){return function(t){return e.consume(t),r};function r(e){return asciiAlphanumeric(e)?n(e):t(e)}}function previousWww(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||markdownLineEndingOrSpace(e)}function previousProtocol(e){return!asciiAlpha(e)}function previousEmail(e){return!(47===e||gfmAtext(e))}function gfmAtext(e){return 43===e||45===e||46===e||95===e||asciiAlphanumeric(e)}function previousUnbalanced(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}function splice(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function push$1(e,t){return e.length>0?(splice(e,e.length,0,t),e):t}function classifyCharacter(e){return null===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?1:unicodePunctuation(e)?2:void 0}function resolveAll(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}text$3[43]=emailAutolink,text$3[45]=emailAutolink,text$3[46]=emailAutolink,text$3[95]=emailAutolink,text$3[72]=[emailAutolink,protocolAutolink],text$3[104]=[emailAutolink,protocolAutolink],text$3[87]=[emailAutolink,wwwAutolink],text$3[119]=[emailAutolink,wwwAutolink];const attention={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(e,t){let n,r,o,i,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};movePoint(d,-s),movePoint(p,s),i={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},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=push$1(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=push$1(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=push$1(l,resolveAll(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=push$1(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=push$1(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,splice(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}function tokenizeAttention(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=classifyCharacter(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=classifyCharacter(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}function movePoint(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const autolink$2={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(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"),o};function o(t){return asciiAlpha(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||asciiAlphanumeric(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||asciiAlphanumeric(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||asciiControl(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):asciiAtext(t)?(e.consume(t),l):n(t)}function c(e){return asciiAlphanumeric(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||asciiAlphanumeric(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(e,t,n){return function(t){return markdownSpace(t)?factorySpace(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||markdownLineEnding(e)?t(e):n(e)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(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"),o}return n(t)};function o(n){return markdownSpace(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}function tokenizeBlockQuoteContinuation(e,t,n){const r=this;return function(t){if(markdownSpace(t))return factorySpace(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(blockQuote,t,n)(r)}}function exit(e){e.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return asciiPunctuation(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(e,t,n){const r=this;let o,i,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"),o=31,i=asciiAlphanumeric,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=asciiHexDigit,c):(e.enter("characterReferenceValue"),o=7,i=asciiDigit,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==asciiAlphanumeric||decodeNamedCharacterReference(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}const nonLazyContinuation$1={partial:!0,tokenize:tokenizeNonLazyContinuation$1},codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),markdownSpace(t)?factorySpace(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=s?(e.exit("codeFencedFenceSequence"),markdownSpace(t)?factorySpace(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||markdownLineEnding(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,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,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),markdownSpace(t)?factorySpace(e,c,"whitespace")(t):c(t))}function c(n){return null===n||markdownLineEnding(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(nonLazyContinuation$1,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||markdownLineEnding(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):markdownSpace(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),factorySpace(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||markdownLineEnding(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||markdownLineEnding(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return a>0&&markdownSpace(t)?factorySpace(e,m,"linePrefix",a+1)(t):m(t)}function m(t){return null===t||markdownLineEnding(t)?e.check(nonLazyContinuation$1,f,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||markdownLineEnding(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),g)}function y(n){return e.exit("codeFenced"),t(n)}}function tokenizeNonLazyContinuation$1(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"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),factorySpace(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):markdownLineEnding(t)?e.attempt(furtherStart,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||markdownLineEnding(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}function tokenizeFurtherStart(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):markdownLineEnding(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):factorySpace(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):markdownLineEnding(e)?o(e):n(e)}}const codeText={name:"codeText",previous:previous$1,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++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}function previous$1(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeCodeText(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,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?(o=e.enter("codeTextSequence"),r=0,c(t)):markdownLineEnding(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||markdownLineEnding(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}class SpliceBuffer{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 o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&chunkedPush(this.left,n),o.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),chunkedPush(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),chunkedPush(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);chunkedPush(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);chunkedPush(this.left,t.reverse())}}}function chunkedPush(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 subtokenize(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new SpliceBuffer(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,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,subcontent(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[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 splice(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function subcontent(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];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,A=0;const m=[A];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),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&&(A=p+1,m.push(A),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){const t=s.slice(m[p],m[p+1]),n=i.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 content$1={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(e){return subtokenize(e),e}function tokenizeContent(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?o(t):markdownLineEnding(t)?e.check(continuationConstruct,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function tokenizeContinuation(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),factorySpace(e,o,"linePrefix")};function o(o){if(null===o||markdownLineEnding(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function factoryDestination(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||asciiControl(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(i),e.consume(n),e.exit(i),e.exit(o),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||markdownLineEnding(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(o){return u||null!==o&&41!==o&&!markdownLineEndingOrSpace(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||asciiControl(o)?n(o):(e.consume(o),92===o?A:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function A(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function factoryLabel(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),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(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):markdownLineEnding(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||markdownLineEnding(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!markdownSpace(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function factoryTitle(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):markdownLineEnding(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),factorySpace(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||markdownLineEnding(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 normalizeIdentifier(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const definition={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return factoryLabel.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=normalizeIdentifier(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 markdownLineEndingOrSpace(t)?factoryWhitespace(e,s)(t):s(t)}function s(t){return factoryDestination(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(titleBefore,c,c)(t)}function c(t){return markdownSpace(t)?factorySpace(e,u,"whitespace")(t):u(t)}function u(i){return null===i||markdownLineEnding(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}function tokenizeTitleBefore(e,t,n){return function(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,r)(t):n(t)};function r(t){return factoryTitle(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return markdownSpace(t)?factorySpace(e,i,"whitespace")(t):i(t)}function i(e){return null===e||markdownLineEnding(e)?t(e):n(e)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return markdownLineEnding(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},splice(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}function tokenizeHeadingAtx(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||markdownLineEndingOrSpace(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||markdownLineEnding(n)?(e.exit("atxHeading"),t(n)):markdownSpace(n)?factorySpace(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||markdownLineEndingOrSpace(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}const htmlBlockNames=["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"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 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)),e}function tokenizeHtmlFlow(e,t,n){const r=this;let o,i,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),i=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:M):asciiAlpha(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,p):asciiAlpha(i)?(e.consume(i),o=4,r.interrupt?t:M):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:M):n(o)}function p(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:S:p):n(o)}function f(t){return asciiAlpha(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||markdownLineEndingOrSpace(s)){const l=47===s,c=a.toLowerCase();return l||i||!htmlRawNames.includes(c)?htmlBlockNames.includes(a.toLowerCase())?(o=6,l?(e.consume(s),A):r.interrupt?t(s):S(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?m(s):g(s)):(o=1,r.interrupt?t(s):S(s))}return 45===s||asciiAlphanumeric(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function A(o){return 62===o?(e.consume(o),r.interrupt?t:S):n(o)}function m(t){return markdownSpace(t)?(e.consume(t),m):$(t)}function g(t){return 47===t?(e.consume(t),$):58===t||95===t||asciiAlpha(t)?(e.consume(t),y):markdownSpace(t)?(e.consume(t),g):$(t)}function y(t){return 45===t||46===t||58===t||95===t||asciiAlphanumeric(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),b):markdownSpace(t)?(e.consume(t),v):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):markdownSpace(t)?(e.consume(t),b):w(t)}function x(t){return t===l?(e.consume(t),l=null,C):null===t||markdownLineEnding(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||markdownLineEndingOrSpace(t)?v(t):(e.consume(t),w)}function C(e){return 47===e||62===e||markdownSpace(e)?g(e):n(e)}function $(t){return 62===t?(e.consume(t),_):n(t)}function _(t){return null===t||markdownLineEnding(t)?S(t):markdownSpace(t)?(e.consume(t),_):n(t)}function S(t){return 45===t&&2===o?(e.consume(t),B):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),M):93===t&&5===o?(e.consume(t),L):!markdownLineEnding(t)||6!==o&&7!==o?null===t||markdownLineEnding(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),S):(e.exit("htmlFlowData"),e.check(blankLineBefore,N,E)(t))}function E(t){return e.check(nonLazyContinuationStart,k,N)(t)}function k(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||markdownLineEnding(t)?E(t):(e.enter("htmlFlowData"),S(t))}function B(t){return 45===t?(e.consume(t),M):S(t)}function T(t){return 47===t?(e.consume(t),a="",I):S(t)}function I(t){if(62===t){const n=a.toLowerCase();return htmlRawNames.includes(n)?(e.consume(t),D):S(t)}return asciiAlpha(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),I):S(t)}function L(t){return 93===t?(e.consume(t),M):S(t)}function M(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),M):S(t)}function D(t){return null===t||markdownLineEnding(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),D)}function N(n){return e.exit("htmlFlow"),t(n)}}function tokenizeNonLazyContinuationStart(e,t,n){const r=this;return function(t){if(markdownLineEnding(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function tokenizeBlankLineBefore(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(blankLine,t,n)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(e,t,n){const r=this;let o,i,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),b):63===t?(e.consume(t),y):asciiAlpha(t)?(e.consume(t),C):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):asciiAlpha(t)?(e.consume(t),g):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):markdownLineEnding(t)?(a=u,I(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?T(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),A):markdownLineEnding(t)?(a=h,I(t)):(e.consume(t),h)}function A(t){return 93===t?(e.consume(t),m):h(t)}function m(t){return 62===t?T(t):93===t?(e.consume(t),m):h(t)}function g(t){return null===t||62===t?T(t):markdownLineEnding(t)?(a=g,I(t)):(e.consume(t),g)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):markdownLineEnding(t)?(a=y,I(t)):(e.consume(t),y)}function v(e){return 62===e?T(e):y(e)}function b(t){return asciiAlpha(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||asciiAlphanumeric(t)?(e.consume(t),x):w(t)}function w(t){return markdownLineEnding(t)?(a=w,I(t)):markdownSpace(t)?(e.consume(t),w):T(t)}function C(t){return 45===t||asciiAlphanumeric(t)?(e.consume(t),C):47===t||62===t||markdownLineEndingOrSpace(t)?$(t):n(t)}function $(t){return 47===t?(e.consume(t),T):58===t||95===t||asciiAlpha(t)?(e.consume(t),_):markdownLineEnding(t)?(a=$,I(t)):markdownSpace(t)?(e.consume(t),$):T(t)}function _(t){return 45===t||46===t||58===t||95===t||asciiAlphanumeric(t)?(e.consume(t),_):S(t)}function S(t){return 61===t?(e.consume(t),E):markdownLineEnding(t)?(a=S,I(t)):markdownSpace(t)?(e.consume(t),S):$(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,k):markdownLineEnding(t)?(a=E,I(t)):markdownSpace(t)?(e.consume(t),E):(e.consume(t),P)}function k(t){return t===o?(e.consume(t),o=void 0,B):null===t?n(t):markdownLineEnding(t)?(a=k,I(t)):(e.consume(t),k)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||markdownLineEndingOrSpace(t)?$(t):(e.consume(t),P)}function B(e){return 47===e||62===e||markdownLineEndingOrSpace(e)?$(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return markdownSpace(t)?factorySpace(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),a(t)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(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}}return e.length!==n.length&&splice(e,0,e.length,n),e}function resolveToLabelEnd(e,t){let n,r,o,i,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(o){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&&(o=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[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=push$1(i,e.slice(r+1,r+s+3)),i=push$1(i,[["enter",u,t]]),i=push$1(i,resolveAll(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=push$1(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=push$1(i,e.slice(o+1)),i=push$1(i,[["exit",l,t]]),splice(e,r,e.length,i),e}function tokenizeLabelEnd(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize({start:o.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(resourceConstruct,c,i?c:u)(t):91===t?e.attempt(referenceFullConstruct,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(referenceCollapsedConstruct,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}function tokenizeResource(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,o)(t):o(t)}function o(t){return 41===t?c(t):factoryDestination(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?factoryTitle(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(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)}}function tokenizeReferenceFull(e,t,n){const r=this;return function(t){return factoryLabel.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}function tokenizeReferenceCollapsed(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 labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(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"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),factorySpace(e,t,"linePrefix")}}const thematicBreak={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||markdownLineEnding(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),markdownSpace(t)?factorySpace(e,i,"whitespace")(t):i(t))}}const list$5={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:asciiDigit(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(thematicBreak,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 asciiDigit(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(blankLine,r.interrupt?n:c,e.attempt(listItemPrefixWhitespaceConstruct,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return markdownSpace(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}function tokenizeListContinuation(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(blankLine,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,factorySpace(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!markdownSpace(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(indentConstruct,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,factorySpace(e,e.attempt(list$5,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function tokenizeIndent$1(e,t,n){const r=this;return factorySpace(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}function tokenizeListEnd(e){e.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(e,t,n){const r=this;return factorySpace(e,function(e){const o=r.events[r.events.length-1];return!markdownSpace(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function tokenizeSetextUnderline(e,t,n){const r=this;let o;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"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),markdownSpace(t)?factorySpace(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||markdownLineEnding(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:"gfmFootnoteCall",tokenize:tokenizeGfmFootnoteCall},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][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(o){if(!a||!a._balanced)return n(o);const s=normalizeIdentifier(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function resolveToPotentialGfmFootnoteCall(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function tokenizeGfmFootnoteCall(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,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&&!i||null===s||91===s||markdownLineEndingOrSpace(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(normalizeIdentifier(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return markdownLineEndingOrSpace(s)||(i=!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 tokenizeDefinitionStart(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,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||markdownLineEndingOrSpace(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=normalizeIdentifier(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return markdownLineEndingOrSpace(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"),o.includes(i)||o.push(i),factorySpace(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function tokenizeDefinitionContinuation(e,t,n){return e.check(blankLine,t,e.attempt(indent,t,n))}function gfmFootnoteDefinitionEnd(e){e.exit("gfmFootnoteDefinition")}function tokenizeIndent(e,t,n){const r=this;return factorySpace(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)}class EditMap{constructor(){this.map=[]}add(e,t,n){addImplementation(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 addImplementation(e,t,n,r){let o=0;if(0!==n||0!==r.length){for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}}function gfmTableAlign(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function gfmTable$1(){return{flow:{null:{name:"table",tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(e,t,n){const r=this;let o,i=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 o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?b:s;if(i===b&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):markdownLineEnding(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):markdownSpace(t)?factorySpace(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||markdownLineEndingOrSpace(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"),o=!1,markdownSpace(t)?factorySpace(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?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return markdownSpace(t)?factorySpace(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),A):45===t?(a+=1,A(t)):null===t||markdownLineEnding(t)?y(t):v(t)}function A(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):v(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(t))}function g(t){return markdownSpace(t)?factorySpace(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||markdownLineEnding(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function b(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||markdownLineEnding(n)?(e.exit("tableRow"),t(n)):markdownSpace(n)?factorySpace(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||markdownLineEndingOrSpace(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?C:w)}function C(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function resolveTable(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new EditMap;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(flushTableEnd(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(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,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],o=flushCell(p,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=flushCell(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=flushCell(p,t,l,s,i,o)):0!==c[1]&&(o=flushCell(p,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&flushTableEnd(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=gfmTableAlign(t.events,i))}return e}function flushCell(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},getPoint(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=getPoint(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=getPoint(t.events,n[2]),i=getPoint(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[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!==o&&(i.end=Object.assign({},getPoint(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function flushTableEnd(e,t,n,r,o){const i=[],a=getPoint(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function getPoint(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const mathFlow={tokenize:tokenizeMathFenced,concrete:!0,name:"mathFlow"},nonLazyContinuation={tokenize:tokenizeNonLazyContinuation,partial:!0};function tokenizeMathFenced(e,t,n){const r=this,o=r.events[r.events.length-1],i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let a=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),s(t)};function s(t){return 36===t?(e.consume(t),a++,s):a<2?n(t):(e.exit("mathFlowFenceSequence"),factorySpace(e,l,"whitespace")(t))}function l(t){return null===t||markdownLineEnding(t)?u(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return null===t||markdownLineEnding(t)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),u(t)):36===t?n(t):(e.consume(t),c)}function u(n){return e.exit("mathFlowFence"),r.interrupt?t(n):e.attempt(nonLazyContinuation,d,A)(n)}function d(t){return e.attempt({tokenize:m,partial:!0},A,p)(t)}function p(t){return(i?factorySpace(e,f,"linePrefix",i+1):f)(t)}function f(t){return null===t?A(t):markdownLineEnding(t)?e.attempt(nonLazyContinuation,d,A)(t):(e.enter("mathFlowValue"),h(t))}function h(t){return null===t||markdownLineEnding(t)?(e.exit("mathFlowValue"),f(t)):(e.consume(t),h)}function A(n){return e.exit("mathFlow"),t(n)}function m(e,t,n){let o=0;return factorySpace(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),i(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return 36===t?(o++,e.consume(t),i):o<a?n(t):(e.exit("mathFlowFenceSequence"),factorySpace(e,s,"whitespace")(t))}function s(r){return null===r||markdownLineEnding(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}}function tokenizeNonLazyContinuation(e,t,n){const r=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function mathText(e){let t={}.singleDollarTextMath;return null==t&&(t=!0),{tokenize:function(e,n,r){let o,i,a=0;return function(t){return e.enter("mathText"),e.enter("mathTextSequence"),s(t)};function s(n){return 36===n?(e.consume(n),a++,s):a<2&&!t?r(n):(e.exit("mathTextSequence"),l(n))}function l(t){return null===t?r(t):36===t?(i=e.enter("mathTextSequence"),o=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):markdownLineEnding(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("mathTextData"),c(t))}function c(t){return null===t||32===t||36===t||markdownLineEnding(t)?(e.exit("mathTextData"),l(t)):(e.consume(t),c)}function u(t){return 36===t?(e.consume(t),o++,u):o===a?(e.exit("mathTextSequence"),e.exit("mathText"),n(t)):(i.type="mathTextData",c(t))}},resolve:resolveMathText,previous:previous,name:"mathText"}}function resolveMathText(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("mathTextData"===e[t][1].type){e[r][1].type="mathTextPadding",e[o][1].type="mathTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++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="mathTextData",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}function previous(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}function math(e){return{flow:{36:mathFlow},text:{36:mathText()}}}const hasOwnProperty$1={}.hasOwnProperty;function combineExtensions(e){const t={};let n=-1;for(;++n<e.length;)syntaxExtension(t,e[n]);return t}function syntaxExtension(e,t){let n;for(n in t){const r=(hasOwnProperty$1.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){hasOwnProperty$1.call(r,i)||(r[i]=[]);const e=o[i];constructs(r[i],Array.isArray(e)?e:e?[e]:[])}}}function constructs(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);splice(e,0,0,r)}const content={tokenize:initializeContent};function initializeContent(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"),factorySpace(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,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):markdownLineEnding(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}const document$3={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[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 o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}g(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return splice(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(containerConstruct,u,d)(o)}function u(e){return r&&y(),g(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(containerConstruct,f,h)(n)}function f(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&y(),g(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),A(n))}function A(n){return null===n?(m(e.exit("chunkFlow"),!0),g(0),void e.consume(n)):markdownLineEnding(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),A)}function m(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=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<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(g(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;splice(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function g(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}function tokenizeContainer(e,t,n){return factorySpace(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const flow$1={tokenize:initializeFlow};function initializeFlow(e){const t=this,n=e.attempt(blankLine,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,factorySpace(e,e.attempt(this.parser.constructs.flow,r,e.attempt(content$1,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 resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$2=initializeFactory("text");function initializeFactory(e){return{resolveAll:createResolver("text"===e?resolveAllLineSuffixes:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(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"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function createResolver(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function resolveAllLineSuffixes(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],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[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)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||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={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const document$2={42:list$5,43:list$5,45:list$5,48:list$5,49:list$5,50:list$5,51:list$5,52:list$5,53:list$5,54:list$5,55:list$5,56:list$5,57:list$5,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak,45:[setextUnderline,thematicBreak],60:htmlFlow,61:setextUnderline,95:thematicBreak,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$1={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink$2,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:attentionMarkers,contentInitial:contentInitial,disable:disable,document:document$2,flow:flow,flowInitial:flowInitial,insideSpan:insideSpan,string:string,text:text$1},Symbol.toStringTag,{value:"Module"}));function createTokenizer(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 o={},i=[];let a=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(A),consume:function(e){markdownLineEnding(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:m(A,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return serializeChunks(d(e),t)},sliceStream:d,write:function(e){if(a=push$1(a,e),f(),null!==a[a.length-1])return[];return g(t,0),c.events=resolveAll(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return sliceChunks(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}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 A(e,t){t.restore()}function m(e,t){return function(n,o,i){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?i:A(e[u])}function A(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return g();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,m,g)(n)}}function m(t){return e(d,f),o}function g(e){return f.restore(),++u<a.length?A(a[u]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&splice(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 o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function sliceChunks(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function serializeChunks(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){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&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}function parse$9(e){const t={constructs:combineExtensions([defaultConstructs,...(e||{}).extensions||[]]),content:n(content),defined:[],document:n(document$3),flow:n(flow$1),lazy:{},string:n(string$1),text:n(text$2)};return t;function n(e){return function(n){return createTokenizer(t,e,n)}}}function postprocess(e){for(;!subtokenize(e););return e}const search=/[\0\t\n\r]/g;function preprocess(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,p;o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);for(;u<o.length;){if(search.lastIndex=u,l=search.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.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(o.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}a&&(e&&s.push(-5),n&&s.push(n),s.push(null));return s}}function getText$1(e,t){return e.slice(t.start.offset,t.end.offset)}function getEvents$1(e,t={}){const n=[directive(),gfmAutolinkLiteral(),gfmFootnote(),gfmTable$1(),math(),...t.extensions||[]],r=[],o=labelEnd.tokenize;try{labelEnd.tokenize=function(t,n,i){const a=this,s=a.events;return o.call(a,t,n,t=>{let n=s.length;for(;--n>=0;){const e=s[n],[t,r]=e;if("enter"===t){const{type:e}=r;if("labelImage"===e||"labelLink"===e)break}}if(n>=0){const t=s[n],[,o]=t,i=s[s.length-1],[,l]=i,c={type:"undefinedReferenceShortcut",start:o.start,end:l.end},u={type:"undefinedReference",start:o.start,end:l.end},d=s.slice(n).filter(e=>{const[,t]=e,{type:n}=t;return"data"===n||"lineEnding"===n}),p=r.length>0&&r[r.length-1][0],f=p&&p[1];f&&f.end.line===c.start.line&&f.end.column===c.start.column&&(0===d.length?(f.type="undefinedReferenceCollapsed",f.end=l.end):(c.type="undefinedReferenceFull",c.start=f.start,r.pop()));const h=d.filter(e=>"enter"===e[0]).map(t=>getText$1(e,t[1])).join("").trim();if(h.length>0&&!h.includes("]")){const e=[];e.push(["enter",c,a],["enter",u,a]);for(const t of d){const[n,r]=t;e.push([n,{...r},a])}e.push(["exit",u,a],["exit",c,a]),r.push(e)}}return i(t)})};const i=void 0,a=!0,s=parse$9({...t,extensions:n}),l=preprocess()(e,i,a);return postprocess(s.document().write(l)).concat(...r)}finally{labelEnd.tokenize=o}}function parseInternal(e,t={},n={},r=0,o=void 0){const i=Boolean(t.freezeTokens),a=getEvents$1(e,n),s=[];let l=[];const c={type:"data",startLine:-1,startColumn:-1,endLine:-1,endColumn:-1,text:"ROOT",children:s,parent:null},u=[c];let d=c,p=null,f=null,h=!1;for(const A of a){const[a,s]=A,{type:m,start:g,end:y}=s,{column:v,line:b}=g,{column:x,line:w}=y,C=getText$1(e,s);if("enter"!==a||h)"exit"===a&&("htmlFlow"===m&&(h=!1),h||(i&&(Object.freeze(d.children),Object.freeze(d)),d=u.pop()));else{const i=d;if(u.push(i),d={type:m,startLine:b+r,startColumn:v,endLine:w+r,endColumn:x,text:C,children:[],parent:i===c?o||null:i},o&&Object.defineProperty(d,htmlFlowSymbol$1,{value:!0}),i.children.push(d),l.push(d),"htmlFlow"===d.type&&!micromarkHelpers.isHtmlFlowComment(d)){h=!0,p&&f||(p={...n,extensions:[{disable:{null:["codeIndented","htmlFlow"]}}]},f=e.split(newLineRe$1));const r=parseInternal(f.slice(d.startLine-1,d.endLine).join("\n"),t,p,d.startLine-1,d);d.children=r,l=l.concat(r[flatTokensSymbol$1])}}}return Object.defineProperty(s,flatTokensSymbol$1,{value:l}),i&&Object.freeze(s),s}function parse$8(e,t){return parseInternal(e,t)}const ignoredChildTypes=new Set(["codeFencedFence","definition","reference","resource"]),md044={names:["MD044","proper-names"],description:"Proper names should have the correct capitalization",tags:["spelling"],parser:"micromark",function:function(e,t){let n=e.config.names;if(n=Array.isArray(n)?n:[],n.sort((e,t)=>t.length-e.length||e.localeCompare(t)),0===n.length)return;const r=e.config.code_blocks,o=void 0===r||!!r,i=e.config.html_elements,a=void 0===i||!!i,s=new Set(["data"]);o&&(s.add("codeFlowValue"),s.add("codeTextData")),a&&(s.add("htmlFlowData"),s.add("htmlTextData"));const l=micromarkHelpers.filterByPredicate(e.parsers.micromark.tokens,e=>s.has(e.type),e=>e.children.filter(e=>!ignoredChildTypes.has(e.type))),c=[],u=new Set;for(const d of n){const e=escapeForRegExp(d),r=/^\W/.test(d)?"":"\\b_*",o=/\W$/.test(d)?"":"_*\\b",i=new RegExp(`(${r})(${e})${o}`,"gi");for(const a of l){let e=null;for(;null!==(e=i.exec(a.text));){const[,r,o]=e,i=a.startColumn+e.index+r.length,s=o.length,l=a.startLine,p={startLine:l,startColumn:i,endLine:l,endColumn:i+s-1};if(!n.includes(o)&&!c.some(e=>hasOverlap(e,p))){let e=[];u.has(a)||(e=micromarkHelpers.filterByTypes(parse$8(a.text),["literalAutolink"]).map(e=>({startLine:l,startColumn:a.startColumn+e.startColumn-1,endLine:l,endColumn:a.endColumn+e.endColumn-1})),c.push(...e),u.add(a)),e.some(e=>hasOverlap(e,p))||addErrorDetailIf_1(t,a.startLine,d,o,void 0,void 0,[i,s],{editColumn:i,deleteCount:s,insertText:d})}c.push(p)}}}}},altRe=getHtmlAttributeRe("alt"),ariaHiddenRe=getHtmlAttributeRe("aria-hidden"),md045={names:["MD045","no-alt-text"],description:"Images should have alternate text (alt text)",tags:["accessibility","images"],parser:"micromark",function:function(e,t){var n;const r=filterByTypesCached(["image"]);for(const i of r){if(micromarkHelpers.getDescendantsByType(i,["label","labelText"]).some(e=>0===e.text.length)){const e=i.startLine===i.endLine?[i.startColumn,i.endColumn-i.startColumn]:void 0;addError_1(t,i.startLine,void 0,void 0,e)}}const o=filterByTypesCached(["htmlText"],!0);for(const i of o){const{startColumn:e,startLine:r,text:o}=i,a=micromarkHelpers.getHtmlTagInfo(i);if(a&&!a.close&&"img"===a.name.toLowerCase()&&!altRe.test(o)&&"true"!==(null==(n=ariaHiddenRe.exec(o))?void 0:n[1].toLowerCase())){const n=[e,o.replace(nextLinesRe_1,"").length];addError_1(t,r,void 0,void 0,n)}}}},tokenTypeToStyle={codeFenced:"fenced",codeIndented:"indented"},md046={names:["MD046","code-block-style"],description:"Code block style",tags:["code"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(const r of filterByTypesCached(["codeFenced","codeIndented"])){const{startLine:e,type:o}=r;"consistent"===n&&(n=tokenTypeToStyle[o]),addErrorDetailIf_1(t,e,n,tokenTypeToStyle[o])}}},md047={names:["MD047","single-trailing-newline"],description:"Files should end with a single newline character",tags:["blank_lines"],parser:"none",function:function(e,t){const n=e.lines.length,r=e.lines[n-1];isBlankLine_1(r)||addError_1(t,n,void 0,void 0,[r.length,1],{insertText:"\n",editColumn:r.length+1})}};function fencedCodeBlockStyleFor(e){return"~"===e[0]?"tilde":"backtick"}const md048={names:["MD048","code-fence-style"],description:"Code fence style",tags:["code"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");const r=filterByTypesCached(["codeFenced"]);for(const o of r){const e=micromarkHelpers.getDescendantsByType(o,["codeFencedFence","codeFencedFenceSequence"])[0],{startLine:r,text:i}=e;"consistent"===n&&(n=fencedCodeBlockStyleFor(i)),addErrorDetailIf_1(t,r,n,fencedCodeBlockStyleFor(i))}}},intrawordRe=/^\w$/;function emphasisOrStrongStyleFor(e){return"*"===e[0]?"asterisk":"underscore"}const impl=(e,t,n,r,o,i,a="consistent")=>{const{lines:s,parsers:l}=e,c=micromarkHelpers.filterByPredicate(l.micromark.tokens,e=>e.type===n,e=>"htmlFlow"===e.type?[]:e.children);for(const u of c){const e=micromarkHelpers.getDescendantsByType(u,[r]),n=e[0],l=e[e.length-1];if(n&&l){const e=emphasisOrStrongStyleFor(n.text);if("consistent"===a&&(a=e),a!==e){if(!("underscore"===a&&(intrawordRe.test(s[n.startLine-1][n.startColumn-2])||intrawordRe.test(s[l.endLine-1][l.endColumn-1]))))for(const r of[n,l])addError_1(t,r.startLine,`Expected: ${a}; Actual: ${e}`,void 0,[r.startColumn,r.text.length],{editColumn:r.startColumn,deleteCount:r.text.length,insertText:"asterisk"===a?o:i})}}}},md049md050=[{names:["MD049","emphasis-style"],description:"Emphasis style",tags:["emphasis"],parser:"micromark",function:function(e,t){return impl(e,t,"emphasis","emphasisSequence","*","_",e.config.style||void 0)}},{names:["MD050","strong-style"],description:"Strong style",tags:["emphasis"],parser:"micromark",function:function(e,t){return impl(e,t,"strong","strongSequence","**","__",e.config.style||void 0)}}],idRe=getHtmlAttributeRe("id"),nameRe=getHtmlAttributeRe("name"),anchorRe=/\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu,lineFragmentRe=/^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/,childrenExclude=new Set(["image","reference","resource"]),tokensInclude=new Set(["characterEscapeValue","codeTextData","data","mathTextData"]);function convertHeadingToHTMLFragment(e){const t=micromarkHelpers.filterByPredicate(e.children,e=>tokensInclude.has(e.type),e=>childrenExclude.has(e.type)?[]:e.children).map(e=>e.text).join("");return"#"+encodeURIComponent(t.toLowerCase().replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,"").replace(/ /gu,"-"))}function unescapeStringTokenText(e){return micromarkHelpers.filterByTypes(e.children,["characterEscapeValue","data"]).map(e=>e.text).join("")}const md051={names:["MD051","link-fragments"],description:"Link fragments should be valid",tags:["links"],parser:"micromark",function:function(e,t){const n=e.config.ignore_case||!1,r=e.config.ignored_pattern||"",o=new RegExp(r||"^$"),i=new Map([["#top",0]]),a=filterByTypesCached(["atxHeadingText","setextHeadingText"]);for(const l of a){const e=convertHeadingToHTMLFragment(l);if("#"!==e){const t=i.get(e)||0;t&&i.set(`${e}-${t}`,0),i.set(e,t+1);let n=null;for(;null!==(n=anchorRe.exec(l.text));){const[,e]=n;i.has(e)||i.set(e,1)}}}for(const l of filterByTypesCached(["htmlText"],!0)){const e=micromarkHelpers.getHtmlTagInfo(l);if(e&&!e.close){const t=idRe.exec(l.text)||"a"===e.name.toLowerCase()&&nameRe.exec(l.text);t&&t.length>0&&i.set(`#${t[1]}`,0)}}const s=[["link","resourceDestinationString"],["definition","definitionDestinationString"]];for(const[l,c]of s){const e=filterByTypesCached([l]).filter(e=>{var t;return!("atxHeadingText"===(null==(t=e.parent)?void 0:t.type)&&micromarkHelpers.isDocfxTab(e.parent.parent))});for(const r of e){const e=micromarkHelpers.filterByTypes(r.children,[c]);for(const a of e){const{endColumn:e,startColumn:s}=a,l=unescapeStringTokenText(a),c=l.slice(1),u=`#${encodeURIComponent(c)}`;if(l.length>1&&l.startsWith("#")&&!i.has(u)&&!lineFragmentRe.test(u)&&!o.test(c)){let o,a,c;r.startLine===r.endLine&&(o=r.text,a=[r.startColumn,r.endColumn-r.startColumn],c={editColumn:s,deleteCount:e-s});const u=l.toLowerCase(),d=[...i.keys()].find(e=>u===e.toLowerCase());d?((c||{}).insertText=d,n||d===l||addError_1(t,r.startLine,`Expected: ${d}; Actual: ${l}`,o,a,c)):addError_1(t,r.startLine,void 0,o,a)}}}}}},md052={names:["MD052","reference-links-images"],description:"Reference links and images should use a label that is defined",tags:["images","links"],parser:"none",function:function(e,t){const{config:n,lines:r}=e,o=n.shortcut_syntax||!1,i=new Set(n.ignored_labels||["x"]),{definitions:a,references:s,shortcuts:l}=getReferenceLinkImageData(),c=o?[...s.entries(),...l.entries()]:s.entries();for(const u of c){const[e,n]=u;if(!a.has(e)&&!i.has(e))for(const o of n){const[n,i,a]=o,s=r[n].slice(i,i+a);addError_1(t,n+1,`Missing link or image reference definition: "${e}"`,s,[i+1,s.length])}}}},linkReferenceDefinitionRe=/^ {0,3}\[([^\]]*[^\\])\]:/,md053={names:["MD053","link-image-reference-definitions"],description:"Link and image reference definitions should be needed",tags:["images","links"],parser:"none",function:function(e,t){const n=new Set(e.config.ignored_definitions||["//"]),r=e.lines,{references:o,shortcuts:i,definitions:a,duplicateDefinitions:s}=getReferenceLinkImageData(),l=e=>e.replace(linkReferenceDefinitionRe,"").trim().length>0,c={deleteCount:-1};for(const u of a.entries()){const[e,[a]]=u;if(!n.has(e)&&!o.has(e)&&!i.has(e)){const n=r[a];addError_1(t,a+1,`Unused link or image reference definition: "${e}"`,ellipsify_1(n),[1,n.length],l(n)?c:void 0)}}for(const u of s){const[e,o]=u;if(!n.has(e)){const n=r[o];addError_1(t,o+1,`Duplicate link or image reference definition: "${e}"`,ellipsify_1(n),[1,n.length],l(n)?c:void 0)}}}},backslashEscapeRe=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,removeBackslashEscapes=e=>e.replace(backslashEscapeRe,"$1"),autolinkDisallowedRe=/[ <>]/,autolinkAble=e=>{try{new URL(e)}catch{return!1}return!autolinkDisallowedRe.test(e)},md054={names:["MD054","link-image-style"],description:"Link and image style",tags:["images","links"],parser:"micromark",function:(e,t)=>{var n,r,o,i;const a=e.config,s=void 0===a.autolink||!!a.autolink,l=void 0===a.inline||!!a.inline,c=void 0===a.full||!!a.full,u=void 0===a.collapsed||!!a.collapsed,d=void 0===a.shortcut||!!a.shortcut,p=void 0===a.url_inline||!!a.url_inline;if(s&&l&&c&&u&&d&&p)return;const{definitions:f}=getReferenceLinkImageData(),h=filterByTypesCached(["autolink","image","link"]);for(const A of h){let e=null,a=null;const{endColumn:h,endLine:m,startColumn:g,startLine:y,text:v,type:b}=A,x="image"===b;let w=!1;if("autolink"===b)a=null==(n=micromarkHelpers.getDescendantsByType(A,[["autolinkEmail","autolinkProtocol"]])[0])?void 0:n.text,e=a,w=!s&&Boolean(a);else if(e=micromarkHelpers.getDescendantsByType(A,["label","labelText"])[0].text,a=null==(r=micromarkHelpers.getDescendantsByType(A,["resource","resourceDestination",["resourceDestinationLiteral","resourceDestinationRaw"],"resourceDestinationString"])[0])?void 0:r.text,a){const t=null==(o=micromarkHelpers.getDescendantsByType(A,["resource","resourceTitle","resourceTitleString"])[0])?void 0:o.text;w=!l||!p&&s&&!x&&!t&&e===a&&autolinkAble(a)}else{const t=0===micromarkHelpers.getDescendantsByType(A,["reference"]).length,n=null==(i=micromarkHelpers.getDescendantsByType(A,["reference","referenceString"])[0])?void 0:i.text,r=void 0===n,o=f.get(n||e);a=o&&o[1],w=a&&(t?!d:r?!u:!c)}if(w){let n,r;if(y===m){n=[g,h-g];let t=null;const o=l&&e,i=s&&!x&&autolinkAble(a);if(!o||!p&&i)i&&(t=`<${removeBackslashEscapes(a)}>`);else{t=`${x?"!":""}[${e.replace(/[[\]]/g,"\\$&")}](${a.replace(/[()]/g,"\\$&")})`}t&&(r={editColumn:n[0],insertText:t,deleteCount:n[1]})}addErrorContext_1(t,y,v.replace(nextLinesRe_1,""),void 0,void 0,n,r)}}}},whitespaceTypes=new Set(["linePrefix","whitespace"]),ignoreWhitespace=e=>e.filter(e=>!whitespaceTypes.has(e.type)),firstOrNothing=e=>e[0],lastOrNothing=e=>e[e.length-1],makeRange$1=(e,t)=>[e,t-e+1],md055={names:["MD055","table-pipe-style"],description:"Table pipe style",tags:["table"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent"),r="no_leading_or_trailing"!==n&&"trailing_only"!==n,o="no_leading_or_trailing"!==n&&"leading_only"!==n;const i=filterByTypesCached(["tableDelimiterRow","tableRow"]);for(const a of i){const e=firstOrNothing(a.children),i="tableCellDivider"===firstOrNothing(ignoreWhitespace(e.children)).type,s=lastOrNothing(a.children),l="tableCellDivider"===lastOrNothing(ignoreWhitespace(s.children)).type,c=i?l?"leading_and_trailing":"leading_only":l?"trailing_only":"no_leading_or_trailing";"consistent"===n&&(n=c,r=i,o=l),i!==r&&addErrorDetailIf_1(t,e.startLine,n,c,(r?"Missing":"Unexpected")+" leading pipe",void 0,makeRange$1(a.startColumn,e.startColumn)),l!==o&&addErrorDetailIf_1(t,s.endLine,n,c,(o?"Missing":"Unexpected")+" trailing pipe",void 0,makeRange$1(s.endColumn-1,a.endColumn-1))}}},makeRange=(e,t)=>[e,t-e+1],md056={names:["MD056","table-column-count"],description:"Table column count",tags:["table"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["tableDelimiterRow","tableRow"]);let r=0,o=null;for(const i of n){const e=micromarkHelpers.getParentOfType(i,["table"]);o!==e&&(r=0,o=e);const n=i.children.filter(e=>["tableData","tableDelimiter","tableHeader"].includes(e.type)),a=n.length;let s,l;r||=a,a<r?(s="Too few cells, row will be missing data",l=[i.endColumn-1,1]):r<a&&(s="Too many cells, extra data will be missing",l=makeRange(n[r].startColumn,i.endColumn-1)),addErrorDetailIf_1(t,i.endLine,r,a,s,void 0,l)}}},md058={names:["MD058","blanks-around-tables"],description:"Tables should be surrounded by blank lines",tags:["table"],parser:"micromark",function:function(e,t){const{lines:n}=e,r=filterByTypesCached(["blockQuotePrefix","linePrefix"]),o=filterByTypesCached(["table"]);for(const i of o){const e=i.startLine;isBlankLine_1(n[e-2])||addErrorContext_1(t,e,n[e-1].trim(),void 0,void 0,void 0,{insertText:micromarkHelpers.getBlockQuotePrefixText(r,e)});const o=i.endLine;isBlankLine_1(n[o])||addErrorContext_1(t,o,n[o-1].trim(),void 0,void 0,void 0,{lineNumber:o+1,insertText:micromarkHelpers.getBlockQuotePrefixText(r,o)})}}},allowedChildrenTypes=new Set(["codeText","htmlText"]),defaultProhibitedTexts=["click here","here","link","more"];function normalize$1(e){return e.replace(/[\W_]+/g," ").replace(/\s+/g," ").toLowerCase().trim()}const md059={names:["MD059","descriptive-link-text"],description:"Link text should be descriptive",tags:["accessibility","links"],parser:"micromark",function:function(e,t){const n=new Set((e.config.prohibited_texts||defaultProhibitedTexts).map(normalize$1));if(n.size>0){const e=filterByTypesCached(["link"]);for(const r of e){const e=micromarkHelpers.getDescendantsByType(r,["label","labelText"]);for(const r of e){const{children:e,endColumn:o,endLine:i,parent:a,startColumn:s,startLine:l,text:c}=r;if(!e.some(e=>allowedChildrenTypes.has(e.type))&&n.has(normalize$1(c))){const e=l===i?[s,o-s]:void 0;addErrorContext_1(t,l,a.text,void 0,void 0,e)}}}}}},[md019,md021]=md019md021,[md049,md050]=md049md050,rules=[md001,md003,md004,md005,md007,md009,md010,md011,md012,md013,md014,md018,md019,md020,md021,md022,md023,md024,md025,md026,md027,md028,md029,md030,md031,md032,md033,md034,md035,md036,md037,md038,md039,md040,md041,md042,md043,md044,md045,md046,md047,md048,md049,md050,md051,md052,md053,md054,md055,md056,md058,md059];for(const Wp of rules){const e=Wp.names[0].toLowerCase();Wp.information=new URL(`${homepage}/blob/v${version}/doc/${e}.md`)}function parseConfiguration(e,t,n){let r=null,o=null;const i=[];let a=0;return(n||[JSON.parse]).every(e=>{try{const n=e(t);return r=n&&"object"==typeof n&&!Array.isArray(n)?n:{},!1}catch(n){i.push(`Parser ${a++}: ${n.message}`)}return!0})&&(i.unshift(`Unable to parse '${e}'`),o=i.join("; ")),{config:r,message:o}}function validateRuleList(e,t){let n=null;if(e.length===rules.length)return n;const r={};for(const[o,i]of e.entries()){let e=function(e,n){return new Error(`Property '${e}' of custom rule at index ${t} is incorrect: '${n}'.`)};const t=o-rules.length;for(const r of["names","tags"]){const t=i[r];n||t&&Array.isArray(t)&&0!==t.length&&t.every(isString_1)&&!t.some(isEmptyString_1)||(n=e(r,t))}for(const r of[["description","string"],["function","function"]]){const t=r[0],o=i[t];n||o&&typeof o===r[1]||(n=e(t,o))}if(n||void 0===i.parser||"markdownit"===i.parser||"micromark"===i.parser||"none"===i.parser||(n=e("parser",i.parser)),n||!i.information||isUrl_1(i.information)||(n=e("information",i.information)),n||void 0===i.asynchronous||"boolean"==typeof i.asynchronous||(n=e("asynchronous",i.asynchronous)),!n&&i.asynchronous,!n){for(const e of i.names){const o=e.toUpperCase();n||void 0===r[o]||(n=new Error("Name '"+e+"' of custom rule at index "+t+" is already used as a name or tag.")),r[o]=!0}for(const e of i.tags){const o=e.toUpperCase();!n&&r[o]&&(n=new Error("Tag '"+e+"' of custom rule at index "+t+" is already used as a name.")),r[o]=!1}}}return n}function newResults(e){const t={};return Object.defineProperty(t,"toString",{value:function(n){let r=null;const o=[],i=Object.keys(t);i.sort();for(const a of i){const i=t[a];if(Array.isArray(i))for(const e of i){const t=e.ruleNames?e.ruleNames.join("/"):e.ruleName+"/"+e.ruleAlias;o.push(a+": "+e.lineNumber+": "+t+" "+e.ruleDescription+(e.errorDetail?" ["+e.errorDetail+"]":"")+(e.errorContext?' [Context: "'+e.errorContext+'"]':""))}else{if(!r){r={};for(const t of e){r[t.names[0].toUpperCase()]=t}}for(const[e,t]of Object.entries(i)){const i=r[e.toUpperCase()];for(const e of t){const t=Math.min(n?1:0,i.names.length-1),r=a+": "+e+": "+i.names[t]+" "+i.description;o.push(r)}}}}return o.join("\n")}}),t}function removeFrontMatter(e,t){let n=[];if(t){const r=e.match(t);if(r&&!r.index){const t=r[0];e=e.slice(t.length),n=t.split(newLineRe_1),n.length>0&&""===n[n.length-1]&&n.length--}}return{content:e,frontMatterLines:n}}function mapAliasToRuleNames(e){const t={};for(const n of e){const e=n.names[0].toUpperCase();for(const r of n.names){t[r.toUpperCase()]=[e]}for(const r of n.tags){const n=r.toUpperCase(),o=t[n]||[];o.push(e),t[n]=o}}return t}function getEffectiveConfig(e,t,n){const r=Object.keys(t).filter(e=>"DEFAULT"===e.toUpperCase()),o=0===r.length||!!t[r[0]],i={};for(const a of e){i[a.names[0].toUpperCase()]=o}for(const a of Object.keys(t)){let e=t[a];e?e instanceof Object||(e={}):e=!1;const r=a.toUpperCase();for(const t of n[r]||[])i[t]=e}return i}function getEnabledRulesPerLineNumber(e,t,n,r,o,i,a){let s={},l={};const c=[],u=new Array(1+n.length);function d(e,t,n){for(const[o,i]of e.entries()){if(!r){let e=null;for(;e=inlineCommentStartRe_1.exec(i);){const n=e[2].toUpperCase(),r=e.index+e[1].length,a=i.indexOf("--\x3e",r);if(-1===a)break;t(n,i.slice(r,a),o+1)}}n&&n()}}function p(e,t,n){n={...n};const r=e.startsWith("ENABLE"),o=t&&t.trim(),i=o?o.toUpperCase().split(/\s+/):c;for(const s of i)for(const e of a[s]||[])n[e]=r;return n}d([t.join("\n")],function(e,t){if("CONFIGURE-FILE"===e){const{config:e}=parseConfiguration("CONFIGURE-FILE",t,i);e&&(o={...o,...e})}});const f=getEffectiveConfig(e,o,a);for(const A of e){const e=A.names[0].toUpperCase();c.push(e),s[e]=!!f[e]}l=s,d(t,function(e,t){"ENABLE-FILE"!==e&&"DISABLE-FILE"!==e||(s=p(e,t,s))}),d(t,function(e,t){"CAPTURE"===e?l=s:"RESTORE"===e?s=l:"ENABLE"!==e&&"DISABLE"!==e||(s=p(e,t,s))},function(){u.push(s)}),d(t,function(e,t,r){const o="DISABLE-NEXT-LINE"===e;if("DISABLE-LINE"===e||o){const i=n.length+r+(o?1:0);u[i]=p(e,t,u[i])}});const h=[];for(const[A,m]of c.entries())u.some(e=>e[m])&&h.push(e[A]);return{effectiveConfig:f,enabledRulesPerLineNumber:u,enabledRuleList:h}}function lintContent(e,t,n,r,o,i,a,s,l,c,u,d,p){const f=e=>p(e instanceof Error?e:new Error(e)),h=removeFrontMatter(r=r.replace(/^\uFEFF/,""),s),{frontMatterLines:A}=h;r=h.content;const{effectiveConfig:m,enabledRulesPerLineNumber:g,enabledRuleList:y}=getEnabledRulesPerLineNumber(e,r.split(newLineRe_1),A,c,i,a,t),v=y.some(e=>"markdownit"===e.parser||void 0===e.parser),b=y.some(e=>"micromark"===e.parser),x=e.length!==rules.length,w=b?parse$8(r,{freezeTokens:x}):[],C=r,$=(r=clearHtmlCommentText(r)).split(newLineRe_1),_=e=>{const t=Object.freeze({markdownit:Object.freeze({tokens:e})}),r=Object.freeze({micromark:Object.freeze({tokens:w})}),o=Object.freeze({}),i={name:n,version:version,lines:Object.freeze($),frontMatterLines:Object.freeze(A)};initialize({...i,parsers:r,config:null});let a=[];const s=s=>{const c=s.names[0].toUpperCase(),u={};let d=o;void 0===s.parser?(u.tokens=e,d=t):"markdownit"===s.parser?d=t:"micromark"===s.parser&&(d=r);const p={...i,...u,parsers:d,config:m[c]};function f(e){throw new Error(`Value of '${e}' passed to onError by '${c}' is incorrect for '${n}'.`)}function h(e){(!e||!isNumber_1(e.lineNumber)||e.lineNumber<1||e.lineNumber>$.length)&&f("lineNumber");const t=e.lineNumber+A.length;if(!g[t][c])return;e.detail&&!isString_1(e.detail)&&f("detail"),e.context&&!isString_1(e.context)&&f("context"),e.information&&!isUrl_1(e.information)&&f("information"),e.range&&(!Array.isArray(e.range)||2!==e.range.length||!isNumber_1(e.range[0])||e.range[0]<1||!isNumber_1(e.range[1])||e.range[1]<1||e.range[0]+e.range[1]-1>$[e.lineNumber-1].length)&&f("range");const n=e.fixInfo,r={};if(n){isObject_1(n)||f("fixInfo"),void 0!==n.lineNumber&&((!isNumber_1(n.lineNumber)||n.lineNumber<1||n.lineNumber>$.length)&&f("fixInfo.lineNumber"),r.lineNumber=n.lineNumber+A.length);const t=n.lineNumber||e.lineNumber;void 0!==n.editColumn&&((!isNumber_1(n.editColumn)||n.editColumn<1||n.editColumn>$[t-1].length+1)&&f("fixInfo.editColumn"),r.editColumn=n.editColumn),void 0!==n.deleteCount&&((!isNumber_1(n.deleteCount)||n.deleteCount<-1||n.deleteCount>$[t-1].length)&&f("fixInfo.deleteCount"),r.deleteCount=n.deleteCount),void 0!==n.insertText&&(isString_1(n.insertText)||f("fixInfo.insertText"),r.insertText=n.insertText)}const o=e.information||s.information;a.push({lineNumber:t,ruleName:s.names[0],ruleNames:s.names,ruleDescription:s.description,ruleInformation:o?o.href:null,errorDetail:e.detail||null,errorContext:e.context||null,errorRange:e.range?[...e.range]:null,fixInfo:n?r:null})}const y=e=>h({lineNumber:1,detail:`This rule threw an exception: ${e.message||e}`}),v=()=>s.function(p,h);if(s.asynchronous){const e=Promise.resolve().then(v);return l?e.catch(y):e}try{v()}catch(b){if(!l)throw b;y(b)}return null},c=y.filter(e=>e.asynchronous),d=y.filter(e=>!e.asynchronous),h=[...c,...d],v=()=>p(null,(()=>{if(a.sort((e,t)=>e.ruleName.localeCompare(t.ruleName)||e.lineNumber-t.lineNumber),u<3){const e={ruleName:null,lineNumber:-1};a=a.filter((t,n,r)=>{delete t.fixInfo;const o=r[n-1]||e;return t.ruleName!==o.ruleName||t.lineNumber!==o.lineNumber})}if(0===u){const e={};for(const t of a){const n=e[t.ruleName]||[];n.push(t.lineNumber),e[t.ruleName]=n}a=e}else if(1===u)for(const e of a)e.ruleAlias=e.ruleNames[1]||e.ruleName,delete e.ruleNames;else for(const e of a)delete e.ruleName;return a})());try{const e=h.map(s);c.length>0?Promise.all(e.slice(0,c.length)).then(v).catch(f):v()}catch(b){f(b)}finally{initialize()}};if(!v||d){const e=v?deferRequire.requireMarkdownItCjs().getMarkdownItTokens(o(),C,$):[];_(e)}else Promise.all([__vitePreload(()=>import("./markdownit-BIaVjXBV.js").then(e=>e.m),[]),new Promise(e=>e(o()))]).then(([e,t])=>{const n=e.getMarkdownItTokens(t,C,$);_(n)}).catch(f)}function lintFile(e,t,n,r,o,i,a,s,l,c,u,d,p){u.readFile(n,"utf8",function(u,f){return u?p(u):lintContent(e,t,n,f,r,o,i,a,s,l,c,d,p)})}function lintInput(e,t,n){n=n||function(){};const r=[(e=e||{}).customRules||[]].flat().map(e=>({names:cloneIfArray_1(e.names),description:e.description,information:cloneIfUrl_1(e.information),tags:cloneIfArray_1(e.tags),parser:e.parser,asynchronous:e.asynchronous,function:e.function})),o=rules.concat(r),i=validateRuleList(o,t);if(i)return void n(i);let a=[];Array.isArray(e.files)?a=[...e.files]:e.files&&(a=[String(e.files)]);const s=e.strings||{},l=Object.keys(s),c=e.config||{default:!0},u=e.configParsers||void 0,d=void 0===e.frontMatter?frontMatterRe:e.frontMatter,p=!!e.handleRuleFailures,f=!!e.noInlineConfig,h=void 0===e.resultVersion?3:e.resultVersion,A=e.markdownItFactory||(()=>{throw new Error("The option 'markdownItFactory' was required (due to the option 'customRules' including a rule requiring the 'markdown-it' parser), but 'markdownItFactory' was not set.")}),m=e.fs||fs,g=mapAliasToRuleNames(o),y=newResults(o);let v=!1,b=0;function x(){let e=null;function r(t,r){return b--,t?(v=!0,n(t)):(y[e]=r,x(),null)}if(v);else if(a.length>0)b++,e=a.shift(),lintFile(o,g,e,A,c,u,d,p,f,h,m,t,r);else if(e=l.shift())b++,lintContent(o,g,e,s[e]||"",A,c,u,d,p,f,h,t,r);else if(0===b)return v=!0,n(null,y);return null}x(),x(),x(),x(),x(),x(),x(),x()}function lintAsync(e,t){return lintInput(e,!1,t)}function lintPromise(e){return new Promise((t,n)=>{lintAsync(e,(e,r)=>{e||!r?n(e):t(r)})})}function normalizeFixInfo(e,t=0){return{lineNumber:e.lineNumber||t,editColumn:e.editColumn||1,deleteCount:e.deleteCount||0,insertText:e.insertText||""}}function applyFix(e,t,n="\n"){const{editColumn:r,deleteCount:o,insertText:i}=normalizeFixInfo(t),a=r-1;return-1===o?null:e.slice(0,a)+i.replace(/\n/g,n)+e.slice(a+o)}function applyFixes(e,t){const n=getPreferredLineEnding_1(e,os),r=e.split(newLineRe_1);let o=t.filter(e=>e.fixInfo).map(e=>normalizeFixInfo(e.fixInfo,e.lineNumber));o.sort((e,t)=>{const n=-1===e.deleteCount,r=-1===t.deleteCount;return t.lineNumber-e.lineNumber||(n?1:r?-1:0)||t.editColumn-e.editColumn||t.insertText.length-e.insertText.length});let i={};o=o.filter(e=>{const t=e.lineNumber!==i.lineNumber||e.editColumn!==i.editColumn||e.deleteCount!==i.deleteCount||e.insertText!==i.insertText;return i=e,t}),i={lineNumber:-1};for(const l of o)l.lineNumber===i.lineNumber&&l.editColumn===i.editColumn&&!l.insertText&&l.deleteCount>0&&i.insertText&&!i.deleteCount&&(l.insertText=i.insertText,i.lineNumber=0),i=l;o=o.filter(e=>e.lineNumber);let a=-1,s=-1;for(const l of o){const{lineNumber:e,editColumn:t,deleteCount:o}=l,i=e-1,c=t-1;(i!==a||-1===o||c+o<=s-(o>0?0:1))&&(r[i]=applyFix(r[i],l,n)),a=i,s=c}return r.filter(e=>null!==e).join(n)}function _getDefaults(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _defaults=_getDefaults();function changeDefaults(e){_defaults=e}var noopTest={exec:()=>null};function edit(e,t=""){let n="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(other.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var other={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},newline$1=/^(?:[ \t]*(?:\n|$))+/,blockCode=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fences=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr$1=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading$1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bullet=/(?:[*+-]|\d{1,9}[.)])/,lheadingCore=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lheading$1=edit(lheadingCore).replace(/bull/g,bullet).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lheadingGfm=edit(lheadingCore).replace(/bull/g,bullet).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_paragraph=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,blockText=/^[^\n]+/,_blockLabel=/(?!\s*\])(?:\\.|[^\[\]\\])+/,def=edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_blockLabel).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),list$4=edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bullet).getRegex(),_tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_comment=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,html=edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_comment).replace("tag",_tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),paragraph$1=edit(_paragraph).replace("hr",hr$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockquote$1=edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",paragraph$1).getRegex(),blockNormal={blockquote:blockquote$1,code:blockCode,def:def,fences:fences,heading:heading$1,hr:hr$1,html:html,lheading:lheading$1,list:list$4,newline:newline$1,paragraph:paragraph$1,table:noopTest,text:blockText},gfmTable=edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockGfm={...blockNormal,lheading:lheadingGfm,table:gfmTable,paragraph:edit(_paragraph).replace("hr",hr$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gfmTable).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex()},blockPedantic={...blockNormal,html:edit("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(_paragraph).replace("hr",hr$1).replace("heading"," *#{1,6} *[^\n]").replace("lheading",lheading$1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape$2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,inlineCode=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br=/^( {2,}|\\)\n(?!\s*$)/,inlineText=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_punctuation=/[\p{P}\p{S}]/u,_punctuationOrSpace=/[\s\p{P}\p{S}]/u,_notPunctuationOrSpace=/[^\s\p{P}\p{S}]/u,punctuation=edit(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_punctuationOrSpace).getRegex(),_punctuationGfmStrongEm=/(?!~)[\p{P}\p{S}]/u,_punctuationOrSpaceGfmStrongEm=/(?!~)[\s\p{P}\p{S}]/u,_notPunctuationOrSpaceGfmStrongEm=/(?:[^\s\p{P}\p{S}]|~)/u,blockSkip=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,emStrongLDelimCore=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,emStrongLDelim=edit(emStrongLDelimCore,"u").replace(/punct/g,_punctuation).getRegex(),emStrongLDelimGfm=edit(emStrongLDelimCore,"u").replace(/punct/g,_punctuationGfmStrongEm).getRegex(),emStrongRDelimAstCore="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",emStrongRDelimAst=edit(emStrongRDelimAstCore,"gu").replace(/notPunctSpace/g,_notPunctuationOrSpace).replace(/punctSpace/g,_punctuationOrSpace).replace(/punct/g,_punctuation).getRegex(),emStrongRDelimAstGfm=edit(emStrongRDelimAstCore,"gu").replace(/notPunctSpace/g,_notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g,_punctuationOrSpaceGfmStrongEm).replace(/punct/g,_punctuationGfmStrongEm).getRegex(),emStrongRDelimUnd=edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_notPunctuationOrSpace).replace(/punctSpace/g,_punctuationOrSpace).replace(/punct/g,_punctuation).getRegex(),anyPunctuation=edit(/\\(punct)/,"gu").replace(/punct/g,_punctuation).getRegex(),autolink$1=edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_inlineComment=edit(_comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),tag=edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",_inlineComment).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_inlineLabel=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,link$1=edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_inlineLabel).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),reflink=edit(/^!?\[(label)\]\[(ref)\]/).replace("label",_inlineLabel).replace("ref",_blockLabel).getRegex(),nolink=edit(/^!?\[(ref)\](?:\[\])?/).replace("ref",_blockLabel).getRegex(),reflinkSearch=edit("reflink|nolink(?!\\()","g").replace("reflink",reflink).replace("nolink",nolink).getRegex(),inlineNormal={_backpedal:noopTest,anyPunctuation:anyPunctuation,autolink:autolink$1,blockSkip:blockSkip,br:br,code:inlineCode,del:noopTest,emStrongLDelim:emStrongLDelim,emStrongRDelimAst:emStrongRDelimAst,emStrongRDelimUnd:emStrongRDelimUnd,escape:escape$2,link:link$1,nolink:nolink,punctuation:punctuation,reflink:reflink,reflinkSearch:reflinkSearch,tag:tag,text:inlineText,url:noopTest},inlinePedantic={...inlineNormal,link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",_inlineLabel).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_inlineLabel).getRegex()},inlineGfm={...inlineNormal,emStrongRDelimAst:emStrongRDelimAstGfm,emStrongLDelim:emStrongLDelimGfm,url:edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},inlineBreaks={...inlineGfm,br:edit(br).replace("{2,}","*").getRegex(),text:edit(inlineGfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},block$3={normal:blockNormal,gfm:blockGfm,pedantic:blockPedantic},inline$1={normal:inlineNormal,gfm:inlineGfm,breaks:inlineBreaks,pedantic:inlinePedantic},escapeReplacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},getEscapeReplacement=e=>escapeReplacements[e];function escape2(e,t){if(t){if(other.escapeTest.test(e))return e.replace(other.escapeReplace,getEscapeReplacement)}else if(other.escapeTestNoEncode.test(e))return e.replace(other.escapeReplaceNoEncode,getEscapeReplacement);return e}function cleanUrl(e){try{e=encodeURI(e).replace(other.percentDecode,"%")}catch{return null}return e}function splitCells(e,t){var n;const r=e.replace(other.findPipe,(e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"}).split(other.splitPipe);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!(null==(n=r.at(-1))?void 0:n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(other.slashPipe,"|");return r}function rtrim(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){if(e.charAt(r-o-1)!==t)break;o++}return e.slice(0,r-o)}function findClosingBracket(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function outputLink(e,t,n,r,o){const i=t.href,a=t.title||null,s=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function indentCodeCompensation(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(null===r)return t;const o=r[1];return t.split("\n").map(e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=o.length?e.slice(o.length):e}).join("\n")}var _Tokenizer=class{options;rules;lexer;constructor(e){this.options=e||_defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:rtrim(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=indentCodeCompensation(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=rtrim(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:rtrim(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=rtrim(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const i=[];let a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))i.push(e[a]),t=!0;else{if(t)break;i.push(e[a])}e=e.slice(a);const s=i.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${s}`:s,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o.at(-1);if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){const t=u,i=t.raw+"\n"+e.join("\n"),a=this.blockquote(i);o[o.length-1]=a,n=n.substring(0,n.length-t.raw.length)+a.raw,r=r.substring(0,r.length-t.text.length)+a.text;break}if("list"===(null==u?void 0:u.type)){const t=u,i=t.raw+"\n"+e.join("\n"),a=this.list(i);o[o.length-1]=a,n=n.substring(0,n.length-u.raw.length)+a.raw,r=r.substring(0,r.length-t.raw.length)+a.raw,e=i.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let a=!1;for(;e;){let n=!1,r="",s="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],u=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){const p=e.split("\n",1)[0];let f;if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(t.test(c))break;if(n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(u)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(i.test(l))break;if(n.test(l))break;s+="\n"+c}u||c.trim()||(u=!0),r+=p+"\n",e=e.substring(p.length+1),l=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0));let p,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),o.raw+=r}const s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){var t;const n=this.rules.block.table.exec(e);if(!n)return;if(!this.rules.other.tableDelimiter.test(n[2]))return;const r=splitCells(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(null==(t=n[3])?void 0:t.trim())?n[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(const e of o)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<r.length;e++)a.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:a.align[e]});for(const e of i)a.rows.push(splitCells(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=rtrim(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=findClosingBracket(t[2],"()");if(-2===e)return;if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),outputLink(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return outputLink(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,i,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=n[0],r="mailto:"+e;else{let o;do{o=n[0],n[0]=(null==(t=this.rules.inline._backpedal.exec(n[0]))?void 0:t[0])??""}while(o!==n[0]);e=n[0],r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},_Lexer=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_defaults,this.options.tokenizer=this.options.tokenizer||new _Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:other,block:block$3.normal,inline:inline$1.normal};this.options.pedantic?(t.block=block$3.pedantic,t.inline=inline$1.pedantic):this.options.gfm&&(t.block=block$3.gfm,this.options.breaks?t.inline=inline$1.breaks:t.inline=inline$1.gfm),this.tokenizer.rules=t}static get rules(){return{block:block$3,inline:inline$1}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(other.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var r,o,i;for(this.options.pedantic&&(e=e.replace(other.tabCharGlobal," ").replace(other.spaceLine,""));e;){let a;if(null==(o=null==(r=this.options.extensions)?void 0:r.block)?void 0:o.some(n=>!!(a=n.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);const n=t.at(-1);1===a.raw.length&&void 0!==n?n.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.text,this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null==(i=this.options.extensions)?void 0:i.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){const r=t.at(-1);n&&"paragraph"===(null==r?void 0:r.type)?(r.raw+="\n"+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a),n=s.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var n,r,o;let i=e,a=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(i));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(i));)i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,l="";for(;e;){let a;if(s||(l=""),s=!1,null==(r=null==(n=this.options.extensions)?void 0:n.inline)?void 0:r.some(n=>!!(a=n.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const n=t.at(-1);"text"===a.type&&"text"===(null==n?void 0:n.type)?(n.raw+=a.raw,n.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,i,l)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let c=e;if(null==(o=this.options.extensions)?void 0:o.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(a=this.tokenizer.inlineText(c)){e=e.substring(a.raw.length),"_"!==a.raw.slice(-1)&&(l=a.raw.slice(-1)),s=!0;const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=a.raw,n.text+=a.text):t.push(a);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},_Renderer=class{options;parser;constructor(e){this.options=e||_defaults}space(e){return""}code({text:e,lang:t,escaped:n}){var r;const o=null==(r=(t||"").match(other.notSpaceStart))?void 0:r[0],i=e.replace(other.endingNewline,"")+"\n";return o?'<pre><code class="language-'+escape2(o)+'">'+(n?i:escape2(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:escape2(i,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let i=0;i<e.items.length;i++){const t=e.items[i];r+=this.listitem(t)}const o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(e){var t;let n="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+escape2(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`<li>${n}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let r="";for(let o=0;o<e.rows.length;o++){const t=e.rows[o];n="";for(let e=0;e<t.length;e++)n+=this.tablecell(t[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${escape2(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),o=cleanUrl(e);if(null===o)return r;let i='<a href="'+(e=o)+'"';return t&&(i+=' title="'+escape2(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const o=cleanUrl(e);if(null===o)return escape2(n);let i=`<img src="${e=o}" alt="${n}"`;return t&&(i+=` title="${escape2(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:escape2(e.text)}},_TextRenderer=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},_Parser=class e{options;renderer;textRenderer;constructor(e){this.options=e||_defaults,this.options.renderer=this.options.renderer||new _Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _TextRenderer}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){var n,r;let o="";for(let i=0;i<e.length;i++){const a=e[i];if(null==(r=null==(n=this.options.extensions)?void 0:n.renderers)?void 0:r[a.type]){const e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){o+=t||"";continue}}const s=a;switch(s.type){case"space":o+=this.renderer.space(s);continue;case"hr":o+=this.renderer.hr(s);continue;case"heading":o+=this.renderer.heading(s);continue;case"code":o+=this.renderer.code(s);continue;case"table":o+=this.renderer.table(s);continue;case"blockquote":o+=this.renderer.blockquote(s);continue;case"list":o+=this.renderer.list(s);continue;case"html":o+=this.renderer.html(s);continue;case"paragraph":o+=this.renderer.paragraph(s);continue;case"text":{let n=s,r=this.renderer.text(n);for(;i+1<e.length&&"text"===e[i+1].type;)n=e[++i],r+="\n"+this.renderer.text(n);o+=t?this.renderer.paragraph({type:"paragraph",raw:r,text:r,tokens:[{type:"text",raw:r,text:r,escaped:!0}]}):r;continue}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}parseInline(e,t=this.renderer){var n,r;let o="";for(let i=0;i<e.length;i++){const a=e[i];if(null==(r=null==(n=this.options.extensions)?void 0:n.renderers)?void 0:r[a.type]){const e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){o+=e||"";continue}}const s=a;switch(s.type){case"escape":case"text":o+=t.text(s);break;case"html":o+=t.html(s);break;case"link":o+=t.link(s);break;case"image":o+=t.image(s);break;case"strong":o+=t.strong(s);break;case"em":o+=t.em(s);break;case"codespan":o+=t.codespan(s);break;case"br":o+=t.br(s);break;case"del":o+=t.del(s);break;default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}},_Hooks=class{options;block;constructor(e){this.options=e||_defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?_Lexer.lex:_Lexer.lexInline}provideParser(){return this.block?_Parser.parse:_Parser.parseInline}},Marked=class{defaults=_getDefaults();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=_Parser;Renderer=_Renderer;TextRenderer=_TextRenderer;Lexer=_Lexer;Tokenizer=_Tokenizer;Hooks=_Hooks;constructor(...e){this.use(...e)}walkTokens(e,t){var n,r;let o=[];for(const i of e)switch(o=o.concat(t.call(this,i)),i.type){case"table":{const e=i;for(const n of e.header)o=o.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)o=o.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=i;o=o.concat(this.walkTokens(e.items,t));break}default:{const e=i;(null==(r=null==(n=this.defaults.extensions)?void 0:n.childTokens)?void 0:r[e.type])?this.defaults.extensions.childTokens[e.type].forEach(n=>{const r=e[n].flat(1/0);o=o.concat(this.walkTokens(r,t))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){const t=this.defaults.renderer||new _Renderer(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,o=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new _Hooks;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,o=e.hooks[r],i=t[r];_Hooks.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then(e=>i.call(t,e));const n=o.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _Lexer.lex(e,t??this.defaults)}parser(e,t){return _Parser.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const r={...n},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const a=o.hooks?o.hooks.provideLexer():e?_Lexer.lex:_Lexer.lexInline,s=o.hooks?o.hooks.provideParser():e?_Parser.parse:_Parser.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(e=>a(e,o)).then(e=>o.hooks?o.hooks.processAllTokens(e):e).then(e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then(()=>e):e).then(e=>s(e,o)).then(e=>o.hooks?o.hooks.postprocess(e):e).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let e=a(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=s(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(e2){return i(e2)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+escape2(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},markedInstance=new Marked;function marked(e,t){return markedInstance.parse(e,t)}async function downloadMarkdown(e){if(!e)return void console.warn("No content provided for PDF export");const t=await(async()=>{try{const{content:t}=await lintPromise({strings:{content:e}});if(!t.length)return e;return applyFixes(e,t)||e}catch(t){return console.error("Markdown linting failed:",t),e}})();let n;marked.setOptions({breaks:!0,gfm:!0});try{n=await marked.parse(t)}catch(i){return void console.error("Markdown parsing failed:",i)}const r=document.createElement("div");r.innerHTML=n,r.style.padding="20px",r.style.fontFamily="Arial, sans-serif",r.style.fontSize="12pt",r.style.lineHeight="1.5";r.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(e=>{e.style.color="#2196f3",e.style.fontSize="1.5em",e.style.paddingTop="8px",e.style.paddingBottom="8px"});r.querySelectorAll("strong").forEach(e=>{e.style.fontWeight="bold",e.style.display="inline"});r.querySelectorAll("p").forEach(e=>{e.style.marginBottom="12px"});r.querySelectorAll("hr").forEach(e=>{e.style.marginTop="8px",e.style.marginBottom="16px",e.style.border="0",e.style.borderTop="1px solid #e0e0e0"});const o={margin:[.5,.5,.5,.5],filename:"document.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}};try{await html2pdf().from(r).set(o).output("blob").then(e=>{const t=URL.createObjectURL(e),n=ioc.routerService.listen(()=>{URL.revokeObjectURL(t),n()});ioc.layoutService.downloadFile(t,"document.pdf")})}catch(a){console.error("PDF generation failed:",a)}}marked.options=marked.setOptions=function(e){return markedInstance.setOptions(e),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked},marked.getDefaults=_getDefaults,marked.defaults=_defaults,marked.use=function(...e){return markedInstance.use(...e),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked},marked.walkTokens=function(e,t){return markedInstance.walkTokens(e,t)},marked.parseInline=markedInstance.parseInline,marked.Parser=_Parser,marked.parser=_Parser.parse,marked.Renderer=_Renderer,marked.TextRenderer=_TextRenderer,marked.Lexer=_Lexer,marked.lexer=_Lexer.lex,marked.Tokenizer=_Tokenizer,marked.Hooks=_Hooks,marked.parse=marked,marked.options,marked.setOptions,marked.use,marked.walkTokens,marked.parseInline,_Parser.parse,_Lexer.lex;class MarkdownHelperService{loggerService=YS(TYPES.loggerService);buildMarkdownFromFields=(e,t,n={})=>{this.loggerService.log("markdownHelperService buildMarkdownFromFields",{fields:e,data:t});const r=[],{visible:o}=nI(e,t,n,n.permissions),i=new Set(o),a=e=>{if(i.has(e))if(e.type!==Mn$1.Typography){if(e.type===Mn$1.Text){const o=e.compute?e.compute(t,n):e.name?lodashExports.get(t,e.name):void 0,i=e.title;if(o){const e=String(o);r.push(i?`**${i}:** ${e}`:e)}return}if(e.fields)for(const t of e.fields)a(t);e.child&&a(e.child)}else e.placeholder&&r.push(`\n## ${e.placeholder}\n`)};for(const s of e)a(s);return r.join("\n")};printFields=async(e,t,n={})=>{this.loggerService.log("markdownHelperService printFields",{fields:e,data:t});const r=this.buildMarkdownFromFields(e,t,n);await downloadMarkdown(r)}}class ExplorerHelperService{loggerService=YS(TYPES.loggerService);*deepFlat(e){this.loggerService.log("explorerHelperService deepFlat");const t=new Set,n=[...e];for(;n.length;){const e=n.pop();t.has(e)||(t.add(e),"directory"===e.type&&n.push(...e.nodes),yield e)}}}zS(TYPES.errorService,()=>new ErrorService),zS(TYPES.alertService,()=>new AlertService),zS(TYPES.layoutService,()=>new LayoutService),zS(TYPES.loggerService,()=>new LoggerService),zS(TYPES.routerService,()=>new RouterService),zS(TYPES.linkService,()=>new LinkService),zS(TYPES.symbolGlobalService,()=>new SymbolGlobalService),zS(TYPES.priceGlobalService,()=>new PriceGlobalService),zS(TYPES.backtestGlobalService,()=>new BacktestGlobalService),zS(TYPES.liveGlobalService,()=>new LiveGlobalService),zS(TYPES.replGlobalService,()=>new ReplGlobalService),zS(TYPES.explorerHelperService,()=>new ExplorerHelperService),zS(TYPES.markdownHelperService,()=>new MarkdownHelperService),zS(TYPES.exchangeMockService,()=>new ExchangeMockService),zS(TYPES.notificationMockService,()=>new NotificationMockService),zS(TYPES.storageMockService,()=>new StorageMockService),zS(TYPES.logMockService,()=>new LogMockService),zS(TYPES.statusMockService,()=>new StatusMockService),zS(TYPES.markdownMockService,()=>new MarkdownMockService),zS(TYPES.explorerMockService,()=>new ExplorerMockService),zS(TYPES.signalMockService,()=>new SignalMockService),zS(TYPES.heatMockService,()=>new HeatMockService),zS(TYPES.performanceMockService,()=>new PerformanceMockService),zS(TYPES.environmentMockService,()=>new EnvironmentMockService),zS(TYPES.setupMockService,()=>new SetupMockService),zS(TYPES.runtimeMockService,()=>new RuntimeMockService),zS(TYPES.exchangeViewService,()=>new ExchangeViewService),zS(TYPES.notificationViewService,()=>new NotificationViewService),zS(TYPES.storageViewService,()=>new StorageViewService),zS(TYPES.logViewService,()=>new LogViewService),zS(TYPES.statusViewService,()=>new StatusViewService),zS(TYPES.markdownViewService,()=>new MarkdownViewService),zS(TYPES.explorerViewService,()=>new ExplorerViewService),zS(TYPES.signalViewService,()=>new SignalViewService),zS(TYPES.heatViewService,()=>new HeatViewService),zS(TYPES.performanceViewService,()=>new PerformanceViewService),zS(TYPES.environmentViewService,()=>new EnvironmentViewService),zS(TYPES.setupViewService,()=>new SetupViewService),zS(TYPES.runtimeViewService,()=>new RuntimeViewService);const baseServices={errorService:YS(TYPES.errorService),layoutService:YS(TYPES.layoutService),loggerService:YS(TYPES.loggerService),routerService:YS(TYPES.routerService),alertService:YS(TYPES.alertService),linkService:YS(TYPES.linkService)},globalServices={symbolGlobalService:YS(TYPES.symbolGlobalService),priceGlobalService:YS(TYPES.priceGlobalService),backtestGlobalService:YS(TYPES.backtestGlobalService),liveGlobalService:YS(TYPES.liveGlobalService),replGlobalService:YS(TYPES.replGlobalService)},helperServices={explorerHelperService:YS(TYPES.explorerHelperService),markdownHelperService:YS(TYPES.markdownHelperService)},mockServices={exchangeMockService:YS(TYPES.exchangeMockService),notificationMockService:YS(TYPES.notificationMockService),storageMockService:YS(TYPES.storageMockService),logMockService:YS(TYPES.logMockService),statusMockService:YS(TYPES.statusMockService),markdownMockService:YS(TYPES.markdownMockService),explorerMockService:YS(TYPES.explorerMockService),signalMockService:YS(TYPES.signalMockService),heatMockService:YS(TYPES.heatMockService),performanceMockService:YS(TYPES.performanceMockService),environmentMockService:YS(TYPES.environmentMockService),setupMockService:YS(TYPES.setupMockService),runtimeMockService:YS(TYPES.runtimeMockService)},viewServices={exchangeViewService:YS(TYPES.exchangeViewService),notificationViewService:YS(TYPES.notificationViewService),storageViewService:YS(TYPES.storageViewService),logViewService:YS(TYPES.logViewService),statusViewService:YS(TYPES.statusViewService),markdownViewService:YS(TYPES.markdownViewService),explorerViewService:YS(TYPES.explorerViewService),signalViewService:YS(TYPES.signalViewService),heatViewService:YS(TYPES.heatViewService),performanceViewService:YS(TYPES.performanceViewService),environmentViewService:YS(TYPES.environmentViewService),setupViewService:YS(TYPES.setupViewService),runtimeViewService:YS(TYPES.runtimeViewService)},ioc={...baseServices,...globalServices,...helperServices,...mockServices,...viewServices};ioc.routerService.listen(({action:e,location:t})=>{"/error_page"!==t.pathname&&"/offline_page"!==t.pathname&&"PUSH"===e&&console.clear()}),window.addEventListener("unhandledrejection",e=>{ioc.errorService.handleGlobalError(new Error(e.reason))}),window.addEventListener("error",e=>{ioc.errorService.handleGlobalError(new Error(mL(e)))}),Object.assign(window,{ioc:ioc});const AUTO_HIDE_DURATION=5e3,AlertProvider=({children:e})=>{const[t,n]=reactExports.useState(ioc.alertService.current);return Xf(()=>ioc.alertService.reloadSubject.subscribe(()=>{n(ioc.alertService.current)})),factory$1(Fragment,{children:[!!t&&factory$1(Snackbar,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:t.pin?void 0:AUTO_HIDE_DURATION,onClose:t.pin?void 0:ioc.alertService.hideCurrent,sx:{zIndex:9999999},message:t.message},t.key),e]})},createRedirect=e=>()=>factory$1(Dw,{handler:async()=>{await e()},height:"calc(100vh - 80px)"}),getMainRoute=async()=>new URL(location.href,location.origin).searchParams.has("pine")?"/pine_page":"/main",join$1=(...e)=>(e=e.flat(1)).flatMap(e=>Array.isArray(e)?join$1(e):e).filter(Boolean),str=(...e)=>join$1(...e).join(" ");str.newline=(...e)=>join$1(...e).join("\n"),str.space=(...e)=>join$1(...e).join(" "),str.comma=(...e)=>join$1(...e).join(", "),str.dot=(...e)=>join$1(...e).join(". "),str.semicolon=(...e)=>join$1(...e).join(";"),str.table=(...e)=>`| ${join$1(...e).join(" | ")} |`;const useStyles$t=makeStyles()(e=>({root:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:9999,background:e.palette.background.default,height:"100vh",width:"100vw",display:"flex",alignItems:"center",flexDirection:"column",gap:20,padding:15},container:{position:"relative",overflow:"clip",minWidth:375,maxWidth:375,padding:15},reveal:{width:"auto !important"}})),ERROR_LABEL="Data is outdated. Please refresh the page",OFFLINE_LABEL="Disconnected from server",ErrorView=({onLine:e=navigator.onLine})=>{const{classes:t}=useStyles$t();return factory$1(mx,{children:factory$1(Box$1,{className:t.root,children:factory$1(Box$1,{className:t.reveal,children:factory$1(Paper,{className:t.container,children:factory$1(Stack,{direction:"column",gap:"15px",children:[factory$1("span",{children:e?ERROR_LABEL:OFFLINE_LABEL}),factory$1(Button,{variant:"contained",onClick:()=>window.location.reload(),children:e?"Reload page":"Reconnect"})]})})})})})},ErrorPage=()=>factory$1(ErrorView,{}),AccountBalance=createSvgIcon$1([factory$1("path",{d:"m6.29 6 5.21-2.74L16.71 6z",opacity:".3"},"0"),factory$1("path",{d:"M6.5 10h-2v7h2v-7zm6 0h-2v7h2v-7zm8.5 9H2v2h19v-2zm-2.5-9h-2v7h2v-7zm-7-9L2 6v2h19V6l-9.5-5zM6.29 6l5.21-2.74L16.71 6H6.29z"},"1")],"AccountBalanceTwoTone"),Analytics=createSvgIcon$1([factory$1("path",{d:"M5 5h14v14H5z",opacity:".3"},"0"),factory$1("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"},"1"),factory$1("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"2")],"AnalyticsTwoTone"),ArrowBack=createSvgIcon$1(factory$1("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),ArrowForward=createSvgIcon$1(factory$1("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),Cancel=createSvgIcon$1(factory$1("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel"),Close=createSvgIcon$1(factory$1("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),CopyAll=createSvgIcon$1(factory$1("path",{d:"M18 2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H9V4h9v12zM3 15v-2h2v2H3zm0-5.5h2v2H3v-2zM10 20h2v2h-2v-2zm-7-1.5v-2h2v2H3zM5 22c-1.1 0-2-.9-2-2h2v2zm3.5 0h-2v-2h2v2zm5 0v-2h2c0 1.1-.9 2-2 2zM5 6v2H3c0-1.1.9-2 2-2z"}),"CopyAll"),DataObject=createSvgIcon$1(factory$1("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7zm17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4h-1z"}),"DataObject"),Description=createSvgIcon$1(factory$1("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"}),"Description"),DonutSmall=createSvgIcon$1([factory$1("path",{d:"M15.99 9h3.43C18.6 7 17 5.4 15 4.58v3.43c.37.28.71.62.99.99zM4 12c0 3.35 2.04 6.24 5 7.42v-3.44c-1.23-.93-2-2.4-2-3.99C7 10.4 7.77 8.93 9 8V4.58C6.04 5.76 4 8.65 4 12zm11 3.99v3.43c2-.82 3.6-2.42 4.42-4.42h-3.43c-.28.37-.62.71-.99.99z",opacity:".3"},"0"),factory$1("path",{d:"M14.82 11h7.13c-.47-4.72-4.23-8.48-8.95-8.95v7.13c.85.31 1.51.97 1.82 1.82zM15 4.58C17 5.4 18.6 7 19.42 9h-3.43c-.28-.37-.62-.71-.99-.99V4.58zM2 12c0 5.19 3.95 9.45 9 9.95v-7.13C9.84 14.4 9 13.3 9 12c0-1.3.84-2.4 2-2.82V2.05c-5.05.5-9 4.76-9 9.95zm7-7.42v3.44c-1.23.92-2 2.39-2 3.98 0 1.59.77 3.06 2 3.99v3.44C6.04 18.24 4 15.35 4 12c0-3.35 2.04-6.24 5-7.42zm4 10.24v7.13c4.72-.47 8.48-4.23 8.95-8.95h-7.13c-.31.85-.97 1.51-1.82 1.82zm2 1.17c.37-.28.71-.61.99-.99h3.43C18.6 17 17 18.6 15 19.42v-3.43z"},"1")],"DonutSmallTwoTone"),Download=createSvgIcon$1(factory$1("path",{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}),"Download"),ErrorIcon=createSvgIcon$1(factory$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error"),Fullscreen=createSvgIcon$1(factory$1("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"Fullscreen"),FullscreenExit=createSvgIcon$1(factory$1("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit"),GitHub=createSvgIcon$1(factory$1("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),HourglassTop=createSvgIcon$1(factory$1("path",{d:"m6 2 .01 6L10 12l-3.99 4.01L6 22h12v-6l-4-4 4-3.99V2H6zm10 14.5V20H8v-3.5l4-4 4 4z"}),"HourglassTop"),Info=createSvgIcon$1(factory$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info"),Layers=createSvgIcon$1([factory$1("path",{d:"M6.26 9 12 13.47 17.74 9 12 4.53z",opacity:".3"},"0"),factory$1("path",{d:"m19.37 12.8-7.38 5.74-7.37-5.73L3 14.07l9 7 9-7zM12 2 3 9l1.63 1.27L12 16l7.36-5.73L21 9l-9-7zm0 11.47L6.26 9 12 4.53 17.74 9 12 13.47z"},"1")],"LayersTwoTone"),LiveTv=createSvgIcon$1(factory$1("path",{d:"M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"}),"LiveTv"),ManageSearch=createSvgIcon$1(factory$1("path",{d:"M7 9H2V7h5v2zm0 3H2v2h5v-2zm13.59 7-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L22 17.59 20.59 19zM17 11c0-1.65-1.35-3-3-3s-3 1.35-3 3 1.35 3 3 3 3-1.35 3-3zM2 19h10v-2H2v2z"}),"ManageSearch"),NotificationImportant=createSvgIcon$1(factory$1("path",{d:"M18 16v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-5 0h-2v-2h2v2zm0-4h-2V8h2v4zm-1 10c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2z"}),"NotificationImportant"),PictureAsPdf=createSvgIcon$1(factory$1("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"}),"PictureAsPdf"),PlayArrow=createSvgIcon$1(factory$1("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),Print=createSvgIcon$1(factory$1("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"}),"Print"),ReportProblem=createSvgIcon$1(factory$1("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"ReportProblem"),RequestQuote=createSvgIcon$1([factory$1("path",{d:"M6 20V4h7v4h5v12H6zm5-1h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4v-2h-2V9h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1z",opacity:".3"},"0"),factory$1("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v4h5v12H6zm5-1h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4v-2h-2V9h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1z"},"1")],"RequestQuoteTwoTone"),Schedule=createSvgIcon$1([factory$1("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},"0"),factory$1("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule"),Search=createSvgIcon$1(factory$1("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),SwapVert=createSvgIcon$1(factory$1("path",{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"}),"SwapVert"),Timeline=createSvgIcon$1(factory$1("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline"),TrendingDown=createSvgIcon$1(factory$1("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}),"TrendingDown"),TrendingUp=createSvgIcon$1(factory$1("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}),"TrendingUp"),Warning$4=createSvgIcon$1(factory$1("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),baseRoutes=[{path:"/error_page",noHeader:!0,element:ErrorPage},{path:"/pine_page",noHeader:!0,element:QI(()=>__vitePreload(()=>import("./index-xnM4Hc3g.js"),[]))}],dashboardRoutes=[{path:"/main",element:QI(()=>__vitePreload(()=>import("./index-Kb9MP8oH.js"),__vite__mapDeps([0,1,2])))},{path:"/about",element:QI(()=>__vitePreload(()=>import("./index-C8ijdPgO.js"),__vite__mapDeps([3,4,5,2,6])))},{path:"/about/setup",element:QI(()=>__vitePreload(()=>import("./index-C8ijdPgO.js"),__vite__mapDeps([3,4,5,2,6])))},{path:"/overview",element:QI(()=>__vitePreload(()=>import("./index-xD1NB5cz.js"),__vite__mapDeps([7,2,6,8,9])))},{path:"/dashboard",tabs:[{label:"Backtest Measures",description:str.newline("KPI metrics computed from historical backtest simulation runs.","Includes success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:()=>!0,icon:HourglassTop,path:"/dashboard/backtest",navigate:()=>ioc.routerService.push("/dashboard/backtest")},{label:"Live Measures",description:str.newline("KPI metrics collected from real-time live trading activity.","Tracks live success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:()=>!1,icon:LiveTv,path:"/dashboard/live",navigate:()=>ioc.routerService.push("/dashboard/live")}],element:QI(()=>__vitePreload(()=>import("./index-DS8hcHEz.js"),__vite__mapDeps([10,8,2,6])))},{path:"/dashboard/:mode",tabs:[{label:"Backtest Measures",description:str.newline("KPI metrics computed from historical backtest simulation runs.","Includes success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:({routeParams:e})=>"backtest"===e.mode,icon:HourglassTop,path:"/dashboard/backtest",navigate:()=>ioc.routerService.push("/dashboard/backtest")},{label:"Live Measures",description:str.newline("KPI metrics collected from real-time live trading activity.","Tracks live success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:({routeParams:e})=>"live"===e.mode,icon:LiveTv,path:"/dashboard/live",navigate:()=>ioc.routerService.push("/dashboard/live")}],element:QI(()=>__vitePreload(()=>import("./index-DS8hcHEz.js"),__vite__mapDeps([10,8,2,6])))},{path:"/notifications",element:QI(()=>__vitePreload(()=>import("./index--6o4qI0k.js"),__vite__mapDeps([11,2,6])))},{path:"/logs",element:QI(()=>__vitePreload(()=>import("./index-B0dOv27L.js"),__vite__mapDeps([12,13,2,6])))},{path:"/status",element:QI(()=>__vitePreload(()=>import("./index-D-QQ3ARh.js"),__vite__mapDeps([14,4,8,2,6,9])))},{path:"/status/:id",element:QI(()=>__vitePreload(()=>import("./index-D-QQ3ARh.js"),__vite__mapDeps([14,4,8,2,6,9])))},{path:"/report",element:QI(()=>__vitePreload(()=>import("./index-C65iKnLV.js"),__vite__mapDeps([15,4,8,2,6])))},{path:"/dump",element:QI(()=>__vitePreload(()=>import("./index-DfAakW_X.js"),__vite__mapDeps([16,4,9,13,2,6])))},{path:"/dump/:search",element:QI(()=>__vitePreload(()=>import("./index-DfAakW_X.js"),__vite__mapDeps([16,4,9,13,2,6])))},{path:"/heat",element:QI(()=>__vitePreload(()=>import("./index-BxYTS9U5.js"),__vite__mapDeps([17,4,1,8,5,2,6])))},{path:"/price_chart",element:QI(()=>__vitePreload(()=>import("./index-BfCHul3t.js"),__vite__mapDeps([18,4,8,2,6])))},{path:"/price_chart/:symbol",element:QI(()=>__vitePreload(()=>import("./index-BfCHul3t.js"),__vite__mapDeps([18,4,8,2,6])))},{path:"/price_chart/:symbol/:interval",element:QI(()=>__vitePreload(()=>import("./index-BfCHul3t.js"),__vite__mapDeps([18,4,8,2,6])))}],routes$m=[{path:"/",element:createRedirect(async()=>{ioc.routerService.push(await getMainRoute())})},...baseRoutes,...dashboardRoutes],getRouteItem=(()=>{let e=null,t=null;return()=>{const{pathname:n}=ioc.routerService.location;return e!==n&&(t=GS(routes$m,ioc.routerService.location.pathname),e=n),t}})();window.getRouteItem=getRouteItem;const IconWrapper=({icon:e,color:t})=>{const n=reactExports.useMemo(()=>alpha$2(lighten(t,.5),.42),[t]);return factory$1(Box$1,{sx:{background:n,padding:"6px",marginTop:"6px",marginBottom:"6px",marginLeft:"-2px",marginRight:"12px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:factory$1(e,{sx:{color:t}})})};var Warning$3={},_interopRequireDefault$1=interopRequireDefaultExports;Object.defineProperty(Warning$3,"__esModule",{value:!0});var default_1$1=Warning$3.default=void 0,_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=require$$2$1,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");default_1$1=Warning$3.default=_default$1;const Context=reactExports.createContext(null);function useUniquePrefix(){const[e,t]=reactExports.useState(null);return reactExports.useEffect(()=>{t(`mui-p-${Math.round(1e5*Math.random())}`)},[]),e}function TabContext(e){const{children:t,value:n}=e,r=useUniquePrefix(),o=reactExports.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return factory$1(Context.Provider,{value:o,children:t})}function useTabContext(){return reactExports.useContext(Context)}function getPanelId(e,t){const{idPrefix:n}=e;return null===n?null:`${e.idPrefix}-P-${t}`}function getTabId(e,t){const{idPrefix:n}=e;return null===n?null:`${e.idPrefix}-T-${t}`}const _excluded=["children"],TabList=reactExports.forwardRef(function(e,t){const{children:n}=e,r=_objectWithoutPropertiesLoose(e,_excluded),o=useTabContext();if(null===o)throw new TypeError("No TabContext provided");const i=reactExports.Children.map(n,e=>reactExports.isValidElement(e)?reactExports.cloneElement(e,{"aria-controls":getPanelId(o,e.props.value),id:getTabId(o,e.props.value)}):null);return factory$1(Tabs,_extends({},r,{ref:t,value:o.value,children:i}))}),sanitize={allowCustomElements:!0,allowElements:["text-underline","blank-link"],allowAttributes:{href:["blank-link"]}};var Notifications={},_interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(Notifications,"__esModule",{value:!0});var default_1=Notifications.default=void 0,_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=require$$2$1,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"}),"Notifications");default_1=Notifications.default=_default;const reloadSubject=new ar,Loader$1=()=>factory$1(Dw,{sx:{width:350,height:"calc(100% - 96px)"}}),useStyles$s=makeStyles()(e=>({list:{pt:1,pb:1,"& > *":{paddingTop:0,paddingBottom:0,"& > *":{paddingTop:0,paddingBottom:0}}},listItemAccient:{background:alpha$2(e.palette.getContrastText(e.palette.background.paper),.018)}})),getNotificationColor$1=e=>{switch(e.type){case"signal.opened":case"activate_scheduled.commit":case"signal_sync.open":return"#4CAF50";case"signal.closed":case"signal_sync.close":return"#2196F3";case"signal.scheduled":case"average_buy.commit":case"error.info":case"error.validation":return"#FF9800";case"signal.cancelled":case"cancel_scheduled.commit":return"#9E9E9E";case"partial_profit.available":case"partial_profit.commit":return"#8BC34A";case"partial_loss.available":case"partial_loss.commit":return"#FF5722";case"breakeven.available":case"breakeven.commit":return"#00BCD4";case"trailing_stop.commit":case"trailing_take.commit":return"#673AB7";case"close_pending.commit":return"#607D8B";case"risk.rejection":return"#F44336";case"error.critical":return"#D32F2F";case"signal.info":return"#9C27B0";default:return}},getNotificationIcon$1=e=>{const t={color:"white",mt:"-1px"};switch(e.type){case"signal.opened":case"partial_profit.available":case"partial_profit.commit":return factory$1(TrendingUp,{sx:t});case"signal.closed":case"signal_sync.close":case"close_pending.commit":return factory$1(Close,{sx:t});case"signal.scheduled":return factory$1(Schedule,{sx:t});case"signal.cancelled":case"cancel_scheduled.commit":return factory$1(Cancel,{sx:t});case"partial_loss.available":case"partial_loss.commit":case"average_buy.commit":return factory$1(TrendingDown,{sx:t});case"breakeven.available":case"breakeven.commit":return factory$1(SwapVert,{sx:t});case"activate_scheduled.commit":case"signal_sync.open":return factory$1(PlayArrow,{sx:t});case"trailing_stop.commit":case"trailing_take.commit":return factory$1(Timeline,{sx:t});case"risk.rejection":return factory$1(ReportProblem,{sx:t});case"error.info":case"error.validation":case"signal.info":return factory$1(NotificationImportant,{sx:t});case"error.critical":return factory$1(ErrorIcon,{sx:t});default:return factory$1(default_1$1,{sx:{...t,mt:"-2px"}})}},getNotificationTitle$1=e=>{switch(e.type){case"signal.opened":return`${t$1("Opened")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.closed":return`${t$1("Closed")} ${e.symbol} (${e.pnlPercentage?`${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`:"N/A"})`;case"signal.scheduled":return`${t$1("Scheduled")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.cancelled":return`${t$1("Cancelled")} ${e.symbol}`;case"partial_profit.available":return`${t$1("Partial profit")} ${e.level}% ${e.symbol}`;case"partial_profit.commit":return`${t$1("Profit fixed")} ${e.percentToClose}% ${e.symbol}`;case"partial_loss.available":return`${t$1("Partial loss")} ${e.level}% ${e.symbol}`;case"partial_loss.commit":return`${t$1("Loss fixed")} ${e.percentToClose}% ${e.symbol}`;case"breakeven.available":return`${t$1("Breakeven available")} ${e.symbol}`;case"breakeven.commit":return`${t$1("Breakeven set")} ${e.symbol}`;case"activate_scheduled.commit":return`${t$1("Activated")} ${e.position.toUpperCase()} ${e.symbol}`;case"average_buy.commit":return`${t$1("Average Buy")} ${e.symbol}`;case"trailing_stop.commit":return`${t$1("Trailing stop")} ${e.symbol}`;case"trailing_take.commit":return`${t$1("Trailing take")} ${e.symbol}`;case"signal_sync.open":return`${t$1("Sync Open")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal_sync.close":return`${t$1("Sync Close")} ${e.symbol} (${e.pnlPercentage?`${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`:"N/A"})`;case"cancel_scheduled.commit":return`${t$1("Cancel Scheduled")} ${e.symbol}`;case"close_pending.commit":return`${t$1("Close Pending")} ${e.symbol}`;case"risk.rejection":return`${t$1("Rejected")} ${e.position.toUpperCase()} ${e.symbol}`;case"error.info":return`${t$1("Error")}: ${e.message}`;case"error.validation":return`${t$1("Validation")}: ${e.message}`;case"error.critical":return`${t$1("Critical")}: ${e.message}`;case"signal.info":return`${t$1("Signal Info")} ${e.symbol} (${e.pnlPercentage?`${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`:"N/A"})`;default:return`${t$1("Unknown")} ${lodashExports.get(e,"type")}`}},handleNotificationClick$1=e=>{switch(e.type){case"risk.rejection":ioc.layoutService.pickRisk(e.id);break;case"signal.opened":ioc.layoutService.pickSignalOpened(e.id);break;case"signal.closed":ioc.layoutService.pickSignalClosed(e.id);break;case"signal.scheduled":ioc.layoutService.pickSignalScheduled(e.id);break;case"signal.cancelled":ioc.layoutService.pickSignalCancelled(e.id);break;case"partial_profit.available":ioc.layoutService.pickPartialProfitAvailable(e.id);break;case"partial_profit.commit":ioc.layoutService.pickPartialProfitCommit(e.id);break;case"partial_loss.available":ioc.layoutService.pickPartialLossAvailable(e.id);break;case"partial_loss.commit":ioc.layoutService.pickPartialLossCommit(e.id);break;case"breakeven.available":ioc.layoutService.pickBreakevenAvailable(e.id);break;case"breakeven.commit":ioc.layoutService.pickBreakevenCommit(e.id);break;case"trailing_stop.commit":ioc.layoutService.pickTrailingStop(e.id);break;case"trailing_take.commit":ioc.layoutService.pickTrailingTake(e.id);break;case"activate_scheduled.commit":ioc.layoutService.pickActivateScheduled(e.id);break;case"average_buy.commit":ioc.layoutService.pickAverageBuyCommit(e.id);break;case"signal_sync.open":ioc.layoutService.pickSignalSyncOpen(e.id);break;case"signal_sync.close":ioc.layoutService.pickSignalSyncClose(e.id);break;case"cancel_scheduled.commit":ioc.layoutService.pickCancelScheduled(e.id);break;case"close_pending.commit":ioc.layoutService.pickClosePending(e.id);break;case"signal.info":ioc.layoutService.pickSignalNotify(e.id)}},NotificationView$1=()=>{const[e,t]=reactExports.useState(),{classes:n}=useStyles$s(),[r,o]=reactExports.useState(0),[i,a]=reactExports.useState("all");return factory$1(Fragment,{children:[factory$1(Zl,{onClick:async({currentTarget:e})=>{reloadSubject.next(),t(e)},onLoadStart:()=>o(e=>e+1),onLoadEnd:()=>o(e=>e-1),color:"inherit",sx:{ml:{xs:1,md:2},mr:{xs:1,sm:2}},children:factory$1(Tooltip$2,{title:t$1("Notifications"),children:factory$1(default_1,{sx:{color:"white !important",opacity:r?.8:1}})})}),factory$1(Popover$1,{open:!!e,anchorEl:e,hidden:!1,onClose:()=>{t(null),a("all")},anchorOrigin:{vertical:"bottom",horizontal:"right"},children:factory$1(TabContext,{value:i,children:factory$1(List,{sx:{width:350,height:448},subheader:factory$1(Stack,{direction:"row",justifyContent:"space-between",children:[factory$1(ListSubheader,{component:Typography,sx:{fontWeight:"bold"},children:t$1("all"===i?"All":"Signals")}),factory$1(TabList,{onChange:(e,t)=>a(t),sx:{"& .MuiTabs-indicator":{background:"#3F51B5 !important"}},color:"secondary",variant:"standard",children:[factory$1(Tab,{icon:factory$1(ManageSearch,{}),value:"all"}),factory$1(Tab,{icon:factory$1(TrendingUp,{}),value:"signals"})]})]}),children:["all"===i&&factory$1(Jr,{Loader:Loader$1,children:async()=>{const e=await ioc.notificationViewService.getList();return factory$1(vi$1,{className:n.list,sx:{width:350,height:"calc(100% - 48px)"},children:e.map((e,r)=>factory$1(ListItem,{className:clsx$2({[n.listItemAccient]:r%2==0}),disableGutters:!0,children:factory$1(ListItemButton,{onClick:()=>{handleNotificationClick$1(e),t(null)},children:[factory$1(ListItemAvatar,{children:factory$1(Avatar,{sx:{background:getNotificationColor$1(e)},children:getNotificationIcon$1(e)})}),factory$1(ListItemText,{primary:factory$1(DE,{config:sanitize,handler:()=>getNotificationTitle$1(e)}),secondary:"timestamp"in e?J$2(e.timestamp).format("HH:mm DD/MM/YYYY"):"N/A"}),factory$1(IconButton,{disableRipple:!0,children:factory$1(default_1$k,{})})]})},e.id))})}}),"signals"===i&&factory$1(Jr,{Loader:Loader$1,children:async()=>{const e=(await ioc.notificationViewService.getList()).filter(e=>e.type.startsWith("signal.")||e.type.startsWith("signal_sync."));return factory$1(vi$1,{className:n.list,sx:{width:350,height:"calc(100% - 48px)"},children:e.map((e,r)=>factory$1(ListItem,{className:clsx$2({[n.listItemAccient]:r%2==0}),disableGutters:!0,children:factory$1(ListItemButton,{onClick:()=>{handleNotificationClick$1(e),t(null)},children:[factory$1(ListItemAvatar,{children:factory$1(Avatar,{sx:{background:getNotificationColor$1(e)},children:getNotificationIcon$1(e)})}),factory$1(ListItemText,{primary:factory$1(DE,{config:sanitize,handler:()=>getNotificationTitle$1(e)}),secondary:"timestamp"in e?J$2(e.timestamp).format("HH:mm DD/MM/YYYY"):"N/A"}),factory$1(IconButton,{disableRipple:!0,children:factory$1(default_1$k,{})})]})},e.id))})}})]})})})]})},Tooltip=({description:e,placement:t="left",children:n})=>{const{isDesktop:r}=tl(),o=reactExports.useMemo(()=>({popper:{sx:{pointerEvents:"none"},modifiers:r?[{name:"fallbackPlacements",options:{fallbackPlacements:["right","top","bottom"]}}]:void 0},tooltip:{sx:{background:"black",p:1.5,fontSize:"16px"}},arrow:{sx:{color:"black"}}}),[r]),i=reactExports.useMemo(()=>({placement:r?t:void 0}),[r,t]);return factory$1(Tooltip$2,{title:e,slotProps:o,...i,arrow:!0,children:n})},LOADER_HEIGHT=4,TAB_ACTION_PREFIX="tab-action-",LOGO_SRC="/logo/icon512_maskable.png",LOGO_CLASS="backtest-kit-logo",LOGO_SIDE=32,HEADER_HEIGHT$3="80px",MARGIN_BOTTOM="10px",toggleFullscreen=()=>{var e;return document.fullscreenElement?document.exitFullscreen():null==(e=document.querySelector("body"))?void 0:e.requestFullscreen()},useStyles$r=makeStyles()(e=>({root:{position:"sticky",top:0,zIndex:9,height:HEADER_HEIGHT$3,display:"flex",alignItems:"stretch",justifyContent:"stretch",flexDirection:"column"},container:{flex:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"8px",paddingRight:"8px",position:"relative",marginBottom:MARGIN_BOTTOM,alignItems:"center",backdropFilter:"saturate(180%) blur(20px)",backgroundColor:alpha$2(darken$1(e.palette.primary.main,.2),.8),"&:hover":{[`& .${LOGO_CLASS}`]:{opacity:1}}},title:{color:"white",paddingLeft:e.spacing(1),paddingRight:e.spacing(3),userSelect:"none",transition:"opacity 500ms",opacity:"0.8",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},loader:{position:"absolute",bottom:0,left:0,width:"100%",minHeight:`${LOADER_HEIGHT}px`,maxHeight:`${LOADER_HEIGHT}px`,marginTop:`-${LOADER_HEIGHT}px`,zIndex:2},logo:{transition:"opacity 500ms",marginLeft:"8px",marginRight:"-6px",opacity:"0.5"},actionMenu:{"& svg":{color:"white"}},stretch:{flex:1},tabsRoot:{minHeight:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,height:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,color:"white"},tabRoot:{minHeight:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,height:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,color:"white"},tabIndicator:{height:"4px",background:"white"}})),default_actions=[{action:"toggle-fullscreen",isVisible:()=>!document.fullscreenElement,label:"Enter Fullscreen",icon:()=>factory$1(IconWrapper,{icon:Fullscreen,color:"#4caf50"})},{action:"toggle-fullscreen",isVisible:()=>!!document.fullscreenElement,label:"Exit Fullscreen",icon:()=>factory$1(IconWrapper,{icon:FullscreenExit,color:"#4caf50"})},{divider:!0},{action:"github-action",icon:()=>factory$1(IconWrapper,{icon:GitHub,color:"#6A1B9A "}),label:"Open GitHub"}],AppHeader=({routeItem:e,routeParams:t,pathname:n,loading:r})=>{const{classes:o,cx:i}=useStyles$r(),{activeTabPath:a,tabs:s}=reactExports.useMemo(()=>{if(!e.tabs)return{tabs:[],activeTabPath:""};const r=e.tabs.find(({isActive:r})=>r({routeItem:e,routeParams:t,pathname:n}));return{activeTabPath:(null==r?void 0:r.path)??"",tabs:e.tabs}},[e,t,n]),l=reactExports.useMemo(()=>a?s.filter(({isActive:r})=>!r({pathname:n,routeItem:e,routeParams:t})).map(({label:e,icon:t},n)=>({label:e,action:`${TAB_ACTION_PREFIX}${n}`,icon:t?()=>factory$1(IconWrapper,{icon:t,color:"#4caf50"}):void 0})):default_actions,[a,s]);if(e.noHeader)return null;return factory$1(Box$1,{className:o.root,children:factory$1(Box$1,{className:o.container,children:[factory$1(rb,{onClick:()=>{"/main"!==ioc.routerService.location.pathname?ioc.routerService.push("/main"):ioc.routerService.push("/about")},className:i(o.logo,LOGO_CLASS),children:factory$1(Avatar,{style:{height:LOGO_SIDE,width:LOGO_SIDE},src:LOGO_SRC})}),factory$1(Typography,{variant:"h4",onClick:()=>{"/main"!==ioc.routerService.location.pathname?ioc.routerService.push("/main"):ioc.routerService.push("/about")},className:i(o.title,LOGO_CLASS),sx:{display:{xs:"none",sm:"flex"},whiteSpace:"nowrap"},children:"Backtest Kit"}),s.length?factory$1(Tabs,{variant:"scrollable",value:a,textColor:"inherit",sx:{display:{xs:"none",sm:"flex"}},classes:{root:o.tabsRoot,indicator:o.tabIndicator},children:s.filter(({visible:e=!0})=>e).map(({label:r,icon:i,disabled:a,path:s,description:l,navigate:c},u,d)=>factory$1(Tab,{sx:{minWidth:128,fontWeight:"bold",mr:u<d.length-1?2:0},value:s,label:factory$1(Tooltip,{description:l,placement:"bottom",children:factory$1(Typography,{variant:"h6",children:r})}),onClick:()=>c({routeItem:e,routeParams:t,pathname:n}),disabled:a,icon:i&&factory$1(i,{}),iconPosition:"start",classes:{root:o.tabRoot}},`${s}-${u}`))},e.path):null,factory$1("div",{className:o.stretch}),factory$1(NotificationView$1,{}),factory$1(xa,{className:o.actionMenu,sx:{ml:{xs:1,md:2},mr:{xs:1,sm:2}},transparent:!0,onAction:async r=>{"github-action"===r&&ak("https://github.com/tripolskypetr/backtest-kit"),"toggle-fullscreen"===r&&toggleFullscreen(),r.startsWith(TAB_ACTION_PREFIX)&&(r=>{const o=parseInt(r.slice(TAB_ACTION_PREFIX.length)),i=s.filter(({isActive:r})=>!r({pathname:n,routeItem:e,routeParams:t})).find((e,t)=>t===o);i&&i.navigate({routeItem:e,routeParams:t,pathname:n})})(r)},options:l}),!!r&&factory$1(LinearProgress,{className:o.loader})]})})};var define_process_env_default$1={},noop=function(){},_process$env;function createGetCachedLinkHref(){var e,t=getCreateObjectURL(),n=null;return function(r){return r===n?e:(t===noop&&(t=getCreateObjectURL()),e=(n=r)?t(new Blob([r],{type:"text/css"})):void 0)}}function getCreateObjectURL(){return"undefined"==typeof window?noop:(window.URL||window.webkitURL).createObjectURL||noop}var IS_PRODUCTION=void 0!==process$1&&"production"===(null==(_process$env=define_process_env_default$1)?void 0:_process$env.NODE_ENV),DEFAULT_OPTIONS={hasSourceMap:!IS_PRODUCTION,isMinified:IS_PRODUCTION,isPrefixed:!0},globalOptions=Object.assign({},DEFAULT_OPTIONS),hasOwnProperty=Object.prototype.hasOwnProperty;function normalizeOptions(e){var t,n=Object.assign({},globalOptions);for(t in e)hasOwnProperty.call(n,t)&&null!=e[t]&&(n[t]=!!e[t]);return n}function isName(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-_*.:#[]".indexOf(e)>=0}function isQuote(e){return"'"===e||'"'===e}function isWhitespace$1(e){return" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e}function beautify(e,t){void 0===t&&(t={}),e=e.replace(/\r\n/g,"\n");var n,r,o,i,a=t,s=a.autosemicolon,l=void 0!==s&&s,c=a.indent,u=void 0===c?" ":c,d=a.openbrace,p=void 0===d||d,f=0,h=e.length,A=[],m="",g=0,y=1,v=2,b=3,x=4,w=5,C=6,$=7,_=8,S=g,E=0,k=!1;function P(){for(var e=E;e>0;--e)m+=u}function B(){m=m.trimEnd(),p?m+=" {":(m+="\n",P(),m+="{"),"\n"!==r&&(m+="\n"),E+=1}function T(){var e;E-=1,(m=m.trimEnd()).length>0&&l&&";"!==(e=m.charAt(m.length-1))&&"{"!==e&&(m+=";"),m+="\n",P(),m+="}",A.push(m),m=""}for(;f<h;)if(n=e.charAt(f),r=e.charAt(f+1),++f,isQuote(i))m+=n,n===i&&(i=null),"\\"===n&&r===i&&(m+=r,++f);else if(isQuote(n))m+=n,i=n;else if(k)m+=n,"*"===n&&"/"===r&&(k=!1,m+=r,++f);else if("/"!==n||"*"!==r){if(S===g){if(0===A.length&&isWhitespace$1(n)&&0===m.length)continue;if(n<=" "||n.charCodeAt(0)>=128){S=g,m+=n;continue}if(isName(n)||"@"===n){if(0===(o=m.trimEnd()).length)A.length>0&&(m="\n\n");else{var I=o.charAt(o.length-1);if("}"===I||";"===I)m=o+"\n\n";else for(;" "===(r=m.charAt(m.length-1))||9===r.charCodeAt(0);)m=m.substr(0,m.length-1)}m+=n,S="@"===n?y:b;continue}}if(S!==y)if(S!==v)if(S!==b)if(S!==x)if(S!==w)if(S!==C)if(S!==$)S===_&&")"===n&&m.charAt(m.length-1!=="\\"?1:0)?(m+=n,S=$):m+=n;else{if("}"===n){T(),S=g,E>0&&(S=v);continue}if(";"===n){m=m.trimEnd(),m+=";\n",S=x;continue}if(m+=n,"("===n&&"l"===m.charAt(m.length-2)&&"r"===m.charAt(m.length-3)&&"u"===m.charAt(m.length-4)){S=_;continue}}else{if(!isWhitespace$1(n)){m+=n,S=$;continue}isQuote(r)&&(S=$)}else{if(":"===n){m=m.trimEnd(),m+=": ",S=$,isWhitespace$1(r)&&(S=C);continue}if("}"===n){T(),S=g,E>0&&(S=v);continue}m+=n}else{if("}"===n){T(),S=g,E>0&&(S=v);continue}if("\n"===n){m=m.trimEnd(),m+="\n";continue}if(!isWhitespace$1(n)){m=m.trimEnd(),m+="\n",P(),m+=n,S=w;continue}m+=n}else{if("{"===n){B(),S=x;continue}if("}"===n){T(),S=g;continue}m+=n}else{if(isName(n)){if(0===(o=m.trimEnd()).length)A.length>0&&(m="\n\n");else if("}"===o.charAt(o.length-1))m=o+"\n\n";else for(;" "===(r=m.charAt(m.length-1))||9===r.charCodeAt(0);)m=m.substr(0,m.length-1);P(),m+=n,S=b;continue}if("}"===n){T(),S=g;continue}m+=n}else{if(";"===n){m+=n,S=g;continue}if("{"===n){o=m.trimEnd(),B(),S="@font-face"===o?x:v;continue}m+=n}}else k=!0,m+=n,m+=r,++f;return m=A.join("")+m}function getProcessedStyles(e,t){return serialize(compile$1(e),t.isPrefixed?middleware([prefixer$1,stringify$8]):stringify$8)}function getRenderedStyles(e,t){var n=getProcessedStyles(e,t);return t.isMinified?n:beautify(n,{autosemicolon:!0,indent:" "})}var INTERNAL_PROPS={children:!0,hasSourceMap:!0,isMinified:!0,isPrefixed:!0};function useTagProps(e){var t={};for(var n in e)INTERNAL_PROPS[n]||(t[n]=e[n]);return t}function useStyle(e,t){var n=reactExports.useRef(e),r=reactExports.useRef();return r.current&&n.current===e||(r.current=getRenderedStyles(e,t),n.current=e),r.current}var Link=reactExports.forwardRef(function(e,t){var n=e.passedProps,r=e.style,o=reactExports.useMemo(createGetCachedLinkHref,[]);return reactExports.createElement("link",Object.assign({},n,{href:o(r),rel:"stylesheet",ref:t}))}),Style=reactExports.forwardRef(function(e,t){var n=e.hasSourceMap,r=e.isMinified,o=e.isPrefixed,i=useTagProps(e),a=reactExports.useMemo(function(){return normalizeOptions({hasSourceMap:n,isMinified:r,isPrefixed:o})},[n,r,o]),s=useStyle(e.children,a);return a.hasSourceMap?reactDomExports.createPortal(reactExports.createElement(Link,{passedProps:i,ref:t,style:s}),document.head):reactDomExports.createPortal(reactExports.createElement("style",Object.assign({},i,{ref:t}),s),document.head)});const IMAGE_SIDE="5vmin",IMAGE_LIST=["/images/cubes.png","/images/snow.png","/images/square.png","/images/triangle.png","/images/dots.png"],randomImage=()=>{const e=Math.floor(Date.now()/1e3/60)%IMAGE_LIST.length;return IMAGE_LIST[e]},BottomImage=()=>{const[e,t]=reactExports.useState(()=>randomImage());return reactExports.useEffect(()=>mr.fromInterval(6e4).connect(()=>t(randomImage())),[]),factory$1(Style,{children:`\n body {\n background-position: top calc(100vh - ${IMAGE_SIDE} - 24px) right 24px !important;\n background-size: ${IMAGE_SIDE}, auto, contain !important;\n background-image: url("${e}") !important;\n }\n `})},Loader=()=>factory$1(Box$1,{sx:{position:"fixed",top:0,left:0,right:0,bottom:0,height:"100vh",width:"100vw",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,background:e=>e.palette.background.paper},children:factory$1(eS,{})}),Fragment2=()=>factory$1(Fragment,{}),useStyles$q=makeStyles()(e=>({switch:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)}})),handleInit=so(async()=>{await WS.waitForProvide(!0),await WS.prefetch(!0)}),handleLoadStart=()=>{ioc.layoutService.setAppbarLoader(!0)},handleLoadEnd=()=>{ioc.layoutService.setAppbarLoader(!1)},App=()=>{const{classes:e}=useStyles$q(),[t,n]=reactExports.useState(()=>getRouteItem()),[r,o]=reactExports.useState(()=>KS(routes$m,ioc.routerService.location.pathname)),[i,a]=reactExports.useState(ioc.routerService.location.pathname),[s,l]=reactExports.useState(ioc.layoutService.hasAppbarLoader),[c,u]=reactExports.useState(ioc.layoutService.hasModalLoader);return Xf(()=>ioc.routerService.reloadSubject.subscribe(()=>{queueMicrotask(()=>reactDomExports.flushSync(()=>{n(getRouteItem()),o(KS(routes$m,ioc.routerService.location.pathname)),a(ioc.routerService.location.pathname)}))})),Xf(()=>ioc.layoutService.appbarSubject.subscribe(()=>{l(ioc.layoutService.hasAppbarLoader)})),Xf(()=>ioc.layoutService.modalSubject.subscribe(()=>{u(ioc.layoutService.hasModalLoader)})),factory$1(Fragment,{children:[!!t&&factory$1(AppHeader,{pathname:i,routeItem:t,routeParams:r,loading:s}),factory$1(Gg,{className:e.switch,Loader:Fragment2,history:ioc.routerService,items:routes$m,fallback:ioc.errorService.handleGlobalError,onLoadStart:handleLoadStart,onLoadEnd:handleLoadEnd,onInit:handleInit}),c&&factory$1(Loader,{}),factory$1(BottomImage,{})]})},lightPrimary={main:"#3F51B5",light:"#4E65C9"},lightSecondary={main:"#2196F3"},lightError={main:"#ec4c47"},lightWarning={main:"#d9822b"},lightInfo={main:"#1070CA"},lightSuccess={main:"#27AB6E"},lightBackground={muiTab:"#6974b066",muiAppBar:"#6974B0"},lightText={primary:"#000000DE",secondary:"#00000099",disabled:"#cccccc"},BREAKPOINTS={xs:0,sm:800,md:1100,lg:1300,xl:1736},muiTheme=createTheme$1({breakpoints:{values:BREAKPOINTS},palette:{mode:"light",primary:{main:lightPrimary.main},secondary:{main:lightSecondary.main},warning:{main:lightWarning.main},info:{main:lightInfo.main},success:{main:lightSuccess.main},error:{main:lightError.main},text:{primary:lightText.primary,secondary:lightText.secondary,disabled:lightText.disabled},background:{default:"#E8E9ED !important",paper:"#fff"}},shape:{borderRadius:12},shadows:["none","0px 1px 2px rgba(0, 0, 0, 0.1)","0px 2px 4px rgba(0, 0, 0, 0.1)","0px 3px 6px rgba(0, 0, 0, 0.2)","0px 4px 8px rgba(0, 0, 0, 0.2)","0px 5px 10px rgba(0, 0, 0, 0.3)","0px 6px 12px rgba(0, 0, 0, 0.3)","0px 7px 14px rgba(0, 0, 0, 0.4)","0px 8px 16px rgba(0, 0, 0, 0.4)","0px 9px 18px rgba(0, 0, 0, 0.5)","0px 10px 20px rgba(0, 0, 0, 0.5)","0px 11px 22px rgba(0, 0, 0, 0.6)","0px 12px 24px rgba(0, 0, 0, 0.6)","0px 13px 26px rgba(0, 0, 0, 0.7)","0px 14px 28px rgba(0, 0, 0, 0.7)","0px 15px 30px rgba(0, 0, 0, 0.8)","0px 16px 32px rgba(0, 0, 0, 0.8)","0px 17px 34px rgba(0, 0, 0, 0.9)","0px 18px 36px rgba(0, 0, 0, 0.9)","0px 19px 38px rgba(0, 0, 0, 1)","0px 20px 40px rgba(0, 0, 0, 1)","0px 21px 42px rgba(0, 0, 0, 1)","0px 22px 44px rgba(0, 0, 0, 1)","0px 23px 46px rgba(0, 0, 0, 1)","0px 24px 48px rgba(0, 0, 0, 1)"],components:{MuiModal:{styleOverrides:{backdrop:{backgroundColor:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)"}}},MuiPaper:{defaultProps:{elevation:3},styleOverrides:{root:{borderRadius:"12px",backgroundColor:"#ffffff",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)"}}},MuiCard:{styleOverrides:{root:{overflow:"clip"}}},MuiAppBar:{styleOverrides:{root:{background:lightBackground.muiAppBar}}},MuiTab:{styleOverrides:{fullWidth:{background:lightBackground.muiTab,color:"white !important",fontWeight:"bold"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6,padding:8},sizeSmall:{padding:4}}},MuiButton:{styleOverrides:{contained:{background:lightPrimary.main,"&:hover":{background:lightPrimary.light}}}},MuiBadge:{styleOverrides:{badge:{background:"#2e41a9"}}},MuiSnackbar:{styleOverrides:{root:{boxShadow:"none",border:"unset","& > *":{color:"black !important"},"& > .MuiPaper-root":{border:"1px solid black",borderRadius:"12px",boxShadow:"0 0 5px 2px grey"}}}}}}),mantineTheme=createTheme({});function getNextIndex({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:o}){switch(e){case"up":return 0===t&&0===n?null:0===n?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===o[t].length-1||n===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return 0===t&&0===n&&0===r?null:0===n&&0===r?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:0===r?{levelIndex:t,rowIndex:n-1,cellIndex:o[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===o[t].length-1&&r===o[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function focusOnNextFocusableControl({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:o,size:i}){var a,s,l;const c=getNextIndex({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:n});if(!c)return;const u=null==(l=null==(s=null==(a=e.current)?void 0:a[c.levelIndex])?void 0:s[c.rowIndex])?void 0:l[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?focusOnNextFocusableControl({controlsRef:e,direction:t,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:i}):u.focus())}function getDirection(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function getControlsSize(e){var t;return null==(t=e.current)?void 0:t.map(e=>e.map(e=>e.length))}function handleControlKeyDown({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:o}){const i=getDirection(o.key);if(i){o.preventDefault();focusOnNextFocusableControl({controlsRef:e,direction:i,levelIndex:t,rowIndex:n,cellIndex:r,size:getControlsSize(e)})}}function assignTime(e,t){if(!e||!t)return t;const n=e.getHours(),r=e.getMinutes(),o=e.getSeconds(),i=e.getMilliseconds(),a=new Date(t);return a.setHours(n),a.setMinutes(r),a.setSeconds(o),a.setMilliseconds(i),a}var timezone={exports:{}};timezone.exports=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,a=function(e,n,r){void 0===r&&(r={});var o=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r).formatToParts(o)},s=function(t,n){for(var r=a(t,n),i=[],s=0;s<r.length;s+=1){var l=r[s],c=l.type,u=l.value,d=e[c];d>=0&&(i[d]=parseInt(u,10))}var p=i[3],f=24===p?0:p,h=i[0]+"-"+i[1]+"-"+i[2]+" "+f+":"+i[4]+":"+i[5]+":000",A=+t;return(o.utc(h).valueOf()-(A-=A%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),l=Math.round((a-new Date(s))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(c)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,a=n||t||i,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var c=function(e,t,n){var r=e-60*t*1e3,o=s(r,n);if(t===o)return[r,t];var i=s(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),l,a),u=c[0],d=c[1],p=o(u).utcOffset(d);return p.$x.$timezone=a,p},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}}();var timezoneExports=timezone.exports;const timezonePlugin=getDefaultExportFromCjs$1(timezoneExports);function getTimezoneOffset(e,t){return t?J$2(e).tz(t).utcOffset()+e.getTimezoneOffset():0}J$2.extend(utcPlugin),J$2.extend(timezonePlugin);const updateTimezone=(e,t,n)=>{if(!e)return null;if(!t)return e;let r=getTimezoneOffset(e,t);return"remove"===n&&(r*=-1),J$2(e).add(r,"minutes").toDate()};function shiftTimezone(e,t,n,r){return r||!t?t:Array.isArray(t)?t.map(t=>updateTimezone(t,n,e)):updateTimezone(t,n,e)}const DATES_PROVIDER_DEFAULT_SETTINGS={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},DatesProviderContext=reactExports.createContext(DATES_PROVIDER_DEFAULT_SETTINGS);function useDatesContext(){const e=reactExports.useContext(DatesProviderContext),t=reactExports.useCallback(t=>t||e.locale,[e.locale]),n=reactExports.useCallback(t=>t||e.timezone||void 0,[e.timezone]),r=reactExports.useCallback(t=>"number"==typeof t?t:e.firstDayOfWeek,[e.firstDayOfWeek]),o=reactExports.useCallback(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=reactExports.useCallback(t=>"string"==typeof t?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getTimezone:n,getFirstDayOfWeek:r,getWeekendDays:o,getLabelSeparator:i}}function formatValue(e,t){if("range"===t&&Array.isArray(e)){const[t,n]=e;return t?n?`${t.toISOString()} – ${n.toISOString()}`:`${t.toISOString()} –`:""}return"multiple"===t&&Array.isArray(e)?e.map(e=>null==e?void 0:e.toISOString()).filter(Boolean).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function HiddenDatesInput({value:e,type:t,name:n,form:r}){return factory$1("input",{type:"hidden",value:formatValue(e,t),name:n,form:r})}HiddenDatesInput.displayName="@mantine/dates/HiddenDatesInput";var classes$7={day:"m_396ce5cb"};const defaultProps$f={},varsResolver$3=createVarsResolver((e,{size:t})=>({day:{"--day-size":getSize(t,"day-size")}})),Day=factory((e,t)=>{const n=useProps("Day",defaultProps$f,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,date:c,disabled:u,__staticSelector:d,weekend:p,outside:f,selected:h,renderDay:A,inRange:m,firstInRange:g,lastInRange:y,hidden:v,static:b,highlightToday:x,...w}=n,C=useStyles$u({name:d||"Day",classes:classes$7,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver$3,rootSelector:"day"}),$=useDatesContext();return factory$1(UnstyledButton,{...C("day",{style:v?{display:"none"}:void 0}),component:b?"div":"button",ref:t,disabled:u,"data-today":J$2(c).isSame(shiftTimezone("add",new Date,$.getTimezone()),"day")||void 0,"data-hidden":v||void 0,"data-highlight-today":x||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!f&&p||void 0,"data-outside":!u&&f||void 0,"data-selected":!u&&h||void 0,"data-in-range":m&&!u||void 0,"data-first-in-range":g&&!u||void 0,"data-last-in-range":y&&!u||void 0,"data-static":b||void 0,unstyled:s,...w,children:(null==A?void 0:A(c))||c.getDate()})});function getWeekdayNames({locale:e,format:t="dd",firstDayOfWeek:n=1}){const r=J$2().day(n),o=[];for(let i=0;i<7;i+=1)"string"==typeof t?o.push(J$2(r).add(i,"days").locale(e).format(t)):o.push(t(J$2(r).add(i,"days").toDate()));return o}Day.classes=classes$7,Day.displayName="@mantine/dates/Day";var classes$6={weekday:"m_18a3eca"};const defaultProps$e={},varsResolver$2=createVarsResolver((e,{size:t})=>({weekdaysRow:{"--wr-fz":getFontSize(t),"--wr-spacing":getSpacing(t)}})),WeekdaysRow=factory((e,t)=>{const n=useProps("WeekdaysRow",defaultProps$e,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,locale:c,firstDayOfWeek:u,weekdayFormat:d,cellComponent:p="th",__staticSelector:f,...h}=n,A=useStyles$u({name:f||"WeekdaysRow",classes:classes$6,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver$2,rootSelector:"weekdaysRow"}),m=useDatesContext(),g=getWeekdayNames({locale:m.getLocale(c),format:d,firstDayOfWeek:m.getFirstDayOfWeek(u)}).map((e,t)=>factory$1(p,{...A("weekday"),children:e}));return factory$1(Box,{component:"tr",ref:t,...A("weekdaysRow"),...h,children:g})});function getEndOfWeek(e,t=1){const n=new Date(e),r=0===t?6:t-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function getStartOfWeek(e,t=1){const n=new Date(e);for(;n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function getMonthDays({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){const r=e.getMonth(),o=new Date(e.getFullYear(),r,1),i=getEndOfWeek(new Date(e.getFullYear(),e.getMonth()+1,0),t),a=getStartOfWeek(o,t),s=[];for(;a<=i;){const e=[];for(let t=0;t<7;t+=1)e.push(new Date(a)),a.setDate(a.getDate()+1);s.push(e)}if(n&&s.length<6){const e=s[s.length-1],t=e[e.length-1],n=new Date(t);for(n.setDate(n.getDate()+1);s.length<6;){const e=[];for(let t=0;t<7;t+=1)e.push(new Date(n)),n.setDate(n.getDate()+1);s.push(e)}}return s}function isSameMonth(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function isAfterMinDate(e,t){return!(t instanceof Date)||J$2(e).isAfter(J$2(t).subtract(1,"day"),"day")}function isBeforeMaxDate(e,t){return!(t instanceof Date)||J$2(e).isBefore(J$2(t).add(1,"day"),"day")}function getDateInTabOrder(e,t,n,r,o,i,a){const s=e.flat().filter(e=>{var s;return isBeforeMaxDate(e,n)&&isAfterMinDate(e,t)&&!(null==o?void 0:o(e))&&!(null==(s=null==r?void 0:r(e))?void 0:s.disabled)&&(!i||isSameMonth(e,a))}),l=s.find(e=>{var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected});if(l)return l;const c=s.find(e=>J$2().isSame(e,"date"));return c||s[0]}WeekdaysRow.classes=classes$6,WeekdaysRow.displayName="@mantine/dates/WeekdaysRow";var classes$5={month:"m_cc9820d3",monthCell:"m_8f457cd5"};const defaultProps$d={withCellSpacing:!0},Month=factory((e,t)=>{const n=useProps("Month",defaultProps$d,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,locale:u,firstDayOfWeek:d,weekdayFormat:p,month:f,weekendDays:h,getDayProps:A,excludeDate:m,minDate:g,maxDate:y,renderDay:v,hideOutsideDates:b,hideWeekdays:x,getDayAriaLabel:w,static:C,__getDayRef:$,__onDayKeyDown:_,__onDayClick:S,__onDayMouseEnter:E,__preventFocus:k,__stopPropagation:P,withCellSpacing:B,size:T,highlightToday:I,...L}=n,M=useStyles$u({name:c||"Month",classes:classes$5,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"month"}),D=useDatesContext(),N=getMonthDays({month:f,firstDayOfWeek:D.getFirstDayOfWeek(d),consistentWeeks:D.consistentWeeks}),O=getDateInTabOrder(N,g,y,A,m,b,f),{resolvedClassNames:F,resolvedStyles:R}=useResolvedStylesApi({classNames:r,styles:a,props:n}),U=N.map((e,t)=>{const n=e.map((e,n)=>{const r=!isSameMonth(e,f),o=(null==w?void 0:w(e))||J$2(e).locale(u||D.locale).format("D MMMM YYYY"),i=null==A?void 0:A(e),a=J$2(e).isSame(O,"date");return factory$1("td",{...M("monthCell"),"data-with-spacing":B||void 0,children:factory$1(Day,{__staticSelector:c||"Month",classNames:F,styles:R,unstyled:s,"data-mantine-stop-propagation":P||void 0,highlightToday:I,renderDay:v,date:e,size:T,weekend:D.getWeekendDays(h).includes(e.getDay()),outside:r,hidden:!!b&&r,"aria-label":o,static:C,disabled:(null==m?void 0:m(e))||!isBeforeMaxDate(e,y)||!isAfterMinDate(e,g),ref:e=>null==$?void 0:$(t,n,e),...i,onKeyDown:r=>{var o;null==(o=null==i?void 0:i.onKeyDown)||o.call(i,r),null==_||_(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{var n;null==(n=null==i?void 0:i.onMouseEnter)||n.call(i,t),null==E||E(t,e)},onClick:t=>{var n;null==(n=null==i?void 0:i.onClick)||n.call(i,t),null==S||S(t,e)},onMouseDown:e=>{var t;null==(t=null==i?void 0:i.onMouseDown)||t.call(i,e),k&&e.preventDefault()},tabIndex:k||!a?-1:0})},e.toString())});return factory$1("tr",{...M("monthRow"),children:n})});return factory$1(Box,{component:"table",...M("month"),size:T,ref:t,...L,children:[!x&&factory$1("thead",{...M("monthThead"),children:factory$1(WeekdaysRow,{__staticSelector:c||"Month",locale:u,firstDayOfWeek:d,weekdayFormat:p,size:T,classNames:F,styles:R,unstyled:s})}),factory$1("tbody",{...M("monthTbody"),children:U})]})});Month.classes=classes$5,Month.displayName="@mantine/dates/Month";var classes$4={pickerControl:"m_dc6a3c71"};const defaultProps$c={},varsResolver$1=createVarsResolver((e,{size:t})=>({pickerControl:{"--dpc-fz":getFontSize(t),"--dpc-size":getSize(t,"dpc-size")}})),PickerControl=factory((e,t)=>{const n=useProps("PickerControl",defaultProps$c,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,firstInRange:c,lastInRange:u,inRange:d,__staticSelector:p,selected:f,disabled:h,...A}=n,m=useStyles$u({name:p||"PickerControl",classes:classes$4,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver$1,rootSelector:"pickerControl"});return factory$1(UnstyledButton,{...m("pickerControl"),ref:t,unstyled:s,"data-picker-control":!0,"data-selected":f&&!h||void 0,"data-disabled":h||void 0,"data-in-range":d&&!h&&!f||void 0,"data-first-in-range":c&&!h||void 0,"data-last-in-range":u&&!h||void 0,disabled:h,...A})});function isYearDisabled(e,t,n){return!(!t&&!n)&&(!(!t||!J$2(e).isBefore(t,"year"))||!(!n||!J$2(e).isAfter(n,"year")))}function getYearInTabOrder(e,t,n,r){const o=e.flat().filter(e=>{var o;return!isYearDisabled(e,t,n)&&!(null==(o=null==r?void 0:r(e))?void 0:o.disabled)}),i=o.find(e=>{var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected});if(i)return i;const a=o.find(e=>J$2().isSame(e,"year"));return a||o[0]}function getYearsData(e){const t=e.getFullYear(),n=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const e=3===i?1:3;for(let t=0;t<e;t+=1)o[i].push(new Date(n+r,0)),r+=1}return o}PickerControl.classes=classes$4,PickerControl.displayName="@mantine/dates/PickerControl";var classes$3={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const defaultProps$b={yearsListFormat:"YYYY",withCellSpacing:!0},YearsList=factory((e,t)=>{const n=useProps("YearsList",defaultProps$b,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,decade:c,yearsListFormat:u,locale:d,minDate:p,maxDate:f,getYearControlProps:h,__staticSelector:A,__getControlRef:m,__onControlKeyDown:g,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:w,size:C,...$}=n,_=useStyles$u({name:A||"YearsList",classes:classes$3,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"yearsList"}),S=useDatesContext(),E=getYearsData(c),k=getYearInTabOrder(E,p,f,h),P=E.map((e,t)=>{const n=e.map((e,n)=>{const r=null==h?void 0:h(e),o=J$2(e).isSame(k,"year");return factory$1("td",{..._("yearsListCell"),"data-with-spacing":w||void 0,children:factory$1(PickerControl,{..._("yearsListControl"),size:C,unstyled:s,"data-mantine-stop-propagation":x||void 0,disabled:isYearDisabled(e,p,f),ref:e=>null==m?void 0:m(t,n,e),...r,onKeyDown:o=>{var i;null==(i=null==r?void 0:r.onKeyDown)||i.call(r,o),null==g||g(o,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{var n;null==(n=null==r?void 0:r.onClick)||n.call(r,t),null==y||y(t,e)},onMouseEnter:t=>{var n;null==(n=null==r?void 0:r.onMouseEnter)||n.call(r,t),null==v||v(t,e)},onMouseDown:e=>{var t;null==(t=null==r?void 0:r.onMouseDown)||t.call(r,e),b&&e.preventDefault()},tabIndex:b||!o?-1:0,children:J$2(e).locale(S.getLocale(d)).format(u)})})});return factory$1("tr",{..._("yearsListRow"),children:n})});return factory$1(Box,{component:"table",ref:t,size:C,..._("yearsList"),...$,children:factory$1("tbody",{children:P})})});function isMonthDisabled(e,t,n){return!(!t&&!n)&&(!(!t||!J$2(e).isBefore(t,"month"))||!(!n||!J$2(e).isAfter(n,"month")))}function getMonthInTabOrder(e,t,n,r){const o=e.flat().filter(e=>{var o;return!isMonthDisabled(e,t,n)&&!(null==(o=null==r?void 0:r(e))?void 0:o.disabled)}),i=o.find(e=>{var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected});if(i)return i;const a=o.find(e=>J$2().isSame(e,"month"));return a||o[0]}function getMonthsData(e){const t=J$2(e).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let e=0;e<3;e+=1)n[o].push(J$2(t).add(r,"months").toDate()),r+=1;return n}YearsList.classes=classes$3,YearsList.displayName="@mantine/dates/YearsList";var classes$2={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const defaultProps$a={monthsListFormat:"MMM",withCellSpacing:!0},MonthsList=factory((e,t)=>{const n=useProps("MonthsList",defaultProps$a,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,year:u,monthsListFormat:d,locale:p,minDate:f,maxDate:h,getMonthControlProps:A,__getControlRef:m,__onControlKeyDown:g,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:w,size:C,...$}=n,_=useStyles$u({name:c||"MonthsList",classes:classes$2,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"monthsList"}),S=useDatesContext(),E=getMonthsData(u),k=getMonthInTabOrder(E,f,h,A),P=E.map((e,t)=>{const n=e.map((e,n)=>{const r=null==A?void 0:A(e),o=J$2(e).isSame(k,"month");return factory$1("td",{..._("monthsListCell"),"data-with-spacing":w||void 0,children:factory$1(PickerControl,{..._("monthsListControl"),size:C,unstyled:s,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":x||void 0,disabled:isMonthDisabled(e,f,h),ref:e=>null==m?void 0:m(t,n,e),...r,onKeyDown:o=>{var i;null==(i=null==r?void 0:r.onKeyDown)||i.call(r,o),null==g||g(o,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{var n;null==(n=null==r?void 0:r.onClick)||n.call(r,t),null==y||y(t,e)},onMouseEnter:t=>{var n;null==(n=null==r?void 0:r.onMouseEnter)||n.call(r,t),null==v||v(t,e)},onMouseDown:e=>{var t;null==(t=null==r?void 0:r.onMouseDown)||t.call(r,e),b&&e.preventDefault()},tabIndex:b||!o?-1:0,children:J$2(e).locale(S.getLocale(p)).format(d)})})});return factory$1("tr",{..._("monthsListRow"),children:n})});return factory$1(Box,{component:"table",ref:t,size:C,..._("monthsList"),...$,children:factory$1("tbody",{children:P})})});MonthsList.classes=classes$2,MonthsList.displayName="@mantine/dates/MonthsList";var classes$1={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const defaultProps$9={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},varsResolver=createVarsResolver((e,{size:t})=>({calendarHeader:{"--dch-control-size":getSize(t,"dch-control-size"),"--dch-fz":getFontSize(t)}})),CalendarHeader=factory((e,t)=>{const n=useProps("CalendarHeader",defaultProps$9,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,nextIcon:c,previousIcon:u,nextLabel:d,previousLabel:p,onNext:f,onPrevious:h,onLevelClick:A,label:m,nextDisabled:g,previousDisabled:y,hasNextLevel:v,levelControlAriaLabel:b,withNext:x,withPrevious:w,__staticSelector:C,__preventFocus:$,__stopPropagation:_,...S}=n,E=useStyles$u({name:C||"CalendarHeader",classes:classes$1,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver,rootSelector:"calendarHeader"}),k=$?e=>e.preventDefault():void 0;return factory$1(Box,{...E("calendarHeader"),ref:t,...S,children:[w&&factory$1(UnstyledButton,{...E("calendarHeaderControl"),"data-direction":"previous","aria-label":p,onClick:h,unstyled:s,onMouseDown:k,disabled:y,"data-disabled":y||void 0,tabIndex:$||y?-1:0,"data-mantine-stop-propagation":_||void 0,children:u||factory$1(AccordionChevron,{...E("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),factory$1(UnstyledButton,{component:v?"button":"div",...E("calendarHeaderLevel"),onClick:v?A:void 0,unstyled:s,onMouseDown:v?k:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":b,tabIndex:$||!v?-1:0,"data-mantine-stop-propagation":_||void 0,children:m}),x&&factory$1(UnstyledButton,{...E("calendarHeaderControl"),"data-direction":"next","aria-label":d,onClick:f,unstyled:s,onMouseDown:k,disabled:g,"data-disabled":g||void 0,tabIndex:$||g?-1:0,"data-mantine-stop-propagation":_||void 0,children:c||factory$1(AccordionChevron,{...E("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});function getDecadeRange(e){const t=getYearsData(e);return[t[0][0],t[3][0]]}CalendarHeader.classes=classes$1,CalendarHeader.displayName="@mantine/dates/CalendarHeader";const defaultProps$8={decadeLabelFormat:"YYYY"},DecadeLevel=factory((e,t)=>{const n=useProps("DecadeLevel",defaultProps$8,e),{decade:r,locale:o,minDate:i,maxDate:a,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,withCellSpacing:f,__preventFocus:h,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:x,previousDisabled:w,levelControlAriaLabel:C,withNext:$,withPrevious:_,decadeLabelFormat:S,classNames:E,styles:k,unstyled:P,__staticSelector:B,__stopPropagation:T,size:I,...L}=n,M=useDatesContext(),[D,N]=getDecadeRange(r),O={__staticSelector:B||"DecadeLevel",classNames:E,styles:k,unstyled:P,size:I},F="boolean"==typeof x?x:!!a&&!J$2(N).endOf("year").isBefore(a),R="boolean"==typeof w?w:!!i&&!J$2(D).startOf("year").isAfter(i),U=(e,t)=>J$2(e).locale(o||M.locale).format(t);return factory$1(Box,{"data-decade-level":!0,size:I,ref:t,...L,children:[factory$1(CalendarHeader,{label:"function"==typeof S?S(D,N):`${U(D,S)} – ${U(N,S)}`,__preventFocus:h,__stopPropagation:T,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:F,previousDisabled:R,hasNextLevel:!1,levelControlAriaLabel:C,withNext:$,withPrevious:_,...O}),factory$1(YearsList,{decade:r,locale:o,minDate:i,maxDate:a,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,__preventFocus:h,__stopPropagation:T,withCellSpacing:f,...O})]})});DecadeLevel.classes={...YearsList.classes,...CalendarHeader.classes},DecadeLevel.displayName="@mantine/dates/DecadeLevel";const defaultProps$7={yearLabelFormat:"YYYY"},YearLevel=factory((e,t)=>{const n=useProps("YearLevel",defaultProps$7,e),{year:r,locale:o,minDate:i,maxDate:a,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,withCellSpacing:f,__preventFocus:h,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:w,previousDisabled:C,hasNextLevel:$,levelControlAriaLabel:_,withNext:S,withPrevious:E,yearLabelFormat:k,__staticSelector:P,__stopPropagation:B,size:T,classNames:I,styles:L,unstyled:M,...D}=n,N=useDatesContext(),O={__staticSelector:P||"YearLevel",classNames:I,styles:L,unstyled:M,size:T},F="boolean"==typeof w?w:!!a&&!J$2(r).endOf("year").isBefore(a),R="boolean"==typeof C?C:!!i&&!J$2(r).startOf("year").isAfter(i);return factory$1(Box,{"data-year-level":!0,size:T,ref:t,...D,children:[factory$1(CalendarHeader,{label:"function"==typeof k?k(r):J$2(r).locale(o||N.locale).format(k),__preventFocus:h,__stopPropagation:B,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:F,previousDisabled:R,hasNextLevel:$,levelControlAriaLabel:_,withNext:S,withPrevious:E,...O}),factory$1(MonthsList,{year:r,locale:o,minDate:i,maxDate:a,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,__preventFocus:h,__stopPropagation:B,withCellSpacing:f,...O})]})});YearLevel.classes={...CalendarHeader.classes,...MonthsList.classes},YearLevel.displayName="@mantine/dates/YearLevel";const defaultProps$6={monthLabelFormat:"MMMM YYYY"},MonthLevel=factory((e,t)=>{const n=useProps("MonthLevel",defaultProps$6,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__getDayRef:m,__onDayKeyDown:g,__onDayClick:y,__onDayMouseEnter:v,withCellSpacing:b,highlightToday:x,__preventFocus:w,__stopPropagation:C,nextIcon:$,previousIcon:_,nextLabel:S,previousLabel:E,onNext:k,onPrevious:P,onLevelClick:B,nextDisabled:T,previousDisabled:I,hasNextLevel:L,levelControlAriaLabel:M,withNext:D,withPrevious:N,monthLabelFormat:O,classNames:F,styles:R,unstyled:U,__staticSelector:j,size:H,static:Q,...z}=n,V=useDatesContext(),W={__staticSelector:j||"MonthLevel",classNames:F,styles:R,unstyled:U,size:H},Y="boolean"==typeof T?T:!!d&&!J$2(r).endOf("month").isBefore(d),G="boolean"==typeof I?I:!!u&&!J$2(r).startOf("month").isAfter(u);return factory$1(Box,{"data-month-level":!0,size:H,ref:t,...z,children:[factory$1(CalendarHeader,{label:"function"==typeof O?O(r):J$2(r).locale(o||V.locale).format(O),__preventFocus:w,__stopPropagation:C,nextIcon:$,previousIcon:_,nextLabel:S,previousLabel:E,onNext:k,onPrevious:P,onLevelClick:B,nextDisabled:Y,previousDisabled:G,hasNextLevel:L,levelControlAriaLabel:M,withNext:D,withPrevious:N,...W}),factory$1(Month,{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__getDayRef:m,__onDayKeyDown:g,__onDayClick:y,__onDayMouseEnter:v,__preventFocus:w,__stopPropagation:C,static:Q,withCellSpacing:b,highlightToday:x,...W})]})});MonthLevel.classes={...Month.classes,...CalendarHeader.classes},MonthLevel.displayName="@mantine/dates/MonthLevel";var classes={levelsGroup:"m_30b26e33"};const defaultProps$5={},LevelsGroup=factory((e,t)=>{const n=useProps("LevelsGroup",defaultProps$5,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,...u}=n,d=useStyles$u({name:c||"LevelsGroup",classes:classes,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"levelsGroup"});return factory$1(Box,{ref:t,...d("levelsGroup"),...u})});LevelsGroup.classes=classes,LevelsGroup.displayName="@mantine/dates/LevelsGroup";const defaultProps$4={numberOfColumns:1},DecadeLevelGroup=factory((e,t)=>{const n=useProps("DecadeLevelGroup",defaultProps$4,e),{decade:r,locale:o,minDate:i,maxDate:a,yearsListFormat:s,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:p,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,nextDisabled:v,previousDisabled:b,classNames:x,styles:w,unstyled:C,__staticSelector:$,__stopPropagation:_,numberOfColumns:S,levelControlAriaLabel:E,decadeLabelFormat:k,size:P,vars:B,...T}=n,I=reactExports.useRef([]),L=Array(S).fill(0).map((e,t)=>{const n=J$2(r).add(10*t,"years").toDate();return factory$1(DecadeLevel,{size:P,yearsListFormat:s,decade:n,withNext:t===S-1,withPrevious:0===t,decadeLabelFormat:k,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(e,n)=>handleControlKeyDown({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:I}),__getControlRef:(e,n,r)=>{Array.isArray(I.current[t])||(I.current[t]=[]),Array.isArray(I.current[t][e])||(I.current[t][e]=[]),I.current[t][e][n]=r},levelControlAriaLabel:"function"==typeof E?E(n):E,locale:o,minDate:i,maxDate:a,__preventFocus:p,__stopPropagation:_,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,nextDisabled:v,previousDisabled:b,getYearControlProps:l,__staticSelector:$||"DecadeLevelGroup",classNames:x,styles:w,unstyled:C,withCellSpacing:d})});return factory$1(LevelsGroup,{classNames:x,styles:w,__staticSelector:$||"DecadeLevelGroup",ref:t,size:P,unstyled:C,...T,children:L})});DecadeLevelGroup.classes={...LevelsGroup.classes,...DecadeLevel.classes},DecadeLevelGroup.displayName="@mantine/dates/DecadeLevelGroup";const defaultProps$3={numberOfColumns:1},YearLevelGroup=factory((e,t)=>{const n=useProps("YearLevelGroup",defaultProps$3,e),{year:r,locale:o,minDate:i,maxDate:a,monthsListFormat:s,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:p,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:w,classNames:C,styles:$,unstyled:_,__staticSelector:S,__stopPropagation:E,numberOfColumns:k,levelControlAriaLabel:P,yearLabelFormat:B,size:T,vars:I,...L}=n,M=reactExports.useRef([]),D=Array(k).fill(0).map((e,t)=>{const n=J$2(r).add(t,"years").toDate();return factory$1(YearLevel,{size:T,monthsListFormat:s,year:n,withNext:t===k-1,withPrevious:0===t,yearLabelFormat:B,__stopPropagation:E,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(e,n)=>handleControlKeyDown({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:M}),__getControlRef:(e,n,r)=>{Array.isArray(M.current[t])||(M.current[t]=[]),Array.isArray(M.current[t][e])||(M.current[t][e]=[]),M.current[t][e][n]=r},levelControlAriaLabel:"function"==typeof P?P(n):P,locale:o,minDate:i,maxDate:a,__preventFocus:p,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:w,getMonthControlProps:l,classNames:C,styles:$,unstyled:_,__staticSelector:S||"YearLevelGroup",withCellSpacing:d})});return factory$1(LevelsGroup,{classNames:C,styles:$,__staticSelector:S||"YearLevelGroup",ref:t,size:T,unstyled:_,...L,children:D})});YearLevelGroup.classes={...YearLevel.classes,...LevelsGroup.classes},YearLevelGroup.displayName="@mantine/dates/YearLevelGroup";const defaultProps$2={numberOfColumns:1},MonthLevelGroup=factory((e,t)=>{const n=useProps("MonthLevelGroup",defaultProps$2,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__onDayClick:m,__onDayMouseEnter:g,withCellSpacing:y,highlightToday:v,__preventFocus:b,nextIcon:x,previousIcon:w,nextLabel:C,previousLabel:$,onNext:_,onPrevious:S,onLevelClick:E,nextDisabled:k,previousDisabled:P,hasNextLevel:B,classNames:T,styles:I,unstyled:L,numberOfColumns:M,levelControlAriaLabel:D,monthLabelFormat:N,__staticSelector:O,__stopPropagation:F,size:R,static:U,vars:j,...H}=n,Q=reactExports.useRef([]),z=Array(M).fill(0).map((e,t)=>{const n=J$2(r).add(t,"months").toDate();return factory$1(MonthLevel,{month:n,withNext:t===M-1,withPrevious:0===t,monthLabelFormat:N,__stopPropagation:F,__onDayClick:m,__onDayMouseEnter:g,__onDayKeyDown:(e,n)=>handleControlKeyDown({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:Q}),__getDayRef:(e,n,r)=>{Array.isArray(Q.current[t])||(Q.current[t]=[]),Array.isArray(Q.current[t][e])||(Q.current[t][e]=[]),Q.current[t][e][n]=r},levelControlAriaLabel:"function"==typeof D?D(n):D,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__preventFocus:b,nextIcon:x,previousIcon:w,nextLabel:C,previousLabel:$,onNext:_,onPrevious:S,onLevelClick:E,nextDisabled:k,previousDisabled:P,hasNextLevel:B,classNames:T,styles:I,unstyled:L,__staticSelector:O||"MonthLevelGroup",size:R,static:U,withCellSpacing:y,highlightToday:v})});return factory$1(LevelsGroup,{classNames:T,styles:I,__staticSelector:O||"MonthLevelGroup",ref:t,size:R,...H,children:z})});MonthLevelGroup.classes={...LevelsGroup.classes,...MonthLevel.classes},MonthLevelGroup.displayName="@mantine/dates/MonthLevelGroup";const getEmptyValue=e=>"range"===e?[null,null]:"multiple"===e?[]:null;function useUncontrolledDates({type:e,value:t,defaultValue:n,onChange:r,applyTimezone:o=!0}){const i=reactExports.useRef(e),a=useDatesContext(),[s,l,c]=useUncontrolled({value:shiftTimezone("add",t,a.getTimezone(),!o),defaultValue:shiftTimezone("add",n,a.getTimezone(),!o),finalValue:getEmptyValue(e),onChange:e=>{null==r||r(shiftTimezone("remove",e,a.getTimezone(),!o))}});let u=s;return i.current!==e&&(i.current=e,void 0===t&&(u=void 0!==n?n:getEmptyValue(e),l(u))),[u,l,c]}function levelToNumber(e,t){return e?"month"===e?0:"year"===e?1:2:t||0}function levelNumberToLevel(e){return 0===e?"month":1===e?"year":"decade"}function clampLevel(e,t,n){return levelNumberToLevel(clamp$2(levelToNumber(e,0),levelToNumber(t,0),levelToNumber(n,2)))}const defaultProps$1={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Calendar=factory((e,t)=>{const n=useProps("Calendar",defaultProps$1,e),{vars:r,maxLevel:o,minLevel:i,defaultLevel:a,level:s,onLevelChange:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:p,columnsToScroll:f,ariaLabels:h,onYearSelect:A,onMonthSelect:m,onYearMouseEnter:g,onMonthMouseEnter:y,__updateDateOnYearSelect:v,__updateDateOnMonthSelect:b,firstDayOfWeek:x,weekdayFormat:w,weekendDays:C,getDayProps:$,excludeDate:_,renderDay:S,hideOutsideDates:E,hideWeekdays:k,getDayAriaLabel:P,monthLabelFormat:B,nextIcon:T,previousIcon:I,__onDayClick:L,__onDayMouseEnter:M,withCellSpacing:D,highlightToday:N,monthsListFormat:O,getMonthControlProps:F,yearLabelFormat:R,yearsListFormat:U,getYearControlProps:j,decadeLabelFormat:H,classNames:Q,styles:z,unstyled:V,minDate:W,maxDate:Y,locale:G,__staticSelector:K,size:q,__preventFocus:J,__stopPropagation:Z,onNextDecade:X,onPreviousDecade:ee,onNextYear:te,onPreviousYear:ne,onNextMonth:re,onPreviousMonth:oe,static:ie,__timezoneApplied:ae,...se}=n,{resolvedClassNames:le,resolvedStyles:ce}=useResolvedStylesApi({classNames:Q,styles:z,props:n}),[ue,de]=useUncontrolled({value:s?clampLevel(s,i,o):void 0,defaultValue:a?clampLevel(a,i,o):void 0,finalValue:clampLevel(void 0,i,o),onChange:l}),[pe,fe]=useUncontrolledDates({type:"default",value:c,defaultValue:u,onChange:d,applyTimezone:!ae}),he={__staticSelector:K||"Calendar",styles:ce,classNames:le,unstyled:V,size:q},Ae=useDatesContext(),me=f||p||1,ge=new Date,ye=pe||shiftTimezone("add",W&&W>ge?W:ge,Ae.getTimezone());return factory$1(Box,{ref:t,size:q,"data-calendar":!0,...se,children:["month"===ue&&factory$1(MonthLevelGroup,{month:ye,minDate:W,maxDate:Y,firstDayOfWeek:x,weekdayFormat:w,weekendDays:C,getDayProps:$,excludeDate:_,renderDay:S,hideOutsideDates:E,hideWeekdays:k,getDayAriaLabel:P,onNext:()=>{const e=J$2(ye).add(me,"month").toDate();null==re||re(e),fe(e)},onPrevious:()=>{const e=J$2(ye).subtract(me,"month").toDate();null==oe||oe(e),fe(e)},hasNextLevel:"month"!==o,onLevelClick:()=>de("year"),numberOfColumns:p,locale:G,levelControlAriaLabel:null==h?void 0:h.monthLevelControl,nextLabel:null==h?void 0:h.nextMonth,nextIcon:T,previousLabel:null==h?void 0:h.previousMonth,previousIcon:I,monthLabelFormat:B,__onDayClick:L,__onDayMouseEnter:M,__preventFocus:J,__stopPropagation:Z,static:ie,withCellSpacing:D,highlightToday:N,...he}),"year"===ue&&factory$1(YearLevelGroup,{year:ye,numberOfColumns:p,minDate:W,maxDate:Y,monthsListFormat:O,getMonthControlProps:F,locale:G,onNext:()=>{const e=J$2(ye).add(me,"year").toDate();null==te||te(e),fe(e)},onPrevious:()=>{const e=J$2(ye).subtract(me,"year").toDate();null==ne||ne(e),fe(e)},hasNextLevel:"month"!==o&&"year"!==o,onLevelClick:()=>de("decade"),levelControlAriaLabel:null==h?void 0:h.yearLevelControl,nextLabel:null==h?void 0:h.nextYear,nextIcon:T,previousLabel:null==h?void 0:h.previousYear,previousIcon:I,yearLabelFormat:R,__onControlMouseEnter:y,__onControlClick:(e,t)=>{b&&fe(t),de(clampLevel("month",i,o)),null==m||m(t)},__preventFocus:J,__stopPropagation:Z,withCellSpacing:D,...he}),"decade"===ue&&factory$1(DecadeLevelGroup,{decade:ye,minDate:W,maxDate:Y,yearsListFormat:U,getYearControlProps:j,locale:G,onNext:()=>{const e=J$2(ye).add(10*me,"year").toDate();null==X||X(e),fe(e)},onPrevious:()=>{const e=J$2(ye).subtract(10*me,"year").toDate();null==ee||ee(e),fe(e)},numberOfColumns:p,nextLabel:null==h?void 0:h.nextDecade,nextIcon:T,previousLabel:null==h?void 0:h.previousDecade,previousIcon:I,decadeLabelFormat:H,__onControlMouseEnter:g,__onControlClick:(e,t)=>{v&&fe(t),de(clampLevel("year",i,o)),null==A||A(t)},__preventFocus:J,__stopPropagation:Z,withCellSpacing:D,...he})]})});function pickCalendarProps(e){const{maxLevel:t,minLevel:n,defaultLevel:r,level:o,onLevelChange:i,nextIcon:a,previousIcon:s,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:p,ariaLabels:f,onYearSelect:h,onMonthSelect:A,onYearMouseEnter:m,onMonthMouseEnter:g,onNextMonth:y,onPreviousMonth:v,onNextYear:b,onPreviousYear:x,onNextDecade:w,onPreviousDecade:C,withCellSpacing:$,highlightToday:_,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:E,firstDayOfWeek:k,weekdayFormat:P,weekendDays:B,getDayProps:T,excludeDate:I,renderDay:L,hideOutsideDates:M,hideWeekdays:D,getDayAriaLabel:N,monthLabelFormat:O,monthsListFormat:F,getMonthControlProps:R,yearLabelFormat:U,yearsListFormat:j,getYearControlProps:H,decadeLabelFormat:Q,allowSingleDateInRange:z,allowDeselect:V,minDate:W,maxDate:Y,locale:G,...K}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:o,onLevelChange:i,nextIcon:a,previousIcon:s,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:p,ariaLabels:f,onYearSelect:h,onMonthSelect:A,onYearMouseEnter:m,onMonthMouseEnter:g,onNextMonth:y,onPreviousMonth:v,onNextYear:b,onPreviousYear:x,onNextDecade:w,onPreviousDecade:C,withCellSpacing:$,highlightToday:_,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:E,firstDayOfWeek:k,weekdayFormat:P,weekendDays:B,getDayProps:T,excludeDate:I,renderDay:L,hideOutsideDates:M,hideWeekdays:D,getDayAriaLabel:N,monthLabelFormat:O,monthsListFormat:F,getMonthControlProps:R,yearLabelFormat:U,yearsListFormat:j,getYearControlProps:H,decadeLabelFormat:Q,allowSingleDateInRange:z,allowDeselect:V,minDate:W,maxDate:Y,locale:G},others:K}}function dateStringParser(e,t){if(null===e)return null;const n=shiftTimezone("add",new Date(e),t);return Number.isNaN(n.getTime())||!e?null:n}function isDateValid({date:e,maxDate:t,minDate:n}){return null!=e&&(!Number.isNaN(e.getTime())&&((!t||!J$2(e).isAfter(t,"date"))&&(!n||!J$2(e).isBefore(n,"date"))))}Calendar.classes={...DecadeLevelGroup.classes,...YearLevelGroup.classes,...MonthLevelGroup.classes},Calendar.displayName="@mantine/dates/Calendar";const defaultProps={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},DateInput=factory((e,t)=>{const n=useInputProps("DateInput",defaultProps,e),{inputProps:r,wrapperProps:o,value:i,defaultValue:a,onChange:s,clearable:l,clearButtonProps:c,popoverProps:u,getDayProps:d,locale:p,valueFormat:f,dateParser:h,minDate:A,maxDate:m,fixOnBlur:g,onFocus:y,onBlur:v,onClick:b,readOnly:x,name:w,form:C,rightSection:$,unstyled:_,classNames:S,styles:E,allowDeselect:k,preserveTime:P,date:B,defaultDate:T,onDateChange:I,...L}=n,[M,D]=reactExports.useState(!1),{calendarProps:N,others:O}=pickCalendarProps(L),F=useDatesContext(),R=h||(e=>{const t=J$2(e,f,F.getLocale(p)).toDate();return Number.isNaN(t.getTime())?dateStringParser(e,F.getTimezone()):t}),U=void 0!==k?k:l,j=e=>e?J$2(e).locale(F.getLocale(p)).format(f):"",[H,Q,z]=useUncontrolledDates({type:"default",value:i,defaultValue:a,onChange:s}),[V,W]=useUncontrolledDates({type:"default",value:B,defaultValue:a||T,onChange:I});reactExports.useEffect(()=>{z&&W(i)},[z,i]);const[Y,G]=reactExports.useState(j(H));reactExports.useEffect(()=>{G(j(H))},[F.getLocale(p)]);const K=$||(l&&H&&!x?factory$1(CloseButton,{variant:"transparent",onMouseDown:e=>e.preventDefault(),tabIndex:-1,onClick:()=>{Q(null),!z&&G(""),D(!1)},unstyled:_,size:r.size||"sm",...c}):null);return useDidUpdate(()=>{void 0!==H&&!M&&G(j(H))},[H]),factory$1(Fragment,{children:[factory$1(Input$5.Wrapper,{...o,__staticSelector:"DateInput",children:factory$1(Popover,{opened:M,trapFocus:!1,position:"bottom-start",disabled:x,withRoles:!1,unstyled:_,...u,children:[factory$1(Popover.Target,{children:factory$1(Input$5,{"data-dates-input":!0,"data-read-only":x||void 0,autoComplete:"off",ref:t,value:Y,onChange:e=>{const t=e.currentTarget.value;if(G(t),D(!0),""===t.trim()&&l)Q(null);else{const e=R(t);isDateValid({date:e,minDate:A,maxDate:m})&&(Q(e),W(e))}},onBlur:e=>{null==v||v(e),D(!1),g&&G(j(H))},onFocus:e=>{null==y||y(e),D(!0)},onClick:e=>{null==b||b(e),D(!0)},readOnly:x,rightSection:K,...r,...O,__staticSelector:"DateInput"})}),factory$1(Popover.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,children:factory$1(Calendar,{__staticSelector:"DateInput",__timezoneApplied:!0,...N,classNames:S,styles:E,unstyled:_,__preventFocus:!0,minDate:A,maxDate:m,locale:p,getDayProps:e=>({...null==d?void 0:d(e),selected:J$2(H).isSame(e,"day"),onClick:()=>{const t=P?assignTime(H,e):e,n=l&&U&&J$2(H).isSame(e,"day")?null:t;Q(n),!z&&G(j(n)),D(!1)}}),size:r.size,date:V,onDateChange:W})})]})}),factory$1(HiddenDatesInput,{name:w,form:C,value:H,type:"default"})]})});DateInput.classes={...Input$5.classes,...Calendar.classes},DateInput.displayName="@mantine/dates/DateInput";
1539
+ "./src/plugin/hyperlinks.js");var t=function e(t,n){var r=new e.Worker(n);return t?r.from(t).save():r};t.Worker=e.default,i.default=t}(),i=i.default}()},html2pdf$1.exports=factory2(require$$0$2,requireHtml2canvas());var html2pdfExports=html2pdf$1.exports;const html2pdf=getDefaultExportFromCjs$1(html2pdfExports),getError=()=>new Error("Node APIs are not available in browser context."),throwForSync=()=>{throw getError()},fs={access:(e,t)=>t(getError()),accessSync:throwForSync,readFile:(e,t,n)=>n(getError()),readFileSync:throwForSync},os={};var helpers$2={},shared={},flatTokensSymbol$1=shared.flatTokensSymbol=Symbol("flat-tokens"),htmlFlowSymbol$1=shared.htmlFlowSymbol=Symbol("html-flow"),newLineRe$1=shared.newLineRe=/\r\n?|\n/g;shared.nextLinesRe=/[\r\n][\s\S]*$/;const{flatTokensSymbol:flatTokensSymbol,htmlFlowSymbol:htmlFlowSymbol}=shared;function inHtmlFlow(e){return Boolean(e[htmlFlowSymbol])}function isHtmlFlowComment(e){const{text:t,type:n}=e;if("htmlFlow"===n&&t.startsWith("\x3c!--")&&t.endsWith("--\x3e")){const e=t.slice(4,-3);return!e.startsWith(">")&&!e.startsWith("->")&&!e.endsWith("-")}return!1}function addRangeToSet(e,t,n){for(let r=t;r<=n;r++)e.add(r)}function filterByPredicate(e,t,n){const r=[],o=[{array:e,index:0}];for(;o.length>0;){const e=o[o.length-1],{array:i,index:a}=e;if(a<i.length){const a=i[e.index++];t(a)&&r.push(a);const{children:s}=a;if(s.length>0){const e=n?n(a):s;o.push({array:e,index:0})}}else o.pop()}return r}function filterByTypes(e,t,n){const r=e=>t.includes(e.type)&&(n||!inHtmlFlow(e)),o=e[flatTokensSymbol];return o?o.filter(r):filterByPredicate(e,r)}function getBlockQuotePrefixText(e,t,n=1){return filterByTypes(e,["blockQuotePrefix","linePrefix"]).filter(e=>e.startLine===t).map(e=>e.text).join("").trimEnd().concat("\n").repeat(n)}function getDescendantsByType(e,t){let n=Array.isArray(e)?e:[e];for(const r of t){const e=e=>Array.isArray(r)?r.includes(e.type):r===e.type;n=n.flatMap(t=>t.children.filter(e))}return n}function getHeadingLevel(e){let t=1;const n=e.children.find(e=>["atxHeadingSequence","setextHeadingLine"].includes(e.type)),{text:r}=n;return"#"===r[0]?t=Math.min(r.length,6):"-"===r[0]&&(t=2),t}function getHeadingStyle(e){if("setextHeading"===e.type)return"setext";return 1===e.children.filter(e=>"atxHeadingSequence"===e.type).length?"atx":"atx_closed"}function getHeadingText(e){return getDescendantsByType(e,[["atxHeadingText","setextHeadingText"]]).flatMap(e=>e.children.filter(e=>"htmlText"!==e.type)).map(e=>e.text).join("").replace(/[\r\n]+/g," ")||""}function getHtmlTagInfo(e){const t=/^<([^!>][^/\s>]*)/;if("htmlText"===e.type){const n=t.exec(e.text);if(n){const e=n[1],t=e.startsWith("/");return{close:t,name:t?e.slice(1):e}}}return null}function getParentOfType(e,t){let n=e;for(;(n=n.parent)&&!t.includes(n.type););return n}const docfxTabSyntaxRe=/^#tab\//;function isDocfxTab(e){if("atxHeading"===(null==e?void 0:e.type)){const t=getDescendantsByType(e,["atxHeadingText"]);if(1===t.length&&1===t[0].children.length&&"link"===t[0].children[0].type){const e=filterByTypes(t[0].children[0].children,["resourceDestinationString"]);return 1===e.length&&docfxTabSyntaxRe.test(e[0].text)}}return!1}const nonContentTokens=new Set(["blockQuoteMarker","blockQuotePrefix","blockQuotePrefixWhitespace","lineEnding","lineEndingBlank","linePrefix","listItemIndent","undefinedReference","undefinedReferenceCollapsed","undefinedReferenceFull","undefinedReferenceShortcut"]);var micromarkHelpers={addRangeToSet:addRangeToSet,filterByPredicate:filterByPredicate,filterByTypes:filterByTypes,getBlockQuotePrefixText:getBlockQuotePrefixText,getDescendantsByType:getDescendantsByType,getHeadingLevel:getHeadingLevel,getHeadingStyle:getHeadingStyle,getHeadingText:getHeadingText,getHtmlTagInfo:getHtmlTagInfo,getParentOfType:getParentOfType,inHtmlFlow:inHtmlFlow,isDocfxTab:isDocfxTab,isHtmlFlowComment:isHtmlFlowComment,nonContentTokens:nonContentTokens};const micromark=micromarkHelpers,{newLineRe:newLineRe,nextLinesRe:nextLinesRe}=shared;var newLineRe_1=helpers$2.newLineRe=newLineRe,nextLinesRe_1=helpers$2.nextLinesRe=nextLinesRe,frontMatterRe=helpers$2.frontMatterRe=/((^---[^\S\r\n\u2028\u2029]*$[\s\S]+?^---\s*)|(^\+\+\+[^\S\r\n\u2028\u2029]*$[\s\S]+?^(\+\+\+|\.\.\.)\s*)|(^\{[^\S\r\n\u2028\u2029]*$[\s\S]+?^\}\s*))(\r\n|\r|\n|$)/m;const inlineCommentStartRe=/(<!--\s*markdownlint-(disable|enable|capture|restore|disable-file|enable-file|disable-line|disable-next-line|configure-file))(?:\s|-->)/gi;var inlineCommentStartRe_1=helpers$2.inlineCommentStartRe=inlineCommentStartRe,endOfLineHtmlEntityRe=helpers$2.endOfLineHtmlEntityRe=/&(?:#\d+|#[xX][\da-fA-F]+|[a-zA-Z]{2,31}|blk\d{2}|emsp1[34]|frac\d{2}|sup\d|there4);$/,endOfLineGemojiCodeRe=helpers$2.endOfLineGemojiCodeRe=/:(?:[abmovx]|[-+]1|100|1234|(?:1st|2nd|3rd)_place_medal|8ball|clock\d{1,4}|e-mail|non-potable_water|o2|t-rex|u5272|u5408|u55b6|u6307|u6708|u6709|u6e80|u7121|u7533|u7981|u7a7a|[a-z]{2,15}2?|[a-z]{1,14}(?:_[a-z\d]{1,16})+):$/;const allPunctuation=".,;:!?。,;:!?";var allPunctuation_1=helpers$2.allPunctuation=allPunctuation,allPunctuationNoQuestion=helpers$2.allPunctuationNoQuestion=allPunctuation.replace(/[??]/gu,"");function isNumber$2(e){return"number"==typeof e}var isNumber_1=helpers$2.isNumber=isNumber$2;function isString$3(e){return"string"==typeof e}var isString_1=helpers$2.isString=isString$3;function isEmptyString(e){return 0===e.length}var isEmptyString_1=helpers$2.isEmptyString=isEmptyString;function isObject$2(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}var isObject_1=helpers$2.isObject=isObject$2;function isUrl(e){return!!e&&Object.getPrototypeOf(e)===URL.prototype}var isUrl_1=helpers$2.isUrl=isUrl;function cloneIfArray(e){return Array.isArray(e)?[...e]:e}var cloneIfArray_1=helpers$2.cloneIfArray=cloneIfArray;function cloneIfUrl(e){return isUrl(e)?new URL(e):e}var cloneIfUrl_1=helpers$2.cloneIfUrl=cloneIfUrl,getHtmlAttributeRe=helpers$2.getHtmlAttributeRe=function(e){return new RegExp(`\\s${e}\\s*=\\s*['"]?([^'"\\s>]*)`,"iu")};function isBlankLine(e){const t="--\x3e";return!e||!e.trim()||!(e=>{for(;;){const n=e.indexOf("\x3c!--"),r=e.indexOf(t);if(-1!==r&&(-1===n||r<n))e=e.slice(r+3);else if(-1!==n&&-1!==r)e=e.slice(0,n)+e.slice(r+3);else{if(-1===n||-1!==r)return e;e=e.slice(0,n)}}})(e).replace(/>/g,"").trim()}var isBlankLine_1=helpers$2.isBlankLine=isBlankLine;const htmlCommentBegin="\x3c!--",htmlCommentEnd="--\x3e",safeCommentCharacter=".",startsWithPipeRe=/^ *\|/,notCrLfRe=/[^\r\n]/g,notSpaceCrLfRe=/[^ \r\n]/g,trailingSpaceRe=/ +[\r\n]/g,replaceTrailingSpace=e=>e.replace(notCrLfRe,safeCommentCharacter);var clearHtmlCommentText=helpers$2.clearHtmlCommentText=function(e){let t=0;for(;-1!==(t=e.indexOf(htmlCommentBegin,t));){const n=e.indexOf(htmlCommentEnd,t+2);if(-1===n)break;if(n>t+htmlCommentBegin.length){const r=e.slice(t+htmlCommentBegin.length,n),o=e.lastIndexOf("\n",t)+1,i=e.slice(o,t),a=0===i.trim().length,s=startsWithPipeRe.test(i)&&r.includes("\n");if(a||!(s||r.startsWith(">")||r.startsWith("->")||r.endsWith("-")||r.includes("--"))){const o=r.replace(notSpaceCrLfRe,safeCommentCharacter).replace(trailingSpaceRe,replaceTrailingSpace);e=e.slice(0,t+htmlCommentBegin.length)+o+e.slice(n)}}t=n+htmlCommentEnd.length}return e},escapeForRegExp=helpers$2.escapeForRegExp=function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")};function ellipsify(e,t,n){return e.length<=30||(e=t&&n?e.slice(0,15)+"..."+e.slice(-15):n?"..."+e.slice(-30):e.slice(0,30)+"..."),e}var ellipsify_1=helpers$2.ellipsify=ellipsify;function addError$1(e,t,n,r,o,i){e({lineNumber:t,detail:n,context:r,range:o,fixInfo:i})}var addError_1=helpers$2.addError=addError$1;function addErrorDetailIf(e,t,n,r,o,i,a,s){n!==r&&addError$1(e,t,"Expected: "+n+"; Actual: "+r+(o?"; "+o:""),i,a,s)}var addErrorDetailIf_1=helpers$2.addErrorDetailIf=addErrorDetailIf;function addErrorContext(e,t,n,r,o,i,a){addError$1(e,t,void 0,n=ellipsify(n.replace(newLineRe,"\n"),r,o),i,a)}var addErrorContext_1=helpers$2.addErrorContext=addErrorContext;const positionLessThanOrEqual=(e,t,n,r)=>e<n||e===n&&t<=r;var hasOverlap=helpers$2.hasOverlap=function(e,t){const n=positionLessThanOrEqual(e.startLine,e.startColumn,t.startLine,t.startColumn),r=n?e:t,o=n?t:e;return positionLessThanOrEqual(o.startLine,o.startColumn,r.endLine,r.endColumn)},frontMatterHasTitle=helpers$2.frontMatterHasTitle=function(e,t){const n=void 0!==t&&!t,r=new RegExp(String(t||'^\\s*"?title"?\\s*[:=]'),"i");return!n&&e.some(e=>r.test(e))};function getReferenceLinkImageData$1(e){var t;const n=e=>e.toLowerCase().trim().replace(/\s+/g," "),r=e=>null==e?void 0:e.children.filter(e=>"blockQuotePrefix"!==e.type).map(e=>e.text).join(""),o=new Map,i=new Map,a=(e,t,r)=>{const a=[e.startLine-1,e.startColumn-1,e.text.length],s=n(t),l=r?i:o,c=l.get(s)||[];c.push(a),l.set(s,c)},s=new Map,l=[],c=[],u=micromark.filterByTypes(e,["definition","gfmFootnoteDefinition","definitionLabelString","gfmFootnoteDefinitionLabelString","gfmFootnoteCall","image","link","undefinedReferenceCollapsed","undefinedReferenceFull","undefinedReferenceShortcut"]);for(const d of u){let e="";switch(d.type){case"definition":case"gfmFootnoteDefinition":for(let e=d.startLine;e<=d.endLine;e++)l.push(e-1);break;case"gfmFootnoteDefinitionLabelString":e="^";case"definitionLabelString":{const r=n(`${e}${d.text}`);if(s.has(r))c.push([r,d.startLine-1]);else{const e=micromark.getParentOfType(d,["definition"]),n=e&&(null==(t=micromark.getDescendantsByType(e,["definitionDestination","definitionDestinationRaw","definitionDestinationString"])[0])?void 0:t.text);s.set(r,[d.startLine-1,n])}}break;case"gfmFootnoteCall":case"image":case"link":{let e=1===d.children.length;const t=2===d.children.length&&!d.children.some(e=>"resource"===e.type),[n]=micromark.getDescendantsByType(d,["label","labelText"]),[o]=micromark.getDescendantsByType(d,["reference","referenceString"]);let i=r(n);if(!e&&!t){const[t,n]=d.children.filter(e=>["gfmFootnoteCallMarker","gfmFootnoteCallString"].includes(e.type));t&&n&&(i=`${t.text}${n.text}`,e=!0)}(e||t)&&a(d,r(o)||i,e)}break;case"undefinedReferenceCollapsed":case"undefinedReferenceFull":case"undefinedReferenceShortcut":{const e=micromark.getDescendantsByType(d,["undefinedReference"])[0].children.map(e=>e.text).join("");a(d,e,"undefinedReferenceShortcut"===d.type)}}}return{references:o,shortcuts:i,definitions:s,duplicateDefinitions:c,definitionLineIndices:l}}var getReferenceLinkImageData_1=helpers$2.getReferenceLinkImageData=getReferenceLinkImageData$1;function getPreferredLineEnding(e,t){let n=0,r=0,o=0;const i=e.match(newLineRe)||[];for(const s of i)switch(s){case"\r":n++;break;case"\n":r++;break;case"\r\n":o++}let a=null;return a=n||r||o?r>=o&&r>=n?"\n":o>=n?"\r\n":"\r":t&&t.EOL||"\n",a}var getPreferredLineEnding_1=helpers$2.getPreferredLineEnding=getPreferredLineEnding;function expandTildePath(e,t){const n=t&&t.homedir&&t.homedir();return n?e.replace(/^~($|\/|\\)/,`${n}$1`):e}helpers$2.expandTildePath=expandTildePath;const map$1=new Map;let params;function initialize(e){map$1.clear(),params=e}function micromarkTokens(){return(null==params?void 0:params.parsers.micromark.tokens)||[]}function getCached(e,t){if(map$1.has(e))return map$1.get(e);const n=t();return map$1.set(e,n),n}function filterByTypesCached(e,t){return getCached(JSON.stringify(arguments),()=>micromarkHelpers.filterByTypes(micromarkTokens(),e,t))}function getReferenceLinkImageData(){return getCached(getReferenceLinkImageData.name,()=>getReferenceLinkImageData_1(micromarkTokens()))}const homepage="https://github.com/DavidAnson/markdownlint",version="0.38.0";var markdownit,hasRequiredMarkdownit;function requireMarkdownit(){if(hasRequiredMarkdownit)return markdownit;hasRequiredMarkdownit=1;const{newLineRe:e}=helpers$2;function t(t,n){const r=/`+/g;let o=null;const i=[];for(;null!==(o=r.exec(t));)i.push([o[0].length,o.index]);const a=[];for(;null!==(o=e.exec(t));)a.push(o.index);let s=0,l=0,c=0;for(let e=0;e<i.length-1;e++){const[r,o]=i[e];if(0===o||"\\"!==t[o-1])for(let u=e+1;u<i.length;u++){const[d,p]=i[u];if(r===d){for(;c<a.length;c++){const e=a[c];if(o<e)break;s++,l=e+1}const i=o-l+r;n(t.slice(o+r,p),s,i,r),e=u;break}}}}function n(e){if(e.attrs){for(const t of e.attrs)Object.freeze(t);Object.freeze(e.attrs)}if(e.children){for(const t of e.children)n(t);Object.freeze(e.children)}e.map&&Object.freeze(e.map),Object.freeze(e)}return markdownit={forEachInlineCodeSpan:t,getMarkdownItTokens:function(r,o,i){const a=r.parse(o,{});return function(r,o){let i=null;const a=r;for(const s of a){if("tr_open"===s.type?i=s.map:"tr_close"===s.type&&(i=null),!s.map&&i&&(s.map=[...i]),s.map)for(s.line=o[s.map[0]],s.lineNumber=s.map[0]+1;s.map[1]&&!(o[s.map[1]-1]||"").trim();)s.map[1]--;if(s.children){const n=[];s.children.some(e=>"code_inline"===e.type)&&t(s.content,t=>{n.push(t.split(e).length-1)});let r=s.lineNumber;for(const e of s.children)e.lineNumber=r,e.line=o[r-1],"softbreak"===e.type||"hardbreak"===e.type?r++:"code_inline"===e.type&&(r+=n.shift())}n(s)}Object.freeze(r)}(a,i),a}}}function requireMarkdownItCjs(){return requireMarkdownit()}var deferRequire={requireMarkdownItCjs:requireMarkdownItCjs};function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}"undefined"==typeof __non_webpack_require__||__non_webpack_require__;const md001={names:["MD001","heading-increment"],description:"Heading levels should only increment by one level at a time",tags:["headings"],parser:"micromark",function:function(e,t){let n=Number.MAX_SAFE_INTEGER;for(const r of filterByTypesCached(["atxHeading","setextHeading"])){const e=micromarkHelpers.getHeadingLevel(r);e>n&&addErrorDetailIf_1(t,r.startLine,`h${n+1}`,`h${e}`),n=e}}},md003={names:["MD003","heading-style"],description:"Heading style",tags:["headings"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(const r of filterByTypesCached(["atxHeading","setextHeading"])){const e=micromarkHelpers.getHeadingStyle(r);if("consistent"===n&&(n=e),e!==n){const o=micromarkHelpers.getHeadingLevel(r)<=2;if(!("setext_with_atx"===n&&(o&&"setext"===e||!o&&"atx"===e))&&!("setext_with_atx_closed"===n&&(o&&"setext"===e||!o&&"atx_closed"===e))){let i=n;"setext_with_atx"===n?i=o?"setext":"atx":"setext_with_atx_closed"===n&&(i=o?"setext":"atx_closed"),addErrorDetailIf_1(t,r.startLine,i,e)}}}}},markerToStyle={"-":"dash","+":"plus","*":"asterisk"},styleToMarker={dash:"-",plus:"+",asterisk:"*"},differentItemStyle={dash:"plus",plus:"asterisk",asterisk:"dash"},validStyles=new Set(["asterisk","consistent","dash","plus","sublist"]),md004={names:["MD004","ul-style"],description:"Unordered list style",tags:["bullet","ul"],parser:"micromark",function:function(e,t){const n=String(e.config.style||"consistent");let r=validStyles.has(n)?n:"dash";const o=[];for(const i of filterByTypesCached(["listUnordered"])){let e=0;if("sublist"===n){let t=i;for(;t=micromarkHelpers.getParentOfType(t,["listOrdered","listUnordered"]);)e++}const a=micromarkHelpers.getDescendantsByType(i,["listItemPrefix","listItemMarker"]);for(const i of a){const a=markerToStyle[i.text];"sublist"===n?(o[e]||(o[e]=a===o[e-1]?differentItemStyle[a]:a),r=o[e]):"consistent"===r&&(r=a);const s=i.startColumn,l=i.endColumn-i.startColumn;addErrorDetailIf_1(t,i.startLine,r,a,void 0,void 0,[s,l],{editColumn:s,deleteCount:l,insertText:styleToMarker[r]})}}}},md005={names:["MD005","list-indent"],description:"Inconsistent indentation for list items at the same level",tags:["bullet","ul","indentation"],parser:"micromark",function:function(e,t){for(const n of filterByTypesCached(["listOrdered","listUnordered"])){const e=n.startColumn-1;let r=0,o=!1;const i=n.children.filter(e=>"listItemPrefix"===e.type);for(const a of i){const i=a.startLine,s=a.startColumn-1,l=[1,a.endColumn-1];if("listUnordered"===n.type)addErrorDetailIf_1(t,i,e,s,void 0,void 0,l);else{const n=a.text.trim().length,c=a.startColumn+n-1;if(r=r||c,e!==s||o)if(r===c)o=!0;else{const a=o?r-n:e,u=o?c-n:s;addError_1(t,i,o?`Expected: (${r}); Actual: (${c})`:`Expected: ${e}; Actual: ${s}`,void 0,l,{editColumn:Math.min(u,a)+1,deleteCount:Math.max(u-a,0),insertText:"".padEnd(Math.max(a-u,0))})}}}}}},unorderedListTypes=["blockQuotePrefix","listItemPrefix","listUnordered"],unorderedParentTypes=["blockQuote","listOrdered","listUnordered"],md007={names:["MD007","ul-indent"],description:"Unordered list indentation",tags:["bullet","ul","indentation"],parser:"micromark",function:function(e,t){const n=Number(e.config.indent||2),r=!!e.config.start_indented,o=Number(e.config.start_indent||n),i=new Map;let a=null;const s=filterByTypesCached(unorderedListTypes);for(const l of s){const{endColumn:e,parent:s,startColumn:c,startLine:u,type:d}=l;if("blockQuotePrefix"===d)a=l;else if("listUnordered"===d){let e=0,t=l;for(;t=micromarkHelpers.getParentOfType(t,unorderedParentTypes);){if("listUnordered"!==t.type){"listOrdered"===t.type&&(e=-1);break}e++}e>=0&&i.set(l,e)}else{const l=i.get(s);if(void 0!==l){const i=(r?o:0)+l*n,s=c-1-((null==a?void 0:a.endLine)===u?a.endColumn-1:0),d=[1,e-1],p={editColumn:c-s,deleteCount:Math.max(s-i,0),insertText:"".padEnd(Math.max(i-s,0))};addErrorDetailIf_1(t,u,i,s,void 0,void 0,d,p)}}}}},md009={names:["MD009","no-trailing-spaces"],description:"Trailing spaces",tags:["whitespace"],parser:"micromark",function:function(e,t){let n=e.config.br_spaces;n=Number(void 0===n?2:n);const r=!!e.config.list_item_empty_lines,o=!!e.config.strict,i=new Set;for(const u of filterByTypesCached(["codeFenced"]))micromarkHelpers.addRangeToSet(i,u.startLine+1,u.endLine-1);for(const u of filterByTypesCached(["codeIndented"]))micromarkHelpers.addRangeToSet(i,u.startLine,u.endLine);const a=new Set;if(r)for(const u of filterByTypesCached(["listOrdered","listUnordered"])){micromarkHelpers.addRangeToSet(a,u.startLine,u.endLine);let e=!0;for(let t=u.children.length-1;t>=0;t--){const n=u.children[t];switch(n.type){case"content":e=!1;break;case"listItemIndent":e&&a.delete(n.startLine);break;case"listItemPrefix":e=!0}}}const s=new Set,l=new Set;if(o){for(const e of filterByTypesCached(["paragraph"]))micromarkHelpers.addRangeToSet(s,e.startLine,e.endLine-1);for(const e of filterByTypesCached(["codeText"]))micromarkHelpers.addRangeToSet(l,e.startLine,e.endLine-1)}const c=n<2?0:n;for(let u=0;u<e.lines.length;u++){const n=e.lines[u],r=u+1,d=n.length-n.trimEnd().length;if(d&&!i.has(r)&&!a.has(r)&&(c!==d||o&&(!s.has(r)||l.has(r)))){const e=n.length-d+1;addError_1(t,r,"Expected: "+(0===c?"":"0 or ")+c+"; Actual: "+d,void 0,[e,d],{editColumn:e,deleteCount:d})}}}},tabRe=/\t+/g,md010={names:["MD010","no-hard-tabs"],description:"Hard tabs",tags:["whitespace","hard_tab"],parser:"micromark",function:function(e,t){const n=e.config.code_blocks,r=void 0===n||!!n,o=new Set((e.config.ignore_code_languages||[]).map(e=>e.toLowerCase())),i=e.config.spaces_per_tab,a=void 0===i?1:Math.max(0,Number(i)),s=[];r?o.size>0&&s.push("codeFenced"):s.push("codeFenced","codeIndented","codeText");const l=filterByTypesCached(s).filter(e=>{if("codeFenced"===e.type&&o.size>0){return micromarkHelpers.getDescendantsByType(e,["codeFencedFence","codeFencedFenceInfo"]).every(e=>o.has(e.text.toLowerCase()))}return!0}).map(e=>{const{type:t,startLine:n,startColumn:r,endLine:o,endColumn:i}=e,a="codeFenced"===t;return{startLine:n+(a?1:0),startColumn:a?0:r,endLine:o-(a?1:0),endColumn:a?Number.MAX_SAFE_INTEGER:i}});for(let c=0;c<e.lines.length;c++){const n=e.lines[c];let r=null;for(;null!==(r=tabRe.exec(n));){const e=c+1,n=r.index+1,o=r[0].length,i={startLine:e,startColumn:n,endLine:e,endColumn:n+o-1};l.some(e=>hasOverlap(e,i))||addError_1(t,e,"Column: "+n,void 0,[n,o],{editColumn:n,deleteCount:o,insertText:"".padEnd(o*a)})}}}},reversedLinkRe=/(^|[^\\])\(([^()]+)\)\[([^\]^][^\]]*)\](?!\()/g,md011={names:["MD011","no-reversed-links"],description:"Reversed link syntax",tags:["links"],parser:"micromark",function:function(e,t){const n=new Set;for(const o of filterByTypesCached(["codeFenced","codeIndented"]))micromarkHelpers.addRangeToSet(n,o.startLine,o.endLine);const r=filterByTypesCached(["codeText"]);for(const[o,i]of e.lines.entries()){const e=o+1;if(!n.has(e)){let n=null;for(;null!==(n=reversedLinkRe.exec(i));){const[o,i,a,s]=n;if(!a.endsWith("\\")&&!s.endsWith("\\")){const l=n.index+i.length+1,c=n[0].length-i.length,u={startLine:e,startColumn:l,endLine:e,endColumn:l+c-1};r.some(e=>hasOverlap(e,u))||addError_1(t,e,o.slice(i.length),void 0,[l,c],{editColumn:l,deleteCount:c,insertText:`[${a}](${s})`})}}}}}},md012={names:["MD012","no-multiple-blanks"],description:"Multiple consecutive blank lines",tags:["whitespace","blank_lines"],parser:"micromark",function:function(e,t){const n=Number(e.config.maximum||1),{lines:r}=e,o=new Set;for(const a of filterByTypesCached(["codeFenced","codeIndented"]))micromarkHelpers.addRangeToSet(o,a.startLine,a.endLine);let i=0;for(const[a,s]of r.entries()){i=o.has(a+1)||s.trim().length>0?0:i+1,n<i&&addErrorDetailIf_1(t,a+1,n,i,void 0,void 0,void 0,{deleteCount:-1})}}},longLineRePrefix="^.{",longLineRePostfixRelaxed="}.*\\s.*$",longLineRePostfixStrict="}.+$",sternModeRe=/^(?:[#>\s]*\s)?\S*$/,md013={names:["MD013","line-length"],description:"Line length",tags:["line_length"],parser:"micromark",function:function(e,t){const n=Number(e.config.line_length||80),r=Number(e.config.heading_line_length||n),o=Number(e.config.code_block_line_length||n),i=!!e.config.strict,a=!!e.config.stern,s=i||a?longLineRePostfixStrict:longLineRePostfixRelaxed,l=new RegExp(longLineRePrefix+n+s),c=new RegExp(longLineRePrefix+r+s),u=new RegExp(longLineRePrefix+o+s),d=e.config.code_blocks,p=void 0===d||!!d,f=e.config.tables,h=void 0===f||!!f,A=e.config.headings,m=void 0===A||!!A,g=new Set;for(const $ of filterByTypesCached(["atxHeading","setextHeading"]))micromarkHelpers.addRangeToSet(g,$.startLine,$.endLine);const y=new Set;for(const $ of filterByTypesCached(["codeFenced","codeIndented"]))micromarkHelpers.addRangeToSet(y,$.startLine,$.endLine);const v=new Set;for(const $ of filterByTypesCached(["table"]))micromarkHelpers.addRangeToSet(v,$.startLine,$.endLine);const b=new Set;for(const $ of filterByTypesCached(["autolink","image","link","literalAutolink"]))micromarkHelpers.addRangeToSet(b,$.startLine,$.endLine);const x=new Set;for(const $ of filterByTypesCached(["paragraph"]))for(const e of micromarkHelpers.getDescendantsByType($,["data"]))micromarkHelpers.addRangeToSet(x,e.startLine,e.endLine);const w=new Set;for(const $ of b)x.has($)||w.add($);const C=new Set(getReferenceLinkImageData().definitionLineIndices);for(let $=0;$<e.lines.length;$++){const s=e.lines[$],d=$+1,f=g.has(d),A=y.has(d),b=v.has(d),x=A?o:f?r:n,_=A?u:f?c:l;!p&&A||!h&&b||!m&&f||C.has($)||!i&&(a&&sternModeRe.test(s)||w.has(d))||!_.test(s)||addErrorDetailIf_1(t,d,x,s.length,void 0,void 0,[x+1,s.length-x])}}},dollarCommandRe=/^(\s*)(\$\s+)/,md014={names:["MD014","commands-show-output"],description:"Dollar signs used before commands without showing output",tags:["code"],parser:"micromark",function:function(e,t){for(const n of filterByTypesCached(["codeFenced","codeIndented"])){const e=n.children.filter(e=>"codeFlowValue"===e.type),r=e.map(e=>({result:e.text.match(dollarCommandRe),startColumn:e.startColumn,startLine:e.startLine,text:e.text})).filter(e=>e.result);if(r.length===e.length)for(const n of r){const e=n.startColumn+n.result[1].length,r=n.result[2].length;addErrorContext_1(t,n.startLine,n.text,void 0,void 0,[e,r],{editColumn:e,deleteCount:r})}}}},md018={names:["MD018","no-missing-space-atx"],description:"No space after hash on atx style heading",tags:["headings","atx","spaces"],parser:"micromark",function:function(e,t){const{lines:n}=e,r=new Set;for(const o of filterByTypesCached(["codeFenced","codeIndented","htmlFlow"]))micromarkHelpers.addRangeToSet(r,o.startLine,o.endLine);for(const[o,i]of n.entries())if(!r.has(o+1)&&/^#+[^# \t]/.test(i)&&!/#\s*$/.test(i)&&!i.startsWith("#️⃣")){const e=/^#+/.exec(i)[0].length;addErrorContext_1(t,o+1,i.trim(),void 0,void 0,[1,e+1],{editColumn:e+1,insertText:" "})}}};function validateHeadingSpaces(e,t,n){const{children:r,startLine:o,text:i}=t;let a=n>0?0:r.length-1;for(;r[a]&&"atxHeadingSequence"!==r[a].type;)a+=n;const s=r[a],l=r[a+n];if("atxHeadingSequence"===(null==s?void 0:s.type)&&"whitespace"===(null==l?void 0:l.type)&&l.text.length>1){const t=l.startColumn+1,r=l.endColumn-t;addErrorContext_1(e,o,i.trim(),n>0,n<0,[t,r],{editColumn:t,deleteCount:r})}}const md019md021=[{names:["MD019","no-multiple-space-atx"],description:"Multiple spaces after hash on atx style heading",tags:["headings","atx","spaces"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["atxHeading"]).filter(e=>"atx"===micromarkHelpers.getHeadingStyle(e));for(const r of n)validateHeadingSpaces(t,r,1)}},{names:["MD021","no-multiple-space-closed-atx"],description:"Multiple spaces inside hashes on closed atx style heading",tags:["headings","atx_closed","spaces"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["atxHeading"]).filter(e=>"atx_closed"===micromarkHelpers.getHeadingStyle(e));for(const r of n)validateHeadingSpaces(t,r,1),validateHeadingSpaces(t,r,-1)}}],md020={names:["MD020","no-missing-space-closed-atx"],description:"No space inside hashes on closed atx style heading",tags:["headings","atx_closed","spaces"],parser:"micromark",function:function(e,t){const{lines:n}=e,r=new Set;for(const o of filterByTypesCached(["codeFenced","codeIndented","htmlFlow"]))micromarkHelpers.addRangeToSet(r,o.startLine,o.endLine);for(const[o,i]of n.entries())if(!r.has(o+1)){const e=/^(#+)([ \t]*)([^# \t\\]|[^# \t][^#]*?[^# \t\\])([ \t]*)((?:\\#)?)(#+)(\s*)$/.exec(i);if(e){const[,n,{length:r},a,{length:s},l,c,{length:u}]=e,d=n.length,p=c.length,f=!r,h=!s||!!l,A=l?`${l} `:"";if(f||h){const e=f?[1,d+1]:[i.length-u-p,p+1];addErrorContext_1(t,o+1,i.trim(),f,h,e,{editColumn:1,deleteCount:i.length,insertText:`${n} ${a} ${A}${c}`})}}}}},defaultLines=1,getLinesFunction=e=>{if(Array.isArray(e)){const t=new Array(6).fill(defaultLines);for(const[n,r]of[...e.entries()].slice(0,6))t[n]=r;return e=>t[micromarkHelpers.getHeadingLevel(e)-1]}const t=void 0===e?defaultLines:Number(e);return()=>t},md022={names:["MD022","blanks-around-headings"],description:"Headings should be surrounded by blank lines",tags:["headings","blank_lines"],parser:"micromark",function:function(e,t){const n=getLinesFunction(e.config.lines_above),r=getLinesFunction(e.config.lines_below),{lines:o}=e,i=filterByTypesCached(["blockQuotePrefix","linePrefix"]);for(const a of filterByTypesCached(["atxHeading","setextHeading"])){const{startLine:e,endLine:s}=a,l=o[e-1].trim(),c=n(a);if(c>=0){let n=0;for(let t=0;t<c&&isBlankLine_1(o[e-2-t]);t++)n++;addErrorDetailIf_1(t,e,c,n,"Above",l,void 0,{insertText:micromarkHelpers.getBlockQuotePrefixText(i,e-1,c-n)})}const u=r(a);if(u>=0){let n=0;for(let e=0;e<u&&isBlankLine_1(o[s+e]);e++)n++;addErrorDetailIf_1(t,e,u,n,"Below",l,void 0,{lineNumber:s+1,insertText:micromarkHelpers.getBlockQuotePrefixText(i,s+1,u-n)})}}}},md023={names:["MD023","heading-start-left"],description:"Headings must start at the beginning of the line",tags:["headings","spaces"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["atxHeading","linePrefix","setextHeading"]);for(let r=0;r<n.length-1;r++)if("linePrefix"===n[r].type&&"linePrefix"!==n[r+1].type&&n[r].startLine===n[r+1].startLine){const{endColumn:o,startColumn:i,startLine:a}=n[r],s=o-i;addErrorContext_1(t,a,e.lines[a-1],!0,!1,[i,s],{editColumn:i,deleteCount:s})}}},md024={names:["MD024","no-duplicate-heading"],description:"Multiple headings with the same content",tags:["headings"],parser:"micromark",function:function(e,t){const n=!!e.config.siblings_only||!1,r=[null,[]];let o=1,i=r[o];for(const a of filterByTypesCached(["atxHeading","setextHeading"])){const e=micromarkHelpers.getHeadingText(a);if(n){const e=micromarkHelpers.getHeadingLevel(a);for(;o<e;)o++,r[o]=[];for(;o>e;)r[o]=[],o--;i=r[e]}i.includes(e)?addErrorContext_1(t,a.startLine,e.trim()):i.push(e)}}},md025={names:["MD025","single-title","single-h1"],description:"Multiple top-level headings in the same document",tags:["headings"],parser:"micromark",function:function(e,t){const n=Number(e.config.level||1),{tokens:r}=e.parsers.micromark,o=filterByTypesCached(["atxHeading","setextHeading"]).filter(e=>n===micromarkHelpers.getHeadingLevel(e)&&!micromarkHelpers.isDocfxTab(e));if(o.length>0){const n=frontMatterHasTitle(e.frontMatterLines,e.config.front_matter_title);let i=n;if(!i){i=r.slice(0,r.indexOf(o[0])).every(e=>micromarkHelpers.nonContentTokens.has(e.type)||micromarkHelpers.isHtmlFlowComment(e))}if(i)for(const e of o.slice(n?0:1))addErrorContext_1(t,e.startLine,micromarkHelpers.getHeadingText(e))}}},md026={names:["MD026","no-trailing-punctuation"],description:"Trailing punctuation in heading",tags:["headings"],parser:"micromark",function:function(e,t){let n=e.config.punctuation;n=String(void 0===n?allPunctuationNoQuestion:n);const r=new RegExp("\\s*["+escapeForRegExp(n)+"]+$"),o=filterByTypesCached(["atxHeadingText","setextHeadingText"]);for(const i of o){const{endColumn:e,endLine:n,text:o}=i,a=r.exec(o);if(a&&!endOfLineHtmlEntityRe.test(o)&&!endOfLineGemojiCodeRe.test(o)){const r=a[0],o=r.length,i=e-o;addError_1(t,n,`Punctuation: '${r}'`,void 0,[i,o],{editColumn:i,deleteCount:o})}}}},listTypes=["listOrdered","listUnordered"],md027={names:["MD027","no-multiple-space-blockquote"],description:"Multiple spaces after blockquote symbol",tags:["blockquote","whitespace","indentation"],parser:"micromark",function:function(e,t){var n,r;const o=e.config.list_items,i=void 0===o||!!o,{tokens:a}=e.parsers.micromark;for(const s of filterByTypesCached(["linePrefix"])){const o=s.parent,l="codeIndented"===(null==o?void 0:o.type),c=(null==o?void 0:o.children)||a;if(!l&&"blockQuotePrefix"===(null==(n=c[c.indexOf(s)-1])?void 0:n.type)&&(i||!listTypes.includes(null==(r=c[c.indexOf(s)+1])?void 0:r.type)&&!micromarkHelpers.getParentOfType(s,listTypes))){const{startColumn:n,startLine:r,text:o}=s,{length:i}=o,a=e.lines[r-1];addErrorContext_1(t,r,a,void 0,void 0,[n,i],{editColumn:n,deleteCount:i})}}}},ignoreTypes=new Set(["lineEnding","listItemIndent","linePrefix"]),md028={names:["MD028","no-blanks-blockquote"],description:"Blank line inside blockquote",tags:["blockquote","whitespace"],parser:"micromark",function:function(e,t){var n;for(const r of filterByTypesCached(["blockQuote"])){const o=[],i=(null==(n=r.parent)?void 0:n.children)||e.parsers.micromark.tokens;for(let e=i.indexOf(r)+1;e<i.length;e++){const n=i[e],{startLine:r,type:a}=n;if("lineEndingBlank"===a)o.push(r);else if(!ignoreTypes.has(a)){if("blockQuote"===a){for(const e of o)addError_1(t,e);break}break}}}}},listStyleExamples={one:"1/1/1",ordered:"1/2/3",zero:"0/0/0"};function getOrderedListItemValue(e){return Number(micromarkHelpers.getDescendantsByType(e,["listItemValue"])[0].text)}const md029={names:["MD029","ol-prefix"],description:"Ordered list item prefix",tags:["ol"],parser:"micromark",function:function(e,t){const n=String(e.config.style||"one_or_ordered");for(const r of filterByTypesCached(["listOrdered"])){const e=micromarkHelpers.getDescendantsByType(r,["listItemPrefix"]);let o=1,i=!1;if(e.length>=2){const t=getOrderedListItemValue(e[0]);1===getOrderedListItemValue(e[1])&&0!==t||(i=!0,0===t&&(o=0))}let a=n;"one_or_ordered"===a?a=i?"ordered":"one":"zero"===a?o=0:"one"===a&&(o=1);for(const n of e){const e=getOrderedListItemValue(n);addErrorDetailIf_1(t,n.startLine,o,e,"Style: "+listStyleExamples[a],void 0,[n.startColumn,n.endColumn-n.startColumn]),"ordered"===a&&o++}}}},md030={names:["MD030","list-marker-space"],description:"Spaces after list markers",tags:["ol","ul","whitespace"],parser:"micromark",function:function(e,t){const n=Number(e.config.ul_single||1),r=Number(e.config.ol_single||1),o=Number(e.config.ul_multi||1),i=Number(e.config.ol_multi||1);for(const a of filterByTypesCached(["listOrdered","listUnordered"])){const e="listOrdered"===a.type,s=a.children.filter(e=>"listItemPrefix"===e.type),l=a.endLine-a.startLine+1===s.length,c=e?l?r:i:l?n:o;for(const n of s){const e=[n.startColumn,n.endColumn-n.startColumn],r=n.children.filter(e=>"listItemPrefixWhitespace"===e.type);for(const n of r){const{endColumn:r,startColumn:o,startLine:i}=n,a=r-o,s={editColumn:o,deleteCount:a,insertText:"".padEnd(c)};addErrorDetailIf_1(t,i,c,a,void 0,void 0,e,s)}}}}},codeFencePrefixRe=/^(.*?)[`~]/;function addError(e,t,n,r){const o=t[n-1],[,i]=o.match(codeFencePrefixRe)||[],a=void 0===i?void 0:{lineNumber:n+(r?0:1),insertText:`${i.replace(/[^>]/g," ").trim()}\n`};addErrorContext_1(e,n,o.trim(),void 0,void 0,void 0,a)}const md031={names:["MD031","blanks-around-fences"],description:"Fenced code blocks should be surrounded by blank lines",tags:["code","blank_lines"],parser:"micromark",function:function(e,t){const n=e.config.list_items,r=void 0===n||!!n,{lines:o}=e;for(const i of filterByTypesCached(["codeFenced"]))!r&&micromarkHelpers.getParentOfType(i,["listOrdered","listUnordered"])||(isBlankLine_1(o[i.startLine-2])||addError(t,o,i.startLine,!0),isBlankLine_1(o[i.endLine])||isBlankLine_1(o[i.endLine-1])||addError(t,o,i.endLine,!1))}},isList=e=>"listOrdered"===e.type||"listUnordered"===e.type,md032={names:["MD032","blanks-around-lists"],description:"Lists should be surrounded by blank lines",tags:["bullet","ul","ol","blank_lines"],parser:"micromark",function:function(e,t){const{lines:n,parsers:r}=e,o=filterByTypesCached(["blockQuotePrefix","linePrefix"]),i=micromarkHelpers.filterByPredicate(r.micromark.tokens,isList,e=>isList(e)||"htmlFlow"===e.type?[]:e.children);for(const a of i){const e=a.startLine;isBlankLine_1(n[e-2])||addErrorContext_1(t,e,n[e-1].trim(),void 0,void 0,void 0,{insertText:micromarkHelpers.getBlockQuotePrefixText(o,e)});const r=micromarkHelpers.filterByPredicate(a.children,e=>!micromarkHelpers.nonContentTokens.has(e.type),e=>micromarkHelpers.nonContentTokens.has(e.type)?[]:e.children);let i=a.endLine;r.length>0&&(i=r[r.length-1].endLine);const s=i;isBlankLine_1(n[s])||addErrorContext_1(t,s,n[s-1].trim(),void 0,void 0,void 0,{lineNumber:s+1,insertText:micromarkHelpers.getBlockQuotePrefixText(o,s)})}}},md033={names:["MD033","no-inline-html"],description:"Inline HTML",tags:["html"],parser:"micromark",function:function(e,t){let n=e.config.allowed_elements;n=Array.isArray(n)?n:[],n=n.map(e=>e.toLowerCase());for(const r of filterByTypesCached(["htmlText"],!0)){const e=micromarkHelpers.getHtmlTagInfo(r);if(e&&!e.close&&!n.includes(e.name.toLowerCase())){const n=[r.startColumn,r.text.replace(nextLinesRe_1,"").length];addError_1(t,r.startLine,"Element: "+e.name,void 0,n)}}}},md034={names:["MD034","no-bare-urls"],description:"Bare URL used",tags:["links","url"],parser:"micromark",function:function(e,t){for(const r of(n=e.parsers.micromark.tokens,micromarkHelpers.filterByPredicate(n,e=>{var t;if("literalAutolink"===e.type&&!micromarkHelpers.inHtmlFlow(e)){const n=null==(t=e.parent)?void 0:t.children,r=null==n?void 0:n.indexOf(e),o=null==n?void 0:n.at(r-1),i=null==n?void 0:n.at(r+1);return!(o&&i&&"data"===o.type&&"data"===i.type&&o.text.endsWith("<")&&i.text.startsWith(">"))}return!1},e=>{const{children:t}=e,n=[];for(let r=0;r<t.length;r++){const e=t[r],o=micromarkHelpers.getHtmlTagInfo(e);if(o&&!o.close){let e=1;for(let n=r+1;n<t.length;n++){const i=t[n],a=micromarkHelpers.getHtmlTagInfo(i);if(a&&o.name===a.name)if(a.close){if(e--,0===e){r=n;break}}else e++}}else n.push(e)}return n}))){const e=[r.startColumn,r.endColumn-r.startColumn],n={editColumn:e[0],deleteCount:e[1],insertText:`<${r.text}>`};addErrorContext_1(t,r.startLine,r.text,void 0,void 0,e,n)}var n}},md035={names:["MD035","hr-style"],description:"Horizontal rule style",tags:["hr"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent").trim();const r=filterByTypesCached(["thematicBreak"]);for(const o of r){const{startLine:e,text:r}=o;"consistent"===n&&(n=r),addErrorDetailIf_1(t,e,n,r)}}},emphasisTypes=[["emphasis","emphasisText"],["strong","strongText"]],isParagraphChildMeaningful=e=>!("htmlText"===e.type||"data"===e.type&&0===e.text.trim().length),md036={names:["MD036","no-emphasis-as-heading"],description:"Emphasis used instead of a heading",tags:["headings","emphasis"],parser:"micromark",function:function(e,t){let n=e.config.punctuation;n=String(void 0===n?allPunctuation_1:n);const r=new RegExp("["+n+"]$"),o=filterByTypesCached(["paragraph"],!0).filter(e=>{var t,n,r,o,i,a;return"content"===(null==(t=e.parent)?void 0:t.type)&&(!(null==(n=e.parent)?void 0:n.parent)||"htmlFlow"===(null==(o=null==(r=e.parent)?void 0:r.parent)?void 0:o.type)&&!(null==(a=null==(i=e.parent)?void 0:i.parent)?void 0:a.parent))&&1===e.children.filter(isParagraphChildMeaningful).length});for(const i of emphasisTypes){const e=micromarkHelpers.getDescendantsByType(o,i);for(const n of e)1!==n.children.length||"data"!==n.children[0].type||r.test(n.text)||addErrorContext_1(t,n.startLine,n.text)}}},md037={names:["MD037","no-space-in-emphasis"],description:"Spaces inside emphasis markers",tags:["whitespace","emphasis"],parser:"micromark",function:function(e,t){const{lines:n,parsers:r}=e,o=new Map;for(const a of["_","__","___","*","**","***"])o.set(a,[]);const i=micromarkHelpers.filterByPredicate(r.micromark.tokens,e=>e.children.some(e=>"data"===e.type));for(const a of i){for(const e of o.values())e.length=0;for(const e of a.children){const{text:t,type:n}=e;if("data"===n&&t.length<=3){const n=o.get(t);n&&!micromarkHelpers.inHtmlFlow(e)&&n.push(e)}}for(const e of o.entries()){const[r,o]=e;for(let e=0;e+1<o.length;e+=2){const i=o[e],a=n[i.startLine-1].slice(i.endColumn-1).match(/^\s+\S/);if(a){const[e]=a,n=`${r}${e}`;addError_1(t,i.startLine,void 0,n,[i.startColumn,n.length],{editColumn:i.endColumn,deleteCount:e.length-1})}const s=o[e+1],l=n[s.startLine-1].slice(0,s.startColumn-1).match(/\S\s+$/);if(l){const[e]=l,n=`${e}${r}`;addError_1(t,s.startLine,void 0,n,[s.endColumn-n.length,n.length],{editColumn:s.startColumn-(e.length-1),deleteCount:e.length-1})}}}}}},md038={names:["MD038","no-space-in-code"],description:"Spaces inside code span elements",tags:["whitespace","code"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["codeText"]);for(const r of n){const e=micromarkHelpers.getDescendantsByType(r,["codeTextData"]);if(e.length>0){const n=micromarkHelpers.getDescendantsByType(r,["codeTextPadding"]),o=n[0],i=e[0],a=/^(\s+)(\S)/.exec(i.text)||[null,"",""],s="`"===a[2],l=a[1].length-(s&&!o?1:0),c=l>0,u=n[n.length-1],d=e[e.length-1],p=/(\S)(\s+)$/.exec(d.text)||[null,"",""],f="`"===p[1],h=p[2].length-(f&&!u?1:0),A=h>0,m=c&&A&&o&&u&&!s&&!f,g=r.text;if(c){const e=(m?o:i).startColumn,n=l+(m?o.text.length:0);addErrorContext_1(t,i.startLine,g,!0,!1,[e,n],{editColumn:e,deleteCount:n})}if(A){const e=(m?u:d).endColumn,n=h+(m?u.text.length:0);addErrorContext_1(t,d.endLine,g,!1,!0,[e-n,n],{editColumn:e-n,deleteCount:n})}}}}};function addLabelSpaceError(e,t,n,r){const o=n.text.match(r?/^[^\S\r\n]+/:/[^\S\r\n]+$/),i=o?[r?n.startColumn:n.endColumn-o[0].length,o[0].length]:void 0;addErrorContext_1(e,r?n.startLine+(o?0:1):n.endLine-(o?0:1),t.text.replace(/\s+/g," "),r,!r,i,i?{editColumn:i[0],deleteCount:i[1]}:void 0)}const md039={names:["MD039","no-space-in-links"],description:"Spaces inside link text",tags:["whitespace","links"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["label"]).filter(e=>{var t;return"link"===(null==(t=e.parent)?void 0:t.type)});for(const r of n){const e=r.children.filter(e=>"labelText"===e.type);for(const n of e)n.text.trimStart().length!==n.text.length&&addLabelSpaceError(t,r,n,!0),n.text.trimEnd().length!==n.text.length&&addLabelSpaceError(t,r,n,!1)}}},md040={names:["MD040","fenced-code-language"],description:"Fenced code blocks should have a language specified",tags:["code","language"],parser:"micromark",function:function(e,t){var n;let r=e.config.allowed_languages;r=Array.isArray(r)?r:[];const o=!!e.config.language_only,i=filterByTypesCached(["codeFenced"]);for(const a of i){const e=micromarkHelpers.getDescendantsByType(a,["codeFencedFence"])[0],{startLine:i,text:s}=e,l=null==(n=micromarkHelpers.getDescendantsByType(e,["codeFencedFenceInfo"])[0])?void 0:n.text;l?r.length>0&&!r.includes(l)&&addError_1(t,i,`"${l}" is not allowed`):addErrorContext_1(t,i,s),o&&micromarkHelpers.getDescendantsByType(e,["codeFencedFenceMeta"]).length>0&&addError_1(t,i,`Info string contains more than language: "${s}"`)}}},headingTagNameRe=/^h[1-6]$/;function getHtmlFlowTagName(e){const{children:t,type:n}=e;if("htmlFlow"===n){const e=micromarkHelpers.filterByTypes(t,["htmlText"],!0),n=e.length>0&&micromarkHelpers.getHtmlTagInfo(e[0]);if(n)return n.name.toLowerCase()}return null}const md041={names:["MD041","first-line-heading","first-line-h1"],description:"First line in a file should be a top-level heading",tags:["headings"],parser:"micromark",function:function(e,t){const n=!!e.config.allow_preamble,r=Number(e.config.level||1),{tokens:o}=e.parsers.micromark;if(!frontMatterHasTitle(e.frontMatterLines,e.config.front_matter_title)){let i=0;for(const e of o){const{startLine:t,type:o}=e;if(!micromarkHelpers.nonContentTokens.has(o)&&!micromarkHelpers.isHtmlFlowComment(e)){let a=null;if("atxHeading"===o||"setextHeading"===o){micromarkHelpers.getHeadingLevel(e)!==r&&(i=t);break}if((a=getHtmlFlowTagName(e))&&headingTagNameRe.test(a)){a!==`h${r}`&&(i=t);break}if(!n){i=t;break}}}i>0&&addErrorContext_1(t,i,e.lines[i-1])}}},md042={names:["MD042","no-empty-links"],description:"No empty links",tags:["links"],parser:"micromark",function:function(e,t){const{definitions:n}=getReferenceLinkImageData(),r=e=>{const t=n.get(e.text.trim());return t&&"#"===t[1]},o=filterByTypesCached(["link"]);for(const i of o){const e=micromarkHelpers.getDescendantsByType(i,["label","labelText"]),n=micromarkHelpers.getDescendantsByType(i,["reference"]),o=micromarkHelpers.getDescendantsByType(i,["resource"]),a=micromarkHelpers.getDescendantsByType(n,["referenceString"]),s=micromarkHelpers.getDescendantsByType(o,["resourceDestination",["resourceDestinationLiteral","resourceDestinationRaw"],"resourceDestinationString"]),l=e.length>0,c=n.length>0,u=o.length>0,d=a.length>0,p=s.length>0;let f=!1;l&&(!c&&!u||c&&!d)?f=r(e[0]):d&&!p?f=r(a[0]):!d&&p?f="#"===s[0].text.trim():d||p||(f=!0),f&&addErrorContext_1(t,i.startLine,i.text,void 0,void 0,[i.startColumn,i.endColumn-i.startColumn])}}},md043={names:["MD043","required-headings"],description:"Required heading structure",tags:["headings"],parser:"micromark",function:function(e,t){const n=e.config.headings;if(!Array.isArray(n))return;const r=e.config.match_case||!1;let o=0,i=!1,a=!1,s=!1;const l=()=>n[o++]||"[None]",c=e=>r?e:e.toLowerCase();for(const d of filterByTypesCached(["atxHeading","setextHeading"]))if(!a){const e=micromarkHelpers.getHeadingText(d),n=micromarkHelpers.getHeadingLevel(d);s=!0;const r=`${"".padEnd(n,"#")} ${e}`,u=l();if("*"===u){c(l())!==c(r)&&(i=!0,o--)}else"+"===u?i=!0:"?"===u||(c(u)===c(r)?i=!1:i?o--:(addErrorDetailIf_1(t,d.startLine,u,r),a=!0))}const u=n.length-o;a||!(u>1||1===u&&"*"!==n[o])||!s&&n.every(e=>"*"===e)||addErrorContext_1(t,e.lines.length,n[o])}},asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(e){return null!==e&&(e<32||127===e)}const asciiDigit=regexCheck(/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(e){return null!==e&&e<-2}function markdownLineEndingOrSpace(e){return null!==e&&(e<0||32===e)}function markdownSpace(e){return-2===e||-1===e||32===e}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function factorySpace(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(markdownSpace(r))return e.enter(n),a(r);return t(r)};function a(r){return markdownSpace(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}function factoryWhitespace(e,t){let n;return function r(o){if(markdownLineEnding(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(markdownSpace(o))return factorySpace(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}function factoryAttributes(e,t,n,r,o,i,a,s,l,c,u,d,p,f,h){let A,m;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),g};function g(t){return 35===t?(A=a,y(t)):46===t?(A=s,y(t)):h&&markdownSpace(t)?factorySpace(e,g,"whitespace")(t):!h&&markdownLineEndingOrSpace(t)?factoryWhitespace(e,g)(t):null===t||markdownLineEnding(t)||unicodeWhitespace(t)||unicodePunctuation(t)&&45!==t&&95!==t?P(t):(e.enter(i),e.enter(l),e.consume(t),x)}function y(t){const n=A+"Marker";return e.enter(i),e.enter(A),e.enter(n),e.consume(t),e.exit(n),v}function v(t){if(null===t||34===t||35===t||39===t||46===t||60===t||61===t||62===t||96===t||125===t||markdownLineEndingOrSpace(t))return n(t);const r=A+"Value";return e.enter(r),e.consume(t),b}function b(t){if(null===t||34===t||39===t||60===t||61===t||62===t||96===t)return n(t);if(35===t||46===t||125===t||markdownLineEndingOrSpace(t)){const n=A+"Value";return e.exit(n),e.exit(A),e.exit(i),g(t)}return e.consume(t),b}function x(t){return null===t||markdownLineEnding(t)||unicodeWhitespace(t)||unicodePunctuation(t)&&45!==t&&46!==t&&58!==t&&95!==t?(e.exit(l),h&&markdownSpace(t)?factorySpace(e,w,"whitespace")(t):!h&&markdownLineEndingOrSpace(t)?factoryWhitespace(e,w)(t):w(t)):(e.consume(t),x)}function w(t){return 61===t?(e.enter(c),e.consume(t),e.exit(c),C):(e.exit(i),g(t))}function C(t){return null===t||60===t||61===t||62===t||96===t||125===t||h&&markdownLineEnding(t)?n(t):34===t||39===t?(e.enter(u),e.enter(p),e.consume(t),e.exit(p),m=t,_):h&&markdownSpace(t)?factorySpace(e,C,"whitespace")(t):!h&&markdownLineEndingOrSpace(t)?factoryWhitespace(e,C)(t):(e.enter(d),e.enter(f),e.consume(t),m=void 0,$)}function $(t){return null===t||34===t||39===t||60===t||61===t||62===t||96===t?n(t):125===t||markdownLineEndingOrSpace(t)?(e.exit(f),e.exit(d),e.exit(i),g(t)):(e.consume(t),$)}function _(t){return t===m?(e.enter(p),e.consume(t),e.exit(p),e.exit(u),e.exit(i),k):(e.enter(d),S(t))}function S(t){return t===m?(e.exit(d),_(t)):null===t?n(t):markdownLineEnding(t)?h?n(t):factoryWhitespace(e,S)(t):(e.enter(f),e.consume(t),E)}function E(t){return t===m||null===t||markdownLineEnding(t)?(e.exit(f),S(t)):(e.consume(t),E)}function k(e){return 125===e||markdownLineEndingOrSpace(e)?g(e):P(e)}function P(i){return 125===i?(e.enter(o),e.consume(i),e.exit(o),e.exit(r),t):n(i)}}function factoryLabel$1(e,t,n,r,o,i,a){let s,l=0,c=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),u};function u(n){return 93===n?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),d(n))}function d(t){if(93===t&&!c)return h(t);const n=e.enter("chunkText",{_contentTypeTextTrailing:!0,contentType:"text",previous:s});return s&&(s.next=n),s=n,p(t)}function p(t){return null===t||l>999||91===t&&++c>32?n(t):93!==t||c--?markdownLineEnding(t)?a?n(t):(e.consume(t),e.exit("chunkText"),d):(e.consume(t),92===t?f:p):(e.exit("chunkText"),h(t))}function f(t){return 91===t||92===t||93===t?(e.consume(t),l++,p):p(t)}function h(n){return e.exit(i),e.enter(o),e.consume(n),e.exit(o),e.exit(r),t}}function factoryName(e,t,n,r){const o=this;return function(t){if(null===t||markdownLineEnding(t)||unicodePunctuation(t)||unicodeWhitespace(t))return n(t);return e.enter(r),e.consume(t),i};function i(a){return null===a||markdownLineEnding(a)||unicodeWhitespace(a)||unicodePunctuation(a)&&45!==a&&95!==a?(e.exit(r),45===o.previous||95===o.previous?n(a):t(a)):(e.consume(a),i)}}const directiveContainer={tokenize:tokenizeDirectiveContainer,concrete:!0},label$2={tokenize:tokenizeLabel$2,partial:!0},attributes$2={tokenize:tokenizeAttributes$2,partial:!0},nonLazyLine={tokenize:tokenizeNonLazyLine,partial:!0};function tokenizeDirectiveContainer(e,t,n){const r=this,o=r.events[r.events.length-1],i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let a,s=0;return function(t){return e.enter("directiveContainer"),e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),l(t)};function l(t){return 58===t?(e.consume(t),s++,l):s<3?n(t):(e.exit("directiveContainerSequence"),factoryName.call(r,e,c,n,"directiveContainerName")(t))}function c(t){return 91===t?e.attempt(label$2,u,u)(t):u(t)}function u(t){return 123===t?e.attempt(attributes$2,d,d)(t):d(t)}function d(t){return factorySpace(e,p,"whitespace")(t)}function p(o){return e.exit("directiveContainerFence"),null===o?w(o):markdownLineEnding(o)?r.interrupt?t(o):e.attempt(nonLazyLine,f,w)(o):n(o)}function f(t){return null===t?w(t):markdownLineEnding(t)?e.check(nonLazyLine,y,w)(t):(e.enter("directiveContainerContent"),h(t))}function h(t){return e.attempt({tokenize:C,partial:!0},x,i?factorySpace(e,A,"linePrefix",i+1):A)(t)}function A(t){return null===t?x(t):markdownLineEnding(t)?e.check(nonLazyLine,g,x)(t):g(t)}function m(t){if(null===t){const n=e.exit("chunkDocument");return r.parser.lazy[n.start.line]=!1,x(t)}return markdownLineEnding(t)?e.check(nonLazyLine,v,b)(t):(e.consume(t),m)}function g(t){const n=e.enter("chunkDocument",{contentType:"document",previous:a});return a&&(a.next=n),a=n,m(t)}function y(t){return e.enter("directiveContainerContent"),h(t)}function v(t){e.consume(t);const n=e.exit("chunkDocument");return r.parser.lazy[n.start.line]=!1,h}function b(t){const n=e.exit("chunkDocument");return r.parser.lazy[n.start.line]=!1,x(t)}function x(t){return e.exit("directiveContainerContent"),w(t)}function w(n){return e.exit("directiveContainer"),t(n)}function C(e,t,n){let o=0;return factorySpace(e,function(t){return e.enter("directiveContainerFence"),e.enter("directiveContainerSequence"),i(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return 58===t?(e.consume(t),o++,i):o<s?n(t):(e.exit("directiveContainerSequence"),factorySpace(e,a,"whitespace")(t))}function a(r){return null===r||markdownLineEnding(r)?(e.exit("directiveContainerFence"),t(r)):n(r)}}}function tokenizeLabel$2(e,t,n){return factoryLabel$1(e,t,n,"directiveContainerLabel","directiveContainerLabelMarker","directiveContainerLabelString",!0)}function tokenizeAttributes$2(e,t,n){return factoryAttributes(e,t,n,"directiveContainerAttributes","directiveContainerAttributesMarker","directiveContainerAttribute","directiveContainerAttributeId","directiveContainerAttributeClass","directiveContainerAttributeName","directiveContainerAttributeInitializerMarker","directiveContainerAttributeValueLiteral","directiveContainerAttributeValue","directiveContainerAttributeValueMarker","directiveContainerAttributeValueData",!0)}function tokenizeNonLazyLine(e,t,n){const r=this;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const directiveLeaf={tokenize:tokenizeDirectiveLeaf},label$1={tokenize:tokenizeLabel$1,partial:!0},attributes$1={tokenize:tokenizeAttributes$1,partial:!0};function tokenizeDirectiveLeaf(e,t,n){const r=this;return function(t){return e.enter("directiveLeaf"),e.enter("directiveLeafSequence"),e.consume(t),o};function o(t){return 58===t?(e.consume(t),e.exit("directiveLeafSequence"),factoryName.call(r,e,i,n,"directiveLeafName")):n(t)}function i(t){return 91===t?e.attempt(label$1,a,a)(t):a(t)}function a(t){return 123===t?e.attempt(attributes$1,s,s)(t):s(t)}function s(t){return factorySpace(e,l,"whitespace")(t)}function l(r){return null===r||markdownLineEnding(r)?(e.exit("directiveLeaf"),t(r)):n(r)}}function tokenizeLabel$1(e,t,n){return factoryLabel$1(e,t,n,"directiveLeafLabel","directiveLeafLabelMarker","directiveLeafLabelString",!0)}function tokenizeAttributes$1(e,t,n){return factoryAttributes(e,t,n,"directiveLeafAttributes","directiveLeafAttributesMarker","directiveLeafAttribute","directiveLeafAttributeId","directiveLeafAttributeClass","directiveLeafAttributeName","directiveLeafAttributeInitializerMarker","directiveLeafAttributeValueLiteral","directiveLeafAttributeValue","directiveLeafAttributeValueMarker","directiveLeafAttributeValueData",!0)}const directiveText={tokenize:tokenizeDirectiveText,previous:previous$2},label={tokenize:tokenizeLabel,partial:!0},attributes={tokenize:tokenizeAttributes,partial:!0};function previous$2(e){return 58!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeDirectiveText(e,t,n){const r=this;return function(t){return e.enter("directiveText"),e.enter("directiveTextMarker"),e.consume(t),e.exit("directiveTextMarker"),factoryName.call(r,e,o,n,"directiveTextName")};function o(t){return 58===t?n(t):91===t?e.attempt(label,i,i)(t):i(t)}function i(t){return 123===t?e.attempt(attributes,a,a)(t):a(t)}function a(n){return e.exit("directiveText"),t(n)}}function tokenizeLabel(e,t,n){return factoryLabel$1(e,t,n,"directiveTextLabel","directiveTextLabelMarker","directiveTextLabelString")}function tokenizeAttributes(e,t,n){return factoryAttributes(e,t,n,"directiveTextAttributes","directiveTextAttributesMarker","directiveTextAttribute","directiveTextAttributeId","directiveTextAttributeClass","directiveTextAttributeName","directiveTextAttributeInitializerMarker","directiveTextAttributeValueLiteral","directiveTextAttributeValue","directiveTextAttributeValueMarker","directiveTextAttributeValueData")}function directive(){return{text:{58:directiveText},flow:{58:[directiveContainer,directiveLeaf]}}}const element=document.createElement("i");function decodeNamedCharacterReference(e){const t="&"+e+";";element.innerHTML=t;const n=element.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}const wwwPrefix={tokenize:tokenizeWwwPrefix,partial:!0},domain={tokenize:tokenizeDomain,partial:!0},path={tokenize:tokenizePath,partial:!0},trail={tokenize:tokenizeTrail,partial:!0},emailDomainDotTrail={tokenize:tokenizeEmailDomainDotTrail,partial:!0},wwwAutolink={name:"wwwAutolink",tokenize:tokenizeWwwAutolink,previous:previousWww},protocolAutolink={name:"protocolAutolink",tokenize:tokenizeProtocolAutolink,previous:previousProtocol},emailAutolink={name:"emailAutolink",tokenize:tokenizeEmailAutolink,previous:previousEmail},text$3={};function gfmAutolinkLiteral(){return{text:text$3}}let code$2=48;for(;code$2<123;)text$3[code$2]=emailAutolink,code$2++,58===code$2?code$2=65:91===code$2&&(code$2=97);function tokenizeEmailAutolink(e,t,n){const r=this;let o,i;return function(t){if(!gfmAtext(t)||!previousEmail.call(r,r.previous)||previousUnbalanced(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return gfmAtext(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(emailDomainDotTrail,c,l)(t):45===t||95===t||asciiAlphanumeric(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&asciiAlpha(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}}function tokenizeWwwAutolink(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!previousWww.call(r,r.previous)||previousUnbalanced(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wwwPrefix,e.attempt(domain,e.attempt(path,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}}function tokenizeProtocolAutolink(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&previousProtocol.call(r,r.previous)&&!previousUnbalanced(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(asciiAlpha(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||asciiControl(t)||markdownLineEndingOrSpace(t)||unicodeWhitespace(t)||unicodePunctuation(t)?n(t):e.attempt(domain,e.attempt(path,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}}function tokenizeWwwPrefix(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}}function tokenizeDomain(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(trail,l,s)(t):null===t||markdownLineEndingOrSpace(t)||unicodeWhitespace(t)||45!==t&&unicodePunctuation(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}}function tokenizePath(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(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(trail,t,i)(a):null===a||markdownLineEndingOrSpace(a)||unicodeWhitespace(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}}function tokenizeTrail(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),i):93===a?(e.consume(a),o):60===a||null===a||markdownLineEndingOrSpace(a)||unicodeWhitespace(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?t(e):r(e)}function i(e){return asciiAlpha(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):asciiAlpha(t)?(e.consume(t),a):n(t)}}function tokenizeEmailDomainDotTrail(e,t,n){return function(t){return e.consume(t),r};function r(e){return asciiAlphanumeric(e)?n(e):t(e)}}function previousWww(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||markdownLineEndingOrSpace(e)}function previousProtocol(e){return!asciiAlpha(e)}function previousEmail(e){return!(47===e||gfmAtext(e))}function gfmAtext(e){return 43===e||45===e||46===e||95===e||asciiAlphanumeric(e)}function previousUnbalanced(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}function splice(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function push$1(e,t){return e.length>0?(splice(e,e.length,0,t),e):t}function classifyCharacter(e){return null===e||markdownLineEndingOrSpace(e)||unicodeWhitespace(e)?1:unicodePunctuation(e)?2:void 0}function resolveAll(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}text$3[43]=emailAutolink,text$3[45]=emailAutolink,text$3[46]=emailAutolink,text$3[95]=emailAutolink,text$3[72]=[emailAutolink,protocolAutolink],text$3[104]=[emailAutolink,protocolAutolink],text$3[87]=[emailAutolink,wwwAutolink],text$3[119]=[emailAutolink,wwwAutolink];const attention={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(e,t){let n,r,o,i,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};movePoint(d,-s),movePoint(p,s),i={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},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=push$1(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=push$1(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=push$1(l,resolveAll(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=push$1(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=push$1(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,splice(e,n-1,u-n+3,l),u=n+l.length-c-2;break}for(u=-1;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e}function tokenizeAttention(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=classifyCharacter(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=classifyCharacter(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}function movePoint(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const autolink$2={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(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"),o};function o(t){return asciiAlpha(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||asciiAlphanumeric(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||asciiAlphanumeric(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||asciiControl(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):asciiAtext(t)?(e.consume(t),l):n(t)}function c(e){return asciiAlphanumeric(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||asciiAlphanumeric(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};function tokenizeBlankLine(e,t,n){return function(t){return markdownSpace(t)?factorySpace(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||markdownLineEnding(e)?t(e):n(e)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(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"),o}return n(t)};function o(n){return markdownSpace(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}function tokenizeBlockQuoteContinuation(e,t,n){const r=this;return function(t){if(markdownSpace(t))return factorySpace(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(blockQuote,t,n)(r)}}function exit(e){e.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};function tokenizeCharacterEscape(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return asciiPunctuation(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};function tokenizeCharacterReference(e,t,n){const r=this;let o,i,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"),o=31,i=asciiAlphanumeric,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=asciiHexDigit,c):(e.enter("characterReferenceValue"),o=7,i=asciiDigit,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==asciiAlphanumeric||decodeNamedCharacterReference(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}const nonLazyContinuation$1={partial:!0,tokenize:tokenizeNonLazyContinuation$1},codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return function(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),a};function a(t){return e.enter("codeFencedFence"),markdownSpace(t)?factorySpace(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):l(t)}function l(t){return t===i?(e.enter("codeFencedFenceSequence"),c(t)):n(t)}function c(t){return t===i?(o++,e.consume(t),c):o>=s?(e.exit("codeFencedFenceSequence"),markdownSpace(t)?factorySpace(e,u,"whitespace")(t):u(t)):n(t)}function u(r){return null===r||markdownLineEnding(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,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,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),markdownSpace(t)?factorySpace(e,c,"whitespace")(t):c(t))}function c(n){return null===n||markdownLineEnding(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(nonLazyContinuation$1,f,y)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||markdownLineEnding(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):markdownSpace(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),factorySpace(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||markdownLineEnding(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(t))}function p(t){return null===t||markdownLineEnding(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),p)}function f(t){return e.attempt(o,y,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),A}function A(t){return a>0&&markdownSpace(t)?factorySpace(e,m,"linePrefix",a+1)(t):m(t)}function m(t){return null===t||markdownLineEnding(t)?e.check(nonLazyContinuation$1,f,y)(t):(e.enter("codeFlowValue"),g(t))}function g(t){return null===t||markdownLineEnding(t)?(e.exit("codeFlowValue"),m(t)):(e.consume(t),g)}function y(n){return e.exit("codeFenced"),t(n)}}function tokenizeNonLazyContinuation$1(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"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),factorySpace(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):markdownLineEnding(t)?e.attempt(furtherStart,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||markdownLineEnding(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}function tokenizeFurtherStart(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):markdownLineEnding(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):factorySpace(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):markdownLineEnding(e)?o(e):n(e)}}const codeText={name:"codeText",previous:previous$1,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++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}function previous$1(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type}function tokenizeCodeText(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,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?(o=e.enter("codeTextSequence"),r=0,c(t)):markdownLineEnding(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||markdownLineEnding(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}class SpliceBuffer{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 o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&chunkedPush(this.left,n),o.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),chunkedPush(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),chunkedPush(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);chunkedPush(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);chunkedPush(this.left,t.reverse())}}}function chunkedPush(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 subtokenize(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new SpliceBuffer(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,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,subcontent(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[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 splice(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function subcontent(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];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,A=0;const m=[A];for(;f;){for(;e.get(++o)[1]!==f;);i.push(o),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&&(A=p+1,m.push(A),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){const t=s.slice(m[p],m[p+1]),n=i.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 content$1={resolve:resolveContent,tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(e){return subtokenize(e),e}function tokenizeContent(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?o(t):markdownLineEnding(t)?e.check(continuationConstruct,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function tokenizeContinuation(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),factorySpace(e,o,"linePrefix")};function o(o){if(null===o||markdownLineEnding(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function factoryDestination(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||asciiControl(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(i),e.consume(n),e.exit(i),e.exit(o),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||markdownLineEnding(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(o){return u||null!==o&&41!==o&&!markdownLineEndingOrSpace(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||asciiControl(o)?n(o):(e.consume(o),92===o?A:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function A(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function factoryLabel(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),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(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):markdownLineEnding(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||markdownLineEnding(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!markdownSpace(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function factoryTitle(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):markdownLineEnding(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),factorySpace(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||markdownLineEnding(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 normalizeIdentifier(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const definition={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return factoryLabel.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=normalizeIdentifier(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 markdownLineEndingOrSpace(t)?factoryWhitespace(e,s)(t):s(t)}function s(t){return factoryDestination(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(titleBefore,c,c)(t)}function c(t){return markdownSpace(t)?factorySpace(e,u,"whitespace")(t):u(t)}function u(i){return null===i||markdownLineEnding(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}function tokenizeTitleBefore(e,t,n){return function(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,r)(t):n(t)};function r(t){return factoryTitle(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return markdownSpace(t)?factorySpace(e,i,"whitespace")(t):i(t)}function i(e){return null===e||markdownLineEnding(e)?t(e):n(e)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return markdownLineEnding(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(e,t){let n,r,o=e.length-2,i=3;return"whitespace"===e[i][1].type&&(i+=2),o-2>i&&"whitespace"===e[o][1].type&&(o-=2),"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4),o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},splice(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]])),e}function tokenizeHeadingAtx(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||markdownLineEndingOrSpace(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||markdownLineEnding(n)?(e.exit("atxHeading"),t(n)):markdownSpace(n)?factorySpace(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||markdownLineEndingOrSpace(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}const htmlBlockNames=["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"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););return 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)),e}function tokenizeHtmlFlow(e,t,n){const r=this;let o,i,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),i=!0,f):63===s?(e.consume(s),o=3,r.interrupt?t:M):asciiAlpha(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,p):asciiAlpha(i)?(e.consume(i),o=4,r.interrupt?t:M):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:M):n(o)}function p(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:S:p):n(o)}function f(t){return asciiAlpha(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||markdownLineEndingOrSpace(s)){const l=47===s,c=a.toLowerCase();return l||i||!htmlRawNames.includes(c)?htmlBlockNames.includes(a.toLowerCase())?(o=6,l?(e.consume(s),A):r.interrupt?t(s):S(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?m(s):g(s)):(o=1,r.interrupt?t(s):S(s))}return 45===s||asciiAlphanumeric(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function A(o){return 62===o?(e.consume(o),r.interrupt?t:S):n(o)}function m(t){return markdownSpace(t)?(e.consume(t),m):$(t)}function g(t){return 47===t?(e.consume(t),$):58===t||95===t||asciiAlpha(t)?(e.consume(t),y):markdownSpace(t)?(e.consume(t),g):$(t)}function y(t){return 45===t||46===t||58===t||95===t||asciiAlphanumeric(t)?(e.consume(t),y):v(t)}function v(t){return 61===t?(e.consume(t),b):markdownSpace(t)?(e.consume(t),v):g(t)}function b(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):markdownSpace(t)?(e.consume(t),b):w(t)}function x(t){return t===l?(e.consume(t),l=null,C):null===t||markdownLineEnding(t)?n(t):(e.consume(t),x)}function w(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||markdownLineEndingOrSpace(t)?v(t):(e.consume(t),w)}function C(e){return 47===e||62===e||markdownSpace(e)?g(e):n(e)}function $(t){return 62===t?(e.consume(t),_):n(t)}function _(t){return null===t||markdownLineEnding(t)?S(t):markdownSpace(t)?(e.consume(t),_):n(t)}function S(t){return 45===t&&2===o?(e.consume(t),B):60===t&&1===o?(e.consume(t),T):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),M):93===t&&5===o?(e.consume(t),L):!markdownLineEnding(t)||6!==o&&7!==o?null===t||markdownLineEnding(t)?(e.exit("htmlFlowData"),E(t)):(e.consume(t),S):(e.exit("htmlFlowData"),e.check(blankLineBefore,N,E)(t))}function E(t){return e.check(nonLazyContinuationStart,k,N)(t)}function k(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),P}function P(t){return null===t||markdownLineEnding(t)?E(t):(e.enter("htmlFlowData"),S(t))}function B(t){return 45===t?(e.consume(t),M):S(t)}function T(t){return 47===t?(e.consume(t),a="",I):S(t)}function I(t){if(62===t){const n=a.toLowerCase();return htmlRawNames.includes(n)?(e.consume(t),D):S(t)}return asciiAlpha(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),I):S(t)}function L(t){return 93===t?(e.consume(t),M):S(t)}function M(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),M):S(t)}function D(t){return null===t||markdownLineEnding(t)?(e.exit("htmlFlowData"),N(t)):(e.consume(t),D)}function N(n){return e.exit("htmlFlow"),t(n)}}function tokenizeNonLazyContinuationStart(e,t,n){const r=this;return function(t){if(markdownLineEnding(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function tokenizeBlankLineBefore(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(blankLine,t,n)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(e,t,n){const r=this;let o,i,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),b):63===t?(e.consume(t),y):asciiAlpha(t)?(e.consume(t),C):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,f):asciiAlpha(t)?(e.consume(t),g):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):markdownLineEnding(t)?(a=u,I(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),p):u(t)}function p(e){return 62===e?T(e):45===e?d(e):u(e)}function f(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:f):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),A):markdownLineEnding(t)?(a=h,I(t)):(e.consume(t),h)}function A(t){return 93===t?(e.consume(t),m):h(t)}function m(t){return 62===t?T(t):93===t?(e.consume(t),m):h(t)}function g(t){return null===t||62===t?T(t):markdownLineEnding(t)?(a=g,I(t)):(e.consume(t),g)}function y(t){return null===t?n(t):63===t?(e.consume(t),v):markdownLineEnding(t)?(a=y,I(t)):(e.consume(t),y)}function v(e){return 62===e?T(e):y(e)}function b(t){return asciiAlpha(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||asciiAlphanumeric(t)?(e.consume(t),x):w(t)}function w(t){return markdownLineEnding(t)?(a=w,I(t)):markdownSpace(t)?(e.consume(t),w):T(t)}function C(t){return 45===t||asciiAlphanumeric(t)?(e.consume(t),C):47===t||62===t||markdownLineEndingOrSpace(t)?$(t):n(t)}function $(t){return 47===t?(e.consume(t),T):58===t||95===t||asciiAlpha(t)?(e.consume(t),_):markdownLineEnding(t)?(a=$,I(t)):markdownSpace(t)?(e.consume(t),$):T(t)}function _(t){return 45===t||46===t||58===t||95===t||asciiAlphanumeric(t)?(e.consume(t),_):S(t)}function S(t){return 61===t?(e.consume(t),E):markdownLineEnding(t)?(a=S,I(t)):markdownSpace(t)?(e.consume(t),S):$(t)}function E(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,k):markdownLineEnding(t)?(a=E,I(t)):markdownSpace(t)?(e.consume(t),E):(e.consume(t),P)}function k(t){return t===o?(e.consume(t),o=void 0,B):null===t?n(t):markdownLineEnding(t)?(a=k,I(t)):(e.consume(t),k)}function P(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||markdownLineEndingOrSpace(t)?$(t):(e.consume(t),P)}function B(e){return 47===e||62===e||markdownLineEndingOrSpace(e)?$(e):n(e)}function T(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function I(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),L}function L(t){return markdownSpace(t)?factorySpace(e,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):M(t)}function M(t){return e.enter("htmlTextData"),a(t)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(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}}return e.length!==n.length&&splice(e,0,e.length,n),e}function resolveToLabelEnd(e,t){let n,r,o,i,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(o){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&&(o=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[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=push$1(i,e.slice(r+1,r+s+3)),i=push$1(i,[["enter",u,t]]),i=push$1(i,resolveAll(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=push$1(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=push$1(i,e.slice(o+1)),i=push$1(i,[["exit",l,t]]),splice(e,r,e.length,i),e}function tokenizeLabelEnd(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize({start:o.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(resourceConstruct,c,i?c:u)(t):91===t?e.attempt(referenceFullConstruct,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(referenceCollapsedConstruct,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}function tokenizeResource(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,o)(t):o(t)}function o(t){return 41===t?c(t):factoryDestination(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?factoryTitle(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return markdownLineEndingOrSpace(t)?factoryWhitespace(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)}}function tokenizeReferenceFull(e,t,n){const r=this;return function(t){return factoryLabel.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(normalizeIdentifier(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}function tokenizeReferenceCollapsed(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 labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(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"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),factorySpace(e,t,"linePrefix")}}const thematicBreak={name:"thematicBreak",tokenize:tokenizeThematicBreak};function tokenizeThematicBreak(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||markdownLineEnding(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),markdownSpace(t)?factorySpace(e,i,"whitespace")(t):i(t))}}const list$5={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:asciiDigit(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(thematicBreak,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 asciiDigit(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(blankLine,r.interrupt?n:c,e.attempt(listItemPrefixWhitespaceConstruct,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return markdownSpace(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}function tokenizeListContinuation(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(blankLine,function(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,factorySpace(e,t,"listItemIndent",r.containerState.size+1)(n)},function(n){if(r.containerState.furtherBlankLines||!markdownSpace(n))return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n);return r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(indentConstruct,t,o)(n)});function o(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,factorySpace(e,e.attempt(list$5,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function tokenizeIndent$1(e,t,n){const r=this;return factorySpace(e,function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)},"listItemIndent",r.containerState.size+1)}function tokenizeListEnd(e){e.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(e,t,n){const r=this;return factorySpace(e,function(e){const o=r.events[r.events.length-1];return!markdownSpace(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)},"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};return e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a,e.push(["exit",a,t]),e}function tokenizeSetextUnderline(e,t,n){const r=this;let o;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"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),markdownSpace(t)?factorySpace(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||markdownLineEnding(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},exit:gfmFootnoteDefinitionEnd}},text:{91:{name:"gfmFootnoteCall",tokenize:tokenizeGfmFootnoteCall},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][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(o){if(!a||!a._balanced)return n(o);const s=normalizeIdentifier(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function resolveToPotentialGfmFootnoteCall(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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function tokenizeGfmFootnoteCall(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,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&&!i||null===s||91===s||markdownLineEndingOrSpace(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(normalizeIdentifier(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return markdownLineEndingOrSpace(s)||(i=!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 tokenizeDefinitionStart(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,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||markdownLineEndingOrSpace(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=normalizeIdentifier(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return markdownLineEndingOrSpace(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"),o.includes(i)||o.push(i),factorySpace(e,p,"gfmFootnoteDefinitionWhitespace")):n(t)}function p(e){return t(e)}}function tokenizeDefinitionContinuation(e,t,n){return e.check(blankLine,t,e.attempt(indent,t,n))}function gfmFootnoteDefinitionEnd(e){e.exit("gfmFootnoteDefinition")}function tokenizeIndent(e,t,n){const r=this;return factorySpace(e,function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)},"gfmFootnoteDefinitionIndent",5)}class EditMap{constructor(){this.map=[]}add(e,t,n){addImplementation(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 addImplementation(e,t,n,r){let o=0;if(0!==n||0!==r.length){for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}}function gfmTableAlign(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function gfmTable$1(){return{flow:{null:{name:"table",tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(e,t,n){const r=this;let o,i=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 o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?b:s;if(i===b&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):markdownLineEnding(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):markdownSpace(t)?factorySpace(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||markdownLineEndingOrSpace(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"),o=!1,markdownSpace(t)?factorySpace(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?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),f):v(t)}function f(t){return markdownSpace(t)?factorySpace(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),A):45===t?(a+=1,A(t)):null===t||markdownLineEnding(t)?y(t):v(t)}function A(t){return 45===t?(e.enter("tableDelimiterFiller"),m(t)):v(t)}function m(t){return 45===t?(e.consume(t),m):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),g):(e.exit("tableDelimiterFiller"),g(t))}function g(t){return markdownSpace(t)?factorySpace(e,y,"whitespace")(t):y(t)}function y(n){return 124===n?p(n):(null===n||markdownLineEnding(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function b(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||markdownLineEnding(n)?(e.exit("tableRow"),t(n)):markdownSpace(n)?factorySpace(e,x,"whitespace")(n):(e.enter("data"),w(n))}function w(t){return null===t||124===t||markdownLineEndingOrSpace(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?C:w)}function C(t){return 92===t||124===t?(e.consume(t),w):w(t)}}function resolveTable(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const p=new EditMap;for(;++i<e.length;){const f=e[i],h=f[1];"enter"===f[0]?"tableHead"===h.type?(u=!1,0!==d&&(flushTableEnd(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(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(i,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],o=flushCell(p,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=flushCell(p,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=flushCell(p,t,l,s,i,o)):0!==c[1]&&(o=flushCell(p,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&flushTableEnd(p,t,d,n,r),p.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=gfmTableAlign(t.events,i))}return e}function flushCell(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},getPoint(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=getPoint(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=getPoint(t.events,n[2]),i=getPoint(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[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!==o&&(i.end=Object.assign({},getPoint(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function flushTableEnd(e,t,n,r,o){const i=[],a=getPoint(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function getPoint(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const mathFlow={tokenize:tokenizeMathFenced,concrete:!0,name:"mathFlow"},nonLazyContinuation={tokenize:tokenizeNonLazyContinuation,partial:!0};function tokenizeMathFenced(e,t,n){const r=this,o=r.events[r.events.length-1],i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0;let a=0;return function(t){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),s(t)};function s(t){return 36===t?(e.consume(t),a++,s):a<2?n(t):(e.exit("mathFlowFenceSequence"),factorySpace(e,l,"whitespace")(t))}function l(t){return null===t||markdownLineEnding(t)?u(t):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return null===t||markdownLineEnding(t)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),u(t)):36===t?n(t):(e.consume(t),c)}function u(n){return e.exit("mathFlowFence"),r.interrupt?t(n):e.attempt(nonLazyContinuation,d,A)(n)}function d(t){return e.attempt({tokenize:m,partial:!0},A,p)(t)}function p(t){return(i?factorySpace(e,f,"linePrefix",i+1):f)(t)}function f(t){return null===t?A(t):markdownLineEnding(t)?e.attempt(nonLazyContinuation,d,A)(t):(e.enter("mathFlowValue"),h(t))}function h(t){return null===t||markdownLineEnding(t)?(e.exit("mathFlowValue"),f(t)):(e.consume(t),h)}function A(n){return e.exit("mathFlow"),t(n)}function m(e,t,n){let o=0;return factorySpace(e,function(t){return e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),i(t)},"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function i(t){return 36===t?(o++,e.consume(t),i):o<a?n(t):(e.exit("mathFlowFenceSequence"),factorySpace(e,s,"whitespace")(t))}function s(r){return null===r||markdownLineEnding(r)?(e.exit("mathFlowFence"),t(r)):n(r)}}}function tokenizeNonLazyContinuation(e,t,n){const r=this;return function(n){if(null===n)return t(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function mathText(e){let t={}.singleDollarTextMath;return null==t&&(t=!0),{tokenize:function(e,n,r){let o,i,a=0;return function(t){return e.enter("mathText"),e.enter("mathTextSequence"),s(t)};function s(n){return 36===n?(e.consume(n),a++,s):a<2&&!t?r(n):(e.exit("mathTextSequence"),l(n))}function l(t){return null===t?r(t):36===t?(i=e.enter("mathTextSequence"),o=0,u(t)):32===t?(e.enter("space"),e.consume(t),e.exit("space"),l):markdownLineEnding(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l):(e.enter("mathTextData"),c(t))}function c(t){return null===t||32===t||36===t||markdownLineEnding(t)?(e.exit("mathTextData"),l(t)):(e.consume(t),c)}function u(t){return 36===t?(e.consume(t),o++,u):o===a?(e.exit("mathTextSequence"),e.exit("mathText"),n(t)):(i.type="mathTextData",c(t))}},resolve:resolveMathText,previous:previous,name:"mathText"}}function resolveMathText(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("mathTextData"===e[t][1].type){e[r][1].type="mathTextPadding",e[o][1].type="mathTextPadding",o+=2,r-=2;break}for(t=o-1,r++;++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="mathTextData",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}function previous(e){return 36!==e||"characterEscape"===this.events[this.events.length-1][1].type}function math(e){return{flow:{36:mathFlow},text:{36:mathText()}}}const hasOwnProperty$1={}.hasOwnProperty;function combineExtensions(e){const t={};let n=-1;for(;++n<e.length;)syntaxExtension(t,e[n]);return t}function syntaxExtension(e,t){let n;for(n in t){const r=(hasOwnProperty$1.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){hasOwnProperty$1.call(r,i)||(r[i]=[]);const e=o[i];constructs(r[i],Array.isArray(e)?e:e?[e]:[])}}}function constructs(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);splice(e,0,0,r)}const content={tokenize:initializeContent};function initializeContent(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"),factorySpace(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,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):markdownLineEnding(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}const document$3={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[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 o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}g(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return splice(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return p(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(containerConstruct,u,d)(o)}function u(e){return r&&y(),g(a),p(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function p(n){return t.containerState={},e.attempt(containerConstruct,f,h)(n)}function f(e){return a++,n.push([t.currentConstruct,t.containerState]),p(e)}function h(n){return null===n?(r&&y(),g(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),A(n))}function A(n){return null===n?(m(e.exit("chunkFlow"),!0),g(0),void e.consume(n)):markdownLineEnding(n)?(e.consume(n),m(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),A)}function m(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=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<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(g(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;splice(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function g(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function y(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}function tokenizeContainer(e,t,n){return factorySpace(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const flow$1={tokenize:initializeFlow};function initializeFlow(e){const t=this,n=e.attempt(blankLine,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,factorySpace(e,e.attempt(this.parser.constructs.flow,r,e.attempt(content$1,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 resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$2=initializeFactory("text");function initializeFactory(e){return{resolveAll:createResolver("text"===e?resolveAllLineSuffixes:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(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"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function createResolver(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function resolveAllLineSuffixes(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],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[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)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||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={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const document$2={42:list$5,43:list$5,45:list$5,48:list$5,49:list$5,50:list$5,51:list$5,52:list$5,53:list$5,54:list$5,55:list$5,56:list$5,57:list$5,62:blockQuote},contentInitial={91:definition},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={35:headingAtx,42:thematicBreak,45:[setextUnderline,thematicBreak],60:htmlFlow,61:setextUnderline,95:thematicBreak,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$1={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink$2,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:attentionMarkers,contentInitial:contentInitial,disable:disable,document:document$2,flow:flow,flowInitial:flowInitial,insideSpan:insideSpan,string:string,text:text$1},Symbol.toStringTag,{value:"Module"}));function createTokenizer(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 o={},i=[];let a=[],s=[];const l={attempt:m(function(e,t){g(e,t.from)}),check:m(A),consume:function(e){markdownLineEnding(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:m(A,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,y()},events:[],now:p,parser:e,previous:null,sliceSerialize:function(e,t){return serializeChunks(d(e),t)},sliceStream:d,write:function(e){if(a=push$1(a,e),f(),null!==a[a.length-1])return[];return g(t,0),c.events=resolveAll(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return sliceChunks(a,e)}function p(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}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 A(e,t){t.restore()}function m(e,t){return function(n,o,i){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?i:A(e[u])}function A(e){return function(n){f=function(){const e=p(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,y()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return g();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,m,g)(n)}}function m(t){return e(d,f),o}function g(e){return f.restore(),++u<a.length?A(a[u]):i}}}function g(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&splice(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 o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function sliceChunks(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function serializeChunks(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){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&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}function parse$9(e){const t={constructs:combineExtensions([defaultConstructs,...(e||{}).extensions||[]]),content:n(content),defined:[],document:n(document$3),flow:n(flow$1),lazy:{},string:n(string$1),text:n(text$2)};return t;function n(e){return function(n){return createTokenizer(t,e,n)}}}function postprocess(e){for(;!subtokenize(e););return e}const search=/[\0\t\n\r]/g;function preprocess(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,p;o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);for(;u<o.length;){if(search.lastIndex=u,l=search.exec(o),d=l&&void 0!==l.index?l.index:o.length,p=o.charCodeAt(d),!l){n=o.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(o.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}a&&(e&&s.push(-5),n&&s.push(n),s.push(null));return s}}function getText$1(e,t){return e.slice(t.start.offset,t.end.offset)}function getEvents$1(e,t={}){const n=[directive(),gfmAutolinkLiteral(),gfmFootnote(),gfmTable$1(),math(),...t.extensions||[]],r=[],o=labelEnd.tokenize;try{labelEnd.tokenize=function(t,n,i){const a=this,s=a.events;return o.call(a,t,n,t=>{let n=s.length;for(;--n>=0;){const e=s[n],[t,r]=e;if("enter"===t){const{type:e}=r;if("labelImage"===e||"labelLink"===e)break}}if(n>=0){const t=s[n],[,o]=t,i=s[s.length-1],[,l]=i,c={type:"undefinedReferenceShortcut",start:o.start,end:l.end},u={type:"undefinedReference",start:o.start,end:l.end},d=s.slice(n).filter(e=>{const[,t]=e,{type:n}=t;return"data"===n||"lineEnding"===n}),p=r.length>0&&r[r.length-1][0],f=p&&p[1];f&&f.end.line===c.start.line&&f.end.column===c.start.column&&(0===d.length?(f.type="undefinedReferenceCollapsed",f.end=l.end):(c.type="undefinedReferenceFull",c.start=f.start,r.pop()));const h=d.filter(e=>"enter"===e[0]).map(t=>getText$1(e,t[1])).join("").trim();if(h.length>0&&!h.includes("]")){const e=[];e.push(["enter",c,a],["enter",u,a]);for(const t of d){const[n,r]=t;e.push([n,{...r},a])}e.push(["exit",u,a],["exit",c,a]),r.push(e)}}return i(t)})};const i=void 0,a=!0,s=parse$9({...t,extensions:n}),l=preprocess()(e,i,a);return postprocess(s.document().write(l)).concat(...r)}finally{labelEnd.tokenize=o}}function parseInternal(e,t={},n={},r=0,o=void 0){const i=Boolean(t.freezeTokens),a=getEvents$1(e,n),s=[];let l=[];const c={type:"data",startLine:-1,startColumn:-1,endLine:-1,endColumn:-1,text:"ROOT",children:s,parent:null},u=[c];let d=c,p=null,f=null,h=!1;for(const A of a){const[a,s]=A,{type:m,start:g,end:y}=s,{column:v,line:b}=g,{column:x,line:w}=y,C=getText$1(e,s);if("enter"!==a||h)"exit"===a&&("htmlFlow"===m&&(h=!1),h||(i&&(Object.freeze(d.children),Object.freeze(d)),d=u.pop()));else{const i=d;if(u.push(i),d={type:m,startLine:b+r,startColumn:v,endLine:w+r,endColumn:x,text:C,children:[],parent:i===c?o||null:i},o&&Object.defineProperty(d,htmlFlowSymbol$1,{value:!0}),i.children.push(d),l.push(d),"htmlFlow"===d.type&&!micromarkHelpers.isHtmlFlowComment(d)){h=!0,p&&f||(p={...n,extensions:[{disable:{null:["codeIndented","htmlFlow"]}}]},f=e.split(newLineRe$1));const r=parseInternal(f.slice(d.startLine-1,d.endLine).join("\n"),t,p,d.startLine-1,d);d.children=r,l=l.concat(r[flatTokensSymbol$1])}}}return Object.defineProperty(s,flatTokensSymbol$1,{value:l}),i&&Object.freeze(s),s}function parse$8(e,t){return parseInternal(e,t)}const ignoredChildTypes=new Set(["codeFencedFence","definition","reference","resource"]),md044={names:["MD044","proper-names"],description:"Proper names should have the correct capitalization",tags:["spelling"],parser:"micromark",function:function(e,t){let n=e.config.names;if(n=Array.isArray(n)?n:[],n.sort((e,t)=>t.length-e.length||e.localeCompare(t)),0===n.length)return;const r=e.config.code_blocks,o=void 0===r||!!r,i=e.config.html_elements,a=void 0===i||!!i,s=new Set(["data"]);o&&(s.add("codeFlowValue"),s.add("codeTextData")),a&&(s.add("htmlFlowData"),s.add("htmlTextData"));const l=micromarkHelpers.filterByPredicate(e.parsers.micromark.tokens,e=>s.has(e.type),e=>e.children.filter(e=>!ignoredChildTypes.has(e.type))),c=[],u=new Set;for(const d of n){const e=escapeForRegExp(d),r=/^\W/.test(d)?"":"\\b_*",o=/\W$/.test(d)?"":"_*\\b",i=new RegExp(`(${r})(${e})${o}`,"gi");for(const a of l){let e=null;for(;null!==(e=i.exec(a.text));){const[,r,o]=e,i=a.startColumn+e.index+r.length,s=o.length,l=a.startLine,p={startLine:l,startColumn:i,endLine:l,endColumn:i+s-1};if(!n.includes(o)&&!c.some(e=>hasOverlap(e,p))){let e=[];u.has(a)||(e=micromarkHelpers.filterByTypes(parse$8(a.text),["literalAutolink"]).map(e=>({startLine:l,startColumn:a.startColumn+e.startColumn-1,endLine:l,endColumn:a.endColumn+e.endColumn-1})),c.push(...e),u.add(a)),e.some(e=>hasOverlap(e,p))||addErrorDetailIf_1(t,a.startLine,d,o,void 0,void 0,[i,s],{editColumn:i,deleteCount:s,insertText:d})}c.push(p)}}}}},altRe=getHtmlAttributeRe("alt"),ariaHiddenRe=getHtmlAttributeRe("aria-hidden"),md045={names:["MD045","no-alt-text"],description:"Images should have alternate text (alt text)",tags:["accessibility","images"],parser:"micromark",function:function(e,t){var n;const r=filterByTypesCached(["image"]);for(const i of r){if(micromarkHelpers.getDescendantsByType(i,["label","labelText"]).some(e=>0===e.text.length)){const e=i.startLine===i.endLine?[i.startColumn,i.endColumn-i.startColumn]:void 0;addError_1(t,i.startLine,void 0,void 0,e)}}const o=filterByTypesCached(["htmlText"],!0);for(const i of o){const{startColumn:e,startLine:r,text:o}=i,a=micromarkHelpers.getHtmlTagInfo(i);if(a&&!a.close&&"img"===a.name.toLowerCase()&&!altRe.test(o)&&"true"!==(null==(n=ariaHiddenRe.exec(o))?void 0:n[1].toLowerCase())){const n=[e,o.replace(nextLinesRe_1,"").length];addError_1(t,r,void 0,void 0,n)}}}},tokenTypeToStyle={codeFenced:"fenced",codeIndented:"indented"},md046={names:["MD046","code-block-style"],description:"Code block style",tags:["code"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");for(const r of filterByTypesCached(["codeFenced","codeIndented"])){const{startLine:e,type:o}=r;"consistent"===n&&(n=tokenTypeToStyle[o]),addErrorDetailIf_1(t,e,n,tokenTypeToStyle[o])}}},md047={names:["MD047","single-trailing-newline"],description:"Files should end with a single newline character",tags:["blank_lines"],parser:"none",function:function(e,t){const n=e.lines.length,r=e.lines[n-1];isBlankLine_1(r)||addError_1(t,n,void 0,void 0,[r.length,1],{insertText:"\n",editColumn:r.length+1})}};function fencedCodeBlockStyleFor(e){return"~"===e[0]?"tilde":"backtick"}const md048={names:["MD048","code-fence-style"],description:"Code fence style",tags:["code"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent");const r=filterByTypesCached(["codeFenced"]);for(const o of r){const e=micromarkHelpers.getDescendantsByType(o,["codeFencedFence","codeFencedFenceSequence"])[0],{startLine:r,text:i}=e;"consistent"===n&&(n=fencedCodeBlockStyleFor(i)),addErrorDetailIf_1(t,r,n,fencedCodeBlockStyleFor(i))}}},intrawordRe=/^\w$/;function emphasisOrStrongStyleFor(e){return"*"===e[0]?"asterisk":"underscore"}const impl=(e,t,n,r,o,i,a="consistent")=>{const{lines:s,parsers:l}=e,c=micromarkHelpers.filterByPredicate(l.micromark.tokens,e=>e.type===n,e=>"htmlFlow"===e.type?[]:e.children);for(const u of c){const e=micromarkHelpers.getDescendantsByType(u,[r]),n=e[0],l=e[e.length-1];if(n&&l){const e=emphasisOrStrongStyleFor(n.text);if("consistent"===a&&(a=e),a!==e){if(!("underscore"===a&&(intrawordRe.test(s[n.startLine-1][n.startColumn-2])||intrawordRe.test(s[l.endLine-1][l.endColumn-1]))))for(const r of[n,l])addError_1(t,r.startLine,`Expected: ${a}; Actual: ${e}`,void 0,[r.startColumn,r.text.length],{editColumn:r.startColumn,deleteCount:r.text.length,insertText:"asterisk"===a?o:i})}}}},md049md050=[{names:["MD049","emphasis-style"],description:"Emphasis style",tags:["emphasis"],parser:"micromark",function:function(e,t){return impl(e,t,"emphasis","emphasisSequence","*","_",e.config.style||void 0)}},{names:["MD050","strong-style"],description:"Strong style",tags:["emphasis"],parser:"micromark",function:function(e,t){return impl(e,t,"strong","strongSequence","**","__",e.config.style||void 0)}}],idRe=getHtmlAttributeRe("id"),nameRe=getHtmlAttributeRe("name"),anchorRe=/\{(#[a-z\d]+(?:[-_][a-z\d]+)*)\}/gu,lineFragmentRe=/^#(?:L\d+(?:C\d+)?-L\d+(?:C\d+)?|L\d+)$/,childrenExclude=new Set(["image","reference","resource"]),tokensInclude=new Set(["characterEscapeValue","codeTextData","data","mathTextData"]);function convertHeadingToHTMLFragment(e){const t=micromarkHelpers.filterByPredicate(e.children,e=>tokensInclude.has(e.type),e=>childrenExclude.has(e.type)?[]:e.children).map(e=>e.text).join("");return"#"+encodeURIComponent(t.toLowerCase().replace(/[^\p{Letter}\p{Mark}\p{Number}\p{Connector_Punctuation}\- ]/gu,"").replace(/ /gu,"-"))}function unescapeStringTokenText(e){return micromarkHelpers.filterByTypes(e.children,["characterEscapeValue","data"]).map(e=>e.text).join("")}const md051={names:["MD051","link-fragments"],description:"Link fragments should be valid",tags:["links"],parser:"micromark",function:function(e,t){const n=e.config.ignore_case||!1,r=e.config.ignored_pattern||"",o=new RegExp(r||"^$"),i=new Map([["#top",0]]),a=filterByTypesCached(["atxHeadingText","setextHeadingText"]);for(const l of a){const e=convertHeadingToHTMLFragment(l);if("#"!==e){const t=i.get(e)||0;t&&i.set(`${e}-${t}`,0),i.set(e,t+1);let n=null;for(;null!==(n=anchorRe.exec(l.text));){const[,e]=n;i.has(e)||i.set(e,1)}}}for(const l of filterByTypesCached(["htmlText"],!0)){const e=micromarkHelpers.getHtmlTagInfo(l);if(e&&!e.close){const t=idRe.exec(l.text)||"a"===e.name.toLowerCase()&&nameRe.exec(l.text);t&&t.length>0&&i.set(`#${t[1]}`,0)}}const s=[["link","resourceDestinationString"],["definition","definitionDestinationString"]];for(const[l,c]of s){const e=filterByTypesCached([l]).filter(e=>{var t;return!("atxHeadingText"===(null==(t=e.parent)?void 0:t.type)&&micromarkHelpers.isDocfxTab(e.parent.parent))});for(const r of e){const e=micromarkHelpers.filterByTypes(r.children,[c]);for(const a of e){const{endColumn:e,startColumn:s}=a,l=unescapeStringTokenText(a),c=l.slice(1),u=`#${encodeURIComponent(c)}`;if(l.length>1&&l.startsWith("#")&&!i.has(u)&&!lineFragmentRe.test(u)&&!o.test(c)){let o,a,c;r.startLine===r.endLine&&(o=r.text,a=[r.startColumn,r.endColumn-r.startColumn],c={editColumn:s,deleteCount:e-s});const u=l.toLowerCase(),d=[...i.keys()].find(e=>u===e.toLowerCase());d?((c||{}).insertText=d,n||d===l||addError_1(t,r.startLine,`Expected: ${d}; Actual: ${l}`,o,a,c)):addError_1(t,r.startLine,void 0,o,a)}}}}}},md052={names:["MD052","reference-links-images"],description:"Reference links and images should use a label that is defined",tags:["images","links"],parser:"none",function:function(e,t){const{config:n,lines:r}=e,o=n.shortcut_syntax||!1,i=new Set(n.ignored_labels||["x"]),{definitions:a,references:s,shortcuts:l}=getReferenceLinkImageData(),c=o?[...s.entries(),...l.entries()]:s.entries();for(const u of c){const[e,n]=u;if(!a.has(e)&&!i.has(e))for(const o of n){const[n,i,a]=o,s=r[n].slice(i,i+a);addError_1(t,n+1,`Missing link or image reference definition: "${e}"`,s,[i+1,s.length])}}}},linkReferenceDefinitionRe=/^ {0,3}\[([^\]]*[^\\])\]:/,md053={names:["MD053","link-image-reference-definitions"],description:"Link and image reference definitions should be needed",tags:["images","links"],parser:"none",function:function(e,t){const n=new Set(e.config.ignored_definitions||["//"]),r=e.lines,{references:o,shortcuts:i,definitions:a,duplicateDefinitions:s}=getReferenceLinkImageData(),l=e=>e.replace(linkReferenceDefinitionRe,"").trim().length>0,c={deleteCount:-1};for(const u of a.entries()){const[e,[a]]=u;if(!n.has(e)&&!o.has(e)&&!i.has(e)){const n=r[a];addError_1(t,a+1,`Unused link or image reference definition: "${e}"`,ellipsify_1(n),[1,n.length],l(n)?c:void 0)}}for(const u of s){const[e,o]=u;if(!n.has(e)){const n=r[o];addError_1(t,o+1,`Duplicate link or image reference definition: "${e}"`,ellipsify_1(n),[1,n.length],l(n)?c:void 0)}}}},backslashEscapeRe=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,removeBackslashEscapes=e=>e.replace(backslashEscapeRe,"$1"),autolinkDisallowedRe=/[ <>]/,autolinkAble=e=>{try{new URL(e)}catch{return!1}return!autolinkDisallowedRe.test(e)},md054={names:["MD054","link-image-style"],description:"Link and image style",tags:["images","links"],parser:"micromark",function:(e,t)=>{var n,r,o,i;const a=e.config,s=void 0===a.autolink||!!a.autolink,l=void 0===a.inline||!!a.inline,c=void 0===a.full||!!a.full,u=void 0===a.collapsed||!!a.collapsed,d=void 0===a.shortcut||!!a.shortcut,p=void 0===a.url_inline||!!a.url_inline;if(s&&l&&c&&u&&d&&p)return;const{definitions:f}=getReferenceLinkImageData(),h=filterByTypesCached(["autolink","image","link"]);for(const A of h){let e=null,a=null;const{endColumn:h,endLine:m,startColumn:g,startLine:y,text:v,type:b}=A,x="image"===b;let w=!1;if("autolink"===b)a=null==(n=micromarkHelpers.getDescendantsByType(A,[["autolinkEmail","autolinkProtocol"]])[0])?void 0:n.text,e=a,w=!s&&Boolean(a);else if(e=micromarkHelpers.getDescendantsByType(A,["label","labelText"])[0].text,a=null==(r=micromarkHelpers.getDescendantsByType(A,["resource","resourceDestination",["resourceDestinationLiteral","resourceDestinationRaw"],"resourceDestinationString"])[0])?void 0:r.text,a){const t=null==(o=micromarkHelpers.getDescendantsByType(A,["resource","resourceTitle","resourceTitleString"])[0])?void 0:o.text;w=!l||!p&&s&&!x&&!t&&e===a&&autolinkAble(a)}else{const t=0===micromarkHelpers.getDescendantsByType(A,["reference"]).length,n=null==(i=micromarkHelpers.getDescendantsByType(A,["reference","referenceString"])[0])?void 0:i.text,r=void 0===n,o=f.get(n||e);a=o&&o[1],w=a&&(t?!d:r?!u:!c)}if(w){let n,r;if(y===m){n=[g,h-g];let t=null;const o=l&&e,i=s&&!x&&autolinkAble(a);if(!o||!p&&i)i&&(t=`<${removeBackslashEscapes(a)}>`);else{t=`${x?"!":""}[${e.replace(/[[\]]/g,"\\$&")}](${a.replace(/[()]/g,"\\$&")})`}t&&(r={editColumn:n[0],insertText:t,deleteCount:n[1]})}addErrorContext_1(t,y,v.replace(nextLinesRe_1,""),void 0,void 0,n,r)}}}},whitespaceTypes=new Set(["linePrefix","whitespace"]),ignoreWhitespace=e=>e.filter(e=>!whitespaceTypes.has(e.type)),firstOrNothing=e=>e[0],lastOrNothing=e=>e[e.length-1],makeRange$1=(e,t)=>[e,t-e+1],md055={names:["MD055","table-pipe-style"],description:"Table pipe style",tags:["table"],parser:"micromark",function:function(e,t){let n=String(e.config.style||"consistent"),r="no_leading_or_trailing"!==n&&"trailing_only"!==n,o="no_leading_or_trailing"!==n&&"leading_only"!==n;const i=filterByTypesCached(["tableDelimiterRow","tableRow"]);for(const a of i){const e=firstOrNothing(a.children),i="tableCellDivider"===firstOrNothing(ignoreWhitespace(e.children)).type,s=lastOrNothing(a.children),l="tableCellDivider"===lastOrNothing(ignoreWhitespace(s.children)).type,c=i?l?"leading_and_trailing":"leading_only":l?"trailing_only":"no_leading_or_trailing";"consistent"===n&&(n=c,r=i,o=l),i!==r&&addErrorDetailIf_1(t,e.startLine,n,c,(r?"Missing":"Unexpected")+" leading pipe",void 0,makeRange$1(a.startColumn,e.startColumn)),l!==o&&addErrorDetailIf_1(t,s.endLine,n,c,(o?"Missing":"Unexpected")+" trailing pipe",void 0,makeRange$1(s.endColumn-1,a.endColumn-1))}}},makeRange=(e,t)=>[e,t-e+1],md056={names:["MD056","table-column-count"],description:"Table column count",tags:["table"],parser:"micromark",function:function(e,t){const n=filterByTypesCached(["tableDelimiterRow","tableRow"]);let r=0,o=null;for(const i of n){const e=micromarkHelpers.getParentOfType(i,["table"]);o!==e&&(r=0,o=e);const n=i.children.filter(e=>["tableData","tableDelimiter","tableHeader"].includes(e.type)),a=n.length;let s,l;r||=a,a<r?(s="Too few cells, row will be missing data",l=[i.endColumn-1,1]):r<a&&(s="Too many cells, extra data will be missing",l=makeRange(n[r].startColumn,i.endColumn-1)),addErrorDetailIf_1(t,i.endLine,r,a,s,void 0,l)}}},md058={names:["MD058","blanks-around-tables"],description:"Tables should be surrounded by blank lines",tags:["table"],parser:"micromark",function:function(e,t){const{lines:n}=e,r=filterByTypesCached(["blockQuotePrefix","linePrefix"]),o=filterByTypesCached(["table"]);for(const i of o){const e=i.startLine;isBlankLine_1(n[e-2])||addErrorContext_1(t,e,n[e-1].trim(),void 0,void 0,void 0,{insertText:micromarkHelpers.getBlockQuotePrefixText(r,e)});const o=i.endLine;isBlankLine_1(n[o])||addErrorContext_1(t,o,n[o-1].trim(),void 0,void 0,void 0,{lineNumber:o+1,insertText:micromarkHelpers.getBlockQuotePrefixText(r,o)})}}},allowedChildrenTypes=new Set(["codeText","htmlText"]),defaultProhibitedTexts=["click here","here","link","more"];function normalize$1(e){return e.replace(/[\W_]+/g," ").replace(/\s+/g," ").toLowerCase().trim()}const md059={names:["MD059","descriptive-link-text"],description:"Link text should be descriptive",tags:["accessibility","links"],parser:"micromark",function:function(e,t){const n=new Set((e.config.prohibited_texts||defaultProhibitedTexts).map(normalize$1));if(n.size>0){const e=filterByTypesCached(["link"]);for(const r of e){const e=micromarkHelpers.getDescendantsByType(r,["label","labelText"]);for(const r of e){const{children:e,endColumn:o,endLine:i,parent:a,startColumn:s,startLine:l,text:c}=r;if(!e.some(e=>allowedChildrenTypes.has(e.type))&&n.has(normalize$1(c))){const e=l===i?[s,o-s]:void 0;addErrorContext_1(t,l,a.text,void 0,void 0,e)}}}}}},[md019,md021]=md019md021,[md049,md050]=md049md050,rules=[md001,md003,md004,md005,md007,md009,md010,md011,md012,md013,md014,md018,md019,md020,md021,md022,md023,md024,md025,md026,md027,md028,md029,md030,md031,md032,md033,md034,md035,md036,md037,md038,md039,md040,md041,md042,md043,md044,md045,md046,md047,md048,md049,md050,md051,md052,md053,md054,md055,md056,md058,md059];for(const Wp of rules){const e=Wp.names[0].toLowerCase();Wp.information=new URL(`${homepage}/blob/v${version}/doc/${e}.md`)}function parseConfiguration(e,t,n){let r=null,o=null;const i=[];let a=0;return(n||[JSON.parse]).every(e=>{try{const n=e(t);return r=n&&"object"==typeof n&&!Array.isArray(n)?n:{},!1}catch(n){i.push(`Parser ${a++}: ${n.message}`)}return!0})&&(i.unshift(`Unable to parse '${e}'`),o=i.join("; ")),{config:r,message:o}}function validateRuleList(e,t){let n=null;if(e.length===rules.length)return n;const r={};for(const[o,i]of e.entries()){let e=function(e,n){return new Error(`Property '${e}' of custom rule at index ${t} is incorrect: '${n}'.`)};const t=o-rules.length;for(const r of["names","tags"]){const t=i[r];n||t&&Array.isArray(t)&&0!==t.length&&t.every(isString_1)&&!t.some(isEmptyString_1)||(n=e(r,t))}for(const r of[["description","string"],["function","function"]]){const t=r[0],o=i[t];n||o&&typeof o===r[1]||(n=e(t,o))}if(n||void 0===i.parser||"markdownit"===i.parser||"micromark"===i.parser||"none"===i.parser||(n=e("parser",i.parser)),n||!i.information||isUrl_1(i.information)||(n=e("information",i.information)),n||void 0===i.asynchronous||"boolean"==typeof i.asynchronous||(n=e("asynchronous",i.asynchronous)),!n&&i.asynchronous,!n){for(const e of i.names){const o=e.toUpperCase();n||void 0===r[o]||(n=new Error("Name '"+e+"' of custom rule at index "+t+" is already used as a name or tag.")),r[o]=!0}for(const e of i.tags){const o=e.toUpperCase();!n&&r[o]&&(n=new Error("Tag '"+e+"' of custom rule at index "+t+" is already used as a name.")),r[o]=!1}}}return n}function newResults(e){const t={};return Object.defineProperty(t,"toString",{value:function(n){let r=null;const o=[],i=Object.keys(t);i.sort();for(const a of i){const i=t[a];if(Array.isArray(i))for(const e of i){const t=e.ruleNames?e.ruleNames.join("/"):e.ruleName+"/"+e.ruleAlias;o.push(a+": "+e.lineNumber+": "+t+" "+e.ruleDescription+(e.errorDetail?" ["+e.errorDetail+"]":"")+(e.errorContext?' [Context: "'+e.errorContext+'"]':""))}else{if(!r){r={};for(const t of e){r[t.names[0].toUpperCase()]=t}}for(const[e,t]of Object.entries(i)){const i=r[e.toUpperCase()];for(const e of t){const t=Math.min(n?1:0,i.names.length-1),r=a+": "+e+": "+i.names[t]+" "+i.description;o.push(r)}}}}return o.join("\n")}}),t}function removeFrontMatter(e,t){let n=[];if(t){const r=e.match(t);if(r&&!r.index){const t=r[0];e=e.slice(t.length),n=t.split(newLineRe_1),n.length>0&&""===n[n.length-1]&&n.length--}}return{content:e,frontMatterLines:n}}function mapAliasToRuleNames(e){const t={};for(const n of e){const e=n.names[0].toUpperCase();for(const r of n.names){t[r.toUpperCase()]=[e]}for(const r of n.tags){const n=r.toUpperCase(),o=t[n]||[];o.push(e),t[n]=o}}return t}function getEffectiveConfig(e,t,n){const r=Object.keys(t).filter(e=>"DEFAULT"===e.toUpperCase()),o=0===r.length||!!t[r[0]],i={};for(const a of e){i[a.names[0].toUpperCase()]=o}for(const a of Object.keys(t)){let e=t[a];e?e instanceof Object||(e={}):e=!1;const r=a.toUpperCase();for(const t of n[r]||[])i[t]=e}return i}function getEnabledRulesPerLineNumber(e,t,n,r,o,i,a){let s={},l={};const c=[],u=new Array(1+n.length);function d(e,t,n){for(const[o,i]of e.entries()){if(!r){let e=null;for(;e=inlineCommentStartRe_1.exec(i);){const n=e[2].toUpperCase(),r=e.index+e[1].length,a=i.indexOf("--\x3e",r);if(-1===a)break;t(n,i.slice(r,a),o+1)}}n&&n()}}function p(e,t,n){n={...n};const r=e.startsWith("ENABLE"),o=t&&t.trim(),i=o?o.toUpperCase().split(/\s+/):c;for(const s of i)for(const e of a[s]||[])n[e]=r;return n}d([t.join("\n")],function(e,t){if("CONFIGURE-FILE"===e){const{config:e}=parseConfiguration("CONFIGURE-FILE",t,i);e&&(o={...o,...e})}});const f=getEffectiveConfig(e,o,a);for(const A of e){const e=A.names[0].toUpperCase();c.push(e),s[e]=!!f[e]}l=s,d(t,function(e,t){"ENABLE-FILE"!==e&&"DISABLE-FILE"!==e||(s=p(e,t,s))}),d(t,function(e,t){"CAPTURE"===e?l=s:"RESTORE"===e?s=l:"ENABLE"!==e&&"DISABLE"!==e||(s=p(e,t,s))},function(){u.push(s)}),d(t,function(e,t,r){const o="DISABLE-NEXT-LINE"===e;if("DISABLE-LINE"===e||o){const i=n.length+r+(o?1:0);u[i]=p(e,t,u[i])}});const h=[];for(const[A,m]of c.entries())u.some(e=>e[m])&&h.push(e[A]);return{effectiveConfig:f,enabledRulesPerLineNumber:u,enabledRuleList:h}}function lintContent(e,t,n,r,o,i,a,s,l,c,u,d,p){const f=e=>p(e instanceof Error?e:new Error(e)),h=removeFrontMatter(r=r.replace(/^\uFEFF/,""),s),{frontMatterLines:A}=h;r=h.content;const{effectiveConfig:m,enabledRulesPerLineNumber:g,enabledRuleList:y}=getEnabledRulesPerLineNumber(e,r.split(newLineRe_1),A,c,i,a,t),v=y.some(e=>"markdownit"===e.parser||void 0===e.parser),b=y.some(e=>"micromark"===e.parser),x=e.length!==rules.length,w=b?parse$8(r,{freezeTokens:x}):[],C=r,$=(r=clearHtmlCommentText(r)).split(newLineRe_1),_=e=>{const t=Object.freeze({markdownit:Object.freeze({tokens:e})}),r=Object.freeze({micromark:Object.freeze({tokens:w})}),o=Object.freeze({}),i={name:n,version:version,lines:Object.freeze($),frontMatterLines:Object.freeze(A)};initialize({...i,parsers:r,config:null});let a=[];const s=s=>{const c=s.names[0].toUpperCase(),u={};let d=o;void 0===s.parser?(u.tokens=e,d=t):"markdownit"===s.parser?d=t:"micromark"===s.parser&&(d=r);const p={...i,...u,parsers:d,config:m[c]};function f(e){throw new Error(`Value of '${e}' passed to onError by '${c}' is incorrect for '${n}'.`)}function h(e){(!e||!isNumber_1(e.lineNumber)||e.lineNumber<1||e.lineNumber>$.length)&&f("lineNumber");const t=e.lineNumber+A.length;if(!g[t][c])return;e.detail&&!isString_1(e.detail)&&f("detail"),e.context&&!isString_1(e.context)&&f("context"),e.information&&!isUrl_1(e.information)&&f("information"),e.range&&(!Array.isArray(e.range)||2!==e.range.length||!isNumber_1(e.range[0])||e.range[0]<1||!isNumber_1(e.range[1])||e.range[1]<1||e.range[0]+e.range[1]-1>$[e.lineNumber-1].length)&&f("range");const n=e.fixInfo,r={};if(n){isObject_1(n)||f("fixInfo"),void 0!==n.lineNumber&&((!isNumber_1(n.lineNumber)||n.lineNumber<1||n.lineNumber>$.length)&&f("fixInfo.lineNumber"),r.lineNumber=n.lineNumber+A.length);const t=n.lineNumber||e.lineNumber;void 0!==n.editColumn&&((!isNumber_1(n.editColumn)||n.editColumn<1||n.editColumn>$[t-1].length+1)&&f("fixInfo.editColumn"),r.editColumn=n.editColumn),void 0!==n.deleteCount&&((!isNumber_1(n.deleteCount)||n.deleteCount<-1||n.deleteCount>$[t-1].length)&&f("fixInfo.deleteCount"),r.deleteCount=n.deleteCount),void 0!==n.insertText&&(isString_1(n.insertText)||f("fixInfo.insertText"),r.insertText=n.insertText)}const o=e.information||s.information;a.push({lineNumber:t,ruleName:s.names[0],ruleNames:s.names,ruleDescription:s.description,ruleInformation:o?o.href:null,errorDetail:e.detail||null,errorContext:e.context||null,errorRange:e.range?[...e.range]:null,fixInfo:n?r:null})}const y=e=>h({lineNumber:1,detail:`This rule threw an exception: ${e.message||e}`}),v=()=>s.function(p,h);if(s.asynchronous){const e=Promise.resolve().then(v);return l?e.catch(y):e}try{v()}catch(b){if(!l)throw b;y(b)}return null},c=y.filter(e=>e.asynchronous),d=y.filter(e=>!e.asynchronous),h=[...c,...d],v=()=>p(null,(()=>{if(a.sort((e,t)=>e.ruleName.localeCompare(t.ruleName)||e.lineNumber-t.lineNumber),u<3){const e={ruleName:null,lineNumber:-1};a=a.filter((t,n,r)=>{delete t.fixInfo;const o=r[n-1]||e;return t.ruleName!==o.ruleName||t.lineNumber!==o.lineNumber})}if(0===u){const e={};for(const t of a){const n=e[t.ruleName]||[];n.push(t.lineNumber),e[t.ruleName]=n}a=e}else if(1===u)for(const e of a)e.ruleAlias=e.ruleNames[1]||e.ruleName,delete e.ruleNames;else for(const e of a)delete e.ruleName;return a})());try{const e=h.map(s);c.length>0?Promise.all(e.slice(0,c.length)).then(v).catch(f):v()}catch(b){f(b)}finally{initialize()}};if(!v||d){const e=v?deferRequire.requireMarkdownItCjs().getMarkdownItTokens(o(),C,$):[];_(e)}else Promise.all([__vitePreload(()=>import("./markdownit-B8WXvttx.js").then(e=>e.m),[]),new Promise(e=>e(o()))]).then(([e,t])=>{const n=e.getMarkdownItTokens(t,C,$);_(n)}).catch(f)}function lintFile(e,t,n,r,o,i,a,s,l,c,u,d,p){u.readFile(n,"utf8",function(u,f){return u?p(u):lintContent(e,t,n,f,r,o,i,a,s,l,c,d,p)})}function lintInput(e,t,n){n=n||function(){};const r=[(e=e||{}).customRules||[]].flat().map(e=>({names:cloneIfArray_1(e.names),description:e.description,information:cloneIfUrl_1(e.information),tags:cloneIfArray_1(e.tags),parser:e.parser,asynchronous:e.asynchronous,function:e.function})),o=rules.concat(r),i=validateRuleList(o,t);if(i)return void n(i);let a=[];Array.isArray(e.files)?a=[...e.files]:e.files&&(a=[String(e.files)]);const s=e.strings||{},l=Object.keys(s),c=e.config||{default:!0},u=e.configParsers||void 0,d=void 0===e.frontMatter?frontMatterRe:e.frontMatter,p=!!e.handleRuleFailures,f=!!e.noInlineConfig,h=void 0===e.resultVersion?3:e.resultVersion,A=e.markdownItFactory||(()=>{throw new Error("The option 'markdownItFactory' was required (due to the option 'customRules' including a rule requiring the 'markdown-it' parser), but 'markdownItFactory' was not set.")}),m=e.fs||fs,g=mapAliasToRuleNames(o),y=newResults(o);let v=!1,b=0;function x(){let e=null;function r(t,r){return b--,t?(v=!0,n(t)):(y[e]=r,x(),null)}if(v);else if(a.length>0)b++,e=a.shift(),lintFile(o,g,e,A,c,u,d,p,f,h,m,t,r);else if(e=l.shift())b++,lintContent(o,g,e,s[e]||"",A,c,u,d,p,f,h,t,r);else if(0===b)return v=!0,n(null,y);return null}x(),x(),x(),x(),x(),x(),x(),x()}function lintAsync(e,t){return lintInput(e,!1,t)}function lintPromise(e){return new Promise((t,n)=>{lintAsync(e,(e,r)=>{e||!r?n(e):t(r)})})}function normalizeFixInfo(e,t=0){return{lineNumber:e.lineNumber||t,editColumn:e.editColumn||1,deleteCount:e.deleteCount||0,insertText:e.insertText||""}}function applyFix(e,t,n="\n"){const{editColumn:r,deleteCount:o,insertText:i}=normalizeFixInfo(t),a=r-1;return-1===o?null:e.slice(0,a)+i.replace(/\n/g,n)+e.slice(a+o)}function applyFixes(e,t){const n=getPreferredLineEnding_1(e,os),r=e.split(newLineRe_1);let o=t.filter(e=>e.fixInfo).map(e=>normalizeFixInfo(e.fixInfo,e.lineNumber));o.sort((e,t)=>{const n=-1===e.deleteCount,r=-1===t.deleteCount;return t.lineNumber-e.lineNumber||(n?1:r?-1:0)||t.editColumn-e.editColumn||t.insertText.length-e.insertText.length});let i={};o=o.filter(e=>{const t=e.lineNumber!==i.lineNumber||e.editColumn!==i.editColumn||e.deleteCount!==i.deleteCount||e.insertText!==i.insertText;return i=e,t}),i={lineNumber:-1};for(const l of o)l.lineNumber===i.lineNumber&&l.editColumn===i.editColumn&&!l.insertText&&l.deleteCount>0&&i.insertText&&!i.deleteCount&&(l.insertText=i.insertText,i.lineNumber=0),i=l;o=o.filter(e=>e.lineNumber);let a=-1,s=-1;for(const l of o){const{lineNumber:e,editColumn:t,deleteCount:o}=l,i=e-1,c=t-1;(i!==a||-1===o||c+o<=s-(o>0?0:1))&&(r[i]=applyFix(r[i],l,n)),a=i,s=c}return r.filter(e=>null!==e).join(n)}function _getDefaults(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var _defaults=_getDefaults();function changeDefaults(e){_defaults=e}var noopTest={exec:()=>null};function edit(e,t=""){let n="string"==typeof e?e:e.source;const r={replace:(e,t)=>{let o="string"==typeof t?t:t.source;return o=o.replace(other.caret,"$1"),n=n.replace(e,o),r},getRegex:()=>new RegExp(n,t)};return r}var other={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},newline$1=/^(?:[ \t]*(?:\n|$))+/,blockCode=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,fences=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr$1=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading$1=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,bullet=/(?:[*+-]|\d{1,9}[.)])/,lheadingCore=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lheading$1=edit(lheadingCore).replace(/bull/g,bullet).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lheadingGfm=edit(lheadingCore).replace(/bull/g,bullet).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),_paragraph=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,blockText=/^[^\n]+/,_blockLabel=/(?!\s*\])(?:\\.|[^\[\]\\])+/,def=edit(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",_blockLabel).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),list$4=edit(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,bullet).getRegex(),_tag="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|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",_comment=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,html=edit("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",_comment).replace("tag",_tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),paragraph$1=edit(_paragraph).replace("hr",hr$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockquote$1=edit(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",paragraph$1).getRegex(),blockNormal={blockquote:blockquote$1,code:blockCode,def:def,fences:fences,heading:heading$1,hr:hr$1,html:html,lheading:lheading$1,list:list$4,newline:newline$1,paragraph:paragraph$1,table:noopTest,text:blockText},gfmTable=edit("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",hr$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex(),blockGfm={...blockNormal,lheading:lheadingGfm,table:gfmTable,paragraph:edit(_paragraph).replace("hr",hr$1).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",gfmTable).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_tag).getRegex()},blockPedantic={...blockNormal,html:edit("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",_comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:noopTest,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:edit(_paragraph).replace("hr",hr$1).replace("heading"," *#{1,6} *[^\n]").replace("lheading",lheading$1).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},escape$2=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,inlineCode=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br=/^( {2,}|\\)\n(?!\s*$)/,inlineText=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_punctuation=/[\p{P}\p{S}]/u,_punctuationOrSpace=/[\s\p{P}\p{S}]/u,_notPunctuationOrSpace=/[^\s\p{P}\p{S}]/u,punctuation=edit(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,_punctuationOrSpace).getRegex(),_punctuationGfmStrongEm=/(?!~)[\p{P}\p{S}]/u,_punctuationOrSpaceGfmStrongEm=/(?!~)[\s\p{P}\p{S}]/u,_notPunctuationOrSpaceGfmStrongEm=/(?:[^\s\p{P}\p{S}]|~)/u,blockSkip=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,emStrongLDelimCore=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,emStrongLDelim=edit(emStrongLDelimCore,"u").replace(/punct/g,_punctuation).getRegex(),emStrongLDelimGfm=edit(emStrongLDelimCore,"u").replace(/punct/g,_punctuationGfmStrongEm).getRegex(),emStrongRDelimAstCore="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",emStrongRDelimAst=edit(emStrongRDelimAstCore,"gu").replace(/notPunctSpace/g,_notPunctuationOrSpace).replace(/punctSpace/g,_punctuationOrSpace).replace(/punct/g,_punctuation).getRegex(),emStrongRDelimAstGfm=edit(emStrongRDelimAstCore,"gu").replace(/notPunctSpace/g,_notPunctuationOrSpaceGfmStrongEm).replace(/punctSpace/g,_punctuationOrSpaceGfmStrongEm).replace(/punct/g,_punctuationGfmStrongEm).getRegex(),emStrongRDelimUnd=edit("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,_notPunctuationOrSpace).replace(/punctSpace/g,_punctuationOrSpace).replace(/punct/g,_punctuation).getRegex(),anyPunctuation=edit(/\\(punct)/,"gu").replace(/punct/g,_punctuation).getRegex(),autolink$1=edit(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_inlineComment=edit(_comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),tag=edit("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",_inlineComment).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),_inlineLabel=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,link$1=edit(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",_inlineLabel).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),reflink=edit(/^!?\[(label)\]\[(ref)\]/).replace("label",_inlineLabel).replace("ref",_blockLabel).getRegex(),nolink=edit(/^!?\[(ref)\](?:\[\])?/).replace("ref",_blockLabel).getRegex(),reflinkSearch=edit("reflink|nolink(?!\\()","g").replace("reflink",reflink).replace("nolink",nolink).getRegex(),inlineNormal={_backpedal:noopTest,anyPunctuation:anyPunctuation,autolink:autolink$1,blockSkip:blockSkip,br:br,code:inlineCode,del:noopTest,emStrongLDelim:emStrongLDelim,emStrongRDelimAst:emStrongRDelimAst,emStrongRDelimUnd:emStrongRDelimUnd,escape:escape$2,link:link$1,nolink:nolink,punctuation:punctuation,reflink:reflink,reflinkSearch:reflinkSearch,tag:tag,text:inlineText,url:noopTest},inlinePedantic={...inlineNormal,link:edit(/^!?\[(label)\]\((.*?)\)/).replace("label",_inlineLabel).getRegex(),reflink:edit(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",_inlineLabel).getRegex()},inlineGfm={...inlineNormal,emStrongRDelimAst:emStrongRDelimAstGfm,emStrongLDelim:emStrongLDelimGfm,url:edit(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},inlineBreaks={...inlineGfm,br:edit(br).replace("{2,}","*").getRegex(),text:edit(inlineGfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},block$3={normal:blockNormal,gfm:blockGfm,pedantic:blockPedantic},inline$1={normal:inlineNormal,gfm:inlineGfm,breaks:inlineBreaks,pedantic:inlinePedantic},escapeReplacements={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},getEscapeReplacement=e=>escapeReplacements[e];function escape2(e,t){if(t){if(other.escapeTest.test(e))return e.replace(other.escapeReplace,getEscapeReplacement)}else if(other.escapeTestNoEncode.test(e))return e.replace(other.escapeReplaceNoEncode,getEscapeReplacement);return e}function cleanUrl(e){try{e=encodeURI(e).replace(other.percentDecode,"%")}catch{return null}return e}function splitCells(e,t){var n;const r=e.replace(other.findPipe,(e,t,n)=>{let r=!1,o=t;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"}).split(other.splitPipe);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!(null==(n=r.at(-1))?void 0:n.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(other.slashPipe,"|");return r}function rtrim(e,t,n){const r=e.length;if(0===r)return"";let o=0;for(;o<r;){if(e.charAt(r-o-1)!==t)break;o++}return e.slice(0,r-o)}function findClosingBracket(e,t){if(-1===e.indexOf(t[1]))return-1;let n=0;for(let r=0;r<e.length;r++)if("\\"===e[r])r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function outputLink(e,t,n,r,o){const i=t.href,a=t.title||null,s=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;const l={type:"!"===e[0].charAt(0)?"image":"link",raw:n,href:i,title:a,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function indentCodeCompensation(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(null===r)return t;const o=r[1];return t.split("\n").map(e=>{const t=e.match(n.other.beginningSpace);if(null===t)return e;const[r]=t;return r.length>=o.length?e.slice(o.length):e}).join("\n")}var _Tokenizer=class{options;rules;lexer;constructor(e){this.options=e||_defaults}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:rtrim(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=indentCodeCompensation(e,t[3]||"",this.rules);return{type:"code",raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){const t=rtrim(e,"#");this.options.pedantic?e=t.trim():t&&!this.rules.other.endingSpaceChar.test(t)||(e=t.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:rtrim(t[0],"\n")}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){let e=rtrim(t[0],"\n").split("\n"),n="",r="";const o=[];for(;e.length>0;){let t=!1;const i=[];let a;for(a=0;a<e.length;a++)if(this.rules.other.blockquoteStart.test(e[a]))i.push(e[a]),t=!0;else{if(t)break;i.push(e[a])}e=e.slice(a);const s=i.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}\n${s}`:s,r=r?`${r}\n${l}`:l;const c=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,o,!0),this.lexer.state.top=c,0===e.length)break;const u=o.at(-1);if("code"===(null==u?void 0:u.type))break;if("blockquote"===(null==u?void 0:u.type)){const t=u,i=t.raw+"\n"+e.join("\n"),a=this.blockquote(i);o[o.length-1]=a,n=n.substring(0,n.length-t.raw.length)+a.raw,r=r.substring(0,r.length-t.text.length)+a.text;break}if("list"===(null==u?void 0:u.type)){const t=u,i=t.raw+"\n"+e.join("\n"),a=this.list(i);o[o.length-1]=a,n=n.substring(0,n.length-u.raw.length)+a.raw,r=r.substring(0,r.length-t.raw.length)+a.raw,e=i.substring(o.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:n,tokens:o,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim();const r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");const i=this.rules.other.listItemRegex(n);let a=!1;for(;e;){let n=!1,r="",s="";if(!(t=i.exec(e)))break;if(this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,e=>" ".repeat(3*e.length)),c=e.split("\n",1)[0],u=!l.trim(),d=0;if(this.options.pedantic?(d=2,s=l.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=l.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(c)&&(r+=c+"\n",e=e.substring(c.length+1),n=!0),!n){const t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),o=this.rules.other.fencesBeginRegex(d),i=this.rules.other.headingBeginRegex(d),a=this.rules.other.htmlBeginRegex(d);for(;e;){const p=e.split("\n",1)[0];let f;if(c=p,this.options.pedantic?(c=c.replace(this.rules.other.listReplaceNesting," "),f=c):f=c.replace(this.rules.other.tabCharGlobal," "),o.test(c))break;if(i.test(c))break;if(a.test(c))break;if(t.test(c))break;if(n.test(c))break;if(f.search(this.rules.other.nonSpaceChar)>=d||!c.trim())s+="\n"+f.slice(d);else{if(u)break;if(l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4)break;if(o.test(l))break;if(i.test(l))break;if(n.test(l))break;s+="\n"+c}u||c.trim()||(u=!0),r+=p+"\n",e=e.substring(p.length+1),l=f.slice(d)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(a=!0));let p,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),o.raw+=r}const s=o.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),o.raw=o.raw.trimEnd();for(let e=0;e<o.items.length;e++)if(this.lexer.state.top=!1,o.items[e].tokens=this.lexer.blockTokens(o.items[e].text,[]),!o.loose){const t=o.items[e].tokens.filter(e=>"space"===e.type),n=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw));o.loose=n}if(o.loose)for(let e=0;e<o.items.length;e++)o.items[e].loose=!0;return o}}html(e){const t=this.rules.block.html.exec(e);if(t){return{type:"html",block:!0,raw:t[0],pre:"pre"===t[1]||"script"===t[1]||"style"===t[1],text:t[0]}}}def(e){const t=this.rules.block.def.exec(e);if(t){const e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:e,raw:t[0],href:n,title:r}}}table(e){var t;const n=this.rules.block.table.exec(e);if(!n)return;if(!this.rules.other.tableDelimiter.test(n[2]))return;const r=splitCells(n[1]),o=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),i=(null==(t=n[3])?void 0:t.trim())?n[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],a={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===o.length){for(const e of o)this.rules.other.tableAlignRight.test(e)?a.align.push("right"):this.rules.other.tableAlignCenter.test(e)?a.align.push("center"):this.rules.other.tableAlignLeft.test(e)?a.align.push("left"):a.align.push(null);for(let e=0;e<r.length;e++)a.header.push({text:r[e],tokens:this.lexer.inline(r[e]),header:!0,align:a.align[e]});for(const e of i)a.rows.push(splitCells(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const e="\n"===t[1].charAt(t[1].length-1)?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){const t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;const t=rtrim(e.slice(0,-1),"\\");if((e.length-t.length)%2==0)return}else{const e=findClosingBracket(t[2],"()");if(-2===e)return;if(e>-1){const n=(0===t[0].indexOf("!")?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),outputLink(t,{href:n?n.replace(this.rules.inline.anyPunctuation,"$1"):n,title:r?r.replace(this.rules.inline.anyPunctuation,"$1"):r},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){const e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!e){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return outputLink(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!r)return;if(r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(r[1]||r[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const n=[...r[0]].length-1;let o,i,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);null!=(r=l.exec(t));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=[...o].length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;i=Math.min(i,i+a+s);const t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+i);if(Math.min(n,i)%2){const e=l.slice(1,-1);return{type:"em",raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}const c=l.slice(2,-2);return{type:"strong",raw:l,text:c,tokens:this.lexer.inlineTokens(c)}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal," ");const n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){const t=this.rules.inline.autolink.exec(e);if(t){let e,n;return"@"===t[2]?(e=t[1],n="mailto:"+e):(e=t[1],n=e),{type:"link",raw:t[0],text:e,href:n,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var t;let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=n[0],r="mailto:"+e;else{let o;do{o=n[0],n[0]=(null==(t=this.rules.inline._backpedal.exec(n[0]))?void 0:t[0])??""}while(o!==n[0]);e=n[0],r="www."===n[1]?"http://"+n[0]:n[0]}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){const t=this.rules.inline.text.exec(e);if(t){const e=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:e}}}},_Lexer=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||_defaults,this.options.tokenizer=this.options.tokenizer||new _Tokenizer,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={other:other,block:block$3.normal,inline:inline$1.normal};this.options.pedantic?(t.block=block$3.pedantic,t.inline=inline$1.pedantic):this.options.gfm&&(t.block=block$3.gfm,this.options.breaks?t.inline=inline$1.breaks:t.inline=inline$1.gfm),this.tokenizer.rules=t}static get rules(){return{block:block$3,inline:inline$1}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(other.carriageReturn,"\n"),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){const e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var r,o,i;for(this.options.pedantic&&(e=e.replace(other.tabCharGlobal," ").replace(other.spaceLine,""));e;){let a;if(null==(o=null==(r=this.options.extensions)?void 0:r.block)?void 0:o.some(n=>!!(a=n.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.space(e)){e=e.substring(a.raw.length);const n=t.at(-1);1===a.raw.length&&void 0!==n?n.raw+="\n":t.push(a);continue}if(a=this.tokenizer.code(e)){e=e.substring(a.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.text,this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(a=this.tokenizer.fences(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.heading(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.hr(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.blockquote(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.list(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.html(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.def(e)){e=e.substring(a.raw.length);const n=t.at(-1);"paragraph"===(null==n?void 0:n.type)||"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[a.tag]||(this.tokens.links[a.tag]={href:a.href,title:a.title});continue}if(a=this.tokenizer.table(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.lheading(e)){e=e.substring(a.raw.length),t.push(a);continue}let s=e;if(null==(i=this.options.extensions)?void 0:i.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(this.state.top&&(a=this.tokenizer.paragraph(s))){const r=t.at(-1);n&&"paragraph"===(null==r?void 0:r.type)?(r.raw+="\n"+a.raw,r.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(a),n=s.length!==e.length,e=e.substring(a.raw.length);continue}if(a=this.tokenizer.text(e)){e=e.substring(a.raw.length);const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+="\n"+a.raw,n.text+="\n"+a.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(a);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var n,r,o;let i=e,a=null;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(i));)e.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,a.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(i));)i=i.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,l="";for(;e;){let a;if(s||(l=""),s=!1,null==(r=null==(n=this.options.extensions)?void 0:n.inline)?void 0:r.some(n=>!!(a=n.call({lexer:this},e,t))&&(e=e.substring(a.raw.length),t.push(a),!0)))continue;if(a=this.tokenizer.escape(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(a.raw.length);const n=t.at(-1);"text"===a.type&&"text"===(null==n?void 0:n.type)?(n.raw+=a.raw,n.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(e,i,l)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(e)){e=e.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(e)){e=e.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(e))){e=e.substring(a.raw.length),t.push(a);continue}let c=e;if(null==(o=this.options.extensions)?void 0:o.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),"number"==typeof r&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(c=e.substring(0,t+1))}if(a=this.tokenizer.inlineText(c)){e=e.substring(a.raw.length),"_"!==a.raw.slice(-1)&&(l=a.raw.slice(-1)),s=!0;const n=t.at(-1);"text"===(null==n?void 0:n.type)?(n.raw+=a.raw,n.text+=a.text):t.push(a);continue}if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return t}},_Renderer=class{options;parser;constructor(e){this.options=e||_defaults}space(e){return""}code({text:e,lang:t,escaped:n}){var r;const o=null==(r=(t||"").match(other.notSpaceStart))?void 0:r[0],i=e.replace(other.endingNewline,"")+"\n";return o?'<pre><code class="language-'+escape2(o)+'">'+(n?i:escape2(i,!0))+"</code></pre>\n":"<pre><code>"+(n?i:escape2(i,!0))+"</code></pre>\n"}blockquote({tokens:e}){return`<blockquote>\n${this.parser.parse(e)}</blockquote>\n`}html({text:e}){return e}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>\n`}hr(e){return"<hr>\n"}list(e){const t=e.ordered,n=e.start;let r="";for(let i=0;i<e.items.length;i++){const t=e.items[i];r+=this.listitem(t)}const o=t?"ol":"ul";return"<"+o+(t&&1!==n?' start="'+n+'"':"")+">\n"+r+"</"+o+">\n"}listitem(e){var t;let n="";if(e.task){const r=this.checkbox({checked:!!e.checked});e.loose?"paragraph"===(null==(t=e.tokens[0])?void 0:t.type)?(e.tokens[0].text=r+" "+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&"text"===e.tokens[0].tokens[0].type&&(e.tokens[0].tokens[0].text=r+" "+escape2(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):n+=r+" "}return n+=this.parser.parse(e.tokens,!!e.loose),`<li>${n}</li>\n`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>\n`}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let r="";for(let o=0;o<e.rows.length;o++){const t=e.rows[o];n="";for(let e=0;e<t.length;e++)n+=this.tablecell(t[e]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),"<table>\n<thead>\n"+t+"</thead>\n"+r+"</table>\n"}tablerow({text:e}){return`<tr>\n${e}</tr>\n`}tablecell(e){const t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>\n`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${escape2(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){const r=this.parser.parseInline(n),o=cleanUrl(e);if(null===o)return r;let i='<a href="'+(e=o)+'"';return t&&(i+=' title="'+escape2(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));const o=cleanUrl(e);if(null===o)return escape2(n);let i=`<img src="${e=o}" alt="${n}"`;return t&&(i+=` title="${escape2(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:escape2(e.text)}},_TextRenderer=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}},_Parser=class e{options;renderer;textRenderer;constructor(e){this.options=e||_defaults,this.options.renderer=this.options.renderer||new _Renderer,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _TextRenderer}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){var n,r;let o="";for(let i=0;i<e.length;i++){const a=e[i];if(null==(r=null==(n=this.options.extensions)?void 0:n.renderers)?void 0:r[a.type]){const e=a,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==t||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){o+=t||"";continue}}const s=a;switch(s.type){case"space":o+=this.renderer.space(s);continue;case"hr":o+=this.renderer.hr(s);continue;case"heading":o+=this.renderer.heading(s);continue;case"code":o+=this.renderer.code(s);continue;case"table":o+=this.renderer.table(s);continue;case"blockquote":o+=this.renderer.blockquote(s);continue;case"list":o+=this.renderer.list(s);continue;case"html":o+=this.renderer.html(s);continue;case"paragraph":o+=this.renderer.paragraph(s);continue;case"text":{let n=s,r=this.renderer.text(n);for(;i+1<e.length&&"text"===e[i+1].type;)n=e[++i],r+="\n"+this.renderer.text(n);o+=t?this.renderer.paragraph({type:"paragraph",raw:r,text:r,tokens:[{type:"text",raw:r,text:r,escaped:!0}]}):r;continue}default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}parseInline(e,t=this.renderer){var n,r;let o="";for(let i=0;i<e.length;i++){const a=e[i];if(null==(r=null==(n=this.options.extensions)?void 0:n.renderers)?void 0:r[a.type]){const e=this.options.extensions.renderers[a.type].call({parser:this},a);if(!1!==e||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){o+=e||"";continue}}const s=a;switch(s.type){case"escape":case"text":o+=t.text(s);break;case"html":o+=t.html(s);break;case"link":o+=t.link(s);break;case"image":o+=t.image(s);break;case"strong":o+=t.strong(s);break;case"em":o+=t.em(s);break;case"codespan":o+=t.codespan(s);break;case"br":o+=t.br(s);break;case"del":o+=t.del(s);break;default:{const e='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(e),"";throw new Error(e)}}}return o}},_Hooks=class{options;block;constructor(e){this.options=e||_defaults}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}provideLexer(){return this.block?_Lexer.lex:_Lexer.lexInline}provideParser(){return this.block?_Parser.parse:_Parser.parseInline}},Marked=class{defaults=_getDefaults();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=_Parser;Renderer=_Renderer;TextRenderer=_TextRenderer;Lexer=_Lexer;Tokenizer=_Tokenizer;Hooks=_Hooks;constructor(...e){this.use(...e)}walkTokens(e,t){var n,r;let o=[];for(const i of e)switch(o=o.concat(t.call(this,i)),i.type){case"table":{const e=i;for(const n of e.header)o=o.concat(this.walkTokens(n.tokens,t));for(const n of e.rows)for(const e of n)o=o.concat(this.walkTokens(e.tokens,t));break}case"list":{const e=i;o=o.concat(this.walkTokens(e.items,t));break}default:{const e=i;(null==(r=null==(n=this.defaults.extensions)?void 0:n.childTokens)?void 0:r[e.type])?this.defaults.extensions.childTokens[e.type].forEach(n=>{const r=e[n].flat(1/0);o=o.concat(this.walkTokens(r,t))}):e.tokens&&(o=o.concat(this.walkTokens(e.tokens,t)))}}return o}use(...e){const t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{const n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw new Error("extension name required");if("renderer"in e){const n=t.renderers[e.name];t.renderers[e.name]=n?function(...t){let r=e.renderer.apply(this,t);return!1===r&&(r=n.apply(this,t)),r}:e.renderer}if("tokenizer"in e){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");const n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&("block"===e.level?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:"inline"===e.level&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}"childTokens"in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){const t=this.defaults.renderer||new _Renderer(this.defaults);for(const n in e.renderer){if(!(n in t))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;const r=n,o=e.renderer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n||""}}n.renderer=t}if(e.tokenizer){const t=this.defaults.tokenizer||new _Tokenizer(this.defaults);for(const n in e.tokenizer){if(!(n in t))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;const r=n,o=e.tokenizer[r],i=t[r];t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){const t=this.defaults.hooks||new _Hooks;for(const n in e.hooks){if(!(n in t))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;const r=n,o=e.hooks[r],i=t[r];_Hooks.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async)return Promise.resolve(o.call(t,e)).then(e=>i.call(t,e));const n=o.call(t,e);return i.call(t,n)}:t[r]=(...e)=>{let n=o.apply(t,e);return!1===n&&(n=i.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){const t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return _Lexer.lex(e,t??this.defaults)}parser(e,t){return _Parser.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{const r={...n},o={...this.defaults,...r},i=this.onError(!!o.silent,!!o.async);if(!0===this.defaults.async&&!1===r.async)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==t)return i(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof t)return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));o.hooks&&(o.hooks.options=o,o.hooks.block=e);const a=o.hooks?o.hooks.provideLexer():e?_Lexer.lex:_Lexer.lexInline,s=o.hooks?o.hooks.provideParser():e?_Parser.parse:_Parser.parseInline;if(o.async)return Promise.resolve(o.hooks?o.hooks.preprocess(t):t).then(e=>a(e,o)).then(e=>o.hooks?o.hooks.processAllTokens(e):e).then(e=>o.walkTokens?Promise.all(this.walkTokens(e,o.walkTokens)).then(()=>e):e).then(e=>s(e,o)).then(e=>o.hooks?o.hooks.postprocess(e):e).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let e=a(t,o);o.hooks&&(e=o.hooks.processAllTokens(e)),o.walkTokens&&this.walkTokens(e,o.walkTokens);let n=s(e,o);return o.hooks&&(n=o.hooks.postprocess(n)),n}catch(e2){return i(e2)}}}onError(e,t){return n=>{if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",e){const e="<p>An error occurred:</p><pre>"+escape2(n.message+"",!0)+"</pre>";return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},markedInstance=new Marked;function marked(e,t){return markedInstance.parse(e,t)}async function downloadMarkdown(e){if(!e)return void console.warn("No content provided for PDF export");const t=await(async()=>{try{const{content:t}=await lintPromise({strings:{content:e}});if(!t.length)return e;return applyFixes(e,t)||e}catch(t){return console.error("Markdown linting failed:",t),e}})();let n;marked.setOptions({breaks:!0,gfm:!0});try{n=await marked.parse(t)}catch(i){return void console.error("Markdown parsing failed:",i)}const r=document.createElement("div");r.innerHTML=n,r.style.padding="20px",r.style.fontFamily="Arial, sans-serif",r.style.fontSize="12pt",r.style.lineHeight="1.5";r.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(e=>{e.style.color="#2196f3",e.style.fontSize="1.5em",e.style.paddingTop="8px",e.style.paddingBottom="8px"});r.querySelectorAll("strong").forEach(e=>{e.style.fontWeight="bold",e.style.display="inline"});r.querySelectorAll("p").forEach(e=>{e.style.marginBottom="12px"});r.querySelectorAll("hr").forEach(e=>{e.style.marginTop="8px",e.style.marginBottom="16px",e.style.border="0",e.style.borderTop="1px solid #e0e0e0"});const o={margin:[.5,.5,.5,.5],filename:"document.pdf",image:{type:"jpeg",quality:.98},html2canvas:{scale:2,useCORS:!0},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}};try{await html2pdf().from(r).set(o).output("blob").then(e=>{const t=URL.createObjectURL(e),n=ioc.routerService.listen(()=>{URL.revokeObjectURL(t),n()});ioc.layoutService.downloadFile(t,"document.pdf")})}catch(a){console.error("PDF generation failed:",a)}}marked.options=marked.setOptions=function(e){return markedInstance.setOptions(e),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked},marked.getDefaults=_getDefaults,marked.defaults=_defaults,marked.use=function(...e){return markedInstance.use(...e),marked.defaults=markedInstance.defaults,changeDefaults(marked.defaults),marked},marked.walkTokens=function(e,t){return markedInstance.walkTokens(e,t)},marked.parseInline=markedInstance.parseInline,marked.Parser=_Parser,marked.parser=_Parser.parse,marked.Renderer=_Renderer,marked.TextRenderer=_TextRenderer,marked.Lexer=_Lexer,marked.lexer=_Lexer.lex,marked.Tokenizer=_Tokenizer,marked.Hooks=_Hooks,marked.parse=marked,marked.options,marked.setOptions,marked.use,marked.walkTokens,marked.parseInline,_Parser.parse,_Lexer.lex;class MarkdownHelperService{loggerService=YS(TYPES.loggerService);buildMarkdownFromFields=(e,t,n={})=>{this.loggerService.log("markdownHelperService buildMarkdownFromFields",{fields:e,data:t});const r=[],{visible:o}=nI(e,t,n,n.permissions),i=new Set(o),a=e=>{if(i.has(e))if(e.type!==Mn$1.Typography){if(e.type===Mn$1.Text){const o=e.compute?e.compute(t,n):e.name?lodashExports.get(t,e.name):void 0,i=e.title;if(o){const e=String(o);r.push(i?`**${i}:** ${e}`:e)}return}if(e.fields)for(const t of e.fields)a(t);e.child&&a(e.child)}else e.placeholder&&r.push(`\n## ${e.placeholder}\n`)};for(const s of e)a(s);return r.join("\n")};printFields=async(e,t,n={})=>{this.loggerService.log("markdownHelperService printFields",{fields:e,data:t});const r=this.buildMarkdownFromFields(e,t,n);await downloadMarkdown(r)}}class ExplorerHelperService{loggerService=YS(TYPES.loggerService);*deepFlat(e){this.loggerService.log("explorerHelperService deepFlat");const t=new Set,n=[...e];for(;n.length;){const e=n.pop();t.has(e)||(t.add(e),"directory"===e.type&&n.push(...e.nodes),yield e)}}}zS(TYPES.errorService,()=>new ErrorService),zS(TYPES.alertService,()=>new AlertService),zS(TYPES.layoutService,()=>new LayoutService),zS(TYPES.loggerService,()=>new LoggerService),zS(TYPES.routerService,()=>new RouterService),zS(TYPES.linkService,()=>new LinkService),zS(TYPES.symbolGlobalService,()=>new SymbolGlobalService),zS(TYPES.priceGlobalService,()=>new PriceGlobalService),zS(TYPES.backtestGlobalService,()=>new BacktestGlobalService),zS(TYPES.liveGlobalService,()=>new LiveGlobalService),zS(TYPES.replGlobalService,()=>new ReplGlobalService),zS(TYPES.explorerHelperService,()=>new ExplorerHelperService),zS(TYPES.markdownHelperService,()=>new MarkdownHelperService),zS(TYPES.exchangeMockService,()=>new ExchangeMockService),zS(TYPES.notificationMockService,()=>new NotificationMockService),zS(TYPES.storageMockService,()=>new StorageMockService),zS(TYPES.logMockService,()=>new LogMockService),zS(TYPES.statusMockService,()=>new StatusMockService),zS(TYPES.markdownMockService,()=>new MarkdownMockService),zS(TYPES.explorerMockService,()=>new ExplorerMockService),zS(TYPES.signalMockService,()=>new SignalMockService),zS(TYPES.heatMockService,()=>new HeatMockService),zS(TYPES.performanceMockService,()=>new PerformanceMockService),zS(TYPES.environmentMockService,()=>new EnvironmentMockService),zS(TYPES.setupMockService,()=>new SetupMockService),zS(TYPES.runtimeMockService,()=>new RuntimeMockService),zS(TYPES.exchangeViewService,()=>new ExchangeViewService),zS(TYPES.notificationViewService,()=>new NotificationViewService),zS(TYPES.storageViewService,()=>new StorageViewService),zS(TYPES.logViewService,()=>new LogViewService),zS(TYPES.statusViewService,()=>new StatusViewService),zS(TYPES.markdownViewService,()=>new MarkdownViewService),zS(TYPES.explorerViewService,()=>new ExplorerViewService),zS(TYPES.signalViewService,()=>new SignalViewService),zS(TYPES.heatViewService,()=>new HeatViewService),zS(TYPES.performanceViewService,()=>new PerformanceViewService),zS(TYPES.environmentViewService,()=>new EnvironmentViewService),zS(TYPES.setupViewService,()=>new SetupViewService),zS(TYPES.runtimeViewService,()=>new RuntimeViewService);const baseServices={errorService:YS(TYPES.errorService),layoutService:YS(TYPES.layoutService),loggerService:YS(TYPES.loggerService),routerService:YS(TYPES.routerService),alertService:YS(TYPES.alertService),linkService:YS(TYPES.linkService)},globalServices={symbolGlobalService:YS(TYPES.symbolGlobalService),priceGlobalService:YS(TYPES.priceGlobalService),backtestGlobalService:YS(TYPES.backtestGlobalService),liveGlobalService:YS(TYPES.liveGlobalService),replGlobalService:YS(TYPES.replGlobalService)},helperServices={explorerHelperService:YS(TYPES.explorerHelperService),markdownHelperService:YS(TYPES.markdownHelperService)},mockServices={exchangeMockService:YS(TYPES.exchangeMockService),notificationMockService:YS(TYPES.notificationMockService),storageMockService:YS(TYPES.storageMockService),logMockService:YS(TYPES.logMockService),statusMockService:YS(TYPES.statusMockService),markdownMockService:YS(TYPES.markdownMockService),explorerMockService:YS(TYPES.explorerMockService),signalMockService:YS(TYPES.signalMockService),heatMockService:YS(TYPES.heatMockService),performanceMockService:YS(TYPES.performanceMockService),environmentMockService:YS(TYPES.environmentMockService),setupMockService:YS(TYPES.setupMockService),runtimeMockService:YS(TYPES.runtimeMockService)},viewServices={exchangeViewService:YS(TYPES.exchangeViewService),notificationViewService:YS(TYPES.notificationViewService),storageViewService:YS(TYPES.storageViewService),logViewService:YS(TYPES.logViewService),statusViewService:YS(TYPES.statusViewService),markdownViewService:YS(TYPES.markdownViewService),explorerViewService:YS(TYPES.explorerViewService),signalViewService:YS(TYPES.signalViewService),heatViewService:YS(TYPES.heatViewService),performanceViewService:YS(TYPES.performanceViewService),environmentViewService:YS(TYPES.environmentViewService),setupViewService:YS(TYPES.setupViewService),runtimeViewService:YS(TYPES.runtimeViewService)},ioc={...baseServices,...globalServices,...helperServices,...mockServices,...viewServices};ioc.routerService.listen(({action:e,location:t})=>{"/error_page"!==t.pathname&&"/offline_page"!==t.pathname&&"PUSH"===e&&console.clear()}),window.addEventListener("unhandledrejection",e=>{ioc.errorService.handleGlobalError(new Error(e.reason))}),window.addEventListener("error",e=>{ioc.errorService.handleGlobalError(new Error(mL(e)))}),Object.assign(window,{ioc:ioc});const AUTO_HIDE_DURATION=5e3,AlertProvider=({children:e})=>{const[t,n]=reactExports.useState(ioc.alertService.current);return Xf(()=>ioc.alertService.reloadSubject.subscribe(()=>{n(ioc.alertService.current)})),factory$1(Fragment,{children:[!!t&&factory$1(Snackbar,{open:!0,anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:t.pin?void 0:AUTO_HIDE_DURATION,onClose:t.pin?void 0:ioc.alertService.hideCurrent,sx:{zIndex:9999999},message:t.message},t.key),e]})},createRedirect=e=>()=>factory$1(Dw,{handler:async()=>{await e()},height:"calc(100vh - 80px)"}),getMainRoute=async()=>new URL(location.href,location.origin).searchParams.has("pine")?"/pine_page":"/main",join$1=(...e)=>(e=e.flat(1)).flatMap(e=>Array.isArray(e)?join$1(e):e).filter(Boolean),str=(...e)=>join$1(...e).join(" ");str.newline=(...e)=>join$1(...e).join("\n"),str.space=(...e)=>join$1(...e).join(" "),str.comma=(...e)=>join$1(...e).join(", "),str.dot=(...e)=>join$1(...e).join(". "),str.semicolon=(...e)=>join$1(...e).join(";"),str.table=(...e)=>`| ${join$1(...e).join(" | ")} |`;const useStyles$t=makeStyles()(e=>({root:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:9999,background:e.palette.background.default,height:"100vh",width:"100vw",display:"flex",alignItems:"center",flexDirection:"column",gap:20,padding:15},container:{position:"relative",overflow:"clip",minWidth:375,maxWidth:375,padding:15},reveal:{width:"auto !important"}})),ERROR_LABEL="Data is outdated. Please refresh the page",OFFLINE_LABEL="Disconnected from server",ErrorView=({onLine:e=navigator.onLine})=>{const{classes:t}=useStyles$t();return factory$1(mx,{children:factory$1(Box$1,{className:t.root,children:factory$1(Box$1,{className:t.reveal,children:factory$1(Paper,{className:t.container,children:factory$1(Stack,{direction:"column",gap:"15px",children:[factory$1("span",{children:e?ERROR_LABEL:OFFLINE_LABEL}),factory$1(Button,{variant:"contained",onClick:()=>window.location.reload(),children:e?"Reload page":"Reconnect"})]})})})})})},ErrorPage=()=>factory$1(ErrorView,{}),AccountBalance=createSvgIcon$1([factory$1("path",{d:"m6.29 6 5.21-2.74L16.71 6z",opacity:".3"},"0"),factory$1("path",{d:"M6.5 10h-2v7h2v-7zm6 0h-2v7h2v-7zm8.5 9H2v2h19v-2zm-2.5-9h-2v7h2v-7zm-7-9L2 6v2h19V6l-9.5-5zM6.29 6l5.21-2.74L16.71 6H6.29z"},"1")],"AccountBalanceTwoTone"),Analytics=createSvgIcon$1([factory$1("path",{d:"M5 5h14v14H5z",opacity:".3"},"0"),factory$1("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"},"1"),factory$1("path",{d:"M7 12h2v5H7zm8-5h2v10h-2zm-4 7h2v3h-2zm0-4h2v2h-2z"},"2")],"AnalyticsTwoTone"),ArrowBack=createSvgIcon$1(factory$1("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"}),"ArrowBack"),ArrowForward=createSvgIcon$1(factory$1("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward"),Cancel=createSvgIcon$1(factory$1("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel"),Close=createSvgIcon$1(factory$1("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),CopyAll=createSvgIcon$1(factory$1("path",{d:"M18 2H9c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h9c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H9V4h9v12zM3 15v-2h2v2H3zm0-5.5h2v2H3v-2zM10 20h2v2h-2v-2zm-7-1.5v-2h2v2H3zM5 22c-1.1 0-2-.9-2-2h2v2zm3.5 0h-2v-2h2v2zm5 0v-2h2c0 1.1-.9 2-2 2zM5 6v2H3c0-1.1.9-2 2-2z"}),"CopyAll"),DataObject=createSvgIcon$1(factory$1("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7zm17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4h-1z"}),"DataObject"),Description=createSvgIcon$1(factory$1("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"}),"Description"),DonutSmall=createSvgIcon$1([factory$1("path",{d:"M15.99 9h3.43C18.6 7 17 5.4 15 4.58v3.43c.37.28.71.62.99.99zM4 12c0 3.35 2.04 6.24 5 7.42v-3.44c-1.23-.93-2-2.4-2-3.99C7 10.4 7.77 8.93 9 8V4.58C6.04 5.76 4 8.65 4 12zm11 3.99v3.43c2-.82 3.6-2.42 4.42-4.42h-3.43c-.28.37-.62.71-.99.99z",opacity:".3"},"0"),factory$1("path",{d:"M14.82 11h7.13c-.47-4.72-4.23-8.48-8.95-8.95v7.13c.85.31 1.51.97 1.82 1.82zM15 4.58C17 5.4 18.6 7 19.42 9h-3.43c-.28-.37-.62-.71-.99-.99V4.58zM2 12c0 5.19 3.95 9.45 9 9.95v-7.13C9.84 14.4 9 13.3 9 12c0-1.3.84-2.4 2-2.82V2.05c-5.05.5-9 4.76-9 9.95zm7-7.42v3.44c-1.23.92-2 2.39-2 3.98 0 1.59.77 3.06 2 3.99v3.44C6.04 18.24 4 15.35 4 12c0-3.35 2.04-6.24 5-7.42zm4 10.24v7.13c4.72-.47 8.48-4.23 8.95-8.95h-7.13c-.31.85-.97 1.51-1.82 1.82zm2 1.17c.37-.28.71-.61.99-.99h3.43C18.6 17 17 18.6 15 19.42v-3.43z"},"1")],"DonutSmallTwoTone"),Download=createSvgIcon$1(factory$1("path",{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"}),"Download"),ErrorIcon=createSvgIcon$1(factory$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"Error"),Fullscreen=createSvgIcon$1(factory$1("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"}),"Fullscreen"),FullscreenExit=createSvgIcon$1(factory$1("path",{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"}),"FullscreenExit"),GitHub=createSvgIcon$1(factory$1("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),HourglassTop=createSvgIcon$1(factory$1("path",{d:"m6 2 .01 6L10 12l-3.99 4.01L6 22h12v-6l-4-4 4-3.99V2H6zm10 14.5V20H8v-3.5l4-4 4 4z"}),"HourglassTop"),Info=createSvgIcon$1(factory$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info"),Layers=createSvgIcon$1([factory$1("path",{d:"M6.26 9 12 13.47 17.74 9 12 4.53z",opacity:".3"},"0"),factory$1("path",{d:"m19.37 12.8-7.38 5.74-7.37-5.73L3 14.07l9 7 9-7zM12 2 3 9l1.63 1.27L12 16l7.36-5.73L21 9l-9-7zm0 11.47L6.26 9 12 4.53 17.74 9 12 13.47z"},"1")],"LayersTwoTone"),LiveTv=createSvgIcon$1(factory$1("path",{d:"M21 6h-7.59l3.29-3.29L16 2l-4 4-4-4-.71.71L10.59 6H3c-1.1 0-2 .89-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.11-.9-2-2-2zm0 14H3V8h18v12zM9 10v8l7-4z"}),"LiveTv"),ManageSearch=createSvgIcon$1(factory$1("path",{d:"M7 9H2V7h5v2zm0 3H2v2h5v-2zm13.59 7-3.83-3.83c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L22 17.59 20.59 19zM17 11c0-1.65-1.35-3-3-3s-3 1.35-3 3 1.35 3 3 3 3-1.35 3-3zM2 19h10v-2H2v2z"}),"ManageSearch"),NotificationImportant=createSvgIcon$1(factory$1("path",{d:"M18 16v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-5 0h-2v-2h2v2zm0-4h-2V8h2v4zm-1 10c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2z"}),"NotificationImportant"),PictureAsPdf=createSvgIcon$1(factory$1("path",{d:"M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"}),"PictureAsPdf"),PlayArrow=createSvgIcon$1(factory$1("path",{d:"M8 5v14l11-7z"}),"PlayArrow"),Print=createSvgIcon$1(factory$1("path",{d:"M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"}),"Print"),ReportProblem=createSvgIcon$1(factory$1("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"ReportProblem"),RequestQuote=createSvgIcon$1([factory$1("path",{d:"M6 20V4h7v4h5v12H6zm5-1h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4v-2h-2V9h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1z",opacity:".3"},"0"),factory$1("path",{d:"M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zM6 20V4h7v4h5v12H6zm5-1h2v-1h1c.55 0 1-.45 1-1v-3c0-.55-.45-1-1-1h-3v-1h4v-2h-2V9h-2v1h-1c-.55 0-1 .45-1 1v3c0 .55.45 1 1 1h3v1H9v2h2v1z"},"1")],"RequestQuoteTwoTone"),Schedule=createSvgIcon$1([factory$1("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},"0"),factory$1("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"},"1")],"Schedule"),Search=createSvgIcon$1(factory$1("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search"),SwapVert=createSvgIcon$1(factory$1("path",{d:"M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3 5 6.99h3V14h2V6.99h3L9 3z"}),"SwapVert"),Timeline=createSvgIcon$1(factory$1("path",{d:"M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"}),"Timeline"),TrendingDown=createSvgIcon$1(factory$1("path",{d:"m16 18 2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"}),"TrendingDown"),TrendingUp=createSvgIcon$1(factory$1("path",{d:"m16 6 2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"}),"TrendingUp"),Warning$4=createSvgIcon$1(factory$1("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning"),baseRoutes=[{path:"/error_page",noHeader:!0,element:ErrorPage},{path:"/pine_page",noHeader:!0,element:QI(()=>__vitePreload(()=>import("./index-Chady3cO.js"),[]))}],dashboardRoutes=[{path:"/main",element:QI(()=>__vitePreload(()=>import("./index-CAeruUt8.js"),__vite__mapDeps([0,1,2])))},{path:"/about",element:QI(()=>__vitePreload(()=>import("./index-BZ-2tIjS.js"),__vite__mapDeps([3,4,5,2,6])))},{path:"/about/setup",element:QI(()=>__vitePreload(()=>import("./index-BZ-2tIjS.js"),__vite__mapDeps([3,4,5,2,6])))},{path:"/overview",element:QI(()=>__vitePreload(()=>import("./index-DqU1KnNK.js"),__vite__mapDeps([7,2,6,8,9])))},{path:"/dashboard",tabs:[{label:"Backtest Measures",description:str.newline("KPI metrics computed from historical backtest simulation runs.","Includes success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:()=>!0,icon:HourglassTop,path:"/dashboard/backtest",navigate:()=>ioc.routerService.push("/dashboard/backtest")},{label:"Live Measures",description:str.newline("KPI metrics collected from real-time live trading activity.","Tracks live success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:()=>!1,icon:LiveTv,path:"/dashboard/live",navigate:()=>ioc.routerService.push("/dashboard/live")}],element:QI(()=>__vitePreload(()=>import("./index-BfI1t1CW.js"),__vite__mapDeps([10,8,2,6])))},{path:"/dashboard/:mode",tabs:[{label:"Backtest Measures",description:str.newline("KPI metrics computed from historical backtest simulation runs.","Includes success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:({routeParams:e})=>"backtest"===e.mode,icon:HourglassTop,path:"/dashboard/backtest",navigate:()=>ioc.routerService.push("/dashboard/backtest")},{label:"Live Measures",description:str.newline("KPI metrics collected from real-time live trading activity.","Tracks live success rate, trade performance, daily trade counts, and revenue aggregated across all symbols."),isActive:({routeParams:e})=>"live"===e.mode,icon:LiveTv,path:"/dashboard/live",navigate:()=>ioc.routerService.push("/dashboard/live")}],element:QI(()=>__vitePreload(()=>import("./index-BfI1t1CW.js"),__vite__mapDeps([10,8,2,6])))},{path:"/notifications",element:QI(()=>__vitePreload(()=>import("./index-DoJ5J0eu.js"),__vite__mapDeps([11,2,6])))},{path:"/logs",element:QI(()=>__vitePreload(()=>import("./index-B4vT2oz0.js"),__vite__mapDeps([12,13,2,6])))},{path:"/status",element:QI(()=>__vitePreload(()=>import("./index-DMi0YxbU.js"),__vite__mapDeps([14,4,8,2,6,9])))},{path:"/status/:id",element:QI(()=>__vitePreload(()=>import("./index-DMi0YxbU.js"),__vite__mapDeps([14,4,8,2,6,9])))},{path:"/report",element:QI(()=>__vitePreload(()=>import("./index-CAw70V5N.js"),__vite__mapDeps([15,4,8,2,6])))},{path:"/dump",element:QI(()=>__vitePreload(()=>import("./index-Ds77hvVx.js"),__vite__mapDeps([16,4,9,13,2,6])))},{path:"/dump/:search",element:QI(()=>__vitePreload(()=>import("./index-Ds77hvVx.js"),__vite__mapDeps([16,4,9,13,2,6])))},{path:"/heat",element:QI(()=>__vitePreload(()=>import("./index-CaNx_Ck6.js"),__vite__mapDeps([17,4,1,8,5,2,6])))},{path:"/price_chart",element:QI(()=>__vitePreload(()=>import("./index-CWF7zgn2.js"),__vite__mapDeps([18,4,8,2,6])))},{path:"/price_chart/:symbol",element:QI(()=>__vitePreload(()=>import("./index-CWF7zgn2.js"),__vite__mapDeps([18,4,8,2,6])))},{path:"/price_chart/:symbol/:interval",element:QI(()=>__vitePreload(()=>import("./index-CWF7zgn2.js"),__vite__mapDeps([18,4,8,2,6])))}],routes$m=[{path:"/",element:createRedirect(async()=>{ioc.routerService.push(await getMainRoute())})},...baseRoutes,...dashboardRoutes],getRouteItem=(()=>{let e=null,t=null;return()=>{const{pathname:n}=ioc.routerService.location;return e!==n&&(t=GS(routes$m,ioc.routerService.location.pathname),e=n),t}})();window.getRouteItem=getRouteItem;const IconWrapper=({icon:e,color:t})=>{const n=reactExports.useMemo(()=>alpha$2(lighten(t,.5),.42),[t]);return factory$1(Box$1,{sx:{background:n,padding:"6px",marginTop:"6px",marginBottom:"6px",marginLeft:"-2px",marginRight:"12px",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:factory$1(e,{sx:{color:t}})})};var Warning$3={},_interopRequireDefault$1=interopRequireDefaultExports;Object.defineProperty(Warning$3,"__esModule",{value:!0});var default_1$1=Warning$3.default=void 0,_createSvgIcon$1=_interopRequireDefault$1(requireCreateSvgIcon()),_jsxRuntime$1=require$$2$1,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");default_1$1=Warning$3.default=_default$1;const Context=reactExports.createContext(null);function useUniquePrefix(){const[e,t]=reactExports.useState(null);return reactExports.useEffect(()=>{t(`mui-p-${Math.round(1e5*Math.random())}`)},[]),e}function TabContext(e){const{children:t,value:n}=e,r=useUniquePrefix(),o=reactExports.useMemo(()=>({idPrefix:r,value:n}),[r,n]);return factory$1(Context.Provider,{value:o,children:t})}function useTabContext(){return reactExports.useContext(Context)}function getPanelId(e,t){const{idPrefix:n}=e;return null===n?null:`${e.idPrefix}-P-${t}`}function getTabId(e,t){const{idPrefix:n}=e;return null===n?null:`${e.idPrefix}-T-${t}`}const _excluded=["children"],TabList=reactExports.forwardRef(function(e,t){const{children:n}=e,r=_objectWithoutPropertiesLoose(e,_excluded),o=useTabContext();if(null===o)throw new TypeError("No TabContext provided");const i=reactExports.Children.map(n,e=>reactExports.isValidElement(e)?reactExports.cloneElement(e,{"aria-controls":getPanelId(o,e.props.value),id:getTabId(o,e.props.value)}):null);return factory$1(Tabs,_extends({},r,{ref:t,value:o.value,children:i}))}),sanitize={allowCustomElements:!0,allowElements:["text-underline","blank-link"],allowAttributes:{href:["blank-link"]}};var Notifications={},_interopRequireDefault=interopRequireDefaultExports;Object.defineProperty(Notifications,"__esModule",{value:!0});var default_1=Notifications.default=void 0,_createSvgIcon=_interopRequireDefault(requireCreateSvgIcon()),_jsxRuntime=require$$2$1,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2zm6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2z"}),"Notifications");default_1=Notifications.default=_default;const reloadSubject=new ar,Loader$1=()=>factory$1(Dw,{sx:{width:350,height:"calc(100% - 96px)"}}),useStyles$s=makeStyles()(e=>({list:{pt:1,pb:1,"& > *":{paddingTop:0,paddingBottom:0,"& > *":{paddingTop:0,paddingBottom:0}}},listItemAccient:{background:alpha$2(e.palette.getContrastText(e.palette.background.paper),.018)}})),getNotificationColor$1=e=>{switch(e.type){case"signal.opened":case"activate_scheduled.commit":case"signal_sync.open":return"#4CAF50";case"signal.closed":case"signal_sync.close":return"#2196F3";case"signal.scheduled":case"average_buy.commit":case"error.info":case"error.validation":return"#FF9800";case"signal.cancelled":case"cancel_scheduled.commit":return"#9E9E9E";case"partial_profit.available":case"partial_profit.commit":return"#8BC34A";case"partial_loss.available":case"partial_loss.commit":return"#FF5722";case"breakeven.available":case"breakeven.commit":return"#00BCD4";case"trailing_stop.commit":case"trailing_take.commit":return"#673AB7";case"close_pending.commit":return"#607D8B";case"risk.rejection":return"#F44336";case"error.critical":return"#D32F2F";case"signal.info":return"#9C27B0";default:return}},getNotificationIcon$1=e=>{const t={color:"white",mt:"-1px"};switch(e.type){case"signal.opened":case"partial_profit.available":case"partial_profit.commit":return factory$1(TrendingUp,{sx:t});case"signal.closed":case"signal_sync.close":case"close_pending.commit":return factory$1(Close,{sx:t});case"signal.scheduled":return factory$1(Schedule,{sx:t});case"signal.cancelled":case"cancel_scheduled.commit":return factory$1(Cancel,{sx:t});case"partial_loss.available":case"partial_loss.commit":case"average_buy.commit":return factory$1(TrendingDown,{sx:t});case"breakeven.available":case"breakeven.commit":return factory$1(SwapVert,{sx:t});case"activate_scheduled.commit":case"signal_sync.open":return factory$1(PlayArrow,{sx:t});case"trailing_stop.commit":case"trailing_take.commit":return factory$1(Timeline,{sx:t});case"risk.rejection":return factory$1(ReportProblem,{sx:t});case"error.info":case"error.validation":case"signal.info":return factory$1(NotificationImportant,{sx:t});case"error.critical":return factory$1(ErrorIcon,{sx:t});default:return factory$1(default_1$1,{sx:{...t,mt:"-2px"}})}},getNotificationTitle$1=e=>{switch(e.type){case"signal.opened":return`${t$1("Opened")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.closed":return`${t$1("Closed")} ${e.symbol} (${e.pnlPercentage?`${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`:"N/A"})`;case"signal.scheduled":return`${t$1("Scheduled")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal.cancelled":return`${t$1("Cancelled")} ${e.symbol}`;case"partial_profit.available":return`${t$1("Partial profit")} ${e.level}% ${e.symbol}`;case"partial_profit.commit":return`${t$1("Profit fixed")} ${e.percentToClose}% ${e.symbol}`;case"partial_loss.available":return`${t$1("Partial loss")} ${e.level}% ${e.symbol}`;case"partial_loss.commit":return`${t$1("Loss fixed")} ${e.percentToClose}% ${e.symbol}`;case"breakeven.available":return`${t$1("Breakeven available")} ${e.symbol}`;case"breakeven.commit":return`${t$1("Breakeven set")} ${e.symbol}`;case"activate_scheduled.commit":return`${t$1("Activated")} ${e.position.toUpperCase()} ${e.symbol}`;case"average_buy.commit":return`${t$1("Average Buy")} ${e.symbol}`;case"trailing_stop.commit":return`${t$1("Trailing stop")} ${e.symbol}`;case"trailing_take.commit":return`${t$1("Trailing take")} ${e.symbol}`;case"signal_sync.open":return`${t$1("Sync Open")} ${e.position.toUpperCase()} ${e.symbol}`;case"signal_sync.close":return`${t$1("Sync Close")} ${e.symbol} (${e.pnlPercentage?`${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`:"N/A"})`;case"cancel_scheduled.commit":return`${t$1("Cancel Scheduled")} ${e.symbol}`;case"close_pending.commit":return`${t$1("Close Pending")} ${e.symbol}`;case"risk.rejection":return`${t$1("Rejected")} ${e.position.toUpperCase()} ${e.symbol}`;case"error.info":return`${t$1("Error")}: ${e.message}`;case"error.validation":return`${t$1("Validation")}: ${e.message}`;case"error.critical":return`${t$1("Critical")}: ${e.message}`;case"signal.info":return`${t$1("Signal Info")} ${e.symbol} (${e.pnlPercentage?`${e.pnlPercentage>0?"+":""}${e.pnlPercentage.toFixed(2)}%`:"N/A"})`;default:return`${t$1("Unknown")} ${lodashExports.get(e,"type")}`}},handleNotificationClick$1=e=>{switch(e.type){case"risk.rejection":ioc.layoutService.pickRisk(e.id);break;case"signal.opened":ioc.layoutService.pickSignalOpened(e.id);break;case"signal.closed":ioc.layoutService.pickSignalClosed(e.id);break;case"signal.scheduled":ioc.layoutService.pickSignalScheduled(e.id);break;case"signal.cancelled":ioc.layoutService.pickSignalCancelled(e.id);break;case"partial_profit.available":ioc.layoutService.pickPartialProfitAvailable(e.id);break;case"partial_profit.commit":ioc.layoutService.pickPartialProfitCommit(e.id);break;case"partial_loss.available":ioc.layoutService.pickPartialLossAvailable(e.id);break;case"partial_loss.commit":ioc.layoutService.pickPartialLossCommit(e.id);break;case"breakeven.available":ioc.layoutService.pickBreakevenAvailable(e.id);break;case"breakeven.commit":ioc.layoutService.pickBreakevenCommit(e.id);break;case"trailing_stop.commit":ioc.layoutService.pickTrailingStop(e.id);break;case"trailing_take.commit":ioc.layoutService.pickTrailingTake(e.id);break;case"activate_scheduled.commit":ioc.layoutService.pickActivateScheduled(e.id);break;case"average_buy.commit":ioc.layoutService.pickAverageBuyCommit(e.id);break;case"signal_sync.open":ioc.layoutService.pickSignalSyncOpen(e.id);break;case"signal_sync.close":ioc.layoutService.pickSignalSyncClose(e.id);break;case"cancel_scheduled.commit":ioc.layoutService.pickCancelScheduled(e.id);break;case"close_pending.commit":ioc.layoutService.pickClosePending(e.id);break;case"signal.info":ioc.layoutService.pickSignalNotify(e.id)}},NotificationView$1=()=>{const[e,t]=reactExports.useState(),{classes:n}=useStyles$s(),[r,o]=reactExports.useState(0),[i,a]=reactExports.useState("all");return factory$1(Fragment,{children:[factory$1(Zl,{onClick:async({currentTarget:e})=>{reloadSubject.next(),t(e)},onLoadStart:()=>o(e=>e+1),onLoadEnd:()=>o(e=>e-1),color:"inherit",sx:{ml:{xs:1,md:2},mr:{xs:1,sm:2}},children:factory$1(Tooltip$2,{title:t$1("Notifications"),children:factory$1(default_1,{sx:{color:"white !important",opacity:r?.8:1}})})}),factory$1(Popover$1,{open:!!e,anchorEl:e,hidden:!1,onClose:()=>{t(null),a("all")},anchorOrigin:{vertical:"bottom",horizontal:"right"},children:factory$1(TabContext,{value:i,children:factory$1(List,{sx:{width:350,height:448},subheader:factory$1(Stack,{direction:"row",justifyContent:"space-between",children:[factory$1(ListSubheader,{component:Typography,sx:{fontWeight:"bold"},children:t$1("all"===i?"All":"Signals")}),factory$1(TabList,{onChange:(e,t)=>a(t),sx:{"& .MuiTabs-indicator":{background:"#3F51B5 !important"}},color:"secondary",variant:"standard",children:[factory$1(Tab,{icon:factory$1(ManageSearch,{}),value:"all"}),factory$1(Tab,{icon:factory$1(TrendingUp,{}),value:"signals"})]})]}),children:["all"===i&&factory$1(Jr,{Loader:Loader$1,children:async()=>{const e=await ioc.notificationViewService.getList();return factory$1(vi$1,{className:n.list,sx:{width:350,height:"calc(100% - 48px)"},children:e.map((e,r)=>factory$1(ListItem,{className:clsx$2({[n.listItemAccient]:r%2==0}),disableGutters:!0,children:factory$1(ListItemButton,{onClick:()=>{handleNotificationClick$1(e),t(null)},children:[factory$1(ListItemAvatar,{children:factory$1(Avatar,{sx:{background:getNotificationColor$1(e)},children:getNotificationIcon$1(e)})}),factory$1(ListItemText,{primary:factory$1(DE,{config:sanitize,handler:()=>getNotificationTitle$1(e)}),secondary:"timestamp"in e?J$2(e.timestamp).format("HH:mm DD/MM/YYYY"):"N/A"}),factory$1(IconButton,{disableRipple:!0,children:factory$1(default_1$k,{})})]})},e.id))})}}),"signals"===i&&factory$1(Jr,{Loader:Loader$1,children:async()=>{const e=(await ioc.notificationViewService.getList()).filter(e=>e.type.startsWith("signal.")||e.type.startsWith("signal_sync."));return factory$1(vi$1,{className:n.list,sx:{width:350,height:"calc(100% - 48px)"},children:e.map((e,r)=>factory$1(ListItem,{className:clsx$2({[n.listItemAccient]:r%2==0}),disableGutters:!0,children:factory$1(ListItemButton,{onClick:()=>{handleNotificationClick$1(e),t(null)},children:[factory$1(ListItemAvatar,{children:factory$1(Avatar,{sx:{background:getNotificationColor$1(e)},children:getNotificationIcon$1(e)})}),factory$1(ListItemText,{primary:factory$1(DE,{config:sanitize,handler:()=>getNotificationTitle$1(e)}),secondary:"timestamp"in e?J$2(e.timestamp).format("HH:mm DD/MM/YYYY"):"N/A"}),factory$1(IconButton,{disableRipple:!0,children:factory$1(default_1$k,{})})]})},e.id))})}})]})})})]})},Tooltip=({description:e,placement:t="left",children:n})=>{const{isDesktop:r}=tl(),o=reactExports.useMemo(()=>({popper:{sx:{pointerEvents:"none"},modifiers:r?[{name:"fallbackPlacements",options:{fallbackPlacements:["right","top","bottom"]}}]:void 0},tooltip:{sx:{background:"black",p:1.5,fontSize:"16px"}},arrow:{sx:{color:"black"}}}),[r]),i=reactExports.useMemo(()=>({placement:r?t:void 0}),[r,t]);return factory$1(Tooltip$2,{title:e,slotProps:o,...i,arrow:!0,children:n})},LOADER_HEIGHT=4,TAB_ACTION_PREFIX="tab-action-",LOGO_SRC="/logo/icon512_maskable.png",LOGO_CLASS="backtest-kit-logo",LOGO_SIDE=32,HEADER_HEIGHT$3="80px",MARGIN_BOTTOM="10px",toggleFullscreen=()=>{var e;return document.fullscreenElement?document.exitFullscreen():null==(e=document.querySelector("body"))?void 0:e.requestFullscreen()},useStyles$r=makeStyles()(e=>({root:{position:"sticky",top:0,zIndex:9,height:HEADER_HEIGHT$3,display:"flex",alignItems:"stretch",justifyContent:"stretch",flexDirection:"column"},container:{flex:1,display:"flex",flexDirection:"row",justifyContent:"space-between",gap:"8px",paddingRight:"8px",position:"relative",marginBottom:MARGIN_BOTTOM,alignItems:"center",backdropFilter:"saturate(180%) blur(20px)",backgroundColor:alpha$2(darken$1(e.palette.primary.main,.2),.8),"&:hover":{[`& .${LOGO_CLASS}`]:{opacity:1}}},title:{color:"white",paddingLeft:e.spacing(1),paddingRight:e.spacing(3),userSelect:"none",transition:"opacity 500ms",opacity:"0.8",cursor:"pointer",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold"},loader:{position:"absolute",bottom:0,left:0,width:"100%",minHeight:`${LOADER_HEIGHT}px`,maxHeight:`${LOADER_HEIGHT}px`,marginTop:`-${LOADER_HEIGHT}px`,zIndex:2},logo:{transition:"opacity 500ms",marginLeft:"8px",marginRight:"-6px",opacity:"0.5"},actionMenu:{"& svg":{color:"white"}},stretch:{flex:1},tabsRoot:{minHeight:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,height:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,color:"white"},tabRoot:{minHeight:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,height:`calc(${HEADER_HEIGHT$3} - ${MARGIN_BOTTOM})`,color:"white"},tabIndicator:{height:"4px",background:"white"}})),default_actions=[{action:"toggle-fullscreen",isVisible:()=>!document.fullscreenElement,label:"Enter Fullscreen",icon:()=>factory$1(IconWrapper,{icon:Fullscreen,color:"#4caf50"})},{action:"toggle-fullscreen",isVisible:()=>!!document.fullscreenElement,label:"Exit Fullscreen",icon:()=>factory$1(IconWrapper,{icon:FullscreenExit,color:"#4caf50"})},{divider:!0},{action:"github-action",icon:()=>factory$1(IconWrapper,{icon:GitHub,color:"#6A1B9A "}),label:"Open GitHub"}],AppHeader=({routeItem:e,routeParams:t,pathname:n,loading:r})=>{const{classes:o,cx:i}=useStyles$r(),{activeTabPath:a,tabs:s}=reactExports.useMemo(()=>{if(!e.tabs)return{tabs:[],activeTabPath:""};const r=e.tabs.find(({isActive:r})=>r({routeItem:e,routeParams:t,pathname:n}));return{activeTabPath:(null==r?void 0:r.path)??"",tabs:e.tabs}},[e,t,n]),l=reactExports.useMemo(()=>a?s.filter(({isActive:r})=>!r({pathname:n,routeItem:e,routeParams:t})).map(({label:e,icon:t},n)=>({label:e,action:`${TAB_ACTION_PREFIX}${n}`,icon:t?()=>factory$1(IconWrapper,{icon:t,color:"#4caf50"}):void 0})):default_actions,[a,s]);if(e.noHeader)return null;return factory$1(Box$1,{className:o.root,children:factory$1(Box$1,{className:o.container,children:[factory$1(rb,{onClick:()=>{"/main"!==ioc.routerService.location.pathname?ioc.routerService.push("/main"):ioc.routerService.push("/about")},className:i(o.logo,LOGO_CLASS),children:factory$1(Avatar,{style:{height:LOGO_SIDE,width:LOGO_SIDE},src:LOGO_SRC})}),factory$1(Typography,{variant:"h4",onClick:()=>{"/main"!==ioc.routerService.location.pathname?ioc.routerService.push("/main"):ioc.routerService.push("/about")},className:i(o.title,LOGO_CLASS),sx:{display:{xs:"none",sm:"flex"},whiteSpace:"nowrap"},children:"Backtest Kit"}),s.length?factory$1(Tabs,{variant:"scrollable",value:a,textColor:"inherit",sx:{display:{xs:"none",sm:"flex"}},classes:{root:o.tabsRoot,indicator:o.tabIndicator},children:s.filter(({visible:e=!0})=>e).map(({label:r,icon:i,disabled:a,path:s,description:l,navigate:c},u,d)=>factory$1(Tab,{sx:{minWidth:128,fontWeight:"bold",mr:u<d.length-1?2:0},value:s,label:factory$1(Tooltip,{description:l,placement:"bottom",children:factory$1(Typography,{variant:"h6",children:r})}),onClick:()=>c({routeItem:e,routeParams:t,pathname:n}),disabled:a,icon:i&&factory$1(i,{}),iconPosition:"start",classes:{root:o.tabRoot}},`${s}-${u}`))},e.path):null,factory$1("div",{className:o.stretch}),factory$1(NotificationView$1,{}),factory$1(xa,{className:o.actionMenu,sx:{ml:{xs:1,md:2},mr:{xs:1,sm:2}},transparent:!0,onAction:async r=>{"github-action"===r&&ak("https://github.com/tripolskypetr/backtest-kit"),"toggle-fullscreen"===r&&toggleFullscreen(),r.startsWith(TAB_ACTION_PREFIX)&&(r=>{const o=parseInt(r.slice(TAB_ACTION_PREFIX.length)),i=s.filter(({isActive:r})=>!r({pathname:n,routeItem:e,routeParams:t})).find((e,t)=>t===o);i&&i.navigate({routeItem:e,routeParams:t,pathname:n})})(r)},options:l}),!!r&&factory$1(LinearProgress,{className:o.loader})]})})};var define_process_env_default$1={},noop=function(){},_process$env;function createGetCachedLinkHref(){var e,t=getCreateObjectURL(),n=null;return function(r){return r===n?e:(t===noop&&(t=getCreateObjectURL()),e=(n=r)?t(new Blob([r],{type:"text/css"})):void 0)}}function getCreateObjectURL(){return"undefined"==typeof window?noop:(window.URL||window.webkitURL).createObjectURL||noop}var IS_PRODUCTION=void 0!==process$1&&"production"===(null==(_process$env=define_process_env_default$1)?void 0:_process$env.NODE_ENV),DEFAULT_OPTIONS={hasSourceMap:!IS_PRODUCTION,isMinified:IS_PRODUCTION,isPrefixed:!0},globalOptions=Object.assign({},DEFAULT_OPTIONS),hasOwnProperty=Object.prototype.hasOwnProperty;function normalizeOptions(e){var t,n=Object.assign({},globalOptions);for(t in e)hasOwnProperty.call(n,t)&&null!=e[t]&&(n[t]=!!e[t]);return n}function isName(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||"-_*.:#[]".indexOf(e)>=0}function isQuote(e){return"'"===e||'"'===e}function isWhitespace$1(e){return" "===e||"\n"===e||"\t"===e||"\r"===e||"\f"===e}function beautify(e,t){void 0===t&&(t={}),e=e.replace(/\r\n/g,"\n");var n,r,o,i,a=t,s=a.autosemicolon,l=void 0!==s&&s,c=a.indent,u=void 0===c?" ":c,d=a.openbrace,p=void 0===d||d,f=0,h=e.length,A=[],m="",g=0,y=1,v=2,b=3,x=4,w=5,C=6,$=7,_=8,S=g,E=0,k=!1;function P(){for(var e=E;e>0;--e)m+=u}function B(){m=m.trimEnd(),p?m+=" {":(m+="\n",P(),m+="{"),"\n"!==r&&(m+="\n"),E+=1}function T(){var e;E-=1,(m=m.trimEnd()).length>0&&l&&";"!==(e=m.charAt(m.length-1))&&"{"!==e&&(m+=";"),m+="\n",P(),m+="}",A.push(m),m=""}for(;f<h;)if(n=e.charAt(f),r=e.charAt(f+1),++f,isQuote(i))m+=n,n===i&&(i=null),"\\"===n&&r===i&&(m+=r,++f);else if(isQuote(n))m+=n,i=n;else if(k)m+=n,"*"===n&&"/"===r&&(k=!1,m+=r,++f);else if("/"!==n||"*"!==r){if(S===g){if(0===A.length&&isWhitespace$1(n)&&0===m.length)continue;if(n<=" "||n.charCodeAt(0)>=128){S=g,m+=n;continue}if(isName(n)||"@"===n){if(0===(o=m.trimEnd()).length)A.length>0&&(m="\n\n");else{var I=o.charAt(o.length-1);if("}"===I||";"===I)m=o+"\n\n";else for(;" "===(r=m.charAt(m.length-1))||9===r.charCodeAt(0);)m=m.substr(0,m.length-1)}m+=n,S="@"===n?y:b;continue}}if(S!==y)if(S!==v)if(S!==b)if(S!==x)if(S!==w)if(S!==C)if(S!==$)S===_&&")"===n&&m.charAt(m.length-1!=="\\"?1:0)?(m+=n,S=$):m+=n;else{if("}"===n){T(),S=g,E>0&&(S=v);continue}if(";"===n){m=m.trimEnd(),m+=";\n",S=x;continue}if(m+=n,"("===n&&"l"===m.charAt(m.length-2)&&"r"===m.charAt(m.length-3)&&"u"===m.charAt(m.length-4)){S=_;continue}}else{if(!isWhitespace$1(n)){m+=n,S=$;continue}isQuote(r)&&(S=$)}else{if(":"===n){m=m.trimEnd(),m+=": ",S=$,isWhitespace$1(r)&&(S=C);continue}if("}"===n){T(),S=g,E>0&&(S=v);continue}m+=n}else{if("}"===n){T(),S=g,E>0&&(S=v);continue}if("\n"===n){m=m.trimEnd(),m+="\n";continue}if(!isWhitespace$1(n)){m=m.trimEnd(),m+="\n",P(),m+=n,S=w;continue}m+=n}else{if("{"===n){B(),S=x;continue}if("}"===n){T(),S=g;continue}m+=n}else{if(isName(n)){if(0===(o=m.trimEnd()).length)A.length>0&&(m="\n\n");else if("}"===o.charAt(o.length-1))m=o+"\n\n";else for(;" "===(r=m.charAt(m.length-1))||9===r.charCodeAt(0);)m=m.substr(0,m.length-1);P(),m+=n,S=b;continue}if("}"===n){T(),S=g;continue}m+=n}else{if(";"===n){m+=n,S=g;continue}if("{"===n){o=m.trimEnd(),B(),S="@font-face"===o?x:v;continue}m+=n}}else k=!0,m+=n,m+=r,++f;return m=A.join("")+m}function getProcessedStyles(e,t){return serialize(compile$1(e),t.isPrefixed?middleware([prefixer$1,stringify$8]):stringify$8)}function getRenderedStyles(e,t){var n=getProcessedStyles(e,t);return t.isMinified?n:beautify(n,{autosemicolon:!0,indent:" "})}var INTERNAL_PROPS={children:!0,hasSourceMap:!0,isMinified:!0,isPrefixed:!0};function useTagProps(e){var t={};for(var n in e)INTERNAL_PROPS[n]||(t[n]=e[n]);return t}function useStyle(e,t){var n=reactExports.useRef(e),r=reactExports.useRef();return r.current&&n.current===e||(r.current=getRenderedStyles(e,t),n.current=e),r.current}var Link=reactExports.forwardRef(function(e,t){var n=e.passedProps,r=e.style,o=reactExports.useMemo(createGetCachedLinkHref,[]);return reactExports.createElement("link",Object.assign({},n,{href:o(r),rel:"stylesheet",ref:t}))}),Style=reactExports.forwardRef(function(e,t){var n=e.hasSourceMap,r=e.isMinified,o=e.isPrefixed,i=useTagProps(e),a=reactExports.useMemo(function(){return normalizeOptions({hasSourceMap:n,isMinified:r,isPrefixed:o})},[n,r,o]),s=useStyle(e.children,a);return a.hasSourceMap?reactDomExports.createPortal(reactExports.createElement(Link,{passedProps:i,ref:t,style:s}),document.head):reactDomExports.createPortal(reactExports.createElement("style",Object.assign({},i,{ref:t}),s),document.head)});const IMAGE_SIDE="5vmin",IMAGE_LIST=["/images/cubes.png","/images/snow.png","/images/square.png","/images/triangle.png","/images/dots.png"],randomImage=()=>{const e=Math.floor(Date.now()/1e3/60)%IMAGE_LIST.length;return IMAGE_LIST[e]},BottomImage=()=>{const[e,t]=reactExports.useState(()=>randomImage());return reactExports.useEffect(()=>mr.fromInterval(6e4).connect(()=>t(randomImage())),[]),factory$1(Style,{children:`\n body {\n background-position: top calc(100vh - ${IMAGE_SIDE} - 24px) right 24px !important;\n background-size: ${IMAGE_SIDE}, auto, contain !important;\n background-image: url("${e}") !important;\n }\n `})},Loader=()=>factory$1(Box$1,{sx:{position:"fixed",top:0,left:0,right:0,bottom:0,height:"100vh",width:"100vw",display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,background:e=>e.palette.background.paper},children:factory$1(eS,{})}),Fragment2=()=>factory$1(Fragment,{}),useStyles$q=makeStyles()(e=>({switch:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)}})),handleInit=so(async()=>{await WS.waitForProvide(!0),await WS.prefetch(!0)}),handleLoadStart=()=>{ioc.layoutService.setAppbarLoader(!0)},handleLoadEnd=()=>{ioc.layoutService.setAppbarLoader(!1)},App=()=>{const{classes:e}=useStyles$q(),[t,n]=reactExports.useState(()=>getRouteItem()),[r,o]=reactExports.useState(()=>KS(routes$m,ioc.routerService.location.pathname)),[i,a]=reactExports.useState(ioc.routerService.location.pathname),[s,l]=reactExports.useState(ioc.layoutService.hasAppbarLoader),[c,u]=reactExports.useState(ioc.layoutService.hasModalLoader);return Xf(()=>ioc.routerService.reloadSubject.subscribe(()=>{queueMicrotask(()=>reactDomExports.flushSync(()=>{n(getRouteItem()),o(KS(routes$m,ioc.routerService.location.pathname)),a(ioc.routerService.location.pathname)}))})),Xf(()=>ioc.layoutService.appbarSubject.subscribe(()=>{l(ioc.layoutService.hasAppbarLoader)})),Xf(()=>ioc.layoutService.modalSubject.subscribe(()=>{u(ioc.layoutService.hasModalLoader)})),factory$1(Fragment,{children:[!!t&&factory$1(AppHeader,{pathname:i,routeItem:t,routeParams:r,loading:s}),factory$1(Gg,{className:e.switch,Loader:Fragment2,history:ioc.routerService,items:routes$m,fallback:ioc.errorService.handleGlobalError,onLoadStart:handleLoadStart,onLoadEnd:handleLoadEnd,onInit:handleInit}),c&&factory$1(Loader,{}),factory$1(BottomImage,{})]})},lightPrimary={main:"#3F51B5",light:"#4E65C9"},lightSecondary={main:"#2196F3"},lightError={main:"#ec4c47"},lightWarning={main:"#d9822b"},lightInfo={main:"#1070CA"},lightSuccess={main:"#27AB6E"},lightBackground={muiTab:"#6974b066",muiAppBar:"#6974B0"},lightText={primary:"#000000DE",secondary:"#00000099",disabled:"#cccccc"},BREAKPOINTS={xs:0,sm:800,md:1100,lg:1300,xl:1736},muiTheme=createTheme$1({breakpoints:{values:BREAKPOINTS},palette:{mode:"light",primary:{main:lightPrimary.main},secondary:{main:lightSecondary.main},warning:{main:lightWarning.main},info:{main:lightInfo.main},success:{main:lightSuccess.main},error:{main:lightError.main},text:{primary:lightText.primary,secondary:lightText.secondary,disabled:lightText.disabled},background:{default:"#E8E9ED !important",paper:"#fff"}},shape:{borderRadius:12},shadows:["none","0px 1px 2px rgba(0, 0, 0, 0.1)","0px 2px 4px rgba(0, 0, 0, 0.1)","0px 3px 6px rgba(0, 0, 0, 0.2)","0px 4px 8px rgba(0, 0, 0, 0.2)","0px 5px 10px rgba(0, 0, 0, 0.3)","0px 6px 12px rgba(0, 0, 0, 0.3)","0px 7px 14px rgba(0, 0, 0, 0.4)","0px 8px 16px rgba(0, 0, 0, 0.4)","0px 9px 18px rgba(0, 0, 0, 0.5)","0px 10px 20px rgba(0, 0, 0, 0.5)","0px 11px 22px rgba(0, 0, 0, 0.6)","0px 12px 24px rgba(0, 0, 0, 0.6)","0px 13px 26px rgba(0, 0, 0, 0.7)","0px 14px 28px rgba(0, 0, 0, 0.7)","0px 15px 30px rgba(0, 0, 0, 0.8)","0px 16px 32px rgba(0, 0, 0, 0.8)","0px 17px 34px rgba(0, 0, 0, 0.9)","0px 18px 36px rgba(0, 0, 0, 0.9)","0px 19px 38px rgba(0, 0, 0, 1)","0px 20px 40px rgba(0, 0, 0, 1)","0px 21px 42px rgba(0, 0, 0, 1)","0px 22px 44px rgba(0, 0, 0, 1)","0px 23px 46px rgba(0, 0, 0, 1)","0px 24px 48px rgba(0, 0, 0, 1)"],components:{MuiModal:{styleOverrides:{backdrop:{backgroundColor:"rgba(0, 0, 0, 0.5)",backdropFilter:"blur(4px)"}}},MuiPaper:{defaultProps:{elevation:3},styleOverrides:{root:{borderRadius:"12px",backgroundColor:"#ffffff",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1)"}}},MuiCard:{styleOverrides:{root:{overflow:"clip"}}},MuiAppBar:{styleOverrides:{root:{background:lightBackground.muiAppBar}}},MuiTab:{styleOverrides:{fullWidth:{background:lightBackground.muiTab,color:"white !important",fontWeight:"bold"}}},MuiIconButton:{styleOverrides:{root:{borderRadius:6,padding:8},sizeSmall:{padding:4}}},MuiButton:{styleOverrides:{contained:{background:lightPrimary.main,"&:hover":{background:lightPrimary.light}}}},MuiBadge:{styleOverrides:{badge:{background:"#2e41a9"}}},MuiSnackbar:{styleOverrides:{root:{boxShadow:"none",border:"unset","& > *":{color:"black !important"},"& > .MuiPaper-root":{border:"1px solid black",borderRadius:"12px",boxShadow:"0 0 5px 2px grey"}}}}}}),mantineTheme=createTheme({});function getNextIndex({direction:e,levelIndex:t,rowIndex:n,cellIndex:r,size:o}){switch(e){case"up":return 0===t&&0===n?null:0===n?{levelIndex:t-1,rowIndex:r<=o[t-1][o[t-1].length-1]-1?o[t-1].length-1:o[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===o[t].length-1||n===o[t].length-2&&r>=o[t][o[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return 0===t&&0===n&&0===r?null:0===n&&0===r?{levelIndex:t-1,rowIndex:o[t-1].length-1,cellIndex:o[t-1][o[t-1].length-1]-1}:0===r?{levelIndex:t,rowIndex:n-1,cellIndex:o[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===o[t].length-1&&r===o[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===o[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}function focusOnNextFocusableControl({controlsRef:e,direction:t,levelIndex:n,rowIndex:r,cellIndex:o,size:i}){var a,s,l;const c=getNextIndex({direction:t,size:i,rowIndex:r,cellIndex:o,levelIndex:n});if(!c)return;const u=null==(l=null==(s=null==(a=e.current)?void 0:a[c.levelIndex])?void 0:s[c.rowIndex])?void 0:l[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?focusOnNextFocusableControl({controlsRef:e,direction:t,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:i}):u.focus())}function getDirection(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}function getControlsSize(e){var t;return null==(t=e.current)?void 0:t.map(e=>e.map(e=>e.length))}function handleControlKeyDown({controlsRef:e,levelIndex:t,rowIndex:n,cellIndex:r,event:o}){const i=getDirection(o.key);if(i){o.preventDefault();focusOnNextFocusableControl({controlsRef:e,direction:i,levelIndex:t,rowIndex:n,cellIndex:r,size:getControlsSize(e)})}}function assignTime(e,t){if(!e||!t)return t;const n=e.getHours(),r=e.getMinutes(),o=e.getSeconds(),i=e.getMilliseconds(),a=new Date(t);return a.setHours(n),a.setMinutes(r),a.setSeconds(o),a.setMilliseconds(i),a}var timezone={exports:{}};timezone.exports=function(){var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(n,r,o){var i,a=function(e,n,r){void 0===r&&(r={});var o=new Date(e);return function(e,n){void 0===n&&(n={});var r=n.timeZoneName||"short",o=e+"|"+r,i=t[o];return i||(i=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:r}),t[o]=i),i}(n,r).formatToParts(o)},s=function(t,n){for(var r=a(t,n),i=[],s=0;s<r.length;s+=1){var l=r[s],c=l.type,u=l.value,d=e[c];d>=0&&(i[d]=parseInt(u,10))}var p=i[3],f=24===p?0:p,h=i[0]+"-"+i[1]+"-"+i[2]+" "+f+":"+i[4]+":"+i[5]+":000",A=+t;return(o.utc(h).valueOf()-(A-=A%1e3))/6e4},l=r.prototype;l.tz=function(e,t){void 0===e&&(e=i);var n,r=this.utcOffset(),a=this.toDate(),s=a.toLocaleString("en-US",{timeZone:e}),l=Math.round((a-new Date(s))/1e3/60),c=15*-Math.round(a.getTimezoneOffset()/15)-l;if(Number(c)){if(n=o(s,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(c,!0),t){var u=n.utcOffset();n=n.add(r-u,"minute")}}else n=this.utcOffset(0,t);return n.$x.$timezone=e,n},l.offsetName=function(e){var t=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return n&&n.value};var c=l.startOf;l.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return c.call(this,e,t);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(n,e,t).tz(this.$x.$timezone,!0)},o.tz=function(e,t,n){var r=n&&t,a=n||t||i,l=s(+o(),a);if("string"!=typeof e)return o(e).tz(a);var c=function(e,t,n){var r=e-60*t*1e3,o=s(r,n);if(t===o)return[r,t];var i=s(r-=60*(o-t)*1e3,n);return o===i?[r,o]:[e-60*Math.min(o,i)*1e3,Math.max(o,i)]}(o.utc(e,r).valueOf(),l,a),u=c[0],d=c[1],p=o(u).utcOffset(d);return p.$x.$timezone=a,p},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(e){i=e}}}();var timezoneExports=timezone.exports;const timezonePlugin=getDefaultExportFromCjs$1(timezoneExports);function getTimezoneOffset(e,t){return t?J$2(e).tz(t).utcOffset()+e.getTimezoneOffset():0}J$2.extend(utcPlugin),J$2.extend(timezonePlugin);const updateTimezone=(e,t,n)=>{if(!e)return null;if(!t)return e;let r=getTimezoneOffset(e,t);return"remove"===n&&(r*=-1),J$2(e).add(r,"minutes").toDate()};function shiftTimezone(e,t,n,r){return r||!t?t:Array.isArray(t)?t.map(t=>updateTimezone(t,n,e)):updateTimezone(t,n,e)}const DATES_PROVIDER_DEFAULT_SETTINGS={locale:"en",timezone:null,firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–",consistentWeeks:!1},DatesProviderContext=reactExports.createContext(DATES_PROVIDER_DEFAULT_SETTINGS);function useDatesContext(){const e=reactExports.useContext(DatesProviderContext),t=reactExports.useCallback(t=>t||e.locale,[e.locale]),n=reactExports.useCallback(t=>t||e.timezone||void 0,[e.timezone]),r=reactExports.useCallback(t=>"number"==typeof t?t:e.firstDayOfWeek,[e.firstDayOfWeek]),o=reactExports.useCallback(t=>Array.isArray(t)?t:e.weekendDays,[e.weekendDays]),i=reactExports.useCallback(t=>"string"==typeof t?t:e.labelSeparator,[e.labelSeparator]);return{...e,getLocale:t,getTimezone:n,getFirstDayOfWeek:r,getWeekendDays:o,getLabelSeparator:i}}function formatValue(e,t){if("range"===t&&Array.isArray(e)){const[t,n]=e;return t?n?`${t.toISOString()} – ${n.toISOString()}`:`${t.toISOString()} –`:""}return"multiple"===t&&Array.isArray(e)?e.map(e=>null==e?void 0:e.toISOString()).filter(Boolean).join(", "):!Array.isArray(e)&&e?e.toISOString():""}function HiddenDatesInput({value:e,type:t,name:n,form:r}){return factory$1("input",{type:"hidden",value:formatValue(e,t),name:n,form:r})}HiddenDatesInput.displayName="@mantine/dates/HiddenDatesInput";var classes$7={day:"m_396ce5cb"};const defaultProps$f={},varsResolver$3=createVarsResolver((e,{size:t})=>({day:{"--day-size":getSize(t,"day-size")}})),Day=factory((e,t)=>{const n=useProps("Day",defaultProps$f,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,date:c,disabled:u,__staticSelector:d,weekend:p,outside:f,selected:h,renderDay:A,inRange:m,firstInRange:g,lastInRange:y,hidden:v,static:b,highlightToday:x,...w}=n,C=useStyles$u({name:d||"Day",classes:classes$7,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver$3,rootSelector:"day"}),$=useDatesContext();return factory$1(UnstyledButton,{...C("day",{style:v?{display:"none"}:void 0}),component:b?"div":"button",ref:t,disabled:u,"data-today":J$2(c).isSame(shiftTimezone("add",new Date,$.getTimezone()),"day")||void 0,"data-hidden":v||void 0,"data-highlight-today":x||void 0,"data-disabled":u||void 0,"data-weekend":!u&&!f&&p||void 0,"data-outside":!u&&f||void 0,"data-selected":!u&&h||void 0,"data-in-range":m&&!u||void 0,"data-first-in-range":g&&!u||void 0,"data-last-in-range":y&&!u||void 0,"data-static":b||void 0,unstyled:s,...w,children:(null==A?void 0:A(c))||c.getDate()})});function getWeekdayNames({locale:e,format:t="dd",firstDayOfWeek:n=1}){const r=J$2().day(n),o=[];for(let i=0;i<7;i+=1)"string"==typeof t?o.push(J$2(r).add(i,"days").locale(e).format(t)):o.push(t(J$2(r).add(i,"days").toDate()));return o}Day.classes=classes$7,Day.displayName="@mantine/dates/Day";var classes$6={weekday:"m_18a3eca"};const defaultProps$e={},varsResolver$2=createVarsResolver((e,{size:t})=>({weekdaysRow:{"--wr-fz":getFontSize(t),"--wr-spacing":getSpacing(t)}})),WeekdaysRow=factory((e,t)=>{const n=useProps("WeekdaysRow",defaultProps$e,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,locale:c,firstDayOfWeek:u,weekdayFormat:d,cellComponent:p="th",__staticSelector:f,...h}=n,A=useStyles$u({name:f||"WeekdaysRow",classes:classes$6,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver$2,rootSelector:"weekdaysRow"}),m=useDatesContext(),g=getWeekdayNames({locale:m.getLocale(c),format:d,firstDayOfWeek:m.getFirstDayOfWeek(u)}).map((e,t)=>factory$1(p,{...A("weekday"),children:e}));return factory$1(Box,{component:"tr",ref:t,...A("weekdaysRow"),...h,children:g})});function getEndOfWeek(e,t=1){const n=new Date(e),r=0===t?6:t-1;for(;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function getStartOfWeek(e,t=1){const n=new Date(e);for(;n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function getMonthDays({month:e,firstDayOfWeek:t=1,consistentWeeks:n}){const r=e.getMonth(),o=new Date(e.getFullYear(),r,1),i=getEndOfWeek(new Date(e.getFullYear(),e.getMonth()+1,0),t),a=getStartOfWeek(o,t),s=[];for(;a<=i;){const e=[];for(let t=0;t<7;t+=1)e.push(new Date(a)),a.setDate(a.getDate()+1);s.push(e)}if(n&&s.length<6){const e=s[s.length-1],t=e[e.length-1],n=new Date(t);for(n.setDate(n.getDate()+1);s.length<6;){const e=[];for(let t=0;t<7;t+=1)e.push(new Date(n)),n.setDate(n.getDate()+1);s.push(e)}}return s}function isSameMonth(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function isAfterMinDate(e,t){return!(t instanceof Date)||J$2(e).isAfter(J$2(t).subtract(1,"day"),"day")}function isBeforeMaxDate(e,t){return!(t instanceof Date)||J$2(e).isBefore(J$2(t).add(1,"day"),"day")}function getDateInTabOrder(e,t,n,r,o,i,a){const s=e.flat().filter(e=>{var s;return isBeforeMaxDate(e,n)&&isAfterMinDate(e,t)&&!(null==o?void 0:o(e))&&!(null==(s=null==r?void 0:r(e))?void 0:s.disabled)&&(!i||isSameMonth(e,a))}),l=s.find(e=>{var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected});if(l)return l;const c=s.find(e=>J$2().isSame(e,"date"));return c||s[0]}WeekdaysRow.classes=classes$6,WeekdaysRow.displayName="@mantine/dates/WeekdaysRow";var classes$5={month:"m_cc9820d3",monthCell:"m_8f457cd5"};const defaultProps$d={withCellSpacing:!0},Month=factory((e,t)=>{const n=useProps("Month",defaultProps$d,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,locale:u,firstDayOfWeek:d,weekdayFormat:p,month:f,weekendDays:h,getDayProps:A,excludeDate:m,minDate:g,maxDate:y,renderDay:v,hideOutsideDates:b,hideWeekdays:x,getDayAriaLabel:w,static:C,__getDayRef:$,__onDayKeyDown:_,__onDayClick:S,__onDayMouseEnter:E,__preventFocus:k,__stopPropagation:P,withCellSpacing:B,size:T,highlightToday:I,...L}=n,M=useStyles$u({name:c||"Month",classes:classes$5,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"month"}),D=useDatesContext(),N=getMonthDays({month:f,firstDayOfWeek:D.getFirstDayOfWeek(d),consistentWeeks:D.consistentWeeks}),O=getDateInTabOrder(N,g,y,A,m,b,f),{resolvedClassNames:F,resolvedStyles:R}=useResolvedStylesApi({classNames:r,styles:a,props:n}),U=N.map((e,t)=>{const n=e.map((e,n)=>{const r=!isSameMonth(e,f),o=(null==w?void 0:w(e))||J$2(e).locale(u||D.locale).format("D MMMM YYYY"),i=null==A?void 0:A(e),a=J$2(e).isSame(O,"date");return factory$1("td",{...M("monthCell"),"data-with-spacing":B||void 0,children:factory$1(Day,{__staticSelector:c||"Month",classNames:F,styles:R,unstyled:s,"data-mantine-stop-propagation":P||void 0,highlightToday:I,renderDay:v,date:e,size:T,weekend:D.getWeekendDays(h).includes(e.getDay()),outside:r,hidden:!!b&&r,"aria-label":o,static:C,disabled:(null==m?void 0:m(e))||!isBeforeMaxDate(e,y)||!isAfterMinDate(e,g),ref:e=>null==$?void 0:$(t,n,e),...i,onKeyDown:r=>{var o;null==(o=null==i?void 0:i.onKeyDown)||o.call(i,r),null==_||_(r,{rowIndex:t,cellIndex:n,date:e})},onMouseEnter:t=>{var n;null==(n=null==i?void 0:i.onMouseEnter)||n.call(i,t),null==E||E(t,e)},onClick:t=>{var n;null==(n=null==i?void 0:i.onClick)||n.call(i,t),null==S||S(t,e)},onMouseDown:e=>{var t;null==(t=null==i?void 0:i.onMouseDown)||t.call(i,e),k&&e.preventDefault()},tabIndex:k||!a?-1:0})},e.toString())});return factory$1("tr",{...M("monthRow"),children:n})});return factory$1(Box,{component:"table",...M("month"),size:T,ref:t,...L,children:[!x&&factory$1("thead",{...M("monthThead"),children:factory$1(WeekdaysRow,{__staticSelector:c||"Month",locale:u,firstDayOfWeek:d,weekdayFormat:p,size:T,classNames:F,styles:R,unstyled:s})}),factory$1("tbody",{...M("monthTbody"),children:U})]})});Month.classes=classes$5,Month.displayName="@mantine/dates/Month";var classes$4={pickerControl:"m_dc6a3c71"};const defaultProps$c={},varsResolver$1=createVarsResolver((e,{size:t})=>({pickerControl:{"--dpc-fz":getFontSize(t),"--dpc-size":getSize(t,"dpc-size")}})),PickerControl=factory((e,t)=>{const n=useProps("PickerControl",defaultProps$c,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,firstInRange:c,lastInRange:u,inRange:d,__staticSelector:p,selected:f,disabled:h,...A}=n,m=useStyles$u({name:p||"PickerControl",classes:classes$4,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver$1,rootSelector:"pickerControl"});return factory$1(UnstyledButton,{...m("pickerControl"),ref:t,unstyled:s,"data-picker-control":!0,"data-selected":f&&!h||void 0,"data-disabled":h||void 0,"data-in-range":d&&!h&&!f||void 0,"data-first-in-range":c&&!h||void 0,"data-last-in-range":u&&!h||void 0,disabled:h,...A})});function isYearDisabled(e,t,n){return!(!t&&!n)&&(!(!t||!J$2(e).isBefore(t,"year"))||!(!n||!J$2(e).isAfter(n,"year")))}function getYearInTabOrder(e,t,n,r){const o=e.flat().filter(e=>{var o;return!isYearDisabled(e,t,n)&&!(null==(o=null==r?void 0:r(e))?void 0:o.disabled)}),i=o.find(e=>{var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected});if(i)return i;const a=o.find(e=>J$2().isSame(e,"year"));return a||o[0]}function getYearsData(e){const t=e.getFullYear(),n=t-t%10;let r=0;const o=[[],[],[],[]];for(let i=0;i<4;i+=1){const e=3===i?1:3;for(let t=0;t<e;t+=1)o[i].push(new Date(n+r,0)),r+=1}return o}PickerControl.classes=classes$4,PickerControl.displayName="@mantine/dates/PickerControl";var classes$3={yearsList:"m_9206547b",yearsListCell:"m_c5a19c7d"};const defaultProps$b={yearsListFormat:"YYYY",withCellSpacing:!0},YearsList=factory((e,t)=>{const n=useProps("YearsList",defaultProps$b,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,decade:c,yearsListFormat:u,locale:d,minDate:p,maxDate:f,getYearControlProps:h,__staticSelector:A,__getControlRef:m,__onControlKeyDown:g,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:w,size:C,...$}=n,_=useStyles$u({name:A||"YearsList",classes:classes$3,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"yearsList"}),S=useDatesContext(),E=getYearsData(c),k=getYearInTabOrder(E,p,f,h),P=E.map((e,t)=>{const n=e.map((e,n)=>{const r=null==h?void 0:h(e),o=J$2(e).isSame(k,"year");return factory$1("td",{..._("yearsListCell"),"data-with-spacing":w||void 0,children:factory$1(PickerControl,{..._("yearsListControl"),size:C,unstyled:s,"data-mantine-stop-propagation":x||void 0,disabled:isYearDisabled(e,p,f),ref:e=>null==m?void 0:m(t,n,e),...r,onKeyDown:o=>{var i;null==(i=null==r?void 0:r.onKeyDown)||i.call(r,o),null==g||g(o,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{var n;null==(n=null==r?void 0:r.onClick)||n.call(r,t),null==y||y(t,e)},onMouseEnter:t=>{var n;null==(n=null==r?void 0:r.onMouseEnter)||n.call(r,t),null==v||v(t,e)},onMouseDown:e=>{var t;null==(t=null==r?void 0:r.onMouseDown)||t.call(r,e),b&&e.preventDefault()},tabIndex:b||!o?-1:0,children:J$2(e).locale(S.getLocale(d)).format(u)})})});return factory$1("tr",{..._("yearsListRow"),children:n})});return factory$1(Box,{component:"table",ref:t,size:C,..._("yearsList"),...$,children:factory$1("tbody",{children:P})})});function isMonthDisabled(e,t,n){return!(!t&&!n)&&(!(!t||!J$2(e).isBefore(t,"month"))||!(!n||!J$2(e).isAfter(n,"month")))}function getMonthInTabOrder(e,t,n,r){const o=e.flat().filter(e=>{var o;return!isMonthDisabled(e,t,n)&&!(null==(o=null==r?void 0:r(e))?void 0:o.disabled)}),i=o.find(e=>{var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected});if(i)return i;const a=o.find(e=>J$2().isSame(e,"month"));return a||o[0]}function getMonthsData(e){const t=J$2(e).startOf("year").toDate(),n=[[],[],[],[]];let r=0;for(let o=0;o<4;o+=1)for(let e=0;e<3;e+=1)n[o].push(J$2(t).add(r,"months").toDate()),r+=1;return n}YearsList.classes=classes$3,YearsList.displayName="@mantine/dates/YearsList";var classes$2={monthsList:"m_2a6c32d",monthsListCell:"m_fe27622f"};const defaultProps$a={monthsListFormat:"MMM",withCellSpacing:!0},MonthsList=factory((e,t)=>{const n=useProps("MonthsList",defaultProps$a,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,year:u,monthsListFormat:d,locale:p,minDate:f,maxDate:h,getMonthControlProps:A,__getControlRef:m,__onControlKeyDown:g,__onControlClick:y,__onControlMouseEnter:v,__preventFocus:b,__stopPropagation:x,withCellSpacing:w,size:C,...$}=n,_=useStyles$u({name:c||"MonthsList",classes:classes$2,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"monthsList"}),S=useDatesContext(),E=getMonthsData(u),k=getMonthInTabOrder(E,f,h,A),P=E.map((e,t)=>{const n=e.map((e,n)=>{const r=null==A?void 0:A(e),o=J$2(e).isSame(k,"month");return factory$1("td",{..._("monthsListCell"),"data-with-spacing":w||void 0,children:factory$1(PickerControl,{..._("monthsListControl"),size:C,unstyled:s,__staticSelector:c||"MonthsList","data-mantine-stop-propagation":x||void 0,disabled:isMonthDisabled(e,f,h),ref:e=>null==m?void 0:m(t,n,e),...r,onKeyDown:o=>{var i;null==(i=null==r?void 0:r.onKeyDown)||i.call(r,o),null==g||g(o,{rowIndex:t,cellIndex:n,date:e})},onClick:t=>{var n;null==(n=null==r?void 0:r.onClick)||n.call(r,t),null==y||y(t,e)},onMouseEnter:t=>{var n;null==(n=null==r?void 0:r.onMouseEnter)||n.call(r,t),null==v||v(t,e)},onMouseDown:e=>{var t;null==(t=null==r?void 0:r.onMouseDown)||t.call(r,e),b&&e.preventDefault()},tabIndex:b||!o?-1:0,children:J$2(e).locale(S.getLocale(p)).format(d)})})});return factory$1("tr",{..._("monthsListRow"),children:n})});return factory$1(Box,{component:"table",ref:t,size:C,..._("monthsList"),...$,children:factory$1("tbody",{children:P})})});MonthsList.classes=classes$2,MonthsList.displayName="@mantine/dates/MonthsList";var classes$1={calendarHeader:"m_730a79ed",calendarHeaderLevel:"m_f6645d97",calendarHeaderControl:"m_2351eeb0",calendarHeaderControlIcon:"m_367dc749"};const defaultProps$9={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0},varsResolver=createVarsResolver((e,{size:t})=>({calendarHeader:{"--dch-control-size":getSize(t,"dch-control-size"),"--dch-fz":getFontSize(t)}})),CalendarHeader=factory((e,t)=>{const n=useProps("CalendarHeader",defaultProps$9,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,nextIcon:c,previousIcon:u,nextLabel:d,previousLabel:p,onNext:f,onPrevious:h,onLevelClick:A,label:m,nextDisabled:g,previousDisabled:y,hasNextLevel:v,levelControlAriaLabel:b,withNext:x,withPrevious:w,__staticSelector:C,__preventFocus:$,__stopPropagation:_,...S}=n,E=useStyles$u({name:C||"CalendarHeader",classes:classes$1,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,varsResolver:varsResolver,rootSelector:"calendarHeader"}),k=$?e=>e.preventDefault():void 0;return factory$1(Box,{...E("calendarHeader"),ref:t,...S,children:[w&&factory$1(UnstyledButton,{...E("calendarHeaderControl"),"data-direction":"previous","aria-label":p,onClick:h,unstyled:s,onMouseDown:k,disabled:y,"data-disabled":y||void 0,tabIndex:$||y?-1:0,"data-mantine-stop-propagation":_||void 0,children:u||factory$1(AccordionChevron,{...E("calendarHeaderControlIcon"),"data-direction":"previous",size:"45%"})}),factory$1(UnstyledButton,{component:v?"button":"div",...E("calendarHeaderLevel"),onClick:v?A:void 0,unstyled:s,onMouseDown:v?k:void 0,disabled:!v,"data-static":!v||void 0,"aria-label":b,tabIndex:$||!v?-1:0,"data-mantine-stop-propagation":_||void 0,children:m}),x&&factory$1(UnstyledButton,{...E("calendarHeaderControl"),"data-direction":"next","aria-label":d,onClick:f,unstyled:s,onMouseDown:k,disabled:g,"data-disabled":g||void 0,tabIndex:$||g?-1:0,"data-mantine-stop-propagation":_||void 0,children:c||factory$1(AccordionChevron,{...E("calendarHeaderControlIcon"),"data-direction":"next",size:"45%"})})]})});function getDecadeRange(e){const t=getYearsData(e);return[t[0][0],t[3][0]]}CalendarHeader.classes=classes$1,CalendarHeader.displayName="@mantine/dates/CalendarHeader";const defaultProps$8={decadeLabelFormat:"YYYY"},DecadeLevel=factory((e,t)=>{const n=useProps("DecadeLevel",defaultProps$8,e),{decade:r,locale:o,minDate:i,maxDate:a,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,withCellSpacing:f,__preventFocus:h,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:x,previousDisabled:w,levelControlAriaLabel:C,withNext:$,withPrevious:_,decadeLabelFormat:S,classNames:E,styles:k,unstyled:P,__staticSelector:B,__stopPropagation:T,size:I,...L}=n,M=useDatesContext(),[D,N]=getDecadeRange(r),O={__staticSelector:B||"DecadeLevel",classNames:E,styles:k,unstyled:P,size:I},F="boolean"==typeof x?x:!!a&&!J$2(N).endOf("year").isBefore(a),R="boolean"==typeof w?w:!!i&&!J$2(D).startOf("year").isAfter(i),U=(e,t)=>J$2(e).locale(o||M.locale).format(t);return factory$1(Box,{"data-decade-level":!0,size:I,ref:t,...L,children:[factory$1(CalendarHeader,{label:"function"==typeof S?S(D,N):`${U(D,S)} – ${U(N,S)}`,__preventFocus:h,__stopPropagation:T,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,nextDisabled:F,previousDisabled:R,hasNextLevel:!1,levelControlAriaLabel:C,withNext:$,withPrevious:_,...O}),factory$1(YearsList,{decade:r,locale:o,minDate:i,maxDate:a,yearsListFormat:s,getYearControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,__preventFocus:h,__stopPropagation:T,withCellSpacing:f,...O})]})});DecadeLevel.classes={...YearsList.classes,...CalendarHeader.classes},DecadeLevel.displayName="@mantine/dates/DecadeLevel";const defaultProps$7={yearLabelFormat:"YYYY"},YearLevel=factory((e,t)=>{const n=useProps("YearLevel",defaultProps$7,e),{year:r,locale:o,minDate:i,maxDate:a,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,withCellSpacing:f,__preventFocus:h,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:w,previousDisabled:C,hasNextLevel:$,levelControlAriaLabel:_,withNext:S,withPrevious:E,yearLabelFormat:k,__staticSelector:P,__stopPropagation:B,size:T,classNames:I,styles:L,unstyled:M,...D}=n,N=useDatesContext(),O={__staticSelector:P||"YearLevel",classNames:I,styles:L,unstyled:M,size:T},F="boolean"==typeof w?w:!!a&&!J$2(r).endOf("year").isBefore(a),R="boolean"==typeof C?C:!!i&&!J$2(r).startOf("year").isAfter(i);return factory$1(Box,{"data-year-level":!0,size:T,ref:t,...D,children:[factory$1(CalendarHeader,{label:"function"==typeof k?k(r):J$2(r).locale(o||N.locale).format(k),__preventFocus:h,__stopPropagation:B,nextIcon:A,previousIcon:m,nextLabel:g,previousLabel:y,onNext:v,onPrevious:b,onLevelClick:x,nextDisabled:F,previousDisabled:R,hasNextLevel:$,levelControlAriaLabel:_,withNext:S,withPrevious:E,...O}),factory$1(MonthsList,{year:r,locale:o,minDate:i,maxDate:a,monthsListFormat:s,getMonthControlProps:l,__getControlRef:c,__onControlKeyDown:u,__onControlClick:d,__onControlMouseEnter:p,__preventFocus:h,__stopPropagation:B,withCellSpacing:f,...O})]})});YearLevel.classes={...CalendarHeader.classes,...MonthsList.classes},YearLevel.displayName="@mantine/dates/YearLevel";const defaultProps$6={monthLabelFormat:"MMMM YYYY"},MonthLevel=factory((e,t)=>{const n=useProps("MonthLevel",defaultProps$6,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__getDayRef:m,__onDayKeyDown:g,__onDayClick:y,__onDayMouseEnter:v,withCellSpacing:b,highlightToday:x,__preventFocus:w,__stopPropagation:C,nextIcon:$,previousIcon:_,nextLabel:S,previousLabel:E,onNext:k,onPrevious:P,onLevelClick:B,nextDisabled:T,previousDisabled:I,hasNextLevel:L,levelControlAriaLabel:M,withNext:D,withPrevious:N,monthLabelFormat:O,classNames:F,styles:R,unstyled:U,__staticSelector:j,size:H,static:Q,...z}=n,V=useDatesContext(),W={__staticSelector:j||"MonthLevel",classNames:F,styles:R,unstyled:U,size:H},Y="boolean"==typeof T?T:!!d&&!J$2(r).endOf("month").isBefore(d),G="boolean"==typeof I?I:!!u&&!J$2(r).startOf("month").isAfter(u);return factory$1(Box,{"data-month-level":!0,size:H,ref:t,...z,children:[factory$1(CalendarHeader,{label:"function"==typeof O?O(r):J$2(r).locale(o||V.locale).format(O),__preventFocus:w,__stopPropagation:C,nextIcon:$,previousIcon:_,nextLabel:S,previousLabel:E,onNext:k,onPrevious:P,onLevelClick:B,nextDisabled:Y,previousDisabled:G,hasNextLevel:L,levelControlAriaLabel:M,withNext:D,withPrevious:N,...W}),factory$1(Month,{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__getDayRef:m,__onDayKeyDown:g,__onDayClick:y,__onDayMouseEnter:v,__preventFocus:w,__stopPropagation:C,static:Q,withCellSpacing:b,highlightToday:x,...W})]})});MonthLevel.classes={...Month.classes,...CalendarHeader.classes},MonthLevel.displayName="@mantine/dates/MonthLevel";var classes={levelsGroup:"m_30b26e33"};const defaultProps$5={},LevelsGroup=factory((e,t)=>{const n=useProps("LevelsGroup",defaultProps$5,e),{classNames:r,className:o,style:i,styles:a,unstyled:s,vars:l,__staticSelector:c,...u}=n,d=useStyles$u({name:c||"LevelsGroup",classes:classes,props:n,className:o,style:i,classNames:r,styles:a,unstyled:s,vars:l,rootSelector:"levelsGroup"});return factory$1(Box,{ref:t,...d("levelsGroup"),...u})});LevelsGroup.classes=classes,LevelsGroup.displayName="@mantine/dates/LevelsGroup";const defaultProps$4={numberOfColumns:1},DecadeLevelGroup=factory((e,t)=>{const n=useProps("DecadeLevelGroup",defaultProps$4,e),{decade:r,locale:o,minDate:i,maxDate:a,yearsListFormat:s,getYearControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:p,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,nextDisabled:v,previousDisabled:b,classNames:x,styles:w,unstyled:C,__staticSelector:$,__stopPropagation:_,numberOfColumns:S,levelControlAriaLabel:E,decadeLabelFormat:k,size:P,vars:B,...T}=n,I=reactExports.useRef([]),L=Array(S).fill(0).map((e,t)=>{const n=J$2(r).add(10*t,"years").toDate();return factory$1(DecadeLevel,{size:P,yearsListFormat:s,decade:n,withNext:t===S-1,withPrevious:0===t,decadeLabelFormat:k,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(e,n)=>handleControlKeyDown({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:I}),__getControlRef:(e,n,r)=>{Array.isArray(I.current[t])||(I.current[t]=[]),Array.isArray(I.current[t][e])||(I.current[t][e]=[]),I.current[t][e][n]=r},levelControlAriaLabel:"function"==typeof E?E(n):E,locale:o,minDate:i,maxDate:a,__preventFocus:p,__stopPropagation:_,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,nextDisabled:v,previousDisabled:b,getYearControlProps:l,__staticSelector:$||"DecadeLevelGroup",classNames:x,styles:w,unstyled:C,withCellSpacing:d})});return factory$1(LevelsGroup,{classNames:x,styles:w,__staticSelector:$||"DecadeLevelGroup",ref:t,size:P,unstyled:C,...T,children:L})});DecadeLevelGroup.classes={...LevelsGroup.classes,...DecadeLevel.classes},DecadeLevelGroup.displayName="@mantine/dates/DecadeLevelGroup";const defaultProps$3={numberOfColumns:1},YearLevelGroup=factory((e,t)=>{const n=useProps("YearLevelGroup",defaultProps$3,e),{year:r,locale:o,minDate:i,maxDate:a,monthsListFormat:s,getMonthControlProps:l,__onControlClick:c,__onControlMouseEnter:u,withCellSpacing:d,__preventFocus:p,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:w,classNames:C,styles:$,unstyled:_,__staticSelector:S,__stopPropagation:E,numberOfColumns:k,levelControlAriaLabel:P,yearLabelFormat:B,size:T,vars:I,...L}=n,M=reactExports.useRef([]),D=Array(k).fill(0).map((e,t)=>{const n=J$2(r).add(t,"years").toDate();return factory$1(YearLevel,{size:T,monthsListFormat:s,year:n,withNext:t===k-1,withPrevious:0===t,yearLabelFormat:B,__stopPropagation:E,__onControlClick:c,__onControlMouseEnter:u,__onControlKeyDown:(e,n)=>handleControlKeyDown({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:M}),__getControlRef:(e,n,r)=>{Array.isArray(M.current[t])||(M.current[t]=[]),Array.isArray(M.current[t][e])||(M.current[t][e]=[]),M.current[t][e][n]=r},levelControlAriaLabel:"function"==typeof P?P(n):P,locale:o,minDate:i,maxDate:a,__preventFocus:p,nextIcon:f,previousIcon:h,nextLabel:A,previousLabel:m,onNext:g,onPrevious:y,onLevelClick:v,nextDisabled:b,previousDisabled:x,hasNextLevel:w,getMonthControlProps:l,classNames:C,styles:$,unstyled:_,__staticSelector:S||"YearLevelGroup",withCellSpacing:d})});return factory$1(LevelsGroup,{classNames:C,styles:$,__staticSelector:S||"YearLevelGroup",ref:t,size:T,unstyled:_,...L,children:D})});YearLevelGroup.classes={...YearLevel.classes,...LevelsGroup.classes},YearLevelGroup.displayName="@mantine/dates/YearLevelGroup";const defaultProps$2={numberOfColumns:1},MonthLevelGroup=factory((e,t)=>{const n=useProps("MonthLevelGroup",defaultProps$2,e),{month:r,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__onDayClick:m,__onDayMouseEnter:g,withCellSpacing:y,highlightToday:v,__preventFocus:b,nextIcon:x,previousIcon:w,nextLabel:C,previousLabel:$,onNext:_,onPrevious:S,onLevelClick:E,nextDisabled:k,previousDisabled:P,hasNextLevel:B,classNames:T,styles:I,unstyled:L,numberOfColumns:M,levelControlAriaLabel:D,monthLabelFormat:N,__staticSelector:O,__stopPropagation:F,size:R,static:U,vars:j,...H}=n,Q=reactExports.useRef([]),z=Array(M).fill(0).map((e,t)=>{const n=J$2(r).add(t,"months").toDate();return factory$1(MonthLevel,{month:n,withNext:t===M-1,withPrevious:0===t,monthLabelFormat:N,__stopPropagation:F,__onDayClick:m,__onDayMouseEnter:g,__onDayKeyDown:(e,n)=>handleControlKeyDown({levelIndex:t,rowIndex:n.rowIndex,cellIndex:n.cellIndex,event:e,controlsRef:Q}),__getDayRef:(e,n,r)=>{Array.isArray(Q.current[t])||(Q.current[t]=[]),Array.isArray(Q.current[t][e])||(Q.current[t][e]=[]),Q.current[t][e][n]=r},levelControlAriaLabel:"function"==typeof D?D(n):D,locale:o,firstDayOfWeek:i,weekdayFormat:a,weekendDays:s,getDayProps:l,excludeDate:c,minDate:u,maxDate:d,renderDay:p,hideOutsideDates:f,hideWeekdays:h,getDayAriaLabel:A,__preventFocus:b,nextIcon:x,previousIcon:w,nextLabel:C,previousLabel:$,onNext:_,onPrevious:S,onLevelClick:E,nextDisabled:k,previousDisabled:P,hasNextLevel:B,classNames:T,styles:I,unstyled:L,__staticSelector:O||"MonthLevelGroup",size:R,static:U,withCellSpacing:y,highlightToday:v})});return factory$1(LevelsGroup,{classNames:T,styles:I,__staticSelector:O||"MonthLevelGroup",ref:t,size:R,...H,children:z})});MonthLevelGroup.classes={...LevelsGroup.classes,...MonthLevel.classes},MonthLevelGroup.displayName="@mantine/dates/MonthLevelGroup";const getEmptyValue=e=>"range"===e?[null,null]:"multiple"===e?[]:null;function useUncontrolledDates({type:e,value:t,defaultValue:n,onChange:r,applyTimezone:o=!0}){const i=reactExports.useRef(e),a=useDatesContext(),[s,l,c]=useUncontrolled({value:shiftTimezone("add",t,a.getTimezone(),!o),defaultValue:shiftTimezone("add",n,a.getTimezone(),!o),finalValue:getEmptyValue(e),onChange:e=>{null==r||r(shiftTimezone("remove",e,a.getTimezone(),!o))}});let u=s;return i.current!==e&&(i.current=e,void 0===t&&(u=void 0!==n?n:getEmptyValue(e),l(u))),[u,l,c]}function levelToNumber(e,t){return e?"month"===e?0:"year"===e?1:2:t||0}function levelNumberToLevel(e){return 0===e?"month":1===e?"year":"decade"}function clampLevel(e,t,n){return levelNumberToLevel(clamp$2(levelToNumber(e,0),levelToNumber(t,0),levelToNumber(n,2)))}const defaultProps$1={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Calendar=factory((e,t)=>{const n=useProps("Calendar",defaultProps$1,e),{vars:r,maxLevel:o,minLevel:i,defaultLevel:a,level:s,onLevelChange:l,date:c,defaultDate:u,onDateChange:d,numberOfColumns:p,columnsToScroll:f,ariaLabels:h,onYearSelect:A,onMonthSelect:m,onYearMouseEnter:g,onMonthMouseEnter:y,__updateDateOnYearSelect:v,__updateDateOnMonthSelect:b,firstDayOfWeek:x,weekdayFormat:w,weekendDays:C,getDayProps:$,excludeDate:_,renderDay:S,hideOutsideDates:E,hideWeekdays:k,getDayAriaLabel:P,monthLabelFormat:B,nextIcon:T,previousIcon:I,__onDayClick:L,__onDayMouseEnter:M,withCellSpacing:D,highlightToday:N,monthsListFormat:O,getMonthControlProps:F,yearLabelFormat:R,yearsListFormat:U,getYearControlProps:j,decadeLabelFormat:H,classNames:Q,styles:z,unstyled:V,minDate:W,maxDate:Y,locale:G,__staticSelector:K,size:q,__preventFocus:J,__stopPropagation:Z,onNextDecade:X,onPreviousDecade:ee,onNextYear:te,onPreviousYear:ne,onNextMonth:re,onPreviousMonth:oe,static:ie,__timezoneApplied:ae,...se}=n,{resolvedClassNames:le,resolvedStyles:ce}=useResolvedStylesApi({classNames:Q,styles:z,props:n}),[ue,de]=useUncontrolled({value:s?clampLevel(s,i,o):void 0,defaultValue:a?clampLevel(a,i,o):void 0,finalValue:clampLevel(void 0,i,o),onChange:l}),[pe,fe]=useUncontrolledDates({type:"default",value:c,defaultValue:u,onChange:d,applyTimezone:!ae}),he={__staticSelector:K||"Calendar",styles:ce,classNames:le,unstyled:V,size:q},Ae=useDatesContext(),me=f||p||1,ge=new Date,ye=pe||shiftTimezone("add",W&&W>ge?W:ge,Ae.getTimezone());return factory$1(Box,{ref:t,size:q,"data-calendar":!0,...se,children:["month"===ue&&factory$1(MonthLevelGroup,{month:ye,minDate:W,maxDate:Y,firstDayOfWeek:x,weekdayFormat:w,weekendDays:C,getDayProps:$,excludeDate:_,renderDay:S,hideOutsideDates:E,hideWeekdays:k,getDayAriaLabel:P,onNext:()=>{const e=J$2(ye).add(me,"month").toDate();null==re||re(e),fe(e)},onPrevious:()=>{const e=J$2(ye).subtract(me,"month").toDate();null==oe||oe(e),fe(e)},hasNextLevel:"month"!==o,onLevelClick:()=>de("year"),numberOfColumns:p,locale:G,levelControlAriaLabel:null==h?void 0:h.monthLevelControl,nextLabel:null==h?void 0:h.nextMonth,nextIcon:T,previousLabel:null==h?void 0:h.previousMonth,previousIcon:I,monthLabelFormat:B,__onDayClick:L,__onDayMouseEnter:M,__preventFocus:J,__stopPropagation:Z,static:ie,withCellSpacing:D,highlightToday:N,...he}),"year"===ue&&factory$1(YearLevelGroup,{year:ye,numberOfColumns:p,minDate:W,maxDate:Y,monthsListFormat:O,getMonthControlProps:F,locale:G,onNext:()=>{const e=J$2(ye).add(me,"year").toDate();null==te||te(e),fe(e)},onPrevious:()=>{const e=J$2(ye).subtract(me,"year").toDate();null==ne||ne(e),fe(e)},hasNextLevel:"month"!==o&&"year"!==o,onLevelClick:()=>de("decade"),levelControlAriaLabel:null==h?void 0:h.yearLevelControl,nextLabel:null==h?void 0:h.nextYear,nextIcon:T,previousLabel:null==h?void 0:h.previousYear,previousIcon:I,yearLabelFormat:R,__onControlMouseEnter:y,__onControlClick:(e,t)=>{b&&fe(t),de(clampLevel("month",i,o)),null==m||m(t)},__preventFocus:J,__stopPropagation:Z,withCellSpacing:D,...he}),"decade"===ue&&factory$1(DecadeLevelGroup,{decade:ye,minDate:W,maxDate:Y,yearsListFormat:U,getYearControlProps:j,locale:G,onNext:()=>{const e=J$2(ye).add(10*me,"year").toDate();null==X||X(e),fe(e)},onPrevious:()=>{const e=J$2(ye).subtract(10*me,"year").toDate();null==ee||ee(e),fe(e)},numberOfColumns:p,nextLabel:null==h?void 0:h.nextDecade,nextIcon:T,previousLabel:null==h?void 0:h.previousDecade,previousIcon:I,decadeLabelFormat:H,__onControlMouseEnter:g,__onControlClick:(e,t)=>{v&&fe(t),de(clampLevel("year",i,o)),null==A||A(t)},__preventFocus:J,__stopPropagation:Z,withCellSpacing:D,...he})]})});function pickCalendarProps(e){const{maxLevel:t,minLevel:n,defaultLevel:r,level:o,onLevelChange:i,nextIcon:a,previousIcon:s,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:p,ariaLabels:f,onYearSelect:h,onMonthSelect:A,onYearMouseEnter:m,onMonthMouseEnter:g,onNextMonth:y,onPreviousMonth:v,onNextYear:b,onPreviousYear:x,onNextDecade:w,onPreviousDecade:C,withCellSpacing:$,highlightToday:_,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:E,firstDayOfWeek:k,weekdayFormat:P,weekendDays:B,getDayProps:T,excludeDate:I,renderDay:L,hideOutsideDates:M,hideWeekdays:D,getDayAriaLabel:N,monthLabelFormat:O,monthsListFormat:F,getMonthControlProps:R,yearLabelFormat:U,yearsListFormat:j,getYearControlProps:H,decadeLabelFormat:Q,allowSingleDateInRange:z,allowDeselect:V,minDate:W,maxDate:Y,locale:G,...K}=e;return{calendarProps:{maxLevel:t,minLevel:n,defaultLevel:r,level:o,onLevelChange:i,nextIcon:a,previousIcon:s,date:l,defaultDate:c,onDateChange:u,numberOfColumns:d,columnsToScroll:p,ariaLabels:f,onYearSelect:h,onMonthSelect:A,onYearMouseEnter:m,onMonthMouseEnter:g,onNextMonth:y,onPreviousMonth:v,onNextYear:b,onPreviousYear:x,onNextDecade:w,onPreviousDecade:C,withCellSpacing:$,highlightToday:_,__updateDateOnYearSelect:S,__updateDateOnMonthSelect:E,firstDayOfWeek:k,weekdayFormat:P,weekendDays:B,getDayProps:T,excludeDate:I,renderDay:L,hideOutsideDates:M,hideWeekdays:D,getDayAriaLabel:N,monthLabelFormat:O,monthsListFormat:F,getMonthControlProps:R,yearLabelFormat:U,yearsListFormat:j,getYearControlProps:H,decadeLabelFormat:Q,allowSingleDateInRange:z,allowDeselect:V,minDate:W,maxDate:Y,locale:G},others:K}}function dateStringParser(e,t){if(null===e)return null;const n=shiftTimezone("add",new Date(e),t);return Number.isNaN(n.getTime())||!e?null:n}function isDateValid({date:e,maxDate:t,minDate:n}){return null!=e&&(!Number.isNaN(e.getTime())&&((!t||!J$2(e).isAfter(t,"date"))&&(!n||!J$2(e).isBefore(n,"date"))))}Calendar.classes={...DecadeLevelGroup.classes,...YearLevelGroup.classes,...MonthLevelGroup.classes},Calendar.displayName="@mantine/dates/Calendar";const defaultProps={valueFormat:"MMMM D, YYYY",fixOnBlur:!0,preserveTime:!0},DateInput=factory((e,t)=>{const n=useInputProps("DateInput",defaultProps,e),{inputProps:r,wrapperProps:o,value:i,defaultValue:a,onChange:s,clearable:l,clearButtonProps:c,popoverProps:u,getDayProps:d,locale:p,valueFormat:f,dateParser:h,minDate:A,maxDate:m,fixOnBlur:g,onFocus:y,onBlur:v,onClick:b,readOnly:x,name:w,form:C,rightSection:$,unstyled:_,classNames:S,styles:E,allowDeselect:k,preserveTime:P,date:B,defaultDate:T,onDateChange:I,...L}=n,[M,D]=reactExports.useState(!1),{calendarProps:N,others:O}=pickCalendarProps(L),F=useDatesContext(),R=h||(e=>{const t=J$2(e,f,F.getLocale(p)).toDate();return Number.isNaN(t.getTime())?dateStringParser(e,F.getTimezone()):t}),U=void 0!==k?k:l,j=e=>e?J$2(e).locale(F.getLocale(p)).format(f):"",[H,Q,z]=useUncontrolledDates({type:"default",value:i,defaultValue:a,onChange:s}),[V,W]=useUncontrolledDates({type:"default",value:B,defaultValue:a||T,onChange:I});reactExports.useEffect(()=>{z&&W(i)},[z,i]);const[Y,G]=reactExports.useState(j(H));reactExports.useEffect(()=>{G(j(H))},[F.getLocale(p)]);const K=$||(l&&H&&!x?factory$1(CloseButton,{variant:"transparent",onMouseDown:e=>e.preventDefault(),tabIndex:-1,onClick:()=>{Q(null),!z&&G(""),D(!1)},unstyled:_,size:r.size||"sm",...c}):null);return useDidUpdate(()=>{void 0!==H&&!M&&G(j(H))},[H]),factory$1(Fragment,{children:[factory$1(Input$5.Wrapper,{...o,__staticSelector:"DateInput",children:factory$1(Popover,{opened:M,trapFocus:!1,position:"bottom-start",disabled:x,withRoles:!1,unstyled:_,...u,children:[factory$1(Popover.Target,{children:factory$1(Input$5,{"data-dates-input":!0,"data-read-only":x||void 0,autoComplete:"off",ref:t,value:Y,onChange:e=>{const t=e.currentTarget.value;if(G(t),D(!0),""===t.trim()&&l)Q(null);else{const e=R(t);isDateValid({date:e,minDate:A,maxDate:m})&&(Q(e),W(e))}},onBlur:e=>{null==v||v(e),D(!1),g&&G(j(H))},onFocus:e=>{null==y||y(e),D(!0)},onClick:e=>{null==b||b(e),D(!0)},readOnly:x,rightSection:K,...r,...O,__staticSelector:"DateInput"})}),factory$1(Popover.Dropdown,{onMouseDown:e=>e.preventDefault(),"data-dates-dropdown":!0,children:factory$1(Calendar,{__staticSelector:"DateInput",__timezoneApplied:!0,...N,classNames:S,styles:E,unstyled:_,__preventFocus:!0,minDate:A,maxDate:m,locale:p,getDayProps:e=>({...null==d?void 0:d(e),selected:J$2(H).isSame(e,"day"),onClick:()=>{const t=P?assignTime(H,e):e,n=l&&U&&J$2(H).isSame(e,"day")?null:t;Q(n),!z&&G(j(n)),D(!1)}}),size:r.size,date:V,onDateChange:W})})]})}),factory$1(HiddenDatesInput,{name:w,form:C,value:H,type:"default"})]})});DateInput.classes={...Input$5.classes,...Calendar.classes},DateInput.displayName="@mantine/dates/DateInput";
1540
1540
  /*! *****************************************************************************
1541
1541
  Copyright (c) Microsoft Corporation.
1542
1542
 
@@ -1569,7 +1569,7 @@ read:function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?o-1:0,p=n?
1569
1569
  */
1570
1570
  function isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function isPlainObject$1(e){var t,n;return!1!==isObject(e)&&(void 0===(t=e.constructor)||!1!==isObject(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}Object.defineProperty(isPlainObject$2,"__esModule",{value:!0}),isPlainObject$2.isPlainObject=isPlainObject$1;var isMergeableObject=function(e){return isNonNullObject(e)&&!isSpecial(e)};function isNonNullObject(e){return!!e&&"object"==typeof e}function isSpecial(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||isReactElement(e)}var canUseSymbol="function"==typeof Symbol&&Symbol.for,REACT_ELEMENT_TYPE=canUseSymbol?Symbol.for("react.element"):60103;function isReactElement(e){return e.$$typeof===REACT_ELEMENT_TYPE}function emptyTarget(e){return Array.isArray(e)?[]:{}}function cloneUnlessOtherwiseSpecified(e,t){return!1!==t.clone&&t.isMergeableObject(e)?deepmerge$1(emptyTarget(e),e,t):e}function defaultArrayMerge(e,t,n){return e.concat(t).map(function(e){return cloneUnlessOtherwiseSpecified(e,n)})}function getMergeFunction(e,t){if(!t.customMerge)return deepmerge$1;var n=t.customMerge(e);return"function"==typeof n?n:deepmerge$1}function getEnumerableOwnPropertySymbols(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function getKeys(e){return Object.keys(e).concat(getEnumerableOwnPropertySymbols(e))}function propertyIsOnObject(e,t){try{return t in e}catch(n){return!1}}function propertyIsUnsafe(e,t){return propertyIsOnObject(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function mergeObject(e,t,n){var r={};return n.isMergeableObject(e)&&getKeys(e).forEach(function(t){r[t]=cloneUnlessOtherwiseSpecified(e[t],n)}),getKeys(t).forEach(function(o){propertyIsUnsafe(e,o)||(propertyIsOnObject(e,o)&&n.isMergeableObject(t[o])?r[o]=getMergeFunction(o,n)(e[o],t[o],n):r[o]=cloneUnlessOtherwiseSpecified(t[o],n))}),r}function deepmerge$1(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||defaultArrayMerge,n.isMergeableObject=n.isMergeableObject||isMergeableObject,n.cloneUnlessOtherwiseSpecified=cloneUnlessOtherwiseSpecified;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):mergeObject(e,t,n):cloneUnlessOtherwiseSpecified(t,n)}deepmerge$1.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return deepmerge$1(e,n,t)},{})};var deepmerge_1=deepmerge$1,cjs=deepmerge_1,parseSrcset$1={exports:{}};!function(e){!function(t,n){e.exports?e.exports=n():t.parseSrcset=n()}(commonjsGlobal,function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function n(t){var n,r=t.exec(e.substring(A));if(r)return n=r[0],A+=n.length,n}for(var r,o,i,a,s,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,p=/[,]+$/,f=/^\d+$/,h=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,A=0,m=[];;){if(n(u),A>=l)return m;r=n(d),o=[],","===r.slice(-1)?(r=r.replace(p,""),y()):g()}function g(){for(n(c),i="",a="in descriptor";;){if(s=e.charAt(A),"in descriptor"===a)if(t(s))i&&(o.push(i),i="",a="after descriptor");else{if(","===s)return A+=1,i&&o.push(i),void y();if("("===s)i+=s,a="in parens";else{if(""===s)return i&&o.push(i),void y();i+=s}}else if("in parens"===a)if(")"===s)i+=s,a="in descriptor";else{if(""===s)return o.push(i),void y();i+=s}else if("after descriptor"===a)if(t(s));else{if(""===s)return void y();a="in descriptor",A-=1}A+=1}}function y(){var t,n,i,a,s,l,c,u,d,p=!1,A={};for(a=0;a<o.length;a++)l=(s=o[a])[s.length-1],c=s.substring(0,s.length-1),u=parseInt(c,10),d=parseFloat(c),f.test(c)&&"w"===l?((t||n)&&(p=!0),0===u?p=!0:t=u):h.test(c)&&"x"===l?((t||n||i)&&(p=!0),d<0?p=!0:n=d):f.test(c)&&"h"===l?((i||n)&&(p=!0),0===u?p=!0:i=u):p=!0;p?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+s+"'."):(A.url=r,t&&(A.w=t),n&&(A.d=n),i&&(A.h=i),m.push(A))}}})}(parseSrcset$1);var parseSrcsetExports=parseSrcset$1.exports,picocolors_browser={exports:{}},x$1=String,create=function(){return{isColorSupported:!1,reset:x$1,bold:x$1,dim:x$1,italic:x$1,underline:x$1,inverse:x$1,hidden:x$1,strikethrough:x$1,black:x$1,red:x$1,green:x$1,yellow:x$1,blue:x$1,magenta:x$1,cyan:x$1,white:x$1,gray:x$1,bgBlack:x$1,bgRed:x$1,bgGreen:x$1,bgYellow:x$1,bgBlue:x$1,bgMagenta:x$1,bgCyan:x$1,bgWhite:x$1,blackBright:x$1,redBright:x$1,greenBright:x$1,yellowBright:x$1,blueBright:x$1,magentaBright:x$1,cyanBright:x$1,whiteBright:x$1,bgBlackBright:x$1,bgRedBright:x$1,bgGreenBright:x$1,bgYellowBright:x$1,bgBlueBright:x$1,bgMagentaBright:x$1,bgCyanBright:x$1,bgWhiteBright:x$1}};picocolors_browser.exports=create(),picocolors_browser.exports.createColors=create;var picocolors_browserExports=picocolors_browser.exports;const __viteBrowserExternal={},__viteBrowserExternal$1=Object.freeze(Object.defineProperty({__proto__:null,default:__viteBrowserExternal},Symbol.toStringTag,{value:"Module"})),require$$1$1=getAugmentedNamespace(__viteBrowserExternal$1);let pico=picocolors_browserExports,terminalHighlight$1=require$$1$1,CssSyntaxError$3=class e extends Error{constructor(t,n,r,o,i,a){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),a&&(this.plugin=a),void 0!==n&&void 0!==r&&("number"==typeof n?(this.line=n,this.column=r):(this.line=n.line,this.column=n.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){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}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=pico.isColorSupported);let n=e=>e,r=e=>e,o=e=>e;if(e){let{bold:e,gray:t,red:i}=pico.createColors(!0);r=t=>e(i(t)),n=e=>t(e),terminalHighlight$1&&(o=e=>terminalHighlight$1(e))}let i=t.split(/\r?\n/),a=Math.max(this.line-3,0),s=Math.min(this.line+2,i.length),l=String(s).length;return i.slice(a,s).map((e,t)=>{let i=a+1+t,s=" "+(" "+i).slice(-l)+" | ";if(i===this.line){if(e.length>160){let t=20,i=Math.max(0,this.column-t),a=Math.max(this.column+t,this.endColumn+t),l=e.slice(i,a),c=n(s.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return r(">")+n(s)+o(l)+"\n "+c+r("^")}let t=n(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(s)+o(e)+"\n "+t+r("^")}return" "+n(s)+o(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var cssSyntaxError=CssSyntaxError$3;CssSyntaxError$3.default=CssSyntaxError$3;const DEFAULT_RAW={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}let Stringifier$2=class{constructor(e){this.builder=e}atrule(e,t){let 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{let o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}beforeAfter(e,t){let 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");let r=e.parent,o=0;for(;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)n+=t}return n}block(e,t){let 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")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let n=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}comment(e){let t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}decl(e,t){let 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)}document(e){this.body(e)}raw(e,t,n){let r;if(n||(n=t),t&&(r=e.raws[t],void 0!==r))return r;let o=e.parent;if("before"===n){if(!o||"root"===o.type&&o.first===e)return"";if(o&&"document"===o.type)return""}if(!o)return DEFAULT_RAW[n];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let o="raw"+capitalize(n);this[o]?r=this[o](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}return void 0===r&&(r=DEFAULT_RAW[n]),i.rawCache[n]=r,r}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let n;return e.walkComments(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(e,t){let n;return e.walkDecls(e=>{if(void 0!==e.raws.before)return n=e.raws.before,n.includes("\n")&&(n=n.replace(/[^\n]+$/,"")),!1}),void 0===n?n=this.raw(t,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(n=>{if(n.nodes&&(n.parent!==e||e.first!==n)&&void 0!==n.raws.before)return t=n.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(n=>{let r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==n.raws.before){let e=n.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(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)}};var stringifier=Stringifier$2;Stringifier$2.default=Stringifier$2;let Stringifier$1=stringifier;function stringify$6(e,t){new Stringifier$1(t).stringify(e)}var stringify_1$1=stringify$6;stringify$6.default=stringify$6;var symbols={};symbols.isClean=Symbol("isClean"),symbols.my=Symbol("my");let CssSyntaxError$2=cssSyntaxError,Stringifier=stringifier,stringify$5=stringify_1$1,{isClean:isClean$2,my:my$2}=symbols;function cloneNode(e,t){let n=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let o=e[r],i=typeof o;"parent"===r&&"object"===i?t&&(n[r]=t):"source"===r?n[r]=o:Array.isArray(o)?n[r]=o.map(e=>cloneNode(e,n)):("object"===i&&null!==o&&(o=cloneNode(o)),n[r]=o)}return n}function sourceOffset(e,t){if(t&&void 0!==t.offset)return t.offset;let n=1,r=1,o=0;for(let i=0;i<e.length;i++){if(r===t.line&&n===t.column){o=i;break}"\n"===e[i]?(n=1,r+=1):n+=1}return o}let Node$5=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[isClean$2]=!1,this[my$2]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let n of e[t])"function"==typeof n.clone?this.append(n.clone()):this.append(n)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=cloneNode(this);for(let n in e)t[n]=e[n];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:n,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:n.column,line:n.line},t)}return new CssSyntaxError$2(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markClean(){this[isClean$2]=!0}markDirty(){if(this[isClean$2]){this[isClean$2]=!1;let e=this;for(;e=e.parent;)e[isClean$2]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){let n="document"in this.source.input?this.source.input.document:this.source.input.css,r=n.slice(sourceOffset(n,this.source.start),sourceOffset(n,this.source.end)).indexOf(e.word);-1!==r&&(t=this.positionInside(r))}return t}positionInside(e){let t=this.source.start.column,n=this.source.start.line,r="document"in this.source.input?this.source.input.document:this.source.input.css,o=sourceOffset(r,this.source.start),i=o+e;for(let a=o;a<i;a++)"\n"===r[a]?(t=1,n+=1):t+=1;return{column:t,line:n,offset:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css,n={column:this.source.start.column,line:this.source.start.line,offset:sourceOffset(t,this.source.start)},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:sourceOffset(t,this.source.end)+1}:{column:n.column+1,line:n.line,offset:n.offset+1};if(e.word){let o=t.slice(sourceOffset(t,this.source.start),sourceOffset(t,this.source.end)).indexOf(e.word);-1!==o&&(n=this.positionInside(o),r=this.positionInside(o+e.word.length))}else e.start?n={column:e.start.column,line:e.start.line,offset:sourceOffset(t,e.start)}:e.index&&(n=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line,offset:sourceOffset(t,e.end)}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<n.line||r.line===n.line&&r.column<=n.column)&&(r={column:n.column+1,line:n.line,offset:n.offset+1}),{end:r,start:n}}raw(e,t){return(new Stringifier).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,n=!1;for(let r of e)r===this?n=!0:n?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);n||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let n={},r=null==t;t=t||new Map;let o=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))n[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)n[i]=e.toJSON(null,t);else if("source"===i){if(null==e)continue;let r=t.get(e.input);null==r&&(r=o,t.set(e.input,o),o++),n[i]={end:e.end,inputId:r,start:e.start}}else n[i]=e}return r&&(n.inputs=[...t.keys()].map(e=>e.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=stringify$5){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,n={}){let r={node:this};for(let o in n)r[o]=n[o];return e.warn(t,r)}};var node=Node$5;Node$5.default=Node$5;let Node$4=node,Comment$4=class extends Node$4{constructor(e){super(e),this.type="comment"}};var comment=Comment$4;Comment$4.default=Comment$4;let Node$3=node,Declaration$4=class extends Node$3{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};var declaration=Declaration$4;Declaration$4.default=Declaration$4;let Comment$3=comment,Declaration$3=declaration,Node$2=node,{isClean:isClean$1,my:my$1}=symbols,AtRule$4,parse$7,Root$6,Rule$4;function cleanSource(e){return e.map(e=>(e.nodes&&(e.nodes=cleanSource(e.nodes)),delete e.source,e))}function markTreeDirty(e){if(e[isClean$1]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)markTreeDirty(t)}let Container$7=class e extends Node$2{get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,n,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],n=e(this.proxyOf.nodes[t],t),!1!==n);)this.indexes[r]+=1;return delete this.indexes[r],n}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...n)=>e[t](...n.map(e=>"function"==typeof e?(t,n)=>e(t.toProxy(),n):e)):"every"===t||"some"===t?n=>e[t]((e,...t)=>n(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,n)=>(e[t]===n||(e[t]=n,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let n,r=this.index(e),o=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of o)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)n=this.indexes[i],r<n&&(this.indexes[i]=n+o.length);return this.markDirty(),this}insertBefore(e,t){let n,r=this.index(e),o=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],o).reverse();r=this.index(e);for(let a of i)this.proxyOf.nodes.splice(r,0,a);for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}normalize(t,n){if("string"==typeof t)t=cleanSource(parse$7(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Declaration$3(t)]}else if(t.selector||t.selectors)t=[new Rule$4(t)];else if(t.name)t=[new AtRule$4(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Comment$3(t)]}let r=t.map(t=>(t[my$1]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[isClean$1]&&markTreeDirty(t),t.raws||(t.raws={}),void 0===t.raws.before&&n&&void 0!==n.raws.before&&(t.raws.before=n.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t));return r}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this.markDirty(),this}replaceValues(e,t,n){return n||(n=t,t={}),this.walkDecls(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}some(e){return this.nodes.some(e)}walk(e){return this.each((t,n)=>{let r;try{r=e(t,n)}catch(e2){throw t.addToError(e2)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk((n,r)=>{if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("atrule"===e.type)return t(e,n)}))}walkComments(e){return this.walk((t,n)=>{if("comment"===t.type)return e(t,n)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk((n,r)=>{if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("decl"===e.type)return t(e,n)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((n,r)=>{if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk((n,r)=>{if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk((e,n)=>{if("rule"===e.type)return t(e,n)}))}};Container$7.registerParse=e=>{parse$7=e},Container$7.registerRule=e=>{Rule$4=e},Container$7.registerAtRule=e=>{AtRule$4=e},Container$7.registerRoot=e=>{Root$6=e};var container$1=Container$7;Container$7.default=Container$7,Container$7.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,AtRule$4.prototype):"rule"===e.type?Object.setPrototypeOf(e,Rule$4.prototype):"decl"===e.type?Object.setPrototypeOf(e,Declaration$3.prototype):"comment"===e.type?Object.setPrototypeOf(e,Comment$3.prototype):"root"===e.type&&Object.setPrototypeOf(e,Root$6.prototype),e[my$1]=!0,e.nodes&&e.nodes.forEach(e=>{Container$7.rebuild(e)})};let Container$6=container$1,AtRule$3=class extends Container$6{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var atRule=AtRule$3;AtRule$3.default=AtRule$3,Container$6.registerAtRule(AtRule$3);let Container$5=container$1,LazyResult$4,Processor$3,Document$3=class extends Container$5{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new LazyResult$4(new Processor$3,this,e).stringify()}};Document$3.registerLazyResult=e=>{LazyResult$4=e},Document$3.registerProcessor=e=>{Processor$3=e};var document$1=Document$3;Document$3.default=Document$3;let urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",nanoid$1=(e=21)=>{let t="",n=0|e;for(;n--;)t+=urlAlphabet[64*Math.random()|0];return t};var nonSecure={nanoid:nanoid$1};function assertPath(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function normalizeStringPosix(e,t){for(var n,r="",o=0,i=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(i===s-1||1===a);else if(i!==s-1&&2===a){if(r.length<2||2!==o||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var l=r.lastIndexOf("/");if(l!==r.length-1){-1===l?(r="",o=0):o=(r=r.slice(0,l)).length-1-r.lastIndexOf("/"),i=s,a=0;continue}}else if(2===r.length||1===r.length){r="",o=0,i=s,a=0;continue}t&&(r.length>0?r+="/..":r="..",o=2)}else r.length>0?r+="/"+e.slice(i+1,s):r=e.slice(i+1,s),o=s-i-1;i=s,a=0}else 46===n&&-1!==a?++a:a=-1}return r}function _format(e,t){var n=t.dir||t.root,r=t.base||(t.name||"")+(t.ext||"");return n?n===t.root?n+r:n+e+r:r}var posix={resolve:function(){for(var e,t="",n=!1,r=arguments.length-1;r>=-1&&!n;r--){var o;r>=0?o=arguments[r]:(void 0===e&&(e=process$1.cwd()),o=e),assertPath(o),0!==o.length&&(t=o+"/"+t,n=47===o.charCodeAt(0))}return t=normalizeStringPosix(t,!n),n?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(assertPath(e),0===e.length)return".";var t=47===e.charCodeAt(0),n=47===e.charCodeAt(e.length-1);return 0!==(e=normalizeStringPosix(e,!t)).length||t||(e="."),e.length>0&&n&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return assertPath(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var n=arguments[t];assertPath(n),n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":posix.normalize(e)},relative:function(e,t){if(assertPath(e),assertPath(t),e===t)return"";if((e=posix.resolve(e))===(t=posix.resolve(t)))return"";for(var n=1;n<e.length&&47===e.charCodeAt(n);++n);for(var r=e.length,o=r-n,i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length-i,s=o<a?o:a,l=-1,c=0;c<=s;++c){if(c===s){if(a>s){if(47===t.charCodeAt(i+c))return t.slice(i+c+1);if(0===c)return t.slice(i+c)}else o>s&&(47===e.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=e.charCodeAt(n+c);if(u!==t.charCodeAt(i+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=r;++c)c!==r&&47!==e.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(i+l):(i+=l,47===t.charCodeAt(i)&&++i,t.slice(i))},_makeLong:function(e){return e},dirname:function(e){if(assertPath(e),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,o=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!o){r=i;break}}else o=!1;return-1===r?n?"/":".":n&&1===r?"//":e.slice(0,r)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');assertPath(e);var n,r=0,o=-1,i=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var a=t.length-1,s=-1;for(n=e.length-1;n>=0;--n){var l=e.charCodeAt(n);if(47===l){if(!i){r=n+1;break}}else-1===s&&(i=!1,s=n+1),a>=0&&(l===t.charCodeAt(a)?-1===--a&&(o=n):(a=-1,o=s))}return r===o?o=s:-1===o&&(o=e.length),e.slice(r,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!i){r=n+1;break}}else-1===o&&(i=!1,o=n+1);return-1===o?"":e.slice(r,o)},extname:function(e){assertPath(e);for(var t=-1,n=0,r=-1,o=!0,i=0,a=e.length-1;a>=0;--a){var s=e.charCodeAt(a);if(47!==s)-1===r&&(o=!1,r=a+1),46===s?-1===t?t=a:1!==i&&(i=1):-1!==t&&(i=-1);else if(!o){n=a+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return _format("/",e)},parse:function(e){assertPath(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var n,r=e.charCodeAt(0),o=47===r;o?(t.root="/",n=1):n=0;for(var i=-1,a=0,s=-1,l=!0,c=e.length-1,u=0;c>=n;--c)if(47!==(r=e.charCodeAt(c)))-1===s&&(l=!1,s=c+1),46===r?-1===i?i=c:1!==u&&(u=1):-1!==i&&(u=-1);else if(!l){a=c+1;break}return-1===i||-1===s||0===u||1===u&&i===s-1&&i===a+1?-1!==s&&(t.base=t.name=0===a&&o?e.slice(1,s):e.slice(a,s)):(0===a&&o?(t.name=e.slice(1,i),t.base=e.slice(1,s)):(t.name=e.slice(a,i),t.base=e.slice(a,s)),t.ext=e.slice(i,s)),a>0?t.dir=e.slice(0,a-1):o&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};posix.posix=posix;var pathBrowserify=posix,punycode$1={exports:{}};
1571
1571
  /*! https://mths.be/punycode v1.4.1 by @mathias */
1572
- punycode$1.exports,function(e,t){!function(n){var r=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,i="object"==typeof commonjsGlobal&&commonjsGlobal;i.global!==i&&i.window!==i&&i.self!==i||(n=i);var a,s,l=2147483647,c=36,u=/^xn--/,d=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,A=String.fromCharCode;function m(e){throw new RangeError(f[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(p,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function b(e){return g(e,function(e){var t="";return e>65535&&(t+=A((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function x(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=c)e=h(e/35);return h(r+36*e/(e+38))}function $(e){var t,n,r,o,i,a,s,u,d,p,f=[],A=e.length,g=0,y=128,v=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),f.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<A;){for(i=g,a=1,s=c;o>=A&&m("invalid-input"),((u=x(e.charCodeAt(o++)))>=c||u>h((l-g)/a))&&m("overflow"),g+=u*a,!(u<(d=s<=v?1:s>=v+26?26:s-v));s+=c)a>h(l/(p=c-d))&&m("overflow"),a*=p;v=C(g-i,t=f.length+1,0==i),h(g/t)>l-y&&m("overflow"),y+=h(g/t),g%=t,f.splice(g++,0,y)}return b(f)}function _(e){var t,n,r,o,i,a,s,u,d,p,f,g,y,b,x,$=[];for(g=(e=v(e)).length,t=128,n=0,i=72,a=0;a<g;++a)(f=e[a])<128&&$.push(A(f));for(r=o=$.length,o&&$.push("-");r<g;){for(s=l,a=0;a<g;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>h((l-n)/(y=r+1))&&m("overflow"),n+=(s-t)*y,t=s,a=0;a<g;++a)if((f=e[a])<t&&++n>l&&m("overflow"),f==t){for(u=n,d=c;!(u<(p=d<=i?1:d>=i+26?26:d-i));d+=c)x=u-p,b=c-p,$.push(A(w(p+x%b,0))),u=h(x/b);$.push(A(w(u,0))),i=C(n,y,r==o),n=0,++r}++n,++t}return $.join("")}if(a={version:"1.4.1",ucs2:{decode:v,encode:b},decode:$,encode:_,toASCII:function(e){return y(e,function(e){return d.test(e)?"xn--"+_(e):e})},toUnicode:function(e){return y(e,function(e){return u.test(e)?$(e.slice(4).toLowerCase()):e})}},r&&o)if(e.exports==r)o.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else n.punycode=a}(commonjsGlobal)}(punycode$1,punycode$1.exports);var punycodeExports=punycode$1.exports;const require$$0$1=getDefaultExportFromCjs$1(punycodeExports);var type=TypeError,hasMap="function"==typeof Map&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&"function"==typeof mapSizeDescriptor.get?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet="function"==typeof Set&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&"function"==typeof setSizeDescriptor.get?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap="function"==typeof WeakMap&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet="function"==typeof WeakSet&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef="function"==typeof WeakRef&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace$1=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat$1=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf="function"==typeof BigInt?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,hasShammedSymbols="function"==typeof Symbol&&"object"==typeof Symbol.iterator,toStringTag="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||$test.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-$floor(-e):$floor(e);if(r!==e){var o=String(r),i=$slice.call(t,o.length+1);return $replace$1.call(o,n,"$&_")+"."+$replace$1.call($replace$1.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace$1.call(t,n,"$&_")}var utilInspect=require$$1$1,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},objectInspect=function e(t,n,r,o){var i=n||{};if(has$4(i,"quoteStyle")&&!has$4(quotes,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$4(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!has$4(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$4(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$4(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?addNumericSeparator(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?addNumericSeparator(t,c):c}var u=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return isArray$3(t)?"[Array]":"[Object]";var d=getIndent(i,r);if(void 0===o)o=[];else if(indexOf(o,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(o=$arrSlice.call(o)).push(n),a){var s={depth:i.depth};return has$4(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,r+1,o)}return e(t,i,r+1,o)}if("function"==typeof t&&!isRegExp$1(t)){var f=nameOf(t),h=arrObjKeys(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+$join.call(h,", ")+" }":"")}if(isSymbol(t)){var A=hasShammedSymbols?$replace$1.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?A:markBoxed(A)}if(isElement(t)){for(var m="<"+$toLowerCase.call(String(t.nodeName)),g=t.attributes||[],y=0;y<g.length;y++)m+=" "+g[y].name+"="+wrapQuotes(quote(g[y].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+$toLowerCase.call(String(t.nodeName))+">"}if(isArray$3(t)){if(0===t.length)return"[]";var v=arrObjKeys(t,p);return d&&!singleLineValues(v)?"["+indentedJoin(v,d)+"]":"[ "+$join.call(v,", ")+" ]"}if(isError(t)){var b=arrObjKeys(t,p);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===b.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(b,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat$1.call("[cause]: "+p(t.cause),b),", ")+" }"}if("object"==typeof t&&a){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:u-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var x=[];return mapForEach&&mapForEach.call(t,function(e,n){x.push(p(n,t,!0)+" => "+p(e,t))}),collectionOf("Map",mapSize.call(t),x,d)}if(isSet(t)){var w=[];return setForEach&&setForEach.call(t,function(e){w.push(p(e,t))}),collectionOf("Set",setSize.call(t),w,d)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber(t))return markBoxed(p(Number(t)));if(isBigInt(t))return markBoxed(p(bigIntValueOf.call(t)));if(isBoolean(t))return markBoxed(booleanValueOf.call(t));if(isString(t))return markBoxed(p(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==commonjsGlobal&&t===commonjsGlobal)return"{ [object globalThis] }";if(!isDate(t)&&!isRegExp$1(t)){var C=arrObjKeys(t,p),$=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,_=t instanceof Object?"":"null prototype",S=!$&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr$1(t),8,-1):_?"Object":"",E=($||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(S||_?"["+$join.call($concat$1.call([],S||[],_||[]),": ")+"] ":"");return 0===C.length?E+"{}":d?E+"{"+indentedJoin(C,d)+"}":E+"{ "+$join.call(C,", ")+" }"}return String(t)};function wrapQuotes(e,t,n){var r=n.quoteStyle||t,o=quotes[r];return o+e+o}function quote(e){return $replace$1.call(String(e),/"/g,"&quot;")}function canTrustToString(e){return!toStringTag||!("object"==typeof e&&(toStringTag in e||void 0!==e[toStringTag]))}function isArray$3(e){return"[object Array]"===toStr$1(e)&&canTrustToString(e)}function isDate(e){return"[object Date]"===toStr$1(e)&&canTrustToString(e)}function isRegExp$1(e){return"[object RegExp]"===toStr$1(e)&&canTrustToString(e)}function isError(e){return"[object Error]"===toStr$1(e)&&canTrustToString(e)}function isString(e){return"[object String]"===toStr$1(e)&&canTrustToString(e)}function isNumber(e){return"[object Number]"===toStr$1(e)&&canTrustToString(e)}function isBoolean(e){return"[object Boolean]"===toStr$1(e)&&canTrustToString(e)}function isSymbol(e){if(hasShammedSymbols)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!symToString)return!1;try{return symToString.call(e),!0}catch(e2){}return!1}function isBigInt(e){if(!e||"object"!=typeof e||!bigIntValueOf)return!1;try{return bigIntValueOf.call(e),!0}catch(e2){}return!1}var hasOwn$1=Object.prototype.hasOwnProperty||function(e){return e in this};function has$4(e,t){return hasOwn$1.call(e,t)}function toStr$1(e){return objectToString.call(e)}function nameOf(e){if(e.name)return e.name;var t=$match.call(functionToString.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function isMap(e){if(!mapSize||!e||"object"!=typeof e)return!1;try{mapSize.call(e);try{setSize.call(e)}catch(t){return!0}return e instanceof Map}catch(e2){}return!1}function isWeakMap(e){if(!weakMapHas||!e||"object"!=typeof e)return!1;try{weakMapHas.call(e,weakMapHas);try{weakSetHas.call(e,weakSetHas)}catch(t){return!0}return e instanceof WeakMap}catch(e2){}return!1}function isWeakRef(e){if(!weakRefDeref||!e||"object"!=typeof e)return!1;try{return weakRefDeref.call(e),!0}catch(e2){}return!1}function isSet(e){if(!setSize||!e||"object"!=typeof e)return!1;try{setSize.call(e);try{mapSize.call(e)}catch(t){return!0}return e instanceof Set}catch(e2){}return!1}function isWeakSet(e){if(!weakSetHas||!e||"object"!=typeof e)return!1;try{weakSetHas.call(e,weakSetHas);try{weakMapHas.call(e,weakMapHas)}catch(t){return!0}return e instanceof WeakSet}catch(e2){}return!1}function isElement(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}function inspectString(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return inspectString($slice.call(e,0,t.maxStringLength),t)+r}var o=quoteREs[t.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace$1.call($replace$1.call(e,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+$toUpperCase.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,n,r){return e+" ("+t+") {"+(r?indentedJoin(n,r):$join.call(n,", "))+"}"}function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}function getIndent(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=$join.call(Array(e.indent+1)," ")}return{base:n,prev:$join.call(Array(t+1),n)}}function indentedJoin(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+$join.call(e,","+n)+"\n"+t.prev}function arrObjKeys(e,t){var n=isArray$3(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=has$4(e,o)?t(e[o],e):""}var i,a="function"==typeof gOPS?gOPS(e):[];if(hasShammedSymbols){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var l in e)has$4(e,l)&&(n&&String(Number(l))===l&&l<e.length||hasShammedSymbols&&i["$"+l]instanceof Symbol||($test.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof gOPS)for(var c=0;c<a.length;c++)isEnumerable.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}var inspect$3=objectInspect,$TypeError$5=type,listGetNode=function(e,t,n){for(var r,o=e;null!=(r=o.next);o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r},listGet=function(e,t){if(e){var n=listGetNode(e,t);return n&&n.value}},listSet=function(e,t,n){var r=listGetNode(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},listHas=function(e,t){return!!e&&!!listGetNode(e,t)},listDelete=function(e,t){if(e)return listGetNode(e,t,!0)},sideChannelList=function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError$5("Side channel does not contain "+inspect$3(e))},delete:function(t){var n=e&&e.next,r=listDelete(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return listGet(e,t)},has:function(t){return listHas(e,t)},set:function(t,n){e||(e={next:void 0}),listSet(e,t,n)}};return t},esObjectAtoms=Object,esErrors=Error,_eval=EvalError,range=RangeError,ref=ReferenceError,syntax=SyntaxError,uri=URIError,abs$1=Math.abs,floor$1=Math.floor,max$2=Math.max,min$1=Math.min,pow$1=Math.pow,round$1=Math.round,_isNaN=Number.isNaN||function(e){return e!=e},$isNaN=_isNaN,sign$1=function(e){return $isNaN(e)||0===e?e:e<0?-1:1},gOPD=Object.getOwnPropertyDescriptor,$gOPD$1=gOPD;if($gOPD$1)try{$gOPD$1([],"length")}catch(e2){$gOPD$1=null}var gopd=$gOPD$1,$defineProperty$1=Object.defineProperty||!1;if($defineProperty$1)try{$defineProperty$1({},"a",{value:1})}catch(e2){$defineProperty$1=!1}var esDefineProperty=$defineProperty$1,shams,hasRequiredShams,hasSymbols$1,hasRequiredHasSymbols,Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf,Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireShams(){return hasRequiredShams?shams:(hasRequiredShams=1,shams=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols$1;hasRequiredHasSymbols=1;var e="undefined"!=typeof Symbol&&Symbol,t=requireShams();return hasSymbols$1=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf?Reflect_getPrototypeOf:(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return hasRequiredObject_getPrototypeOf?Object_getPrototypeOf:(hasRequiredObject_getPrototypeOf=1,Object_getPrototypeOf=esObjectAtoms.getPrototypeOf||null)}var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max$1=Math.max,funcType="[object Function]",concatty=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},slicy=function(e,t){for(var n=[],r=t,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},joiny=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},implementation$1=function(e){var t=this;if("function"!=typeof t||toStr.apply(t)!==funcType)throw new TypeError(ERROR_MESSAGE+t);for(var n,r=slicy(arguments,1),o=max$1(0,t.length-r.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(n=Function("binder","return function ("+joiny(i,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var o=t.apply(this,concatty(r,arguments));return Object(o)===o?o:this}return t.apply(e,concatty(r,arguments))}),t.prototype){var s=function(){};s.prototype=t.prototype,n.prototype=new s,s.prototype=null}return n},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,functionCall=Function.prototype.call,functionApply,hasRequiredFunctionApply;function requireFunctionApply(){return hasRequiredFunctionApply?functionApply:(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply)}var reflectApply="undefined"!=typeof Reflect&&Reflect&&Reflect.apply,bind$2=functionBind,$apply$1=requireFunctionApply(),$call$2=functionCall,$reflectApply=reflectApply,actualApply=$reflectApply||bind$2.call($call$2,$apply$1),bind$1=functionBind,$TypeError$4=type,$call$1=functionCall,$actualApply=actualApply,callBindApplyHelpers=function(e){if(e.length<1||"function"!=typeof e[0])throw new $TypeError$4("a function is required");return $actualApply(bind$1,$call$1,e)},get,hasRequiredGet,getProto$1,hasRequiredGetProto,hasown,hasRequiredHasown,undefined$1;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var e,t=callBindApplyHelpers,n=gopd;try{e=[].__proto__===Array.prototype}catch(e2){if(!e2||"object"!=typeof e2||!("code"in e2)||"ERR_PROTO_ACCESS"!==e2.code)throw e2}var r=!!e&&n&&n(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return get=r&&"function"==typeof r.get?t([r.get]):"function"==typeof i&&function(e){return i(null==e?e:o(e))}}function requireGetProto(){if(hasRequiredGetProto)return getProto$1;hasRequiredGetProto=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),n=requireGet();return getProto$1=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty;return hasown=functionBind.call(e,t)}var $Object=esObjectAtoms,$Error=esErrors,$EvalError=_eval,$RangeError=range,$ReferenceError=ref,$SyntaxError=syntax,$TypeError$3=type,$URIError=uri,abs=abs$1,floor=floor$1,max=max$2,min=min$1,pow=pow$1,round=round$1,sign=sign$1,$Function=Function,getEvalledConstructor=function(e){try{return $Function('"use strict"; return ('+e+").constructor;")()}catch(e2){}},$gOPD=gopd,$defineProperty=esDefineProperty,throwTypeError=function(){throw new $TypeError$3},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(e){try{return $gOPD(arguments,"callee").get}catch(t){return throwTypeError}}}():throwTypeError,hasSymbols=requireHasSymbols()(),getProto=requireGetProto(),$ObjectGPO=requireObject_getPrototypeOf(),$ReflectGPO=requireReflect_getPrototypeOf(),$apply=requireFunctionApply(),$call=functionCall,needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined$1,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined$1:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined$1:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined$1:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":"undefined"==typeof Float16Array?undefined$1:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?undefined$1:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined$1:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined$1:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined$1:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":"object"==typeof JSON?JSON:undefined$1,"%Map%":"undefined"==typeof Map?undefined$1:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined$1,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined$1:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined$1:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined$1:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined$1,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$3,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined$1:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined$1:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined$1:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined$1:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined$1:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined$1:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined$1:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(e2){var errorProto=getProto(getProto(e2));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function e(t){var n;if("%AsyncFunction%"===t)n=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===t)n=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&getProto&&(n=getProto(o.prototype))}return INTRINSICS[t]=n,n},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn=requireHasown(),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(e){var t=$strSlice(e,0,1),n=$strSlice(e,-1);if("%"===t&&"%"!==n)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var r=[];return $replace(e,rePropName,function(e,t,n,o){r[r.length]=n?$replace(o,reEscapeChar,"$1"):t||e}),r},getBaseIntrinsic=function(e,t){var n,r=e;if(hasOwn(LEGACY_ALIASES,r)&&(r="%"+(n=LEGACY_ALIASES[r])[0]+"%"),hasOwn(INTRINSICS,r)){var o=INTRINSICS[r];if(o===needsEval&&(o=doEval(r)),void 0===o&&!t)throw new $TypeError$3("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new $SyntaxError("intrinsic "+e+" does not exist!")},getIntrinsic=function(e,t){if("string"!=typeof e||0===e.length)throw new $TypeError$3("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new $TypeError$3('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,e))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=stringToPath(e),r=n.length>0?n[0]:"",o=getBaseIntrinsic("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],$spliceApply(n,$concat([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var d=n[c],p=$strSlice(d,0,1),f=$strSlice(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===f||"'"===f||"`"===f)&&p!==f)throw new $SyntaxError("property names with quotes must have matching quotes");if("constructor"!==d&&u||(s=!0),hasOwn(INTRINSICS,i="%"+(r+="."+d)+"%"))a=INTRINSICS[i];else if(null!=a){if(!(d in a)){if(!t)throw new $TypeError$3("base intrinsic for "+e+" exists, but the property is not available.");return}if($gOPD&&c+1>=n.length){var h=$gOPD(a,d);a=(u=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[d]}else u=hasOwn(a,d),a=a[d];u&&!s&&(INTRINSICS[i]=a)}}return a},GetIntrinsic$2=getIntrinsic,callBindBasic=callBindApplyHelpers,$indexOf=callBindBasic([GetIntrinsic$2("%String.prototype.indexOf%")]),callBound$2=function(e,t){var n=GetIntrinsic$2(e,!!t);return"function"==typeof n&&$indexOf(e,".prototype.")>-1?callBindBasic([n]):n},GetIntrinsic$1=getIntrinsic,callBound$1=callBound$2,inspect$2=objectInspect,$TypeError$2=type,$Map=GetIntrinsic$1("%Map%",!0),$mapGet=callBound$1("Map.prototype.get",!0),$mapSet=callBound$1("Map.prototype.set",!0),$mapHas=callBound$1("Map.prototype.has",!0),$mapDelete=callBound$1("Map.prototype.delete",!0),$mapSize=callBound$1("Map.prototype.size",!0),sideChannelMap=!!$Map&&function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError$2("Side channel does not contain "+inspect$2(e))},delete:function(t){if(e){var n=$mapDelete(e,t);return 0===$mapSize(e)&&(e=void 0),n}return!1},get:function(t){if(e)return $mapGet(e,t)},has:function(t){return!!e&&$mapHas(e,t)},set:function(t,n){e||(e=new $Map),$mapSet(e,t,n)}};return t},GetIntrinsic=getIntrinsic,callBound=callBound$2,inspect$1=objectInspect,getSideChannelMap$1=sideChannelMap,$TypeError$1=type,$WeakMap=GetIntrinsic("%WeakMap%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$weakMapDelete=callBound("WeakMap.prototype.delete",!0),sideChannelWeakmap=$WeakMap?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new $TypeError$1("Side channel does not contain "+inspect$1(e))},delete:function(n){if($WeakMap&&n&&("object"==typeof n||"function"==typeof n)){if(e)return $weakMapDelete(e,n)}else if(getSideChannelMap$1&&t)return t.delete(n);return!1},get:function(n){return $WeakMap&&n&&("object"==typeof n||"function"==typeof n)&&e?$weakMapGet(e,n):t&&t.get(n)},has:function(n){return $WeakMap&&n&&("object"==typeof n||"function"==typeof n)&&e?$weakMapHas(e,n):!!t&&t.has(n)},set:function(n,r){$WeakMap&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new $WeakMap),$weakMapSet(e,n,r)):getSideChannelMap$1&&(t||(t=getSideChannelMap$1()),t.set(n,r))}};return n}:getSideChannelMap$1,$TypeError=type,inspect=objectInspect,getSideChannelList=sideChannelList,getSideChannelMap=sideChannelMap,getSideChannelWeakMap=sideChannelWeakmap,makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList,sideChannel=function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||(e=makeChannel()),e.set(t,n)}};return t},replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"},formats$3={default:Format.RFC3986,formatters:{RFC1738:function(e){return replace.call(e,percentTwenties,"+")},RFC3986:function(e){return String(e)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986},formats$2=formats$3,getSideChannel$1=sideChannel,has$3=Object.prototype.hasOwnProperty,isArray$2=Array.isArray,overflowChannel=getSideChannel$1(),markOverflow=function(e,t){return overflowChannel.set(e,t),e},isOverflow=function(e){return overflowChannel.has(e)},getMaxIndex=function(e){return overflowChannel.get(e)},setMaxIndex=function(e,t){overflowChannel.set(e,t)},hexTable=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),compactQueue=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(isArray$2(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}},arrayToObject=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},merge=function e(t,n,r){if(!n)return t;if("object"!=typeof n&&"function"!=typeof n){if(isArray$2(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];if(isOverflow(t)){var o=getMaxIndex(t)+1;t[o]=n,setMaxIndex(t,o)}else(r&&(r.plainObjects||r.allowPrototypes)||!has$3.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t){if(isOverflow(n)){for(var i=Object.keys(n),a=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},s=0;s<i.length;s++){a[parseInt(i[s],10)+1]=n[i[s]]}return markOverflow(a,getMaxIndex(n)+1)}return[t].concat(n)}var l=t;return isArray$2(t)&&!isArray$2(n)&&(l=arrayToObject(t,r)),isArray$2(t)&&isArray$2(n)?(n.forEach(function(n,o){if(has$3.call(t,o)){var i=t[o];i&&"object"==typeof i&&n&&"object"==typeof n?t[o]=e(i,n,r):t.push(n)}else t[o]=n}),t):Object.keys(n).reduce(function(t,o){var i=n[o];return has$3.call(t,o)?t[o]=e(t[o],i,r):t[o]=i,t},l)},assign=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},decode=function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e2){return r}},limit=1024,encode=function(e,t,n,r,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",s=0;s<i.length;s+=limit){for(var l=i.length>=limit?i.slice(s,s+limit):i,c=[],u=0;u<l.length;++u){var d=l.charCodeAt(u);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===formats$2.RFC1738&&(40===d||41===d)?c[c.length]=l.charAt(u):d<128?c[c.length]=hexTable[d]:d<2048?c[c.length]=hexTable[192|d>>6]+hexTable[128|63&d]:d<55296||d>=57344?c[c.length]=hexTable[224|d>>12]+hexTable[128|d>>6&63]+hexTable[128|63&d]:(u+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(u)),c[c.length]=hexTable[240|d>>18]+hexTable[128|d>>12&63]+hexTable[128|d>>6&63]+hexTable[128|63&d])}a+=c.join("")}return a},compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var l=a[s],c=i[l];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:i,prop:l}),n.push(c))}return compactQueue(t),e},isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},isBuffer=function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},combine=function(e,t,n,r){if(isOverflow(e)){var o=getMaxIndex(e)+1;return e[o]=t,setMaxIndex(e,o),e}var i=[].concat(e,t);return i.length>n?markOverflow(arrayToObject(i,{plainObjects:r}),i.length-1):i},maybeMap=function(e,t){if(isArray$2(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},utils$2={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isOverflow:isOverflow,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge},getSideChannel=sideChannel,utils$1=utils$2,formats$1=formats$3,has$2=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},isArray$1=Array.isArray,push=Array.prototype.push,pushToArray=function(e,t){push.apply(e,isArray$1(t)?t:[t])},toISO=Date.prototype.toISOString,defaultFormat=formats$1.default,defaults$1={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:utils$1.encode,encodeValuesOnly:!1,filter:void 0,format:defaultFormat,formatter:formats$1.formatters[defaultFormat],indices:!1,serializeDate:function(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},sentinel={},stringify$4=function e(t,n,r,o,i,a,s,l,c,u,d,p,f,h,A,m,g,y){for(var v=t,b=y,x=0,w=!1;void 0!==(b=b.get(sentinel))&&!w;){var C=b.get(t);if(x+=1,void 0!==C){if(C===x)throw new RangeError("Cyclic object value");w=!0}void 0===b.get(sentinel)&&(x=0)}if("function"==typeof u?v=u(n,v):v instanceof Date?v=f(v):"comma"===r&&isArray$1(v)&&(v=utils$1.maybeMap(v,function(e){return e instanceof Date?f(e):e})),null===v){if(a)return c&&!m?c(n,defaults$1.encoder,g,"key",h):n;v=""}if(isNonNullishPrimitive(v)||utils$1.isBuffer(v))return c?[A(m?n:c(n,defaults$1.encoder,g,"key",h))+"="+A(c(v,defaults$1.encoder,g,"value",h))]:[A(n)+"="+A(String(v))];var $,_=[];if(void 0===v)return _;if("comma"===r&&isArray$1(v))m&&c&&(v=utils$1.maybeMap(v,c)),$=[{value:v.length>0?v.join(",")||null:void 0}];else if(isArray$1(u))$=u;else{var S=Object.keys(v);$=d?S.sort(d):S}var E=l?String(n).replace(/\./g,"%2E"):String(n),k=o&&isArray$1(v)&&1===v.length?E+"[]":E;if(i&&isArray$1(v)&&0===v.length)return k+"[]";for(var P=0;P<$.length;++P){var B=$[P],T="object"==typeof B&&B&&void 0!==B.value?B.value:v[B];if(!s||null!==T){var I=p&&l?String(B).replace(/\./g,"%2E"):String(B),L=isArray$1(v)?"function"==typeof r?r(k,I):k:k+(p?"."+I:"["+I+"]");y.set(t,x);var M=getSideChannel();M.set(sentinel,y),pushToArray(_,e(T,L,r,o,i,a,s,l,"comma"===r&&m&&isArray$1(v)?null:c,u,d,p,f,h,A,m,g,M))}}return _},normalizeStringifyOptions=function(e){if(!e)return defaults$1;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||defaults$1.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=formats$1.default;if(void 0!==e.format){if(!has$2.call(formats$1.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=formats$1.formatters[n],i=defaults$1.filter;if(("function"==typeof e.filter||isArray$1(e.filter))&&(i=e.filter),r=e.arrayFormat in arrayPrefixGenerators?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":defaults$1.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=void 0===e.allowDots?!0===e.encodeDotInKeys||defaults$1.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:a,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults$1.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults$1.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?defaults$1.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:defaults$1.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:defaults$1.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:defaults$1.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:defaults$1.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:defaults$1.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults$1.strictNullHandling}},stringify_1=function(e,t){var n,r=e,o=normalizeStringifyOptions(t);"function"==typeof o.filter?r=(0,o.filter)("",r):isArray$1(o.filter)&&(n=o.filter);var i=[];if("object"!=typeof r||null===r)return"";var a=arrayPrefixGenerators[o.arrayFormat],s="comma"===a&&o.commaRoundTrip;n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var l=getSideChannel(),c=0;c<n.length;++c){var u=n[c],d=r[u];o.skipNulls&&null===d||pushToArray(i,stringify$4(d,u,a,s,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var p=i.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),p.length>0?f+p:""},utils=utils$2,has$1=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,n){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;r=r.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=r.split(t.delimiter,t.throwOnLimitExceeded?o+1:o);if(t.throwOnLimitExceeded&&i.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(1===o?"":"s")+" allowed.");var a,s=-1,l=t.charset;if(t.charsetSentinel)for(a=0;a<i.length;++a)0===i[a].indexOf("utf8=")&&(i[a]===charsetSentinel?l="utf-8":i[a]===isoSentinel&&(l="iso-8859-1"),s=a,a=i.length);for(a=0;a<i.length;++a)if(a!==s){var c,u,d=i[a],p=d.indexOf("]="),f=-1===p?d.indexOf("="):p+1;if(-1===f?(c=t.decoder(d,defaults.decoder,l,"key"),u=t.strictNullHandling?null:""):null!==(c=t.decoder(d.slice(0,f),defaults.decoder,l,"key"))&&(u=utils.maybeMap(parseArrayValue(d.slice(f+1),t,isArray(n[c])?n[c].length:0),function(e){return t.decoder(e,defaults.decoder,l,"value")})),u&&t.interpretNumericEntities&&"iso-8859-1"===l&&(u=interpretNumericEntities(String(u))),d.indexOf("[]=")>-1&&(u=isArray(u)?[u]:u),null!==c){var h=has$1.call(n,c);h&&"combine"===t.duplicates?n[c]=utils.combine(n[c],u,t.arrayLimit,t.plainObjects):h&&"last"!==t.duplicates||(n[c]=u)}}return n},parseObject=function(e,t,n,r){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var i=e.slice(0,-1).join("");o=Array.isArray(t)&&t[i]?t[i].length:0}for(var a=r?t:parseArrayValue(t,n,o),s=e.length-1;s>=0;--s){var l,c=e[s];if("[]"===c&&n.parseArrays)l=utils.isOverflow(a)?a:n.allowEmptyArrays&&(""===a||n.strictNullHandling&&null===a)?[]:utils.combine([],a,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,d=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,p=parseInt(d,10);n.parseArrays||""!==d?!isNaN(p)&&c!==d&&String(p)===d&&p>=0&&n.parseArrays&&p<=n.arrayLimit?(l=[])[p]=a:"__proto__"!==d&&(l[d]=a):l={0:a}}a=l}return a},splitKeyIntoSegments=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&has$1.call(Object.prototype,n)&&!t.allowPrototypes)return;return[n]}var r=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(n),i=o?n.slice(0,o.index):n,a=[];if(i){if(!t.plainObjects&&has$1.call(Object.prototype,i)&&!t.allowPrototypes)return;a.push(i)}for(var s=0;null!==(o=r.exec(n))&&s<t.depth;){s+=1;var l=o[1].slice(1,-1);if(!t.plainObjects&&has$1.call(Object.prototype,l)&&!t.allowPrototypes)return;a.push(o[1])}if(o){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");a.push("["+n.slice(o.index)+"]")}return a},parseKeys=function(e,t,n,r){if(e){var o=splitKeyIntoSegments(e,n);if(o)return parseObject(o,t,n,r)}},normalizeParseOptions=function(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,n=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}},parse$6=function(e,t){var n=normalizeParseOptions(t);if(""===e||null==e)return n.plainObjects?{__proto__:null}:{};for(var r="string"==typeof e?parseValues(e,n):e,o=n.plainObjects?{__proto__:null}:{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],l=parseKeys(s,r[s],n,"string"==typeof e);o=utils.merge(o,l,n)}return!0===n.allowSparse?o:utils.compact(o)},stringify$3=stringify_1,parse$5=parse$6,formats=formats$3,lib={formats:formats,parse:parse$5,stringify:stringify$3};const require$$1=getDefaultExportFromCjs$1(lib);var punycode=require$$0$1;function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require$$1;function urlParse(e,t,n){if(e&&"object"==typeof e&&e instanceof Url)return e;var r=new Url;return r.parse(e,t,n),r}function urlFormat(e){return"string"==typeof e&&(e=urlParse(e)),e instanceof Url?e.format():Url.prototype.format.call(e)}function urlResolve(e,t){return urlParse(e,!1,!0).resolve(t)}function urlResolveObject(e,t){return e?urlParse(e,!1,!0).resolveObject(t):t}Url.prototype.parse=function(e,t,n){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",i=e.split(o);i[0]=i[0].replace(/\\/g,"/");var a=e=i.join(o);if(a=a.trim(),!n&&1===e.split("#").length){var s=simplePathPattern.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?querystring.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var l=protocolPattern.exec(a);if(l){var c=(l=l[0]).toLowerCase();this.protocol=c,a=a.substr(l.length)}if(n||l||a.match(/^\/\/[^@/]+@[^@/]+/)){var u="//"===a.substr(0,2);!u||l&&hostlessProtocol[l]||(a=a.substr(2),this.slashes=!0)}if(!hostlessProtocol[l]&&(u||l&&!slashedProtocol[l])){for(var d,p,f=-1,h=0;h<hostEndingChars.length;h++){-1!==(A=a.indexOf(hostEndingChars[h]))&&(-1===f||A<f)&&(f=A)}-1!==(p=-1===f?a.lastIndexOf("@"):a.lastIndexOf("@",f))&&(d=a.slice(0,p),a=a.slice(p+1),this.auth=decodeURIComponent(d)),f=-1;for(h=0;h<nonHostChars.length;h++){var A;-1!==(A=a.indexOf(nonHostChars[h]))&&(-1===f||A<f)&&(f=A)}-1===f&&(f=a.length),this.host=a.slice(0,f),a=a.slice(f),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var g=this.hostname.split(/\./),y=(h=0,g.length);h<y;h++){var v=g[h];if(v&&!v.match(hostnamePartPattern)){for(var b="",x=0,w=v.length;x<w;x++)v.charCodeAt(x)>127?b+="x":b+=v[x];if(!b.match(hostnamePartPattern)){var C=g.slice(0,h),$=g.slice(h+1),_=v.match(hostnamePartStart);_&&(C.push(_[1]),$.unshift(_[2])),$.length&&(a="/"+$.join(".")+a),this.hostname=C.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=punycode.toASCII(this.hostname));var S=this.port?":"+this.port:"",E=this.hostname||"";this.host=E+S,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!unsafeProtocol[c])for(h=0,y=autoEscape.length;h<y;h++){var k=autoEscape[h];if(-1!==a.indexOf(k)){var P=encodeURIComponent(k);P===k&&(P=escape(k)),a=a.split(k).join(P)}}var B=a.indexOf("#");-1!==B&&(this.hash=a.substr(B),a=a.slice(0,B));var T=a.indexOf("?");if(-1!==T?(this.search=a.substr(T),this.query=a.substr(T+1),t&&(this.query=querystring.parse(this.query)),a=a.slice(0,T)):t&&(this.search="",this.query={}),a&&(this.pathname=a),slashedProtocol[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){S=this.pathname||"";var I=this.search||"";this.path=S+I}return this.href=this.format(),this},Url.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=querystring.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||slashedProtocol[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+r},Url.prototype.resolve=function(e){return this.resolveObject(urlParse(e,!1,!0)).format()},Url.prototype.resolveObject=function(e){if("string"==typeof e){var t=new Url;t.parse(e,!1,!0),e=t}for(var n=new Url,r=Object.keys(this),o=0;o<r.length;o++){var i=r[o];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),s=0;s<a.length;s++){var l=a[s];"protocol"!==l&&(n[l]=e[l])}return slashedProtocol[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname="/",n.path=n.pathname),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!slashedProtocol[e.protocol]){for(var c=Object.keys(e),u=0;u<c.length;u++){var d=c[u];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||hostlessProtocol[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var f=n.pathname||"",h=n.search||"";n.path=f+h}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var A=n.pathname&&"/"===n.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=m||A||n.host&&e.pathname,y=g,v=n.pathname&&n.pathname.split("/")||[],b=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!slashedProtocol[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===v[0]?v[0]=n.host:v.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),g=g&&(""===p[0]||""===v[0])),m)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,v=p;else if(p.length)v||(v=[]),v.pop(),v=v.concat(p),n.search=e.search,n.query=e.query;else if(null!=e.search){if(b)n.host=v.shift(),n.hostname=n.host,(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.hostname=_.shift(),n.host=n.hostname);return n.search=e.search,n.query=e.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!v.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=v.slice(-1)[0],w=(n.host||e.host||v.length>1)&&("."===x||".."===x)||""===x,C=0,$=v.length;$>=0;$--)"."===(x=v[$])?v.splice($,1):".."===x?(v.splice($,1),C++):C&&(v.splice($,1),C--);if(!g&&!y)for(;C--;C)v.unshift("..");!g||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),w&&"/"!==v.join("/").substr(-1)&&v.push("");var _,S=""===v[0]||v[0]&&"/"===v[0].charAt(0);b&&(n.hostname=S?"":v.length?v.shift():"",n.host=n.hostname,(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.hostname=_.shift(),n.host=n.hostname));return(g=g||n.host&&v.length)&&!S&&v.unshift(""),v.length>0?n.pathname=v.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},Url.prototype.parseHost=function(){var e=this.host,t=portPattern.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var parse$4=urlParse,resolve$1$1=urlResolve,resolveObject=urlResolveObject,format=urlFormat,Url_1=Url;function normalizeArray(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function resolve$2(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+(e=normalizeArray(filter$1(e.split("/"),function(e){return!!e}),!t).join("/"))||"."}function filter$1(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var _globalThis=function(e){function t(){var t=this||self;return delete e.prototype.__magic__,t}return"object"==typeof globalThis?globalThis:this?t():(e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t}),__magic__)}(Object),formatImport=format,parseImport=parse$4,resolveImport=resolve$1$1,UrlImport=Url_1,URL$1=_globalThis.URL,URLSearchParams=_globalThis.URLSearchParams,percentRegEx=/%/g,backslashRegEx=/\\/g,newlineRegEx=/\n/g,carriageReturnRegEx=/\r/g,tabRegEx=/\t/g,CHAR_FORWARD_SLASH=47;function isURLInstance(e){var t=null!=e?e:null;return Boolean(null!==t&&(null==t?void 0:t.href)&&(null==t?void 0:t.origin))}function getPathFromURLPosix(e){if(""!==e.hostname)throw new TypeError('File URL host must be "localhost" or empty on browser');for(var t=e.pathname,n=0;n<t.length;n++)if("%"===t[n]){var r=32|t.codePointAt(n+2);if("2"===t[n+1]&&102===r)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(t)}function encodePathChars(e){return e.includes("%")&&(e=e.replace(percentRegEx,"%25")),e.includes("\\")&&(e=e.replace(backslashRegEx,"%5C")),e.includes("\n")&&(e=e.replace(newlineRegEx,"%0A")),e.includes("\r")&&(e=e.replace(carriageReturnRegEx,"%0D")),e.includes("\t")&&(e=e.replace(tabRegEx,"%09")),e}var domainToASCII=function(e){if(void 0===e)throw new TypeError('The "domain" argument must be specified');return new URL$1("http://"+e).hostname},domainToUnicode=function(e){if(void 0===e)throw new TypeError('The "domain" argument must be specified');return new URL$1("http://"+e).hostname},pathToFileURL$2=function(e){var t=new URL$1("file://"),n=resolve$2(e);return e.charCodeAt(e.length-1)===CHAR_FORWARD_SLASH&&"/"!==n[n.length-1]&&(n+="/"),t.pathname=encodePathChars(n),t},fileURLToPath$1=function(e){if(!isURLInstance(e)&&"string"!=typeof e)throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof e+" ("+e+")");var t=new URL$1(e);if("file:"!==t.protocol)throw new TypeError("The URL must be of scheme file");return getPathFromURLPosix(t)},formatImportWithOverloads=function(e,t){var n,r,o;if(void 0===t&&(t={}),!(e instanceof URL$1))return formatImport(e);if("object"!=typeof t||null===t)throw new TypeError('The "options" argument must be of type object.');var i=null==(n=t.auth)||n,a=null==(r=t.fragment)||r,s=null==(o=t.search)||o;t.unicode;var l=new URL$1(e.toString());return i||(l.username="",l.password=""),a||(l.hash=""),s||(l.search=""),l.toString()},api={format:formatImportWithOverloads,parse:parseImport,resolve:resolveImport,resolveObject:resolveObject,Url:UrlImport,URL:URL$1,URLSearchParams:URLSearchParams,domainToASCII:domainToASCII,domainToUnicode:domainToUnicode,pathToFileURL:pathToFileURL$2,fileURLToPath:fileURLToPath$1};const url=Object.freeze(Object.defineProperty({__proto__:null,URL:URL$1,URLSearchParams:URLSearchParams,Url:UrlImport,default:api,domainToASCII:domainToASCII,domainToUnicode:domainToUnicode,fileURLToPath:fileURLToPath$1,format:formatImportWithOverloads,parse:parseImport,pathToFileURL:pathToFileURL$2,resolve:resolveImport,resolveObject:resolveObject},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(url);var empty=null;const empty$1=Object.freeze(Object.defineProperty({__proto__:null,default:empty},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(empty$1);let{existsSync:existsSync,readFileSync:readFileSync}=require$$0,{dirname:dirname$1,join:join}=pathBrowserify,{SourceMapConsumer:SourceMapConsumer$2,SourceMapGenerator:SourceMapGenerator$2}=require$$1$1;function fromBase64(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let PreviousMap$2=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let 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=dirname$1(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new SourceMapConsumer$2(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return fromBase64(e.substr(n[0].length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=dirname$1(e),existsSync(e))return this.mapFile=e,readFileSync(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof SourceMapConsumer$2)return SourceMapGenerator$2.fromSourceMap(t).toString();if(t instanceof SourceMapGenerator$2)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=join(dirname$1(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var previousMap=PreviousMap$2;PreviousMap$2.default=PreviousMap$2;let{nanoid:nanoid}=nonSecure,{isAbsolute:isAbsolute,resolve:resolve$1}=pathBrowserify,{SourceMapConsumer:SourceMapConsumer$1,SourceMapGenerator:SourceMapGenerator$1}=require$$1$1,{fileURLToPath:fileURLToPath,pathToFileURL:pathToFileURL$1}=require$$2,CssSyntaxError$1=cssSyntaxError,PreviousMap$1=previousMap,terminalHighlight=require$$1$1,lineToIndexCache=Symbol("lineToIndexCache"),sourceMapAvailable$1=Boolean(SourceMapConsumer$1&&SourceMapGenerator$1),pathAvailable$1=Boolean(resolve$1&&isAbsolute);function getLineToIndex(e){if(e[lineToIndexCache])return e[lineToIndexCache];let t=e.css.split("\n"),n=new Array(t.length),r=0;for(let o=0,i=t.length;o<i;o++)n[o]=r,r+=t[o].length+1;return e[lineToIndexCache]=n,n}let Input$4=class{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof 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,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!pathAvailable$1||/^\w+:\/\//.test(t.from)||isAbsolute(t.from)?this.file=t.from:this.file=resolve$1(t.from)),pathAvailable$1&&sourceMapAvailable$1){let e=new PreviousMap$1(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+nanoid(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a,s,l;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){s=e.offset;let r=this.fromOffset(s);t=r.line,n=r.col}else t=e.line,n=e.column,s=this.fromLineAndColumn(t,n);if("number"==typeof r.offset){a=r.offset;let e=this.fromOffset(a);i=e.line,o=e.col}else i=r.line,o=r.column,a=this.fromLineAndColumn(r.line,r.column)}else if(n)s=this.fromLineAndColumn(t,n);else{s=t;let e=this.fromOffset(s);t=e.line,n=e.col}let c=this.origin(t,n,i,o);return l=c?new CssSyntaxError$1(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,r.plugin):new CssSyntaxError$1(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:o,line:i},this.css,this.file,r.plugin),l.input={column:n,endColumn:o,endLine:i,endOffset:a,line:t,offset:s,source:this.css},this.file&&(pathToFileURL$1&&(l.input.url=pathToFileURL$1(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,t){return getLineToIndex(this)[e-1]+t-1}fromOffset(e){let t=getLineToIndex(this),n=0;if(e>=t[t.length-1])n=t.length-1;else{let r,o=t.length-2;for(;n<o;)if(r=n+(o-n>>1),e<t[r])o=r-1;else{if(!(e>=t[r+1])){n=r;break}n=r+1}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:resolve$1(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=isAbsolute(s.source)?pathToFileURL$1(s.source):new URL(s.source,this.map.consumer().sourceRoot||pathToFileURL$1(this.map.mapFile));let l={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:i.toString()};if("file:"===i.protocol){if(!fileURLToPath)throw new Error("file: protocol is not available in this PostCSS build");l.file=fileURLToPath(i)}let c=a.sourceContentFor(s.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var input=Input$4;Input$4.default=Input$4,terminalHighlight&&terminalHighlight.registerInput&&terminalHighlight.registerInput(Input$4);let Container$4=container$1,LazyResult$3,Processor$2,Root$5=class extends Container$4{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before;return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new LazyResult$3(new Processor$2,this,e).stringify()}};Root$5.registerLazyResult=e=>{LazyResult$3=e},Root$5.registerProcessor=e=>{Processor$2=e};var root$1=Root$5;Root$5.default=Root$5,Container$4.registerRoot(Root$5);let list$2={comma:e=>list$2.split(e,[","],!0),space:e=>list$2.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let u of e)c?c=!1:"\\"===u?c=!0:s?u===l&&(s=!1):'"'===u||"'"===u?(s=!0,l=u):"("===u?a+=1:")"===u?a>0&&(a-=1):0===a&&t.includes(u)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=u;return(n||""!==o)&&r.push(o.trim()),r}};var list_1=list$2;list$2.default=list$2;let Container$3=container$1,list$1=list_1,Rule$3=class extends Container$3{get selectors(){return list$1.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var rule=Rule$3;Rule$3.default=Rule$3,Container$3.registerRule(Rule$3);let AtRule$2=atRule,Comment$2=comment,Declaration$2=declaration,Input$3=input,PreviousMap=previousMap,Root$4=root$1,Rule$2=rule;function fromJSON$1(e,t){if(Array.isArray(e))return e.map(e=>fromJSON$1(e));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:Input$3.prototype};n.map&&(n.map={...n.map,__proto__:PreviousMap.prototype}),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>fromJSON$1(e,t))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Root$4(r);if("decl"===r.type)return new Declaration$2(r);if("rule"===r.type)return new Rule$2(r);if("comment"===r.type)return new Comment$2(r);if("atrule"===r.type)return new AtRule$2(r);throw new Error("Unknown node type: "+e.type)}var fromJSON_1=fromJSON$1;fromJSON$1.default=fromJSON$1;let{dirname:dirname,relative:relative,resolve:resolve,sep:sep}=pathBrowserify,{SourceMapConsumer:SourceMapConsumer,SourceMapGenerator:SourceMapGenerator}=require$$1$1,{pathToFileURL:pathToFileURL}=require$$2,Input$2=input,sourceMapAvailable=Boolean(SourceMapConsumer&&SourceMapGenerator),pathAvailable=Boolean(dirname&&resolve&&relative&&sep),MapGenerator$2=class{constructor(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}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||dirname(e.file);!1===this.mapOpts.sourcesContent?(t=new SourceMapConsumer(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pathAvailable&&sourceMapAvailable&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=SourceMapGenerator.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new SourceMapGenerator({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]}generateString(){this.css="",this.map=new SourceMapGenerator({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(i.generated.line=n,i.generated.column=r-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=a.match(/\n/g),t?(n+=t.length,e=a.lastIndexOf("\n"),r=a.length-e):r+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?dirname(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=dirname(resolve(n,this.mapOpts.annotation)));let r=relative(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Input$2(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(pathToFileURL){let t=pathToFileURL(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===sep&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var mapGenerator=MapGenerator$2;const SINGLE_QUOTE="'".charCodeAt(0),DOUBLE_QUOTE='"'.charCodeAt(0),BACKSLASH="\\".charCodeAt(0),SLASH="/".charCodeAt(0),NEWLINE="\n".charCodeAt(0),SPACE=" ".charCodeAt(0),FEED="\f".charCodeAt(0),TAB="\t".charCodeAt(0),CR="\r".charCodeAt(0),OPEN_SQUARE="[".charCodeAt(0),CLOSE_SQUARE="]".charCodeAt(0),OPEN_PARENTHESES="(".charCodeAt(0),CLOSE_PARENTHESES=")".charCodeAt(0),OPEN_CURLY="{".charCodeAt(0),CLOSE_CURLY="}".charCodeAt(0),SEMICOLON=";".charCodeAt(0),ASTERISK="*".charCodeAt(0),COLON=":".charCodeAt(0),AT="@".charCodeAt(0),RE_AT_END=/[\t\n\f\r "#'()/;[\\\]{}]/g,RE_WORD_END=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,RE_BAD_BRACKET=/.[\r\n"'(/\\]/,RE_HEX_ESCAPE=/[\da-f]/i;var tokenize=function(e,t={}){let n,r,o,i,a,s,l,c,u,d,p=e.css.valueOf(),f=t.ignoreErrors,h=p.length,A=0,m=[],g=[];function y(t){throw e.error("Unclosed "+t,A)}return{back:function(e){g.push(e)},endOfFile:function(){return 0===g.length&&A>=h},nextToken:function(e){if(g.length)return g.pop();if(A>=h)return;let t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(A),n){case NEWLINE:case SPACE:case TAB:case CR:case FEED:i=A;do{i+=1,n=p.charCodeAt(i)}while(n===SPACE||n===NEWLINE||n===TAB||n===CR||n===FEED);s=["space",p.slice(A,i)],A=i-1;break;case OPEN_SQUARE:case CLOSE_SQUARE:case OPEN_CURLY:case CLOSE_CURLY:case COLON:case SEMICOLON:case CLOSE_PARENTHESES:{let e=String.fromCharCode(n);s=[e,e,A];break}case OPEN_PARENTHESES:if(d=m.length?m.pop()[1]:"",u=p.charCodeAt(A+1),"url"===d&&u!==SINGLE_QUOTE&&u!==DOUBLE_QUOTE&&u!==SPACE&&u!==NEWLINE&&u!==TAB&&u!==FEED&&u!==CR){i=A;do{if(l=!1,i=p.indexOf(")",i+1),-1===i){if(f||t){i=A;break}y("bracket")}for(c=i;p.charCodeAt(c-1)===BACKSLASH;)c-=1,l=!l}while(l);s=["brackets",p.slice(A,i+1),A,i],A=i}else i=p.indexOf(")",A+1),r=p.slice(A,i+1),-1===i||RE_BAD_BRACKET.test(r)?s=["(","(",A]:(s=["brackets",r,A,i],A=i);break;case SINGLE_QUOTE:case DOUBLE_QUOTE:a=n===SINGLE_QUOTE?"'":'"',i=A;do{if(l=!1,i=p.indexOf(a,i+1),-1===i){if(f||t){i=A+1;break}y("string")}for(c=i;p.charCodeAt(c-1)===BACKSLASH;)c-=1,l=!l}while(l);s=["string",p.slice(A,i+1),A,i],A=i;break;case AT:RE_AT_END.lastIndex=A+1,RE_AT_END.test(p),i=0===RE_AT_END.lastIndex?p.length-1:RE_AT_END.lastIndex-2,s=["at-word",p.slice(A,i+1),A,i],A=i;break;case BACKSLASH:for(i=A,o=!0;p.charCodeAt(i+1)===BACKSLASH;)i+=1,o=!o;if(n=p.charCodeAt(i+1),o&&n!==SLASH&&n!==SPACE&&n!==NEWLINE&&n!==TAB&&n!==CR&&n!==FEED&&(i+=1,RE_HEX_ESCAPE.test(p.charAt(i)))){for(;RE_HEX_ESCAPE.test(p.charAt(i+1));)i+=1;p.charCodeAt(i+1)===SPACE&&(i+=1)}s=["word",p.slice(A,i+1),A,i],A=i;break;default:n===SLASH&&p.charCodeAt(A+1)===ASTERISK?(i=p.indexOf("*/",A+2)+1,0===i&&(f||t?i=p.length:y("comment")),s=["comment",p.slice(A,i+1),A,i],A=i):(RE_WORD_END.lastIndex=A+1,RE_WORD_END.test(p),i=0===RE_WORD_END.lastIndex?p.length-1:RE_WORD_END.lastIndex-2,s=["word",p.slice(A,i+1),A,i],m.push(s),A=i)}return A++,s},position:function(){return A}}};let AtRule$1=atRule,Comment$1=comment,Declaration$1=declaration,Root$3=root$1,Rule$1=rule,tokenizer=tokenize;const SAFE_COMMENT_NEIGHBOR={empty:!0,space:!0};function findLastWithPosition(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let Parser$1=class{constructor(e){this.input=e,this.root=new Root$3,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new AtRule$1;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(r=s.length-1,n=s[r];n&&"space"===n[0];)n=s[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(o.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(o,"params",s),i&&(e=s[s.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(n=a,r=n[0],"("===r&&(o+=1),")"===r&&(o-=1),0===o&&":"===r){if(t){if("word"===t[0]&&"progid"===t[1])continue;return i}this.doubleColon(n)}t=n}return!1}comment(e){let t=new Comment$1;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=tokenizer(this.input)}decl(e,t){let n=new Declaration$1;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||findLastWithPosition(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[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));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(r=e[l],"!important"===r[1].toLowerCase()){n.important=!0;let t=this.stringFrom(e,l);t=this.spacesFromEnd(e)+t," !important"!==t&&(n.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=l;e>0;e--){let n=t[e][0];if(r.trim().startsWith("!")&&"space"!==n)break;r=t.pop()[1]+r}r.trim().startsWith("!")&&(n.important=!0,n.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}let s=e.some(e=>"space"!==e[0]&&"comment"!==e[0]);s&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Rule$1;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)o||(o=l),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=l),i.push("}");else if(0===i.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===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[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()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,s,l=n.length,c="",u=!0;for(let d=0;d<l;d+=1)o=n[d],i=o[0],"space"!==i||d!==l-1||r?"comment"===i?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",SAFE_COMMENT_NEIGHBOR[s]||SAFE_COMMENT_NEIGHBOR[a]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let r=n.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Rule$1;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var parser=Parser$1;let Container$2=container$1,Input$1=input,Parser=parser;function parse$3(e,t){let n=new Input$1(e,t),r=new Parser(n);try{r.parse()}catch(e2){throw e2}return r.root}var parse_1=parse$3;parse$3.default=parse$3,Container$2.registerParse(parse$3);let Warning$2=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let n in t)this[n]=t[n]}toString(){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}};var warning=Warning$2;Warning$2.default=Warning$2;let Warning$1=warning,Result$3=class{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new Warning$1(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}};var result=Result$3;Result$3.default=Result$3;let Container$1=container$1,Document$2=document$1,MapGenerator$1=mapGenerator,parse$2=parse_1,Result$2=result,Root$2=root$1,stringify$2=stringify_1$1,{isClean:isClean,my:my}=symbols;const TYPE_TO_CLASS_NAME={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},PLUGIN_PROPS={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},NOT_VISITORS={Once:!0,postcssPlugin:!0,prepare:!0},CHILDREN=0;function isPromise(e){return"object"==typeof e&&"function"==typeof e.then}function getEvents(e){let t=!1,n=TYPE_TO_CLASS_NAME[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,CHILDREN,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,CHILDREN,n+"Exit"]:[n,n+"Exit"]}function toStack(e){let t;return t="document"===e.type?["Document",CHILDREN,"DocumentExit"]:"root"===e.type?["Root",CHILDREN,"RootExit"]:getEvents(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function cleanMarks(e){return e[isClean]=!1,e.nodes&&e.nodes.forEach(e=>cleanMarks(e)),e}let postcss$1={},LazyResult$2=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof Result$2)o=cleanMarks(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=parse$2;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(i){this.processed=!0,this.error=i}o&&!o[my]&&Container$1.rebuild(o)}else o=cleanMarks(n);this.result=new Result$2(t,o,r),this.helpers={...postcss$1,postcss:postcss$1,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!PLUGIN_PROPS[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!NOT_VISITORS[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(isPromise(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[isClean];){e[isClean]=!0;let t=[toStack(e)];for(;t.length>0;){let e=this.visitTick(t);if(isPromise(e))try{await e}catch(e2){let n=t[t.length-1].node;throw this.handleError(e2,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e2){throw this.handleError(e2)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return isPromise(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=stringify$2;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new MapGenerator$1(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(isPromise(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[isClean];)e[isClean]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e2){throw this.handleError(e2,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(isPromise(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(e2){throw this.handleError(e2,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[isClean])return r[isClean]=!0,void e.push(toStack(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===CHILDREN)return void(n.nodes&&n.nodes.length&&(n[isClean]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[isClean]=!0;let t=getEvents(e);for(let n of t)if(n===CHILDREN)e.nodes&&e.each(e=>{e[isClean]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}};LazyResult$2.registerPostcss=e=>{postcss$1=e};var lazyResult=LazyResult$2;LazyResult$2.default=LazyResult$2,Root$2.registerLazyResult(LazyResult$2),Document$2.registerLazyResult(LazyResult$2);let MapGenerator=mapGenerator,parse$1=parse_1;const Result$1=result;let stringify$1=stringify_1$1,NoWorkResult$1=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=parse$1;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let o=stringify$1;this.result=new Result$1(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let a=new MapGenerator(o,r,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var noWorkResult=NoWorkResult$1;NoWorkResult$1.default=NoWorkResult$1;let Document$1=document$1,LazyResult$1=lazyResult,NoWorkResult=noWorkResult,Root$1=root$1,Processor$1=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new LazyResult$1(this,e,t):new NoWorkResult(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var processor=Processor$1;Processor$1.default=Processor$1,Root$1.registerProcessor(Processor$1),Document$1.registerProcessor(Processor$1);var define_process_env_default={};let AtRule=atRule,Comment=comment,Container=container$1,CssSyntaxError=cssSyntaxError,Declaration=declaration,Document=document$1,fromJSON=fromJSON_1,Input=input,LazyResult=lazyResult,list=list_1,Node$1=node,parse=parse_1,Processor=processor,Result=result,Root=root$1,Rule=rule,stringify=stringify_1$1,Warning=warning;function postcss(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Processor(e)}postcss.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),define_process_env_default.LANG&&define_process_env_default.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...n);return o.postcssPlugin=e,o.postcssVersion=(new Processor).version,o}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return postcss([o(n)]).process(e,t)},o},postcss.stringify=stringify,postcss.parse=parse,postcss.fromJSON=fromJSON,postcss.list=list,postcss.comment=e=>new Comment(e),postcss.atRule=e=>new AtRule(e),postcss.decl=e=>new Declaration(e),postcss.rule=e=>new Rule(e),postcss.root=e=>new Root(e),postcss.document=e=>new Document(e),postcss.CssSyntaxError=CssSyntaxError,postcss.Declaration=Declaration,postcss.Container=Container,postcss.Processor=Processor,postcss.Document=Document,postcss.Comment=Comment,postcss.Warning=Warning,postcss.AtRule=AtRule,postcss.Result=Result,postcss.Input=Input,postcss.Rule=Rule,postcss.Root=Root,postcss.Node=Node$1,LazyResult.registerPostcss(postcss);var postcss_1=postcss;postcss.default=postcss;const htmlparser=commonjs,escapeStringRegexp=escapeStringRegexp$1,{isPlainObject:isPlainObject}=isPlainObject$2,deepmerge=cjs,parseSrcset=parseSrcsetExports,{parse:postcssParse}=postcss_1,mediaTags=["img","audio","video","picture","svg","object","map","iframe","embed"],vulnerableTags=["script","style"];function each(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function has(e,t){return{}.hasOwnProperty.call(e,t)}function filter(e,t){const n=[];return each(e,function(e){t(e)&&n.push(e)}),n}function isEmptyObject(e){for(const t in e)if(has(e,t))return!1;return!0}function stringifySrcset(e){return e.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}var sanitizeHtml_1=sanitizeHtml;const VALID_HTML_ATTRIBUTE_NAME=/^[^\0\t\n\f\r /<=>]+$/;function sanitizeHtml(e,t,n){if(null==e)return"";"number"==typeof e&&(e=e.toString());let r="",o="";function i(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=r.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){if(m.length){m[m.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(m.length&&mediaTags.includes(this.tag)){m[m.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},sanitizeHtml.defaults,t)).parser=Object.assign({},htmlParserDefaults,t.parser);const a=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};vulnerableTags.forEach(function(e){a(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)});const s=t.nonTextTags||["script","style","textarea","option"];let l,c;t.allowedAttributes&&(l={},c={},each(t.allowedAttributes,function(e,t){l[t]=[];const n=[];e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(escapeStringRegexp(e).replace(/\\\*/g,".*")):l[t].push(e)}),n.length&&(c[t]=new RegExp("^("+n.join("|")+")$"))}));const u={},d={},p={};each(t.allowedClasses,function(e,t){if(l&&(has(l,t)||(l[t]=[]),l[t].push("class")),u[t]=e,Array.isArray(e)){const n=[];u[t]=[],p[t]=[],e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(escapeStringRegexp(e).replace(/\\\*/g,".*")):e instanceof RegExp?p[t].push(e):u[t].push(e)}),n.length&&(d[t]=new RegExp("^("+n.join("|")+")$"))}});const f={};let h,A,m,g,y,v,b;each(t.transformTags,function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=sanitizeHtml.simpleTransform(e)),"*"===t?h=n:f[t]=n});let x=!1;C();const w=new htmlparser.Parser({onopentag:function(e,n){if(t.onOpenTag&&t.onOpenTag(e,n),t.enforceHtmlBoundary&&"html"===e&&C(),v)return void b++;const w=new i(e,n);m.push(w);let k=!1;const P=!!w.text;let B;if(has(f,e)&&(B=f[e](e,n),w.attribs=n=B.attribs,void 0!==B.text&&(w.innerText=B.text),e!==B.tagName&&(w.name=e=B.tagName,y[A]=B.tagName)),h&&(B=h(e,n),w.attribs=n=B.attribs,e!==B.tagName&&(w.name=e=B.tagName,y[A]=B.tagName)),(!a(e)||"recursiveEscape"===t.disallowedTagsMode&&!isEmptyObject(g)||null!=t.nestingLimit&&A>=t.nestingLimit)&&(k=!0,g[A]=!0,"discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1!==s.indexOf(e)&&(v=!0,b=1)),A++,k){if("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode){if(w.innerText&&!P){const n=$(w.innerText);t.textFilter?r+=t.textFilter(n,e):r+=n,x=!0}return}o=r,r=""}r+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(w.innerText="");k&&("escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode)&&t.preserveEscapedAttributes?each(n,function(e,t){r+=" "+t+'="'+$(e||"",!0)+'"'}):(!l||has(l,e)||l["*"])&&each(n,function(n,o){if(!VALID_HTML_ATTRIBUTE_NAME.test(o))return void delete w.attribs[o];if(""===n&&!t.allowedEmptyAttributes.includes(o)&&(t.nonBooleanAttributes.includes(o)||t.nonBooleanAttributes.includes("*")))return void delete w.attribs[o];let i=!1;if(!l||has(l,e)&&-1!==l[e].indexOf(o)||l["*"]&&-1!==l["*"].indexOf(o)||has(c,e)&&c[e].test(o)||c["*"]&&c["*"].test(o))i=!0;else if(l&&l[e])for(const t of l[e])if(isPlainObject(t)&&t.name&&t.name===o){i=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(i){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(o)&&_(e,n))return void delete w.attribs[o];if("script"===e&&"src"===o){let e=!0;try{const r=S(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find(function(e){return e===r.url.hostname}),o=(t.allowedScriptDomains||[]).find(function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)});e=n||o}}catch(e2){e=!1}if(!e)return void delete w.attribs[o]}if("iframe"===e&&"src"===o){let e=!0;try{const r=S(n);if(r.isRelativeUrl)e=has(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find(function(e){return e===r.url.hostname}),o=(t.allowedIframeDomains||[]).find(function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)});e=n||o}}catch(e2){e=!1}if(!e)return void delete w.attribs[o]}if("srcset"===o)try{let e=parseSrcset(n);if(e.forEach(function(e){_("srcset",e.url)&&(e.evil=!0)}),e=filter(e,function(e){return!e.evil}),!e.length)return void delete w.attribs[o];n=stringifySrcset(filter(e,function(e){return!e.evil})),w.attribs[o]=n}catch(e2){return void delete w.attribs[o]}if("class"===o){const t=u[e],r=u["*"],i=d[e],a=p[e],s=p["*"],l=[i,d["*"]].concat(a,s).filter(function(e){return e});if(!(n=E(n,t&&r?deepmerge(t,r):t||r,l)).length)return void delete w.attribs[o]}if("style"===o)if(t.parseStyleAttributes)try{const r=function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?deepmerge(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(has(e,n.prop)){e[n.prop].some(function(e){return e.test(n.value)})&&t.push(n)}return t}}(r),[]));return e}(postcssParse(e+" {"+n+"}",{map:!1}),t.allowedStyles);if(n=function(e){return e.nodes[0].nodes.reduce(function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e},[]).join(";")}(r),0===n.length)return void delete w.attribs[o]}catch(e2){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+n+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete w.attribs[o]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");r+=" "+o,n&&n.length?r+='="'+$(n,!0)+'"':t.allowedEmptyAttributes.includes(o)&&(r+='=""')}else delete w.attribs[o]}),-1!==t.selfClosing.indexOf(e)?r+=" />":(r+=">",!w.innerText||P||t.textFilter||(r+=$(w.innerText),x=!0)),k&&(r=o+$(r),o=""),w.openingTagLength=r.length-w.tagPosition},ontext:function(e){if(v)return;const n=m[m.length-1];let o;if(n&&(o=n.tag,e=void 0!==n.innerText?n.innerText:e),"completelyDiscard"!==t.disallowedTagsMode||a(o))if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||"script"!==o&&"style"!==o)if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1===s.indexOf(o)){if(!x){const n=$(e,!1);t.textFilter?r+=t.textFilter(n,o):r+=n}}else r+=e;else r+=e;else e="";if(m.length){m[m.length-1].text+=e}},onclosetag:function(e,n){if(t.onCloseTag&&t.onCloseTag(e,n),v){if(b--,b)return;v=!1}const i=m.pop();if(!i)return;if(i.tag!==e)return void m.push(i);v=!!t.enforceHtmlBoundary&&"html"===e,A--;const s=g[A];if(s){if(delete g[A],"discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return void i.updateParentNodeText();o=r,r=""}if(y[A]&&(e=y[A],delete y[A]),t.exclusiveFilter){const e=t.exclusiveFilter(i);if("excludeTag"===e)return s&&(r=o,o=""),void(r=r.substring(0,i.tagPosition)+r.substring(i.tagPosition+i.openingTagLength));if(e)return void(r=r.substring(0,i.tagPosition))}i.updateParentNodeMediaChildren(),i.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||n&&!a(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?s&&(r=o,o=""):(r+="</"+e+">",s&&(r=o+$(r),o=""),x=!1)}},t.parser);if(w.write(e),w.end(),"escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode){const t=w.endIndex;if(null!=t&&t>=0&&t<e.length){const n=e.substring(t);r+=$(n)}else(null==t||t<0)&&e.length>0&&""===r&&(r=$(e))}return r;function C(){r="",A=0,m=[],g={},y={},v=!1,b=0}function $(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),n&&(e=e.replace(/"/g,"&quot;"))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),n&&(e=e.replace(/"/g,"&quot;")),e}function _(e,n){for(n=n.replace(/[\x00-\x20]+/g,"");;){const e=n.indexOf("\x3c!--");if(-1===e)break;const t=n.indexOf("--\x3e",e+4);if(-1===t)break;n=n.substring(0,e)+n.substring(t+3)}const r=n.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const o=r[1].toLowerCase();return has(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function S(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let r=0;r<100;r++)t+=`/${r}`;const n=new URL(e,t);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function E(e,t,n){return t?(e=e.split(/\s+/)).filter(function(e){return-1!==t.indexOf(e)||n.some(function(t){return t.test(e)})}).join(" "):e}}const htmlParserDefaults={decodeEntities:!0};sanitizeHtml.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},sanitizeHtml.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,o){let i;if(n)for(i in t)o[i]=t[i];else o=t;return{tagName:e,attribs:o}}};const sanitizeHtml$1=getDefaultExportFromCjs$1(sanitizeHtml_1),toPlainString=e=>{if(!e)return"";let t=new MarkdownIt({html:!1,breaks:!0,linkify:!0,typographer:!0}).render(e);return t=sanitizeHtml$1(t,{allowedTags:["b","i","a","code","pre","s","u","tg-spoiler","blockquote","br"],allowedAttributes:{a:["href"]},transformTags:{h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",a:"",strong:"",em:"",p:()=>"",ul:()=>"",li:()=>"• ",ol:()=>"",hr:()=>"\n",br:()=>"\n",div:()=>""}}),t.replaceAll(/\n[\s\n]*\n/g,"\n").trim()},getPriceScale=e=>{const t=Math.abs(e);if(t>=1){const e=Math.floor(Math.log10(t))+1;return Math.max(2,6-e)}return 8},signal_fields=[{type:Mn$1.Paper,transparentPaper:!0,fieldBottomMargin:"1",fields:[{type:Mn$1.Typography,typoVariant:"h6",placeholder:"General Information"},{type:Mn$1.Outline,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"symbol",title:"Symbol",readonly:!0,compute:e=>e.symbol||"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"position",title:"Position",readonly:!0,compute:e=>"long"===e.position?"LONG":"short"===e.position?"SHORT":"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"status",title:"Status",readonly:!0,compute:e=>({opened:"Opened",scheduled:"Scheduled",closed:"Closed",cancelled:"Cancelled"}[e.status]||e.status||"Unknown")},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"exchangeName",title:"Exchange",readonly:!0,compute:e=>e.exchangeName||"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"strategyName",title:"Strategy",readonly:!0,compute:e=>e.strategyName||"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"minuteEstimatedTime",title:"Estimated Time (min)",readonly:!0,compute:e=>{var t;return(null==(t=e.minuteEstimatedTime)?void 0:t.toString())||"Not specified"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"id",title:"Signal ID",readonly:!0,compute:e=>e.id||"Not specified",trailingIcon:CopyAll,trailingIconClick:async e=>{await oS(e)&&ioc.alertService.notify("Copied!")}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Timestamps"},{type:Mn$1.Outline,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"createdAt",title:"Created",readonly:!0,compute:e=>e.createdAt?dayjs(e.createdAt).format("DD/MM/YYYY HH:mm:ss"):""},{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"updatedAt",title:"Updated",readonly:!0,compute:e=>e.updatedAt?dayjs(e.updatedAt).format("DD/MM/YYYY HH:mm:ss"):""},{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"scheduledAt",title:"Scheduled",readonly:!0,isVisible:e=>!!e.scheduledAt,compute:e=>e.scheduledAt?dayjs(e.scheduledAt).format("DD/MM/YYYY HH:mm:ss"):""},{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"pendingAt",title:"Activated",readonly:!0,isVisible:e=>!!e.pendingAt,compute:e=>e.pendingAt?dayjs(e.pendingAt).format("DD/MM/YYYY HH:mm:ss"):"N/A"}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Price Levels"},{type:Mn$1.Outline,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"priceOpen",title:"Entry Price",readonly:!0,compute:e=>e.priceOpen?`${e.priceOpen.toFixed(getPriceScale(e.priceOpen))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"priceTakeProfit",title:"Take Profit",readonly:!0,compute:e=>e.priceTakeProfit?`${e.priceTakeProfit.toFixed(getPriceScale(e.priceTakeProfit))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"priceStopLoss",title:"Stop Loss",readonly:!0,compute:e=>e.priceStopLoss?`${e.priceStopLoss.toFixed(getPriceScale(e.priceStopLoss))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"originalPriceTakeProfit",title:"Original TP",readonly:!0,isVisible:e=>!!e.originalPriceTakeProfit&&e.originalPriceTakeProfit!==e.priceTakeProfit,compute:e=>e.originalPriceTakeProfit?`${e.originalPriceTakeProfit.toFixed(getPriceScale(e.originalPriceTakeProfit))}$`:""},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"originalPriceStopLoss",title:"Original SL",readonly:!0,isVisible:e=>!!e.originalPriceStopLoss&&e.originalPriceStopLoss!==e.priceStopLoss,compute:e=>e.originalPriceStopLoss?`${e.originalPriceStopLoss.toFixed(getPriceScale(e.originalPriceStopLoss))}$`:""},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"originalPriceOpen",title:"Original Entry",readonly:!0,isVisible:e=>!!e.originalPriceOpen&&e.originalPriceOpen!==e.priceOpen,compute:e=>e.originalPriceOpen?`${e.originalPriceOpen.toFixed(getPriceScale(e.originalPriceOpen))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"totalEntries",title:"Total Entries",readonly:!0,isVisible:e=>!!e.totalEntries&&e.totalEntries>1,compute:e=>e.totalEntries?String(e.totalEntries):"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"partialExecuted",title:"Partial Closed",readonly:!0,isVisible:e=>e.partialExecuted>0,compute:e=>{var t;return`${(null==(t=e.partialExecuted)?void 0:t.toFixed(2))||0}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"totalPartials",title:"Total Closes",readonly:!0,isVisible:e=>!!e.totalPartials&&e.totalPartials>0,compute:e=>String(e.totalPartials)},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"cost",title:"Cost",readonly:!0,isVisible:e=>!!e.cost,compute:e=>e.cost?`${e.cost.toFixed(2)}$`:"Not specified"}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Result (PNL)",isVisible:e=>"closed"===e.status&&e.pnl},{type:Mn$1.Outline,isVisible:e=>"closed"===e.status&&e.pnl,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.pnlPercentage",title:"PNL %",readonly:!0,compute:e=>{var t;const n=null==(t=e.pnl)?void 0:t.pnlPercentage;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.priceOpen",title:"Entry Price (w/ fees)",readonly:!0,compute:e=>{var t;return(null==(t=e.pnl)?void 0:t.priceOpen)?`${e.pnl.priceOpen.toFixed(getPriceScale(e.pnl.priceOpen))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.priceClose",title:"Exit Price",readonly:!0,compute:e=>{var t;return(null==(t=e.pnl)?void 0:t.priceClose)?`${e.pnl.priceClose.toFixed(getPriceScale(e.pnl.priceClose))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.pnlCost",title:"PNL ($)",readonly:!0,compute:e=>{var t;const n=null==(t=e.pnl)?void 0:t.pnlCost;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}$`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.pnlEntries",title:"Invested",readonly:!0,compute:e=>{var t;return(null==(t=e.pnl)?void 0:t.pnlEntries)?`${e.pnl.pnlEntries.toFixed(2)}$`:"N/A"}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Peak Profit",isVisible:e=>{var t;return!!(null==(t=e.peakProfit)?void 0:t.priceClose)}},{type:Mn$1.Outline,sx:{mb:3},isVisible:e=>{var t;return!!(null==(t=e.peakProfit)?void 0:t.priceClose)},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.pnlPercentage",title:"Peak Profit %",readonly:!0,compute:e=>{var t;const n=null==(t=e.peakProfit)?void 0:t.pnlPercentage;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.pnlCost",title:"Peak Profit ($)",readonly:!0,compute:e=>{var t;const n=null==(t=e.peakProfit)?void 0:t.pnlCost;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}$`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.priceOpen",title:"Entry Price",readonly:!0,compute:e=>{var t;return(null==(t=e.peakProfit)?void 0:t.priceOpen)?`${e.peakProfit.priceOpen.toFixed(getPriceScale(e.peakProfit.priceOpen))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.priceClose",title:"Peak Price",readonly:!0,compute:e=>{var t;return(null==(t=e.peakProfit)?void 0:t.priceClose)?`${e.peakProfit.priceClose.toFixed(getPriceScale(e.peakProfit.priceClose))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.pnlEntries",title:"Invested",readonly:!0,compute:e=>{var t;return(null==(t=e.peakProfit)?void 0:t.pnlEntries)?`${e.peakProfit.pnlEntries.toFixed(2)}$`:"N/A"}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Max Drawdown",isVisible:e=>{var t;return!!(null==(t=e.maxDrawdown)?void 0:t.priceClose)}},{type:Mn$1.Outline,sx:{mb:3},isVisible:e=>{var t;return!!(null==(t=e.maxDrawdown)?void 0:t.priceClose)},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.pnlPercentage",title:"Max Drawdown %",readonly:!0,compute:e=>{var t;const n=null==(t=e.maxDrawdown)?void 0:t.pnlPercentage;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.pnlCost",title:"Max Drawdown ($)",readonly:!0,compute:e=>{var t;const n=null==(t=e.maxDrawdown)?void 0:t.pnlCost;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}$`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.priceOpen",title:"Entry Price",readonly:!0,compute:e=>{var t;return(null==(t=e.maxDrawdown)?void 0:t.priceOpen)?`${e.maxDrawdown.priceOpen.toFixed(getPriceScale(e.maxDrawdown.priceOpen))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.priceClose",title:"Drawdown Price",readonly:!0,compute:e=>{var t;return(null==(t=e.maxDrawdown)?void 0:t.priceClose)?`${e.maxDrawdown.priceClose.toFixed(getPriceScale(e.maxDrawdown.priceClose))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.pnlEntries",title:"Invested",readonly:!0,compute:e=>{var t;return(null==(t=e.maxDrawdown)?void 0:t.pnlEntries)?`${e.maxDrawdown.pnlEntries.toFixed(2)}$`:"N/A"}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Note",isVisible:e=>!!e.note},{type:Mn$1.Outline,isVisible:e=>!!e.note,sx:{mb:3},fields:[{type:Mn$1.Component,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",element:({note:e})=>factory$1(Markdown,{content:e})},{type:Mn$1.Div,style:{display:"none"},child:{type:Mn$1.Text,name:"node_print",compute:({note:e})=>toPlainString(e)}}]},{type:Mn$1.Box,sx:{display:"grid",gridTemplateColumns:"auto 1fr"},fields:[{type:Mn$1.Component,element:({id:e})=>factory$1(uS,{label:"Signal ID",content:e})},{type:Mn$1.Div}]}]}],SignalView=({data:e})=>factory$1(Box$1,{sx:{height:"100%",width:"100%",pt:1},children:factory$1(nm,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:factory$1("div",{children:[factory$1(bf,{slots:defaultSlots,fields:signal_fields,handler:()=>e}),factory$1(Box$1,{sx:{paddingBottom:"65px"}})]})})});var defaultBindingOptions={allowDownsampling:!0};function bindToDevicePixelRatio(e,t){return void 0===t&&(t=defaultBindingOptions),new DevicePixelRatioBinding(e,t)}var DevicePixelRatioBinding=function(){function e(e,t){var n=this;this._resolutionMediaQueryList=null,this._resolutionListener=function(e){return n._onResolutionChanged()},this._canvasConfiguredListeners=[],this.canvas=e,this._canvasSize={width:this.canvas.clientWidth,height:this.canvas.clientHeight},this._options=t,this._configureCanvas(),this._installResolutionListener()}return e.prototype.destroy=function(){this._canvasConfiguredListeners.length=0,this._uninstallResolutionListener(),this.canvas=null},Object.defineProperty(e.prototype,"canvasSize",{get:function(){return{width:this._canvasSize.width,height:this._canvasSize.height}},enumerable:!0,configurable:!0}),e.prototype.resizeCanvas=function(e){this._canvasSize={width:e.width,height:e.height},this._configureCanvas()},Object.defineProperty(e.prototype,"pixelRatio",{get:function(){var e=this.canvas.ownerDocument.defaultView;if(null==e)throw new Error("No window is associated with the canvas");return e.devicePixelRatio>1||this._options.allowDownsampling?e.devicePixelRatio:1},enumerable:!0,configurable:!0}),e.prototype.subscribeCanvasConfigured=function(e){this._canvasConfiguredListeners.push(e)},e.prototype.unsubscribeCanvasConfigured=function(e){this._canvasConfiguredListeners=this._canvasConfiguredListeners.filter(function(t){return t!=e})},e.prototype._configureCanvas=function(){var e=this.pixelRatio;this.canvas.style.width=this._canvasSize.width+"px",this.canvas.style.height=this._canvasSize.height+"px",this.canvas.width=this._canvasSize.width*e,this.canvas.height=this._canvasSize.height*e,this._emitCanvasConfigured()},e.prototype._emitCanvasConfigured=function(){var e=this;this._canvasConfiguredListeners.forEach(function(t){return t.call(e)})},e.prototype._installResolutionListener=function(){if(null!==this._resolutionMediaQueryList)throw new Error("Resolution listener is already installed");var e=this.canvas.ownerDocument.defaultView;if(null==e)throw new Error("No window is associated with the canvas");var t=e.devicePixelRatio;this._resolutionMediaQueryList=e.matchMedia("all and (resolution: "+t+"dppx)"),this._resolutionMediaQueryList.addListener(this._resolutionListener)},e.prototype._uninstallResolutionListener=function(){null!==this._resolutionMediaQueryList&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},e.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},e.prototype._onResolutionChanged=function(){this._configureCanvas(),this._reinstallResolutionListener()},e}(),i,n;
1572
+ punycode$1.exports,function(e,t){!function(n){var r=t&&!t.nodeType&&t,o=e&&!e.nodeType&&e,i="object"==typeof commonjsGlobal&&commonjsGlobal;i.global!==i&&i.window!==i&&i.self!==i||(n=i);var a,s,l=2147483647,c=36,u=/^xn--/,d=/[^\x20-\x7E]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,A=String.fromCharCode;function m(e){throw new RangeError(f[e])}function g(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+g((e=e.replace(p,".")).split("."),t).join(".")}function v(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function b(e){return g(e,function(e){var t="";return e>65535&&(t+=A((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function x(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:c}function w(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function C(e,t,n){var r=0;for(e=n?h(e/700):e>>1,e+=h(e/t);e>455;r+=c)e=h(e/35);return h(r+36*e/(e+38))}function $(e){var t,n,r,o,i,a,s,u,d,p,f=[],A=e.length,g=0,y=128,v=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&m("not-basic"),f.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<A;){for(i=g,a=1,s=c;o>=A&&m("invalid-input"),((u=x(e.charCodeAt(o++)))>=c||u>h((l-g)/a))&&m("overflow"),g+=u*a,!(u<(d=s<=v?1:s>=v+26?26:s-v));s+=c)a>h(l/(p=c-d))&&m("overflow"),a*=p;v=C(g-i,t=f.length+1,0==i),h(g/t)>l-y&&m("overflow"),y+=h(g/t),g%=t,f.splice(g++,0,y)}return b(f)}function _(e){var t,n,r,o,i,a,s,u,d,p,f,g,y,b,x,$=[];for(g=(e=v(e)).length,t=128,n=0,i=72,a=0;a<g;++a)(f=e[a])<128&&$.push(A(f));for(r=o=$.length,o&&$.push("-");r<g;){for(s=l,a=0;a<g;++a)(f=e[a])>=t&&f<s&&(s=f);for(s-t>h((l-n)/(y=r+1))&&m("overflow"),n+=(s-t)*y,t=s,a=0;a<g;++a)if((f=e[a])<t&&++n>l&&m("overflow"),f==t){for(u=n,d=c;!(u<(p=d<=i?1:d>=i+26?26:d-i));d+=c)x=u-p,b=c-p,$.push(A(w(p+x%b,0))),u=h(x/b);$.push(A(w(u,0))),i=C(n,y,r==o),n=0,++r}++n,++t}return $.join("")}if(a={version:"1.4.1",ucs2:{decode:v,encode:b},decode:$,encode:_,toASCII:function(e){return y(e,function(e){return d.test(e)?"xn--"+_(e):e})},toUnicode:function(e){return y(e,function(e){return u.test(e)?$(e.slice(4).toLowerCase()):e})}},r&&o)if(e.exports==r)o.exports=a;else for(s in a)a.hasOwnProperty(s)&&(r[s]=a[s]);else n.punycode=a}(commonjsGlobal)}(punycode$1,punycode$1.exports);var punycodeExports=punycode$1.exports;const require$$0$1=getDefaultExportFromCjs$1(punycodeExports);var type=TypeError,hasMap="function"==typeof Map&&Map.prototype,mapSizeDescriptor=Object.getOwnPropertyDescriptor&&hasMap?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,mapSize=hasMap&&mapSizeDescriptor&&"function"==typeof mapSizeDescriptor.get?mapSizeDescriptor.get:null,mapForEach=hasMap&&Map.prototype.forEach,hasSet="function"==typeof Set&&Set.prototype,setSizeDescriptor=Object.getOwnPropertyDescriptor&&hasSet?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,setSize=hasSet&&setSizeDescriptor&&"function"==typeof setSizeDescriptor.get?setSizeDescriptor.get:null,setForEach=hasSet&&Set.prototype.forEach,hasWeakMap="function"==typeof WeakMap&&WeakMap.prototype,weakMapHas=hasWeakMap?WeakMap.prototype.has:null,hasWeakSet="function"==typeof WeakSet&&WeakSet.prototype,weakSetHas=hasWeakSet?WeakSet.prototype.has:null,hasWeakRef="function"==typeof WeakRef&&WeakRef.prototype,weakRefDeref=hasWeakRef?WeakRef.prototype.deref:null,booleanValueOf=Boolean.prototype.valueOf,objectToString=Object.prototype.toString,functionToString=Function.prototype.toString,$match=String.prototype.match,$slice=String.prototype.slice,$replace$1=String.prototype.replace,$toUpperCase=String.prototype.toUpperCase,$toLowerCase=String.prototype.toLowerCase,$test=RegExp.prototype.test,$concat$1=Array.prototype.concat,$join=Array.prototype.join,$arrSlice=Array.prototype.slice,$floor=Math.floor,bigIntValueOf="function"==typeof BigInt?BigInt.prototype.valueOf:null,gOPS=Object.getOwnPropertySymbols,symToString="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,hasShammedSymbols="function"==typeof Symbol&&"object"==typeof Symbol.iterator,toStringTag="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===hasShammedSymbols||"symbol")?Symbol.toStringTag:null,isEnumerable=Object.prototype.propertyIsEnumerable,gPO=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||$test.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-$floor(-e):$floor(e);if(r!==e){var o=String(r),i=$slice.call(t,o.length+1);return $replace$1.call(o,n,"$&_")+"."+$replace$1.call($replace$1.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return $replace$1.call(t,n,"$&_")}var utilInspect=require$$1$1,inspectCustom=utilInspect.custom,inspectSymbol=isSymbol(inspectCustom)?inspectCustom:null,quotes={__proto__:null,double:'"',single:"'"},quoteREs={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},objectInspect=function e(t,n,r,o){var i=n||{};if(has$4(i,"quoteStyle")&&!has$4(quotes,i.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$4(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!has$4(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$4(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$4(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return inspectString(t,i);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?addNumericSeparator(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?addNumericSeparator(t,c):c}var u=void 0===i.depth?5:i.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return isArray$3(t)?"[Array]":"[Object]";var d=getIndent(i,r);if(void 0===o)o=[];else if(indexOf(o,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(o=$arrSlice.call(o)).push(n),a){var s={depth:i.depth};return has$4(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,r+1,o)}return e(t,i,r+1,o)}if("function"==typeof t&&!isRegExp$1(t)){var f=nameOf(t),h=arrObjKeys(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+$join.call(h,", ")+" }":"")}if(isSymbol(t)){var A=hasShammedSymbols?$replace$1.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):symToString.call(t);return"object"!=typeof t||hasShammedSymbols?A:markBoxed(A)}if(isElement(t)){for(var m="<"+$toLowerCase.call(String(t.nodeName)),g=t.attributes||[],y=0;y<g.length;y++)m+=" "+g[y].name+"="+wrapQuotes(quote(g[y].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+$toLowerCase.call(String(t.nodeName))+">"}if(isArray$3(t)){if(0===t.length)return"[]";var v=arrObjKeys(t,p);return d&&!singleLineValues(v)?"["+indentedJoin(v,d)+"]":"[ "+$join.call(v,", ")+" ]"}if(isError(t)){var b=arrObjKeys(t,p);return"cause"in Error.prototype||!("cause"in t)||isEnumerable.call(t,"cause")?0===b.length?"["+String(t)+"]":"{ ["+String(t)+"] "+$join.call(b,", ")+" }":"{ ["+String(t)+"] "+$join.call($concat$1.call("[cause]: "+p(t.cause),b),", ")+" }"}if("object"==typeof t&&a){if(inspectSymbol&&"function"==typeof t[inspectSymbol]&&utilInspect)return utilInspect(t,{depth:u-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(isMap(t)){var x=[];return mapForEach&&mapForEach.call(t,function(e,n){x.push(p(n,t,!0)+" => "+p(e,t))}),collectionOf("Map",mapSize.call(t),x,d)}if(isSet(t)){var w=[];return setForEach&&setForEach.call(t,function(e){w.push(p(e,t))}),collectionOf("Set",setSize.call(t),w,d)}if(isWeakMap(t))return weakCollectionOf("WeakMap");if(isWeakSet(t))return weakCollectionOf("WeakSet");if(isWeakRef(t))return weakCollectionOf("WeakRef");if(isNumber(t))return markBoxed(p(Number(t)));if(isBigInt(t))return markBoxed(p(bigIntValueOf.call(t)));if(isBoolean(t))return markBoxed(booleanValueOf.call(t));if(isString(t))return markBoxed(p(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&t===globalThis||void 0!==commonjsGlobal&&t===commonjsGlobal)return"{ [object globalThis] }";if(!isDate(t)&&!isRegExp$1(t)){var C=arrObjKeys(t,p),$=gPO?gPO(t)===Object.prototype:t instanceof Object||t.constructor===Object,_=t instanceof Object?"":"null prototype",S=!$&&toStringTag&&Object(t)===t&&toStringTag in t?$slice.call(toStr$1(t),8,-1):_?"Object":"",E=($||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(S||_?"["+$join.call($concat$1.call([],S||[],_||[]),": ")+"] ":"");return 0===C.length?E+"{}":d?E+"{"+indentedJoin(C,d)+"}":E+"{ "+$join.call(C,", ")+" }"}return String(t)};function wrapQuotes(e,t,n){var r=n.quoteStyle||t,o=quotes[r];return o+e+o}function quote(e){return $replace$1.call(String(e),/"/g,"&quot;")}function canTrustToString(e){return!toStringTag||!("object"==typeof e&&(toStringTag in e||void 0!==e[toStringTag]))}function isArray$3(e){return"[object Array]"===toStr$1(e)&&canTrustToString(e)}function isDate(e){return"[object Date]"===toStr$1(e)&&canTrustToString(e)}function isRegExp$1(e){return"[object RegExp]"===toStr$1(e)&&canTrustToString(e)}function isError(e){return"[object Error]"===toStr$1(e)&&canTrustToString(e)}function isString(e){return"[object String]"===toStr$1(e)&&canTrustToString(e)}function isNumber(e){return"[object Number]"===toStr$1(e)&&canTrustToString(e)}function isBoolean(e){return"[object Boolean]"===toStr$1(e)&&canTrustToString(e)}function isSymbol(e){if(hasShammedSymbols)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!symToString)return!1;try{return symToString.call(e),!0}catch(e2){}return!1}function isBigInt(e){if(!e||"object"!=typeof e||!bigIntValueOf)return!1;try{return bigIntValueOf.call(e),!0}catch(e2){}return!1}var hasOwn$1=Object.prototype.hasOwnProperty||function(e){return e in this};function has$4(e,t){return hasOwn$1.call(e,t)}function toStr$1(e){return objectToString.call(e)}function nameOf(e){if(e.name)return e.name;var t=$match.call(functionToString.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function isMap(e){if(!mapSize||!e||"object"!=typeof e)return!1;try{mapSize.call(e);try{setSize.call(e)}catch(t){return!0}return e instanceof Map}catch(e2){}return!1}function isWeakMap(e){if(!weakMapHas||!e||"object"!=typeof e)return!1;try{weakMapHas.call(e,weakMapHas);try{weakSetHas.call(e,weakSetHas)}catch(t){return!0}return e instanceof WeakMap}catch(e2){}return!1}function isWeakRef(e){if(!weakRefDeref||!e||"object"!=typeof e)return!1;try{return weakRefDeref.call(e),!0}catch(e2){}return!1}function isSet(e){if(!setSize||!e||"object"!=typeof e)return!1;try{setSize.call(e);try{mapSize.call(e)}catch(t){return!0}return e instanceof Set}catch(e2){}return!1}function isWeakSet(e){if(!weakSetHas||!e||"object"!=typeof e)return!1;try{weakSetHas.call(e,weakSetHas);try{weakMapHas.call(e,weakMapHas)}catch(t){return!0}return e instanceof WeakSet}catch(e2){}return!1}function isElement(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}function inspectString(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return inspectString($slice.call(e,0,t.maxStringLength),t)+r}var o=quoteREs[t.quoteStyle||"single"];return o.lastIndex=0,wrapQuotes($replace$1.call($replace$1.call(e,o,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+$toUpperCase.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,n,r){return e+" ("+t+") {"+(r?indentedJoin(n,r):$join.call(n,", "))+"}"}function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}function getIndent(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=$join.call(Array(e.indent+1)," ")}return{base:n,prev:$join.call(Array(t+1),n)}}function indentedJoin(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+$join.call(e,","+n)+"\n"+t.prev}function arrObjKeys(e,t){var n=isArray$3(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=has$4(e,o)?t(e[o],e):""}var i,a="function"==typeof gOPS?gOPS(e):[];if(hasShammedSymbols){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var l in e)has$4(e,l)&&(n&&String(Number(l))===l&&l<e.length||hasShammedSymbols&&i["$"+l]instanceof Symbol||($test.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof gOPS)for(var c=0;c<a.length;c++)isEnumerable.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}var inspect$3=objectInspect,$TypeError$5=type,listGetNode=function(e,t,n){for(var r,o=e;null!=(r=o.next);o=r)if(r.key===t)return o.next=r.next,n||(r.next=e.next,e.next=r),r},listGet=function(e,t){if(e){var n=listGetNode(e,t);return n&&n.value}},listSet=function(e,t,n){var r=listGetNode(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},listHas=function(e,t){return!!e&&!!listGetNode(e,t)},listDelete=function(e,t){if(e)return listGetNode(e,t,!0)},sideChannelList=function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError$5("Side channel does not contain "+inspect$3(e))},delete:function(t){var n=e&&e.next,r=listDelete(e,t);return r&&n&&n===r&&(e=void 0),!!r},get:function(t){return listGet(e,t)},has:function(t){return listHas(e,t)},set:function(t,n){e||(e={next:void 0}),listSet(e,t,n)}};return t},esObjectAtoms=Object,esErrors=Error,_eval=EvalError,range=RangeError,ref=ReferenceError,syntax=SyntaxError,uri=URIError,abs$1=Math.abs,floor$1=Math.floor,max$2=Math.max,min$1=Math.min,pow$1=Math.pow,round$1=Math.round,_isNaN=Number.isNaN||function(e){return e!=e},$isNaN=_isNaN,sign$1=function(e){return $isNaN(e)||0===e?e:e<0?-1:1},gOPD=Object.getOwnPropertyDescriptor,$gOPD$1=gOPD;if($gOPD$1)try{$gOPD$1([],"length")}catch(e2){$gOPD$1=null}var gopd=$gOPD$1,$defineProperty$1=Object.defineProperty||!1;if($defineProperty$1)try{$defineProperty$1({},"a",{value:1})}catch(e2){$defineProperty$1=!1}var esDefineProperty=$defineProperty$1,shams,hasRequiredShams,hasSymbols$1,hasRequiredHasSymbols,Reflect_getPrototypeOf,hasRequiredReflect_getPrototypeOf,Object_getPrototypeOf,hasRequiredObject_getPrototypeOf;function requireShams(){return hasRequiredShams?shams:(hasRequiredShams=1,shams=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}function requireHasSymbols(){if(hasRequiredHasSymbols)return hasSymbols$1;hasRequiredHasSymbols=1;var e="undefined"!=typeof Symbol&&Symbol,t=requireShams();return hasSymbols$1=function(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}function requireReflect_getPrototypeOf(){return hasRequiredReflect_getPrototypeOf?Reflect_getPrototypeOf:(hasRequiredReflect_getPrototypeOf=1,Reflect_getPrototypeOf="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return hasRequiredObject_getPrototypeOf?Object_getPrototypeOf:(hasRequiredObject_getPrototypeOf=1,Object_getPrototypeOf=esObjectAtoms.getPrototypeOf||null)}var ERROR_MESSAGE="Function.prototype.bind called on incompatible ",toStr=Object.prototype.toString,max$1=Math.max,funcType="[object Function]",concatty=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var o=0;o<t.length;o+=1)n[o+e.length]=t[o];return n},slicy=function(e,t){for(var n=[],r=t,o=0;r<e.length;r+=1,o+=1)n[o]=e[r];return n},joiny=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},implementation$1=function(e){var t=this;if("function"!=typeof t||toStr.apply(t)!==funcType)throw new TypeError(ERROR_MESSAGE+t);for(var n,r=slicy(arguments,1),o=max$1(0,t.length-r.length),i=[],a=0;a<o;a++)i[a]="$"+a;if(n=Function("binder","return function ("+joiny(i,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof n){var o=t.apply(this,concatty(r,arguments));return Object(o)===o?o:this}return t.apply(e,concatty(r,arguments))}),t.prototype){var s=function(){};s.prototype=t.prototype,n.prototype=new s,s.prototype=null}return n},implementation=implementation$1,functionBind=Function.prototype.bind||implementation,functionCall,hasRequiredFunctionCall,functionApply,hasRequiredFunctionApply;function requireFunctionCall(){return hasRequiredFunctionCall?functionCall:(hasRequiredFunctionCall=1,functionCall=Function.prototype.call)}function requireFunctionApply(){return hasRequiredFunctionApply?functionApply:(hasRequiredFunctionApply=1,functionApply=Function.prototype.apply)}var reflectApply="undefined"!=typeof Reflect&&Reflect&&Reflect.apply,bind$2=functionBind,$apply$1=requireFunctionApply(),$call$2=requireFunctionCall(),$reflectApply=reflectApply,actualApply=$reflectApply||bind$2.call($call$2,$apply$1),bind$1=functionBind,$TypeError$4=type,$call$1=requireFunctionCall(),$actualApply=actualApply,callBindApplyHelpers=function(e){if(e.length<1||"function"!=typeof e[0])throw new $TypeError$4("a function is required");return $actualApply(bind$1,$call$1,e)},get,hasRequiredGet,getProto$1,hasRequiredGetProto,hasown,hasRequiredHasown,undefined$1;function requireGet(){if(hasRequiredGet)return get;hasRequiredGet=1;var e,t=callBindApplyHelpers,n=gopd;try{e=[].__proto__===Array.prototype}catch(e2){if(!e2||"object"!=typeof e2||!("code"in e2)||"ERR_PROTO_ACCESS"!==e2.code)throw e2}var r=!!e&&n&&n(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return get=r&&"function"==typeof r.get?t([r.get]):"function"==typeof i&&function(e){return i(null==e?e:o(e))}}function requireGetProto(){if(hasRequiredGetProto)return getProto$1;hasRequiredGetProto=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),n=requireGet();return getProto$1=e?function(t){return e(t)}:t?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:n?function(e){return n(e)}:null}function requireHasown(){if(hasRequiredHasown)return hasown;hasRequiredHasown=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty;return hasown=functionBind.call(e,t)}var $Object=esObjectAtoms,$Error=esErrors,$EvalError=_eval,$RangeError=range,$ReferenceError=ref,$SyntaxError=syntax,$TypeError$3=type,$URIError=uri,abs=abs$1,floor=floor$1,max=max$2,min=min$1,pow=pow$1,round=round$1,sign=sign$1,$Function=Function,getEvalledConstructor=function(e){try{return $Function('"use strict"; return ('+e+").constructor;")()}catch(e2){}},$gOPD=gopd,$defineProperty=esDefineProperty,throwTypeError=function(){throw new $TypeError$3},ThrowTypeError=$gOPD?function(){try{return throwTypeError}catch(e){try{return $gOPD(arguments,"callee").get}catch(t){return throwTypeError}}}():throwTypeError,hasSymbols=requireHasSymbols()(),getProto=requireGetProto(),$ObjectGPO=requireObject_getPrototypeOf(),$ReflectGPO=requireReflect_getPrototypeOf(),$apply=requireFunctionApply(),$call=requireFunctionCall(),needsEval={},TypedArray="undefined"!=typeof Uint8Array&&getProto?getProto(Uint8Array):undefined$1,INTRINSICS={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?undefined$1:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined$1:ArrayBuffer,"%ArrayIteratorPrototype%":hasSymbols&&getProto?getProto([][Symbol.iterator]()):undefined$1,"%AsyncFromSyncIteratorPrototype%":undefined$1,"%AsyncFunction%":needsEval,"%AsyncGenerator%":needsEval,"%AsyncGeneratorFunction%":needsEval,"%AsyncIteratorPrototype%":needsEval,"%Atomics%":"undefined"==typeof Atomics?undefined$1:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined$1:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?undefined$1:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?undefined$1:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined$1:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":$Error,"%eval%":eval,"%EvalError%":$EvalError,"%Float16Array%":"undefined"==typeof Float16Array?undefined$1:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?undefined$1:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined$1:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined$1:FinalizationRegistry,"%Function%":$Function,"%GeneratorFunction%":needsEval,"%Int8Array%":"undefined"==typeof Int8Array?undefined$1:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined$1:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined$1:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hasSymbols&&getProto?getProto(getProto([][Symbol.iterator]())):undefined$1,"%JSON%":"object"==typeof JSON?JSON:undefined$1,"%Map%":"undefined"==typeof Map?undefined$1:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&hasSymbols&&getProto?getProto((new Map)[Symbol.iterator]()):undefined$1,"%Math%":Math,"%Number%":Number,"%Object%":$Object,"%Object.getOwnPropertyDescriptor%":$gOPD,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined$1:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined$1:Proxy,"%RangeError%":$RangeError,"%ReferenceError%":$ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined$1:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined$1:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&hasSymbols&&getProto?getProto((new Set)[Symbol.iterator]()):undefined$1,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined$1:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hasSymbols&&getProto?getProto(""[Symbol.iterator]()):undefined$1,"%Symbol%":hasSymbols?Symbol:undefined$1,"%SyntaxError%":$SyntaxError,"%ThrowTypeError%":ThrowTypeError,"%TypedArray%":TypedArray,"%TypeError%":$TypeError$3,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined$1:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined$1:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined$1:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined$1:Uint32Array,"%URIError%":$URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined$1:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined$1:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined$1:WeakSet,"%Function.prototype.call%":$call,"%Function.prototype.apply%":$apply,"%Object.defineProperty%":$defineProperty,"%Object.getPrototypeOf%":$ObjectGPO,"%Math.abs%":abs,"%Math.floor%":floor,"%Math.max%":max,"%Math.min%":min,"%Math.pow%":pow,"%Math.round%":round,"%Math.sign%":sign,"%Reflect.getPrototypeOf%":$ReflectGPO};if(getProto)try{null.error}catch(e2){var errorProto=getProto(getProto(e2));INTRINSICS["%Error.prototype%"]=errorProto}var doEval=function e(t){var n;if("%AsyncFunction%"===t)n=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===t)n=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&getProto&&(n=getProto(o.prototype))}return INTRINSICS[t]=n,n},LEGACY_ALIASES={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},bind=functionBind,hasOwn=requireHasown(),$concat=bind.call($call,Array.prototype.concat),$spliceApply=bind.call($apply,Array.prototype.splice),$replace=bind.call($call,String.prototype.replace),$strSlice=bind.call($call,String.prototype.slice),$exec=bind.call($call,RegExp.prototype.exec),rePropName=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=function(e){var t=$strSlice(e,0,1),n=$strSlice(e,-1);if("%"===t&&"%"!==n)throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");var r=[];return $replace(e,rePropName,function(e,t,n,o){r[r.length]=n?$replace(o,reEscapeChar,"$1"):t||e}),r},getBaseIntrinsic=function(e,t){var n,r=e;if(hasOwn(LEGACY_ALIASES,r)&&(r="%"+(n=LEGACY_ALIASES[r])[0]+"%"),hasOwn(INTRINSICS,r)){var o=INTRINSICS[r];if(o===needsEval&&(o=doEval(r)),void 0===o&&!t)throw new $TypeError$3("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new $SyntaxError("intrinsic "+e+" does not exist!")},getIntrinsic=function(e,t){if("string"!=typeof e||0===e.length)throw new $TypeError$3("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new $TypeError$3('"allowMissing" argument must be a boolean');if(null===$exec(/^%?[^%]*%?$/,e))throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=stringToPath(e),r=n.length>0?n[0]:"",o=getBaseIntrinsic("%"+r+"%",t),i=o.name,a=o.value,s=!1,l=o.alias;l&&(r=l[0],$spliceApply(n,$concat([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var d=n[c],p=$strSlice(d,0,1),f=$strSlice(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===f||"'"===f||"`"===f)&&p!==f)throw new $SyntaxError("property names with quotes must have matching quotes");if("constructor"!==d&&u||(s=!0),hasOwn(INTRINSICS,i="%"+(r+="."+d)+"%"))a=INTRINSICS[i];else if(null!=a){if(!(d in a)){if(!t)throw new $TypeError$3("base intrinsic for "+e+" exists, but the property is not available.");return}if($gOPD&&c+1>=n.length){var h=$gOPD(a,d);a=(u=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:a[d]}else u=hasOwn(a,d),a=a[d];u&&!s&&(INTRINSICS[i]=a)}}return a},GetIntrinsic$2=getIntrinsic,callBindBasic=callBindApplyHelpers,$indexOf=callBindBasic([GetIntrinsic$2("%String.prototype.indexOf%")]),callBound$2=function(e,t){var n=GetIntrinsic$2(e,!!t);return"function"==typeof n&&$indexOf(e,".prototype.")>-1?callBindBasic([n]):n},GetIntrinsic$1=getIntrinsic,callBound$1=callBound$2,inspect$2=objectInspect,$TypeError$2=type,$Map=GetIntrinsic$1("%Map%",!0),$mapGet=callBound$1("Map.prototype.get",!0),$mapSet=callBound$1("Map.prototype.set",!0),$mapHas=callBound$1("Map.prototype.has",!0),$mapDelete=callBound$1("Map.prototype.delete",!0),$mapSize=callBound$1("Map.prototype.size",!0),sideChannelMap=!!$Map&&function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError$2("Side channel does not contain "+inspect$2(e))},delete:function(t){if(e){var n=$mapDelete(e,t);return 0===$mapSize(e)&&(e=void 0),n}return!1},get:function(t){if(e)return $mapGet(e,t)},has:function(t){return!!e&&$mapHas(e,t)},set:function(t,n){e||(e=new $Map),$mapSet(e,t,n)}};return t},GetIntrinsic=getIntrinsic,callBound=callBound$2,inspect$1=objectInspect,getSideChannelMap$1=sideChannelMap,$TypeError$1=type,$WeakMap=GetIntrinsic("%WeakMap%",!0),$weakMapGet=callBound("WeakMap.prototype.get",!0),$weakMapSet=callBound("WeakMap.prototype.set",!0),$weakMapHas=callBound("WeakMap.prototype.has",!0),$weakMapDelete=callBound("WeakMap.prototype.delete",!0),sideChannelWeakmap=$WeakMap?function(){var e,t,n={assert:function(e){if(!n.has(e))throw new $TypeError$1("Side channel does not contain "+inspect$1(e))},delete:function(n){if($WeakMap&&n&&("object"==typeof n||"function"==typeof n)){if(e)return $weakMapDelete(e,n)}else if(getSideChannelMap$1&&t)return t.delete(n);return!1},get:function(n){return $WeakMap&&n&&("object"==typeof n||"function"==typeof n)&&e?$weakMapGet(e,n):t&&t.get(n)},has:function(n){return $WeakMap&&n&&("object"==typeof n||"function"==typeof n)&&e?$weakMapHas(e,n):!!t&&t.has(n)},set:function(n,r){$WeakMap&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new $WeakMap),$weakMapSet(e,n,r)):getSideChannelMap$1&&(t||(t=getSideChannelMap$1()),t.set(n,r))}};return n}:getSideChannelMap$1,$TypeError=type,inspect=objectInspect,getSideChannelList=sideChannelList,getSideChannelMap=sideChannelMap,getSideChannelWeakMap=sideChannelWeakmap,makeChannel=getSideChannelWeakMap||getSideChannelMap||getSideChannelList,sideChannel=function(){var e,t={assert:function(e){if(!t.has(e))throw new $TypeError("Side channel does not contain "+inspect(e))},delete:function(t){return!!e&&e.delete(t)},get:function(t){return e&&e.get(t)},has:function(t){return!!e&&e.has(t)},set:function(t,n){e||(e=makeChannel()),e.set(t,n)}};return t},replace=String.prototype.replace,percentTwenties=/%20/g,Format={RFC1738:"RFC1738",RFC3986:"RFC3986"},formats$3={default:Format.RFC3986,formatters:{RFC1738:function(e){return replace.call(e,percentTwenties,"+")},RFC3986:function(e){return String(e)}},RFC1738:Format.RFC1738,RFC3986:Format.RFC3986},formats$2=formats$3,getSideChannel$1=sideChannel,has$3=Object.prototype.hasOwnProperty,isArray$2=Array.isArray,overflowChannel=getSideChannel$1(),markOverflow=function(e,t){return overflowChannel.set(e,t),e},isOverflow=function(e){return overflowChannel.has(e)},getMaxIndex=function(e){return overflowChannel.get(e)},setMaxIndex=function(e,t){overflowChannel.set(e,t)},hexTable=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),compactQueue=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(isArray$2(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}},arrayToObject=function(e,t){for(var n=t&&t.plainObjects?{__proto__:null}:{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},merge=function e(t,n,r){if(!n)return t;if("object"!=typeof n&&"function"!=typeof n){if(isArray$2(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];if(isOverflow(t)){var o=getMaxIndex(t)+1;t[o]=n,setMaxIndex(t,o)}else(r&&(r.plainObjects||r.allowPrototypes)||!has$3.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t){if(isOverflow(n)){for(var i=Object.keys(n),a=r&&r.plainObjects?{__proto__:null,0:t}:{0:t},s=0;s<i.length;s++){a[parseInt(i[s],10)+1]=n[i[s]]}return markOverflow(a,getMaxIndex(n)+1)}return[t].concat(n)}var l=t;return isArray$2(t)&&!isArray$2(n)&&(l=arrayToObject(t,r)),isArray$2(t)&&isArray$2(n)?(n.forEach(function(n,o){if(has$3.call(t,o)){var i=t[o];i&&"object"==typeof i&&n&&"object"==typeof n?t[o]=e(i,n,r):t.push(n)}else t[o]=n}),t):Object.keys(n).reduce(function(t,o){var i=n[o];return has$3.call(t,o)?t[o]=e(t[o],i,r):t[o]=i,t},l)},assign=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},decode=function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e2){return r}},limit=1024,encode=function(e,t,n,r,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",s=0;s<i.length;s+=limit){for(var l=i.length>=limit?i.slice(s,s+limit):i,c=[],u=0;u<l.length;++u){var d=l.charCodeAt(u);45===d||46===d||95===d||126===d||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||o===formats$2.RFC1738&&(40===d||41===d)?c[c.length]=l.charAt(u):d<128?c[c.length]=hexTable[d]:d<2048?c[c.length]=hexTable[192|d>>6]+hexTable[128|63&d]:d<55296||d>=57344?c[c.length]=hexTable[224|d>>12]+hexTable[128|d>>6&63]+hexTable[128|63&d]:(u+=1,d=65536+((1023&d)<<10|1023&l.charCodeAt(u)),c[c.length]=hexTable[240|d>>18]+hexTable[128|d>>12&63]+hexTable[128|d>>6&63]+hexTable[128|63&d])}a+=c.join("")}return a},compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var l=a[s],c=i[l];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:i,prop:l}),n.push(c))}return compactQueue(t),e},isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},isBuffer=function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},combine=function(e,t,n,r){if(isOverflow(e)){var o=getMaxIndex(e)+1;return e[o]=t,setMaxIndex(e,o),e}var i=[].concat(e,t);return i.length>n?markOverflow(arrayToObject(i,{plainObjects:r}),i.length-1):i},maybeMap=function(e,t){if(isArray$2(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},utils$2={arrayToObject:arrayToObject,assign:assign,combine:combine,compact:compact,decode:decode,encode:encode,isBuffer:isBuffer,isOverflow:isOverflow,isRegExp:isRegExp,maybeMap:maybeMap,merge:merge},getSideChannel=sideChannel,utils$1=utils$2,formats$1=formats$3,has$2=Object.prototype.hasOwnProperty,arrayPrefixGenerators={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},isArray$1=Array.isArray,push=Array.prototype.push,pushToArray=function(e,t){push.apply(e,isArray$1(t)?t:[t])},toISO=Date.prototype.toISOString,defaultFormat=formats$1.default,defaults$1={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:utils$1.encode,encodeValuesOnly:!1,filter:void 0,format:defaultFormat,formatter:formats$1.formatters[defaultFormat],indices:!1,serializeDate:function(e){return toISO.call(e)},skipNulls:!1,strictNullHandling:!1},isNonNullishPrimitive=function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e},sentinel={},stringify$4=function e(t,n,r,o,i,a,s,l,c,u,d,p,f,h,A,m,g,y){for(var v=t,b=y,x=0,w=!1;void 0!==(b=b.get(sentinel))&&!w;){var C=b.get(t);if(x+=1,void 0!==C){if(C===x)throw new RangeError("Cyclic object value");w=!0}void 0===b.get(sentinel)&&(x=0)}if("function"==typeof u?v=u(n,v):v instanceof Date?v=f(v):"comma"===r&&isArray$1(v)&&(v=utils$1.maybeMap(v,function(e){return e instanceof Date?f(e):e})),null===v){if(a)return c&&!m?c(n,defaults$1.encoder,g,"key",h):n;v=""}if(isNonNullishPrimitive(v)||utils$1.isBuffer(v))return c?[A(m?n:c(n,defaults$1.encoder,g,"key",h))+"="+A(c(v,defaults$1.encoder,g,"value",h))]:[A(n)+"="+A(String(v))];var $,_=[];if(void 0===v)return _;if("comma"===r&&isArray$1(v))m&&c&&(v=utils$1.maybeMap(v,c)),$=[{value:v.length>0?v.join(",")||null:void 0}];else if(isArray$1(u))$=u;else{var S=Object.keys(v);$=d?S.sort(d):S}var E=l?String(n).replace(/\./g,"%2E"):String(n),k=o&&isArray$1(v)&&1===v.length?E+"[]":E;if(i&&isArray$1(v)&&0===v.length)return k+"[]";for(var P=0;P<$.length;++P){var B=$[P],T="object"==typeof B&&B&&void 0!==B.value?B.value:v[B];if(!s||null!==T){var I=p&&l?String(B).replace(/\./g,"%2E"):String(B),L=isArray$1(v)?"function"==typeof r?r(k,I):k:k+(p?"."+I:"["+I+"]");y.set(t,x);var M=getSideChannel();M.set(sentinel,y),pushToArray(_,e(T,L,r,o,i,a,s,l,"comma"===r&&m&&isArray$1(v)?null:c,u,d,p,f,h,A,m,g,M))}}return _},normalizeStringifyOptions=function(e){if(!e)return defaults$1;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.encodeDotInKeys&&"boolean"!=typeof e.encodeDotInKeys)throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||defaults$1.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=formats$1.default;if(void 0!==e.format){if(!has$2.call(formats$1.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r,o=formats$1.formatters[n],i=defaults$1.filter;if(("function"==typeof e.filter||isArray$1(e.filter))&&(i=e.filter),r=e.arrayFormat in arrayPrefixGenerators?e.arrayFormat:"indices"in e?e.indices?"indices":"repeat":defaults$1.arrayFormat,"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var a=void 0===e.allowDots?!0===e.encodeDotInKeys||defaults$1.allowDots:!!e.allowDots;return{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:defaults$1.addQueryPrefix,allowDots:a,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults$1.allowEmptyArrays,arrayFormat:r,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults$1.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:void 0===e.delimiter?defaults$1.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:defaults$1.encode,encodeDotInKeys:"boolean"==typeof e.encodeDotInKeys?e.encodeDotInKeys:defaults$1.encodeDotInKeys,encoder:"function"==typeof e.encoder?e.encoder:defaults$1.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:defaults$1.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:defaults$1.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:defaults$1.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults$1.strictNullHandling}},stringify_1=function(e,t){var n,r=e,o=normalizeStringifyOptions(t);"function"==typeof o.filter?r=(0,o.filter)("",r):isArray$1(o.filter)&&(n=o.filter);var i=[];if("object"!=typeof r||null===r)return"";var a=arrayPrefixGenerators[o.arrayFormat],s="comma"===a&&o.commaRoundTrip;n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var l=getSideChannel(),c=0;c<n.length;++c){var u=n[c],d=r[u];o.skipNulls&&null===d||pushToArray(i,stringify$4(d,u,a,s,o.allowEmptyArrays,o.strictNullHandling,o.skipNulls,o.encodeDotInKeys,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var p=i.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),p.length>0?f+p:""},utils=utils$2,has$1=Object.prototype.hasOwnProperty,isArray=Array.isArray,defaults={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:utils.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},parseArrayValue=function(e,t,n){if(e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&n>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(1===t.arrayLimit?"":"s")+" allowed in an array.");return e},isoSentinel="utf8=%26%2310003%3B",charsetSentinel="utf8=%E2%9C%93",parseValues=function(e,t){var n={__proto__:null},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;r=r.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var o=t.parameterLimit===1/0?void 0:t.parameterLimit,i=r.split(t.delimiter,t.throwOnLimitExceeded?o+1:o);if(t.throwOnLimitExceeded&&i.length>o)throw new RangeError("Parameter limit exceeded. Only "+o+" parameter"+(1===o?"":"s")+" allowed.");var a,s=-1,l=t.charset;if(t.charsetSentinel)for(a=0;a<i.length;++a)0===i[a].indexOf("utf8=")&&(i[a]===charsetSentinel?l="utf-8":i[a]===isoSentinel&&(l="iso-8859-1"),s=a,a=i.length);for(a=0;a<i.length;++a)if(a!==s){var c,u,d=i[a],p=d.indexOf("]="),f=-1===p?d.indexOf("="):p+1;if(-1===f?(c=t.decoder(d,defaults.decoder,l,"key"),u=t.strictNullHandling?null:""):null!==(c=t.decoder(d.slice(0,f),defaults.decoder,l,"key"))&&(u=utils.maybeMap(parseArrayValue(d.slice(f+1),t,isArray(n[c])?n[c].length:0),function(e){return t.decoder(e,defaults.decoder,l,"value")})),u&&t.interpretNumericEntities&&"iso-8859-1"===l&&(u=interpretNumericEntities(String(u))),d.indexOf("[]=")>-1&&(u=isArray(u)?[u]:u),null!==c){var h=has$1.call(n,c);h&&"combine"===t.duplicates?n[c]=utils.combine(n[c],u,t.arrayLimit,t.plainObjects):h&&"last"!==t.duplicates||(n[c]=u)}}return n},parseObject=function(e,t,n,r){var o=0;if(e.length>0&&"[]"===e[e.length-1]){var i=e.slice(0,-1).join("");o=Array.isArray(t)&&t[i]?t[i].length:0}for(var a=r?t:parseArrayValue(t,n,o),s=e.length-1;s>=0;--s){var l,c=e[s];if("[]"===c&&n.parseArrays)l=utils.isOverflow(a)?a:n.allowEmptyArrays&&(""===a||n.strictNullHandling&&null===a)?[]:utils.combine([],a,n.arrayLimit,n.plainObjects);else{l=n.plainObjects?{__proto__:null}:{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,d=n.decodeDotInKeys?u.replace(/%2E/g,"."):u,p=parseInt(d,10);n.parseArrays||""!==d?!isNaN(p)&&c!==d&&String(p)===d&&p>=0&&n.parseArrays&&p<=n.arrayLimit?(l=[])[p]=a:"__proto__"!==d&&(l[d]=a):l={0:a}}a=l}return a},splitKeyIntoSegments=function(e,t){var n=t.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(t.depth<=0){if(!t.plainObjects&&has$1.call(Object.prototype,n)&&!t.allowPrototypes)return;return[n]}var r=/(\[[^[\]]*])/g,o=/(\[[^[\]]*])/.exec(n),i=o?n.slice(0,o.index):n,a=[];if(i){if(!t.plainObjects&&has$1.call(Object.prototype,i)&&!t.allowPrototypes)return;a.push(i)}for(var s=0;null!==(o=r.exec(n))&&s<t.depth;){s+=1;var l=o[1].slice(1,-1);if(!t.plainObjects&&has$1.call(Object.prototype,l)&&!t.allowPrototypes)return;a.push(o[1])}if(o){if(!0===t.strictDepth)throw new RangeError("Input depth exceeded depth option of "+t.depth+" and strictDepth is true");a.push("["+n.slice(o.index)+"]")}return a},parseKeys=function(e,t,n,r){if(e){var o=splitKeyIntoSegments(e,n);if(o)return parseObject(o,t,n,r)}},normalizeParseOptions=function(e){if(!e)return defaults;if(void 0!==e.allowEmptyArrays&&"boolean"!=typeof e.allowEmptyArrays)throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(void 0!==e.decodeDotInKeys&&"boolean"!=typeof e.decodeDotInKeys)throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(void 0!==e.throwOnLimitExceeded&&"boolean"!=typeof e.throwOnLimitExceeded)throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var t=void 0===e.charset?defaults.charset:e.charset,n=void 0===e.duplicates?defaults.duplicates:e.duplicates;if("combine"!==n&&"first"!==n&&"last"!==n)throw new TypeError("The duplicates option must be either combine, first, or last");return{allowDots:void 0===e.allowDots?!0===e.decodeDotInKeys||defaults.allowDots:!!e.allowDots,allowEmptyArrays:"boolean"==typeof e.allowEmptyArrays?!!e.allowEmptyArrays:defaults.allowEmptyArrays,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:defaults.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:defaults.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:defaults.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:defaults.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:defaults.comma,decodeDotInKeys:"boolean"==typeof e.decodeDotInKeys?e.decodeDotInKeys:defaults.decodeDotInKeys,decoder:"function"==typeof e.decoder?e.decoder:defaults.decoder,delimiter:"string"==typeof e.delimiter||utils.isRegExp(e.delimiter)?e.delimiter:defaults.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:defaults.depth,duplicates:n,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:defaults.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:defaults.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:defaults.plainObjects,strictDepth:"boolean"==typeof e.strictDepth?!!e.strictDepth:defaults.strictDepth,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:defaults.strictNullHandling,throwOnLimitExceeded:"boolean"==typeof e.throwOnLimitExceeded&&e.throwOnLimitExceeded}},parse$6=function(e,t){var n=normalizeParseOptions(t);if(""===e||null==e)return n.plainObjects?{__proto__:null}:{};for(var r="string"==typeof e?parseValues(e,n):e,o=n.plainObjects?{__proto__:null}:{},i=Object.keys(r),a=0;a<i.length;++a){var s=i[a],l=parseKeys(s,r[s],n,"string"==typeof e);o=utils.merge(o,l,n)}return!0===n.allowSparse?o:utils.compact(o)},stringify$3=stringify_1,parse$5=parse$6,formats=formats$3,lib={formats:formats,parse:parse$5,stringify:stringify$3};const require$$1=getDefaultExportFromCjs$1(lib);var punycode=require$$0$1;function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r","\n","\t"],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,unsafeProtocol={javascript:!0,"javascript:":!0},hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},querystring=require$$1;function urlParse(e,t,n){if(e&&"object"==typeof e&&e instanceof Url)return e;var r=new Url;return r.parse(e,t,n),r}function urlFormat(e){return"string"==typeof e&&(e=urlParse(e)),e instanceof Url?e.format():Url.prototype.format.call(e)}function urlResolve(e,t){return urlParse(e,!1,!0).resolve(t)}function urlResolveObject(e,t){return e?urlParse(e,!1,!0).resolveObject(t):t}Url.prototype.parse=function(e,t,n){if("string"!=typeof e)throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",i=e.split(o);i[0]=i[0].replace(/\\/g,"/");var a=e=i.join(o);if(a=a.trim(),!n&&1===e.split("#").length){var s=simplePathPattern.exec(a);if(s)return this.path=a,this.href=a,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?querystring.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var l=protocolPattern.exec(a);if(l){var c=(l=l[0]).toLowerCase();this.protocol=c,a=a.substr(l.length)}if(n||l||a.match(/^\/\/[^@/]+@[^@/]+/)){var u="//"===a.substr(0,2);!u||l&&hostlessProtocol[l]||(a=a.substr(2),this.slashes=!0)}if(!hostlessProtocol[l]&&(u||l&&!slashedProtocol[l])){for(var d,p,f=-1,h=0;h<hostEndingChars.length;h++){-1!==(A=a.indexOf(hostEndingChars[h]))&&(-1===f||A<f)&&(f=A)}-1!==(p=-1===f?a.lastIndexOf("@"):a.lastIndexOf("@",f))&&(d=a.slice(0,p),a=a.slice(p+1),this.auth=decodeURIComponent(d)),f=-1;for(h=0;h<nonHostChars.length;h++){var A;-1!==(A=a.indexOf(nonHostChars[h]))&&(-1===f||A<f)&&(f=A)}-1===f&&(f=a.length),this.host=a.slice(0,f),a=a.slice(f),this.parseHost(),this.hostname=this.hostname||"";var m="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!m)for(var g=this.hostname.split(/\./),y=(h=0,g.length);h<y;h++){var v=g[h];if(v&&!v.match(hostnamePartPattern)){for(var b="",x=0,w=v.length;x<w;x++)v.charCodeAt(x)>127?b+="x":b+=v[x];if(!b.match(hostnamePartPattern)){var C=g.slice(0,h),$=g.slice(h+1),_=v.match(hostnamePartStart);_&&(C.push(_[1]),$.unshift(_[2])),$.length&&(a="/"+$.join(".")+a),this.hostname=C.join(".");break}}}this.hostname.length>hostnameMaxLen?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=punycode.toASCII(this.hostname));var S=this.port?":"+this.port:"",E=this.hostname||"";this.host=E+S,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!unsafeProtocol[c])for(h=0,y=autoEscape.length;h<y;h++){var k=autoEscape[h];if(-1!==a.indexOf(k)){var P=encodeURIComponent(k);P===k&&(P=escape(k)),a=a.split(k).join(P)}}var B=a.indexOf("#");-1!==B&&(this.hash=a.substr(B),a=a.slice(0,B));var T=a.indexOf("?");if(-1!==T?(this.search=a.substr(T),this.query=a.substr(T+1),t&&(this.query=querystring.parse(this.query)),a=a.slice(0,T)):t&&(this.search="",this.query={}),a&&(this.pathname=a),slashedProtocol[c]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){S=this.pathname||"";var I=this.search||"";this.path=S+I}return this.href=this.format(),this},Url.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,i="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(i=querystring.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var a=this.search||i&&"?"+i||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||slashedProtocol[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),a&&"?"!==a.charAt(0)&&(a="?"+a),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(a=a.replace("#","%23"))+r},Url.prototype.resolve=function(e){return this.resolveObject(urlParse(e,!1,!0)).format()},Url.prototype.resolveObject=function(e){if("string"==typeof e){var t=new Url;t.parse(e,!1,!0),e=t}for(var n=new Url,r=Object.keys(this),o=0;o<r.length;o++){var i=r[o];n[i]=this[i]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var a=Object.keys(e),s=0;s<a.length;s++){var l=a[s];"protocol"!==l&&(n[l]=e[l])}return slashedProtocol[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname="/",n.path=n.pathname),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!slashedProtocol[e.protocol]){for(var c=Object.keys(e),u=0;u<c.length;u++){var d=c[u];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||hostlessProtocol[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var f=n.pathname||"",h=n.search||"";n.path=f+h}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var A=n.pathname&&"/"===n.pathname.charAt(0),m=e.host||e.pathname&&"/"===e.pathname.charAt(0),g=m||A||n.host&&e.pathname,y=g,v=n.pathname&&n.pathname.split("/")||[],b=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!slashedProtocol[n.protocol]);if(b&&(n.hostname="",n.port=null,n.host&&(""===v[0]?v[0]=n.host:v.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),g=g&&(""===p[0]||""===v[0])),m)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,v=p;else if(p.length)v||(v=[]),v.pop(),v=v.concat(p),n.search=e.search,n.query=e.query;else if(null!=e.search){if(b)n.host=v.shift(),n.hostname=n.host,(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.hostname=_.shift(),n.host=n.hostname);return n.search=e.search,n.query=e.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!v.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var x=v.slice(-1)[0],w=(n.host||e.host||v.length>1)&&("."===x||".."===x)||""===x,C=0,$=v.length;$>=0;$--)"."===(x=v[$])?v.splice($,1):".."===x?(v.splice($,1),C++):C&&(v.splice($,1),C--);if(!g&&!y)for(;C--;C)v.unshift("..");!g||""===v[0]||v[0]&&"/"===v[0].charAt(0)||v.unshift(""),w&&"/"!==v.join("/").substr(-1)&&v.push("");var _,S=""===v[0]||v[0]&&"/"===v[0].charAt(0);b&&(n.hostname=S?"":v.length?v.shift():"",n.host=n.hostname,(_=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=_.shift(),n.hostname=_.shift(),n.host=n.hostname));return(g=g||n.host&&v.length)&&!S&&v.unshift(""),v.length>0?n.pathname=v.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},Url.prototype.parseHost=function(){var e=this.host,t=portPattern.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};var parse$4=urlParse,resolve$1$1=urlResolve,resolveObject=urlResolveObject,format=urlFormat,Url_1=Url;function normalizeArray(e,t){for(var n=0,r=e.length-1;r>=0;r--){var o=e[r];"."===o?e.splice(r,1):".."===o?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function resolve$2(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:"/";if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");r&&(e=r+"/"+e,t="/"===r.charAt(0))}return(t?"/":"")+(e=normalizeArray(filter$1(e.split("/"),function(e){return!!e}),!t).join("/"))||"."}function filter$1(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var _globalThis=function(e){function t(){var t=this||self;return delete e.prototype.__magic__,t}return"object"==typeof globalThis?globalThis:this?t():(e.defineProperty(e.prototype,"__magic__",{configurable:!0,get:t}),__magic__)}(Object),formatImport=format,parseImport=parse$4,resolveImport=resolve$1$1,UrlImport=Url_1,URL$1=_globalThis.URL,URLSearchParams=_globalThis.URLSearchParams,percentRegEx=/%/g,backslashRegEx=/\\/g,newlineRegEx=/\n/g,carriageReturnRegEx=/\r/g,tabRegEx=/\t/g,CHAR_FORWARD_SLASH=47;function isURLInstance(e){var t=null!=e?e:null;return Boolean(null!==t&&(null==t?void 0:t.href)&&(null==t?void 0:t.origin))}function getPathFromURLPosix(e){if(""!==e.hostname)throw new TypeError('File URL host must be "localhost" or empty on browser');for(var t=e.pathname,n=0;n<t.length;n++)if("%"===t[n]){var r=32|t.codePointAt(n+2);if("2"===t[n+1]&&102===r)throw new TypeError("File URL path must not include encoded / characters")}return decodeURIComponent(t)}function encodePathChars(e){return e.includes("%")&&(e=e.replace(percentRegEx,"%25")),e.includes("\\")&&(e=e.replace(backslashRegEx,"%5C")),e.includes("\n")&&(e=e.replace(newlineRegEx,"%0A")),e.includes("\r")&&(e=e.replace(carriageReturnRegEx,"%0D")),e.includes("\t")&&(e=e.replace(tabRegEx,"%09")),e}var domainToASCII=function(e){if(void 0===e)throw new TypeError('The "domain" argument must be specified');return new URL$1("http://"+e).hostname},domainToUnicode=function(e){if(void 0===e)throw new TypeError('The "domain" argument must be specified');return new URL$1("http://"+e).hostname},pathToFileURL$2=function(e){var t=new URL$1("file://"),n=resolve$2(e);return e.charCodeAt(e.length-1)===CHAR_FORWARD_SLASH&&"/"!==n[n.length-1]&&(n+="/"),t.pathname=encodePathChars(n),t},fileURLToPath$1=function(e){if(!isURLInstance(e)&&"string"!=typeof e)throw new TypeError('The "path" argument must be of type string or an instance of URL. Received type '+typeof e+" ("+e+")");var t=new URL$1(e);if("file:"!==t.protocol)throw new TypeError("The URL must be of scheme file");return getPathFromURLPosix(t)},formatImportWithOverloads=function(e,t){var n,r,o;if(void 0===t&&(t={}),!(e instanceof URL$1))return formatImport(e);if("object"!=typeof t||null===t)throw new TypeError('The "options" argument must be of type object.');var i=null==(n=t.auth)||n,a=null==(r=t.fragment)||r,s=null==(o=t.search)||o;t.unicode;var l=new URL$1(e.toString());return i||(l.username="",l.password=""),a||(l.hash=""),s||(l.search=""),l.toString()},api={format:formatImportWithOverloads,parse:parseImport,resolve:resolveImport,resolveObject:resolveObject,Url:UrlImport,URL:URL$1,URLSearchParams:URLSearchParams,domainToASCII:domainToASCII,domainToUnicode:domainToUnicode,pathToFileURL:pathToFileURL$2,fileURLToPath:fileURLToPath$1};const url=Object.freeze(Object.defineProperty({__proto__:null,URL:URL$1,URLSearchParams:URLSearchParams,Url:UrlImport,default:api,domainToASCII:domainToASCII,domainToUnicode:domainToUnicode,fileURLToPath:fileURLToPath$1,format:formatImportWithOverloads,parse:parseImport,pathToFileURL:pathToFileURL$2,resolve:resolveImport,resolveObject:resolveObject},Symbol.toStringTag,{value:"Module"})),require$$2=getAugmentedNamespace(url);var empty=null;const empty$1=Object.freeze(Object.defineProperty({__proto__:null,default:empty},Symbol.toStringTag,{value:"Module"})),require$$0=getAugmentedNamespace(empty$1);let{existsSync:existsSync,readFileSync:readFileSync}=require$$0,{dirname:dirname$1,join:join}=pathBrowserify,{SourceMapConsumer:SourceMapConsumer$2,SourceMapGenerator:SourceMapGenerator$2}=require$$1$1;function fromBase64(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let PreviousMap$2=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let 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=dirname$1(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new SourceMapConsumer$2(this.text)),this.consumerCache}decodeInline(e){let t=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(t)return decodeURIComponent(e.substr(t[0].length));let n=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(n)return fromBase64(e.substr(n[0].length));let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/g);if(!t)return;let n=e.lastIndexOf(t.pop()),r=e.indexOf("*/",n);n>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(n,r)))}loadFile(e){if(this.root=dirname$1(e),existsSync(e))return this.mapFile=e,readFileSync(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof SourceMapConsumer$2)return SourceMapGenerator$2.fromSourceMap(t).toString();if(t instanceof SourceMapGenerator$2)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let n=t(e);if(n){let e=this.loadFile(n);if(!e)throw new Error("Unable to load previous source map: "+n.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=join(dirname$1(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var previousMap=PreviousMap$2;PreviousMap$2.default=PreviousMap$2;let{nanoid:nanoid}=nonSecure,{isAbsolute:isAbsolute,resolve:resolve$1}=pathBrowserify,{SourceMapConsumer:SourceMapConsumer$1,SourceMapGenerator:SourceMapGenerator$1}=require$$1$1,{fileURLToPath:fileURLToPath,pathToFileURL:pathToFileURL$1}=require$$2,CssSyntaxError$1=cssSyntaxError,PreviousMap$1=previousMap,terminalHighlight=require$$1$1,lineToIndexCache=Symbol("lineToIndexCache"),sourceMapAvailable$1=Boolean(SourceMapConsumer$1&&SourceMapGenerator$1),pathAvailable$1=Boolean(resolve$1&&isAbsolute);function getLineToIndex(e){if(e[lineToIndexCache])return e[lineToIndexCache];let t=e.css.split("\n"),n=new Array(t.length),r=0;for(let o=0,i=t.length;o<i;o++)n[o]=r,r+=t[o].length+1;return e[lineToIndexCache]=n,n}let Input$4=class{get from(){return this.file||this.id}constructor(e,t={}){if(null==e||"object"==typeof 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,this.document=this.css,t.document&&(this.document=t.document.toString()),t.from&&(!pathAvailable$1||/^\w+:\/\//.test(t.from)||isAbsolute(t.from)?this.file=t.from:this.file=resolve$1(t.from)),pathAvailable$1&&sourceMapAvailable$1){let e=new PreviousMap$1(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+nanoid(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,n,r={}){let o,i,a,s,l;if(t&&"object"==typeof t){let e=t,r=n;if("number"==typeof e.offset){s=e.offset;let r=this.fromOffset(s);t=r.line,n=r.col}else t=e.line,n=e.column,s=this.fromLineAndColumn(t,n);if("number"==typeof r.offset){a=r.offset;let e=this.fromOffset(a);i=e.line,o=e.col}else i=r.line,o=r.column,a=this.fromLineAndColumn(r.line,r.column)}else if(n)s=this.fromLineAndColumn(t,n);else{s=t;let e=this.fromOffset(s);t=e.line,n=e.col}let c=this.origin(t,n,i,o);return l=c?new CssSyntaxError$1(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,r.plugin):new CssSyntaxError$1(e,void 0===i?t:{column:n,line:t},void 0===i?n:{column:o,line:i},this.css,this.file,r.plugin),l.input={column:n,endColumn:o,endLine:i,endOffset:a,line:t,offset:s,source:this.css},this.file&&(pathToFileURL$1&&(l.input.url=pathToFileURL$1(this.file).toString()),l.input.file=this.file),l}fromLineAndColumn(e,t){return getLineToIndex(this)[e-1]+t-1}fromOffset(e){let t=getLineToIndex(this),n=0;if(e>=t[t.length-1])n=t.length-1;else{let r,o=t.length-2;for(;n<o;)if(r=n+(o-n>>1),e<t[r])o=r-1;else{if(!(e>=t[r+1])){n=r;break}n=r+1}}return{col:e-t[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:resolve$1(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,n,r){if(!this.map)return!1;let o,i,a=this.map.consumer(),s=a.originalPositionFor({column:t,line:e});if(!s.source)return!1;"number"==typeof n&&(o=a.originalPositionFor({column:r,line:n})),i=isAbsolute(s.source)?pathToFileURL$1(s.source):new URL(s.source,this.map.consumer().sourceRoot||pathToFileURL$1(this.map.mapFile));let l={column:s.column,endColumn:o&&o.column,endLine:o&&o.line,line:s.line,url:i.toString()};if("file:"===i.protocol){if(!fileURLToPath)throw new Error("file: protocol is not available in this PostCSS build");l.file=fileURLToPath(i)}let c=a.sourceContentFor(s.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var input=Input$4;Input$4.default=Input$4,terminalHighlight&&terminalHighlight.registerInput&&terminalHighlight.registerInput(Input$4);let Container$4=container$1,LazyResult$3,Processor$2,Root$5=class extends Container$4{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,n){let r=super.normalize(e);if(t)if("prepend"===n)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before;return r}removeChild(e,t){let n=this.index(e);return!t&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),super.removeChild(e)}toResult(e={}){return new LazyResult$3(new Processor$2,this,e).stringify()}};Root$5.registerLazyResult=e=>{LazyResult$3=e},Root$5.registerProcessor=e=>{Processor$2=e};var root$1=Root$5;Root$5.default=Root$5,Container$4.registerRoot(Root$5);let list$2={comma:e=>list$2.split(e,[","],!0),space:e=>list$2.split(e,[" ","\n","\t"]),split(e,t,n){let r=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let u of e)c?c=!1:"\\"===u?c=!0:s?u===l&&(s=!1):'"'===u||"'"===u?(s=!0,l=u):"("===u?a+=1:")"===u?a>0&&(a-=1):0===a&&t.includes(u)&&(i=!0),i?(""!==o&&r.push(o.trim()),o="",i=!1):o+=u;return(n||""!==o)&&r.push(o.trim()),r}};var list_1=list$2;list$2.default=list$2;let Container$3=container$1,list$1=list_1,Rule$3=class extends Container$3{get selectors(){return list$1.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var rule=Rule$3;Rule$3.default=Rule$3,Container$3.registerRule(Rule$3);let AtRule$2=atRule,Comment$2=comment,Declaration$2=declaration,Input$3=input,PreviousMap=previousMap,Root$4=root$1,Rule$2=rule;function fromJSON$1(e,t){if(Array.isArray(e))return e.map(e=>fromJSON$1(e));let{inputs:n,...r}=e;if(n){t=[];for(let e of n){let n={...e,__proto__:Input$3.prototype};n.map&&(n.map={...n.map,__proto__:PreviousMap.prototype}),t.push(n)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>fromJSON$1(e,t))),r.source){let{inputId:e,...n}=r.source;r.source=n,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Root$4(r);if("decl"===r.type)return new Declaration$2(r);if("rule"===r.type)return new Rule$2(r);if("comment"===r.type)return new Comment$2(r);if("atrule"===r.type)return new AtRule$2(r);throw new Error("Unknown node type: "+e.type)}var fromJSON_1=fromJSON$1;fromJSON$1.default=fromJSON$1;let{dirname:dirname,relative:relative,resolve:resolve,sep:sep}=pathBrowserify,{SourceMapConsumer:SourceMapConsumer,SourceMapGenerator:SourceMapGenerator}=require$$1$1,{pathToFileURL:pathToFileURL}=require$$2,Input$2=input,sourceMapAvailable=Boolean(SourceMapConsumer&&SourceMapGenerator),pathAvailable=Boolean(dirname&&resolve&&relative&&sep),MapGenerator$2=class{constructor(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}addAnnotation(){let 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";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,n=this.toUrl(this.path(e.file)),r=e.root||dirname(e.file);!1===this.mapOpts.sourcesContent?(t=new SourceMapConsumer(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,n,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),pathAvailable&&sourceMapAvailable&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=SourceMapGenerator.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new SourceMapGenerator({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]}generateString(){this.css="",this.map=new SourceMapGenerator({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,n=1,r=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(a,s,l)=>{if(this.css+=a,s&&"end"!==l&&(i.generated.line=n,i.generated.column=r-1,s.source&&s.source.start?(i.source=this.sourcePath(s),i.original.line=s.source.start.line,i.original.column=s.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),t=a.match(/\n/g),t?(n+=t.length,e=a.lastIndexOf("\n"),r=a.length-e):r+=a.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(i.source=this.sourcePath(s),i.original.line=s.source.end.line,i.original.column=s.source.end.column-1,i.generated.line=n,i.generated.column=r-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=r-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let n=this.opts.to?dirname(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(n=dirname(resolve(n,this.mapOpts.annotation)));let r=relative(n,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Input$2(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let n=t.source.input.from;if(n&&!e[n]){e[n]=!0;let r=this.usesFileUrls?this.toFileUrl(n):this.toUrl(this.path(n));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(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))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(pathToFileURL){let t=pathToFileURL(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===sep&&(e=e.replace(/\\/g,"/"));let n=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,n),n}};var mapGenerator=MapGenerator$2;const SINGLE_QUOTE="'".charCodeAt(0),DOUBLE_QUOTE='"'.charCodeAt(0),BACKSLASH="\\".charCodeAt(0),SLASH="/".charCodeAt(0),NEWLINE="\n".charCodeAt(0),SPACE=" ".charCodeAt(0),FEED="\f".charCodeAt(0),TAB="\t".charCodeAt(0),CR="\r".charCodeAt(0),OPEN_SQUARE="[".charCodeAt(0),CLOSE_SQUARE="]".charCodeAt(0),OPEN_PARENTHESES="(".charCodeAt(0),CLOSE_PARENTHESES=")".charCodeAt(0),OPEN_CURLY="{".charCodeAt(0),CLOSE_CURLY="}".charCodeAt(0),SEMICOLON=";".charCodeAt(0),ASTERISK="*".charCodeAt(0),COLON=":".charCodeAt(0),AT="@".charCodeAt(0),RE_AT_END=/[\t\n\f\r "#'()/;[\\\]{}]/g,RE_WORD_END=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,RE_BAD_BRACKET=/.[\r\n"'(/\\]/,RE_HEX_ESCAPE=/[\da-f]/i;var tokenize=function(e,t={}){let n,r,o,i,a,s,l,c,u,d,p=e.css.valueOf(),f=t.ignoreErrors,h=p.length,A=0,m=[],g=[];function y(t){throw e.error("Unclosed "+t,A)}return{back:function(e){g.push(e)},endOfFile:function(){return 0===g.length&&A>=h},nextToken:function(e){if(g.length)return g.pop();if(A>=h)return;let t=!!e&&e.ignoreUnclosed;switch(n=p.charCodeAt(A),n){case NEWLINE:case SPACE:case TAB:case CR:case FEED:i=A;do{i+=1,n=p.charCodeAt(i)}while(n===SPACE||n===NEWLINE||n===TAB||n===CR||n===FEED);s=["space",p.slice(A,i)],A=i-1;break;case OPEN_SQUARE:case CLOSE_SQUARE:case OPEN_CURLY:case CLOSE_CURLY:case COLON:case SEMICOLON:case CLOSE_PARENTHESES:{let e=String.fromCharCode(n);s=[e,e,A];break}case OPEN_PARENTHESES:if(d=m.length?m.pop()[1]:"",u=p.charCodeAt(A+1),"url"===d&&u!==SINGLE_QUOTE&&u!==DOUBLE_QUOTE&&u!==SPACE&&u!==NEWLINE&&u!==TAB&&u!==FEED&&u!==CR){i=A;do{if(l=!1,i=p.indexOf(")",i+1),-1===i){if(f||t){i=A;break}y("bracket")}for(c=i;p.charCodeAt(c-1)===BACKSLASH;)c-=1,l=!l}while(l);s=["brackets",p.slice(A,i+1),A,i],A=i}else i=p.indexOf(")",A+1),r=p.slice(A,i+1),-1===i||RE_BAD_BRACKET.test(r)?s=["(","(",A]:(s=["brackets",r,A,i],A=i);break;case SINGLE_QUOTE:case DOUBLE_QUOTE:a=n===SINGLE_QUOTE?"'":'"',i=A;do{if(l=!1,i=p.indexOf(a,i+1),-1===i){if(f||t){i=A+1;break}y("string")}for(c=i;p.charCodeAt(c-1)===BACKSLASH;)c-=1,l=!l}while(l);s=["string",p.slice(A,i+1),A,i],A=i;break;case AT:RE_AT_END.lastIndex=A+1,RE_AT_END.test(p),i=0===RE_AT_END.lastIndex?p.length-1:RE_AT_END.lastIndex-2,s=["at-word",p.slice(A,i+1),A,i],A=i;break;case BACKSLASH:for(i=A,o=!0;p.charCodeAt(i+1)===BACKSLASH;)i+=1,o=!o;if(n=p.charCodeAt(i+1),o&&n!==SLASH&&n!==SPACE&&n!==NEWLINE&&n!==TAB&&n!==CR&&n!==FEED&&(i+=1,RE_HEX_ESCAPE.test(p.charAt(i)))){for(;RE_HEX_ESCAPE.test(p.charAt(i+1));)i+=1;p.charCodeAt(i+1)===SPACE&&(i+=1)}s=["word",p.slice(A,i+1),A,i],A=i;break;default:n===SLASH&&p.charCodeAt(A+1)===ASTERISK?(i=p.indexOf("*/",A+2)+1,0===i&&(f||t?i=p.length:y("comment")),s=["comment",p.slice(A,i+1),A,i],A=i):(RE_WORD_END.lastIndex=A+1,RE_WORD_END.test(p),i=0===RE_WORD_END.lastIndex?p.length-1:RE_WORD_END.lastIndex-2,s=["word",p.slice(A,i+1),A,i],m.push(s),A=i)}return A++,s},position:function(){return A}}};let AtRule$1=atRule,Comment$1=comment,Declaration$1=declaration,Root$3=root$1,Rule$1=rule,tokenizer=tokenize;const SAFE_COMMENT_NEIGHBOR={empty:!0,space:!0};function findLastWithPosition(e){for(let t=e.length-1;t>=0;t--){let n=e[t],r=n[3]||n[2];if(r)return r}}let Parser$1=class{constructor(e){this.input=e,this.root=new Root$3,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,n,r,o=new AtRule$1;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,s=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(s.length>0){for(r=s.length-1,n=s[r];n&&"space"===n[0];)n=s[--r];n&&(o.source.end=this.getPosition(n[3]||n[2]),o.source.end.offset++)}this.end(e);break}s.push(e)}else s.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(s),s.length?(o.raws.afterName=this.spacesAndCommentsFromStart(s),this.raw(o,"params",s),i&&(e=s[s.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let n,r=0;for(let o=t-1;o>=0&&(n=e[o],"space"===n[0]||(r+=1,2!==r));o--);throw this.input.error("Missed semicolon","word"===n[0]?n[3]+1:n[2])}colon(e){let t,n,r,o=0;for(let[i,a]of e.entries()){if(n=a,r=n[0],"("===r&&(o+=1),")"===r&&(o-=1),0===o&&":"===r){if(t){if("word"===t[0]&&"progid"===t[1])continue;return i}this.doubleColon(n)}t=n}return!1}comment(e){let t=new Comment$1;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=tokenizer(this.input)}decl(e,t){let n=new Declaration$1;this.init(n,e[0][2]);let r,o=e[e.length-1];for(";"===o[0]&&(this.semicolon=!0,e.pop()),n.source.end=this.getPosition(o[3]||o[2]||findLastWithPosition(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;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;n.prop+=e.shift()[1]}for(n.raws.between="";e.length;){if(r=e.shift(),":"===r[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));let i,a=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a.push(e.shift());this.precheckMissedSemicolon(e);for(let l=e.length-1;l>=0;l--){if(r=e[l],"!important"===r[1].toLowerCase()){n.important=!0;let t=this.stringFrom(e,l);t=this.spacesFromEnd(e)+t," !important"!==t&&(n.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=l;e>0;e--){let n=t[e][0];if(r.trim().startsWith("!")&&"space"!==n)break;r=t.pop()[1]+r}r.trim().startsWith("!")&&(n.important=!0,n.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}let s=e.some(e=>"space"!==e[0]&&"comment"!==e[0]);s&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(e),t),n.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Rule$1;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(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)}endFile(){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())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&"rule"===t.type&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="",t.source.end=this.getPosition(e[2]),t.source.end.offset+=t.raws.ownSemicolon.length)}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(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)}other(e){let t=!1,n=null,r=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(n=l[0],s.push(l),"("===n||"["===n)o||(o=l),i.push("("===n?")":"]");else if(a&&r&&"{"===n)o||(o=l),i.push("}");else if(0===i.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===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&r){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[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()}precheckMissedSemicolon(){}raw(e,t,n,r){let o,i,a,s,l=n.length,c="",u=!0;for(let d=0;d<l;d+=1)o=n[d],i=o[0],"space"!==i||d!==l-1||r?"comment"===i?(s=n[d-1]?n[d-1][0]:"empty",a=n[d+1]?n[d+1][0]:"empty",SAFE_COMMENT_NEIGHBOR[s]||SAFE_COMMENT_NEIGHBOR[a]||","===c.slice(-1)?u=!1:c+=o[1]):c+=o[1]:u=!1;if(!u){let r=n.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Rule$1;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}spacesAndCommentsFromStart(e){let t,n="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}spacesFromEnd(e){let t,n="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)n=e.pop()[1]+n;return n}stringFrom(e,t){let n="";for(let r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var parser=Parser$1;let Container$2=container$1,Input$1=input,Parser=parser;function parse$3(e,t){let n=new Input$1(e,t),r=new Parser(n);try{r.parse()}catch(e2){throw e2}return r.root}var parse_1=parse$3;parse$3.default=parse$3,Container$2.registerParse(parse$3);let Warning$2=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let n in t)this[n]=t[n]}toString(){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}};var warning=Warning$2;Warning$2.default=Warning$2;let Warning$1=warning,Result$3=class{get content(){return this.css}constructor(e,t,n){this.processor=e,this.messages=[],this.root=t,this.opts=n,this.css="",this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let n=new Warning$1(e,t);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}};var result=Result$3;Result$3.default=Result$3;let Container$1=container$1,Document$2=document$1,MapGenerator$1=mapGenerator,parse$2=parse_1,Result$2=result,Root$2=root$1,stringify$2=stringify_1$1,{isClean:isClean,my:my}=symbols;const TYPE_TO_CLASS_NAME={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},PLUGIN_PROPS={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},NOT_VISITORS={Once:!0,postcssPlugin:!0,prepare:!0},CHILDREN=0;function isPromise(e){return"object"==typeof e&&"function"==typeof e.then}function getEvents(e){let t=!1,n=TYPE_TO_CLASS_NAME[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[n,n+"-"+t,CHILDREN,n+"Exit",n+"Exit-"+t]:t?[n,n+"-"+t,n+"Exit",n+"Exit-"+t]:e.append?[n,CHILDREN,n+"Exit"]:[n,n+"Exit"]}function toStack(e){let t;return t="document"===e.type?["Document",CHILDREN,"DocumentExit"]:"root"===e.type?["Root",CHILDREN,"RootExit"]:getEvents(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function cleanMarks(e){return e[isClean]=!1,e.nodes&&e.nodes.forEach(e=>cleanMarks(e)),e}let postcss$1={},LazyResult$2=class e{get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}constructor(t,n,r){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof n||null===n||"root"!==n.type&&"document"!==n.type)if(n instanceof e||n instanceof Result$2)o=cleanMarks(n.root),n.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{let e=parse$2;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{o=e(n,r)}catch(i){this.processed=!0,this.error=i}o&&!o[my]&&Container$1.rebuild(o)}else o=cleanMarks(n);this.result=new Result$2(t,o,r),this.helpers={...postcss$1,postcss:postcss$1,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let n=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?n.postcssVersion:(e.plugin=n.postcssPlugin,e.setMessage())}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(e,t,n)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,n])};for(let t of this.plugins)if("object"==typeof t)for(let n in t){if(!PLUGIN_PROPS[n]&&/^[A-Z]/.test(n))throw new Error(`Unknown event ${n} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!NOT_VISITORS[n])if("object"==typeof t[n])for(let r in t[n])e(t,"*"===r?n:n+"-"+r.toLowerCase(),t[n][r]);else"function"==typeof t[n]&&e(t,n,t[n])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let n=this.plugins[t],r=this.runOnRoot(n);if(isPromise(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[isClean];){e[isClean]=!0;let t=[toStack(e)];for(;t.length>0;){let e=this.visitTick(t);if(isPromise(e))try{await e}catch(e2){let n=t[t.length-1].node;throw this.handleError(e2,n)}}}if(this.listeners.OnceExit)for(let[t,n]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(e2){throw this.handleError(e2)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return isPromise(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=stringify$2;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let n=new MapGenerator$1(t,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(isPromise(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[isClean];)e[isClean]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,r]of e){let e;this.result.lastPlugin=n;try{e=r(t,this.helpers)}catch(e2){throw this.handleError(e2,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(isPromise(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:n,visitors:r}=t;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,o]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return o(n.toProxy(),this.helpers)}catch(e2){throw this.handleError(e2,n)}}if(0!==t.iterator){let r,o=t.iterator;for(;r=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!r[isClean])return r[isClean]=!0,void e.push(toStack(r));t.iterator=0,delete n.indexes[o]}let o=t.events;for(;t.eventIndex<o.length;){let e=o[t.eventIndex];if(t.eventIndex+=1,e===CHILDREN)return void(n.nodes&&n.nodes.length&&(n[isClean]=!0,t.iterator=n.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[isClean]=!0;let t=getEvents(e);for(let n of t)if(n===CHILDREN)e.nodes&&e.each(e=>{e[isClean]||this.walkSync(e)});else{let t=this.listeners[n];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}};LazyResult$2.registerPostcss=e=>{postcss$1=e};var lazyResult=LazyResult$2;LazyResult$2.default=LazyResult$2,Root$2.registerLazyResult(LazyResult$2),Document$2.registerLazyResult(LazyResult$2);let MapGenerator=mapGenerator,parse$1=parse_1;const Result$1=result;let stringify$1=stringify_1$1,NoWorkResult$1=class{get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=parse$1;try{e=t(this._css,this._opts)}catch(n){this.error=n}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,t,n){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=n,this._map=void 0;let o=stringify$1;this.result=new Result$1(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let a=new MapGenerator(o,r,this._opts,t);if(a.isMap()){let[e,t]=a.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}};var noWorkResult=NoWorkResult$1;NoWorkResult$1.default=NoWorkResult$1;let Document$1=document$1,LazyResult$1=lazyResult,NoWorkResult=noWorkResult,Root$1=root$1,Processor$1=class{constructor(e=[]){this.version="8.5.6",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let n of e)if(!0===n.postcss?n=n():n.postcss&&(n=n.postcss),"object"==typeof n&&Array.isArray(n.plugins))t=t.concat(n.plugins);else if("object"==typeof n&&n.postcssPlugin)t.push(n);else if("function"==typeof n)t.push(n);else if("object"!=typeof n||!n.parse&&!n.stringify)throw new Error(n+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new LazyResult$1(this,e,t):new NoWorkResult(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var processor=Processor$1;Processor$1.default=Processor$1,Root$1.registerProcessor(Processor$1),Document$1.registerProcessor(Processor$1);var define_process_env_default={};let AtRule=atRule,Comment=comment,Container=container$1,CssSyntaxError=cssSyntaxError,Declaration=declaration,Document=document$1,fromJSON=fromJSON_1,Input=input,LazyResult=lazyResult,list=list_1,Node$1=node,parse=parse_1,Processor=processor,Result=result,Root=root$1,Rule=rule,stringify=stringify_1$1,Warning=warning;function postcss(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Processor(e)}postcss.plugin=function(e,t){let n,r=!1;function o(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),define_process_env_default.LANG&&define_process_env_default.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...n);return o.postcssPlugin=e,o.postcssVersion=(new Processor).version,o}return Object.defineProperty(o,"postcss",{get:()=>(n||(n=o()),n)}),o.process=function(e,t,n){return postcss([o(n)]).process(e,t)},o},postcss.stringify=stringify,postcss.parse=parse,postcss.fromJSON=fromJSON,postcss.list=list,postcss.comment=e=>new Comment(e),postcss.atRule=e=>new AtRule(e),postcss.decl=e=>new Declaration(e),postcss.rule=e=>new Rule(e),postcss.root=e=>new Root(e),postcss.document=e=>new Document(e),postcss.CssSyntaxError=CssSyntaxError,postcss.Declaration=Declaration,postcss.Container=Container,postcss.Processor=Processor,postcss.Document=Document,postcss.Comment=Comment,postcss.Warning=Warning,postcss.AtRule=AtRule,postcss.Result=Result,postcss.Input=Input,postcss.Rule=Rule,postcss.Root=Root,postcss.Node=Node$1,LazyResult.registerPostcss(postcss);var postcss_1=postcss;postcss.default=postcss;const htmlparser=commonjs,escapeStringRegexp=escapeStringRegexp$1,{isPlainObject:isPlainObject}=isPlainObject$2,deepmerge=cjs,parseSrcset=parseSrcsetExports,{parse:postcssParse}=postcss_1,mediaTags=["img","audio","video","picture","svg","object","map","iframe","embed"],vulnerableTags=["script","style"];function each(e,t){e&&Object.keys(e).forEach(function(n){t(e[n],n)})}function has(e,t){return{}.hasOwnProperty.call(e,t)}function filter(e,t){const n=[];return each(e,function(e){t(e)&&n.push(e)}),n}function isEmptyObject(e){for(const t in e)if(has(e,t))return!1;return!0}function stringifySrcset(e){return e.map(function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")}).join(", ")}var sanitizeHtml_1=sanitizeHtml;const VALID_HTML_ATTRIBUTE_NAME=/^[^\0\t\n\f\r /<=>]+$/;function sanitizeHtml(e,t,n){if(null==e)return"";"number"==typeof e&&(e=e.toString());let r="",o="";function i(e,t){const n=this;this.tag=e,this.attribs=t||{},this.tagPosition=r.length,this.text="",this.openingTagLength=0,this.mediaChildren=[],this.updateParentNodeText=function(){if(m.length){m[m.length-1].text+=n.text}},this.updateParentNodeMediaChildren=function(){if(m.length&&mediaTags.includes(this.tag)){m[m.length-1].mediaChildren.push(this.tag)}}}(t=Object.assign({},sanitizeHtml.defaults,t)).parser=Object.assign({},htmlParserDefaults,t.parser);const a=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};vulnerableTags.forEach(function(e){a(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)});const s=t.nonTextTags||["script","style","textarea","option"];let l,c;t.allowedAttributes&&(l={},c={},each(t.allowedAttributes,function(e,t){l[t]=[];const n=[];e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(escapeStringRegexp(e).replace(/\\\*/g,".*")):l[t].push(e)}),n.length&&(c[t]=new RegExp("^("+n.join("|")+")$"))}));const u={},d={},p={};each(t.allowedClasses,function(e,t){if(l&&(has(l,t)||(l[t]=[]),l[t].push("class")),u[t]=e,Array.isArray(e)){const n=[];u[t]=[],p[t]=[],e.forEach(function(e){"string"==typeof e&&e.indexOf("*")>=0?n.push(escapeStringRegexp(e).replace(/\\\*/g,".*")):e instanceof RegExp?p[t].push(e):u[t].push(e)}),n.length&&(d[t]=new RegExp("^("+n.join("|")+")$"))}});const f={};let h,A,m,g,y,v,b;each(t.transformTags,function(e,t){let n;"function"==typeof e?n=e:"string"==typeof e&&(n=sanitizeHtml.simpleTransform(e)),"*"===t?h=n:f[t]=n});let x=!1;C();const w=new htmlparser.Parser({onopentag:function(e,n){if(t.onOpenTag&&t.onOpenTag(e,n),t.enforceHtmlBoundary&&"html"===e&&C(),v)return void b++;const w=new i(e,n);m.push(w);let k=!1;const P=!!w.text;let B;if(has(f,e)&&(B=f[e](e,n),w.attribs=n=B.attribs,void 0!==B.text&&(w.innerText=B.text),e!==B.tagName&&(w.name=e=B.tagName,y[A]=B.tagName)),h&&(B=h(e,n),w.attribs=n=B.attribs,e!==B.tagName&&(w.name=e=B.tagName,y[A]=B.tagName)),(!a(e)||"recursiveEscape"===t.disallowedTagsMode&&!isEmptyObject(g)||null!=t.nestingLimit&&A>=t.nestingLimit)&&(k=!0,g[A]=!0,"discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1!==s.indexOf(e)&&(v=!0,b=1)),A++,k){if("discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode){if(w.innerText&&!P){const n=$(w.innerText);t.textFilter?r+=t.textFilter(n,e):r+=n,x=!0}return}o=r,r=""}r+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(w.innerText="");k&&("escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode)&&t.preserveEscapedAttributes?each(n,function(e,t){r+=" "+t+'="'+$(e||"",!0)+'"'}):(!l||has(l,e)||l["*"])&&each(n,function(n,o){if(!VALID_HTML_ATTRIBUTE_NAME.test(o))return void delete w.attribs[o];if(""===n&&!t.allowedEmptyAttributes.includes(o)&&(t.nonBooleanAttributes.includes(o)||t.nonBooleanAttributes.includes("*")))return void delete w.attribs[o];let i=!1;if(!l||has(l,e)&&-1!==l[e].indexOf(o)||l["*"]&&-1!==l["*"].indexOf(o)||has(c,e)&&c[e].test(o)||c["*"]&&c["*"].test(o))i=!0;else if(l&&l[e])for(const t of l[e])if(isPlainObject(t)&&t.name&&t.name===o){i=!0;let e="";if(!0===t.multiple){const r=n.split(" ");for(const n of r)-1!==t.values.indexOf(n)&&(""===e?e=n:e+=" "+n)}else t.values.indexOf(n)>=0&&(e=n);n=e}if(i){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(o)&&_(e,n))return void delete w.attribs[o];if("script"===e&&"src"===o){let e=!0;try{const r=S(n);if(t.allowedScriptHostnames||t.allowedScriptDomains){const n=(t.allowedScriptHostnames||[]).find(function(e){return e===r.url.hostname}),o=(t.allowedScriptDomains||[]).find(function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)});e=n||o}}catch(e2){e=!1}if(!e)return void delete w.attribs[o]}if("iframe"===e&&"src"===o){let e=!0;try{const r=S(n);if(r.isRelativeUrl)e=has(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const n=(t.allowedIframeHostnames||[]).find(function(e){return e===r.url.hostname}),o=(t.allowedIframeDomains||[]).find(function(e){return r.url.hostname===e||r.url.hostname.endsWith(`.${e}`)});e=n||o}}catch(e2){e=!1}if(!e)return void delete w.attribs[o]}if("srcset"===o)try{let e=parseSrcset(n);if(e.forEach(function(e){_("srcset",e.url)&&(e.evil=!0)}),e=filter(e,function(e){return!e.evil}),!e.length)return void delete w.attribs[o];n=stringifySrcset(filter(e,function(e){return!e.evil})),w.attribs[o]=n}catch(e2){return void delete w.attribs[o]}if("class"===o){const t=u[e],r=u["*"],i=d[e],a=p[e],s=p["*"],l=[i,d["*"]].concat(a,s).filter(function(e){return e});if(!(n=E(n,t&&r?deepmerge(t,r):t||r,l)).length)return void delete w.attribs[o]}if("style"===o)if(t.parseStyleAttributes)try{const r=function(e,t){if(!t)return e;const n=e.nodes[0];let r;r=t[n.selector]&&t["*"]?deepmerge(t[n.selector],t["*"]):t[n.selector]||t["*"];r&&(e.nodes[0].nodes=n.nodes.reduce(function(e){return function(t,n){if(has(e,n.prop)){e[n.prop].some(function(e){return e.test(n.value)})&&t.push(n)}return t}}(r),[]));return e}(postcssParse(e+" {"+n+"}",{map:!1}),t.allowedStyles);if(n=function(e){return e.nodes[0].nodes.reduce(function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e},[]).join(";")}(r),0===n.length)return void delete w.attribs[o]}catch(e2){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+n+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete w.attribs[o]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");r+=" "+o,n&&n.length?r+='="'+$(n,!0)+'"':t.allowedEmptyAttributes.includes(o)&&(r+='=""')}else delete w.attribs[o]}),-1!==t.selfClosing.indexOf(e)?r+=" />":(r+=">",!w.innerText||P||t.textFilter||(r+=$(w.innerText),x=!0)),k&&(r=o+$(r),o=""),w.openingTagLength=r.length-w.tagPosition},ontext:function(e){if(v)return;const n=m[m.length-1];let o;if(n&&(o=n.tag,e=void 0!==n.innerText?n.innerText:e),"completelyDiscard"!==t.disallowedTagsMode||a(o))if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||"script"!==o&&"style"!==o)if("discard"!==t.disallowedTagsMode&&"completelyDiscard"!==t.disallowedTagsMode||-1===s.indexOf(o)){if(!x){const n=$(e,!1);t.textFilter?r+=t.textFilter(n,o):r+=n}}else r+=e;else r+=e;else e="";if(m.length){m[m.length-1].text+=e}},onclosetag:function(e,n){if(t.onCloseTag&&t.onCloseTag(e,n),v){if(b--,b)return;v=!1}const i=m.pop();if(!i)return;if(i.tag!==e)return void m.push(i);v=!!t.enforceHtmlBoundary&&"html"===e,A--;const s=g[A];if(s){if(delete g[A],"discard"===t.disallowedTagsMode||"completelyDiscard"===t.disallowedTagsMode)return void i.updateParentNodeText();o=r,r=""}if(y[A]&&(e=y[A],delete y[A]),t.exclusiveFilter){const e=t.exclusiveFilter(i);if("excludeTag"===e)return s&&(r=o,o=""),void(r=r.substring(0,i.tagPosition)+r.substring(i.tagPosition+i.openingTagLength));if(e)return void(r=r.substring(0,i.tagPosition))}i.updateParentNodeMediaChildren(),i.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||n&&!a(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?s&&(r=o,o=""):(r+="</"+e+">",s&&(r=o+$(r),o=""),x=!1)}},t.parser);if(w.write(e),w.end(),"escape"===t.disallowedTagsMode||"recursiveEscape"===t.disallowedTagsMode){const t=w.endIndex;if(null!=t&&t>=0&&t<e.length){const n=e.substring(t);r+=$(n)}else(null==t||t<0)&&e.length>0&&""===r&&(r=$(e))}return r;function C(){r="",A=0,m=[],g={},y={},v=!1,b=0}function $(e,n){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),n&&(e=e.replace(/"/g,"&quot;"))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),n&&(e=e.replace(/"/g,"&quot;")),e}function _(e,n){for(n=n.replace(/[\x00-\x20]+/g,"");;){const e=n.indexOf("\x3c!--");if(-1===e)break;const t=n.indexOf("--\x3e",e+4);if(-1===t)break;n=n.substring(0,e)+n.substring(t+3)}const r=n.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!r)return!!n.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const o=r[1].toLowerCase();return has(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function S(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let r=0;r<100;r++)t+=`/${r}`;const n=new URL(e,t);return{isRelativeUrl:n&&"relative-site"===n.hostname&&"relative:"===n.protocol,url:n}}function E(e,t,n){return t?(e=e.split(/\s+/)).filter(function(e){return-1!==t.indexOf(e)||n.some(function(t){return t.test(e)})}).join(" "):e}}const htmlParserDefaults={decodeEntities:!0};sanitizeHtml.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","menu","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},allowedEmptyAttributes:["alt"],selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0,preserveEscapedAttributes:!1},sanitizeHtml.simpleTransform=function(e,t,n){return n=void 0===n||n,t=t||{},function(r,o){let i;if(n)for(i in t)o[i]=t[i];else o=t;return{tagName:e,attribs:o}}};const sanitizeHtml$1=getDefaultExportFromCjs$1(sanitizeHtml_1),toPlainString=e=>{if(!e)return"";let t=new MarkdownIt({html:!1,breaks:!0,linkify:!0,typographer:!0}).render(e);return t=sanitizeHtml$1(t,{allowedTags:["b","i","a","code","pre","s","u","tg-spoiler","blockquote","br"],allowedAttributes:{a:["href"]},transformTags:{h1:"",h2:"",h3:"",h4:"",h5:"",h6:"",a:"",strong:"",em:"",p:()=>"",ul:()=>"",li:()=>"• ",ol:()=>"",hr:()=>"\n",br:()=>"\n",div:()=>""}}),t.replaceAll(/\n[\s\n]*\n/g,"\n").trim()},getPriceScale=e=>{const t=Math.abs(e);if(t>=1){const e=Math.floor(Math.log10(t))+1;return Math.max(2,6-e)}return 8},signal_fields=[{type:Mn$1.Paper,transparentPaper:!0,fieldBottomMargin:"1",fields:[{type:Mn$1.Typography,typoVariant:"h6",placeholder:"General Information"},{type:Mn$1.Outline,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"symbol",title:"Symbol",readonly:!0,compute:e=>e.symbol||"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"position",title:"Position",readonly:!0,compute:e=>"long"===e.position?"LONG":"short"===e.position?"SHORT":"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"status",title:"Status",readonly:!0,compute:e=>({opened:"Opened",scheduled:"Scheduled",closed:"Closed",cancelled:"Cancelled"}[e.status]||e.status||"Unknown")},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"exchangeName",title:"Exchange",readonly:!0,compute:e=>e.exchangeName||"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"strategyName",title:"Strategy",readonly:!0,compute:e=>e.strategyName||"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"minuteEstimatedTime",title:"Estimated Time (min)",readonly:!0,compute:e=>{var t;return(null==(t=e.minuteEstimatedTime)?void 0:t.toString())||"Not specified"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"id",title:"Signal ID",readonly:!0,compute:e=>e.id||"Not specified",trailingIcon:CopyAll,trailingIconClick:async e=>{await oS(e)&&ioc.alertService.notify("Copied!")}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Timestamps"},{type:Mn$1.Outline,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"createdAt",title:"Created",readonly:!0,compute:e=>e.createdAt?dayjs(e.createdAt).format("DD/MM/YYYY HH:mm:ss"):""},{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"updatedAt",title:"Updated",readonly:!0,compute:e=>e.updatedAt?dayjs(e.updatedAt).format("DD/MM/YYYY HH:mm:ss"):""},{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"scheduledAt",title:"Scheduled",readonly:!0,isVisible:e=>!!e.scheduledAt,compute:e=>e.scheduledAt?dayjs(e.scheduledAt).format("DD/MM/YYYY HH:mm:ss"):""},{type:Mn$1.Text,outlined:!1,desktopColumns:"6",tabletColumns:"6",phoneColumns:"12",name:"pendingAt",title:"Activated",readonly:!0,isVisible:e=>!!e.pendingAt,compute:e=>e.pendingAt?dayjs(e.pendingAt).format("DD/MM/YYYY HH:mm:ss"):"N/A"}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Price Levels"},{type:Mn$1.Outline,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"priceOpen",title:"Entry Price",readonly:!0,compute:e=>e.priceOpen?`${e.priceOpen.toFixed(getPriceScale(e.priceOpen))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"priceTakeProfit",title:"Take Profit",readonly:!0,compute:e=>e.priceTakeProfit?`${e.priceTakeProfit.toFixed(getPriceScale(e.priceTakeProfit))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"priceStopLoss",title:"Stop Loss",readonly:!0,compute:e=>e.priceStopLoss?`${e.priceStopLoss.toFixed(getPriceScale(e.priceStopLoss))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"originalPriceTakeProfit",title:"Original TP",readonly:!0,isVisible:e=>!!e.originalPriceTakeProfit&&e.originalPriceTakeProfit!==e.priceTakeProfit,compute:e=>e.originalPriceTakeProfit?`${e.originalPriceTakeProfit.toFixed(getPriceScale(e.originalPriceTakeProfit))}$`:""},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"originalPriceStopLoss",title:"Original SL",readonly:!0,isVisible:e=>!!e.originalPriceStopLoss&&e.originalPriceStopLoss!==e.priceStopLoss,compute:e=>e.originalPriceStopLoss?`${e.originalPriceStopLoss.toFixed(getPriceScale(e.originalPriceStopLoss))}$`:""},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"originalPriceOpen",title:"Original Entry",readonly:!0,isVisible:e=>!!e.originalPriceOpen&&e.originalPriceOpen!==e.priceOpen,compute:e=>e.originalPriceOpen?`${e.originalPriceOpen.toFixed(getPriceScale(e.originalPriceOpen))}$`:"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"totalEntries",title:"Total Entries",readonly:!0,isVisible:e=>!!e.totalEntries&&e.totalEntries>1,compute:e=>e.totalEntries?String(e.totalEntries):"Not specified"},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"partialExecuted",title:"Partial Closed",readonly:!0,isVisible:e=>e.partialExecuted>0,compute:e=>{var t;return`${(null==(t=e.partialExecuted)?void 0:t.toFixed(2))||0}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"totalPartials",title:"Total Closes",readonly:!0,isVisible:e=>!!e.totalPartials&&e.totalPartials>0,compute:e=>String(e.totalPartials)},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"cost",title:"Cost",readonly:!0,isVisible:e=>!!e.cost,compute:e=>e.cost?`${e.cost.toFixed(2)}$`:"Not specified"}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Result (PNL)",isVisible:e=>"closed"===e.status&&e.pnl},{type:Mn$1.Outline,isVisible:e=>"closed"===e.status&&e.pnl,sx:{mb:3},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.pnlPercentage",title:"PNL %",readonly:!0,compute:e=>{var t;const n=null==(t=e.pnl)?void 0:t.pnlPercentage;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.priceOpen",title:"Entry Price (w/ fees)",readonly:!0,compute:e=>{var t;return(null==(t=e.pnl)?void 0:t.priceOpen)?`${e.pnl.priceOpen.toFixed(getPriceScale(e.pnl.priceOpen))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.priceClose",title:"Exit Price",readonly:!0,compute:e=>{var t;return(null==(t=e.pnl)?void 0:t.priceClose)?`${e.pnl.priceClose.toFixed(getPriceScale(e.pnl.priceClose))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.pnlCost",title:"PNL ($)",readonly:!0,compute:e=>{var t;const n=null==(t=e.pnl)?void 0:t.pnlCost;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}$`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"pnl.pnlEntries",title:"Invested",readonly:!0,compute:e=>{var t;return(null==(t=e.pnl)?void 0:t.pnlEntries)?`${e.pnl.pnlEntries.toFixed(2)}$`:"N/A"}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Peak Profit",isVisible:e=>{var t;return!!(null==(t=e.peakProfit)?void 0:t.priceClose)}},{type:Mn$1.Outline,sx:{mb:3},isVisible:e=>{var t;return!!(null==(t=e.peakProfit)?void 0:t.priceClose)},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.pnlPercentage",title:"Peak Profit %",readonly:!0,compute:e=>{var t;const n=null==(t=e.peakProfit)?void 0:t.pnlPercentage;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.pnlCost",title:"Peak Profit ($)",readonly:!0,compute:e=>{var t;const n=null==(t=e.peakProfit)?void 0:t.pnlCost;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}$`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.priceOpen",title:"Entry Price",readonly:!0,compute:e=>{var t;return(null==(t=e.peakProfit)?void 0:t.priceOpen)?`${e.peakProfit.priceOpen.toFixed(getPriceScale(e.peakProfit.priceOpen))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.priceClose",title:"Peak Price",readonly:!0,compute:e=>{var t;return(null==(t=e.peakProfit)?void 0:t.priceClose)?`${e.peakProfit.priceClose.toFixed(getPriceScale(e.peakProfit.priceClose))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"peakProfit.pnlEntries",title:"Invested",readonly:!0,compute:e=>{var t;return(null==(t=e.peakProfit)?void 0:t.pnlEntries)?`${e.peakProfit.pnlEntries.toFixed(2)}$`:"N/A"}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Max Drawdown",isVisible:e=>{var t;return!!(null==(t=e.maxDrawdown)?void 0:t.priceClose)}},{type:Mn$1.Outline,sx:{mb:3},isVisible:e=>{var t;return!!(null==(t=e.maxDrawdown)?void 0:t.priceClose)},fields:[{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.pnlPercentage",title:"Max Drawdown %",readonly:!0,compute:e=>{var t;const n=null==(t=e.maxDrawdown)?void 0:t.pnlPercentage;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}%`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.pnlCost",title:"Max Drawdown ($)",readonly:!0,compute:e=>{var t;const n=null==(t=e.maxDrawdown)?void 0:t.pnlCost;if(null==n)return"N/A";return`${n>=0?"+":""}${n.toFixed(2)}$`}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.priceOpen",title:"Entry Price",readonly:!0,compute:e=>{var t;return(null==(t=e.maxDrawdown)?void 0:t.priceOpen)?`${e.maxDrawdown.priceOpen.toFixed(getPriceScale(e.maxDrawdown.priceOpen))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.priceClose",title:"Drawdown Price",readonly:!0,compute:e=>{var t;return(null==(t=e.maxDrawdown)?void 0:t.priceClose)?`${e.maxDrawdown.priceClose.toFixed(getPriceScale(e.maxDrawdown.priceClose))}$`:"N/A"}},{type:Mn$1.Text,outlined:!1,desktopColumns:"4",tabletColumns:"4",phoneColumns:"12",name:"maxDrawdown.pnlEntries",title:"Invested",readonly:!0,compute:e=>{var t;return(null==(t=e.maxDrawdown)?void 0:t.pnlEntries)?`${e.maxDrawdown.pnlEntries.toFixed(2)}$`:"N/A"}}]},{type:Mn$1.Typography,typoVariant:"h6",placeholder:"Note",isVisible:e=>!!e.note},{type:Mn$1.Outline,isVisible:e=>!!e.note,sx:{mb:3},fields:[{type:Mn$1.Component,desktopColumns:"12",tabletColumns:"12",phoneColumns:"12",element:({note:e})=>factory$1(Markdown,{content:e})},{type:Mn$1.Div,style:{display:"none"},child:{type:Mn$1.Text,name:"node_print",compute:({note:e})=>toPlainString(e)}}]},{type:Mn$1.Box,sx:{display:"grid",gridTemplateColumns:"auto 1fr"},fields:[{type:Mn$1.Component,element:({id:e})=>factory$1(uS,{label:"Signal ID",content:e})},{type:Mn$1.Div}]}]}],SignalView=({data:e})=>factory$1(Box$1,{sx:{height:"100%",width:"100%",pt:1},children:factory$1(nm,{withScrollbar:!0,hideOverflowX:!0,sx:{height:"100%"},children:factory$1("div",{children:[factory$1(bf,{slots:defaultSlots,fields:signal_fields,handler:()=>e}),factory$1(Box$1,{sx:{paddingBottom:"65px"}})]})})});var defaultBindingOptions={allowDownsampling:!0};function bindToDevicePixelRatio(e,t){return void 0===t&&(t=defaultBindingOptions),new DevicePixelRatioBinding(e,t)}var DevicePixelRatioBinding=function(){function e(e,t){var n=this;this._resolutionMediaQueryList=null,this._resolutionListener=function(e){return n._onResolutionChanged()},this._canvasConfiguredListeners=[],this.canvas=e,this._canvasSize={width:this.canvas.clientWidth,height:this.canvas.clientHeight},this._options=t,this._configureCanvas(),this._installResolutionListener()}return e.prototype.destroy=function(){this._canvasConfiguredListeners.length=0,this._uninstallResolutionListener(),this.canvas=null},Object.defineProperty(e.prototype,"canvasSize",{get:function(){return{width:this._canvasSize.width,height:this._canvasSize.height}},enumerable:!0,configurable:!0}),e.prototype.resizeCanvas=function(e){this._canvasSize={width:e.width,height:e.height},this._configureCanvas()},Object.defineProperty(e.prototype,"pixelRatio",{get:function(){var e=this.canvas.ownerDocument.defaultView;if(null==e)throw new Error("No window is associated with the canvas");return e.devicePixelRatio>1||this._options.allowDownsampling?e.devicePixelRatio:1},enumerable:!0,configurable:!0}),e.prototype.subscribeCanvasConfigured=function(e){this._canvasConfiguredListeners.push(e)},e.prototype.unsubscribeCanvasConfigured=function(e){this._canvasConfiguredListeners=this._canvasConfiguredListeners.filter(function(t){return t!=e})},e.prototype._configureCanvas=function(){var e=this.pixelRatio;this.canvas.style.width=this._canvasSize.width+"px",this.canvas.style.height=this._canvasSize.height+"px",this.canvas.width=this._canvasSize.width*e,this.canvas.height=this._canvasSize.height*e,this._emitCanvasConfigured()},e.prototype._emitCanvasConfigured=function(){var e=this;this._canvasConfiguredListeners.forEach(function(t){return t.call(e)})},e.prototype._installResolutionListener=function(){if(null!==this._resolutionMediaQueryList)throw new Error("Resolution listener is already installed");var e=this.canvas.ownerDocument.defaultView;if(null==e)throw new Error("No window is associated with the canvas");var t=e.devicePixelRatio;this._resolutionMediaQueryList=e.matchMedia("all and (resolution: "+t+"dppx)"),this._resolutionMediaQueryList.addListener(this._resolutionListener)},e.prototype._uninstallResolutionListener=function(){null!==this._resolutionMediaQueryList&&(this._resolutionMediaQueryList.removeListener(this._resolutionListener),this._resolutionMediaQueryList=null)},e.prototype._reinstallResolutionListener=function(){this._uninstallResolutionListener(),this._installResolutionListener()},e.prototype._onResolutionChanged=function(){this._configureCanvas(),this._reinstallResolutionListener()},e}(),i,n;
1573
1573
  /*!
1574
1574
  * @license
1575
1575
  * TradingView Lightweight Charts v3.3.0