valaxy 0.22.11 → 0.22.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,4 +1,4 @@
1
- import { isClient } from '@vueuse/core'
1
+ import { useEventListener } from '@vueuse/core'
2
2
  import { onContentUpdated } from 'valaxy'
3
3
 
4
4
  export function useCodeGroups() {
@@ -13,40 +13,37 @@ export function useCodeGroups() {
13
13
  })
14
14
  }
15
15
 
16
- if (isClient) {
17
- window.addEventListener('click', (e) => {
18
- const el = e.target as HTMLInputElement
19
-
20
- if (el.matches('.vp-code-group input')) {
21
- // input <- .tabs <- .vp-code-group
22
- const group = el.parentElement?.parentElement
23
- if (!group)
24
- return
25
-
26
- const i = Array.from(group.querySelectorAll('input')).indexOf(el)
27
- if (i < 0)
28
- return
29
-
30
- const blocks = group.querySelector('.blocks')
31
- if (!blocks)
32
- return
33
-
34
- const current = Array.from(blocks.children).find(child =>
35
- child.classList.contains('active'),
36
- )
37
- if (!current)
38
- return
39
-
40
- const next = blocks.children[i]
41
- if (!next || current === next)
42
- return
43
-
44
- current.classList.remove('active')
45
- next.classList.add('active')
46
-
47
- const label = group?.querySelector(`label[for="${el.id}"]`)
48
- label?.scrollIntoView({ block: 'nearest' })
49
- }
50
- })
51
- }
16
+ useEventListener('click', (e) => {
17
+ const el = e.target as HTMLInputElement
18
+ if (el.matches('.vp-code-group input')) {
19
+ // input <- .tabs <- .vp-code-group
20
+ const group = el.parentElement?.parentElement
21
+ if (!group)
22
+ return
23
+
24
+ const i = Array.from(group.querySelectorAll('input')).indexOf(el)
25
+ if (i < 0)
26
+ return
27
+
28
+ const blocks = group.querySelector('.blocks')
29
+ if (!blocks)
30
+ return
31
+
32
+ const current = Array.from(blocks.children).find(child =>
33
+ child.classList.contains('active'),
34
+ )
35
+ if (!current)
36
+ return
37
+
38
+ const next = blocks.children[i]
39
+ if (!next || current === next)
40
+ return
41
+
42
+ current.classList.remove('active')
43
+ next.classList.add('active')
44
+
45
+ const label = group?.querySelector(`label[for="${el.id}"]`)
46
+ label?.scrollIntoView({ block: 'nearest' })
47
+ }
48
+ })
52
49
  }
@@ -1,41 +1,53 @@
1
- import { isClient } from '@vueuse/core'
1
+ import { useEventListener } from '@vueuse/core'
2
2
  import { useFrontmatter, useSiteConfig } from 'valaxy'
3
3
  import { onMounted } from 'vue'
4
4
 
5
+ /**
6
+ * 获取未渲染元素的高度
7
+ */
8
+ function getHeightViaClone(el: HTMLElement) {
9
+ const clone = el.cloneNode(true) as HTMLElement
10
+ clone.style.cssText = `
11
+ position: absolute;
12
+ visibility: hidden;
13
+ display: block;
14
+ left: -9999px;
15
+ `
16
+ document.body.appendChild(clone)
17
+ const height = clone.scrollHeight
18
+ document.body.removeChild(clone)
19
+ return height
20
+ }
21
+
22
+ /**
23
+ * 折叠代码块(允许设置最大高度)
24
+ *
25
+ * - 通过设置 `codeHeightLimit` 来限制代码块的高度
26
+ */
5
27
  export function useCollapseCode() {
6
28
  const config = useSiteConfig()
7
29
  const frontmatter = useFrontmatter()
8
30
 
9
- if (isClient) {
10
- window.addEventListener('click', (e) => {
11
- const el = e.target as HTMLElement
12
- if (el.matches('[class*="language-"] > button.collapse')) {
13
- const parent = el.parentElement
14
- parent?.removeAttribute('style')
15
- parent?.classList.remove('folded')
16
- }
17
- })
31
+ const codeHeightLimit = frontmatter.value.codeHeightLimit || config.value.codeHeightLimit
32
+ if (typeof codeHeightLimit !== 'number' || codeHeightLimit <= 0) {
33
+ return
18
34
  }
19
35
 
36
+ useEventListener('click', (e) => {
37
+ const el = e.target as HTMLElement
38
+ if (el.matches('[class*="language-"] > button.collapse')) {
39
+ const parent = el.parentElement
40
+ parent?.removeAttribute('style')
41
+ parent?.classList.remove('folded')
42
+ }
43
+ })
44
+
20
45
  // determine whether to add folded class name
21
46
  onMounted(() => {
22
47
  const els = document.querySelectorAll('div[class*="language-"]')
23
- const siteConfigLimit = config.value.codeHeightLimit
24
- const frontmatterLimit = frontmatter.value.codeHeightLimit
25
- let codeHeightLimit: number
26
-
27
- if (typeof frontmatterLimit !== 'number' || frontmatterLimit <= 0) {
28
- if (siteConfigLimit === undefined || siteConfigLimit <= 0)
29
- return
30
- else
31
- codeHeightLimit = siteConfigLimit
32
- }
33
- else {
34
- codeHeightLimit = frontmatterLimit
35
- }
36
-
37
48
  for (const el of Array.from(els)) {
38
- if (el.scrollHeight > codeHeightLimit)
49
+ const elHeight = getHeightViaClone(el as HTMLElement)
50
+ if (elHeight > codeHeightLimit)
39
51
  el.classList.add('folded')
40
52
  }
41
53
  })
@@ -9,8 +9,8 @@ export function useMediumZoom() {
9
9
  const siteConfig = useSiteConfig()
10
10
  const mediumZoomConfig = siteConfig.value.mediumZoom
11
11
 
12
- onMounted(() => {
13
- if (mediumZoomConfig.enable) {
12
+ if (mediumZoomConfig.enable) {
13
+ onMounted(() => {
14
14
  mediumZoom(
15
15
  mediumZoomConfig.selector || '.markdown-body img',
16
16
  {
@@ -18,6 +18,6 @@ export function useMediumZoom() {
18
18
  ...mediumZoomConfig.options,
19
19
  },
20
20
  )
21
- }
22
- })
21
+ })
22
+ }
23
23
  }
@@ -7,7 +7,7 @@ import{a as ga}from"./chunk-2TIFAWAJ.js";import{a as U,b,c as ee,e as u}from"./c
7
7
  `?"":o};K.drawBorderTop=qb;var Gb=(e,t)=>{let{border:r}=t;return(0,K.drawBorder)(e,{...t,separator:{body:r.joinBody,bodyJoinInner:r.bodyJoin,bodyJoinOuter:r.bodyLeft,join:r.joinJoin,joinDown:r.joinMiddleDown,joinLeft:r.joinMiddleLeft,joinRight:r.joinMiddleRight,joinUp:r.joinMiddleUp,left:r.joinLeft,right:r.joinRight}})};K.drawBorderJoin=Gb;var Wb=(e,t)=>{let{border:r}=t;return(0,K.drawBorder)(e,{...t,separator:{body:r.bottomBody,join:r.bottomJoin,left:r.bottomLeft,right:r.bottomRight}})};K.drawBorderBottom=Wb;var Ub=(e,t)=>(r,o)=>{let i={...t,horizontalBorderIndex:r};return r===0?(0,K.drawBorderTop)(e,i):r===o?(0,K.drawBorderBottom)(e,i):(0,K.drawBorderJoin)(e,i)};K.createTableBorderGetter=Ub});var _s=b(bn=>{"use strict";u();Object.defineProperty(bn,"__esModule",{value:!0});bn.drawRow=void 0;var zb=Dn(),Jb=(e,t)=>{let{border:r,drawVerticalLine:o,rowIndex:i,spanningCellManager:n}=t;return(0,zb.drawContent)({contents:e,drawSeparator:o,elementType:"cell",rowIndex:i,separatorGetter:(s,a)=>s===0?r.bodyLeft:s===a?r.bodyRight:r.bodyJoin,spanningCellManager:n})+`
8
8
  `};bn.drawRow=Jb});var Rf=b((tP,Sf)=>{"use strict";u();Sf.exports=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,i,n;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(i=o;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(n=Object.keys(t),o=n.length,o!==Object.keys(r).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,n[i]))return!1;for(i=o;i--!==0;){var s=n[i];if(!e(t[s],r[s]))return!1}return!0}return t!==t&&r!==r}});var kf=b(vs=>{"use strict";u();Object.defineProperty(vs,"__esModule",{value:!0});var Ef=Rf();Ef.code='require("ajv/dist/runtime/equal").default';vs.default=Ef});var $f=b(xs=>{"use strict";u();xs["config.json"]=Tf;var Kb={$id:"config.json",$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{border:{$ref:"shared.json#/definitions/borders"},header:{type:"object",properties:{content:{type:"string"},alignment:{$ref:"shared.json#/definitions/alignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}},required:["content"],additionalProperties:!1},columns:{$ref:"shared.json#/definitions/columns"},columnDefault:{$ref:"shared.json#/definitions/column"},drawVerticalLine:{typeof:"function"},drawHorizontalLine:{typeof:"function"},singleLine:{typeof:"boolean"},spanningCells:{type:"array",items:{type:"object",properties:{col:{type:"integer",minimum:0},row:{type:"integer",minimum:0},colSpan:{type:"integer",minimum:1},rowSpan:{type:"integer",minimum:1},alignment:{$ref:"shared.json#/definitions/alignment"},verticalAlignment:{$ref:"shared.json#/definitions/verticalAlignment"},wrapWord:{type:"boolean"},truncate:{type:"integer"},paddingLeft:{type:"integer"},paddingRight:{type:"integer"}},required:["row","col"],additionalProperties:!1}}},additionalProperties:!1},Af={type:"object",properties:{topBody:{$ref:"#/definitions/border"},topJoin:{$ref:"#/definitions/border"},topLeft:{$ref:"#/definitions/border"},topRight:{$ref:"#/definitions/border"},bottomBody:{$ref:"#/definitions/border"},bottomJoin:{$ref:"#/definitions/border"},bottomLeft:{$ref:"#/definitions/border"},bottomRight:{$ref:"#/definitions/border"},bodyLeft:{$ref:"#/definitions/border"},bodyRight:{$ref:"#/definitions/border"},bodyJoin:{$ref:"#/definitions/border"},headerJoin:{$ref:"#/definitions/border"},joinBody:{$ref:"#/definitions/border"},joinLeft:{$ref:"#/definitions/border"},joinRight:{$ref:"#/definitions/border"},joinJoin:{$ref:"#/definitions/border"},joinMiddleUp:{$ref:"#/definitions/border"},joinMiddleDown:{$ref:"#/definitions/border"},joinMiddleLeft:{$ref:"#/definitions/border"},joinMiddleRight:{$ref:"#/definitions/border"}},additionalProperties:!1},ws=Object.prototype.hasOwnProperty;function C(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(typeof e!="string"){let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};n===null?n=[a]:n.push(a),s++}return C.errors=n,s===0}function Cn(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let a in e)if(!ws.call(Af.properties,a)){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}e.topBody!==void 0&&(C(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.topJoin!==void 0&&(C(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.topLeft!==void 0&&(C(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.topRight!==void 0&&(C(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomBody!==void 0&&(C(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomJoin!==void 0&&(C(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomLeft!==void 0&&(C(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomRight!==void 0&&(C(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bodyLeft!==void 0&&(C(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bodyRight!==void 0&&(C(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bodyJoin!==void 0&&(C(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.headerJoin!==void 0&&(C(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinBody!==void 0&&(C(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinLeft!==void 0&&(C(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinRight!==void 0&&(C(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinJoin!==void 0&&(C(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleUp!==void 0&&(C(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleDown!==void 0&&(C(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleLeft!==void 0&&(C(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleRight!==void 0&&(C(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length))}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return Cn.errors=n,s===0}var Pf={type:"string",enum:["left","right","center","justify"]},iP=kf().default;function ft(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(typeof e!="string"){let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};n===null?n=[a]:n.push(a),s++}if(!(e==="left"||e==="right"||e==="center"||e==="justify")){let a={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:Pf.enum},message:"must be equal to one of the allowed values"};n===null?n=[a]:n.push(a),s++}return ft.errors=n,s===0}var En=new RegExp("^[0-9]+$","u");function Fe(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(typeof e!="string"){let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};n===null?n=[a]:n.push(a),s++}if(!(e==="left"||e==="right"||e==="center"||e==="justify")){let a={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:Pf.enum},message:"must be equal to one of the allowed values"};n===null?n=[a]:n.push(a),s++}return Fe.errors=n,s===0}var Ff={type:"string",enum:["top","middle","bottom"]};function Te(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(typeof e!="string"){let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};n===null?n=[a]:n.push(a),s++}if(!(e==="top"||e==="middle"||e==="bottom")){let a={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:Ff.enum},message:"must be equal to one of the allowed values"};n===null?n=[a]:n.push(a),s++}return Te.errors=n,s===0}function de(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let a in e)if(!(a==="alignment"||a==="verticalAlignment"||a==="width"||a==="wrapWord"||a==="truncate"||a==="paddingLeft"||a==="paddingRight")){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}if(e.alignment!==void 0&&(Fe(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:i})||(n=n===null?Fe.errors:n.concat(Fe.errors),s=n.length)),e.verticalAlignment!==void 0&&(Te(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:i})||(n=n===null?Te.errors:n.concat(Te.errors),s=n.length)),e.width!==void 0){let a=e.width;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}if(typeof a=="number"&&isFinite(a)&&(a<1||isNaN(a))){let l={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};n===null?n=[l]:n.push(l),s++}}if(e.wrapWord!==void 0&&typeof e.wrapWord!="boolean"){let a={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};n===null?n=[a]:n.push(a),s++}if(e.truncate!==void 0){let a=e.truncate;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}if(e.paddingLeft!==void 0){let a=e.paddingLeft;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}if(e.paddingRight!==void 0){let a=e.paddingRight;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return de.errors=n,s===0}function _n(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0,a=s,l=!1,c=null,f=s;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let g in e)if(!En.test(g)){let y={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};n===null?n=[y]:n.push(y),s++}for(let g in e)En.test(g)&&(de(e[g],{instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:g,rootData:i})||(n=n===null?de.errors:n.concat(de.errors),s=n.length))}else{let g={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[g]:n.push(g),s++}var p=f===s;p&&(l=!0,c=0);let d=s;if(Array.isArray(e)){let g=e.length;for(let y=0;y<g;y++)de(e[y],{instancePath:t+"/"+y,parentData:e,parentDataProperty:y,rootData:i})||(n=n===null?de.errors:n.concat(de.errors),s=n.length)}else{let g={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};n===null?n=[g]:n.push(g),s++}var p=d===s;if(p&&l?(l=!1,c=[c,1]):p&&(l=!0,c=1),l)s=a,n!==null&&(a?n.length=a:n=null);else{let g={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};n===null?n=[g]:n.push(g),s++}return _n.errors=n,s===0}function vn(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let a in e)if(!(a==="alignment"||a==="verticalAlignment"||a==="width"||a==="wrapWord"||a==="truncate"||a==="paddingLeft"||a==="paddingRight")){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}if(e.alignment!==void 0&&(Fe(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:i})||(n=n===null?Fe.errors:n.concat(Fe.errors),s=n.length)),e.verticalAlignment!==void 0&&(Te(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:i})||(n=n===null?Te.errors:n.concat(Te.errors),s=n.length)),e.width!==void 0){let a=e.width;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}if(typeof a=="number"&&isFinite(a)&&(a<1||isNaN(a))){let l={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};n===null?n=[l]:n.push(l),s++}}if(e.wrapWord!==void 0&&typeof e.wrapWord!="boolean"){let a={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};n===null?n=[a]:n.push(a),s++}if(e.truncate!==void 0){let a=e.truncate;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}if(e.paddingLeft!==void 0){let a=e.paddingLeft;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}if(e.paddingRight!==void 0){let a=e.paddingRight;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return vn.errors=n,s===0}function wn(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(typeof e!="string"){let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"string"},message:"must be string"};n===null?n=[a]:n.push(a),s++}if(!(e==="top"||e==="middle"||e==="bottom")){let a={instancePath:t,schemaPath:"#/enum",keyword:"enum",params:{allowedValues:Ff.enum},message:"must be equal to one of the allowed values"};n===null?n=[a]:n.push(a),s++}return wn.errors=n,s===0}function Tf(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let a in e)if(!(a==="border"||a==="header"||a==="columns"||a==="columnDefault"||a==="drawVerticalLine"||a==="drawHorizontalLine"||a==="singleLine"||a==="spanningCells")){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}if(e.border!==void 0&&(Cn(e.border,{instancePath:t+"/border",parentData:e,parentDataProperty:"border",rootData:i})||(n=n===null?Cn.errors:n.concat(Cn.errors),s=n.length)),e.header!==void 0){let a=e.header;if(a&&typeof a=="object"&&!Array.isArray(a)){if(a.content===void 0){let l={instancePath:t+"/header",schemaPath:"#/properties/header/required",keyword:"required",params:{missingProperty:"content"},message:"must have required property 'content'"};n===null?n=[l]:n.push(l),s++}for(let l in a)if(!(l==="content"||l==="alignment"||l==="wrapWord"||l==="truncate"||l==="paddingLeft"||l==="paddingRight")){let c={instancePath:t+"/header",schemaPath:"#/properties/header/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:l},message:"must NOT have additional properties"};n===null?n=[c]:n.push(c),s++}if(a.content!==void 0&&typeof a.content!="string"){let l={instancePath:t+"/header/content",schemaPath:"#/properties/header/properties/content/type",keyword:"type",params:{type:"string"},message:"must be string"};n===null?n=[l]:n.push(l),s++}if(a.alignment!==void 0&&(ft(a.alignment,{instancePath:t+"/header/alignment",parentData:a,parentDataProperty:"alignment",rootData:i})||(n=n===null?ft.errors:n.concat(ft.errors),s=n.length)),a.wrapWord!==void 0&&typeof a.wrapWord!="boolean"){let l={instancePath:t+"/header/wrapWord",schemaPath:"#/properties/header/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};n===null?n=[l]:n.push(l),s++}if(a.truncate!==void 0){let l=a.truncate;if(!(typeof l=="number"&&!(l%1)&&!isNaN(l)&&isFinite(l))){let c={instancePath:t+"/header/truncate",schemaPath:"#/properties/header/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[c]:n.push(c),s++}}if(a.paddingLeft!==void 0){let l=a.paddingLeft;if(!(typeof l=="number"&&!(l%1)&&!isNaN(l)&&isFinite(l))){let c={instancePath:t+"/header/paddingLeft",schemaPath:"#/properties/header/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[c]:n.push(c),s++}}if(a.paddingRight!==void 0){let l=a.paddingRight;if(!(typeof l=="number"&&!(l%1)&&!isNaN(l)&&isFinite(l))){let c={instancePath:t+"/header/paddingRight",schemaPath:"#/properties/header/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[c]:n.push(c),s++}}}else{let l={instancePath:t+"/header",schemaPath:"#/properties/header/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[l]:n.push(l),s++}}if(e.columns!==void 0&&(_n(e.columns,{instancePath:t+"/columns",parentData:e,parentDataProperty:"columns",rootData:i})||(n=n===null?_n.errors:n.concat(_n.errors),s=n.length)),e.columnDefault!==void 0&&(vn(e.columnDefault,{instancePath:t+"/columnDefault",parentData:e,parentDataProperty:"columnDefault",rootData:i})||(n=n===null?vn.errors:n.concat(vn.errors),s=n.length)),e.drawVerticalLine!==void 0&&typeof e.drawVerticalLine!="function"){let a={instancePath:t+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};n===null?n=[a]:n.push(a),s++}if(e.drawHorizontalLine!==void 0&&typeof e.drawHorizontalLine!="function"){let a={instancePath:t+"/drawHorizontalLine",schemaPath:"#/properties/drawHorizontalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};n===null?n=[a]:n.push(a),s++}if(e.singleLine!==void 0&&typeof e.singleLine!="boolean"){let a={instancePath:t+"/singleLine",schemaPath:"#/properties/singleLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};n===null?n=[a]:n.push(a),s++}if(e.spanningCells!==void 0){let a=e.spanningCells;if(Array.isArray(a)){let l=a.length;for(let c=0;c<l;c++){let f=a[c];if(f&&typeof f=="object"&&!Array.isArray(f)){if(f.row===void 0){let d={instancePath:t+"/spanningCells/"+c,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"row"},message:"must have required property 'row'"};n===null?n=[d]:n.push(d),s++}if(f.col===void 0){let d={instancePath:t+"/spanningCells/"+c,schemaPath:"#/properties/spanningCells/items/required",keyword:"required",params:{missingProperty:"col"},message:"must have required property 'col'"};n===null?n=[d]:n.push(d),s++}for(let d in f)if(!ws.call(Kb.properties.spanningCells.items.properties,d)){let p={instancePath:t+"/spanningCells/"+c,schemaPath:"#/properties/spanningCells/items/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:d},message:"must NOT have additional properties"};n===null?n=[p]:n.push(p),s++}if(f.col!==void 0){let d=f.col;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}if(typeof d=="number"&&isFinite(d)&&(d<0||isNaN(d))){let p={instancePath:t+"/spanningCells/"+c+"/col",schemaPath:"#/properties/spanningCells/items/properties/col/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};n===null?n=[p]:n.push(p),s++}}if(f.row!==void 0){let d=f.row;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}if(typeof d=="number"&&isFinite(d)&&(d<0||isNaN(d))){let p={instancePath:t+"/spanningCells/"+c+"/row",schemaPath:"#/properties/spanningCells/items/properties/row/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};n===null?n=[p]:n.push(p),s++}}if(f.colSpan!==void 0){let d=f.colSpan;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}if(typeof d=="number"&&isFinite(d)&&(d<1||isNaN(d))){let p={instancePath:t+"/spanningCells/"+c+"/colSpan",schemaPath:"#/properties/spanningCells/items/properties/colSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};n===null?n=[p]:n.push(p),s++}}if(f.rowSpan!==void 0){let d=f.rowSpan;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}if(typeof d=="number"&&isFinite(d)&&(d<1||isNaN(d))){let p={instancePath:t+"/spanningCells/"+c+"/rowSpan",schemaPath:"#/properties/spanningCells/items/properties/rowSpan/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};n===null?n=[p]:n.push(p),s++}}if(f.alignment!==void 0&&(ft(f.alignment,{instancePath:t+"/spanningCells/"+c+"/alignment",parentData:f,parentDataProperty:"alignment",rootData:i})||(n=n===null?ft.errors:n.concat(ft.errors),s=n.length)),f.verticalAlignment!==void 0&&(wn(f.verticalAlignment,{instancePath:t+"/spanningCells/"+c+"/verticalAlignment",parentData:f,parentDataProperty:"verticalAlignment",rootData:i})||(n=n===null?wn.errors:n.concat(wn.errors),s=n.length)),f.wrapWord!==void 0&&typeof f.wrapWord!="boolean"){let d={instancePath:t+"/spanningCells/"+c+"/wrapWord",schemaPath:"#/properties/spanningCells/items/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};n===null?n=[d]:n.push(d),s++}if(f.truncate!==void 0){let d=f.truncate;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/truncate",schemaPath:"#/properties/spanningCells/items/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}}if(f.paddingLeft!==void 0){let d=f.paddingLeft;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/paddingLeft",schemaPath:"#/properties/spanningCells/items/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}}if(f.paddingRight!==void 0){let d=f.paddingRight;if(!(typeof d=="number"&&!(d%1)&&!isNaN(d)&&isFinite(d))){let p={instancePath:t+"/spanningCells/"+c+"/paddingRight",schemaPath:"#/properties/spanningCells/items/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[p]:n.push(p),s++}}}else{let d={instancePath:t+"/spanningCells/"+c,schemaPath:"#/properties/spanningCells/items/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[d]:n.push(d),s++}}}else{let l={instancePath:t+"/spanningCells",schemaPath:"#/properties/spanningCells/type",keyword:"type",params:{type:"array"},message:"must be array"};n===null?n=[l]:n.push(l),s++}}}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return Tf.errors=n,s===0}xs["streamConfig.json"]=Of;function xn(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let a in e)if(!ws.call(Af.properties,a)){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}e.topBody!==void 0&&(C(e.topBody,{instancePath:t+"/topBody",parentData:e,parentDataProperty:"topBody",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.topJoin!==void 0&&(C(e.topJoin,{instancePath:t+"/topJoin",parentData:e,parentDataProperty:"topJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.topLeft!==void 0&&(C(e.topLeft,{instancePath:t+"/topLeft",parentData:e,parentDataProperty:"topLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.topRight!==void 0&&(C(e.topRight,{instancePath:t+"/topRight",parentData:e,parentDataProperty:"topRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomBody!==void 0&&(C(e.bottomBody,{instancePath:t+"/bottomBody",parentData:e,parentDataProperty:"bottomBody",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomJoin!==void 0&&(C(e.bottomJoin,{instancePath:t+"/bottomJoin",parentData:e,parentDataProperty:"bottomJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomLeft!==void 0&&(C(e.bottomLeft,{instancePath:t+"/bottomLeft",parentData:e,parentDataProperty:"bottomLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bottomRight!==void 0&&(C(e.bottomRight,{instancePath:t+"/bottomRight",parentData:e,parentDataProperty:"bottomRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bodyLeft!==void 0&&(C(e.bodyLeft,{instancePath:t+"/bodyLeft",parentData:e,parentDataProperty:"bodyLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bodyRight!==void 0&&(C(e.bodyRight,{instancePath:t+"/bodyRight",parentData:e,parentDataProperty:"bodyRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.bodyJoin!==void 0&&(C(e.bodyJoin,{instancePath:t+"/bodyJoin",parentData:e,parentDataProperty:"bodyJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.headerJoin!==void 0&&(C(e.headerJoin,{instancePath:t+"/headerJoin",parentData:e,parentDataProperty:"headerJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinBody!==void 0&&(C(e.joinBody,{instancePath:t+"/joinBody",parentData:e,parentDataProperty:"joinBody",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinLeft!==void 0&&(C(e.joinLeft,{instancePath:t+"/joinLeft",parentData:e,parentDataProperty:"joinLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinRight!==void 0&&(C(e.joinRight,{instancePath:t+"/joinRight",parentData:e,parentDataProperty:"joinRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinJoin!==void 0&&(C(e.joinJoin,{instancePath:t+"/joinJoin",parentData:e,parentDataProperty:"joinJoin",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleUp!==void 0&&(C(e.joinMiddleUp,{instancePath:t+"/joinMiddleUp",parentData:e,parentDataProperty:"joinMiddleUp",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleDown!==void 0&&(C(e.joinMiddleDown,{instancePath:t+"/joinMiddleDown",parentData:e,parentDataProperty:"joinMiddleDown",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleLeft!==void 0&&(C(e.joinMiddleLeft,{instancePath:t+"/joinMiddleLeft",parentData:e,parentDataProperty:"joinMiddleLeft",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length)),e.joinMiddleRight!==void 0&&(C(e.joinMiddleRight,{instancePath:t+"/joinMiddleRight",parentData:e,parentDataProperty:"joinMiddleRight",rootData:i})||(n=n===null?C.errors:n.concat(C.errors),s=n.length))}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return xn.errors=n,s===0}function Sn(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0,a=s,l=!1,c=null,f=s;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let g in e)if(!En.test(g)){let y={instancePath:t,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:g},message:"must NOT have additional properties"};n===null?n=[y]:n.push(y),s++}for(let g in e)En.test(g)&&(de(e[g],{instancePath:t+"/"+g.replace(/~/g,"~0").replace(/\//g,"~1"),parentData:e,parentDataProperty:g,rootData:i})||(n=n===null?de.errors:n.concat(de.errors),s=n.length))}else{let g={instancePath:t,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[g]:n.push(g),s++}var p=f===s;p&&(l=!0,c=0);let d=s;if(Array.isArray(e)){let g=e.length;for(let y=0;y<g;y++)de(e[y],{instancePath:t+"/"+y,parentData:e,parentDataProperty:y,rootData:i})||(n=n===null?de.errors:n.concat(de.errors),s=n.length)}else{let g={instancePath:t,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type:"array"},message:"must be array"};n===null?n=[g]:n.push(g),s++}var p=d===s;if(p&&l?(l=!1,c=[c,1]):p&&(l=!0,c=1),l)s=a,n!==null&&(a?n.length=a:n=null);else{let g={instancePath:t,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas:c},message:"must match exactly one schema in oneOf"};n===null?n=[g]:n.push(g),s++}return Sn.errors=n,s===0}function Rn(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){for(let a in e)if(!(a==="alignment"||a==="verticalAlignment"||a==="width"||a==="wrapWord"||a==="truncate"||a==="paddingLeft"||a==="paddingRight")){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}if(e.alignment!==void 0&&(Fe(e.alignment,{instancePath:t+"/alignment",parentData:e,parentDataProperty:"alignment",rootData:i})||(n=n===null?Fe.errors:n.concat(Fe.errors),s=n.length)),e.verticalAlignment!==void 0&&(Te(e.verticalAlignment,{instancePath:t+"/verticalAlignment",parentData:e,parentDataProperty:"verticalAlignment",rootData:i})||(n=n===null?Te.errors:n.concat(Te.errors),s=n.length)),e.width!==void 0){let a=e.width;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/width",schemaPath:"#/properties/width/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}if(typeof a=="number"&&isFinite(a)&&(a<1||isNaN(a))){let l={instancePath:t+"/width",schemaPath:"#/properties/width/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};n===null?n=[l]:n.push(l),s++}}if(e.wrapWord!==void 0&&typeof e.wrapWord!="boolean"){let a={instancePath:t+"/wrapWord",schemaPath:"#/properties/wrapWord/type",keyword:"type",params:{type:"boolean"},message:"must be boolean"};n===null?n=[a]:n.push(a),s++}if(e.truncate!==void 0){let a=e.truncate;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/truncate",schemaPath:"#/properties/truncate/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}if(e.paddingLeft!==void 0){let a=e.paddingLeft;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/paddingLeft",schemaPath:"#/properties/paddingLeft/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}if(e.paddingRight!==void 0){let a=e.paddingRight;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/paddingRight",schemaPath:"#/properties/paddingRight/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}}}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return Rn.errors=n,s===0}function Of(e,{instancePath:t="",parentData:r,parentDataProperty:o,rootData:i=e}={}){let n=null,s=0;if(e&&typeof e=="object"&&!Array.isArray(e)){if(e.columnDefault===void 0){let a={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnDefault"},message:"must have required property 'columnDefault'"};n===null?n=[a]:n.push(a),s++}if(e.columnCount===void 0){let a={instancePath:t,schemaPath:"#/required",keyword:"required",params:{missingProperty:"columnCount"},message:"must have required property 'columnCount'"};n===null?n=[a]:n.push(a),s++}for(let a in e)if(!(a==="border"||a==="columns"||a==="columnDefault"||a==="columnCount"||a==="drawVerticalLine")){let l={instancePath:t,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:a},message:"must NOT have additional properties"};n===null?n=[l]:n.push(l),s++}if(e.border!==void 0&&(xn(e.border,{instancePath:t+"/border",parentData:e,parentDataProperty:"border",rootData:i})||(n=n===null?xn.errors:n.concat(xn.errors),s=n.length)),e.columns!==void 0&&(Sn(e.columns,{instancePath:t+"/columns",parentData:e,parentDataProperty:"columns",rootData:i})||(n=n===null?Sn.errors:n.concat(Sn.errors),s=n.length)),e.columnDefault!==void 0&&(Rn(e.columnDefault,{instancePath:t+"/columnDefault",parentData:e,parentDataProperty:"columnDefault",rootData:i})||(n=n===null?Rn.errors:n.concat(Rn.errors),s=n.length)),e.columnCount!==void 0){let a=e.columnCount;if(!(typeof a=="number"&&!(a%1)&&!isNaN(a)&&isFinite(a))){let l={instancePath:t+"/columnCount",schemaPath:"#/properties/columnCount/type",keyword:"type",params:{type:"integer"},message:"must be integer"};n===null?n=[l]:n.push(l),s++}if(typeof a=="number"&&isFinite(a)&&(a<1||isNaN(a))){let l={instancePath:t+"/columnCount",schemaPath:"#/properties/columnCount/minimum",keyword:"minimum",params:{comparison:">=",limit:1},message:"must be >= 1"};n===null?n=[l]:n.push(l),s++}}if(e.drawVerticalLine!==void 0&&typeof e.drawVerticalLine!="function"){let a={instancePath:t+"/drawVerticalLine",schemaPath:"#/properties/drawVerticalLine/typeof",keyword:"typeof",params:{},message:'must pass "typeof" keyword validation'};n===null?n=[a]:n.push(a),s++}}else{let a={instancePath:t,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"};n===null?n=[a]:n.push(a),s++}return Of.errors=n,s===0}});var Ss=b(Ht=>{"use strict";u();var Yb=Ht&&Ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ht,"__esModule",{value:!0});Ht.validateConfig=void 0;var Xb=Yb($f()),Qb=(e,t)=>{let r=Xb.default[e];if(!r(t)&&r.errors){let o=r.errors.map(i=>({message:i.message,params:i.params,schemaPath:i.schemaPath}));throw console.log("config",t),console.log("errors",o),new Error("Invalid config.")}};Ht.validateConfig=Qb});var Lf=b(kn=>{"use strict";u();Object.defineProperty(kn,"__esModule",{value:!0});kn.makeStreamConfig=void 0;var Zb=te(),eC=Ss(),tC=(e,t={},r)=>Array.from({length:e}).map((o,i)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",wrapWord:!1,...r,...t[i]})),rC=e=>{if((0,eC.validateConfig)("streamConfig.json",e),e.columnDefault.width===void 0)throw new Error("Must provide config.columnDefault.width when creating a stream.");return{drawVerticalLine:()=>!0,...e,border:(0,Zb.makeBorderConfig)(e.border),columns:tC(e.columnCount,e.columns,e.columnDefault)}};kn.makeStreamConfig=rC});var Pn=b(pt=>{"use strict";u();Object.defineProperty(pt,"__esModule",{value:!0});pt.mapDataUsingRowHeights=pt.padCellVertically=void 0;var nC=te(),oC=mn(),An=e=>new Array(e).fill(""),iC=(e,t,r)=>{let o=t-e.length;return r==="top"?[...e,...An(o)]:r==="bottom"?[...An(o),...e]:[...An(Math.floor(o/2)),...e,...An(Math.ceil(o/2))]};pt.padCellVertically=iC;var sC=(e,t,r)=>{let o=e[0].length,i=e.map((n,s)=>{let a=t[s],l=Array.from({length:a},()=>new Array(o).fill(""));return n.forEach((c,f)=>{var d;let p=(d=r.spanningCellManager)===null||d===void 0?void 0:d.getContainingRange({col:f,row:s});if(p){p.extractCellContent(s).forEach((D,S)=>{l[S][f]=D});return}let g=(0,oC.wrapCell)(c,r.columns[f].width,r.columns[f].wrapWord);(0,pt.padCellVertically)(g,a,r.columns[f].verticalAlignment).forEach((D,S)=>{l[S][f]=D})}),l});return(0,nC.flatten)(i)};pt.mapDataUsingRowHeights=sC});var Fn=b(dt=>{"use strict";u();Object.defineProperty(dt,"__esModule",{value:!0});dt.padTableData=dt.padString=void 0;var aC=(e,t,r)=>" ".repeat(t)+e+" ".repeat(r);dt.padString=aC;var lC=(e,t)=>e.map((r,o)=>r.map((i,n)=>{var s;if((s=t.spanningCellManager)===null||s===void 0?void 0:s.getContainingRange({col:n,row:o},{mapped:!0}))return i;let{paddingLeft:l,paddingRight:c}=t.columns[n];return(0,dt.padString)(i,l,c)}));dt.padTableData=lC});var Rs=b(Tn=>{"use strict";u();Object.defineProperty(Tn,"__esModule",{value:!0});Tn.stringifyTableData=void 0;var uC=te(),cC=e=>e.map(t=>t.map(r=>(0,uC.normalizeString)(String(r))));Tn.stringifyTableData=cC});var op=b((ir,qt)=>{"use strict";u();var fC=30,pC="...",Es=1/0,dC=17976931348623157e292,Mf=NaN,mC="[object RegExp]",hC="[object Symbol]",gC=/^\s+|\s+$/g,yC=/\w*$/,DC=/^[-+]0x[0-9a-f]+$/i,bC=/^0b[01]+$/i,CC=/^0o[0-7]+$/i,Ts="\\ud800-\\udfff",Wf="\\u0300-\\u036f\\ufe20-\\ufe23",Uf="\\u20d0-\\u20f0",zf="\\ufe0e\\ufe0f",_C="["+Ts+"]",ks="["+Wf+Uf+"]",As="\\ud83c[\\udffb-\\udfff]",vC="(?:"+ks+"|"+As+")",Jf="[^"+Ts+"]",Kf="(?:\\ud83c[\\udde6-\\uddff]){2}",Yf="[\\ud800-\\udbff][\\udc00-\\udfff]",Xf="\\u200d",Qf=vC+"?",Zf="["+zf+"]?",wC="(?:"+Xf+"(?:"+[Jf,Kf,Yf].join("|")+")"+Zf+Qf+")*",xC=Zf+Qf+wC,SC="(?:"+[Jf+ks+"?",ks,Kf,Yf,_C].join("|")+")",Ps=RegExp(As+"(?="+As+")|"+SC+xC,"g"),RC=RegExp("["+Xf+Ts+Wf+Uf+zf+"]"),EC=parseInt,ep=typeof global=="object"&&global&&global.Object===Object&&global,kC=typeof self=="object"&&self&&self.Object===Object&&self,AC=ep||kC||Function("return this")(),tp=typeof ir=="object"&&ir&&!ir.nodeType&&ir,Bf=tp&&typeof qt=="object"&&qt&&!qt.nodeType&&qt,PC=Bf&&Bf.exports===tp,jf=PC&&ep.process,Nf=function(){try{return jf&&jf.binding("util")}catch{}}(),If=Nf&&Nf.isRegExp,FC=OC("length");function TC(e){return e.split("")}function OC(e){return function(t){return t?.[e]}}function $C(e){return function(t){return e(t)}}function Os(e){return RC.test(e)}function LC(e){return Os(e)?BC(e):FC(e)}function MC(e){return Os(e)?jC(e):TC(e)}function BC(e){for(var t=Ps.lastIndex=0;Ps.test(e);)t++;return t}function jC(e){return e.match(Ps)||[]}var NC=Object.prototype,rp=NC.toString,Vf=AC.Symbol,Hf=Vf?Vf.prototype:void 0,qf=Hf?Hf.toString:void 0;function IC(e){return On(e)&&rp.call(e)==mC}function VC(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(i);++o<i;)n[o]=e[o+t];return n}function Fs(e){if(typeof e=="string")return e;if(np(e))return qf?qf.call(e):"";var t=e+"";return t=="0"&&1/e==-Es?"-0":t}function HC(e,t,r){var o=e.length;return r=r===void 0?o:r,!t&&r>=o?e:VC(e,t,r)}function On(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function qC(e){return!!e&&typeof e=="object"}var GC=If?$C(If):IC;function np(e){return typeof e=="symbol"||qC(e)&&rp.call(e)==hC}function WC(e){if(!e)return e===0?e:0;if(e=zC(e),e===Es||e===-Es){var t=e<0?-1:1;return t*dC}return e===e?e:0}function UC(e){var t=WC(e),r=t%1;return t===t?r?t-r:t:0}function zC(e){if(typeof e=="number")return e;if(np(e))return Mf;if(On(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=On(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(gC,"");var r=bC.test(e);return r||CC.test(e)?EC(e.slice(2),r?2:8):DC.test(e)?Mf:+e}function Gf(e){return e==null?"":Fs(e)}function JC(e,t){var r=fC,o=pC;if(On(t)){var i="separator"in t?t.separator:i;r="length"in t?UC(t.length):r,o="omission"in t?Fs(t.omission):o}e=Gf(e);var n=e.length;if(Os(e)){var s=MC(e);n=s.length}if(r>=n)return e;var a=r-LC(o);if(a<1)return o;var l=s?HC(s,0,a).join(""):e.slice(0,a);if(i===void 0)return l+o;if(s&&(a+=l.length-a),GC(i)){if(e.slice(a).search(i)){var c,f=l;for(i.global||(i=RegExp(i.source,Gf(yC.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;l=l.slice(0,d===void 0?a:d)}}else if(e.indexOf(Fs(i),a)!=a){var p=l.lastIndexOf(i);p>-1&&(l=l.slice(0,p))}return l+o}qt.exports=JC});var $n=b(je=>{"use strict";u();var KC=je&&je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(je,"__esModule",{value:!0});je.truncateTableData=je.truncateString=void 0;var YC=KC(op()),XC=(e,t)=>(0,YC.default)(e,{length:t,omission:"\u2026"});je.truncateString=XC;var QC=(e,t)=>e.map(r=>r.map((o,i)=>(0,je.truncateString)(o,t[i])));je.truncateTableData=QC});var ap=b(Mn=>{"use strict";u();Object.defineProperty(Mn,"__esModule",{value:!0});Mn.createStream=void 0;var ZC=Ds(),e_=bs(),Ln=Cs(),ip=_s(),t_=Lf(),r_=Pn(),n_=Fn(),o_=Rs(),i_=$n(),s_=te(),sp=(e,t)=>{let r=(0,o_.stringifyTableData)(e);r=(0,i_.truncateTableData)(r,(0,s_.extractTruncates)(t));let o=(0,e_.calculateRowHeights)(r,t);return r=(0,r_.mapDataUsingRowHeights)(r,o,t),r=(0,ZC.alignTableData)(r,t),r=(0,n_.padTableData)(r,t),r},a_=(e,t,r)=>{let i=sp([e],r).map(s=>(0,ip.drawRow)(s,r)).join(""),n;n="",n+=(0,Ln.drawBorderTop)(t,r),n+=i,n+=(0,Ln.drawBorderBottom)(t,r),n=n.trimEnd(),process.stdout.write(n)},l_=(e,t,r)=>{let i=sp([e],r).map(a=>(0,ip.drawRow)(a,r)).join(""),n="",s=(0,Ln.drawBorderBottom)(t,r);s!==`
9
9
  `&&(n="\r\x1B[K"),n+=(0,Ln.drawBorderJoin)(t,r),n+=i,n+=s,n=n.trimEnd(),process.stdout.write(n)},u_=e=>{let t=(0,t_.makeStreamConfig)(e),r=Object.values(t.columns).map(i=>i.width+i.paddingLeft+i.paddingRight),o=!0;return{write:i=>{if(i.length!==t.columnCount)throw new Error("Row cell count does not match the config.columnCount.");o?(o=!1,a_(i,r,t)):l_(i,r,t)}}};Mn.createStream=u_});var lp=b(Bn=>{"use strict";u();Object.defineProperty(Bn,"__esModule",{value:!0});Bn.calculateOutputColumnWidths=void 0;var c_=e=>e.columns.map(t=>t.paddingLeft+t.width+t.paddingRight);Bn.calculateOutputColumnWidths=c_});var up=b(jn=>{"use strict";u();Object.defineProperty(jn,"__esModule",{value:!0});jn.drawTable=void 0;var f_=Cs(),p_=Dn(),d_=_s(),m_=te(),h_=(e,t,r,o)=>{let{drawHorizontalLine:i,singleLine:n}=o,s=(0,m_.groupBySizes)(e,r).map((a,l)=>a.map(c=>(0,d_.drawRow)(c,{...o,rowIndex:l})).join(""));return(0,p_.drawContent)({contents:s,drawSeparator:(a,l)=>(a===0||a===l||!n)&&i(a,l),elementType:"row",rowIndex:-1,separatorGetter:(0,f_.createTableBorderGetter)(t,{...o,rowCount:s.length}),spanningCellManager:o.spanningCellManager})};jn.drawTable=h_});var cp=b(Nn=>{"use strict";u();Object.defineProperty(Nn,"__esModule",{value:!0});Nn.injectHeaderConfig=void 0;var g_=(e,t)=>{var r;let o=(r=t.spanningCells)!==null&&r!==void 0?r:[],i=t.header,n=[...e];if(i){o=o.map(({row:l,...c})=>({...c,row:l+1}));let{content:s,...a}=i;o.unshift({alignment:"center",col:0,colSpan:e[0].length,paddingLeft:1,paddingRight:1,row:0,wrapWord:!1,...a}),n.unshift([s,...Array.from({length:e[0].length-1}).fill("")])}return[n,o]};Nn.injectHeaderConfig=g_});var pp=b(Ne=>{"use strict";u();var y_=Ne&&Ne.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ne,"__esModule",{value:!0});Ne.calculateMaximumColumnWidths=Ne.calculateMaximumCellWidth=void 0;var D_=y_(Lt()),fp=te(),b_=e=>Math.max(...e.split(`
10
- `).map(D_.default));Ne.calculateMaximumCellWidth=b_;var C_=(e,t=[])=>{let r=new Array(e[0].length).fill(0),o=t.map(fp.calculateRangeCoordinate),i=(n,s)=>o.some(a=>(0,fp.isCellInRange)({col:s,row:n},a));return e.forEach((n,s)=>{n.forEach((a,l)=>{i(s,l)||(r[l]=Math.max(r[l],(0,Ne.calculateMaximumCellWidth)(a)))})}),r};Ne.calculateMaximumColumnWidths=C_});var mp=b(rt=>{"use strict";u();var __=rt&&rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rt,"__esModule",{value:!0});rt.alignVerticalRangeContent=rt.wrapRangeContent=void 0;var v_=__(Lt()),w_=ys(),x_=Pn(),S_=Fn(),R_=$n(),dp=te(),E_=mn(),k_=(e,t,r)=>{let{topLeft:o,paddingRight:i,paddingLeft:n,truncate:s,wrapWord:a,alignment:l}=e,c=r.rows[o.row][o.col],f=t-n-i;return(0,E_.wrapCell)((0,R_.truncateString)(c,s),f,a).map(d=>{let p=(0,w_.alignString)(d,f,l);return(0,S_.padString)(p,n,i)})};rt.wrapRangeContent=k_;var A_=(e,t,r)=>{let{rows:o,drawHorizontalLine:i,rowHeights:n}=r,{topLeft:s,bottomRight:a,verticalAlignment:l}=e;if(n.length===0)return[];let c=(0,dp.sumArray)(n.slice(s.row,a.row+1)),f=a.row-s.row,d=(0,dp.sequence)(s.row+1,a.row).filter(g=>!i(g,o.length)).length,p=c+f-d;return(0,x_.padCellVertically)(t,p,l).map(g=>g.length===0?" ".repeat((0,v_.default)(t[0])):g)};rt.alignVerticalRangeContent=A_});var hp=b(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.calculateSpanningCellWidth=void 0;var $s=te(),P_=(e,t)=>{let{columnsConfig:r,drawVerticalLine:o}=t,{topLeft:i,bottomRight:n}=e,s=(0,$s.sumArray)(r.slice(i.col,n.col+1).map(({width:f})=>f)),a=i.col===n.col?r[i.col].paddingRight+r[n.col].paddingLeft:(0,$s.sumArray)(r.slice(i.col,n.col+1).map(({paddingLeft:f,paddingRight:d})=>f+d)),l=n.col-i.col,c=(0,$s.sequence)(i.col+1,n.col).filter(f=>!o(f,r.length)).length;return s+a+l-c};In.calculateSpanningCellWidth=P_});var gp=b(Vn=>{"use strict";u();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.makeRangeConfig=void 0;var F_=te(),T_=(e,t)=>{var r;let{topLeft:o,bottomRight:i}=(0,F_.calculateRangeCoordinate)(e);return{...{...t[o.col],...e,paddingRight:(r=e.paddingRight)!==null&&r!==void 0?r:t[i.col].paddingRight},bottomRight:i,topLeft:o}};Vn.makeRangeConfig=T_});var bp=b(Hn=>{"use strict";u();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.createSpanningCellManager=void 0;var yp=mp(),O_=hp(),$_=gp(),Gt=te(),Ls=(e,t)=>t.find(r=>(0,Gt.isCellInRange)(e,r)),Dp=(e,t)=>{let r=(0,O_.calculateSpanningCellWidth)(e,t),o=(0,yp.wrapRangeContent)(e,r,t),i=(0,yp.alignVerticalRangeContent)(e,o,t);return{...e,extractBorderContent:a=>{let{topLeft:l}=e,c=(0,Gt.sumArray)(t.rowHeights.slice(l.row,a))+(a-l.row-1);return i[c]},extractCellContent:a=>{let{topLeft:l}=e,{drawHorizontalLine:c,rowHeights:f}=t,d=a-l.row,p=(0,Gt.sequence)(l.row+1,a).filter(y=>!c?.(y,f.length)).length,g=(0,Gt.sumArray)(f.slice(l.row,a))+d-p;return i.slice(g,g+f[a])},height:o.length,width:r}},L_=(e,t,r)=>{let o=Ls(e,r),i=Ls(t,r);return o&&i?(0,Gt.areCellEqual)(o.topLeft,i.topLeft):!1},M_=e=>{let{row:t,col:r}=e.topLeft;return`${t}/${r}`},B_=e=>{let{spanningCellConfigs:t,columnsConfig:r}=e,o=t.map(a=>(0,$_.makeRangeConfig)(a,r)),i={},n=[],s=[];return{getContainingRange:(a,l)=>{var c;let f=l?.mapped?s[a.row]:a.row,d=Ls({...a,row:f},o);if(!d)return;if(n.length===0)return Dp(d,{...e,rowHeights:n});let p=M_(d);return(c=i[p])!==null&&c!==void 0||(i[p]=Dp(d,{...e,rowHeights:n})),i[p]},inSameRange:(a,l)=>L_(a,l,o),rowHeights:n,rowIndexMapping:s,setRowHeights:a=>{n=a},setRowIndexMapping:a=>{s=(0,Gt.flatten)(a.map((l,c)=>Array.from({length:l},()=>c)))}}};Hn.createSpanningCellManager=B_});var Cp=b(Gn=>{"use strict";u();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.validateSpanningCellConfig=void 0;var Ms=te(),qn=(e,t,r)=>e<=r&&r<=t,j_=(e,t)=>{let[r,o]=[e.length,e[0].length];t.forEach((s,a)=>{let{colSpan:l,rowSpan:c}=s;if(l===void 0&&c===void 0)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${a}]`);if(l!==void 0&&l<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${l} in config.spanningCells[${a}]`);if(c!==void 0&&c<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${c} in config.spanningCells[${a}]`)});let i=t.map(Ms.calculateRangeCoordinate);i.forEach(({topLeft:s,bottomRight:a},l)=>{if(!qn(0,o-1,s.col)||!qn(0,r-1,s.row)||!qn(0,o-1,a.col)||!qn(0,r-1,a.row))throw new Error(`Some cells in config.spanningCells[${l}] are out of the table`)});let n=Array.from({length:r},()=>Array.from({length:o}));i.forEach(({topLeft:s,bottomRight:a},l)=>{(0,Ms.sequence)(s.row,a.row).forEach(c=>{(0,Ms.sequence)(s.col,a.col).forEach(f=>{if(n[c][f]!==void 0)throw new Error(`Spanning cells in config.spanningCells[${n[c][f]}] and config.spanningCells[${l}] are overlap each other`);n[c][f]=l})})})};Gn.validateSpanningCellConfig=j_});var _p=b(Wn=>{"use strict";u();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.makeTableConfig=void 0;var N_=pp(),I_=bp(),V_=te(),H_=Ss(),q_=Cp(),G_=(e,t,r,o)=>{let i=(0,N_.calculateMaximumColumnWidths)(e,o);return e[0].map((n,s)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:i[s],wrapWord:!1,...r,...t?.[s]}))},W_=(e,t={},r)=>{var o,i,n,s,a;(0,H_.validateConfig)("config.json",t),(0,q_.validateSpanningCellConfig)(e,(o=t.spanningCells)!==null&&o!==void 0?o:[]);let l=(i=r??t.spanningCells)!==null&&i!==void 0?i:[],c=G_(e,t.columns,t.columnDefault,l),f=(n=t.drawVerticalLine)!==null&&n!==void 0?n:()=>!0,d=(s=t.drawHorizontalLine)!==null&&s!==void 0?s:()=>!0;return{...t,border:(0,V_.makeBorderConfig)(t.border),columns:c,drawHorizontalLine:d,drawVerticalLine:f,singleLine:(a=t.singleLine)!==null&&a!==void 0?a:!1,spanningCellManager:(0,I_.createSpanningCellManager)({columnsConfig:c,drawHorizontalLine:d,drawVerticalLine:f,rows:e,spanningCellConfigs:l})}};Wn.makeTableConfig=W_});var vp=b(Un=>{"use strict";u();Object.defineProperty(Un,"__esModule",{value:!0});Un.validateTableData=void 0;var U_=te(),z_=e=>{if(!Array.isArray(e))throw new TypeError("Table data must be an array.");if(e.length===0)throw new Error("Table must define at least one row.");if(e[0].length===0)throw new Error("Table must define at least one column.");let t=e[0].length;for(let r of e){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==t)throw new Error("Table must have a consistent number of cells.");for(let o of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,U_.normalizeString)(String(o))))throw new Error("Table data must not contain control characters.")}};Un.validateTableData=z_});var wp=b(zn=>{"use strict";u();Object.defineProperty(zn,"__esModule",{value:!0});zn.table=void 0;var J_=Ds(),K_=lp(),Y_=bs(),X_=up(),Q_=cp(),Z_=_p(),ev=Pn(),tv=Fn(),rv=Rs(),nv=$n(),ov=te(),iv=vp(),sv=(e,t={})=>{(0,iv.validateTableData)(e);let r=(0,rv.stringifyTableData)(e),[o,i]=(0,Q_.injectHeaderConfig)(r,t),n=(0,Z_.makeTableConfig)(o,t,i);r=(0,nv.truncateTableData)(o,(0,ov.extractTruncates)(n));let s=(0,Y_.calculateRowHeights)(r,n);n.spanningCellManager.setRowHeights(s),n.spanningCellManager.setRowIndexMapping(s),r=(0,ev.mapDataUsingRowHeights)(r,s,n),r=(0,J_.alignTableData)(r,n),r=(0,tv.padTableData)(r,n);let a=(0,K_.calculateOutputColumnWidths)(n);return(0,X_.drawTable)(r,a,s,n)};zn.table=sv});var Sp=b(xp=>{"use strict";u();Object.defineProperty(xp,"__esModule",{value:!0})});var Rp=b(me=>{"use strict";u();var av=me&&me.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),lv=me&&me.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&av(t,e,r)};Object.defineProperty(me,"__esModule",{value:!0});me.getBorderCharacters=me.createStream=me.table=void 0;var uv=ap();Object.defineProperty(me,"createStream",{enumerable:!0,get:function(){return uv.createStream}});var cv=ms();Object.defineProperty(me,"getBorderCharacters",{enumerable:!0,get:function(){return cv.getBorderCharacters}});var fv=wp();Object.defineProperty(me,"table",{enumerable:!0,get:function(){return fv.table}});lv(Sp(),me)});u();import Fx from"node:process";import Tx from"yargs";import{hideBin as Ox}from"yargs/helpers";var bt="0.22.11";u();var Ic=ee(Ur(),1),tt=ee(ae(),1);import Ot from"node:path";import $t from"consola";import et from"fs-extra";import T0 from"gray-matter";u();function lc(e,t){t.forEach(r=>{r.setup?.(e)})}u();function Ke(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}u();var Mc=ee(Ur(),1),Qe=ee(ae(),1);import{dirname as w0}from"node:path";import Oc from"node:process";import{ensureSuffix as $c,uniq as x0}from"@antfu/utils";import Lc from"consola";import S0 from"debug";import Bc from"fs-extra";import{resolve as nr}from"pathe";u();import jD from"node:path";var ND=new Map,ID=new Map;function VD(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var HD=/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;function qD(e,t){if(e.includes("node_modules")&&!HD.test(e)&&Qi(e,t,ND))return!0}function Qi(e,t,r,o=null,i=[]){if(r.has(e))return!!r.get(e);if(i.includes(e))return r.set(e,!1),!1;let n=t(e);if(!n)return r.set(e,!1),!1;if(o?o.test(e):n.isEntry)return r.set(e,!0),!0;let s=n.importers.some(a=>Qi(a,t,r,o,i.concat(e)));return r.set(e,s),s}function uc(e){let t=["/@siteData","node_modules/@vueuse/core/","node_modules/@vueuse/shared/","node_modules/vue/","node_modules/vue-demi/",e.clientRoot],r=new RegExp(`^${VD(jD.resolve(e.themeRoot,"index.ts").replace(/\\/g,"/"))}`),o="assets";return{...e.config.vite?.build?.rollupOptions,external:[],preserveEntrySignatures:"allow-extension",output:{assetFileNames:`${o}/[name].[hash].[ext]`,entryFileNames:`${o}/[name].[hash].js`,chunkFileNames(){return`${o}/[name].[hash].js`},manualChunks(n,s){if(n.startsWith("\0vite")||n.includes("plugin-vue:export-helper"))return"framework";let a=["@vueuse/motion","dayjs","vue-i18n","vue-router","nprogress","pinia"];for(let l of a)if(n.includes(l))return`chunks/${l}`;if(qD(n,s.getModuleInfo)&&/@vue\/(runtime|shared|reactivity)/.test(n))return"framework";if((n.startsWith(e.themeRoot)||!t.some(l=>n.includes(l)))&&Qi(n,s.getModuleInfo,ID,r))return"theme"}}}}u();u();import o0 from"node:path";import i0 from"fs-extra";u();var At=ee(ae(),1);import ZD from"node:process";import{isFunction as pc}from"@antfu/utils";import e0 from"consola";import{createDefu as t0}from"defu";import{mergeConfig as r0}from"vite";u();import PE from"consola";function Ye(){let e=performance.now();return()=>{let r=performance.now()-e;return r>1e3?`${(r/1e3).toFixed(2)}s`:`${r.toFixed(2)}ms`}}u();var kt=ee(ae(),1);import{webcrypto as fc}from"node:crypto";import YD from"consola";import{options as XD}from"floating-vue";u();import GD from"node:process";import cc from"consola";import WD from"fs-extra";import{createJiti as UD}from"jiti";import{resolve as zD}from"pathe";var JD=UD(import.meta.url,{moduleCache:!1});async function KD(e){let{name:t,cwd:r}=e,o=zD(r,`${t}.config.ts`),i={};if(await WD.exists(o))try{i=await JD.import(o,{default:!0})}catch(n){console.error(n),cc.error(`Failed to load config file: ${o}`)}else cc.debug(`Config file not found: ${o}`);return{config:i,configFile:o}}async function Et(e,t={}){let{config:r,configFile:o}=await KD({name:e,cwd:t.cwd||GD.cwd()}),i=r;return typeof r=="function"&&(i=await r(t.valaxyOptions||{})),{config:i,configFile:o}}var Kr={mode:"auto",url:"/",lang:"en",languages:["en","zh-CN"],timezone:"",title:"Valaxy Blog",description:"A blog generated by Valaxy.",subtitle:"Next Generation Static Blog Framework.",author:{avatar:"https://valaxy.site/valaxy-logo.png",email:"i@valaxy.site",link:"https://valaxy.site",name:"VALAXY Developer",status:{emoji:"\u{1F30C}",message:"The moonlight is beautiful."}},favicon:"/favicon.svg",feed:{name:"",favicon:"/favicon.svg"},social:[],lastUpdated:!0,license:{enabled:!0,language:"",type:"by-nc-sa"},sponsor:{enable:!0,description:"\u8FD9\u662F\u5173\u4E8E\u8D5E\u52A9\u7684\u4E00\u4E9B\u63CF\u8FF0",methods:[]},search:{enable:!1,type:"fuse"},fuse:{dataPath:"valaxy-fuse-list.json",options:{keys:[]}},comment:{enable:!1},frontmatter:{time_warning:180*24*60*60*1e3},cdn:{prefix:"https://unpkg.com/"},mediumZoom:{enable:!1,selector:"",options:{}},vanillaLazyload:{enable:!1,options:{}},floatingVue:XD,statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:fc.getRandomValues(new Uint8Array(16)),iv:fc.getRandomValues(new Uint8Array(16))},redirects:{useVueRouter:!0,rules:[]}};function WE(e){return e}async function QD(e){return Et("site",{cwd:e})}async function Yr(e){let t=Ye(),{config:r,configFile:o}=await QD(e),i=t();return r&&o&&YD.success(`Resolve ${(0,kt.cyan)("siteConfig")} from ${(0,kt.dim)(o)} ${(0,kt.yellow)(i)}`),{siteConfig:r,siteConfigFile:o}}var Zi={siteConfig:Kr,theme:"yun",themeConfig:{pkg:{name:"",version:""}},build:{ssgForPagination:!1},deploy:{},runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}},modules:{rss:{enable:!0,fullText:!1}},features:{katex:!0},vite:{build:{emptyOutDir:!0}},devtools:!0};function n0(e){return e}var rk=n0;async function Qt(e,t){return await Et("valaxy",{cwd:e,valaxyOptions:t})}var ct=t0((e,t,r)=>{if(pc(e[t])&&pc(r)&&(e[t]=function(...o){e[t].call(this,...o),r.call(this,...o)}),t==="vite")return e[t]=r0(e[t],r),!0});async function dc(e){let t=e.userRoot||ZD.cwd(),r=Ye(),{config:o,configFile:i}=await Qt(t),n=r();i&&o&&Object.keys(o).length!==0&&e0.success(`Resolve ${(0,At.cyan)("userValaxyConfig")} from ${(0,At.dim)(i)} ${(0,At.yellow)(n)}`);let s=e.theme||o?.theme||"yun";return{config:o,configFile:i,theme:s}}function s0(e){return e}var lk=s0;async function mc(e,t){let r={};for(let o of e){let i=o0.resolve(o.root,"valaxy.config.ts");if(!await i0.exists(i))continue;let{config:n,configFile:s}=await Qt(o.root,t);n&&(o.configFile=s,r=ct(n,r))}return r}u();var Qr=ee(ae(),1);import u0 from"defu";u();var gc=ee(ae(),1);import a0 from"consola";import{colors as hc}from"consola/utils";import l0 from"ora";var Ae=a0.create({}),Xe=hc.magenta("[valaxy]"),Zt={success:(...e)=>Ae.success(Xe,...e),info:(...e)=>Ae.info(Xe,...e),ready:(...e)=>Ae.ready(Xe,...e)};async function er(e,t){let r=`${hc.cyan("[HOOK]")} ${(0,gc.magenta)(e)}`,o=l0(`${r} calling...`).start();await t.hooks.callHook(e),o.succeed(`${r} done.`)}async function Xr(e){return Et("theme",{cwd:e})}async function yc(e){let{config:t,configFile:r}=await Xr(e.userRoot);if(t&&r&&Ae.info(`Resolve ${(0,Qr.cyan)("themeConfig")} from ${(0,Qr.dim)(r)}`),e?.themeRoot){let{config:o}=await Xr(e.themeRoot);t=u0(t||{},o)}return{themeConfig:t,themeConfigFile:r}}function c0(e){return e}var bk=c0;function vk(e){return e}u();import{createDefu as f0}from"defu";var tr=f0((e,t,r)=>{if(t&&e[t]&&Array.isArray(e[t])&&Array.isArray(r))return e[t]=r,!0});u();u();import{spawn as p0}from"cross-spawn";function rr(e,t="updated"){return new Promise((r,o)=>{let i=["log"];t==="updated"&&i.push("-1"),i.push('--pretty="%ci"',e),t==="created"&&i.push("|","tail","-1");let n=p0("git",i),s="";n.stdout.on("data",a=>s+=String(a)),n.on("close",()=>{r(+new Date(s))}),n.on("error",()=>{r(0)})})}u();u();var Dc="<!-- more -->",Pt=/^https?:/i,bc=/^pathname:\/\//,Mk="/:all(.*)*",Cc=new Set(["annotation","math","menclose","mfrac","mglyph","mi","mlabeledtr","mn","mo","mover","mpadded","mphantom","mroot","mrow","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"]),Ft={css:{preprocessorOptions:{scss:{api:"modern-compiler"}}}};function _c(e){return Pt.test(e)}function vc(e){return e.startsWith("/")||/^\.\.?[/\\]/.test(e)}function es(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}u();import{ensurePrefix as d0,slash as m0}from"@antfu/utils";import wc from"consola";import{resolvePath as h0}from"mlly";import{resolveGlobal as g0}from"resolve-global";var ts={};async function rs(e){return q(await Be(e,!0))}function q(e){return`/@fs${d0("/",m0(e))}`}async function Be(e,t=!1){try{return await h0(e,{url:import.meta.url})}catch(r){wc.log(r)}if(ts.value)try{return g0(e)}catch{}if(t)throw new Error(`Failed to resolve package ${e}`);wc.warn(`Failed to resolve package ${e}`)}u();var Pe=ee(ae(),1);import Ac from"node:process";import Rc from"defu";import Ec from"fs-extra";import D0 from"ora";import{resolve as b0}from"pathe";u();import{dirname as xc}from"node:path";import y0 from"fs-extra";import{resolve as Sc}from"pathe";async function Zr(e,t){if(!e)return"";if(vc(e))if(t){let r=y0.lstatSync(t).isFile();return Sc(r?xc(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return Sc(xc(await Be(`${e}/package.json`)||""))}async function Pc(e,t=Ac.cwd()){let r=D0(`Resolve ${(0,Pe.cyan)("addons")} from ${(0,Pe.dim)(t)}`).start(),o={},i=s=>{s&&(o[s.name]=Rc(o[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){i(await kc(s,{cwd:t}));continue}typeof s=="object"&&i(Rc(await kc(s.name,{cwd:t}),s||{}))}r.succeed();let n=Object.values(o).filter(s=>s.enable);return n.forEach((s,a)=>{console.log(` ${a===n.length-1?"\u2514\u2500":"\u251C\u2500"} ${(0,Pe.yellow)(s.name)} ${(0,Pe.blue)(`v${s.pkg?.version}`)}${s.global?(0,Pe.cyan)(" (global)"):""} ${(0,Pe.dim)(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository||"")}`)}),n}async function kc(e,t={}){let r=await C0(e,t.cwd||Ac.cwd()),o=b0(r,"./package.json");if(!await Ec.exists(o)){Ae.error(`No addon named ${e} found`);return}let i=await Ec.readJSON(o);return{enable:!0,name:i.name,global:!!i.global,root:r,options:{},props:{},pkg:i}}async function C0(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return await Zr(r,t)}u();import{writeFile as _0}from"node:fs/promises";import{ensureFile as v0}from"fs-extra";function en(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function tn(e){if(!e)return[];let t=[];for(let r of e)if(Array.isArray(r.from))for(let o of r.from)t.push({from:en(o),to:en(r.to)});else t.push({from:en(r.from),to:en(r.to)});return t}async function Fc(e,t){await v0(t),await _0(t,`
10
+ `).map(D_.default));Ne.calculateMaximumCellWidth=b_;var C_=(e,t=[])=>{let r=new Array(e[0].length).fill(0),o=t.map(fp.calculateRangeCoordinate),i=(n,s)=>o.some(a=>(0,fp.isCellInRange)({col:s,row:n},a));return e.forEach((n,s)=>{n.forEach((a,l)=>{i(s,l)||(r[l]=Math.max(r[l],(0,Ne.calculateMaximumCellWidth)(a)))})}),r};Ne.calculateMaximumColumnWidths=C_});var mp=b(rt=>{"use strict";u();var __=rt&&rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rt,"__esModule",{value:!0});rt.alignVerticalRangeContent=rt.wrapRangeContent=void 0;var v_=__(Lt()),w_=ys(),x_=Pn(),S_=Fn(),R_=$n(),dp=te(),E_=mn(),k_=(e,t,r)=>{let{topLeft:o,paddingRight:i,paddingLeft:n,truncate:s,wrapWord:a,alignment:l}=e,c=r.rows[o.row][o.col],f=t-n-i;return(0,E_.wrapCell)((0,R_.truncateString)(c,s),f,a).map(d=>{let p=(0,w_.alignString)(d,f,l);return(0,S_.padString)(p,n,i)})};rt.wrapRangeContent=k_;var A_=(e,t,r)=>{let{rows:o,drawHorizontalLine:i,rowHeights:n}=r,{topLeft:s,bottomRight:a,verticalAlignment:l}=e;if(n.length===0)return[];let c=(0,dp.sumArray)(n.slice(s.row,a.row+1)),f=a.row-s.row,d=(0,dp.sequence)(s.row+1,a.row).filter(g=>!i(g,o.length)).length,p=c+f-d;return(0,x_.padCellVertically)(t,p,l).map(g=>g.length===0?" ".repeat((0,v_.default)(t[0])):g)};rt.alignVerticalRangeContent=A_});var hp=b(In=>{"use strict";u();Object.defineProperty(In,"__esModule",{value:!0});In.calculateSpanningCellWidth=void 0;var $s=te(),P_=(e,t)=>{let{columnsConfig:r,drawVerticalLine:o}=t,{topLeft:i,bottomRight:n}=e,s=(0,$s.sumArray)(r.slice(i.col,n.col+1).map(({width:f})=>f)),a=i.col===n.col?r[i.col].paddingRight+r[n.col].paddingLeft:(0,$s.sumArray)(r.slice(i.col,n.col+1).map(({paddingLeft:f,paddingRight:d})=>f+d)),l=n.col-i.col,c=(0,$s.sequence)(i.col+1,n.col).filter(f=>!o(f,r.length)).length;return s+a+l-c};In.calculateSpanningCellWidth=P_});var gp=b(Vn=>{"use strict";u();Object.defineProperty(Vn,"__esModule",{value:!0});Vn.makeRangeConfig=void 0;var F_=te(),T_=(e,t)=>{var r;let{topLeft:o,bottomRight:i}=(0,F_.calculateRangeCoordinate)(e);return{...{...t[o.col],...e,paddingRight:(r=e.paddingRight)!==null&&r!==void 0?r:t[i.col].paddingRight},bottomRight:i,topLeft:o}};Vn.makeRangeConfig=T_});var bp=b(Hn=>{"use strict";u();Object.defineProperty(Hn,"__esModule",{value:!0});Hn.createSpanningCellManager=void 0;var yp=mp(),O_=hp(),$_=gp(),Gt=te(),Ls=(e,t)=>t.find(r=>(0,Gt.isCellInRange)(e,r)),Dp=(e,t)=>{let r=(0,O_.calculateSpanningCellWidth)(e,t),o=(0,yp.wrapRangeContent)(e,r,t),i=(0,yp.alignVerticalRangeContent)(e,o,t);return{...e,extractBorderContent:a=>{let{topLeft:l}=e,c=(0,Gt.sumArray)(t.rowHeights.slice(l.row,a))+(a-l.row-1);return i[c]},extractCellContent:a=>{let{topLeft:l}=e,{drawHorizontalLine:c,rowHeights:f}=t,d=a-l.row,p=(0,Gt.sequence)(l.row+1,a).filter(y=>!c?.(y,f.length)).length,g=(0,Gt.sumArray)(f.slice(l.row,a))+d-p;return i.slice(g,g+f[a])},height:o.length,width:r}},L_=(e,t,r)=>{let o=Ls(e,r),i=Ls(t,r);return o&&i?(0,Gt.areCellEqual)(o.topLeft,i.topLeft):!1},M_=e=>{let{row:t,col:r}=e.topLeft;return`${t}/${r}`},B_=e=>{let{spanningCellConfigs:t,columnsConfig:r}=e,o=t.map(a=>(0,$_.makeRangeConfig)(a,r)),i={},n=[],s=[];return{getContainingRange:(a,l)=>{var c;let f=l?.mapped?s[a.row]:a.row,d=Ls({...a,row:f},o);if(!d)return;if(n.length===0)return Dp(d,{...e,rowHeights:n});let p=M_(d);return(c=i[p])!==null&&c!==void 0||(i[p]=Dp(d,{...e,rowHeights:n})),i[p]},inSameRange:(a,l)=>L_(a,l,o),rowHeights:n,rowIndexMapping:s,setRowHeights:a=>{n=a},setRowIndexMapping:a=>{s=(0,Gt.flatten)(a.map((l,c)=>Array.from({length:l},()=>c)))}}};Hn.createSpanningCellManager=B_});var Cp=b(Gn=>{"use strict";u();Object.defineProperty(Gn,"__esModule",{value:!0});Gn.validateSpanningCellConfig=void 0;var Ms=te(),qn=(e,t,r)=>e<=r&&r<=t,j_=(e,t)=>{let[r,o]=[e.length,e[0].length];t.forEach((s,a)=>{let{colSpan:l,rowSpan:c}=s;if(l===void 0&&c===void 0)throw new Error(`Expect at least colSpan or rowSpan is provided in config.spanningCells[${a}]`);if(l!==void 0&&l<1)throw new Error(`Expect colSpan is not equal zero, instead got: ${l} in config.spanningCells[${a}]`);if(c!==void 0&&c<1)throw new Error(`Expect rowSpan is not equal zero, instead got: ${c} in config.spanningCells[${a}]`)});let i=t.map(Ms.calculateRangeCoordinate);i.forEach(({topLeft:s,bottomRight:a},l)=>{if(!qn(0,o-1,s.col)||!qn(0,r-1,s.row)||!qn(0,o-1,a.col)||!qn(0,r-1,a.row))throw new Error(`Some cells in config.spanningCells[${l}] are out of the table`)});let n=Array.from({length:r},()=>Array.from({length:o}));i.forEach(({topLeft:s,bottomRight:a},l)=>{(0,Ms.sequence)(s.row,a.row).forEach(c=>{(0,Ms.sequence)(s.col,a.col).forEach(f=>{if(n[c][f]!==void 0)throw new Error(`Spanning cells in config.spanningCells[${n[c][f]}] and config.spanningCells[${l}] are overlap each other`);n[c][f]=l})})})};Gn.validateSpanningCellConfig=j_});var _p=b(Wn=>{"use strict";u();Object.defineProperty(Wn,"__esModule",{value:!0});Wn.makeTableConfig=void 0;var N_=pp(),I_=bp(),V_=te(),H_=Ss(),q_=Cp(),G_=(e,t,r,o)=>{let i=(0,N_.calculateMaximumColumnWidths)(e,o);return e[0].map((n,s)=>({alignment:"left",paddingLeft:1,paddingRight:1,truncate:Number.POSITIVE_INFINITY,verticalAlignment:"top",width:i[s],wrapWord:!1,...r,...t?.[s]}))},W_=(e,t={},r)=>{var o,i,n,s,a;(0,H_.validateConfig)("config.json",t),(0,q_.validateSpanningCellConfig)(e,(o=t.spanningCells)!==null&&o!==void 0?o:[]);let l=(i=r??t.spanningCells)!==null&&i!==void 0?i:[],c=G_(e,t.columns,t.columnDefault,l),f=(n=t.drawVerticalLine)!==null&&n!==void 0?n:()=>!0,d=(s=t.drawHorizontalLine)!==null&&s!==void 0?s:()=>!0;return{...t,border:(0,V_.makeBorderConfig)(t.border),columns:c,drawHorizontalLine:d,drawVerticalLine:f,singleLine:(a=t.singleLine)!==null&&a!==void 0?a:!1,spanningCellManager:(0,I_.createSpanningCellManager)({columnsConfig:c,drawHorizontalLine:d,drawVerticalLine:f,rows:e,spanningCellConfigs:l})}};Wn.makeTableConfig=W_});var vp=b(Un=>{"use strict";u();Object.defineProperty(Un,"__esModule",{value:!0});Un.validateTableData=void 0;var U_=te(),z_=e=>{if(!Array.isArray(e))throw new TypeError("Table data must be an array.");if(e.length===0)throw new Error("Table must define at least one row.");if(e[0].length===0)throw new Error("Table must define at least one column.");let t=e[0].length;for(let r of e){if(!Array.isArray(r))throw new TypeError("Table row data must be an array.");if(r.length!==t)throw new Error("Table must have a consistent number of cells.");for(let o of r)if(/[\u0001-\u0006\u0008\u0009\u000B-\u001A]/.test((0,U_.normalizeString)(String(o))))throw new Error("Table data must not contain control characters.")}};Un.validateTableData=z_});var wp=b(zn=>{"use strict";u();Object.defineProperty(zn,"__esModule",{value:!0});zn.table=void 0;var J_=Ds(),K_=lp(),Y_=bs(),X_=up(),Q_=cp(),Z_=_p(),ev=Pn(),tv=Fn(),rv=Rs(),nv=$n(),ov=te(),iv=vp(),sv=(e,t={})=>{(0,iv.validateTableData)(e);let r=(0,rv.stringifyTableData)(e),[o,i]=(0,Q_.injectHeaderConfig)(r,t),n=(0,Z_.makeTableConfig)(o,t,i);r=(0,nv.truncateTableData)(o,(0,ov.extractTruncates)(n));let s=(0,Y_.calculateRowHeights)(r,n);n.spanningCellManager.setRowHeights(s),n.spanningCellManager.setRowIndexMapping(s),r=(0,ev.mapDataUsingRowHeights)(r,s,n),r=(0,J_.alignTableData)(r,n),r=(0,tv.padTableData)(r,n);let a=(0,K_.calculateOutputColumnWidths)(n);return(0,X_.drawTable)(r,a,s,n)};zn.table=sv});var Sp=b(xp=>{"use strict";u();Object.defineProperty(xp,"__esModule",{value:!0})});var Rp=b(me=>{"use strict";u();var av=me&&me.__createBinding||(Object.create?function(e,t,r,o){o===void 0&&(o=r),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}),lv=me&&me.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&av(t,e,r)};Object.defineProperty(me,"__esModule",{value:!0});me.getBorderCharacters=me.createStream=me.table=void 0;var uv=ap();Object.defineProperty(me,"createStream",{enumerable:!0,get:function(){return uv.createStream}});var cv=ms();Object.defineProperty(me,"getBorderCharacters",{enumerable:!0,get:function(){return cv.getBorderCharacters}});var fv=wp();Object.defineProperty(me,"table",{enumerable:!0,get:function(){return fv.table}});lv(Sp(),me)});u();import Fx from"node:process";import Tx from"yargs";import{hideBin as Ox}from"yargs/helpers";var bt="0.22.12";u();var Ic=ee(Ur(),1),tt=ee(ae(),1);import Ot from"node:path";import $t from"consola";import et from"fs-extra";import T0 from"gray-matter";u();function lc(e,t){t.forEach(r=>{r.setup?.(e)})}u();function Ke(e){return e.positional("root",{default:".",type:"string",describe:"root folder of your source files"})}u();var Mc=ee(Ur(),1),Qe=ee(ae(),1);import{dirname as w0}from"node:path";import Oc from"node:process";import{ensureSuffix as $c,uniq as x0}from"@antfu/utils";import Lc from"consola";import S0 from"debug";import Bc from"fs-extra";import{resolve as nr}from"pathe";u();import jD from"node:path";var ND=new Map,ID=new Map;function VD(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var HD=/\.(css|less|sass|scss|styl|stylus|pcss|postcss|sss)(?:$|\?)/;function qD(e,t){if(e.includes("node_modules")&&!HD.test(e)&&Qi(e,t,ND))return!0}function Qi(e,t,r,o=null,i=[]){if(r.has(e))return!!r.get(e);if(i.includes(e))return r.set(e,!1),!1;let n=t(e);if(!n)return r.set(e,!1),!1;if(o?o.test(e):n.isEntry)return r.set(e,!0),!0;let s=n.importers.some(a=>Qi(a,t,r,o,i.concat(e)));return r.set(e,s),s}function uc(e){let t=["/@siteData","node_modules/@vueuse/core/","node_modules/@vueuse/shared/","node_modules/vue/","node_modules/vue-demi/",e.clientRoot],r=new RegExp(`^${VD(jD.resolve(e.themeRoot,"index.ts").replace(/\\/g,"/"))}`),o="assets";return{...e.config.vite?.build?.rollupOptions,external:[],preserveEntrySignatures:"allow-extension",output:{assetFileNames:`${o}/[name].[hash].[ext]`,entryFileNames:`${o}/[name].[hash].js`,chunkFileNames(){return`${o}/[name].[hash].js`},manualChunks(n,s){if(n.startsWith("\0vite")||n.includes("plugin-vue:export-helper"))return"framework";let a=["@vueuse/motion","dayjs","vue-i18n","vue-router","nprogress","pinia"];for(let l of a)if(n.includes(l))return`chunks/${l}`;if(qD(n,s.getModuleInfo)&&/@vue\/(runtime|shared|reactivity)/.test(n))return"framework";if((n.startsWith(e.themeRoot)||!t.some(l=>n.includes(l)))&&Qi(n,s.getModuleInfo,ID,r))return"theme"}}}}u();u();import o0 from"node:path";import i0 from"fs-extra";u();var At=ee(ae(),1);import ZD from"node:process";import{isFunction as pc}from"@antfu/utils";import e0 from"consola";import{createDefu as t0}from"defu";import{mergeConfig as r0}from"vite";u();import PE from"consola";function Ye(){let e=performance.now();return()=>{let r=performance.now()-e;return r>1e3?`${(r/1e3).toFixed(2)}s`:`${r.toFixed(2)}ms`}}u();var kt=ee(ae(),1);import{webcrypto as fc}from"node:crypto";import YD from"consola";import{options as XD}from"floating-vue";u();import GD from"node:process";import cc from"consola";import WD from"fs-extra";import{createJiti as UD}from"jiti";import{resolve as zD}from"pathe";var JD=UD(import.meta.url,{moduleCache:!1});async function KD(e){let{name:t,cwd:r}=e,o=zD(r,`${t}.config.ts`),i={};if(await WD.exists(o))try{i=await JD.import(o,{default:!0})}catch(n){console.error(n),cc.error(`Failed to load config file: ${o}`)}else cc.debug(`Config file not found: ${o}`);return{config:i,configFile:o}}async function Et(e,t={}){let{config:r,configFile:o}=await KD({name:e,cwd:t.cwd||GD.cwd()}),i=r;return typeof r=="function"&&(i=await r(t.valaxyOptions||{})),{config:i,configFile:o}}var Kr={mode:"auto",url:"/",lang:"en",languages:["en","zh-CN"],timezone:"",title:"Valaxy Blog",description:"A blog generated by Valaxy.",subtitle:"Next Generation Static Blog Framework.",author:{avatar:"https://valaxy.site/valaxy-logo.png",email:"i@valaxy.site",link:"https://valaxy.site",name:"VALAXY Developer",status:{emoji:"\u{1F30C}",message:"The moonlight is beautiful."}},favicon:"/favicon.svg",feed:{name:"",favicon:"/favicon.svg"},social:[],lastUpdated:!0,license:{enabled:!0,language:"",type:"by-nc-sa"},sponsor:{enable:!0,description:"\u8FD9\u662F\u5173\u4E8E\u8D5E\u52A9\u7684\u4E00\u4E9B\u63CF\u8FF0",methods:[]},search:{enable:!1,type:"fuse"},fuse:{dataPath:"valaxy-fuse-list.json",options:{keys:[]}},comment:{enable:!1},frontmatter:{time_warning:180*24*60*60*1e3},cdn:{prefix:"https://unpkg.com/"},mediumZoom:{enable:!1,selector:"",options:{}},vanillaLazyload:{enable:!1,options:{}},floatingVue:XD,statistics:{enable:!1,readTime:{speed:{cn:300,en:100}}},pageSize:7,encrypt:{enable:!1,algorithm:"AES-CBC",salt:fc.getRandomValues(new Uint8Array(16)),iv:fc.getRandomValues(new Uint8Array(16))},redirects:{useVueRouter:!0,rules:[]}};function WE(e){return e}async function QD(e){return Et("site",{cwd:e})}async function Yr(e){let t=Ye(),{config:r,configFile:o}=await QD(e),i=t();return r&&o&&YD.success(`Resolve ${(0,kt.cyan)("siteConfig")} from ${(0,kt.dim)(o)} ${(0,kt.yellow)(i)}`),{siteConfig:r,siteConfigFile:o}}var Zi={siteConfig:Kr,theme:"yun",themeConfig:{pkg:{name:"",version:""}},build:{ssgForPagination:!1},deploy:{},runtimeConfig:{addons:{},redirects:{useVueRouter:!0,redirectRoutes:[]}},modules:{rss:{enable:!0,fullText:!1}},features:{katex:!0},vite:{build:{emptyOutDir:!0}},devtools:!0};function n0(e){return e}var rk=n0;async function Qt(e,t){return await Et("valaxy",{cwd:e,valaxyOptions:t})}var ct=t0((e,t,r)=>{if(pc(e[t])&&pc(r)&&(e[t]=function(...o){e[t].call(this,...o),r.call(this,...o)}),t==="vite")return e[t]=r0(e[t],r),!0});async function dc(e){let t=e.userRoot||ZD.cwd(),r=Ye(),{config:o,configFile:i}=await Qt(t),n=r();i&&o&&Object.keys(o).length!==0&&e0.success(`Resolve ${(0,At.cyan)("userValaxyConfig")} from ${(0,At.dim)(i)} ${(0,At.yellow)(n)}`);let s=e.theme||o?.theme||"yun";return{config:o,configFile:i,theme:s}}function s0(e){return e}var lk=s0;async function mc(e,t){let r={};for(let o of e){let i=o0.resolve(o.root,"valaxy.config.ts");if(!await i0.exists(i))continue;let{config:n,configFile:s}=await Qt(o.root,t);n&&(o.configFile=s,r=ct(n,r))}return r}u();var Qr=ee(ae(),1);import u0 from"defu";u();var gc=ee(ae(),1);import a0 from"consola";import{colors as hc}from"consola/utils";import l0 from"ora";var Ae=a0.create({}),Xe=hc.magenta("[valaxy]"),Zt={success:(...e)=>Ae.success(Xe,...e),info:(...e)=>Ae.info(Xe,...e),ready:(...e)=>Ae.ready(Xe,...e)};async function er(e,t){let r=`${hc.cyan("[HOOK]")} ${(0,gc.magenta)(e)}`,o=l0(`${r} calling...`).start();await t.hooks.callHook(e),o.succeed(`${r} done.`)}async function Xr(e){return Et("theme",{cwd:e})}async function yc(e){let{config:t,configFile:r}=await Xr(e.userRoot);if(t&&r&&Ae.info(`Resolve ${(0,Qr.cyan)("themeConfig")} from ${(0,Qr.dim)(r)}`),e?.themeRoot){let{config:o}=await Xr(e.themeRoot);t=u0(t||{},o)}return{themeConfig:t,themeConfigFile:r}}function c0(e){return e}var bk=c0;function vk(e){return e}u();import{createDefu as f0}from"defu";var tr=f0((e,t,r)=>{if(t&&e[t]&&Array.isArray(e[t])&&Array.isArray(r))return e[t]=r,!0});u();u();import{spawn as p0}from"cross-spawn";function rr(e,t="updated"){return new Promise((r,o)=>{let i=["log"];t==="updated"&&i.push("-1"),i.push('--pretty="%ci"',e),t==="created"&&i.push("|","tail","-1");let n=p0("git",i),s="";n.stdout.on("data",a=>s+=String(a)),n.on("close",()=>{r(+new Date(s))}),n.on("error",()=>{r(0)})})}u();u();var Dc="<!-- more -->",Pt=/^https?:/i,bc=/^pathname:\/\//,Mk="/:all(.*)*",Cc=new Set(["annotation","math","menclose","mfrac","mglyph","mi","mlabeledtr","mn","mo","mover","mpadded","mphantom","mroot","mrow","mspace","msqrt","mstyle","msub","msubsup","msup","mtable","mtd","mtext","mtr","munder","munderover","semantics"]),Ft={css:{preprocessorOptions:{scss:{api:"modern-compiler"}}}};function _c(e){return Pt.test(e)}function vc(e){return e.startsWith("/")||/^\.\.?[/\\]/.test(e)}function es(e){return`JSON.parse(${JSON.stringify(JSON.stringify(e))})`}u();import{ensurePrefix as d0,slash as m0}from"@antfu/utils";import wc from"consola";import{resolvePath as h0}from"mlly";import{resolveGlobal as g0}from"resolve-global";var ts={};async function rs(e){return q(await Be(e,!0))}function q(e){return`/@fs${d0("/",m0(e))}`}async function Be(e,t=!1){try{return await h0(e,{url:import.meta.url})}catch(r){wc.log(r)}if(ts.value)try{return g0(e)}catch{}if(t)throw new Error(`Failed to resolve package ${e}`);wc.warn(`Failed to resolve package ${e}`)}u();var Pe=ee(ae(),1);import Ac from"node:process";import Rc from"defu";import Ec from"fs-extra";import D0 from"ora";import{resolve as b0}from"pathe";u();import{dirname as xc}from"node:path";import y0 from"fs-extra";import{resolve as Sc}from"pathe";async function Zr(e,t){if(!e)return"";if(vc(e))if(t){let r=y0.lstatSync(t).isFile();return Sc(r?xc(t):t,e)}else throw new Error(`entry is required when ${e} is path`);else return Sc(xc(await Be(`${e}/package.json`)||""))}async function Pc(e,t=Ac.cwd()){let r=D0(`Resolve ${(0,Pe.cyan)("addons")} from ${(0,Pe.dim)(t)}`).start(),o={},i=s=>{s&&(o[s.name]=Rc(o[s.name]||{},s))};if(Array.isArray(e))for(let s of e){if(typeof s=="string"){i(await kc(s,{cwd:t}));continue}typeof s=="object"&&i(Rc(await kc(s.name,{cwd:t}),s||{}))}r.succeed();let n=Object.values(o).filter(s=>s.enable);return n.forEach((s,a)=>{console.log(` ${a===n.length-1?"\u2514\u2500":"\u251C\u2500"} ${(0,Pe.yellow)(s.name)} ${(0,Pe.blue)(`v${s.pkg?.version}`)}${s.global?(0,Pe.cyan)(" (global)"):""} ${(0,Pe.dim)(s.pkg.homepage||s.pkg.repository?.url||s.pkg.repository||"")}`)}),n}async function kc(e,t={}){let r=await C0(e,t.cwd||Ac.cwd()),o=b0(r,"./package.json");if(!await Ec.exists(o)){Ae.error(`No addon named ${e} found`);return}let i=await Ec.readJSON(o);return{enable:!0,name:i.name,global:!!i.global,root:r,options:{},props:{},pkg:i}}async function C0(e,t){let r=e.startsWith("valaxy-addon")||e.startsWith(".")?e:`valaxy-addon-${e}`;return await Zr(r,t)}u();import{writeFile as _0}from"node:fs/promises";import{ensureFile as v0}from"fs-extra";function en(e){return e==="/"?"/index":e.endsWith("/")?e.slice(0,-1):e}function tn(e){if(!e)return[];let t=[];for(let r of e)if(Array.isArray(r.from))for(let o of r.from)t.push({from:en(o),to:en(r.to)});else t.push({from:en(r.from),to:en(r.to)});return t}async function Fc(e,t){await v0(t),await _0(t,`
11
11
  <!DOCTYPE html>
12
12
  <html lang="en">
13
13
  <head>
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{V as a,W as b,X as c,Y as d}from"../../chunk-FFEKKJBF.js";import"../../chunk-2TIFAWAJ.js";import"../../chunk-3KRYIAHJ.js";export{c as cli,b as registerDevCommand,d as run,a as startValaxyDev};
2
+ import{V as a,W as b,X as c,Y as d}from"../../chunk-Y2R2NVO2.js";import"../../chunk-2TIFAWAJ.js";import"../../chunk-3KRYIAHJ.js";export{c as cli,b as registerDevCommand,d as run,a as startValaxyDev};
@@ -1,2 +1,2 @@
1
1
  import {createRequire as __createRequire} from 'module';var require=__createRequire(import.meta.url);
2
- import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-FFEKKJBF.js";import"../chunk-2TIFAWAJ.js";import"../chunk-3KRYIAHJ.js";export{d as ALL_ROUTE,a as EXCERPT_SEPARATOR,b as EXTERNAL_URL_RE,c as PATHNAME_PROTOCOL_RE,O as ViteValaxyPlugins,P as build,X as cli,U as createServer,N as createValaxyLoader,e as customElements,s as defaultSiteConfig,w as defaultValaxyConfig,f as defaultViteConfig,D as defineAddon,y as defineConfig,t as defineSiteConfig,I as defineTheme,J as defineUnoSetup,C as defineValaxyAddon,x as defineValaxyConfig,H as defineValaxyTheme,S as generateClientRedirects,g as getGitTimestamp,p as getIndexHtml,T as getServerInfoText,h as isExternal,k as isInstalledGlobally,i as isPath,q as loadConfig,r as loadConfigFromFile,A as mergeValaxyConfig,o as mergeViteConfigs,R as postProcessForSSG,K as processValaxyOptions,W as registerDevCommand,E as resolveAddonsConfig,n as resolveImportPath,l as resolveImportUrl,L as resolveOptions,v as resolveSiteConfig,u as resolveSiteConfigFromRoot,F as resolveThemeConfigFromRoot,M as resolveThemeValaxyConfig,G as resolveUserThemeConfig,B as resolveValaxyConfig,z as resolveValaxyConfigFromRoot,Y as run,Q as ssgBuild,V as startValaxyDev,m as toAtFS,j as transformObject};
2
+ import{A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"../chunk-Y2R2NVO2.js";import"../chunk-2TIFAWAJ.js";import"../chunk-3KRYIAHJ.js";export{d as ALL_ROUTE,a as EXCERPT_SEPARATOR,b as EXTERNAL_URL_RE,c as PATHNAME_PROTOCOL_RE,O as ViteValaxyPlugins,P as build,X as cli,U as createServer,N as createValaxyLoader,e as customElements,s as defaultSiteConfig,w as defaultValaxyConfig,f as defaultViteConfig,D as defineAddon,y as defineConfig,t as defineSiteConfig,I as defineTheme,J as defineUnoSetup,C as defineValaxyAddon,x as defineValaxyConfig,H as defineValaxyTheme,S as generateClientRedirects,g as getGitTimestamp,p as getIndexHtml,T as getServerInfoText,h as isExternal,k as isInstalledGlobally,i as isPath,q as loadConfig,r as loadConfigFromFile,A as mergeValaxyConfig,o as mergeViteConfigs,R as postProcessForSSG,K as processValaxyOptions,W as registerDevCommand,E as resolveAddonsConfig,n as resolveImportPath,l as resolveImportUrl,L as resolveOptions,v as resolveSiteConfig,u as resolveSiteConfigFromRoot,F as resolveThemeConfigFromRoot,M as resolveThemeValaxyConfig,G as resolveUserThemeConfig,B as resolveValaxyConfig,z as resolveValaxyConfigFromRoot,Y as run,Q as ssgBuild,V as startValaxyDev,m as toAtFS,j as transformObject};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "valaxy",
3
3
  "type": "module",
4
- "version": "0.22.11",
4
+ "version": "0.22.12",
5
5
  "description": "📄 Vite & Vue powered static blog generator.",
6
6
  "author": {
7
7
  "email": "me@yunyoujun.cn",
@@ -125,8 +125,8 @@
125
125
  "vue-i18n": "^11.1.1",
126
126
  "vue-router": "^4.5.0",
127
127
  "yargs": "^17.7.2",
128
- "@valaxyjs/devtools": "0.22.11",
129
- "@valaxyjs/utils": "0.22.11"
128
+ "@valaxyjs/devtools": "0.22.12",
129
+ "@valaxyjs/utils": "0.22.12"
130
130
  },
131
131
  "devDependencies": {
132
132
  "@mdit-vue/plugin-component": "^2.1.3",