rhua-chatgpt-web 1.0.77 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api_chain-uDIuN0T8.cjs → api_chain-BMBlLJ9P.cjs} +1 -1
- package/dist/{api_chain-KC8-mSsd.js → api_chain-DxmtjGZR.js} +2 -2
- package/dist/{combine_docs_chain-fBJmz2g7.js → combine_docs_chain-BvsfAIEV.js} +2 -2
- package/dist/{combine_docs_chain-sSKsCIuX.cjs → combine_docs_chain-CKhXoczO.cjs} +1 -1
- package/dist/{few_shot-lZP5bfPg.js → few_shot-C7wme246.js} +1 -1
- package/dist/{few_shot-DLXRDwtr.cjs → few_shot-kCizcCQG.cjs} +1 -1
- package/dist/{index-BQhqJ3q2.cjs → index-B27a-wH3.cjs} +1 -1
- package/dist/{index-DFcWOsnM.cjs → index-BCgWuMfi.cjs} +1 -1
- package/dist/{index-DhkUYP6j.cjs → index-BCgsObGB.cjs} +1 -1
- package/dist/{index-DkVDq9pp.cjs → index-BT8AK5wD.cjs} +1 -1
- package/dist/index-BVzzQN3V.js +4 -0
- package/dist/{index-ZAXxrxT5.js → index-Bnvlz8he.js} +1 -1
- package/dist/{index-CMnaValP.cjs → index-C755WiyV.cjs} +3 -3
- package/dist/{index-NQgIWGLp.js → index-CCzqZMyF.js} +1 -1
- package/dist/index-CkEDv7A4.js +4 -0
- package/dist/{index-ChfI2cVG.cjs → index-CvfMe_qg.cjs} +1 -1
- package/dist/{index-CXZge4xy.js → index-D2PJ83Oy.js} +1 -1
- package/dist/index-DJ5tu-ks.js +4 -0
- package/dist/{index-CIE-BHj6.js → index-DNJwzxBp.js} +2 -2
- package/dist/{index-BWMn-7k5.cjs → index-DO3BVly9.cjs} +1 -1
- package/dist/{index-DD9V1739.js → index-DY191wuv.js} +1 -1
- package/dist/{index-BzHx9hvB.js → index-Dc04u1WG.js} +2 -2
- package/dist/{index-Dbp56pPr.cjs → index-DqQywXU8.cjs} +1 -1
- package/dist/{index-B0a74CBh.cjs → index-DuZOJIDr.cjs} +1 -1
- package/dist/index-FRCszYTB.js +4 -0
- package/dist/{index-hxrqMQH0.js → index-LGBzY7X4.js} +144 -91
- package/dist/{index-B7z4J-o3.cjs → index-NDQ8iJp-.cjs} +1 -1
- package/dist/{index-OVsXV9qH.cjs → index-R9lAZGhC.cjs} +1 -1
- package/dist/{index-CBmfQ940.js → index-kOFqOpyj.js} +1 -1
- package/dist/{index-Dtxj-omA.cjs → index-oVt43enE.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/{index.es-DkTNMqkX.js → index.es-CMGIRK4t.js} +11 -11
- package/dist/{index.es-CvjgLiU5.cjs → index.es-D4rfimNX.cjs} +2 -2
- package/dist/index.esm.js +1 -1
- package/dist/{llm_chain-CkB9PGW0.cjs → llm_chain-BXBR6ZuC.cjs} +1 -1
- package/dist/{llm_chain-CznGW9IL.js → llm_chain-DotVPF7M.js} +1 -1
- package/dist/{sequential_chain-DA8mtC-e.cjs → sequential_chain-CL6uDykC.cjs} +1 -1
- package/dist/{sequential_chain-nheHaHUd.js → sequential_chain-Ctx-2nEf.js} +1 -1
- package/dist/{vector_db_qa-EcRsgq3Q.js → vector_db_qa-Cq_CyJ5A.js} +3 -3
- package/dist/{vector_db_qa-CRYRt3Di.cjs → vector_db_qa-itqyuw36.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-BaUMp8Yc.js +0 -4
- package/dist/index-BmARXylJ.js +0 -4
- package/dist/index-CxFIebSg.js +0 -4
- package/dist/index-D9aayKT4.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as convertElement, o as convert, p as isElement, w as whitespace } from "./index-
|
|
1
|
+
import { n as convertElement, o as convert, p as isElement, w as whitespace } from "./index-LGBzY7X4.js";
|
|
2
2
|
const embedded = convertElement(
|
|
3
3
|
/**
|
|
4
4
|
* @param element
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CMnaValP.cjs"),e=require("./index-BWMn-7k5.cjs");function n(t){const e=String(t);let n=e.length;for(;n>0;){const t=e.codePointAt(n-1);if(void 0===t||10!==t&&13!==t)break;n--}return e.slice(0,n)}const r="language-";function i(e,i){const l=i.children;let o,c,s=-1;if("pre"===i.tagName)for(;++s<l.length;){const t=l[s];if("element"===t.type&&"code"===t.tagName&&t.properties&&t.properties.className&&Array.isArray(t.properties.className)){o=t.properties.className;break}}if(o)for(s=-1;++s<o.length;)if(String(o[s]).slice(0,9)===r){c=String(o[s]).slice(9);break}const a={type:"code",lang:c||null,meta:null,value:n(t.toText(i))};return e.patch(i,a),a}function l(t,e){const n={type:"delete",children:t.all(e)};return t.patch(e,n),n}function o(t){let e=-1;if(t.length>1)for(;++e<t.length;)if(t[e].spread)return!0;return!1}function c(t,e){const n=t.all({type:"root",children:e}),r=t.toSpecificContent(n,s);return 0===r.length?[]:1===r.length?r[0].children:[{type:"list",ordered:!1,start:null,spread:o(r),children:r}]}function s(){return{type:"listItem",spread:!1,checked:null,children:[]}}function a(t,e){const n={type:"emphasis",children:t.all(e)};return t.patch(e,n),n}function p(t){let e=0,n=t.length;for(;e<n&&"break"===t[e].type;)e++;for(;n>e&&"break"===t[n-1].type;)n--;return 0===e&&n===t.length?t:t.slice(e,n)}function u(t,e){const n={type:"heading",depth:Number(e.tagName.charAt(1))||1,children:p(t.all(e))};return t.patch(e,n),n}function h(t,e){const n=e.properties||{},r={type:"image",url:t.resolve(String(n.src||"")||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):""};return t.patch(e,r),r}function d(e,n){const r={type:"inlineCode",value:t.toText(n)};return e.patch(n,r),r}function f(e,n){const r=[],i=[],l=n||e.properties||{},o=g(e),c=Math.min(Number.parseInt(String(l.size),10),0)||(l.multiple?4:1);let s=-1;for(;++s<o.length;){const t=o[s];t&&t.properties&&t.properties.selected&&r.push(t)}const a=r.length>0?r:o,p=Math.min(a.length,c);for(s=-1;++s<p;){const e=a[s],n=e.properties||{},r=t.toText(e),l=r||String(n.label||""),o=String(n.value||"")||r;i.push([o,l===o?void 0:l])}return i}function g(t){const e=[];let n=-1;for(;++n<t.children.length;){const r=t.children[n];"children"in r&&Array.isArray(r.children)&&e.push(...g(r)),"element"!==r.type||"option"!==r.tagName||r.properties&&r.properties.disabled||e.push(r)}return e}function y(t,e){const{rest:n,checkbox:r}=b(e),i=r?Boolean(r.properties.checked):null,l={type:"listItem",spread:m(n),checked:i,children:t.toFlow(t.all(n))};return t.patch(e,l),l}function m(t){let n=-1,r=!1;for(;++n<t.children.length;){const i=t.children[n];if("element"===i.type){if(e.phrasing(i))continue;if("p"===i.tagName||r||m(i))return!0;r=!0}}return!1}function b(t){const e=t.children[0];if(e&&"element"===e.type&&"input"===e.tagName&&e.properties&&("checkbox"===e.properties.type||"radio"===e.properties.type)){return{checkbox:e,rest:{...t,children:t.children.slice(1)}}}if(e&&"element"===e.type&&"p"===e.tagName){const{checkbox:n,rest:r}=b(e);if(n){return{checkbox:n,rest:{...t,children:[r,...t.children.slice(1)]}}}}return{checkbox:void 0,rest:t}}function v(t,e){const n="ol"===e.tagName,r=t.toSpecificContent(t.all(e),S);let i=null;n&&(i=e.properties&&e.properties.start?Number.parseInt(String(e.properties.start),10):1);const l={type:"list",ordered:n,start:i,spread:o(r),children:r};return t.patch(e,l),l}function S(){return{type:"listItem",spread:!1,checked:null,children:[]}}function x(t){let e=-1;for(;++e<t.length;){const n=t[e];if(!w(n)||"children"in n&&x(n.children))return!0}return!1}function k(e){return T(e,function(e){return e.every(function(e){return"text"===e.type&&t.whitespace(e.value)})?[]:[{type:"paragraph",children:p(e)}]},function(t){return t})}function N(t){return T(t.children,function(e){const n=C(t);return n.children=e,[n]},function(e){if("children"in e&&"children"in t){const n=C(t),r=C(e);return n.children=e.children,r.children.push(n),r}return{...e}})}function T(t,e,n){const r=function(t){const e=[];let n=-1;for(;++n<t.length;){const r=t[n];"delete"!==r.type&&"link"!==r.type||!x(r.children)?e.push(r):e.push(...N(r))}return e}(t),i=[];let l=[],o=-1;for(;++o<r.length;){const t=r[o];w(t)?l.push(t):(l.length>0&&(i.push(...e(l)),l=[]),i.push(n(t)))}return l.length>0&&(i.push(...e(l)),l=[]),i}function w(n){const r=n.data&&n.data.hName;return r?e.phrasing({type:"element",tagName:r,properties:{},children:[]}):t.phrasing(n)}function C(e){return t.structuredClone({...e,children:[]})}function I(e,n){const r=n.properties||{},i="video"===n.tagName?String(r.poster||""):"";let l=String(r.src||""),o=-1,c=!1,s=e.all(n);const a={type:"root",children:s};if(t.visit(a,function(e){if("link"===e.type)return c=!0,t.EXIT}),c||x(s))return s;for(;!l&&++o<n.children.length;){const t=n.children[o];"element"===t.type&&"source"===t.tagName&&t.properties&&(l=String(t.properties.src||""))}if(i){const r={type:"image",title:null,url:e.resolve(i),alt:t.toString(s)};e.patch(n,r),s=[r]}const p=s,u={type:"link",title:r.title?String(r.title):null,url:e.resolve(l),children:p};return e.patch(n,u),u}function M(t,e){const n=p(t.all(e));if(n.length>0){const r={type:"paragraph",children:n};return t.patch(e,r),r}}const A=['"'];function U(t,e){const n={type:"strong",children:t.all(e)};return t.patch(e,n),n}function q(t,e){const n={type:"tableCell",children:t.all(e)};if(t.patch(e,n),e.properties){const t=e.properties.rowSpan,r=e.properties.colSpan;if(t||r){const e=n.data||(n.data={});t&&(e.hastUtilToMdastTemporaryRowSpan=t),r&&(e.hastUtilToMdastTemporaryColSpan=r)}}return n}function B(){return{type:"tableCell",children:[]}}function R(){return{type:"tableCell",children:[]}}function j(){return{type:"tableRow",children:[]}}const F={comment:function(t,e){const n={type:"html",value:"\x3c!--"+e.value+"--\x3e"};return t.patch(e,n),n},doctype:O,root:function(t,e){let n=t.all(e);(t.options.document||x(n))&&(n=k(n));const r={type:"root",children:n};return t.patch(e,r),r},text:function(t,e){const n={type:"text",value:e.value};return t.patch(e,n),n}},z={applet:O,area:O,basefont:O,bgsound:O,caption:O,col:O,colgroup:O,command:O,content:O,datalist:O,dialog:O,element:O,embed:O,frame:O,frameset:O,isindex:O,keygen:O,link:O,math:O,menu:O,menuitem:O,meta:O,nextid:O,noembed:O,noframes:O,optgroup:O,option:O,param:O,script:O,shadow:O,source:O,spacer:O,style:O,svg:O,template:O,title:O,track:O,abbr:H,acronym:H,bdi:H,bdo:H,big:H,blink:H,button:H,canvas:H,cite:H,data:H,details:H,dfn:H,font:H,ins:H,label:H,map:H,marquee:H,meter:H,nobr:H,noscript:H,object:H,output:H,progress:H,rb:H,rbc:H,rp:H,rt:H,rtc:H,ruby:H,slot:H,small:H,span:H,sup:H,sub:H,tbody:H,tfoot:H,thead:H,time:H,address:P,article:P,aside:P,body:P,center:P,div:P,fieldset:P,figcaption:P,figure:P,form:P,footer:P,header:P,hgroup:P,html:P,legend:P,main:P,multicol:P,nav:P,picture:P,section:P,a:function(t,e){const n=e.properties||{},r=t.all(e),i={type:"link",url:t.resolve(String(n.href||"")||null),title:n.title?String(n.title):null,children:r};return t.patch(e,i),i},audio:I,b:U,base:function(t,e){t.baseFound||(t.frozenBaseUrl=String(e.properties&&e.properties.href||"")||void 0,t.baseFound=!0)},blockquote:function(t,e){const n={type:"blockquote",children:t.toFlow(t.all(e))};return t.patch(e,n),n},br:function(t,e){const n={type:"break"};return t.patch(e,n),n},code:d,dir:v,dl:function(t,e){const n=[],r=[];let i=-1;for(;++i<e.children.length;){const t=e.children[i];"element"===t.type&&"div"===t.tagName?n.push(...t.children):n.push(t)}let l={definitions:[],titles:[]};for(i=-1;++i<n.length;){const t=n[i];if("element"===t.type&&"dt"===t.tagName){const e=n[i-1];e&&"element"===e.type&&"dd"===e.tagName&&(r.push(l),l={definitions:[],titles:[]}),l.titles.push(t)}else l.definitions.push(t)}r.push(l),i=-1;const s=[];for(;++i<r.length;){const e=[...c(t,r[i].titles),...c(t,r[i].definitions)];e.length>0&&s.push({type:"listItem",spread:e.length>1,checked:null,children:e})}if(s.length>0){const n={type:"list",ordered:!1,start:null,spread:o(s),children:s};return t.patch(e,n),n}},dt:y,dd:y,del:l,em:a,h1:u,h2:u,h3:u,h4:u,h5:u,h6:u,hr:function(t,e){const n={type:"thematicBreak"};return t.patch(e,n),n},i:a,iframe:function(t,e){const n=e.properties||{},r=String(n.src||""),i=String(n.title||"");if(r&&i){const n={type:"link",title:null,url:t.resolve(r),children:[{type:"text",value:i}]};return t.patch(e,n),n}},img:h,image:h,input:function(t,e){const n=e.properties||{},r=String(n.value||n.placeholder||"");if(n.disabled||"hidden"===n.type||"file"===n.type)return;if("checkbox"===n.type||"radio"===n.type){const r={type:"text",value:n.checked?t.options.checked||"[x]":t.options.unchecked||"[ ]"};return t.patch(e,r),r}if("image"===n.type){const i=n.alt||r;if(i){const r={type:"image",url:t.resolve(String(n.src||"")||null),title:String(n.title||"")||null,alt:String(i)};return t.patch(e,r),r}return}let i=[];if(r)i=[[r,void 0]];else if("button"!==n.type&&"file"!==n.type&&"password"!==n.type&&"reset"!==n.type&&"submit"!==n.type&&n.list){const e=String(n.list),r=t.elementById.get(e);r&&"datalist"===r.tagName&&(i=f(r,n))}if(0===i.length)return;if("password"===n.type&&(i[0]=["•".repeat(i[0][0].length),void 0]),"email"===n.type||"url"===n.type){const e=[];let r=-1;for(;++r<i.length;){const l=t.resolve(i[r][0]),o={type:"link",title:null,url:"email"===n.type?"mailto:"+l:l,children:[{type:"text",value:i[r][1]||l}]};e.push(o),r!==i.length-1&&e.push({type:"text",value:", "})}return e}const l=[];let o=-1;for(;++o<i.length;)l.push(i[o][1]?i[o][1]+" ("+i[o][0]+")":i[o][0]);const c={type:"text",value:l.join(", ")};return t.patch(e,c),c},kbd:d,li:y,listing:i,mark:a,ol:v,p:M,plaintext:i,pre:i,q:function(t,e){const n=t.options.quotes||A;t.qNesting++;const r=t.all(e);t.qNesting--;const i=n[t.qNesting%n.length],l=r[0],o=r[r.length-1],c=i.charAt(0),s=i.length>1?i.charAt(1):i;return l&&"text"===l.type?l.value=c+l.value:r.unshift({type:"text",value:c}),o&&"text"===o.type?o.value+=s:r.push({type:"text",value:s}),r},s:l,samp:d,select:function(t,e){const n=f(e);let r=-1;const i=[];for(;++r<n.length;){const t=n[r];i.push(t[1]?t[1]+" ("+t[0]+")":t[0])}if(i.length>0){const n={type:"text",value:i.join(", ")};return t.patch(e,n),n}},strike:l,strong:U,summary:M,table:function(e,n){if(e.inTable){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r}e.inTable=!0;const{align:r,headless:i}=function(e){const n={align:[null],headless:!0};let r=0,i=0;return t.visit(e,function(l){if("element"===l.type){if("table"===l.tagName&&e!==l)return t.SKIP;if("th"!==l.tagName&&"td"!==l.tagName||!l.properties)"thead"===l.tagName?n.headless=!1:"tr"===l.tagName&&(r++,i=0);else{if(!n.align[i]){const t=String(l.properties.align||"")||null;"center"!==t&&"left"!==t&&"right"!==t&&null!==t||(n.align[i]=t)}n.headless&&r<2&&"th"===l.tagName&&(n.headless=!1),i++}}}),n}(n),l=e.toSpecificContent(e.all(n),j);i&&l.unshift({type:"tableRow",children:[]});let o=-1;for(;++o<l.length;){const t=l[o],n=e.toSpecificContent(t.children,R);t.children=n}let c=1;for(o=-1;++o<l.length;){const t=l[o].children;let e=-1;for(;++e<t.length;){const n=t[e];if(n.data){const t=n.data,r=Number.parseInt(String(t.hastUtilToMdastTemporaryColSpan),10)||1,i=Number.parseInt(String(t.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||i>1){let t=o-1;for(;++t<o+i;){let n=e-1;for(;++n<e+r&&l[t];){const r=[];t===o&&n===e||r.push({type:"tableCell",children:[]}),l[t].children.splice(n,0,...r)}}}"hastUtilToMdastTemporaryColSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,"hastUtilToMdastTemporaryRowSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,0===Object.keys(n.data).length&&delete n.data}}t.length>c&&(c=t.length)}for(o=-1;++o<l.length;){const t=l[o].children;let e=t.length-1;for(;++e<c;)t.push({type:"tableCell",children:[]})}let s=r.length-1;for(;++s<c;)r.push(null);e.inTable=!1;const a={type:"table",align:r,children:l};return e.patch(n,a),a},td:q,textarea:function(e,n){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r},th:q,tr:function(t,e){const n={type:"tableRow",children:t.toSpecificContent(t.all(e),B)};return t.patch(e,n),n},tt:d,u:a,ul:v,var:d,video:I,wbr:function(t,e){const n={type:"text",value:""};return t.patch(e,n),n},xmp:i};function H(t,e){return t.all(e)}function P(t,e){return t.toFlow(t.all(e))}function O(){}const $={}.hasOwnProperty;function E(t){const e=t.children||[],n=[];let r=-1;for(;++r<e.length;){const i=e[r],l=this.one(i,t);Array.isArray(l)?n.push(...l):l&&n.push(l)}return n}function K(t,e){if("element"===t.type){if(t.properties&&"ignore"===t.properties.dataMdast)return;if($.call(this.handlers,t.tagName))return this.handlers[t.tagName](this,t,e)||void 0}else if($.call(this.nodeHandlers,t.type))return this.nodeHandlers[t.type](this,t,e)||void 0;if("value"in t&&"string"==typeof t.value){const e={type:"text",value:t.value};return this.patch(t,e),e}if("children"in t)return this.all(t)}function L(e,n){e.position&&(n.position=t.position(e))}function W(t){const e=this.frozenBaseUrl;return null==t?"":e?String(new URL(t,e)):t}function X(t){return k(t)}function D(t,e){const n=e(),r=[];let i=[],l=-1;for(;++l<t.length;){const e=t[l];if(o(e))i.length>0&&(e.children.unshift(...i),i=[]),r.push(e);else{const t=e;i.push(t)}}if(i.length>0){let t=r[r.length-1];t||(t=e(),r.push(t)),t.children.push(...i),i=[]}return r;function o(t){return t.type===n.type}}const G={};function J(n,r){const i=t.structuredClone(n),l=r||G,o=function(t){return function(n){e.minifyWhitespace(n,t)}}({newlines:!0===l.newlines}),c=function(t){return{all:E,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...z,...t.handlers},inTable:!1,nodeHandlers:{...F,...t.nodeHandlers},one:K,options:t,patch:L,qNesting:0,resolve:W,toFlow:X,toSpecificContent:D}}(l);let s;o(i),t.visit(i,function(t){if(t&&"element"===t.type&&t.properties){const e=String(t.properties.id||"")||void 0;e&&!c.elementById.has(e)&&c.elementById.set(e,t)}});const a=c.one(i,void 0);if(a)if(Array.isArray(a)){s={type:"root",children:a}}else s=a;else s={type:"root",children:[]};return t.visit(s,function(t,e,n){if("text"===t.type&&void 0!==e&&n){const r=n.children[e-1];if(r&&r.type===t.type)return r.value+=t.value,n.children.splice(e,1),r.position&&t.position&&(r.position.end=t.position.end),e-1;if(t.value=t.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,"$1"),!n||"heading"!==n.type&&"paragraph"!==n.type&&"root"!==n.type||(e||(t.value=t.value.replace(/^[\t ]+/,"")),e===n.children.length-1&&(t.value=t.value.replace(/[\t ]+$/,""))),!t.value)return n.children.splice(e,1),e}}),s}const Q={document:!0};exports.default=function(t,e){return t&&"run"in t?async function(n,r){const i=J(n,{...Q,...e});await t.run(i,r)}:function(e){return J(e,{...Q,...t})}};
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-C755WiyV.cjs"),e=require("./index-DO3BVly9.cjs");function n(t){const e=String(t);let n=e.length;for(;n>0;){const t=e.codePointAt(n-1);if(void 0===t||10!==t&&13!==t)break;n--}return e.slice(0,n)}const r="language-";function i(e,i){const l=i.children;let o,c,s=-1;if("pre"===i.tagName)for(;++s<l.length;){const t=l[s];if("element"===t.type&&"code"===t.tagName&&t.properties&&t.properties.className&&Array.isArray(t.properties.className)){o=t.properties.className;break}}if(o)for(s=-1;++s<o.length;)if(String(o[s]).slice(0,9)===r){c=String(o[s]).slice(9);break}const a={type:"code",lang:c||null,meta:null,value:n(t.toText(i))};return e.patch(i,a),a}function l(t,e){const n={type:"delete",children:t.all(e)};return t.patch(e,n),n}function o(t){let e=-1;if(t.length>1)for(;++e<t.length;)if(t[e].spread)return!0;return!1}function c(t,e){const n=t.all({type:"root",children:e}),r=t.toSpecificContent(n,s);return 0===r.length?[]:1===r.length?r[0].children:[{type:"list",ordered:!1,start:null,spread:o(r),children:r}]}function s(){return{type:"listItem",spread:!1,checked:null,children:[]}}function a(t,e){const n={type:"emphasis",children:t.all(e)};return t.patch(e,n),n}function p(t){let e=0,n=t.length;for(;e<n&&"break"===t[e].type;)e++;for(;n>e&&"break"===t[n-1].type;)n--;return 0===e&&n===t.length?t:t.slice(e,n)}function u(t,e){const n={type:"heading",depth:Number(e.tagName.charAt(1))||1,children:p(t.all(e))};return t.patch(e,n),n}function h(t,e){const n=e.properties||{},r={type:"image",url:t.resolve(String(n.src||"")||null),title:n.title?String(n.title):null,alt:n.alt?String(n.alt):""};return t.patch(e,r),r}function d(e,n){const r={type:"inlineCode",value:t.toText(n)};return e.patch(n,r),r}function f(e,n){const r=[],i=[],l=n||e.properties||{},o=g(e),c=Math.min(Number.parseInt(String(l.size),10),0)||(l.multiple?4:1);let s=-1;for(;++s<o.length;){const t=o[s];t&&t.properties&&t.properties.selected&&r.push(t)}const a=r.length>0?r:o,p=Math.min(a.length,c);for(s=-1;++s<p;){const e=a[s],n=e.properties||{},r=t.toText(e),l=r||String(n.label||""),o=String(n.value||"")||r;i.push([o,l===o?void 0:l])}return i}function g(t){const e=[];let n=-1;for(;++n<t.children.length;){const r=t.children[n];"children"in r&&Array.isArray(r.children)&&e.push(...g(r)),"element"!==r.type||"option"!==r.tagName||r.properties&&r.properties.disabled||e.push(r)}return e}function y(t,e){const{rest:n,checkbox:r}=b(e),i=r?Boolean(r.properties.checked):null,l={type:"listItem",spread:m(n),checked:i,children:t.toFlow(t.all(n))};return t.patch(e,l),l}function m(t){let n=-1,r=!1;for(;++n<t.children.length;){const i=t.children[n];if("element"===i.type){if(e.phrasing(i))continue;if("p"===i.tagName||r||m(i))return!0;r=!0}}return!1}function b(t){const e=t.children[0];if(e&&"element"===e.type&&"input"===e.tagName&&e.properties&&("checkbox"===e.properties.type||"radio"===e.properties.type)){return{checkbox:e,rest:{...t,children:t.children.slice(1)}}}if(e&&"element"===e.type&&"p"===e.tagName){const{checkbox:n,rest:r}=b(e);if(n){return{checkbox:n,rest:{...t,children:[r,...t.children.slice(1)]}}}}return{checkbox:void 0,rest:t}}function v(t,e){const n="ol"===e.tagName,r=t.toSpecificContent(t.all(e),S);let i=null;n&&(i=e.properties&&e.properties.start?Number.parseInt(String(e.properties.start),10):1);const l={type:"list",ordered:n,start:i,spread:o(r),children:r};return t.patch(e,l),l}function S(){return{type:"listItem",spread:!1,checked:null,children:[]}}function x(t){let e=-1;for(;++e<t.length;){const n=t[e];if(!w(n)||"children"in n&&x(n.children))return!0}return!1}function k(e){return T(e,function(e){return e.every(function(e){return"text"===e.type&&t.whitespace(e.value)})?[]:[{type:"paragraph",children:p(e)}]},function(t){return t})}function N(t){return T(t.children,function(e){const n=C(t);return n.children=e,[n]},function(e){if("children"in e&&"children"in t){const n=C(t),r=C(e);return n.children=e.children,r.children.push(n),r}return{...e}})}function T(t,e,n){const r=function(t){const e=[];let n=-1;for(;++n<t.length;){const r=t[n];"delete"!==r.type&&"link"!==r.type||!x(r.children)?e.push(r):e.push(...N(r))}return e}(t),i=[];let l=[],o=-1;for(;++o<r.length;){const t=r[o];w(t)?l.push(t):(l.length>0&&(i.push(...e(l)),l=[]),i.push(n(t)))}return l.length>0&&(i.push(...e(l)),l=[]),i}function w(n){const r=n.data&&n.data.hName;return r?e.phrasing({type:"element",tagName:r,properties:{},children:[]}):t.phrasing(n)}function C(e){return t.structuredClone({...e,children:[]})}function I(e,n){const r=n.properties||{},i="video"===n.tagName?String(r.poster||""):"";let l=String(r.src||""),o=-1,c=!1,s=e.all(n);const a={type:"root",children:s};if(t.visit(a,function(e){if("link"===e.type)return c=!0,t.EXIT}),c||x(s))return s;for(;!l&&++o<n.children.length;){const t=n.children[o];"element"===t.type&&"source"===t.tagName&&t.properties&&(l=String(t.properties.src||""))}if(i){const r={type:"image",title:null,url:e.resolve(i),alt:t.toString(s)};e.patch(n,r),s=[r]}const p=s,u={type:"link",title:r.title?String(r.title):null,url:e.resolve(l),children:p};return e.patch(n,u),u}function M(t,e){const n=p(t.all(e));if(n.length>0){const r={type:"paragraph",children:n};return t.patch(e,r),r}}const A=['"'];function U(t,e){const n={type:"strong",children:t.all(e)};return t.patch(e,n),n}function q(t,e){const n={type:"tableCell",children:t.all(e)};if(t.patch(e,n),e.properties){const t=e.properties.rowSpan,r=e.properties.colSpan;if(t||r){const e=n.data||(n.data={});t&&(e.hastUtilToMdastTemporaryRowSpan=t),r&&(e.hastUtilToMdastTemporaryColSpan=r)}}return n}function B(){return{type:"tableCell",children:[]}}function R(){return{type:"tableCell",children:[]}}function j(){return{type:"tableRow",children:[]}}const F={comment:function(t,e){const n={type:"html",value:"\x3c!--"+e.value+"--\x3e"};return t.patch(e,n),n},doctype:O,root:function(t,e){let n=t.all(e);(t.options.document||x(n))&&(n=k(n));const r={type:"root",children:n};return t.patch(e,r),r},text:function(t,e){const n={type:"text",value:e.value};return t.patch(e,n),n}},z={applet:O,area:O,basefont:O,bgsound:O,caption:O,col:O,colgroup:O,command:O,content:O,datalist:O,dialog:O,element:O,embed:O,frame:O,frameset:O,isindex:O,keygen:O,link:O,math:O,menu:O,menuitem:O,meta:O,nextid:O,noembed:O,noframes:O,optgroup:O,option:O,param:O,script:O,shadow:O,source:O,spacer:O,style:O,svg:O,template:O,title:O,track:O,abbr:H,acronym:H,bdi:H,bdo:H,big:H,blink:H,button:H,canvas:H,cite:H,data:H,details:H,dfn:H,font:H,ins:H,label:H,map:H,marquee:H,meter:H,nobr:H,noscript:H,object:H,output:H,progress:H,rb:H,rbc:H,rp:H,rt:H,rtc:H,ruby:H,slot:H,small:H,span:H,sup:H,sub:H,tbody:H,tfoot:H,thead:H,time:H,address:P,article:P,aside:P,body:P,center:P,div:P,fieldset:P,figcaption:P,figure:P,form:P,footer:P,header:P,hgroup:P,html:P,legend:P,main:P,multicol:P,nav:P,picture:P,section:P,a:function(t,e){const n=e.properties||{},r=t.all(e),i={type:"link",url:t.resolve(String(n.href||"")||null),title:n.title?String(n.title):null,children:r};return t.patch(e,i),i},audio:I,b:U,base:function(t,e){t.baseFound||(t.frozenBaseUrl=String(e.properties&&e.properties.href||"")||void 0,t.baseFound=!0)},blockquote:function(t,e){const n={type:"blockquote",children:t.toFlow(t.all(e))};return t.patch(e,n),n},br:function(t,e){const n={type:"break"};return t.patch(e,n),n},code:d,dir:v,dl:function(t,e){const n=[],r=[];let i=-1;for(;++i<e.children.length;){const t=e.children[i];"element"===t.type&&"div"===t.tagName?n.push(...t.children):n.push(t)}let l={definitions:[],titles:[]};for(i=-1;++i<n.length;){const t=n[i];if("element"===t.type&&"dt"===t.tagName){const e=n[i-1];e&&"element"===e.type&&"dd"===e.tagName&&(r.push(l),l={definitions:[],titles:[]}),l.titles.push(t)}else l.definitions.push(t)}r.push(l),i=-1;const s=[];for(;++i<r.length;){const e=[...c(t,r[i].titles),...c(t,r[i].definitions)];e.length>0&&s.push({type:"listItem",spread:e.length>1,checked:null,children:e})}if(s.length>0){const n={type:"list",ordered:!1,start:null,spread:o(s),children:s};return t.patch(e,n),n}},dt:y,dd:y,del:l,em:a,h1:u,h2:u,h3:u,h4:u,h5:u,h6:u,hr:function(t,e){const n={type:"thematicBreak"};return t.patch(e,n),n},i:a,iframe:function(t,e){const n=e.properties||{},r=String(n.src||""),i=String(n.title||"");if(r&&i){const n={type:"link",title:null,url:t.resolve(r),children:[{type:"text",value:i}]};return t.patch(e,n),n}},img:h,image:h,input:function(t,e){const n=e.properties||{},r=String(n.value||n.placeholder||"");if(n.disabled||"hidden"===n.type||"file"===n.type)return;if("checkbox"===n.type||"radio"===n.type){const r={type:"text",value:n.checked?t.options.checked||"[x]":t.options.unchecked||"[ ]"};return t.patch(e,r),r}if("image"===n.type){const i=n.alt||r;if(i){const r={type:"image",url:t.resolve(String(n.src||"")||null),title:String(n.title||"")||null,alt:String(i)};return t.patch(e,r),r}return}let i=[];if(r)i=[[r,void 0]];else if("button"!==n.type&&"file"!==n.type&&"password"!==n.type&&"reset"!==n.type&&"submit"!==n.type&&n.list){const e=String(n.list),r=t.elementById.get(e);r&&"datalist"===r.tagName&&(i=f(r,n))}if(0===i.length)return;if("password"===n.type&&(i[0]=["•".repeat(i[0][0].length),void 0]),"email"===n.type||"url"===n.type){const e=[];let r=-1;for(;++r<i.length;){const l=t.resolve(i[r][0]),o={type:"link",title:null,url:"email"===n.type?"mailto:"+l:l,children:[{type:"text",value:i[r][1]||l}]};e.push(o),r!==i.length-1&&e.push({type:"text",value:", "})}return e}const l=[];let o=-1;for(;++o<i.length;)l.push(i[o][1]?i[o][1]+" ("+i[o][0]+")":i[o][0]);const c={type:"text",value:l.join(", ")};return t.patch(e,c),c},kbd:d,li:y,listing:i,mark:a,ol:v,p:M,plaintext:i,pre:i,q:function(t,e){const n=t.options.quotes||A;t.qNesting++;const r=t.all(e);t.qNesting--;const i=n[t.qNesting%n.length],l=r[0],o=r[r.length-1],c=i.charAt(0),s=i.length>1?i.charAt(1):i;return l&&"text"===l.type?l.value=c+l.value:r.unshift({type:"text",value:c}),o&&"text"===o.type?o.value+=s:r.push({type:"text",value:s}),r},s:l,samp:d,select:function(t,e){const n=f(e);let r=-1;const i=[];for(;++r<n.length;){const t=n[r];i.push(t[1]?t[1]+" ("+t[0]+")":t[0])}if(i.length>0){const n={type:"text",value:i.join(", ")};return t.patch(e,n),n}},strike:l,strong:U,summary:M,table:function(e,n){if(e.inTable){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r}e.inTable=!0;const{align:r,headless:i}=function(e){const n={align:[null],headless:!0};let r=0,i=0;return t.visit(e,function(l){if("element"===l.type){if("table"===l.tagName&&e!==l)return t.SKIP;if("th"!==l.tagName&&"td"!==l.tagName||!l.properties)"thead"===l.tagName?n.headless=!1:"tr"===l.tagName&&(r++,i=0);else{if(!n.align[i]){const t=String(l.properties.align||"")||null;"center"!==t&&"left"!==t&&"right"!==t&&null!==t||(n.align[i]=t)}n.headless&&r<2&&"th"===l.tagName&&(n.headless=!1),i++}}}),n}(n),l=e.toSpecificContent(e.all(n),j);i&&l.unshift({type:"tableRow",children:[]});let o=-1;for(;++o<l.length;){const t=l[o],n=e.toSpecificContent(t.children,R);t.children=n}let c=1;for(o=-1;++o<l.length;){const t=l[o].children;let e=-1;for(;++e<t.length;){const n=t[e];if(n.data){const t=n.data,r=Number.parseInt(String(t.hastUtilToMdastTemporaryColSpan),10)||1,i=Number.parseInt(String(t.hastUtilToMdastTemporaryRowSpan),10)||1;if(r>1||i>1){let t=o-1;for(;++t<o+i;){let n=e-1;for(;++n<e+r&&l[t];){const r=[];t===o&&n===e||r.push({type:"tableCell",children:[]}),l[t].children.splice(n,0,...r)}}}"hastUtilToMdastTemporaryColSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryColSpan,"hastUtilToMdastTemporaryRowSpan"in n.data&&delete n.data.hastUtilToMdastTemporaryRowSpan,0===Object.keys(n.data).length&&delete n.data}}t.length>c&&(c=t.length)}for(o=-1;++o<l.length;){const t=l[o].children;let e=t.length-1;for(;++e<c;)t.push({type:"tableCell",children:[]})}let s=r.length-1;for(;++s<c;)r.push(null);e.inTable=!1;const a={type:"table",align:r,children:l};return e.patch(n,a),a},td:q,textarea:function(e,n){const r={type:"text",value:t.toText(n)};return e.patch(n,r),r},th:q,tr:function(t,e){const n={type:"tableRow",children:t.toSpecificContent(t.all(e),B)};return t.patch(e,n),n},tt:d,u:a,ul:v,var:d,video:I,wbr:function(t,e){const n={type:"text",value:""};return t.patch(e,n),n},xmp:i};function H(t,e){return t.all(e)}function P(t,e){return t.toFlow(t.all(e))}function O(){}const $={}.hasOwnProperty;function E(t){const e=t.children||[],n=[];let r=-1;for(;++r<e.length;){const i=e[r],l=this.one(i,t);Array.isArray(l)?n.push(...l):l&&n.push(l)}return n}function K(t,e){if("element"===t.type){if(t.properties&&"ignore"===t.properties.dataMdast)return;if($.call(this.handlers,t.tagName))return this.handlers[t.tagName](this,t,e)||void 0}else if($.call(this.nodeHandlers,t.type))return this.nodeHandlers[t.type](this,t,e)||void 0;if("value"in t&&"string"==typeof t.value){const e={type:"text",value:t.value};return this.patch(t,e),e}if("children"in t)return this.all(t)}function L(e,n){e.position&&(n.position=t.position(e))}function W(t){const e=this.frozenBaseUrl;return null==t?"":e?String(new URL(t,e)):t}function X(t){return k(t)}function D(t,e){const n=e(),r=[];let i=[],l=-1;for(;++l<t.length;){const e=t[l];if(o(e))i.length>0&&(e.children.unshift(...i),i=[]),r.push(e);else{const t=e;i.push(t)}}if(i.length>0){let t=r[r.length-1];t||(t=e(),r.push(t)),t.children.push(...i),i=[]}return r;function o(t){return t.type===n.type}}const G={};function J(n,r){const i=t.structuredClone(n),l=r||G,o=function(t){return function(n){e.minifyWhitespace(n,t)}}({newlines:!0===l.newlines}),c=function(t){return{all:E,baseFound:!1,elementById:new Map,frozenBaseUrl:void 0,handlers:{...z,...t.handlers},inTable:!1,nodeHandlers:{...F,...t.nodeHandlers},one:K,options:t,patch:L,qNesting:0,resolve:W,toFlow:X,toSpecificContent:D}}(l);let s;o(i),t.visit(i,function(t){if(t&&"element"===t.type&&t.properties){const e=String(t.properties.id||"")||void 0;e&&!c.elementById.has(e)&&c.elementById.set(e,t)}});const a=c.one(i,void 0);if(a)if(Array.isArray(a)){s={type:"root",children:a}}else s=a;else s={type:"root",children:[]};return t.visit(s,function(t,e,n){if("text"===t.type&&void 0!==e&&n){const r=n.children[e-1];if(r&&r.type===t.type)return r.value+=t.value,n.children.splice(e,1),r.position&&t.position&&(r.position.end=t.position.end),e-1;if(t.value=t.value.replace(/[\t ]*(\r?\n|\r)[\t ]*/,"$1"),!n||"heading"!==n.type&&"paragraph"!==n.type&&"root"!==n.type||(e||(t.value=t.value.replace(/^[\t ]+/,"")),e===n.children.length-1&&(t.value=t.value.replace(/[\t ]+$/,""))),!t.value)return n.children.splice(e,1),e}}),s}const Q={document:!0};exports.default=function(t,e){return t&&"run"in t?async function(n,r){const i=J(n,{...Q,...e});await t.run(i,r)}:function(e){return J(e,{...Q,...t})}};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as minifyWhitespace, e as embedded, p as phrasing } from "./index-
|
|
2
|
-
import { v as visitParents, S as SKIP, w as whitespace } from "./index-
|
|
1
|
+
import { m as minifyWhitespace, e as embedded, p as phrasing } from "./index-CCzqZMyF.js";
|
|
2
|
+
import { v as visitParents, S as SKIP, w as whitespace } from "./index-LGBzY7X4.js";
|
|
3
3
|
const whitespaceSensitiveTagNames = [
|
|
4
4
|
"pre",
|
|
5
5
|
"script",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index-
|
|
1
|
+
"use strict";const e=require("./index-C755WiyV.cjs"),t=e.convertElement(function(e){return"audio"===e.tagName||"canvas"===e.tagName||"embed"===e.tagName||"iframe"===e.tagName||"img"===e.tagName||"math"===e.tagName||"object"===e.tagName||"picture"===e.tagName||"svg"===e.tagName||"video"===e.tagName}),r=["address","article","aside","blockquote","body","br","caption","center","col","colgroup","dd","dialog","dir","div","dl","dt","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","legend","li","li","listing","main","menu","nav","ol","optgroup","option","p","plaintext","pre","section","summary","table","tbody","td","td","tfoot","th","th","thead","tr","ul","wbr","xmp"],n=["button","input","select","textarea"],a=["area","base","basefont","dialog","datalist","head","link","meta","noembed","noframes","param","rp","script","source","style","template","track","title"],i={},o=e.convert(["comment","doctype"]);function s(e,t){if("children"in e){const r={...t};return("root"===e.type||u(e))&&(r.before=!0,r.after=!0),r.whitespace=function(e,t){if("tagName"in e&&e.properties)switch(e.tagName){case"listing":case"plaintext":case"script":case"style":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return e.properties.wrap?"pre-wrap":"pre";case"td":case"th":return e.properties.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}return t.whitespace}(e,t),function(e,t){let r=t.before;const n=t.after,a=e.children;let i=a.length,o=-1;for(;++o<i;){const e=s(a[o],{...t,after:c(a,o,n),before:r});e.remove?(a.splice(o,1),o--,i--):e.ignore||(r=e.stripAtStart),l(a[o])&&(r=!1)}return{ignore:!1,stripAtStart:Boolean(r||n),remove:!1}}(e,r)}if("text"===e.type){if("normal"===t.whitespace)return function(e,t){const r=t.collapse(e.value),n={ignore:!1,stripAtStart:!1,remove:!1};let a=0,i=r.length;t.before&&f(r.charAt(0))&&a++;a!==i&&f(r.charAt(i-1))&&(t.after?i--:n.stripAtStart=!0);a===i?n.remove=!0:e.value=r.slice(a,i);return n}(e,t);"nowrap"===t.whitespace&&(e.value=t.collapse(e.value))}return{ignore:o(e),stripAtStart:!1,remove:!1}}function c(e,t,r){for(;++t<e.length;){const r=e[t];let n=p(r);if(void 0===n&&"children"in r&&!m(r)&&(n=c(r.children,-1)),"boolean"==typeof n)return n}return r}function p(t){if("element"===t.type){if(l(t))return!1;if(u(t))return!0}else if("text"===t.type){if(!e.whitespace(t))return!1}else if(!o(t))return!1}function l(r){return t(r)||e.isElement(r,n)}function u(t){return e.isElement(t,r)}function m(t){return Boolean("element"===t.type&&t.properties.hidden)||o(t)||e.isElement(t,a)}function f(e){return" "===e||"\n"===e}function d(e){const t=/\r?\n|\r/.exec(e);return t?t[0]:" "}function h(){return" "}function g(e){return function(t){return String(t).replace(/[\t\n\v\f\r ]+/g,e)}}const b={}.hasOwnProperty;const y=new Set(["pingback","prefetch","stylesheet"]);const v=e.convertElement(["a","abbr","area","b","bdi","bdo","br","button","cite","code","data","datalist","del","dfn","em","i","input","ins","kbd","keygen","label","map","mark","meter","noscript","output","progress","q","ruby","s","samp","script","select","small","span","strong","sub","sup","template","textarea","time","u","var","wbr"]),w=e.convertElement("meta");exports.embedded=t,exports.minifyWhitespace=function(e,t){s(e,{collapse:g((t||i).newlines?d:h),whitespace:"normal"})},exports.phrasing=function(e){return Boolean("text"===e.type||v(e)||t(e)||function(e){if("element"!==e.type||"link"!==e.tagName)return!1;if(e.properties.itemProp)return!0;const t=e.properties.rel;let r=-1;if(!Array.isArray(t)||0===t.length)return!1;for(;++r<t.length;)if(!y.has(String(t[r])))return!1;return!0}(e)||w(e)&&function(e,t){const r="element"===e.type&&b.call(e.properties,t)&&e.properties[t];return null!=r&&!1!==r}(e,"itemProp"))};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { w as whitespace, A as svg, I as find, L as stringify, M as stringify$1, N as ccount, D as html$2 } from "./index-
|
|
1
|
+
import { w as whitespace, A as svg, I as find, L as stringify, M as stringify$1, N as ccount, D as html$2 } from "./index-LGBzY7X4.js";
|
|
2
2
|
import { z as zwitch } from "./index-BEZf1ZPW.js";
|
|
3
3
|
const htmlVoidElements = [
|
|
4
4
|
"area",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as toText, Q as phrasing$2, T as structuredClone, w as whitespace, U as visit, W as EXIT, X as toString, S as SKIP, Y as position } from "./index-
|
|
2
|
-
import { m as minifyWhitespace, p as phrasing$1 } from "./index-
|
|
1
|
+
import { O as toText, Q as phrasing$2, T as structuredClone, w as whitespace, U as visit, W as EXIT, X as toString, S as SKIP, Y as position } from "./index-LGBzY7X4.js";
|
|
2
|
+
import { m as minifyWhitespace, p as phrasing$1 } from "./index-CCzqZMyF.js";
|
|
3
3
|
function rehypeMinifyWhitespace(options) {
|
|
4
4
|
return function(tree) {
|
|
5
5
|
minifyWhitespace(tree, options);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DO3BVly9.cjs"),t=require("./index-C755WiyV.cjs"),n=["pre","script","style","textarea"],i={};function a(e,t){return Boolean(t&&"element"===t.type&&e.blanks.length>0&&e.blanks.includes(t.tagName))}function l(t,n){return"root"===n.type||"element"===n.type&&(t.head||"script"===n.tagName||e.embedded(n)||!e.phrasing(n))}exports.default=function(r){return function(c){!function(r,c){const d=c||i,s={blanks:d.blanks||[],head:!1,indentInitial:!1!==d.indentInitial,indent:"number"==typeof d.indent?" ".repeat(d.indent):"string"==typeof d.indent?d.indent:" "};function o(e,n,i){const l=e[e.length-1],r=l&&t.whitespace(l)?e[e.length-2]:l,c=(a(s,r)&&a(s,i)?"\n\n":"\n")+s.indent.repeat(Math.max(n,0));l&&"text"===l.type?l.value=t.whitespace(l)?c:l.value+c:e.push({type:"text",value:c})}e.minifyWhitespace(r,{newlines:!0}),t.visitParents(r,function(e,i){if(!("children"in e))return;if("element"===e.type&&"head"===e.tagName&&(s.head=!0),s.head&&"element"===e.type&&"body"===e.tagName&&(s.head=!1),"element"===e.type&&n.includes(e.tagName))return t.SKIP;if(0===e.children.length||!l(s,e))return;let a=i.length;s.indentInitial||a--;let r=!1;for(const t of e.children)"comment"!==t.type&&"text"!==t.type||(t.value.includes("\n")&&(r=!0),t.value=t.value.replace(/ *\n/g,"$&"+s.indent.repeat(a)));const c=[];let d;for(const t of e.children)(l(s,t)||r&&!d)&&(o(c,a,t),r=!0),d=t,c.push(t);d&&(r||l(s,d))&&(t.whitespace(d)&&(c.pop(),d=c[c.length-1]),o(c,a-1)),e.children=c})}(c,r)}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-2yo2kUGy.cjs"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-2yo2kUGy.cjs"),t=require("./index-C755WiyV.cjs"),n={}.hasOwnProperty;function r(e,t){let o,i=-1;if(t.extensions)for(;++i<t.extensions.length;)r(e,t.extensions[i]);for(o in t)if(n.call(t,o))switch(o){case"extensions":break;case"unsafe":case"join":c(e[o],t[o]);break;case"handlers":a(e[o],t[o]);break;default:e.options[o]=t[o]}return e}function c(e,t){t&&e.push(...t)}function a(e,t){t&&Object.assign(e,t)}const o=[function(e,n,r,c){if("code"===n.type&&t.formatCodeAsIndented(n,c)&&("list"===e.type||e.type===n.type&&t.formatCodeAsIndented(e,c)))return!1;if("spread"in r&&"boolean"==typeof r.spread){if("paragraph"===e.type&&(e.type===n.type||"definition"===n.type||"heading"===n.type&&t.formatHeadingAsSetext(n,c)))return;return r.spread?1:0}}];const i=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],s=[{character:"\t",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"\t",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:"\n",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:i},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:"(?:[\r\n]|$)"},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:"(?:[ \t\r\n*])"},{character:"*",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,character:"+",after:"(?:[ \t\r\n])"},{atBreak:!0,character:"-",after:"(?:[ \t\r\n-])"},{atBreak:!0,before:"\\d+",character:".",after:"(?:[ \t\r\n]|$)"},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:i},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:i},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:i},{atBreak:!0,character:"~"}];function h(e){return e.label||!e.identifier?e.label||"":t.decodeString(e.identifier)}function u(e){if(!e._compiled){const t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function f(e,t,n,r){let c=r.join.length;for(;c--;){const a=r.join[c](e,t,n,r);if(!0===a||1===a)break;if("number"==typeof a)return"\n".repeat(1+a);if(!1===a)return"\n\n\x3c!----\x3e\n\n"}return"\n\n"}const l=/\r?\n|\r/g;function d(e,t){const n=[];let r,c=0,a=0;for(;r=l.exec(e);)o(e.slice(c,r.index)),n.push(r[0]),c=r.index+r[0].length,a++;return o(e.slice(c)),n.join("");function o(e){n.push(t(e,a,!e))}}function p(e,t){return e-t}function g(e,t){const n=/\\(?=[!-/:-@[-`{-~])/g,r=[],c=[],a=e+t;let o,i=-1,s=0;for(;o=n.exec(a);)r.push(o.index);for(;++i<r.length;)s!==r[i]&&c.push(e.slice(s,r[i])),c.push("\\"),s=r[i];return c.push(e.slice(s)),c.join("")}function C(e){const t=e||{},n=t.now||{};let r=t.lineShift||0,c=n.line||1,a=n.column||1;return{move:function(e){const t=e||"",n=t.split(/\r?\n|\r/g),o=n[n.length-1];return c+=n.length-1,a=1===n.length?a+o.length:1+o.length+r,t},current:function(){return{now:{line:c,column:a},lineShift:r}},shift:function(e){r+=e}}}function b(n,c){const a=c||{},i={associationId:h,containerPhrasing:y,containerFlow:v,createTracker:C,compilePattern:u,enter:function(e){return i.stack.push(e),function(){i.stack.pop()}},handlers:{...t.handle},handle:void 0,indentLines:d,indexStack:[],join:[...o],options:{},safe:m,stack:[],unsafe:[...s]};r(i,a),i.options.tightDefinitions&&i.join.push(A),i.handle=e.zwitch("type",{invalid:k,unknown:x,handlers:i.handlers});let f=i.handle(n,void 0,i,{before:"\n",after:"\n",now:{line:1,column:1},lineShift:0});return f&&10!==f.charCodeAt(f.length-1)&&13!==f.charCodeAt(f.length-1)&&(f+="\n"),f}function k(e){throw new Error("Cannot handle value `"+e+"`, expected node")}function x(e){throw new Error("Cannot handle unknown node `"+e.type+"`")}function A(e,t){if("definition"===e.type&&e.type===t.type)return 0}function y(e,n){return function(e,n,r){const c=n.indexStack,a=e.children||[],o=[];let i,s=-1,h=r.before;c.push(-1);let u=n.createTracker(r);for(;++s<a.length;){const f=a[s];let l;if(c[c.length-1]=s,s+1<a.length){let t=n.handle.handlers[a[s+1].type];t&&t.peek&&(t=t.peek),l=t?t(a[s+1],e,n,{before:"",after:"",...u.current()}).charAt(0):""}else l=r.after;o.length>0&&("\r"===h||"\n"===h)&&"html"===f.type&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),h=" ",u=n.createTracker(r),u.move(o.join("")));let d=n.handle(f,e,n,{...u.current(),after:l,before:h});i&&i===d.slice(0,1)&&(d=t.encodeCharacterReference(i.charCodeAt(0))+d.slice(1));const p=n.attentionEncodeSurroundingInfo;n.attentionEncodeSurroundingInfo=void 0,i=void 0,p&&(o.length>0&&p.before&&h===o[o.length-1].slice(-1)&&(o[o.length-1]=o[o.length-1].slice(0,-1)+t.encodeCharacterReference(h.charCodeAt(0))),p.after&&(i=l)),u.move(d),o.push(d),h=d.slice(-1)}return c.pop(),o.join("")}(e,this,n)}function v(e,t){return function(e,t,n){const r=t.indexStack,c=e.children||[],a=t.createTracker(n),o=[];let i=-1;for(r.push(-1);++i<c.length;){const n=c[i];r[r.length-1]=i,o.push(a.move(t.handle(n,e,t,{before:"\n",after:"\n",...a.current()}))),"list"!==n.type&&(t.bulletLastUsed=void 0),i<c.length-1&&o.push(a.move(f(n,c[i+1],e,t)))}return r.pop(),o.join("")}(e,this,t)}function m(e,n){return function(e,n,r){const c=(r.before||"")+(n||"")+(r.after||""),a=[],o=[],i={};let s=-1;for(;++s<e.unsafe.length;){const n=e.unsafe[s];if(!t.patternInScope(e.stack,n))continue;const r=e.compilePattern(n);let o;for(;o=r.exec(c);){const e="before"in n||Boolean(n.atBreak),t="after"in n,r=o.index+(e?o[1].length:0);a.includes(r)?(i[r].before&&!e&&(i[r].before=!1),i[r].after&&!t&&(i[r].after=!1)):(a.push(r),i[r]={before:e,after:t})}}a.sort(p);let h=r.before?r.before.length:0;const u=c.length-(r.after?r.after.length:0);for(s=-1;++s<a.length;){const e=a[s];e<h||e>=u||e+1<u&&a[s+1]===e+1&&i[e].after&&!i[e+1].before&&!i[e+1].after||a[s-1]===e-1&&i[e].before&&!i[e-1].before&&!i[e-1].after||(h!==e&&o.push(g(c.slice(h,e),"\\")),h=e,!/[!-/:-@[-`{-~]/.test(c.charAt(e))||r.encode&&r.encode.includes(c.charAt(e))?(o.push(t.encodeCharacterReference(c.charCodeAt(e))),h++):o.push("\\"))}return o.push(g(c.slice(h,u),r.after)),o.join("")}(this,e,n)}exports.default=function(e){const t=this;t.compiler=function(n){return b(n,{...t.data("settings"),...e,extensions:t.data("toMarkdownExtensions")||[]})}};
|
|
@@ -1276,7 +1276,7 @@ const allAgentList = agentList;
|
|
|
1276
1276
|
const getAgentList = async (type = "app") => {
|
|
1277
1277
|
let preApi = location.hostname === "localhost" ? "http://111.6.44.42:30001" : location.origin;
|
|
1278
1278
|
let baseApi = `${preApi}/prod-api/system/apps/list?pageNum=1&pageSize=100&type=${type}`;
|
|
1279
|
-
let token = "eyJhbGciOiJIUzUxMiJ9.
|
|
1279
|
+
let token = "eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0XzIiLCJsb2dpbl91c2VyX2tleSI6IjIxMmU2N2U4LTE5ZGUtNDEyMy04Njg2LWQ5YjRiNDQ3ZmYzNCJ9.o9CsOJZ9UDtyP9u4i3cLUcuka1_RPAB7oLE6wMC2plG7FEzqAVfhO4iiGX4LQUmNC506eyuZP6gqrkP_bFTPsQ";
|
|
1280
1280
|
try {
|
|
1281
1281
|
const cacheData = localStorage.getItem("agentWebCache");
|
|
1282
1282
|
console.log("cacheData", cacheData);
|
|
@@ -44830,7 +44830,7 @@ const FORM_CONFIGS = {
|
|
|
44830
44830
|
4: {
|
|
44831
44831
|
id: 4,
|
|
44832
44832
|
name: "提刑官-尸检生成报告表单",
|
|
44833
|
-
description: "
|
|
44833
|
+
description: "包含鉴定事项确认书、医疗检验报告",
|
|
44834
44834
|
component: AutopsyForm,
|
|
44835
44835
|
buildRequestBody: ({ formData, tipMessage, lastUserChatContent, conversationId, currentSession }) => {
|
|
44836
44836
|
const autopsyData = formData;
|
|
@@ -44858,9 +44858,10 @@ const FORM_CONFIGS = {
|
|
|
44858
44858
|
files: [],
|
|
44859
44859
|
inputs: {
|
|
44860
44860
|
confirmation: confirmationFiles.map((fileId) => {
|
|
44861
|
-
fileNamesMap[fileId] || "";
|
|
44861
|
+
const fileName = fileNamesMap[fileId] || "";
|
|
44862
|
+
const fileType = fileName && isImageFile(fileName) ? "image" : "document";
|
|
44862
44863
|
return {
|
|
44863
|
-
type:
|
|
44864
|
+
type: fileType,
|
|
44864
44865
|
transfer_method: "local_file",
|
|
44865
44866
|
url: "",
|
|
44866
44867
|
upload_file_id: fileId
|
|
@@ -46197,89 +46198,141 @@ function CommentIndex({
|
|
|
46197
46198
|
if (findIndex < 0) return chatList;
|
|
46198
46199
|
const currentMessage = chatList[findIndex];
|
|
46199
46200
|
const newChatList = [...chatList];
|
|
46201
|
+
const normalizeFileType = (type, fileName = "") => {
|
|
46202
|
+
if (type === "document" || type === "image") {
|
|
46203
|
+
return type;
|
|
46204
|
+
}
|
|
46205
|
+
const isImageFile = (name2) => {
|
|
46206
|
+
const imageExtensions = [
|
|
46207
|
+
"jpg",
|
|
46208
|
+
"jpeg",
|
|
46209
|
+
"png",
|
|
46210
|
+
"gif",
|
|
46211
|
+
"bmp",
|
|
46212
|
+
"webp",
|
|
46213
|
+
"svg",
|
|
46214
|
+
"ico",
|
|
46215
|
+
"JPG",
|
|
46216
|
+
"JPEG",
|
|
46217
|
+
"PNG",
|
|
46218
|
+
"GIF",
|
|
46219
|
+
"BMP",
|
|
46220
|
+
"WEBP",
|
|
46221
|
+
"SVG",
|
|
46222
|
+
"ICO"
|
|
46223
|
+
];
|
|
46224
|
+
const ext = name2.split(".").pop() || "";
|
|
46225
|
+
return imageExtensions.includes(ext);
|
|
46226
|
+
};
|
|
46227
|
+
return fileName && isImageFile(fileName) ? "image" : "document";
|
|
46228
|
+
};
|
|
46200
46229
|
let references = [];
|
|
46201
46230
|
if (((_a5 = parsed.metadata) == null ? void 0 : _a5.retriever_resources) && Array.isArray(parsed.metadata.retriever_resources)) {
|
|
46202
|
-
references = parsed.metadata.retriever_resources.map((resource) =>
|
|
46203
|
-
|
|
46204
|
-
|
|
46205
|
-
|
|
46206
|
-
|
|
46207
|
-
|
|
46208
|
-
|
|
46209
|
-
|
|
46210
|
-
|
|
46211
|
-
|
|
46212
|
-
|
|
46213
|
-
|
|
46214
|
-
|
|
46215
|
-
|
|
46216
|
-
|
|
46217
|
-
|
|
46231
|
+
references = parsed.metadata.retriever_resources.map((resource) => {
|
|
46232
|
+
const fileName = resource.document_name || resource.name || resource.title || "";
|
|
46233
|
+
const rawType = resource.data_source_type || resource.type;
|
|
46234
|
+
return {
|
|
46235
|
+
id: resource.document_id || resource.id,
|
|
46236
|
+
name: fileName || "未知文档",
|
|
46237
|
+
type: normalizeFileType(rawType, fileName),
|
|
46238
|
+
url: resource.url || resource.document_url,
|
|
46239
|
+
content: resource.content || resource.text || resource.segment_content,
|
|
46240
|
+
word_count: resource.word_count,
|
|
46241
|
+
hit_count: resource.hit_count,
|
|
46242
|
+
index_node_hash: resource.index_node_hash,
|
|
46243
|
+
score: resource.score,
|
|
46244
|
+
position: resource.position,
|
|
46245
|
+
segment_position: resource.segment_position,
|
|
46246
|
+
dataset_id: resource.dataset_id,
|
|
46247
|
+
dataset_name: resource.dataset_name,
|
|
46248
|
+
segment_id: resource.segment_id
|
|
46249
|
+
};
|
|
46250
|
+
});
|
|
46218
46251
|
} else if (((_c = (_b3 = parsed.message) == null ? void 0 : _b3.metadata) == null ? void 0 : _c.retriever_resources) && Array.isArray(parsed.message.metadata.retriever_resources)) {
|
|
46219
|
-
references = parsed.message.metadata.retriever_resources.map((resource) =>
|
|
46220
|
-
|
|
46221
|
-
|
|
46222
|
-
|
|
46223
|
-
|
|
46224
|
-
|
|
46225
|
-
|
|
46226
|
-
|
|
46227
|
-
|
|
46228
|
-
|
|
46229
|
-
|
|
46230
|
-
|
|
46231
|
-
|
|
46232
|
-
|
|
46233
|
-
|
|
46234
|
-
|
|
46252
|
+
references = parsed.message.metadata.retriever_resources.map((resource) => {
|
|
46253
|
+
const fileName = resource.document_name || resource.name || resource.title || "";
|
|
46254
|
+
const rawType = resource.data_source_type || resource.type;
|
|
46255
|
+
return {
|
|
46256
|
+
id: resource.document_id || resource.id,
|
|
46257
|
+
name: fileName || "未知文档",
|
|
46258
|
+
type: normalizeFileType(rawType, fileName),
|
|
46259
|
+
url: resource.url || resource.document_url,
|
|
46260
|
+
content: resource.content || resource.text || resource.segment_content,
|
|
46261
|
+
word_count: resource.word_count,
|
|
46262
|
+
hit_count: resource.hit_count,
|
|
46263
|
+
index_node_hash: resource.index_node_hash,
|
|
46264
|
+
score: resource.score,
|
|
46265
|
+
position: resource.position,
|
|
46266
|
+
segment_position: resource.segment_position,
|
|
46267
|
+
dataset_id: resource.dataset_id,
|
|
46268
|
+
dataset_name: resource.dataset_name,
|
|
46269
|
+
segment_id: resource.segment_id
|
|
46270
|
+
};
|
|
46271
|
+
});
|
|
46235
46272
|
} else if ((_d = parsed.message) == null ? void 0 : _d.retriever_resources) {
|
|
46236
|
-
references = parsed.message.retriever_resources.map((resource) =>
|
|
46237
|
-
|
|
46238
|
-
|
|
46239
|
-
|
|
46240
|
-
|
|
46241
|
-
|
|
46242
|
-
|
|
46243
|
-
|
|
46244
|
-
|
|
46245
|
-
|
|
46246
|
-
|
|
46247
|
-
|
|
46248
|
-
|
|
46249
|
-
|
|
46250
|
-
|
|
46251
|
-
|
|
46273
|
+
references = parsed.message.retriever_resources.map((resource) => {
|
|
46274
|
+
const fileName = resource.document_name || resource.name || resource.title || "";
|
|
46275
|
+
const rawType = resource.data_source_type || resource.type;
|
|
46276
|
+
return {
|
|
46277
|
+
id: resource.document_id || resource.id,
|
|
46278
|
+
name: fileName || "未知文档",
|
|
46279
|
+
type: normalizeFileType(rawType, fileName),
|
|
46280
|
+
url: resource.url || resource.document_url,
|
|
46281
|
+
content: resource.content || resource.text || resource.segment_content,
|
|
46282
|
+
word_count: resource.word_count,
|
|
46283
|
+
hit_count: resource.hit_count,
|
|
46284
|
+
index_node_hash: resource.index_node_hash,
|
|
46285
|
+
score: resource.score,
|
|
46286
|
+
position: resource.position,
|
|
46287
|
+
segment_position: resource.segment_position,
|
|
46288
|
+
dataset_id: resource.dataset_id,
|
|
46289
|
+
dataset_name: resource.dataset_name,
|
|
46290
|
+
segment_id: resource.segment_id
|
|
46291
|
+
};
|
|
46292
|
+
});
|
|
46252
46293
|
} else if ((_e = parsed.message) == null ? void 0 : _e.files) {
|
|
46253
|
-
references = parsed.message.files.map((file) =>
|
|
46254
|
-
|
|
46255
|
-
|
|
46256
|
-
|
|
46257
|
-
|
|
46258
|
-
|
|
46294
|
+
references = parsed.message.files.map((file) => {
|
|
46295
|
+
const fileName = file.name || file.file_name || "";
|
|
46296
|
+
const rawType = file.type;
|
|
46297
|
+
return {
|
|
46298
|
+
id: file.id || file.file_id,
|
|
46299
|
+
name: fileName || "未知文件",
|
|
46300
|
+
type: normalizeFileType(rawType, fileName),
|
|
46301
|
+
url: file.url || file.file_url
|
|
46302
|
+
};
|
|
46303
|
+
});
|
|
46259
46304
|
} else if (parsed.retriever_resources) {
|
|
46260
|
-
references = parsed.retriever_resources.map((resource) =>
|
|
46261
|
-
|
|
46262
|
-
|
|
46263
|
-
|
|
46264
|
-
|
|
46265
|
-
|
|
46266
|
-
|
|
46267
|
-
|
|
46268
|
-
|
|
46269
|
-
|
|
46270
|
-
|
|
46271
|
-
|
|
46272
|
-
|
|
46273
|
-
|
|
46274
|
-
|
|
46275
|
-
|
|
46305
|
+
references = parsed.retriever_resources.map((resource) => {
|
|
46306
|
+
const fileName = resource.document_name || resource.name || resource.title || "";
|
|
46307
|
+
const rawType = resource.data_source_type || resource.type;
|
|
46308
|
+
return {
|
|
46309
|
+
id: resource.document_id || resource.id,
|
|
46310
|
+
name: fileName || "未知文档",
|
|
46311
|
+
type: normalizeFileType(rawType, fileName),
|
|
46312
|
+
url: resource.url || resource.document_url,
|
|
46313
|
+
content: resource.content || resource.text || resource.segment_content,
|
|
46314
|
+
word_count: resource.word_count,
|
|
46315
|
+
hit_count: resource.hit_count,
|
|
46316
|
+
index_node_hash: resource.index_node_hash,
|
|
46317
|
+
score: resource.score,
|
|
46318
|
+
position: resource.position,
|
|
46319
|
+
segment_position: resource.segment_position,
|
|
46320
|
+
dataset_id: resource.dataset_id,
|
|
46321
|
+
dataset_name: resource.dataset_name,
|
|
46322
|
+
segment_id: resource.segment_id
|
|
46323
|
+
};
|
|
46324
|
+
});
|
|
46276
46325
|
} else if (parsed.files) {
|
|
46277
|
-
references = parsed.files.map((file) =>
|
|
46278
|
-
|
|
46279
|
-
|
|
46280
|
-
|
|
46281
|
-
|
|
46282
|
-
|
|
46326
|
+
references = parsed.files.map((file) => {
|
|
46327
|
+
const fileName = file.name || file.file_name || "";
|
|
46328
|
+
const rawType = file.type;
|
|
46329
|
+
return {
|
|
46330
|
+
id: file.id || file.file_id,
|
|
46331
|
+
name: fileName || "未知文件",
|
|
46332
|
+
type: normalizeFileType(rawType, fileName),
|
|
46333
|
+
url: file.url || file.file_url
|
|
46334
|
+
};
|
|
46335
|
+
});
|
|
46283
46336
|
}
|
|
46284
46337
|
if (references.length > 0) {
|
|
46285
46338
|
console.log("解析到引用文献:", references);
|
|
@@ -48493,7 +48546,7 @@ const BlockEdit = ({
|
|
|
48493
48546
|
const initVueEditor = async () => {
|
|
48494
48547
|
if (editorRef.current) {
|
|
48495
48548
|
try {
|
|
48496
|
-
const BlockNoteEditorModule = await import("./index.es-
|
|
48549
|
+
const BlockNoteEditorModule = await import("./index.es-CMGIRK4t.js");
|
|
48497
48550
|
const BlockNoteEditor = BlockNoteEditorModule.BlockNoteEditor;
|
|
48498
48551
|
const theme = {
|
|
48499
48552
|
colors: {
|
|
@@ -49356,7 +49409,7 @@ const AiBlockEdit = ({
|
|
|
49356
49409
|
const initVueEditor = async () => {
|
|
49357
49410
|
if (editorRef.current) {
|
|
49358
49411
|
try {
|
|
49359
|
-
const BlockNoteEditorModule = await import("./index.es-
|
|
49412
|
+
const BlockNoteEditorModule = await import("./index.es-CMGIRK4t.js");
|
|
49360
49413
|
const BlockNoteEditor = BlockNoteEditorModule.BlockNoteEditor;
|
|
49361
49414
|
const theme = {
|
|
49362
49415
|
colors: {
|
|
@@ -50276,7 +50329,7 @@ class BasePromptTemplate extends Runnable {
|
|
|
50276
50329
|
return PromptTemplate2.deserialize({ ...data, _type: "prompt" });
|
|
50277
50330
|
}
|
|
50278
50331
|
case "few_shot": {
|
|
50279
|
-
const { FewShotPromptTemplate } = await import("./few_shot-
|
|
50332
|
+
const { FewShotPromptTemplate } = await import("./few_shot-C7wme246.js");
|
|
50280
50333
|
return FewShotPromptTemplate.deserialize(data);
|
|
50281
50334
|
}
|
|
50282
50335
|
default:
|
|
@@ -51848,35 +51901,35 @@ class BaseChain extends BaseLangChain {
|
|
|
51848
51901
|
static async deserialize(data, values = {}) {
|
|
51849
51902
|
switch (data._type) {
|
|
51850
51903
|
case "llm_chain": {
|
|
51851
|
-
const { LLMChain } = await import("./llm_chain-
|
|
51904
|
+
const { LLMChain } = await import("./llm_chain-DotVPF7M.js");
|
|
51852
51905
|
return LLMChain.deserialize(data);
|
|
51853
51906
|
}
|
|
51854
51907
|
case "sequential_chain": {
|
|
51855
|
-
const { SequentialChain } = await import("./sequential_chain-
|
|
51908
|
+
const { SequentialChain } = await import("./sequential_chain-Ctx-2nEf.js");
|
|
51856
51909
|
return SequentialChain.deserialize(data);
|
|
51857
51910
|
}
|
|
51858
51911
|
case "simple_sequential_chain": {
|
|
51859
|
-
const { SimpleSequentialChain } = await import("./sequential_chain-
|
|
51912
|
+
const { SimpleSequentialChain } = await import("./sequential_chain-Ctx-2nEf.js");
|
|
51860
51913
|
return SimpleSequentialChain.deserialize(data);
|
|
51861
51914
|
}
|
|
51862
51915
|
case "stuff_documents_chain": {
|
|
51863
|
-
const { StuffDocumentsChain } = await import("./combine_docs_chain-
|
|
51916
|
+
const { StuffDocumentsChain } = await import("./combine_docs_chain-BvsfAIEV.js");
|
|
51864
51917
|
return StuffDocumentsChain.deserialize(data);
|
|
51865
51918
|
}
|
|
51866
51919
|
case "map_reduce_documents_chain": {
|
|
51867
|
-
const { MapReduceDocumentsChain } = await import("./combine_docs_chain-
|
|
51920
|
+
const { MapReduceDocumentsChain } = await import("./combine_docs_chain-BvsfAIEV.js");
|
|
51868
51921
|
return MapReduceDocumentsChain.deserialize(data);
|
|
51869
51922
|
}
|
|
51870
51923
|
case "refine_documents_chain": {
|
|
51871
|
-
const { RefineDocumentsChain } = await import("./combine_docs_chain-
|
|
51924
|
+
const { RefineDocumentsChain } = await import("./combine_docs_chain-BvsfAIEV.js");
|
|
51872
51925
|
return RefineDocumentsChain.deserialize(data);
|
|
51873
51926
|
}
|
|
51874
51927
|
case "vector_db_qa": {
|
|
51875
|
-
const { VectorDBQAChain } = await import("./vector_db_qa-
|
|
51928
|
+
const { VectorDBQAChain } = await import("./vector_db_qa-Cq_CyJ5A.js");
|
|
51876
51929
|
return VectorDBQAChain.deserialize(data, values);
|
|
51877
51930
|
}
|
|
51878
51931
|
case "api_chain": {
|
|
51879
|
-
const { APIChain } = await import("./api_chain-
|
|
51932
|
+
const { APIChain } = await import("./api_chain-DxmtjGZR.js");
|
|
51880
51933
|
return APIChain.deserialize(data);
|
|
51881
51934
|
}
|
|
51882
51935
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-C755WiyV.cjs");exports.default=e.remarkParse;
|