@sisense/sdk-ui 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +19 -19
- package/dist/ai.js +623 -613
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +252 -217
- package/dist/analytics-composer.cjs +18 -18
- package/dist/analytics-composer.js +18 -9
- package/dist/{derive-chart-family-mugR7Ty1.cjs → derive-chart-family-DJUpWKOP.cjs} +69 -64
- package/dist/{derive-chart-family-YIDiS_iY.js → derive-chart-family-D_bylSQy.js} +8340 -8069
- package/dist/{dimensions-DmRfLrT-.js → dimensions-CTUJhW-M.js} +1 -1
- package/dist/{dimensions-CyzZ0dbM.cjs → dimensions-CdNGgk9I.cjs} +1 -1
- package/dist/execute-query-CNt566O5.cjs +1 -0
- package/dist/{execute-query-BCEeyd9s.js → execute-query-DyjkDYHG.js} +1494 -1431
- package/dist/index.cjs +24 -24
- package/dist/index.js +7449 -7168
- package/dist/index.umd.js +351 -349
- package/dist/packages/sdk-ui/src/ai/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +22 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +3 -2
- package/dist/packages/sdk-ui/src/app/settings/settings.d.ts +49 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/constants.d.ts +12 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/index.d.ts +25 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/continuous-axes-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/helpers.d.ts +24 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options/split-axes-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/chart-options.d.ts +9 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/index.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/calendar-data-generator.d.ts +12 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/series-options.d.ts +9 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap-charts-grid.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-helpers.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-per-chart-instance.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/sizing-helpers.d.ts +16 -3
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/view-helpers.d.ts +4 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-chart-options.d.ts +7 -6
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/utils/calendar-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/funnel-chart/design-options/index.d.ts +14 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/design-options/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/treemap-chart/design-options/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +12 -15
- package/dist/packages/sdk-ui/src/chart-options-processor/series-labels.d.ts +17 -17
- package/dist/packages/sdk-ui/src/chart-options-processor/stack-labels.d.ts +18 -22
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +7 -6
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/funnel-plot-options.d.ts +12 -17
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-plot-options.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-labels.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +3 -2
- package/dist/packages/sdk-ui/src/common/components/menu/context-menu/context-menu.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/helpers.d.ts +11 -0
- package/dist/packages/sdk-ui/src/dashboard/components/toolbar/edit-toggle.d.ts +25 -0
- package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +2 -2
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +0 -30
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +3 -2
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-tabber.d.ts +25 -10
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +83 -11
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +1 -1
- package/dist/packages/sdk-ui/src/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +15 -3
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +1 -10
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +5 -5
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator/tabber.d.ts +21 -0
- package/dist/packages/sdk-ui/src/models/widget/{widget-model-translator.d.ts → widget-model-translator/widget-model-translator.d.ts} +15 -15
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +6 -0
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +7 -1
- package/dist/packages/sdk-ui/src/props.d.ts +8 -20
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +2 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/types.d.ts +157 -107
- package/dist/packages/sdk-ui/src/utils/gradient.d.ts +396 -0
- package/dist/packages/sdk-ui/src/utils/omit-undefined.d.ts +21 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options/tabber.d.ts +23 -0
- package/dist/packages/sdk-ui/src/widget-by-id/{translate-widget-style-options.d.ts → translate-widget-style-options/translate-widget-style-options.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +38 -3
- package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +30 -2
- package/dist/packages/sdk-ui/src/widgets/tabber/tabber-buttons-widget.d.ts +8 -0
- package/dist/packages/sdk-ui/src/widgets/tabber/types.d.ts +110 -0
- package/dist/{types-CevYjGN4.cjs → types-D1qM-ltg.cjs} +1 -1
- package/dist/{types-DVAfvbpR.js → types-DglXXR-Q.js} +1 -1
- package/dist/{use-common-filters-DIF4c8WP.js → use-common-filters-BGrn7zoW.js} +22269 -21424
- package/dist/use-common-filters-DxzCHhgF.cjs +846 -0
- package/dist/{widget-composer-C0lZpwN6.cjs → widget-composer-C24YJEek.cjs} +6 -10
- package/dist/{widget-composer-BB5Jrgae.js → widget-composer-lBv40CFf.js} +132 -135
- package/package.json +7 -7
- package/dist/execute-query-Xt9drS3G.cjs +0 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/highcharts-options-builder.d.ts +0 -8
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options.d.ts +0 -12
- package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +0 -41
- package/dist/use-common-filters-BXdnB4GI.cjs +0 -845
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var Ws=Object.defineProperty,Gs=Object.defineProperties;var Hs=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable;var at=(s,e)=>(e=Symbol[s])?e:Symbol.for("Symbol."+s),xs=s=>{throw TypeError(s)};var Kt=(s,e,t)=>e in s?Ws(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,U=(s,e)=>{for(var t in e||(e={}))Ft.call(e,t)&&Kt(s,t,e[t]);if(ve)for(var t of ve(e))Rt.call(e,t)&&Kt(s,t,e[t]);return s},H=(s,e)=>Gs(s,Hs(e));var Ut=(s,e)=>{var t={};for(var n in s)Ft.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&ve)for(var n of ve(s))e.indexOf(n)<0&&Rt.call(s,n)&&(t[n]=s[n]);return t};var ct=(s,e,t)=>new Promise((n,i)=>{var r=a=>{try{l(t.next(a))}catch(c){i(c)}},o=a=>{try{l(t.throw(a))}catch(c){i(c)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(r,o);l((t=t.apply(s,e)).next())}),zs=function(s,e){this[0]=s,this[1]=e};var d=s=>{var e=s[at("asyncIterator")],t=!1,n,i={};return e==null?(e=s[at("iterator")](),n=r=>i[r]=o=>e[r](o)):(e=e.call(s),n=r=>i[r]=o=>{if(t){if(t=!1,r==="throw")throw o;return o}return t=!0,{done:!1,value:new zs(new Promise(l=>{var a=e[r](o);a instanceof Object||xs("Object expected"),l(a)}),1)}}),i[at("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=r=>{throw r},"return"in e&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./types-
|
|
1
|
+
"use strict";var Ws=Object.defineProperty,Gs=Object.defineProperties;var Hs=Object.getOwnPropertyDescriptors;var ve=Object.getOwnPropertySymbols;var Ft=Object.prototype.hasOwnProperty,Rt=Object.prototype.propertyIsEnumerable;var at=(s,e)=>(e=Symbol[s])?e:Symbol.for("Symbol."+s),xs=s=>{throw TypeError(s)};var Kt=(s,e,t)=>e in s?Ws(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,U=(s,e)=>{for(var t in e||(e={}))Ft.call(e,t)&&Kt(s,t,e[t]);if(ve)for(var t of ve(e))Rt.call(e,t)&&Kt(s,t,e[t]);return s},H=(s,e)=>Gs(s,Hs(e));var Ut=(s,e)=>{var t={};for(var n in s)Ft.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&ve)for(var n of ve(s))e.indexOf(n)<0&&Rt.call(s,n)&&(t[n]=s[n]);return t};var ct=(s,e,t)=>new Promise((n,i)=>{var r=a=>{try{l(t.next(a))}catch(c){i(c)}},o=a=>{try{l(t.throw(a))}catch(c){i(c)}},l=a=>a.done?n(a.value):Promise.resolve(a.value).then(r,o);l((t=t.apply(s,e)).next())}),zs=function(s,e){this[0]=s,this[1]=e};var d=s=>{var e=s[at("asyncIterator")],t=!1,n,i={};return e==null?(e=s[at("iterator")](),n=r=>i[r]=o=>e[r](o)):(e=e.call(s),n=r=>i[r]=o=>{if(t){if(t=!1,r==="throw")throw o;return o}return t=!0,{done:!1,value:new zs(new Promise(l=>{var a=e[r](o);a instanceof Object||xs("Object expected"),l(a)}),1)}}),i[at("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=r=>{throw r},"return"in e&&n("return"),i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("./types-D1qM-ltg.cjs"),T=require("./widget-composer-C24YJEek.cjs"),Ve=require("./derive-chart-family-DJUpWKOP.cjs"),Nt=require("./analytics-composer/node.cjs"),Pe=require("./execute-query-CNt566O5.cjs"),Tt=Symbol.for("yaml.alias"),gt=Symbol.for("yaml.document"),x=Symbol.for("yaml.map"),ts=Symbol.for("yaml.pair"),G=Symbol.for("yaml.scalar"),ge=Symbol.for("yaml.seq"),R=Symbol.for("yaml.node.type"),re=s=>!!s&&typeof s=="object"&&s[R]===Tt,be=s=>!!s&&typeof s=="object"&&s[R]===gt,we=s=>!!s&&typeof s=="object"&&s[R]===x,C=s=>!!s&&typeof s=="object"&&s[R]===ts,A=s=>!!s&&typeof s=="object"&&s[R]===G,Se=s=>!!s&&typeof s=="object"&&s[R]===ge;function _(s){if(s&&typeof s=="object")switch(s[R]){case x:case ge:return!0}return!1}function v(s){if(s&&typeof s=="object")switch(s[R]){case Tt:case x:case G:case ge:return!0}return!1}const Xs=s=>(A(s)||_(s))&&!!s.anchor,q=Symbol("break visit"),ss=Symbol("skip children"),Q=Symbol("remove node");function z(s,e){const t=ns(e);be(s)?ce(null,s.contents,t,Object.freeze([s]))===Q&&(s.contents=null):ce(null,s,t,Object.freeze([]))}z.BREAK=q;z.SKIP=ss;z.REMOVE=Q;function ce(s,e,t,n){const i=is(s,e,t,n);if(v(i)||C(i))return rs(s,n,i),ce(s,i,t,n);if(typeof i!="symbol"){if(_(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=ce(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===q)return q;o===Q&&(e.items.splice(r,1),r-=1)}}}else if(C(e)){n=Object.freeze(n.concat(e));const r=ce("key",e.key,t,n);if(r===q)return q;r===Q&&(e.key=null);const o=ce("value",e.value,t,n);if(o===q)return q;o===Q&&(e.value=null)}}return i}function Ge(s,e){return ct(this,null,function*(){const t=ns(e);be(s)?(yield fe(null,s.contents,t,Object.freeze([s])))===Q&&(s.contents=null):yield fe(null,s,t,Object.freeze([]))})}Ge.BREAK=q;Ge.SKIP=ss;Ge.REMOVE=Q;function fe(s,e,t,n){return ct(this,null,function*(){const i=yield is(s,e,t,n);if(v(i)||C(i))return rs(s,n,i),fe(s,i,t,n);if(typeof i!="symbol"){if(_(e)){n=Object.freeze(n.concat(e));for(let r=0;r<e.items.length;++r){const o=yield fe(r,e.items[r],t,n);if(typeof o=="number")r=o-1;else{if(o===q)return q;o===Q&&(e.items.splice(r,1),r-=1)}}}else if(C(e)){n=Object.freeze(n.concat(e));const r=yield fe("key",e.key,t,n);if(r===q)return q;r===Q&&(e.key=null);const o=yield fe("value",e.value,t,n);if(o===q)return q;o===Q&&(e.value=null)}}return i})}function ns(s){return typeof s=="object"&&(s.Collection||s.Node||s.Value)?Object.assign({Alias:s.Node,Map:s.Node,Scalar:s.Node,Seq:s.Node},s.Value&&{Map:s.Value,Scalar:s.Value,Seq:s.Value},s.Collection&&{Map:s.Collection,Seq:s.Collection},s):s}function is(s,e,t,n){var i,r,o,l,a;if(typeof t=="function")return t(s,e,n);if(we(e))return(i=t.Map)==null?void 0:i.call(t,s,e,n);if(Se(e))return(r=t.Seq)==null?void 0:r.call(t,s,e,n);if(C(e))return(o=t.Pair)==null?void 0:o.call(t,s,e,n);if(A(e))return(l=t.Scalar)==null?void 0:l.call(t,s,e,n);if(re(e))return(a=t.Alias)==null?void 0:a.call(t,s,e,n)}function rs(s,e,t){const n=e[e.length-1];if(_(n))n.items[s]=t;else if(C(n))s==="key"?n.key=t:n.value=t;else if(be(n))n.contents=t;else{const i=re(n)?"alias":"scalar";throw new Error(`Cannot replace node with ${i} parent`)}}const Zs={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},en=s=>s.replace(/[!,[\]{}]/g,e=>Zs[e]);class j{constructor(e,t){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},j.defaultYaml,e),this.tags=Object.assign({},j.defaultTags,t)}clone(){const e=new j(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new j(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:j.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},j.defaultTags);break}return e}add(e,t){this.atNextDocument&&(this.yaml={explicit:j.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},j.defaultTags),this.atNextDocument=!1);const n=e.trim().split(/[ \t]+/),i=n.shift();switch(i){case"%TAG":{if(n.length!==2&&(t(0,"%TAG directive should contain exactly two parts"),n.length<2))return!1;const[r,o]=n;return this.tags[r]=o,!0}case"%YAML":{if(this.yaml.explicit=!0,n.length!==1)return t(0,"%YAML directive should contain exactly one part"),!1;const[r]=n;if(r==="1.1"||r==="1.2")return this.yaml.version=r,!0;{const o=/^\d+\.\d+$/.test(r);return t(6,`Unsupported YAML version ${r}`,o),!1}}default:return t(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e==="!")return"!";if(e[0]!=="!")return t(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const o=e.slice(2,-1);return o==="!"||o==="!!"?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&t("Verbatim tags must end with a >"),o)}const[,n,i]=e.match(new RegExp("^(.*!)([^!]*)$","s"));i||t(`The ${e} tag has no suffix`);const r=this.tags[n];if(r)try{return r+decodeURIComponent(i)}catch(o){return t(String(o)),null}return n==="!"?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+en(e.substring(n.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],n=Object.entries(this.tags);let i;if(e&&n.length>0&&v(e.contents)){const r={};z(e.contents,(o,l)=>{v(l)&&l.tag&&(r[l.tag]=!0)}),i=Object.keys(r)}else i=[];for(const[r,o]of n)r==="!!"&&o==="tag:yaml.org,2002:"||(!e||i.some(l=>l.startsWith(o)))&&t.push(`%TAG ${r} ${o}`);return t.join(`
|
|
2
2
|
`)}}j.defaultYaml={explicit:!1,version:"1.2"};j.defaultTags={"!!":"tag:yaml.org,2002:"};function os(s){if(/[\x00-\x19\s,[\]{}]/.test(s)){const t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(s)}`;throw new Error(t)}return!0}function ls(s){const e=new Set;return z(s,{Value(t,n){n.anchor&&e.add(n.anchor)}}),e}function as(s,e){for(let t=1;;++t){const n=`${s}${t}`;if(!e.has(n))return n}}function tn(s,e){const t=[],n=new Map;let i=null;return{onAnchor:r=>{t.push(r),i||(i=ls(s));const o=as(e,i);return i.add(o),o},setAnchors:()=>{for(const r of t){const o=n.get(r);if(typeof o=="object"&&o.anchor&&(A(o.node)||_(o.node)))o.node.anchor=o.anchor;else{const l=new Error("Failed to resolve repeated object (this should not happen)");throw l.source=r,l}}},sourceObjects:n}}function ue(s,e,t,n){if(n&&typeof n=="object")if(Array.isArray(n))for(let i=0,r=n.length;i<r;++i){const o=n[i],l=ue(s,n,String(i),o);l===void 0?delete n[i]:l!==o&&(n[i]=l)}else if(n instanceof Map)for(const i of Array.from(n.keys())){const r=n.get(i),o=ue(s,n,i,r);o===void 0?n.delete(i):o!==r&&n.set(i,o)}else if(n instanceof Set)for(const i of Array.from(n)){const r=ue(s,n,i,i);r===void 0?n.delete(i):r!==i&&(n.delete(i),n.add(r))}else for(const[i,r]of Object.entries(n)){const o=ue(s,n,i,r);o===void 0?delete n[i]:o!==r&&(n[i]=o)}return s.call(e,t,n)}function F(s,e,t){if(Array.isArray(s))return s.map((n,i)=>F(n,String(i),t));if(s&&typeof s.toJSON=="function"){if(!t||!Xs(s))return s.toJSON(e,t);const n={aliasCount:0,count:1,res:void 0};t.anchors.set(s,n),t.onCreate=r=>{n.res=r,delete t.onCreate};const i=s.toJSON(e,t);return t.onCreate&&t.onCreate(i),i}return typeof s=="bigint"&&!(t!=null&&t.keep)?Number(s):s}class Et{constructor(e){Object.defineProperty(this,R,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:i,reviver:r}={}){if(!be(e))throw new TypeError("A document argument is required");const o={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n=="number"?n:100},l=F(this,"",o);if(typeof i=="function")for(const{count:a,res:c}of o.anchors.values())i(c,a);return typeof r=="function"?ue(r,{"":l},"",l):l}}class He extends Et{constructor(e){super(Tt),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return z(e,{Node:(n,i)=>{if(i===this)return z.BREAK;i.anchor===this.source&&(t=i)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:n,doc:i,maxAliasCount:r}=t,o=this.resolve(i);if(!o){const a=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(a)}let l=n.get(o);if(l||(F(o,null,t),l=n.get(o)),!l||l.res===void 0){const a="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(a)}if(r>=0&&(l.count+=1,l.aliasCount===0&&(l.aliasCount=Ke(i,o,n)),l.count*l.aliasCount>r)){const a="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(a)}return l.res}toString(e,t,n){const i=`*${this.source}`;if(e){if(os(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const r=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(r)}if(e.implicitKey)return`${i} `}return i}}function Ke(s,e,t){if(re(e)){const n=e.resolve(s),i=t&&n&&t.get(n);return i?i.count*i.aliasCount:0}else if(_(e)){let n=0;for(const i of e.items){const r=Ke(s,i,t);r>n&&(n=r)}return n}else if(C(e)){const n=Ke(s,e.key,t),i=Ke(s,e.value,t);return Math.max(n,i)}return 1}const cs=s=>!s||typeof s!="function"&&typeof s!="object";class O extends Et{constructor(e){super(G),this.value=e}toJSON(e,t){return t!=null&&t.keep?this.value:F(this.value,e,t)}toString(){return String(this.value)}}O.BLOCK_FOLDED="BLOCK_FOLDED";O.BLOCK_LITERAL="BLOCK_LITERAL";O.PLAIN="PLAIN";O.QUOTE_DOUBLE="QUOTE_DOUBLE";O.QUOTE_SINGLE="QUOTE_SINGLE";const sn="tag:yaml.org,2002:";function nn(s,e,t){var n;if(e){const i=t.filter(o=>o.tag===e),r=(n=i.find(o=>!o.format))!=null?n:i[0];if(!r)throw new Error(`Tag ${e} not found`);return r}return t.find(i=>{var r;return((r=i.identify)==null?void 0:r.call(i,s))&&!i.format})}function Ae(s,e,t){var f,p,m;if(be(s)&&(s=s.contents),v(s))return s;if(C(s)){const y=(p=(f=t.schema[x]).createNode)==null?void 0:p.call(f,t.schema,null,t);return y.items.push(s),y}(s instanceof String||s instanceof Number||s instanceof Boolean||typeof BigInt!="undefined"&&s instanceof BigInt)&&(s=s.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:r,schema:o,sourceObjects:l}=t;let a;if(n&&s&&typeof s=="object"){if(a=l.get(s),a)return a.anchor||(a.anchor=i(s)),new He(a.anchor);a={anchor:null,node:null},l.set(s,a)}e!=null&&e.startsWith("!!")&&(e=sn+e.slice(2));let c=nn(s,e,o.tags);if(!c){if(s&&typeof s.toJSON=="function"&&(s=s.toJSON()),!s||typeof s!="object"){const y=new O(s);return a&&(a.node=y),y}c=s instanceof Map?o[x]:Symbol.iterator in Object(s)?o[ge]:o[x]}r&&(r(c),delete t.onTagObj);const h=c!=null&&c.createNode?c.createNode(t.schema,s,t):typeof((m=c==null?void 0:c.nodeClass)==null?void 0:m.from)=="function"?c.nodeClass.from(t.schema,s,t):new O(s);return e?h.tag=e:c.default||(h.tag=c.tag),a&&(a.node=h),h}function Je(s,e,t){let n=t;for(let i=e.length-1;i>=0;--i){const r=e[i];if(typeof r=="number"&&Number.isInteger(r)&&r>=0){const o=[];o[r]=n,n=o}else n=new Map([[r,n]])}return Ae(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:s,sourceObjects:new Map})}const Ee=s=>s==null||typeof s=="object"&&!!s[Symbol.iterator]().next().done;class fs extends Et{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(n=>v(n)||C(n)?n.clone(e):n),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(Ee(e))this.add(t);else{const[n,...i]=e,r=this.get(n,!0);if(_(r))r.addIn(i,t);else if(r===void 0&&this.schema)this.set(n,Je(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}deleteIn(e){const[t,...n]=e;if(n.length===0)return this.delete(t);const i=this.get(t,!0);if(_(i))return i.deleteIn(n);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){const[n,...i]=e,r=this.get(n,!0);return i.length===0?!t&&A(r)?r.value:r:_(r)?r.getIn(i,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!C(t))return!1;const n=t.value;return n==null||e&&A(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){const[t,...n]=e;if(n.length===0)return this.has(t);const i=this.get(t,!0);return _(i)?i.hasIn(n):!1}setIn(e,t){const[n,...i]=e;if(i.length===0)this.set(n,t);else{const r=this.get(n,!0);if(_(r))r.setIn(i,t);else if(r===void 0&&this.schema)this.set(n,Je(this.schema,i,t));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${i}`)}}}const rn=s=>s.replace(/^(?!$)(?: $)?/gm,"#");function Y(s,e){return/^\n+$/.test(s)?s.substring(1):e?s.replace(/^(?! *$)/gm,e):s}const te=(s,e,t)=>s.endsWith(`
|
|
3
3
|
`)?Y(t,e):t.includes(`
|
|
4
4
|
`)?`
|
|
@@ -39,34 +39,34 @@ ${Y(L,t.indent)}`}N===""&&!t.inFlow?E===`
|
|
|
39
39
|
|
|
40
40
|
`):E+=`
|
|
41
41
|
${t.indent}`}else if(!m&&_(e)){const L=N[0],M=N.indexOf(`
|
|
42
|
-
`),
|
|
42
|
+
`),B=M!==-1,Z=(w=($=t.inFlow)!=null?$:e.flow)!=null?w:e.items.length===0;if(B||!Z){let oe=!1;if(B&&(L==="&"||L==="!")){let P=N.indexOf(" ");L==="&"&&P!==-1&&P<M&&N[P+1]==="!"&&(P=N.indexOf(" ",P+1)),(P===-1||M<P)&&(oe=!0)}oe||(E=`
|
|
43
43
|
${t.indent}`)}}else(N===""||N[0]===`
|
|
44
|
-
`)&&(E="");return g+=E+N,t.inFlow?k&&n&&n():I&&!k?g+=te(g,t.indent,c(I)):u&&i&&i(),g}function ds(s,e){(s==="debug"||s==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Jt="<<";function ps(s,e,{key:t,value:n}){if(s!=null&&s.doc.schema.merge&&un(t))if(n=re(n)?n.resolve(s.doc):n,Se(n))for(const i of n.items)ft(s,e,i);else if(Array.isArray(n))for(const i of n)ft(s,e,i);else ft(s,e,n);else{const i=F(t,"",s);if(e instanceof Map)e.set(i,F(n,i,s));else if(e instanceof Set)e.add(i);else{const r=hn(t,i,s),o=F(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}const un=s=>s===Jt||A(s)&&s.value===Jt&&(!s.type||s.type===O.PLAIN);function ft(s,e,t){const n=s&&re(t)?t.resolve(s.doc):t;if(!we(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,s,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function hn(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(v(s)&&(t!=null&&t.doc)){const n=hs(t.doc,{});n.anchors=new Set;for(const r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;const i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),ds(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function It(s,e,t){const n=Ae(s,void 0,t),i=Ae(e,void 0,t);return new
|
|
44
|
+
`)&&(E="");return g+=E+N,t.inFlow?k&&n&&n():I&&!k?g+=te(g,t.indent,c(I)):u&&i&&i(),g}function ds(s,e){(s==="debug"||s==="warn")&&(typeof process!="undefined"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const Jt="<<";function ps(s,e,{key:t,value:n}){if(s!=null&&s.doc.schema.merge&&un(t))if(n=re(n)?n.resolve(s.doc):n,Se(n))for(const i of n.items)ft(s,e,i);else if(Array.isArray(n))for(const i of n)ft(s,e,i);else ft(s,e,n);else{const i=F(t,"",s);if(e instanceof Map)e.set(i,F(n,i,s));else if(e instanceof Set)e.add(i);else{const r=hn(t,i,s),o=F(n,r,s);r in e?Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0}):e[r]=o}}return e}const un=s=>s===Jt||A(s)&&s.value===Jt&&(!s.type||s.type===O.PLAIN);function ft(s,e,t){const n=s&&re(t)?t.resolve(s.doc):t;if(!we(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,s,Map);for(const[r,o]of i)e instanceof Map?e.has(r)||e.set(r,o):e instanceof Set?e.add(r):Object.prototype.hasOwnProperty.call(e,r)||Object.defineProperty(e,r,{value:o,writable:!0,enumerable:!0,configurable:!0});return e}function hn(s,e,t){if(e===null)return"";if(typeof e!="object")return String(e);if(v(s)&&(t!=null&&t.doc)){const n=hs(t.doc,{});n.anchors=new Set;for(const r of t.anchors.keys())n.anchors.add(r.anchor);n.inFlow=!0,n.inStringifyKey=!0;const i=s.toString(n);if(!t.mapKeyWarned){let r=JSON.stringify(i);r.length>40&&(r=r.substring(0,36)+'..."'),ds(t.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${r}. Set mapAsMap: true to use object keys.`),t.mapKeyWarned=!0}return i}return JSON.stringify(e)}function It(s,e,t){const n=Ae(s,void 0,t),i=Ae(e,void 0,t);return new D(n,i)}class D{constructor(e,t=null){Object.defineProperty(this,R,{value:ts}),this.key=e,this.value=t}clone(e){let{key:t,value:n}=this;return v(t)&&(t=t.clone(e)),v(n)&&(n=n.clone(e)),new D(t,n)}toJSON(e,t){const n=t!=null&&t.mapAsMap?new Map:{};return ps(t,n,this)}toString(e,t,n){return e!=null&&e.doc?fn(this,e,t,n):JSON.stringify(this)}}function ms(s,e,t){var r;return(((r=e.inFlow)!=null?r:s.flow)?pn:dn)(s,e,t)}function dn({comment:s,items:e},t,{blockItemPrefix:n,flowChars:i,itemIndent:r,onChompKeep:o,onComment:l}){const{indent:a,options:{commentString:c}}=t,h=Object.assign({},t,{indent:r,type:null});let f=!1;const p=[];for(let y=0;y<e.length;++y){const u=e[y];let g=null;if(v(u))!f&&u.spaceBefore&&p.push(""),Qe(t,p,u.commentBefore,f),u.comment&&(g=u.comment);else if(C(u)){const S=v(u.key)?u.key:null;S&&(!f&&S.spaceBefore&&p.push(""),Qe(t,p,S.commentBefore,f))}f=!1;let b=me(u,h,()=>g=null,()=>f=!0);g&&(b+=te(b,r,c(g))),f&&g&&(f=!1),p.push(n+b)}let m;if(p.length===0)m=i.start+i.end;else{m=p[0];for(let y=1;y<p.length;++y){const u=p[y];m+=u?`
|
|
45
45
|
${a}${u}`:`
|
|
46
46
|
`}}return s?(m+=`
|
|
47
47
|
`+Y(c(s),a),l&&l()):f&&o&&o(),m}function pn({items:s},e,{flowChars:t,itemIndent:n}){const{indent:i,indentStep:r,flowCollectionPadding:o,options:{commentString:l}}=e;n+=r;const a=Object.assign({},e,{indent:n,inFlow:!0,type:null});let c=!1,h=0;const f=[];for(let y=0;y<s.length;++y){const u=s[y];let g=null;if(v(u))u.spaceBefore&&f.push(""),Qe(e,f,u.commentBefore,!1),u.comment&&(g=u.comment);else if(C(u)){const S=v(u.key)?u.key:null;S&&(S.spaceBefore&&f.push(""),Qe(e,f,S.commentBefore,!1),S.comment&&(c=!0));const I=v(u.value)?u.value:null;I?(I.comment&&(g=I.comment),I.commentBefore&&(c=!0)):u.value==null&&(S!=null&&S.comment)&&(g=S.comment)}g&&(c=!0);let b=me(u,a,()=>g=null);y<s.length-1&&(b+=","),g&&(b+=te(b,n,l(g))),!c&&(f.length>h||b.includes(`
|
|
48
48
|
`))&&(c=!0),f.push(b),h=f.length}const{start:p,end:m}=t;if(f.length===0)return p+m;if(!c){const y=f.reduce((u,g)=>u+g.length+2,2);c=e.options.lineWidth>0&&y>e.options.lineWidth}if(c){let y=p;for(const u of f)y+=u?`
|
|
49
49
|
${r}${i}${u}`:`
|
|
50
50
|
`;return`${y}
|
|
51
|
-
${i}${m}`}else return`${p}${o}${f.join(" ")}${o}${m}`}function Qe({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const r=Y(e(n),s);t.push(r.trimStart())}}function se(s,e){const t=A(e)?e.value:e;for(const n of s)if(C(n)&&(n.key===e||n.key===t||A(n.key)&&n.key.value===t))return n}class K extends fs{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(x,e),this.items=[]}static from(e,t,n){const{keepUndefined:i,replacer:r}=n,o=new this(e),l=(a,c)=>{if(typeof r=="function")c=r.call(t,a,c);else if(Array.isArray(r)&&!r.includes(a))return;(c!==void 0||i)&&o.items.push(It(a,c,n))};if(t instanceof Map)for(const[a,c]of t)l(a,c);else if(t&&typeof t=="object")for(const a of Object.keys(t))l(a,t[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let n;C(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new
|
|
52
|
-
`:" ")}return _e({comment:s,type:e,value:l},n,i,r)}};function Ns(s,e){var t;if(Se(s))for(let n=0;n<s.items.length;++n){let i=s.items[n];if(!C(i)){if(we(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");const r=i.items[0]||new
|
|
51
|
+
${i}${m}`}else return`${p}${o}${f.join(" ")}${o}${m}`}function Qe({indent:s,options:{commentString:e}},t,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const r=Y(e(n),s);t.push(r.trimStart())}}function se(s,e){const t=A(e)?e.value:e;for(const n of s)if(C(n)&&(n.key===e||n.key===t||A(n.key)&&n.key.value===t))return n}class K extends fs{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(x,e),this.items=[]}static from(e,t,n){const{keepUndefined:i,replacer:r}=n,o=new this(e),l=(a,c)=>{if(typeof r=="function")c=r.call(t,a,c);else if(Array.isArray(r)&&!r.includes(a))return;(c!==void 0||i)&&o.items.push(It(a,c,n))};if(t instanceof Map)for(const[a,c]of t)l(a,c);else if(t&&typeof t=="object")for(const a of Object.keys(t))l(a,t[a]);return typeof e.sortMapEntries=="function"&&o.items.sort(e.sortMapEntries),o}add(e,t){var o;let n;C(e)?n=e:!e||typeof e!="object"||!("key"in e)?n=new D(e,e==null?void 0:e.value):n=new D(e.key,e.value);const i=se(this.items,n.key),r=(o=this.schema)==null?void 0:o.sortMapEntries;if(i){if(!t)throw new Error(`Key ${n.key} already set`);A(i.value)&&cs(n.value)?i.value.value=n.value:i.value=n.value}else if(r){const l=this.items.findIndex(a=>r(n,a)<0);l===-1?this.items.push(n):this.items.splice(l,0,n)}else this.items.push(n)}delete(e){const t=se(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){var r;const n=se(this.items,e),i=n==null?void 0:n.value;return(r=!t&&A(i)?i.value:i)!=null?r:void 0}has(e){return!!se(this.items,e)}set(e,t){this.add(new D(e,t),!0)}toJSON(e,t,n){const i=n?new n:t!=null&&t.mapAsMap?new Map:{};t!=null&&t.onCreate&&t.onCreate(i);for(const r of this.items)ps(t,i,r);return i}toString(e,t,n){if(!e)return JSON.stringify(this);for(const i of this.items)if(!C(i))throw new Error(`Map items must all be pairs; found ${JSON.stringify(i)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),ms(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:n,onComment:t})}}const ke={collection:"map",default:!0,nodeClass:K,tag:"tag:yaml.org,2002:map",resolve(s,e){return we(s)||e("Expected a mapping for this tag"),s},createNode:(s,e,t)=>K.from(s,e,t)};class X extends fs{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(ge,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=Be(e);return typeof t!="number"?!1:this.items.splice(t,1).length>0}get(e,t){const n=Be(e);if(typeof n!="number")return;const i=this.items[n];return!t&&A(i)?i.value:i}has(e){const t=Be(e);return typeof t=="number"&&t<this.items.length}set(e,t){const n=Be(e);if(typeof n!="number")throw new Error(`Expected a valid index, not ${e}.`);const i=this.items[n];A(i)&&cs(t)?i.value=t:this.items[n]=t}toJSON(e,t){const n=[];t!=null&&t.onCreate&&t.onCreate(n);let i=0;for(const r of this.items)n.push(F(r,String(i++),t));return n}toString(e,t,n){return e?ms(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:n,onComment:t}):JSON.stringify(this)}static from(e,t,n){const{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t)){let o=0;for(let l of t){if(typeof i=="function"){const a=t instanceof Set?l:String(o++);l=i.call(t,a,l)}r.items.push(Ae(l,void 0,n))}}return r}}function Be(s){let e=A(s)?s.value:s;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Oe={collection:"seq",default:!0,nodeClass:X,tag:"tag:yaml.org,2002:seq",resolve(s,e){return Se(s)||e("Expected a sequence for this tag"),s},createNode:(s,e,t)=>X.from(s,e,t)},Ze={identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify(s,e,t,n){return e=Object.assign({actualString:!0},e),_e(s,e,t,n)}},et={identify:s=>s==null,createNode:()=>new O(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new O(null),stringify:({source:s},e)=>typeof s=="string"&&et.test.test(s)?s:e.options.nullStr},At={identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:s=>new O(s[0]==="t"||s[0]==="T"),stringify({source:s,value:e},t){if(s&&At.test.test(s)){const n=s[0]==="t"||s[0]==="T";if(e===n)return s}return e?t.options.trueStr:t.options.falseStr}};function J({format:s,minFractionDigits:e,tag:t,value:n}){if(typeof n=="bigint")return String(n);const i=typeof n=="number"?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let r=JSON.stringify(n);if(!s&&e&&(!t||t==="tag:yaml.org,2002:float")&&/^\d/.test(r)){let o=r.indexOf(".");o<0&&(o=r.length,r+=".");let l=e-(r.length-o-1);for(;l-- >0;)r+="0"}return r}const ys={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:J},gs={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s),stringify(s){const e=Number(s.value);return isFinite(e)?e.toExponential():J(s)}},bs={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(s){const e=new O(parseFloat(s)),t=s.indexOf(".");return t!==-1&&s[s.length-1]==="0"&&(e.minFractionDigits=s.length-t-1),e},stringify:J},tt=s=>typeof s=="bigint"||Number.isInteger(s),Ct=(s,e,t,{intAsBigInt:n})=>n?BigInt(s):parseInt(s.substring(e),t);function ws(s,e,t){const{value:n}=s;return tt(n)&&n>=0?t+n.toString(e):J(s)}const Ss={identify:s=>tt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(s,e,t)=>Ct(s,2,8,t),stringify:s=>ws(s,8,"0o")},ks={identify:tt,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(s,e,t)=>Ct(s,0,10,t),stringify:J},Os={identify:s=>tt(s)&&s>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(s,e,t)=>Ct(s,2,16,t),stringify:s=>ws(s,16,"0x")},mn=[ke,Oe,Ze,et,At,Ss,ks,Os,ys,gs,bs];function Qt(s){return typeof s=="bigint"||Number.isInteger(s)}const De=({value:s})=>JSON.stringify(s),yn=[{identify:s=>typeof s=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:s=>s,stringify:De},{identify:s=>s==null,createNode:()=>new O(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:De},{identify:s=>typeof s=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:s=>s==="true",stringify:De},{identify:Qt,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(s,e,{intAsBigInt:t})=>t?BigInt(s):parseInt(s,10),stringify:({value:s})=>Qt(s)?s.toString():JSON.stringify(s)},{identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:s=>parseFloat(s),stringify:De}],gn={default:!0,tag:"",test:/^/,resolve(s,e){return e(`Unresolved plain scalar ${JSON.stringify(s)}`),s}},bn=[ke,Oe].concat(yn,gn),Lt={identify:s=>s instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(s,e){if(typeof Buffer=="function")return Buffer.from(s,"base64");if(typeof atob=="function"){const t=atob(s.replace(/[\n\r]/g,"")),n=new Uint8Array(t.length);for(let i=0;i<t.length;++i)n[i]=t.charCodeAt(i);return n}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),s},stringify({comment:s,type:e,value:t},n,i,r){const o=t;let l;if(typeof Buffer=="function")l=o instanceof Buffer?o.toString("base64"):Buffer.from(o.buffer).toString("base64");else if(typeof btoa=="function"){let a="";for(let c=0;c<o.length;++c)a+=String.fromCharCode(o[c]);l=btoa(a)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e||(e=O.BLOCK_LITERAL),e!==O.QUOTE_DOUBLE){const a=Math.max(n.options.lineWidth-n.indent.length,n.options.minContentWidth),c=Math.ceil(l.length/a),h=new Array(c);for(let f=0,p=0;f<c;++f,p+=a)h[f]=l.substr(p,a);l=h.join(e===O.BLOCK_LITERAL?`
|
|
52
|
+
`:" ")}return _e({comment:s,type:e,value:l},n,i,r)}};function Ns(s,e){var t;if(Se(s))for(let n=0;n<s.items.length;++n){let i=s.items[n];if(!C(i)){if(we(i)){i.items.length>1&&e("Each pair must have its own sequence indicator");const r=i.items[0]||new D(new O(null));if(i.commentBefore&&(r.key.commentBefore=r.key.commentBefore?`${i.commentBefore}
|
|
53
53
|
${r.key.commentBefore}`:i.commentBefore),i.comment){const o=(t=r.value)!=null?t:r.key;o.comment=o.comment?`${i.comment}
|
|
54
|
-
${o.comment}`:i.comment}i=r}s.items[n]=C(i)?i:new
|
|
54
|
+
${o.comment}`:i.comment}i=r}s.items[n]=C(i)?i:new D(i)}}else e("Expected a sequence for this tag");return s}function Ts(s,e,t){const{replacer:n}=t,i=new X(s);i.tag="tag:yaml.org,2002:pairs";let r=0;if(e&&Symbol.iterator in Object(e))for(let o of e){typeof n=="function"&&(o=n.call(e,String(r++),o));let l,a;if(Array.isArray(o))if(o.length===2)l=o[0],a=o[1];else throw new TypeError(`Expected [key, value] tuple: ${o}`);else if(o&&o instanceof Object){const c=Object.keys(o);if(c.length===1)l=c[0],a=o[l];else throw new TypeError(`Expected tuple with one key, not ${c.length} keys`)}else l=o;i.items.push(It(l,a,t))}return i}const _t={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ns,createNode:Ts};class de extends X{constructor(){super(),this.add=K.prototype.add.bind(this),this.delete=K.prototype.delete.bind(this),this.get=K.prototype.get.bind(this),this.has=K.prototype.has.bind(this),this.set=K.prototype.set.bind(this),this.tag=de.tag}toJSON(e,t){if(!t)return super.toJSON(e);const n=new Map;t!=null&&t.onCreate&&t.onCreate(n);for(const i of this.items){let r,o;if(C(i)?(r=F(i.key,"",t),o=F(i.value,r,t)):r=F(i,"",t),n.has(r))throw new Error("Ordered maps must not include duplicate keys");n.set(r,o)}return n}static from(e,t,n){const i=Ts(e,t,n),r=new this;return r.items=i.items,r}}de.tag="tag:yaml.org,2002:omap";const $t={collection:"seq",identify:s=>s instanceof Map,nodeClass:de,default:!1,tag:"tag:yaml.org,2002:omap",resolve(s,e){const t=Ns(s,e),n=[];for(const{key:i}of t.items)A(i)&&(n.includes(i.value)?e(`Ordered maps must not include duplicate keys: ${i.value}`):n.push(i.value));return Object.assign(new de,t)},createNode:(s,e,t)=>de.from(s,e,t)};function Es({value:s,source:e},t){return e&&(s?Is:As).test.test(e)?e:s?t.options.trueStr:t.options.falseStr}const Is={identify:s=>s===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new O(!0),stringify:Es},As={identify:s=>s===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new O(!1),stringify:Es},wn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:s=>s.slice(-3).toLowerCase()==="nan"?NaN:s[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:J},Sn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:s=>parseFloat(s.replace(/_/g,"")),stringify(s){const e=Number(s.value);return isFinite(e)?e.toExponential():J(s)}},kn={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(s){const e=new O(parseFloat(s.replace(/_/g,""))),t=s.indexOf(".");if(t!==-1){const n=s.substring(t+1).replace(/_/g,"");n[n.length-1]==="0"&&(e.minFractionDigits=n.length)}return e},stringify:J},$e=s=>typeof s=="bigint"||Number.isInteger(s);function st(s,e,t,{intAsBigInt:n}){const i=s[0];if((i==="-"||i==="+")&&(e+=1),s=s.substring(e).replace(/_/g,""),n){switch(t){case 2:s=`0b${s}`;break;case 8:s=`0o${s}`;break;case 16:s=`0x${s}`;break}const o=BigInt(s);return i==="-"?BigInt(-1)*o:o}const r=parseInt(s,t);return i==="-"?-1*r:r}function Mt(s,e,t){const{value:n}=s;if($e(n)){const i=n.toString(e);return n<0?"-"+t+i.substr(1):t+i}return J(s)}const On={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(s,e,t)=>st(s,2,2,t),stringify:s=>Mt(s,2,"0b")},Nn={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(s,e,t)=>st(s,1,8,t),stringify:s=>Mt(s,8,"0")},Tn={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(s,e,t)=>st(s,0,10,t),stringify:J},En={identify:$e,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(s,e,t)=>st(s,2,16,t),stringify:s=>Mt(s,16,"0x")};class pe extends K{constructor(e){super(e),this.tag=pe.tag}add(e){let t;C(e)?t=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?t=new D(e.key,null):t=new D(e,null),se(this.items,t.key)||this.items.push(t)}get(e,t){const n=se(this.items,e);return!t&&C(n)?A(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);const n=se(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new D(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw new Error("Set items must all have null values")}static from(e,t,n){const{replacer:i}=n,r=new this(e);if(t&&Symbol.iterator in Object(t))for(let o of t)typeof i=="function"&&(o=i.call(t,o,o)),r.items.push(It(o,null,n));return r}}pe.tag="tag:yaml.org,2002:set";const vt={collection:"map",identify:s=>s instanceof Set,nodeClass:pe,default:!1,tag:"tag:yaml.org,2002:set",createNode:(s,e,t)=>pe.from(s,e,t),resolve(s,e){if(we(s)){if(s.hasAllNullValues(!0))return Object.assign(new pe,s);e("Set items must all have null values")}else e("Expected a mapping for this tag");return s}};function Pt(s,e){const t=s[0],n=t==="-"||t==="+"?s.substring(1):s,i=o=>e?BigInt(o):Number(o),r=n.replace(/_/g,"").split(":").reduce((o,l)=>o*i(60)+i(l),i(0));return t==="-"?i(-1)*r:r}function Cs(s){let{value:e}=s,t=o=>o;if(typeof e=="bigint")t=o=>BigInt(o);else if(isNaN(e)||!isFinite(e))return J(s);let n="";e<0&&(n="-",e*=t(-1));const i=t(60),r=[e%i];return e<60?r.unshift(0):(e=(e-r[0])/i,r.unshift(e%i),e>=60&&(e=(e-r[0])/i,r.unshift(e))),n+r.map(o=>String(o).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Ls={identify:s=>typeof s=="bigint"||Number.isInteger(s),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(s,e,{intAsBigInt:t})=>Pt(s,t),stringify:Cs},_s={identify:s=>typeof s=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:s=>Pt(s,!1),stringify:Cs},nt={identify:s=>s instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(s){const e=s.match(nt.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,t,n,i,r,o,l]=e.map(Number),a=e[7]?Number((e[7]+"00").substr(1,3)):0;let c=Date.UTC(t,n-1,i,r||0,o||0,l||0,a);const h=e[8];if(h&&h!=="Z"){let f=Pt(h,!1);Math.abs(f)<30&&(f*=60),c-=6e4*f}return new Date(c)},stringify:({value:s})=>s.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")},Yt=[ke,Oe,Ze,et,Is,As,On,Nn,Tn,En,wn,Sn,kn,Lt,$t,_t,vt,Ls,_s,nt],Wt=new Map([["core",mn],["failsafe",[ke,Oe,Ze]],["json",bn],["yaml11",Yt],["yaml-1.1",Yt]]),Gt={binary:Lt,bool:At,float:bs,floatExp:gs,floatNaN:ys,floatTime:_s,int:ks,intHex:Os,intOct:Ss,intTime:Ls,map:ke,null:et,omap:$t,pairs:_t,seq:Oe,set:vt,timestamp:nt},In={"tag:yaml.org,2002:binary":Lt,"tag:yaml.org,2002:omap":$t,"tag:yaml.org,2002:pairs":_t,"tag:yaml.org,2002:set":vt,"tag:yaml.org,2002:timestamp":nt};function ut(s,e){let t=Wt.get(e);if(!t)if(Array.isArray(s))t=[];else{const n=Array.from(Wt.keys()).filter(i=>i!=="yaml11").map(i=>JSON.stringify(i)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${n} or define customTags array`)}if(Array.isArray(s))for(const n of s)t=t.concat(n);else typeof s=="function"&&(t=s(t.slice()));return t.map(n=>{if(typeof n!="string")return n;const i=Gt[n];if(i)return i;const r=Object.keys(Gt).map(o=>JSON.stringify(o)).join(", ");throw new Error(`Unknown custom tag "${n}"; use one of ${r}`)})}const An=(s,e)=>s.key<e.key?-1:s.key>e.key?1:0;class it{constructor({compat:e,customTags:t,merge:n,resolveKnownTags:i,schema:r,sortMapEntries:o,toStringDefaults:l}){this.compat=Array.isArray(e)?ut(e,"compat"):e?ut(null,e):null,this.merge=!!n,this.name=typeof r=="string"&&r||"core",this.knownTags=i?In:{},this.tags=ut(t,this.name),this.toStringOptions=l!=null?l:null,Object.defineProperty(this,x,{value:ke}),Object.defineProperty(this,G,{value:Ze}),Object.defineProperty(this,ge,{value:Oe}),this.sortMapEntries=typeof o=="function"?o:o===!0?An:null}clone(){const e=Object.create(it.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function Cn(s,e){var a;const t=[];let n=e.directives===!0;if(e.directives!==!1&&s.directives){const c=s.directives.toString(s);c?(t.push(c),n=!0):s.directives.docStart&&(n=!0)}n&&t.push("---");const i=hs(s,e),{commentString:r}=i.options;if(s.commentBefore){t.length!==1&&t.unshift("");const c=r(s.commentBefore);t.unshift(Y(c,""))}let o=!1,l=null;if(s.contents){if(v(s.contents)){if(s.contents.spaceBefore&&n&&t.push(""),s.contents.commentBefore){const f=r(s.contents.commentBefore);t.push(Y(f,""))}i.forceBlockIndent=!!s.comment,l=s.contents.comment}const c=l?void 0:()=>o=!0;let h=me(s.contents,i,()=>l=null,c);l&&(h+=te(h,"",r(l))),(h[0]==="|"||h[0]===">")&&t[t.length-1]==="---"?t[t.length-1]=`--- ${h}`:t.push(h)}else t.push(me(s.contents,i));if((a=s.directives)!=null&&a.docEnd)if(s.comment){const c=r(s.comment);c.includes(`
|
|
55
55
|
`)?(t.push("..."),t.push(Y(c,""))):t.push(`... ${c}`)}else t.push("...");else{let c=s.comment;c&&o&&(c=c.replace(/^\n+/,"")),c&&((!o||l)&&t[t.length-1]!==""&&t.push(""),t.push(Y(r(c),"")))}return t.join(`
|
|
56
56
|
`)+`
|
|
57
|
-
`}class Ne{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,R,{value:gt});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new j({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){const e=Object.create(Ne.prototype,{[R]:{value:gt}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=v(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){le(this.contents)&&this.contents.add(e)}addIn(e,t){le(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=ls(this);e.anchor=!t||n.has(t)?as(t||"a",n):t}return new He(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const g=S=>typeof S=="number"||S instanceof String||S instanceof Number,b=t.filter(g).map(String);b.length>0&&(t=t.concat(b)),i=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:h}=n!=null?n:{},{onAnchor:f,setAnchors:p,sourceObjects:m}=tn(this,o||"a"),y={aliasDuplicateObjects:r!=null?r:!0,keepUndefined:a!=null?a:!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:m},u=Ae(e,h,y);return l&&_(u)&&(u.flow=!0),p(),u}createPair(e,t,n={}){const i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new
|
|
57
|
+
`}class Ne{constructor(e,t,n){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,R,{value:gt});let i=null;typeof t=="function"||Array.isArray(t)?i=t:n===void 0&&t&&(n=t,t=void 0);const r=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,uniqueKeys:!0,version:"1.2"},n);this.options=r;let{version:o}=r;n!=null&&n._directives?(this.directives=n._directives.atDocument(),this.directives.yaml.explicit&&(o=this.directives.yaml.version)):this.directives=new j({version:o}),this.setSchema(o,n),this.contents=e===void 0?null:this.createNode(e,i,n)}clone(){const e=Object.create(Ne.prototype,{[R]:{value:gt}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=v(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){le(this.contents)&&this.contents.add(e)}addIn(e,t){le(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const n=ls(this);e.anchor=!t||n.has(t)?as(t||"a",n):t}return new He(e.anchor)}createNode(e,t,n){let i;if(typeof t=="function")e=t.call({"":e},"",e),i=t;else if(Array.isArray(t)){const g=S=>typeof S=="number"||S instanceof String||S instanceof Number,b=t.filter(g).map(String);b.length>0&&(t=t.concat(b)),i=t}else n===void 0&&t&&(n=t,t=void 0);const{aliasDuplicateObjects:r,anchorPrefix:o,flow:l,keepUndefined:a,onTagObj:c,tag:h}=n!=null?n:{},{onAnchor:f,setAnchors:p,sourceObjects:m}=tn(this,o||"a"),y={aliasDuplicateObjects:r!=null?r:!0,keepUndefined:a!=null?a:!1,onAnchor:f,onTagObj:c,replacer:i,schema:this.schema,sourceObjects:m},u=Ae(e,h,y);return l&&_(u)&&(u.flow=!0),p(),u}createPair(e,t,n={}){const i=this.createNode(e,null,n),r=this.createNode(t,null,n);return new D(i,r)}delete(e){return le(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ee(e)?this.contents==null?!1:(this.contents=null,!0):le(this.contents)?this.contents.deleteIn(e):!1}get(e,t){return _(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return Ee(e)?!t&&A(this.contents)?this.contents.value:this.contents:_(this.contents)?this.contents.getIn(e,t):void 0}has(e){return _(this.contents)?this.contents.has(e):!1}hasIn(e){return Ee(e)?this.contents!==void 0:_(this.contents)?this.contents.hasIn(e):!1}set(e,t){this.contents==null?this.contents=Je(this.schema,[e],t):le(this.contents)&&this.contents.set(e,t)}setIn(e,t){Ee(e)?this.contents=t:this.contents==null?this.contents=Je(this.schema,Array.from(e),t):le(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){typeof e=="number"&&(e=String(e));let n;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new j({version:"1.1"}),n={merge:!0,resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new j({version:e}),n={merge:!1,resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,n=null;break;default:{const i=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${i}`)}}if(t.schema instanceof Object)this.schema=t.schema;else if(n)this.schema=new it(Object.assign(n,t));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:t,mapAsMap:n,maxAliasCount:i,onAnchor:r,reviver:o}={}){const l={anchors:new Map,doc:this,keep:!e,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof i=="number"?i:100},a=F(this.contents,t!=null?t:"",l);if(typeof r=="function")for(const{count:c,res:h}of l.anchors.values())r(h,c);return typeof o=="function"?ue(o,{"":a},"",a):a}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return Cn(this,e)}}function le(s){if(_(s))return!0;throw new Error("Expected a YAML collection as document contents")}class Bt extends Error{constructor(e,t,n,i){super(),this.name=e,this.code=n,this.message=i,this.pos=t}}class ne extends Bt{constructor(e,t,n){super("YAMLParseError",e,t,n)}}class $s extends Bt{constructor(e,t,n){super("YAMLWarning",e,t,n)}}const Ye=(s,e)=>t=>{if(t.pos[0]===-1)return;t.linePos=t.pos.map(l=>e.linePos(l));const{line:n,col:i}=t.linePos[0];t.message+=` at line ${n}, column ${i}`;let r=i-1,o=s.substring(e.lineStarts[n-1],e.lineStarts[n]).replace(/[\n\r]+$/,"");if(r>=60&&o.length>80){const l=Math.min(r-39,o.length-79);o="…"+o.substring(l),r-=l-1}if(o.length>80&&(o=o.substring(0,79)+"…"),n>1&&/^ *$/.test(o.substring(0,r))){let l=s.substring(e.lineStarts[n-2],e.lineStarts[n-1]);l.length>80&&(l=l.substring(0,79)+`…
|
|
58
58
|
`),o=l+o}if(/[^ ]/.test(o)){let l=1;const a=t.linePos[1];a&&a.line===n&&a.col>i&&(l=Math.max(1,Math.min(a.col-i,80-r)));const c=" ".repeat(r)+"^".repeat(l);t.message+=`:
|
|
59
59
|
|
|
60
60
|
${o}
|
|
61
61
|
${c}
|
|
62
62
|
`}};function ye(s,{flow:e,indicator:t,next:n,offset:i,onError:r,parentIndent:o,startOnNewline:l}){let a=!1,c=l,h=l,f="",p="",m=!1,y=!1,u=null,g=null,b=null,S=null,I=null,k=null,N=null;for(const w of s)switch(y&&(w.type!=="space"&&w.type!=="newline"&&w.type!=="comma"&&r(w.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y=!1),u&&(c&&w.type!=="comment"&&w.type!=="newline"&&r(u,"TAB_AS_INDENT","Tabs are not allowed as indentation"),u=null),w.type){case"space":!e&&(t!=="doc-start"||(n==null?void 0:n.type)!=="flow-collection")&&w.source.includes(" ")&&(u=w),h=!0;break;case"comment":{h||r(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const L=w.source.substring(1)||" ";f?f+=p+L:f=L,p="",c=!1;break}case"newline":c?f?f+=w.source:a=!0:p+=w.source,c=!0,m=!0,(g||b)&&(S=w),h=!0;break;case"anchor":g&&r(w,"MULTIPLE_ANCHORS","A node can have at most one anchor"),w.source.endsWith(":")&&r(w.offset+w.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),g=w,N===null&&(N=w.offset),c=!1,h=!1,y=!0;break;case"tag":{b&&r(w,"MULTIPLE_TAGS","A node can have at most one tag"),b=w,N===null&&(N=w.offset),c=!1,h=!1,y=!0;break}case t:(g||b)&&r(w,"BAD_PROP_ORDER",`Anchors and tags must be after the ${w.source} indicator`),k&&r(w,"UNEXPECTED_TOKEN",`Unexpected ${w.source} in ${e!=null?e:"collection"}`),k=w,c=t==="seq-item-ind"||t==="explicit-key-ind",h=!1;break;case"comma":if(e){I&&r(w,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),I=w,c=!1,h=!1;break}default:r(w,"UNEXPECTED_TOKEN",`Unexpected ${w.type} token`),c=!1,h=!1}const E=s[s.length-1],$=E?E.offset+E.source.length:i;return y&&n&&n.type!=="space"&&n.type!=="newline"&&n.type!=="comma"&&(n.type!=="scalar"||n.source!=="")&&r(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),u&&(c&&u.indent<=o||(n==null?void 0:n.type)==="block-map"||(n==null?void 0:n.type)==="block-seq")&&r(u,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:I,found:k,spaceBefore:a,comment:f,hasNewline:m,anchor:g,tag:b,newlineAfterProp:S,end:$,start:N!=null?N:$}}function Ce(s){if(!s)return null;switch(s.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(s.source.includes(`
|
|
63
63
|
`))return!0;if(s.end){for(const e of s.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of s.items){for(const t of e.start)if(t.type==="newline")return!0;if(e.sep){for(const t of e.sep)if(t.type==="newline")return!0}if(Ce(e.key)||Ce(e.value))return!0}return!1;default:return!0}}function kt(s,e,t){if((e==null?void 0:e.type)==="flow-collection"){const n=e.end[0];n.indent===s&&(n.source==="]"||n.source==="}")&&Ce(e)&&t(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Ms(s,e,t){const{uniqueKeys:n}=s.options;if(n===!1)return!1;const i=typeof n=="function"?n:(r,o)=>r===o||A(r)&&A(o)&&r.value===o.value&&!(r.value==="<<"&&s.schema.merge);return e.some(r=>i(r.key,t))}const Ht="All mapping items must start at the same column";function Ln({composeNode:s,composeEmptyNode:e},t,n,i,r){var h,f;const o=(h=r==null?void 0:r.nodeClass)!=null?h:K,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(const p of n.items){const{start:m,key:y,sep:u,value:g}=p,b=ye(m,{indicator:"explicit-key-ind",next:y!=null?y:u==null?void 0:u[0],offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0}),S=!b.found;if(S){if(y&&(y.type==="block-seq"?i(a,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in y&&y.indent!==n.indent&&i(a,"BAD_INDENT",Ht)),!b.anchor&&!b.tag&&!u){c=b.end,b.comment&&(l.comment?l.comment+=`
|
|
64
|
-
`+b.comment:l.comment=b.comment);continue}(b.newlineAfterProp||Ce(y))&&i(y!=null?y:m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=b.found)==null?void 0:f.indent)!==n.indent&&i(a,"BAD_INDENT",Ht);const I=b.end,k=y?s(t,y,b,i):e(t,I,m,null,b,i);t.schema.compat&&kt(n.indent,y,i),Ms(t,l.items,k)&&i(I,"DUPLICATE_KEY","Map keys must be unique");const N=ye(u!=null?u:[],{indicator:"map-value-ind",next:g,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!y||y.type==="block-scalar"});if(a=N.end,N.found){S&&((g==null?void 0:g.type)==="block-map"&&!N.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&b.start<N.found.offset-1024&&i(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const E=g?s(t,g,N,i):e(t,a,u,null,N,i);t.schema.compat&&kt(n.indent,g,i),a=E.range[2];const $=new
|
|
65
|
-
`+N.comment:k.comment=N.comment);const E=new
|
|
64
|
+
`+b.comment:l.comment=b.comment);continue}(b.newlineAfterProp||Ce(y))&&i(y!=null?y:m[m.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((f=b.found)==null?void 0:f.indent)!==n.indent&&i(a,"BAD_INDENT",Ht);const I=b.end,k=y?s(t,y,b,i):e(t,I,m,null,b,i);t.schema.compat&&kt(n.indent,y,i),Ms(t,l.items,k)&&i(I,"DUPLICATE_KEY","Map keys must be unique");const N=ye(u!=null?u:[],{indicator:"map-value-ind",next:g,offset:k.range[2],onError:i,parentIndent:n.indent,startOnNewline:!y||y.type==="block-scalar"});if(a=N.end,N.found){S&&((g==null?void 0:g.type)==="block-map"&&!N.hasNewline&&i(a,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),t.options.strict&&b.start<N.found.offset-1024&&i(k.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const E=g?s(t,g,N,i):e(t,a,u,null,N,i);t.schema.compat&&kt(n.indent,g,i),a=E.range[2];const $=new D(k,E);t.options.keepSourceTokens&&($.srcToken=p),l.items.push($)}else{S&&i(k.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),N.comment&&(k.comment?k.comment+=`
|
|
65
|
+
`+N.comment:k.comment=N.comment);const E=new D(k);t.options.keepSourceTokens&&(E.srcToken=p),l.items.push(E)}}return c&&c<a&&i(c,"IMPOSSIBLE","Map comment with trailing content"),l.range=[n.offset,a,c!=null?c:a],l}function _n({composeNode:s,composeEmptyNode:e},t,n,i,r){var h;const o=(h=r==null?void 0:r.nodeClass)!=null?h:X,l=new o(t.schema);t.atRoot&&(t.atRoot=!1);let a=n.offset,c=null;for(const{start:f,value:p}of n.items){const m=ye(f,{indicator:"seq-item-ind",next:p,offset:a,onError:i,parentIndent:n.indent,startOnNewline:!0});if(!m.found)if(m.anchor||m.tag||p)p&&p.type==="block-seq"?i(m.end,"BAD_INDENT","All sequence items must start at the same column"):i(a,"MISSING_CHAR","Sequence item without - indicator");else{c=m.end,m.comment&&(l.comment=m.comment);continue}const y=p?s(t,p,m,i):e(t,m.end,f,null,m,i);t.schema.compat&&kt(n.indent,p,i),a=y.range[2],l.items.push(y)}return l.range=[n.offset,a,c!=null?c:a],l}function Me(s,e,t,n){let i="";if(s){let r=!1,o="";for(const l of s){const{source:a,type:c}=l;switch(c){case"space":r=!0;break;case"comment":{t&&!r&&n(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const h=a.substring(1)||" ";i?i+=o+h:i=h,o="";break}case"newline":i&&(o+=a),r=!0;break;default:n(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}e+=a.length}}return{comment:i,offset:e}}const ht="Block collections are not allowed within flow collections",dt=s=>s&&(s.type==="block-map"||s.type==="block-seq");function $n({composeNode:s,composeEmptyNode:e},t,n,i,r){var g,b;const o=n.start.source==="{",l=o?"flow map":"flow sequence",a=(g=r==null?void 0:r.nodeClass)!=null?g:o?K:X,c=new a(t.schema);c.flow=!0;const h=t.atRoot;h&&(t.atRoot=!1);let f=n.offset+n.start.source.length;for(let S=0;S<n.items.length;++S){const I=n.items[S],{start:k,key:N,sep:E,value:$}=I,w=ye(k,{flow:l,indicator:"explicit-key-ind",next:N!=null?N:E==null?void 0:E[0],offset:f,onError:i,parentIndent:n.indent,startOnNewline:!1});if(!w.found){if(!w.anchor&&!w.tag&&!E&&!$){S===0&&w.comma?i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`):S<n.items.length-1&&i(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${l}`),w.comment&&(c.comment?c.comment+=`
|
|
66
66
|
`+w.comment:c.comment=w.comment),f=w.end;continue}!o&&t.options.strict&&Ce(N)&&i(N,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(S===0)w.comma&&i(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${l}`);else if(w.comma||i(w.start,"MISSING_CHAR",`Missing , between ${l} items`),w.comment){let L="";e:for(const M of k)switch(M.type){case"comma":case"space":break;case"comment":L=M.source.substring(1);break e;default:break e}if(L){let M=c.items[c.items.length-1];C(M)&&(M=(b=M.value)!=null?b:M.key),M.comment?M.comment+=`
|
|
67
|
-
`+L:M.comment=L,w.comment=w.comment.substring(L.length+1)}}if(!o&&!E&&!w.found){const L=$?s(t,$,w,i):e(t,w.end,E,null,w,i);c.items.push(L),f=L.range[2],dt($)&&i(L.range,"BLOCK_IN_FLOW",ht)}else{const L=w.end,M=N?s(t,N,w,i):e(t,L,k,null,w,i);dt(N)&&i(M.range,"BLOCK_IN_FLOW",ht);const
|
|
68
|
-
`+
|
|
69
|
-
`+S.comment:c.comment=S.comment),c.range=[n.offset,u,S.offset]}else c.range=[n.offset,u,u];return c}function pt(s,e,t,n,i,r){const o=t.type==="block-map"?Ln(s,e,t,n,r):t.type==="block-seq"?_n(s,e,t,n,r):$n(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}function Mn(s,e,t,n,i){var p,m;const r=n.tag,o=r?e.directives.tagName(r.source,y=>i(r,"TAG_RESOLVE_FAILED",y)):null;if(t.type==="block-seq"){const{anchor:y,newlineAfterProp:u}=n,g=y&&r?y.offset>r.offset?y:r:y!=null?y:r;g&&(!u||u.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===K.tagName&&l==="map"||o===X.tagName&&l==="seq")return pt(s,e,t,i,o);let a=e.schema.tags.find(y=>y.tag===o&&y.collection===l);if(!a){const y=e.schema.knownTags[o];if(y&&y.collection===l)e.schema.tags.push(Object.assign({},y,{default:!1})),a=y;else return y!=null&&y.collection?i(r,"BAD_COLLECTION_TYPE",`${y.tag} used for ${l} collection, but expects ${y.collection}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),pt(s,e,t,i,o)}const c=pt(s,e,t,i,o,a),h=(m=(p=a.resolve)==null?void 0:p.call(a,c,y=>i(r,"TAG_RESOLVE_FAILED",y),e.options))!=null?m:c,f=v(h)?h:new O(h);return f.range=c.range,f.tag=o,a!=null&&a.format&&(f.format=a.format),f}function vs(s,e,t){const n=e.offset,i=vn(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const r=i.mode===">"?O.BLOCK_FOLDED:O.BLOCK_LITERAL,o=e.source?
|
|
67
|
+
`+L:M.comment=L,w.comment=w.comment.substring(L.length+1)}}if(!o&&!E&&!w.found){const L=$?s(t,$,w,i):e(t,w.end,E,null,w,i);c.items.push(L),f=L.range[2],dt($)&&i(L.range,"BLOCK_IN_FLOW",ht)}else{const L=w.end,M=N?s(t,N,w,i):e(t,L,k,null,w,i);dt(N)&&i(M.range,"BLOCK_IN_FLOW",ht);const B=ye(E!=null?E:[],{flow:l,indicator:"map-value-ind",next:$,offset:M.range[2],onError:i,parentIndent:n.indent,startOnNewline:!1});if(B.found){if(!o&&!w.found&&t.options.strict){if(E)for(const P of E){if(P===B.found)break;if(P.type==="newline"){i(P,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}w.start<B.found.offset-1024&&i(B.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else $&&("source"in $&&$.source&&$.source[0]===":"?i($,"MISSING_CHAR",`Missing space after : in ${l}`):i(B.start,"MISSING_CHAR",`Missing , or : between ${l} items`));const Z=$?s(t,$,B,i):B.found?e(t,B.end,E,null,B,i):null;Z?dt($)&&i(Z.range,"BLOCK_IN_FLOW",ht):B.comment&&(M.comment?M.comment+=`
|
|
68
|
+
`+B.comment:M.comment=B.comment);const oe=new D(M,Z);if(t.options.keepSourceTokens&&(oe.srcToken=I),o){const P=c;Ms(t,P.items,M)&&i(L,"DUPLICATE_KEY","Map keys must be unique"),P.items.push(oe)}else{const P=new K(t.schema);P.flow=!0,P.items.push(oe),c.items.push(P)}f=Z?Z.range[2]:B.end}}const p=o?"}":"]",[m,...y]=n.end;let u=f;if(m&&m.source===p)u=m.offset+m.source.length;else{const S=l[0].toUpperCase()+l.substring(1),I=h?`${S} must end with a ${p}`:`${S} in block collection must be sufficiently indented and end with a ${p}`;i(f,h?"MISSING_CHAR":"BAD_INDENT",I),m&&m.source.length!==1&&y.unshift(m)}if(y.length>0){const S=Me(y,u,t.options.strict,i);S.comment&&(c.comment?c.comment+=`
|
|
69
|
+
`+S.comment:c.comment=S.comment),c.range=[n.offset,u,S.offset]}else c.range=[n.offset,u,u];return c}function pt(s,e,t,n,i,r){const o=t.type==="block-map"?Ln(s,e,t,n,r):t.type==="block-seq"?_n(s,e,t,n,r):$n(s,e,t,n,r),l=o.constructor;return i==="!"||i===l.tagName?(o.tag=l.tagName,o):(i&&(o.tag=i),o)}function Mn(s,e,t,n,i){var p,m;const r=n.tag,o=r?e.directives.tagName(r.source,y=>i(r,"TAG_RESOLVE_FAILED",y)):null;if(t.type==="block-seq"){const{anchor:y,newlineAfterProp:u}=n,g=y&&r?y.offset>r.offset?y:r:y!=null?y:r;g&&(!u||u.offset<g.offset)&&i(g,"MISSING_CHAR","Missing newline after block sequence props")}const l=t.type==="block-map"?"map":t.type==="block-seq"?"seq":t.start.source==="{"?"map":"seq";if(!r||!o||o==="!"||o===K.tagName&&l==="map"||o===X.tagName&&l==="seq")return pt(s,e,t,i,o);let a=e.schema.tags.find(y=>y.tag===o&&y.collection===l);if(!a){const y=e.schema.knownTags[o];if(y&&y.collection===l)e.schema.tags.push(Object.assign({},y,{default:!1})),a=y;else return y!=null&&y.collection?i(r,"BAD_COLLECTION_TYPE",`${y.tag} used for ${l} collection, but expects ${y.collection}`,!0):i(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${o}`,!0),pt(s,e,t,i,o)}const c=pt(s,e,t,i,o,a),h=(m=(p=a.resolve)==null?void 0:p.call(a,c,y=>i(r,"TAG_RESOLVE_FAILED",y),e.options))!=null?m:c,f=v(h)?h:new O(h);return f.range=c.range,f.tag=o,a!=null&&a.format&&(f.format=a.format),f}function vs(s,e,t){const n=e.offset,i=vn(e,s.options.strict,t);if(!i)return{value:"",type:null,comment:"",range:[n,n,n]};const r=i.mode===">"?O.BLOCK_FOLDED:O.BLOCK_LITERAL,o=e.source?Pn(e.source):[];let l=o.length;for(let u=o.length-1;u>=0;--u){const g=o[u][1];if(g===""||g==="\r")l=u;else break}if(l===0){const u=i.chomp==="+"&&o.length>0?`
|
|
70
70
|
`.repeat(Math.max(1,o.length-1)):"";let g=n+i.length;return e.source&&(g+=e.source.length),{value:u,type:r,comment:i.comment,range:[n,g,g]}}let a=e.indent+i.indent,c=e.offset+i.length,h=0;for(let u=0;u<l;++u){const[g,b]=o[u];if(b===""||b==="\r")i.indent===0&&g.length>a&&(a=g.length);else{g.length<a&&t(c+g.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),i.indent===0&&(a=g.length),h=u,a===0&&!s.atRoot&&t(c,"BAD_INDENT","Block scalar values in collections must be indented");break}c+=g.length+b.length+1}for(let u=o.length-1;u>=l;--u)o[u][0].length>a&&(l=u+1);let f="",p="",m=!1;for(let u=0;u<h;++u)f+=o[u][0].slice(a)+`
|
|
71
71
|
`;for(let u=h;u<l;++u){let[g,b]=o[u];c+=g.length+b.length+1;const S=b[b.length-1]==="\r";if(S&&(b=b.slice(0,-1)),b&&g.length<a){const k=`Block scalar lines must not be less indented than their ${i.indent?"explicit indentation indicator":"first line"}`;t(c-b.length-(S?2:1),"BAD_INDENT",k),g=""}r===O.BLOCK_LITERAL?(f+=p+g.slice(a)+b,p=`
|
|
72
72
|
`):g.length>a||b[0]===" "?(p===" "?p=`
|
|
@@ -81,7 +81,7 @@ ${c}
|
|
|
81
81
|
`+o[u][0].slice(a);f[f.length-1]!==`
|
|
82
82
|
`&&(f+=`
|
|
83
83
|
`);break;default:f+=`
|
|
84
|
-
`}const y=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,y,y]}}function vn({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,l="",a=-1;for(let p=1;p<i.length;++p){const m=i[p];if(!l&&(m==="-"||m==="+"))l=m;else{const y=Number(m);!o&&y?o=y:a===-1&&(a=s+p)}}a!==-1&&n(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",f=i.length;for(let p=1;p<e.length;++p){const m=e[p];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,h=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{const y=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",y);const u=m.source;u&&typeof u=="string"&&(f+=u.length)}}}return{mode:r,indent:o,chomp:l,comment:h,length:f}}function
|
|
84
|
+
`}const y=n+i.length+e.source.length;return{value:f,type:r,comment:i.comment,range:[n,y,y]}}function vn({offset:s,props:e},t,n){if(e[0].type!=="block-scalar-header")return n(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:i}=e[0],r=i[0];let o=0,l="",a=-1;for(let p=1;p<i.length;++p){const m=i[p];if(!l&&(m==="-"||m==="+"))l=m;else{const y=Number(m);!o&&y?o=y:a===-1&&(a=s+p)}}a!==-1&&n(a,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let c=!1,h="",f=i.length;for(let p=1;p<e.length;++p){const m=e[p];switch(m.type){case"space":c=!0;case"newline":f+=m.source.length;break;case"comment":t&&!c&&n(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),f+=m.source.length,h=m.source.substring(1);break;case"error":n(m,"UNEXPECTED_TOKEN",m.message),f+=m.source.length;break;default:{const y=`Unexpected token in block scalar header: ${m.type}`;n(m,"UNEXPECTED_TOKEN",y);const u=m.source;u&&typeof u=="string"&&(f+=u.length)}}}return{mode:r,indent:o,chomp:l,comment:h,length:f}}function Pn(s){const e=s.split(/\n( *)/),t=e[0],n=t.match(/^( *)/),r=[n!=null&&n[1]?[n[1],t.slice(n[1].length)]:["",t]];for(let o=1;o<e.length;o+=2)r.push([e[o],e[o+1]]);return r}function Ps(s,e,t){const{offset:n,type:i,source:r,end:o}=s;let l,a;const c=(p,m,y)=>t(n+p,m,y);switch(i){case"scalar":l=O.PLAIN,a=Bn(r,c);break;case"single-quoted-scalar":l=O.QUOTE_SINGLE,a=Dn(r,c);break;case"double-quoted-scalar":l=O.QUOTE_DOUBLE,a=jn(r,c);break;default:return t(s,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${i}`),{value:"",type:null,comment:"",range:[n,n+r.length,n+r.length]}}const h=n+r.length,f=Me(o,h,e,t);return{value:a,type:l,comment:f.comment,range:[n,h,f.offset]}}function Bn(s,e){let t="";switch(s[0]){case" ":t="a tab character";break;case",":t="flow indicator character ,";break;case"%":t="directive indicator character %";break;case"|":case">":{t=`block scalar indicator ${s[0]}`;break}case"@":case"`":{t=`reserved character ${s[0]}`;break}}return t&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${t}`),Bs(s)}function Dn(s,e){return(s[s.length-1]!=="'"||s.length===1)&&e(s.length,"MISSING_CHAR","Missing closing 'quote"),Bs(s.slice(1,-1)).replace(/''/g,"'")}function Bs(s){var a;let e,t;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
85
85
|
`,"sy"),t=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
86
86
|
`,"sy")}catch(c){e=new RegExp("(.*?)[ \\t]*\\r?\\n","sy"),t=new RegExp("[ \\t]*(.*?)[ \\t]*\\r?\\n","sy")}let n=e.exec(s);if(!n)return s;let i=n[1],r=" ",o=e.lastIndex;for(t.lastIndex=o;n=t.exec(s);)n[1]===""?r===`
|
|
87
87
|
`?i+=r:r=`
|
|
@@ -96,14 +96,14 @@ ${c}
|
|
|
96
96
|
`);)n===`
|
|
97
97
|
`&&(t+=`
|
|
98
98
|
`),e+=1,n=s[e+1];return t||(t=" "),{fold:t,offset:e}}const Kn={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
99
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Fn(s,e,t,n){const i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(o)}function
|
|
99
|
+
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Fn(s,e,t,n){const i=s.substr(e,t),o=i.length===t&&/^[0-9a-fA-F]+$/.test(i)?parseInt(i,16):NaN;if(isNaN(o)){const l=s.substr(e-2,t+2);return n(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${l}`),l}return String.fromCodePoint(o)}function Ds(s,e,t,n){const{value:i,type:r,comment:o,range:l}=e.type==="block-scalar"?vs(s,e,n):Ps(e,s.options.strict,n),a=t?s.directives.tagName(t.source,f=>n(t,"TAG_RESOLVE_FAILED",f)):null,c=t&&a?Rn(s.schema,i,a,t,n):e.type==="scalar"?Un(s,i,e,n):s.schema[G];let h;try{const f=c.resolve(i,p=>n(t!=null?t:e,"TAG_RESOLVE_FAILED",p),s.options);h=A(f)?f:new O(f)}catch(f){const p=f instanceof Error?f.message:String(f);n(t!=null?t:e,"TAG_RESOLVE_FAILED",p),h=new O(i)}return h.range=l,h.source=i,r&&(h.type=r),a&&(h.tag=a),c.format&&(h.format=c.format),o&&(h.comment=o),h}function Rn(s,e,t,n,i){var l;if(t==="!")return s[G];const r=[];for(const a of s.tags)if(!a.collection&&a.tag===t)if(a.default&&a.test)r.push(a);else return a;for(const a of r)if((l=a.test)!=null&&l.test(e))return a;const o=s.knownTags[t];return o&&!o.collection?(s.tags.push(Object.assign({},o,{default:!1,test:void 0})),o):(i(n,"TAG_RESOLVE_FAILED",`Unresolved tag: ${t}`,t!=="tag:yaml.org,2002:str"),s[G])}function Un({directives:s,schema:e},t,n,i){var o;const r=e.tags.find(l=>{var a;return l.default&&((a=l.test)==null?void 0:a.test(t))})||e[G];if(e.compat){const l=(o=e.compat.find(a=>{var c;return a.default&&((c=a.test)==null?void 0:c.test(t))}))!=null?o:e[G];if(r.tag!==l.tag){const a=s.tagString(r.tag),c=s.tagString(l.tag),h=`Value may be parsed as either ${a} or ${c}`;i(n,"TAG_RESOLVE_FAILED",h,!0)}}return r}function Vn(s,e,t){if(e){t===null&&(t=e.length);for(let n=t-1;n>=0;--n){let i=e[n];switch(i.type){case"space":case"comment":case"newline":s-=i.source.length;continue}for(i=e[++n];(i==null?void 0:i.type)==="space";)s+=i.source.length,i=e[++n];break}}return s}const Jn={composeNode:js,composeEmptyNode:Dt};function js(s,e,t,n){const{spaceBefore:i,comment:r,anchor:o,tag:l}=t;let a,c=!0;switch(e.type){case"alias":a=Qn(s,e,n),(o||l)&&n(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":a=Ds(s,e,l,n),o&&(a.anchor=o.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":a=Mn(Jn,s,e,t,n),o&&(a.anchor=o.source.substring(1));break;default:{const h=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;n(e,"UNEXPECTED_TOKEN",h),a=Dt(s,e.offset,void 0,null,t,n),c=!1}}return o&&a.anchor===""&&n(o,"BAD_ALIAS","Anchor cannot be an empty string"),i&&(a.spaceBefore=!0),r&&(e.type==="scalar"&&e.source===""?a.comment=r:a.commentBefore=r),s.options.keepSourceTokens&&c&&(a.srcToken=e),a}function Dt(s,e,t,n,{spaceBefore:i,comment:r,anchor:o,tag:l,end:a},c){const h={type:"scalar",offset:Vn(e,t,n),indent:-1,source:""},f=Ds(s,h,l,c);return o&&(f.anchor=o.source.substring(1),f.anchor===""&&c(o,"BAD_ALIAS","Anchor cannot be an empty string")),i&&(f.spaceBefore=!0),r&&(f.comment=r,f.range[2]=a),f}function Qn({options:s},{offset:e,source:t,end:n},i){const r=new He(t.substring(1));r.source===""&&i(e,"BAD_ALIAS","Alias cannot be an empty string"),r.source.endsWith(":")&&i(e+t.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const o=e+t.length,l=Me(n,o,s.strict,i);return r.range=[e,o,l.offset],l.comment&&(r.comment=l.comment),r}function Yn(s,e,{offset:t,start:n,value:i,end:r},o){const l=Object.assign({_directives:e},s),a=new Ne(void 0,l),c={atRoot:!0,directives:a.directives,options:a.options,schema:a.schema},h=ye(n,{indicator:"doc-start",next:i!=null?i:r==null?void 0:r[0],offset:t,onError:o,parentIndent:0,startOnNewline:!0});h.found&&(a.directives.docStart=!0,i&&(i.type==="block-map"||i.type==="block-seq")&&!h.hasNewline&&o(h.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),a.contents=i?js(c,i,h,o):Dt(c,h.end,n,null,h,o);const f=a.contents.range[2],p=Me(r,f,!1,o);return p.comment&&(a.comment=p.comment),a.range=[t,f,p.offset],a}function Te(s){if(typeof s=="number")return[s,s+1];if(Array.isArray(s))return s.length===2?s:[s[0],s[1]];const{offset:e,source:t}=s;return[e,e+(typeof t=="string"?t.length:1)]}function xt(s){var i;let e="",t=!1,n=!1;for(let r=0;r<s.length;++r){const o=s[r];switch(o[0]){case"#":e+=(e===""?"":n?`
|
|
100
100
|
|
|
101
101
|
`:`
|
|
102
102
|
`)+(o.substring(1)||" "),t=!0,n=!1;break;case"%":((i=s[r+1])==null?void 0:i[0])!=="#"&&(r+=1),t=!1;break;default:t||(n=!0),t=!1}}return{comment:e,afterEmptyLine:n}}class jt{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(t,n,i,r)=>{const o=Te(t);r?this.warnings.push(new $s(o,n,i)):this.errors.push(new ne(o,n,i))},this.directives=new j({version:e.version||"1.2"}),this.options=e}decorate(e,t){const{comment:n,afterEmptyLine:i}=xt(this.prelude);if(n){const r=e.contents;if(t)e.comment=e.comment?`${e.comment}
|
|
103
103
|
${n}`:n;else if(i||e.directives.docStart||!r)e.commentBefore=n;else if(_(r)&&!r.flow&&r.items.length>0){let o=r.items[0];C(o)&&(o=o.key);const l=o.commentBefore;o.commentBefore=l?`${n}
|
|
104
104
|
${l}`:n}else{const o=r.commentBefore;r.commentBefore=o?`${n}
|
|
105
105
|
${o}`:n}}t?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:xt(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,t=!1,n=-1){for(const i of e)yield*d(this.next(i));yield*d(this.end(t,n))}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(t,n,i)=>{const r=Te(e);r[0]+=t,this.onError(r,"BAD_DIRECTIVE",n,i)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const t=Yn(this.options,this.directives,e,this.onError);this.atDirectives&&!t.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(t,!1),this.doc&&(yield this.doc),this.doc=t,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const t=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,n=new ne(Te(e),"UNEXPECTED_TOKEN",t);this.atDirectives||!this.doc?this.errors.push(n):this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const n="Unexpected doc-end without preceding document";this.errors.push(new ne(Te(e),"UNEXPECTED_TOKEN",n));break}this.doc.directives.docEnd=!0;const t=Me(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),t.comment){const n=this.doc.comment;this.doc.comment=n?`${n}
|
|
106
|
-
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new ne(Te(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),i=new Ne(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function Wn(s,e=!0,t){if(s){const n=(i,r,o)=>{const l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new ne([l,l+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return
|
|
106
|
+
${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.push(new ne(Te(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,t=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const n=Object.assign({_directives:this.directives},this.options),i=new Ne(void 0,n);this.atDirectives&&this.onError(t,"MISSING_CHAR","Missing directives-end indicator line"),i.range=[0,t,t],this.decorate(i,!1),yield i}}}function Wn(s,e=!0,t){if(s){const n=(i,r,o)=>{const l=typeof i=="number"?i:Array.isArray(i)?i[0]:i.offset;if(t)t(l,r,o);else throw new ne([l,l+1],r,o)};switch(s.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Ps(s,e,n);case"block-scalar":return vs({options:{strict:e}},s,n)}}return null}function Gn(s,e){var c;const{implicitKey:t=!1,indent:n,inFlow:i=!1,offset:r=-1,type:o="PLAIN"}=e,l=_e({type:o,value:s},{implicitKey:t,indent:n>0?" ".repeat(n):"",inFlow:i,options:{blockQuote:!0,lineWidth:-1}}),a=(c=e.end)!=null?c:[{type:"newline",offset:-1,indent:n,source:`
|
|
107
107
|
`}];switch(l[0]){case"|":case">":{const h=l.indexOf(`
|
|
108
108
|
`),f=l.substring(0,h),p=l.substring(h+1)+`
|
|
109
109
|
`,m=[{type:"block-scalar-header",offset:r,indent:n,source:f}];return qs(m,a)||m.push({type:"newline",offset:-1,indent:n,source:`
|
|
@@ -136,7 +136,7 @@ ${t.comment}`:t.comment}this.doc.range[2]=t.offset;break}default:this.errors.pus
|
|
|
136
136
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
137
137
|
`,t)+1}yield*d(this.pop());break;default:yield*d(this.pop()),yield*d(this.step())}}*blockMap(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,t.value){const i="end"in t.value?t.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2],r=(n=i==null?void 0:i.value)==null?void 0:n.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const i=!this.onKeyLine&&this.indent===e.indent,r=i&&(t.sep||t.explicitKey)&&this.type!=="seq-item-ind";let o=[];if(r&&t.sep&&!t.value){const l=[];for(let a=0;a<t.sep.length;++a){const c=t.sep[a];switch(c.type){case"newline":l.push(a);break;case"space":break;case"comment":c.indent>e.indent&&(l.length=0);break;default:l.length=0}}l.length>=2&&(o=t.sep.splice(l[1]))}switch(this.type){case"anchor":case"tag":r||t.value?(o.push(this.sourceToken),e.items.push({start:o}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"explicit-key-ind":!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(o.push(this.sourceToken),e.items.push({start:o,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(t.explicitKey)if(t.sep)if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ee(t.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:o,key:null,sep:[this.sourceToken]}]});else if(Js(t.key)&&!ee(t.sep,"newline")){const l=ae(t.start),a=t.key,c=t.sep;c.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:a,sep:c}]})}else o.length>0?t.sep=t.sep.concat(o,this.sourceToken):t.sep.push(this.sourceToken);else if(ee(t.start,"newline"))Object.assign(t,{key:null,sep:[this.sourceToken]});else{const l=ae(t.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]})}else t.sep?t.value||r?e.items.push({start:o,key:null,sep:[this.sourceToken]}):ee(t.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const l=this.flowScalar(this.type);r||t.value?(e.items.push({start:o,key:l,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(l):(Object.assign(t,{key:l,sep:[]}),this.onKeyLine=!0);return}default:{const l=this.startBlockValue(e);if(l){i&&l.type!=="block-seq"&&e.items.push({start:o}),this.stack.push(l);return}}}}yield*d(this.pop()),yield*d(this.step())}*blockSequence(e){var n;const t=e.items[e.items.length-1];switch(this.type){case"newline":if(t.value){const i="end"in t.value?t.value.end:void 0,r=Array.isArray(i)?i[i.length-1]:void 0;(r==null?void 0:r.type)==="comment"?i==null||i.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case"space":case"comment":if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){const i=e.items[e.items.length-2],r=(n=i==null?void 0:i.value)==null?void 0:n.end;if(Array.isArray(r)){Array.prototype.push.apply(r,t.start),r.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case"anchor":case"tag":if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;t.value||ee(t.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){const i=this.startBlockValue(e);if(i){this.stack.push(i);return}}yield*d(this.pop()),yield*d(this.step())}*flowCollection(e){const t=e.items[e.items.length-1];if(this.type==="flow-error-end"){let n;do yield*d(this.pop()),n=this.peek(1);while(n&&n.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case"map-value-ind":!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:i,sep:[]}):t.sep?this.stack.push(i):Object.assign(t,{key:i,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const n=this.startBlockValue(e);n?this.stack.push(n):(yield*d(this.pop()),yield*d(this.step()))}else{const n=this.peek(2);if(n.type==="block-map"&&(this.type==="map-value-ind"&&n.indent===e.indent||this.type==="newline"&&!n.items[n.items.length-1].sep))yield*d(this.pop()),yield*d(this.step());else if(this.type==="map-value-ind"&&n.type!=="flow-collection"){const i=qe(n),r=ae(i);Zt(e);const o=e.end.splice(1,e.end.length);o.push(this.sourceToken);const l={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=l}else yield*d(this.lineEnd(e))}}flowScalar(e){if(this.onNewLine){let t=this.source.indexOf(`
|
|
138
138
|
`)+1;for(;t!==0;)this.onNewLine(this.offset+t),t=this.source.indexOf(`
|
|
139
|
-
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=qe(e),n=ae(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=qe(e),n=ae(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*d(this.pop())))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*d(this.pop()),yield*d(this.step());break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*d(this.pop()))}}}function Qs(s){const e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Vs||null,prettyErrors:e}}function ri(s,e={}){const{lineCounter:t,prettyErrors:n}=Qs(e),i=new qt(t==null?void 0:t.addNewLine),r=new jt(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(const l of o)l.errors.forEach(Ye(s,t)),l.warnings.forEach(Ye(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Ys(s,e={}){const{lineCounter:t,prettyErrors:n}=Qs(e),i=new qt(t==null?void 0:t.addNewLine),r=new jt(e);let o=null;for(const l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new ne(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(Ye(s,t)),o.warnings.forEach(Ye(s,t))),o}function oi(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=Ys(s,t);if(!i)return null;if(i.warnings.forEach(r=>ds(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function li(s,e,t){var i;let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(s===void 0){const{keepUndefined:r}=(i=t!=null?t:e)!=null?i:{};if(!r)return}return new Ne(s,n,t).toString(t)}const es=Object.freeze(Object.defineProperty({__proto__:null,Alias:He,CST:si,Composer:jt,Document:Ne,Lexer:Us,LineCounter:Vs,Pair:
|
|
139
|
+
`,t)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const t=qe(e),n=ae(t);return n.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const t=qe(e),n=ae(t);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!=="comment"||this.indent<=t?!1:e.every(n=>n.type==="newline"||n.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*d(this.pop())))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*d(this.pop()),yield*d(this.step());break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*d(this.pop()))}}}function Qs(s){const e=s.prettyErrors!==!1;return{lineCounter:s.lineCounter||e&&new Vs||null,prettyErrors:e}}function ri(s,e={}){const{lineCounter:t,prettyErrors:n}=Qs(e),i=new qt(t==null?void 0:t.addNewLine),r=new jt(e),o=Array.from(r.compose(i.parse(s)));if(n&&t)for(const l of o)l.errors.forEach(Ye(s,t)),l.warnings.forEach(Ye(s,t));return o.length>0?o:Object.assign([],{empty:!0},r.streamInfo())}function Ys(s,e={}){const{lineCounter:t,prettyErrors:n}=Qs(e),i=new qt(t==null?void 0:t.addNewLine),r=new jt(e);let o=null;for(const l of r.compose(i.parse(s),!0,s.length))if(!o)o=l;else if(o.options.logLevel!=="silent"){o.errors.push(new ne(l.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return n&&t&&(o.errors.forEach(Ye(s,t)),o.warnings.forEach(Ye(s,t))),o}function oi(s,e,t){let n;typeof e=="function"?n=e:t===void 0&&e&&typeof e=="object"&&(t=e);const i=Ys(s,t);if(!i)return null;if(i.warnings.forEach(r=>ds(i.options.logLevel,r)),i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:n},t))}function li(s,e,t){var i;let n=null;if(typeof e=="function"||Array.isArray(e)?n=e:t===void 0&&e&&(t=e),typeof t=="string"&&(t=t.length),typeof t=="number"){const r=Math.round(t);t=r<1?void 0:r>8?{indent:8}:{indent:r}}if(s===void 0){const{keepUndefined:r}=(i=t!=null?t:e)!=null?i:{};if(!r)return}return new Ne(s,n,t).toString(t)}const es=Object.freeze(Object.defineProperty({__proto__:null,Alias:He,CST:si,Composer:jt,Document:Ne,Lexer:Us,LineCounter:Vs,Pair:D,Parser:qt,Scalar:O,Schema:it,YAMLError:Bt,YAMLMap:K,YAMLParseError:ne,YAMLSeq:X,YAMLWarning:$s,isAlias:re,isCollection:_,isDocument:be,isMap:we,isNode:v,isPair:C,isScalar:A,isSeq:Se,parse:oi,parseAllDocuments:ri,parseDocument:Ys,stringify:li,visit:z,visitAsync:Ge},Symbol.toStringTag,{value:"Module"})),ai=`# This is your query - you can modify it directly and click Run to see new results.
|
|
140
140
|
# Try uncommenting the elements below
|
|
141
141
|
# To learn more about the query syntax, visit [Doc URL]
|
|
142
142
|
---
|
|
@@ -177,5 +177,5 @@ model: {{dataSourceTitle}}
|
|
|
177
177
|
# - name: Dimension1
|
|
178
178
|
# - name: Dimension2
|
|
179
179
|
# - name: Measure1
|
|
180
|
-
# - name: Measure2`;class ci{constructor(e,t){this.indexedFields={},this.contextTitle=e,this.indexedFields=this.indexFields(t)}indexFields(e){return e.reduce((t,n)=>{const i=n.id;t[i]=n;const r=T.sanitizeDimensionId(i);return i!==r&&(t[r]=H(U({},n),{id:r})),t},{})}concatAggTypes(){return Object.values(
|
|
181
|
-
`)}]`},ui="dashboardByIdTmpl",hi="dashboardTmpl",di=({dashboardOid:s,uiFramework:e="react"})=>{const t={dashboardOid:s},n=ui;return T.generateCode(n,t,e)},pi=({dashboardProps:s,uiFramework:e="react"})=>{const t=hi,n=s.widgets.some(
|
|
180
|
+
# - name: Measure2`;class ci{constructor(e,t){this.indexedFields={},this.contextTitle=e,this.indexedFields=this.indexFields(t)}indexFields(e){return e.reduce((t,n)=>{const i=n.id;t[i]=n;const r=T.sanitizeDimensionId(i);return i!==r&&(t[r]=H(U({},n),{id:r})),t},{})}concatAggTypes(){return Object.values(Pe.AggregationTypes).map(t=>Pe.DimensionalBaseMeasure.aggregationToJAQL(t)).join("|")}simplifyAggFormula(e){const{formula:t,context:n,filter:i}=e;if(!n||!t)return e;const r=Object.keys(n);if(r.length!==1)return e;const o=r[0],l=n[o],a=this.concatAggTypes(),c=new RegExp(`^\\s*(${a})\\(\\[\\w+\\]\\)$`),h=t.match(c);if(h&&t.includes(o)){const f=h[1];return{dim:l.dim,agg:f,title:e.title,filter:i?U({},i):void 0}}return e}simplifyMetadataItemJaql(e){let t=e;if("formula"in e&&(t=this.simplifyAggFormula(e)),delete t.table,delete t.column,delete t.datatype,"context"in t){const n=U({},t.context);Object.keys(n).forEach(i=>{n[i]=this.simplifyMetadataItemJaql(n[i])}),t.context=n}return t}simplifyMetadataItemFilter(e){var i;const t=e;if(t.panel!=="scope")return t;delete t.format;const{jaql:n}=t;return(i=n.filter)!=null&&i.by&&(n.filter.by=this.simplifyAggFormula(n.filter.by)),H(U({},t),{jaql:n})}simplifyMetadataItemFormat(e){const{jaql:{level:t},format:{mask:n}={}}=e;return t&&(n!=null&&n[t])?H(U({},e),{format:{mask:{[t]:n[t]}}}):e}simplifyMetadataItem(e){let t=e;t.panel&&["rows","columns","measures"].includes(t.panel)&&delete t.panel,t=this.simplifyMetadataItemFilter(t),t=this.simplifyMetadataItemFormat(t);const{jaql:n,measure:i,by:r}=t;return H(U({},t),{jaql:this.simplifyMetadataItemJaql(n),by:r?this.simplifyMetadataItemJaql(r):void 0,measure:i?this.simplifyMetadataItemJaql(i):void 0})}simplifyChartRecommendations(e){if(!("axesMapping"in e))return{};const{chartType:t,axesMapping:n,styleOptions:i}=e,r=Object.entries(n).reduce((o,[l,a])=>(o[l]=a.map(c=>Ve.normalizeAnyColumn(c)),o),{});return{chartType:t,dataOptions:r,styleOptions:i}}getQueryTitleWithChartType(e,t){let n="chartType"in t?t.chartType:"table";return n!=="table"&&(n+=" chart"),`${n} showing ${e.toLowerCase()}`}translateToSimple(e){try{const{jaql:t,chartRecommendations:n,queryTitle:i}=Pe.cloneDeep(e);return{model:t.datasource.title,metadata:t.metadata.map(r=>this.simplifyMetadataItem(r)),chart:this.simplifyChartRecommendations(n),queryTitle:this.getQueryTitleWithChartType(i,n)}}catch(t){return console.error("Error running toSimpleQuery",t),W.EMPTY_SIMPLE_QUERY_MODEL}}stringifySimple(e){const r=e,{queryTitle:t}=r,n=Ut(r,["queryTitle"]),i=new es.Document(n);return i.commentBefore=` ${T.capitalizeFirstLetter(t)}`,i.directives&&(i.directives.docStart=!0),String(i)}getQueryTemplate(){return T.populatePlaceholders(ai,{dataSourceTitle:this.contextTitle})}parseSimple(e){try{const t=es.parseDocument(e),{commentBefore:n}=t,i=T.validateQueryModel(t.toJS());return i.queryTitle=(n==null?void 0:n.trim())||"",i}catch(t){console.error("Error parsing the YAML string",t)}return W.EMPTY_SIMPLE_QUERY_MODEL}expandChartRecommendations(e){if(!e||!("dataOptions"in e))return{};const{chartType:t,dataOptions:n,styleOptions:i}=e;return{chartFamily:Ve.deriveChartFamily(t),chartType:t,axesMapping:n,styleOptions:i}}expandMetadataItemJaql(e){const{dim:t="",agg:n,context:i}=e;i&&(Object.keys(i).forEach(l=>{i[l]=this.expandMetadataItemJaql(i[l])}),e.context=i);const r=this.indexedFields[t];if(!r)return e;let{filter:o}=e;return o!=null&&o.by&&(o=H(U({},o),{by:this.expandMetadataItemJaql(o.by)}),e.filter=o),U({table:r.table,column:r.column,datatype:r.dimtype,title:n?n+" "+r.title:r.title},e)}expandMetadataItem(e){const{jaql:t,measure:n}=e;return n?H(U({},e),{jaql:this.expandMetadataItemJaql(t),measure:this.expandMetadataItemJaql(n)}):H(U({},e),{jaql:this.expandMetadataItemJaql(t)})}translateToExpanded(e){const{model:t,metadata:n,chart:i,queryTitle:r}=Pe.cloneDeep(e),o={datasource:{title:t},metadata:n.map(a=>this.expandMetadataItem(a))},l=this.expandChartRecommendations(i);return{jaql:o,chartRecommendations:l,queryTitle:r}}}const fi=(s,e)=>{const t={chart:"chartWidgetPropsTmpl",pivot:"pivotTableWidgetPropsTmpl"};return`[${s.map(n=>T.getWidgetCode(n,e,t)).join(`,
|
|
181
|
+
`)}]`},ui="dashboardByIdTmpl",hi="dashboardTmpl",di=({dashboardOid:s,uiFramework:e="react"})=>{const t={dashboardOid:s},n=ui;return T.generateCode(n,t,e)},pi=({dashboardProps:s,uiFramework:e="react"})=>{var r;const t=hi,n=s.widgets.some(o=>(Ve.isChartWidgetProps(o)||Ve.isPivotTableWidgetProps(o))&&T.checkIfMeasuresExist(o)),i={titleString:s.title,defaultDataSourceString:T.stringifyDataSource(s.defaultDataSource),widgetsString:fi(s.widgets,e),filtersString:T.stringifyFilters(s.filters),componentString:"Dashboard",extraImportsString:T.stringifyExtraImports(s.filters||s.widgets.map(o=>"filters"in o?o.filters:[]).flat().filter(o=>o!==void 0)||[],n),configString:T.stringifyProps({toolbar:{isVisible:!0},filtersPanel:{isVisible:!0},tabbers:((r=s.config)==null?void 0:r.tabbers)||{}},T.CODE_TEMPLATES_INDENT),layoutOptionsString:T.stringifyProps(s.layoutOptions||{},T.CODE_TEMPLATES_INDENT),widgetsOptionsString:T.stringifyProps(s.widgetsOptions||{},T.CODE_TEMPLATES_INDENT,!0),styleOptionsString:T.stringifyProps(s.styleOptions||{},T.CODE_TEMPLATES_INDENT)};return T.generateCode(t,i,e)},mi=s=>W.isByIdDashboardCodeParams(s)?di(s):pi(s),yi=Object.freeze(Object.defineProperty({__proto__:null,toDashboardCode:mi},Symbol.toStringTag,{value:"Module"})),gi="executeQueryTmpl",bi="executePivotQueryTmpl",wi=(s,e,t)=>{const n=T.checkIfMeasuresExist(s),i={dataSourceString:T.stringifyDataSource(s.dataSource),dimensionsString:T.stringifyProps(s.dimensions||[]),measuresString:T.stringifyProps(s.measures||[]),filtersString:T.stringifyFilters(s.filters),highlightsString:T.stringifyProps(s.highlights||[]),extraImportsString:T.stringifyExtraImports(s.filters||[],n)};return T.generateCode(t,i,e)},Si=(s,e,t)=>{const n=T.checkIfMeasuresExist(s),i={dataSourceString:T.stringifyDataSource(s.dataSource),rowsString:T.stringifyProps(s.rows||[]),valuesString:T.stringifyProps(s.values||[]),filtersString:T.stringifyFilters(s.filters),extraImportsString:T.stringifyExtraImports(s.filters||[],n)};return T.generateCode(t,i,e)},ki=({queryParams:s,uiFramework:e="react"})=>wi(s,e,gi),Oi=({pivotQueryParams:s,uiFramework:e="react"})=>Si(s,e,bi),Ni=s=>ki(s),Ti=s=>Oi(s),Ei=Object.freeze(Object.defineProperty({__proto__:null,toExecutePivotQueryCode:Ti,toExecuteQueryCode:Ni},Symbol.toStringTag,{value:"Module"}));exports.EMPTY_EXPANDED_QUERY_MODEL=W.EMPTY_EXPANDED_QUERY_MODEL;exports.EMPTY_SIMPLE_QUERY_MODEL=W.EMPTY_SIMPLE_QUERY_MODEL;exports.isByIdDashboardCodeParams=W.isByIdDashboardCodeParams;exports.isByIdWidgetCodeParams=W.isByIdWidgetCodeParams;exports.isClientSideDashboardCodeParams=W.isClientSideDashboardCodeParams;exports.isClientSideWidgetCodeParams=W.isClientSideWidgetCodeParams;exports.getChartDataOptions=T.getChartDataOptions;exports.getChartOptions=T.getChartOptions;exports.getChartRecommendationsOrDefault=T.getChartRecommendationsOrDefault;exports.getChartStyleOptions=T.getChartStyleOptions;exports.simplifyMetadataItem=T.simplifyMetadataItem;exports.widgetComposer=T.widgetComposer;exports.CustomSuperJSON=Nt.CustomSuperJSON;exports.translateQueryJSON=Nt.translateQueryJSON;exports.translateQueryToJaql=Nt.translateQueryToJaql;exports.QueryTranslator=ci;exports.dashboardComposer=yi;exports.executeQueryComposer=Ei;
|
|
@@ -58,13 +58,13 @@ var d = (s) => {
|
|
|
58
58
|
throw r;
|
|
59
59
|
}, "return" in e && n("return"), i;
|
|
60
60
|
};
|
|
61
|
-
import { E as Qt, a as sn } from "./types-
|
|
62
|
-
import { b as Hi, i as xi, e as zi, d as Xi } from "./types-
|
|
63
|
-
import { s as nn, c as rn, p as on, v as ln, g as an, a as Ye, b as Ot, d as Nt, e as Tt, f as It, h as Q, C as ve } from "./widget-composer-
|
|
64
|
-
import { k as er, m as tr, j as sr, l as nr, i as ir, w as rr } from "./widget-composer-
|
|
65
|
-
import { n as cn, d as fn, i as un, a as hn } from "./derive-chart-family-
|
|
61
|
+
import { E as Qt, a as sn } from "./types-DglXXR-Q.js";
|
|
62
|
+
import { b as Hi, i as xi, e as zi, d as Xi } from "./types-DglXXR-Q.js";
|
|
63
|
+
import { s as nn, c as rn, p as on, v as ln, g as an, a as Ye, b as Ot, d as Nt, e as Tt, f as It, h as Q, C as ve } from "./widget-composer-lBv40CFf.js";
|
|
64
|
+
import { k as er, m as tr, j as sr, l as nr, i as ir, w as rr } from "./widget-composer-lBv40CFf.js";
|
|
65
|
+
import { n as cn, d as fn, i as un, a as hn } from "./derive-chart-family-D_bylSQy.js";
|
|
66
66
|
import { CustomSuperJSON as lr, translateQueryJSON as ar, translateQueryToJaql as cr } from "./analytics-composer/node.js";
|
|
67
|
-
import { l as dn, m as Yt, A as pn } from "./execute-query-
|
|
67
|
+
import { l as dn, m as Yt, A as pn } from "./execute-query-DyjkDYHG.js";
|
|
68
68
|
const At = Symbol.for("yaml.alias"), yt = Symbol.for("yaml.document"), H = Symbol.for("yaml.map"), rs = Symbol.for("yaml.pair"), W = Symbol.for("yaml.scalar"), ye = Symbol.for("yaml.seq"), F = Symbol.for("yaml.node.type"), ie = (s) => !!s && typeof s == "object" && s[F] === At, ge = (s) => !!s && typeof s == "object" && s[F] === yt, be = (s) => !!s && typeof s == "object" && s[F] === H, E = (s) => !!s && typeof s == "object" && s[F] === rs, A = (s) => !!s && typeof s == "object" && s[F] === W, we = (s) => !!s && typeof s == "object" && s[F] === ye;
|
|
69
69
|
function C(s) {
|
|
70
70
|
if (s && typeof s == "object")
|
|
@@ -5167,14 +5167,23 @@ const Ii = (s, e) => {
|
|
|
5167
5167
|
}, Ai = "dashboardByIdTmpl", Ei = "dashboardTmpl", Li = ({ dashboardOid: s, uiFramework: e = "react" }) => Ye(Ai, {
|
|
5168
5168
|
dashboardOid: s
|
|
5169
5169
|
}, e), Ci = ({ dashboardProps: s, uiFramework: e = "react" }) => {
|
|
5170
|
-
|
|
5170
|
+
var r;
|
|
5171
|
+
const t = Ei, n = s.widgets.some((o) => (un(o) || hn(o)) && Ot(o)), i = {
|
|
5171
5172
|
titleString: s.title,
|
|
5172
5173
|
defaultDataSourceString: Nt(s.defaultDataSource),
|
|
5173
5174
|
widgetsString: Ii(s.widgets, e),
|
|
5174
5175
|
filtersString: Tt(s.filters),
|
|
5175
5176
|
componentString: "Dashboard",
|
|
5176
|
-
extraImportsString: It(s.filters || s.widgets.map((
|
|
5177
|
-
|
|
5177
|
+
extraImportsString: It(s.filters || s.widgets.map((o) => "filters" in o ? o.filters : []).flat().filter((o) => o !== void 0) || [], n),
|
|
5178
|
+
configString: Q({
|
|
5179
|
+
toolbar: {
|
|
5180
|
+
isVisible: !0
|
|
5181
|
+
},
|
|
5182
|
+
filtersPanel: {
|
|
5183
|
+
isVisible: !0
|
|
5184
|
+
},
|
|
5185
|
+
tabbers: ((r = s.config) == null ? void 0 : r.tabbers) || {}
|
|
5186
|
+
}, ve),
|
|
5178
5187
|
layoutOptionsString: Q(s.layoutOptions || {}, ve),
|
|
5179
5188
|
widgetsOptionsString: Q(s.widgetsOptions || {}, ve, !0),
|
|
5180
5189
|
styleOptionsString: Q(s.styleOptions || {}, ve)
|