@gnai/message-content-renderer 0.1.11 → 0.1.12

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.
@@ -1 +1 @@
1
- .vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;inset:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff;border-radius:4px}.vjs-tree-node.is-highlight .vjs-tree-node-actions,.vjs-tree-node:hover .vjs-tree-node-actions{display:block}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node .vjs-tree-node-actions{display:none;position:absolute;right:0;top:0;padding:0 4px;background-color:#e6f7ff;border-radius:4px}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item{cursor:pointer}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item:hover{color:#1890ff}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark .vjs-tree-node-actions,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.image-viewer[data-v-92c159ee]{position:fixed;inset:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2000;padding:32px;cursor:zoom-out}.close-button[data-v-92c159ee]{position:fixed;top:24px;right:24px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;border-radius:50%;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);z-index:2001}.close-button[data-v-92c159ee]:hover{background:#000c;transform:scale(1.1)}.close-button svg[data-v-92c159ee]{width:24px;height:24px}.viewer-content[data-v-92c159ee]{max-width:90%;max-height:90%;display:flex;align-items:center;justify-content:center;cursor:default}.viewer-content img[data-v-92c159ee]{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px;box-shadow:0 8px 32px #00000080}.viewer-enter-active[data-v-92c159ee],.viewer-leave-active[data-v-92c159ee]{transition:opacity .2s cubic-bezier(.4,0,.2,1)}.viewer-enter-from[data-v-92c159ee],.viewer-leave-to[data-v-92c159ee]{opacity:0}@media(max-width:768px){.image-viewer[data-v-92c159ee]{padding:16px}.close-button[data-v-92c159ee]{top:16px;right:16px;width:40px;height:40px}.close-button svg[data-v-92c159ee]{width:20px;height:20px}.viewer-content img[data-v-92c159ee]{border-radius:6px}}.content-text[data-v-d4935523]{font-size:15px;line-height:1.6;color:#1d1d1f;background:#fff;border-radius:10px;padding:10px 14px;display:inline-block;max-width:100%;word-break:break-all}.content-text.is-plain[data-v-d4935523]{white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p:last-child{margin-bottom:0}.content-text[data-v-d4935523] code{background:#fff;padding:2px 6px;border-radius:4px;font-family:Courier New,monospace;font-size:14px;color:#000}.content-text[data-v-d4935523] pre{background:#fff;padding:16px;border-radius:10px;overflow-x:auto;margin:8px 0}.content-text[data-v-d4935523] pre code{background:none;padding:0;color:#000}.content-text[data-v-d4935523] a{color:#007aff;text-decoration:none}.content-text[data-v-d4935523] a:hover{text-decoration:underline}.content-text[data-v-d4935523] ul,.content-text[data-v-d4935523] ol{margin:8px 0;padding-left:32px}.content-text[data-v-d4935523] blockquote{border-left:4px solid #d2d2d7;padding-left:16px;margin:8px 0;color:#6e6e73}.content-text.role-user[data-v-d4935523]{background:#007aff;color:#fff}.content-text.role-user[data-v-d4935523] a{color:#fff}.content-text.role-user[data-v-d4935523] code,.content-text.role-user[data-v-d4935523] pre{background:#2f4f4f}.content-file[data-v-2ab752a0]{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid #d2d2d7;border-radius:10px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.content-file[data-v-2ab752a0]:hover{background:#f5f5f7;border-color:#007aff}.content-file .file-icon[data-v-2ab752a0]{width:20px;height:20px;color:#6e6e73}.content-file .file-name[data-v-2ab752a0]{font-size:14px;color:#1d1d1f;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-file .download-icon[data-v-2ab752a0]{width:16px;height:16px;color:#007aff}.html-preview-wrapper[data-v-2ab752a0]{width:360px;height:640px;position:relative;overflow:hidden;border-radius:12px;box-shadow:0 2px 8px #0000001a;background:#f5f5f7}.html-preview-wrapper .share-icon[data-v-2ab752a0]{position:absolute;top:10px;right:10px;font-size:24px;color:#6e6e73;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.html-preview-wrapper .share-icon[data-v-2ab752a0]:hover{color:#0056b3}.html-preview-wrapper .html-iframe[data-v-2ab752a0]{width:100%;height:100%;border:none}.html-preview-wrapper .html-loading[data-v-2ab752a0]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#f5f5f7}.html-preview-wrapper .html-loading .loading-spinner[data-v-2ab752a0]{width:40px;height:40px;border:3px solid #e0e0e0;border-top-color:#007aff;border-radius:50%;animation:spin-2ab752a0 1s linear infinite}.html-preview-wrapper .html-loading .loading-text[data-v-2ab752a0]{font-size:14px;color:#6e6e73}@keyframes spin-2ab752a0{to{transform:rotate(360deg)}}@media(max-width:768px){.content-file .file-name[data-v-2ab752a0]{max-width:150px}.html-preview-wrapper[data-v-2ab752a0]{width:280px;height:426px}}.message-image[data-v-24952cda]{display:block;max-width:300px;width:auto;height:220px;border-radius:10px;object-fit:cover;cursor:pointer;transition:transform .2s cubic-bezier(.4,0,.2,1)}.message-image[data-v-24952cda]:hover{transform:scale(1.02)}.message-image.is-full-width[data-v-24952cda]{width:100%;max-width:100%}@media(max-width:768px){.message-image[data-v-24952cda]{max-width:200px;height:180px}}.message-video[data-v-be6bb72d]{display:block;max-width:100%;max-height:220px;border-radius:10px}.message-video.is-full-width[data-v-be6bb72d]{width:100%}@media(max-width:768px){.message-video[data-v-be6bb72d]{max-height:180px}}.message-audio[data-v-c0d42074]{max-width:100%;height:40px}.message-content-renderer[data-v-32577d70]{display:inline-flex;max-width:100%;position:relative}.renderer-actions[data-v-32577d70]{position:absolute;top:-30px;display:inline-flex;gap:4px;padding:4px 6px;border-radius:var(--radius-md);border:1px solid var(--color-border-light);background:var(--color-bg-secondary);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:opacity var(--transition-fast),transform var(--transition-fast);transform:translateY(-4px);word-break:keep-all}.renderer-actions.actions-user[data-v-32577d70]{right:0}.renderer-actions.actions-assistant[data-v-32577d70]{left:0}.renderer-action-btn[data-v-32577d70]{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:12px;color:var(--color-text-secondary);border-radius:var(--radius-sm);transition:background var(--transition-fast),color var(--transition-fast)}.renderer-action-btn[data-v-32577d70]:hover{background:var(--color-bg);color:var(--color-text-primary)}.renderer-action-btn.danger[data-v-32577d70]:hover{color:var(--color-error)}.renderer-action-btn svg[data-v-32577d70]{width:14px;height:14px}.content-user-message[data-v-32577d70]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.files-grid[data-v-32577d70]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px}.role-user .content-user-message[data-v-32577d70],.role-user .files-grid[data-v-32577d70]{align-items:flex-end}.content-medialib .json-viewer[data-v-32577d70]{background:#fff;padding:16px;border-radius:10px;font-size:13px;max-height:400px;overflow:auto}@media(max-width:768px){.renderer-actions[data-v-32577d70]{display:none}}
1
+ .vjs-tree-brackets{cursor:pointer}.vjs-tree-brackets:hover{color:#1890ff}.vjs-check-controller{position:absolute;left:0}.vjs-check-controller.is-checked .vjs-check-controller-inner{background-color:#1890ff;border-color:#0076e4}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-checkbox:after{transform:rotate(45deg) scaleY(1)}.vjs-check-controller.is-checked .vjs-check-controller-inner.is-radio:after{transform:translate(-50%,-50%) scale(1)}.vjs-check-controller .vjs-check-controller-inner{display:inline-block;position:relative;border:1px solid #bfcbd9;border-radius:2px;vertical-align:middle;box-sizing:border-box;width:16px;height:16px;background-color:#fff;z-index:1;cursor:pointer;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.vjs-check-controller .vjs-check-controller-inner:after{box-sizing:content-box;content:"";border:2px solid #fff;border-left:0;border-top:0;height:8px;left:4px;position:absolute;top:1px;transform:rotate(45deg) scaleY(0);width:4px;transition:transform .15s cubic-bezier(.71,-.46,.88,.6) .05s;transform-origin:center}.vjs-check-controller .vjs-check-controller-inner.is-radio{border-radius:100%}.vjs-check-controller .vjs-check-controller-inner.is-radio:after{border-radius:100%;height:4px;background-color:#fff;left:50%;top:50%}.vjs-check-controller .vjs-check-controller-original{opacity:0;outline:none;position:absolute;z-index:-1;inset:0;margin:0}.vjs-carets{position:absolute;right:0;cursor:pointer}.vjs-carets svg{transition:transform .3s}.vjs-carets:hover{color:#1890ff}.vjs-carets-close{transform:rotate(-90deg)}.vjs-tree-node{display:flex;position:relative;line-height:20px}.vjs-tree-node.has-carets{padding-left:15px}.vjs-tree-node.has-carets.has-selector,.vjs-tree-node.has-selector{padding-left:30px}.vjs-tree-node.is-highlight,.vjs-tree-node:hover{background-color:#e6f7ff;border-radius:4px}.vjs-tree-node.is-highlight .vjs-tree-node-actions,.vjs-tree-node:hover .vjs-tree-node-actions{display:block}.vjs-tree-node .vjs-indent{display:flex;position:relative}.vjs-tree-node .vjs-indent-unit.has-line{border-left:1px dashed #bfcbd9}.vjs-tree-node .vjs-tree-node-actions{display:none;position:absolute;right:0;top:0;padding:0 4px;background-color:#e6f7ff;border-radius:4px}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item{cursor:pointer}.vjs-tree-node .vjs-tree-node-actions .vjs-tree-node-actions-item:hover{color:#1890ff}.vjs-tree-node.dark.is-highlight,.vjs-tree-node.dark .vjs-tree-node-actions,.vjs-tree-node.dark:hover{background-color:#2e4558}.vjs-node-index{position:absolute;right:100%;margin-right:4px;-webkit-user-select:none;user-select:none}.vjs-colon{white-space:pre}.vjs-comment{color:#bfcbd9}.vjs-value{word-break:break-word}.vjs-value-null,.vjs-value-undefined{color:#d55fde}.vjs-value-boolean,.vjs-value-number{color:#1d8ce0}.vjs-value-string{color:#13ce66}.vjs-tree{font-family:Monaco,Menlo,Consolas,Bitstream Vera Sans Mono,monospace;font-size:14px;text-align:left}.vjs-tree.is-virtual{overflow:auto}.vjs-tree.is-virtual .vjs-tree-node{white-space:nowrap}.image-viewer[data-v-92c159ee]{position:fixed;inset:0;background:#000000e6;display:flex;align-items:center;justify-content:center;z-index:2000;padding:32px;cursor:zoom-out}.close-button[data-v-92c159ee]{position:fixed;top:24px;right:24px;width:48px;height:48px;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;border-radius:50%;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1);z-index:2001}.close-button[data-v-92c159ee]:hover{background:#000c;transform:scale(1.1)}.close-button svg[data-v-92c159ee]{width:24px;height:24px}.viewer-content[data-v-92c159ee]{max-width:90%;max-height:90%;display:flex;align-items:center;justify-content:center;cursor:default}.viewer-content img[data-v-92c159ee]{max-width:100%;max-height:90vh;object-fit:contain;border-radius:10px;box-shadow:0 8px 32px #00000080}.viewer-enter-active[data-v-92c159ee],.viewer-leave-active[data-v-92c159ee]{transition:opacity .2s cubic-bezier(.4,0,.2,1)}.viewer-enter-from[data-v-92c159ee],.viewer-leave-to[data-v-92c159ee]{opacity:0}@media(max-width:768px){.image-viewer[data-v-92c159ee]{padding:16px}.close-button[data-v-92c159ee]{top:16px;right:16px;width:40px;height:40px}.close-button svg[data-v-92c159ee]{width:20px;height:20px}.viewer-content img[data-v-92c159ee]{border-radius:6px}}.content-text[data-v-d4935523]{font-size:15px;line-height:1.6;color:#1d1d1f;background:#fff;border-radius:10px;padding:10px 14px;display:inline-block;max-width:100%;word-break:break-all}.content-text.is-plain[data-v-d4935523]{white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p{margin:0 0 8px;white-space:pre-wrap;word-wrap:break-word}.content-text[data-v-d4935523] p:last-child{margin-bottom:0}.content-text[data-v-d4935523] code{background:#fff;padding:2px 6px;border-radius:4px;font-family:Courier New,monospace;font-size:14px;color:#000}.content-text[data-v-d4935523] pre{background:#fff;padding:16px;border-radius:10px;overflow-x:auto;margin:8px 0}.content-text[data-v-d4935523] pre code{background:none;padding:0;color:#000}.content-text[data-v-d4935523] a{color:#007aff;text-decoration:none}.content-text[data-v-d4935523] a:hover{text-decoration:underline}.content-text[data-v-d4935523] ul,.content-text[data-v-d4935523] ol{margin:8px 0;padding-left:32px}.content-text[data-v-d4935523] blockquote{border-left:4px solid #d2d2d7;padding-left:16px;margin:8px 0;color:#6e6e73}.content-text.role-user[data-v-d4935523]{background:#007aff;color:#fff}.content-text.role-user[data-v-d4935523] a{color:#fff}.content-text.role-user[data-v-d4935523] code,.content-text.role-user[data-v-d4935523] pre{background:#2f4f4f}.content-file[data-v-16ae76bb]{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;background:#fff;border:1px solid #d2d2d7;border-radius:10px;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.content-file[data-v-16ae76bb]:hover{background:#f5f5f7;border-color:#007aff}.content-file .file-icon[data-v-16ae76bb]{width:20px;height:20px;color:#6e6e73}.content-file .file-name[data-v-16ae76bb]{font-size:14px;color:#1d1d1f;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content-file .download-icon[data-v-16ae76bb]{width:16px;height:16px;color:#007aff}.html-preview-wrapper[data-v-16ae76bb]{width:360px;height:640px;position:relative;overflow:hidden;border-radius:12px;box-shadow:0 2px 8px #0000001a;background:#f5f5f7}.html-preview-wrapper .share-icon[data-v-16ae76bb]{position:absolute;top:10px;right:10px;font-size:24px;color:#6e6e73;cursor:pointer;transition:all .15s cubic-bezier(.4,0,.2,1)}.html-preview-wrapper .share-icon[data-v-16ae76bb]:hover{color:#0056b3}.html-preview-wrapper .html-iframe[data-v-16ae76bb]{width:100%;height:100%;border:none}.html-preview-wrapper .html-loading[data-v-16ae76bb]{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;background:#f5f5f7}.html-preview-wrapper .html-loading .loading-spinner[data-v-16ae76bb]{width:40px;height:40px;border:3px solid #e0e0e0;border-top-color:#007aff;border-radius:50%;animation:spin-16ae76bb 1s linear infinite}.html-preview-wrapper .html-loading .loading-text[data-v-16ae76bb]{font-size:14px;color:#6e6e73}@keyframes spin-16ae76bb{to{transform:rotate(360deg)}}@media(max-width:768px){.content-file .file-name[data-v-16ae76bb]{max-width:150px}.html-preview-wrapper[data-v-16ae76bb]{width:280px;height:426px}}.message-image[data-v-24952cda]{display:block;max-width:300px;width:auto;height:220px;border-radius:10px;object-fit:cover;cursor:pointer;transition:transform .2s cubic-bezier(.4,0,.2,1)}.message-image[data-v-24952cda]:hover{transform:scale(1.02)}.message-image.is-full-width[data-v-24952cda]{width:100%;max-width:100%}@media(max-width:768px){.message-image[data-v-24952cda]{max-width:200px;height:180px}}.message-video[data-v-be6bb72d]{display:block;max-width:100%;max-height:220px;border-radius:10px}.message-video.is-full-width[data-v-be6bb72d]{width:100%}@media(max-width:768px){.message-video[data-v-be6bb72d]{max-height:180px}}.message-audio[data-v-c0d42074]{max-width:100%;height:40px}.message-content-renderer[data-v-32577d70]{display:inline-flex;max-width:100%;position:relative}.renderer-actions[data-v-32577d70]{position:absolute;top:-30px;display:inline-flex;gap:4px;padding:4px 6px;border-radius:var(--radius-md);border:1px solid var(--color-border-light);background:var(--color-bg-secondary);box-shadow:var(--shadow-sm);opacity:0;pointer-events:none;transition:opacity var(--transition-fast),transform var(--transition-fast);transform:translateY(-4px);word-break:keep-all}.renderer-actions.actions-user[data-v-32577d70]{right:0}.renderer-actions.actions-assistant[data-v-32577d70]{left:0}.renderer-action-btn[data-v-32577d70]{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;font-size:12px;color:var(--color-text-secondary);border-radius:var(--radius-sm);transition:background var(--transition-fast),color var(--transition-fast)}.renderer-action-btn[data-v-32577d70]:hover{background:var(--color-bg);color:var(--color-text-primary)}.renderer-action-btn.danger[data-v-32577d70]:hover{color:var(--color-error)}.renderer-action-btn svg[data-v-32577d70]{width:14px;height:14px}.content-user-message[data-v-32577d70]{display:flex;flex-direction:column;gap:16px;align-items:flex-start}.files-grid[data-v-32577d70]{display:inline-flex;flex-direction:column;align-items:flex-start;gap:8px}.role-user .content-user-message[data-v-32577d70],.role-user .files-grid[data-v-32577d70]{align-items:flex-end}.content-medialib .json-viewer[data-v-32577d70]{background:#fff;padding:16px;border-radius:10px;font-size:13px;max-height:400px;overflow:auto}@media(max-width:768px){.renderer-actions[data-v-32577d70]{display:none}}
@@ -4982,7 +4982,7 @@ const vc = ["src", "alt"], Dc = /* @__PURE__ */ _u({
4982
4982
  tu("div", { class: "loading-spinner" }, null, -1),
4983
4983
  tu("span", { class: "loading-text" }, "加载中...", -1)
4984
4984
  ])])) : iu("", !0),
4985
- u.allowShareMedialibHtml ? (L(), $("button", {
4985
+ u.allowShareMedialibHtml ? (L(), $("div", {
4986
4986
  key: 1,
4987
4987
  type: "button",
4988
4988
  class: "share-icon",
@@ -5014,7 +5014,7 @@ const vc = ["src", "alt"], Dc = /* @__PURE__ */ _u({
5014
5014
  })
5015
5015
  ]));
5016
5016
  }
5017
- }), me = /* @__PURE__ */ yu(Nc, [["__scopeId", "data-v-2ab752a0"]]), Bc = ["src"], Lc = /* @__PURE__ */ _u({
5017
+ }), me = /* @__PURE__ */ yu(Nc, [["__scopeId", "data-v-16ae76bb"]]), Bc = ["src"], Lc = /* @__PURE__ */ _u({
5018
5018
  __name: "MessageImageContent",
5019
5019
  props: {
5020
5020
  src: {},
@@ -15,6 +15,6 @@
15
15
  `),e=e.replace(J0,"�"),u.src=e}function Y0(u){let e;u.inlineMode?(e=new u.Token("inline","",0),e.content=u.src,e.map=[0,1],e.children=[],u.tokens.push(e)):u.md.block.parse(u.src,u.md,u.env,u.tokens)}function X0(u){const e=u.tokens;for(let t=0,n=e.length;t<n;t++){const r=e[t];r.type==="inline"&&u.md.inline.parse(r.content,u.md,u.env,r.children)}}function ur(u){return/^<a[>\s]/i.test(u)}function er(u){return/^<\/a\s*>/i.test(u)}function tr(u){const e=u.tokens;if(u.md.options.linkify)for(let t=0,n=e.length;t<n;t++){if(e[t].type!=="inline"||!u.md.linkify.pretest(e[t].content))continue;let r=e[t].children,o=0;for(let c=r.length-1;c>=0;c--){const i=r[c];if(i.type==="link_close"){for(c--;r[c].level!==i.level&&r[c].type!=="link_open";)c--;continue}if(i.type==="html_inline"&&(ur(i.content)&&o>0&&o--,er(i.content)&&o++),!(o>0)&&i.type==="text"&&u.md.linkify.test(i.content)){const a=i.content;let l=u.md.linkify.match(a);const s=[];let d=i.level,_=0;l.length>0&&l[0].index===0&&c>0&&r[c-1].type==="text_special"&&(l=l.slice(1));for(let b=0;b<l.length;b++){const h=l[b].url,v=u.md.normalizeLink(h);if(!u.md.validateLink(v))continue;let y=l[b].text;l[b].schema?l[b].schema==="mailto:"&&!/^mailto:/i.test(y)?y=u.md.normalizeLinkText("mailto:"+y).replace(/^mailto:/,""):y=u.md.normalizeLinkText(y):y=u.md.normalizeLinkText("http://"+y).replace(/^http:\/\//,"");const S=l[b].index;if(S>_){const C=new u.Token("text","",0);C.content=a.slice(_,S),C.level=d,s.push(C)}const E=new u.Token("link_open","a",1);E.attrs=[["href",v]],E.level=d++,E.markup="linkify",E.info="auto",s.push(E);const F=new u.Token("text","",0);F.content=y,F.level=d,s.push(F);const p=new u.Token("link_close","a",-1);p.level=--d,p.markup="linkify",p.info="auto",s.push(p),_=l[b].lastIndex}if(_<a.length){const b=new u.Token("text","",0);b.content=a.slice(_),b.level=d,s.push(b)}e[t].children=r=ht(r,c,s)}}}}const mt=/\+-|\.\.|\?\?\?\?|!!!!|,,|--/,nr=/\((c|tm|r)\)/i,rr=/\((c|tm|r)\)/ig,or={c:"©",r:"®",tm:"™"};function cr(u,e){return or[e.toLowerCase()]}function ir(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&(n.content=n.content.replace(rr,cr)),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function ar(u){let e=0;for(let t=u.length-1;t>=0;t--){const n=u[t];n.type==="text"&&!e&&mt.test(n.content)&&(n.content=n.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),n.type==="link_open"&&n.info==="auto"&&e--,n.type==="link_close"&&n.info==="auto"&&e++}}function lr(u){let e;if(u.md.options.typographer)for(e=u.tokens.length-1;e>=0;e--)u.tokens[e].type==="inline"&&(nr.test(u.tokens[e].content)&&ir(u.tokens[e].children),mt.test(u.tokens[e].content)&&ar(u.tokens[e].children))}const sr=/['"]/,xt=/['"]/g,gt="’";function Hu(u,e,t){return u.slice(0,e)+t+u.slice(e+1)}function fr(u,e){let t;const n=[];for(let r=0;r<u.length;r++){const o=u[r],c=u[r].level;for(t=n.length-1;t>=0&&!(n[t].level<=c);t--);if(n.length=t+1,o.type!=="text")continue;let i=o.content,a=0,l=i.length;u:for(;a<l;){xt.lastIndex=a;const s=xt.exec(i);if(!s)break;let d=!0,_=!0;a=s.index+1;const b=s[0]==="'";let h=32;if(s.index-1>=0)h=i.charCodeAt(s.index-1);else for(t=r-1;t>=0&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t--)if(u[t].content){h=u[t].content.charCodeAt(u[t].content.length-1);break}let v=32;if(a<l)v=i.charCodeAt(a);else for(t=r+1;t<u.length&&!(u[t].type==="softbreak"||u[t].type==="hardbreak");t++)if(u[t].content){v=u[t].content.charCodeAt(0);break}const y=Au(h)||Fu(String.fromCharCode(h)),S=Au(v)||Fu(String.fromCharCode(v)),E=Du(h),F=Du(v);if(F?d=!1:S&&(E||y||(d=!1)),E?_=!1:y&&(F||S||(_=!1)),v===34&&s[0]==='"'&&h>=48&&h<=57&&(_=d=!1),d&&_&&(d=y,_=S),!d&&!_){b&&(o.content=Hu(o.content,s.index,gt));continue}if(_)for(t=n.length-1;t>=0;t--){let p=n[t];if(n[t].level<c)break;if(p.single===b&&n[t].level===c){p=n[t];let C,x;b?(C=e.md.options.quotes[2],x=e.md.options.quotes[3]):(C=e.md.options.quotes[0],x=e.md.options.quotes[1]),o.content=Hu(o.content,s.index,x),u[p.token].content=Hu(u[p.token].content,p.pos,C),a+=x.length-1,p.token===r&&(a+=C.length-1),i=o.content,l=i.length,n.length=t;continue u}}d?n.push({token:r,pos:s.index,single:b,level:c}):_&&b&&(o.content=Hu(o.content,s.index,gt))}}}function dr(u){if(u.md.options.typographer)for(let e=u.tokens.length-1;e>=0;e--)u.tokens[e].type!=="inline"||!sr.test(u.tokens[e].content)||fr(u.tokens[e].children,u)}function hr(u){let e,t;const n=u.tokens,r=n.length;for(let o=0;o<r;o++){if(n[o].type!=="inline")continue;const c=n[o].children,i=c.length;for(e=0;e<i;e++)c[e].type==="text_special"&&(c[e].type="text");for(e=t=0;e<i;e++)c[e].type==="text"&&e+1<i&&c[e+1].type==="text"?c[e+1].content=c[e].content+c[e+1].content:(e!==t&&(c[t]=c[e]),t++);e!==t&&(c.length=t)}}const de=[["normalize",K0],["block",Y0],["inline",X0],["linkify",tr],["replacements",lr],["smartquotes",dr],["text_join",hr]];function he(){this.ruler=new W;for(let u=0;u<de.length;u++)this.ruler.push(de[u][0],de[u][1])}he.prototype.process=function(u){const e=this.ruler.getRules("");for(let t=0,n=e.length;t<n;t++)e[t](u)},he.prototype.State=bt;function tu(u,e,t,n){this.src=u,this.md=e,this.env=t,this.tokens=n,this.bMarks=[],this.eMarks=[],this.tShift=[],this.sCount=[],this.bsCount=[],this.blkIndent=0,this.line=0,this.lineMax=0,this.tight=!1,this.ddIndent=-1,this.listIndent=-1,this.parentType="root",this.level=0;const r=this.src;for(let o=0,c=0,i=0,a=0,l=r.length,s=!1;c<l;c++){const d=r.charCodeAt(c);if(!s)if(j(d)){i++,d===9?a+=4-a%4:a++;continue}else s=!0;(d===10||c===l-1)&&(d!==10&&c++,this.bMarks.push(o),this.eMarks.push(c),this.tShift.push(i),this.sCount.push(a),this.bsCount.push(0),s=!1,i=0,a=0,o=c+1)}this.bMarks.push(r.length),this.eMarks.push(r.length),this.tShift.push(0),this.sCount.push(0),this.bsCount.push(0),this.lineMax=this.bMarks.length-1}tu.prototype.push=function(u,e,t){const n=new X(u,e,t);return n.block=!0,t<0&&this.level--,n.level=this.level,t>0&&this.level++,this.tokens.push(n),n},tu.prototype.isEmpty=function(e){return this.bMarks[e]+this.tShift[e]>=this.eMarks[e]},tu.prototype.skipEmptyLines=function(e){for(let t=this.lineMax;e<t&&!(this.bMarks[e]+this.tShift[e]<this.eMarks[e]);e++);return e},tu.prototype.skipSpaces=function(e){for(let t=this.src.length;e<t;e++){const n=this.src.charCodeAt(e);if(!j(n))break}return e},tu.prototype.skipSpacesBack=function(e,t){if(e<=t)return e;for(;e>t;)if(!j(this.src.charCodeAt(--e)))return e+1;return e},tu.prototype.skipChars=function(e,t){for(let n=this.src.length;e<n&&this.src.charCodeAt(e)===t;e++);return e},tu.prototype.skipCharsBack=function(e,t,n){if(e<=n)return e;for(;e>n;)if(t!==this.src.charCodeAt(--e))return e+1;return e},tu.prototype.getLines=function(e,t,n,r){if(e>=t)return"";const o=new Array(t-e);for(let c=0,i=e;i<t;i++,c++){let a=0;const l=this.bMarks[i];let s=l,d;for(i+1<t||r?d=this.eMarks[i]+1:d=this.eMarks[i];s<d&&a<n;){const _=this.src.charCodeAt(s);if(j(_))_===9?a+=4-(a+this.bsCount[i])%4:a++;else if(s-l<this.tShift[i])a++;else break;s++}a>n?o[c]=new Array(a-n+1).join(" ")+this.src.slice(s,d):o[c]=this.src.slice(s,d)}return o.join("")},tu.prototype.Token=X;const pr=65536;function pe(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];return u.src.slice(t,n)}function _t(u){const e=[],t=u.length;let n=0,r=u.charCodeAt(n),o=!1,c=0,i="";for(;n<t;)r===124&&(o?(i+=u.substring(c,n-1),c=n):(e.push(i+u.substring(c,n)),i="",c=n+1)),o=r===92,n++,r=u.charCodeAt(n);return e.push(i+u.substring(c)),e}function br(u,e,t,n){if(e+2>t)return!1;let r=e+1;if(u.sCount[r]<u.blkIndent||u.sCount[r]-u.blkIndent>=4)return!1;let o=u.bMarks[r]+u.tShift[r];if(o>=u.eMarks[r])return!1;const c=u.src.charCodeAt(o++);if(c!==124&&c!==45&&c!==58||o>=u.eMarks[r])return!1;const i=u.src.charCodeAt(o++);if(i!==124&&i!==45&&i!==58&&!j(i)||c===45&&j(i))return!1;for(;o<u.eMarks[r];){const p=u.src.charCodeAt(o);if(p!==124&&p!==45&&p!==58&&!j(p))return!1;o++}let a=pe(u,e+1),l=a.split("|");const s=[];for(let p=0;p<l.length;p++){const C=l[p].trim();if(!C){if(p===0||p===l.length-1)continue;return!1}if(!/^:?-+:?$/.test(C))return!1;C.charCodeAt(C.length-1)===58?s.push(C.charCodeAt(0)===58?"center":"right"):C.charCodeAt(0)===58?s.push("left"):s.push("")}if(a=pe(u,e).trim(),a.indexOf("|")===-1||u.sCount[e]-u.blkIndent>=4)return!1;l=_t(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const d=l.length;if(d===0||d!==s.length)return!1;if(n)return!0;const _=u.parentType;u.parentType="table";const b=u.md.block.ruler.getRules("blockquote"),h=u.push("table_open","table",1),v=[e,0];h.map=v;const y=u.push("thead_open","thead",1);y.map=[e,e+1];const S=u.push("tr_open","tr",1);S.map=[e,e+1];for(let p=0;p<l.length;p++){const C=u.push("th_open","th",1);s[p]&&(C.attrs=[["style","text-align:"+s[p]]]);const x=u.push("inline","",0);x.content=l[p].trim(),x.children=[],u.push("th_close","th",-1)}u.push("tr_close","tr",-1),u.push("thead_close","thead",-1);let E,F=0;for(r=e+2;r<t&&!(u.sCount[r]<u.blkIndent);r++){let p=!1;for(let x=0,k=b.length;x<k;x++)if(b[x](u,r,t,!0)){p=!0;break}if(p||(a=pe(u,r).trim(),!a)||u.sCount[r]-u.blkIndent>=4||(l=_t(a),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),F+=d-l.length,F>pr))break;if(r===e+2){const x=u.push("tbody_open","tbody",1);x.map=E=[e+2,0]}const C=u.push("tr_open","tr",1);C.map=[r,r+1];for(let x=0;x<d;x++){const k=u.push("td_open","td",1);s[x]&&(k.attrs=[["style","text-align:"+s[x]]]);const D=u.push("inline","",0);D.content=l[x]?l[x].trim():"",D.children=[],u.push("td_close","td",-1)}u.push("tr_close","tr",-1)}return E&&(u.push("tbody_close","tbody",-1),E[1]=r),u.push("table_close","table",-1),v[1]=r,u.parentType=_,u.line=r,!0}function mr(u,e,t){if(u.sCount[e]-u.blkIndent<4)return!1;let n=e+1,r=n;for(;n<t;){if(u.isEmpty(n)){n++;continue}if(u.sCount[n]-u.blkIndent>=4){n++,r=n;continue}break}u.line=r;const o=u.push("code_block","code",0);return o.content=u.getLines(e,r,4+u.blkIndent,!1)+`
16
16
  `,o.map=[e,u.line],!0}function xr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||r+3>o)return!1;const c=u.src.charCodeAt(r);if(c!==126&&c!==96)return!1;let i=r;r=u.skipChars(r,c);let a=r-i;if(a<3)return!1;const l=u.src.slice(i,r),s=u.src.slice(r,o);if(c===96&&s.indexOf(String.fromCharCode(c))>=0)return!1;if(n)return!0;let d=e,_=!1;for(;d++,!(d>=t||(r=i=u.bMarks[d]+u.tShift[d],o=u.eMarks[d],r<o&&u.sCount[d]<u.blkIndent));)if(u.src.charCodeAt(r)===c&&!(u.sCount[d]-u.blkIndent>=4)&&(r=u.skipChars(r,c),!(r-i<a)&&(r=u.skipSpaces(r),!(r<o)))){_=!0;break}a=u.sCount[e],u.line=d+(_?1:0);const b=u.push("fence","code",0);return b.info=s,b.content=u.getLines(e+1,d,a,!0),b.markup=l,b.map=[e,u.line],!0}function gr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];const c=u.lineMax;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==62)return!1;if(n)return!0;const i=[],a=[],l=[],s=[],d=u.md.block.ruler.getRules("blockquote"),_=u.parentType;u.parentType="blockquote";let b=!1,h;for(h=e;h<t;h++){const F=u.sCount[h]<u.blkIndent;if(r=u.bMarks[h]+u.tShift[h],o=u.eMarks[h],r>=o)break;if(u.src.charCodeAt(r++)===62&&!F){let C=u.sCount[h]+1,x,k;u.src.charCodeAt(r)===32?(r++,C++,k=!1,x=!0):u.src.charCodeAt(r)===9?(x=!0,(u.bsCount[h]+C)%4===3?(r++,C++,k=!1):k=!0):x=!1;let D=C;for(i.push(u.bMarks[h]),u.bMarks[h]=r;r<o;){const N=u.src.charCodeAt(r);if(j(N))N===9?D+=4-(D+u.bsCount[h]+(k?1:0))%4:D++;else break;r++}b=r>=o,a.push(u.bsCount[h]),u.bsCount[h]=u.sCount[h]+1+(x?1:0),l.push(u.sCount[h]),u.sCount[h]=D-C,s.push(u.tShift[h]),u.tShift[h]=r-u.bMarks[h];continue}if(b)break;let p=!1;for(let C=0,x=d.length;C<x;C++)if(d[C](u,h,t,!0)){p=!0;break}if(p){u.lineMax=h,u.blkIndent!==0&&(i.push(u.bMarks[h]),a.push(u.bsCount[h]),s.push(u.tShift[h]),l.push(u.sCount[h]),u.sCount[h]-=u.blkIndent);break}i.push(u.bMarks[h]),a.push(u.bsCount[h]),s.push(u.tShift[h]),l.push(u.sCount[h]),u.sCount[h]=-1}const v=u.blkIndent;u.blkIndent=0;const y=u.push("blockquote_open","blockquote",1);y.markup=">";const S=[e,0];y.map=S,u.md.block.tokenize(u,e,h);const E=u.push("blockquote_close","blockquote",-1);E.markup=">",u.lineMax=c,u.parentType=_,S[1]=u.line;for(let F=0;F<s.length;F++)u.bMarks[F+e]=i[F],u.tShift[F+e]=s[F],u.sCount[F+e]=l[F],u.bsCount[F+e]=a[F];return u.blkIndent=v,!0}function _r(u,e,t,n){const r=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let o=u.bMarks[e]+u.tShift[e];const c=u.src.charCodeAt(o++);if(c!==42&&c!==45&&c!==95)return!1;let i=1;for(;o<r;){const l=u.src.charCodeAt(o++);if(l!==c&&!j(l))return!1;l===c&&i++}if(i<3)return!1;if(n)return!0;u.line=e+1;const a=u.push("hr","hr",0);return a.map=[e,u.line],a.markup=Array(i+1).join(String.fromCharCode(c)),!0}function kt(u,e){const t=u.eMarks[e];let n=u.bMarks[e]+u.tShift[e];const r=u.src.charCodeAt(n++);if(r!==42&&r!==45&&r!==43)return-1;if(n<t){const o=u.src.charCodeAt(n);if(!j(o))return-1}return n}function yt(u,e){const t=u.bMarks[e]+u.tShift[e],n=u.eMarks[e];let r=t;if(r+1>=n)return-1;let o=u.src.charCodeAt(r++);if(o<48||o>57)return-1;for(;;){if(r>=n)return-1;if(o=u.src.charCodeAt(r++),o>=48&&o<=57){if(r-t>=10)return-1;continue}if(o===41||o===46)break;return-1}return r<n&&(o=u.src.charCodeAt(r),!j(o))?-1:r}function kr(u,e){const t=u.level+2;for(let n=e+2,r=u.tokens.length-2;n<r;n++)u.tokens[n].level===t&&u.tokens[n].type==="paragraph_open"&&(u.tokens[n+2].hidden=!0,u.tokens[n].hidden=!0,n+=2)}function yr(u,e,t,n){let r,o,c,i,a=e,l=!0;if(u.sCount[a]-u.blkIndent>=4||u.listIndent>=0&&u.sCount[a]-u.listIndent>=4&&u.sCount[a]<u.blkIndent)return!1;let s=!1;n&&u.parentType==="paragraph"&&u.sCount[a]>=u.blkIndent&&(s=!0);let d,_,b;if((b=yt(u,a))>=0){if(d=!0,c=u.bMarks[a]+u.tShift[a],_=Number(u.src.slice(c,b-1)),s&&_!==1)return!1}else if((b=kt(u,a))>=0)d=!1;else return!1;if(s&&u.skipSpaces(b)>=u.eMarks[a])return!1;if(n)return!0;const h=u.src.charCodeAt(b-1),v=u.tokens.length;d?(i=u.push("ordered_list_open","ol",1),_!==1&&(i.attrs=[["start",_]])):i=u.push("bullet_list_open","ul",1);const y=[a,0];i.map=y,i.markup=String.fromCharCode(h);let S=!1;const E=u.md.block.ruler.getRules("list"),F=u.parentType;for(u.parentType="list";a<t;){o=b,r=u.eMarks[a];const p=u.sCount[a]+b-(u.bMarks[a]+u.tShift[a]);let C=p;for(;o<r;){const z=u.src.charCodeAt(o);if(z===9)C+=4-(C+u.bsCount[a])%4;else if(z===32)C++;else break;o++}const x=o;let k;x>=r?k=1:k=C-p,k>4&&(k=1);const D=p+k;i=u.push("list_item_open","li",1),i.markup=String.fromCharCode(h);const N=[a,0];i.map=N,d&&(i.info=u.src.slice(c,b-1));const T=u.tight,O=u.tShift[a],M=u.sCount[a],q=u.listIndent;if(u.listIndent=u.blkIndent,u.blkIndent=D,u.tight=!0,u.tShift[a]=x-u.bMarks[a],u.sCount[a]=C,x>=r&&u.isEmpty(a+1)?u.line=Math.min(u.line+2,t):u.md.block.tokenize(u,a,t,!0),(!u.tight||S)&&(l=!1),S=u.line-a>1&&u.isEmpty(u.line-1),u.blkIndent=u.listIndent,u.listIndent=q,u.tShift[a]=O,u.sCount[a]=M,u.tight=T,i=u.push("list_item_close","li",-1),i.markup=String.fromCharCode(h),a=u.line,N[1]=a,a>=t||u.sCount[a]<u.blkIndent||u.sCount[a]-u.blkIndent>=4)break;let U=!1;for(let z=0,L=E.length;z<L;z++)if(E[z](u,a,t,!0)){U=!0;break}if(U)break;if(d){if(b=yt(u,a),b<0)break;c=u.bMarks[a]+u.tShift[a]}else if(b=kt(u,a),b<0)break;if(h!==u.src.charCodeAt(b-1))break}return d?i=u.push("ordered_list_close","ol",-1):i=u.push("bullet_list_close","ul",-1),i.markup=String.fromCharCode(h),y[1]=a,u.line=a,u.parentType=F,l&&kr(u,v),!0}function Cr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e],c=e+1;if(u.sCount[e]-u.blkIndent>=4||u.src.charCodeAt(r)!==91)return!1;function i(E){const F=u.lineMax;if(E>=F||u.isEmpty(E))return null;let p=!1;if(u.sCount[E]-u.blkIndent>3&&(p=!0),u.sCount[E]<0&&(p=!0),!p){const k=u.md.block.ruler.getRules("reference"),D=u.parentType;u.parentType="reference";let N=!1;for(let T=0,O=k.length;T<O;T++)if(k[T](u,E,F,!0)){N=!0;break}if(u.parentType=D,N)return null}const C=u.bMarks[E]+u.tShift[E],x=u.eMarks[E];return u.src.slice(C,x+1)}let a=u.src.slice(r,o+1);o=a.length;let l=-1;for(r=1;r<o;r++){const E=a.charCodeAt(r);if(E===91)return!1;if(E===93){l=r;break}else if(E===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(E===92&&(r++,r<o&&a.charCodeAt(r)===10)){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}}if(l<0||a.charCodeAt(l+1)!==58)return!1;for(r=l+2;r<o;r++){const E=a.charCodeAt(r);if(E===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(!j(E))break}const s=u.md.helpers.parseLinkDestination(a,r,o);if(!s.ok)return!1;const d=u.md.normalizeLink(s.str);if(!u.md.validateLink(d))return!1;r=s.pos;const _=r,b=c,h=r;for(;r<o;r++){const E=a.charCodeAt(r);if(E===10){const F=i(c);F!==null&&(a+=F,o=a.length,c++)}else if(!j(E))break}let v=u.md.helpers.parseLinkTitle(a,r,o);for(;v.can_continue;){const E=i(c);if(E===null)break;a+=E,r=o,o=a.length,c++,v=u.md.helpers.parseLinkTitle(a,r,o,v)}let y;for(r<o&&h!==r&&v.ok?(y=v.str,r=v.pos):(y="",r=_,c=b);r<o;){const E=a.charCodeAt(r);if(!j(E))break;r++}if(r<o&&a.charCodeAt(r)!==10&&y)for(y="",r=_,c=b;r<o;){const E=a.charCodeAt(r);if(!j(E))break;r++}if(r<o&&a.charCodeAt(r)!==10)return!1;const S=$u(a.slice(1,l));return S?(n||(typeof u.env.references>"u"&&(u.env.references={}),typeof u.env.references[S]>"u"&&(u.env.references[S]={title:y,href:d}),u.line=c),!0):!1}const vr=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Er="[a-zA-Z_:][a-zA-Z0-9:._-]*",Dr="(?:"+"[^\"'=<>`\\x00-\\x20]+"+"|"+"'[^']*'"+"|"+'"[^"]*"'+")",Ct="<[A-Za-z][A-Za-z0-9\\-]*"+("(?:\\s+"+Er+"(?:\\s*=\\s*"+Dr+")?)")+"*\\s*\\/?>",vt="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",Fr="<!---?>|<!--(?:[^-]|-[^-]|--[^>])*-->",Ar="<[?][\\s\\S]*?[?]>",wr="<![A-Za-z][^>]*>",Sr="<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",Br=new RegExp("^(?:"+Ct+"|"+vt+"|"+Fr+"|"+Ar+"|"+wr+"|"+Sr+")"),Tr=new RegExp("^(?:"+Ct+"|"+vt+")"),_u=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^<!--/,/-->/,!0],[/^<\?/,/\?>/,!0],[/^<![A-Z]/,/>/,!0],[/^<!\[CDATA\[/,/\]\]>/,!0],[new RegExp("^</?("+vr.join("|")+")(?=(\\s|/?>|$))","i"),/^$/,!0],[new RegExp(Tr.source+"\\s*$"),/^$/,!1]];function Ir(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4||!u.md.options.html||u.src.charCodeAt(r)!==60)return!1;let c=u.src.slice(r,o),i=0;for(;i<_u.length&&!_u[i][0].test(c);i++);if(i===_u.length)return!1;if(n)return _u[i][2];let a=e+1;if(!_u[i][1].test(c)){for(;a<t&&!(u.sCount[a]<u.blkIndent);a++)if(r=u.bMarks[a]+u.tShift[a],o=u.eMarks[a],c=u.src.slice(r,o),_u[i][1].test(c)){c.length!==0&&a++;break}}u.line=a;const l=u.push("html_block","",0);return l.map=[e,a],l.content=u.getLines(e,a,u.blkIndent,!0),!0}function Nr(u,e,t,n){let r=u.bMarks[e]+u.tShift[e],o=u.eMarks[e];if(u.sCount[e]-u.blkIndent>=4)return!1;let c=u.src.charCodeAt(r);if(c!==35||r>=o)return!1;let i=1;for(c=u.src.charCodeAt(++r);c===35&&r<o&&i<=6;)i++,c=u.src.charCodeAt(++r);if(i>6||r<o&&!j(c))return!1;if(n)return!0;o=u.skipSpacesBack(o,r);const a=u.skipCharsBack(o,35,r);a>r&&j(u.src.charCodeAt(a-1))&&(o=a),u.line=e+1;const l=u.push("heading_open","h"+String(i),1);l.markup="########".slice(0,i),l.map=[e,u.line];const s=u.push("inline","",0);s.content=u.src.slice(r,o).trim(),s.map=[e,u.line],s.children=[];const d=u.push("heading_close","h"+String(i),-1);return d.markup="########".slice(0,i),!0}function Lr(u,e,t){const n=u.md.block.ruler.getRules("paragraph");if(u.sCount[e]-u.blkIndent>=4)return!1;const r=u.parentType;u.parentType="paragraph";let o=0,c,i=e+1;for(;i<t&&!u.isEmpty(i);i++){if(u.sCount[i]-u.blkIndent>3)continue;if(u.sCount[i]>=u.blkIndent){let b=u.bMarks[i]+u.tShift[i];const h=u.eMarks[i];if(b<h&&(c=u.src.charCodeAt(b),(c===45||c===61)&&(b=u.skipChars(b,c),b=u.skipSpaces(b),b>=h))){o=c===61?1:2;break}}if(u.sCount[i]<0)continue;let _=!1;for(let b=0,h=n.length;b<h;b++)if(n[b](u,i,t,!0)){_=!0;break}if(_)break}if(!o)return!1;const a=u.getLines(e,i,u.blkIndent,!1).trim();u.line=i+1;const l=u.push("heading_open","h"+String(o),1);l.markup=String.fromCharCode(c),l.map=[e,u.line];const s=u.push("inline","",0);s.content=a,s.map=[e,u.line-1],s.children=[];const d=u.push("heading_close","h"+String(o),-1);return d.markup=String.fromCharCode(c),u.parentType=r,!0}function Or(u,e,t){const n=u.md.block.ruler.getRules("paragraph"),r=u.parentType;let o=e+1;for(u.parentType="paragraph";o<t&&!u.isEmpty(o);o++){if(u.sCount[o]-u.blkIndent>3||u.sCount[o]<0)continue;let l=!1;for(let s=0,d=n.length;s<d;s++)if(n[s](u,o,t,!0)){l=!0;break}if(l)break}const c=u.getLines(e,o,u.blkIndent,!1).trim();u.line=o;const i=u.push("paragraph_open","p",1);i.map=[e,u.line];const a=u.push("inline","",0);return a.content=c,a.map=[e,u.line],a.children=[],u.push("paragraph_close","p",-1),u.parentType=r,!0}const Uu=[["table",br,["paragraph","reference"]],["code",mr],["fence",xr,["paragraph","reference","blockquote","list"]],["blockquote",gr,["paragraph","reference","blockquote","list"]],["hr",_r,["paragraph","reference","blockquote","list"]],["list",yr,["paragraph","reference","blockquote"]],["reference",Cr],["html_block",Ir,["paragraph","reference","blockquote"]],["heading",Nr,["paragraph","reference","blockquote"]],["lheading",Lr],["paragraph",Or]];function Zu(){this.ruler=new W;for(let u=0;u<Uu.length;u++)this.ruler.push(Uu[u][0],Uu[u][1],{alt:(Uu[u][2]||[]).slice()})}Zu.prototype.tokenize=function(u,e,t){const n=this.ruler.getRules(""),r=n.length,o=u.md.options.maxNesting;let c=e,i=!1;for(;c<t&&(u.line=c=u.skipEmptyLines(c),!(c>=t||u.sCount[c]<u.blkIndent));){if(u.level>=o){u.line=t;break}const a=u.line;let l=!1;for(let s=0;s<r;s++)if(l=n[s](u,c,t,!1),l){if(a>=u.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");u.tight=!i,u.isEmpty(u.line-1)&&(i=!0),c=u.line,c<t&&u.isEmpty(c)&&(i=!0,c++,u.line=c)}},Zu.prototype.parse=function(u,e,t,n){if(!u)return;const r=new this.State(u,e,t,n);this.tokenize(r,r.line,r.lineMax)},Zu.prototype.State=tu;function wu(u,e,t,n){this.src=u,this.env=t,this.md=e,this.tokens=n,this.tokens_meta=Array(n.length),this.pos=0,this.posMax=this.src.length,this.level=0,this.pending="",this.pendingLevel=0,this.cache={},this.delimiters=[],this._prev_delimiters=[],this.backticks={},this.backticksScanned=!1,this.linkLevel=0}wu.prototype.pushPending=function(){const u=new X("text","",0);return u.content=this.pending,u.level=this.pendingLevel,this.tokens.push(u),this.pending="",u},wu.prototype.push=function(u,e,t){this.pending&&this.pushPending();const n=new X(u,e,t);let r=null;return t<0&&(this.level--,this.delimiters=this._prev_delimiters.pop()),n.level=this.level,t>0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],r={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(n),this.tokens_meta.push(r),n},wu.prototype.scanDelims=function(u,e){const t=this.posMax,n=this.src.charCodeAt(u),r=u>0?this.src.charCodeAt(u-1):32;let o=u;for(;o<t&&this.src.charCodeAt(o)===n;)o++;const c=o-u,i=o<t?this.src.charCodeAt(o):32,a=Au(r)||Fu(String.fromCharCode(r)),l=Au(i)||Fu(String.fromCharCode(i)),s=Du(r),d=Du(i),_=!d&&(!l||s||a),b=!s&&(!a||d||l);return{can_open:_&&(e||!b||a),can_close:b&&(e||!_||l),length:c}},wu.prototype.Token=X;function Mr(u){switch(u){case 10:case 33:case 35:case 36:case 37:case 38:case 42:case 43:case 45:case 58:case 60:case 61:case 62:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 125:case 126:return!0;default:return!1}}function Pr(u,e){let t=u.pos;for(;t<u.posMax&&!Mr(u.src.charCodeAt(t));)t++;return t===u.pos?!1:(e||(u.pending+=u.src.slice(u.pos,t)),u.pos=t,!0)}const jr=/(?:^|[^a-z0-9.+-])([a-z][a-z0-9.+-]*)$/i;function zr(u,e){if(!u.md.options.linkify||u.linkLevel>0)return!1;const t=u.pos,n=u.posMax;if(t+3>n||u.src.charCodeAt(t)!==58||u.src.charCodeAt(t+1)!==47||u.src.charCodeAt(t+2)!==47)return!1;const r=u.pending.match(jr);if(!r)return!1;const o=r[1],c=u.md.linkify.matchAtStart(u.src.slice(t-o.length));if(!c)return!1;let i=c.url;if(i.length<=o.length)return!1;i=i.replace(/\*+$/,"");const a=u.md.normalizeLink(i);if(!u.md.validateLink(a))return!1;if(!e){u.pending=u.pending.slice(0,-o.length);const l=u.push("link_open","a",1);l.attrs=[["href",a]],l.markup="linkify",l.info="auto";const s=u.push("text","",0);s.content=u.md.normalizeLinkText(i);const d=u.push("link_close","a",-1);d.markup="linkify",d.info="auto"}return u.pos+=i.length-o.length,!0}function Rr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==10)return!1;const n=u.pending.length-1,r=u.posMax;if(!e)if(n>=0&&u.pending.charCodeAt(n)===32)if(n>=1&&u.pending.charCodeAt(n-1)===32){let o=n-1;for(;o>=1&&u.pending.charCodeAt(o-1)===32;)o--;u.pending=u.pending.slice(0,o),u.push("hardbreak","br",0)}else u.pending=u.pending.slice(0,-1),u.push("softbreak","br",0);else u.push("softbreak","br",0);for(t++;t<r&&j(u.src.charCodeAt(t));)t++;return u.pos=t,!0}const be=[];for(let u=0;u<256;u++)be.push(0);"\\!\"#$%&'()*+,./:;<=>?@[]^_`{|}~-".split("").forEach(function(u){be[u.charCodeAt(0)]=1});function qr(u,e){let t=u.pos;const n=u.posMax;if(u.src.charCodeAt(t)!==92||(t++,t>=n))return!1;let r=u.src.charCodeAt(t);if(r===10){for(e||u.push("hardbreak","br",0),t++;t<n&&(r=u.src.charCodeAt(t),!!j(r));)t++;return u.pos=t,!0}let o=u.src[t];if(r>=55296&&r<=56319&&t+1<n){const i=u.src.charCodeAt(t+1);i>=56320&&i<=57343&&(o+=u.src[t+1],t++)}const c="\\"+o;if(!e){const i=u.push("text_special","",0);r<256&&be[r]!==0?i.content=o:i.content=c,i.markup=c,i.info="escape"}return u.pos=t+1,!0}function Vr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==96)return!1;const r=t;t++;const o=u.posMax;for(;t<o&&u.src.charCodeAt(t)===96;)t++;const c=u.src.slice(r,t),i=c.length;if(u.backticksScanned&&(u.backticks[i]||0)<=r)return e||(u.pending+=c),u.pos+=i,!0;let a=t,l;for(;(l=u.src.indexOf("`",a))!==-1;){for(a=l+1;a<o&&u.src.charCodeAt(a)===96;)a++;const s=a-l;if(s===i){if(!e){const d=u.push("code_inline","code",0);d.markup=c,d.content=u.src.slice(t,l).replace(/\n/g," ").replace(/^ (.+) $/,"$1")}return u.pos=a,!0}u.backticks[s]=l}return u.backticksScanned=!0,e||(u.pending+=c),u.pos+=i,!0}function $r(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==126)return!1;const r=u.scanDelims(u.pos,!0);let o=r.length;const c=String.fromCharCode(n);if(o<2)return!1;let i;o%2&&(i=u.push("text","",0),i.content=c,o--);for(let a=0;a<o;a+=2)i=u.push("text","",0),i.content=c+c,u.delimiters.push({marker:n,length:0,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close});return u.pos+=r.length,!0}function Et(u,e){let t;const n=[],r=e.length;for(let o=0;o<r;o++){const c=e[o];if(c.marker!==126||c.end===-1)continue;const i=e[c.end];t=u.tokens[c.token],t.type="s_open",t.tag="s",t.nesting=1,t.markup="~~",t.content="",t=u.tokens[i.token],t.type="s_close",t.tag="s",t.nesting=-1,t.markup="~~",t.content="",u.tokens[i.token-1].type==="text"&&u.tokens[i.token-1].content==="~"&&n.push(i.token-1)}for(;n.length;){const o=n.pop();let c=o+1;for(;c<u.tokens.length&&u.tokens[c].type==="s_close";)c++;c--,o!==c&&(t=u.tokens[c],u.tokens[c]=u.tokens[o],u.tokens[o]=t)}}function Hr(u){const e=u.tokens_meta,t=u.tokens_meta.length;Et(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&Et(u,e[n].delimiters)}const Dt={tokenize:$r,postProcess:Hr};function Ur(u,e){const t=u.pos,n=u.src.charCodeAt(t);if(e||n!==95&&n!==42)return!1;const r=u.scanDelims(u.pos,n===42);for(let o=0;o<r.length;o++){const c=u.push("text","",0);c.content=String.fromCharCode(n),u.delimiters.push({marker:n,length:r.length,token:u.tokens.length-1,end:-1,open:r.can_open,close:r.can_close})}return u.pos+=r.length,!0}function Ft(u,e){const t=e.length;for(let n=t-1;n>=0;n--){const r=e[n];if(r.marker!==95&&r.marker!==42||r.end===-1)continue;const o=e[r.end],c=n>0&&e[n-1].end===r.end+1&&e[n-1].marker===r.marker&&e[n-1].token===r.token-1&&e[r.end+1].token===o.token+1,i=String.fromCharCode(r.marker),a=u.tokens[r.token];a.type=c?"strong_open":"em_open",a.tag=c?"strong":"em",a.nesting=1,a.markup=c?i+i:i,a.content="";const l=u.tokens[o.token];l.type=c?"strong_close":"em_close",l.tag=c?"strong":"em",l.nesting=-1,l.markup=c?i+i:i,l.content="",c&&(u.tokens[e[n-1].token].content="",u.tokens[e[r.end+1].token].content="",n--)}}function Zr(u){const e=u.tokens_meta,t=u.tokens_meta.length;Ft(u,u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&Ft(u,e[n].delimiters)}const At={tokenize:Ur,postProcess:Zr};function Gr(u,e){let t,n,r,o,c="",i="",a=u.pos,l=!0;if(u.src.charCodeAt(u.pos)!==91)return!1;const s=u.pos,d=u.posMax,_=u.pos+1,b=u.md.helpers.parseLinkLabel(u,u.pos,!0);if(b<0)return!1;let h=b+1;if(h<d&&u.src.charCodeAt(h)===40){for(l=!1,h++;h<d&&(t=u.src.charCodeAt(h),!(!j(t)&&t!==10));h++);if(h>=d)return!1;if(a=h,r=u.md.helpers.parseLinkDestination(u.src,h,u.posMax),r.ok){for(c=u.md.normalizeLink(r.str),u.md.validateLink(c)?h=r.pos:c="",a=h;h<d&&(t=u.src.charCodeAt(h),!(!j(t)&&t!==10));h++);if(r=u.md.helpers.parseLinkTitle(u.src,h,u.posMax),h<d&&a!==h&&r.ok)for(i=r.str,h=r.pos;h<d&&(t=u.src.charCodeAt(h),!(!j(t)&&t!==10));h++);}(h>=d||u.src.charCodeAt(h)!==41)&&(l=!0),h++}if(l){if(typeof u.env.references>"u")return!1;if(h<d&&u.src.charCodeAt(h)===91?(a=h+1,h=u.md.helpers.parseLinkLabel(u,h),h>=0?n=u.src.slice(a,h++):h=b+1):h=b+1,n||(n=u.src.slice(_,b)),o=u.env.references[$u(n)],!o)return u.pos=s,!1;c=o.href,i=o.title}if(!e){u.pos=_,u.posMax=b;const v=u.push("link_open","a",1),y=[["href",c]];v.attrs=y,i&&y.push(["title",i]),u.linkLevel++,u.md.inline.tokenize(u),u.linkLevel--,u.push("link_close","a",-1)}return u.pos=h,u.posMax=d,!0}function Wr(u,e){let t,n,r,o,c,i,a,l,s="";const d=u.pos,_=u.posMax;if(u.src.charCodeAt(u.pos)!==33||u.src.charCodeAt(u.pos+1)!==91)return!1;const b=u.pos+2,h=u.md.helpers.parseLinkLabel(u,u.pos+1,!1);if(h<0)return!1;if(o=h+1,o<_&&u.src.charCodeAt(o)===40){for(o++;o<_&&(t=u.src.charCodeAt(o),!(!j(t)&&t!==10));o++);if(o>=_)return!1;for(l=o,i=u.md.helpers.parseLinkDestination(u.src,o,u.posMax),i.ok&&(s=u.md.normalizeLink(i.str),u.md.validateLink(s)?o=i.pos:s=""),l=o;o<_&&(t=u.src.charCodeAt(o),!(!j(t)&&t!==10));o++);if(i=u.md.helpers.parseLinkTitle(u.src,o,u.posMax),o<_&&l!==o&&i.ok)for(a=i.str,o=i.pos;o<_&&(t=u.src.charCodeAt(o),!(!j(t)&&t!==10));o++);else a="";if(o>=_||u.src.charCodeAt(o)!==41)return u.pos=d,!1;o++}else{if(typeof u.env.references>"u")return!1;if(o<_&&u.src.charCodeAt(o)===91?(l=o+1,o=u.md.helpers.parseLinkLabel(u,o),o>=0?r=u.src.slice(l,o++):o=h+1):o=h+1,r||(r=u.src.slice(b,h)),c=u.env.references[$u(r)],!c)return u.pos=d,!1;s=c.href,a=c.title}if(!e){n=u.src.slice(b,h);const v=[];u.md.inline.parse(n,u.md,u.env,v);const y=u.push("image","img",0),S=[["src",s],["alt",""]];y.attrs=S,y.children=v,y.content=n,a&&S.push(["title",a])}return u.pos=o,u.posMax=_,!0}const Qr=/^([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])?)*)$/,Jr=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Kr(u,e){let t=u.pos;if(u.src.charCodeAt(t)!==60)return!1;const n=u.pos,r=u.posMax;for(;;){if(++t>=r)return!1;const c=u.src.charCodeAt(t);if(c===60)return!1;if(c===62)break}const o=u.src.slice(n+1,t);if(Jr.test(o)){const c=u.md.normalizeLink(o);if(!u.md.validateLink(c))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",c]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}if(Qr.test(o)){const c=u.md.normalizeLink("mailto:"+o);if(!u.md.validateLink(c))return!1;if(!e){const i=u.push("link_open","a",1);i.attrs=[["href",c]],i.markup="autolink",i.info="auto";const a=u.push("text","",0);a.content=u.md.normalizeLinkText(o);const l=u.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return u.pos+=o.length+2,!0}return!1}function Yr(u){return/^<a[>\s]/i.test(u)}function Xr(u){return/^<\/a\s*>/i.test(u)}function uo(u){const e=u|32;return e>=97&&e<=122}function eo(u,e){if(!u.md.options.html)return!1;const t=u.posMax,n=u.pos;if(u.src.charCodeAt(n)!==60||n+2>=t)return!1;const r=u.src.charCodeAt(n+1);if(r!==33&&r!==63&&r!==47&&!uo(r))return!1;const o=u.src.slice(n).match(Br);if(!o)return!1;if(!e){const c=u.push("html_inline","",0);c.content=o[0],Yr(c.content)&&u.linkLevel++,Xr(c.content)&&u.linkLevel--}return u.pos+=o[0].length,!0}const to=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,no=/^&([a-z][a-z0-9]{1,31});/i;function ro(u,e){const t=u.pos,n=u.posMax;if(u.src.charCodeAt(t)!==38||t+1>=n)return!1;if(u.src.charCodeAt(t+1)===35){const o=u.src.slice(t).match(to);if(o){if(!e){const c=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),i=u.push("text_special","",0);i.content=fe(c)?Vu(c):Vu(65533),i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}else{const o=u.src.slice(t).match(no);if(o){const c=dt(o[0]);if(c!==o[0]){if(!e){const i=u.push("text_special","",0);i.content=c,i.markup=o[0],i.info="entity"}return u.pos+=o[0].length,!0}}}return!1}function wt(u){const e={},t=u.length;if(!t)return;let n=0,r=-2;const o=[];for(let c=0;c<t;c++){const i=u[c];if(o.push(0),(u[n].marker!==i.marker||r!==i.token-1)&&(n=c),r=i.token,i.length=i.length||0,!i.close)continue;e.hasOwnProperty(i.marker)||(e[i.marker]=[-1,-1,-1,-1,-1,-1]);const a=e[i.marker][(i.open?3:0)+i.length%3];let l=n-o[n]-1,s=l;for(;l>a;l-=o[l]+1){const d=u[l];if(d.marker===i.marker&&d.open&&d.end<0){let _=!1;if((d.close||i.open)&&(d.length+i.length)%3===0&&(d.length%3!==0||i.length%3!==0)&&(_=!0),!_){const b=l>0&&!u[l-1].open?o[l-1]+1:0;o[c]=c-l+b,o[l]=b,i.open=!1,d.end=c,d.close=!1,s=-1,r=-2;break}}}s!==-1&&(e[i.marker][(i.open?3:0)+(i.length||0)%3]=s)}}function oo(u){const e=u.tokens_meta,t=u.tokens_meta.length;wt(u.delimiters);for(let n=0;n<t;n++)e[n]&&e[n].delimiters&&wt(e[n].delimiters)}function co(u){let e,t,n=0;const r=u.tokens,o=u.tokens.length;for(e=t=0;e<o;e++)r[e].nesting<0&&n--,r[e].level=n,r[e].nesting>0&&n++,r[e].type==="text"&&e+1<o&&r[e+1].type==="text"?r[e+1].content=r[e].content+r[e+1].content:(e!==t&&(r[t]=r[e]),t++);e!==t&&(r.length=t)}const me=[["text",Pr],["linkify",zr],["newline",Rr],["escape",qr],["backticks",Vr],["strikethrough",Dt.tokenize],["emphasis",At.tokenize],["link",Gr],["image",Wr],["autolink",Kr],["html_inline",eo],["entity",ro]],xe=[["balance_pairs",oo],["strikethrough",Dt.postProcess],["emphasis",At.postProcess],["fragments_join",co]];function Su(){this.ruler=new W;for(let u=0;u<me.length;u++)this.ruler.push(me[u][0],me[u][1]);this.ruler2=new W;for(let u=0;u<xe.length;u++)this.ruler2.push(xe[u][0],xe[u][1])}Su.prototype.skipToken=function(u){const e=u.pos,t=this.ruler.getRules(""),n=t.length,r=u.md.options.maxNesting,o=u.cache;if(typeof o[e]<"u"){u.pos=o[e];return}let c=!1;if(u.level<r){for(let i=0;i<n;i++)if(u.level++,c=t[i](u,!0),u.level--,c){if(e>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}else u.pos=u.posMax;c||u.pos++,o[e]=u.pos},Su.prototype.tokenize=function(u){const e=this.ruler.getRules(""),t=e.length,n=u.posMax,r=u.md.options.maxNesting;for(;u.pos<n;){const o=u.pos;let c=!1;if(u.level<r){for(let i=0;i<t;i++)if(c=e[i](u,!1),c){if(o>=u.pos)throw new Error("inline rule didn't increment state.pos");break}}if(c){if(u.pos>=n)break;continue}u.pending+=u.src[u.pos++]}u.pending&&u.pushPending()},Su.prototype.parse=function(u,e,t,n){const r=new this.State(u,e,t,n);this.tokenize(r);const o=this.ruler2.getRules(""),c=o.length;for(let i=0;i<c;i++)o[i](r)},Su.prototype.State=wu;function io(u){const e={};u=u||{},e.src_Any=it.source,e.src_Cc=at.source,e.src_Z=st.source,e.src_P=ie.source,e.src_ZPCc=[e.src_Z,e.src_P,e.src_Cc].join("|"),e.src_ZCc=[e.src_Z,e.src_Cc].join("|");const t="[><|]";return e.src_pseudo_letter="(?:(?!"+t+"|"+e.src_ZPCc+")"+e.src_Any+")",e.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",e.src_auth="(?:(?:(?!"+e.src_ZCc+"|[@/\\[\\]()]).)+@)?",e.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",e.src_host_terminator="(?=$|"+t+"|"+e.src_ZPCc+")(?!"+(u["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+e.src_ZPCc+"))",e.src_path="(?:[/?#](?:(?!"+e.src_ZCc+"|"+t+`|[()[\\]{}.,"'?!\\-;]).|\\[(?:(?!`+e.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+e.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+e.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+e.src_ZCc+`|["]).)+\\"|\\'(?:(?!`+e.src_ZCc+"|[']).)+\\'|\\'(?="+e.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+e.src_ZCc+"|[.]|$)|"+(u["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+e.src_ZCc+"|$)|;(?!"+e.src_ZCc+"|$)|\\!+(?!"+e.src_ZCc+"|[!]|$)|\\?(?!"+e.src_ZCc+"|[?]|$))+|\\/)?",e.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',e.src_xn="xn--[a-z0-9\\-]{1,59}",e.src_domain_root="(?:"+e.src_xn+"|"+e.src_pseudo_letter+"{1,63})",e.src_domain="(?:"+e.src_xn+"|(?:"+e.src_pseudo_letter+")|(?:"+e.src_pseudo_letter+"(?:-|"+e.src_pseudo_letter+"){0,61}"+e.src_pseudo_letter+"))",e.src_host="(?:(?:(?:(?:"+e.src_domain+")\\.)*"+e.src_domain+"))",e.tpl_host_fuzzy="(?:"+e.src_ip4+"|(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%)))",e.tpl_host_no_ip_fuzzy="(?:(?:(?:"+e.src_domain+")\\.)+(?:%TLDS%))",e.src_host_strict=e.src_host+e.src_host_terminator,e.tpl_host_fuzzy_strict=e.tpl_host_fuzzy+e.src_host_terminator,e.src_host_port_strict=e.src_host+e.src_port+e.src_host_terminator,e.tpl_host_port_fuzzy_strict=e.tpl_host_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_port_no_ip_fuzzy_strict=e.tpl_host_no_ip_fuzzy+e.src_port+e.src_host_terminator,e.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+e.src_ZPCc+"|>|$))",e.tpl_email_fuzzy="(^|"+t+'|"|\\(|'+e.src_ZCc+")("+e.src_email_name+"@"+e.tpl_host_fuzzy_strict+")",e.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_fuzzy_strict+e.src_path+")",e.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+e.src_ZPCc+"))((?![$+<=>^`||])"+e.tpl_host_port_no_ip_fuzzy_strict+e.src_path+")",e}function ge(u){return Array.prototype.slice.call(arguments,1).forEach(function(t){t&&Object.keys(t).forEach(function(n){u[n]=t[n]})}),u}function Gu(u){return Object.prototype.toString.call(u)}function ao(u){return Gu(u)==="[object String]"}function lo(u){return Gu(u)==="[object Object]"}function so(u){return Gu(u)==="[object RegExp]"}function St(u){return Gu(u)==="[object Function]"}function fo(u){return u.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const Bt={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function ho(u){return Object.keys(u||{}).reduce(function(e,t){return e||Bt.hasOwnProperty(t)},!1)}const po={"http:":{validate:function(u,e,t){const n=u.slice(e);return t.re.http||(t.re.http=new RegExp("^\\/\\/"+t.re.src_auth+t.re.src_host_port_strict+t.re.src_path,"i")),t.re.http.test(n)?n.match(t.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(u,e,t){const n=u.slice(e);return t.re.no_http||(t.re.no_http=new RegExp("^"+t.re.src_auth+"(?:localhost|(?:(?:"+t.re.src_domain+")\\.)+"+t.re.src_domain_root+")"+t.re.src_port+t.re.src_host_terminator+t.re.src_path,"i")),t.re.no_http.test(n)?e>=3&&u[e-3]===":"||e>=3&&u[e-3]==="/"?0:n.match(t.re.no_http)[0].length:0}},"mailto:":{validate:function(u,e,t){const n=u.slice(e);return t.re.mailto||(t.re.mailto=new RegExp("^"+t.re.src_email_name+"@"+t.re.src_host_strict,"i")),t.re.mailto.test(n)?n.match(t.re.mailto)[0].length:0}}},bo="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",mo="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function xo(u){u.__index__=-1,u.__text_cache__=""}function go(u){return function(e,t){const n=e.slice(t);return u.test(n)?n.match(u)[0].length:0}}function Tt(){return function(u,e){e.normalize(u)}}function Wu(u){const e=u.re=io(u.__opts__),t=u.__tlds__.slice();u.onCompile(),u.__tlds_replaced__||t.push(bo),t.push(e.src_xn),e.src_tlds=t.join("|");function n(i){return i.replace("%TLDS%",e.src_tlds)}e.email_fuzzy=RegExp(n(e.tpl_email_fuzzy),"i"),e.link_fuzzy=RegExp(n(e.tpl_link_fuzzy),"i"),e.link_no_ip_fuzzy=RegExp(n(e.tpl_link_no_ip_fuzzy),"i"),e.host_fuzzy_test=RegExp(n(e.tpl_host_fuzzy_test),"i");const r=[];u.__compiled__={};function o(i,a){throw new Error('(LinkifyIt) Invalid schema "'+i+'": '+a)}Object.keys(u.__schemas__).forEach(function(i){const a=u.__schemas__[i];if(a===null)return;const l={validate:null,link:null};if(u.__compiled__[i]=l,lo(a)){so(a.validate)?l.validate=go(a.validate):St(a.validate)?l.validate=a.validate:o(i,a),St(a.normalize)?l.normalize=a.normalize:a.normalize?o(i,a):l.normalize=Tt();return}if(ao(a)){r.push(i);return}o(i,a)}),r.forEach(function(i){u.__compiled__[u.__schemas__[i]]&&(u.__compiled__[i].validate=u.__compiled__[u.__schemas__[i]].validate,u.__compiled__[i].normalize=u.__compiled__[u.__schemas__[i]].normalize)}),u.__compiled__[""]={validate:null,normalize:Tt()};const c=Object.keys(u.__compiled__).filter(function(i){return i.length>0&&u.__compiled__[i]}).map(fo).join("|");u.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","i"),u.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+e.src_ZPCc+"))("+c+")","ig"),u.re.schema_at_start=RegExp("^"+u.re.schema_search.source,"i"),u.re.pretest=RegExp("("+u.re.schema_test.source+")|("+u.re.host_fuzzy_test.source+")|@","i"),xo(u)}function _o(u,e){const t=u.__index__,n=u.__last_index__,r=u.__text_cache__.slice(t,n);this.schema=u.__schema__.toLowerCase(),this.index=t+e,this.lastIndex=n+e,this.raw=r,this.text=r,this.url=r}function _e(u,e){const t=new _o(u,e);return u.__compiled__[t.schema].normalize(t,u),t}function J(u,e){if(!(this instanceof J))return new J(u,e);e||ho(u)&&(e=u,u={}),this.__opts__=ge({},Bt,e),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=ge({},po,u),this.__compiled__={},this.__tlds__=mo,this.__tlds_replaced__=!1,this.re={},Wu(this)}J.prototype.add=function(e,t){return this.__schemas__[e]=t,Wu(this),this},J.prototype.set=function(e){return this.__opts__=ge(this.__opts__,e),this},J.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;let t,n,r,o,c,i,a,l,s;if(this.re.schema_test.test(e)){for(a=this.re.schema_search,a.lastIndex=0;(t=a.exec(e))!==null;)if(o=this.testSchemaAt(e,t[2],a.lastIndex),o){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l<this.__index__)&&(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))!==null&&(c=n.index+n[1].length,(this.__index__<0||c<this.__index__)&&(this.__schema__="",this.__index__=c,this.__last_index__=n.index+n[0].length))),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&(s=e.indexOf("@"),s>=0&&(r=e.match(this.re.email_fuzzy))!==null&&(c=r.index+r[1].length,i=r.index+r[0].length,(this.__index__<0||c<this.__index__||c===this.__index__&&i>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=c,this.__last_index__=i))),this.__index__>=0},J.prototype.pretest=function(e){return this.re.pretest.test(e)},J.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},J.prototype.match=function(e){const t=[];let n=0;this.__index__>=0&&this.__text_cache__===e&&(t.push(_e(this,n)),n=this.__last_index__);let r=n?e.slice(n):e;for(;this.test(r);)t.push(_e(this,n)),r=r.slice(this.__last_index__),n+=this.__last_index__;return t.length?t:null},J.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;const t=this.re.schema_at_start.exec(e);if(!t)return null;const n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,_e(this,0)):null},J.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter(function(n,r,o){return n!==o[r-1]}).reverse(),Wu(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,Wu(this),this)},J.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),e.schema==="mailto:"&&!/^mailto:/i.test(e.url)&&(e.url="mailto:"+e.url)},J.prototype.onCompile=function(){};const ku=2147483647,nu=36,ke=1,Bu=26,ko=38,yo=700,It=72,Nt=128,Lt="-",Co=/^xn--/,vo=/[^\0-\x7F]/,Eo=/[\x2E\u3002\uFF0E\uFF61]/g,Do={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ye=nu-ke,ru=Math.floor,Ce=String.fromCharCode;function du(u){throw new RangeError(Do[u])}function Fo(u,e){const t=[];let n=u.length;for(;n--;)t[n]=e(u[n]);return t}function Ot(u,e){const t=u.split("@");let n="";t.length>1&&(n=t[0]+"@",u=t[1]),u=u.replace(Eo,".");const r=u.split("."),o=Fo(r,e).join(".");return n+o}function Mt(u){const e=[];let t=0;const n=u.length;for(;t<n;){const r=u.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){const o=u.charCodeAt(t++);(o&64512)==56320?e.push(((r&1023)<<10)+(o&1023)+65536):(e.push(r),t--)}else e.push(r)}return e}const Ao=u=>String.fromCodePoint(...u),wo=function(u){return u>=48&&u<58?26+(u-48):u>=65&&u<91?u-65:u>=97&&u<123?u-97:nu},Pt=function(u,e){return u+22+75*(u<26)-((e!=0)<<5)},jt=function(u,e,t){let n=0;for(u=t?ru(u/yo):u>>1,u+=ru(u/e);u>ye*Bu>>1;n+=nu)u=ru(u/ye);return ru(n+(ye+1)*u/(u+ko))},zt=function(u){const e=[],t=u.length;let n=0,r=Nt,o=It,c=u.lastIndexOf(Lt);c<0&&(c=0);for(let i=0;i<c;++i)u.charCodeAt(i)>=128&&du("not-basic"),e.push(u.charCodeAt(i));for(let i=c>0?c+1:0;i<t;){const a=n;for(let s=1,d=nu;;d+=nu){i>=t&&du("invalid-input");const _=wo(u.charCodeAt(i++));_>=nu&&du("invalid-input"),_>ru((ku-n)/s)&&du("overflow"),n+=_*s;const b=d<=o?ke:d>=o+Bu?Bu:d-o;if(_<b)break;const h=nu-b;s>ru(ku/h)&&du("overflow"),s*=h}const l=e.length+1;o=jt(n-a,l,a==0),ru(n/l)>ku-r&&du("overflow"),r+=ru(n/l),n%=l,e.splice(n++,0,r)}return String.fromCodePoint(...e)},Rt=function(u){const e=[];u=Mt(u);const t=u.length;let n=Nt,r=0,o=It;for(const a of u)a<128&&e.push(Ce(a));const c=e.length;let i=c;for(c&&e.push(Lt);i<t;){let a=ku;for(const s of u)s>=n&&s<a&&(a=s);const l=i+1;a-n>ru((ku-r)/l)&&du("overflow"),r+=(a-n)*l,n=a;for(const s of u)if(s<n&&++r>ku&&du("overflow"),s===n){let d=r;for(let _=nu;;_+=nu){const b=_<=o?ke:_>=o+Bu?Bu:_-o;if(d<b)break;const h=d-b,v=nu-b;e.push(Ce(Pt(b+h%v,0))),d=ru(h/v)}e.push(Ce(Pt(d,0))),o=jt(r,l,i===c),r=0,++i}++r,++n}return e.join("")},qt={version:"2.3.1",ucs2:{decode:Mt,encode:Ao},decode:zt,encode:Rt,toASCII:function(u){return Ot(u,function(e){return vo.test(e)?"xn--"+Rt(e):e})},toUnicode:function(u){return Ot(u,function(e){return Co.test(e)?zt(e.slice(4).toLowerCase()):e})}},So={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:100},components:{core:{},block:{},inline:{}}},zero:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["paragraph"]},inline:{rules:["text"],rules2:["balance_pairs","fragments_join"]}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkify:!1,typographer:!1,quotes:"“”‘’",highlight:null,maxNesting:20},components:{core:{rules:["normalize","block","inline","text_join"]},block:{rules:["blockquote","code","fence","heading","hr","html_block","lheading","list","reference","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","html_inline","image","link","newline","text"],rules2:["balance_pairs","emphasis","fragments_join"]}}}},Bo=/^(vbscript|javascript|file|data):/,To=/^data:image\/(gif|png|jpeg|webp);/;function Io(u){const e=u.trim().toLowerCase();return Bo.test(e)?To.test(e):!0}const Vt=["http:","https:","mailto:"];function No(u){const e=ce(u,!0);if(e.hostname&&(!e.protocol||Vt.indexOf(e.protocol)>=0))try{e.hostname=qt.toASCII(e.hostname)}catch{}return Eu(oe(e))}function Lo(u){const e=ce(u,!0);if(e.hostname&&(!e.protocol||Vt.indexOf(e.protocol)>=0))try{e.hostname=qt.toUnicode(e.hostname)}catch{}return mu(oe(e),mu.defaultChars+"%")}function Y(u,e){if(!(this instanceof Y))return new Y(u,e);e||se(u)||(e=u||{},u="default"),this.inline=new Su,this.block=new Zu,this.core=new he,this.renderer=new gu,this.linkify=new J,this.validateLink=Io,this.normalizeLink=No,this.normalizeLinkText=Lo,this.utils=H0,this.helpers=qu({},W0),this.options={},this.configure(u),e&&this.set(e)}Y.prototype.set=function(u){return qu(this.options,u),this},Y.prototype.configure=function(u){const e=this;if(se(u)){const t=u;if(u=So[t],!u)throw new Error('Wrong `markdown-it` preset "'+t+'", check name')}if(!u)throw new Error("Wrong `markdown-it` preset, can't be empty");return u.options&&e.set(u.options),u.components&&Object.keys(u.components).forEach(function(t){u.components[t].rules&&e[t].ruler.enableOnly(u.components[t].rules),u.components[t].rules2&&e[t].ruler2.enableOnly(u.components[t].rules2)}),this},Y.prototype.enable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.enable(u,!0))},this),t=t.concat(this.inline.ruler2.enable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+n);return this},Y.prototype.disable=function(u,e){let t=[];Array.isArray(u)||(u=[u]),["core","block","inline"].forEach(function(r){t=t.concat(this[r].ruler.disable(u,!0))},this),t=t.concat(this.inline.ruler2.disable(u,!0));const n=u.filter(function(r){return t.indexOf(r)<0});if(n.length&&!e)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+n);return this},Y.prototype.use=function(u){const e=[this].concat(Array.prototype.slice.call(arguments,1));return u.apply(u,e),this},Y.prototype.parse=function(u,e){if(typeof u!="string")throw new Error("Input data should be a String");const t=new this.core.State(u,this,e);return this.core.process(t),t.tokens},Y.prototype.render=function(u,e){return e=e||{},this.renderer.render(this.parse(u,e),this.options,e)},Y.prototype.parseInline=function(u,e){const t=new this.core.State(u,this,e);return t.inlineMode=!0,this.core.process(t),t.tokens},Y.prototype.renderInline=function(u,e){return e=e||{},this.renderer.render(this.parseInline(u,e),this.options,e)};var Oo={207:(u,e,t)=>{u.exports=t(452)},452:u=>{var e=(function(t){var n,r=Object.prototype,o=r.hasOwnProperty,c=typeof Symbol=="function"?Symbol:{},i=c.iterator||"@@iterator",a=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function s(g,m,A){return Object.defineProperty(g,m,{value:A,enumerable:!0,configurable:!0,writable:!0}),g[m]}try{s({},"")}catch{s=function(m,A,I){return m[A]=I}}function d(g,m,A,I){var B=m&&m.prototype instanceof E?m:E,R=Object.create(B.prototype),V=new U(I||[]);return R._invoke=(function(Q,G,P){var Z=b;return function(ou,rn){if(Z===v)throw new Error("Generator is already running");if(Z===y){if(ou==="throw")throw rn;return L()}for(P.method=ou,P.arg=rn;;){var on=P.delegate;if(on){var Be=O(on,P);if(Be){if(Be===S)continue;return Be}}if(P.method==="next")P.sent=P._sent=P.arg;else if(P.method==="throw"){if(Z===b)throw Z=y,P.arg;P.dispatchException(P.arg)}else P.method==="return"&&P.abrupt("return",P.arg);Z=v;var Nu=_(Q,G,P);if(Nu.type==="normal"){if(Z=P.done?y:h,Nu.arg===S)continue;return{value:Nu.arg,done:P.done}}Nu.type==="throw"&&(Z=y,P.method="throw",P.arg=Nu.arg)}}})(g,A,V),R}function _(g,m,A){try{return{type:"normal",arg:g.call(m,A)}}catch(I){return{type:"throw",arg:I}}}t.wrap=d;var b="suspendedStart",h="suspendedYield",v="executing",y="completed",S={};function E(){}function F(){}function p(){}var C={};s(C,i,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(z([])));k&&k!==r&&o.call(k,i)&&(C=k);var D=p.prototype=E.prototype=Object.create(C);function N(g){["next","throw","return"].forEach((function(m){s(g,m,(function(A){return this._invoke(m,A)}))}))}function T(g,m){function A(B,R,V,Q){var G=_(g[B],g,R);if(G.type!=="throw"){var P=G.arg,Z=P.value;return Z&&typeof Z=="object"&&o.call(Z,"__await")?m.resolve(Z.__await).then((function(ou){A("next",ou,V,Q)}),(function(ou){A("throw",ou,V,Q)})):m.resolve(Z).then((function(ou){P.value=ou,V(P)}),(function(ou){return A("throw",ou,V,Q)}))}Q(G.arg)}var I;this._invoke=function(B,R){function V(){return new m((function(Q,G){A(B,R,Q,G)}))}return I=I?I.then(V,V):V()}}function O(g,m){var A=g.iterator[m.method];if(A===n){if(m.delegate=null,m.method==="throw"){if(g.iterator.return&&(m.method="return",m.arg=n,O(g,m),m.method==="throw"))return S;m.method="throw",m.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var I=_(A,g.iterator,m.arg);if(I.type==="throw")return m.method="throw",m.arg=I.arg,m.delegate=null,S;var B=I.arg;return B?B.done?(m[g.resultName]=B.value,m.next=g.nextLoc,m.method!=="return"&&(m.method="next",m.arg=n),m.delegate=null,S):B:(m.method="throw",m.arg=new TypeError("iterator result is not an object"),m.delegate=null,S)}function M(g){var m={tryLoc:g[0]};1 in g&&(m.catchLoc=g[1]),2 in g&&(m.finallyLoc=g[2],m.afterLoc=g[3]),this.tryEntries.push(m)}function q(g){var m=g.completion||{};m.type="normal",delete m.arg,g.completion=m}function U(g){this.tryEntries=[{tryLoc:"root"}],g.forEach(M,this),this.reset(!0)}function z(g){if(g){var m=g[i];if(m)return m.call(g);if(typeof g.next=="function")return g;if(!isNaN(g.length)){var A=-1,I=function B(){for(;++A<g.length;)if(o.call(g,A))return B.value=g[A],B.done=!1,B;return B.value=n,B.done=!0,B};return I.next=I}}return{next:L}}function L(){return{value:n,done:!0}}return F.prototype=p,s(D,"constructor",p),s(p,"constructor",F),F.displayName=s(p,l,"GeneratorFunction"),t.isGeneratorFunction=function(g){var m=typeof g=="function"&&g.constructor;return!!m&&(m===F||(m.displayName||m.name)==="GeneratorFunction")},t.mark=function(g){return Object.setPrototypeOf?Object.setPrototypeOf(g,p):(g.__proto__=p,s(g,l,"GeneratorFunction")),g.prototype=Object.create(D),g},t.awrap=function(g){return{__await:g}},N(T.prototype),s(T.prototype,a,(function(){return this})),t.AsyncIterator=T,t.async=function(g,m,A,I,B){B===void 0&&(B=Promise);var R=new T(d(g,m,A,I),B);return t.isGeneratorFunction(m)?R:R.next().then((function(V){return V.done?V.value:R.next()}))},N(D),s(D,l,"Generator"),s(D,i,(function(){return this})),s(D,"toString",(function(){return"[object Generator]"})),t.keys=function(g){var m=[];for(var A in g)m.push(A);return m.reverse(),function I(){for(;m.length;){var B=m.pop();if(B in g)return I.value=B,I.done=!1,I}return I.done=!0,I}},t.values=z,U.prototype={constructor:U,reset:function(g){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(q),!g)for(var m in this)m.charAt(0)==="t"&&o.call(this,m)&&!isNaN(+m.slice(1))&&(this[m]=n)},stop:function(){this.done=!0;var g=this.tryEntries[0].completion;if(g.type==="throw")throw g.arg;return this.rval},dispatchException:function(g){if(this.done)throw g;var m=this;function A(G,P){return R.type="throw",R.arg=g,m.next=G,P&&(m.method="next",m.arg=n),!!P}for(var I=this.tryEntries.length-1;I>=0;--I){var B=this.tryEntries[I],R=B.completion;if(B.tryLoc==="root")return A("end");if(B.tryLoc<=this.prev){var V=o.call(B,"catchLoc"),Q=o.call(B,"finallyLoc");if(V&&Q){if(this.prev<B.catchLoc)return A(B.catchLoc,!0);if(this.prev<B.finallyLoc)return A(B.finallyLoc)}else if(V){if(this.prev<B.catchLoc)return A(B.catchLoc,!0)}else{if(!Q)throw new Error("try statement without catch or finally");if(this.prev<B.finallyLoc)return A(B.finallyLoc)}}}},abrupt:function(g,m){for(var A=this.tryEntries.length-1;A>=0;--A){var I=this.tryEntries[A];if(I.tryLoc<=this.prev&&o.call(I,"finallyLoc")&&this.prev<I.finallyLoc){var B=I;break}}B&&(g==="break"||g==="continue")&&B.tryLoc<=m&&m<=B.finallyLoc&&(B=null);var R=B?B.completion:{};return R.type=g,R.arg=m,B?(this.method="next",this.next=B.finallyLoc,S):this.complete(R)},complete:function(g,m){if(g.type==="throw")throw g.arg;return g.type==="break"||g.type==="continue"?this.next=g.arg:g.type==="return"?(this.rval=this.arg=g.arg,this.method="return",this.next="end"):g.type==="normal"&&m&&(this.next=m),S},finish:function(g){for(var m=this.tryEntries.length-1;m>=0;--m){var A=this.tryEntries[m];if(A.finallyLoc===g)return this.complete(A.completion,A.afterLoc),q(A),S}},catch:function(g){for(var m=this.tryEntries.length-1;m>=0;--m){var A=this.tryEntries[m];if(A.tryLoc===g){var I=A.completion;if(I.type==="throw"){var B=I.arg;q(A)}return B}}throw new Error("illegal catch attempt")},delegateYield:function(g,m,A){return this.delegate={iterator:z(g),resultName:m,nextLoc:A},this.method==="next"&&(this.arg=n),S}},t})(u.exports);try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},$t={};function uu(u){var e=$t[u];if(e!==void 0)return e.exports;var t=$t[u]={exports:{}};return Oo[u](t,t.exports,uu),t.exports}uu.n=u=>{var e=u&&u.__esModule?()=>u.default:()=>u;return uu.d(e,{a:e}),e},uu.d=(u,e)=>{for(var t in e)uu.o(e,t)&&!uu.o(u,t)&&Object.defineProperty(u,t,{enumerable:!0,get:e[t]})},uu.o=(u,e)=>Object.prototype.hasOwnProperty.call(u,e);var Ht={};function ve(u,e){(e==null||e>u.length)&&(e=u.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=u[t];return n}function Ut(u,e){if(u){if(typeof u=="string")return ve(u,e);var t=Object.prototype.toString.call(u).slice(8,-1);return t==="Object"&&u.constructor&&(t=u.constructor.name),t==="Map"||t==="Set"?Array.from(u):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ve(u,e):void 0}}function Qu(u){return(function(e){if(Array.isArray(e))return ve(e)})(u)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(u)||Ut(u)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
17
17
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Tu(u,e,t){return e in u?Object.defineProperty(u,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):u[e]=t,u}uu.d(Ht,{A:()=>qo});const w=(Zt={Fragment:()=>iu.Fragment,computed:()=>iu.computed,createTextVNode:()=>iu.createTextVNode,createVNode:()=>iu.createVNode,defineComponent:()=>iu.defineComponent,reactive:()=>iu.reactive,ref:()=>iu.ref,watch:()=>iu.watch,watchEffect:()=>iu.watchEffect},Ee={},uu.d(Ee,Zt),Ee),Mo=(0,w.defineComponent)({props:{data:{required:!0,type:String},onClick:Function},render:function(){var u=this.data,e=this.onClick;return(0,w.createVNode)("span",{class:"vjs-tree-brackets",onClick:e},[u])}}),Po=(0,w.defineComponent)({emits:["change","update:modelValue"],props:{checked:{type:Boolean,default:!1},isMultiple:Boolean,onChange:Function},setup:function(u,e){var t=e.emit;return{uiType:(0,w.computed)((function(){return u.isMultiple?"checkbox":"radio"})),model:(0,w.computed)({get:function(){return u.checked},set:function(n){return t("update:modelValue",n)}})}},render:function(){var u=this.uiType,e=this.model,t=this.$emit;return(0,w.createVNode)("label",{class:["vjs-check-controller",e?"is-checked":""],onClick:function(n){return n.stopPropagation()}},[(0,w.createVNode)("span",{class:"vjs-check-controller-inner is-".concat(u)},null),(0,w.createVNode)("input",{checked:e,class:"vjs-check-controller-original is-".concat(u),type:u,onChange:function(){return t("change",e)}},null)])}}),jo=(0,w.defineComponent)({props:{nodeType:{required:!0,type:String},onClick:Function},render:function(){var u=this.nodeType,e=this.onClick,t=u==="objectStart"||u==="arrayStart";return t||u==="objectCollapsed"||u==="arrayCollapsed"?(0,w.createVNode)("span",{class:"vjs-carets vjs-carets-".concat(t?"open":"close"),onClick:e},[(0,w.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"caret-down",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},[(0,w.createVNode)("path",{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"},null)])]):null}});var Zt,Ee;function De(u){return De=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(u)}function Gt(u){return Object.prototype.toString.call(u).slice(8,-1).toLowerCase()}function hu(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"root",t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=(arguments.length>3?arguments[3]:void 0)||{},r=n.key,o=n.index,c=n.type,i=c===void 0?"content":c,a=n.showComma,l=a!==void 0&&a,s=n.length,d=s===void 0?1:s,_=Gt(u);if(_==="array"){var b=Wt(u.map((function(y,S,E){return hu(y,"".concat(e,"[").concat(S,"]"),t+1,{index:S,showComma:S!==E.length-1,length:d,type:i})})));return[hu("[",e,t,{showComma:!1,key:r,length:u.length,type:"arrayStart"})[0]].concat(b,hu("]",e,t,{showComma:l,length:u.length,type:"arrayEnd"})[0])}if(_==="object"){var h=Object.keys(u),v=Wt(h.map((function(y,S,E){return hu(u[y],/^[a-zA-Z_]\w*$/.test(y)?"".concat(e,".").concat(y):"".concat(e,'["').concat(y,'"]'),t+1,{key:y,showComma:S!==E.length-1,length:d,type:i})})));return[hu("{",e,t,{showComma:!1,key:r,index:o,length:h.length,type:"objectStart"})[0]].concat(v,hu("}",e,t,{showComma:l,length:h.length,type:"objectEnd"})[0])}return[{content:u,level:t,key:r,index:o,path:e,showComma:l,length:d,type:i}]}function Wt(u){if(typeof Array.prototype.flat=="function")return u.flat();for(var e=Qu(u),t=[];e.length;){var n=e.shift();Array.isArray(n)?e.unshift.apply(e,Qu(n)):t.push(n)}return t}function Fe(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(u==null)return u;if(u instanceof Date)return new Date(u);if(u instanceof RegExp)return new RegExp(u);if(De(u)!=="object")return u;if(e.get(u))return e.get(u);if(Array.isArray(u)){var t=u.map((function(o){return Fe(o,e)}));return e.set(u,t),t}var n={};for(var r in u)n[r]=Fe(u[r],e);return e.set(u,n),n}function Qt(u,e,t,n,r,o,c){try{var i=u[o](c),a=i.value}catch(l){return void t(l)}i.done?e(a):Promise.resolve(a).then(n,r)}var zo=uu(207),Jt=uu.n(zo);function Kt(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable}))),t.push.apply(t,n)}return t}function Yt(u){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Kt(Object(t),!0).forEach((function(n){Tu(u,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):Kt(Object(t)).forEach((function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(t,n))}))}return u}var Xt={data:{type:[String,Number,Boolean,Array,Object],default:null},rootPath:{type:String,default:"root"},indent:{type:Number,default:2},showLength:{type:Boolean,default:!1},showDoubleQuotes:{type:Boolean,default:!0},renderNodeKey:Function,renderNodeValue:Function,renderNodeActions:{type:[Boolean,Function],default:void 0},selectableType:String,showSelectController:{type:Boolean,default:!1},showLine:{type:Boolean,default:!0},showLineNumber:{type:Boolean,default:!1},selectOnClickNode:{type:Boolean,default:!0},nodeSelectable:{type:Function,default:function(){return!0}},highlightSelectedNode:{type:Boolean,default:!0},showIcon:{type:Boolean,default:!1},theme:{type:String,default:"light"},showKeyValueSpace:{type:Boolean,default:!0},editable:{type:Boolean,default:!1},editableTrigger:{type:String,default:"click"},onNodeClick:{type:Function},onNodeMouseover:{type:Function},onBracketsClick:{type:Function},onIconClick:{type:Function},onValueChange:{type:Function}};const Ro=(0,w.defineComponent)({name:"TreeNode",props:Yt(Yt({},Xt),{},{node:{type:Object,required:!0},collapsed:Boolean,checked:Boolean,style:Object,onSelectedChange:{type:Function}}),emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","valueChange"],setup:function(u,e){var t=e.emit,n=(0,w.computed)((function(){return Gt(u.node.content)})),r=(0,w.computed)((function(){return"vjs-value vjs-value-".concat(n.value)})),o=(0,w.computed)((function(){return u.showDoubleQuotes?'"'.concat(u.node.key,'"'):u.node.key})),c=(0,w.computed)((function(){return u.selectableType==="multiple"})),i=(0,w.computed)((function(){return u.selectableType==="single"})),a=(0,w.computed)((function(){return u.nodeSelectable(u.node)&&(c.value||i.value)})),l=(0,w.reactive)({editing:!1}),s=function(x){var k,D,N=(D=(k=x.target)===null||k===void 0?void 0:k.value)==="null"?null:D==="undefined"?void 0:D==="true"||D!=="false"&&(D[0]+D[D.length-1]==='""'||D[0]+D[D.length-1]==="''"?D.slice(1,-1):typeof Number(D)=="number"&&!isNaN(Number(D))||D==="NaN"?Number(D):D);t("valueChange",N,u.node.path)},d=(0,w.computed)((function(){var x,k=(x=u.node)===null||x===void 0?void 0:x.content;return k===null?k="null":k===void 0&&(k="undefined"),n.value==="string"?'"'.concat(k,'"'):k+""})),_=function(){var x=u.renderNodeValue;return x?x({node:u.node,defaultValue:d.value}):d.value},b=function(){t("bracketsClick",!u.collapsed,u.node)},h=function(){t("iconClick",!u.collapsed,u.node)},v=function(){t("selectedChange",u.node)},y=function(){t("nodeClick",u.node),a.value&&u.selectOnClickNode&&t("selectedChange",u.node)},S=function(){t("nodeMouseover",u.node)},E=function(x){if(u.editable&&!l.editing){l.editing=!0;var k=function D(N){var T;N.target!==x.target&&((T=N.target)===null||T===void 0?void 0:T.parentElement)!==x.target&&(l.editing=!1,document.removeEventListener("click",D))};document.removeEventListener("click",k),document.addEventListener("click",k)}},F=(function(){var x=(0,w.ref)(!1),k=(function(){var D,N=(D=Jt().mark((function T(O){return Jt().wrap((function(M){for(;;)switch(M.prev=M.next){case 0:return M.prev=0,M.next=3,navigator.clipboard.writeText(O);case 3:x.value=!0,setTimeout((function(){x.value=!1}),300),M.next=10;break;case 7:M.prev=7,M.t0=M.catch(0),console.error("[vue-json-pretty] Copy failed: ",M.t0);case 10:case"end":return M.stop()}}),T,null,[[0,7]])})),function(){var T=this,O=arguments;return new Promise((function(M,q){var U=D.apply(T,O);function z(g){Qt(U,M,q,z,L,"next",g)}function L(g){Qt(U,M,q,z,L,"throw",g)}z(void 0)}))});return function(T){return N.apply(this,arguments)}})();return{copy:k}})().copy,p=function(){var x=u.node,k=x.key,D=x.path,N=u.rootPath,T=new Function("data","return data".concat(D.slice(N.length)))(u.data),O=JSON.stringify(k?Tu({},k,T):T,null,2);F(O)},C=function(){var x=u.renderNodeActions;if(!x)return null;var k={copy:p};return typeof x=="function"?x({node:u.node,defaultActions:k}):(0,w.createVNode)("span",{onClick:p,class:"vjs-tree-node-actions-item"},[(0,w.createTextVNode)("copy")])};return function(){var x,k=u.node;return(0,w.createVNode)("div",{class:{"vjs-tree-node":!0,"has-selector":u.showSelectController,"has-carets":u.showIcon,"is-highlight":u.highlightSelectedNode&&u.checked,dark:u.theme==="dark"},onClick:y,onMouseover:S,style:u.style},[u.showLineNumber&&(0,w.createVNode)("span",{class:"vjs-node-index"},[k.id+1]),u.showSelectController&&a.value&&k.type!=="objectEnd"&&k.type!=="arrayEnd"&&(0,w.createVNode)(Po,{isMultiple:c.value,checked:u.checked,onChange:v},null),(0,w.createVNode)("div",{class:"vjs-indent"},[Array.from(Array(k.level)).map((function(D,N){return(0,w.createVNode)("div",{key:N,class:{"vjs-indent-unit":!0,"has-line":u.showLine}},[Array.from(Array(u.indent)).map((function(){return(0,w.createVNode)(w.Fragment,null,[(0,w.createTextVNode)(" ")])}))])})),u.showIcon&&(0,w.createVNode)(jo,{nodeType:k.type,onClick:h},null)]),k.key&&(0,w.createVNode)("span",{class:"vjs-key"},[(x=u.renderNodeKey,x?x({node:u.node,defaultKey:o.value||""}):o.value),(0,w.createVNode)("span",{class:"vjs-colon"},[":".concat(u.showKeyValueSpace?" ":"")])]),(0,w.createVNode)("span",null,[k.type!=="content"&&k.content?(0,w.createVNode)(Mo,{data:k.content.toString(),onClick:b},null):(0,w.createVNode)("span",{class:r.value,onClick:!u.editable||u.editableTrigger&&u.editableTrigger!=="click"?void 0:E,onDblclick:u.editable&&u.editableTrigger==="dblclick"?E:void 0},[u.editable&&l.editing?(0,w.createVNode)("input",{value:d.value,onChange:s,style:{padding:"3px 8px",border:"1px solid #eee",boxShadow:"none",boxSizing:"border-box",borderRadius:5,fontFamily:"inherit"}},null):_()]),k.showComma&&(0,w.createVNode)("span",null,[","]),u.showLength&&u.collapsed&&(0,w.createVNode)("span",{class:"vjs-comment"},[(0,w.createTextVNode)(" // "),k.length,(0,w.createTextVNode)(" items ")])]),u.renderNodeActions&&(0,w.createVNode)("span",{class:"vjs-tree-node-actions"},[C()])])}}});function un(u,e){var t=Object.keys(u);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(u);e&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(u,r).enumerable}))),t.push.apply(t,n)}return t}function K(u){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?un(Object(t),!0).forEach((function(n){Tu(u,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(t)):un(Object(t)).forEach((function(n){Object.defineProperty(u,n,Object.getOwnPropertyDescriptor(t,n))}))}return u}const qo=(0,w.defineComponent)({name:"Tree",props:K(K({},Xt),{},{collapsedNodeLength:{type:Number,default:1/0},deep:{type:Number,default:1/0},pathCollapsible:{type:Function,default:function(){return!1}},virtual:{type:Boolean,default:!1},height:{type:Number,default:400},itemHeight:{type:Number,default:20},selectedValue:{type:[String,Array],default:function(){return""}},collapsedOnClickBrackets:{type:Boolean,default:!0},style:Object,onSelectedChange:{type:Function},theme:{type:String,default:"light"}}),slots:["renderNodeKey","renderNodeValue","renderNodeActions"],emits:["nodeClick","nodeMouseover","bracketsClick","iconClick","selectedChange","update:selectedValue","update:data"],setup:function(u,e){var t=e.emit,n=e.slots,r=(0,w.ref)(),o=(0,w.computed)((function(){return hu(u.data,u.rootPath)})),c=function(p,C){return o.value.reduce((function(x,k){var D,N=k.level>=p||k.length>=C,T=(D=u.pathCollapsible)===null||D===void 0?void 0:D.call(u,k);return k.type!=="objectStart"&&k.type!=="arrayStart"||!N&&!T?x:K(K({},x),{},Tu({},k.path,1))}),{})},i=(0,w.reactive)({translateY:0,visibleData:null,hiddenPaths:c(u.deep,u.collapsedNodeLength)}),a=(0,w.computed)((function(){for(var p=null,C=[],x=o.value.length,k=0;k<x;k++){var D=K(K({},o.value[k]),{},{id:k}),N=i.hiddenPaths[D.path];if(p&&p.path===D.path){var T=p.type==="objectStart",O=K(K(K({},D),p),{},{showComma:D.showComma,content:T?"{...}":"[...]",type:T?"objectCollapsed":"arrayCollapsed"});p=null,C.push(O)}else{if(N&&!p){p=D;continue}if(p)continue;C.push(D)}}return C})),l=(0,w.computed)((function(){var p=u.selectedValue;return p&&u.selectableType==="multiple"&&Array.isArray(p)?p:[p]})),s=(0,w.computed)((function(){return!u.selectableType||u.selectOnClickNode||u.showSelectController?"":"When selectableType is not null, selectOnClickNode and showSelectController cannot be false at the same time, because this will cause the selection to fail."})),d=function(){var p=a.value;if(u.virtual){var C,x=u.height/u.itemHeight,k=((C=r.value)===null||C===void 0?void 0:C.scrollTop)||0,D=Math.floor(k/u.itemHeight),N=D<0?0:D+x>p.length?p.length-x:D;N<0&&(N=0);var T=N+x;i.translateY=N*u.itemHeight,i.visibleData=p.filter((function(O,M){return M>=N&&M<T}))}else i.visibleData=p},_=function(){d()},b=function(p){var C,x,k=p.path,D=u.selectableType;if(D==="multiple"){var N=l.value.findIndex((function(q){return q===k})),T=Qu(l.value);N!==-1?T.splice(N,1):T.push(k),t("update:selectedValue",T),t("selectedChange",T,Qu(l.value))}else if(D==="single"&&l.value[0]!==k){var O=(C=l.value,x=1,(function(q){if(Array.isArray(q))return q})(C)||(function(q,U){var z=q==null?null:typeof Symbol<"u"&&q[Symbol.iterator]||q["@@iterator"];if(z!=null){var L,g,m=[],A=!0,I=!1;try{for(z=z.call(q);!(A=(L=z.next()).done)&&(m.push(L.value),!U||m.length!==U);A=!0);}catch(B){I=!0,g=B}finally{try{A||z.return==null||z.return()}finally{if(I)throw g}}return m}})(C,x)||Ut(C,x)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],M=k;t("update:selectedValue",M),t("selectedChange",M,O)}},h=function(p){t("nodeClick",p)},v=function(p){t("nodeMouseover",p)},y=function(p,C){if(p)i.hiddenPaths=K(K({},i.hiddenPaths),{},Tu({},C,1));else{var x=K({},i.hiddenPaths);delete x[C],i.hiddenPaths=x}},S=function(p,C){u.collapsedOnClickBrackets&&y(p,C.path),t("bracketsClick",p,C)},E=function(p,C){y(p,C.path),t("iconClick",p,C)},F=function(p,C){var x=Fe(u.data),k=u.rootPath;new Function("data","val","data".concat(C.slice(k.length),"=val"))(x,p),t("update:data",x)};return(0,w.watchEffect)((function(){s.value&&(function(p){throw new Error("[VueJSONPretty] ".concat(p))})(s.value)})),(0,w.watchEffect)((function(){a.value&&d()})),(0,w.watch)((function(){return u.deep}),(function(p){p&&(i.hiddenPaths=c(p,u.collapsedNodeLength))})),(0,w.watch)((function(){return u.collapsedNodeLength}),(function(p){p&&(i.hiddenPaths=c(u.deep,p))})),function(){var p,C,x,k,D=(p=u.renderNodeKey)!==null&&p!==void 0?p:n.renderNodeKey,N=(C=u.renderNodeValue)!==null&&C!==void 0?C:n.renderNodeValue,T=(x=(k=u.renderNodeActions)!==null&&k!==void 0?k:n.renderNodeActions)!==null&&x!==void 0&&x,O=i.visibleData&&i.visibleData.map((function(M){return(0,w.createVNode)(Ro,{key:M.id,data:u.data,rootPath:u.rootPath,indent:u.indent,node:M,collapsed:!!i.hiddenPaths[M.path],theme:u.theme,showDoubleQuotes:u.showDoubleQuotes,showLength:u.showLength,checked:l.value.includes(M.path),selectableType:u.selectableType,showLine:u.showLine,showLineNumber:u.showLineNumber,showSelectController:u.showSelectController,selectOnClickNode:u.selectOnClickNode,nodeSelectable:u.nodeSelectable,highlightSelectedNode:u.highlightSelectedNode,editable:u.editable,editableTrigger:u.editableTrigger,showIcon:u.showIcon,showKeyValueSpace:u.showKeyValueSpace,renderNodeKey:D,renderNodeValue:N,renderNodeActions:T,onNodeClick:h,onNodeMouseover:v,onBracketsClick:S,onIconClick:E,onSelectedChange:b,onValueChange:F,style:u.itemHeight&&u.itemHeight!==20?{lineHeight:"".concat(u.itemHeight,"px")}:{}},null)}));return(0,w.createVNode)("div",{ref:r,class:{"vjs-tree":!0,"is-virtual":u.virtual,dark:u.theme==="dark"},onScroll:u.virtual?_:void 0,style:u.showLineNumber?K({paddingLeft:"".concat(12*Number(o.value.length.toString().length),"px")},u.style):u.style},[u.virtual?(0,w.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(u.height,"px")}},[(0,w.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(a.value.length*u.itemHeight,"px")}},[(0,w.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(i.translateY,"px)")}},[O])])]):O])}}});var Vo=Ht.A;const $o=["src","alt"],Ho=f.defineComponent({__name:"ImageViewer",props:{show:{type:Boolean},imageUrl:{},alt:{}},emits:["close"],setup(u){return(e,t)=>(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[f.createVNode(f.Transition,{name:"viewer"},{default:f.withCtx(()=>[u.show?(f.openBlock(),f.createElementBlock("div",{key:0,class:"image-viewer",onClick:t[2]||(t[2]=n=>e.$emit("close"))},[f.createElementVNode("div",{class:"close-button",onClick:t[0]||(t[0]=f.withModifiers(n=>e.$emit("close"),["stop"]))},[f.createVNode(f.unref(au),{icon:"mdi:close"})]),f.createElementVNode("div",{class:"viewer-content",onClick:t[1]||(t[1]=f.withModifiers(()=>{},["stop"]))},[f.createElementVNode("img",{src:u.imageUrl,alt:u.alt},null,8,$o)])])):f.createCommentVNode("",!0)]),_:1})]))}}),pu=(u,e)=>{const t=u.__vccOpts||u;for(const[n,r]of e)t[n]=r;return t},en=pu(Ho,[["__scopeId","data-v-92c159ee"]]),Uo=["innerHTML"],tn=pu(f.defineComponent({__name:"MessageTextContent",props:{html:{},role:{},plain:{type:Boolean,default:!1}},setup(u){const e=u,t=f.computed(()=>e.role?`role-${e.role}`:""),n=f.computed(()=>e.plain);return(r,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["content-text",[t.value,{"is-plain":n.value}]]),innerHTML:u.html},null,10,Uo))}}),[["__scopeId","data-v-d4935523"]]),Zo={key:0,class:"html-preview-wrapper"},Go={key:0,class:"html-loading"},Wo=["src"],Qo={class:"file-name"},Ae=pu(f.defineComponent({__name:"MessageFileContent",props:{name:{},url:{},allowShareMedialibHtml:{type:Boolean}},emits:["click"],setup(u){const e=u,t=f.computed(()=>e.url.toLowerCase().endsWith(".html")??!1),n=f.ref(!0);function r(){n.value=!1}return f.watch(()=>e.url,()=>{n.value=!0}),(o,c)=>t.value?(f.openBlock(),f.createElementBlock("div",Zo,[n.value?(f.openBlock(),f.createElementBlock("div",Go,[...c[2]||(c[2]=[f.createElementVNode("div",{class:"loading-spinner"},null,-1),f.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])])):f.createCommentVNode("",!0),u.allowShareMedialibHtml?(f.openBlock(),f.createElementBlock("button",{key:1,type:"button",class:"share-icon",onClick:c[0]||(c[0]=i=>o.$emit("click"))},[f.createVNode(f.unref(au),{icon:"mdi:open-in-new"})])):f.createCommentVNode("",!0),f.withDirectives(f.createElementVNode("iframe",{src:u.url,class:"html-iframe",frameborder:"0",onLoad:r},null,40,Wo),[[f.vShow,!n.value]])])):(f.openBlock(),f.createElementBlock("div",{key:1,class:"content-file",onClick:c[1]||(c[1]=i=>o.$emit("click"))},[f.createVNode(f.unref(au),{icon:"mdi:file-document-outline",class:"file-icon"}),f.createElementVNode("span",Qo,f.toDisplayString(u.name),1),f.createVNode(f.unref(au),{icon:"mdi:download",class:"download-icon"})]))}}),[["__scopeId","data-v-2ab752a0"]]),Jo=["src"],we=pu(f.defineComponent({__name:"MessageImageContent",props:{src:{},fullWidth:{type:Boolean}},emits:["click"],setup(u){return(e,t)=>(f.openBlock(),f.createElementBlock("img",{src:u.src,alt:"图片",class:f.normalizeClass(["message-image",{"is-full-width":u.fullWidth}]),onClick:t[0]||(t[0]=n=>e.$emit("click"))},null,10,Jo))}}),[["__scopeId","data-v-24952cda"]]),Ko=["src"],nn=pu(f.defineComponent({__name:"MessageVideoContent",props:{src:{},fullWidth:{type:Boolean}},setup(u){return(e,t)=>(f.openBlock(),f.createElementBlock("video",{controls:"",src:u.src,class:f.normalizeClass(["message-video",{"is-full-width":u.fullWidth}])}," 您的浏览器不支持视频播放 ",10,Ko))}}),[["__scopeId","data-v-be6bb72d"]]),Yo=["src"],Se=pu(f.defineComponent({__name:"MessageAudioContent",props:{src:{}},setup(u){return(e,t)=>(f.openBlock(),f.createElementBlock("audio",{controls:"",src:u.src,class:"message-audio"}," 您的浏览器不支持音频播放 ",8,Yo))}}),[["__scopeId","data-v-c0d42074"]]),Xo={key:2,class:"content-user-message"},uc={key:1,class:"files-grid"},ec={key:6,class:"content-medialib"},tc=pu(f.defineComponent({__name:"MessageContentRenderer",props:{content:{},role:{},showActions:{type:Boolean},allowRegenerate:{type:Boolean},allowShareMedialibHtml:{type:Boolean}},emits:["copy","regenerate","delete"],setup(u,{emit:e}){const t=u,n=e,r=f.computed(()=>t.role?`role-${t.role}`:""),o=f.computed(()=>t.role?`actions-${t.role}`:""),c=f.computed(()=>t.showActions!==!1&&!!t.role),i=f.computed(()=>t.role==="assistant"&&t.allowRegenerate!==!1),a=f.computed(()=>{const L=t.content;return typeof L=="string"?{type:"text",content:L}:L});function l(L){return!("type"in L)}const s=new Y({html:!0,linkify:!0,typographer:!0,breaks:!0}),d=s.renderer.rules.link_open??((L,g,m,A,I)=>I.renderToken(L,g,m));s.renderer.rules.link_open=(L,g,m,A,I)=>{const B=L[g];if(!B)return d(L,g,m,A,I);const R=B.attrs??(B.attrs=[]),V=B.attrIndex("target");if(V<0)R.push(["target","_blank"]);else{const G=R[V];G&&(G[1]="_blank")}const Q=B.attrIndex("rel");if(Q<0)R.push(["rel","noopener noreferrer"]);else{const G=R[Q];if(G){const P=G[1]||"",Z=new Set(P.split(/\s+/).filter(Boolean));Z.add("noopener"),Z.add("noreferrer"),G[1]=Array.from(Z).join(" ")}}return d(L,g,m,A,I)};const _=f.computed(()=>!l(a.value)&&a.value.type==="text"?s.render(a.value.content):"");function b(L){return L?s.renderInline(L):""}const h=f.ref(!1),v=f.ref("");function y(){const L=a.value;if(l(L)){const g=[];return Array.isArray(L.texts)&&g.push(...L.texts.filter(Boolean)),g.join(`
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})())[0],M=k;t("update:selectedValue",M),t("selectedChange",M,O)}},h=function(p){t("nodeClick",p)},v=function(p){t("nodeMouseover",p)},y=function(p,C){if(p)i.hiddenPaths=K(K({},i.hiddenPaths),{},Tu({},C,1));else{var x=K({},i.hiddenPaths);delete x[C],i.hiddenPaths=x}},S=function(p,C){u.collapsedOnClickBrackets&&y(p,C.path),t("bracketsClick",p,C)},E=function(p,C){y(p,C.path),t("iconClick",p,C)},F=function(p,C){var x=Fe(u.data),k=u.rootPath;new Function("data","val","data".concat(C.slice(k.length),"=val"))(x,p),t("update:data",x)};return(0,w.watchEffect)((function(){s.value&&(function(p){throw new Error("[VueJSONPretty] ".concat(p))})(s.value)})),(0,w.watchEffect)((function(){a.value&&d()})),(0,w.watch)((function(){return u.deep}),(function(p){p&&(i.hiddenPaths=c(p,u.collapsedNodeLength))})),(0,w.watch)((function(){return u.collapsedNodeLength}),(function(p){p&&(i.hiddenPaths=c(u.deep,p))})),function(){var p,C,x,k,D=(p=u.renderNodeKey)!==null&&p!==void 0?p:n.renderNodeKey,N=(C=u.renderNodeValue)!==null&&C!==void 0?C:n.renderNodeValue,T=(x=(k=u.renderNodeActions)!==null&&k!==void 0?k:n.renderNodeActions)!==null&&x!==void 0&&x,O=i.visibleData&&i.visibleData.map((function(M){return(0,w.createVNode)(Ro,{key:M.id,data:u.data,rootPath:u.rootPath,indent:u.indent,node:M,collapsed:!!i.hiddenPaths[M.path],theme:u.theme,showDoubleQuotes:u.showDoubleQuotes,showLength:u.showLength,checked:l.value.includes(M.path),selectableType:u.selectableType,showLine:u.showLine,showLineNumber:u.showLineNumber,showSelectController:u.showSelectController,selectOnClickNode:u.selectOnClickNode,nodeSelectable:u.nodeSelectable,highlightSelectedNode:u.highlightSelectedNode,editable:u.editable,editableTrigger:u.editableTrigger,showIcon:u.showIcon,showKeyValueSpace:u.showKeyValueSpace,renderNodeKey:D,renderNodeValue:N,renderNodeActions:T,onNodeClick:h,onNodeMouseover:v,onBracketsClick:S,onIconClick:E,onSelectedChange:b,onValueChange:F,style:u.itemHeight&&u.itemHeight!==20?{lineHeight:"".concat(u.itemHeight,"px")}:{}},null)}));return(0,w.createVNode)("div",{ref:r,class:{"vjs-tree":!0,"is-virtual":u.virtual,dark:u.theme==="dark"},onScroll:u.virtual?_:void 0,style:u.showLineNumber?K({paddingLeft:"".concat(12*Number(o.value.length.toString().length),"px")},u.style):u.style},[u.virtual?(0,w.createVNode)("div",{class:"vjs-tree-list",style:{height:"".concat(u.height,"px")}},[(0,w.createVNode)("div",{class:"vjs-tree-list-holder",style:{height:"".concat(a.value.length*u.itemHeight,"px")}},[(0,w.createVNode)("div",{class:"vjs-tree-list-holder-inner",style:{transform:"translateY(".concat(i.translateY,"px)")}},[O])])]):O])}}});var Vo=Ht.A;const $o=["src","alt"],Ho=f.defineComponent({__name:"ImageViewer",props:{show:{type:Boolean},imageUrl:{},alt:{}},emits:["close"],setup(u){return(e,t)=>(f.openBlock(),f.createBlock(f.Teleport,{to:"body"},[f.createVNode(f.Transition,{name:"viewer"},{default:f.withCtx(()=>[u.show?(f.openBlock(),f.createElementBlock("div",{key:0,class:"image-viewer",onClick:t[2]||(t[2]=n=>e.$emit("close"))},[f.createElementVNode("div",{class:"close-button",onClick:t[0]||(t[0]=f.withModifiers(n=>e.$emit("close"),["stop"]))},[f.createVNode(f.unref(au),{icon:"mdi:close"})]),f.createElementVNode("div",{class:"viewer-content",onClick:t[1]||(t[1]=f.withModifiers(()=>{},["stop"]))},[f.createElementVNode("img",{src:u.imageUrl,alt:u.alt},null,8,$o)])])):f.createCommentVNode("",!0)]),_:1})]))}}),pu=(u,e)=>{const t=u.__vccOpts||u;for(const[n,r]of e)t[n]=r;return t},en=pu(Ho,[["__scopeId","data-v-92c159ee"]]),Uo=["innerHTML"],tn=pu(f.defineComponent({__name:"MessageTextContent",props:{html:{},role:{},plain:{type:Boolean,default:!1}},setup(u){const e=u,t=f.computed(()=>e.role?`role-${e.role}`:""),n=f.computed(()=>e.plain);return(r,o)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["content-text",[t.value,{"is-plain":n.value}]]),innerHTML:u.html},null,10,Uo))}}),[["__scopeId","data-v-d4935523"]]),Zo={key:0,class:"html-preview-wrapper"},Go={key:0,class:"html-loading"},Wo=["src"],Qo={class:"file-name"},Ae=pu(f.defineComponent({__name:"MessageFileContent",props:{name:{},url:{},allowShareMedialibHtml:{type:Boolean}},emits:["click"],setup(u){const e=u,t=f.computed(()=>e.url.toLowerCase().endsWith(".html")??!1),n=f.ref(!0);function r(){n.value=!1}return f.watch(()=>e.url,()=>{n.value=!0}),(o,c)=>t.value?(f.openBlock(),f.createElementBlock("div",Zo,[n.value?(f.openBlock(),f.createElementBlock("div",Go,[...c[2]||(c[2]=[f.createElementVNode("div",{class:"loading-spinner"},null,-1),f.createElementVNode("span",{class:"loading-text"},"加载中...",-1)])])):f.createCommentVNode("",!0),u.allowShareMedialibHtml?(f.openBlock(),f.createElementBlock("div",{key:1,type:"button",class:"share-icon",onClick:c[0]||(c[0]=i=>o.$emit("click"))},[f.createVNode(f.unref(au),{icon:"mdi:open-in-new"})])):f.createCommentVNode("",!0),f.withDirectives(f.createElementVNode("iframe",{src:u.url,class:"html-iframe",frameborder:"0",onLoad:r},null,40,Wo),[[f.vShow,!n.value]])])):(f.openBlock(),f.createElementBlock("div",{key:1,class:"content-file",onClick:c[1]||(c[1]=i=>o.$emit("click"))},[f.createVNode(f.unref(au),{icon:"mdi:file-document-outline",class:"file-icon"}),f.createElementVNode("span",Qo,f.toDisplayString(u.name),1),f.createVNode(f.unref(au),{icon:"mdi:download",class:"download-icon"})]))}}),[["__scopeId","data-v-16ae76bb"]]),Jo=["src"],we=pu(f.defineComponent({__name:"MessageImageContent",props:{src:{},fullWidth:{type:Boolean}},emits:["click"],setup(u){return(e,t)=>(f.openBlock(),f.createElementBlock("img",{src:u.src,alt:"图片",class:f.normalizeClass(["message-image",{"is-full-width":u.fullWidth}]),onClick:t[0]||(t[0]=n=>e.$emit("click"))},null,10,Jo))}}),[["__scopeId","data-v-24952cda"]]),Ko=["src"],nn=pu(f.defineComponent({__name:"MessageVideoContent",props:{src:{},fullWidth:{type:Boolean}},setup(u){return(e,t)=>(f.openBlock(),f.createElementBlock("video",{controls:"",src:u.src,class:f.normalizeClass(["message-video",{"is-full-width":u.fullWidth}])}," 您的浏览器不支持视频播放 ",10,Ko))}}),[["__scopeId","data-v-be6bb72d"]]),Yo=["src"],Se=pu(f.defineComponent({__name:"MessageAudioContent",props:{src:{}},setup(u){return(e,t)=>(f.openBlock(),f.createElementBlock("audio",{controls:"",src:u.src,class:"message-audio"}," 您的浏览器不支持音频播放 ",8,Yo))}}),[["__scopeId","data-v-c0d42074"]]),Xo={key:2,class:"content-user-message"},uc={key:1,class:"files-grid"},ec={key:6,class:"content-medialib"},tc=pu(f.defineComponent({__name:"MessageContentRenderer",props:{content:{},role:{},showActions:{type:Boolean},allowRegenerate:{type:Boolean},allowShareMedialibHtml:{type:Boolean}},emits:["copy","regenerate","delete"],setup(u,{emit:e}){const t=u,n=e,r=f.computed(()=>t.role?`role-${t.role}`:""),o=f.computed(()=>t.role?`actions-${t.role}`:""),c=f.computed(()=>t.showActions!==!1&&!!t.role),i=f.computed(()=>t.role==="assistant"&&t.allowRegenerate!==!1),a=f.computed(()=>{const L=t.content;return typeof L=="string"?{type:"text",content:L}:L});function l(L){return!("type"in L)}const s=new Y({html:!0,linkify:!0,typographer:!0,breaks:!0}),d=s.renderer.rules.link_open??((L,g,m,A,I)=>I.renderToken(L,g,m));s.renderer.rules.link_open=(L,g,m,A,I)=>{const B=L[g];if(!B)return d(L,g,m,A,I);const R=B.attrs??(B.attrs=[]),V=B.attrIndex("target");if(V<0)R.push(["target","_blank"]);else{const G=R[V];G&&(G[1]="_blank")}const Q=B.attrIndex("rel");if(Q<0)R.push(["rel","noopener noreferrer"]);else{const G=R[Q];if(G){const P=G[1]||"",Z=new Set(P.split(/\s+/).filter(Boolean));Z.add("noopener"),Z.add("noreferrer"),G[1]=Array.from(Z).join(" ")}}return d(L,g,m,A,I)};const _=f.computed(()=>!l(a.value)&&a.value.type==="text"?s.render(a.value.content):"");function b(L){return L?s.renderInline(L):""}const h=f.ref(!1),v=f.ref("");function y(){const L=a.value;if(l(L)){const g=[];return Array.isArray(L.texts)&&g.push(...L.texts.filter(Boolean)),g.join(`
19
19
 
20
20
  `).trim()}return L.type==="text"?L.content:""}const S=f.computed(()=>y().length>0);async function E(){const L=y();if(L)try{await navigator.clipboard.writeText(L)}catch(g){console.error("Failed to copy content",g)}n("copy")}function F(){n("regenerate")}function p(){n("delete")}function C(){l(a.value)||(a.value.type==="image"?(v.value=a.value.content,h.value=!0):a.value.type==="medialib"&&U.value==="image"&&(v.value=O.value,h.value=!0))}function x(L){v.value=L,h.value=!0}function k(L){try{const A=new URL(L).pathname.split("/");return A[A.length-1]||"未知文件"}catch{return"未知文件"}}function D(){l(a.value)||window.open(a.value.content,"_blank")}function N(L){window.open(L,"_blank")}const T=f.computed(()=>{if(!l(a.value)&&a.value.type==="medialib")try{return JSON.parse(a.value.content)}catch{return null}return null}),O=f.computed(()=>T.value?.file_url||""),M=f.computed(()=>T.value?.file_url?.toLowerCase().endsWith(".html")??!1),q=f.computed(()=>T.value?.file_name||k(O.value)),U=f.computed(()=>{if(!O.value)return"json";const L=O.value.toLowerCase();return Iu(L)});function z(){O.value&&window.open(O.value,"_blank")}return(L,g)=>(f.openBlock(),f.createElementBlock("div",{class:f.normalizeClass(["message-content-renderer",r.value])},[c.value?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(["renderer-actions",o.value])},[S.value?(f.openBlock(),f.createElementBlock("button",{key:0,type:"button",class:"renderer-action-btn",onClick:E},[f.createVNode(f.unref(au),{icon:"mdi:content-copy"}),g[1]||(g[1]=f.createElementVNode("span",null,"复制",-1))])):f.createCommentVNode("",!0),M.value?(f.openBlock(),f.createElementBlock("button",{key:1,type:"button",class:"renderer-action-btn",onClick:z},[f.createVNode(f.unref(au),{icon:"mdi:share-outline"}),g[2]||(g[2]=f.createElementVNode("span",null,"打开网页",-1))])):f.createCommentVNode("",!0),i.value?(f.openBlock(),f.createElementBlock("button",{key:2,type:"button",class:"renderer-action-btn",onClick:F},[f.createVNode(f.unref(au),{icon:"mdi:refresh"}),g[3]||(g[3]=f.createElementVNode("span",null,"重新生成",-1))])):f.createCommentVNode("",!0),f.createElementVNode("button",{type:"button",class:"renderer-action-btn danger",onClick:p},[f.createVNode(f.unref(au),{icon:"mdi:delete-outline"}),g[4]||(g[4]=f.createElementVNode("span",null,"删除",-1))])],2)):f.createCommentVNode("",!0),!l(a.value)&&a.value.type==="text"?(f.openBlock(),f.createBlock(tn,{key:1,html:_.value,role:u.role},null,8,["html","role"])):l(a.value)?(f.openBlock(),f.createElementBlock("div",Xo,[a.value.texts&&a.value.texts.length>0?(f.openBlock(!0),f.createElementBlock(f.Fragment,{key:0},f.renderList(a.value.texts,(m,A)=>(f.openBlock(),f.createBlock(tn,{key:`text-${A}`,html:b(String(m??"")),role:u.role,plain:""},null,8,["html","role"]))),128)):f.createCommentVNode("",!0),a.value.files&&a.value.files.length>0?(f.openBlock(),f.createElementBlock("div",uc,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(a.value.files,(m,A)=>(f.openBlock(),f.createElementBlock("div",{key:`file-${A}`},[f.unref(Iu)(m)==="image"?(f.openBlock(),f.createBlock(we,{key:0,src:m,"full-width":!0,onClick:I=>x(m)},null,8,["src","onClick"])):f.unref(Iu)(m)==="video"?(f.openBlock(),f.createBlock(nn,{key:1,src:m,"full-width":!0},null,8,["src"])):f.unref(Iu)(m)==="audio"?(f.openBlock(),f.createBlock(Se,{key:2,src:m},null,8,["src"])):(f.openBlock(),f.createBlock(Ae,{key:3,name:k(m),url:m,onClick:I=>N(m)},null,8,["name","url","onClick"]))]))),128))])):f.createCommentVNode("",!0)])):!l(a.value)&&a.value.type==="file"?(f.openBlock(),f.createBlock(Ae,{key:3,name:k(a.value.content),url:a.value.content,onClick:D},null,8,["name","url"])):!l(a.value)&&a.value.type==="image"?(f.openBlock(),f.createBlock(we,{key:4,src:a.value.content,onClick:C},null,8,["src"])):!l(a.value)&&a.value.type==="voice"?(f.openBlock(),f.createBlock(Se,{key:5,src:a.value.content},null,8,["src"])):!l(a.value)&&a.value.type==="medialib"?(f.openBlock(),f.createElementBlock("div",ec,[U.value==="video"?(f.openBlock(),f.createBlock(nn,{key:0,src:O.value,"full-width":!0},null,8,["src"])):U.value==="image"?(f.openBlock(),f.createBlock(we,{key:1,src:O.value,onClick:C},null,8,["src"])):U.value==="audio"?(f.openBlock(),f.createBlock(Se,{key:2,src:O.value},null,8,["src"])):U.value==="file"?(f.openBlock(),f.createBlock(Ae,{key:3,name:q.value,url:O.value,"allow-share-medialib-html":u.allowShareMedialibHtml,onClick:z},null,8,["name","url","allow-share-medialib-html"])):(f.openBlock(),f.createBlock(f.unref(Vo),{key:4,data:T.value,deep:3,class:"json-viewer"},null,8,["data"]))])):f.createCommentVNode("",!0),f.createVNode(en,{show:h.value,"image-url":v.value,onClose:g[0]||(g[0]=m=>h.value=!1)},null,8,["show","image-url"])],2))}}),[["__scopeId","data-v-32577d70"]]);function Iu(u){if(!u)return"file";const e=u.toLowerCase();return e.match(/\.(mp4|webm|ogg|mov|avi|wmv|flv|mkv)$/)?"video":e.match(/\.(jpg|jpeg|png|gif|bmp|webp|svg)$/)?"image":e.match(/\.(mp3|wav|ogg|aac|flac|m4a)$/)?"audio":"file"}cu.ImageViewer=en,cu.MessageContentRenderer=tc,cu.getFileTypeFromUrl=Iu,Object.defineProperty(cu,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnai/message-content-renderer",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/message-content-renderer.umd.js",