@xenon-device-management/xenon 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +446 -0
- package/lib/package.json +207 -0
- package/lib/public/assets/Layouts-7IT8aFLI.js +11 -0
- package/lib/public/assets/Layouts-DPMls9vh.css +1 -0
- package/lib/public/assets/ai-settings-BbnfgdEx.js +11 -0
- package/lib/public/assets/apps-CRMrI4_p.js +16 -0
- package/lib/public/assets/apps-CcM77dgg.css +1 -0
- package/lib/public/assets/badge-B1nKs8zj.css +1 -0
- package/lib/public/assets/badge-CSvl5xIU.js +11 -0
- package/lib/public/assets/button-CJlKn4PZ.css +1 -0
- package/lib/public/assets/button-CvLaGFYj.js +26 -0
- package/lib/public/assets/calendar-6w-D6Oaw.js +6 -0
- package/lib/public/assets/clock-DcdeWBPr.js +6 -0
- package/lib/public/assets/cpu-DiSoXT9n.js +6 -0
- package/lib/public/assets/device-explorer-CajM63OJ.js +193 -0
- package/lib/public/assets/device-explorer-CxdUAoTL.css +1 -0
- package/lib/public/assets/index-ByQwMN5T.js +174 -0
- package/lib/public/assets/index-C1DBaoSh.js +1 -0
- package/lib/public/assets/index-qzCez_kk.css +1 -0
- package/lib/public/assets/lock-B23ibZmo.js +6 -0
- package/lib/public/assets/maintenance-settings-CirzA6yG.js +6 -0
- package/lib/public/assets/mouse-pointer-2-Cz76SHFb.js +6 -0
- package/lib/public/assets/plus-BBwlIevt.js +6 -0
- package/lib/public/assets/session-dashboard-C2k7FFv_.css +1 -0
- package/lib/public/assets/session-dashboard-HPDtwPOZ.js +62 -0
- package/lib/public/assets/settings-DrZsZwdc.js +1 -0
- package/lib/public/assets/trash-2-DQpvzJec.js +6 -0
- package/lib/public/assets/useSocket-Dxsqae2a.js +16 -0
- package/lib/public/assets/webhook-settings-CDPgsgkb.css +1 -0
- package/lib/public/assets/webhook-settings-Cp-B4Nrw.js +1 -0
- package/lib/public/assets/zap-DovP6iow.js +6 -0
- package/lib/public/favicon.ico +0 -0
- package/lib/public/favicon.png +0 -0
- package/lib/public/favicon.svg +9 -0
- package/lib/public/index.html +46 -0
- package/lib/public/logo.svg +17 -0
- package/lib/public/logo192.png +0 -0
- package/lib/public/logo512.png +0 -0
- package/lib/public/manifest.json +25 -0
- package/lib/public/robots.txt +3 -0
- package/lib/schema.json +348 -0
- package/lib/src/InternalHttpClient.js +212 -0
- package/lib/src/PluginContext.js +29 -0
- package/lib/src/XenonCapabilityManager.js +199 -0
- package/lib/src/app/index.js +167 -0
- package/lib/src/app/routers/apps.js +79 -0
- package/lib/src/app/routers/config.js +131 -0
- package/lib/src/app/routers/control.js +835 -0
- package/lib/src/app/routers/dashboard.js +301 -0
- package/lib/src/app/routers/grid.js +352 -0
- package/lib/src/app/routers/reservation.js +190 -0
- package/lib/src/app/routers/webhook.js +83 -0
- package/lib/src/app/swagger-docs.js +203 -0
- package/lib/src/app/swagger.js +366 -0
- package/lib/src/chromeUtils.js +148 -0
- package/lib/src/commands/handle.js +19 -0
- package/lib/src/commands/index.js +8 -0
- package/lib/src/config.js +73 -0
- package/lib/src/dashboard/asset-manager.js +84 -0
- package/lib/src/dashboard/commands.js +284 -0
- package/lib/src/dashboard/event-manager.js +699 -0
- package/lib/src/dashboard/services/app-service.js +134 -0
- package/lib/src/dashboard/services/failure-analysis-service.js +173 -0
- package/lib/src/dashboard/services/session-service.js +113 -0
- package/lib/src/data-service/CircuitBreaker.js +83 -0
- package/lib/src/data-service/config-service.js +155 -0
- package/lib/src/data-service/db.js +122 -0
- package/lib/src/data-service/device-service.js +320 -0
- package/lib/src/data-service/device-store.interface.js +2 -0
- package/lib/src/data-service/device-store.js +345 -0
- package/lib/src/data-service/pending-sessions-service.js +25 -0
- package/lib/src/data-service/pluginArgs.js +25 -0
- package/lib/src/data-service/prisma-service.js +31 -0
- package/lib/src/data-service/prisma-store.js +385 -0
- package/lib/src/data-service/queue-service.js +150 -0
- package/lib/src/data-service/web-config-service.js +130 -0
- package/lib/src/device-managers/AndroidDeviceManager.js +1155 -0
- package/lib/src/device-managers/ChromeDriverManager.js +68 -0
- package/lib/src/device-managers/HealthMonitorService.js +325 -0
- package/lib/src/device-managers/IOSDeviceManager.js +351 -0
- package/lib/src/device-managers/NodeDevices.js +82 -0
- package/lib/src/device-managers/android/AndroidStreamService.js +370 -0
- package/lib/src/device-managers/android/DeviceLockManager.js +45 -0
- package/lib/src/device-managers/cloud/CapabilityManager.js +26 -0
- package/lib/src/device-managers/cloud/Devices.js +86 -0
- package/lib/src/device-managers/iOSTracker.js +44 -0
- package/lib/src/device-managers/index.js +89 -0
- package/lib/src/device-managers/ios/IOSDiscoveryService.js +268 -0
- package/lib/src/device-managers/ios/IOSStreamService.js +893 -0
- package/lib/src/device-managers/ios/WDAClient.js +866 -0
- package/lib/src/device-utils.js +663 -0
- package/lib/src/enums/Capabilities.js +8 -0
- package/lib/src/enums/Cloud.js +11 -0
- package/lib/src/enums/Platform.js +9 -0
- package/lib/src/enums/SessionType.js +9 -0
- package/lib/src/enums/SocketEvents.js +15 -0
- package/lib/src/helpers/UniversalMjpegProxy.js +273 -0
- package/lib/src/helpers/index.js +229 -0
- package/lib/src/index.js +95 -0
- package/lib/src/interceptors/CommandInterceptor.js +524 -0
- package/lib/src/interfaces/ICloudManager.js +2 -0
- package/lib/src/interfaces/IDevice.js +2 -0
- package/lib/src/interfaces/IDeviceFilterOptions.js +2 -0
- package/lib/src/interfaces/IDeviceManager.js +2 -0
- package/lib/src/interfaces/IOptions.js +2 -0
- package/lib/src/interfaces/IPluginArgs.js +55 -0
- package/lib/src/interfaces/ISessionCapability.js +2 -0
- package/lib/src/logger.js +225 -0
- package/lib/src/plugin.js +244 -0
- package/lib/src/prisma.js +12 -0
- package/lib/src/profiling/AndroidAppProfiler.js +213 -0
- package/lib/src/proxy/wd-command-proxy.js +221 -0
- package/lib/src/scripts/generate-database-migration.js +59 -0
- package/lib/src/scripts/initialize-database.js +55 -0
- package/lib/src/scripts/install-go-ios.js +66 -0
- package/lib/src/scripts/prepare-prisma.js +89 -0
- package/lib/src/services/AICommandService.js +143 -0
- package/lib/src/services/AIService.js +466 -0
- package/lib/src/services/CleanupService.js +141 -0
- package/lib/src/services/EventBus.js +74 -0
- package/lib/src/services/InspectorService.js +395 -0
- package/lib/src/services/MetricsService.js +134 -0
- package/lib/src/services/NetworkConditioningService.js +173 -0
- package/lib/src/services/NotificationService.js +163 -0
- package/lib/src/services/RequestLogService.js +252 -0
- package/lib/src/services/ResourceIsolationService.js +122 -0
- package/lib/src/services/SecurityService.js +120 -0
- package/lib/src/services/ServerManager.js +284 -0
- package/lib/src/services/SessionHeartbeatService.js +158 -0
- package/lib/src/services/SessionLifecycleService.js +572 -0
- package/lib/src/services/SocketClient.js +71 -0
- package/lib/src/services/SocketServer.js +87 -0
- package/lib/src/services/TracingService.js +132 -0
- package/lib/src/services/VideoPipelineService.js +220 -0
- package/lib/src/services/healing/FuzzyXmlHealingProvider.js +333 -0
- package/lib/src/services/healing/HealEtalonService.js +98 -0
- package/lib/src/services/healing/HealedLocatorGenerator.js +132 -0
- package/lib/src/services/healing/HealingOrchestrator.js +165 -0
- package/lib/src/services/healing/LlmHealingProvider.js +77 -0
- package/lib/src/services/healing/OcrHealingProvider.js +119 -0
- package/lib/src/services/healing/ResilioTreeHealingProvider.js +100 -0
- package/lib/src/services/healing/VisualAiHealingProvider.js +90 -0
- package/lib/src/services/healing/types.js +12 -0
- package/lib/src/services/omni-vision/OmniVisionService.js +718 -0
- package/lib/src/services/omni-vision/VisionAssertionService.js +68 -0
- package/lib/src/sessions/CloudSession.js +42 -0
- package/lib/src/sessions/LocalSession.js +313 -0
- package/lib/src/sessions/RemoteSession.js +287 -0
- package/lib/src/sessions/SessionManager.js +238 -0
- package/lib/src/sessions/XenonSession.js +44 -0
- package/lib/src/types/CLIArgs.js +2 -0
- package/lib/src/types/CloudArgs.js +2 -0
- package/lib/src/types/CloudSchema.js +131 -0
- package/lib/src/types/DeviceType.js +2 -0
- package/lib/src/types/DeviceUpdate.js +2 -0
- package/lib/src/types/IOSDevice.js +2 -0
- package/lib/src/types/Platform.js +2 -0
- package/lib/src/types/SessionStatus.js +11 -0
- package/lib/src/validators/CapabilityValidator.js +93 -0
- package/lib/test/e2e/android/conf.spec.js +43 -0
- package/lib/test/e2e/android/conf2.spec.js +44 -0
- package/lib/test/e2e/android/conf3.spec.js +44 -0
- package/lib/test/e2e/e2ehelper.js +113 -0
- package/lib/test/e2e/hubnode/forward-request.spec.js +224 -0
- package/lib/test/e2e/hubnode/hubnode.spec.js +214 -0
- package/lib/test/e2e/ios/conf1.spec.js +39 -0
- package/lib/test/e2e/ios/conf2.spec.js +39 -0
- package/lib/test/e2e/plugin-harness.js +236 -0
- package/lib/test/e2e/plugin.spec.js +97 -0
- package/lib/test/e2e/telemetry_verification.spec.js +83 -0
- package/lib/test/e2e/video-recording-test.spec.js +63 -0
- package/lib/test/helpers/test-container.js +112 -0
- package/lib/test/integration/androidDevices.spec.js +137 -0
- package/lib/test/integration/cliArgs.js +73 -0
- package/lib/test/integration/ios/01iOSSimulator.spec.js +291 -0
- package/lib/test/integration/ios/02iOSDevices.spec.js +75 -0
- package/lib/test/integration/testHelpers.js +74 -0
- package/lib/test/unit/AndroidDeviceManager.spec.js +178 -0
- package/lib/test/unit/ChromeDriverManager.spec.js +26 -0
- package/lib/test/unit/CleanupService.spec.js +21 -0
- package/lib/test/unit/DeviceModel.spec.js +157 -0
- package/lib/test/unit/FuzzyXmlHealingProvider.test.js +294 -0
- package/lib/test/unit/GetAdbOriginal.js +42 -0
- package/lib/test/unit/HealingCascade.test.js +128 -0
- package/lib/test/unit/IOSDeviceManager.spec.js +261 -0
- package/lib/test/unit/RemoteIOs.spec.js +78 -0
- package/lib/test/unit/ResilioTreeHealingProvider.test.js +96 -0
- package/lib/test/unit/commands.spec.js +27 -0
- package/lib/test/unit/config.spec.js +27 -0
- package/lib/test/unit/device-service.spec.js +307 -0
- package/lib/test/unit/device-utils.spec.js +313 -0
- package/lib/test/unit/fixtures/device.config.js +4 -0
- package/lib/test/unit/fixtures/devices.js +89 -0
- package/lib/test/unit/helpers.spec.js +62 -0
- package/lib/test/unit/omni-vision.spec.js +100 -0
- package/lib/test/unit/plugin.spec.js +133 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +207 -0
- package/prisma/data.db +0 -0
- package/prisma/dev.db +0 -0
- package/prisma/dev.db-journal +0 -0
- package/prisma/migrations/20231011074725_initial_tables/migration.sql +47 -0
- package/prisma/migrations/20231226115334_update_session_log/migration.sql +2 -0
- package/prisma/migrations/20251204113710_add_video_recording_enabled/migration.sql +29 -0
- package/prisma/migrations/20251204132449_add_log_table/migration.sql +11 -0
- package/prisma/migrations/20251205050111_add_profiling_support/migration.sql +47 -0
- package/prisma/migrations/20251205050947_add_is_error_field/migration.sql +24 -0
- package/prisma/migrations/20260126201337_add_app_model/migration.sql +18 -0
- package/prisma/migrations/20260130115722_add_performance_trace_and_xenon_sync/migration.sql +2 -0
- package/prisma/migrations/20260130135114_add_device_models/migration.sql +57 -0
- package/prisma/migrations/20260130140655_make_systemport_optional/migration.sql +45 -0
- package/prisma/migrations/20260130140932_make_device_fields_optional/migration.sql +45 -0
- package/prisma/migrations/20260130141040_final_schema_fix/migration.sql +45 -0
- package/prisma/migrations/20260130143234_add_device_health_fields/migration.sql +4 -0
- package/prisma/migrations/20260130144921_add_failure_category/migration.sql +2 -0
- package/prisma/migrations/20260131151456_add_webhook_config/migration.sql +10 -0
- package/prisma/migrations/20260201094507_add_device_tags/migration.sql +11 -0
- package/prisma/migrations/20260201103410_add_managed_process/migration.sql +15 -0
- package/prisma/migrations/20260201140637_add_web_config/migration.sql +22 -0
- package/prisma/migrations/20260201162232_add_session_progress/migration.sql +2 -0
- package/prisma/migrations/20260201174231_add_total_healed_count/migration.sql +2 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/schema.prisma +210 -0
- package/schema.json +348 -0
- package/scripts/build-xenon.sh +32 -0
- package/scripts/dev/debug-gemini.ts +44 -0
- package/scripts/generate-types-from-schema.js +86 -0
- package/scripts/install-compatible-driver.js +39 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import{c as Me,h as tn,R as U,r as ve,j as s,i as qr,C as Wr,e as Xr,B as ut,S as Qr}from"./index-ByQwMN5T.js";import{H as Kr,a as Yr,p as er,u as Gr,C as nr}from"./useSocket-Dxsqae2a.js";import{X as ce}from"./index-C1DBaoSh.js";import{c as Jr,D as tr,S as ct,B as De}from"./badge-CSvl5xIU.js";import{C as Gn}from"./clock-DcdeWBPr.js";import{C as Zr}from"./cpu-DiSoXT9n.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 ei=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Ve=Me("activity",ei);/**
|
|
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 ni=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ti=Me("arrow-left",ni);/**
|
|
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 ri=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],ht=Me("circle-check",ri);/**
|
|
17
|
+
* @license lucide-react v0.555.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ii=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pt=Me("circle-x",ii);/**
|
|
22
|
+
* @license lucide-react v0.555.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const li=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ai=Me("external-link",li);/**
|
|
27
|
+
* @license lucide-react v0.555.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const si=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],oi=Me("layout-grid",si);/**
|
|
32
|
+
* @license lucide-react v0.555.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const ui=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],ci=Me("trending-up",ui),dt=["http","https","mailto","tel"];function hi(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<dt.length;){const l=dt[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)"}/*!
|
|
37
|
+
* Determine if an object is a Buffer
|
|
38
|
+
*
|
|
39
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
40
|
+
* @license MIT
|
|
41
|
+
*/var pi=function(n){return n!=null&&n.constructor!=null&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)};const rr=tn(pi);function Ze(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?ft(e.position):"start"in e||"end"in e?ft(e):"line"in e||"column"in e?Bn(e):""}function Bn(e){return mt(e&&e.line)+":"+mt(e&&e.column)}function ft(e){return Bn(e&&e.start)+"-"+Bn(e&&e.end)}function mt(e){return e&&typeof e=="number"?e:1}class ke 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 a=r.indexOf(":");a===-1?i[1]=r:(i[0]=r.slice(0,a),i[1]=r.slice(a+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=Ze(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}}ke.prototype.file="";ke.prototype.name="";ke.prototype.reason="";ke.prototype.message="";ke.prototype.stack="";ke.prototype.fatal=null;ke.prototype.column=null;ke.prototype.line=null;ke.prototype.source=null;ke.prototype.ruleId=null;ke.prototype.position=null;const Ce={basename:di,dirname:fi,extname:mi,join:gi,sep:"/"};function di(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');rn(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 a=-1,o=n.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(l){t=i+1;break}}else a<0&&(l=!0,a=i+1),o>-1&&(e.charCodeAt(i)===n.charCodeAt(o--)?o<0&&(r=i):(o=-1,r=a));return t===r?r=a:r<0&&(r=e.length),e.slice(t,r)}function fi(e){if(rn(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 mi(e){rn(e);let n=e.length,t=-1,r=0,i=-1,l=0,a;for(;n--;){const o=e.charCodeAt(n);if(o===47){if(a){r=n+1;break}continue}t<0&&(a=!0,t=n+1),o===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 gi(...e){let n=-1,t;for(;++n<e.length;)rn(e[n]),e[n]&&(t=t===void 0?e[n]:t+"/"+e[n]);return t===void 0?".":xi(t)}function xi(e){rn(e);const n=e.charCodeAt(0)===47;let t=yi(e,!n);return t.length===0&&!n&&(t="."),t.length>0&&e.charCodeAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function yi(e,n){let t="",r=0,i=-1,l=0,a=-1,o,c;for(;++a<=e.length;){if(a<e.length)o=e.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||l===1))if(i!==a-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(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=a,l=0;continue}}else if(t.length>0){t="",r=0,i=a,l=0;continue}}n&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+e.slice(i+1,a):t=e.slice(i+1,a),r=a-i-1;i=a,l=0}else o===46&&l>-1?l++:l=-1}return t}function rn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bi={cwd:ki};function ki(){return"/"}function Mn(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function wi(e){if(typeof e=="string")e=new URL(e);else if(!Mn(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 Si(e)}function Si(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 Fn=["history","path","basename","stem","extname","dirname"];class ir{constructor(n){let t;n?typeof n=="string"||ji(n)?t={value:n}:Mn(n)?t={path:n}:t=n:t={},this.data={},this.messages=[],this.history=[],this.cwd=bi.cwd(),this.value,this.stored,this.result,this.map;let r=-1;for(;++r<Fn.length;){const l=Fn[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)Fn.includes(i)||(this[i]=t[i])}get path(){return this.history[this.history.length-1]}set path(n){Mn(n)&&(n=wi(n)),Pn(n,"path"),this.path!==n&&this.history.push(n)}get dirname(){return typeof this.path=="string"?Ce.dirname(this.path):void 0}set dirname(n){gt(this.basename,"dirname"),this.path=Ce.join(n||"",this.basename)}get basename(){return typeof this.path=="string"?Ce.basename(this.path):void 0}set basename(n){Pn(n,"basename"),Tn(n,"basename"),this.path=Ce.join(this.dirname||"",n)}get extname(){return typeof this.path=="string"?Ce.extname(this.path):void 0}set extname(n){if(Tn(n,"extname"),gt(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=Ce.join(this.dirname,this.stem+(n||""))}get stem(){return typeof this.path=="string"?Ce.basename(this.path,this.extname):void 0}set stem(n){Pn(n,"stem"),Tn(n,"stem"),this.path=Ce.join(this.dirname||"",n+(this.extname||""))}toString(n){return(this.value||"").toString(n||void 0)}message(n,t,r){const i=new ke(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 Tn(e,n){if(e&&e.includes(Ce.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+Ce.sep+"`")}function Pn(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function gt(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function ji(e){return rr(e)}function xt(e){if(e)throw e}var cn=Object.prototype.hasOwnProperty,lr=Object.prototype.toString,yt=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,kt=function(n){return typeof Array.isArray=="function"?Array.isArray(n):lr.call(n)==="[object Array]"},wt=function(n){if(!n||lr.call(n)!=="[object Object]")return!1;var t=cn.call(n,"constructor"),r=n.constructor&&n.constructor.prototype&&cn.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!t&&!r)return!1;var i;for(i in n);return typeof i>"u"||cn.call(n,i)},St=function(n,t){yt&&t.name==="__proto__"?yt(n,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):n[t.name]=t.newValue},jt=function(n,t){if(t==="__proto__")if(cn.call(n,t)){if(bt)return bt(n,t).value}else return;return n[t]},vi=function e(){var n,t,r,i,l,a,o=arguments[0],c=1,u=arguments.length,d=!1;for(typeof o=="boolean"&&(d=o,o=arguments[1]||{},c=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});c<u;++c)if(n=arguments[c],n!=null)for(t in n)r=jt(o,t),i=jt(n,t),o!==i&&(d&&i&&(wt(i)||(l=kt(i)))?(l?(l=!1,a=r&&kt(r)?r:[]):a=r&&wt(r)?r:{},St(o,{name:t,newValue:e(d,a,i)})):typeof i<"u"&&St(o,{name:t,newValue:i}));return o};const vt=tn(vi);function Un(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 Ni(){const e=[],n={run:t,use:r};return n;function t(...i){let l=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(c,...u){const d=e[++l];let h=-1;if(c){a(c);return}for(;++h<i.length;)(u[h]===null||u[h]===void 0)&&(u[h]=i[h]);i=u,d?Ci(d,o)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),n}}function Ci(e,n){let t;return r;function r(...a){const o=e.length>a.length;let c;o&&a.push(i);try{c=e.apply(this,a)}catch(u){const d=u;if(o&&t)throw d;return i(d)}o||(c&&c.then&&typeof c.then=="function"?c.then(l,i):c instanceof Error?i(c):l(c))}function i(a,...o){t||(t=!0,n(a,...o))}function l(a){i(null,a)}}const Ei=sr().freeze(),ar={}.hasOwnProperty;function sr(){const e=Ni(),n=[];let t={},r,i=-1;return l.data=a,l.Parser=void 0,l.Compiler=void 0,l.freeze=o,l.attachers=n,l.use=c,l.parse=u,l.stringify=d,l.run=h,l.runSync=g,l.process=p,l.processSync=k,l;function l(){const y=sr();let v=-1;for(;++v<n.length;)y.use(...n[v]);return y.data(vt(!0,{},t)),y}function a(y,v){return typeof y=="string"?arguments.length===2?(Dn("data",r),t[y]=v,l):ar.call(t,y)&&t[y]||null:y?(Dn("data",r),t=y,l):t}function o(){if(r)return l;for(;++i<n.length;){const[y,...v]=n[i];if(v[0]===!1)continue;v[0]===!0&&(v[0]=void 0);const w=y.call(l,...v);typeof w=="function"&&e.use(w)}return r=!0,i=Number.POSITIVE_INFINITY,l}function c(y,...v){let w;if(Dn("use",r),y!=null)if(typeof y=="function")H(y,...v);else if(typeof y=="object")Array.isArray(y)?$(y):C(y);else throw new TypeError("Expected usable value, not `"+y+"`");return w&&(t.settings=Object.assign(t.settings||{},w)),l;function D(x){if(typeof x=="function")H(x);else if(typeof x=="object")if(Array.isArray(x)){const[T,..._]=x;H(T,..._)}else C(x);else throw new TypeError("Expected usable value, not `"+x+"`")}function C(x){$(x.plugins),x.settings&&(w=Object.assign(w||{},x.settings))}function $(x){let T=-1;if(x!=null)if(Array.isArray(x))for(;++T<x.length;){const _=x[T];D(_)}else throw new TypeError("Expected a list of plugins, not `"+x+"`")}function H(x,T){let _=-1,R;for(;++_<n.length;)if(n[_][0]===x){R=n[_];break}R?(Un(R[1])&&Un(T)&&(T=vt(!0,R[1],T)),R[1]=T):n.push([...arguments])}}function u(y){l.freeze();const v=Je(y),w=l.Parser;return In("parse",w),Nt(w,"parse")?new w(String(v),v).parse():w(String(v),v)}function d(y,v){l.freeze();const w=Je(v),D=l.Compiler;return Ln("stringify",D),Ct(y),Nt(D,"compile")?new D(y,w).compile():D(y,w)}function h(y,v,w){if(Ct(y),l.freeze(),!w&&typeof v=="function"&&(w=v,v=void 0),!w)return new Promise(D);D(null,w);function D(C,$){e.run(y,Je(v),H);function H(x,T,_){T=T||y,x?$(x):C?C(T):w(null,T,_)}}}function g(y,v){let w,D;return l.run(y,v,C),Et("runSync","run",D),w;function C($,H){xt($),w=H,D=!0}}function p(y,v){if(l.freeze(),In("process",l.Parser),Ln("process",l.Compiler),!v)return new Promise(w);w(null,v);function w(D,C){const $=Je(y);l.run(l.parse($),$,(x,T,_)=>{if(x||!T||!_)H(x);else{const R=l.stringify(T,_);R==null||(Ti(R)?_.value=R:_.result=R),H(x,_)}});function H(x,T){x||!T?C(x):D?D(T):v(null,T)}}}function k(y){let v;l.freeze(),In("processSync",l.Parser),Ln("processSync",l.Compiler);const w=Je(y);return l.process(w,D),Et("processSync","process",v),w;function D(C){v=!0,xt(C)}}}function Nt(e,n){return typeof e=="function"&&e.prototype&&(Ai(e.prototype)||n in e.prototype)}function Ai(e){let n;for(n in e)if(ar.call(e,n))return!0;return!1}function In(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Ln(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Dn(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 Ct(e){if(!Un(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Et(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Je(e){return Fi(e)?e:new ir(e)}function Fi(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ti(e){return typeof e=="string"||rr(e)}const Pi={};function Ii(e,n){const t=Pi,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return or(e,r,i)}function or(e,n,t){if(Li(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 At(e.children,n,t)}return Array.isArray(e)?At(e,n,t):""}function At(e,n,t){const r=[];let i=-1;for(;++i<e.length;)r[i]=or(e[i],n,t);return r.join("")}function Li(e){return!!(e&&typeof e=="object")}function Ae(e,n,t,r){const i=e.length;let l=0,a;if(n<0?n=-n>i?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)a=Array.from(r),a.unshift(n,t),e.splice(...a);else for(t&&e.splice(n,t);l<r.length;)a=r.slice(l,l+1e4),a.unshift(n,0),e.splice(...a),l+=1e4,n+=1e4}function be(e,n){return e.length>0?(Ae(e,e.length,0,n),e):n}const Ft={}.hasOwnProperty;function Di(e){const n={};let t=-1;for(;++t<e.length;)Oi(n,e[t]);return n}function Oi(e,n){let t;for(t in n){const i=(Ft.call(e,t)?e[t]:void 0)||(e[t]={}),l=n[t];let a;if(l)for(a in l){Ft.call(i,a)||(i[a]=[]);const o=l[a];zi(i[a],Array.isArray(o)?o:o?[o]:[])}}}function zi(e,n){let t=-1;const r=[];for(;++t<n.length;)(n[t].add==="after"?e:r).push(n[t]);Ae(e,0,0,r)}const _i=/[!-\/:-@\[-`\{-~\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]/,Ee=Re(/[A-Za-z]/),ge=Re(/[\dA-Za-z]/),Ri=Re(/[#-'*+\--9=?A-Z^-~]/);function $n(e){return e!==null&&(e<32||e===127)}const Hn=Re(/\d/),Bi=Re(/[\dA-Fa-f]/),Mi=Re(/[!-/:-@[-`{-~]/);function I(e){return e!==null&&e<-2}function pe(e){return e!==null&&(e<0||e===32)}function V(e){return e===-2||e===-1||e===32}const Ui=Re(_i),$i=Re(/\s/);function Re(e){return n;function n(t){return t!==null&&e.test(String.fromCharCode(t))}}function G(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return a;function a(c){return V(c)?(e.enter(t),o(c)):n(c)}function o(c){return V(c)&&l++<i?(e.consume(c),o):(e.exit(t),n(c))}}const Hi={tokenize:Vi};function Vi(e){const n=e.attempt(this.parser.constructs.contentInitial,r,i);let t;return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),G(e,n,"linePrefix")}function i(o){return e.enter("paragraph"),l(o)}function l(o){const c=e.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return I(o)?(e.consume(o),e.exit("chunkText"),l):(e.consume(o),a)}}const qi={tokenize:Wi},Tt={tokenize:Xi};function Wi(e){const n=this,t=[];let r=0,i,l,a;return o;function o(C){if(r<t.length){const $=t[r];return n.containerState=$[1],e.attempt($[0].continuation,c,u)(C)}return u(C)}function c(C){if(r++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,i&&D();const $=n.events.length;let H=$,x;for(;H--;)if(n.events[H][0]==="exit"&&n.events[H][1].type==="chunkFlow"){x=n.events[H][1].end;break}w(r);let T=$;for(;T<n.events.length;)n.events[T][1].end=Object.assign({},x),T++;return Ae(n.events,H+1,0,n.events.slice($)),n.events.length=T,u(C)}return o(C)}function u(C){if(r===t.length){if(!i)return g(C);if(i.currentConstruct&&i.currentConstruct.concrete)return k(C);n.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(Tt,d,h)(C)}function d(C){return i&&D(),w(r),g(C)}function h(C){return n.parser.lazy[n.now().line]=r!==t.length,a=n.now().offset,k(C)}function g(C){return n.containerState={},e.attempt(Tt,p,k)(C)}function p(C){return r++,t.push([n.currentConstruct,n.containerState]),g(C)}function k(C){if(C===null){i&&D(),w(0),e.consume(C);return}return i=i||n.parser.flow(n.now()),e.enter("chunkFlow",{contentType:"flow",previous:l,_tokenizer:i}),y(C)}function y(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return I(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,n.interrupt=void 0,o):(e.consume(C),y)}function v(C,$){const H=n.sliceStream(C);if($&&H.push(null),C.previous=l,l&&(l.next=C),l=C,i.defineSkip(C.start),i.write(H),n.parser.lazy[C.start.line]){let x=i.events.length;for(;x--;)if(i.events[x][1].start.offset<a&&(!i.events[x][1].end||i.events[x][1].end.offset>a))return;const T=n.events.length;let _=T,R,ie;for(;_--;)if(n.events[_][0]==="exit"&&n.events[_][1].type==="chunkFlow"){if(R){ie=n.events[_][1].end;break}R=!0}for(w(r),x=T;x<n.events.length;)n.events[x][1].end=Object.assign({},ie),x++;Ae(n.events,_+1,0,n.events.slice(T)),n.events.length=x}}function w(C){let $=t.length;for(;$-- >C;){const H=t[$];n.containerState=H[1],H[0].exit.call(n,e)}t.length=C}function D(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Xi(e,n,t){return G(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Pt(e){if(e===null||pe(e)||$i(e))return 1;if(Ui(e))return 2}function Jn(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 Vn={name:"attention",tokenize:Ki,resolveAll:Qi};function Qi(e,n){let t=-1,r,i,l,a,o,c,u,d;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;c=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 h=Object.assign({},e[r][1].end),g=Object.assign({},e[t][1].start);It(h,-c),It(g,c),a={type:c>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},o={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[t][1].start),end:g},l={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[t][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},a.start),e[t][1].start=Object.assign({},o.end),u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=be(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=be(u,[["enter",i,n],["enter",a,n],["exit",a,n],["enter",l,n]]),u=be(u,Jn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=be(u,[["exit",l,n],["enter",o,n],["exit",o,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(d=2,u=be(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):d=0,Ae(e,r-1,t-r+3,u),t=r+u.length-d-2;break}}for(t=-1;++t<e.length;)e[t][1].type==="attentionSequence"&&(e[t][1].type="data");return e}function Ki(e,n){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Pt(r);let l;return a;function a(c){return l=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===l)return e.consume(c),o;const u=e.exit("attentionSequence"),d=Pt(c),h=!d||d===2&&i||t.includes(c),g=!i||i===2&&d||t.includes(r);return u._open=!!(l===42?h:h&&(i||!g)),u._close=!!(l===42?g:g&&(d||!h)),n(c)}}function It(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const Yi={name:"autolink",tokenize:Gi};function Gi(e,n,t){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(p){return Ee(p)?(e.consume(p),a):u(p)}function a(p){return p===43||p===45||p===46||ge(p)?(r=1,o(p)):u(p)}function o(p){return p===58?(e.consume(p),r=0,c):(p===43||p===45||p===46||ge(p))&&r++<32?(e.consume(p),o):(r=0,u(p))}function c(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):p===null||p===32||p===60||$n(p)?t(p):(e.consume(p),c)}function u(p){return p===64?(e.consume(p),d):Ri(p)?(e.consume(p),u):t(p)}function d(p){return ge(p)?h(p):t(p)}function h(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),n):g(p)}function g(p){if((p===45||ge(p))&&r++<63){const k=p===45?g:h;return e.consume(p),k}return t(p)}}const fn={tokenize:Ji,partial:!0};function Ji(e,n,t){return r;function r(l){return V(l)?G(e,i,"linePrefix")(l):i(l)}function i(l){return l===null||I(l)?n(l):t(l)}}const ur={name:"blockQuote",tokenize:Zi,continuation:{tokenize:el},exit:nl};function Zi(e,n,t){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),l}return t(a)}function l(a){return V(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(a))}}function el(e,n,t){const r=this;return i;function i(a){return V(a)?G(e,l,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):l(a)}function l(a){return e.attempt(ur,n,t)(a)}}function nl(e){e.exit("blockQuote")}const cr={name:"characterEscape",tokenize:tl};function tl(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 Mi(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):t(l)}}const Lt=document.createElement("i");function Zn(e){const n="&"+e+";";Lt.innerHTML=n;const t=Lt.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const hr={name:"characterReference",tokenize:rl};function rl(e,n,t){const r=this;let i=0,l,a;return o;function o(h){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),c}function c(h){return h===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(h),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),l=31,a=ge,d(h))}function u(h){return h===88||h===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(h),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,a=Bi,d):(e.enter("characterReferenceValue"),l=7,a=Hn,d(h))}function d(h){if(h===59&&i){const g=e.exit("characterReferenceValue");return a===ge&&!Zn(r.sliceSerialize(g))?t(h):(e.enter("characterReferenceMarker"),e.consume(h),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return a(h)&&i++<l?(e.consume(h),d):t(h)}}const Dt={tokenize:ll,partial:!0},Ot={name:"codeFenced",tokenize:il,concrete:!0};function il(e,n,t){const r=this,i={tokenize:H,partial:!0};let l=0,a=0,o;return c;function c(x){return u(x)}function u(x){const T=r.events[r.events.length-1];return l=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=x,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(x)}function d(x){return x===o?(a++,e.consume(x),d):a<3?t(x):(e.exit("codeFencedFenceSequence"),V(x)?G(e,h,"whitespace")(x):h(x))}function h(x){return x===null||I(x)?(e.exit("codeFencedFence"),r.interrupt?n(x):e.check(Dt,y,$)(x)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||I(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),h(x)):V(x)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),G(e,p,"whitespace")(x)):x===96&&x===o?t(x):(e.consume(x),g)}function p(x){return x===null||I(x)?h(x):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(x))}function k(x){return x===null||I(x)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),h(x)):x===96&&x===o?t(x):(e.consume(x),k)}function y(x){return e.attempt(i,$,v)(x)}function v(x){return e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),w}function w(x){return l>0&&V(x)?G(e,D,"linePrefix",l+1)(x):D(x)}function D(x){return x===null||I(x)?e.check(Dt,y,$)(x):(e.enter("codeFlowValue"),C(x))}function C(x){return x===null||I(x)?(e.exit("codeFlowValue"),D(x)):(e.consume(x),C)}function $(x){return e.exit("codeFenced"),n(x)}function H(x,T,_){let R=0;return ie;function ie(M){return x.enter("lineEnding"),x.consume(M),x.exit("lineEnding"),E}function E(M){return x.enter("codeFencedFence"),V(M)?G(x,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):A(M)}function A(M){return M===o?(x.enter("codeFencedFenceSequence"),X(M)):_(M)}function X(M){return M===o?(R++,x.consume(M),X):R>=a?(x.exit("codeFencedFenceSequence"),V(M)?G(x,ee,"whitespace")(M):ee(M)):_(M)}function ee(M){return M===null||I(M)?(x.exit("codeFencedFence"),T(M)):_(M)}}}function ll(e,n,t){const r=this;return i;function i(a){return a===null?t(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l)}function l(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}const On={name:"codeIndented",tokenize:sl},al={tokenize:ol,partial:!0};function sl(e,n,t){const r=this;return i;function i(u){return e.enter("codeIndented"),G(e,l,"linePrefix",5)(u)}function l(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):I(u)?e.attempt(al,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||I(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function ol(e,n,t){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?t(a):I(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):G(e,l,"linePrefix",5)(a)}function l(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):I(a)?i(a):t(a)}}const ul={name:"codeText",tokenize:pl,resolve:cl,previous:hl};function cl(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 hl(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pl(e,n,t){let r=0,i,l;return a;function a(h){return e.enter("codeText"),e.enter("codeTextSequence"),o(h)}function o(h){return h===96?(e.consume(h),r++,o):(e.exit("codeTextSequence"),c(h))}function c(h){return h===null?t(h):h===32?(e.enter("space"),e.consume(h),e.exit("space"),c):h===96?(l=e.enter("codeTextSequence"),i=0,d(h)):I(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(h))}function u(h){return h===null||h===32||h===96||I(h)?(e.exit("codeTextData"),c(h)):(e.consume(h),u)}function d(h){return h===96?(e.consume(h),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),n(h)):(l.type="codeTextData",u(h))}}function pr(e){const n={};let t=-1,r,i,l,a,o,c,u;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"&&(c=r[1]._tokenizer.events,l=0,l<c.length&&c[l][1].type==="lineEndingBlank"&&(l+=2),l<c.length&&c[l][1].type==="content"))for(;++l<c.length&&c[l][1].type!=="content";)c[l][1].type==="chunkText"&&(c[l][1]._isInFirstContentOfListItem=!0,l++);if(r[0]==="enter")r[1].contentType&&(Object.assign(n,dl(e,t)),t=n[t],u=!0);else if(r[1]._container){for(l=t,i=void 0;l--&&(a=e[l],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(e[i][1].type="lineEndingBlank"),a[1].type="lineEnding",i=l);i&&(r[1].end=Object.assign({},e[i][1].start),o=e.slice(i,t),o.unshift(r),Ae(e,i,t-i+1,o))}}return!u}function dl(e,n){const t=e[n][1],r=e[n][2];let i=n-1;const l=[],a=t._tokenizer||r.parser[t.contentType](t.start),o=a.events,c=[],u={};let d,h,g=-1,p=t,k=0,y=0;const v=[y];for(;p;){for(;e[++i][1]!==p;);l.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),h&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),h=p,p=p.next}for(p=t;++g<o.length;)o[g][0]==="exit"&&o[g-1][0]==="enter"&&o[g][1].type===o[g-1][1].type&&o[g][1].start.line!==o[g][1].end.line&&(y=g+1,v.push(y),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),g=v.length;g--;){const w=o.slice(v[g],v[g+1]),D=l.pop();c.unshift([D,D+w.length-1]),Ae(e,D,2,w)}for(g=-1;++g<c.length;)u[k+c[g][0]]=k+c[g][1],k+=c[g][1]-c[g][0]-1;return u}const fl={tokenize:xl,resolve:gl},ml={tokenize:yl,partial:!0};function gl(e){return pr(e),e}function xl(e,n){let t;return r;function r(o){return e.enter("content"),t=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?l(o):I(o)?e.check(ml,a,l)(o):(e.consume(o),i)}function l(o){return e.exit("chunkContent"),e.exit("content"),n(o)}function a(o){return e.consume(o),e.exit("chunkContent"),t.next=e.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function yl(e,n,t){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),G(e,l,"linePrefix")}function l(a){if(a===null||I(a))return t(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?n(a):e.interrupt(r.parser.constructs.flow,t,n)(a)}}function dr(e,n,t,r,i,l,a,o,c){const u=c||Number.POSITIVE_INFINITY;let d=0;return h;function h(w){return w===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(w),e.exit(l),g):w===null||w===32||w===41||$n(w)?t(w):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(w))}function g(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(o),g(w)):w===null||w===60||I(w)?t(w):(e.consume(w),w===92?k:p)}function k(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function y(w){return!d&&(w===null||w===41||pe(w))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(w)):d<u&&w===40?(e.consume(w),d++,y):w===41?(e.consume(w),d--,y):w===null||w===32||w===40||$n(w)?t(w):(e.consume(w),w===92?v:y)}function v(w){return w===40||w===41||w===92?(e.consume(w),y):y(w)}}function fr(e,n,t,r,i,l){const a=this;let o=0,c;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(l),d}function d(p){return o>999||p===null||p===91||p===93&&!c||p===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):I(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===null||p===91||p===93||I(p)||o++>999?(e.exit("chunkString"),d(p)):(e.consume(p),c||(c=!V(p)),p===92?g:h)}function g(p){return p===91||p===92||p===93?(e.consume(p),o++,h):h(p)}}function mr(e,n,t,r,i,l){let a;return o;function o(g){return g===34||g===39||g===40?(e.enter(r),e.enter(i),e.consume(g),e.exit(i),a=g===40?41:g,c):t(g)}function c(g){return g===a?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),n):(e.enter(l),u(g))}function u(g){return g===a?(e.exit(l),c(a)):g===null?t(g):I(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),G(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===a||g===null||I(g)?(e.exit("chunkString"),u(g)):(e.consume(g),g===92?h:d)}function h(g){return g===a||g===92?(e.consume(g),d):d(g)}}function en(e,n){let t;return r;function r(i){return I(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):V(i)?G(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}function qe(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const bl={name:"definition",tokenize:wl},kl={tokenize:Sl,partial:!0};function wl(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),a(p)}function a(p){return fr.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function o(p){return i=qe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),c):t(p)}function c(p){return pe(p)?en(e,u)(p):u(p)}function u(p){return dr(e,d,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(kl,h,h)(p)}function h(p){return V(p)?G(e,g,"whitespace")(p):g(p)}function g(p){return p===null||I(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Sl(e,n,t){return r;function r(o){return pe(o)?en(e,i)(o):t(o)}function i(o){return mr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function l(o){return V(o)?G(e,a,"whitespace")(o):a(o)}function a(o){return o===null||I(o)?n(o):t(o)}}const jl={name:"hardBreakEscape",tokenize:vl};function vl(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return I(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const Nl={name:"headingAtx",tokenize:El,resolve:Cl};function Cl(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"},Ae(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function El(e,n,t){let r=0;return i;function i(d){return e.enter("atxHeading"),l(d)}function l(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||pe(d)?(e.exit("atxHeadingSequence"),o(d)):t(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),c(d)):d===null||I(d)?(e.exit("atxHeading"),n(d)):V(d)?G(e,o,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function c(d){return d===35?(e.consume(d),c):(e.exit("atxHeadingSequence"),o(d))}function u(d){return d===null||d===35||pe(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),u)}}const Al=["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"],zt=["pre","script","style","textarea"],Fl={name:"htmlFlow",tokenize:Ll,resolveTo:Il,concrete:!0},Tl={tokenize:Ol,partial:!0},Pl={tokenize:Dl,partial:!0};function Il(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 Ll(e,n,t){const r=this;let i,l,a,o,c;return u;function u(m){return d(m)}function d(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),h}function h(m){return m===33?(e.consume(m),g):m===47?(e.consume(m),l=!0,y):m===63?(e.consume(m),i=3,r.interrupt?n:f):Ee(m)?(e.consume(m),a=String.fromCharCode(m),v):t(m)}function g(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,o=0,k):Ee(m)?(e.consume(m),i=4,r.interrupt?n:f):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:f):t(m)}function k(m){const fe="CDATA[";return m===fe.charCodeAt(o++)?(e.consume(m),o===fe.length?r.interrupt?n:A:k):t(m)}function y(m){return Ee(m)?(e.consume(m),a=String.fromCharCode(m),v):t(m)}function v(m){if(m===null||m===47||m===62||pe(m)){const fe=m===47,ye=a.toLowerCase();return!fe&&!l&&zt.includes(ye)?(i=1,r.interrupt?n(m):A(m)):Al.includes(a.toLowerCase())?(i=6,fe?(e.consume(m),w):r.interrupt?n(m):A(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?D(m):C(m))}return m===45||ge(m)?(e.consume(m),a+=String.fromCharCode(m),v):t(m)}function w(m){return m===62?(e.consume(m),r.interrupt?n:A):t(m)}function D(m){return V(m)?(e.consume(m),D):ie(m)}function C(m){return m===47?(e.consume(m),ie):m===58||m===95||Ee(m)?(e.consume(m),$):V(m)?(e.consume(m),C):ie(m)}function $(m){return m===45||m===46||m===58||m===95||ge(m)?(e.consume(m),$):H(m)}function H(m){return m===61?(e.consume(m),x):V(m)?(e.consume(m),H):C(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),c=m,T):V(m)?(e.consume(m),x):_(m)}function T(m){return m===c?(e.consume(m),c=null,R):m===null||I(m)?t(m):(e.consume(m),T)}function _(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||pe(m)?H(m):(e.consume(m),_)}function R(m){return m===47||m===62||V(m)?C(m):t(m)}function ie(m){return m===62?(e.consume(m),E):t(m)}function E(m){return m===null||I(m)?A(m):V(m)?(e.consume(m),E):t(m)}function A(m){return m===45&&i===2?(e.consume(m),oe):m===60&&i===1?(e.consume(m),ne):m===62&&i===4?(e.consume(m),ue):m===63&&i===3?(e.consume(m),f):m===93&&i===5?(e.consume(m),ae):I(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Tl,xe,X)(m)):m===null||I(m)?(e.exit("htmlFlowData"),X(m)):(e.consume(m),A)}function X(m){return e.check(Pl,ee,xe)(m)}function ee(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),M}function M(m){return m===null||I(m)?X(m):(e.enter("htmlFlowData"),A(m))}function oe(m){return m===45?(e.consume(m),f):A(m)}function ne(m){return m===47?(e.consume(m),a="",de):A(m)}function de(m){if(m===62){const fe=a.toLowerCase();return zt.includes(fe)?(e.consume(m),ue):A(m)}return Ee(m)&&a.length<8?(e.consume(m),a+=String.fromCharCode(m),de):A(m)}function ae(m){return m===93?(e.consume(m),f):A(m)}function f(m){return m===62?(e.consume(m),ue):m===45&&i===2?(e.consume(m),f):A(m)}function ue(m){return m===null||I(m)?(e.exit("htmlFlowData"),xe(m)):(e.consume(m),ue)}function xe(m){return e.exit("htmlFlow"),n(m)}}function Dl(e,n,t){const r=this;return i;function i(a){return I(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),l):t(a)}function l(a){return r.parser.lazy[r.now().line]?t(a):n(a)}}function Ol(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(fn,n,t)}}const zl={name:"htmlText",tokenize:_l};function _l(e,n,t){const r=this;let i,l,a;return o;function o(f){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(f),c}function c(f){return f===33?(e.consume(f),u):f===47?(e.consume(f),H):f===63?(e.consume(f),C):Ee(f)?(e.consume(f),_):t(f)}function u(f){return f===45?(e.consume(f),d):f===91?(e.consume(f),l=0,k):Ee(f)?(e.consume(f),D):t(f)}function d(f){return f===45?(e.consume(f),p):t(f)}function h(f){return f===null?t(f):f===45?(e.consume(f),g):I(f)?(a=h,ne(f)):(e.consume(f),h)}function g(f){return f===45?(e.consume(f),p):h(f)}function p(f){return f===62?oe(f):f===45?g(f):h(f)}function k(f){const ue="CDATA[";return f===ue.charCodeAt(l++)?(e.consume(f),l===ue.length?y:k):t(f)}function y(f){return f===null?t(f):f===93?(e.consume(f),v):I(f)?(a=y,ne(f)):(e.consume(f),y)}function v(f){return f===93?(e.consume(f),w):y(f)}function w(f){return f===62?oe(f):f===93?(e.consume(f),w):y(f)}function D(f){return f===null||f===62?oe(f):I(f)?(a=D,ne(f)):(e.consume(f),D)}function C(f){return f===null?t(f):f===63?(e.consume(f),$):I(f)?(a=C,ne(f)):(e.consume(f),C)}function $(f){return f===62?oe(f):C(f)}function H(f){return Ee(f)?(e.consume(f),x):t(f)}function x(f){return f===45||ge(f)?(e.consume(f),x):T(f)}function T(f){return I(f)?(a=T,ne(f)):V(f)?(e.consume(f),T):oe(f)}function _(f){return f===45||ge(f)?(e.consume(f),_):f===47||f===62||pe(f)?R(f):t(f)}function R(f){return f===47?(e.consume(f),oe):f===58||f===95||Ee(f)?(e.consume(f),ie):I(f)?(a=R,ne(f)):V(f)?(e.consume(f),R):oe(f)}function ie(f){return f===45||f===46||f===58||f===95||ge(f)?(e.consume(f),ie):E(f)}function E(f){return f===61?(e.consume(f),A):I(f)?(a=E,ne(f)):V(f)?(e.consume(f),E):R(f)}function A(f){return f===null||f===60||f===61||f===62||f===96?t(f):f===34||f===39?(e.consume(f),i=f,X):I(f)?(a=A,ne(f)):V(f)?(e.consume(f),A):(e.consume(f),ee)}function X(f){return f===i?(e.consume(f),i=void 0,M):f===null?t(f):I(f)?(a=X,ne(f)):(e.consume(f),X)}function ee(f){return f===null||f===34||f===39||f===60||f===61||f===96?t(f):f===47||f===62||pe(f)?R(f):(e.consume(f),ee)}function M(f){return f===47||f===62||pe(f)?R(f):t(f)}function oe(f){return f===62?(e.consume(f),e.exit("htmlTextData"),e.exit("htmlText"),n):t(f)}function ne(f){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),de}function de(f){return V(f)?G(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):ae(f)}function ae(f){return e.enter("htmlTextData"),a(f)}}const et={name:"labelEnd",tokenize:Hl,resolveTo:$l,resolveAll:Ul},Rl={tokenize:Vl},Bl={tokenize:ql},Ml={tokenize:Wl};function Ul(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 $l(e,n){let t=e.length,r=0,i,l,a,o;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(a){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"&&(a=t);const c={type:e[l][1].type==="labelLink"?"link":"image",start:Object.assign({},e[l][1].start),end:Object.assign({},e[e.length-1][1].end)},u={type:"label",start:Object.assign({},e[l][1].start),end:Object.assign({},e[a][1].end)},d={type:"labelText",start:Object.assign({},e[l+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return o=[["enter",c,n],["enter",u,n]],o=be(o,e.slice(l+1,l+r+3)),o=be(o,[["enter",d,n]]),o=be(o,Jn(n.parser.constructs.insideSpan.null,e.slice(l+r+4,a-3),n)),o=be(o,[["exit",d,n],e[a-2],e[a-1],["exit",u,n]]),o=be(o,e.slice(a+1)),o=be(o,[["exit",c,n]]),Ae(e,l,e.length,o),e}function Hl(e,n,t){const r=this;let i=r.events.length,l,a;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 o;function o(g){return l?l._inactive?h(g):(a=r.parser.defined.includes(qe(r.sliceSerialize({start:l.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),c):t(g)}function c(g){return g===40?e.attempt(Rl,d,a?d:h)(g):g===91?e.attempt(Bl,d,a?u:h)(g):a?d(g):h(g)}function u(g){return e.attempt(Ml,d,h)(g)}function d(g){return n(g)}function h(g){return l._balanced=!0,t(g)}}function Vl(e,n,t){return r;function r(h){return e.enter("resource"),e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),i}function i(h){return pe(h)?en(e,l)(h):l(h)}function l(h){return h===41?d(h):dr(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(h)}function a(h){return pe(h)?en(e,c)(h):d(h)}function o(h){return t(h)}function c(h){return h===34||h===39||h===40?mr(e,u,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(h):d(h)}function u(h){return pe(h)?en(e,d)(h):d(h)}function d(h){return h===41?(e.enter("resourceMarker"),e.consume(h),e.exit("resourceMarker"),e.exit("resource"),n):t(h)}}function ql(e,n,t){const r=this;return i;function i(o){return fr.call(r,e,l,a,"reference","referenceMarker","referenceString")(o)}function l(o){return r.parser.defined.includes(qe(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?n(o):t(o)}function a(o){return t(o)}}function Wl(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 Xl={name:"labelStartImage",tokenize:Ql,resolveAll:et.resolveAll};function Ql(e,n,t){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),l}function l(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):t(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):n(o)}}const Kl={name:"labelStartLink",tokenize:Yl,resolveAll:et.resolveAll};function Yl(e,n,t){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),l}function l(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(a):n(a)}}const zn={name:"lineEnding",tokenize:Gl};function Gl(e,n){return t;function t(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),G(e,n,"linePrefix")}}const hn={name:"thematicBreak",tokenize:Jl};function Jl(e,n,t){let r=0,i;return l;function l(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||I(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===i?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),V(u)?G(e,o,"whitespace")(u):o(u))}}const he={name:"list",tokenize:na,continuation:{tokenize:ta},exit:ia},Zl={tokenize:la,partial:!0},ea={tokenize:ra,partial:!0};function na(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,a=0;return o;function o(p){const k=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:Hn(p)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(hn,t,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(p)}return t(p)}function c(p){return Hn(p)&&++a<10?(e.consume(p),c):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):t(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(fn,r.interrupt?t:d,e.attempt(Zl,g,h))}function d(p){return r.containerState.initialBlankLine=!0,l++,g(p)}function h(p){return V(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),g):t(p)}function g(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function ta(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(fn,i,l);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,G(e,n,"listItemIndent",r.containerState.size+1)(o)}function l(o){return r.containerState.furtherBlankLines||!V(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(ea,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,G(e,e.attempt(he,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function ra(e,n,t){const r=this;return G(e,i,"listItemIndent",r.containerState.size+1);function i(l){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?n(l):t(l)}}function ia(e){e.exit(this.containerState.type)}function la(e,n,t){const r=this;return G(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const a=r.events[r.events.length-1];return!V(l)&&a&&a[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const _t={name:"setextUnderline",tokenize:sa,resolveTo:aa};function aa(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 a={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",a,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end=Object.assign({},e[l][1].end)):e[r][1]=a,e.push(["exit",a,n]),e}function sa(e,n,t){const r=this;let i;return l;function l(u){let d=r.events.length,h;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){h=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||h)?(e.enter("setextHeadingLine"),i=u,a(u)):t(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),V(u)?G(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||I(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const oa={tokenize:ua};function ua(e){const n=this,t=e.attempt(fn,r,e.attempt(this.parser.constructs.flowInitial,i,G(e,e.attempt(this.parser.constructs.flow,i,e.attempt(fl,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 ca={resolveAll:xr()},ha=gr("string"),pa=gr("text");function gr(e){return{tokenize:n,resolveAll:xr(e==="text"?da:void 0)};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,a,o);return a;function a(d){return u(d)?l(d):o(d)}function o(d){if(d===null){t.consume(d);return}return t.enter("data"),t.consume(d),c}function c(d){return u(d)?(t.exit("data"),l(d)):(t.consume(d),c)}function u(d){if(d===null)return!0;const h=i[d];let g=-1;if(h)for(;++g<h.length;){const p=h[g];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function xr(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 da(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,a=-1,o=0,c;for(;l--;){const u=i[l];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){l++;break}}if(o){const u={type:t===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+l,_bufferIndex:l?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},u.start),r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(t,0,["enter",u,n],["exit",u,n]),t+=2)}t++}return e}function fa(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 a=[],o=[];const c={consume:D,enter:C,exit:$,attempt:T(H),check:T(x),interrupt:T(x,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:g,now:k,defineSkip:y,write:h};let d=n.tokenize.call(u,c);return n.resolveAll&&l.push(n),u;function h(E){return a=be(a,E),v(),a[a.length-1]!==null?[]:(_(n,0),u.events=Jn(l,u.events,u),u.events)}function g(E,A){return ga(p(E),A)}function p(E){return ma(a,E)}function k(){const{line:E,column:A,offset:X,_index:ee,_bufferIndex:M}=r;return{line:E,column:A,offset:X,_index:ee,_bufferIndex:M}}function y(E){i[E.line]=E.column,ie()}function v(){let E;for(;r._index<a.length;){const A=a[r._index];if(typeof A=="string")for(E=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===E&&r._bufferIndex<A.length;)w(A.charCodeAt(r._bufferIndex));else w(A)}}function w(E){d=d(E)}function D(E){I(E)?(r.line++,r.column=1,r.offset+=E===-3?2:1,ie()):E!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=E}function C(E,A){const X=A||{};return X.type=E,X.start=k(),u.events.push(["enter",X,u]),o.push(X),X}function $(E){const A=o.pop();return A.end=k(),u.events.push(["exit",A,u]),A}function H(E,A){_(E,A.from)}function x(E,A){A.restore()}function T(E,A){return X;function X(ee,M,oe){let ne,de,ae,f;return Array.isArray(ee)?xe(ee):"tokenize"in ee?xe([ee]):ue(ee);function ue(se){return J;function J(z){const Fe=z!==null&&se[z],Te=z!==null&&se.null,Ne=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return xe(Ne)(z)}}function xe(se){return ne=se,de=0,se.length===0?oe:m(se[de])}function m(se){return J;function J(z){return f=R(),ae=se,se.partial||(u.currentConstruct=se),se.name&&u.parser.constructs.disable.null.includes(se.name)?ye():se.tokenize.call(A?Object.assign(Object.create(u),A):u,c,fe,ye)(z)}}function fe(se){return E(ae,f),M}function ye(se){return f.restore(),++de<ne.length?m(ne[de]):oe}}}function _(E,A){E.resolveAll&&!l.includes(E)&&l.push(E),E.resolve&&Ae(u.events,A,u.events.length-A,E.resolve(u.events.slice(A),u)),E.resolveTo&&(u.events=E.resolveTo(u.events,u))}function R(){const E=k(),A=u.previous,X=u.currentConstruct,ee=u.events.length,M=Array.from(o);return{restore:oe,from:ee};function oe(){r=E,u.previous=A,u.currentConstruct=X,u.events.length=ee,o=M,ie()}}function ie(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ma(e,n){const t=n.start._index,r=n.start._bufferIndex,i=n.end._index,l=n.end._bufferIndex;let a;if(t===i)a=[e[t].slice(r,l)];else{if(a=e.slice(t,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}l>0&&a.push(e[i].slice(0,l))}return a}function ga(e,n){let t=-1;const r=[];let i;for(;++t<e.length;){const l=e[t];let a;if(typeof l=="string")a=l;else switch(l){case-5:{a="\r";break}case-4:{a=`
|
|
42
|
+
`;break}case-3:{a=`\r
|
|
43
|
+
`;break}case-2:{a=n?" ":" ";break}case-1:{if(!n&&i)continue;a=" ";break}default:a=String.fromCharCode(l)}i=l===-2,r.push(a)}return r.join("")}const xa={42:he,43:he,45:he,48:he,49:he,50:he,51:he,52:he,53:he,54:he,55:he,56:he,57:he,62:ur},ya={91:bl},ba={[-2]:On,[-1]:On,32:On},ka={35:Nl,42:hn,45:[_t,hn],60:Fl,61:_t,95:hn,96:Ot,126:Ot},wa={38:hr,92:cr},Sa={[-5]:zn,[-4]:zn,[-3]:zn,33:Xl,38:hr,42:Vn,60:[Yi,zl],91:Kl,92:[jl,cr],93:et,95:Vn,96:ul},ja={null:[Vn,ca]},va={null:[42,95]},Na={null:[]},Ca=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:va,contentInitial:ya,disable:Na,document:xa,flow:ka,flowInitial:ba,insideSpan:ja,string:wa,text:Sa},Symbol.toStringTag,{value:"Module"}));function Ea(e){const t=Di([Ca,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:t,content:i(Hi),document:i(qi),flow:i(oa),string:i(ha),text:i(pa)};return r;function i(l){return a;function a(o){return fa(r,l,o)}}}const Rt=/[\0\t\n\r]/g;function Aa(){let e=1,n="",t=!0,r;return i;function i(l,a,o){const c=[];let u,d,h,g,p;for(l=n+l.toString(a),h=0,n="",t&&(l.charCodeAt(0)===65279&&h++,t=void 0);h<l.length;){if(Rt.lastIndex=h,u=Rt.exec(l),g=u&&u.index!==void 0?u.index:l.length,p=l.charCodeAt(g),!u){n=l.slice(h);break}if(p===10&&h===g&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),h<g&&(c.push(l.slice(h,g)),e+=g-h),p){case 0:{c.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,c.push(-2);e++<d;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}h=g+1}return o&&(r&&c.push(-5),n&&c.push(n),c.push(null)),c}}function Fa(e){for(;!pr(e););return e}function yr(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 Ta=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Pa(e){return e.replace(Ta,Ia)}function Ia(e,n,t){if(n)return n;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),l=i===120||i===88;return yr(t.slice(l?2:1),l?16:10)}return Zn(t)||e}const br={}.hasOwnProperty,La=function(e,n,t){return typeof n!="string"&&(t=n,n=void 0),Da(t)(Fa(Ea(t).document().write(Aa()(e,n,!0))))};function Da(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(te),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(sn),blockQuote:o(Ne),characterEscape:E,characterReference:E,codeFenced:o(an),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(an,c),codeText:o(Ke,c),codeTextData:E,data:E,codeFlowValue:E,definition:o(Cn),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(En),hardBreakEscape:o(N),hardBreakTrailing:o(N),htmlFlow:o(B,c),htmlFlowData:E,htmlText:o(B,c),htmlTextData:E,image:o(Q),label:c,link:o(te),listItem:o(Pe),listItemValue:k,listOrdered:o(Oe,p),listUnordered:o(Oe),paragraph:o($e),reference:ye,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(sn),strong:o(He),thematicBreak:o(Z)},exit:{atxHeading:d(),atxHeadingSequence:T,autolink:d(),autolinkEmail:Te,autolinkProtocol:Fe,blockQuote:d(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:J,characterReferenceMarkerNumeric:J,characterReferenceValue:z,codeFenced:d(D),codeFencedFence:w,codeFencedFenceInfo:y,codeFencedFenceMeta:v,codeFlowValue:A,codeIndented:d(C),codeText:d(ne),codeTextData:A,data:A,definition:d(),definitionDestinationString:x,definitionLabelString:$,definitionTitleString:H,emphasis:d(),hardBreakEscape:d(ee),hardBreakTrailing:d(ee),htmlFlow:d(M),htmlFlowData:A,htmlText:d(oe),htmlTextData:A,image:d(ae),label:ue,labelText:f,lineEnding:X,link:d(de),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:se,resourceDestinationString:xe,resourceTitleString:m,resource:fe,setextHeading:d(ie),setextHeadingLineSequence:R,setextHeadingText:_,strong:d(),thematicBreak:d()}};kr(n,(e||{}).mdastExtensions||[]);const t={};return r;function r(b){let j={type:"root",children:[]};const P={stack:[j],tokenStack:[],config:n,enter:u,exit:h,buffer:c,resume:g,setData:l,getData:a},W=[];let K=-1;for(;++K<b.length;)if(b[K][1].type==="listOrdered"||b[K][1].type==="listUnordered")if(b[K][0]==="enter")W.push(K);else{const je=W.pop();K=i(b,je,K)}for(K=-1;++K<b.length;){const je=n[b[K][0]];br.call(je,b[K][1].type)&&je[b[K][1].type].call(Object.assign({sliceSerialize:b[K][2].sliceSerialize},P),b[K][1])}if(P.tokenStack.length>0){const je=P.tokenStack[P.tokenStack.length-1];(je[1]||Bt).call(P,void 0,je[0])}for(j.position={start:_e(b.length>0?b[0][1].start:{line:1,column:1,offset:0}),end:_e(b.length>0?b[b.length-2][1].end:{line:1,column:1,offset:0})},K=-1;++K<n.transforms.length;)j=n.transforms[K](j)||j;return j}function i(b,j,P){let W=j-1,K=-1,je=!1,ze,Ie,Ye,Ge;for(;++W<=P;){const re=b[W];if(re[1].type==="listUnordered"||re[1].type==="listOrdered"||re[1].type==="blockQuote"?(re[0]==="enter"?K++:K--,Ge=void 0):re[1].type==="lineEndingBlank"?re[0]==="enter"&&(ze&&!Ge&&!K&&!Ye&&(Ye=W),Ge=void 0):re[1].type==="linePrefix"||re[1].type==="listItemValue"||re[1].type==="listItemMarker"||re[1].type==="listItemPrefix"||re[1].type==="listItemPrefixWhitespace"||(Ge=void 0),!K&&re[0]==="enter"&&re[1].type==="listItemPrefix"||K===-1&&re[0]==="exit"&&(re[1].type==="listUnordered"||re[1].type==="listOrdered")){if(ze){let An=W;for(Ie=void 0;An--;){const Le=b[An];if(Le[1].type==="lineEnding"||Le[1].type==="lineEndingBlank"){if(Le[0]==="exit")continue;Ie&&(b[Ie][1].type="lineEndingBlank",je=!0),Le[1].type="lineEnding",Ie=An}else if(!(Le[1].type==="linePrefix"||Le[1].type==="blockQuotePrefix"||Le[1].type==="blockQuotePrefixWhitespace"||Le[1].type==="blockQuoteMarker"||Le[1].type==="listItemIndent"))break}Ye&&(!Ie||Ye<Ie)&&(ze._spread=!0),ze.end=Object.assign({},Ie?b[Ie][1].start:re[1].end),b.splice(Ie||W,0,["exit",ze,re[2]]),W++,P++}re[1].type==="listItemPrefix"&&(ze={type:"listItem",_spread:!1,start:Object.assign({},re[1].start),end:void 0},b.splice(W,0,["enter",ze,re[2]]),W++,P++,Ye=void 0,Ge=!0)}}return b[j][1]._spread=je,P}function l(b,j){t[b]=j}function a(b){return t[b]}function o(b,j){return P;function P(W){u.call(this,b(W),W),j&&j.call(this,W)}}function c(){this.stack.push({type:"fragment",children:[]})}function u(b,j,P){return this.stack[this.stack.length-1].children.push(b),this.stack.push(b),this.tokenStack.push([j,P]),b.position={start:_e(j.start)},b}function d(b){return j;function j(P){b&&b.call(this,P),h.call(this,P)}}function h(b,j){const P=this.stack.pop(),W=this.tokenStack.pop();if(W)W[0].type!==b.type&&(j?j.call(this,b,W[0]):(W[1]||Bt).call(this,b,W[0]));else throw new Error("Cannot close `"+b.type+"` ("+Ze({start:b.start,end:b.end})+"): it’s not open");return P.position.end=_e(b.end),P}function g(){return Ii(this.stack.pop())}function p(){l("expectingFirstListItemValue",!0)}function k(b){if(a("expectingFirstListItemValue")){const j=this.stack[this.stack.length-2];j.start=Number.parseInt(this.sliceSerialize(b),10),l("expectingFirstListItemValue")}}function y(){const b=this.resume(),j=this.stack[this.stack.length-1];j.lang=b}function v(){const b=this.resume(),j=this.stack[this.stack.length-1];j.meta=b}function w(){a("flowCodeInside")||(this.buffer(),l("flowCodeInside",!0))}function D(){const b=this.resume(),j=this.stack[this.stack.length-1];j.value=b.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),l("flowCodeInside")}function C(){const b=this.resume(),j=this.stack[this.stack.length-1];j.value=b.replace(/(\r?\n|\r)$/g,"")}function $(b){const j=this.resume(),P=this.stack[this.stack.length-1];P.label=j,P.identifier=qe(this.sliceSerialize(b)).toLowerCase()}function H(){const b=this.resume(),j=this.stack[this.stack.length-1];j.title=b}function x(){const b=this.resume(),j=this.stack[this.stack.length-1];j.url=b}function T(b){const j=this.stack[this.stack.length-1];if(!j.depth){const P=this.sliceSerialize(b).length;j.depth=P}}function _(){l("setextHeadingSlurpLineEnding",!0)}function R(b){const j=this.stack[this.stack.length-1];j.depth=this.sliceSerialize(b).charCodeAt(0)===61?1:2}function ie(){l("setextHeadingSlurpLineEnding")}function E(b){const j=this.stack[this.stack.length-1];let P=j.children[j.children.length-1];(!P||P.type!=="text")&&(P=F(),P.position={start:_e(b.start)},j.children.push(P)),this.stack.push(P)}function A(b){const j=this.stack.pop();j.value+=this.sliceSerialize(b),j.position.end=_e(b.end)}function X(b){const j=this.stack[this.stack.length-1];if(a("atHardBreak")){const P=j.children[j.children.length-1];P.position.end=_e(b.end),l("atHardBreak");return}!a("setextHeadingSlurpLineEnding")&&n.canContainEols.includes(j.type)&&(E.call(this,b),A.call(this,b))}function ee(){l("atHardBreak",!0)}function M(){const b=this.resume(),j=this.stack[this.stack.length-1];j.value=b}function oe(){const b=this.resume(),j=this.stack[this.stack.length-1];j.value=b}function ne(){const b=this.resume(),j=this.stack[this.stack.length-1];j.value=b}function de(){const b=this.stack[this.stack.length-1];if(a("inReference")){const j=a("referenceType")||"shortcut";b.type+="Reference",b.referenceType=j,delete b.url,delete b.title}else delete b.identifier,delete b.label;l("referenceType")}function ae(){const b=this.stack[this.stack.length-1];if(a("inReference")){const j=a("referenceType")||"shortcut";b.type+="Reference",b.referenceType=j,delete b.url,delete b.title}else delete b.identifier,delete b.label;l("referenceType")}function f(b){const j=this.sliceSerialize(b),P=this.stack[this.stack.length-2];P.label=Pa(j),P.identifier=qe(j).toLowerCase()}function ue(){const b=this.stack[this.stack.length-1],j=this.resume(),P=this.stack[this.stack.length-1];if(l("inReference",!0),P.type==="link"){const W=b.children;P.children=W}else P.alt=j}function xe(){const b=this.resume(),j=this.stack[this.stack.length-1];j.url=b}function m(){const b=this.resume(),j=this.stack[this.stack.length-1];j.title=b}function fe(){l("inReference")}function ye(){l("referenceType","collapsed")}function se(b){const j=this.resume(),P=this.stack[this.stack.length-1];P.label=j,P.identifier=qe(this.sliceSerialize(b)).toLowerCase(),l("referenceType","full")}function J(b){l("characterReferenceType",b.type)}function z(b){const j=this.sliceSerialize(b),P=a("characterReferenceType");let W;P?(W=yr(j,P==="characterReferenceMarkerNumeric"?10:16),l("characterReferenceType")):W=Zn(j);const K=this.stack.pop();K.value+=W,K.position.end=_e(b.end)}function Fe(b){A.call(this,b);const j=this.stack[this.stack.length-1];j.url=this.sliceSerialize(b)}function Te(b){A.call(this,b);const j=this.stack[this.stack.length-1];j.url="mailto:"+this.sliceSerialize(b)}function Ne(){return{type:"blockquote",children:[]}}function an(){return{type:"code",lang:null,meta:null,value:""}}function Ke(){return{type:"inlineCode",value:""}}function Cn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function En(){return{type:"emphasis",children:[]}}function sn(){return{type:"heading",depth:void 0,children:[]}}function N(){return{type:"break"}}function B(){return{type:"html",value:""}}function Q(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function Oe(b){return{type:"list",ordered:b.type==="listOrdered",start:null,spread:b._spread,children:[]}}function Pe(b){return{type:"listItem",spread:b._spread,checked:null,children:[]}}function $e(){return{type:"paragraph",children:[]}}function He(){return{type:"strong",children:[]}}function F(){return{type:"text",value:""}}function Z(){return{type:"thematicBreak"}}}function _e(e){return{line:e.line,column:e.column,offset:e.offset}}function kr(e,n){let t=-1;for(;++t<n.length;){const r=n[t];Array.isArray(r)?kr(e,r):Oa(e,r)}}function Oa(e,n){let t;for(t in n)if(br.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 Bt(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Ze({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Ze({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Ze({start:n.start,end:n.end})+") is still open")}function za(e){Object.assign(this,{Parser:t=>{const r=this.data("settings");return La(t,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function _a(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 Ra(e,n){const t={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,t),[e.applyData(n,t),{type:"text",value:`
|
|
44
|
+
`}]}function Ba(e,n){const t=n.value?n.value+`
|
|
45
|
+
`:"",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 Ma(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Ua(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function Xe(e){const n=[];let t=-1,r=0,i=0;for(;++t<e.length;){const l=e.charCodeAt(t);let a="";if(l===37&&ge(e.charCodeAt(t+1))&&ge(e.charCodeAt(t+2)))i=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(a=String.fromCharCode(l));else if(l>55295&&l<57344){const o=e.charCodeAt(t+1);l<56320&&o>56319&&o<57344?(a=String.fromCharCode(l,o),i=1):a="�"}else a=String.fromCharCode(l);a&&(n.push(e.slice(r,t),encodeURIComponent(a)),r=t+i+1,a=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function wr(e,n){const t=String(n.identifier).toUpperCase(),r=Xe(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 a=e.footnoteCounts[t],o={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(n,o);const c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(n,c),e.applyData(n,c)}function $a(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},wr(e,{type:"footnoteReference",identifier:i,position:n.position})}function Ha(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 Va(e,n){if(e.dangerous){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}return null}function Sr(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 a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function qa(e,n){const t=e.definition(n.identifier);if(!t)return Sr(e,n);const r={src:Xe(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 Wa(e,n){const t={src:Xe(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 Xa(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 Qa(e,n){const t=e.definition(n.identifier);if(!t)return Sr(e,n);const r={href:Xe(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 Ka(e,n){const t={href:Xe(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 Ya(e,n,t){const r=e.all(n),i=t?Ga(t):jr(n),l={},a=[];if(typeof n.checked=="boolean"){const d=r[0];let h;d&&d.type==="element"&&d.tagName==="p"?h=d:(h={type:"element",tagName:"p",properties:{},children:[]},r.unshift(h)),h.children.length>0&&h.children.unshift({type:"text",value:" "}),h.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const d=r[o];(i||o!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
|
|
46
|
+
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
47
|
+
`});const u={type:"element",tagName:"li",properties:l,children:a};return e.patch(n,u),e.applyData(n,u)}function Ga(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=jr(t[r])}return n}function jr(e){const n=e.spread;return n??e.children.length>1}function Ja(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 a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.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 Za(e,n){const t={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function es(e,n){const t={type:"root",children:e.wrap(e.all(n))};return e.patch(n,t),e.applyData(n,t)}function ns(e,n){const t={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const nt=vr("start"),tt=vr("end");function ts(e){return{start:nt(e),end:tt(e)}}function vr(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 rs(e,n){const t=e.all(n),r=t.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(n.children[0],a),i.push(a)}if(t.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(t,!0)},o=nt(n.children[1]),c=tt(n.children[n.children.length-1]);o.line&&c.line&&(a.position={start:o,end:c}),i.push(a)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(n,l),e.applyData(n,l)}function is(e,n,t){const r=t?t.children:void 0,l=(r?r.indexOf(n):1)===0?"th":"td",a=t&&t.type==="table"?t.align:void 0,o=a?a.length:n.children.length;let c=-1;const u=[];for(;++c<o;){const h=n.children[c],g={},p=a?a[c]:void 0;p&&(g.align=p);let k={type:"element",tagName:l,properties:g,children:[]};h&&(k.children=e.all(h),e.patch(h,k),k=e.applyData(n,k)),u.push(k)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(n,d),e.applyData(n,d)}function ls(e,n){const t={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}const Mt=9,Ut=32;function as(e){const n=String(e),t=/\r?\n|\r/g;let r=t.exec(n),i=0;const l=[];for(;r;)l.push($t(n.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(n);return l.push($t(n.slice(i),i>0,!1)),l.join("")}function $t(e,n,t){let r=0,i=e.length;if(n){let l=e.codePointAt(r);for(;l===Mt||l===Ut;)r++,l=e.codePointAt(r)}if(t){let l=e.codePointAt(i-1);for(;l===Mt||l===Ut;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function ss(e,n){const t={type:"text",value:as(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function os(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const us={blockquote:_a,break:Ra,code:Ba,delete:Ma,emphasis:Ua,footnoteReference:wr,footnote:$a,heading:Ha,html:Va,imageReference:qa,image:Wa,inlineCode:Xa,linkReference:Qa,link:Ka,listItem:Ya,list:Ja,paragraph:Za,root:es,strong:ns,table:rs,tableCell:ls,tableRow:is,text:ss,thematicBreak:os,toml:on,yaml:on,definition:on,footnoteDefinition:on};function on(){return null}const Nr=function(e){if(e==null)return ds;if(typeof e=="string")return ps(e);if(typeof e=="object")return Array.isArray(e)?cs(e):hs(e);if(typeof e=="function")return mn(e);throw new Error("Expected function, string, or object as test")};function cs(e){const n=[];let t=-1;for(;++t<e.length;)n[t]=Nr(e[t]);return mn(r);function r(...i){let l=-1;for(;++l<n.length;)if(n[l].call(this,...i))return!0;return!1}}function hs(e){return mn(n);function n(t){let r;for(r in e)if(t[r]!==e[r])return!1;return!0}}function ps(e){return mn(n);function n(t){return t&&t.type===e}}function mn(e){return n;function n(t,...r){return!!(t&&typeof t=="object"&&"type"in t&&e.call(this,t,...r))}}function ds(){return!0}const fs=!0,Ht=!1,ms="skip",gs=function(e,n,t,r){typeof n=="function"&&typeof t!="function"&&(r=t,t=n,n=null);const i=Nr(n),l=r?-1:1;a(e,void 0,[])();function a(o,c,u){const d=o&&typeof o=="object"?o:{};if(typeof d.type=="string"){const g=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(o.type+(g?"<"+g+">":""))+")"})}return h;function h(){let g=[],p,k,y;if((!n||i(o,c,u[u.length-1]||null))&&(g=xs(t(o,u)),g[0]===Ht))return g;if(o.children&&g[0]!==ms)for(k=(r?o.children.length:-1)+l,y=u.concat(o);k>-1&&k<o.children.length;){if(p=a(o.children[k],k,y)(),p[0]===Ht)return p;k=typeof p[1]=="number"?p[1]:k+l}return g}}};function xs(e){return Array.isArray(e)?e:typeof e=="number"?[fs,e]:[e]}const rt=function(e,n,t,r){typeof n=="function"&&typeof t!="function"&&(r=t,t=n,n=null),gs(e,n,i,r);function i(l,a){const o=a[a.length-1];return t(l,o?o.children.indexOf(l):null,o)}};function ys(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 Vt={}.hasOwnProperty;function bs(e){const n=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return rt(e,"definition",r=>{const i=qt(r.identifier);i&&!Vt.call(n,i)&&(n[i]=r)}),t;function t(r){const i=qt(r);return i&&Vt.call(n,i)?n[i]:null}}function qt(e){return String(e||"").toUpperCase()}const dn={}.hasOwnProperty;function ks(e,n){const t=n||{},r=t.allowDangerousHtml||!1,i={};return a.dangerous=r,a.clobberPrefix=t.clobberPrefix===void 0||t.clobberPrefix===null?"user-content-":t.clobberPrefix,a.footnoteLabel=t.footnoteLabel||"Footnotes",a.footnoteLabelTagName=t.footnoteLabelTagName||"h2",a.footnoteLabelProperties=t.footnoteLabelProperties||{className:["sr-only"]},a.footnoteBackLabel=t.footnoteBackLabel||"Back to content",a.unknownHandler=t.unknownHandler,a.passThrough=t.passThrough,a.handlers={...us,...t.handlers},a.definition=bs(e),a.footnoteById=i,a.footnoteOrder=[],a.footnoteCounts={},a.patch=ws,a.applyData=Ss,a.one=o,a.all=c,a.wrap=vs,a.augment=l,rt(e,"footnoteDefinition",u=>{const d=String(u.identifier).toUpperCase();dn.call(i,d)||(i[d]=u)}),a;function l(u,d){if(u&&"data"in u&&u.data){const h=u.data;h.hName&&(d.type!=="element"&&(d={type:"element",tagName:"",properties:{},children:[]}),d.tagName=h.hName),d.type==="element"&&h.hProperties&&(d.properties={...d.properties,...h.hProperties}),"children"in d&&d.children&&h.hChildren&&(d.children=h.hChildren)}if(u){const h="type"in u?u:{position:u};ys(h)||(d.position={start:nt(h),end:tt(h)})}return d}function a(u,d,h,g){return Array.isArray(h)&&(g=h,h={}),l(u,{type:"element",tagName:d,properties:h||{},children:g||[]})}function o(u,d){return Cr(a,u,d)}function c(u){return it(a,u)}}function ws(e,n){e.position&&(n.position=ts(e))}function Ss(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 Cr(e,n,t){const r=n&&n.type;if(!r)throw new Error("Expected node, got `"+n+"`");return dn.call(e.handlers,r)?e.handlers[r](e,n,t):e.passThrough&&e.passThrough.includes(r)?"children"in n?{...n,children:it(e,n)}:n:e.unknownHandler?e.unknownHandler(e,n,t):js(e,n)}function it(e,n){const t=[];if("children"in n){const r=n.children;let i=-1;for(;++i<r.length;){const l=Cr(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 a=l.children[0];a&&a.type==="text"&&(a.value=a.value.replace(/^\s+/,""))}Array.isArray(l)?t.push(...l):t.push(l)}}}return t}function js(e,n){const t=n.data||{},r="value"in n&&!(dn.call(t,"hProperties")||dn.call(t,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:it(e,n)};return e.patch(n,r),e.applyData(n,r)}function vs(e,n){const t=[];let r=-1;for(n&&t.push({type:"text",value:`
|
|
48
|
+
`});++r<e.length;)r&&t.push({type:"text",value:`
|
|
49
|
+
`}),t.push(e[r]);return n&&e.length>0&&t.push({type:"text",value:`
|
|
50
|
+
`}),t}function Ns(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(),a=Xe(l.toLowerCase());let o=0;const c=[];for(;++o<=e.footnoteCounts[l];){const h={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};o>1&&h.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(o)}]}),c.length>0&&c.push({type:"text",value:" "}),c.push(h)}const u=i[i.length-1];if(u&&u.type==="element"&&u.tagName==="p"){const h=u.children[u.children.length-1];h&&h.type==="text"?h.value+=" ":u.children.push({type:"text",value:" "}),u.children.push(...c)}else i.push(...c);const d={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+a},children:e.wrap(i,!0)};e.patch(r,d),n.push(d)}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:`
|
|
51
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(n,!0)},{type:"text",value:`
|
|
52
|
+
`}]}}function Er(e,n){const t=ks(e,n),r=t.one(e,null),i=Ns(t);return i&&r.children.push({type:"text",value:`
|
|
53
|
+
`},i),Array.isArray(r)?{type:"root",children:r}:r}const Cs=function(e,n){return e&&"run"in e?Es(e,n):As(e||n)};function Es(e,n){return(t,r,i)=>{e.run(Er(t,n),r,l=>{i(l)})}}function As(e){return n=>Er(n,e)}var Ar={exports:{}},Fs="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Ts=Fs,Ps=Ts;function Fr(){}function Tr(){}Tr.resetWarningCache=Fr;var Is=function(){function e(r,i,l,a,o,c){if(c!==Ps){var u=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 u.name="Invariant Violation",u}}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:Tr,resetWarningCache:Fr};return t.PropTypes=t,t};Ar.exports=Is();var Ls=Ar.exports;const L=tn(Ls);class ln{constructor(n,t,r){this.property=n,this.normal=t,r&&(this.space=r)}}ln.prototype.property={};ln.prototype.normal={};ln.prototype.space=null;function Pr(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 ln(t,r,n)}function qn(e){return e.toLowerCase()}class we{constructor(n,t){this.property=n,this.attribute=t}}we.prototype.space=null;we.prototype.boolean=!1;we.prototype.booleanish=!1;we.prototype.overloadedBoolean=!1;we.prototype.number=!1;we.prototype.commaSeparated=!1;we.prototype.spaceSeparated=!1;we.prototype.commaOrSpaceSeparated=!1;we.prototype.mustUseProperty=!1;we.prototype.defined=!1;let Ds=0;const O=Ue(),le=Ue(),Ir=Ue(),S=Ue(),Y=Ue(),We=Ue(),me=Ue();function Ue(){return 2**++Ds}const Wn=Object.freeze(Object.defineProperty({__proto__:null,boolean:O,booleanish:le,commaOrSpaceSeparated:me,commaSeparated:We,number:S,overloadedBoolean:Ir,spaceSeparated:Y},Symbol.toStringTag,{value:"Module"})),_n=Object.keys(Wn);class lt extends we{constructor(n,t,r,i){let l=-1;if(super(n,t),Wt(this,"space",i),typeof r=="number")for(;++l<_n.length;){const a=_n[l];Wt(this,_n[l],(r&Wn[a])===Wn[a])}}}lt.prototype.defined=!0;function Wt(e,n,t){t&&(e[n]=t)}const Os={}.hasOwnProperty;function Qe(e){const n={},t={};let r;for(r in e.properties)if(Os.call(e.properties,r)){const i=e.properties[r],l=new lt(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(l.mustUseProperty=!0),n[r]=l,t[qn(r)]=r,t[qn(l.attribute)]=r}return new ln(n,t,e.space)}const Lr=Qe({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}}),Dr=Qe({space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Or(e,n){return n in e?e[n]:n}function zr(e,n){return Or(e,n.toLowerCase())}const _r=Qe({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:zr,properties:{xmlns:null,xmlnsXLink:null}}),Rr=Qe({transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:le,ariaAutoComplete:null,ariaBusy:le,ariaChecked:le,ariaColCount:S,ariaColIndex:S,ariaColSpan:S,ariaControls:Y,ariaCurrent:null,ariaDescribedBy:Y,ariaDetails:null,ariaDisabled:le,ariaDropEffect:Y,ariaErrorMessage:null,ariaExpanded:le,ariaFlowTo:Y,ariaGrabbed:le,ariaHasPopup:null,ariaHidden:le,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Y,ariaLevel:S,ariaLive:null,ariaModal:le,ariaMultiLine:le,ariaMultiSelectable:le,ariaOrientation:null,ariaOwns:Y,ariaPlaceholder:null,ariaPosInSet:S,ariaPressed:le,ariaReadOnly:le,ariaRelevant:null,ariaRequired:le,ariaRoleDescription:Y,ariaRowCount:S,ariaRowIndex:S,ariaRowSpan:S,ariaSelected:le,ariaSetSize:S,ariaSort:null,ariaValueMax:S,ariaValueMin:S,ariaValueNow:S,ariaValueText:null,role:null}}),zs=Qe({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:zr,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:We,acceptCharset:Y,accessKey:Y,action:null,allow:null,allowFullScreen:O,allowPaymentRequest:O,allowUserMedia:O,alt:null,as:null,async:O,autoCapitalize:null,autoComplete:Y,autoFocus:O,autoPlay:O,blocking:Y,capture:null,charSet:null,checked:O,cite:null,className:Y,cols:S,colSpan:null,content:null,contentEditable:le,controls:O,controlsList:Y,coords:S|We,crossOrigin:null,data:null,dateTime:null,decoding:null,default:O,defer:O,dir:null,dirName:null,disabled:O,download:Ir,draggable:le,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:O,formTarget:null,headers:Y,height:S,hidden:O,high:S,href:null,hrefLang:null,htmlFor:Y,httpEquiv:Y,id:null,imageSizes:null,imageSrcSet:null,inert:O,inputMode:null,integrity:null,is:null,isMap:O,itemId:null,itemProp:Y,itemRef:Y,itemScope:O,itemType:Y,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:O,low:S,manifest:null,max:null,maxLength:S,media:null,method:null,min:null,minLength:S,multiple:O,muted:O,name:null,nonce:null,noModule:O,noValidate:O,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:O,optimum:S,pattern:null,ping:Y,placeholder:null,playsInline:O,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:O,referrerPolicy:null,rel:Y,required:O,reversed:O,rows:S,rowSpan:S,sandbox:Y,scope:null,scoped:O,seamless:O,selected:O,shadowRootClonable:O,shadowRootDelegatesFocus:O,shadowRootMode:null,shape:null,size:S,sizes:null,slot:null,span:S,spellCheck:le,src:null,srcDoc:null,srcLang:null,srcSet:null,start:S,step:null,style:null,tabIndex:S,target:null,title:null,translate:null,type:null,typeMustMatch:O,useMap:null,value:le,width:S,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Y,axis:null,background:null,bgColor:null,border:S,borderColor:null,bottomMargin:S,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:O,declare:O,event:null,face:null,frame:null,frameBorder:null,hSpace:S,leftMargin:S,link:null,longDesc:null,lowSrc:null,marginHeight:S,marginWidth:S,noResize:O,noHref:O,noShade:O,noWrap:O,object:null,profile:null,prompt:null,rev:null,rightMargin:S,rules:null,scheme:null,scrolling:le,standby:null,summary:null,text:null,topMargin:S,valueType:null,version:null,vAlign:null,vLink:null,vSpace:S,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:O,disableRemotePlayback:O,prefix:null,property:null,results:S,security:null,unselectable:null}}),_s=Qe({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:Or,properties:{about:me,accentHeight:S,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:S,amplitude:S,arabicForm:null,ascent:S,attributeName:null,attributeType:null,azimuth:S,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:S,by:null,calcMode:null,capHeight:S,className:Y,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:S,diffuseConstant:S,direction:null,display:null,dur:null,divisor:S,dominantBaseline:null,download:O,dx:null,dy:null,edgeMode:null,editable:null,elevation:S,enableBackground:null,end:null,event:null,exponent:S,externalResourcesRequired:null,fill:null,fillOpacity:S,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:We,g2:We,glyphName:We,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:S,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:S,horizOriginX:S,horizOriginY:S,id:null,ideographic:S,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:S,k:S,k1:S,k2:S,k3:S,k4:S,kernelMatrix:me,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:S,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:S,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:S,overlineThickness:S,paintOrder:null,panose1:null,path:null,pathLength:S,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Y,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:S,pointsAtY:S,pointsAtZ:S,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:me,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:me,rev:me,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:me,requiredFeatures:me,requiredFonts:me,requiredFormats:me,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:S,specularExponent:S,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:S,strikethroughThickness:S,string:null,stroke:null,strokeDashArray:me,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:S,strokeOpacity:S,strokeWidth:null,style:null,surfaceScale:S,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:me,tabIndex:S,tableValues:null,target:null,targetX:S,targetY:S,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:me,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:S,underlineThickness:S,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:S,values:null,vAlphabetic:S,vMathematical:S,vectorEffect:null,vHanging:S,vIdeographic:S,version:null,vertAdvY:S,vertOriginX:S,vertOriginY:S,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:S,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Rs=/^data[-\w.:]+$/i,Xt=/-[a-z]/g,Bs=/[A-Z]/g;function Ms(e,n){const t=qn(n);let r=n,i=we;if(t in e.normal)return e.property[e.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&Rs.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Xt,$s);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Xt.test(l)){let a=l.replace(Bs,Us);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}i=lt}return new i(r,n)}function Us(e){return"-"+e.toLowerCase()}function $s(e){return e.charAt(1).toUpperCase()}const Qt={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"},Hs=Pr([Dr,Lr,_r,Rr,zs],"html"),Vs=Pr([Dr,Lr,_r,Rr,_s],"svg");function qs(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=>{rt(n,"element",(t,r,i)=>{const l=i;let a;if(e.allowedElements?a=!e.allowedElements.includes(t.tagName):e.disallowedElements&&(a=e.disallowedElements.includes(t.tagName)),!a&&e.allowElement&&typeof r=="number"&&(a=!e.allowElement(t,r,l)),a&&typeof r=="number")return e.unwrapDisallowed&&t.children?l.children.splice(r,1,...t.children):l.children.splice(r,1),r})}}var Br={exports:{}},q={};/**
|
|
54
|
+
* @license React
|
|
55
|
+
* react-is.production.min.js
|
|
56
|
+
*
|
|
57
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
58
|
+
*
|
|
59
|
+
* This source code is licensed under the MIT license found in the
|
|
60
|
+
* LICENSE file in the root directory of this source tree.
|
|
61
|
+
*/var at=Symbol.for("react.element"),st=Symbol.for("react.portal"),gn=Symbol.for("react.fragment"),xn=Symbol.for("react.strict_mode"),yn=Symbol.for("react.profiler"),bn=Symbol.for("react.provider"),kn=Symbol.for("react.context"),Ws=Symbol.for("react.server_context"),wn=Symbol.for("react.forward_ref"),Sn=Symbol.for("react.suspense"),jn=Symbol.for("react.suspense_list"),vn=Symbol.for("react.memo"),Nn=Symbol.for("react.lazy"),Xs=Symbol.for("react.offscreen"),Mr;Mr=Symbol.for("react.module.reference");function Se(e){if(typeof e=="object"&&e!==null){var n=e.$$typeof;switch(n){case at:switch(e=e.type,e){case gn:case yn:case xn:case Sn:case jn:return e;default:switch(e=e&&e.$$typeof,e){case Ws:case kn:case wn:case Nn:case vn:case bn:return e;default:return n}}case st:return n}}}q.ContextConsumer=kn;q.ContextProvider=bn;q.Element=at;q.ForwardRef=wn;q.Fragment=gn;q.Lazy=Nn;q.Memo=vn;q.Portal=st;q.Profiler=yn;q.StrictMode=xn;q.Suspense=Sn;q.SuspenseList=jn;q.isAsyncMode=function(){return!1};q.isConcurrentMode=function(){return!1};q.isContextConsumer=function(e){return Se(e)===kn};q.isContextProvider=function(e){return Se(e)===bn};q.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===at};q.isForwardRef=function(e){return Se(e)===wn};q.isFragment=function(e){return Se(e)===gn};q.isLazy=function(e){return Se(e)===Nn};q.isMemo=function(e){return Se(e)===vn};q.isPortal=function(e){return Se(e)===st};q.isProfiler=function(e){return Se(e)===yn};q.isStrictMode=function(e){return Se(e)===xn};q.isSuspense=function(e){return Se(e)===Sn};q.isSuspenseList=function(e){return Se(e)===jn};q.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gn||e===yn||e===xn||e===Sn||e===jn||e===Xs||typeof e=="object"&&e!==null&&(e.$$typeof===Nn||e.$$typeof===vn||e.$$typeof===bn||e.$$typeof===kn||e.$$typeof===wn||e.$$typeof===Mr||e.getModuleId!==void 0)};q.typeOf=Se;Br.exports=q;var Qs=Br.exports;const Ks=tn(Qs);function Ys(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 Gs(e){return e.join(" ").trim()}function Js(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}var ot={exports:{}},Kt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Zs=/\n/g,eo=/^\s*/,no=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,to=/^:\s*/,ro=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,io=/^[;\s]*/,lo=/^\s+|\s+$/g,ao=`
|
|
62
|
+
`,Yt="/",Gt="*",Be="",so="comment",oo="declaration",uo=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(k){var y=k.match(Zs);y&&(t+=y.length);var v=k.lastIndexOf(ao);r=~v?k.length-v:r+k.length}function l(){var k={line:t,column:r};return function(y){return y.position=new a(k),u(),y}}function a(k){this.start=k,this.end={line:t,column:r},this.source=n.source}a.prototype.content=e;function o(k){var y=new Error(n.source+":"+t+":"+r+": "+k);if(y.reason=k,y.filename=n.source,y.line=t,y.column=r,y.source=e,!n.silent)throw y}function c(k){var y=k.exec(e);if(y){var v=y[0];return i(v),e=e.slice(v.length),y}}function u(){c(eo)}function d(k){var y;for(k=k||[];y=h();)y!==!1&&k.push(y);return k}function h(){var k=l();if(!(Yt!=e.charAt(0)||Gt!=e.charAt(1))){for(var y=2;Be!=e.charAt(y)&&(Gt!=e.charAt(y)||Yt!=e.charAt(y+1));)++y;if(y+=2,Be===e.charAt(y-1))return o("End of comment missing");var v=e.slice(2,y-2);return r+=2,i(v),e=e.slice(y),r+=2,k({type:so,comment:v})}}function g(){var k=l(),y=c(no);if(y){if(h(),!c(to))return o("property missing ':'");var v=c(ro),w=k({type:oo,property:Jt(y[0].replace(Kt,Be)),value:v?Jt(v[0].replace(Kt,Be)):Be});return c(io),w}}function p(){var k=[];d(k);for(var y;y=g();)y!==!1&&(k.push(y),d(k));return k}return u(),p()};function Jt(e){return e?e.replace(lo,Be):Be}var co=uo;function Ur(e,n){var t=null;if(!e||typeof e!="string")return t;for(var r,i=co(e),l=typeof n=="function",a,o,c=0,u=i.length;c<u;c++)r=i[c],a=r.property,o=r.value,l?n(a,o,r):o&&(t||(t={}),t[a]=o);return t}ot.exports=Ur;ot.exports.default=Ur;var ho=ot.exports;const po=tn(ho),Xn={}.hasOwnProperty,fo=new Set(["table","thead","tbody","tfoot","tr"]);function $r(e,n){const t=[];let r=-1,i;for(;++r<n.children.length;)i=n.children[r],i.type==="element"?t.push(mo(e,i,r,n)):i.type==="text"?(n.type!=="element"||!fo.has(n.tagName)||!Ys(i))&&t.push(i.value):i.type==="raw"&&!e.options.skipHtml&&t.push(i.value);return t}function mo(e,n,t,r){const i=e.options,l=i.transformLinkUri===void 0?hi:i.transformLinkUri,a=e.schema,o=n.tagName,c={};let u=a,d;if(a.space==="html"&&o==="svg"&&(u=Vs,e.schema=u),n.properties)for(d in n.properties)Xn.call(n.properties,d)&&xo(c,d,n.properties[d],e);(o==="ol"||o==="ul")&&e.listDepth++;const h=$r(e,n);(o==="ol"||o==="ul")&&e.listDepth--,e.schema=a;const g=n.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=i.components&&Xn.call(i.components,o)?i.components[o]:o,k=typeof p=="string"||p===U.Fragment;if(!Ks.isValidElementType(p))throw new TypeError(`Component for name \`${o}\` not defined or is not renderable`);if(c.key=t,o==="a"&&i.linkTarget&&(c.target=typeof i.linkTarget=="function"?i.linkTarget(String(c.href||""),n.children,typeof c.title=="string"?c.title:null):i.linkTarget),o==="a"&&l&&(c.href=l(String(c.href||""),n.children,typeof c.title=="string"?c.title:null)),!k&&o==="code"&&r.type==="element"&&r.tagName!=="pre"&&(c.inline=!0),!k&&(o==="h1"||o==="h2"||o==="h3"||o==="h4"||o==="h5"||o==="h6")&&(c.level=Number.parseInt(o.charAt(1),10)),o==="img"&&i.transformImageUri&&(c.src=i.transformImageUri(String(c.src||""),String(c.alt||""),typeof c.title=="string"?c.title:null)),!k&&o==="li"&&r.type==="element"){const y=go(n);c.checked=y&&y.properties?!!y.properties.checked:null,c.index=Rn(r,n),c.ordered=r.tagName==="ol"}return!k&&(o==="ol"||o==="ul")&&(c.ordered=o==="ol",c.depth=e.listDepth),(o==="td"||o==="th")&&(c.align&&(c.style||(c.style={}),c.style.textAlign=c.align,delete c.align),k||(c.isHeader=o==="th")),!k&&o==="tr"&&r.type==="element"&&(c.isHeader=r.tagName==="thead"),i.sourcePos&&(c["data-sourcepos"]=ko(g)),!k&&i.rawSourcePos&&(c.sourcePosition=n.position),!k&&i.includeElementIndex&&(c.index=Rn(r,n),c.siblingCount=Rn(r)),k||(c.node=n),h.length>0?U.createElement(p,c,h):U.createElement(p,c)}function go(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 Rn(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 xo(e,n,t,r){const i=Ms(r.schema,n);let l=t;l==null||l!==l||(Array.isArray(l)&&(l=i.commaSeparated?Js(l):Gs(l)),i.property==="style"&&typeof l=="string"&&(l=yo(l)),i.space&&i.property?e[Xn.call(Qt,i.property)?Qt[i.property]:i.property]=l:i.attribute&&(e[i.attribute]=l))}function yo(e){const n={};try{po(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,bo)]=i}}function bo(e,n){return n.toUpperCase()}function ko(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}const Zt={}.hasOwnProperty,wo="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",un={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 Hr(e){for(const l in un)if(Zt.call(un,l)&&Zt.call(e,l)){const a=un[l];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${l}\` (see <${wo}#${a.id}> for more info)`),delete un[l]}const n=Ei().use(za).use(e.remarkPlugins||[]).use(Cs,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(qs,e),t=new ir;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=U.createElement(U.Fragment,{},$r({options:e,schema:Hs,listDepth:0},r));return e.className&&(i=U.createElement("div",{className:e.className},i)),i}Hr.propTypes={children:L.string,className:L.string,allowElement:L.func,allowedElements:L.arrayOf(L.string),disallowedElements:L.arrayOf(L.string),unwrapDisallowed:L.bool,remarkPlugins:L.arrayOf(L.oneOfType([L.object,L.func,L.arrayOf(L.oneOfType([L.bool,L.string,L.object,L.func,L.arrayOf(L.any)]))])),rehypePlugins:L.arrayOf(L.oneOfType([L.object,L.func,L.arrayOf(L.oneOfType([L.bool,L.string,L.object,L.func,L.arrayOf(L.any)]))])),sourcePos:L.bool,rawSourcePos:L.bool,skipHtml:L.bool,includeElementIndex:L.bool,transformLinkUri:L.oneOfType([L.func,L.bool]),linkTarget:L.oneOfType([L.func,L.string]),transformImageUri:L.func,components:L.object};class Qn extends ve.Component{render(){return s.jsx("div",{className:"loadingio-spinner-ripple-oy48bsussql",children:s.jsxs("div",{className:"ldio-f6vc10xq0d9",children:[s.jsx("div",{}),s.jsx("div",{})]})})}}const Kn=ve.forwardRef(({className:e,type:n,...t},r)=>s.jsx("input",{type:n,className:Jr("input-base",e),ref:r,...t}));Kn.displayName="Input";const So=({data:e,session:n})=>{var d,h;const t=()=>e.length===0?"0.0":(e.reduce((p,k)=>p+parseFloat(k.cpu||"0"),0)/e.length).toFixed(1),r=()=>e.length===0?"0.0":Math.max(...e.map(p=>parseFloat(p.cpu||"0"))).toFixed(1),i=()=>e.length===0?"0.0":(Math.max(...e.map(p=>parseFloat(p.memory||"0")))/1024).toFixed(1),l=()=>e.length===0?"0.0":(e.reduce((p,k)=>p+parseFloat(k.memory||"0"),0)/e.length/1024).toFixed(1);if(!n)return s.jsxs("div",{className:"profiling-empty",children:[s.jsx(Qn,{}),s.jsx("p",{children:"Loading session data..."})]});const a=((d=n.device_platform)==null?void 0:d.toLowerCase())==="ios",o=((h=n.device_platform)==null?void 0:h.toLowerCase())==="android",c=!!n.performance_trace,u=n.status==="running";if(a&&c)return s.jsxs("div",{className:"profiling-empty",children:[s.jsx(qr,{size:48,className:"success-icon"}),s.jsx("h3",{children:"Performance Trace Available"}),s.jsx("div",{className:"profiling-diagnostic-badge",children:"Platform: iOS • Xcode Instruments"}),s.jsx("p",{children:"The performance trace was successfully captured during this session. Download the .zip file to analyze it in Xcode Instruments."}),s.jsxs("button",{className:"download-trace-btn",onClick:()=>{n.performance_trace&&window.open(ce.getAssetUrl(n.performance_trace),"_blank")},children:[s.jsx(tr,{size:18}),"Download Performance Trace (.zip)"]}),s.jsx("p",{className:"hint-text",children:"Open with Xcode Instruments for detailed CPU, Memory, and Time Profiler analysis."})]});if(e.length===0){const g=u?Gn:Wr;return s.jsxs("div",{className:"profiling-empty",children:[s.jsx(g,{size:48,className:u?"progress-icon":"empty-icon"}),s.jsx("h3",{children:u?"Profiling In Progress":"No Profiling Data"}),s.jsxs("div",{className:"profiling-diagnostic-badge",children:["Platform: ",n.device_platform]}),s.jsx("p",{children:a?u?"Performance trace is being recorded. It will be available for download once the session ends.":"No performance trace was captured. This may happen if the session ended unexpectedly or the device was a simulator.":o?u?"Profiling data is being collected. CPU & Memory charts will appear once the session ends.":"No profiling data was captured. Ensure the app was launched and appPackage capability was provided.":"Profiling is only available for Android and iOS real device sessions."}),o&&u&&s.jsx("p",{className:"hint-text",children:"Check back after the test completes to see CPU & Memory charts."})]})}return s.jsxs("div",{className:"profiling-view animate-fade-in",children:[s.jsxs("div",{className:"profiling-stats-grid",children:[s.jsxs("div",{className:"profiling-stat-card",children:[s.jsx("div",{className:"stat-icon cpu",children:s.jsx(Zr,{size:20})}),s.jsxs("div",{className:"stat-info",children:[s.jsx("span",{className:"stat-label",children:"Avg CPU Usage"}),s.jsxs("span",{className:"stat-value",children:[t(),"%"]})]})]}),s.jsxs("div",{className:"profiling-stat-card",children:[s.jsx("div",{className:"stat-icon peak",children:s.jsx(ci,{size:20})}),s.jsxs("div",{className:"stat-info",children:[s.jsx("span",{className:"stat-label",children:"Peak CPU"}),s.jsxs("span",{className:"stat-value",children:[r(),"%"]})]})]}),s.jsxs("div",{className:"profiling-stat-card",children:[s.jsx("div",{className:"stat-icon memory",children:s.jsx(Kr,{size:20})}),s.jsxs("div",{className:"stat-info",children:[s.jsx("span",{className:"stat-label",children:"Avg Memory"}),s.jsxs("span",{className:"stat-value",children:[l()," MB"]})]})]}),s.jsxs("div",{className:"profiling-stat-card",children:[s.jsx("div",{className:"stat-icon memory",children:s.jsx(Ve,{size:20})}),s.jsxs("div",{className:"stat-info",children:[s.jsx("span",{className:"stat-label",children:"Peak Memory"}),s.jsxs("span",{className:"stat-value",children:[i()," MB"]})]})]})]}),s.jsxs("div",{className:"profiling-chart-container",children:[s.jsxs("h4",{className:"chart-title",children:["CPU & Memory Timeline",s.jsxs("span",{className:"chart-subtitle",children:["(",e.length," samples)"]})]}),s.jsxs("div",{className:"svg-chart-wrapper",children:[s.jsxs("svg",{viewBox:"0 0 800 200",className:"profiling-svg",children:[s.jsx("polyline",{fill:"none",stroke:"#ffb800",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:e.map((g,p)=>{const k=e.length>1?p/(e.length-1)*800:400,y=200-parseFloat(g.cpu||"0")/100*180;return`${k},${y}`}).join(" ")}),s.jsx("polyline",{fill:"none",stroke:"#00aaff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",points:e.map((g,p)=>{const k=e.length>1?p/(e.length-1)*800:400,v=200-parseFloat(g.memory||"0")/1024/1024*180;return`${k},${v}`}).join(" ")})]}),s.jsxs("div",{className:"chart-legend",children:[s.jsxs("div",{className:"legend-item",children:[s.jsx("span",{className:"legend-dot cpu"}),s.jsx("span",{children:"CPU (%)"})]}),s.jsxs("div",{className:"legend-item",children:[s.jsx("span",{className:"legend-dot memory"}),s.jsx("span",{children:"Memory (MB)"})]})]})]})]}),s.jsx("div",{className:"profiling-table-wrapper",children:s.jsxs("table",{className:"profiling-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Timestamp"}),s.jsx("th",{children:"CPU %"}),s.jsx("th",{children:"Memory MB"}),s.jsx("th",{children:"System CPU"})]})}),s.jsx("tbody",{children:e.slice().reverse().map(g=>s.jsxs("tr",{children:[s.jsx("td",{className:"time-cell",children:new Date(g.timestamp).toLocaleTimeString()}),s.jsx("td",{children:s.jsxs("div",{className:"progress-bar-container",children:[s.jsx("div",{className:"progress-bar cpu",style:{width:`${Math.min(parseFloat(g.cpu||"0"),100)}%`}}),s.jsxs("span",{className:"progress-text",children:[g.cpu,"%"]})]})}),s.jsx("td",{children:s.jsxs("div",{className:"progress-bar-container",children:[s.jsx("div",{className:"progress-bar memory",style:{width:`${Math.min(parseFloat(g.memory||"0")/(1024*1024)*100,100)}%`}}),s.jsxs("span",{className:"progress-text",children:[(parseFloat(g.memory||"0")/1024).toFixed(1)," MB"]})]})}),s.jsx("td",{className:"details-cell",children:g.total_cpu_used?`${g.total_cpu_used}%`:"—"})]},g.id))})]})})]})},jo=({logs:e})=>{const n=e.filter(t=>t.screenshot).map(t=>({id:t.id,screenshot:t.screenshot,command_name:t.command_name,title:t.title,createdAt:t.createdAt}));return n.length===0?s.jsxs("div",{className:"profiling-empty",children:[s.jsx(Yr,{size:48,className:"empty-icon"}),s.jsx("h3",{children:"No Screenshots Captured"}),s.jsx("p",{children:'Enable "Screenshot on Failure" or specific command screenshots to see them here.'})]}):s.jsx("div",{className:"screenshots-view animate-fade-in",children:s.jsx("div",{className:"screenshots-grid",children:n.map(t=>s.jsxs("div",{className:"screenshot-card",children:[s.jsxs("div",{className:"screenshot-img-wrapper",onClick:()=>window.open(ce.getAssetUrl(t.screenshot),"_blank"),children:[s.jsx("img",{src:ce.getAssetUrl(t.screenshot),alt:t.title,className:"device-screenshot-img"}),s.jsx("div",{className:"screenshot-overlay",children:s.jsx(ai,{size:24})})]}),s.jsxs("div",{className:"screenshot-info",children:[s.jsx("div",{className:"screenshot-command",children:t.title||t.command_name}),s.jsx("div",{className:"screenshot-time",children:new Date(t.createdAt).toLocaleTimeString()}),s.jsxs("a",{href:ce.getAssetUrl(t.screenshot),download:`screenshot_${t.id}.png`,className:"screenshot-download-link",onClick:r=>r.stopPropagation(),children:[s.jsx(tr,{size:14}),"Download"]})]})]},t.id))})})},vo=({logs:e,onCommandClick:n})=>{const[t,r]=ve.useState(null),i=ve.useRef(null),l=h=>{if(h==null||isNaN(h)||!isFinite(h))return"0ms";try{return er(h)}catch{return`${Math.round(h)}ms`}},a=ve.useMemo(()=>[...e].sort((h,g)=>{const p=h.createdAt?new Date(h.createdAt).getTime():0,k=g.createdAt?new Date(g.createdAt).getTime():0;return p-k}),[e]),o=ve.useMemo(()=>{if(a.length===0)return null;const h=a[0],g=h.createdAt?new Date(h.createdAt).getTime():0,p=a[a.length-1],y=(p.createdAt?new Date(p.createdAt).getTime():0)+(p.duration||100),v=Math.max(y-g,1);return isNaN(g)||isNaN(v)||v<=0?null:{sessionStart:g,totalDuration:v}},[a]),c=h=>{if(!i.current)return;const g=i.current.getBoundingClientRect(),p=h.clientX-g.left;p>=200?r(p-200):r(null)};if(!o||a.length===0)return s.jsxs("div",{className:"waterfall-empty",children:[s.jsx(Ve,{size:48,className:"empty-icon"}),s.jsx("p",{children:"Awaiting performance telemetry..."})]});const{sessionStart:u,totalDuration:d}=o;return s.jsxs("div",{className:"waterfall-container elite-tier",children:[s.jsx("div",{className:"waterfall-header",children:s.jsx("div",{className:"timeline-labels",children:[0,20,40,60,80,100].map(h=>s.jsxs("div",{className:"tick-label",style:{left:`${h}%`},children:[s.jsx("span",{className:"tick-mark"}),s.jsx("span",{className:"tick-text",children:l(d*h/100)})]},h))})}),s.jsxs("div",{className:"waterfall-body",ref:i,onMouseMove:c,onMouseLeave:()=>r(null),children:[s.jsxs("div",{className:"timeline-grid",children:[[20,40,60,80].map(h=>s.jsx("div",{className:"grid-line",style:{left:`${h}%`}},h)),t!==null&&s.jsx("div",{className:"scrubber-line",style:{left:`${t}px`},children:s.jsx("div",{className:"scrubber-head"})})]}),a.map((h,g)=>{let k=((h.createdAt?new Date(h.createdAt).getTime():u)-u)/d*100,y=(h.duration||10)/d*100;isFinite(k)||(k=0),isFinite(y)||(y=.4);const v=h.duration&&h.duration>1500;return s.jsxs("div",{className:`waterfall-row ${g%2===0?"even":"odd"}`,onClick:()=>n==null?void 0:n(h.id),children:[s.jsxs("div",{className:"row-label",children:[s.jsxs("div",{className:"command-meta",children:[s.jsx("span",{className:`method-badge ${h.method||"POST"}`,children:h.method||"POST"}),s.jsxs("span",{className:"row-index",children:["#",g+1]})]}),s.jsx("span",{className:"command-name",children:h.command_name})]}),s.jsx("div",{className:"row-track",children:s.jsxs("div",{className:`bar-container ${v?"warning":""}`,style:{left:`${k}%`,width:`${Math.max(y,.4)}%`},children:[s.jsx("div",{className:"bar-glow"}),s.jsx("div",{className:"bar-fill"}),y>15&&s.jsxs("div",{className:"bar-info",children:[s.jsx(Gn,{size:10}),s.jsx("span",{children:l(h.duration||0)})]}),s.jsx("div",{className:"bar-tooltip-anchor",children:s.jsxs("div",{className:"custom-tooltip",children:[s.jsx("div",{className:"tooltip-title",children:h.command_name}),s.jsxs("div",{className:"tooltip-row",children:[s.jsx("span",{children:"Duration:"}),s.jsx("span",{className:"value",children:l(h.duration||0)})]}),h.span_id&&s.jsxs("div",{className:"tooltip-row",children:[s.jsx("span",{children:"Span ID:"}),s.jsxs("span",{className:"value mono",children:[h.span_id.slice(0,8),"..."]})]})]})})]})})]},h.id)})]})]})},No=3e3,Yn=e=>{if(e==null||isNaN(e)||!isFinite(e))return"0ms";try{return er(Math.max(0,e))}catch{return`${Math.round(Math.max(0,e))}ms`}},nn=e=>{if(!e)return"—";const n=new Date(e);return Number.isNaN(n.getTime())?e:n.toLocaleString()},pn=e=>{if(!e)return null;try{return JSON.parse(e)}catch{return e}},Vr=e=>{try{const n=new Date(e.startTime).getTime(),r=(e.endTime?new Date(e.endTime).getTime():Date.now())-n;return isNaN(r)||!isFinite(r)?0:Math.max(0,r)}catch{return 0}},Co=({value:e,onChange:n,options:t,icon:r})=>{const[i,l]=ve.useState(!1),a=ve.useRef(null);ve.useEffect(()=>{const c=u=>{a.current&&!a.current.contains(u.target)&&l(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]);const o=t.find(c=>c.value===e);return s.jsxs("div",{className:"custom-select-container",ref:a,children:[s.jsxs("div",{className:"compact-select-trigger",onClick:()=>l(!i),children:[r,s.jsx("span",{className:"trigger-text",children:o==null?void 0:o.label}),s.jsx(Xr,{size:12,className:`chevron-icon ${i?"open":""}`})]}),i&&s.jsx("div",{className:"custom-select-dropdown",children:t.map(c=>s.jsx("div",{className:`custom-select-option ${c.value===e?"active":""}`,onClick:()=>{n(c.value),l(!1)},children:c.label},c.value))})]})},Eo=U.memo(({build:e,isActive:n,onClick:t})=>s.jsxs("button",{className:`session-card-mini build-card ${n?"active":""}`,onClick:()=>t(e.id),children:[s.jsxs("div",{className:"mini-header",children:[s.jsx("span",{className:"name-text",children:e.name||"Unnamed Build"}),s.jsx("span",{className:"mini-timestamp",children:nn(e.createdAt)})]}),s.jsxs("div",{className:"build-stats-row",children:[e.passedCount>0&&s.jsxs(De,{variant:"secondary",className:"stat-pill passed text-neon-green",children:[e.passedCount," PASSED"]}),e.failedCount>0&&s.jsxs(De,{variant:"secondary",className:"stat-pill failed text-neon-red",children:[e.failedCount," FAILED"]}),e.runningCount>0&&s.jsxs(De,{variant:"secondary",className:"stat-pill unmarked text-neon-amber",children:[e.runningCount," RUNNING"]})]}),s.jsxs("div",{className:"build-id-footer text-neon-dim",children:[e.id.slice(0,8),"..."]})]})),Ao=U.memo(({session:e,onSelect:n})=>{var r,i,l,a;const t=Vr(e);return s.jsxs("tr",{className:`session-table-row ${e.status}`,onClick:()=>n(e.id),children:[s.jsx("td",{children:s.jsxs("div",{className:"cell-id",children:[s.jsxs("span",{className:"id-text",children:["#",((r=e.id)==null?void 0:r.slice(0,8))||"unknown"]}),e.name&&s.jsx("span",{className:"name-text",children:e.name}),e.tags&&s.jsx("div",{className:"session-tags-pills",children:(i=pn(e.tags))==null?void 0:i.map(o=>s.jsx("span",{className:"tag-pill-mini",children:o},o))})]})}),s.jsx("td",{children:s.jsxs("div",{className:"cell-platform text-neon-purple",children:[s.jsx(Qr,{size:14,color:((l=e.device_platform)==null?void 0:l.toLowerCase())==="ios"?"#8b5cf6":"#a78bfa"}),s.jsx("span",{style:{marginLeft:"6px"},children:e.device_name||"Unknown Device"})]})}),s.jsx("td",{children:s.jsx("span",{className:`status-text ${["success","passed"].includes(e.status)?"text-neon-green":e.status==="failed"?"text-neon-red":"text-neon-amber"}`,style:{fontWeight:700,fontSize:"10px"},children:((a=e.status)==null?void 0:a.toUpperCase())||"UNKNOWN"})}),s.jsx("td",{className:"text-neon-dim",children:nn(e.startTime)}),s.jsx("td",{className:"text-neon-dim",children:Yn(t)}),s.jsx("td",{className:"cell-actions",children:s.jsx(nr,{size:16})})]})}),Oo=()=>{const[e,n]=U.useState([]),[t,r]=U.useState([]),[i,l]=ve.useState([]),{on:a}=Gr(),[o,c]=U.useState(!0),[u,d]=U.useState(null),[h,g]=U.useState(null),p=U.useRef(!0),k=U.useRef(null),[y,v]=U.useState([]),[w,D]=U.useState([]),[C,$]=U.useState([]),[H,x]=U.useState([]),[T,_]=U.useState(!1),[R,ie]=U.useState("command"),[E,A]=U.useState(!0),[X,ee]=U.useState(!1),[M,oe]=U.useState(""),[ne,de]=U.useState("all"),[ae,f]=U.useState({success:!0,failed:!0,running:!0}),[ue,xe]=U.useState("desired"),[m,fe]=U.useState(""),[ye,se]=ve.useState(!0),J=U.useMemo(()=>e.find(N=>N.id===u),[e,u]),z=U.useMemo(()=>t.find(N=>N.id===h),[t,h]),Fe=U.useCallback(async()=>{try{const N=await ce.getBuilds();n(N),p.current&&N.length>0&&(d(N[0].id),p.current=!1)}catch(N){console.error("Failed to fetch builds",N)}},[]),Te=U.useCallback(async()=>{if(u)try{const N=await ce.getSessions({buildId:u,query:m});r(N)}catch(N){console.error("Failed to fetch sessions",N)}},[u,m]);U.useCallback(async N=>{try{const B=await ce.getSession(N);r(Q=>Q.map(te=>te.id===N?B:te))}catch(B){console.error("Failed to fetch session details",B)}},[]);const Ne=U.useCallback(async()=>{c(!0);try{await Fe(),await Te()}catch(N){console.error("Failed to fetch dashboard data",N)}finally{c(!1)}},[Fe,Te]),an=async N=>{k.current&&k.current.abort();const B=new AbortController;k.current=B,_(!0);try{const[Q,te,Oe,Pe]=await Promise.all([ce.getSessionLogs(N),ce.getDeviceLogs(N),ce.getDebugLogs(N),ce.getProfilingData(N)]);B.signal.aborted||(v(Q),D(te),$(Oe),x(Pe))}catch(Q){if(Q instanceof Error&&Q.name==="AbortError")return;console.error("Failed to fetch logs",Q)}finally{B.signal.aborted||_(!1)}};U.useEffect(()=>{Ne();const N=setInterval(Ne,No);return()=>clearInterval(N)},[Ne]),U.useEffect(()=>{h&&an(h)},[h,z==null?void 0:z.status]),U.useEffect(()=>{if(!a)return;const N=[];return N.push(a("session_started",B=>{r(Q=>Q.some(te=>te.id===B.id)?Q:[B,...Q])})),N.push(a("session_stopped",B=>{r(Q=>Q.map(te=>te.id===B.id?{...te,status:B.status,endTime:new Date().toISOString()}:te))})),N.push(a("session_command",B=>{h===B.session_id&&v(Q=>Q.some(te=>te.id===B.id)?Q:[B,...Q])})),N.push(a("device_added",()=>Ne())),N.push(a("device_removed",()=>Ne())),()=>{N.forEach(B=>B())}},[a,h,Ne]);const Ke=e.filter(N=>{var Pe;if(!(((Pe=N.name)==null?void 0:Pe.toLowerCase().includes(M.toLowerCase()))||N.id.toLowerCase().includes(M.toLowerCase())))return!1;if(ne!=="all"){const $e=new Date(N.createdAt).getTime(),He=Date.now(),F={"24h":24*60*60*1e3,"7d":7*24*60*60*1e3,"30d":30*24*60*60*1e3};if(He-$e>F[ne])return!1}const Q=N.failedCount>0,te=N.runningCount>0,Oe=!Q&&!te&&N.passedCount>0;return!(!ae.success&&Oe||!ae.failed&&Q||!ae.running&&te)}),Cn=N=>{const B=pn(N.session_capabilities),Q=pn(N.desired_capabilities);return{appName:B!=null&&B.app?B.app.split("/").pop():(B==null?void 0:B.browserName)||"—",caps:B,desiredCaps:Q}},En=()=>s.jsxs("div",{className:"build-details-container animate-fade-in",children:[s.jsx("div",{className:"build-header-hero",children:s.jsxs("div",{className:"hero-content",children:[s.jsxs(De,{variant:"outline",className:"build-id-badge",children:["BUILD #",J==null?void 0:J.id.slice(0,8)]}),s.jsx("h1",{className:"build-title-big",children:(J==null?void 0:J.name)||"Unnamed Build"}),s.jsxs("div",{className:"build-summary-row",children:[s.jsxs("div",{className:"summary-item",children:[s.jsx(ht,{size:16,color:"#10b981"}),s.jsxs("span",{children:[J==null?void 0:J.passedCount," Passed"]})]}),s.jsxs("div",{className:"summary-item",children:[s.jsx(pt,{size:16,color:"#ef4444"}),s.jsxs("span",{children:[J==null?void 0:J.failedCount," Failed"]})]}),s.jsxs("div",{className:"summary-item",children:[s.jsx(Ve,{size:16,color:"#f59e0b"}),s.jsxs("span",{children:[J==null?void 0:J.runningCount," Running"]})]})]})]})}),s.jsxs("div",{className:"sessions-table-wrapper",children:[s.jsxs("div",{className:"sessions-table-actions",children:[s.jsxs("div",{className:"search-container session-search",children:[s.jsx(ct,{size:14,className:"search-icon"}),s.jsx(Kn,{placeholder:"Search sessions by ID, name, or device...",value:m,onChange:N=>fe(N.target.value),className:"compact-search"})]}),s.jsxs("div",{className:"table-stats",children:[t.length," sessions found"]})]}),s.jsxs("table",{className:"sessions-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Session / Name"}),s.jsx("th",{children:"Device"}),s.jsx("th",{children:"Status"}),s.jsx("th",{children:"Start Time"}),s.jsx("th",{children:"Duration"}),s.jsx("th",{})]})}),s.jsxs("tbody",{children:[t.map(N=>s.jsx(Ao,{session:N,onSelect:g},N.id)),t.length===0&&s.jsx("tr",{children:s.jsx("td",{colSpan:6,className:"table-empty",children:"No sessions found for this build."})})]})]})]})]}),sn=()=>{var Pe,$e,He;if(!z)return null;const{caps:N,desiredCaps:B}=Cn(z),Q=!!z.endTime,te=Q&&z.video_recording,Oe=!Q&&z.has_live_video;return s.jsxs("div",{className:"session-detail-view animate-fade-in",children:[s.jsxs("div",{className:"detail-breadcrumb",children:[s.jsxs("button",{className:"back-btn",onClick:()=>g(null),children:[s.jsx(ti,{size:14}),"Builds"]}),s.jsx("span",{className:"crumb-separator",children:"›"}),s.jsx("span",{children:(J==null?void 0:J.name)||"Build"}),s.jsx("span",{className:"crumb-separator",children:"›"}),s.jsx("span",{children:"Sessions"}),s.jsx("span",{className:"crumb-separator",children:"›"}),s.jsxs("span",{className:"crumb-current",children:[((Pe=z.id)==null?void 0:Pe.slice(0,16))||"unknown","..."]})]}),s.jsxs("div",{className:"session-metadata-bar",children:[s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Device"}),s.jsx("span",{className:"metadata-value",children:z.device_name})]}),z.node_id&&s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Node ID"}),s.jsx("span",{className:"metadata-value mono",children:z.node_id})]}),z.trace_id&&s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Trace ID"}),s.jsx("span",{className:"metadata-value mono",children:z.trace_id})]}),s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Platform"}),s.jsx("span",{className:"metadata-value",children:z.device_platform})]}),s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Status"}),s.jsx(De,{variant:["success","passed"].includes(z.status)?"success":z.status==="failed"?"error":"warning",children:(($e=z.status)==null?void 0:$e.toUpperCase())||"UNKNOWN"}),z.status==="failed"&&z.failure_category&&s.jsx(De,{variant:"secondary",className:"category-badge",children:z.failure_category.replace(/_/g," ")})]}),s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Start Time"}),s.jsx("span",{className:"metadata-value",children:nn(z.startTime)})]}),s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"OS Version"}),s.jsx("span",{className:"metadata-value",children:z.device_version})]}),s.jsxs("div",{className:"metadata-item",children:[s.jsx("span",{className:"metadata-label",children:"Duration"}),s.jsx("span",{className:"metadata-value",children:Yn(Vr(z))})]}),z.tags&&s.jsxs("div",{className:"metadata-item full-width",children:[s.jsx("span",{className:"metadata-label",children:"Tags"}),s.jsx("div",{className:"session-detail-tags",children:(He=pn(z.tags))==null?void 0:He.map(F=>s.jsx(De,{variant:"secondary",className:"session-tag-badge",children:F},F))})]})]}),z.ai_analysis&&s.jsxs("div",{className:`ai-analysis-hero animate-fade-in ${ye?"":"collapsed"}`,children:[s.jsxs("div",{className:"ai-header clickable",onClick:()=>se(!ye),role:"button","aria-expanded":ye,children:[s.jsxs("div",{className:"ai-title-group",children:[s.jsxs("div",{className:"ai-title",children:[s.jsx(ut,{size:22,className:"ai-icon"}),s.jsx("h2",{children:"AI Root-Cause Diagnosis"})]}),s.jsxs(De,{variant:"outline",className:"ai-smart-badge",children:[s.jsx(Ve,{size:10}),"Smart Analysis"]})]}),s.jsx("div",{className:"ai-header-actions",children:s.jsx("div",{className:"chevron-wrapper",children:s.jsx(nr,{size:20,strokeWidth:2.5,className:`chevron-icon ${ye?"rotated":""}`})})})]}),s.jsx("div",{className:`ai-collapsible-content ${ye?"expanded":"collapsed"}`,children:s.jsx("div",{className:"ai-content",children:s.jsx(Hr,{children:z.ai_analysis})})})]}),s.jsxs("div",{className:"session-detail-main",children:[s.jsxs("div",{className:"session-detail-left",children:[s.jsxs("div",{className:"tabs-nav",children:[["command","trace","screenshots","device","debug","profiling"].map(F=>{var Z;return F==="profiling"&&!["android","ios"].includes(((Z=z.device_platform)==null?void 0:Z.toLowerCase())||"")?null:s.jsx("button",{className:`tab-btn ${R===F?"active":""}`,onClick:()=>ie(F),children:F==="command"?"Text Logs":F==="screenshots"?"Evidence":F==="device"?"Device Logs":F==="debug"?"Debug Logs":F==="trace"?"Performance Trace":"System Profiling"},F)}),R==="command"&&s.jsxs("div",{className:"log-filters",children:[s.jsxs("label",{className:"filter-checkbox",children:[s.jsx("input",{type:"checkbox",checked:E,onChange:F=>A(F.target.checked)}),s.jsx("span",{children:"Show Screenshots"})]}),s.jsxs("label",{className:"filter-checkbox",children:[s.jsx("input",{type:"checkbox",checked:X,onChange:F=>ee(F.target.checked)}),s.jsx("span",{children:"Show Errors Only"})]})]})]}),s.jsx("div",{className:"logs-viewport",children:T?s.jsx(Qn,{}):s.jsx("div",{className:"logs-container",children:R==="trace"?s.jsx(vo,{logs:y,onCommandClick:F=>{ie("command"),setTimeout(()=>{const Z=document.getElementById(F);Z==null||Z.scrollIntoView({behavior:"smooth",block:"center"}),Z==null||Z.classList.add("highlight-flash"),setTimeout(()=>Z==null?void 0:Z.classList.remove("highlight-flash"),2e3)},100)}}):R==="command"?y.filter(F=>!(X&&F.is_success)).map(F=>{var j,P;const Z=(F.body||"").length>1e3?((j=F.body)==null?void 0:j.substring(0,1e3))+"... [TRUNCATED]":F.body,b=(F.response||"").length>1e3?((P=F.response)==null?void 0:P.substring(0,1e3))+"... [TRUNCATED]":F.response;return s.jsxs("div",{className:`log-line-complex ${F.is_success?"":"error"}`,children:[s.jsxs("div",{className:"log-line-header",children:[s.jsxs("span",{className:"log-time",children:["[",nn(F.createdAt),"]"]}),s.jsx("span",{className:`log-method ${F.method}`,children:F.method}),s.jsx("span",{className:"log-title",children:F.title}),F.duration!==null&&F.duration!==void 0&&s.jsx("span",{className:"log-duration",children:Yn(F.duration)}),F.is_healed&&s.jsxs(De,{variant:"outline",className:"healed-badge animate-pulse-subtle",children:[s.jsx(ut,{size:12,className:"mr-1"}),"[HEALED]"]}),F.span_id&&s.jsx("div",{className:"log-otel-link",title:`Span ID: ${F.span_id}`,children:s.jsx(Ve,{size:10})})]}),F.is_healed&&s.jsx("div",{className:"healing-intelligence-card",children:s.jsxs("div",{className:"intelligence-grid",children:[s.jsxs("div",{className:"intel-item",children:[s.jsx("span",{className:"intel-label",children:"FAILED LOCATOR"}),s.jsx("code",{className:"intel-value",children:F.original_selector})]}),s.jsxs("div",{className:"intel-item",children:[s.jsx("span",{className:"intel-label",children:"AUTO-RECOVERY"}),s.jsx("code",{className:"intel-value",children:F.healed_selector})]}),s.jsxs("div",{className:"intel-item",children:[s.jsx("span",{className:"intel-label",children:"CONFIDENCE"}),s.jsxs("span",{className:"intel-value",children:[(F.healing_confidence*100).toFixed(1),"%"]})]})]})}),E&&F.screenshot&&s.jsxs("div",{className:"log-screenshot",children:[s.jsx("img",{src:ce.getAssetUrl(F.screenshot),alt:"Screenshot",className:"log-screenshot-img",onClick:()=>window.open(ce.getAssetUrl(F.screenshot),"_blank")}),s.jsx("span",{className:"screenshot-label",children:"Click to enlarge"})]}),Z&&s.jsx("div",{className:"log-body",children:Z}),b&&s.jsx("div",{className:"log-response",children:b})]},F.id)}):R==="screenshots"?s.jsx(jo,{logs:y}):R==="profiling"?s.jsx(So,{data:H,session:z}):(R==="device"?w:C).slice(-500).map(F=>s.jsx("div",{className:"log-line-complex",children:s.jsxs("div",{className:"log-line-header",children:[s.jsxs("span",{className:"log-time",children:["[",nn(F.timestamp),"]"]}),s.jsx("span",{className:"log-title",children:F.message})]})},F.id))})})]}),s.jsxs("div",{className:"session-detail-right",children:[s.jsx("div",{className:"video-panel",children:s.jsx("div",{className:"video-player-container",children:Oe?s.jsx("img",{src:ce.getSessionLiveVideoUrl(z.id),alt:"Live",className:"video-content"}):te?s.jsx("video",{controls:!0,src:ce.getAssetUrl(z.video_recording),className:"video-content"}):s.jsx("div",{className:"video-placeholder",children:"No video available"})})}),s.jsxs("div",{className:"capabilities-panel",children:[s.jsxs("div",{className:"capabilities-tabs",children:[s.jsx("button",{className:`cap-tab-btn ${ue==="desired"?"active":""}`,onClick:()=>xe("desired"),children:"Desired Capabilities"}),s.jsx("button",{className:`cap-tab-btn ${ue==="session"?"active":""}`,onClick:()=>xe("session"),children:"Session Capabilities"})]}),s.jsx("div",{className:"capabilities-content",children:s.jsxs("table",{className:"capabilities-table",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Key"}),s.jsx("th",{children:"Value"})]})}),s.jsx("tbody",{children:ue==="desired"?B&&typeof B=="object"?Object.entries(B).map(([F,Z])=>s.jsxs("tr",{children:[s.jsx("td",{children:F}),s.jsx("td",{children:typeof Z=="object"?JSON.stringify(Z).slice(0,80):String(Z)})]},F)):s.jsx("tr",{children:s.jsx("td",{colSpan:2,className:"table-empty",children:"No desired capabilities available"})}):N&&typeof N=="object"?Object.entries(N).map(([F,Z])=>s.jsxs("tr",{children:[s.jsx("td",{children:F}),s.jsx("td",{children:typeof Z=="object"?JSON.stringify(Z).slice(0,80):String(Z)})]},F)):s.jsx("tr",{children:s.jsx("td",{colSpan:2,className:"table-empty",children:"No session capabilities available"})})})]})})]})]})]})]})};return s.jsxs("div",{className:"session-dashboard-root",children:[s.jsx("div",{className:"scanline",style:{position:"absolute",inset:0,pointerEvents:"none",opacity:.05,zIndex:1001}}),s.jsxs("div",{className:"dashboard-layout",children:[s.jsxs("aside",{className:"dashboard-sidebar",children:[s.jsxs("div",{className:"sidebar-header",children:[s.jsxs("div",{className:"search-container",children:[s.jsx(ct,{size:14,className:"search-icon"}),s.jsx(Kn,{placeholder:"Find builds...",value:M,onChange:N=>oe(N.target.value),className:"compact-search"})]}),s.jsxs("div",{className:"advanced-filters",children:[s.jsx("div",{className:"filter-row",children:s.jsx("div",{className:"select-container",children:s.jsx(Co,{icon:s.jsx(Gn,{size:12,className:"select-icon"}),value:ne,onChange:N=>de(N),options:[{label:"All Time",value:"all"},{label:"Last 24h",value:"24h"},{label:"Last 7 Days",value:"7d"},{label:"Last 30 Days",value:"30d"}]})})}),s.jsxs("div",{className:"status-toggles",children:[s.jsx("button",{className:`status-toggle ${ae.success?"active":""}`,onClick:()=>f(N=>({...N,success:!N.success})),title:"Show Passed",children:s.jsx(ht,{size:14,color:ae.success?"#10b981":"#64748b"})}),s.jsx("button",{className:`status-toggle ${ae.failed?"active":""}`,onClick:()=>f(N=>({...N,failed:!N.failed})),title:"Show Failed",children:s.jsx(pt,{size:14,color:ae.failed?"#ef4444":"#64748b"})}),s.jsx("button",{className:`status-toggle ${ae.running?"active":""}`,onClick:()=>f(N=>({...N,running:!N.running})),title:"Show Running",children:s.jsx(Ve,{size:14,color:ae.running?"#f59e0b":"#64748b"})}),s.jsxs("div",{className:"filter-count-label",children:[Ke.length," shown"]})]})]})]}),s.jsx("div",{className:"sidebar-scrollable",children:o&&e.length===0?s.jsx("div",{className:"sidebar-loading",children:s.jsx(Qn,{})}):Ke.length===0?s.jsx("div",{className:"sidebar-empty",children:"No builds found"}):Ke.map(N=>s.jsx(Eo,{build:N,isActive:u===N.id,onClick:B=>{d(B),g(null)}},N.id))})]}),s.jsx("main",{className:"dashboard-main",children:u?h?sn():En():s.jsxs("div",{className:"empty-state",children:[s.jsx(oi,{size:48}),s.jsx("h3",{children:"Select a Build"}),s.jsx("p",{children:"Choose a build from the sidebar to view its test results and sessions."})]})})]})]})};export{Oo as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,j as e,g as j,l as S,B as C,i as y,T as N}from"./index-ByQwMN5T.js";import{X as c}from"./index-C1DBaoSh.js";import{A as b}from"./Layouts-7IT8aFLI.js";import{C as k}from"./clock-DcdeWBPr.js";import{C as I}from"./calendar-6w-D6Oaw.js";import{M}from"./mouse-pointer-2-Cz76SHFb.js";const B=()=>{const[a,t]=i.useState({healthCheckIntervalMs:3e4,healthCheckSchedule:"",enableSelfHealing:!0}),[g,d]=i.useState(!0),[m,h]=i.useState(!1),[l,n]=i.useState(null);i.useEffect(()=>{o()},[]);const o=async()=>{d(!0);try{const s=await c.getGlobalConfig();t({healthCheckIntervalMs:s.healthCheckIntervalMs||3e4,healthCheckSchedule:s.healthCheckSchedule||"",enableSelfHealing:s.enableSelfHealing!==void 0?s.enableSelfHealing:!0})}catch(s){console.error("Failed to load settings",s),n({type:"error",message:"Failed to access infrastructure parameters."})}finally{d(!1)}},u=async(s=a)=>{h(!0),n(null);try{await c.updateGlobalConfig(s),n({type:"success",message:"Infrastructure parameters synchronized across fleet."}),setTimeout(()=>n(null),5e3)}catch(r){console.error("Failed to save settings",r),n({type:"error",message:"Synchronization failed. Check network integrity."})}finally{h(!1)}},v=async()=>{const s={healthCheckIntervalMs:3e4,healthCheckSchedule:"",enableSelfHealing:!0};t(s),await u(s);try{await c.resetMetrics()}catch(r){console.error("Failed to reset metrics",r)}},p=[{label:"Battery Saver (2 AM)",value:"0 2 * * *"},{label:"Standard (Hourly)",value:"0 * * * *"},{label:"Operational Coverage (30m)",value:"*/30 * * * *"},{label:"High Performance (10m)",value:"*/10 * * * *"},{label:"Disable Schedule",value:""}],f=s=>s?s.split(" ").filter(x=>x!=="").length!==5?"Invalid Cron format (needs 5 parts)":s==="0 2 * * *"?"Quiet hours: Daily at 2:00 AM":s==="0 * * * *"?"Standard rotation: Start of every hour":s==="*/30 * * * *"?"Balanced: Every 30 minutes":s==="*/10 * * * *"?"Intensive: Every 10 minutes":`Custom orchestration: ${s}`:"Using Idle Health Frequency (Continuous/Passive mode).";return g?e.jsxs("div",{className:"settings-loading",children:[e.jsx(j,{className:"animate-spin",size:32}),e.jsx("span",{children:"Synchronizing Global Infrastructure..."})]}):e.jsxs("div",{className:"settings-container mesh-gradient-infra",children:[e.jsx("div",{className:"scanline",style:{position:"absolute",inset:0,pointerEvents:"none",opacity:.05,zIndex:1001}}),e.jsxs("div",{className:"settings-header",children:[e.jsxs("div",{className:"settings-title-group",children:[e.jsx(S,{className:"settings-icon infra-icon",size:28}),e.jsx("h2",{children:"Infrastructure Control"})]}),e.jsx("p",{className:"settings-subtitle",children:"Manage core farm parameters, heartbeat frequency, and maintenance orchestrations across the global registry."})]}),e.jsxs("div",{className:"settings-content",children:[e.jsxs("div",{className:"settings-grid",children:[e.jsxs("div",{className:"setting-card stagger-1",children:[e.jsxs("div",{className:"setting-card-header",children:[e.jsx(k,{size:16}),e.jsx("h4",{children:"Idle Health Frequency"})]}),e.jsx("p",{className:"section-description-dense",children:"Frequency of passive health pings when the system is in idle state."}),e.jsx("div",{className:"setting-field",children:e.jsxs("div",{className:"input-group",children:[e.jsx("input",{type:"number",value:a.healthCheckIntervalMs,onChange:s=>t({...a,healthCheckIntervalMs:parseInt(s.target.value)}),min:5e3,step:5e3}),e.jsx("span",{className:"code-font",children:"MS"})]})}),e.jsx("div",{className:"setting-hint-clean",children:"Minimum safe value: 5000ms. Note: This frequency is overridden when a schedule is active."})]}),e.jsxs("div",{className:"setting-card stagger-2",children:[e.jsxs("div",{className:"setting-card-header",children:[e.jsx(I,{size:16}),e.jsx("h4",{children:"Deep Diagnostic Schedule"})]}),e.jsx("p",{className:"section-description-dense",children:"Execute intensive reliability bursts (WDA restarts, Cache purges) using standardized Cron syntax."}),e.jsx("div",{className:"setting-field",children:e.jsx("div",{className:"setting-input-wrapper",children:e.jsx("input",{type:"text",placeholder:"e.g. 0 * * * * (At internal min 0)",value:a.healthCheckSchedule,onChange:s=>t({...a,healthCheckSchedule:s.target.value})})})}),e.jsxs("div",{className:"cron-preview",children:[e.jsx("span",{className:"preview-label",children:"Active Logic:"}),e.jsx("span",{className:"preview-value",children:f(a.healthCheckSchedule)})]}),e.jsxs("div",{className:"cron-presets",children:[e.jsxs("div",{className:"presets-label",children:[e.jsx(M,{size:12}),e.jsx("span",{children:"Intent-Based Presets:"})]}),e.jsx("div",{className:"presets-grid",children:p.map(s=>e.jsx("button",{className:`preset-chip ${a.healthCheckSchedule===s.value?"active":""}`,onClick:()=>t({...a,healthCheckSchedule:s.value}),children:s.label},s.label))})]})]}),e.jsxs("div",{className:"setting-card stagger-3",children:[e.jsxs("div",{className:"setting-card-header",children:[e.jsx(C,{size:16}),e.jsx("h4",{children:"AI Self-Healing"})]}),e.jsx("p",{className:"section-description-dense",children:"Automatically intercept and recover from failing locators using Xenon's 5-tier strategy."}),e.jsxs("div",{className:"toggle-group",children:[e.jsxs("label",{className:"switch",children:[e.jsx("input",{type:"checkbox",checked:a.enableSelfHealing,onChange:s=>t({...a,enableSelfHealing:s.target.checked})}),e.jsx("span",{className:"slider round"})]}),e.jsx("span",{className:"toggle-label",children:a.enableSelfHealing?"ENABLED":"DISABLED"})]}),e.jsx("div",{className:"setting-hint-clean",children:"When enabled, Xenon will attempt to find elements via Fuzzy XML, OCR, Visual AI, and LLM before failing a test."})]})]}),l&&e.jsxs("div",{className:`status-banner ${l.type}`,children:[l.type==="success"?e.jsx(y,{size:18}):e.jsx(N,{size:18}),e.jsx("span",{children:l.message})]})]}),e.jsx(b,{onSave:u,onDiscard:o,onRestoreDefaults:v,isSaving:m,saveLabel:"Save Configuration"})]})};export{B as Settings};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as a}from"./index-ByQwMN5T.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 t=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],o=a("trash-2",t);export{o as T};
|