@xenon-device-management/xenon 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/package.json +1 -1
- package/lib/public/assets/{ApiKeyGate-DBl_AZ8N.js → ApiKeyGate-BousCIQZ.js} +1 -1
- package/lib/public/assets/{BugReportButton-Cz4aeGCX.js → BugReportButton-Gw4lnGnV.js} +1 -1
- package/lib/public/assets/{DeviceMosaicView-DP4AanNV.js → DeviceMosaicView-BX2hfhBf.js} +2 -2
- package/lib/public/assets/{EmptyState-BwaAbjZt.js → EmptyState-CPOfuV3O.js} +1 -1
- package/lib/public/assets/{FieldGroup-CGdoHDQ3.js → FieldGroup-C5UkCHbe.js} +1 -1
- package/lib/public/assets/{Modal-OY-an2g6.js → Modal-MMGhL8eW.js} +1 -1
- package/lib/public/assets/{SegmentedControl-C_gsCi2P.js → SegmentedControl-CZfAicws.js} +1 -1
- package/lib/public/assets/{SettingCard-CRlStb6_.js → SettingCard-Dp7XIdcl.js} +1 -1
- package/lib/public/assets/{Table-CbmGiPJe.js → Table-DsN_IX6J.js} +1 -1
- package/lib/public/assets/{activity-BhRPBZ3G.js → activity-DCBAvxuo.js} +1 -1
- package/lib/public/assets/ai-settings-yNS_bU1m.js +21 -0
- package/lib/public/assets/api-keys-CQ9g1g1b.js +1 -0
- package/lib/public/assets/apps-Bqh1eav9.js +21 -0
- package/lib/public/assets/{apps-DS59NYjg.css → apps-CTrGClro.css} +1 -1
- package/lib/public/assets/{arrow-left-y_SSjJz-.js → arrow-left-GX0vzYtn.js} +1 -1
- package/lib/public/assets/{arrow-up-right-NQ8ZGfd3.js → arrow-up-right-DePHHOby.js} +1 -1
- package/lib/public/assets/auth-shell-BBGlC6i3.js +1 -0
- package/lib/public/assets/builds-page-Czf7RsmD.js +6 -0
- package/lib/public/assets/{button-wz7ra9cW.js → button-ybNY3GYx.js} +1 -1
- package/lib/public/assets/{check-CV94AcJF.js → check-BZMx8AhR.js} +1 -1
- package/lib/public/assets/{chevron-right-_iIkyWqd.js → chevron-right-WL_bcB02.js} +1 -1
- package/lib/public/assets/{circle-check-0COJnxUq.js → circle-check-CI2xUlDo.js} +1 -1
- package/lib/public/assets/{circle-x-DGNoObyH.js → circle-x-De3thbcr.js} +1 -1
- package/lib/public/assets/{clock-DwtXByAH.js → clock-BFVLE7wW.js} +1 -1
- package/lib/public/assets/{copy-DL_iD5Dh.js → copy-ve3lNhva.js} +1 -1
- package/lib/public/assets/device-explorer-elRO7T00.css +1 -0
- package/lib/public/assets/device-explorer-vzZxT4-Y.js +210 -0
- package/lib/public/assets/{download-aeG6Qqs8.js → download-BDZj44ke.js} +1 -1
- package/lib/public/assets/forgot-password-BSYQX2oR.js +1 -0
- package/lib/public/assets/{funnel-ChogDM6h.js → funnel-CptlpFZ9.js} +1 -1
- package/lib/public/assets/index-BW3kENYH.css +1 -0
- package/lib/public/assets/{index-CkwQBzCl.js → index-PtnKslHU.js} +12 -12
- package/lib/public/assets/{layers-a5nj78PI.js → layers-DRpwoKhI.js} +1 -1
- package/lib/public/assets/{lock-CqQvL12G.js → lock-CrQhC34I.js} +1 -1
- package/lib/public/assets/login-DaJOt8Qz.js +1 -0
- package/lib/public/assets/maintenance-settings-D629C2IC.js +6 -0
- package/lib/public/assets/{mouse-pointer-2-De_oynWc.js → mouse-pointer-2-Dpcc76zN.js} +1 -1
- package/lib/public/assets/overview-CGEKYX62.js +11 -0
- package/lib/public/assets/{page-header-BeUDGs-O.js → page-header-CSvuGbSO.js} +1 -1
- package/lib/public/assets/{plus-BM5UAzcK.js → plus-vJJF9g79.js} +1 -1
- package/lib/public/assets/profile-page-CF7ZQNQz.js +6 -0
- package/lib/public/assets/reset-password-BgpjbCac.js +1 -0
- package/lib/public/assets/runbook-page-Dxuzftyv.js +124 -0
- package/lib/public/assets/selector-detail-page-B_puCd9g.js +1 -0
- package/lib/public/assets/{selector-health-BWOVdnlp.js → selector-health-BjMHf106.js} +1 -1
- package/lib/public/assets/selector-health-page-Du_bGD2p.js +16 -0
- package/lib/public/assets/session-detail-page-lQTe5_B1.js +13 -0
- package/lib/public/assets/settings-Cxx_aYWT.css +1 -0
- package/lib/public/assets/settings-DhxWGUzy.js +1 -0
- package/lib/public/assets/{shield-CAA9vrIs.js → shield-JGzamJo5.js} +1 -1
- package/lib/public/assets/{shield-alert-Dm3Oz4Kc.js → shield-alert-DzE36jcb.js} +1 -1
- package/lib/public/assets/status-pill-outline-50aN0wRU.js +1 -0
- package/lib/public/assets/{tablet-CWU6hxZF.js → tablet-DHY88mxw.js} +1 -1
- package/lib/public/assets/teams-EOAIPbZC.js +1 -0
- package/lib/public/assets/time-B8FIgwPE.js +1 -0
- package/lib/public/assets/{trash-2-DUWA0N9n.js → trash-2-BrTSfFh5.js} +1 -1
- package/lib/public/assets/{useSocket-lsg6f_Dn.js → useSocket-BRto9a5m.js} +1 -1
- package/lib/public/assets/users-Dd44jLAB.js +11 -0
- package/lib/public/assets/webhook-settings-DBYmqim_.js +1 -0
- package/lib/public/assets/{webhook-settings-DEZQtSgr.css → webhook-settings-tW1oXXrJ.css} +1 -1
- package/lib/public/assets/{zap-D8JQHaNH.js → zap-JUbOoK3o.js} +1 -1
- package/lib/public/index.html +2 -2
- package/package.json +1 -1
- package/lib/public/assets/ai-settings-DteGlf4r.js +0 -21
- package/lib/public/assets/api-keys-BmikiaSF.js +0 -1
- package/lib/public/assets/apps-BfEC5qsb.js +0 -21
- package/lib/public/assets/builds-page-DkLt4J8-.js +0 -6
- package/lib/public/assets/device-explorer-CKcXaWmZ.css +0 -1
- package/lib/public/assets/device-explorer-CpC-MZNT.js +0 -210
- package/lib/public/assets/forgot-password-Cu05XOKH.js +0 -1
- package/lib/public/assets/index-gXUPv-oo.css +0 -1
- package/lib/public/assets/login-DoaCgEPu.js +0 -1
- package/lib/public/assets/maintenance-settings-CBnV_5Rl.js +0 -6
- package/lib/public/assets/overview-DvyGTzku.js +0 -11
- package/lib/public/assets/profile-page-Cner_Muq.js +0 -1
- package/lib/public/assets/reset-password-BKWBemnU.js +0 -1
- package/lib/public/assets/runbook-page-CXZdhAjc.js +0 -104
- package/lib/public/assets/selector-detail-page-C6yA7Lwl.js +0 -1
- package/lib/public/assets/selector-health-page-CrR7bh4f.js +0 -16
- package/lib/public/assets/session-detail-page-DzW5PcxL.js +0 -13
- package/lib/public/assets/settings-COrR3YcC.js +0 -1
- package/lib/public/assets/settings-CpRbubta.css +0 -1
- package/lib/public/assets/status-pill-outline-3FA5raqd.js +0 -1
- package/lib/public/assets/teams-xa_B0pyz.js +0 -1
- package/lib/public/assets/users-DJDpKaGy.js +0 -11
- package/lib/public/assets/webhook-settings-BPf_iC_h.js +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import{w as Me,k as Ie,c as Ir,u as Tr,j as J,B as Or}from"./index-PtnKslHU.js";import{A as vr}from"./arrow-left-GX0vzYtn.js";const qn=["http","https","mailto","tel"];function Lr(e){const n=(e||"").trim(),t=n.charAt(0);if(t==="#"||t==="/")return n;const r=n.indexOf(":");if(r===-1)return n;let i=-1;for(;++i<qn.length;){const l=qn[i];if(r===l.length&&n.slice(0,l.length).toLowerCase()===l)return n}return i=n.indexOf("?"),i!==-1&&r>i||(i=n.indexOf("#"),i!==-1&&r>i)?n:"javascript:void(0)"}/*!
|
|
2
|
+
* Determine if an object is a Buffer
|
|
3
|
+
*
|
|
4
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
|
+
* @license MIT
|
|
6
|
+
*/var Dr=function(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)};const Lt=Me(Dr);function Re(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?$n(e.position):"start"in e||"end"in e?$n(e):"line"in e||"column"in e?xn(e):""}function xn(e){return Wn(e&&e.line)+":"+Wn(e&&e.column)}function $n(e){return xn(e&&e.start)+"-"+xn(e&&e.end)}function Wn(e){return e&&typeof e=="number"?e:1}class ie extends Error{constructor(n,t,r){const i=[null,null];let l={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof t=="string"&&(r=t,t=void 0),typeof r=="string"){const o=r.indexOf(":");o===-1?i[1]=r:(i[0]=r.slice(0,o),i[1]=r.slice(o+1))}t&&("type"in t||"position"in t?t.position&&(l=t.position):"start"in t||"end"in t?l=t:("line"in t||"column"in t)&&(l.start=t)),this.name=Re(t)||"1:1",this.message=typeof n=="object"?n.message:n,this.stack="",typeof n=="object"&&n.stack&&(this.stack=n.stack),this.reason=this.message,this.fatal,this.line=l.start.line,this.column=l.start.column,this.position=l,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}ie.prototype.file="";ie.prototype.name="";ie.prototype.reason="";ie.prototype.message="";ie.prototype.stack="";ie.prototype.fatal=null;ie.prototype.column=null;ie.prototype.line=null;ie.prototype.source=null;ie.prototype.ruleId=null;ie.prototype.position=null;const pe={basename:zr,dirname:Br,extname:Rr,join:Nr,sep:"/"};function zr(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');_e(e);let t=0,r=-1,i=e.length,l;if(n===void 0||n.length===0||n.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(l){t=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(t,r)}if(n===e)return"";let o=-1,u=n.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(l){t=i+1;break}}else o<0&&(l=!0,o=i+1),u>-1&&(e.charCodeAt(i)===n.charCodeAt(u--)?u<0&&(r=i):(u=-1,r=o));return t===r?r=o:r<0&&(r=e.length),e.slice(t,r)}function Br(e){if(_e(e),e.length===0)return".";let n=-1,t=e.length,r;for(;--t;)if(e.charCodeAt(t)===47){if(r){n=t;break}}else r||(r=!0);return n<0?e.charCodeAt(0)===47?"/":".":n===1&&e.charCodeAt(0)===47?"//":e.slice(0,n)}function Rr(e){_e(e);let n=e.length,t=-1,r=0,i=-1,l=0,o;for(;n--;){const u=e.charCodeAt(n);if(u===47){if(o){r=n+1;break}continue}t<0&&(o=!0,t=n+1),u===46?i<0?i=n:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||t<0||l===0||l===1&&i===t-1&&i===r+1?"":e.slice(i,t)}function Nr(...e){let n=-1,t;for(;++n<e.length;)_e(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":Mr(t)}function Mr(e){_e(e);const n=e.charCodeAt(0)===47;let t=_r(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.charCodeAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function _r(e,n){let t="",r=0,i=-1,l=0,o=-1,u,s;for(;++o<=e.length;){if(o<e.length)u=e.charCodeAt(o);else{if(u===47)break;u=47}if(u===47){if(!(i===o-1||l===1))if(i!==o-1&&l===2){if(t.length<2||r!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){if(s=t.lastIndexOf("/"),s!==t.length-1){s<0?(t="",r=0):(t=t.slice(0,s),r=t.length-1-t.lastIndexOf("/")),i=o,l=0;continue}}else if(t.length>0){t="",r=0,i=o,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,o):t=e.slice(i+1,o),r=o-i-1;i=o,l=0}else u===46&&l>-1?l++:l=-1}return t}function _e(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jr={cwd:Hr};function Hr(){return"/"}function kn(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function Ur(e){if(typeof e=="string")e=new URL(e);else if(!kn(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return Vr(e)}function Vr(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const n=e.pathname;let t=-1;for(;++t<n.length;)if(n.charCodeAt(t)===37&&n.charCodeAt(t+1)===50){const r=n.charCodeAt(t+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(n)}const un=["history","path","basename","stem","extname","dirname"];class Dt{constructor(n){let t;n?typeof n=="string"||qr(n)?t={value:n}:kn(n)?t={path:n}:t=n:t={},this.data={},this.messages=[],this.history=[],this.cwd=jr.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<un.length;){const l=un[r];l in t&&t[l]!==void 0&&t[l]!==null&&(this[l]=l==="history"?[...t[l]]:t[l])}let i;for(i in t)un.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(n){kn(n)&&(n=Ur(n)),sn(n,"path"),this.path!==n&&this.history.push(n)}get dirname(){return typeof this.path=="string"?pe.dirname(this.path):void 0}set dirname(n){Qn(this.basename,"dirname"),this.path=pe.join(n||"",this.basename)}get basename(){return typeof this.path=="string"?pe.basename(this.path):void 0}set basename(n){sn(n,"basename"),an(n,"basename"),this.path=pe.join(this.dirname||"",n)}get extname(){return typeof this.path=="string"?pe.extname(this.path):void 0}set extname(n){if(an(n,"extname"),Qn(this.dirname,"extname"),n){if(n.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pe.join(this.dirname,this.stem+(n||""))}get stem(){return typeof this.path=="string"?pe.basename(this.path,this.extname):void 0}set stem(n){sn(n,"stem"),an(n,"stem"),this.path=pe.join(this.dirname||"",n+(this.extname||""))}toString(n){return(this.value||"").toString(n||void 0)}message(n,t,r){const i=new ie(n,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}info(n,t,r){const i=this.message(n,t,r);return i.fatal=null,i}fail(n,t,r){const i=this.message(n,t,r);throw i.fatal=!0,i}}function an(e,n){if(e&&e.includes(pe.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+pe.sep+"`")}function sn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function Qn(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function qr(e){return Lt(e)}function Xn(e){if(e)throw e}var Ve=Object.prototype.hasOwnProperty,zt=Object.prototype.toString,Yn=Object.defineProperty,Kn=Object.getOwnPropertyDescriptor,Gn=function(n){return typeof Array.isArray=="function"?Array.isArray(n):zt.call(n)==="[object Array]"},Zn=function(n){if(!n||zt.call(n)!=="[object Object]")return!1;var t=Ve.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&Ve.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||Ve.call(n,i)},Jn=function(n,t){Yn&&t.name==="__proto__"?Yn(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},et=function(n,t){if(t==="__proto__")if(Ve.call(n,t)){if(Kn)return Kn(n,t).value}else return;return n[t]},$r=function e(){var n,t,r,i,l,o,u=arguments[0],s=1,a=arguments.length,c=!1;for(typeof u=="boolean"&&(c=u,u=arguments[1]||{},s=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});s<a;++s)if(n=arguments[s],n!=null)for(t in n)r=et(u,t),i=et(n,t),u!==i&&(c&&i&&(Zn(i)||(l=Gn(i)))?(l?(l=!1,o=r&&Gn(r)?r:[]):o=r&&Zn(r)?r:{},Jn(u,{name:t,newValue:e(c,o,i)})):typeof i<"u"&&Jn(u,{name:t,newValue:i}));return u};const nt=Me($r);function bn(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Wr(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);u(null,...i);function u(s,...a){const c=e[++l];let m=-1;if(s){o(s);return}for(;++m<i.length;)(a[m]===null||a[m]===void 0)&&(a[m]=i[m]);i=a,c?Qr(c,u)(...a):o(null,...a)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Qr(e,n){let t;return r;function r(...o){const u=e.length>o.length;let s;u&&o.push(i);try{s=e.apply(this,o)}catch(a){const c=a;if(u&&t)throw c;return i(c)}u||(s&&s.then&&typeof s.then=="function"?s.then(l,i):s instanceof Error?i(s):l(s))}function i(o,...u){t||(t=!0,n(o,...u))}function l(o){i(null,o)}}const Xr=Rt().freeze(),Bt={}.hasOwnProperty;function Rt(){const e=Wr(),n=[];let t={},r,i=-1;return l.data=o,l.Parser=void 0,l.Compiler=void 0,l.freeze=u,l.attachers=n,l.use=s,l.parse=a,l.stringify=c,l.run=m,l.runSync=d,l.process=f,l.processSync=w,l;function l(){const x=Rt();let C=-1;for(;++C<n.length;)x.use(...n[C]);return x.data(nt(!0,{},t)),x}function o(x,C){return typeof x=="string"?arguments.length===2?(fn("data",r),t[x]=C,l):Bt.call(t,x)&&t[x]||null:x?(fn("data",r),t=x,l):t}function u(){if(r)return l;for(;++i<n.length;){const[x,...C]=n[i];if(C[0]===!1)continue;C[0]===!0&&(C[0]=void 0);const k=x.call(l,...C);typeof k=="function"&&e.use(k)}return r=!0,i=Number.POSITIVE_INFINITY,l}function s(x,...C){let k;if(fn("use",r),x!=null)if(typeof x=="function")B(x,...C);else if(typeof x=="object")Array.isArray(x)?z(x):E(x);else throw new TypeError("Expected usable value, not `"+x+"`");return k&&(t.settings=Object.assign(t.settings||{},k)),l;function L(g){if(typeof g=="function")B(g);else if(typeof g=="object")if(Array.isArray(g)){const[P,...D]=g;B(P,...D)}else E(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function E(g){z(g.plugins),g.settings&&(k=Object.assign(k||{},g.settings))}function z(g){let P=-1;if(g!=null)if(Array.isArray(g))for(;++P<g.length;){const D=g[P];L(D)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function B(g,P){let D=-1,M;for(;++D<n.length;)if(n[D][0]===g){M=n[D];break}M?(bn(M[1])&&bn(P)&&(P=nt(!0,M[1],P)),M[1]=P):n.push([...arguments])}}function a(x){l.freeze();const C=Be(x),k=l.Parser;return cn("parse",k),tt(k,"parse")?new k(String(C),C).parse():k(String(C),C)}function c(x,C){l.freeze();const k=Be(C),L=l.Compiler;return pn("stringify",L),rt(x),tt(L,"compile")?new L(x,k).compile():L(x,k)}function m(x,C,k){if(rt(x),l.freeze(),!k&&typeof C=="function"&&(k=C,C=void 0),!k)return new Promise(L);L(null,k);function L(E,z){e.run(x,Be(C),B);function B(g,P,D){P=P||x,g?z(g):E?E(P):k(null,P,D)}}}function d(x,C){let k,L;return l.run(x,C,E),it("runSync","run",L),k;function E(z,B){Xn(z),k=B,L=!0}}function f(x,C){if(l.freeze(),cn("process",l.Parser),pn("process",l.Compiler),!C)return new Promise(k);k(null,C);function k(L,E){const z=Be(x);l.run(l.parse(z),z,(g,P,D)=>{if(g||!P||!D)B(g);else{const M=l.stringify(P,D);M==null||(Gr(M)?D.value=M:D.result=M),B(g,D)}});function B(g,P){g||!P?E(g):L?L(P):C(null,P)}}}function w(x){let C;l.freeze(),cn("processSync",l.Parser),pn("processSync",l.Compiler);const k=Be(x);return l.process(k,L),it("processSync","process",C),k;function L(E){C=!0,Xn(E)}}}function tt(e,n){return typeof e=="function"&&e.prototype&&(Yr(e.prototype)||n in e.prototype)}function Yr(e){let n;for(n in e)if(Bt.call(e,n))return!0;return!1}function cn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function pn(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function fn(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rt(e){if(!bn(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function it(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Be(e){return Kr(e)?e:new Dt(e)}function Kr(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Gr(e){return typeof e=="string"||Lt(e)}const Zr={};function Jr(e,n){const t=Zr,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return Nt(e,r,i)}function Nt(e,n,t){if(ei(e)){if("value"in e)return e.type==="html"&&!t?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return lt(e.children,n,t)}return Array.isArray(e)?lt(e,n,t):""}function lt(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=Nt(e[i],n,t);return r.join("")}function ei(e){return!!(e&&typeof e=="object")}function he(e,n,t,r){const i=e.length;let l=0,o;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l<r.length;)o=r.slice(l,l+1e4),o.unshift(n,0),e.splice(...o),l+=1e4,n+=1e4}function re(e,n){return e.length>0?(he(e,e.length,0,n),e):n}const ot={}.hasOwnProperty;function ni(e){const n={};let t=-1;for(;++t<e.length;)ti(n,e[t]);return n}function ti(e,n){let t;for(t in n){const i=(ot.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let o;if(l)for(o in l){ot.call(i,o)||(i[o]=[]);const u=l[o];ri(i[o],Array.isArray(u)?u:u?[u]:[])}}}function ri(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);he(e,0,0,r)}const ii=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,fe=we(/[A-Za-z]/),te=we(/[\dA-Za-z]/),li=we(/[#-'*+\--9=?A-Z^-~]/);function wn(e){return e!==null&&(e<32||e===127)}const Sn=we(/\d/),oi=we(/[\dA-Fa-f]/),ui=we(/[!-/:-@[-`{-~]/);function T(e){return e!==null&&e<-2}function ee(e){return e!==null&&(e<0||e===32)}function N(e){return e===-2||e===-1||e===32}const ai=we(ii),si=we(/\s/);function we(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function V(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(s){return N(s)?(e.enter(t),u(s)):n(s)}function u(s){return N(s)&&l++<i?(e.consume(s),u):(e.exit(t),n(s))}}const ci={tokenize:pi};function pi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),V(e,n,"linePrefix")}function i(u){return e.enter("paragraph"),l(u)}function l(u){const s=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=s),t=s,o(u)}function o(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return T(u)?(e.consume(u),e.exit("chunkText"),l):(e.consume(u),o)}}const fi={tokenize:hi},ut={tokenize:mi};function hi(e){const n=this,t=[];let r=0,i,l,o;return u;function u(E){if(r<t.length){const z=t[r];return n.containerState=z[1],e.attempt(z[0].continuation,s,a)(E)}return a(E)}function s(E){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&L();const z=n.events.length;let B=z,g;for(;B--;)if(n.events[B][0]==="exit"&&n.events[B][1].type==="chunkFlow"){g=n.events[B][1].end;break}k(r);let P=z;for(;P<n.events.length;)n.events[P][1].end=Object.assign({},g),P++;return he(n.events,B+1,0,n.events.slice(z)),n.events.length=P,a(E)}return u(E)}function a(E){if(r===t.length){if(!i)return d(E);if(i.currentConstruct&&i.currentConstruct.concrete)return w(E);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(ut,c,m)(E)}function c(E){return i&&L(),k(r),d(E)}function m(E){return n.parser.lazy[n.now().line]=r!==t.length,o=n.now().offset,w(E)}function d(E){return n.containerState={},e.attempt(ut,f,w)(E)}function f(E){return r++,t.push([n.currentConstruct,n.containerState]),d(E)}function w(E){if(E===null){i&&L(),k(0),e.consume(E);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:l,_tokenizer:i}),x(E)}function x(E){if(E===null){C(e.exit("chunkFlow"),!0),k(0),e.consume(E);return}return T(E)?(e.consume(E),C(e.exit("chunkFlow")),r=0,n.interrupt=void 0,u):(e.consume(E),x)}function C(E,z){const B=n.sliceStream(E);if(z&&B.push(null),E.previous=l,l&&(l.next=E),l=E,i.defineSkip(E.start),i.write(B),n.parser.lazy[E.start.line]){let g=i.events.length;for(;g--;)if(i.events[g][1].start.offset<o&&(!i.events[g][1].end||i.events[g][1].end.offset>o))return;const P=n.events.length;let D=P,M,X;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){if(M){X=n.events[D][1].end;break}M=!0}for(k(r),g=P;g<n.events.length;)n.events[g][1].end=Object.assign({},X),g++;he(n.events,D+1,0,n.events.slice(P)),n.events.length=g}}function k(E){let z=t.length;for(;z-- >E;){const B=t[z];n.containerState=B[1],B[0].exit.call(n,e)}t.length=E}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function mi(e,n,t){return V(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function at(e){if(e===null||ee(e)||si(e))return 1;if(ai(e))return 2}function Pn(e,n,t){const r=[];let i=-1;for(;++i<e.length;){const l=e[i].resolveAll;l&&!r.includes(l)&&(n=l(n,t),r.push(l))}return n}const Cn={name:"attention",tokenize:gi,resolveAll:di};function di(e,n){let t=-1,r,i,l,o,u,s,a,c;for(;++t<e.length;)if(e[t][0]==="enter"&&e[t][1].type==="attentionSequence"&&e[t][1]._close){for(r=t;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&n.sliceSerialize(e[r][1]).charCodeAt(0)===n.sliceSerialize(e[t][1]).charCodeAt(0)){if((e[r][1]._close||e[t][1]._open)&&(e[t][1].end.offset-e[t][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[t][1].end.offset-e[t][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const m=Object.assign({},e[r][1].end),d=Object.assign({},e[t][1].start);st(m,-s),st(d,s),o={type:s>1?"strongSequence":"emphasisSequence",start:m,end:Object.assign({},e[r][1].end)},u={type:s>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:d},l={type:s>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:s>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},o.start),e[t][1].start=Object.assign({},u.end),a=[],e[r][1].end.offset-e[r][1].start.offset&&(a=re(a,[["enter",e[r][1],n],["exit",e[r][1],n]])),a=re(a,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),a=re(a,Pn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),a=re(a,[["exit",l,n],["enter",u,n],["exit",u,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(c=2,a=re(a,[["enter",e[t][1],n],["exit",e[t][1],n]])):c=0,he(e,r-1,t-r+3,a),t=r+a.length-c-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function gi(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=at(r);let l;return o;function o(s){return l=s,e.enter("attentionSequence"),u(s)}function u(s){if(s===l)return e.consume(s),u;const a=e.exit("attentionSequence"),c=at(s),m=!c||c===2&&i||t.includes(s),d=!i||i===2&&c||t.includes(r);return a._open=!!(l===42?m:m&&(i||!d)),a._close=!!(l===42?d:d&&(c||!m)),n(s)}}function st(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const yi={name:"autolink",tokenize:xi};function xi(e,n,t){let r=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(f){return fe(f)?(e.consume(f),o):a(f)}function o(f){return f===43||f===45||f===46||te(f)?(r=1,u(f)):a(f)}function u(f){return f===58?(e.consume(f),r=0,s):(f===43||f===45||f===46||te(f))&&r++<32?(e.consume(f),u):(r=0,a(f))}function s(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):f===null||f===32||f===60||wn(f)?t(f):(e.consume(f),s)}function a(f){return f===64?(e.consume(f),c):li(f)?(e.consume(f),a):t(f)}function c(f){return te(f)?m(f):t(f)}function m(f){return f===46?(e.consume(f),r=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),n):d(f)}function d(f){if((f===45||te(f))&&r++<63){const w=f===45?d:m;return e.consume(f),w}return t(f)}}const We={tokenize:ki,partial:!0};function ki(e,n,t){return r;function r(l){return N(l)?V(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||T(l)?n(l):t(l)}}const Mt={name:"blockQuote",tokenize:bi,continuation:{tokenize:wi},exit:Si};function bi(e,n,t){const r=this;return i;function i(o){if(o===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),l}return t(o)}function l(o){return N(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(o))}}function wi(e,n,t){const r=this;return i;function i(o){return N(o)?V(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):l(o)}function l(o){return e.attempt(Mt,n,t)(o)}}function Si(e){e.exit("blockQuote")}const _t={name:"characterEscape",tokenize:Ci};function Ci(e,n,t){return r;function r(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),i}function i(l){return ui(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const ct=document.createElement("i");function In(e){const n="&"+e+";";ct.innerHTML=n;const t=ct.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const jt={name:"characterReference",tokenize:Ei};function Ei(e,n,t){const r=this;let i=0,l,o;return u;function u(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),s}function s(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),a):(e.enter("characterReferenceValue"),l=31,o=te,c(m))}function a(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,o=oi,c):(e.enter("characterReferenceValue"),l=7,o=Sn,c(m))}function c(m){if(m===59&&i){const d=e.exit("characterReferenceValue");return o===te&&!In(r.sliceSerialize(d))?t(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return o(m)&&i++<l?(e.consume(m),c):t(m)}}const pt={tokenize:Fi,partial:!0},ft={name:"codeFenced",tokenize:Ai,concrete:!0};function Ai(e,n,t){const r=this,i={tokenize:B,partial:!0};let l=0,o=0,u;return s;function s(g){return a(g)}function a(g){const P=r.events[r.events.length-1];return l=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,u=g,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(g)}function c(g){return g===u?(o++,e.consume(g),c):o<3?t(g):(e.exit("codeFencedFenceSequence"),N(g)?V(e,m,"whitespace")(g):m(g))}function m(g){return g===null||T(g)?(e.exit("codeFencedFence"),r.interrupt?n(g):e.check(pt,x,z)(g)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===null||T(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(g)):N(g)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),V(e,f,"whitespace")(g)):g===96&&g===u?t(g):(e.consume(g),d)}function f(g){return g===null||T(g)?m(g):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(g))}function w(g){return g===null||T(g)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(g)):g===96&&g===u?t(g):(e.consume(g),w)}function x(g){return e.attempt(i,z,C)(g)}function C(g){return e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),k}function k(g){return l>0&&N(g)?V(e,L,"linePrefix",l+1)(g):L(g)}function L(g){return g===null||T(g)?e.check(pt,x,z)(g):(e.enter("codeFlowValue"),E(g))}function E(g){return g===null||T(g)?(e.exit("codeFlowValue"),L(g)):(e.consume(g),E)}function z(g){return e.exit("codeFenced"),n(g)}function B(g,P,D){let M=0;return X;function X(R){return g.enter("lineEnding"),g.consume(R),g.exit("lineEnding"),A}function A(R){return g.enter("codeFencedFence"),N(R)?V(g,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):F(R)}function F(R){return R===u?(g.enter("codeFencedFenceSequence"),q(R)):D(R)}function q(R){return R===u?(M++,g.consume(R),q):M>=o?(g.exit("codeFencedFenceSequence"),N(R)?V(g,$,"whitespace")(R):$(R)):D(R)}function $(R){return R===null||T(R)?(g.exit("codeFencedFence"),P(R)):D(R)}}}function Fi(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const hn={name:"codeIndented",tokenize:Ii},Pi={tokenize:Ti,partial:!0};function Ii(e,n,t){const r=this;return i;function i(a){return e.enter("codeIndented"),V(e,l,"linePrefix",5)(a)}function l(a){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?o(a):t(a)}function o(a){return a===null?s(a):T(a)?e.attempt(Pi,o,s)(a):(e.enter("codeFlowValue"),u(a))}function u(a){return a===null||T(a)?(e.exit("codeFlowValue"),o(a)):(e.consume(a),u)}function s(a){return e.exit("codeIndented"),n(a)}}function Ti(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):T(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):V(e,l,"linePrefix",5)(o)}function l(o){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):T(o)?i(o):t(o)}}const Oi={name:"codeText",tokenize:Di,resolve:vi,previous:Li};function vi(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r<n;)if(e[r][1].type==="codeTextData"){e[t][1].type="codeTextPadding",e[n][1].type="codeTextPadding",t+=2,n-=2;break}}for(r=t-1,n++;++r<=n;)i===void 0?r!==n&&e[r][1].type!=="lineEnding"&&(i=r):(r===n||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),n-=r-i-2,r=i+2),i=void 0);return e}function Li(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Di(e,n,t){let r=0,i,l;return o;function o(m){return e.enter("codeText"),e.enter("codeTextSequence"),u(m)}function u(m){return m===96?(e.consume(m),r++,u):(e.exit("codeTextSequence"),s(m))}function s(m){return m===null?t(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),s):m===96?(l=e.enter("codeTextSequence"),i=0,c(m)):T(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),s):(e.enter("codeTextData"),a(m))}function a(m){return m===null||m===32||m===96||T(m)?(e.exit("codeTextData"),s(m)):(e.consume(m),a)}function c(m){return m===96?(e.consume(m),i++,c):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(m)):(l.type="codeTextData",a(m))}}function Ht(e){const n={};let t=-1,r,i,l,o,u,s,a;for(;++t<e.length;){for(;t in n;)t=n[t];if(r=e[t],t&&r[1].type==="chunkFlow"&&e[t-1][1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,l=0,l<s.length&&s[l][1].type==="lineEndingBlank"&&(l+=2),l<s.length&&s[l][1].type==="content"))for(;++l<s.length&&s[l][1].type!=="content";)s[l][1].type==="chunkText"&&(s[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,zi(e,t)),t=n[t],a=!0);else if(r[1]._container){for(l=t,i=void 0;l--&&(o=e[l],o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),o[1].type="lineEnding",i=l);i&&(r[1].end=Object.assign({},e[i][1].start),u=e.slice(i,t),u.unshift(r),he(e,i,t-i+1,u))}}return!a}function zi(e,n){const t=e[n][1],r=e[n][2];let i=n-1;const l=[],o=t._tokenizer||r.parser[t.contentType](t.start),u=o.events,s=[],a={};let c,m,d=-1,f=t,w=0,x=0;const C=[x];for(;f;){for(;e[++i][1]!==f;);l.push(i),f._tokenizer||(c=r.sliceStream(f),f.next||c.push(null),m&&o.defineSkip(f.start),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(c),f._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),m=f,f=f.next}for(f=t;++d<u.length;)u[d][0]==="exit"&&u[d-1][0]==="enter"&&u[d][1].type===u[d-1][1].type&&u[d][1].start.line!==u[d][1].end.line&&(x=d+1,C.push(x),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(o.events=[],f?(f._tokenizer=void 0,f.previous=void 0):C.pop(),d=C.length;d--;){const k=u.slice(C[d],C[d+1]),L=l.pop();s.unshift([L,L+k.length-1]),he(e,L,2,k)}for(d=-1;++d<s.length;)a[w+s[d][0]]=w+s[d][1],w+=s[d][1]-s[d][0]-1;return a}const Bi={tokenize:Mi,resolve:Ni},Ri={tokenize:_i,partial:!0};function Ni(e){return Ht(e),e}function Mi(e,n){let t;return r;function r(u){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?l(u):T(u)?e.check(Ri,o,l)(u):(e.consume(u),i)}function l(u){return e.exit("chunkContent"),e.exit("content"),n(u)}function o(u){return e.consume(u),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function _i(e,n,t){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),V(e,l,"linePrefix")}function l(o){if(o===null||T(o))return t(o);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Ut(e,n,t,r,i,l,o,u,s){const a=s||Number.POSITIVE_INFINITY;let c=0;return m;function m(k){return k===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(k),e.exit(l),d):k===null||k===32||k===41||wn(k)?t(k):(e.enter(r),e.enter(o),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(k))}function d(k){return k===62?(e.enter(l),e.consume(k),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(u),e.enter("chunkString",{contentType:"string"}),f(k))}function f(k){return k===62?(e.exit("chunkString"),e.exit(u),d(k)):k===null||k===60||T(k)?t(k):(e.consume(k),k===92?w:f)}function w(k){return k===60||k===62||k===92?(e.consume(k),f):f(k)}function x(k){return!c&&(k===null||k===41||ee(k))?(e.exit("chunkString"),e.exit(u),e.exit(o),e.exit(r),n(k)):c<a&&k===40?(e.consume(k),c++,x):k===41?(e.consume(k),c--,x):k===null||k===32||k===40||wn(k)?t(k):(e.consume(k),k===92?C:x)}function C(k){return k===40||k===41||k===92?(e.consume(k),x):x(k)}}function Vt(e,n,t,r,i,l){const o=this;let u=0,s;return a;function a(f){return e.enter(r),e.enter(i),e.consume(f),e.exit(i),e.enter(l),c}function c(f){return u>999||f===null||f===91||f===93&&!s||f===94&&!u&&"_hiddenFootnoteSupport"in o.parser.constructs?t(f):f===93?(e.exit(l),e.enter(i),e.consume(f),e.exit(i),e.exit(r),n):T(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),m(f))}function m(f){return f===null||f===91||f===93||T(f)||u++>999?(e.exit("chunkString"),c(f)):(e.consume(f),s||(s=!N(f)),f===92?d:m)}function d(f){return f===91||f===92||f===93?(e.consume(f),u++,m):m(f)}}function qt(e,n,t,r,i,l){let o;return u;function u(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,s):t(d)}function s(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),a(d))}function a(d){return d===o?(e.exit(l),s(o)):d===null?t(d):T(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),V(e,a,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===o||d===null||T(d)?(e.exit("chunkString"),a(d)):(e.consume(d),d===92?m:c)}function m(d){return d===o||d===92?(e.consume(d),c):c(d)}}function Ne(e,n){let t;return r;function r(i){return T(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):N(i)?V(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ji={name:"definition",tokenize:Ui},Hi={tokenize:Vi,partial:!0};function Ui(e,n,t){const r=this;let i;return l;function l(f){return e.enter("definition"),o(f)}function o(f){return Vt.call(r,e,u,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function u(f){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),s):t(f)}function s(f){return ee(f)?Ne(e,a)(f):a(f)}function a(f){return Ut(e,c,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(Hi,m,m)(f)}function m(f){return N(f)?V(e,d,"whitespace")(f):d(f)}function d(f){return f===null||T(f)?(e.exit("definition"),r.parser.defined.push(i),n(f)):t(f)}}function Vi(e,n,t){return r;function r(u){return ee(u)?Ne(e,i)(u):t(u)}function i(u){return qt(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function l(u){return N(u)?V(e,o,"whitespace")(u):o(u)}function o(u){return u===null||T(u)?n(u):t(u)}}const qi={name:"hardBreakEscape",tokenize:$i};function $i(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return T(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Wi={name:"headingAtx",tokenize:Xi,resolve:Qi};function Qi(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},he(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Xi(e,n,t){let r=0;return i;function i(c){return e.enter("atxHeading"),l(c)}function l(c){return e.enter("atxHeadingSequence"),o(c)}function o(c){return c===35&&r++<6?(e.consume(c),o):c===null||ee(c)?(e.exit("atxHeadingSequence"),u(c)):t(c)}function u(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||T(c)?(e.exit("atxHeading"),n(c)):N(c)?V(e,u,"whitespace")(c):(e.enter("atxHeadingText"),a(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),u(c))}function a(c){return c===null||c===35||ee(c)?(e.exit("atxHeadingText"),u(c)):(e.consume(c),a)}}const Yi=["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"],ht=["pre","script","style","textarea"],Ki={name:"htmlFlow",tokenize:el,resolveTo:Ji,concrete:!0},Gi={tokenize:tl,partial:!0},Zi={tokenize:nl,partial:!0};function Ji(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function el(e,n,t){const r=this;let i,l,o,u,s;return a;function a(h){return c(h)}function c(h){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(h),m}function m(h){return h===33?(e.consume(h),d):h===47?(e.consume(h),l=!0,x):h===63?(e.consume(h),i=3,r.interrupt?n:p):fe(h)?(e.consume(h),o=String.fromCharCode(h),C):t(h)}function d(h){return h===45?(e.consume(h),i=2,f):h===91?(e.consume(h),i=5,u=0,w):fe(h)?(e.consume(h),i=4,r.interrupt?n:p):t(h)}function f(h){return h===45?(e.consume(h),r.interrupt?n:p):t(h)}function w(h){const se="CDATA[";return h===se.charCodeAt(u++)?(e.consume(h),u===se.length?r.interrupt?n:F:w):t(h)}function x(h){return fe(h)?(e.consume(h),o=String.fromCharCode(h),C):t(h)}function C(h){if(h===null||h===47||h===62||ee(h)){const se=h===47,Ee=o.toLowerCase();return!se&&!l&&ht.includes(Ee)?(i=1,r.interrupt?n(h):F(h)):Yi.includes(o.toLowerCase())?(i=6,se?(e.consume(h),k):r.interrupt?n(h):F(h)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(h):l?L(h):E(h))}return h===45||te(h)?(e.consume(h),o+=String.fromCharCode(h),C):t(h)}function k(h){return h===62?(e.consume(h),r.interrupt?n:F):t(h)}function L(h){return N(h)?(e.consume(h),L):X(h)}function E(h){return h===47?(e.consume(h),X):h===58||h===95||fe(h)?(e.consume(h),z):N(h)?(e.consume(h),E):X(h)}function z(h){return h===45||h===46||h===58||h===95||te(h)?(e.consume(h),z):B(h)}function B(h){return h===61?(e.consume(h),g):N(h)?(e.consume(h),B):E(h)}function g(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),s=h,P):N(h)?(e.consume(h),g):D(h)}function P(h){return h===s?(e.consume(h),s=null,M):h===null||T(h)?t(h):(e.consume(h),P)}function D(h){return h===null||h===34||h===39||h===47||h===60||h===61||h===62||h===96||ee(h)?B(h):(e.consume(h),D)}function M(h){return h===47||h===62||N(h)?E(h):t(h)}function X(h){return h===62?(e.consume(h),A):t(h)}function A(h){return h===null||T(h)?F(h):N(h)?(e.consume(h),A):t(h)}function F(h){return h===45&&i===2?(e.consume(h),G):h===60&&i===1?(e.consume(h),Y):h===62&&i===4?(e.consume(h),ae):h===63&&i===3?(e.consume(h),p):h===93&&i===5?(e.consume(h),me):T(h)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Gi,de,q)(h)):h===null||T(h)?(e.exit("htmlFlowData"),q(h)):(e.consume(h),F)}function q(h){return e.check(Zi,$,de)(h)}function $(h){return e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),R}function R(h){return h===null||T(h)?q(h):(e.enter("htmlFlowData"),F(h))}function G(h){return h===45?(e.consume(h),p):F(h)}function Y(h){return h===47?(e.consume(h),o="",ue):F(h)}function ue(h){if(h===62){const se=o.toLowerCase();return ht.includes(se)?(e.consume(h),ae):F(h)}return fe(h)&&o.length<8?(e.consume(h),o+=String.fromCharCode(h),ue):F(h)}function me(h){return h===93?(e.consume(h),p):F(h)}function p(h){return h===62?(e.consume(h),ae):h===45&&i===2?(e.consume(h),p):F(h)}function ae(h){return h===null||T(h)?(e.exit("htmlFlowData"),de(h)):(e.consume(h),ae)}function de(h){return e.exit("htmlFlow"),n(h)}}function nl(e,n,t){const r=this;return i;function i(o){return T(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function tl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(We,n,t)}}const rl={name:"htmlText",tokenize:il};function il(e,n,t){const r=this;let i,l,o;return u;function u(p){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(p),s}function s(p){return p===33?(e.consume(p),a):p===47?(e.consume(p),B):p===63?(e.consume(p),E):fe(p)?(e.consume(p),D):t(p)}function a(p){return p===45?(e.consume(p),c):p===91?(e.consume(p),l=0,w):fe(p)?(e.consume(p),L):t(p)}function c(p){return p===45?(e.consume(p),f):t(p)}function m(p){return p===null?t(p):p===45?(e.consume(p),d):T(p)?(o=m,Y(p)):(e.consume(p),m)}function d(p){return p===45?(e.consume(p),f):m(p)}function f(p){return p===62?G(p):p===45?d(p):m(p)}function w(p){const ae="CDATA[";return p===ae.charCodeAt(l++)?(e.consume(p),l===ae.length?x:w):t(p)}function x(p){return p===null?t(p):p===93?(e.consume(p),C):T(p)?(o=x,Y(p)):(e.consume(p),x)}function C(p){return p===93?(e.consume(p),k):x(p)}function k(p){return p===62?G(p):p===93?(e.consume(p),k):x(p)}function L(p){return p===null||p===62?G(p):T(p)?(o=L,Y(p)):(e.consume(p),L)}function E(p){return p===null?t(p):p===63?(e.consume(p),z):T(p)?(o=E,Y(p)):(e.consume(p),E)}function z(p){return p===62?G(p):E(p)}function B(p){return fe(p)?(e.consume(p),g):t(p)}function g(p){return p===45||te(p)?(e.consume(p),g):P(p)}function P(p){return T(p)?(o=P,Y(p)):N(p)?(e.consume(p),P):G(p)}function D(p){return p===45||te(p)?(e.consume(p),D):p===47||p===62||ee(p)?M(p):t(p)}function M(p){return p===47?(e.consume(p),G):p===58||p===95||fe(p)?(e.consume(p),X):T(p)?(o=M,Y(p)):N(p)?(e.consume(p),M):G(p)}function X(p){return p===45||p===46||p===58||p===95||te(p)?(e.consume(p),X):A(p)}function A(p){return p===61?(e.consume(p),F):T(p)?(o=A,Y(p)):N(p)?(e.consume(p),A):M(p)}function F(p){return p===null||p===60||p===61||p===62||p===96?t(p):p===34||p===39?(e.consume(p),i=p,q):T(p)?(o=F,Y(p)):N(p)?(e.consume(p),F):(e.consume(p),$)}function q(p){return p===i?(e.consume(p),i=void 0,R):p===null?t(p):T(p)?(o=q,Y(p)):(e.consume(p),q)}function $(p){return p===null||p===34||p===39||p===60||p===61||p===96?t(p):p===47||p===62||ee(p)?M(p):(e.consume(p),$)}function R(p){return p===47||p===62||ee(p)?M(p):t(p)}function G(p){return p===62?(e.consume(p),e.exit("htmlTextData"),e.exit("htmlText"),n):t(p)}function Y(p){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ue}function ue(p){return N(p)?V(e,me,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p):me(p)}function me(p){return e.enter("htmlTextData"),o(p)}}const Tn={name:"labelEnd",tokenize:cl,resolveTo:sl,resolveAll:al},ll={tokenize:pl},ol={tokenize:fl},ul={tokenize:hl};function al(e){let n=-1;for(;++n<e.length;){const t=e[n][1];(t.type==="labelImage"||t.type==="labelLink"||t.type==="labelEnd")&&(e.splice(n+1,t.type==="labelImage"?4:2),t.type="data",n++)}return e}function sl(e,n){let t=e.length,r=0,i,l,o,u;for(;t--;)if(i=e[t][1],l){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(l=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const s={type:e[l][1].type==="labelLink"?"link":"image",start:Object.assign({},e[l][1].start),end:Object.assign({},e[e.length-1][1].end)},a={type:"label",start:Object.assign({},e[l][1].start),end:Object.assign({},e[o][1].end)},c={type:"labelText",start:Object.assign({},e[l+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return u=[["enter",s,n],["enter",a,n]],u=re(u,e.slice(l+1,l+r+3)),u=re(u,[["enter",c,n]]),u=re(u,Pn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,o-3),n)),u=re(u,[["exit",c,n],e[o-2],e[o-1],["exit",a,n]]),u=re(u,e.slice(o+1)),u=re(u,[["exit",s,n]]),he(e,l,e.length,u),e}function cl(e,n,t){const r=this;let i=r.events.length,l,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){l=r.events[i][1];break}return u;function u(d){return l?l._inactive?m(d):(o=r.parser.defined.includes(Te(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),s):t(d)}function s(d){return d===40?e.attempt(ll,c,o?c:m)(d):d===91?e.attempt(ol,c,o?a:m)(d):o?c(d):m(d)}function a(d){return e.attempt(ul,c,m)(d)}function c(d){return n(d)}function m(d){return l._balanced=!0,t(d)}}function pl(e,n,t){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return ee(m)?Ne(e,l)(m):l(m)}function l(m){return m===41?c(m):Ut(e,o,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function o(m){return ee(m)?Ne(e,s)(m):c(m)}function u(m){return t(m)}function s(m){return m===34||m===39||m===40?qt(e,a,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):c(m)}function a(m){return ee(m)?Ne(e,c)(m):c(m)}function c(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),n):t(m)}}function fl(e,n,t){const r=this;return i;function i(u){return Vt.call(r,e,l,o,"reference","referenceMarker","referenceString")(u)}function l(u){return r.parser.defined.includes(Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(u):t(u)}function o(u){return t(u)}}function hl(e,n,t){return r;function r(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),i}function i(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),n):t(l)}}const ml={name:"labelStartImage",tokenize:dl,resolveAll:Tn.resolveAll};function dl(e,n,t){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),l}function l(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),o):t(u)}function o(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(u):n(u)}}const gl={name:"labelStartLink",tokenize:yl,resolveAll:Tn.resolveAll};function yl(e,n,t){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),l}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const mn={name:"lineEnding",tokenize:xl};function xl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),V(e,n,"linePrefix")}}const qe={name:"thematicBreak",tokenize:kl};function kl(e,n,t){let r=0,i;return l;function l(a){return e.enter("thematicBreak"),o(a)}function o(a){return i=a,u(a)}function u(a){return a===i?(e.enter("thematicBreakSequence"),s(a)):r>=3&&(a===null||T(a))?(e.exit("thematicBreak"),n(a)):t(a)}function s(a){return a===i?(e.consume(a),r++,s):(e.exit("thematicBreakSequence"),N(a)?V(e,u,"whitespace")(a):u(a))}}const Z={name:"list",tokenize:Sl,continuation:{tokenize:Cl},exit:Al},bl={tokenize:Fl,partial:!0},wl={tokenize:El,partial:!0};function Sl(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return u;function u(f){const w=r.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||f===r.containerState.marker:Sn(f)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(qe,t,a)(f):a(f);if(!r.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(f)}return t(f)}function s(f){return Sn(f)&&++o<10?(e.consume(f),s):(!r.interrupt||o<2)&&(r.containerState.marker?f===r.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),a(f)):t(f)}function a(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||f,e.check(We,r.interrupt?t:c,e.attempt(bl,d,m))}function c(f){return r.containerState.initialBlankLine=!0,l++,d(f)}function m(f){return N(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):t(f)}function d(f){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(f)}}function Cl(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(We,i,l);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,V(e,n,"listItemIndent",r.containerState.size+1)(u)}function l(u){return r.containerState.furtherBlankLines||!N(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wl,n,o)(u))}function o(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,V(e,e.attempt(Z,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function El(e,n,t){const r=this;return V(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function Al(e){e.exit(this.containerState.type)}function Fl(e,n,t){const r=this;return V(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!N(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const mt={name:"setextUnderline",tokenize:Il,resolveTo:Pl};function Pl(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[l][1].end)):e[r][1]=o,e.push(["exit",o,n]),e}function Il(e,n,t){const r=this;let i;return l;function l(a){let c=r.events.length,m;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){m=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=a,o(a)):t(a)}function o(a){return e.enter("setextHeadingLineSequence"),u(a)}function u(a){return a===i?(e.consume(a),u):(e.exit("setextHeadingLineSequence"),N(a)?V(e,s,"lineSuffix")(a):s(a))}function s(a){return a===null||T(a)?(e.exit("setextHeadingLine"),n(a)):t(a)}}const Tl={tokenize:Ol};function Ol(e){const n=this,t=e.attempt(We,r,e.attempt(this.parser.constructs.flowInitial,i,V(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Bi,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const vl={resolveAll:Wt()},Ll=$t("string"),Dl=$t("text");function $t(e){return{tokenize:n,resolveAll:Wt(e==="text"?zl:void 0)};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,u);return o;function o(c){return a(c)?l(c):u(c)}function u(c){if(c===null){t.consume(c);return}return t.enter("data"),t.consume(c),s}function s(c){return a(c)?(t.exit("data"),l(c)):(t.consume(c),s)}function a(c){if(c===null)return!0;const m=i[c];let d=-1;if(m)for(;++d<m.length;){const f=m[d];if(!f.previous||f.previous.call(r,r.previous))return!0}return!1}}}function Wt(e){return n;function n(t,r){let i=-1,l;for(;++i<=t.length;)l===void 0?t[i]&&t[i][1].type==="data"&&(l=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==l+2&&(t[l][1].end=t[i-1][1].end,t.splice(l+2,i-l-2),i=l+2),l=void 0);return e?e(t,r):t}}function zl(e,n){let t=0;for(;++t<=e.length;)if((t===e.length||e[t][1].type==="lineEnding")&&e[t-1][1].type==="data"){const r=e[t-1][1],i=n.sliceStream(r);let l=i.length,o=-1,u=0,s;for(;l--;){const a=i[l];if(typeof a=="string"){for(o=a.length;a.charCodeAt(o-1)===32;)u++,o--;if(o)break;o=-1}else if(a===-2)s=!0,u++;else if(a!==-1){l++;break}}if(u){const a={type:t===e.length||s||u<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-u,offset:r.end.offset-u,_index:r.start._index+l,_bufferIndex:l?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},a.start),r.start.offset===r.end.offset?Object.assign(r,a):(e.splice(t,0,["enter",a,n],["exit",a,n]),t+=2)}t++}return e}function Bl(e,n,t){let r=Object.assign(t?Object.assign({},t):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},l=[];let o=[],u=[];const s={consume:L,enter:E,exit:z,attempt:P(B),check:P(g),interrupt:P(g,{interrupt:!0})},a={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:d,now:w,defineSkip:x,write:m};let c=n.tokenize.call(a,s);return n.resolveAll&&l.push(n),a;function m(A){return o=re(o,A),C(),o[o.length-1]!==null?[]:(D(n,0),a.events=Pn(l,a.events,a),a.events)}function d(A,F){return Nl(f(A),F)}function f(A){return Rl(o,A)}function w(){const{line:A,column:F,offset:q,_index:$,_bufferIndex:R}=r;return{line:A,column:F,offset:q,_index:$,_bufferIndex:R}}function x(A){i[A.line]=A.column,X()}function C(){let A;for(;r._index<o.length;){const F=o[r._index];if(typeof F=="string")for(A=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===A&&r._bufferIndex<F.length;)k(F.charCodeAt(r._bufferIndex));else k(F)}}function k(A){c=c(A)}function L(A){T(A)?(r.line++,r.column=1,r.offset+=A===-3?2:1,X()):A!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),a.previous=A}function E(A,F){const q=F||{};return q.type=A,q.start=w(),a.events.push(["enter",q,a]),u.push(q),q}function z(A){const F=u.pop();return F.end=w(),a.events.push(["exit",F,a]),F}function B(A,F){D(A,F.from)}function g(A,F){F.restore()}function P(A,F){return q;function q($,R,G){let Y,ue,me,p;return Array.isArray($)?de($):"tokenize"in $?de([$]):ae($);function ae(K){return Ae;function Ae(xe){const Fe=xe!==null&&K[xe],Pe=xe!==null&&K.null,ln=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Pe)?Pe:Pe?[Pe]:[]];return de(ln)(xe)}}function de(K){return Y=K,ue=0,K.length===0?G:h(K[ue])}function h(K){return Ae;function Ae(xe){return p=M(),me=K,K.partial||(a.currentConstruct=K),K.name&&a.parser.constructs.disable.null.includes(K.name)?Ee():K.tokenize.call(F?Object.assign(Object.create(a),F):a,s,se,Ee)(xe)}}function se(K){return A(me,p),R}function Ee(K){return p.restore(),++ue<Y.length?h(Y[ue]):G}}}function D(A,F){A.resolveAll&&!l.includes(A)&&l.push(A),A.resolve&&he(a.events,F,a.events.length-F,A.resolve(a.events.slice(F),a)),A.resolveTo&&(a.events=A.resolveTo(a.events,a))}function M(){const A=w(),F=a.previous,q=a.currentConstruct,$=a.events.length,R=Array.from(u);return{restore:G,from:$};function G(){r=A,a.previous=F,a.currentConstruct=q,a.events.length=$,u=R,X()}}function X(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Rl(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let o;if(t===i)o=[e[t].slice(r,l)];else{if(o=e.slice(t,i),r>-1){const u=o[0];typeof u=="string"?o[0]=u.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Nl(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let o;if(typeof l=="string")o=l;else switch(l){case-5:{o="\r";break}case-4:{o=`
|
|
7
|
+
`;break}case-3:{o=`\r
|
|
8
|
+
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(l)}i=l===-2,r.push(o)}return r.join("")}const Ml={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:Mt},_l={91:ji},jl={[-2]:hn,[-1]:hn,32:hn},Hl={35:Wi,42:qe,45:[mt,qe],60:Ki,61:mt,95:qe,96:ft,126:ft},Ul={38:jt,92:_t},Vl={[-5]:mn,[-4]:mn,[-3]:mn,33:ml,38:jt,42:Cn,60:[yi,rl],91:gl,92:[qi,_t],93:Tn,95:Cn,96:Oi},ql={null:[Cn,vl]},$l={null:[42,95]},Wl={null:[]},Ql=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:$l,contentInitial:_l,disable:Wl,document:Ml,flow:Hl,flowInitial:jl,insideSpan:ql,string:Ul,text:Vl},Symbol.toStringTag,{value:"Module"}));function Xl(e){const t=ni([Ql,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(ci),document:i(fi),flow:i(Tl),string:i(Ll),text:i(Dl)};return r;function i(l){return o;function o(u){return Bl(r,l,u)}}}const dt=/[\0\t\n\r]/g;function Yl(){let e=1,n="",t=!0,r;return i;function i(l,o,u){const s=[];let a,c,m,d,f;for(l=n+l.toString(o),m=0,n="",t&&(l.charCodeAt(0)===65279&&m++,t=void 0);m<l.length;){if(dt.lastIndex=m,a=dt.exec(l),d=a&&a.index!==void 0?a.index:l.length,f=l.charCodeAt(d),!a){n=l.slice(m);break}if(f===10&&m===d&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),m<d&&(s.push(l.slice(m,d)),e+=d-m),f){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}m=d+1}return u&&(r&&s.push(-5),n&&s.push(n),s.push(null)),s}}function Kl(e){for(;!Ht(e););return e}function Qt(e,n){const t=Number.parseInt(e,n);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCharCode(t)}const Gl=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Zl(e){return e.replace(Gl,Jl)}function Jl(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return Qt(t.slice(l?2:1),l?16:10)}return In(t)||e}const Xt={}.hasOwnProperty,eo=function(e,n,t){return typeof n!="string"&&(t=n,n=void 0),no(t)(Kl(Xl(t).document().write(Yl()(e,n,!0))))};function no(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Un),autolinkProtocol:A,autolinkEmail:A,atxHeading:u(_n),blockQuote:u(ln),characterEscape:A,characterReference:A,codeFenced:u(Mn),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:u(Mn,s),codeText:u(kr,s),codeTextData:A,data:A,codeFlowValue:A,definition:u(br),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:u(wr),hardBreakEscape:u(jn),hardBreakTrailing:u(jn),htmlFlow:u(Hn,s),htmlFlowData:A,htmlText:u(Hn,s),htmlTextData:A,image:u(Sr),label:s,link:u(Un),listItem:u(Cr),listItemValue:w,listOrdered:u(Vn,f),listUnordered:u(Vn),paragraph:u(Er),reference:Ee,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:u(_n),strong:u(Ar),thematicBreak:u(Pr)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:Pe,autolinkProtocol:Fe,blockQuote:c(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:Ae,characterReferenceMarkerNumeric:Ae,characterReferenceValue:xe,codeFenced:c(L),codeFencedFence:k,codeFencedFenceInfo:x,codeFencedFenceMeta:C,codeFlowValue:F,codeIndented:c(E),codeText:c(Y),codeTextData:F,data:F,definition:c(),definitionDestinationString:g,definitionLabelString:z,definitionTitleString:B,emphasis:c(),hardBreakEscape:c($),hardBreakTrailing:c($),htmlFlow:c(R),htmlFlowData:F,htmlText:c(G),htmlTextData:F,image:c(me),label:ae,labelText:p,lineEnding:q,link:c(ue),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:K,resourceDestinationString:de,resourceTitleString:h,resource:se,setextHeading:c(X),setextHeadingLineSequence:M,setextHeadingText:D,strong:c(),thematicBreak:c()}};Yt(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(y){let S={type:"root",children:[]};const I={stack:[S],tokenStack:[],config:n,enter:a,exit:m,buffer:s,resume:d,setData:l,getData:o},j=[];let H=-1;for(;++H<y.length;)if(y[H][1].type==="listOrdered"||y[H][1].type==="listUnordered")if(y[H][0]==="enter")j.push(H);else{const ce=j.pop();H=i(y,ce,H)}for(H=-1;++H<y.length;){const ce=n[y[H][0]];Xt.call(ce,y[H][1].type)&&ce[y[H][1].type].call(Object.assign({sliceSerialize:y[H][2].sliceSerialize},I),y[H][1])}if(I.tokenStack.length>0){const ce=I.tokenStack[I.tokenStack.length-1];(ce[1]||gt).call(I,void 0,ce[0])}for(S.position={start:be(y.length>0?y[0][1].start:{line:1,column:1,offset:0}),end:be(y.length>0?y[y.length-2][1].end:{line:1,column:1,offset:0})},H=-1;++H<n.transforms.length;)S=n.transforms[H](S)||S;return S}function i(y,S,I){let j=S-1,H=-1,ce=!1,ke,ge,De,ze;for(;++j<=I;){const W=y[j];if(W[1].type==="listUnordered"||W[1].type==="listOrdered"||W[1].type==="blockQuote"?(W[0]==="enter"?H++:H--,ze=void 0):W[1].type==="lineEndingBlank"?W[0]==="enter"&&(ke&&!ze&&!H&&!De&&(De=j),ze=void 0):W[1].type==="linePrefix"||W[1].type==="listItemValue"||W[1].type==="listItemMarker"||W[1].type==="listItemPrefix"||W[1].type==="listItemPrefixWhitespace"||(ze=void 0),!H&&W[0]==="enter"&&W[1].type==="listItemPrefix"||H===-1&&W[0]==="exit"&&(W[1].type==="listUnordered"||W[1].type==="listOrdered")){if(ke){let on=j;for(ge=void 0;on--;){const ye=y[on];if(ye[1].type==="lineEnding"||ye[1].type==="lineEndingBlank"){if(ye[0]==="exit")continue;ge&&(y[ge][1].type="lineEndingBlank",ce=!0),ye[1].type="lineEnding",ge=on}else if(!(ye[1].type==="linePrefix"||ye[1].type==="blockQuotePrefix"||ye[1].type==="blockQuotePrefixWhitespace"||ye[1].type==="blockQuoteMarker"||ye[1].type==="listItemIndent"))break}De&&(!ge||De<ge)&&(ke._spread=!0),ke.end=Object.assign({},ge?y[ge][1].start:W[1].end),y.splice(ge||j,0,["exit",ke,W[2]]),j++,I++}W[1].type==="listItemPrefix"&&(ke={type:"listItem",_spread:!1,start:Object.assign({},W[1].start),end:void 0},y.splice(j,0,["enter",ke,W[2]]),j++,I++,De=void 0,ze=!0)}}return y[S][1]._spread=ce,I}function l(y,S){t[y]=S}function o(y){return t[y]}function u(y,S){return I;function I(j){a.call(this,y(j),j),S&&S.call(this,j)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(y,S,I){return this.stack[this.stack.length-1].children.push(y),this.stack.push(y),this.tokenStack.push([S,I]),y.position={start:be(S.start)},y}function c(y){return S;function S(I){y&&y.call(this,I),m.call(this,I)}}function m(y,S){const I=this.stack.pop(),j=this.tokenStack.pop();if(j)j[0].type!==y.type&&(S?S.call(this,y,j[0]):(j[1]||gt).call(this,y,j[0]));else throw new Error("Cannot close `"+y.type+"` ("+Re({start:y.start,end:y.end})+"): it’s not open");return I.position.end=be(y.end),I}function d(){return Jr(this.stack.pop())}function f(){l("expectingFirstListItemValue",!0)}function w(y){if(o("expectingFirstListItemValue")){const S=this.stack[this.stack.length-2];S.start=Number.parseInt(this.sliceSerialize(y),10),l("expectingFirstListItemValue")}}function x(){const y=this.resume(),S=this.stack[this.stack.length-1];S.lang=y}function C(){const y=this.resume(),S=this.stack[this.stack.length-1];S.meta=y}function k(){o("flowCodeInside")||(this.buffer(),l("flowCodeInside",!0))}function L(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),l("flowCodeInside")}function E(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y.replace(/(\r?\n|\r)$/g,"")}function z(y){const S=this.resume(),I=this.stack[this.stack.length-1];I.label=S,I.identifier=Te(this.sliceSerialize(y)).toLowerCase()}function B(){const y=this.resume(),S=this.stack[this.stack.length-1];S.title=y}function g(){const y=this.resume(),S=this.stack[this.stack.length-1];S.url=y}function P(y){const S=this.stack[this.stack.length-1];if(!S.depth){const I=this.sliceSerialize(y).length;S.depth=I}}function D(){l("setextHeadingSlurpLineEnding",!0)}function M(y){const S=this.stack[this.stack.length-1];S.depth=this.sliceSerialize(y).charCodeAt(0)===61?1:2}function X(){l("setextHeadingSlurpLineEnding")}function A(y){const S=this.stack[this.stack.length-1];let I=S.children[S.children.length-1];(!I||I.type!=="text")&&(I=Fr(),I.position={start:be(y.start)},S.children.push(I)),this.stack.push(I)}function F(y){const S=this.stack.pop();S.value+=this.sliceSerialize(y),S.position.end=be(y.end)}function q(y){const S=this.stack[this.stack.length-1];if(o("atHardBreak")){const I=S.children[S.children.length-1];I.position.end=be(y.end),l("atHardBreak");return}!o("setextHeadingSlurpLineEnding")&&n.canContainEols.includes(S.type)&&(A.call(this,y),F.call(this,y))}function $(){l("atHardBreak",!0)}function R(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y}function G(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y}function Y(){const y=this.resume(),S=this.stack[this.stack.length-1];S.value=y}function ue(){const y=this.stack[this.stack.length-1];if(o("inReference")){const S=o("referenceType")||"shortcut";y.type+="Reference",y.referenceType=S,delete y.url,delete y.title}else delete y.identifier,delete y.label;l("referenceType")}function me(){const y=this.stack[this.stack.length-1];if(o("inReference")){const S=o("referenceType")||"shortcut";y.type+="Reference",y.referenceType=S,delete y.url,delete y.title}else delete y.identifier,delete y.label;l("referenceType")}function p(y){const S=this.sliceSerialize(y),I=this.stack[this.stack.length-2];I.label=Zl(S),I.identifier=Te(S).toLowerCase()}function ae(){const y=this.stack[this.stack.length-1],S=this.resume(),I=this.stack[this.stack.length-1];if(l("inReference",!0),I.type==="link"){const j=y.children;I.children=j}else I.alt=S}function de(){const y=this.resume(),S=this.stack[this.stack.length-1];S.url=y}function h(){const y=this.resume(),S=this.stack[this.stack.length-1];S.title=y}function se(){l("inReference")}function Ee(){l("referenceType","collapsed")}function K(y){const S=this.resume(),I=this.stack[this.stack.length-1];I.label=S,I.identifier=Te(this.sliceSerialize(y)).toLowerCase(),l("referenceType","full")}function Ae(y){l("characterReferenceType",y.type)}function xe(y){const S=this.sliceSerialize(y),I=o("characterReferenceType");let j;I?(j=Qt(S,I==="characterReferenceMarkerNumeric"?10:16),l("characterReferenceType")):j=In(S);const H=this.stack.pop();H.value+=j,H.position.end=be(y.end)}function Fe(y){F.call(this,y);const S=this.stack[this.stack.length-1];S.url=this.sliceSerialize(y)}function Pe(y){F.call(this,y);const S=this.stack[this.stack.length-1];S.url="mailto:"+this.sliceSerialize(y)}function ln(){return{type:"blockquote",children:[]}}function Mn(){return{type:"code",lang:null,meta:null,value:""}}function kr(){return{type:"inlineCode",value:""}}function br(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function wr(){return{type:"emphasis",children:[]}}function _n(){return{type:"heading",depth:void 0,children:[]}}function jn(){return{type:"break"}}function Hn(){return{type:"html",value:""}}function Sr(){return{type:"image",title:null,url:"",alt:null}}function Un(){return{type:"link",title:null,url:"",children:[]}}function Vn(y){return{type:"list",ordered:y.type==="listOrdered",start:null,spread:y._spread,children:[]}}function Cr(y){return{type:"listItem",spread:y._spread,checked:null,children:[]}}function Er(){return{type:"paragraph",children:[]}}function Ar(){return{type:"strong",children:[]}}function Fr(){return{type:"text",value:""}}function Pr(){return{type:"thematicBreak"}}}function be(e){return{line:e.line,column:e.column,offset:e.offset}}function Yt(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?Yt(e,r):to(e,r)}}function to(e,n){let t;for(t in n)if(Xt.call(n,t)){if(t==="canContainEols"){const r=n[t];r&&e[t].push(...r)}else if(t==="transforms"){const r=n[t];r&&e[t].push(...r)}else if(t==="enter"||t==="exit"){const r=n[t];r&&Object.assign(e[t],r)}}}function gt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Re({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Re({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Re({start:n.start,end:n.end})+") is still open")}function ro(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return eo(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function io(e,n){const t={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,t),e.applyData(n,t)}function lo(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
9
|
+
`}]}function oo(e,n){const t=n.value?n.value+`
|
|
10
|
+
`:"",r=n.lang?n.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,i={};r&&(i.className=["language-"+r]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:t}]};return n.meta&&(l.data={meta:n.meta}),e.patch(n,l),l=e.applyData(n,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(n,l),l}function uo(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ao(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ve(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let o="";if(l===37&&te(e.charCodeAt(t+1))&&te(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(o=String.fromCharCode(l));else if(l>55295&&l<57344){const u=e.charCodeAt(t+1);l<56320&&u>56319&&u<57344?(o=String.fromCharCode(l,u),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function Kt(e,n){const t=String(n.identifier).toUpperCase(),r=ve(t.toLowerCase()),i=e.footnoteOrder.indexOf(t);let l;i===-1?(e.footnoteOrder.push(t),e.footnoteCounts[t]=1,l=e.footnoteOrder.length):(e.footnoteCounts[t]++,l=i+1);const o=e.footnoteCounts[t],u={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,u);const s={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(n,s),e.applyData(n,s)}function so(e,n){const t=e.footnoteById;let r=1;for(;r in t;)r++;const i=String(r);return t[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:n.children}],position:n.position},Kt(e,{type:"footnoteReference",identifier:i,position:n.position})}function co(e,n){const t={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function po(e,n){if(e.dangerous){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}return null}function Gt(e,n){const t=n.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return{type:"text",value:"!["+n.alt+r};const i=e.all(n),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function fo(e,n){const t=e.definition(n.identifier);if(!t)return Gt(e,n);const r={src:ve(t.url||""),alt:n.alt};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,i),e.applyData(n,i)}function ho(e,n){const t={src:ve(n.url)};n.alt!==null&&n.alt!==void 0&&(t.alt=n.alt),n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"img",properties:t,children:[]};return e.patch(n,r),e.applyData(n,r)}function mo(e,n){const t={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return e.patch(n,r),e.applyData(n,r)}function go(e,n){const t=e.definition(n.identifier);if(!t)return Gt(e,n);const r={href:ve(t.url||"")};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,i),e.applyData(n,i)}function yo(e,n){const t={href:ve(n.url)};n.title!==null&&n.title!==void 0&&(t.title=n.title);const r={type:"element",tagName:"a",properties:t,children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function xo(e,n,t){const r=e.all(n),i=t?ko(t):Zt(n),l={},o=[];if(typeof n.checked=="boolean"){const c=r[0];let m;c&&c.type==="element"&&c.tagName==="p"?m=c:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const c=r[u];(i||u!==0||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
|
|
11
|
+
`}),c.type==="element"&&c.tagName==="p"&&!i?o.push(...c.children):o.push(c)}const s=r[r.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&o.push({type:"text",value:`
|
|
12
|
+
`});const a={type:"element",tagName:"li",properties:l,children:o};return e.patch(n,a),e.applyData(n,a)}function ko(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r<t.length;)n=Zt(t[r])}return n}function Zt(e){const n=e.spread;return n??e.children.length>1}function bo(e,n){const t={},r=e.all(n);let i=-1;for(typeof n.start=="number"&&n.start!==1&&(t.start=n.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const l={type:"element",tagName:n.ordered?"ol":"ul",properties:t,children:e.wrap(r,!0)};return e.patch(n,l),e.applyData(n,l)}function wo(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function So(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function Co(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const On=Jt("start"),vn=Jt("end");function Eo(e){return{start:On(e),end:vn(e)}}function Jt(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};return{line:r.line||null,column:r.column||null,offset:r.offset>-1?r.offset:null}}}function Ao(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},u=On(n.children[1]),s=vn(n.children[n.children.length-1]);u.line&&s.line&&(o.position={start:u,end:s}),i.push(o)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function Fo(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,u=o?o.length:n.children.length;let s=-1;const a=[];for(;++s<u;){const m=n.children[s],d={},f=o?o[s]:void 0;f&&(d.align=f);let w={type:"element",tagName:l,properties:d,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(n,w)),a.push(w)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(a,!0)};return e.patch(n,c),e.applyData(n,c)}function Po(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const yt=9,xt=32;function Io(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push(kt(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push(kt(n.slice(i),i>0,!1)),l.join("")}function kt(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===yt||l===xt;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===yt||l===xt;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function To(e,n){const t={type:"text",value:Io(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function Oo(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const vo={blockquote:io,break:lo,code:oo,delete:uo,emphasis:ao,footnoteReference:Kt,footnote:so,heading:co,html:po,imageReference:fo,image:ho,inlineCode:mo,linkReference:go,link:yo,listItem:xo,list:bo,paragraph:wo,root:So,strong:Co,table:Ao,tableCell:Po,tableRow:Fo,text:To,thematicBreak:Oo,toml:He,yaml:He,definition:He,footnoteDefinition:He};function He(){return null}const er=function(e){if(e==null)return Bo;if(typeof e=="string")return zo(e);if(typeof e=="object")return Array.isArray(e)?Lo(e):Do(e);if(typeof e=="function")return Qe(e);throw new Error("Expected function, string, or object as test")};function Lo(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=er(e[t]);return Qe(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].call(this,...i))return!0;return!1}}function Do(e){return Qe(n);function n(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}function zo(e){return Qe(n);function n(t){return t&&t.type===e}}function Qe(e){return n;function n(t,...r){return!!(t&&typeof t=="object"&&"type"in t&&e.call(this,t,...r))}}function Bo(){return!0}const Ro=!0,bt=!1,No="skip",Mo=function(e,n,t,r){typeof n=="function"&&typeof t!="function"&&(r=t,t=n,n=null);const i=er(n),l=r?-1:1;o(e,void 0,[])();function o(u,s,a){const c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){const d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return m;function m(){let d=[],f,w,x;if((!n||i(u,s,a[a.length-1]||null))&&(d=_o(t(u,a)),d[0]===bt))return d;if(u.children&&d[0]!==No)for(w=(r?u.children.length:-1)+l,x=a.concat(u);w>-1&&w<u.children.length;){if(f=o(u.children[w],w,x)(),f[0]===bt)return f;w=typeof f[1]=="number"?f[1]:w+l}return d}}};function _o(e){return Array.isArray(e)?e:typeof e=="number"?[Ro,e]:[e]}const Ln=function(e,n,t,r){typeof n=="function"&&typeof t!="function"&&(r=t,t=n,n=null),Mo(e,n,i,r);function i(l,o){const u=o[o.length-1];return t(l,u?u.children.indexOf(l):null,u)}};function jo(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const wt={}.hasOwnProperty;function Ho(e){const n=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Ln(e,"definition",r=>{const i=St(r.identifier);i&&!wt.call(n,i)&&(n[i]=r)}),t;function t(r){const i=St(r);return i&&wt.call(n,i)?n[i]:null}}function St(e){return String(e||"").toUpperCase()}const $e={}.hasOwnProperty;function Uo(e,n){const t=n||{},r=t.allowDangerousHtml||!1,i={};return o.dangerous=r,o.clobberPrefix=t.clobberPrefix===void 0||t.clobberPrefix===null?"user-content-":t.clobberPrefix,o.footnoteLabel=t.footnoteLabel||"Footnotes",o.footnoteLabelTagName=t.footnoteLabelTagName||"h2",o.footnoteLabelProperties=t.footnoteLabelProperties||{className:["sr-only"]},o.footnoteBackLabel=t.footnoteBackLabel||"Back to content",o.unknownHandler=t.unknownHandler,o.passThrough=t.passThrough,o.handlers={...vo,...t.handlers},o.definition=Ho(e),o.footnoteById=i,o.footnoteOrder=[],o.footnoteCounts={},o.patch=Vo,o.applyData=qo,o.one=u,o.all=s,o.wrap=Wo,o.augment=l,Ln(e,"footnoteDefinition",a=>{const c=String(a.identifier).toUpperCase();$e.call(i,c)||(i[c]=a)}),o;function l(a,c){if(a&&"data"in a&&a.data){const m=a.data;m.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=m.hName),c.type==="element"&&m.hProperties&&(c.properties={...c.properties,...m.hProperties}),"children"in c&&c.children&&m.hChildren&&(c.children=m.hChildren)}if(a){const m="type"in a?a:{position:a};jo(m)||(c.position={start:On(m),end:vn(m)})}return c}function o(a,c,m,d){return Array.isArray(m)&&(d=m,m={}),l(a,{type:"element",tagName:c,properties:m||{},children:d||[]})}function u(a,c){return nr(o,a,c)}function s(a){return Dn(o,a)}}function Vo(e,n){e.position&&(n.position=Eo(e))}function qo(e,n){let t=n;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,l=e.data.hProperties;typeof r=="string"&&(t.type==="element"?t.tagName=r:t={type:"element",tagName:r,properties:{},children:[]}),t.type==="element"&&l&&(t.properties={...t.properties,...l}),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function nr(e,n,t){const r=n&&n.type;if(!r)throw new Error("Expected node, got `"+n+"`");return $e.call(e.handlers,r)?e.handlers[r](e,n,t):e.passThrough&&e.passThrough.includes(r)?"children"in n?{...n,children:Dn(e,n)}:n:e.unknownHandler?e.unknownHandler(e,n,t):$o(e,n)}function Dn(e,n){const t=[];if("children"in n){const r=n.children;let i=-1;for(;++i<r.length;){const l=nr(e,r[i],n);if(l){if(i&&r[i-1].type==="break"&&(!Array.isArray(l)&&l.type==="text"&&(l.value=l.value.replace(/^\s+/,"")),!Array.isArray(l)&&l.type==="element")){const o=l.children[0];o&&o.type==="text"&&(o.value=o.value.replace(/^\s+/,""))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t}function $o(e,n){const t=n.data||{},r="value"in n&&!($e.call(t,"hProperties")||$e.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:Dn(e,n)};return e.patch(n,r),e.applyData(n,r)}function Wo(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
13
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
14
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
15
|
+
`}),t}function Qo(e){const n=[];let t=-1;for(;++t<e.footnoteOrder.length;){const r=e.footnoteById[e.footnoteOrder[t]];if(!r)continue;const i=e.all(r),l=String(r.identifier).toUpperCase(),o=ve(l.toLowerCase());let u=0;const s=[];for(;++u<=e.footnoteCounts[l];){const m={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+o+(u>1?"-"+u:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};u>1&&m.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(u)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(m)}const a=i[i.length-1];if(a&&a.type==="element"&&a.tagName==="p"){const m=a.children[a.children.length-1];m&&m.type==="text"?m.value+=" ":a.children.push({type:"text",value:" "}),a.children.push(...s)}else i.push(...s);const c={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+o},children:e.wrap(i,!0)};e.patch(r,c),n.push(c)}if(n.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
|
|
16
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(n,!0)},{type:"text",value:`
|
|
17
|
+
`}]}}function tr(e,n){const t=Uo(e,n),r=t.one(e,null),i=Qo(t);return i&&r.children.push({type:"text",value:`
|
|
18
|
+
`},i),Array.isArray(r)?{type:"root",children:r}:r}const Xo=function(e,n){return e&&"run"in e?Yo(e,n):Ko(e||n)};function Yo(e,n){return(t,r,i)=>{e.run(tr(t,n),r,l=>{i(l)})}}function Ko(e){return n=>tr(n,e)}var rr={exports:{}},Go="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Zo=Go,Jo=Zo;function ir(){}function lr(){}lr.resetWarningCache=ir;var eu=function(){function e(r,i,l,o,u,s){if(s!==Jo){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}e.isRequired=e;function n(){return e}var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:lr,resetWarningCache:ir};return t.PropTypes=t,t};rr.exports=eu();var nu=rr.exports;const O=Me(nu);class je{constructor(n,t,r){this.property=n,this.normal=t,r&&(this.space=r)}}je.prototype.property={};je.prototype.normal={};je.prototype.space=null;function or(e,n){const t={},r={};let i=-1;for(;++i<e.length;)Object.assign(t,e[i].property),Object.assign(r,e[i].normal);return new je(t,r,n)}function En(e){return e.toLowerCase()}class le{constructor(n,t){this.property=n,this.attribute=t}}le.prototype.space=null;le.prototype.boolean=!1;le.prototype.booleanish=!1;le.prototype.overloadedBoolean=!1;le.prototype.number=!1;le.prototype.commaSeparated=!1;le.prototype.spaceSeparated=!1;le.prototype.commaOrSpaceSeparated=!1;le.prototype.mustUseProperty=!1;le.prototype.defined=!1;let tu=0;const v=Ce(),Q=Ce(),ur=Ce(),b=Ce(),U=Ce(),Oe=Ce(),ne=Ce();function Ce(){return 2**++tu}const An=Object.freeze(Object.defineProperty({__proto__:null,boolean:v,booleanish:Q,commaOrSpaceSeparated:ne,commaSeparated:Oe,number:b,overloadedBoolean:ur,spaceSeparated:U},Symbol.toStringTag,{value:"Module"})),dn=Object.keys(An);class zn extends le{constructor(n,t,r,i){let l=-1;if(super(n,t),Ct(this,"space",i),typeof r=="number")for(;++l<dn.length;){const o=dn[l];Ct(this,dn[l],(r&An[o])===An[o])}}}zn.prototype.defined=!0;function Ct(e,n,t){t&&(e[n]=t)}const ru={}.hasOwnProperty;function Le(e){const n={},t={};let r;for(r in e.properties)if(ru.call(e.properties,r)){const i=e.properties[r],l=new zn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[En(r)]=r,t[En(l.attribute)]=r}return new je(n,t,e.space)}const ar=Le({space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),sr=Le({space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function cr(e,n){return n in e?e[n]:n}function pr(e,n){return cr(e,n.toLowerCase())}const fr=Le({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:pr,properties:{xmlns:null,xmlnsXLink:null}}),hr=Le({transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Q,ariaAutoComplete:null,ariaBusy:Q,ariaChecked:Q,ariaColCount:b,ariaColIndex:b,ariaColSpan:b,ariaControls:U,ariaCurrent:null,ariaDescribedBy:U,ariaDetails:null,ariaDisabled:Q,ariaDropEffect:U,ariaErrorMessage:null,ariaExpanded:Q,ariaFlowTo:U,ariaGrabbed:Q,ariaHasPopup:null,ariaHidden:Q,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:U,ariaLevel:b,ariaLive:null,ariaModal:Q,ariaMultiLine:Q,ariaMultiSelectable:Q,ariaOrientation:null,ariaOwns:U,ariaPlaceholder:null,ariaPosInSet:b,ariaPressed:Q,ariaReadOnly:Q,ariaRelevant:null,ariaRequired:Q,ariaRoleDescription:U,ariaRowCount:b,ariaRowIndex:b,ariaRowSpan:b,ariaSelected:Q,ariaSetSize:b,ariaSort:null,ariaValueMax:b,ariaValueMin:b,ariaValueNow:b,ariaValueText:null,role:null}}),iu=Le({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:pr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oe,acceptCharset:U,accessKey:U,action:null,allow:null,allowFullScreen:v,allowPaymentRequest:v,allowUserMedia:v,alt:null,as:null,async:v,autoCapitalize:null,autoComplete:U,autoFocus:v,autoPlay:v,blocking:U,capture:null,charSet:null,checked:v,cite:null,className:U,cols:b,colSpan:null,content:null,contentEditable:Q,controls:v,controlsList:U,coords:b|Oe,crossOrigin:null,data:null,dateTime:null,decoding:null,default:v,defer:v,dir:null,dirName:null,disabled:v,download:ur,draggable:Q,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:v,formTarget:null,headers:U,height:b,hidden:v,high:b,href:null,hrefLang:null,htmlFor:U,httpEquiv:U,id:null,imageSizes:null,imageSrcSet:null,inert:v,inputMode:null,integrity:null,is:null,isMap:v,itemId:null,itemProp:U,itemRef:U,itemScope:v,itemType:U,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:v,low:b,manifest:null,max:null,maxLength:b,media:null,method:null,min:null,minLength:b,multiple:v,muted:v,name:null,nonce:null,noModule:v,noValidate:v,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:v,optimum:b,pattern:null,ping:U,placeholder:null,playsInline:v,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:v,referrerPolicy:null,rel:U,required:v,reversed:v,rows:b,rowSpan:b,sandbox:U,scope:null,scoped:v,seamless:v,selected:v,shadowRootClonable:v,shadowRootDelegatesFocus:v,shadowRootMode:null,shape:null,size:b,sizes:null,slot:null,span:b,spellCheck:Q,src:null,srcDoc:null,srcLang:null,srcSet:null,start:b,step:null,style:null,tabIndex:b,target:null,title:null,translate:null,type:null,typeMustMatch:v,useMap:null,value:Q,width:b,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:U,axis:null,background:null,bgColor:null,border:b,borderColor:null,bottomMargin:b,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:v,declare:v,event:null,face:null,frame:null,frameBorder:null,hSpace:b,leftMargin:b,link:null,longDesc:null,lowSrc:null,marginHeight:b,marginWidth:b,noResize:v,noHref:v,noShade:v,noWrap:v,object:null,profile:null,prompt:null,rev:null,rightMargin:b,rules:null,scheme:null,scrolling:Q,standby:null,summary:null,text:null,topMargin:b,valueType:null,version:null,vAlign:null,vLink:null,vSpace:b,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:v,disableRemotePlayback:v,prefix:null,property:null,results:b,security:null,unselectable:null}}),lu=Le({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:cr,properties:{about:ne,accentHeight:b,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:b,amplitude:b,arabicForm:null,ascent:b,attributeName:null,attributeType:null,azimuth:b,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:b,by:null,calcMode:null,capHeight:b,className:U,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:b,diffuseConstant:b,direction:null,display:null,dur:null,divisor:b,dominantBaseline:null,download:v,dx:null,dy:null,edgeMode:null,editable:null,elevation:b,enableBackground:null,end:null,event:null,exponent:b,externalResourcesRequired:null,fill:null,fillOpacity:b,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Oe,g2:Oe,glyphName:Oe,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:b,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:b,horizOriginX:b,horizOriginY:b,id:null,ideographic:b,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:b,k:b,k1:b,k2:b,k3:b,k4:b,kernelMatrix:ne,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:b,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:b,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:b,overlineThickness:b,paintOrder:null,panose1:null,path:null,pathLength:b,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:U,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:b,pointsAtY:b,pointsAtZ:b,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ne,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ne,rev:ne,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ne,requiredFeatures:ne,requiredFonts:ne,requiredFormats:ne,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:b,specularExponent:b,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:b,strikethroughThickness:b,string:null,stroke:null,strokeDashArray:ne,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:b,strokeOpacity:b,strokeWidth:null,style:null,surfaceScale:b,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ne,tabIndex:b,tableValues:null,target:null,targetX:b,targetY:b,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ne,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:b,underlineThickness:b,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:b,values:null,vAlphabetic:b,vMathematical:b,vectorEffect:null,vHanging:b,vIdeographic:b,version:null,vertAdvY:b,vertOriginX:b,vertOriginY:b,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:b,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),ou=/^data[-\w.:]+$/i,Et=/-[a-z]/g,uu=/[A-Z]/g;function au(e,n){const t=En(n);let r=n,i=le;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&ou.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Et,cu);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Et.test(l)){let o=l.replace(uu,su);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=zn}return new i(r,n)}function su(e){return"-"+e.toLowerCase()}function cu(e){return e.charAt(1).toUpperCase()}const At={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},pu=or([sr,ar,fr,hr,iu],"html"),fu=or([sr,ar,fr,hr,lu],"svg");function hu(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return n=>{Ln(n,"element",(t,r,i)=>{const l=i;let o;if(e.allowedElements?o=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(o=e.disallowedElements.includes(t.tagName)),!o&&e.allowElement&&typeof r=="number"&&(o=!e.allowElement(t,r,l)),o&&typeof r=="number")return e.unwrapDisallowed&&t.children?l.children.splice(r,1,...t.children):l.children.splice(r,1),r})}}var mr={exports:{}},_={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* react-is.production.min.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var Bn=Symbol.for("react.element"),Rn=Symbol.for("react.portal"),Xe=Symbol.for("react.fragment"),Ye=Symbol.for("react.strict_mode"),Ke=Symbol.for("react.profiler"),Ge=Symbol.for("react.provider"),Ze=Symbol.for("react.context"),mu=Symbol.for("react.server_context"),Je=Symbol.for("react.forward_ref"),en=Symbol.for("react.suspense"),nn=Symbol.for("react.suspense_list"),tn=Symbol.for("react.memo"),rn=Symbol.for("react.lazy"),du=Symbol.for("react.offscreen"),dr;dr=Symbol.for("react.module.reference");function oe(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case Bn:switch(e=e.type,e){case Xe:case Ke:case Ye:case en:case nn:return e;default:switch(e=e&&e.$$typeof,e){case mu:case Ze:case Je:case rn:case tn:case Ge:return e;default:return n}}case Rn:return n}}}_.ContextConsumer=Ze;_.ContextProvider=Ge;_.Element=Bn;_.ForwardRef=Je;_.Fragment=Xe;_.Lazy=rn;_.Memo=tn;_.Portal=Rn;_.Profiler=Ke;_.StrictMode=Ye;_.Suspense=en;_.SuspenseList=nn;_.isAsyncMode=function(){return!1};_.isConcurrentMode=function(){return!1};_.isContextConsumer=function(e){return oe(e)===Ze};_.isContextProvider=function(e){return oe(e)===Ge};_.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bn};_.isForwardRef=function(e){return oe(e)===Je};_.isFragment=function(e){return oe(e)===Xe};_.isLazy=function(e){return oe(e)===rn};_.isMemo=function(e){return oe(e)===tn};_.isPortal=function(e){return oe(e)===Rn};_.isProfiler=function(e){return oe(e)===Ke};_.isStrictMode=function(e){return oe(e)===Ye};_.isSuspense=function(e){return oe(e)===en};_.isSuspenseList=function(e){return oe(e)===nn};_.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Xe||e===Ke||e===Ye||e===en||e===nn||e===du||typeof e=="object"&&e!==null&&(e.$$typeof===rn||e.$$typeof===tn||e.$$typeof===Ge||e.$$typeof===Ze||e.$$typeof===Je||e.$$typeof===dr||e.getModuleId!==void 0)};_.typeOf=oe;mr.exports=_;var gu=mr.exports;const yu=Me(gu);function xu(e){const n=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof n=="string"&&n.replace(/[ \t\n\f\r]/g,"")===""}function ku(e){return e.join(" ").trim()}function bu(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var Nn={exports:{}},Ft=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wu=/\n/g,Su=/^\s*/,Cu=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Eu=/^:\s*/,Au=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Fu=/^[;\s]*/,Pu=/^\s+|\s+$/g,Iu=`
|
|
27
|
+
`,Pt="/",It="*",Se="",Tu="comment",Ou="declaration",vu=function(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(w){var x=w.match(wu);x&&(t+=x.length);var C=w.lastIndexOf(Iu);r=~C?w.length-C:r+w.length}function l(){var w={line:t,column:r};return function(x){return x.position=new o(w),a(),x}}function o(w){this.start=w,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function u(w){var x=new Error(n.source+":"+t+":"+r+": "+w);if(x.reason=w,x.filename=n.source,x.line=t,x.column=r,x.source=e,!n.silent)throw x}function s(w){var x=w.exec(e);if(x){var C=x[0];return i(C),e=e.slice(C.length),x}}function a(){s(Su)}function c(w){var x;for(w=w||[];x=m();)x!==!1&&w.push(x);return w}function m(){var w=l();if(!(Pt!=e.charAt(0)||It!=e.charAt(1))){for(var x=2;Se!=e.charAt(x)&&(It!=e.charAt(x)||Pt!=e.charAt(x+1));)++x;if(x+=2,Se===e.charAt(x-1))return u("End of comment missing");var C=e.slice(2,x-2);return r+=2,i(C),e=e.slice(x),r+=2,w({type:Tu,comment:C})}}function d(){var w=l(),x=s(Cu);if(x){if(m(),!s(Eu))return u("property missing ':'");var C=s(Au),k=w({type:Ou,property:Tt(x[0].replace(Ft,Se)),value:C?Tt(C[0].replace(Ft,Se)):Se});return s(Fu),k}}function f(){var w=[];c(w);for(var x;x=d();)x!==!1&&(w.push(x),c(w));return w}return a(),f()};function Tt(e){return e?e.replace(Pu,Se):Se}var Lu=vu;function gr(e,n){var t=null;if(!e||typeof e!="string")return t;for(var r,i=Lu(e),l=typeof n=="function",o,u,s=0,a=i.length;s<a;s++)r=i[s],o=r.property,u=r.value,l?n(o,u,r):u&&(t||(t={}),t[o]=u);return t}Nn.exports=gr;Nn.exports.default=gr;var Du=Nn.exports;const zu=Me(Du),Fn={}.hasOwnProperty,Bu=new Set(["table","thead","tbody","tfoot","tr"]);function yr(e,n){const t=[];let r=-1,i;for(;++r<n.children.length;)i=n.children[r],i.type==="element"?t.push(Ru(e,i,r,n)):i.type==="text"?(n.type!=="element"||!Bu.has(n.tagName)||!xu(i))&&t.push(i.value):i.type==="raw"&&!e.options.skipHtml&&t.push(i.value);return t}function Ru(e,n,t,r){const i=e.options,l=i.transformLinkUri===void 0?Lr:i.transformLinkUri,o=e.schema,u=n.tagName,s={};let a=o,c;if(o.space==="html"&&u==="svg"&&(a=fu,e.schema=a),n.properties)for(c in n.properties)Fn.call(n.properties,c)&&Mu(s,c,n.properties[c],e);(u==="ol"||u==="ul")&&e.listDepth++;const m=yr(e,n);(u==="ol"||u==="ul")&&e.listDepth--,e.schema=o;const d=n.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},f=i.components&&Fn.call(i.components,u)?i.components[u]:u,w=typeof f=="string"||f===Ie.Fragment;if(!yu.isValidElementType(f))throw new TypeError(`Component for name \`${u}\` not defined or is not renderable`);if(s.key=t,u==="a"&&i.linkTarget&&(s.target=typeof i.linkTarget=="function"?i.linkTarget(String(s.href||""),n.children,typeof s.title=="string"?s.title:null):i.linkTarget),u==="a"&&l&&(s.href=l(String(s.href||""),n.children,typeof s.title=="string"?s.title:null)),!w&&u==="code"&&r.type==="element"&&r.tagName!=="pre"&&(s.inline=!0),!w&&(u==="h1"||u==="h2"||u==="h3"||u==="h4"||u==="h5"||u==="h6")&&(s.level=Number.parseInt(u.charAt(1),10)),u==="img"&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),typeof s.title=="string"?s.title:null)),!w&&u==="li"&&r.type==="element"){const x=Nu(n);s.checked=x&&x.properties?!!x.properties.checked:null,s.index=gn(r,n),s.ordered=r.tagName==="ol"}return!w&&(u==="ol"||u==="ul")&&(s.ordered=u==="ol",s.depth=e.listDepth),(u==="td"||u==="th")&&(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),w||(s.isHeader=u==="th")),!w&&u==="tr"&&r.type==="element"&&(s.isHeader=r.tagName==="thead"),i.sourcePos&&(s["data-sourcepos"]=Hu(d)),!w&&i.rawSourcePos&&(s.sourcePosition=n.position),!w&&i.includeElementIndex&&(s.index=gn(r,n),s.siblingCount=gn(r)),w||(s.node=n),m.length>0?Ie.createElement(f,s,m):Ie.createElement(f,s)}function Nu(e){let n=-1;for(;++n<e.children.length;){const t=e.children[n];if(t.type==="element"&&t.tagName==="input")return t}return null}function gn(e,n){let t=-1,r=0;for(;++t<e.children.length&&e.children[t]!==n;)e.children[t].type==="element"&&r++;return r}function Mu(e,n,t,r){const i=au(r.schema,n);let l=t;l==null||l!==l||(Array.isArray(l)&&(l=i.commaSeparated?bu(l):ku(l)),i.property==="style"&&typeof l=="string"&&(l=_u(l)),i.space&&i.property?e[Fn.call(At,i.property)?At[i.property]:i.property]=l:i.attribute&&(e[i.attribute]=l))}function _u(e){const n={};try{zu(e,t)}catch{}return n;function t(r,i){const l=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;n[l.replace(/-([a-z])/g,ju)]=i}}function ju(e,n){return n.toUpperCase()}function Hu(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const Ot={}.hasOwnProperty,Uu="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ue={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function xr(e){for(const l in Ue)if(Ot.call(Ue,l)&&Ot.call(e,l)){const o=Ue[l];console.warn(`[react-markdown] Warning: please ${o.to?`use \`${o.to}\` instead of`:"remove"} \`${l}\` (see <${Uu}#${o.id}> for more info)`),delete Ue[l]}const n=Xr().use(ro).use(e.remarkPlugins||[]).use(Xo,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(hu,e),t=new Dt;typeof e.children=="string"?t.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=n.runSync(n.parse(t),t);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=Ie.createElement(Ie.Fragment,{},yr({options:e,schema:pu,listDepth:0},r));return e.className&&(i=Ie.createElement("div",{className:e.className},i)),i}xr.propTypes={children:O.string,className:O.string,allowElement:O.func,allowedElements:O.arrayOf(O.string),disallowedElements:O.arrayOf(O.string),unwrapDisallowed:O.bool,remarkPlugins:O.arrayOf(O.oneOfType([O.object,O.func,O.arrayOf(O.oneOfType([O.bool,O.string,O.object,O.func,O.arrayOf(O.any)]))])),rehypePlugins:O.arrayOf(O.oneOfType([O.object,O.func,O.arrayOf(O.oneOfType([O.bool,O.string,O.object,O.func,O.arrayOf(O.any)]))])),sourcePos:O.bool,rawSourcePos:O.bool,skipHtml:O.bool,includeElementIndex:O.bool,transformLinkUri:O.oneOfType([O.func,O.bool]),linkTarget:O.oneOfType([O.func,O.string]),transformImageUri:O.func,components:O.object};const yn={hub_restart:{title:"Hub Restart",markdown:`# Hub Restart
|
|
28
|
+
|
|
29
|
+
A session was terminated because the Xenon hub restarted while the test was
|
|
30
|
+
mid-flight. The agent's connection was lost and the session was reaped by the
|
|
31
|
+
heartbeat watchdog.
|
|
32
|
+
|
|
33
|
+
## Likely causes
|
|
34
|
+
|
|
35
|
+
- Operator triggered a manual restart from the dashboard.
|
|
36
|
+
- Process supervisor restarted the hub after a crash or a deploy.
|
|
37
|
+
- The host running the hub was rebooted or hibernated.
|
|
38
|
+
|
|
39
|
+
## Remediation
|
|
40
|
+
|
|
41
|
+
1. Re-trigger the affected sessions from your test runner — the device was
|
|
42
|
+
released cleanly back into the pool, so a retry should land on a healthy
|
|
43
|
+
hub.
|
|
44
|
+
2. Check \`/var/log/xenon-hub.log\` and the process supervisor's restart
|
|
45
|
+
history around the failure timestamp to confirm whether this was a manual
|
|
46
|
+
restart, a crash, or a deploy.
|
|
47
|
+
3. If restarts are frequent or unplanned, correlate them with recent deploys
|
|
48
|
+
and coordinate a maintenance window — a clean restart or redeploy drains
|
|
49
|
+
active sessions first (bounded grace period to archive video and release
|
|
50
|
+
ports); drained sessions are marked failed with reason "Hub shutdown". A
|
|
51
|
+
crash or forced host reboot skips the drain; orphaned sessions are reaped
|
|
52
|
+
by the heartbeat watchdog and marked failed ("Session orphaned"). Orphaned
|
|
53
|
+
live recordings are separately marked failed with \`fail_reason=server_restart\`
|
|
54
|
+
on next boot.
|
|
55
|
+
|
|
56
|
+
## Related
|
|
57
|
+
|
|
58
|
+
- Session lifecycle: see \`SessionLifecycleService.ts\`
|
|
59
|
+
- Heartbeat watchdog: see \`SessionHeartbeatService\` / \`OrphanSweeper.sweep\`
|
|
60
|
+
`},timeout:{title:"Timeout",markdown:`# Timeout
|
|
61
|
+
|
|
62
|
+
The session hit a wall-clock timeout — either the per-command \`newCommandTimeout\`
|
|
63
|
+
or the session-level deadline. Xenon force-killed the session so its device
|
|
64
|
+
could be released back into the pool.
|
|
65
|
+
|
|
66
|
+
## Likely causes
|
|
67
|
+
|
|
68
|
+
- Test step waited indefinitely on a missing element.
|
|
69
|
+
- Slow device or flaky network.
|
|
70
|
+
- A driver bug caused the WebDriver call to never return.
|
|
71
|
+
|
|
72
|
+
## Remediation
|
|
73
|
+
|
|
74
|
+
Increase \`newCommandTimeout\` only if the app legitimately needs long idle
|
|
75
|
+
gaps. Otherwise:
|
|
76
|
+
|
|
77
|
+
1. Check the last command in **Text Logs** — if it's a find, fix the selector
|
|
78
|
+
or add an explicit wait.
|
|
79
|
+
2. Verify the device wasn't thermally throttled or offline during the run
|
|
80
|
+
(**Device health** badges).
|
|
81
|
+
3. If the same command times out across runs, file a bug against the test —
|
|
82
|
+
or against the driver if the call obviously stalled.
|
|
83
|
+
`},infrastructure:{title:"Infrastructure",markdown:`# Infrastructure
|
|
84
|
+
|
|
85
|
+
The session failed because of a problem outside the test code — typically the
|
|
86
|
+
node, the device, or the network underneath them.
|
|
87
|
+
|
|
88
|
+
## Likely causes
|
|
89
|
+
|
|
90
|
+
- Node lost its connection to the hub.
|
|
91
|
+
- ADB / WDA daemon crashed on the node.
|
|
92
|
+
- Device went offline mid-session.
|
|
93
|
+
- Backing storage / Prisma DB hiccup.
|
|
94
|
+
|
|
95
|
+
## Remediation
|
|
96
|
+
|
|
97
|
+
1. Cross-reference the **Device Logs** tab on this session with the node's
|
|
98
|
+
own process metrics around the failure timestamp to see which layer
|
|
99
|
+
dropped — hub connection, daemon, device, or storage.
|
|
100
|
+
2. If the node's heartbeat is missing, restart its Xenon agent process; if
|
|
101
|
+
ADB/WDA crashed, bounce the daemon first.
|
|
102
|
+
3. If the device shows offline in the device list, reseat or reconnect it
|
|
103
|
+
(USB or Wi-Fi debugging) and confirm it re-enumerates before re-queuing
|
|
104
|
+
sessions on it.
|
|
105
|
+
4. For repeated storage/DB hiccups, check disk space and the Prisma
|
|
106
|
+
connection pool limits on the hub host.
|
|
107
|
+
`},unknown:{title:"Unknown",markdown:`# Unknown failure category
|
|
108
|
+
|
|
109
|
+
We weren't able to attribute this failure to a known bucket. The session has
|
|
110
|
+
\`failure_category=null\` (or a category we don't have a runbook for yet).
|
|
111
|
+
|
|
112
|
+
## What to do
|
|
113
|
+
|
|
114
|
+
1. Open the **Failure summary** card for the raw \`failure_reason\` and the
|
|
115
|
+
first error log entry.
|
|
116
|
+
2. If you can identify a clear category (timeout, hub restart, node outage,
|
|
117
|
+
etc.), file a follow-up to add the right \`failure_category\` mapping in
|
|
118
|
+
\`SessionLifecycleService\`.
|
|
119
|
+
3. For one-off oddities, re-run the session and watch for a pattern.
|
|
120
|
+
|
|
121
|
+
If you keep landing on this fallback for the same kind of failure, that's a
|
|
122
|
+
signal worth reporting — adding the right \`failure_category\` mapping
|
|
123
|
+
upstream means future occurrences get a real runbook instead of this one.
|
|
124
|
+
`}};function vt(e){if(!e)return yn.unknown;const n=e.toLowerCase().trim().replace(/[\s-]+/g,"_");return yn[n]??yn.unknown}const Vu={ul:({node:e,ordered:n,depth:t,className:r,...i})=>J.jsx("ul",{className:`list-disc space-y-1 ${r??""}`.trim(),...i}),ol:({node:e,ordered:n,depth:t,className:r,...i})=>J.jsx("ol",{className:`list-decimal space-y-1 ${r??""}`.trim(),...i})},Wu=()=>{const{category:e}=Ir(),n=Tr(),t=vt(e),r=!e||e&&vt(e).title==="Unknown"&&e.toLowerCase()!=="unknown",i=()=>{if(window.history.length<=1){n("/overview");return}n(-1)};return J.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[J.jsxs("header",{className:"flex items-center justify-between gap-4 px-4 py-3 border-b border-[var(--border)] bg-[var(--surface)]",children:[J.jsxs("button",{type:"button",onClick:i,className:"inline-flex items-center gap-1.5 text-xs text-[var(--text-muted)] hover:text-[var(--text)] transition-colors",children:[J.jsx(vr,{className:"h-3.5 w-3.5"}),"Back"]}),J.jsxs("div",{className:"flex items-center gap-2 text-xs text-[var(--text-dim)]",children:[J.jsx(Or,{className:"h-3.5 w-3.5"}),J.jsx("span",{className:"font-mono uppercase tracking-widest",children:"Runbook"})]})]}),J.jsx("div",{className:"flex-1 overflow-y-auto",children:J.jsxs("article",{className:"max-w-3xl mx-auto px-6 py-8 prose prose-invert prose-sm runbook-prose",children:[r&&J.jsxs("div",{className:"mb-4 rounded-md border border-[var(--amber)]/30 bg-[var(--amber)]/5 px-3 py-2 text-xs text-[var(--amber)]",children:["No runbook for category ",J.jsx("code",{className:"font-mono",children:e})," — showing the fallback."]}),J.jsx(xr,{components:Vu,children:t.markdown})]})})]})};export{Wu as RunbookPage,Wu as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{u as I,m as A,A as F,r,X as v,j as e,H as f,v as w,C as R,p as D}from"./index-PtnKslHU.js";import{f as g}from"./time-B8FIgwPE.js";import{P as S}from"./page-header-CSvuGbSO.js";import{f as H,H as P,V as B,E as L}from"./selector-health-BjMHf106.js";import{C as M,L as E}from"./layers-DRpwoKhI.js";import{C as U}from"./circle-check-CI2xUlDo.js";import{Z as O}from"./zap-JUbOoK3o.js";import{C as K}from"./check-BZMx8AhR.js";import{C as V}from"./copy-ve3lNhva.js";function X(d){const h=Date.parse(d);if(!Number.isFinite(h))return"";const x=Math.max(0,Date.now()-h),l=Math.floor(x/1e3);if(l<60)return`${l}s ago`;const i=Math.floor(l/60);if(i<60)return`${i}m ago`;const o=Math.floor(i/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function Q(d){return d===0?"$0":d<.01?"<$0.01":`$${d.toFixed(2)}`}const te=()=>{const d=I(),{toast:h}=A(),[x]=F(),l=x.get("value")??"",i=x.get("strategy")??"",o=parseInt(x.get("windowDays")??"30",10)||30,[t,y]=r.useState(null),[a,p]=r.useState(null),[_,C]=r.useState(!1),[$,T]=r.useState(!1),[N,k]=r.useState(null),b=r.useCallback(async()=>{if(l){C(!0);try{const s=await v.getHealingSelectorDetail(l,o);y(s??null)}catch{y(null)}finally{C(!1),T(!0)}}},[l,o]),j=r.useCallback(async()=>{if(!i||!l){p(null);return}try{const s=await v.getSelectorState(i,l);p((s==null?void 0:s.state)??null)}catch{p(null)}},[i,l]);r.useEffect(()=>{b()},[b]),r.useEffect(()=>{j()},[j]);const m=r.useCallback(async s=>{if(!i||!l)return;const n=(()=>{switch(s){case"mark_fixed":return"Mark this selector as fixed? Move to Pending Verification.";case"mute":return"Mute this selector? It will be hidden from Hotspots, the CI gate, and digests.";case"unmute":return"Unmute this selector?";case"cancel_verification":return"Cancel verification? The selector returns to Active and the clean-build counter resets."}})();if(window.confirm(n))try{await v.postSelectorStateAction({original_strategy:i,original_selector:l,action:s}),h("Done.","success"),j()}catch(c){const u=c!=null&&c.currentStatus?` (currently ${c.currentStatus})`:"";h(`${(c==null?void 0:c.message)??"Action failed"}${u}`,"error")}},[i,l,h,j]),z=(s,n)=>{navigator.clipboard.writeText(s).catch(()=>{}),k(n),setTimeout(()=>k(c=>c===n?null:c),1500)};return l?e.jsxs("div",{className:"selector-health-page",children:[e.jsx(S,{icon:f,eyebrow:"Test Quality / Selector",title:e.jsx("span",{className:"sh-detail-title",children:e.jsx("code",{title:l,children:l})}),subtitle:`All heals for this selector over the last ${o} days.`,action:e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(M,{size:12})," Back"]}),e.jsxs("button",{className:"sh-refresh-btn",onClick:b,disabled:_,title:"Refresh",children:[e.jsx(w,{size:12,className:_?"animate-spin":""}),"Refresh"]})]})}),e.jsxs("div",{className:"sh-content",children:[i&&e.jsxs("div",{className:"sh-detail-strategy-line",title:"Tuple identity for this drill-down",children:[e.jsx("span",{className:"sh-strategy-badge",children:H(i)}),e.jsx("code",{children:l})]}),!i&&e.jsxs("div",{className:"sh-detail-banner",children:["Showing every strategy that ever healed this selector value. To scope to a single tuple, append ",e.jsx("code",{children:"?strategy=<name>"})," ","to the URL or open this row from the Active tab on Selector Health."]}),a&&e.jsxs("div",{className:`sh-detail-state sh-detail-state--${a.status}`,children:[e.jsxs("div",{className:"sh-detail-state__head",children:[e.jsxs("span",{className:"sh-detail-state__badge",children:[a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx(P,{size:16,style:{color:"var(--accent, #60a5fa)"}}),e.jsx("span",{children:"Pending verification"})]}),a.status==="resolved"&&e.jsxs(e.Fragment,{children:[e.jsx(U,{size:16,style:{color:"var(--green, #4ade80)"}}),e.jsx("span",{children:"Resolved"})]}),a.status==="muted"&&e.jsxs(e.Fragment,{children:[e.jsx(B,{size:16,style:{color:"var(--text-muted)"}}),e.jsx("span",{children:"Muted"})]}),a.status==="active"&&(a.regression_count>0?e.jsxs(e.Fragment,{children:[e.jsx(R,{size:16,style:{color:"var(--amber, #f59e0b)"}}),e.jsxs("span",{children:["Active — regressed ",a.regression_count,"×"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(O,{size:16}),e.jsx("span",{children:"Active"})]}))]}),e.jsxs("div",{className:"sh-detail-state__actions",children:[a.status==="active"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:()=>m("mark_fixed"),children:"Mark Fixed"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="pending"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("cancel_verification"),children:"Cancel verification"}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"})]}),a.status==="resolved"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("mute"),children:"Mute"}),a.status==="muted"&&e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>m("unmute"),children:"Unmute"})]})]}),e.jsxs("div",{className:"sh-detail-state__meta",children:[a.fixed_at&&e.jsxs("span",{children:["Marked fixed: ",g(a.fixed_at)]}),a.resolved_at&&e.jsxs("span",{children:["Resolved: ",g(a.resolved_at)]}),a.muted_at&&e.jsxs("span",{children:["Muted: ",g(a.muted_at)]}),a.status==="pending"&&e.jsxs("span",{children:["Clean builds: ",a.clean_builds_count,"/3"]}),a.regression_count>0&&e.jsxs("span",{children:["Regressions on record: ",a.regression_count]})]})]}),_&&!$?e.jsxs("div",{className:"sh-empty",children:[e.jsx(w,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading detail…"})]}):!t||t.healCount===0?e.jsxs("div",{className:"sh-empty sh-empty--clean",children:[e.jsx(f,{size:28}),e.jsxs("div",{children:[e.jsx("div",{className:"sh-empty__title",children:"No heals recorded"}),e.jsxs("div",{className:"sh-empty__subtitle",children:["This selector has no healing events in the last ",o," days."]})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sh-detail-stats",children:[e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Heals"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.healCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Sessions"}),e.jsx("span",{className:"sh-detail-stat__value",children:t.sessionCount})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Est. cost"}),e.jsx("span",{className:"sh-detail-stat__value",children:Q(t.estCostUsd)})]}),e.jsxs("div",{className:"sh-detail-stat",children:[e.jsx("span",{className:"sh-detail-stat__label",children:"Tiers used"}),e.jsx("span",{className:"sh-detail-stat__value",children:Object.keys(t.byTier).length||"—"})]})]}),e.jsxs("div",{className:"sh-detail-grid",children:[e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(E,{size:12}),e.jsx("span",{children:"Suggested rewrites"}),e.jsx("span",{className:"sh-card__hint",children:"every alternate the healer landed on, ranked by frequency"})]}),e.jsxs("ul",{className:"sh-alternates",children:[t.alternates.length===0&&e.jsx("li",{className:"sh-alternates__empty",children:"No healed selectors recorded — only the failure was captured."}),t.alternates.map((s,n)=>{const c=Math.round(s.share*100),u=`alt-${n}`;return e.jsxs("li",{className:"sh-alternate",children:[e.jsxs("div",{className:"sh-alternate__top",children:[e.jsxs("span",{className:"sh-alternate__share",children:[c,"%"]}),e.jsx("code",{className:"sh-alternate__value",title:s.healedSelector,children:s.healedSelector}),e.jsx("button",{type:"button",className:`sh-icon-btn ${N===u?"copied":""}`,onClick:()=>z(s.healedSelector,u),"aria-label":"Copy alternate",title:N===u?"Copied":"Copy",children:N===u?e.jsx(K,{size:11}):e.jsx(V,{size:11})})]}),e.jsxs("div",{className:"sh-alternate__meta",children:[e.jsxs("span",{children:[s.count," heal",s.count===1?"":"s"]}),s.averageConfidence!==null&&e.jsxs("span",{children:["· avg ",Math.round(s.averageConfidence*100),"% confidence"]}),s.tiers.length>0&&e.jsxs("span",{children:["· via ",s.tiers.join(", ")]})]})]},s.healedSelector)})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx(D,{size:12}),e.jsx("span",{children:"Breakdown"})]}),e.jsxs("div",{className:"sh-breakdown",children:[e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By tier"}),Object.entries(t.byTier).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-tier-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s)),Object.keys(t.byTier).length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By platform"}),Object.entries(t.byPlatform).sort((s,n)=>n[1]-s[1]).map(([s,n])=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-platform-pill",children:s}),e.jsx("span",{className:"sh-breakdown__count",children:n})]},s))]}),e.jsxs("div",{className:"sh-breakdown__group",children:[e.jsx("div",{className:"sh-breakdown__label",children:"By build"}),t.byBuild.slice(0,8).map(s=>e.jsxs("div",{className:"sh-breakdown__row",children:[e.jsx("span",{className:"sh-build-pill",title:s.buildId,children:s.buildId==="unattached"?"unattached":s.buildId.length>12?s.buildId.slice(0,8)+"…":s.buildId}),e.jsx("span",{className:"sh-breakdown__count",children:s.count})]},s.buildId)),t.byBuild.length===0&&e.jsx("div",{className:"sh-breakdown__empty",children:"none recorded"})]})]})]})]}),e.jsxs("section",{className:"sh-card",children:[e.jsxs("header",{className:"sh-card__head",children:[e.jsx("span",{children:"Timeline"}),e.jsxs("span",{className:"sh-card__hint",children:["most recent ",t.timeline.length," of ",t.healCount," heal",t.healCount===1?"":"s"]})]}),e.jsx("div",{className:"sh-timeline",children:t.timeline.map(s=>e.jsxs("div",{className:"sh-timeline__row",children:[e.jsx("span",{className:"sh-timeline__when",children:X(s.createdAt)}),s.tier&&e.jsx("span",{className:"sh-tier-pill",children:s.tier}),e.jsx("span",{className:"sh-timeline__cmd",children:s.commandName??"—"}),e.jsx("span",{className:"sh-timeline__device",children:s.deviceName??s.deviceUdid??"—"}),e.jsx("code",{className:"sh-timeline__healed",title:s.healedSelector??"",children:s.healedSelector??"—"}),s.confidence!==null&&e.jsxs("span",{className:"sh-timeline__conf",children:[Math.round(s.confidence*100),"%"]}),s.buildId&&s.sessionId&&e.jsx("a",{className:"sh-timeline__link",href:`/xenon/builds/${encodeURIComponent(s.buildId)}/sessions/${encodeURIComponent(s.sessionId)}`,title:"Open session detail",children:e.jsx(L,{size:11})})]},s.id))})]})]})]})]}):e.jsxs("div",{className:"selector-health-page",children:[e.jsx(S,{icon:f,eyebrow:"Test Quality",title:"Selector Detail",subtitle:"No selector specified."}),e.jsx("div",{className:"sh-content",children:e.jsxs("button",{className:"sh-back-btn",onClick:()=>d("/selector-health"),children:[e.jsx(M,{size:12})," Back to Selector Health"]})})]})};export{te as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{g as D,u as z,A as Q,j as e,r as h,q as le,n as P,C as re,X as k,v as A,m as oe,H as W,p as ce,I as de}from"./index-PtnKslHU.js";import{Z as he}from"./zap-JUbOoK3o.js";import{H as B,V as R,f as w,E as ue}from"./selector-health-BjMHf106.js";import{C as Y}from"./circle-check-CI2xUlDo.js";import{M as me}from"./Modal-MMGhL8eW.js";import{C as pe}from"./check-BZMx8AhR.js";import{C as ge}from"./copy-ve3lNhva.js";import{b as N}from"./time-B8FIgwPE.js";import{u as Z}from"./useSocket-BRto9a5m.js";import{E as ve}from"./EmptyState-CPOfuV3O.js";import{P as xe}from"./page-header-CSvuGbSO.js";import{S as be}from"./SegmentedControl-CZfAicws.js";import{F as G}from"./funnel-CptlpFZ9.js";import{C as fe}from"./chevron-right-WL_bcB02.js";import{A as J}from"./arrow-up-right-DePHHOby.js";/**
|
|
2
|
+
* @license lucide-react v0.555.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const _e=[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]],je=D("arrow-down-right",_e);/**
|
|
7
|
+
* @license lucide-react v0.555.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const ye=[["path",{d:"M5 12h14",key:"1ays0h"}]],q=D("minus",ye);/**
|
|
12
|
+
* @license lucide-react v0.555.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Ne=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],we=D("send",Ne),Se=[{id:"active",label:"Active",icon:he},{id:"pending",label:"Pending",icon:B,color:"var(--accent, #60a5fa)"},{id:"resolved",label:"Resolved",icon:Y,color:"var(--green, #4ade80)"},{id:"muted",label:"Muted",icon:R,color:"var(--text-muted)"}];function Ce({current:s,counts:r={}}){const a=z(),[i]=Q(),n=l=>{const c=new URLSearchParams(i);c.set("tab",l),a({search:c.toString()})};return e.jsx("nav",{className:"sh-tab-nav",role:"tablist","aria-label":"Selector Health tabs",children:Se.map(l=>{const c=r[l.id],o=l.icon;return e.jsxs("button",{type:"button",role:"tab","aria-selected":s===l.id,onClick:()=>n(l.id),className:`sh-tab ${s===l.id?"sh-tab--active":""}`,children:[e.jsx("span",{className:"sh-tab__icon","aria-hidden":"true",style:l.color?{color:l.color}:void 0,children:e.jsx(o,{size:14})}),e.jsx("span",{className:"sh-tab__label",children:l.label}),typeof c=="number"&&e.jsx("span",{className:"sh-tab__count","aria-label":`${c} ${l.label}`,children:c})]},l.id)})})}const $e={javascript:{"accessibility id":s=>`await driver.findElement('accessibility id', '${s}')`,xpath:s=>`await driver.findElement('xpath', '${s}')`,id:s=>`await driver.findElement('id', '${s}')`,name:s=>`await driver.findElement('name', '${s}')`,"class name":s=>`await driver.findElement('class name', '${s}')`,"-android uiautomator":s=>`await driver.findElement('-android uiautomator', '${s}')`,"-ios predicate string":s=>`await driver.findElement('-ios predicate string', '${s}')`,"-ios class chain":s=>`await driver.findElement('-ios class chain', '${s}')`},java:{"accessibility id":s=>`driver.findElement(AppiumBy.accessibilityId("${s}"))`,xpath:s=>`driver.findElement(AppiumBy.xpath("${s}"))`,id:s=>`driver.findElement(AppiumBy.id("${s}"))`,name:s=>`driver.findElement(AppiumBy.name("${s}"))`,"class name":s=>`driver.findElement(AppiumBy.className("${s}"))`,"-android uiautomator":s=>`driver.findElement(AppiumBy.androidUIAutomator("${s}"))`,"-ios predicate string":s=>`driver.findElement(AppiumBy.iOSNsPredicateString("${s}"))`,"-ios class chain":s=>`driver.findElement(AppiumBy.iOSClassChain("${s}"))`},python:{"accessibility id":s=>`driver.find_element(AppiumBy.ACCESSIBILITY_ID, '${s}')`,xpath:s=>`driver.find_element(AppiumBy.XPATH, '${s}')`,id:s=>`driver.find_element(AppiumBy.ID, '${s}')`,name:s=>`driver.find_element(AppiumBy.NAME, '${s}')`,"class name":s=>`driver.find_element(AppiumBy.CLASS_NAME, '${s}')`,"-android uiautomator":s=>`driver.find_element(AppiumBy.ANDROID_UIAUTOMATOR, '${s}')`,"-ios predicate string":s=>`driver.find_element(AppiumBy.IOS_PREDICATE, '${s}')`,"-ios class chain":s=>`driver.find_element(AppiumBy.IOS_CLASS_CHAIN, '${s}')`},csharp:{"accessibility id":s=>`driver.FindElement(MobileBy.AccessibilityId("${s}"))`,xpath:s=>`driver.FindElement(By.XPath("${s}"))`,id:s=>`driver.FindElement(By.Id("${s}"))`,name:s=>`driver.FindElement(By.Name("${s}"))`,"class name":s=>`driver.FindElement(By.ClassName("${s}"))`},ruby:{"accessibility id":s=>`driver.find_element(:accessibility_id, '${s}')`,xpath:s=>`driver.find_element(:xpath, '${s}')`,id:s=>`driver.find_element(:id, '${s}')`,name:s=>`driver.find_element(:name, '${s}')`,"class name":s=>`driver.find_element(:class_name, '${s}')`}};function ke(s,r){const a=s==="java"||s==="csharp",i=r.replace(/\\/g,"\\\\");return a?i.replace(/"/g,'\\"'):i.replace(/'/g,"\\'")}function ee(s,r,a){var n;if(r==="xenon:visual")return"/* Visual AI (coordinates) — no portable Appium snippet. Use snapshot view to find a stable native locator. */";const i=(n=$e[s])==null?void 0:n[r];return i?i(ke(s,a)):`${(r??"").toString().toUpperCase()}: ${a}`}const O=[{value:"javascript",short:"JS",label:"JavaScript (WebdriverIO)"},{value:"java",short:"Java",label:"Java (Appium-Java)"},{value:"python",short:"Py",label:"Python (Appium-Python)"},{value:"csharp",short:"C#",label:"C# (.NET)"},{value:"ruby",short:"Rb",label:"Ruby"}],se="xenon.copyLang";function Ae(){try{const s=localStorage.getItem(se);return s&&O.find(r=>r.value===s)?s:null}catch{return null}}function Me(s){try{localStorage.setItem(se,s)}catch{}}function H(s){var r;return((r=O.find(a=>a.value===s))==null?void 0:r.short)??s}function Ee({open:s,initialLang:r,strategy:a,value:i,onCopy:n,onClose:l}){const[c,o]=h.useState(r??"javascript"),[d,g]=h.useState(!0),b=ee(c,a,i),m=async()=>{try{await navigator.clipboard.writeText(b)}catch{}d&&Me(c),n(c,b),l()};return e.jsxs(me,{open:s,onClose:l,title:"Choose your default copy language",width:520,footer:e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn",onClick:l,children:"Cancel"}),e.jsxs("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:m,children:["Copy as ",H(c)]})]}),children:[e.jsx("p",{className:"sh-copy-modal__hint",children:"Snippets will be copied in this language until you change it."}),e.jsx("ul",{className:"sh-copy-modal__lang-list",children:O.map(f=>e.jsx("li",{children:e.jsxs("label",{className:"sh-copy-modal__lang-row",children:[e.jsx("input",{type:"radio",name:"copy-lang",value:f.value,checked:c===f.value,onChange:()=>o(f.value)}),f.label]})},f.value))}),e.jsx("div",{className:"sh-copy-modal__preview-label",children:"Preview"}),e.jsx("pre",{className:"sh-copy-modal__preview",children:e.jsx("code",{children:b})}),e.jsxs("label",{className:"sh-copy-modal__remember",children:[e.jsx("input",{type:"checkbox",checked:d,onChange:f=>g(f.target.checked)}),"Remember my choice"]})]})}function Ie({hotspot:s,onCopied:r}){const[a,i]=h.useState(!1),[n,l]=h.useState(!1),c=Ae(),o=s.suggestedStrategy??s.originalStrategy??"",d=s.suggestedRewrite??"",g=o==="xenon:visual",b=async()=>{if(!c){i(!0);return}const m=ee(c,o,d);try{await navigator.clipboard.writeText(m)}catch{}l(!0),r(c),setTimeout(()=>l(!1),1500)};return e.jsxs("span",{className:"sh-copy-group",children:[e.jsxs("button",{type:"button",className:`sh-action-btn sh-copy-btn ${n?"sh-copy-btn--copied":""}`,onClick:m=>{m.stopPropagation(),b()},disabled:g&&!d,title:g?"Visual AI heals are coordinate-based — no portable Appium snippet":c?`Copy as ${H(c)}`:"Pick a language and copy",children:[n?e.jsx(pe,{size:11}):e.jsx(ge,{size:11}),c&&!n&&e.jsx("span",{className:"sh-copy-btn__lang",children:H(c)})]}),e.jsx("button",{type:"button",className:"sh-action-btn sh-copy-chevron",onClick:m=>{m.stopPropagation(),i(!0)},title:"Choose copy language","aria-label":"Choose copy language",children:e.jsx(le,{size:11})}),e.jsx(Ee,{open:a,initialLang:c??void 0,strategy:o,value:d,onCopy:m=>{l(!0),r(m),setTimeout(()=>l(!1),1500)},onClose:()=>i(!1)})]})}function Te({hotspot:s,onCancel:r,onMute:a,onOpen:i}){const n=s.state??null,l=(n==null?void 0:n.clean_builds_count)??0,c=(n==null?void 0:n.fixed_at)??null,o=(n==null?void 0:n.fixed_by_api_key)??null;return e.jsx("div",{className:"sh-table__row sh-table__row--pending",role:"button",tabIndex:0,onClick:()=>i(s.originalSelector),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(s.originalSelector))},children:e.jsxs("div",{className:"sh-pending-row",children:[e.jsxs("div",{className:"sh-pending-row__head",children:[e.jsx(B,{size:14,className:"sh-pending-row__icon"}),e.jsx("span",{className:"sh-strategy-badge",children:w(s.originalStrategy)}),e.jsx("code",{className:"sh-pending-row__selector",title:s.originalSelector,children:s.originalSelector})]}),e.jsxs("div",{className:"sh-pending-row__meta",children:["Marked fixed ",N(c),o?` by ${o}`:""," • verifying…"]}),e.jsxs("div",{className:"sh-pending-progress",children:[e.jsx("div",{className:"sh-pending-progress__dots","aria-label":`${l} of 3 clean builds`,children:[0,1,2].map(d=>e.jsx("span",{className:`sh-pending-progress__dot ${d<l?"sh-pending-progress__dot--filled":""}`},d))}),e.jsxs("div",{className:"sh-pending-progress__legend",children:[l," of 3 clean CI builds since fix"]}),e.jsx("div",{className:"sh-pending-progress__hint",children:"Only sessions with a build_id count toward verification — local runs do not."})]}),e.jsxs("div",{className:"sh-pending-row__actions",children:[e.jsxs("button",{type:"button",className:"sh-action-btn",onClick:d=>{d.stopPropagation(),r(s)},title:"Revert to Active without waiting for verification",children:[e.jsx(P,{size:11})," Cancel verification"]}),e.jsx("button",{type:"button",className:"sh-action-btn",onClick:d=>{d.stopPropagation(),a(s)},title:"Mute this selector instead of verifying it",children:"Mute"})]})]})})}function Le({hotspot:s,onMute:r,onOpen:a}){const i=s.state??null,n=(i==null?void 0:i.fixed_at)??null,l=(i==null?void 0:i.resolved_at)??null,c=(i==null?void 0:i.clean_builds_count)??0,o=(i==null?void 0:i.regression_count)??0;return e.jsx("div",{className:"sh-table__row sh-table__row--resolved",role:"button",tabIndex:0,onClick:()=>a(s.originalSelector),onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),a(s.originalSelector))},children:e.jsxs("div",{className:"sh-resolved-row",children:[e.jsxs("div",{className:"sh-resolved-row__head",children:[e.jsx(Y,{size:14,className:"sh-resolved-row__icon"}),e.jsx("span",{className:"sh-strategy-badge",children:w(s.originalStrategy)}),e.jsx("code",{className:"sh-resolved-row__selector",title:s.originalSelector,children:s.originalSelector}),o>0&&e.jsxs("span",{className:"sh-resolved-row__regression",title:"This selector regressed at least once before being resolved again",children:[e.jsx(re,{size:11})," Previously regressed ",o,"×"]})]}),e.jsxs("div",{className:"sh-resolved-row__meta",children:["Resolved ",N(l)," • ",c," clean build",c===1?"":"s"," since fix"]}),e.jsxs("div",{className:"sh-resolved-row__history",children:["Marked fixed ",N(n)," • Verified ",N(l)]}),e.jsx("div",{className:"sh-resolved-row__actions",children:e.jsx("button",{type:"button",className:"sh-action-btn",onClick:d=>{d.stopPropagation(),r(s)},title:"Hide this selector entirely (e.g. if it regresses again later)",children:"Mute"})})]})})}function Pe({onUnmute:s}){const[r,a]=h.useState(null),[i,n]=h.useState(!0),l=h.useCallback(async()=>{n(!0);try{const o=await k.getMutedSelectors({limit:200});a(o??null)}catch{a({muted:[],total:0,limit:200,offset:0})}finally{n(!1)}},[]);h.useEffect(()=>{l()},[l]);const c=async o=>{window.confirm(`Unmute "${o.original_selector}"?`)&&(await s(o.original_strategy,o.original_selector),l())};return i?e.jsxs("div",{className:"sh-empty",children:[e.jsx(A,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading muted selectors…"})]}):!r||r.muted.length===0?e.jsxs("div",{className:"sh-empty sh-empty--clean",children:[e.jsx(R,{size:28}),e.jsxs("div",{children:[e.jsx("div",{className:"sh-empty__title",children:"Nothing muted"}),e.jsx("div",{className:"sh-empty__subtitle",children:"Selectors silenced from Hotspots, the CI gate, and digests will appear here."})]})]}):e.jsx("ul",{className:"sh-muted-list",children:r.muted.map(o=>e.jsxs("li",{className:"sh-muted-list__item",children:[e.jsxs("div",{className:"sh-muted-list__head",children:[e.jsx(R,{size:13,className:"sh-muted-list__icon"}),e.jsx("span",{className:"sh-strategy-badge",children:w(o.original_strategy)}),e.jsx("code",{className:"sh-muted-list__selector",title:o.original_selector,children:o.original_selector})]}),e.jsxs("div",{className:"sh-muted-list__meta",children:["Muted ",N(o.muted_at),o.muted_by_api_key?` by ${o.muted_by_api_key}`:"",o.last_healed_at?` • Last healed ${N(o.last_healed_at)}`:" • Never healed (pre-emptively muted)",o.regression_count>0?` • ${o.regression_count} regression${o.regression_count===1?"":"s"} on record`:""]}),e.jsx("div",{className:"sh-muted-list__actions",children:e.jsx("button",{type:"button",className:"sh-action-btn",onClick:()=>c(o),children:"Unmute"})})]},`${o.original_strategy}:${o.original_selector}`))})}const Re=3e4,He=5*6e4;function De(){const{on:s}=Z(),r=z(),[a,i]=h.useState([]);if(h.useEffect(()=>{const c=s("selector_regressed",o=>{i(d=>{const g=Date.now()-He;return[...d.filter(m=>m.receivedAt>=g),{original_strategy:(o==null?void 0:o.original_strategy)??"",original_selector:(o==null?void 0:o.original_selector)??"",resolved_at:(o==null?void 0:o.resolved_at)??null,regression_count:o==null?void 0:o.regression_count,receivedAt:Date.now()}]})});return()=>{c&&c()}},[s]),h.useEffect(()=>{if(a.length===0)return;const c=setTimeout(()=>i([]),Re);return()=>clearTimeout(c)},[a]),a.length===0)return null;const n=()=>i([]),l=()=>{r("/selector-health?tab=active"),i([])};if(a.length===1){const c=a[0];return e.jsxs("div",{className:"sh-regression-banner",role:"alert",children:[e.jsx(A,{size:14,className:"sh-regression-banner__icon"}),e.jsxs("span",{children:["A previously-fixed selector regressed:"," ",e.jsxs("strong",{children:[w(c.original_strategy),": ",c.original_selector]})," ","healed again."]}),e.jsx("button",{type:"button",className:"sh-regression-banner__action",onClick:l,children:"Show in Active →"}),e.jsx("button",{type:"button",className:"sh-regression-banner__close",onClick:n,"aria-label":"Dismiss",children:e.jsx(P,{size:13})})]})}return e.jsxs("div",{className:"sh-regression-banner",role:"alert",children:[e.jsx(A,{size:14,className:"sh-regression-banner__icon"}),e.jsxs("span",{children:[e.jsxs("strong",{children:[a.length," selectors"]})," have regressed in the last 5 minutes."]}),e.jsx("button",{type:"button",className:"sh-regression-banner__action",onClick:l,children:"Show all →"}),e.jsx("button",{type:"button",className:"sh-regression-banner__close",onClick:n,"aria-label":"Dismiss",children:e.jsx(P,{size:13})})]})}const ze=[{value:7,label:"7d"},{value:30,label:"30d"},{value:90,label:"90d"}],Be=["","LLM","Visual AI","OCR","Fuzzy XML","Resilio","Native"],Oe=["","ios","android","tvos"];function Fe(s){const r=Date.parse(s);if(!Number.isFinite(r))return"";const a=Math.max(0,Date.now()-r),i=Math.floor(a/1e3);if(i<60)return`${i}s ago`;const n=Math.floor(i/60);if(n<60)return`${n}m ago`;const l=Math.floor(n/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function Ue(s){return s===0?"$0":s<.01?"<$0.01":s<1?`$${s.toFixed(2)}`:s<100?`$${s.toFixed(2)}`:`$${Math.round(s)}`}function Ve(s){return s>=10?"severe":s>=5?"warn":"mild"}const E=({current:s,prior:r,invertColor:a=!1})=>{if(r===0&&s===0)return e.jsxs("span",{className:"sh-delta neutral",children:[e.jsx(q,{size:11}),"no change"]});if(r===0)return e.jsxs("span",{className:`sh-delta ${a?"good":"bad"}`,children:[e.jsx(J,{size:11}),"new"]});const i=Math.round((s-r)/r*100);if(i===0)return e.jsxs("span",{className:"sh-delta neutral",children:[e.jsx(q,{size:11}),"flat"]});const n=i>0,l=a?n:!n;return e.jsxs("span",{className:`sh-delta ${l?"good":"bad"}`,children:[n?e.jsx(J,{size:11}):e.jsx(je,{size:11}),Math.abs(i),"%"]})},y=({label:s,value:r,sub:a,delta:i,tone:n="neutral",size:l="md",hint:c})=>e.jsxs("div",{className:`sh-kpi sh-kpi--${n} sh-kpi--${l}`,children:[e.jsxs("div",{className:"sh-kpi__label",children:[s,c&&e.jsx("span",{className:"sh-kpi__info",title:c,"aria-label":c,role:"img",children:e.jsx(de,{size:11})})]}),e.jsx("div",{className:"sh-kpi__value",children:r}),(a||i)&&e.jsxs("div",{className:"sh-kpi__foot",children:[a&&e.jsx("span",{className:"sh-kpi__sub",children:a}),i&&e.jsx("span",{className:"sh-kpi__delta",children:i})]})]}),I={brittle:"Distinct selectors that needed at least one heal in the window. Lower is better.",totalHeals:"Number of times Xenon's self-heal kicked in within the selected window.",llm:"Heals that escalated all the way to an LLM. The most expensive tier — keep this small.",cost:"Estimated dollar spend on LLM heals in the window."},Ke=({summary:s,loading:r})=>{var c;const a=(s==null?void 0:s.current)??{totalHeals:0,distinctSelectors:0,sessionsTouched:0,byTier:{},estCostUsd:0},i=(s==null?void 0:s.prior)??{totalHeals:0,distinctSelectors:0,sessionsTouched:0,estCostUsd:0},n=((c=a.byTier)==null?void 0:c.LLM)??0,l=a.totalHeals>0?Math.round(n/a.totalHeals*100):0;return e.jsxs("div",{className:"sh-kpi-strip",children:[e.jsx(y,{size:"hero",label:"Brittle selectors",hint:I.brittle,value:r?"—":a.distinctSelectors.toLocaleString(),sub:"distinct selectors needing attention",delta:!r&&e.jsx(E,{current:a.distinctSelectors,prior:i.distinctSelectors}),tone:a.distinctSelectors>50?"warn":"neutral"}),e.jsx(y,{label:"Total heals",hint:I.totalHeals,value:r?"—":a.totalHeals.toLocaleString(),sub:`${(s==null?void 0:s.windowDays)??30}d window`,delta:!r&&e.jsx(E,{current:a.totalHeals,prior:i.totalHeals}),tone:a.totalHeals>i.totalHeals&&i.totalHeals>0?"warn":"neutral"}),e.jsx(y,{label:"Sessions touched",value:r?"—":a.sessionsTouched.toLocaleString(),sub:"by self-heal",delta:!r&&e.jsx(E,{current:a.sessionsTouched,prior:i.sessionsTouched})}),e.jsx(y,{label:"LLM heals",hint:I.llm,value:r?"—":n.toLocaleString(),sub:`${l}% of total`,tone:l>30?"critical":l>10?"warn":"neutral"}),e.jsx(y,{label:"Est. cost",hint:I.cost,value:r?"—":Ue(a.estCostUsd),sub:"this window",delta:!r&&e.jsx(E,{current:Math.round(a.estCostUsd*100),prior:Math.round(i.estCostUsd*100)})}),e.jsx(y,{label:"Resolved",value:r?"—":((s==null?void 0:s.resolvedCount)??0).toLocaleString(),sub:`last ${(s==null?void 0:s.windowDays)??30}d`,delta:!r&&typeof(s==null?void 0:s.pendingCount)=="number"?e.jsxs("span",{className:"sh-kpi__delta sh-kpi__delta--with-icon",children:[e.jsx(B,{size:11,style:{color:"var(--accent, #60a5fa)"}}),s.pendingCount," pending"]}):void 0,tone:"neutral"})]})},os=()=>{const s=z(),{on:r}=Z(),{toast:a}=oe(),[i]=Q(),n=i.get("tab")??"active",[l,c]=h.useState(30),[o,d]=h.useState(""),[g,b]=h.useState(""),[m,f]=h.useState(null),[S,te]=h.useState([]),[M,F]=h.useState(!1),[U,ae]=h.useState(!1),[Xe,V]=h.useState(null),[T,K]=h.useState(!1),_=h.useCallback(async()=>{F(!0);try{const[t,u]=await Promise.all([k.getHealingSummary(l),k.getHealingHotspots({windowDays:l,limit:50,tier:o||void 0,platform:g||void 0,status:n})]);f(t??null),te(Array.isArray(u==null?void 0:u.hotspots)?u.hotspots:[])}catch{}finally{F(!1),ae(!0)}},[l,o,g,n]);h.useEffect(()=>{_()},[_]),h.useEffect(()=>{const u=["healing_event","selector_fixed","selector_resolved","selector_regressed","selector_cancelled","selector_muted","selector_unmuted","selector_progress"].map(v=>r(v,()=>_()));return()=>{u.forEach(v=>v&&v())}},[r,_]);const C=t=>{s(`/selector-health/detail?value=${encodeURIComponent(t)}&windowDays=${l}`)},j=h.useCallback(async(t,u)=>{const v=(()=>{switch(t){case"mark_fixed":return"Mark this selector as fixed? Xenon will move it to Pending Verification and watch for 3 clean CI builds.";case"mute":return"Mute this selector? It will be hidden from Hotspots, the CI gate, and digests until you unmute.";case"unmute":return"Unmute this selector?";case"cancel_verification":return"Cancel verification? The selector returns to Active and the clean-build counter resets."}})();if(window.confirm(v))try{await k.postSelectorStateAction({original_strategy:u.originalStrategy??"",original_selector:u.originalSelector,action:t});const p=(()=>{switch(t){case"mark_fixed":return"Marked fixed. Watching for clean builds.";case"mute":return"Muted.";case"unmute":return"Unmuted.";case"cancel_verification":return"Verification cancelled."}})();a(p,"success"),_()}catch(p){const $=p!=null&&p.currentStatus?` (currently ${p.currentStatus})`:"";a(`${(p==null?void 0:p.message)??"Action failed"}${$}`,"error")}},[_,a]),ie=async()=>{K(!0);try{const t=await k.sendHealingDigest({windowDays:l,limit:5,minHealCount:2}),u=(t==null?void 0:t.sent)??0,v=(t==null?void 0:t.hotspotsIncluded)??0;u===0?a("No webhook is subscribed to selector_health_digest yet. Add one in Notifications.","error"):a(`Digest sent to ${u} webhook${u===1?"":"s"} (${v} hotspot${v===1?"":"s"} included).`,"success")}catch{a("Failed to send digest. Check the server logs.","error")}finally{K(!1)}},L=!!o||!!g,ne=h.useMemo(()=>"Surface the selectors your suite quietly relies on auto-heal for. Rewrite the worst offenders to keep tests fast, cheap, and portable.",[]);return e.jsxs("div",{className:"selector-health-page",children:[e.jsx(xe,{icon:W,eyebrow:"Test Quality",title:"Selector Health",subtitle:ne,action:e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-ghost-btn",onClick:ie,disabled:T,title:T?"Sending digest…":"Send digest to subscribed webhooks","aria-label":"Send digest",children:e.jsx(we,{size:14,className:T?"animate-spin":""})}),e.jsx("button",{type:"button",className:"sh-ghost-btn",onClick:_,disabled:M,title:"Refresh hotspots","aria-label":"Refresh",children:e.jsx(A,{size:14,className:M?"animate-spin":""})})]})}),e.jsxs("div",{className:"sh-content",children:[e.jsx(De,{}),e.jsx(Ke,{summary:m,loading:M&&!U}),e.jsx(Ce,{current:n,counts:{[n]:S.length}}),n==="muted"?e.jsx(Pe,{onUnmute:async(t,u)=>{await j("unmute",{originalStrategy:t,originalSelector:u})}}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sh-filter-bar",children:[e.jsx("span",{className:"sh-filter-bar__lead",children:"Filter results"}),e.jsxs("div",{className:"sh-filter-bar__group",children:[e.jsx("span",{className:"sh-filter-bar__label",children:"Window"}),e.jsx(be,{size:"sm",value:String(l),onChange:t=>c(parseInt(t,10)),segments:ze.map(t=>({value:String(t.value),label:t.label}))})]}),e.jsxs("div",{className:"sh-filter-bar__group",children:[e.jsx("span",{className:"sh-filter-bar__label",children:"Tier"}),e.jsx("select",{className:"sh-select",value:o,onChange:t=>d(t.target.value),children:Be.map(t=>e.jsx("option",{value:t,children:t||"All tiers"},t||"all"))})]}),e.jsxs("div",{className:"sh-filter-bar__group",children:[e.jsx("span",{className:"sh-filter-bar__label",children:"Platform"}),e.jsx("select",{className:"sh-select",value:g,onChange:t=>b(t.target.value),children:Oe.map(t=>e.jsx("option",{value:t,children:t?t.toUpperCase():"All platforms"},t||"all"))})]}),L&&e.jsxs("button",{type:"button",className:"sh-filter-bar__clear",onClick:()=>{d(""),b("")},children:[e.jsx(G,{size:11})," Clear filters"]})]}),M&&!U?e.jsxs("div",{className:"sh-empty",children:[e.jsx(A,{size:18,className:"animate-spin"}),e.jsx("span",{children:"Loading hotspots…"})]}):S.length===0?e.jsx(ve,{icon:e.jsx(W,{size:32,color:n==="active"?"var(--green)":"var(--text-dim)"}),title:n==="pending"?"Nothing pending":n==="resolved"?"Nothing resolved yet":"Locator hygiene is clean",description:n==="pending"?"When you mark a selector fixed, it shows here while we watch for 3 clean CI builds.":n==="resolved"?"Fix a hot selector and Xenon will track its verification here.":`No selectors required healing in the last ${l} days${L?" for the active filters":""}.`,action:e.jsxs("div",{className:"sh-empty-actions",children:[L&&n==="active"&&e.jsxs("button",{type:"button",className:"sh-ghost-btn sh-ghost-btn--inline",onClick:()=>{d(""),b("")},children:[e.jsx(G,{size:12})," Reset filters"]}),e.jsxs("a",{href:"/xenon/api-docs",target:"_blank",rel:"noreferrer",className:"sh-ghost-btn sh-ghost-btn--inline",children:[e.jsx(ue,{size:12})," View API docs"]})]})}):n==="pending"?e.jsx("div",{className:"sh-pending-list",children:S.map(t=>e.jsx(Te,{hotspot:t,onCancel:u=>j("cancel_verification",u),onMute:u=>j("mute",u),onOpen:C},`${t.originalStrategy??""} ${t.originalSelector}`))}):n==="resolved"?e.jsx("div",{className:"sh-pending-list",children:S.map(t=>e.jsx(Le,{hotspot:t,onMute:u=>j("mute",u),onOpen:C},`${t.originalStrategy??""} ${t.originalSelector}`))}):e.jsxs("div",{className:"sh-table",children:[e.jsxs("div",{className:"sh-table__head",children:[e.jsx("div",{className:"sh-th sh-th--rank",children:"#"}),e.jsx("div",{className:"sh-th sh-th--selector",children:"Original selector"}),e.jsx("div",{className:"sh-th sh-th--count",children:"Heals"}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Sessions"}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Top tier"}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Avg conf."}),e.jsx("div",{className:"sh-th sh-th--meta",children:"Last seen"}),e.jsx("div",{className:"sh-th sh-th--rewrite",children:"Suggested rewrite"}),e.jsx("div",{className:"sh-th sh-th--actions"})]}),S.map((t,u)=>{const v=Ve(t.healCount),p=t.suggestedRewriteShare!==null?Math.round(t.suggestedRewriteShare*100):null,$=`${u}-${t.originalSelector}`;return e.jsxs("div",{className:"sh-table__row",onClick:()=>C(t.originalSelector),role:"button",tabIndex:0,onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),C(t.originalSelector))},children:[e.jsx("div",{className:"sh-td sh-td--rank",children:u+1}),e.jsxs("div",{className:"sh-td sh-td--selector",children:[e.jsx("span",{className:"sh-strategy-badge",children:w(t.originalStrategy)}),e.jsx("code",{title:t.originalSelector,children:t.originalSelector})]}),e.jsx("div",{className:"sh-td sh-td--count",children:e.jsxs("span",{className:`sh-count-badge ${v}`,children:[e.jsx(ce,{size:10}),t.healCount]})}),e.jsx("div",{className:"sh-td sh-td--meta",children:t.sessionCount}),e.jsx("div",{className:"sh-td sh-td--meta",children:t.topTier?e.jsx("span",{className:"sh-tier-pill",children:t.topTier}):"—"}),e.jsx("div",{className:"sh-td sh-td--meta",children:t.averageConfidence!==null?`${Math.round(t.averageConfidence*100)}%`:"—"}),e.jsx("div",{className:"sh-td sh-td--meta",children:Fe(t.lastHealedAt)}),e.jsx("div",{className:"sh-td sh-td--rewrite",children:t.suggestedRewrite?e.jsxs(e.Fragment,{children:[p!==null&&e.jsxs("span",{className:"sh-rewrite-share",title:"Share of heals that landed on this selector",children:[p,"%"]}),t.suggestedStrategy&&e.jsx("span",{className:"sh-strategy-badge sh-strategy-badge--rewrite",title:"Strategy of the suggested rewrite",children:w(t.suggestedStrategy)}),e.jsx("code",{className:"sh-rewrite-value",title:t.suggestedRewrite,children:t.suggestedRewrite})]}):e.jsx("span",{className:"sh-rewrite-empty",children:"—"})}),e.jsxs("div",{className:"sh-td sh-td--actions",children:[t.suggestedRewrite&&e.jsx(Ie,{hotspot:t,onCopied:x=>{V($),setTimeout(()=>V(X=>X===$?null:X),1500),a(`Copied as ${x}`,"success")}}),n==="active"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--primary",onClick:x=>{x.stopPropagation(),j("mark_fixed",t)},title:"Move to Pending Verification",children:"Mark Fixed"}),e.jsx("button",{type:"button",className:"sh-action-btn sh-action-btn--ghost",onClick:x=>{x.stopPropagation(),j("mute",t)},title:"Hide from Hotspots, CI gate, and digests",children:"Mute"})]}),e.jsx("button",{type:"button",className:"sh-icon-btn",onClick:x=>{x.stopPropagation(),C(t.originalSelector)},"aria-label":"Open selector detail",title:"Drill in",children:e.jsx(fe,{size:12})})]})]},$)})]})]})]})]})};export{os as default};
|