wizards 0.2.5 → 0.2.7
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/apps/runtime/dist/agents/project-assistant.js +3 -3
- package/apps/runtime/dist/app.js +7 -2
- package/apps/runtime/dist/routes/delivery.js +6 -14
- package/apps/runtime/dist/routes/runs.js +28 -1
- package/apps/runtime/dist/services/engenty-shapes.js +71 -0
- package/apps/runtime/dist/services/wizard-icon.js +145 -0
- package/apps/web/dist/assets/Account-DLLeEwJL.js +1 -0
- package/apps/web/dist/assets/{ChangelogDialog-CYQC4l57.js → ChangelogDialog-DEfZRDK3.js} +1 -1
- package/apps/web/dist/assets/ChatPanel-CNiFyu_w.js +1 -0
- package/apps/web/dist/assets/{CreditsDialog-7nLXWFvP.js → CreditsDialog-CUvc2iPM.js} +1 -1
- package/apps/web/dist/assets/EditorPage-CZuCz7lB.js +2 -0
- package/apps/web/dist/assets/{FlowPreview-BT4i-qIF.js → FlowPreview-BC25OUH0.js} +1 -1
- package/apps/web/dist/assets/HomePage-DQKuhMFZ.js +1 -0
- package/apps/web/dist/assets/{ImportWizard-Cg0l6q88.js → ImportWizard-BockXJXm.js} +1 -1
- package/apps/web/dist/assets/{LocalRuntime-BoVnl1ga.js → LocalRuntime-C199bg_B.js} +1 -1
- package/apps/web/dist/assets/NewWizardPage-C4cde8FO.js +2 -0
- package/apps/web/dist/assets/ProjectPage-DJC1K4w_.js +2 -0
- package/apps/web/dist/assets/PublicRunner-BCrmXPkr.js +1 -0
- package/apps/web/dist/assets/ReadOnly-CvmN9XW4.js +1 -0
- package/apps/web/dist/assets/RunnerView-CCe8-k9Q.js +2 -0
- package/apps/web/dist/assets/SettingsPage-BuocMkLt.js +1 -0
- package/apps/web/dist/assets/{SetupPage-BzZMf7Oz.js → SetupPage-o6Jim2Pu.js} +1 -1
- package/apps/web/dist/assets/{SharePage-CONXJnOU.js → SharePage-BqwqI3Ga.js} +1 -1
- package/apps/web/dist/assets/{api-BC3K8Na8.js → api-Bf-l9Sd8.js} +1 -1
- package/apps/web/dist/assets/changelog-CFeEzKqb.js +1 -0
- package/apps/web/dist/assets/chevron-down-DymW-2BP.js +1 -0
- package/apps/web/dist/assets/globe-ffVj8XwO.js +1 -0
- package/apps/web/dist/assets/index-B8n2AYO0.css +1 -0
- package/apps/web/dist/assets/index-BR5ELbeZ.js +10 -0
- package/apps/web/dist/assets/lock-CzNXAYdi.js +1 -0
- package/apps/web/dist/assets/meta-CKE9QceT.js +1 -0
- package/apps/web/dist/assets/{oss-credits-Hu4LieLA.js → oss-credits-C-U2Tlpn.js} +1 -1
- package/apps/web/dist/assets/outputs-CsESg-Eg.js +69 -0
- package/apps/web/dist/assets/{session-_w8H5O_d.js → session-C7LDDcj7.js} +1 -1
- package/apps/web/dist/assets/trash-0IafyhZB.js +1 -0
- package/apps/web/dist/assets/type-BqbppSsp.js +1 -0
- package/apps/web/dist/assets/ui-BT0Y_Hci.js +1 -0
- package/apps/web/dist/assets/wand-sparkles-Clj3VRB5.js +1 -0
- package/apps/web/dist/index.html +5 -6
- package/apps/web/dist/mcp/flow.html +2 -2
- package/package.json +2 -1
- package/apps/web/dist/assets/Account-BKribBzW.js +0 -1
- package/apps/web/dist/assets/ChatPanel-Cnd_dfF2.js +0 -1
- package/apps/web/dist/assets/EditorPage-BjFAF_4T.js +0 -2
- package/apps/web/dist/assets/HomePage-F04N9Y1Q.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-DumPEWtE.js +0 -2
- package/apps/web/dist/assets/PublicRunner-CllgpTeL.js +0 -1
- package/apps/web/dist/assets/RunnerView-adkYnOSi.js +0 -2
- package/apps/web/dist/assets/SettingsPage-7EG_dMSP.js +0 -2
- package/apps/web/dist/assets/changelog-C0GmxRP2.js +0 -1
- package/apps/web/dist/assets/index-CJ3iuK8-.js +0 -10
- package/apps/web/dist/assets/index-mpjxO44v.css +0 -1
- package/apps/web/dist/assets/meta-BeYxDfVN.js +0 -1
- package/apps/web/dist/assets/outputs-DLmQMIUm.js +0 -69
- package/apps/web/dist/assets/plug-CLjyCoHB.js +0 -1
- package/apps/web/dist/assets/type-DnfgUhpM.js +0 -1
- package/apps/web/dist/assets/ui-Cj3EzOCA.js +0 -1
- package/apps/web/dist/assets/wand-sparkles-CKxArWPY.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-q3MZMmnf.js";var t={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-q3MZMmnf.js";import{n as t,t as n}from"./wand-sparkles-Clj3VRB5.js";import{n as r}from"./mic-Bvz4mA2j.js";import{t as i}from"./video-CjgmvRDk.js";import{y as a}from"./ui-BT0Y_Hci.js";import{x as o}from"./index-BR5ELbeZ.js";var s={name:`bot`,size:24,node:[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]};s.node;var c=e(s),l={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};l.node;var u=e(l),d={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};d.node;var f=e(d),p={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};p.node;var m=e(p),h={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]};h.node;var g=e(h);function _(e){switch(e.type){case`page`:return g;case`agent`:return c;case`generate`:return e.asset===`image`?f:e.asset===`video`?i:e.asset===`dashboard`?m:r;case`widget`:return o;case`review`:return t;case`result`:return u}return n}var v={page:`bg-cobalt-tint text-cobalt`,agent:`bg-ember-tint text-ember-strong`,generate:`bg-amber-tint text-ink-2`,widget:`bg-ember-veil text-ember-strong`,review:`bg-moss-tint text-moss`,result:`bg-paper-2 text-ink-2`};function y(e){return a(`type.${e.type}`)}var b=[`web_search`,`web_fetch`,`browser`,`sandbox`,`image`,`http`];function x(e){return b.includes(e)?a(`tool.${e}`):e}function S(e){switch(e.type){case`page`:return e.fields.map(e=>e.label).join(` · `);case`agent`:{let t=e.tools.map(x),n=e.mcp?.length?[`MCP: ${e.mcp.join(`, `)}`]:[];return[...t,...n].join(` · `)||e.instructions.slice(0,90)}case`generate`:{let t=[e.asset];return e.options?.aspectRatio&&t.push(e.options.aspectRatio),e.options?.duration&&t.push(`${e.options.duration}s`),e.options?.resolution&&t.push(e.options.resolution),e.options?.template&&t.push(e.options.template),t.join(` · `)}case`widget`:return[e.entry,Object.keys(e.data).join(`, `)].filter(Boolean).join(` · `);case`review`:return[e.edit?a(`editor.reviewEditable`):null,e.regenerate?a(`editor.reviewRedo`):null].filter(Boolean).join(` · `);case`result`:return e.deliverables.map(e=>`${e.label??e.from} (${e.formats.join(`, `)})`).join(` · `)}return``}export{y as a,u as c,x as i,c as l,_ as n,g as o,S as r,f as s,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={shared:[{name:`@modelcontextprotocol/client`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@modelcontextprotocol/ext-apps`,version:`2.0.3`,license:`MIT`,homepage:`https://github.com/modelcontextprotocol/ext-apps`},{name:`marked`,version:`18.0.14`,license:`MIT`,homepage:`https://marked.js.org`},{name:`react`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`zod`,version:`4.6.5`,license:`MIT`,homepage:`https://zod.dev`}],groups:[{id:`apps/mobile`,kind:`app`,label:`mobile`,packages:[{name:`@expo-google-fonts/space-grotesk`,version:`0.4.1`,license:`MIT AND OFL-1.1`,homepage:`https://github.com/expo/google-fonts/tree/master/font-packages/space-grotesk#readme`},{name:`expo`,version:`57.0.26`,license:`MIT`,homepage:`https://github.com/expo/expo/tree/main/packages/expo`},{name:`expo-blur`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/blur-view/`},{name:`expo-camera`,version:`57.0.6`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/camera/`},{name:`expo-clipboard`,version:`57.0.2`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/clipboard`},{name:`expo-constants`,version:`57.0.20`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/constants/`},{name:`expo-crypto`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/crypto/`},{name:`expo-file-system`,version:`57.0.7`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/filesystem/`},{name:`expo-font`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/font/`},{name:`expo-glass-effect`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/glass-effect/`},{name:`expo-haptics`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/haptics/`},{name:`expo-intent-launcher`,version:`57.0.1`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/intent-launcher/`},{name:`expo-keep-awake`,version:`57.0.2`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/keep-awake/`},{name:`expo-linking`,version:`57.0.11`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/linking`},{name:`expo-localization`,version:`57.0.2`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/localization/`},{name:`expo-notifications`,version:`57.0.21`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/notifications/`},{name:`expo-router`,version:`57.0.24`,license:`MIT`,homepage:`https://docs.expo.dev/routing/introduction/`},{name:`expo-secure-store`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/securestore/`},{name:`expo-sharing`,version:`57.0.22`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/sharing/`},{name:`expo-splash-screen`,version:`57.0.9`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/splash-screen/`},{name:`expo-sqlite`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/sqlite/`},{name:`expo-status-bar`,version:`57.0.1`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/status-bar/`},{name:`expo-system-ui`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/system-ui`},{name:`expo-web-browser`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/webbrowser/`},{name:`react-native`,version:`0.86.3`,license:`MIT`,homepage:`https://reactnative.dev/`},{name:`react-native-gesture-handler`,version:`3.3.0`,license:`MIT`,homepage:`https://docs.swmansion.com/react-native-gesture-handler/`},{name:`react-native-reanimated`,version:`4.7.1`,license:`MIT`,homepage:`https://docs.swmansion.com/react-native-reanimated`},{name:`react-native-safe-area-context`,version:`5.7.0`,license:`MIT`,homepage:`https://github.com/AppAndFlow/react-native-safe-area-context#readme`},{name:`react-native-screens`,version:`4.26.2`,license:`MIT`,homepage:`https://github.com/software-mansion/react-native-screens#readme`},{name:`react-native-svg`,version:`15.15.4`,license:`MIT`,homepage:`https://github.com/react-native-community/react-native-svg`},{name:`react-native-webview`,version:`13.16.1`,license:`MIT`,homepage:`https://github.com/react-native-webview/react-native-webview#readme`},{name:`react-native-worklets`,version:`0.10.1`,license:`MIT`,homepage:`https://docs.swmansion.com/react-native-worklets`}]},{id:`apps/runtime`,kind:`app`,label:`runtime`,packages:[{name:`@ai-sdk/anthropic`,version:`4.0.54`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/gateway`,version:`4.0.82`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/openai`,version:`4.0.67`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@clack/prompts`,version:`1.8.1`,license:`MIT`,homepage:`https://github.com/bombshell-dev/clack/tree/main/packages/prompts#readme`},{name:`@executor-js/plugin-openapi`,version:`1.6.8`,license:`MIT`,homepage:`https://github.com/UsefulSoftwareCo/executor/tree/main/packages/plugins/openapi`},{name:`@hono/node-server`,version:`2.1.3`,license:`MIT`,homepage:`https://github.com/honojs/node-server`},{name:`@libsql/client`,version:`0.18.0`,license:`MIT`,homepage:`https://github.com/tursodatabase/libsql-client-ts#readme`},{name:`@mastra/core`,version:`1.74.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/docker`,version:`0.8.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/mcp`,version:`2.1.2`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@modelcontextprotocol/server`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@turbodocx/html-to-docx`,version:`1.23.1`,license:`MIT`,homepage:`https://github.com/TurboDocx/html-to-docx#readme`},{name:`ai`,version:`7.0.102`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`aws4fetch`,version:`1.0.20`,license:`MIT`,homepage:`https://github.com/mhart/aws4fetch#readme`},{name:`drizzle-orm`,version:`0.45.3`,license:`Apache-2.0`,homepage:`https://orm.drizzle.team`},{name:`effect`,version:`4.0.0-beta.59`,license:`MIT`,homepage:`https://effect.website`},{name:`exceljs`,version:`4.4.0`,license:`MIT`,homepage:`https://github.com/exceljs/exceljs#readme`},{name:`fast-xml-parser`,version:`5.11.2`,license:`MIT`,homepage:`https://github.com/NaturalIntelligence/fast-xml-parser#readme`},{name:`fflate`,version:`0.8.3`,license:`MIT`,homepage:`https://101arrowz.github.io/fflate`},{name:`hono`,version:`4.13.12`,license:`MIT`,homepage:`https://hono.dev`},{name:`imapflow`,version:`2.2.1`,license:`MIT`,homepage:`https://imapflow.com/`},{name:`jiti`,version:`2.7.0`,license:`MIT`,homepage:`https://github.com/unjs/jiti#readme`},{name:`jose`,version:`6.2.12`,license:`MIT`,homepage:`https://github.com/panva/jose`},{name:`mammoth`,version:`1.13.0`,license:`BSD-2-Clause`,homepage:`https://github.com/mwilliamson/mammoth.js#readme`},{name:`nanoid`,version:`5.1.16`,license:`MIT`,homepage:`https://github.com/ai/nanoid#readme`},{name:`node-pty`,version:`1.1.0`,license:`MIT`,homepage:`https://github.com/microsoft/node-pty`},{name:`pdf-parse`,version:`2.4.5`,license:`Apache-2.0`,homepage:`https://mehmet-kozan.github.io/pdf-parse/`},{name:`playwright-core`,version:`1.63.0`,license:`Apache-2.0`,homepage:`https://playwright.dev`},{name:`postal-mime`,version:`4.0.2`,license:`MIT-0`,homepage:`https://postal-mime.postalsys.com`},{name:`rfc6902`,version:`5.3.0`,license:`MIT`,homepage:`https://github.com/chbrown/rfc6902`},{name:`turndown`,version:`7.2.4`,license:`MIT`,homepage:`https://github.com/mixmark-io/turndown#readme`}]},{id:`apps/web`,kind:`app`,label:`web`,packages:[{name:`@dagrejs/dagre`,version:`3.1.1`,license:`MIT`,homepage:`https://github.com/dagrejs/dagre#readme`},{name:`@tanstack/react-query`,version:`5.104.0`,license:`MIT`,homepage:`https://tanstack.com/query`},{name:`@xterm/addon-fit`,version:`0.11.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/addon-web-links`,version:`0.12.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/xterm`,version:`6.0.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js#readme`},{name:`@xyflow/react`,version:`12.12.0`,license:`MIT`,homepage:`https://reactflow.dev`},{name:`dompurify`,version:`3.4.16`,license:`(MPL-2.0 OR Apache-2.0)`,homepage:`https://github.com/cure53/DOMPurify`},{name:`lucide-react`,version:`1.49.0`,license:`ISC`,homepage:`https://lucide.dev`},{name:`qr-scanner`,version:`1.4.2`,license:`MIT`,homepage:`https://github.com/nimiq/qr-scanner#readme`},{name:`react-dom`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`react-router`,version:`7.18.4`,license:`MIT`,homepage:`https://github.com/remix-run/react-router#readme`},{name:`uqr`,version:`0.1.3`,license:`MIT`,homepage:`https://github.com/unjs/uqr#readme`}]}]};export{e as default};
|
|
1
|
+
var e={shared:[{name:`@modelcontextprotocol/client`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@modelcontextprotocol/ext-apps`,version:`2.0.3`,license:`MIT`,homepage:`https://github.com/modelcontextprotocol/ext-apps`},{name:`marked`,version:`18.0.14`,license:`MIT`,homepage:`https://marked.js.org`},{name:`react`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`zod`,version:`4.6.5`,license:`MIT`,homepage:`https://zod.dev`}],groups:[{id:`apps/mobile`,kind:`app`,label:`mobile`,packages:[{name:`@expo-google-fonts/space-grotesk`,version:`0.4.1`,license:`MIT AND OFL-1.1`,homepage:`https://github.com/expo/google-fonts/tree/master/font-packages/space-grotesk#readme`},{name:`expo`,version:`57.0.26`,license:`MIT`,homepage:`https://github.com/expo/expo/tree/main/packages/expo`},{name:`expo-blur`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/blur-view/`},{name:`expo-camera`,version:`57.0.6`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/camera/`},{name:`expo-clipboard`,version:`57.0.2`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/clipboard`},{name:`expo-constants`,version:`57.0.20`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/constants/`},{name:`expo-crypto`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/crypto/`},{name:`expo-file-system`,version:`57.0.7`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/filesystem/`},{name:`expo-font`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/font/`},{name:`expo-glass-effect`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/glass-effect/`},{name:`expo-haptics`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/haptics/`},{name:`expo-intent-launcher`,version:`57.0.1`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/intent-launcher/`},{name:`expo-keep-awake`,version:`57.0.2`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/keep-awake/`},{name:`expo-linking`,version:`57.0.11`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/linking`},{name:`expo-localization`,version:`57.0.2`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/localization/`},{name:`expo-notifications`,version:`57.0.21`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/notifications/`},{name:`expo-router`,version:`57.0.24`,license:`MIT`,homepage:`https://docs.expo.dev/routing/introduction/`},{name:`expo-secure-store`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/securestore/`},{name:`expo-sharing`,version:`57.0.22`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/sharing/`},{name:`expo-splash-screen`,version:`57.0.9`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/splash-screen/`},{name:`expo-sqlite`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/sqlite/`},{name:`expo-status-bar`,version:`57.0.1`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/status-bar/`},{name:`expo-system-ui`,version:`57.0.4`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/system-ui`},{name:`expo-web-browser`,version:`57.0.3`,license:`MIT`,homepage:`https://docs.expo.dev/versions/latest/sdk/webbrowser/`},{name:`react-native`,version:`0.86.3`,license:`MIT`,homepage:`https://reactnative.dev/`},{name:`react-native-gesture-handler`,version:`3.3.0`,license:`MIT`,homepage:`https://docs.swmansion.com/react-native-gesture-handler/`},{name:`react-native-reanimated`,version:`4.7.1`,license:`MIT`,homepage:`https://docs.swmansion.com/react-native-reanimated`},{name:`react-native-safe-area-context`,version:`5.7.0`,license:`MIT`,homepage:`https://github.com/AppAndFlow/react-native-safe-area-context#readme`},{name:`react-native-screens`,version:`4.26.2`,license:`MIT`,homepage:`https://github.com/software-mansion/react-native-screens#readme`},{name:`react-native-svg`,version:`15.15.4`,license:`MIT`,homepage:`https://github.com/react-native-community/react-native-svg`},{name:`react-native-webview`,version:`13.16.1`,license:`MIT`,homepage:`https://github.com/react-native-webview/react-native-webview#readme`},{name:`react-native-worklets`,version:`0.10.1`,license:`MIT`,homepage:`https://docs.swmansion.com/react-native-worklets`}]},{id:`apps/runtime`,kind:`app`,label:`runtime`,packages:[{name:`@ai-sdk/anthropic`,version:`4.0.54`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/gateway`,version:`4.0.82`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@ai-sdk/openai`,version:`4.0.67`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`@clack/prompts`,version:`1.8.1`,license:`MIT`,homepage:`https://github.com/bombshell-dev/clack/tree/main/packages/prompts#readme`},{name:`@executor-js/plugin-openapi`,version:`1.6.8`,license:`MIT`,homepage:`https://github.com/UsefulSoftwareCo/executor/tree/main/packages/plugins/openapi`},{name:`@hono/node-server`,version:`2.1.3`,license:`MIT`,homepage:`https://github.com/honojs/node-server`},{name:`@libsql/client`,version:`0.18.0`,license:`MIT`,homepage:`https://github.com/tursodatabase/libsql-client-ts#readme`},{name:`@mastra/core`,version:`1.74.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/docker`,version:`0.8.0`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@mastra/mcp`,version:`2.1.2`,license:`Apache-2.0`,homepage:`https://mastra.ai`},{name:`@modelcontextprotocol/server`,version:`2.2.0`,license:`MIT`,homepage:`https://modelcontextprotocol.io`},{name:`@napi-rs/canvas`,version:`0.1.80`,license:`MIT`,homepage:`https://github.com/Brooooooklyn/canvas#readme`},{name:`@turbodocx/html-to-docx`,version:`1.23.1`,license:`MIT`,homepage:`https://github.com/TurboDocx/html-to-docx#readme`},{name:`ai`,version:`7.0.102`,license:`Apache-2.0`,homepage:`https://ai-sdk.dev/docs`},{name:`aws4fetch`,version:`1.0.20`,license:`MIT`,homepage:`https://github.com/mhart/aws4fetch#readme`},{name:`drizzle-orm`,version:`0.45.3`,license:`Apache-2.0`,homepage:`https://orm.drizzle.team`},{name:`effect`,version:`4.0.0-beta.59`,license:`MIT`,homepage:`https://effect.website`},{name:`exceljs`,version:`4.4.0`,license:`MIT`,homepage:`https://github.com/exceljs/exceljs#readme`},{name:`fast-xml-parser`,version:`5.11.2`,license:`MIT`,homepage:`https://github.com/NaturalIntelligence/fast-xml-parser#readme`},{name:`fflate`,version:`0.8.3`,license:`MIT`,homepage:`https://101arrowz.github.io/fflate`},{name:`hono`,version:`4.13.12`,license:`MIT`,homepage:`https://hono.dev`},{name:`imapflow`,version:`2.2.1`,license:`MIT`,homepage:`https://imapflow.com/`},{name:`jiti`,version:`2.7.0`,license:`MIT`,homepage:`https://github.com/unjs/jiti#readme`},{name:`jose`,version:`6.2.12`,license:`MIT`,homepage:`https://github.com/panva/jose`},{name:`mammoth`,version:`1.13.0`,license:`BSD-2-Clause`,homepage:`https://github.com/mwilliamson/mammoth.js#readme`},{name:`nanoid`,version:`5.1.16`,license:`MIT`,homepage:`https://github.com/ai/nanoid#readme`},{name:`node-pty`,version:`1.1.0`,license:`MIT`,homepage:`https://github.com/microsoft/node-pty`},{name:`pdf-parse`,version:`2.4.5`,license:`Apache-2.0`,homepage:`https://mehmet-kozan.github.io/pdf-parse/`},{name:`playwright-core`,version:`1.63.0`,license:`Apache-2.0`,homepage:`https://playwright.dev`},{name:`postal-mime`,version:`4.0.2`,license:`MIT-0`,homepage:`https://postal-mime.postalsys.com`},{name:`rfc6902`,version:`5.3.0`,license:`MIT`,homepage:`https://github.com/chbrown/rfc6902`},{name:`turndown`,version:`7.2.4`,license:`MIT`,homepage:`https://github.com/mixmark-io/turndown#readme`}]},{id:`apps/web`,kind:`app`,label:`web`,packages:[{name:`@dagrejs/dagre`,version:`3.1.1`,license:`MIT`,homepage:`https://github.com/dagrejs/dagre#readme`},{name:`@tanstack/react-query`,version:`5.104.0`,license:`MIT`,homepage:`https://tanstack.com/query`},{name:`@xterm/addon-fit`,version:`0.11.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/addon-web-links`,version:`0.12.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js/tree/master#readme`},{name:`@xterm/xterm`,version:`6.0.0`,license:`MIT`,homepage:`https://github.com/xtermjs/xterm.js#readme`},{name:`@xyflow/react`,version:`12.12.0`,license:`MIT`,homepage:`https://reactflow.dev`},{name:`dompurify`,version:`3.4.16`,license:`(MPL-2.0 OR Apache-2.0)`,homepage:`https://github.com/cure53/DOMPurify`},{name:`lucide-react`,version:`1.49.0`,license:`ISC`,homepage:`https://lucide.dev`},{name:`qr-scanner`,version:`1.4.2`,license:`MIT`,homepage:`https://github.com/nimiq/qr-scanner#readme`},{name:`react-dom`,version:`19.3.0`,license:`MIT`,homepage:`https://react.dev/`},{name:`react-router`,version:`7.18.4`,license:`MIT`,homepage:`https://github.com/remix-run/react-router#readme`},{name:`uqr`,version:`0.1.3`,license:`MIT`,homepage:`https://github.com/unjs/uqr#readme`}]}]};export{e as default};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import{a as e,n as t,t as n}from"./jsx-runtime-D3jfb0Ew.js";import{a as r,c as i,s as a}from"./api-Bf-l9Sd8.js";import{t as o}from"./createLucideIcon-q3MZMmnf.js";import{t as s}from"./check-CUpby_J9.js";import{n as c}from"./plus-Du-Jx8aI.js";import{n as l}from"./mic-Bvz4mA2j.js";import{d as u,h as d,m as f,y as p}from"./ui-BT0Y_Hci.js";import{y as m}from"./index-BR5ELbeZ.js";var ee={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};ee.node;var te=o(ee),ne={name:`film`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]};ne.node;var re=o(ne),ie={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};ie.node;var ae=o(ie),h={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};h.node;var oe=o(h),se={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};se.node;var ce=o(se),g={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};g.node;var le=o(g),ue={name:`share`,size:24,node:[[`path`,{d:`M12 2v13`,key:`1km8f5`}],[`path`,{d:`m16 6-4-4-4 4`,key:`13yo43`}],[`path`,{d:`M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8`,key:`1b2hhj`}]]};ue.node;var de=o(ue),fe={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};fe.node;var pe=o(fe),me={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};me.node;var he=o(me),_=e(t(),1);function ge(){if(typeof window>`u`)return null;let e=window.engentyApp;return e&&typeof e.call==`function`&&Array.isArray(e.can)?e:null}var _e=ge(),ve=_e!==null||typeof window<`u`&&new URLSearchParams(window.location.search).get(`app`)===`1`;ve&&typeof document<`u`&&document.documentElement.classList.add(`in-app`);var v=e=>_e?.can.includes(e)===!0;function ye(e,t){return _e&&v(e)?_e.call(e,t):Promise.reject(Error(`the app cannot ${e}`))}function be(e,t){v(e)&&ye(e,t).catch(()=>void 0)}function y(e,t,n){return v(`download`)?(e.preventDefault(),ye(`download`,{url:new URL(t,window.location.href).href,filename:n}).catch(()=>void 0),!0):!1}var xe=e=>`engenty-wizards://w?url=${encodeURIComponent(e)}`,Se=typeof window<`u`&&window.matchMedia?.(`(pointer: coarse)`).matches===!0,Ce=typeof navigator<`u`&&!!navigator.mediaDevices?.getUserMedia;function we(){(0,_.useEffect)(()=>{let e=window.visualViewport;if(!e)return;let t=document.documentElement,n=()=>{let n=e.scale>1.01?0:window.innerHeight-e.height-e.offsetTop,r=n>80;t.style.setProperty(`--kb`,r?`${Math.round(n)}px`:`0px`),t.classList.toggle(`keyboard-open`,r)};return n(),e.addEventListener(`resize`,n),e.addEventListener(`scroll`,n),()=>{e.removeEventListener(`resize`,n),e.removeEventListener(`scroll`,n),t.style.removeProperty(`--kb`),t.classList.remove(`keyboard-open`)}},[])}function Te(e){let[t,n]=(0,_.useState)(!1);return(0,_.useEffect)(()=>{if(e&&v(`keepAwake`))return be(`keepAwake`,!0),n(!0),()=>{be(`keepAwake`,!1),n(!1)};if(!e||!(`wakeLock`in navigator))return;let t=null,r=!1,i=async()=>{if(!(r||t||document.visibilityState!==`visible`))try{let e=await navigator.wakeLock.request(`screen`);if(r){e.release().catch(()=>void 0);return}t=e,n(!0),e.addEventListener(`release`,()=>{t===e&&(t=null,n(!1))})}catch{}};return i(),document.addEventListener(`visibilitychange`,i),()=>{r=!0,document.removeEventListener(`visibilitychange`,i),t?.release().catch(()=>void 0),t=null,n(!1)}},[e]),t}var Ee=`wz.notify`,De=new Set,Oe=null;function ke(){try{return localStorage.getItem(Ee)===`1`}catch{return!1}}function b(e){try{e?localStorage.setItem(Ee,`1`):localStorage.removeItem(Ee)}catch{}for(let e of De)e()}var x=typeof window<`u`&&`Notification`in window,S=null;function Ae(){return ke()?v(`notify`)?S===!1?`quiet`:`on`:x&&Notification.permission===`granted`?`on`:`quiet`:`off`}function C(){return(0,_.useSyncExternalStore)(e=>(De.add(e),()=>De.delete(e)),Ae,()=>`off`)}function je(){return v(`notify`)?S===!1:x&&Notification.permission===`denied`}async function Me(){if(b(!0),v(`notify`)){S=!v(`notifyPermission`)||await ye(`notifyPermission`).catch(()=>!1);for(let e of De)e();return Ae()}try{Oe??=new AudioContext,Oe.resume()}catch{Oe=null}if(x&&Notification.permission==="default")try{await Notification.requestPermission()}catch{}x&&Notification.permission===`granted`&&await navigator.serviceWorker?.register(`${r}/sw.js`).catch(()=>void 0);for(let e of De)e();return Ae()}function w(){b(!1)}function Ne(){let e=Oe;if(e?.state!==`running`)return;let t=e.currentTime;for(let[n,r]of[660,880].entries()){let i=e.createOscillator(),a=e.createGain();i.frequency.value=r,a.gain.setValueAtTime(0,t+n*.16),a.gain.linearRampToValueAtTime(.18,t+n*.16+.02),a.gain.exponentialRampToValueAtTime(.001,t+n*.16+.32),i.connect(a).connect(e.destination),i.start(t+n*.16),i.stop(t+n*.16+.34)}}async function Pe(e){if(!ke())return;if(v(`notify`)){be(`notify`,e);return}if(document.visibilityState===`visible`){Ne(),navigator.vibrate?.([120,60,120]);return}if(!x||Notification.permission!==`granted`)return;let t={body:e.body,tag:e.tag,icon:a(`icons/icon-192.png`),badge:a(`icons/icon-192.png`),data:{url:location.href}};try{let n=await navigator.serviceWorker?.getRegistration();if(n?.active){await n.showNotification(e.title,t);return}}catch{}try{new Notification(e.title,t)}catch{}}function Fe(){if(typeof navigator>`u`||!navigator.canShare)return!1;try{return navigator.canShare({files:[new File([`x`],`x.pdf`,{type:`application/pdf`})]})}catch{return!1}}function Ie(e,t){this.v=e,this.k=t}function T(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function E(e){if(Array.isArray(e))return e}function Le(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Re(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ze(e,t){return E(e)||Le(e,t)||Be(e,t)||Re()}function Be(e,t){if(e){if(typeof e==`string`)return T(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}function Ve(e){var t,n;function r(t,n){try{var a=e[t](n),o=a.value,s=o instanceof Ie;Promise.resolve(s?o.v:o).then(function(n){if(s){var c=t===`return`&&o.k?t:`next`;if(!o.k||n.done)return r(c,n);n=e[c](n).value}i(!!a.done,n)},function(e){r(`throw`,e)})}catch(e){i(2,e)}}function i(e,i){e===2?t.reject(i):t.resolve({value:i,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise(function(a,o){var s={key:e,arg:i,resolve:a,reject:o,next:null};n?n=n.next=s:(t=n=s,r(e,i))})},typeof e.return!=`function`&&(this.return=void 0)}Ve.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},Ve.prototype.next=function(e){return this._invoke(`next`,e)},Ve.prototype.throw=function(e){return this._invoke(`throw`,e)},Ve.prototype.return=function(e){return this._invoke(`return`,e)};var He=Object.entries,Ue=Object.setPrototypeOf,We=Object.isFrozen,Ge=Object.getPrototypeOf,Ke=Object.getOwnPropertyDescriptor,D=Object.freeze,O=Object.seal,qe=Object.create,Je=typeof Reflect<`u`&&Reflect,Ye=Je.apply,Xe=Je.construct;D||=function(e){return e},O||=function(e){return e},Ye||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},Xe||=function(e){return new e(...[...arguments].slice(1))};var Ze=j(Array.prototype.forEach);Array.prototype.indexOf;var Qe=j(Array.prototype.lastIndexOf),$e=j(Array.prototype.pop),et=j(Array.prototype.push);Array.prototype.slice;var tt=j(Array.prototype.splice),nt=Array.isArray,rt=j(String.prototype.toLowerCase),it=j(String.prototype.toString),at=j(String.prototype.match),ot=j(String.prototype.replace),st=j(String.prototype.indexOf),ct=j(String.prototype.trim),lt=j(Number.prototype.toString),ut=j(Boolean.prototype.toString),dt=typeof BigInt>`u`?null:j(BigInt.prototype.toString),ft=typeof Symbol>`u`?null:j(Symbol.prototype.toString),k=j(Object.prototype.hasOwnProperty),pt=j(Object.prototype.toString),A=j(RegExp.prototype.test),mt=ht(TypeError);function j(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return Ye(e,t,n)}}function ht(e){return function(){return Xe(e,[...arguments])}}function M(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:rt;if(Ue&&Ue(e,null),!nt(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(We(t)||(t[r]=e),i=e)}e[i]=!0}return e}function gt(e){for(let t=0;t<e.length;t++)k(e,t)||(e[t]=null);return e}function N(e){let t=qe(null);for(let r of He(e)){var n=ze(r,2);let i=n[0],a=n[1];k(e,i)&&(t[i]=nt(a)?gt(a):a&&typeof a==`object`&&a.constructor===Object?N(a):a)}return t}function _t(e){switch(typeof e){case`string`:return e;case`number`:return lt(e);case`boolean`:return ut(e);case`bigint`:return dt?dt(e):`0`;case`symbol`:return ft?ft(e):`Symbol()`;case`undefined`:return pt(e);case`function`:case`object`:{if(e===null)return pt(e);let t=e,n=P(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:pt(e)}return pt(e)}default:return pt(e)}}function P(e,t){for(;e!==null;){let n=Ke(e,t);if(n){if(n.get)return j(n.get);if(typeof n.value==`function`)return j(n.value)}e=Ge(e)}function n(){return null}return n}function vt(e){try{return A(e,``),!0}catch{return!1}}var yt=D(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),bt=D(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),xt=D([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),St=D([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ct=D(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),wt=D([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Tt=D([`#text`]),Et=D(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Dt=D(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Ot=D(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),kt=D([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),At=O(/{{[\w\W]*|^[\w\W]*}}/g),jt=O(/<%[\w\W]*|^[\w\W]*%>/g),Mt=O(/\${[\w\W]*/g),Nt=O(/^data-[\-\w.\u00B7-\uFFFF]+$/),Pt=O(/^aria-[\-\w]+$/),Ft=O(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),It=O(/^(?:\w+script|data):/i),Lt=O(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Rt=O(/^html$/i),zt=O(/^[a-z][.\w]*(-[.\w]+)+$/i),Bt=O(/<[/\w!]/g),Vt=O(/<[/\w]/g),Ht=O(/<\/no(script|embed|frames)/i),Ut=O(/\/>/i),F={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Wt=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],Gt=D(M({},Wt)),Kt=function(){let e={};return Ze(Wt,t=>{e[t]=O(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),D(e)}(),qt=function(){return typeof window>`u`?null:window},Jt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},Yt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},I=function(e,t,n,r){return k(e,t)&&nt(e[t])?M(r.base?N(r.base):{},e[t],r.transform):n},Xt=function(e,t,n){let r=k(e,t)?e[t]:void 0;return r&&typeof r==`object`?N(r):n()};function Zt(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qt(),t=e=>Zt(e);if(t.version=`3.4.16`,t.removed=[],!e||!e.document||e.document.nodeType!==F.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=P(d,`cloneNode`),p=P(d,`remove`),m=P(d,`removeAttributeNode`),ee=P(d,`nextSibling`),te=P(d,`childNodes`),ne=P(d,`parentNode`),re=P(d,`shadowRoot`),ie=P(d,`attributes`),ae=o&&o.prototype?P(o.prototype,`nodeType`):null,h=o&&o.prototype?P(o.prototype,`nodeName`):null,oe=o&&o.prototype?P(o.prototype,`ownerDocument`):null,se=function(e){return ae?ae(e):e.nodeType},ce=function(e){return h?h(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let g,le=``,ue,de=!1,fe=0,pe=function(){if(fe>0)throw mt(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},me=function(e){pe(),fe++;try{return g.createHTML(e)}finally{fe--}},he=function(e){pe(),fe++;try{return g.createScriptURL(e)}finally{fe--}},_=function(){return de||=(ue=Jt(u,i),!0),ue},ge=n,_e=ge.implementation,ve=ge.createNodeIterator,v=ge.createDocumentFragment,ye=ge.getElementsByTagName,be=r.importNode,y=Yt();t.isSupported=typeof He==`function`&&typeof ne==`function`&&_e&&_e.createHTMLDocument!==void 0;let xe=At,Se=jt,Ce=Mt,we=Nt,Te=Pt,Ee=It,De=Lt,Oe=zt,ke=Ft,b=null,x=M({},[...yt,...bt,...xt,...Ct,...Tt]),S=null,Ae=M({},[...Et,...Dt,...Ot,...kt]),C=Object.seal(qe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,Me=null,w=Object.seal(qe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ne=!0,Pe=!0,Fe=!1,Ie=!0,T=!1,E=!0,Le=!1,Re=!1,ze=null,Be=null,Ve=!1,Ue=!1,We=!1,Ge=!1,Ke=!0,Je=!1,Ye=`user-content-`,Xe=!0,lt=!1,ut={},dt=null,ft=M({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),pt=null,j=M({},[`audio`,`video`,`img`,`source`,`image`,`track`]),ht=null,gt=M({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Wt=`http://www.w3.org/1998/Math/MathML`,Qt=`http://www.w3.org/2000/svg`,L=`http://www.w3.org/1999/xhtml`,R=L,$t=!1,z=null,en=M({},[Wt,Qt,L],it),B=D([`mi`,`mo`,`mn`,`ms`,`mtext`]),tn=M({},B),V=D([`annotation-xml`]),nn=M({},V),rn=M({},[`title`,`style`,`font`,`a`,`script`]),an=null,on=[`application/xhtml+xml`,`text/html`],H=null,U=null,sn=n.createElement(`form`),cn=function(e){return e instanceof RegExp||e instanceof Function},ln=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(U&&U===e)return;(!e||typeof e!=`object`)&&(e={}),e=N(e),an=on.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,H=an===`application/xhtml+xml`?it:rt,b=I(e,`ALLOWED_TAGS`,x,{transform:H}),S=I(e,`ALLOWED_ATTR`,Ae,{transform:H}),z=I(e,`ALLOWED_NAMESPACES`,en,{transform:it}),ht=I(e,`ADD_URI_SAFE_ATTR`,gt,{transform:H,base:gt}),pt=I(e,`ADD_DATA_URI_TAGS`,j,{transform:H,base:j}),dt=I(e,`FORBID_CONTENTS`,ft,{transform:H}),je=I(e,`FORBID_TAGS`,N({}),{transform:H}),Me=I(e,`FORBID_ATTR`,N({}),{transform:H}),ut=k(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?N(e.USE_PROFILES):e.USE_PROFILES:!1,Ne=e.ALLOW_ARIA_ATTR!==!1,Pe=e.ALLOW_DATA_ATTR!==!1,Fe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ie=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,T=e.SAFE_FOR_TEMPLATES||!1,E=e.SAFE_FOR_XML!==!1,Le=e.WHOLE_DOCUMENT||!1,Ue=e.RETURN_DOM||!1,We=e.RETURN_DOM_FRAGMENT||!1,Ge=e.RETURN_TRUSTED_TYPE||!1,Ve=e.FORCE_BODY||!1,Ke=e.SANITIZE_DOM!==!1,Je=e.SANITIZE_NAMED_PROPS||!1,Xe=e.KEEP_CONTENT!==!1,lt=e.IN_PLACE||!1,ke=vt(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Ft,R=typeof e.NAMESPACE==`string`?e.NAMESPACE:L,tn=Xt(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>M({},B)),nn=Xt(e,`HTML_INTEGRATION_POINTS`,()=>M({},V));let t=Xt(e,`CUSTOM_ELEMENT_HANDLING`,()=>qe(null));if(C=qe(null),k(t,`tagNameCheck`)&&cn(t.tagNameCheck)&&(C.tagNameCheck=t.tagNameCheck),k(t,`attributeNameCheck`)&&cn(t.attributeNameCheck)&&(C.attributeNameCheck=t.attributeNameCheck),k(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(C.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),O(C),T&&(Pe=!1),We&&(Ue=!0),ut&&(b=M({},Tt),S=qe(null),ut.html===!0&&(M(b,yt),M(S,Et)),ut.svg===!0&&(M(b,bt),M(S,Dt),M(S,kt)),ut.svgFilters===!0&&(M(b,xt),M(S,Dt),M(S,kt)),ut.mathMl===!0&&(M(b,Ct),M(S,Ot),M(S,kt))),w.tagCheck=null,w.attributeCheck=null,k(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?w.tagCheck=e.ADD_TAGS:nt(e.ADD_TAGS)&&(b===x&&(b=N(b)),M(b,e.ADD_TAGS,H))),k(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?w.attributeCheck=e.ADD_ATTR:nt(e.ADD_ATTR)&&(S===Ae&&(S=N(S)),M(S,e.ADD_ATTR,H))),k(e,`ADD_FORBID_CONTENTS`)&&nt(e.ADD_FORBID_CONTENTS)&&(dt===ft&&(dt=N(dt)),M(dt,e.ADD_FORBID_CONTENTS,H)),Xe&&(b[`#text`]=!0),Le&&M(b,[`html`,`head`,`body`]),b.table&&(M(b,[`tbody`]),delete je.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw mt(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw mt(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=g;g=e.TRUSTED_TYPES_POLICY;try{le=me(``)}catch(e){throw g=t,e}}else e.TRUSTED_TYPES_POLICY===null?(g=void 0,le=``):(g===void 0&&(g=_()),g&&typeof le==`string`&&(le=me(``)));D&&D(e),U=e},un=M({},[...bt,...xt,...St]),dn=M({},[...Ct,...wt]),fn=function(e,t,n){return t.namespaceURI===L?e===`svg`:t.namespaceURI===Wt?e===`svg`&&(n===`annotation-xml`||tn[n]):!!un[e]},pn=function(e,t,n){return t.namespaceURI===L?e===`math`:t.namespaceURI===Qt?e===`math`&&nn[n]:!!dn[e]},mn=function(e,t,n){return t.namespaceURI===Qt&&!nn[n]||t.namespaceURI===Wt&&!tn[n]?!1:!dn[e]&&(rn[e]||!un[e])},hn=function(e){let t=ne(e);(!t||!t.tagName)&&(t={namespaceURI:R,tagName:`template`});let n=rt(e.tagName),r=rt(t.tagName);return z[e.namespaceURI]?e.namespaceURI===Qt?fn(n,t,r):e.namespaceURI===Wt?pn(n,t,r):e.namespaceURI===L?mn(n,t,r):!!(an===`application/xhtml+xml`&&z[e.namespaceURI]):!1},W=function(e){et(t.removed,{element:e});try{ne(e).removeChild(e)}catch{if(p(e),!ne(e))throw mt(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},gn=function(e,t,n){try{m(e,t)}catch{try{e.removeAttribute(n)}catch{}}},_n=function(e){yn(e);let t=te(e);if(t){let e=[];Ze(t,t=>{et(e,t)}),Ze(e,e=>{try{p(e)}catch{}})}let n=ie(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&gn(e,r,i)}},G=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}et(t.removed,{attribute:r||null,from:n});try{r?m(n,r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(Ue||We)try{W(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},vn=function(e){let t=ie(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||S[H(i)]||gn(e,r,i)}},yn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();se(e)===F.element&&vn(e);let n=te(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},bn=function(e,t){return E?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},xn=function(e){if(!E)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=se(e);if(n===F.processingInstruction||n===F.comment&&A(Vt,e.data)){try{p(e)}catch{}continue}if(n===F.element){let t=e,n=H(ce(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&bn(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=te(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},Sn=function(e){let t=null,r=null;if(Ve)e=`<remove></remove>`+e;else{let t=at(e,/^[\r\n\t ]+/);r=t&&t[0]}an===`application/xhtml+xml`&&R===L&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=g?me(e):e;if(R===L)try{t=new l().parseFromString(i,an)}catch{}if(!t||!t.documentElement){t=_e.createDocument(R,`template`,null);try{t.documentElement.innerHTML=$t?le:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),R===L?ye.call(t,Le?`html`:`body`)[0]:Le?t.documentElement:a},Cn=function(e){let t=oe?oe(e):e.ownerDocument;return ve.call(t||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},wn=function(e){return e=ot(e,xe,` `),e=ot(e,Se,` `),e=ot(e,Ce,` `),e},Tn=function(e){e.normalize();let t=oe?oe(e):e.ownerDocument,n=ve.call(t||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=wn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&Ze(i,e=>{K(e.content)&&Tn(e.content)})},En=function(e){let t=h?h(e):null;return typeof t!=`string`||H(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ie(e)||typeof e.removeAttribute!=`function`||typeof e.removeAttributeNode!=`function`||typeof e.getAttributeNode!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==ae(e)||e.childNodes!==te(e)},K=function(e){if(!ae||typeof e!=`object`||!e)return!1;try{return ae(e)===F.documentFragment}catch{return!1}},q=function(e){if(!ae||typeof e!=`object`||!e)return!1;try{return typeof ae(e)==`number`}catch{return!1}};function J(e,n,r){e.length!==0&&Ze(e,e=>{e.call(t,n,r,U)})}let Dn=function(e,t){return!!(E&&e.hasChildNodes()&&!q(e.firstElementChild)&&A(Bt,e.textContent)&&A(Bt,e.innerHTML)||E&&e.namespaceURI===L&&Gt[t]&&(q(e.firstElementChild)||typeof e.textContent==`string`&&A(Kt[t],e.textContent))||e.nodeType===F.processingInstruction||E&&e.nodeType===F.comment&&A(Vt,e.data))},On=function(e,t){return e instanceof RegExp?A(e,t):e instanceof Function&&!!e(t,...[...arguments].slice(2))},kn=function(e,t,n){if(!je[t]&&Fn(t)&&On(C.tagNameCheck,t))return!1;if(Xe&&!dt[t]){let t=ne(e),r=te(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?f(r[a],!0):r[a];t.insertBefore(i,ee(e))}}}return W(e),!0},An=function(e,t,n,r){return e.length===0?t:t===n||t===r?N(t):t},jn=function(e,t){return e===t||ne(e)!==null?!1:(lt&&yn(e),!0)},Mn=function(e,n){if(J(y.beforeSanitizeElements,e,null),jn(e,n))return!0;if(En(e))return W(e),!0;let r=H(ce(e));if(b=An(y.uponSanitizeElement,b,x,ze),J(y.uponSanitizeElement,e,{tagName:r,allowedTags:b}),jn(e,n))return!0;if(Dn(e,r))return W(e),!0;if(je[r]||!(w.tagCheck instanceof Function&&w.tagCheck(r))&&!b[r]){let t=kn(e,r,n);return t===!1&&(J(y.afterSanitizeElements,e,null),jn(e,n))?!0:t}if(se(e)===F.element&&!hn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&A(Ht,e.innerHTML))return W(e),!0;if(T&&e.nodeType===F.text){let n=wn(e.textContent);e.textContent!==n&&(et(t.removed,{element:e.cloneNode()}),e.textContent=n)}return J(y.afterSanitizeElements,e,null),jn(e,n)},Nn=function(e,t,r){if(Me[t]||bn(t,e)||Ke&&(t===`id`||t===`name`)&&(r in n||r in sn))return!1;let i=S[t]||w.attributeCheck instanceof Function&&w.attributeCheck(t,e);return Pe&&A(we,t)||Ne&&A(Te,t)?!0:i?ht[t]||A(ke,ot(r,De,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&st(r,`data:`)===0&&pt[e]||Fe&&!A(Ee,ot(r,De,``))?!0:!r:Fn(e)&&On(C.tagNameCheck,e)&&On(C.attributeNameCheck,t,e)||t===`is`&&C.allowCustomizedBuiltInElements&&On(C.tagNameCheck,r)},Pn=M({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Fn=function(e){return!Pn[rt(e)]&&A(Oe,e)},In=function(e,t,n,r){if(g&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return me(r);case`TrustedScriptURL`:return he(r)}return r},Ln=function(e,t,n,r){try{return n?e.setAttributeNS(n,t,r):e.setAttribute(t,r),!En(e)||(W(e),!1)}catch{return G(t,e),!1}},Rn=function(e,n){if(J(y.beforeSanitizeAttributes,e,null),jn(e,n))return;let r=e.attributes;if(!r||En(e))return;S=An(y.uponSanitizeAttribute,S,Ae,Be);let i={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:S,forceKeepAttr:void 0},a=r.length,o=H(e.nodeName);for(;a--;){let n=r[a],s=n.name,c=n.namespaceURI,l=n.value,u=H(s),d=l,f=s===`value`?d:ct(d),p=!1;if(i.attrName=u,i.attrValue=f,i.keepAttr=!0,i.forceKeepAttr=void 0,J(y.uponSanitizeAttribute,e,i),f=i.attrValue,Je&&(u===`id`||u===`name`)&&st(f,Ye)!==0&&(G(s,e,n),f=Ye+f,p=!0),E&&A(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){G(s,e,n);continue}if(u===`attributename`&&at(f,`href`)){G(s,e,n);continue}if(!i.forceKeepAttr){if(!i.keepAttr){G(s,e,n);continue}if(!Ie&&A(Ut,f)){G(s,e,n);continue}if(T&&(f=wn(f)),!Nn(o,u,f)){G(s,e,n);continue}f=In(o,u,c,f),f!==d&&Ln(e,s,c,f)&&p&&$e(t.removed)}}J(y.afterSanitizeAttributes,e,null),jn(e,n)},zn=function(e){let t=null,n=Cn(e);for(J(y.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(J(y.uponSanitizeShadowNode,t,null),Mn(t,e),Rn(t,e),K(t.content)&&zn(t.content),se(t)===F.element){let e=re(t);K(e)&&(Bn(e),zn(e))}J(y.afterSanitizeShadowDOM,e,null)},Bn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){zn(e.shadow);continue}let n=e.node,r=se(n)===F.element,i=te(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=h?h(n):null;if(typeof e==`string`&&H(e)===`template`){let e=n.content;K(e)&&t.push({node:e,shadow:null})}}if(r){let e=re(n);K(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if($t=!e,$t&&(e=`<!-->`),typeof e!=`string`&&!q(e)&&(e=_t(e),typeof e!=`string`))throw mt(`dirty is not a string, aborting`);if(!t.isSupported)return e;Re?(b=ze,S=Be):ln(n),(y.uponSanitizeElement.length>0||y.uponSanitizeAttribute.length>0)&&(b=N(b)),y.uponSanitizeAttribute.length>0&&(S=N(S)),t.removed=[];let c=lt&&typeof e!=`string`&&q(e);if(c){xn(e);let t=ce(e);if(typeof t==`string`){let n=H(t);if(!b[n]||je[n])throw _n(e),mt(`root node is forbidden and cannot be sanitized in-place`)}if(En(e))throw _n(e),mt(`root node is clobbered and cannot be sanitized in-place`);try{Bn(e)}catch(t){throw _n(e),t}}else if(q(e))i=Sn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===F.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Bn(i);else{if(!Ue&&!T&&!Le&&e.indexOf(`<`)===-1)return g&&Ge?me(e):e;if(i=Sn(e),!i)return Ue?null:Ge?le:``}i&&Ve&&W(i.firstChild);let l=c?e:i;try{let e=Cn(l);for(;o=e.nextNode();)Mn(o,l),Rn(o,l),K(o.content)&&zn(o.content)}catch(n){throw c&&(_n(e),Ze(t.removed,e=>{e.element&&yn(e.element)})),n}if(c){let n=!1;if(Ze(t.removed,t=>{t.element&&(t.element===e&&(n=!0),yn(t.element))}),n)throw mt(`a node selected for removal could not be safely returned; refusing to sanitize in place`);return T&&Tn(e),e}if(Ue){if(T&&Tn(i),We)for(s=v.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(S.shadowroot||S.shadowrootmode)&&(s=be.call(r,s,!0)),s}let u=Le?i.outerHTML:i.innerHTML;return Le&&b[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&A(Rt,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
3
|
+
`+u),T&&(u=wn(u)),g&&Ge?me(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ln(e),Re=!0,ze=b,Be=S},t.clearConfig=function(){U=null,Re=!1,ze=null,Be=null,g=ue,le=``},t.isValidAttribute=function(e,t,n){U||ln({});let r=H(e),i=H(t);return Nn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&k(y,e)&&et(y[e],t)},t.removeHook=function(e,t){if(k(y,e)){if(t!==void 0){let n=Qe(y[e],t);return n===-1?void 0:tt(y[e],n,1)[0]}return $e(y[e])}},t.removeHooks=function(e){k(y,e)&&(y[e]=[])},t.removeAllHooks=function(){y=Yt()},t}var Qt=Zt();function L(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=L();function $t(e){R=e}var z={exec:()=>null};function en(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function B(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(V.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var tn=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),V={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:en(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:en(e=>RegExp(`^ {0,${e}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:en(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:en(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:en(e=>RegExp(`^ {0,${e}}(?:</?(?:${hn})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,`i`)),blockquoteBeginRegex:en(e=>RegExp(`^ {0,${e}}>`))},nn=/^(?:[ \t]*(?:\n|$))+/,rn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,an=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,on=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,H=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,U=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,sn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,cn=B(sn).replace(/bull/g,U).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),ln=B(sn).replace(/bull/g,U).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),un=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,dn=/^[^\n]+/,fn=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,pn=B(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,fn).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),mn=B(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,U).getRegex(),hn=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gn=B(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,W).replace(`tag`,hn).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),_n=e=>B(un).replace(`hr`,on).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,hn).getRegex(),G=_n(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),vn=_n(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),yn={blockquote:B(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,vn).getRegex(),code:rn,def:pn,fences:an,heading:H,hr:on,html:gn,lheading:cn,list:mn,newline:nn,paragraph:G,table:z,text:dn},bn=B(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,on).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,hn).getRegex(),xn={...yn,lheading:ln,table:bn,paragraph:B(un).replace(`hr`,on).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,bn).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,hn).getRegex()},Sn={...yn,html:B(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,W).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:B(un).replace(`hr`,on).replace(`heading`,` *#{1,6} *[^
|
|
4
|
+
]`).replace(`lheading`,cn).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Cn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Tn=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,En=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,K=/[\p{P}\p{S}]/u,q=/[\s\p{P}\p{S}]/u,J=/[^\s\p{P}\p{S}]/u,Dn=B(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,q).getRegex(),On=/[\p{Pi}\p{Ps}"']/u,kn=/(?!~)[\p{P}\p{S}]/u,An=/(?!~)[\s\p{P}\p{S}]/u,jn=/(?:[^\s\p{P}\p{S}]|~)/u,Mn=B(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,tn?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Nn=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Pn=B(Nn,`u`).replace(/punct/g,K).getRegex(),Fn=B(Nn,`u`).replace(/punct/g,kn).getRegex(),In=B(/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,`u`).replace(/openQuote/g,On).replace(/punct/g,K).getRegex(),Ln=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Rn=B(Ln,`gu`).replace(/notPunctSpace/g,J).replace(/punctSpace/g,q).replace(/punct/g,K).getRegex(),zn=B(Ln,`gu`).replace(/notPunctSpace/g,jn).replace(/punctSpace/g,An).replace(/punct/g,kn).getRegex(),Bn=B(`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,J).replace(/punctSpace/g,q).replace(/punct/g,K).getRegex(),Vn=B(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,J).replace(/punctSpace/g,q).replace(/punct/g,K).getRegex(),Hn=B(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,J).replace(/punctSpace/g,q).replace(/punct/g,K).getRegex(),Un=B(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,K).getRegex(),Wn=B(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,J).replace(/punctSpace/g,q).replace(/punct/g,K).getRegex(),Gn=B(/\\(punct)/,`gu`).replace(/punct/g,K).getRegex(),Kn=B(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),qn=B(W).replace(`(?:-->|$)`,`-->`).getRegex(),Jn=B(`^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,qn).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yn=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,Xn=B(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace(`brackets`,Yn).getRegex(),Zn=B(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,Xn).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qn=B(/^!?\[(label)\]\[(ref)\]/).replace(`label`,Xn).replace(`ref`,fn).getRegex(),$n=B(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,fn).getRegex(),er=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,tr=B(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace(`brackets`,Yn).getRegex(),nr=B(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,B(/^!?\[(label)\]\[(ref)\]/).replace(`label`,tr).replace(`ref`,er).getRegex()).replace(`nolink`,B(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,er).getRegex()).getRegex(),rr=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ir=B(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),ar={_backpedal:z,anyPunctuation:Gn,autolink:Kn,blockSkip:Mn,br:Tn,code:wn,del:z,delLDelim:z,delRDelim:z,emStrongLDelim:Pn,emStrongRDelimAst:Rn,emStrongRDelimUnd:Vn,escape:Cn,link:Zn,nolink:$n,punctuation:Dn,reflink:Qn,reflinkSearch:nr,tag:Jn,text:En,url:z},or={...ar,emStrongLDelim:In,emStrongRDelimAst:Bn,emStrongRDelimUnd:Hn,link:B(/^!?\[(label)\]\((.*?)\)/).replace(`label`,Xn).getRegex(),reflink:B(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,Xn).getRegex()},sr={...ar,emStrongRDelimAst:zn,emStrongLDelim:Fn,delLDelim:Un,delRDelim:Wn,url:B(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`emailProtocol`,ir).replace(`protocol`,rr).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:B(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace(`protocol`,rr).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},cr={...sr,br:B(Tn).replace(`{2,}`,`*`).getRegex(),text:B(sr.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},lr={normal:yn,gfm:xn,pedantic:Sn},ur={normal:ar,gfm:sr,breaks:cr,pedantic:or},dr={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},fr=e=>dr[e];function Y(e,t){if(t){if(V.escapeTest.test(e))return e.replace(V.escapeReplace,fr)}else if(V.escapeTestNoEncode.test(e))return e.replace(V.escapeReplaceNoEncode,fr);return e}function pr(e){return e.replace(V.numericCharacterReference,(e,t,n)=>{let r=t===void 0?Number.parseInt(n,16):Number.parseInt(t,10);return r===0||r>1114111||r>=55296&&r<=57343?`�`:String.fromCodePoint(r)})}function mr(e){try{e=encodeURI(e).replace(V.percentDecode,`%`)}catch{return null}return e}function hr(e,t){let n=e.replace(V.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(V.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(V.slashPipe,`|`);return n}function gr(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function _r(e){let t=e.split(`
|
|
5
|
+
`),n=t.length-1;for(;n>=0&&V.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
6
|
+
`)}function vr(e){return e.trim().toLowerCase().toUpperCase().toLowerCase()}function yr(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function br(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function xr(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`),c=e[0].charAt(0)===`!`;r.state.inLink=!0;let l=r.state.linkEmitted,u=r.state.inRawBlock;r.state.linkEmitted=!1;let d=r.inlineTokens(s),f=r.state.linkEmitted;if(r.state.linkEmitted=l,r.state.inLink=!1,!c){if(f){r.state.inRawBlock=u;return}r.state.linkEmitted=!0}return{type:c?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:d}}function Sr(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
7
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return e.slice(Math.min(r.length,i.length))}).join(`
|
|
8
|
+
`)}function Cr(e,t,n,r){if(!t.includes(`<`))return!1;for(let i=0;i<t.length;i++){if(t[i]===`\\`){i++;continue}if(t[i]==="`"){let e=r.inline.code.exec(t.slice(i));if(e){i+=e[0].length-1;continue}}if(t[i]!==`<`)continue;let a=e.slice(n+i),o=r.inline.tag.exec(a)||r.inline.autolink.exec(a);if(o){if(o[0].length>t.length-i)return!0;i+=o[0].length-1}}return!1}var wr=class{options;rules;lexer;constructor(e){this.options=e||R}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:_r(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Sr(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=gr(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceTabChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:gr(t[0],`
|
|
9
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:gr(t[0],`
|
|
10
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=gr(t[0],`
|
|
11
|
+
`).split(`
|
|
12
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o=0;for(;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
13
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
14
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
15
|
+
${s}`:s,r=r?`${r}
|
|
16
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=e.join(`
|
|
17
|
+
`),o=t.raw+`
|
|
18
|
+
`+a.replace(this.rules.other.blockquoteSetextReplace2,``),s=this.blockquote(o);i[i.length-1]=s;let c=o.substring(s.raw.length).replace(/^\n/,``),l=c?c.split(`
|
|
19
|
+
`).length:0,d=l?e.slice(0,-l):e;d.length>0&&(n=`${n}
|
|
20
|
+
${d.join(`
|
|
21
|
+
`)}`),r=r.substring(0,r.length-t.text.length)+s.text;break}if(u?.type===`list`){let t=u,a=t.raw+`
|
|
22
|
+
`+e.join(`
|
|
23
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
24
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
25
|
+
`,1)[0],l=t[1].length,u=this.options.pedantic?br(c,l):c.replace(this.rules.other.leadingSpaceTab,e=>br(e,l)),d=e.split(`
|
|
26
|
+
`,1)[0],f=!u.trim(),p=0;if(this.options.pedantic?(p=2,s=u.trimStart()):f?p=l+1:(p=u.search(this.rules.other.nonSpaceChar),p=p>4?1:p,s=u.slice(p),p+=l),f&&this.rules.other.blankLine.test(d)&&(r+=d+`
|
|
27
|
+
`,e=e.substring(d.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(p),n=this.rules.other.hrRegex(p),i=this.rules.other.fencesBeginRegex(p),a=this.rules.other.headingBeginRegex(p),o=this.rules.other.htmlBeginRegex(p),c=this.rules.other.blockquoteBeginRegex(p);for(;e;){let l=e.split(`
|
|
28
|
+
`,1)[0],m;if(d=l,this.options.pedantic?(d=d.replace(this.rules.other.listReplaceNesting,` `),m=d):m=d.replace(this.rules.other.leadingSpaceTab,e=>e.replace(this.rules.other.tabCharGlobal,` `)),i.test(d)||a.test(d)||o.test(d)||c.test(d)||t.test(d)||n.test(d))break;if(m.search(this.rules.other.nonSpaceChar)>=p||!d.trim())s+=`
|
|
29
|
+
`+m.slice(p);else{if(f||u.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(u)||a.test(u)||n.test(u))break;s+=`
|
|
30
|
+
`+d}f=!d.trim(),r+=l+`
|
|
31
|
+
`,e=e.substring(l.length+1),u=m.slice(p)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items)if(this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]),!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}for(let e of i.items){let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=_r(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=vr(t[1]).replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:gr(t[0],`
|
|
32
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=hr(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
33
|
+
`):[],a={type:`table`,raw:gr(t[0],`
|
|
34
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(hr(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:gr(t[0],`
|
|
35
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
36
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Cr(e,t[1],n,this.rules))return;let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let e=gr(r.slice(0,-1),`\\`);if((r.length-e.length)%2==0)return}else{let e=yr(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let i=t[2],a=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(i);e&&(i=e[1],a=e[3])}else a=t[3]?t[3].slice(1,-1):``;return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(i=this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i.slice(1):i.slice(1,-1)),xr(t,{href:i&&i.replace(this.rules.inline.anyPunctuation,`$1`),title:a&&a.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=n[0].charAt(0)===`!`?2:1;if(!this.options.pedantic&&Cr(e,n[1],r,this.rules))return;let i=t[vr((n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `))];if(!i){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return xr(n,i,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let i=[...r[0]].length-1,a,o,s=i,c=0,l=r[0][0],u=n===l,d=l===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,t=t.slice(-1*e.length+i);(r=d.exec(t))!==null;){if(a=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!a)continue;if(o=[...a].length,r[3]||r[4]){s+=o;continue}if(r[5]||r[6]){if(i%3&&!((i+o)%3)){c+=o;continue}if(u)break}if(s-=o,s>0)continue;o=Math.min(o,o+s+c);let t=[...r[0]][0].length,n=e.slice(0,i+r.index+t+o);if(Math.min(i,o)%2){let e=n.slice(1,-1);return{type:`em`,raw:n,text:e,tokens:this.lexer.inlineTokens(e)}}let l=n.slice(2,-2);return{type:`strong`,raw:n,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,autolink:!0,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:e?t[0]:pr(t[0]),escaped:e}}}},X=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||R,this.options.tokenizer=this.options.tokenizer||new wr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:V,block:lr.normal,inline:ur.normal};this.options.pedantic?(t.block=lr.pedantic,t.inline=ur.pedantic):this.options.gfm&&(t.block=lr.gfm,t.inline=this.options.breaks?ur.breaks:ur.gfm),this.tokenizer.rules=t}static get rules(){return{block:lr,inline:ur}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(V.carriageReturn,`
|
|
37
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(V.tabCharGlobal,` `).replace(V.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
38
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
39
|
+
`)?``:`
|
|
40
|
+
`)+i.raw,n.text+=`
|
|
41
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
42
|
+
`)?``:`
|
|
43
|
+
`)+i.raw,n.text+=`
|
|
44
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
45
|
+
`)?``:`
|
|
46
|
+
`)+i.raw,r.text+=`
|
|
47
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
48
|
+
`)?``:`
|
|
49
|
+
`)+i.raw,n.text+=`
|
|
50
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes(`[`))return!1;let t=this.tokenizer.rules.inline.link;for(let n of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(n[0])&&e.charAt(n.index-1)!==`!`)return!0;for(let t of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let e=t[0],n=e.lastIndexOf(`[`);if(e.charAt(0)!==`!`&&Object.hasOwn(this.tokens.links,vr(e.slice(n+1,-1)))&&!(n>1&&this.linkInText(e.slice(1,n-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e;if(this.tokens.links&&e.includes(`[`)){let e=this.tokenizer.rules.inline.reflinkSearch,t=n=>{let r=n.lastIndexOf(`[`);if(!Object.hasOwn(this.tokens.links,vr(n.slice(r+1,-1))))return n;if(r>1&&n.charAt(0)!==`!`){let i=n.slice(1,r-1);if(this.linkInText(i))return`[`+i.replace(e,t)+`][`+`a`.repeat(n.length-r-2)+`]`}return`[`+`a`.repeat(n.length-2)+`]`};n=n.replace(e,t)}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,e=>`+`.repeat(e.length)),n=n.replace(this.tokenizer.rules.inline.blockSkip,(e,t,n)=>{let r=n?n.length:0;return e.slice(0,r)+`[`+`a`.repeat(e.length-r-2)+`]`}),n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let r=!1,i=``,a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(i=``),r=!1;let o;if(this.options.extensions?.inline?.some(n=>(o=n.call({lexer:this},e,t))?(e=e.substring(o.raw.length),t.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let n=t.at(-1);o.type===`text`&&n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(o=this.tokenizer.emStrong(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.del(e,n,i)){e=e.substring(o.raw.length),t.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),t.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),t.push(o);continue}let s=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(s=e.substring(0,t+1))}if(o=this.tokenizer.inlineText(s)){e=e.substring(o.raw.length),o.raw.slice(-1)!==`_`&&(i=o.raw.slice(-1)),r=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=o.raw,n.text+=o.text):t.push(o);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Tr=class{options;parser;constructor(e){this.options=e||R}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(V.notSpaceStart)?.[0],i=e?e.replace(V.endingNewline,``)+`
|
|
51
|
+
`:``;return r?`<pre><code class="language-`+Y(r)+`">`+(n?i:Y(i,!0))+`</code></pre>
|
|
52
|
+
`:`<pre><code>`+(n?i:Y(i,!0))+`</code></pre>
|
|
53
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
54
|
+
${this.parser.parse(e)}</blockquote>
|
|
55
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
56
|
+
`}hr(e){return`<hr>
|
|
57
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
58
|
+
`+r+`</`+i+`>
|
|
59
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
60
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
61
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
62
|
+
<thead>
|
|
63
|
+
`+t+`</thead>
|
|
64
|
+
`+r+`</table>
|
|
65
|
+
`}tablerow({text:e}){return`<tr>
|
|
66
|
+
${e}</tr>
|
|
67
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
68
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Y(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,text:n,tokens:r,autolink:i}){let a=i?Y(n,!0):this.parser.parseInline(r),o=mr(e);if(o===null)return a;e=Y(o,i);let s=`<a href="`+e+`"`;return t&&(s+=` title="`+Y(t)+`"`),s+=`>`+a+`</a>`,s}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=mr(e);if(i===null)return Y(n);e=i;let a=`<img src="${Y(e)}" alt="${Y(n)}"`;return t&&(a+=` title="${Y(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Y(e.text)}},Er=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Z=class e{options;renderer;textRenderer;constructor(e){this.options=e||R,this.options.renderer=this.options.renderer||new Tr,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Er}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`checkbox`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`checkbox`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Dr=class{options;block;constructor(e){this.options=e||R}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?X.lex:X.lexInline}provideParser(e=this.block){return e?Z.parse:Z.parseInline}},Or=new class{defaults=L();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Z;Renderer=Tr;TextRenderer=Er;Lexer=X;Tokenizer=wr;Hooks=Dr;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Tr(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new wr(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Dr;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Dr.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Dr.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return X.lex(e,t??this.defaults)}parser(e,t){return Z.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?X.lex:X.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?X.lex:X.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Z.parse:Z.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
69
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Y(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function Q(e,t){return Or.parse(e,t)}Q.options=Q.setOptions=function(e){return Or.setOptions(e),Q.defaults=Or.defaults,$t(Q.defaults),Q},Q.getDefaults=L,Q.defaults=R;function kr(...e){return Or.use(...e),Q.defaults=Or.defaults,$t(Q.defaults),Q}Q.use=kr,Q.walkTokens=function(e,t){return Or.walkTokens(e,t)},Q.parseInline=Or.parseInline,Q.Parser=Z,Q.parser=Z.parse,Q.Renderer=Tr,Q.TextRenderer=Er,Q.Lexer=X,Q.lexer=X.lex,Q.Tokenizer=wr,Q.Hooks=Dr,Q.parse=Q,Q.options,Q.setOptions,Q.walkTokens,Q.parseInline,Z.parse,X.lex;var $=e(n(),1);function Ar({text:e,className:t}){let n=(0,_.useMemo)(()=>Qt.sanitize(Q.parse(e,{async:!1})),[e]);return(0,$.jsx)(`div`,{className:d(`prose-zen`,t),dangerouslySetInnerHTML:{__html:n}})}function jr({src:e,page:t,height:n,fit:r}){let i=(0,_.useRef)(null),[a,o]=(0,_.useState)(0);(0,_.useEffect)(()=>{let e=i.current;if(!e)return;let t=new ResizeObserver(()=>o(e.clientWidth));return t.observe(e),o(e.clientWidth),()=>t.disconnect()},[]);let[s,c]=(0,_.useState)(null);(0,_.useEffect)(()=>{let t=!0;return fetch(e,{credentials:`include`}).then(e=>e.ok?e.text():``).then(n=>t&&c({src:e,text:n})),()=>{t=!1}},[e]);let l=t??Math.max(a,900),u=a?r?a/l:Math.min(1,a/l):1;return(0,$.jsxs)(`div`,{ref:i,className:`relative overflow-hidden rounded-lg bg-white ring-1 ring-border-soft`,style:{height:n*u},children:[s?.src===e?(0,$.jsx)(`iframe`,{title:`preview`,srcDoc:s.text,sandbox:`allow-scripts allow-popups allow-popups-to-escape-sandbox`,className:`absolute top-0 left-0 origin-top-left border-0`,style:{width:l,height:n,transform:`scale(${u})`}},e):(0,$.jsx)(`div`,{className:`absolute inset-0 animate-pulse bg-paper-2`}),(0,$.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`absolute top-3 right-3 inline-flex size-9 items-center justify-center rounded-full bg-card/90 text-ink-2 shadow-soft ring-1 ring-border-soft backdrop-blur hover:text-ink coarse:size-11`,"aria-label":p(`run.openFull`),children:(0,$.jsx)(oe,{className:`size-4`})})]})}var Mr={disc:{file:`ai`,box:566.93,x:89.28,y:100.72,w:365.49,h:365.49},generated:{file:`ai-generated`,box:1789.84,x:207.3,y:144.36,w:1384.24,h:266.41},edited:{file:`ai-modified`,box:1700.79,x:231.11,y:144.36,w:1230.56,h:266.41}};function Nr({icon:e,tone:t,size:n,className:r}){let i=Mr[e],o=n/i.h;return(0,$.jsx)(`img`,{src:a(`ai-labels/${i.file}-${t}.svg`),alt:``,draggable:!1,className:d(`pointer-events-none absolute max-w-none select-none`,r),style:{width:i.box*o,height:566.93*o,left:-i.x*o,top:-i.y*o}})}function Pr({ai:e,className:t}){let[n,r]=(0,_.useState)(!1);if(!e)return null;let i=Mr[e],a=t===`static`,o=a?[[`black`,`dark:hidden`],[`white`,`hidden dark:block`]]:[[`white`,``]];return(0,$.jsx)(`button`,{type:`button`,"aria-label":p(e===`edited`?`ai.modified`:`ai.generated`),"aria-expanded":n,"data-open":n,onClick:()=>r(e=>!e),className:d(`group block cursor-default overflow-hidden rounded-full backdrop-blur-md transition-[width] duration-200`,`w-[var(--ai-disc)] hover:w-[var(--ai-long)] focus-visible:w-[var(--ai-long)] data-[open=true]:w-[var(--ai-long)]`,a?`relative`:d(`absolute shadow-[0_1px_3px_rgba(0,0,0,0.25)]`,t??`bottom-2 left-2`)),style:{height:18,"--ai-disc":`18px`,"--ai-long":`${i.w/i.h*18}px`},children:o.map(([t,r])=>(0,$.jsxs)(`span`,{className:r,children:[(0,$.jsx)(Nr,{icon:`disc`,tone:t,size:18,className:d(`transition-opacity duration-200`,n?`opacity-0`:`opacity-100 group-hover:opacity-0 group-focus-visible:opacity-0`)}),(0,$.jsx)(Nr,{icon:e,tone:t,size:18,className:d(`transition-opacity duration-200`,n?`opacity-100`:`opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`)})]},t))})}function Fr(e,t){return e.type===`agent`?e.output.fields?.find(e=>e.id===t)?.description??t:t}function Ir({step:e,json:t}){return!t||typeof t!=`object`?(0,$.jsx)(`pre`,{className:`text-[13px]`,children:JSON.stringify(t,null,2)}):(0,$.jsx)(`div`,{className:`flex flex-col gap-4`,children:Object.entries(t).map(([t,n])=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`mb-1 font-medium text-[12px] text-ink-3 uppercase tracking-[0.06em]`,children:Fr(e,t)}),typeof n==`boolean`?(0,$.jsx)(`div`,{className:`text-[15px]`,children:p(n?`run.yes`:`run.no`)}):typeof n==`string`||typeof n==`number`?(0,$.jsx)(`div`,{className:`whitespace-pre-wrap text-[15px]`,children:String(n)}):Array.isArray(n)&&n.every(e=>typeof e!=`object`)?(0,$.jsx)(`ul`,{className:`list-disc pl-5 text-[14px]`,children:n.map((e,t)=>(0,$.jsx)(`li`,{className:`break-words`,children:String(e)},t))}):Array.isArray(n)&&n.length&&typeof n[0]==`object`?(0,$.jsx)(Lr,{rows:n}):(0,$.jsx)(`pre`,{className:`overflow-auto rounded-lg bg-paper-2 p-3 text-[12px]`,children:JSON.stringify(n,null,2)})]},t))})}function Lr({rows:e}){let t=[...new Set(e.flatMap(e=>Object.keys(e)))];return(0,$.jsx)(`div`,{className:`overflow-x-auto rounded-lg ring-1 ring-border-soft`,children:(0,$.jsxs)(`table`,{className:`w-full text-[13px]`,children:[(0,$.jsx)(`thead`,{className:`bg-paper-2 text-ink-2`,children:(0,$.jsx)(`tr`,{children:t.map(e=>(0,$.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:e},e))})}),(0,$.jsx)(`tbody`,{children:e.map((e,n)=>(0,$.jsx)(`tr`,{className:`border-border-soft border-t`,children:t.map(t=>(0,$.jsx)(`td`,{className:`px-3 py-2 tabular-nums`,children:e[t]===null||e[t]===void 0?``:String(e[t])},t))},n))})]})})}function Rr({text:e}){let[t,n]=(0,_.useState)(!1);return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)},className:`inline-flex h-8 items-center gap-1.5 rounded-full bg-paper-2 px-3 text-[13px] text-ink-2 hover:text-ink coarse:h-11 coarse:px-4`,children:[t?(0,$.jsx)(s,{className:`size-3.5`}):(0,$.jsx)(c,{className:`size-3.5`}),p(t?`share.copied`:`run.copy`)]})}function zr({base:e,step:t,output:n,editable:r,draft:a,onDraft:o,picked:c,onPick:u}){if(!n)return null;let m=t=>i(`${e}/assets/${t}`);if(t.type===`widget`){let e=n.assets?.find(e=>e.kind===`video`);if(e){let r=n.assets?.find(e=>e.kind===`poster`),i=(t.size?.height??0)>(t.size?.width??1);return(0,$.jsxs)(`div`,{className:d(`relative mx-auto`,i?`w-fit`:`w-full`),children:[(0,$.jsx)(`video`,{src:m(e.id),poster:r?m(r.id):void 0,controls:!0,playsInline:!0,className:d(`rounded-lg bg-black ring-1 ring-border-soft`,i?`max-h-[76vh]`:`w-full`)}),(0,$.jsx)(Pr,{ai:e.ai,className:`top-2 right-2`})]})}let r=n.assets?.find(e=>e.mime===`text/html`),i=t.size??{width:1280,height:720};return r?(0,$.jsx)(jr,{src:m(r.id),page:i.width,height:i.height,fit:!0}):null}if(t.type===`generate`){let e=n.assets?.[0];if(!e)return null;if(t.asset===`voice`)return(0,$.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,$.jsx)(`audio`,{src:m(e.id),controls:!0,className:`w-full`}),(0,$.jsx)(Pr,{ai:e.ai,className:`static`}),n.text?(0,$.jsx)(`p`,{className:`text-[14px] text-ink-2 leading-relaxed`,children:n.text}):null]});if((n.assets?.length??0)>1&&(t.asset===`image`||t.asset===`video`)){let e=t.options?.aspectRatio===`9:16`||t.options?.aspectRatio===`2:3`;return(0,$.jsx)(`div`,{className:d(`grid gap-3`,e?`grid-cols-2 sm:grid-cols-3`:`sm:grid-cols-2`),children:n.assets?.map((e,n)=>{let r=c?.includes(n);return(0,$.jsxs)(`figure`,{className:d(`relative overflow-hidden rounded-lg bg-paper-2 ring-1 ring-border-soft`,r&&`ring-2 ring-ember`),children:[t.asset===`image`?(0,$.jsx)(`img`,{src:m(e.id),alt:`${t.title} ${n+1}`,className:`w-full`}):(0,$.jsx)(`video`,{src:m(e.id),controls:!0,playsInline:!0,loop:!0,className:`w-full`}),u?(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>u(n),className:d(`absolute top-2 left-2 inline-flex h-8 items-center gap-1.5 rounded-full px-3 font-medium text-[12px] shadow-soft backdrop-blur coarse:h-11`,r?`bg-ember text-white`:`bg-card/90 text-ink-2 hover:text-ink`),children:[r?(0,$.jsx)(s,{className:`size-3.5`}):null,p(r?`run.pickedItem`:`run.pickItem`,{n:n+1})]}):(0,$.jsx)(`span`,{className:`absolute top-2 left-2 rounded-full bg-card/90 px-2.5 py-1 font-medium text-[12px] text-ink-2`,children:n+1}),(0,$.jsx)(Pr,{ai:e.ai,className:t.asset===`image`?`bottom-2 left-2`:`top-2 right-2`})]},e.id)})})}if(t.asset===`image`)return(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(`img`,{src:m(e.id),alt:t.title,className:`w-full rounded-lg bg-paper-2 ring-1 ring-border-soft`}),(0,$.jsx)(Pr,{ai:e.ai})]});if(t.asset===`video`){let n=t.options?.aspectRatio===`9:16`;return(0,$.jsxs)(`div`,{className:d(`relative mx-auto`,n?`w-fit`:`w-full`),children:[(0,$.jsx)(`video`,{src:m(e.id),controls:!0,playsInline:!0,loop:!0,className:d(`rounded-lg bg-black ring-1 ring-border-soft`,n?`max-h-[70vh]`:`w-full`)}),(0,$.jsx)(Pr,{ai:e.ai,className:`top-2 left-2`})]})}return t.asset===`document`?(0,$.jsx)(jr,{src:m(e.id),page:820,height:1100}):(0,$.jsx)(jr,{src:m(e.id),page:null,height:760})}if(t.type===`agent`){let e=n.assets?.filter(e=>e.kind!==`file`&&e.mime.startsWith(`image/`))??[],i=n.assets?.filter(e=>e.kind===`file`)??[];return(0,$.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[t.output.format===`json`&&n.json!==void 0?(0,$.jsx)(Ir,{step:t,json:n.json}):r?(0,$.jsx)(f,{value:a??n.text??``,onChange:e=>o?.(e.target.value),minRows:4,maxRows:24}):t.output.format===`markdown`?(0,$.jsx)(Ar,{text:n.text??``}):(0,$.jsx)(`div`,{className:`whitespace-pre-wrap text-[16px] leading-relaxed`,children:n.text}),e.map(e=>(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(`img`,{src:m(e.id),alt:``,className:`w-full rounded-lg ring-1 ring-border-soft`}),(0,$.jsx)(Pr,{ai:e.ai})]},e.id)),i.length?(0,$.jsx)(`ul`,{className:`overflow-hidden rounded-lg ring-1 ring-border-soft`,children:i.map(e=>(0,$.jsx)(`li`,{className:`border-border-soft border-b last:border-0`,children:(0,$.jsxs)(`a`,{href:m(e.id),download:e.name,onClick:t=>y(t,m(e.id),e.name),className:`flex items-center gap-2 px-3 py-2 text-[13px] hover:bg-paper-2 coarse:min-h-11`,children:[(0,$.jsx)(l,{className:`size-3.5 shrink-0 text-ink-3`}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name})]})},e.id))}):null,t.output.format!==`json`&&!r&&n.text?(0,$.jsx)(`div`,{children:(0,$.jsx)(Rr,{text:n.text})}):null]})}return null}var Br={png:`PNG`,mp4:`MP4`,mp3:`MP3`,pdf:`PDF`,docx:`Word`,html:`HTML`,md:`Markdown`,txt:`Text`,csv:`CSV`,xlsx:`Excel`,json:`JSON`,zip:`ZIP`};function Vr(e,t){return(e.headers.get(`content-disposition`)??``).match(/filename="([^"]+)"/)?.[1]??t}function Hr({url:e,format:t,title:n}){let[r,i]=(0,_.useState)(`idle`),a=(0,_.useRef)(null),o=async()=>{if(v(`share`)){i(`busy`),await ye(`share`,{url:new URL(e,location.href).href,title:n}).catch(()=>void 0),i(`idle`);return}try{if(!a.current){i(`busy`);let n=await fetch(e,{credentials:`include`});if(!n.ok)throw Error(String(n.status));let r=await n.blob();a.current=new File([r],Vr(n,`download.${t}`),{type:r.type.split(`;`)[0]})}let r={files:[a.current],title:n};if(!navigator.canShare(r)){location.href=e,i(`idle`);return}await navigator.share(r),i(`idle`)}catch(e){i(a.current&&e.name===`NotAllowedError`?`ready`:`idle`)}};return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>void o(),disabled:r===`busy`,"aria-label":p(`run.shareFile`),title:p(`run.shareFile`),className:d(`inline-flex h-9 items-center gap-1.5 rounded-full px-3 font-medium text-[13px] transition coarse:h-11 coarse:px-4`,r===`ready`?`bg-ember-tint text-ink ring-1 ring-ember`:`bg-paper-2 text-ink-2 hover:bg-paper-3 hover:text-ink`),children:[r===`busy`?(0,$.jsx)(u,{className:`size-3.5`}):(0,$.jsx)(de,{className:`size-3.5`}),p(r===`ready`?`run.shareNow`:`run.share`)]})}var Ur=v(`share`)||Fe();function Wr({base:e,stepId:t,formats:n,title:r}){let a=n=>i(`${e}/steps/${t}/download?format=${n}`);return(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[n.map((e,t)=>(0,$.jsxs)(`a`,{href:a(e),onClick:t=>y(t,a(e)),className:d(`inline-flex h-9 items-center gap-1.5 rounded-full px-3.5 font-medium text-[13px] transition coarse:h-11 coarse:px-4`,t===0?`bg-primary text-primary-foreground hover:brightness-105`:`bg-paper-2 text-ink-2 hover:bg-paper-3 hover:text-ink`),children:[t===0?(0,$.jsx)(m,{className:`size-3.5`}):null,Br[e]]},e)),Ur&&n.length?(0,$.jsx)(Hr,{url:a(n[0]),format:n[0],title:r},a(n[0])):null]})}export{ae as C,ce as S,te as T,xe as _,Ce as a,pe as b,Se as c,we as d,C as f,v as g,ye as h,zr as i,je as l,ve as m,jr as n,w as o,Te as p,Ar as r,Me as s,Wr as t,Pe as u,be as v,re as w,le as x,he as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,n as t}from"./jsx-runtime-D3jfb0Ew.js";import{$ as n,B as r,H as i,L as a,Q as o,R as s,W as c,Y as l,c as u,j as d,n as f,nt as p,o as m,t as h}from"./api-
|
|
1
|
+
import{a as e,n as t}from"./jsx-runtime-D3jfb0Ew.js";import{$ as n,B as r,H as i,L as a,Q as o,R as s,W as c,Y as l,c as u,j as d,n as f,nt as p,o as m,t as h}from"./api-Bf-l9Sd8.js";var g=class extends a{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||_(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=s({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),r.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function _(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var v=class extends i{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),o(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&c(t.mutationKey)!==c(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??_();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){r.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},y=e(t(),1);function b(e,t){let i=p(t),[a]=y.useState(()=>new v(i,e));y.useEffect(()=>{a.setOptions(e)},[a,e]);let o=y.useSyncExternalStore(y.useCallback(e=>a.subscribe(r.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),s=y.useCallback((...e)=>{a.mutate(e[0],e[1]).catch(l)},[a]);if(o.error&&n(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}function x(e){return e.split(/\s+/).map(e=>e[0]??``).join(``).slice(0,2).toUpperCase()}function S(){return(T().data?.limits.projects??1)>1}function C(){return T().data?.limits.build??!0}function w(e){return e.mode===`managed`?e.credits:e.models?.source===`account`?e.account?.credits??null:null}function T(){return d({queryKey:[`me`],queryFn:async()=>{try{return await f.get(`/api/studio/me`)}catch(e){if(e instanceof h&&e.status===401)return null;throw e}},staleTime:3e4})}function E(e=!0){return d({queryKey:[`projects`],queryFn:()=>f.get(`/api/studio/projects`),enabled:e})}var D=`wz.project`;function O(){try{return localStorage.getItem(D)}catch{return null}}var k=O(),A=new Set;function j(e){k=e;try{localStorage.setItem(D,e)}catch{}for(let e of A)e()}function M(){let e=E(),t=(0,y.useSyncExternalStore)(e=>(A.add(e),()=>A.delete(e)),()=>k),n=e.data??[];return{project:n.find(e=>e.id===t)??n[0]??null,projects:n,select:j,loading:e.isLoading}}function N(e,t){return d({queryKey:[`cloud`,e],queryFn:()=>f.get(`/api/studio/wizards/${e}/cloud`),enabled:t})}function P(e){return e instanceof h&&e.body?.code===`read_only`?e.message:null}async function F(){await fetch(u(`/api/auth/sign-out`),{method:`POST`,credentials:`include`,headers:{"content-type":`application/json`},body:`{}`}),window.location.href=`${m}/`}function I(e=window.location.pathname){window.location.href=u(`/api/auth/login?return=${encodeURIComponent(e)}`)}export{w as a,S as c,E as d,b as f,F as i,C as l,P as n,N as o,g as p,I as r,M as s,x as t,T as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-q3MZMmnf.js";var t={name:`link-2`,size:24,node:[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]};t.node;var n=e(t),r={name:`trash`,size:24,node:[[`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`}]],aliases:[`trash-2`]};r.node;var i=e(r);export{n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-q3MZMmnf.js";var t={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};t.node;var n=e(t),r={name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]};r.node;var i=e(r);export{n,i as t};
|