create-bc-app 1.1.3 → 1.1.4
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/index.mjs +58 -36
- package/package.json +4 -3
- package/template-docs-vitepress/.vitepress/cache/deps/@theme_index.js +259 -259
- package/template-docs-vitepress/.vitepress/cache/deps/@theme_index.js.map +7 -7
- package/template-docs-vitepress/.vitepress/cache/deps/_metadata.json +39 -39
- package/template-docs-vitepress/.vitepress/cache/deps/chunk-2MKPR7PC.js +9172 -9172
- package/template-docs-vitepress/.vitepress/cache/deps/chunk-2MKPR7PC.js.map +7 -7
- package/template-docs-vitepress/.vitepress/cache/deps/chunk-ZXJI2PUM.js +11482 -11482
- package/template-docs-vitepress/.vitepress/cache/deps/chunk-ZXJI2PUM.js.map +7 -7
- package/template-docs-vitepress/.vitepress/cache/deps/package.json +3 -3
- package/template-docs-vitepress/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4347 -4347
- package/template-docs-vitepress/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -7
- package/template-docs-vitepress/.vitepress/cache/deps/vitepress___@vueuse_core.js +567 -567
- package/template-docs-vitepress/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -7
- package/template-docs-vitepress/.vitepress/cache/deps/vue.js +323 -323
- package/template-docs-vitepress/.vitepress/cache/deps/vue.js.map +7 -7
- package/template-docs-vitepress/.vitepress/config.mts +28 -28
- package/template-docs-vitepress/api-examples.md +49 -49
- package/template-docs-vitepress/index.md +25 -25
- package/template-docs-vitepress/markdown-examples.md +85 -85
- package/template-docs-vitepress/package-lock.json +1742 -1742
- package/template-docs-vitepress/package.json +9 -9
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/@vue_devtools-api.js +11 -11
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/@vue_devtools-api.js.map +7 -7
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/@vuepress_shared.js +136 -136
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/@vuepress_shared.js.map +7 -7
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/_metadata.json +39 -39
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/chunk-5K23BRP6.js +11482 -11482
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/chunk-5K23BRP6.js.map +7 -7
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/chunk-UKCZNIRO.js +164 -164
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/chunk-UKCZNIRO.js.map +7 -7
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/package.json +3 -3
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/vue-router.js +2744 -2744
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/vue-router.js.map +7 -7
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/vue.js +323 -323
- package/template-docs-vuepress/docs/.vuepress/.cache/deps/vue.js.map +7 -7
- package/template-docs-vuepress/docs/.vuepress/.temp/internal/clientConfigs.js +19 -19
- package/template-docs-vuepress/docs/.vuepress/.temp/internal/routes.js +24 -24
- package/template-docs-vuepress/docs/.vuepress/.temp/internal/siteData.js +14 -14
- package/template-docs-vuepress/docs/.vuepress/.temp/internal/themeData.js +14 -14
- package/template-docs-vuepress/docs/.vuepress/.temp/pages/404.html.js +16 -16
- package/template-docs-vuepress/docs/.vuepress/.temp/pages/404.html.vue +4 -4
- package/template-docs-vuepress/docs/.vuepress/.temp/pages/get-started.html.js +16 -16
- package/template-docs-vuepress/docs/.vuepress/.temp/pages/get-started.html.vue +23 -23
- package/template-docs-vuepress/docs/.vuepress/.temp/pages/index.html.js +16 -16
- package/template-docs-vuepress/docs/.vuepress/.temp/pages/index.html.vue +4 -4
- package/template-docs-vuepress/docs/.vuepress/.temp/prismjs/config.js +2 -2
- package/template-docs-vuepress/docs/.vuepress/.temp/vite-root/index.html +13 -13
- package/template-docs-vuepress/docs/.vuepress/config.js +18 -18
- package/template-docs-vuepress/docs/README.md +33 -33
- package/template-docs-vuepress/docs/get-started.md +46 -46
- package/template-docs-vuepress/package-lock.json +3380 -3380
- package/template-docs-vuepress/package.json +19 -19
- package/template-laserlib/.eslintrc.cjs +201 -0
- package/template-laserlib/.gitlab-ci.yml +41 -0
- package/template-laserlib/README.md +16 -0
- package/template-laserlib/data/adapter/index.ts +0 -0
- package/template-laserlib/data/adapter/main-page/index.ts +6 -0
- package/template-laserlib/data/api/http.ts +34 -0
- package/template-laserlib/data/api/index.ts +14 -0
- package/template-laserlib/data/message/index.ts +4 -0
- package/template-laserlib/data/message/msgWebSocket.ts +39 -0
- package/template-laserlib/data/message/process.ts +20 -0
- package/template-laserlib/example/app.vue +37 -0
- package/template-laserlib/example/assets/bochui.svg +7 -0
- package/template-laserlib/example/assets/group.svg +3 -0
- package/template-laserlib/example/main.ts +12 -0
- package/template-laserlib/example/style.css +1 -0
- package/template-laserlib/index.html +13 -0
- package/template-laserlib/model/entity/constants.ts +0 -0
- package/template-laserlib/model/entity/index.ts +19 -0
- package/template-laserlib/model/main-page/index.ts +6 -0
- package/template-laserlib/package.json +52 -0
- package/template-laserlib/packages/main-page/index.ts +8 -0
- package/template-laserlib/packages/main-page/index.vue +10 -0
- package/template-laserlib/public/group.svg +3 -0
- package/template-laserlib/src/index.ts +41 -0
- package/template-laserlib/test/App.test.ts +16 -0
- package/template-laserlib/test/Example.test.ts +15 -0
- package/template-laserlib/tsconfig.json +45 -0
- package/template-laserlib/tsconfig.node.json +11 -0
- package/template-laserlib/types/index.d.ts +14 -0
- package/template-laserlib/vite-env.d.ts +6 -0
- package/template-laserlib/vite.config.ts +41 -0
- package/template-laserlib/window.d.ts +10 -0
- package/template-vue-js/package.json +34 -34
package/dist/index.mjs
CHANGED
|
@@ -1,49 +1,71 @@
|
|
|
1
|
-
import
|
|
1
|
+
import R from"fs";import N from"path";import{fileURLToPath as ai}from"url";import li from"readline";import ui from"events";function He(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ft={};const{FORCE_COLOR:hi,NODE_DISABLE_COLORS:ci,TERM:pi}=process.env,E={enabled:!ci&&pi!=="dumb"&&hi!=="0",reset:M(0,0),bold:M(1,22),dim:M(2,22),italic:M(3,23),underline:M(4,24),inverse:M(7,27),hidden:M(8,28),strikethrough:M(9,29),black:M(30,39),red:M(31,39),green:M(32,39),yellow:M(33,39),blue:M(34,39),magenta:M(35,39),cyan:M(36,39),white:M(37,39),gray:M(90,39),grey:M(90,39),bgBlack:M(40,49),bgRed:M(41,49),bgGreen:M(42,49),bgYellow:M(43,49),bgBlue:M(44,49),bgMagenta:M(45,49),bgCyan:M(46,49),bgWhite:M(47,49)};function Vt(t,e){let r=0,s,p="",f="";for(;r<t.length;r++)s=t[r],p+=s.open,f+=s.close,e.includes(s.close)&&(e=e.replace(s.rgx,s.close+s.open));return p+e+f}function fi(t,e){let r={has:t,keys:e};return r.reset=E.reset.bind(r),r.bold=E.bold.bind(r),r.dim=E.dim.bind(r),r.italic=E.italic.bind(r),r.underline=E.underline.bind(r),r.inverse=E.inverse.bind(r),r.hidden=E.hidden.bind(r),r.strikethrough=E.strikethrough.bind(r),r.black=E.black.bind(r),r.red=E.red.bind(r),r.green=E.green.bind(r),r.yellow=E.yellow.bind(r),r.blue=E.blue.bind(r),r.magenta=E.magenta.bind(r),r.cyan=E.cyan.bind(r),r.white=E.white.bind(r),r.gray=E.gray.bind(r),r.grey=E.grey.bind(r),r.bgBlack=E.bgBlack.bind(r),r.bgRed=E.bgRed.bind(r),r.bgGreen=E.bgGreen.bind(r),r.bgYellow=E.bgYellow.bind(r),r.bgBlue=E.bgBlue.bind(r),r.bgMagenta=E.bgMagenta.bind(r),r.bgCyan=E.bgCyan.bind(r),r.bgWhite=E.bgWhite.bind(r),r}function M(t,e){let r={open:`\x1B[${t}m`,close:`\x1B[${e}m`,rgx:new RegExp(`\\x1b\\[${e}m`,"g")};return function(s){return this!==void 0&&this.has!==void 0?(this.has.includes(t)||(this.has.push(t),this.keys.push(r)),s===void 0?this:E.enabled?Vt(this.keys,s+""):s+""):s===void 0?fi([t],[r]):E.enabled?Vt([r],s+""):s+""}}var B=E,di=(t,e)=>{if(!(t.meta&&t.name!=="escape")){if(t.ctrl){if(t.name==="a")return"first";if(t.name==="c"||t.name==="d")return"abort";if(t.name==="e")return"last";if(t.name==="g")return"reset"}if(e){if(t.name==="j")return"down";if(t.name==="k")return"up"}return t.name==="return"||t.name==="enter"?"submit":t.name==="backspace"?"delete":t.name==="delete"?"deleteForward":t.name==="abort"?"abort":t.name==="escape"?"exit":t.name==="tab"?"next":t.name==="pagedown"?"nextPage":t.name==="pageup"?"prevPage":t.name==="home"?"home":t.name==="end"?"end":t.name==="up"?"up":t.name==="down"?"down":t.name==="right"?"right":t.name==="left"?"left":!1}},Fe=t=>{const e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))"].join("|"),r=new RegExp(e,"g");return typeof t=="string"?t.replace(r,""):t};const Ve="\x1B",O=`${Ve}[`,gi="\x07",qe={to(t,e){return e?`${O}${e+1};${t+1}H`:`${O}${t+1}G`},move(t,e){let r="";return t<0?r+=`${O}${-t}D`:t>0&&(r+=`${O}${t}C`),e<0?r+=`${O}${-e}A`:e>0&&(r+=`${O}${e}B`),r},up:(t=1)=>`${O}${t}A`,down:(t=1)=>`${O}${t}B`,forward:(t=1)=>`${O}${t}C`,backward:(t=1)=>`${O}${t}D`,nextLine:(t=1)=>`${O}E`.repeat(t),prevLine:(t=1)=>`${O}F`.repeat(t),left:`${O}G`,hide:`${O}?25l`,show:`${O}?25h`,save:`${Ve}7`,restore:`${Ve}8`},mi={up:(t=1)=>`${O}S`.repeat(t),down:(t=1)=>`${O}T`.repeat(t)},vi={screen:`${O}2J`,up:(t=1)=>`${O}1J`.repeat(t),down:(t=1)=>`${O}J`.repeat(t),line:`${O}2K`,lineEnd:`${O}K`,lineStart:`${O}1K`,lines(t){let e="";for(let r=0;r<t;r++)e+=this.line+(r<t-1?qe.up():"");return t&&(e+=qe.left),e}};var H={cursor:qe,scroll:mi,erase:vi,beep:gi};const _i=Fe,{erase:qt,cursor:yi}=H,Si=t=>[..._i(t)].length;var bi=function(t,e){if(!e)return qt.line+yi.to(0);let r=0;const s=t.split(/\r?\n/);for(let p of s)r+=1+Math.floor(Math.max(Si(p)-1,0)/e);return qt.lines(r)};const ue={arrowUp:"\u2191",arrowDown:"\u2193",arrowLeft:"\u2190",arrowRight:"\u2192",radioOn:"\u25C9",radioOff:"\u25EF",tick:"\u2714",cross:"\u2716",ellipsis:"\u2026",pointerSmall:"\u203A",line:"\u2500",pointer:"\u276F"},wi={arrowUp:ue.arrowUp,arrowDown:ue.arrowDown,arrowLeft:ue.arrowLeft,arrowRight:ue.arrowRight,radioOn:"(*)",radioOff:"( )",tick:"\u221A",cross:"\xD7",ellipsis:"...",pointerSmall:"\xBB",line:"\u2500",pointer:">"},Pi=process.platform==="win32"?wi:ue;var $t=Pi;const ne=B,X=$t,$e=Object.freeze({password:{scale:1,render:t=>"*".repeat(t.length)},emoji:{scale:2,render:t=>"\u{1F603}".repeat(t.length)},invisible:{scale:0,render:t=>""},default:{scale:1,render:t=>`${t}`}}),Ci=t=>$e[t]||$e.default,he=Object.freeze({aborted:ne.red(X.cross),done:ne.green(X.tick),exited:ne.yellow(X.cross),default:ne.cyan("?")}),ki=(t,e,r)=>e?he.aborted:r?he.exited:t?he.done:he.default,xi=t=>ne.gray(t?X.ellipsis:X.pointerSmall),Ei=(t,e)=>ne.gray(t?e?X.pointerSmall:"+":X.line);var Mi={styles:$e,render:Ci,symbols:he,symbol:ki,delimiter:xi,item:Ei};const Li=Fe;var Oi=function(t,e){let r=String(Li(t)||"").split(/\r?\n/);return e?r.map(s=>Math.ceil(s.length/e)).reduce((s,p)=>s+p):r.length},Ai=(t,e={})=>{const r=Number.isSafeInteger(parseInt(e.margin))?new Array(parseInt(e.margin)).fill(" ").join(""):e.margin||"",s=e.width;return(t||"").split(/\r?\n/g).map(p=>p.split(/\s+/g).reduce((f,l)=>(l.length+r.length>=s||f[f.length-1].length+l.length+1<s?f[f.length-1]+=` ${l}`:f.push(`${r}${l}`),f),[r]).join(`
|
|
2
2
|
`)).join(`
|
|
3
|
-
`)},
|
|
4
|
-
`),this.close()}async validate(){let
|
|
5
|
-
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(
|
|
6
|
-
`).reduce((
|
|
7
|
-
${
|
|
3
|
+
`)},Ii=(t,e,r)=>{r=r||e;let s=Math.min(e-r,t-Math.floor(r/2));s<0&&(s=0);let p=Math.min(s+r,e);return{startIndex:s,endIndex:p}},V={action:di,clear:bi,style:Mi,strip:Fe,figures:$t,lines:Oi,wrap:Ai,entriesToDisplay:Ii};const Gt=li,{action:Ri}=V,Ni=ui,{beep:Di,cursor:Ti}=H,Bi=B;let Hi=class extends Ni{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>{})).bind(this);const r=Gt.createInterface({input:this.in,escapeCodeTimeout:50});Gt.emitKeypressEvents(this.in,r),this.in.isTTY&&this.in.setRawMode(!0);const s=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,p=(f,l)=>{let h=Ri(l,s);h===!1?this._&&this._(f,l):typeof this[h]=="function"?this[h](l):this.bell()};this.close=()=>{this.out.write(Ti.show),this.in.removeListener("keypress",p),this.in.isTTY&&this.in.setRawMode(!1),r.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",p)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(Di)}render(){this.onRender(Bi),this.firstRender&&(this.firstRender=!1)}};var Y=Hi;const Pe=B,Fi=Y,{erase:Vi,cursor:ce}=H,{style:Ge,clear:Ue,lines:qi,figures:$i}=V;class Gi extends Fi{constructor(e={}){super(e),this.transform=Ge.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=+!!this.initial,this.cursorOffset=0,this.clear=Ue("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=Pe.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=+!!this.initial,this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write(`
|
|
4
|
+
`),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
5
|
+
`),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,r){let s=this.value.slice(0,this.cursor),p=this.value.slice(this.cursor);this.value=`${s}${e}${p}`,this.red=!1,this.cursor=this.placeholder?0:s.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),r=this.value.slice(this.cursor);this.value=`${e}${r}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor+1);this.value=`${e}${r}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return this.cursor===0||this.placeholder&&this.cursor===1}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(ce.down(qi(this.outputError,this.out.columns)-1)+Ue(this.outputError,this.out.columns)),this.out.write(Ue(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ge.symbol(this.done,this.aborted),Pe.bold(this.msg),Ge.delimiter(this.done),this.red?Pe.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
6
|
+
`).reduce((e,r,s)=>e+`
|
|
7
|
+
${s?" ":$i.pointerSmall} ${Pe.red().italic(r)}`,"")),this.out.write(Vi.line+ce.to(0)+this.outputText+ce.save+this.outputError+ce.restore+ce.move(this.cursorOffset,0)))}}var Ui=Gi;const $=B,Wi=Y,{style:Ut,clear:Wt,figures:Ce,wrap:Ki,entriesToDisplay:ji}=V,{cursor:Yi}=H;class Ji extends Wi{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),value:r&&(r.value===void 0?s:r.value),description:r&&r.description,selected:r&&r.selected,disabled:r&&r.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=Wt("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
8
8
|
`),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
9
|
-
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(
|
|
10
|
-
`;for(let
|
|
11
|
-
`+
|
|
12
|
-
`}}this.out.write(this.outputText)}}var
|
|
9
|
+
`),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){this.cursor===0?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,r){if(e===" ")return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(Yi.hide):this.out.write(Wt(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=ji(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[Ut.symbol(this.done,this.aborted),$.bold(this.msg),Ut.delimiter(!1),this.done?this.selection.title:this.selection.disabled?$.yellow(this.warn):$.gray(this.hint)].join(" "),!this.done){this.outputText+=`
|
|
10
|
+
`;for(let s=e;s<r;s++){let p,f,l="",h=this.choices[s];s===e&&e>0?f=Ce.arrowUp:s===r-1&&r<this.choices.length?f=Ce.arrowDown:f=" ",h.disabled?(p=this.cursor===s?$.gray().underline(h.title):$.strikethrough().gray(h.title),f=(this.cursor===s?$.bold().gray(Ce.pointer)+" ":" ")+f):(p=this.cursor===s?$.cyan().underline(h.title):h.title,f=(this.cursor===s?$.cyan(Ce.pointer)+" ":" ")+f,h.description&&this.cursor===s&&(l=` - ${h.description}`,(f.length+p.length+l.length>=this.out.columns||h.description.split(/\r?\n/).length>1)&&(l=`
|
|
11
|
+
`+Ki(h.description,{margin:3,width:this.out.columns})))),this.outputText+=`${f} ${p}${$.gray(l)}
|
|
12
|
+
`}}this.out.write(this.outputText)}}var zi=Ji;const ke=B,Qi=Y,{style:Kt,clear:Zi}=V,{cursor:jt,erase:Xi}=H;class es extends Qi{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
13
13
|
`),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
14
|
-
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(
|
|
15
|
-
`),this.close()}async validate(){let
|
|
16
|
-
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let
|
|
17
|
-
`).reduce((
|
|
18
|
-
${
|
|
19
|
-
`),this.close()}async validate(){let
|
|
20
|
-
`),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let
|
|
21
|
-
`).reduce((
|
|
22
|
-
${
|
|
23
|
-
`),this.close()}submit(){const
|
|
24
|
-
`),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(
|
|
14
|
+
`),this.close()}deactivate(){if(this.value===!1)return this.bell();this.value=!1,this.render()}activate(){if(this.value===!0)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,r){if(e===" ")this.value=!this.value;else if(e==="1")this.value=!0;else if(e==="0")this.value=!1;else return this.bell();this.render()}render(){this.closed||(this.firstRender?this.out.write(jt.hide):this.out.write(Zi(this.outputText,this.out.columns)),super.render(),this.outputText=[Kt.symbol(this.done,this.aborted),ke.bold(this.msg),Kt.delimiter(this.done),this.value?this.inactive:ke.cyan().underline(this.inactive),ke.gray("/"),this.value?ke.cyan().underline(this.active):this.active].join(" "),this.out.write(Xi.line+jt.to(0)+this.outputText))}}var ts=es;let rs=class Ht{constructor({token:e,date:r,parts:s,locales:p}){this.token=e,this.date=r||new Date,this.parts=s||[this],this.locales=p||{}}up(){}down(){}next(){const e=this.parts.indexOf(this);return this.parts.find((r,s)=>s>e&&r instanceof Ht)}setTo(e){}prev(){let e=[].concat(this.parts).reverse();const r=e.indexOf(this);return e.find((s,p)=>p>r&&s instanceof Ht)}toString(){return String(this.date)}};var G=rs;const is=G;let ss=class extends is{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}};var ns=ss;const os=G,as=t=>(t=t%10,t===1?"st":t===2?"nd":t===3?"rd":"th");let ls=class extends os{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),r=this.date.getDay();return this.token==="DD"?String(e).padStart(2,"0"):this.token==="Do"?e+as(e):this.token==="d"?r+1:this.token==="ddd"?this.locales.weekdaysShort[r]:this.token==="dddd"?this.locales.weekdays[r]:e}};var us=ls;const hs=G;let cs=class extends hs{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}};var ps=cs;const fs=G;let ds=class extends fs{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}};var gs=ds;const ms=G;let vs=class extends ms{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}};var _s=vs;const ys=G;let Ss=class extends ys{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),r=this.token.length;return r===2?String(e+1).padStart(2,"0"):r===3?this.locales.monthsShort[e]:r===4?this.locales.months[e]:String(e+1)}};var bs=Ss;const ws=G;let Ps=class extends ws{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}};var Cs=Ps;const ks=G;let xs=class extends ks{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return this.token.length===2?e.substr(-2):e}};var Es=xs,Ms={DatePart:G,Meridiem:ns,Day:us,Hours:ps,Milliseconds:gs,Minutes:_s,Month:bs,Seconds:Cs,Year:Es};const We=B,Ls=Y,{style:Yt,clear:Jt,figures:Os}=V,{erase:As,cursor:zt}=H,{DatePart:Qt,Meridiem:Is,Day:Rs,Hours:Ns,Milliseconds:Ds,Minutes:Ts,Month:Bs,Seconds:Hs,Year:Fs}=Ms,Vs=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,Zt={1:({token:t})=>t.replace(/\\(.)/g,"$1"),2:t=>new Rs(t),3:t=>new Bs(t),4:t=>new Fs(t),5:t=>new Is(t),6:t=>new Ns(t),7:t=>new Ts(t),8:t=>new Hs(t),9:t=>new Ds(t)},qs={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class $s extends Ls{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(qs,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=Jt("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let r;for(this.parts=[];r=Vs.exec(e);){let p=r.shift(),f=r.findIndex(l=>l!=null);this.parts.push(f in Zt?Zt[f]({token:r[f]||p,date:this.date,parts:this.parts,locales:this.locales}):r[f]||p)}let s=this.parts.reduce((p,f)=>(typeof f=="string"&&typeof p[p.length-1]=="string"?p[p.length-1]+=f:p.push(f),p),[]);this.parts.splice(0),this.parts.push(...s),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof Qt)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
15
|
+
`),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
16
|
+
`),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(e==null)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(r=>r instanceof Qt)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(zt.hide):this.out.write(Jt(this.outputText,this.out.columns)),super.render(),this.outputText=[Yt.symbol(this.done,this.aborted),We.bold(this.msg),Yt.delimiter(!1),this.parts.reduce((e,r,s)=>e.concat(s===this.cursor&&!this.done?We.cyan().underline(r.toString()):r),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split(`
|
|
17
|
+
`).reduce((e,r,s)=>e+`
|
|
18
|
+
${s?" ":Os.pointerSmall} ${We.red().italic(r)}`,"")),this.out.write(As.line+zt.to(0)+this.outputText))}}var Gs=$s;const xe=B,Us=Y,{cursor:Ee,erase:Ws}=H,{style:Ke,figures:Ks,clear:Xt,lines:js}=V,Ys=/[0-9]/,je=t=>t!==void 0,er=(t,e)=>{let r=Math.pow(10,e);return Math.round(t*r)/r};class Js extends Us{constructor(e={}){super(e),this.transform=Ke.render(e.style),this.msg=e.message,this.initial=je(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=je(e.min)?e.min:-1/0,this.max=je(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){!e&&e!==0?(this.placeholder=!0,this.rendered=xe.gray(this.transform.render(`${this.initial}`)),this._value=""):(this.placeholder=!1,this.rendered=this.transform.render(`${er(e,this.round)}`),this._value=er(e,this.round)),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return e==="-"||e==="."&&this.float||Ys.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=e!==""?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
19
|
+
`),this.close()}async validate(){let e=await this.validator(this.value);typeof e=="string"&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=e!==""?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
|
|
20
|
+
`),this.close()}up(){if(this.typed="",this.value===""&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",this.value===""&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(e.length===0)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",this.value!==""&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,r){if(!this.valid(e))return this.bell();const s=Date.now();if(s-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=s,this.color="cyan",e===".")return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(Ee.down(js(this.outputError,this.out.columns)-1)+Xt(this.outputError,this.out.columns)),this.out.write(Xt(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[Ke.symbol(this.done,this.aborted),xe.bold(this.msg),Ke.delimiter(this.done),!this.done||!this.done&&!this.placeholder?xe[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
|
21
|
+
`).reduce((e,r,s)=>e+`
|
|
22
|
+
${s?" ":Ks.pointerSmall} ${xe.red().italic(r)}`,"")),this.out.write(Ws.line+Ee.to(0)+this.outputText+Ee.save+this.outputError+Ee.restore))}}var zs=Js;const q=B,{cursor:Qs}=H,Zs=Y,{clear:tr,figures:J,style:rr,wrap:Xs,entriesToDisplay:en}=V;let tn=class extends Zs{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((r,s)=>(typeof r=="string"&&(r={title:r,value:s}),{title:r&&(r.title||r.value||r),description:r&&r.description,value:r&&(r.value===void 0?s:r.value),selected:r&&r.selected,disabled:r&&r.disabled})),this.clear=tr("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
23
|
+
`),this.close()}submit(){const e=this.value.filter(r=>r.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
24
|
+
`),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){this.cursor===0?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){const e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(this.maxChoices!==void 0||this.value[this.cursor].disabled)return this.bell();const e=!this.value[this.cursor].selected;this.value.filter(r=>!r.disabled).forEach(r=>r.selected=e),this.render()}_(e,r){if(e===" ")this.handleSpaceToggle();else if(e==="a")this.toggleAll();else return this.bell()}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
25
25
|
Instructions:
|
|
26
|
-
${
|
|
27
|
-
${
|
|
26
|
+
${J.arrowUp}/${J.arrowDown}: Highlight option
|
|
27
|
+
${J.arrowLeft}/${J.arrowRight}/[space]: Toggle selection
|
|
28
28
|
`+(this.maxChoices===void 0?` a: Toggle all
|
|
29
|
-
`:"")+" enter/return: Complete answer":""}renderOption(
|
|
30
|
-
`+Xs(
|
|
31
|
-
`+
|
|
32
|
-
`)}renderOptions(
|
|
29
|
+
`:"")+" enter/return: Complete answer":""}renderOption(e,r,s,p){const f=(r.selected?q.green(J.radioOn):J.radioOff)+" "+p+" ";let l,h;return r.disabled?l=e===s?q.gray().underline(r.title):q.strikethrough().gray(r.title):(l=e===s?q.cyan().underline(r.title):r.title,e===s&&r.description&&(h=` - ${r.description}`,(f.length+l.length+h.length>=this.out.columns||r.description.split(/\r?\n/).length>1)&&(h=`
|
|
30
|
+
`+Xs(r.description,{margin:f.length,width:this.out.columns})))),f+l+q.gray(h||"")}paginateOptions(e){if(e.length===0)return q.red("No matches for this query.");let{startIndex:r,endIndex:s}=en(this.cursor,e.length,this.optionsPerPage),p,f=[];for(let l=r;l<s;l++)l===r&&r>0?p=J.arrowUp:l===s-1&&s<e.length?p=J.arrowDown:p=" ",f.push(this.renderOption(this.cursor,e[l],l,p));return`
|
|
31
|
+
`+f.join(`
|
|
32
|
+
`)}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");const e=[q.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(q.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(Qs.hide),super.render();let e=[rr.symbol(this.done,this.aborted),q.bold(this.msg),rr.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=q.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=tr(e,this.out.columns)}};var ir=tn;const pe=B,rn=Y,{erase:sn,cursor:sr}=H,{style:Ye,clear:nr,figures:Je,wrap:nn,entriesToDisplay:on}=V,or=(t,e)=>t[e]&&(t[e].value||t[e].title||t[e]),an=(t,e)=>t[e]&&(t[e].title||t[e].value||t[e]),ln=(t,e)=>{const r=t.findIndex(s=>s.value===e||s.title===e);return r>-1?r:void 0};class un extends rn{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial=typeof e.initial=="number"?e.initial:ln(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=Ye.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=nr("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return typeof this._fb=="number"?e=this.choices[this._fb]:typeof this._fb=="string"&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=or(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){const r=this.completing=this.suggest(this.input,this.choices),s=await r;if(this.completing!==r)return;this.suggestions=s.map((f,l,h)=>({title:an(h,l),value:or(h,l),description:f.description})),this.completing=!1;const p=Math.max(s.length-1,0);this.moveSelect(Math.min(p,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(this.initial!==void 0?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
33
33
|
`),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
34
34
|
`),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write(`
|
|
35
|
-
`),this.close()}_(
|
|
36
|
-
`+
|
|
35
|
+
`),this.close()}_(e,r){let s=this.input.slice(0,this.cursor),p=this.input.slice(this.cursor);this.input=`${s}${e}${p}`,this.cursor=s.length+1,this.complete(this.render),this.render()}delete(){if(this.cursor===0)return this.bell();let e=this.input.slice(0,this.cursor-1),r=this.input.slice(this.cursor);this.input=`${e}${r}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor+1);this.input=`${e}${r}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){this.select===0?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,r,s,p){let f,l=s?Je.arrowUp:p?Je.arrowDown:" ",h=r?pe.cyan().underline(e.title):e.title;return l=(r?pe.cyan(Je.pointer)+" ":" ")+l,e.description&&(f=` - ${e.description}`,(l.length+h.length+f.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(f=`
|
|
36
|
+
`+nn(e.description,{margin:3,width:this.out.columns}))),l+" "+h+pe.gray(f||"")}render(){if(this.closed)return;this.firstRender?this.out.write(sr.hide):this.out.write(nr(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:r}=on(this.select,this.choices.length,this.limit);if(this.outputText=[Ye.symbol(this.done,this.aborted,this.exited),pe.bold(this.msg),Ye.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){const s=this.suggestions.slice(e,r).map((p,f)=>this.renderOption(p,this.select===f+e,f===0&&e>0,f+e===r-1&&r<this.choices.length)).join(`
|
|
37
37
|
`);this.outputText+=`
|
|
38
|
-
`+(
|
|
38
|
+
`+(s||pe.gray(this.fallback.title))}this.out.write(sn.line+sr.to(0)+this.outputText)}}var hn=un;const U=B,{cursor:cn}=H,pn=ir,{clear:ar,style:lr,figures:oe}=V;class fn extends pn{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=ar("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){this.cursor===0?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){const e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(s=>this.inputValue?!!(typeof s.title=="string"&&s.title.toLowerCase().includes(this.inputValue.toLowerCase())||typeof s.value=="string"&&s.value.toLowerCase().includes(this.inputValue.toLowerCase())):!0);const r=this.filteredOptions.findIndex(s=>s===e);this.cursor=r<0?0:r,this.render()}handleSpaceToggle(){const e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(r=>r.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,r){e===" "?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return this.instructions===void 0||this.instructions?typeof this.instructions=="string"?this.instructions:`
|
|
39
39
|
Instructions:
|
|
40
|
-
${
|
|
41
|
-
${
|
|
40
|
+
${oe.arrowUp}/${oe.arrowDown}: Highlight option
|
|
41
|
+
${oe.arrowLeft}/${oe.arrowRight}/[space]: Toggle selection
|
|
42
42
|
[a,b,c]/delete: Filter choices
|
|
43
43
|
enter/return: Complete answer
|
|
44
44
|
`:""}renderCurrentInput(){return`
|
|
45
|
-
Filtered results for: ${this.inputValue?this.inputValue:
|
|
46
|
-
`}renderOption(
|
|
45
|
+
Filtered results for: ${this.inputValue?this.inputValue:U.gray("Enter something to filter")}
|
|
46
|
+
`}renderOption(e,r,s){let p;return r.disabled?p=e===s?U.gray().underline(r.title):U.strikethrough().gray(r.title):p=e===s?U.cyan().underline(r.title):r.title,(r.selected?U.green(oe.radioOn):oe.radioOff)+" "+p}renderDoneOrInstructions(){if(this.done)return this.value.filter(r=>r.selected).map(r=>r.title).join(", ");const e=[U.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(U.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(cn.hide),super.render();let e=[lr.symbol(this.done,this.aborted),U.bold(this.msg),lr.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=U.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=ar(e,this.out.columns)}}var dn=fn;const ur=B,gn=Y,{style:hr,clear:mn}=V,{erase:vn,cursor:cr}=H;class _n extends gn{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write(`
|
|
47
47
|
`),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write(`
|
|
48
|
-
`),this.close()}_(t,e){return t.toLowerCase()==="y"?(this.value=!0,this.submit()):t.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(Jt.hide):this.out.write(pi(this.outputText,this.out.columns)),super.render(),this.outputText=[zt.symbol(this.done,this.aborted),Ut.bold(this.msg),zt.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:Ut.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(mi.line+Jt.to(0)+this.outputText))}}var vi=gi,bi={TextPrompt:Ue,SelectPrompt:We,TogglePrompt:ts,DatePrompt:Bs,NumberPrompt:Ws,MultiselectPrompt:Lt,AutocompletePrompt:hi,AutocompleteMultiselectPrompt:di,ConfirmPrompt:vi};(function(s){const t=s,e=bi,i=r=>r;function n(r,l,p={}){return new Promise((h,C)=>{const m=new e[r](l),a=p.onAbort||i,u=p.onSubmit||i,b=p.onExit||i;m.on("state",l.onState||i),m.on("submit",M=>h(u(M))),m.on("exit",M=>h(b(M))),m.on("abort",M=>C(a(M)))})}t.text=r=>n("TextPrompt",r),t.password=r=>(r.style="password",t.text(r)),t.invisible=r=>(r.style="invisible",t.text(r)),t.number=r=>n("NumberPrompt",r),t.date=r=>n("DatePrompt",r),t.confirm=r=>n("ConfirmPrompt",r),t.list=r=>{const l=r.separator||",";return n("TextPrompt",r,{onSubmit:p=>p.split(l).map(h=>h.trim())})},t.toggle=r=>n("TogglePrompt",r),t.select=r=>n("SelectPrompt",r),t.multiselect=r=>{r.choices=[].concat(r.choices||[]);const l=p=>p.filter(h=>h.selected).map(h=>h.value);return n("MultiselectPrompt",r,{onAbort:l,onSubmit:l})},t.autocompleteMultiselect=r=>{r.choices=[].concat(r.choices||[]);const l=p=>p.filter(h=>h.selected).map(h=>h.value);return n("AutocompleteMultiselectPrompt",r,{onAbort:l,onSubmit:l})};const o=(r,l)=>Promise.resolve(l.filter(p=>p.title.slice(0,r.length).toLowerCase()===r.toLowerCase()));t.autocomplete=r=>(r.suggest=r.suggest||o,r.choices=[].concat(r.choices||[]),n("AutocompletePrompt",r))})(wt);const pt=wt,wi=["suggest","format","onState","validate","onRender","type"],kt=()=>{};async function H(s=[],{onSubmit:t=kt,onCancel:e=kt}={}){const i={},n=H._override||{};s=[].concat(s);let o,r,l,p,h,C;const m=async(a,u,b=!1)=>{if(!(!b&&a.validate&&a.validate(u)!==!0))return a.format?await a.format(u,i):u};for(r of s)if({name:p,type:h}=r,typeof h=="function"&&(h=await h(o,{...i},r),r.type=h),!!h){for(let a in r){if(wi.includes(a))continue;let u=r[a];r[a]=typeof u=="function"?await u(o,{...i},C):u}if(C=r,typeof r.message!="string")throw new Error("prompt message is required");if({name:p,type:h}=r,pt[h]===void 0)throw new Error(`prompt type (${h}) is not defined`);if(n[r.name]!==void 0&&(o=await m(r,n[r.name]),o!==void 0)){i[p]=o;continue}try{o=H._injected?$i(H._injected,r.initial):await pt[h](r),i[p]=o=await m(r,o,!0),l=await t(r,o,i)}catch{l=!await e(r,i)}if(l)return i}return i}function $i(s,t){const e=s.shift();if(e instanceof Error)throw e;return e===void 0?t:e}function yi(s){H._injected=(H._injected||[]).concat(s)}function Si(s){H._override=Object.assign({},s)}var xi=Object.assign(H,{prompt:H,prompts:pt,inject:yi,override:Si});const Gt=bt(xi);function Oi(s,t){var e=s;t.slice(0,-1).forEach(function(n){e=e[n]||{}});var i=t[t.length-1];return i in e}function Kt(s){return typeof s=="number"||/^0x[0-9a-f]+$/i.test(s)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(s)}function Wt(s,t){return t==="constructor"&&typeof s[t]=="function"||t==="__proto__"}var Mi=function(s,t){t||(t={});var e={bools:{},strings:{},unknownFn:null};typeof t.unknown=="function"&&(e.unknownFn=t.unknown),typeof t.boolean=="boolean"&&t.boolean?e.allBools=!0:[].concat(t.boolean).filter(Boolean).forEach(function(c){e.bools[c]=!0});var i={};function n(c){return i[c].some(function(y){return e.bools[y]})}Object.keys(t.alias||{}).forEach(function(c){i[c]=[].concat(t.alias[c]),i[c].forEach(function(y){i[y]=[c].concat(i[c].filter(function(_){return y!==_}))})}),[].concat(t.string).filter(Boolean).forEach(function(c){e.strings[c]=!0,i[c]&&[].concat(i[c]).forEach(function(y){e.strings[y]=!0})});var o=t.default||{},r={_:[]};function l(c,y){return e.allBools&&/^--[^=]+$/.test(y)||e.strings[c]||e.bools[c]||i[c]}function p(c,y,_){for(var f=c,k=0;k<y.length-1;k++){var D=y[k];if(Wt(f,D))return;f[D]===void 0&&(f[D]={}),(f[D]===Object.prototype||f[D]===Number.prototype||f[D]===String.prototype)&&(f[D]={}),f[D]===Array.prototype&&(f[D]=[]),f=f[D]}var R=y[y.length-1];Wt(f,R)||((f===Object.prototype||f===Number.prototype||f===String.prototype)&&(f={}),f===Array.prototype&&(f=[]),f[R]===void 0||e.bools[R]||typeof f[R]=="boolean"?f[R]=_:Array.isArray(f[R])?f[R].push(_):f[R]=[f[R],_])}function h(c,y,_){if(!(_&&e.unknownFn&&!l(c,_)&&e.unknownFn(_)===!1)){var f=!e.strings[c]&&Kt(y)?Number(y):y;p(r,c.split("."),f),(i[c]||[]).forEach(function(k){p(r,k.split("."),f)})}}Object.keys(e.bools).forEach(function(c){h(c,o[c]===void 0?!1:o[c])});var C=[];s.indexOf("--")!==-1&&(C=s.slice(s.indexOf("--")+1),s=s.slice(0,s.indexOf("--")));for(var m=0;m<s.length;m++){var a=s[m],u,b;if(/^--.+=/.test(a)){var M=a.match(/^--([^=]+)=([\s\S]*)$/);u=M[1];var w=M[2];e.bools[u]&&(w=w!=="false"),h(u,w,a)}else if(/^--no-.+/.test(a))u=a.match(/^--no-(.+)/)[1],h(u,!1,a);else if(/^--.+/.test(a))u=a.match(/^--(.+)/)[1],b=s[m+1],b!==void 0&&!/^(-|--)[^-]/.test(b)&&!e.bools[u]&&!e.allBools&&(!i[u]||!n(u))?(h(u,b,a),m+=1):/^(true|false)$/.test(b)?(h(u,b==="true",a),m+=1):h(u,e.strings[u]?"":!0,a);else if(/^-[^-]+/.test(a)){for(var $=a.slice(1,-1).split(""),Y=!1,x=0;x<$.length;x++){if(b=a.slice(x+2),b==="-"){h($[x],b,a);continue}if(/[A-Za-z]/.test($[x])&&b[0]==="="){h($[x],b.slice(1),a),Y=!0;break}if(/[A-Za-z]/.test($[x])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(b)){h($[x],b,a),Y=!0;break}if($[x+1]&&$[x+1].match(/\W/)){h($[x],a.slice(x+2),a),Y=!0;break}else h($[x],e.strings[$[x]]?"":!0,a)}u=a.slice(-1)[0],!Y&&u!=="-"&&(s[m+1]&&!/^(-|--)[^-]/.test(s[m+1])&&!e.bools[u]&&(!i[u]||!n(u))?(h(u,s[m+1],a),m+=1):s[m+1]&&/^(true|false)$/.test(s[m+1])?(h(u,s[m+1]==="true",a),m+=1):h(u,e.strings[u]?"":!0,a))}else if((!e.unknownFn||e.unknownFn(a)!==!1)&&r._.push(e.strings._||!Kt(a)?a:Number(a)),t.stopEarly){r._.push.apply(r._,s.slice(m+1));break}}return Object.keys(o).forEach(function(c){Oi(r,c.split("."))||(p(r,c.split("."),o[c]),(i[c]||[]).forEach(function(y){p(r,y.split("."),o[c])}))}),t["--"]?r["--"]=C.slice():C.forEach(function(c){r._.push(c)}),r};const Pi=bt(Mi);let B=!0;const J=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let q=0;if(J.process&&J.process.env&&J.process.stdout){const{FORCE_COLOR:s,NODE_DISABLE_COLORS:t,NO_COLOR:e,TERM:i,COLORTERM:n}=J.process.env;t||e||s==="0"?B=!1:s==="1"||s==="2"||s==="3"?B=!0:i==="dumb"?B=!1:"CI"in J.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(o=>o in J.process.env)?B=!0:B=process.stdout.isTTY,B&&(process.platform==="win32"||n&&(n==="truecolor"||n==="24bit")?q=3:i&&(i.endsWith("-256color")||i.endsWith("256"))?q=2:q=1)}let Zt={enabled:B,supportLevel:q};function qt(s,t,e=1){const i=`\x1B[${s}m`,n=`\x1B[${t}m`,o=new RegExp(`\\x1b\\[${t}m`,"g");return r=>Zt.enabled&&Zt.supportLevel>=e?i+(""+r).replace(o,i)+n:""+r}const Xt=qt(0,0),Qt=qt(31,39),mt=process.cwd(),te=Pi(process.argv.slice(2),{default:{help:!1},alias:{h:"help",t:"template"},string:["_"]}),Ti={_gitignore:".gitignore"},ee={"protocut-2d":{"@fsdev/cadui-2d":"^0.0.2","@fsdev/cutui-2d":"^0.0.2","@fsdev/webcad-js":"1.1.0"},"protocut-3d":{"@fsdev/cutui-3d":"^0.0.2","@fsdev/webcad-platform":"1.1.0"}},se="fsapp-project";async function Ci(){let s=re(te._[0])||se;const t=()=>s==="."?O.basename(O.resolve()):s;let e;Gt.override({overwrite:te.overwrite});try{e=await Gt([{type:"text",name:"projectName",message:Xt("Project name:"),onState:w=>{s=re(w.value)||se}},{type:()=>!S.existsSync(s)||Ei(s)?null:"select",name:"overwrite",message:()=>(s==="."?"Current directory":`Target directory ${s}`)+"is not empty. Please choose how to proceed:",initial:0,choices:[{title:"Remove existing files and continue",value:"yes"},{title:"Cancel operation",value:"no"},{title:"Ignore files and continue",value:"ignore"}]},{type:(w,{overwrite:$})=>{if($==="no")throw new Error(Qt("\u2716")+" Operation cancelled");return null},name:"overwriteChecker"},{type:()=>ne(t())?null:"text",name:"packageName",message:Xt("Package name:"),initial:()=>Ii(t()),validate:w=>ne(w)||"Invalid package.json name"},{type:"select",name:"template",message:"Select a template",choices:[{title:"Vue",value:"vue"},{title:"Docs",value:"docs"},{title:"Protocut",value:"protocut"}]},{type:"select",name:"variant",message:"Select a templateUse arrow-keys. Return to submit.",choices:w=>w==="vue"?[{title:"TypeScript",value:"ts"},{title:"JavaScript",value:"js"}]:w==="docs"?[{title:"VitePress",value:"vitepress"},{title:"VuePress",value:"vuepress"}]:w==="protocut"?[{title:"2D",value:"2d"},{title:"3D",value:"3d"}]:[]}],{onCancel:()=>{throw new Error(Qt("\u2716")+" Operation cancelled")}})}catch(w){console.log(w.message);return}const{overwrite:i,template:n,packageName:o,variant:r}=e,l=O.join(mt,s);i==="yes"?_i(l):S.existsSync(l)||S.mkdirSync(l,{recursive:!0});const p=O.resolve(oe(import.meta.url),"../..",n==="protocut"?"template-protocut":`template-${n}-${r}`),h=(w,$)=>{const Y=O.join(l,Ti[w]??w);$?S.writeFileSync(Y,$):ie(O.join(p,w),Y)},C=S.readdirSync(p);for(const w of C.filter($=>$!=="package.json"&&!$.includes("template")))h(w);const m=JSON.parse(S.readFileSync(O.join(p,"package.json"),"utf-8"));m.name=o||t(),ee[`${n}-${r}`]&&Object.assign(m.dependencies,ee[`${n}-${r}`]),h("package.json",JSON.stringify(m,null,2)+`
|
|
49
|
-
|
|
48
|
+
`),this.close()}_(e,r){return e.toLowerCase()==="y"?(this.value=!0,this.submit()):e.toLowerCase()==="n"?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(cr.hide):this.out.write(mn(this.outputText,this.out.columns)),super.render(),this.outputText=[hr.symbol(this.done,this.aborted),ur.bold(this.msg),hr.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:ur.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(vn.line+cr.to(0)+this.outputText))}}var yn=_n,Sn={TextPrompt:Ui,SelectPrompt:zi,TogglePrompt:ts,DatePrompt:Gs,NumberPrompt:zs,MultiselectPrompt:ir,AutocompletePrompt:hn,AutocompleteMultiselectPrompt:dn,ConfirmPrompt:yn};(function(t){const e=t,r=Sn,s=l=>l;function p(l,h,o={}){return new Promise((c,u)=>{const d=new r[l](h),i=o.onAbort||s,a=o.onSubmit||s,n=o.onExit||s;d.on("state",h.onState||s),d.on("submit",m=>c(a(m))),d.on("exit",m=>c(n(m))),d.on("abort",m=>u(i(m)))})}e.text=l=>p("TextPrompt",l),e.password=l=>(l.style="password",e.text(l)),e.invisible=l=>(l.style="invisible",e.text(l)),e.number=l=>p("NumberPrompt",l),e.date=l=>p("DatePrompt",l),e.confirm=l=>p("ConfirmPrompt",l),e.list=l=>{const h=l.separator||",";return p("TextPrompt",l,{onSubmit:o=>o.split(h).map(c=>c.trim())})},e.toggle=l=>p("TogglePrompt",l),e.select=l=>p("SelectPrompt",l),e.multiselect=l=>{l.choices=[].concat(l.choices||[]);const h=o=>o.filter(c=>c.selected).map(c=>c.value);return p("MultiselectPrompt",l,{onAbort:h,onSubmit:h})},e.autocompleteMultiselect=l=>{l.choices=[].concat(l.choices||[]);const h=o=>o.filter(c=>c.selected).map(c=>c.value);return p("AutocompleteMultiselectPrompt",l,{onAbort:h,onSubmit:h})};const f=(l,h)=>Promise.resolve(h.filter(o=>o.title.slice(0,l.length).toLowerCase()===l.toLowerCase()));e.autocomplete=l=>(l.suggest=l.suggest||f,l.choices=[].concat(l.choices||[]),p("AutocompletePrompt",l))})(Ft);const ze=Ft,bn=["suggest","format","onState","validate","onRender","type"],pr=()=>{};async function z(t=[],{onSubmit:e=pr,onCancel:r=pr}={}){const s={},p=z._override||{};t=[].concat(t);let f,l,h,o,c,u;const d=async(i,a,n=!1)=>{if(!(!n&&i.validate&&i.validate(a)!==!0))return i.format?await i.format(a,s):a};for(l of t)if({name:o,type:c}=l,typeof c=="function"&&(c=await c(f,{...s},l),l.type=c),!!c){for(let i in l){if(bn.includes(i))continue;let a=l[i];l[i]=typeof a=="function"?await a(f,{...s},u):a}if(u=l,typeof l.message!="string")throw new Error("prompt message is required");if({name:o,type:c}=l,ze[c]===void 0)throw new Error(`prompt type (${c}) is not defined`);if(p[l.name]!==void 0&&(f=await d(l,p[l.name]),f!==void 0)){s[o]=f;continue}try{f=z._injected?wn(z._injected,l.initial):await ze[c](l),s[o]=f=await d(l,f,!0),h=await e(l,f,s)}catch{h=!await r(l,s)}if(h)return s}return s}function wn(t,e){const r=t.shift();if(r instanceof Error)throw r;return r===void 0?e:r}function Pn(t){z._injected=(z._injected||[]).concat(t)}function Cn(t){z._override=Object.assign({},t)}var kn=Object.assign(z,{prompt:z,prompts:ze,inject:Pn,override:Cn});const fr=He(kn);function xn(t,e){var r=t;e.slice(0,-1).forEach(function(p){r=r[p]||{}});var s=e[e.length-1];return s in r}function dr(t){return typeof t=="number"||/^0x[0-9a-f]+$/i.test(t)?!0:/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(t)}function gr(t,e){return e==="constructor"&&typeof t[e]=="function"||e==="__proto__"}var En=function(t,e){e||(e={});var r={bools:{},strings:{},unknownFn:null};typeof e.unknown=="function"&&(r.unknownFn=e.unknown),typeof e.boolean=="boolean"&&e.boolean?r.allBools=!0:[].concat(e.boolean).filter(Boolean).forEach(function(g){r.bools[g]=!0});var s={};function p(g){return s[g].some(function(y){return r.bools[y]})}Object.keys(e.alias||{}).forEach(function(g){s[g]=[].concat(e.alias[g]),s[g].forEach(function(y){s[y]=[g].concat(s[g].filter(function(P){return y!==P}))})}),[].concat(e.string).filter(Boolean).forEach(function(g){r.strings[g]=!0,s[g]&&[].concat(s[g]).forEach(function(y){r.strings[y]=!0})});var f=e.default||{},l={_:[]};function h(g,y){return r.allBools&&/^--[^=]+$/.test(y)||r.strings[g]||r.bools[g]||s[g]}function o(g,y,P){for(var b=g,C=0;C<y.length-1;C++){var x=y[C];if(gr(b,x))return;b[x]===void 0&&(b[x]={}),(b[x]===Object.prototype||b[x]===Number.prototype||b[x]===String.prototype)&&(b[x]={}),b[x]===Array.prototype&&(b[x]=[]),b=b[x]}var k=y[y.length-1];gr(b,k)||((b===Object.prototype||b===Number.prototype||b===String.prototype)&&(b={}),b===Array.prototype&&(b=[]),b[k]===void 0||r.bools[k]||typeof b[k]=="boolean"?b[k]=P:Array.isArray(b[k])?b[k].push(P):b[k]=[b[k],P])}function c(g,y,P){if(!(P&&r.unknownFn&&!h(g,P)&&r.unknownFn(P)===!1)){var b=!r.strings[g]&&dr(y)?Number(y):y;o(l,g.split("."),b),(s[g]||[]).forEach(function(C){o(l,C.split("."),b)})}}Object.keys(r.bools).forEach(function(g){c(g,f[g]===void 0?!1:f[g])});var u=[];t.indexOf("--")!==-1&&(u=t.slice(t.indexOf("--")+1),t=t.slice(0,t.indexOf("--")));for(var d=0;d<t.length;d++){var i=t[d],a,n;if(/^--.+=/.test(i)){var m=i.match(/^--([^=]+)=([\s\S]*)$/);a=m[1];var v=m[2];r.bools[a]&&(v=v!=="false"),c(a,v,i)}else if(/^--no-.+/.test(i))a=i.match(/^--no-(.+)/)[1],c(a,!1,i);else if(/^--.+/.test(i))a=i.match(/^--(.+)/)[1],n=t[d+1],n!==void 0&&!/^(-|--)[^-]/.test(n)&&!r.bools[a]&&!r.allBools&&(!s[a]||!p(a))?(c(a,n,i),d+=1):/^(true|false)$/.test(n)?(c(a,n==="true",i),d+=1):c(a,r.strings[a]?"":!0,i);else if(/^-[^-]+/.test(i)){for(var S=i.slice(1,-1).split(""),_=!1,w=0;w<S.length;w++){if(n=i.slice(w+2),n==="-"){c(S[w],n,i);continue}if(/[A-Za-z]/.test(S[w])&&n[0]==="="){c(S[w],n.slice(1),i),_=!0;break}if(/[A-Za-z]/.test(S[w])&&/-?\d+(\.\d*)?(e-?\d+)?$/.test(n)){c(S[w],n,i),_=!0;break}if(S[w+1]&&S[w+1].match(/\W/)){c(S[w],i.slice(w+2),i),_=!0;break}else c(S[w],r.strings[S[w]]?"":!0,i)}a=i.slice(-1)[0],!_&&a!=="-"&&(t[d+1]&&!/^(-|--)[^-]/.test(t[d+1])&&!r.bools[a]&&(!s[a]||!p(a))?(c(a,t[d+1],i),d+=1):t[d+1]&&/^(true|false)$/.test(t[d+1])?(c(a,t[d+1]==="true",i),d+=1):c(a,r.strings[a]?"":!0,i))}else if((!r.unknownFn||r.unknownFn(i)!==!1)&&l._.push(r.strings._||!dr(i)?i:Number(i)),e.stopEarly){l._.push.apply(l._,t.slice(d+1));break}}return Object.keys(f).forEach(function(g){xn(l,g.split("."))||(o(l,g.split("."),f[g]),(s[g]||[]).forEach(function(y){o(l,y.split("."),f[g])}))}),e["--"]?l["--"]=u.slice():u.forEach(function(g){l._.push(g)}),l};const Mn=He(En);let ee=!0;const ae=typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{};let fe=0;if(ae.process&&ae.process.env&&ae.process.stdout){const{FORCE_COLOR:t,NODE_DISABLE_COLORS:e,NO_COLOR:r,TERM:s,COLORTERM:p}=ae.process.env;e||r||t==="0"?ee=!1:t==="1"||t==="2"||t==="3"?ee=!0:s==="dumb"?ee=!1:"CI"in ae.process.env&&["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE","DRONE"].some(f=>f in ae.process.env)?ee=!0:ee=process.stdout.isTTY,ee&&(process.platform==="win32"||p&&(p==="truecolor"||p==="24bit")?fe=3:s&&(s.endsWith("-256color")||s.endsWith("256"))?fe=2:fe=1)}let mr={enabled:ee,supportLevel:fe};function vr(t,e,r=1){const s=`\x1B[${t}m`,p=`\x1B[${e}m`,f=new RegExp(`\\x1b\\[${e}m`,"g");return l=>mr.enabled&&mr.supportLevel>=r?s+(""+l).replace(f,s)+p:""+l}const _r=vr(0,0),yr=vr(31,39);function Me(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Qe={exports:{}},Ze={exports:{}},D={},L={};L.__esModule=!0,L.extend=Sr,L.indexOf=Rn,L.escapeExpression=Nn,L.isEmpty=Dn,L.createFrame=Tn,L.blockParams=Bn,L.appendContextPath=Hn;var Ln={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},On=/[&<>"'`=]/g,An=/[&<>"'`=]/;function In(t){return Ln[t]}function Sr(t){for(var e=1;e<arguments.length;e++)for(var r in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],r)&&(t[r]=arguments[e][r]);return t}var Xe=Object.prototype.toString;L.toString=Xe;var et=function(e){return typeof e=="function"};et(/x/)&&(L.isFunction=et=function(t){return typeof t=="function"&&Xe.call(t)==="[object Function]"}),L.isFunction=et;var br=Array.isArray||function(t){return t&&typeof t=="object"?Xe.call(t)==="[object Array]":!1};L.isArray=br;function Rn(t,e){for(var r=0,s=t.length;r<s;r++)if(t[r]===e)return r;return-1}function Nn(t){if(typeof t!="string"){if(t&&t.toHTML)return t.toHTML();if(t==null)return"";if(!t)return t+"";t=""+t}return An.test(t)?t.replace(On,In):t}function Dn(t){return!t&&t!==0?!0:!!(br(t)&&t.length===0)}function Tn(t){var e=Sr({},t);return e._parent=t,e}function Bn(t,e){return t.path=e,t}function Hn(t,e){return(t?t+".":"")+e}var tt={exports:{}};(function(t,e){e.__esModule=!0;var r=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function s(p,f){var l=f&&f.loc,h=void 0,o=void 0,c=void 0,u=void 0;l&&(h=l.start.line,o=l.end.line,c=l.start.column,u=l.end.column,p+=" - "+h+":"+c);for(var d=Error.prototype.constructor.call(this,p),i=0;i<r.length;i++)this[r[i]]=d[r[i]];Error.captureStackTrace&&Error.captureStackTrace(this,s);try{l&&(this.lineNumber=h,this.endLineNumber=o,Object.defineProperty?(Object.defineProperty(this,"column",{value:c,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:u,enumerable:!0})):(this.column=c,this.endColumn=u))}catch{}}s.prototype=new Error,e.default=s,t.exports=e.default})(tt,tt.exports);var F=tt.exports,de={},rt={exports:{}};(function(t,e){e.__esModule=!0;var r=L;e.default=function(s){s.registerHelper("blockHelperMissing",function(p,f){var l=f.inverse,h=f.fn;if(p===!0)return h(this);if(p===!1||p==null)return l(this);if(r.isArray(p))return p.length>0?(f.ids&&(f.ids=[f.name]),s.helpers.each(p,f)):l(this);if(f.data&&f.ids){var o=r.createFrame(f.data);o.contextPath=r.appendContextPath(f.data.contextPath,f.name),f={data:o}}return h(p,f)})},t.exports=e.default})(rt,rt.exports);var Fn=rt.exports,it={exports:{}};(function(t,e){e.__esModule=!0;function r(l){return l&&l.__esModule?l:{default:l}}var s=L,p=F,f=r(p);e.default=function(l){l.registerHelper("each",function(h,o){if(!o)throw new f.default("Must pass iterator to #each");var c=o.fn,u=o.inverse,d=0,i="",a=void 0,n=void 0;o.data&&o.ids&&(n=s.appendContextPath(o.data.contextPath,o.ids[0])+"."),s.isFunction(h)&&(h=h.call(this)),o.data&&(a=s.createFrame(o.data));function m(g,y,P){a&&(a.key=g,a.index=y,a.first=y===0,a.last=!!P,n&&(a.contextPath=n+g)),i=i+c(h[g],{data:a,blockParams:s.blockParams([h[g],g],[n+g,null])})}if(h&&typeof h=="object")if(s.isArray(h))for(var v=h.length;d<v;d++)d in h&&m(d,d,d===h.length-1);else if(typeof Symbol=="function"&&h[Symbol.iterator]){for(var S=[],_=h[Symbol.iterator](),w=_.next();!w.done;w=_.next())S.push(w.value);h=S;for(var v=h.length;d<v;d++)m(d,d,d===h.length-1)}else(function(){var g=void 0;Object.keys(h).forEach(function(y){g!==void 0&&m(g,d-1),g=y,d++}),g!==void 0&&m(g,d-1,!0)})();return d===0&&(i=u(this)),i})},t.exports=e.default})(it,it.exports);var Vn=it.exports,st={exports:{}};(function(t,e){e.__esModule=!0;function r(f){return f&&f.__esModule?f:{default:f}}var s=F,p=r(s);e.default=function(f){f.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new p.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},t.exports=e.default})(st,st.exports);var qn=st.exports,nt={exports:{}};(function(t,e){e.__esModule=!0;function r(l){return l&&l.__esModule?l:{default:l}}var s=L,p=F,f=r(p);e.default=function(l){l.registerHelper("if",function(h,o){if(arguments.length!=2)throw new f.default("#if requires exactly one argument");return s.isFunction(h)&&(h=h.call(this)),!o.hash.includeZero&&!h||s.isEmpty(h)?o.inverse(this):o.fn(this)}),l.registerHelper("unless",function(h,o){if(arguments.length!=2)throw new f.default("#unless requires exactly one argument");return l.helpers.if.call(this,h,{fn:o.inverse,inverse:o.fn,hash:o.hash})})},t.exports=e.default})(nt,nt.exports);var $n=nt.exports,ot={exports:{}};(function(t,e){e.__esModule=!0,e.default=function(r){r.registerHelper("log",function(){for(var s=[void 0],p=arguments[arguments.length-1],f=0;f<arguments.length-1;f++)s.push(arguments[f]);var l=1;p.hash.level!=null?l=p.hash.level:p.data&&p.data.level!=null&&(l=p.data.level),s[0]=l,r.log.apply(r,s)})},t.exports=e.default})(ot,ot.exports);var Gn=ot.exports,at={exports:{}};(function(t,e){e.__esModule=!0,e.default=function(r){r.registerHelper("lookup",function(s,p,f){return s&&f.lookupProperty(s,p)})},t.exports=e.default})(at,at.exports);var Un=at.exports,lt={exports:{}};(function(t,e){e.__esModule=!0;function r(l){return l&&l.__esModule?l:{default:l}}var s=L,p=F,f=r(p);e.default=function(l){l.registerHelper("with",function(h,o){if(arguments.length!=2)throw new f.default("#with requires exactly one argument");s.isFunction(h)&&(h=h.call(this));var c=o.fn;if(s.isEmpty(h))return o.inverse(this);var u=o.data;return o.data&&o.ids&&(u=s.createFrame(o.data),u.contextPath=s.appendContextPath(o.data.contextPath,o.ids[0])),c(h,{data:u,blockParams:s.blockParams([h],[u&&u.contextPath])})})},t.exports=e.default})(lt,lt.exports);var Wn=lt.exports;de.__esModule=!0,de.registerDefaultHelpers=oo,de.moveHelperToHooks=ao;function te(t){return t&&t.__esModule?t:{default:t}}var Kn=Fn,jn=te(Kn),Yn=Vn,Jn=te(Yn),zn=qn,Qn=te(zn),Zn=$n,Xn=te(Zn),eo=Gn,to=te(eo),ro=Un,io=te(ro),so=Wn,no=te(so);function oo(t){jn.default(t),Jn.default(t),Qn.default(t),Xn.default(t),to.default(t),io.default(t),no.default(t)}function ao(t,e,r){t.helpers[e]&&(t.hooks[e]=t.helpers[e],r||delete t.helpers[e])}var ut={},ht={exports:{}};(function(t,e){e.__esModule=!0;var r=L;e.default=function(s){s.registerDecorator("inline",function(p,f,l,h){var o=p;return f.partials||(f.partials={},o=function(c,u){var d=l.partials;l.partials=r.extend({},d,f.partials);var i=p(c,u);return l.partials=d,i}),f.partials[h.args[0]]=h.fn,o})},t.exports=e.default})(ht,ht.exports);var lo=ht.exports;ut.__esModule=!0,ut.registerDefaultDecorators=po;function uo(t){return t&&t.__esModule?t:{default:t}}var ho=lo,co=uo(ho);function po(t){co.default(t)}var ct={exports:{}};(function(t,e){e.__esModule=!0;var r=L,s={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(f){if(typeof f=="string"){var l=r.indexOf(s.methodMap,f.toLowerCase());l>=0?f=l:f=parseInt(f,10)}return f},log:function(f){if(f=s.lookupLevel(f),typeof console<"u"&&s.lookupLevel(s.level)<=f){var l=s.methodMap[f];console[l]||(l="log");for(var h=arguments.length,o=Array(h>1?h-1:0),c=1;c<h;c++)o[c-1]=arguments[c];console[l].apply(console,o)}}};e.default=s,t.exports=e.default})(ct,ct.exports);var wr=ct.exports,le={},pt={};pt.__esModule=!0,pt.createNewLookupObject=go;var fo=L;function go(){for(var t=arguments.length,e=Array(t),r=0;r<t;r++)e[r]=arguments[r];return fo.extend.apply(void 0,[Object.create(null)].concat(e))}le.__esModule=!0,le.createProtoAccessControl=yo,le.resultIsAllowed=So,le.resetLoggedProperties=wo;function mo(t){return t&&t.__esModule?t:{default:t}}var Pr=pt,vo=wr,_o=mo(vo),Le=Object.create(null);function yo(t){var e=Object.create(null);e.constructor=!1,e.__defineGetter__=!1,e.__defineSetter__=!1,e.__lookupGetter__=!1;var r=Object.create(null);return r.__proto__=!1,{properties:{whitelist:Pr.createNewLookupObject(r,t.allowedProtoProperties),defaultValue:t.allowProtoPropertiesByDefault},methods:{whitelist:Pr.createNewLookupObject(e,t.allowedProtoMethods),defaultValue:t.allowProtoMethodsByDefault}}}function So(t,e,r){return Cr(typeof t=="function"?e.methods:e.properties,r)}function Cr(t,e){return t.whitelist[e]!==void 0?t.whitelist[e]===!0:t.defaultValue!==void 0?t.defaultValue:(bo(e),!1)}function bo(t){Le[t]!==!0&&(Le[t]=!0,_o.default.log("error",'Handlebars: Access has been denied to resolve the property "'+t+`" because it is not an "own property" of its parent.
|
|
49
|
+
You can add a runtime option to disable the check or this warning:
|
|
50
|
+
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function wo(){Object.keys(Le).forEach(function(t){delete Le[t]})}D.__esModule=!0,D.HandlebarsEnvironment=gt;function kr(t){return t&&t.__esModule?t:{default:t}}var re=L,Po=F,ft=kr(Po),Co=de,ko=ut,xo=wr,Oe=kr(xo),Eo=le,Mo="4.7.8";D.VERSION=Mo;var Lo=8;D.COMPILER_REVISION=Lo;var Oo=7;D.LAST_COMPATIBLE_COMPILER_REVISION=Oo;var Ao={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};D.REVISION_CHANGES=Ao;var dt="[object Object]";function gt(t,e,r){this.helpers=t||{},this.partials=e||{},this.decorators=r||{},Co.registerDefaultHelpers(this),ko.registerDefaultDecorators(this)}gt.prototype={constructor:gt,logger:Oe.default,log:Oe.default.log,registerHelper:function(e,r){if(re.toString.call(e)===dt){if(r)throw new ft.default("Arg not supported with multiple helpers");re.extend(this.helpers,e)}else this.helpers[e]=r},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,r){if(re.toString.call(e)===dt)re.extend(this.partials,e);else{if(typeof r>"u")throw new ft.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=r}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,r){if(re.toString.call(e)===dt){if(r)throw new ft.default("Arg not supported with multiple decorators");re.extend(this.decorators,e)}else this.decorators[e]=r},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Eo.resetLoggedProperties()}};var Io=Oe.default.log;D.log=Io,D.createFrame=re.createFrame,D.logger=Oe.default;var mt={exports:{}};(function(t,e){e.__esModule=!0;function r(s){this.string=s}r.prototype.toString=r.prototype.toHTML=function(){return""+this.string},e.default=r,t.exports=e.default})(mt,mt.exports);var Ro=mt.exports,Q={},vt={};vt.__esModule=!0,vt.wrapHelper=No;function No(t,e){if(typeof t!="function")return t;var r=function(){var p=arguments[arguments.length-1];return arguments[arguments.length-1]=e(p),t.apply(this,arguments)};return r}Q.__esModule=!0,Q.checkRevision=Vo,Q.template=qo,Q.wrapProgram=Ae,Q.resolvePartial=$o,Q.invokePartial=Go,Q.noop=Mr;function Do(t){return t&&t.__esModule?t:{default:t}}function To(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}var Bo=L,W=To(Bo),Ho=F,K=Do(Ho),j=D,xr=de,Fo=vt,Er=le;function Vo(t){var e=t&&t[0]||1,r=j.COMPILER_REVISION;if(!(e>=j.LAST_COMPATIBLE_COMPILER_REVISION&&e<=j.COMPILER_REVISION))if(e<j.LAST_COMPATIBLE_COMPILER_REVISION){var s=j.REVISION_CHANGES[r],p=j.REVISION_CHANGES[e];throw new K.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+s+") or downgrade your runtime to an older version ("+p+").")}else throw new K.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}function qo(t,e){if(!e)throw new K.default("No environment passed to template");if(!t||!t.main)throw new K.default("Unknown template object: "+typeof t);t.main.decorator=t.main_d,e.VM.checkRevision(t.compiler);var r=t.compiler&&t.compiler[0]===7;function s(l,h,o){o.hash&&(h=W.extend({},h,o.hash),o.ids&&(o.ids[0]=!0)),l=e.VM.resolvePartial.call(this,l,h,o);var c=W.extend({},o,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),u=e.VM.invokePartial.call(this,l,h,c);if(u==null&&e.compile&&(o.partials[o.name]=e.compile(l,t.compilerOptions,e),u=o.partials[o.name](h,c)),u!=null){if(o.indent){for(var d=u.split(`
|
|
51
|
+
`),i=0,a=d.length;i<a&&!(!d[i]&&i+1===a);i++)d[i]=o.indent+d[i];u=d.join(`
|
|
52
|
+
`)}return u}else throw new K.default("The partial "+o.name+" could not be compiled when running in runtime-only mode")}var p={strict:function(h,o,c){if(!h||!(o in h))throw new K.default('"'+o+'" not defined in '+h,{loc:c});return p.lookupProperty(h,o)},lookupProperty:function(h,o){var c=h[o];if(c==null||Object.prototype.hasOwnProperty.call(h,o)||Er.resultIsAllowed(c,p.protoAccessControl,o))return c},lookup:function(h,o){for(var c=h.length,u=0;u<c;u++){var d=h[u]&&p.lookupProperty(h[u],o);if(d!=null)return h[u][o]}},lambda:function(h,o){return typeof h=="function"?h.call(o):h},escapeExpression:W.escapeExpression,invokePartial:s,fn:function(h){var o=t[h];return o.decorator=t[h+"_d"],o},programs:[],program:function(h,o,c,u,d){var i=this.programs[h],a=this.fn(h);return o||d||u||c?i=Ae(this,h,a,o,c,u,d):i||(i=this.programs[h]=Ae(this,h,a)),i},data:function(h,o){for(;h&&o--;)h=h._parent;return h},mergeIfNeeded:function(h,o){var c=h||o;return h&&o&&h!==o&&(c=W.extend({},o,h)),c},nullContext:Object.seal({}),noop:e.VM.noop,compilerInfo:t.compiler};function f(l){var h=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],o=h.data;f._setup(h),!h.partial&&t.useData&&(o=Uo(l,o));var c=void 0,u=t.useBlockParams?[]:void 0;t.useDepths&&(h.depths?c=l!=h.depths[0]?[l].concat(h.depths):h.depths:c=[l]);function d(i){return""+t.main(p,i,p.helpers,p.partials,o,u,c)}return d=Lr(t.main,d,p,h.depths||[],o,u),d(l,h)}return f.isTop=!0,f._setup=function(l){if(l.partial)p.protoAccessControl=l.protoAccessControl,p.helpers=l.helpers,p.partials=l.partials,p.decorators=l.decorators,p.hooks=l.hooks;else{var h=W.extend({},e.helpers,l.helpers);Wo(h,p),p.helpers=h,t.usePartial&&(p.partials=p.mergeIfNeeded(l.partials,e.partials)),(t.usePartial||t.useDecorators)&&(p.decorators=W.extend({},e.decorators,l.decorators)),p.hooks={},p.protoAccessControl=Er.createProtoAccessControl(l);var o=l.allowCallsToHelperMissing||r;xr.moveHelperToHooks(p,"helperMissing",o),xr.moveHelperToHooks(p,"blockHelperMissing",o)}},f._child=function(l,h,o,c){if(t.useBlockParams&&!o)throw new K.default("must pass block params");if(t.useDepths&&!c)throw new K.default("must pass parent depths");return Ae(p,l,t[l],h,0,o,c)},f}function Ae(t,e,r,s,p,f,l){function h(o){var c=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],u=l;return l&&o!=l[0]&&!(o===t.nullContext&&l[0]===null)&&(u=[o].concat(l)),r(t,o,t.helpers,t.partials,c.data||s,f&&[c.blockParams].concat(f),u)}return h=Lr(r,h,t,l,s,f),h.program=e,h.depth=l?l.length:0,h.blockParams=p||0,h}function $o(t,e,r){return t?!t.call&&!r.name&&(r.name=t,t=r.partials[t]):r.name==="@partial-block"?t=r.data["partial-block"]:t=r.partials[r.name],t}function Go(t,e,r){var s=r.data&&r.data["partial-block"];r.partial=!0,r.ids&&(r.data.contextPath=r.ids[0]||r.data.contextPath);var p=void 0;if(r.fn&&r.fn!==Mr&&function(){r.data=j.createFrame(r.data);var f=r.fn;p=r.data["partial-block"]=function(h){var o=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return o.data=j.createFrame(o.data),o.data["partial-block"]=s,f(h,o)},f.partials&&(r.partials=W.extend({},r.partials,f.partials))}(),t===void 0&&p&&(t=p),t===void 0)throw new K.default("The partial "+r.name+" could not be found");if(t instanceof Function)return t(e,r)}function Mr(){return""}function Uo(t,e){return(!e||!("root"in e))&&(e=e?j.createFrame(e):{},e.root=t),e}function Lr(t,e,r,s,p,f){if(t.decorator){var l={};e=t.decorator(e,l,r,s&&s[0],p,f,s),W.extend(e,l)}return e}function Wo(t,e){Object.keys(t).forEach(function(r){var s=t[r];t[r]=Ko(s,e)})}function Ko(t,e){var r=e.lookupProperty;return Fo.wrapHelper(t,function(s){return W.extend({lookupProperty:r},s)})}var _t={exports:{}};(function(t,e){e.__esModule=!0,e.default=function(r){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var s=globalThis.Handlebars;r.noConflict=function(){return globalThis.Handlebars===r&&(globalThis.Handlebars=s),r}},t.exports=e.default})(_t,_t.exports);var Or=_t.exports;(function(t,e){e.__esModule=!0;function r(_){return _&&_.__esModule?_:{default:_}}function s(_){if(_&&_.__esModule)return _;var w={};if(_!=null)for(var g in _)Object.prototype.hasOwnProperty.call(_,g)&&(w[g]=_[g]);return w.default=_,w}var p=D,f=s(p),l=Ro,h=r(l),o=F,c=r(o),u=L,d=s(u),i=Q,a=s(i),n=Or,m=r(n);function v(){var _=new f.HandlebarsEnvironment;return d.extend(_,f),_.SafeString=h.default,_.Exception=c.default,_.Utils=d,_.escapeExpression=d.escapeExpression,_.VM=a,_.template=function(w){return a.template(w,_)},_}var S=v();S.create=v,m.default(S),S.default=S,e.default=S,t.exports=e.default})(Ze,Ze.exports);var jo=Ze.exports,yt={exports:{}};(function(t,e){e.__esModule=!0;var r={helpers:{helperExpression:function(p){return p.type==="SubExpression"||(p.type==="MustacheStatement"||p.type==="BlockStatement")&&!!(p.params&&p.params.length||p.hash)},scopedId:function(p){return/^\.|this\b/.test(p.original)},simpleId:function(p){return p.parts.length===1&&!r.helpers.scopedId(p)&&!p.depth}}};e.default=r,t.exports=e.default})(yt,yt.exports);var Ar=yt.exports,ge={},St={exports:{}};(function(t,e){e.__esModule=!0;var r=function(){var s={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(h,o,c,u,d,i,a){var n=i.length-1;switch(d){case 1:return i[n-1];case 2:this.$=u.prepareProgram(i[n]);break;case 3:this.$=i[n];break;case 4:this.$=i[n];break;case 5:this.$=i[n];break;case 6:this.$=i[n];break;case 7:this.$=i[n];break;case 8:this.$=i[n];break;case 9:this.$={type:"CommentStatement",value:u.stripComment(i[n]),strip:u.stripFlags(i[n],i[n]),loc:u.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:i[n],value:i[n],loc:u.locInfo(this._$)};break;case 11:this.$=u.prepareRawBlock(i[n-2],i[n-1],i[n],this._$);break;case 12:this.$={path:i[n-3],params:i[n-2],hash:i[n-1]};break;case 13:this.$=u.prepareBlock(i[n-3],i[n-2],i[n-1],i[n],!1,this._$);break;case 14:this.$=u.prepareBlock(i[n-3],i[n-2],i[n-1],i[n],!0,this._$);break;case 15:this.$={open:i[n-5],path:i[n-4],params:i[n-3],hash:i[n-2],blockParams:i[n-1],strip:u.stripFlags(i[n-5],i[n])};break;case 16:this.$={path:i[n-4],params:i[n-3],hash:i[n-2],blockParams:i[n-1],strip:u.stripFlags(i[n-5],i[n])};break;case 17:this.$={path:i[n-4],params:i[n-3],hash:i[n-2],blockParams:i[n-1],strip:u.stripFlags(i[n-5],i[n])};break;case 18:this.$={strip:u.stripFlags(i[n-1],i[n-1]),program:i[n]};break;case 19:var m=u.prepareBlock(i[n-2],i[n-1],i[n],i[n],!1,this._$),v=u.prepareProgram([m],i[n-1].loc);v.chained=!0,this.$={strip:i[n-2].strip,program:v,chain:!0};break;case 20:this.$=i[n];break;case 21:this.$={path:i[n-1],strip:u.stripFlags(i[n-2],i[n])};break;case 22:this.$=u.prepareMustache(i[n-3],i[n-2],i[n-1],i[n-4],u.stripFlags(i[n-4],i[n]),this._$);break;case 23:this.$=u.prepareMustache(i[n-3],i[n-2],i[n-1],i[n-4],u.stripFlags(i[n-4],i[n]),this._$);break;case 24:this.$={type:"PartialStatement",name:i[n-3],params:i[n-2],hash:i[n-1],indent:"",strip:u.stripFlags(i[n-4],i[n]),loc:u.locInfo(this._$)};break;case 25:this.$=u.preparePartialBlock(i[n-2],i[n-1],i[n],this._$);break;case 26:this.$={path:i[n-3],params:i[n-2],hash:i[n-1],strip:u.stripFlags(i[n-4],i[n])};break;case 27:this.$=i[n];break;case 28:this.$=i[n];break;case 29:this.$={type:"SubExpression",path:i[n-3],params:i[n-2],hash:i[n-1],loc:u.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:i[n],loc:u.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:u.id(i[n-2]),value:i[n],loc:u.locInfo(this._$)};break;case 32:this.$=u.id(i[n-1]);break;case 33:this.$=i[n];break;case 34:this.$=i[n];break;case 35:this.$={type:"StringLiteral",value:i[n],original:i[n],loc:u.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(i[n]),original:Number(i[n]),loc:u.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:i[n]==="true",original:i[n]==="true",loc:u.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:u.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:u.locInfo(this._$)};break;case 40:this.$=i[n];break;case 41:this.$=i[n];break;case 42:this.$=u.preparePath(!0,i[n],this._$);break;case 43:this.$=u.preparePath(!1,i[n],this._$);break;case 44:i[n-2].push({part:u.id(i[n]),original:i[n],separator:i[n-1]}),this.$=i[n-2];break;case 45:this.$=[{part:u.id(i[n]),original:i[n]}];break;case 46:this.$=[];break;case 47:i[n-1].push(i[n]);break;case 48:this.$=[];break;case 49:i[n-1].push(i[n]);break;case 50:this.$=[];break;case 51:i[n-1].push(i[n]);break;case 58:this.$=[];break;case 59:i[n-1].push(i[n]);break;case 64:this.$=[];break;case 65:i[n-1].push(i[n]);break;case 70:this.$=[];break;case 71:i[n-1].push(i[n]);break;case 78:this.$=[];break;case 79:i[n-1].push(i[n]);break;case 82:this.$=[];break;case 83:i[n-1].push(i[n]);break;case 86:this.$=[];break;case 87:i[n-1].push(i[n]);break;case 90:this.$=[];break;case 91:i[n-1].push(i[n]);break;case 94:this.$=[];break;case 95:i[n-1].push(i[n]);break;case 98:this.$=[i[n]];break;case 99:i[n-1].push(i[n]);break;case 100:this.$=[i[n]];break;case 101:i[n-1].push(i[n]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(h,o){throw new Error(h)},parse:function(h){var o=this,c=[0],u=[null],d=[],i=this.table,a="",n=0,m=0;this.lexer.setInput(h),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var v=this.lexer.yylloc;d.push(v);var S=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function _(){var se;return se=o.lexer.lex()||1,typeof se!="number"&&(se=o.symbols_[se]||se),se}for(var w,g,y,P,b={},C,x,k,I;;){if(g=c[c.length-1],this.defaultActions[g]?y=this.defaultActions[g]:((w===null||typeof w>"u")&&(w=_()),y=i[g]&&i[g][w]),typeof y>"u"||!y.length||!y[0]){var ie="";{I=[];for(C in i[g])this.terminals_[C]&&C>2&&I.push("'"+this.terminals_[C]+"'");this.lexer.showPosition?ie="Parse error on line "+(n+1)+`:
|
|
53
|
+
`+this.lexer.showPosition()+`
|
|
54
|
+
Expecting `+I.join(", ")+", got '"+(this.terminals_[w]||w)+"'":ie="Parse error on line "+(n+1)+": Unexpected "+(w==1?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(ie,{text:this.lexer.match,token:this.terminals_[w]||w,line:this.lexer.yylineno,loc:v,expected:I})}}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+w);switch(y[0]){case 1:c.push(w),u.push(this.lexer.yytext),d.push(this.lexer.yylloc),c.push(y[1]),w=null,m=this.lexer.yyleng,a=this.lexer.yytext,n=this.lexer.yylineno,v=this.lexer.yylloc;break;case 2:if(x=this.productions_[y[1]][1],b.$=u[u.length-x],b._$={first_line:d[d.length-(x||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(x||1)].first_column,last_column:d[d.length-1].last_column},S&&(b._$.range=[d[d.length-(x||1)].range[0],d[d.length-1].range[1]]),P=this.performAction.call(b,a,m,n,this.yy,y[1],u,d),typeof P<"u")return P;x&&(c=c.slice(0,-1*x*2),u=u.slice(0,-1*x),d=d.slice(0,-1*x)),c.push(this.productions_[y[1]][0]),u.push(b.$),d.push(b._$),k=i[c[c.length-2]][c[c.length-1]],c.push(k);break;case 3:return!0}}return!0}},p=function(){var l={EOF:1,parseError:function(o,c){if(this.yy.parser)this.yy.parser.parseError(o,c);else throw new Error(o)},setInput:function(o){return this._input=o,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var c=o.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var c=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c-1),this.offset-=c;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===d.length?this.yylloc.first_column:0)+d[d.length-u.length].length-u[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-c]),this},more:function(){return this._more=!0,this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),c=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
55
|
+
`+c+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,c,u,d,i;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length&&(u=this._input.match(this.rules[a[n]]),!(u&&(!c||u[0].length>c[0].length)&&(c=u,d=n,!this.options.flex)));n++);return c?(i=c[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],o=this.performAction.call(this,this.yy,this,a[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
56
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return typeof o<"u"?o:this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(o){this.begin(o)}};return l.options={},l.performAction=function(o,c,u,d){function i(a,n){return c.yytext=c.yytext.substring(a,c.yyleng-n+a)}switch(u){case 0:if(c.yytext.slice(-2)==="\\\\"?(i(0,1),this.begin("mu")):c.yytext.slice(-1)==="\\"?(i(0,1),this.begin("emu")):this.begin("mu"),c.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(i(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(c.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return c.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return c.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return c.yytext=c.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},l.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],l.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},l}();s.lexer=p;function f(){this.yy={}}return f.prototype=s,s.Parser=f,new f}();e.default=r,t.exports=e.default})(St,St.exports);var Yo=St.exports,bt={exports:{}},wt={exports:{}};(function(t,e){e.__esModule=!0;function r(c){return c&&c.__esModule?c:{default:c}}var s=F,p=r(s);function f(){this.parents=[]}f.prototype={constructor:f,mutating:!1,acceptKey:function(u,d){var i=this.accept(u[d]);if(this.mutating){if(i&&!f.prototype[i.type])throw new p.default('Unexpected node type "'+i.type+'" found when accepting '+d+" on "+u.type);u[d]=i}},acceptRequired:function(u,d){if(this.acceptKey(u,d),!u[d])throw new p.default(u.type+" requires "+d)},acceptArray:function(u){for(var d=0,i=u.length;d<i;d++)this.acceptKey(u,d),u[d]||(u.splice(d,1),d--,i--)},accept:function(u){if(u){if(!this[u.type])throw new p.default("Unknown type: "+u.type,u);this.current&&this.parents.unshift(this.current),this.current=u;var d=this[u.type](u);if(this.current=this.parents.shift(),!this.mutating||d)return d;if(d!==!1)return u}},Program:function(u){this.acceptArray(u.body)},MustacheStatement:l,Decorator:l,BlockStatement:h,DecoratorBlock:h,PartialStatement:o,PartialBlockStatement:function(u){o.call(this,u),this.acceptKey(u,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:l,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(u){this.acceptArray(u.pairs)},HashPair:function(u){this.acceptRequired(u,"value")}};function l(c){this.acceptRequired(c,"path"),this.acceptArray(c.params),this.acceptKey(c,"hash")}function h(c){l.call(this,c),this.acceptKey(c,"program"),this.acceptKey(c,"inverse")}function o(c){this.acceptRequired(c,"name"),this.acceptArray(c.params),this.acceptKey(c,"hash")}e.default=f,t.exports=e.default})(wt,wt.exports);var Pt=wt.exports;(function(t,e){e.__esModule=!0;function r(u){return u&&u.__esModule?u:{default:u}}var s=Pt,p=r(s);function f(){var u=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=u}f.prototype=new p.default,f.prototype.Program=function(u){var d=!this.options.ignoreStandalone,i=!this.isRootSeen;this.isRootSeen=!0;for(var a=u.body,n=0,m=a.length;n<m;n++){var v=a[n],S=this.accept(v);if(S){var _=l(a,n,i),w=h(a,n,i),g=S.openStandalone&&_,y=S.closeStandalone&&w,P=S.inlineStandalone&&_&&w;S.close&&o(a,n,!0),S.open&&c(a,n,!0),d&&P&&(o(a,n),c(a,n)&&v.type==="PartialStatement"&&(v.indent=/([ \t]+$)/.exec(a[n-1].original)[1])),d&&g&&(o((v.program||v.inverse).body),c(a,n)),d&&y&&(o(a,n),c((v.inverse||v.program).body))}}return u},f.prototype.BlockStatement=f.prototype.DecoratorBlock=f.prototype.PartialBlockStatement=function(u){this.accept(u.program),this.accept(u.inverse);var d=u.program||u.inverse,i=u.program&&u.inverse,a=i,n=i;if(i&&i.chained)for(a=i.body[0].program;n.chained;)n=n.body[n.body.length-1].program;var m={open:u.openStrip.open,close:u.closeStrip.close,openStandalone:h(d.body),closeStandalone:l((a||d).body)};if(u.openStrip.close&&o(d.body,null,!0),i){var v=u.inverseStrip;v.open&&c(d.body,null,!0),v.close&&o(a.body,null,!0),u.closeStrip.open&&c(n.body,null,!0),!this.options.ignoreStandalone&&l(d.body)&&h(a.body)&&(c(d.body),o(a.body))}else u.closeStrip.open&&c(d.body,null,!0);return m},f.prototype.Decorator=f.prototype.MustacheStatement=function(u){return u.strip},f.prototype.PartialStatement=f.prototype.CommentStatement=function(u){var d=u.strip||{};return{inlineStandalone:!0,open:d.open,close:d.close}};function l(u,d,i){d===void 0&&(d=u.length);var a=u[d-1],n=u[d-2];if(!a)return i;if(a.type==="ContentStatement")return(n||!i?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(a.original)}function h(u,d,i){d===void 0&&(d=-1);var a=u[d+1],n=u[d+2];if(!a)return i;if(a.type==="ContentStatement")return(n||!i?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(a.original)}function o(u,d,i){var a=u[d==null?0:d+1];if(!(!a||a.type!=="ContentStatement"||!i&&a.rightStripped)){var n=a.value;a.value=a.value.replace(i?/^\s+/:/^[ \t]*\r?\n?/,""),a.rightStripped=a.value!==n}}function c(u,d,i){var a=u[d==null?u.length-1:d-1];if(!(!a||a.type!=="ContentStatement"||!i&&a.leftStripped)){var n=a.value;return a.value=a.value.replace(i?/\s+$/:/[ \t]+$/,""),a.leftStripped=a.value!==n,a.leftStripped}}e.default=f,t.exports=e.default})(bt,bt.exports);var Jo=bt.exports,T={};T.__esModule=!0,T.SourceLocation=Zo,T.id=Xo,T.stripFlags=ea,T.stripComment=ta,T.preparePath=ra,T.prepareMustache=ia,T.prepareRawBlock=sa,T.prepareBlock=na,T.prepareProgram=oa,T.preparePartialBlock=aa;function zo(t){return t&&t.__esModule?t:{default:t}}var Qo=F,Ct=zo(Qo);function kt(t,e){if(e=e.path?e.path.original:e,t.path.original!==e){var r={loc:t.path.loc};throw new Ct.default(t.path.original+" doesn't match "+e,r)}}function Zo(t,e){this.source=t,this.start={line:e.first_line,column:e.first_column},this.end={line:e.last_line,column:e.last_column}}function Xo(t){return/^\[.*\]$/.test(t)?t.substring(1,t.length-1):t}function ea(t,e){return{open:t.charAt(2)==="~",close:e.charAt(e.length-3)==="~"}}function ta(t){return t.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function ra(t,e,r){r=this.locInfo(r);for(var s=t?"@":"",p=[],f=0,l=0,h=e.length;l<h;l++){var o=e[l].part,c=e[l].original!==o;if(s+=(e[l].separator||"")+o,!c&&(o===".."||o==="."||o==="this")){if(p.length>0)throw new Ct.default("Invalid path: "+s,{loc:r});o===".."&&f++}else p.push(o)}return{type:"PathExpression",data:t,depth:f,parts:p,original:s,loc:r}}function ia(t,e,r,s,p,f){var l=s.charAt(3)||s.charAt(2),h=l!=="{"&&l!=="&",o=/\*/.test(s);return{type:o?"Decorator":"MustacheStatement",path:t,params:e,hash:r,escaped:h,strip:p,loc:this.locInfo(f)}}function sa(t,e,r,s){kt(t,r),s=this.locInfo(s);var p={type:"Program",body:e,strip:{},loc:s};return{type:"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:p,openStrip:{},inverseStrip:{},closeStrip:{},loc:s}}function na(t,e,r,s,p,f){s&&s.path&&kt(t,s);var l=/\*/.test(t.open);e.blockParams=t.blockParams;var h=void 0,o=void 0;if(r){if(l)throw new Ct.default("Unexpected inverse block on decorator",r);r.chain&&(r.program.body[0].closeStrip=s.strip),o=r.strip,h=r.program}return p&&(p=h,h=e,e=p),{type:l?"DecoratorBlock":"BlockStatement",path:t.path,params:t.params,hash:t.hash,program:e,inverse:h,openStrip:t.strip,inverseStrip:o,closeStrip:s&&s.strip,loc:this.locInfo(f)}}function oa(t,e){if(!e&&t.length){var r=t[0].loc,s=t[t.length-1].loc;r&&s&&(e={source:r.source,start:{line:r.start.line,column:r.start.column},end:{line:s.end.line,column:s.end.column}})}return{type:"Program",body:t,strip:{},loc:e}}function aa(t,e,r,s){return kt(t,r),{type:"PartialBlockStatement",name:t.path,params:t.params,hash:t.hash,program:e,openStrip:t.strip,closeStrip:r&&r.strip,loc:this.locInfo(s)}}ge.__esModule=!0,ge.parseWithoutProcessing=Rr,ge.parse=ga;function la(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}function Ir(t){return t&&t.__esModule?t:{default:t}}var ua=Yo,xt=Ir(ua),ha=Jo,ca=Ir(ha),pa=T,fa=la(pa),da=L;ge.parser=xt.default;var Ie={};da.extend(Ie,fa);function Rr(t,e){if(t.type==="Program")return t;xt.default.yy=Ie,Ie.locInfo=function(s){return new Ie.SourceLocation(e&&e.srcName,s)};var r=xt.default.parse(t);return r}function ga(t,e){var r=Rr(t,e),s=new ca.default(e);return s.accept(r)}var me={};me.__esModule=!0,me.Compiler=Et,me.precompile=ya,me.compile=Sa;function Nr(t){return t&&t.__esModule?t:{default:t}}var ma=F,ve=Nr(ma),_e=L,va=Ar,ye=Nr(va),_a=[].slice;function Et(){}Et.prototype={compiler:Et,equals:function(e){var r=this.opcodes.length;if(e.opcodes.length!==r)return!1;for(var s=0;s<r;s++){var p=this.opcodes[s],f=e.opcodes[s];if(p.opcode!==f.opcode||!Dr(p.args,f.args))return!1}r=this.children.length;for(var s=0;s<r;s++)if(!this.children[s].equals(e.children[s]))return!1;return!0},guid:0,compile:function(e,r){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=r,this.stringParams=r.stringParams,this.trackIds=r.trackIds,r.blockParams=r.blockParams||[],r.knownHelpers=_e.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},r.knownHelpers),this.accept(e)},compileProgram:function(e){var r=new this.compiler,s=r.compile(e,this.options),p=this.guid++;return this.usePartial=this.usePartial||s.usePartial,this.children[p]=s,this.useDepths=this.useDepths||s.useDepths,p},accept:function(e){if(!this[e.type])throw new ve.default("Unknown type: "+e.type,e);this.sourceNode.unshift(e);var r=this[e.type](e);return this.sourceNode.shift(),r},Program:function(e){this.options.blockParams.unshift(e.blockParams);for(var r=e.body,s=r.length,p=0;p<s;p++)this.accept(r[p]);return this.options.blockParams.shift(),this.isSimple=s===1,this.blockParams=e.blockParams?e.blockParams.length:0,this},BlockStatement:function(e){Tr(e);var r=e.program,s=e.inverse;r=r&&this.compileProgram(r),s=s&&this.compileProgram(s);var p=this.classifySexpr(e);p==="helper"?this.helperSexpr(e,r,s):p==="simple"?(this.simpleSexpr(e),this.opcode("pushProgram",r),this.opcode("pushProgram",s),this.opcode("emptyHash"),this.opcode("blockValue",e.path.original)):(this.ambiguousSexpr(e,r,s),this.opcode("pushProgram",r),this.opcode("pushProgram",s),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(e){var r=e.program&&this.compileProgram(e.program),s=this.setupFullMustacheParams(e,r,void 0),p=e.path;this.useDecorators=!0,this.opcode("registerDecorator",s.length,p.original)},PartialStatement:function(e){this.usePartial=!0;var r=e.program;r&&(r=this.compileProgram(e.program));var s=e.params;if(s.length>1)throw new ve.default("Unsupported number of partial arguments: "+s.length,e);s.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):s.push({type:"PathExpression",parts:[],depth:0}));var p=e.name.original,f=e.name.type==="SubExpression";f&&this.accept(e.name),this.setupFullMustacheParams(e,r,void 0,!0);var l=e.indent||"";this.options.preventIndent&&l&&(this.opcode("appendContent",l),l=""),this.opcode("invokePartial",f,p,l),this.opcode("append")},PartialBlockStatement:function(e){this.PartialStatement(e)},MustacheStatement:function(e){this.SubExpression(e),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(e){this.DecoratorBlock(e)},ContentStatement:function(e){e.value&&this.opcode("appendContent",e.value)},CommentStatement:function(){},SubExpression:function(e){Tr(e);var r=this.classifySexpr(e);r==="simple"?this.simpleSexpr(e):r==="helper"?this.helperSexpr(e):this.ambiguousSexpr(e)},ambiguousSexpr:function(e,r,s){var p=e.path,f=p.parts[0],l=r!=null||s!=null;this.opcode("getContext",p.depth),this.opcode("pushProgram",r),this.opcode("pushProgram",s),p.strict=!0,this.accept(p),this.opcode("invokeAmbiguous",f,l)},simpleSexpr:function(e){var r=e.path;r.strict=!0,this.accept(r),this.opcode("resolvePossibleLambda")},helperSexpr:function(e,r,s){var p=this.setupFullMustacheParams(e,r,s),f=e.path,l=f.parts[0];if(this.options.knownHelpers[l])this.opcode("invokeKnownHelper",p.length,l);else{if(this.options.knownHelpersOnly)throw new ve.default("You specified knownHelpersOnly, but used the unknown helper "+l,e);f.strict=!0,f.falsy=!0,this.accept(f),this.opcode("invokeHelper",p.length,f.original,ye.default.helpers.simpleId(f))}},PathExpression:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth);var r=e.parts[0],s=ye.default.helpers.scopedId(e),p=!e.depth&&!s&&this.blockParamIndex(r);p?this.opcode("lookupBlockParam",p,e.parts):r?e.data?(this.options.data=!0,this.opcode("lookupData",e.depth,e.parts,e.strict)):this.opcode("lookupOnContext",e.parts,e.falsy,e.strict,s):this.opcode("pushContext")},StringLiteral:function(e){this.opcode("pushString",e.value)},NumberLiteral:function(e){this.opcode("pushLiteral",e.value)},BooleanLiteral:function(e){this.opcode("pushLiteral",e.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(e){var r=e.pairs,s=0,p=r.length;for(this.opcode("pushHash");s<p;s++)this.pushParam(r[s].value);for(;s--;)this.opcode("assignToHash",r[s].key);this.opcode("popHash")},opcode:function(e){this.opcodes.push({opcode:e,args:_a.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(e){e&&(this.useDepths=!0)},classifySexpr:function(e){var r=ye.default.helpers.simpleId(e.path),s=r&&!!this.blockParamIndex(e.path.parts[0]),p=!s&&ye.default.helpers.helperExpression(e),f=!s&&(p||r);if(f&&!p){var l=e.path.parts[0],h=this.options;h.knownHelpers[l]?p=!0:h.knownHelpersOnly&&(f=!1)}return p?"helper":f?"ambiguous":"simple"},pushParams:function(e){for(var r=0,s=e.length;r<s;r++)this.pushParam(e[r])},pushParam:function(e){var r=e.value!=null?e.value:e.original||"";if(this.stringParams)r.replace&&(r=r.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",r,e.type),e.type==="SubExpression"&&this.accept(e);else{if(this.trackIds){var s=void 0;if(e.parts&&!ye.default.helpers.scopedId(e)&&!e.depth&&(s=this.blockParamIndex(e.parts[0])),s){var p=e.parts.slice(1).join(".");this.opcode("pushId","BlockParam",s,p)}else r=e.original||r,r.replace&&(r=r.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",e.type,r)}this.accept(e)}},setupFullMustacheParams:function(e,r,s,p){var f=e.params;return this.pushParams(f),this.opcode("pushProgram",r),this.opcode("pushProgram",s),e.hash?this.accept(e.hash):this.opcode("emptyHash",p),f},blockParamIndex:function(e){for(var r=0,s=this.options.blockParams.length;r<s;r++){var p=this.options.blockParams[r],f=p&&_e.indexOf(p,e);if(p&&f>=0)return[r,f]}}};function ya(t,e,r){if(t==null||typeof t!="string"&&t.type!=="Program")throw new ve.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var s=r.parse(t,e),p=new r.Compiler().compile(s,e);return new r.JavaScriptCompiler().compile(p,e)}function Sa(t,e,r){if(e===void 0&&(e={}),t==null||typeof t!="string"&&t.type!=="Program")throw new ve.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=_e.extend({},e),"data"in e||(e.data=!0),e.compat&&(e.useDepths=!0);var s=void 0;function p(){var l=r.parse(t,e),h=new r.Compiler().compile(l,e),o=new r.JavaScriptCompiler().compile(h,e,void 0,!0);return r.template(o)}function f(l,h){return s||(s=p()),s.call(this,l,h)}return f._setup=function(l){return s||(s=p()),s._setup(l)},f._child=function(l,h,o,c){return s||(s=p()),s._child(l,h,o,c)},f}function Dr(t,e){if(t===e)return!0;if(_e.isArray(t)&&_e.isArray(e)&&t.length===e.length){for(var r=0;r<t.length;r++)if(!Dr(t[r],e[r]))return!1;return!0}}function Tr(t){if(!t.path.parts){var e=t.path;t.path={type:"PathExpression",data:!1,depth:0,parts:[e.original+""],original:e.original+"",loc:e.loc}}}var Mt={exports:{}},Lt={exports:{}},Se={},Ot={},Re={},Ne={},Br;function ba(){if(Br)return Ne;Br=1;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Ne.encode=function(e){if(0<=e&&e<t.length)return t[e];throw new TypeError("Must be between 0 and 63: "+e)},Ne.decode=function(e){var r=65,s=90,p=97,f=122,l=48,h=57,o=43,c=47,u=26,d=52;return r<=e&&e<=s?e-r:p<=e&&e<=f?e-p+u:l<=e&&e<=h?e-l+d:e==o?62:e==c?63:-1},Ne}var Hr;function Fr(){if(Hr)return Re;Hr=1;var t=ba(),e=5,r=1<<e,s=r-1,p=r;function f(h){return h<0?(-h<<1)+1:(h<<1)+0}function l(h){var o=(h&1)===1,c=h>>1;return o?-c:c}return Re.encode=function(o){var c="",u,d=f(o);do u=d&s,d>>>=e,d>0&&(u|=p),c+=t.encode(u);while(d>0);return c},Re.decode=function(o,c,u){var d=o.length,i=0,a=0,n,m;do{if(c>=d)throw new Error("Expected more digits in base 64 VLQ value.");if(m=t.decode(o.charCodeAt(c++)),m===-1)throw new Error("Invalid base64 digit: "+o.charAt(c-1));n=!!(m&p),m&=s,i=i+(m<<a),a+=e}while(n);u.value=l(i),u.rest=c},Re}var At={},Vr;function be(){return Vr||(Vr=1,function(t){function e(g,y,P){if(y in g)return g[y];if(arguments.length===3)return P;throw new Error('"'+y+'" is a required argument.')}t.getArg=e;var r=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,s=/^data:.+\,.+$/;function p(g){var y=g.match(r);return y?{scheme:y[1],auth:y[2],host:y[3],port:y[4],path:y[5]}:null}t.urlParse=p;function f(g){var y="";return g.scheme&&(y+=g.scheme+":"),y+="//",g.auth&&(y+=g.auth+"@"),g.host&&(y+=g.host),g.port&&(y+=":"+g.port),g.path&&(y+=g.path),y}t.urlGenerate=f;function l(g){var y=g,P=p(g);if(P){if(!P.path)return g;y=P.path}for(var b=t.isAbsolute(y),C=y.split(/\/+/),x,k=0,I=C.length-1;I>=0;I--)x=C[I],x==="."?C.splice(I,1):x===".."?k++:k>0&&(x===""?(C.splice(I+1,k),k=0):(C.splice(I,2),k--));return y=C.join("/"),y===""&&(y=b?"/":"."),P?(P.path=y,f(P)):y}t.normalize=l;function h(g,y){g===""&&(g="."),y===""&&(y=".");var P=p(y),b=p(g);if(b&&(g=b.path||"/"),P&&!P.scheme)return b&&(P.scheme=b.scheme),f(P);if(P||y.match(s))return y;if(b&&!b.host&&!b.path)return b.host=y,f(b);var C=y.charAt(0)==="/"?y:l(g.replace(/\/+$/,"")+"/"+y);return b?(b.path=C,f(b)):C}t.join=h,t.isAbsolute=function(g){return g.charAt(0)==="/"||r.test(g)};function o(g,y){g===""&&(g="."),g=g.replace(/\/$/,"");for(var P=0;y.indexOf(g+"/")!==0;){var b=g.lastIndexOf("/");if(b<0||(g=g.slice(0,b),g.match(/^([^\/]+:\/)?\/*$/)))return y;++P}return Array(P+1).join("../")+y.substr(g.length+1)}t.relative=o;var c=function(){var g=Object.create(null);return!("__proto__"in g)}();function u(g){return g}function d(g){return a(g)?"$"+g:g}t.toSetString=c?u:d;function i(g){return a(g)?g.slice(1):g}t.fromSetString=c?u:i;function a(g){if(!g)return!1;var y=g.length;if(y<9||g.charCodeAt(y-1)!==95||g.charCodeAt(y-2)!==95||g.charCodeAt(y-3)!==111||g.charCodeAt(y-4)!==116||g.charCodeAt(y-5)!==111||g.charCodeAt(y-6)!==114||g.charCodeAt(y-7)!==112||g.charCodeAt(y-8)!==95||g.charCodeAt(y-9)!==95)return!1;for(var P=y-10;P>=0;P--)if(g.charCodeAt(P)!==36)return!1;return!0}function n(g,y,P){var b=v(g.source,y.source);return b!==0||(b=g.originalLine-y.originalLine,b!==0)||(b=g.originalColumn-y.originalColumn,b!==0||P)||(b=g.generatedColumn-y.generatedColumn,b!==0)||(b=g.generatedLine-y.generatedLine,b!==0)?b:v(g.name,y.name)}t.compareByOriginalPositions=n;function m(g,y,P){var b=g.generatedLine-y.generatedLine;return b!==0||(b=g.generatedColumn-y.generatedColumn,b!==0||P)||(b=v(g.source,y.source),b!==0)||(b=g.originalLine-y.originalLine,b!==0)||(b=g.originalColumn-y.originalColumn,b!==0)?b:v(g.name,y.name)}t.compareByGeneratedPositionsDeflated=m;function v(g,y){return g===y?0:g===null?1:y===null?-1:g>y?1:-1}function S(g,y){var P=g.generatedLine-y.generatedLine;return P!==0||(P=g.generatedColumn-y.generatedColumn,P!==0)||(P=v(g.source,y.source),P!==0)||(P=g.originalLine-y.originalLine,P!==0)||(P=g.originalColumn-y.originalColumn,P!==0)?P:v(g.name,y.name)}t.compareByGeneratedPositionsInflated=S;function _(g){return JSON.parse(g.replace(/^\)]}'[^\n]*\n/,""))}t.parseSourceMapInput=_;function w(g,y,P){if(y=y||"",g&&(g[g.length-1]!=="/"&&y[0]!=="/"&&(g+="/"),y=g+y),P){var b=p(P);if(!b)throw new Error("sourceMapURL could not be parsed");if(b.path){var C=b.path.lastIndexOf("/");C>=0&&(b.path=b.path.substring(0,C+1))}y=h(f(b),y)}return l(y)}t.computeSourceURL=w}(At)),At}var It={},qr;function $r(){if(qr)return It;qr=1;var t=be(),e=Object.prototype.hasOwnProperty,r=typeof Map<"u";function s(){this._array=[],this._set=r?new Map:Object.create(null)}return s.fromArray=function(f,l){for(var h=new s,o=0,c=f.length;o<c;o++)h.add(f[o],l);return h},s.prototype.size=function(){return r?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(f,l){var h=r?f:t.toSetString(f),o=r?this.has(f):e.call(this._set,h),c=this._array.length;(!o||l)&&this._array.push(f),o||(r?this._set.set(f,c):this._set[h]=c)},s.prototype.has=function(f){if(r)return this._set.has(f);var l=t.toSetString(f);return e.call(this._set,l)},s.prototype.indexOf=function(f){if(r){var l=this._set.get(f);if(l>=0)return l}else{var h=t.toSetString(f);if(e.call(this._set,h))return this._set[h]}throw new Error('"'+f+'" is not in the set.')},s.prototype.at=function(f){if(f>=0&&f<this._array.length)return this._array[f];throw new Error("No element indexed by "+f)},s.prototype.toArray=function(){return this._array.slice()},It.ArraySet=s,It}var Rt={},Gr;function wa(){if(Gr)return Rt;Gr=1;var t=be();function e(s,p){var f=s.generatedLine,l=p.generatedLine,h=s.generatedColumn,o=p.generatedColumn;return l>f||l==f&&o>=h||t.compareByGeneratedPositionsInflated(s,p)<=0}function r(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return r.prototype.unsortedForEach=function(p,f){this._array.forEach(p,f)},r.prototype.add=function(p){e(this._last,p)?(this._last=p,this._array.push(p)):(this._sorted=!1,this._array.push(p))},r.prototype.toArray=function(){return this._sorted||(this._array.sort(t.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Rt.MappingList=r,Rt}var Ur;function Wr(){if(Ur)return Ot;Ur=1;var t=Fr(),e=be(),r=$r().ArraySet,s=wa().MappingList;function p(f){f||(f={}),this._file=e.getArg(f,"file",null),this._sourceRoot=e.getArg(f,"sourceRoot",null),this._skipValidation=e.getArg(f,"skipValidation",!1),this._sources=new r,this._names=new r,this._mappings=new s,this._sourcesContents=null}return p.prototype._version=3,p.fromSourceMap=function(l){var h=l.sourceRoot,o=new p({file:l.file,sourceRoot:h});return l.eachMapping(function(c){var u={generated:{line:c.generatedLine,column:c.generatedColumn}};c.source!=null&&(u.source=c.source,h!=null&&(u.source=e.relative(h,u.source)),u.original={line:c.originalLine,column:c.originalColumn},c.name!=null&&(u.name=c.name)),o.addMapping(u)}),l.sources.forEach(function(c){var u=c;h!==null&&(u=e.relative(h,c)),o._sources.has(u)||o._sources.add(u);var d=l.sourceContentFor(c);d!=null&&o.setSourceContent(c,d)}),o},p.prototype.addMapping=function(l){var h=e.getArg(l,"generated"),o=e.getArg(l,"original",null),c=e.getArg(l,"source",null),u=e.getArg(l,"name",null);this._skipValidation||this._validateMapping(h,o,c,u),c!=null&&(c=String(c),this._sources.has(c)||this._sources.add(c)),u!=null&&(u=String(u),this._names.has(u)||this._names.add(u)),this._mappings.add({generatedLine:h.line,generatedColumn:h.column,originalLine:o!=null&&o.line,originalColumn:o!=null&&o.column,source:c,name:u})},p.prototype.setSourceContent=function(l,h){var o=l;this._sourceRoot!=null&&(o=e.relative(this._sourceRoot,o)),h!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[e.toSetString(o)]=h):this._sourcesContents&&(delete this._sourcesContents[e.toSetString(o)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},p.prototype.applySourceMap=function(l,h,o){var c=h;if(h==null){if(l.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);c=l.file}var u=this._sourceRoot;u!=null&&(c=e.relative(u,c));var d=new r,i=new r;this._mappings.unsortedForEach(function(a){if(a.source===c&&a.originalLine!=null){var n=l.originalPositionFor({line:a.originalLine,column:a.originalColumn});n.source!=null&&(a.source=n.source,o!=null&&(a.source=e.join(o,a.source)),u!=null&&(a.source=e.relative(u,a.source)),a.originalLine=n.line,a.originalColumn=n.column,n.name!=null&&(a.name=n.name))}var m=a.source;m!=null&&!d.has(m)&&d.add(m);var v=a.name;v!=null&&!i.has(v)&&i.add(v)},this),this._sources=d,this._names=i,l.sources.forEach(function(a){var n=l.sourceContentFor(a);n!=null&&(o!=null&&(a=e.join(o,a)),u!=null&&(a=e.relative(u,a)),this.setSourceContent(a,n))},this)},p.prototype._validateMapping=function(l,h,o,c){if(h&&typeof h.line!="number"&&typeof h.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(l&&"line"in l&&"column"in l&&l.line>0&&l.column>=0&&!h&&!o&&!c)){if(l&&"line"in l&&"column"in l&&h&&"line"in h&&"column"in h&&l.line>0&&l.column>=0&&h.line>0&&h.column>=0&&o)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:l,source:o,original:h,name:c}))}},p.prototype._serializeMappings=function(){for(var l=0,h=1,o=0,c=0,u=0,d=0,i="",a,n,m,v,S=this._mappings.toArray(),_=0,w=S.length;_<w;_++){if(n=S[_],a="",n.generatedLine!==h)for(l=0;n.generatedLine!==h;)a+=";",h++;else if(_>0){if(!e.compareByGeneratedPositionsInflated(n,S[_-1]))continue;a+=","}a+=t.encode(n.generatedColumn-l),l=n.generatedColumn,n.source!=null&&(v=this._sources.indexOf(n.source),a+=t.encode(v-d),d=v,a+=t.encode(n.originalLine-1-c),c=n.originalLine-1,a+=t.encode(n.originalColumn-o),o=n.originalColumn,n.name!=null&&(m=this._names.indexOf(n.name),a+=t.encode(m-u),u=m)),i+=a}return i},p.prototype._generateSourcesContent=function(l,h){return l.map(function(o){if(!this._sourcesContents)return null;h!=null&&(o=e.relative(h,o));var c=e.toSetString(o);return Object.prototype.hasOwnProperty.call(this._sourcesContents,c)?this._sourcesContents[c]:null},this)},p.prototype.toJSON=function(){var l={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(l.file=this._file),this._sourceRoot!=null&&(l.sourceRoot=this._sourceRoot),this._sourcesContents&&(l.sourcesContent=this._generateSourcesContent(l.sources,l.sourceRoot)),l},p.prototype.toString=function(){return JSON.stringify(this.toJSON())},Ot.SourceMapGenerator=p,Ot}var we={},Nt={},Kr;function Pa(){return Kr||(Kr=1,function(t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2;function e(r,s,p,f,l,h){var o=Math.floor((s-r)/2)+r,c=l(p,f[o],!0);return c===0?o:c>0?s-o>1?e(o,s,p,f,l,h):h==t.LEAST_UPPER_BOUND?s<f.length?s:-1:o:o-r>1?e(r,o,p,f,l,h):h==t.LEAST_UPPER_BOUND?o:r<0?-1:r}t.search=function(s,p,f,l){if(p.length===0)return-1;var h=e(-1,p.length,s,p,f,l||t.GREATEST_LOWER_BOUND);if(h<0)return-1;for(;h-1>=0&&f(p[h],p[h-1],!0)===0;)--h;return h}}(Nt)),Nt}var Dt={},jr;function Ca(){if(jr)return Dt;jr=1;function t(s,p,f){var l=s[p];s[p]=s[f],s[f]=l}function e(s,p){return Math.round(s+Math.random()*(p-s))}function r(s,p,f,l){if(f<l){var h=e(f,l),o=f-1;t(s,h,l);for(var c=s[l],u=f;u<l;u++)p(s[u],c)<=0&&(o+=1,t(s,o,u));t(s,o+1,u);var d=o+1;r(s,p,f,d-1),r(s,p,d+1,l)}}return Dt.quickSort=function(s,p){r(s,p,0,s.length-1)},Dt}var Yr;function ka(){if(Yr)return we;Yr=1;var t=be(),e=Pa(),r=$r().ArraySet,s=Fr(),p=Ca().quickSort;function f(c,u){var d=c;return typeof c=="string"&&(d=t.parseSourceMapInput(c)),d.sections!=null?new o(d,u):new l(d,u)}f.fromSourceMap=function(c,u){return l.fromSourceMap(c,u)},f.prototype._version=3,f.prototype.__generatedMappings=null,Object.defineProperty(f.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),f.prototype.__originalMappings=null,Object.defineProperty(f.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),f.prototype._charIsMappingSeparator=function(u,d){var i=u.charAt(d);return i===";"||i===","},f.prototype._parseMappings=function(u,d){throw new Error("Subclasses must implement _parseMappings")},f.GENERATED_ORDER=1,f.ORIGINAL_ORDER=2,f.GREATEST_LOWER_BOUND=1,f.LEAST_UPPER_BOUND=2,f.prototype.eachMapping=function(u,d,i){var a=d||null,n=i||f.GENERATED_ORDER,m;switch(n){case f.GENERATED_ORDER:m=this._generatedMappings;break;case f.ORIGINAL_ORDER:m=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var v=this.sourceRoot;m.map(function(S){var _=S.source===null?null:this._sources.at(S.source);return _=t.computeSourceURL(v,_,this._sourceMapURL),{source:_,generatedLine:S.generatedLine,generatedColumn:S.generatedColumn,originalLine:S.originalLine,originalColumn:S.originalColumn,name:S.name===null?null:this._names.at(S.name)}},this).forEach(u,a)},f.prototype.allGeneratedPositionsFor=function(u){var d=t.getArg(u,"line"),i={source:t.getArg(u,"source"),originalLine:d,originalColumn:t.getArg(u,"column",0)};if(i.source=this._findSourceIndex(i.source),i.source<0)return[];var a=[],n=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,e.LEAST_UPPER_BOUND);if(n>=0){var m=this._originalMappings[n];if(u.column===void 0)for(var v=m.originalLine;m&&m.originalLine===v;)a.push({line:t.getArg(m,"generatedLine",null),column:t.getArg(m,"generatedColumn",null),lastColumn:t.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++n];else for(var S=m.originalColumn;m&&m.originalLine===d&&m.originalColumn==S;)a.push({line:t.getArg(m,"generatedLine",null),column:t.getArg(m,"generatedColumn",null),lastColumn:t.getArg(m,"lastGeneratedColumn",null)}),m=this._originalMappings[++n]}return a},we.SourceMapConsumer=f;function l(c,u){var d=c;typeof c=="string"&&(d=t.parseSourceMapInput(c));var i=t.getArg(d,"version"),a=t.getArg(d,"sources"),n=t.getArg(d,"names",[]),m=t.getArg(d,"sourceRoot",null),v=t.getArg(d,"sourcesContent",null),S=t.getArg(d,"mappings"),_=t.getArg(d,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);m&&(m=t.normalize(m)),a=a.map(String).map(t.normalize).map(function(w){return m&&t.isAbsolute(m)&&t.isAbsolute(w)?t.relative(m,w):w}),this._names=r.fromArray(n.map(String),!0),this._sources=r.fromArray(a,!0),this._absoluteSources=this._sources.toArray().map(function(w){return t.computeSourceURL(m,w,u)}),this.sourceRoot=m,this.sourcesContent=v,this._mappings=S,this._sourceMapURL=u,this.file=_}l.prototype=Object.create(f.prototype),l.prototype.consumer=f,l.prototype._findSourceIndex=function(c){var u=c;if(this.sourceRoot!=null&&(u=t.relative(this.sourceRoot,u)),this._sources.has(u))return this._sources.indexOf(u);var d;for(d=0;d<this._absoluteSources.length;++d)if(this._absoluteSources[d]==c)return d;return-1},l.fromSourceMap=function(u,d){var i=Object.create(l.prototype),a=i._names=r.fromArray(u._names.toArray(),!0),n=i._sources=r.fromArray(u._sources.toArray(),!0);i.sourceRoot=u._sourceRoot,i.sourcesContent=u._generateSourcesContent(i._sources.toArray(),i.sourceRoot),i.file=u._file,i._sourceMapURL=d,i._absoluteSources=i._sources.toArray().map(function(P){return t.computeSourceURL(i.sourceRoot,P,d)});for(var m=u._mappings.toArray().slice(),v=i.__generatedMappings=[],S=i.__originalMappings=[],_=0,w=m.length;_<w;_++){var g=m[_],y=new h;y.generatedLine=g.generatedLine,y.generatedColumn=g.generatedColumn,g.source&&(y.source=n.indexOf(g.source),y.originalLine=g.originalLine,y.originalColumn=g.originalColumn,g.name&&(y.name=a.indexOf(g.name)),S.push(y)),v.push(y)}return p(i.__originalMappings,t.compareByOriginalPositions),i},l.prototype._version=3,Object.defineProperty(l.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function h(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}l.prototype._parseMappings=function(u,d){for(var i=1,a=0,n=0,m=0,v=0,S=0,_=u.length,w=0,g={},y={},P=[],b=[],C,x,k,I,ie;w<_;)if(u.charAt(w)===";")i++,w++,a=0;else if(u.charAt(w)===",")w++;else{for(C=new h,C.generatedLine=i,I=w;I<_&&!this._charIsMappingSeparator(u,I);I++);if(x=u.slice(w,I),k=g[x],k)w+=x.length;else{for(k=[];w<I;)s.decode(u,w,y),ie=y.value,w=y.rest,k.push(ie);if(k.length===2)throw new Error("Found a source, but no line and column");if(k.length===3)throw new Error("Found a source and line, but no column");g[x]=k}C.generatedColumn=a+k[0],a=C.generatedColumn,k.length>1&&(C.source=v+k[1],v+=k[1],C.originalLine=n+k[2],n=C.originalLine,C.originalLine+=1,C.originalColumn=m+k[3],m=C.originalColumn,k.length>4&&(C.name=S+k[4],S+=k[4])),b.push(C),typeof C.originalLine=="number"&&P.push(C)}p(b,t.compareByGeneratedPositionsDeflated),this.__generatedMappings=b,p(P,t.compareByOriginalPositions),this.__originalMappings=P},l.prototype._findMapping=function(u,d,i,a,n,m){if(u[i]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+u[i]);if(u[a]<0)throw new TypeError("Column must be greater than or equal to 0, got "+u[a]);return e.search(u,d,n,m)},l.prototype.computeColumnSpans=function(){for(var u=0;u<this._generatedMappings.length;++u){var d=this._generatedMappings[u];if(u+1<this._generatedMappings.length){var i=this._generatedMappings[u+1];if(d.generatedLine===i.generatedLine){d.lastGeneratedColumn=i.generatedColumn-1;continue}}d.lastGeneratedColumn=1/0}},l.prototype.originalPositionFor=function(u){var d={generatedLine:t.getArg(u,"line"),generatedColumn:t.getArg(u,"column")},i=this._findMapping(d,this._generatedMappings,"generatedLine","generatedColumn",t.compareByGeneratedPositionsDeflated,t.getArg(u,"bias",f.GREATEST_LOWER_BOUND));if(i>=0){var a=this._generatedMappings[i];if(a.generatedLine===d.generatedLine){var n=t.getArg(a,"source",null);n!==null&&(n=this._sources.at(n),n=t.computeSourceURL(this.sourceRoot,n,this._sourceMapURL));var m=t.getArg(a,"name",null);return m!==null&&(m=this._names.at(m)),{source:n,line:t.getArg(a,"originalLine",null),column:t.getArg(a,"originalColumn",null),name:m}}}return{source:null,line:null,column:null,name:null}},l.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(u){return u==null}):!1},l.prototype.sourceContentFor=function(u,d){if(!this.sourcesContent)return null;var i=this._findSourceIndex(u);if(i>=0)return this.sourcesContent[i];var a=u;this.sourceRoot!=null&&(a=t.relative(this.sourceRoot,a));var n;if(this.sourceRoot!=null&&(n=t.urlParse(this.sourceRoot))){var m=a.replace(/^file:\/\//,"");if(n.scheme=="file"&&this._sources.has(m))return this.sourcesContent[this._sources.indexOf(m)];if((!n.path||n.path=="/")&&this._sources.has("/"+a))return this.sourcesContent[this._sources.indexOf("/"+a)]}if(d)return null;throw new Error('"'+a+'" is not in the SourceMap.')},l.prototype.generatedPositionFor=function(u){var d=t.getArg(u,"source");if(d=this._findSourceIndex(d),d<0)return{line:null,column:null,lastColumn:null};var i={source:d,originalLine:t.getArg(u,"line"),originalColumn:t.getArg(u,"column")},a=this._findMapping(i,this._originalMappings,"originalLine","originalColumn",t.compareByOriginalPositions,t.getArg(u,"bias",f.GREATEST_LOWER_BOUND));if(a>=0){var n=this._originalMappings[a];if(n.source===i.source)return{line:t.getArg(n,"generatedLine",null),column:t.getArg(n,"generatedColumn",null),lastColumn:t.getArg(n,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},we.BasicSourceMapConsumer=l;function o(c,u){var d=c;typeof c=="string"&&(d=t.parseSourceMapInput(c));var i=t.getArg(d,"version"),a=t.getArg(d,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new r,this._names=new r;var n={line:-1,column:0};this._sections=a.map(function(m){if(m.url)throw new Error("Support for url field in sections not implemented.");var v=t.getArg(m,"offset"),S=t.getArg(v,"line"),_=t.getArg(v,"column");if(S<n.line||S===n.line&&_<n.column)throw new Error("Section offsets must be ordered and non-overlapping.");return n=v,{generatedOffset:{generatedLine:S+1,generatedColumn:_+1},consumer:new f(t.getArg(m,"map"),u)}})}return o.prototype=Object.create(f.prototype),o.prototype.constructor=f,o.prototype._version=3,Object.defineProperty(o.prototype,"sources",{get:function(){for(var c=[],u=0;u<this._sections.length;u++)for(var d=0;d<this._sections[u].consumer.sources.length;d++)c.push(this._sections[u].consumer.sources[d]);return c}}),o.prototype.originalPositionFor=function(u){var d={generatedLine:t.getArg(u,"line"),generatedColumn:t.getArg(u,"column")},i=e.search(d,this._sections,function(n,m){var v=n.generatedLine-m.generatedOffset.generatedLine;return v||n.generatedColumn-m.generatedOffset.generatedColumn}),a=this._sections[i];return a?a.consumer.originalPositionFor({line:d.generatedLine-(a.generatedOffset.generatedLine-1),column:d.generatedColumn-(a.generatedOffset.generatedLine===d.generatedLine?a.generatedOffset.generatedColumn-1:0),bias:u.bias}):{source:null,line:null,column:null,name:null}},o.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(u){return u.consumer.hasContentsOfAllSources()})},o.prototype.sourceContentFor=function(u,d){for(var i=0;i<this._sections.length;i++){var a=this._sections[i],n=a.consumer.sourceContentFor(u,!0);if(n)return n}if(d)return null;throw new Error('"'+u+'" is not in the SourceMap.')},o.prototype.generatedPositionFor=function(u){for(var d=0;d<this._sections.length;d++){var i=this._sections[d];if(i.consumer._findSourceIndex(t.getArg(u,"source"))!==-1){var a=i.consumer.generatedPositionFor(u);if(a){var n={line:a.line+(i.generatedOffset.generatedLine-1),column:a.column+(i.generatedOffset.generatedLine===a.line?i.generatedOffset.generatedColumn-1:0)};return n}}}return{line:null,column:null}},o.prototype._parseMappings=function(u,d){this.__generatedMappings=[],this.__originalMappings=[];for(var i=0;i<this._sections.length;i++)for(var a=this._sections[i],n=a.consumer._generatedMappings,m=0;m<n.length;m++){var v=n[m],S=a.consumer._sources.at(v.source);S=t.computeSourceURL(a.consumer.sourceRoot,S,this._sourceMapURL),this._sources.add(S),S=this._sources.indexOf(S);var _=null;v.name&&(_=a.consumer._names.at(v.name),this._names.add(_),_=this._names.indexOf(_));var w={source:S,generatedLine:v.generatedLine+(a.generatedOffset.generatedLine-1),generatedColumn:v.generatedColumn+(a.generatedOffset.generatedLine===v.generatedLine?a.generatedOffset.generatedColumn-1:0),originalLine:v.originalLine,originalColumn:v.originalColumn,name:_};this.__generatedMappings.push(w),typeof w.originalLine=="number"&&this.__originalMappings.push(w)}p(this.__generatedMappings,t.compareByGeneratedPositionsDeflated),p(this.__originalMappings,t.compareByOriginalPositions)},we.IndexedSourceMapConsumer=o,we}var Tt={},Jr;function xa(){if(Jr)return Tt;Jr=1;var t=Wr().SourceMapGenerator,e=be(),r=/(\r?\n)/,s=10,p="$$$isSourceNode$$$";function f(l,h,o,c,u){this.children=[],this.sourceContents={},this.line=l??null,this.column=h??null,this.source=o??null,this.name=u??null,this[p]=!0,c!=null&&this.add(c)}return f.fromStringWithSourceMap=function(h,o,c){var u=new f,d=h.split(r),i=0,a=function(){var _=g(),w=g()||"";return _+w;function g(){return i<d.length?d[i++]:void 0}},n=1,m=0,v=null;return o.eachMapping(function(_){if(v!==null)if(n<_.generatedLine)S(v,a()),n++,m=0;else{var w=d[i]||"",g=w.substr(0,_.generatedColumn-m);d[i]=w.substr(_.generatedColumn-m),m=_.generatedColumn,S(v,g),v=_;return}for(;n<_.generatedLine;)u.add(a()),n++;if(m<_.generatedColumn){var w=d[i]||"";u.add(w.substr(0,_.generatedColumn)),d[i]=w.substr(_.generatedColumn),m=_.generatedColumn}v=_},this),i<d.length&&(v&&S(v,a()),u.add(d.splice(i).join(""))),o.sources.forEach(function(_){var w=o.sourceContentFor(_);w!=null&&(c!=null&&(_=e.join(c,_)),u.setSourceContent(_,w))}),u;function S(_,w){if(_===null||_.source===void 0)u.add(w);else{var g=c?e.join(c,_.source):_.source;u.add(new f(_.originalLine,_.originalColumn,g,w,_.name))}}},f.prototype.add=function(h){if(Array.isArray(h))h.forEach(function(o){this.add(o)},this);else if(h[p]||typeof h=="string")h&&this.children.push(h);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+h);return this},f.prototype.prepend=function(h){if(Array.isArray(h))for(var o=h.length-1;o>=0;o--)this.prepend(h[o]);else if(h[p]||typeof h=="string")this.children.unshift(h);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+h);return this},f.prototype.walk=function(h){for(var o,c=0,u=this.children.length;c<u;c++)o=this.children[c],o[p]?o.walk(h):o!==""&&h(o,{source:this.source,line:this.line,column:this.column,name:this.name})},f.prototype.join=function(h){var o,c,u=this.children.length;if(u>0){for(o=[],c=0;c<u-1;c++)o.push(this.children[c]),o.push(h);o.push(this.children[c]),this.children=o}return this},f.prototype.replaceRight=function(h,o){var c=this.children[this.children.length-1];return c[p]?c.replaceRight(h,o):typeof c=="string"?this.children[this.children.length-1]=c.replace(h,o):this.children.push("".replace(h,o)),this},f.prototype.setSourceContent=function(h,o){this.sourceContents[e.toSetString(h)]=o},f.prototype.walkSourceContents=function(h){for(var o=0,c=this.children.length;o<c;o++)this.children[o][p]&&this.children[o].walkSourceContents(h);for(var u=Object.keys(this.sourceContents),o=0,c=u.length;o<c;o++)h(e.fromSetString(u[o]),this.sourceContents[u[o]])},f.prototype.toString=function(){var h="";return this.walk(function(o){h+=o}),h},f.prototype.toStringWithSourceMap=function(h){var o={code:"",line:1,column:0},c=new t(h),u=!1,d=null,i=null,a=null,n=null;return this.walk(function(m,v){o.code+=m,v.source!==null&&v.line!==null&&v.column!==null?((d!==v.source||i!==v.line||a!==v.column||n!==v.name)&&c.addMapping({source:v.source,original:{line:v.line,column:v.column},generated:{line:o.line,column:o.column},name:v.name}),d=v.source,i=v.line,a=v.column,n=v.name,u=!0):u&&(c.addMapping({generated:{line:o.line,column:o.column}}),d=null,u=!1);for(var S=0,_=m.length;S<_;S++)m.charCodeAt(S)===s?(o.line++,o.column=0,S+1===_?(d=null,u=!1):u&&c.addMapping({source:v.source,original:{line:v.line,column:v.column},generated:{line:o.line,column:o.column},name:v.name})):o.column++}),this.walkSourceContents(function(m,v){c.setSourceContent(m,v)}),{code:o.code,map:c}},Tt.SourceNode=f,Tt}var zr;function Ea(){return zr||(zr=1,Se.SourceMapGenerator=Wr().SourceMapGenerator,Se.SourceMapConsumer=ka().SourceMapConsumer,Se.SourceNode=xa().SourceNode),Se}(function(t,e){e.__esModule=!0;var r=L,s=void 0;try{var p=Ea();s=p.SourceNode}catch{}s||(s=function(h,o,c,u){this.src="",u&&this.add(u)},s.prototype={add:function(o){r.isArray(o)&&(o=o.join("")),this.src+=o},prepend:function(o){r.isArray(o)&&(o=o.join("")),this.src=o+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function f(h,o,c){if(r.isArray(h)){for(var u=[],d=0,i=h.length;d<i;d++)u.push(o.wrap(h[d],c));return u}else if(typeof h=="boolean"||typeof h=="number")return h+"";return h}function l(h){this.srcFile=h,this.source=[]}l.prototype={isEmpty:function(){return!this.source.length},prepend:function(o,c){this.source.unshift(this.wrap(o,c))},push:function(o,c){this.source.push(this.wrap(o,c))},merge:function(){var o=this.empty();return this.each(function(c){o.add([" ",c,`
|
|
57
|
+
`])}),o},each:function(o){for(var c=0,u=this.source.length;c<u;c++)o(this.source[c])},empty:function(){var o=this.currentLocation||{start:{}};return new s(o.start.line,o.start.column,this.srcFile)},wrap:function(o){var c=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return o instanceof s?o:(o=f(o,this,c),new s(c.start.line,c.start.column,this.srcFile,o))},functionCall:function(o,c,u){return u=this.generateList(u),this.wrap([o,c?"."+c+"(":"(",u,")"])},quotedString:function(o){return'"'+(o+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(o){var c=this,u=[];Object.keys(o).forEach(function(i){var a=f(o[i],c);a!=="undefined"&&u.push([c.quotedString(i),":",a])});var d=this.generateList(u);return d.prepend("{"),d.add("}"),d},generateList:function(o){for(var c=this.empty(),u=0,d=o.length;u<d;u++)u&&c.add(","),c.add(f(o[u],this));return c},generateArray:function(o){var c=this.generateList(o);return c.prepend("["),c.add("]"),c}},e.default=l,t.exports=e.default})(Lt,Lt.exports);var Ma=Lt.exports;(function(t,e){e.__esModule=!0;function r(i){return i&&i.__esModule?i:{default:i}}var s=D,p=F,f=r(p),l=L,h=Ma,o=r(h);function c(i){this.value=i}function u(){}u.prototype={nameLookup:function(a,n){return this.internalNameLookup(a,n)},depthedLookup:function(a){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(a),")"]},compilerInfo:function(){var a=s.COMPILER_REVISION,n=s.REVISION_CHANGES[a];return[a,n]},appendToBuffer:function(a,n,m){return l.isArray(a)||(a=[a]),a=this.source.wrap(a,n),this.environment.isSimple?["return ",a,";"]:m?["buffer += ",a,";"]:(a.appendToBuffer=!0,a)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(a,n){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",a,",",JSON.stringify(n),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(a,n,m,v){this.environment=a,this.options=n,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!v,this.name=this.environment.name,this.isChild=!!m,this.context=m||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(a,n),this.useDepths=this.useDepths||a.useDepths||a.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||a.useBlockParams;var S=a.opcodes,_=void 0,w=void 0,g=void 0,y=void 0;for(g=0,y=S.length;g<y;g++)_=S[g],this.source.currentLocation=_.loc,w=w||_.loc,this[_.opcode].apply(this,_.args);if(this.source.currentLocation=w,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new f.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
|
|
58
|
+
`]),this.decorators.push("return fn;"),v?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
|
|
59
|
+
`),this.decorators.push(`}
|
|
60
|
+
`),this.decorators=this.decorators.merge()));var P=this.createFunctionContext(v);if(this.isChild)return P;var b={compiler:this.compilerInfo(),main:P};this.decorators&&(b.main_d=this.decorators,b.useDecorators=!0);var C=this.context,x=C.programs,k=C.decorators;for(g=0,y=x.length;g<y;g++)x[g]&&(b[g]=x[g],k[g]&&(b[g+"_d"]=k[g],b.useDecorators=!0));return this.environment.usePartial&&(b.usePartial=!0),this.options.data&&(b.useData=!0),this.useDepths&&(b.useDepths=!0),this.useBlockParams&&(b.useBlockParams=!0),this.options.compat&&(b.compat=!0),v?b.compilerOptions=this.options:(b.compiler=JSON.stringify(b.compiler),this.source.currentLocation={start:{line:1,column:0}},b=this.objectLiteral(b),n.srcName?(b=b.toStringWithSourceMap({file:n.destName}),b.map=b.map&&b.map.toString()):b=b.toString()),b},preamble:function(){this.lastContext=0,this.source=new o.default(this.options.srcName),this.decorators=new o.default(this.options.srcName)},createFunctionContext:function(a){var n=this,m="",v=this.stackVars.concat(this.registers.list);v.length>0&&(m+=", "+v.join(", "));var S=0;Object.keys(this.aliases).forEach(function(g){var y=n.aliases[g];y.children&&y.referenceCount>1&&(m+=", alias"+ ++S+"="+g,y.children[0]="alias"+S)}),this.lookupPropertyFunctionIsUsed&&(m+=", "+this.lookupPropertyFunctionVarDeclaration());var _=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&_.push("blockParams"),this.useDepths&&_.push("depths");var w=this.mergeSource(m);return a?(_.push(w),Function.apply(this,_)):this.source.wrap(["function(",_.join(","),`) {
|
|
61
|
+
`,w,"}"])},mergeSource:function(a){var n=this.environment.isSimple,m=!this.forceBuffer,v=void 0,S=void 0,_=void 0,w=void 0;return this.source.each(function(g){g.appendToBuffer?(_?g.prepend(" + "):_=g,w=g):(_&&(S?_.prepend("buffer += "):v=!0,w.add(";"),_=w=void 0),S=!0,n||(m=!1))}),m?_?(_.prepend("return "),w.add(";")):S||this.source.push('return "";'):(a+=", buffer = "+(v?"":this.initializeBuffer()),_?(_.prepend("return buffer + "),w.add(";")):this.source.push("return buffer;")),a&&this.source.prepend("var "+a.substring(2)+(v?"":`;
|
|
62
|
+
`)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
|
|
63
|
+
lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
|
|
65
|
+
return parent[propertyName];
|
|
66
|
+
}
|
|
67
|
+
return undefined
|
|
68
|
+
}
|
|
69
|
+
`.trim()},blockValue:function(a){var n=this.aliasable("container.hooks.blockHelperMissing"),m=[this.contextName(0)];this.setupHelperArgs(a,0,m);var v=this.popStack();m.splice(1,0,v),this.push(this.source.functionCall(n,"call",m))},ambiguousBlockValue:function(){var a=this.aliasable("container.hooks.blockHelperMissing"),n=[this.contextName(0)];this.setupHelperArgs("",0,n,!0),this.flushInline();var m=this.topStack();n.splice(1,0,m),this.pushSource(["if (!",this.lastHelper,") { ",m," = ",this.source.functionCall(a,"call",n),"}"])},appendContent:function(a){this.pendingContent?a=this.pendingContent+a:this.pendingLocation=this.source.currentLocation,this.pendingContent=a},append:function(){if(this.isInline())this.replaceStack(function(n){return[" != null ? ",n,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var a=this.popStack();this.pushSource(["if (",a," != null) { ",this.appendToBuffer(a,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,n,m,v){var S=0;!v&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(a[S++])):this.pushContext(),this.resolvePath("context",a,S,n,m)},lookupBlockParam:function(a,n){this.useBlockParams=!0,this.push(["blockParams[",a[0],"][",a[1],"]"]),this.resolvePath("context",n,1)},lookupData:function(a,n,m){a?this.pushStackLiteral("container.data(data, "+a+")"):this.pushStackLiteral("data"),this.resolvePath("data",n,0,!0,m)},resolvePath:function(a,n,m,v,S){var _=this;if(this.options.strict||this.options.assumeObjects){this.push(d(this.options.strict&&S,this,n,m,a));return}for(var w=n.length;m<w;m++)this.replaceStack(function(g){var y=_.nameLookup(g,n[m],a);return v?[" && ",y]:[" != null ? ",y," : ",g]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(a,n){this.pushContext(),this.pushString(n),n!=="SubExpression"&&(typeof a=="string"?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(a){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(a?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(a.ids)),this.stringParams&&(this.push(this.objectLiteral(a.contexts)),this.push(this.objectLiteral(a.types))),this.push(this.objectLiteral(a.values))},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){a!=null?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},registerDecorator:function(a,n){var m=this.nameLookup("decorators",n,"decorator"),v=this.setupHelperArgs(n,a);this.decorators.push(["fn = ",this.decorators.functionCall(m,"",["fn","props","container",v])," || fn;"])},invokeHelper:function(a,n,m){var v=this.popStack(),S=this.setupHelper(a,n),_=[];m&&_.push(S.name),_.push(v),this.options.strict||_.push(this.aliasable("container.hooks.helperMissing"));var w=["(",this.itemsSeparatedBy(_,"||"),")"],g=this.source.functionCall(w,"call",S.callParams);this.push(g)},itemsSeparatedBy:function(a,n){var m=[];m.push(a[0]);for(var v=1;v<a.length;v++)m.push(n,a[v]);return m},invokeKnownHelper:function(a,n){var m=this.setupHelper(a,n);this.push(this.source.functionCall(m.name,"call",m.callParams))},invokeAmbiguous:function(a,n){this.useRegister("helper");var m=this.popStack();this.emptyHash();var v=this.setupHelper(0,a,n),S=this.lastHelper=this.nameLookup("helpers",a,"helper"),_=["(","(helper = ",S," || ",m,")"];this.options.strict||(_[0]="(helper = ",_.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",_,v.paramsInit?["),(",v.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",v.callParams)," : helper))"])},invokePartial:function(a,n,m){var v=[],S=this.setupParams(n,1,v);a&&(n=this.popStack(),delete S.name),m&&(S.indent=JSON.stringify(m)),S.helpers="helpers",S.partials="partials",S.decorators="container.decorators",a?v.unshift(n):v.unshift(this.nameLookup("partials",n,"partial")),this.options.compat&&(S.depths="depths"),S=this.objectLiteral(S),v.push(S),this.push(this.source.functionCall("container.invokePartial","",v))},assignToHash:function(a){var n=this.popStack(),m=void 0,v=void 0,S=void 0;this.trackIds&&(S=this.popStack()),this.stringParams&&(v=this.popStack(),m=this.popStack());var _=this.hash;m&&(_.contexts[a]=m),v&&(_.types[a]=v),S&&(_.ids[a]=S),_.values[a]=n},pushId:function(a,n,m){a==="BlockParam"?this.pushStackLiteral("blockParams["+n[0]+"].path["+n[1]+"]"+(m?" + "+JSON.stringify("."+m):"")):a==="PathExpression"?this.pushString(n):a==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:u,compileChildren:function(a,n){for(var m=a.children,v=void 0,S=void 0,_=0,w=m.length;_<w;_++){v=m[_],S=new this.compiler;var g=this.matchExistingProgram(v);if(g==null){this.context.programs.push("");var y=this.context.programs.length;v.index=y,v.name="program"+y,this.context.programs[y]=S.compile(v,n,this.context,!this.precompile),this.context.decorators[y]=S.decorators,this.context.environments[y]=v,this.useDepths=this.useDepths||S.useDepths,this.useBlockParams=this.useBlockParams||S.useBlockParams,v.useDepths=this.useDepths,v.useBlockParams=this.useBlockParams}else v.index=g.index,v.name="program"+g.index,this.useDepths=this.useDepths||g.useDepths,this.useBlockParams=this.useBlockParams||g.useBlockParams}},matchExistingProgram:function(a){for(var n=0,m=this.context.environments.length;n<m;n++){var v=this.context.environments[n];if(v&&v.equals(a))return v}},programExpression:function(a){var n=this.environment.children[a],m=[n.index,"data",n.blockParams];return(this.useBlockParams||this.useDepths)&&m.push("blockParams"),this.useDepths&&m.push("depths"),"container.program("+m.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},push:function(a){return a instanceof c||(a=this.source.wrap(a)),this.inlineStack.push(a),a},pushStackLiteral:function(a){this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),a&&this.source.push(a)},replaceStack:function(a){var n=["("],m=void 0,v=void 0,S=void 0;if(!this.isInline())throw new f.default("replaceStack on non-inline");var _=this.popStack(!0);if(_ instanceof c)m=[_.value],n=["(",m],S=!0;else{v=!0;var w=this.incrStack();n=["((",this.push(w)," = ",_,")"],m=this.topStack()}var g=a.call(this,m);S||this.popStack(),v&&this.stackSlot--,this.push(n.concat(g,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;this.inlineStack=[];for(var n=0,m=a.length;n<m;n++){var v=a[n];if(v instanceof c)this.compileStack.push(v);else{var S=this.incrStack();this.pushSource([S," = ",v,";"]),this.compileStack.push(S)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var n=this.isInline(),m=(n?this.inlineStack:this.compileStack).pop();if(!a&&m instanceof c)return m.value;if(!n){if(!this.stackSlot)throw new f.default("Invalid stack pop");this.stackSlot--}return m},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,n=a[a.length-1];return n instanceof c?n.value:n},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return this.source.quotedString(a)},objectLiteral:function(a){return this.source.objectLiteral(a)},aliasable:function(a){var n=this.aliases[a];return n?(n.referenceCount++,n):(n=this.aliases[a]=this.source.wrap(a),n.aliasable=!0,n.referenceCount=1,n)},setupHelper:function(a,n,m){var v=[],S=this.setupHelperArgs(n,a,v,m),_=this.nameLookup("helpers",n,"helper"),w=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:v,paramsInit:S,name:_,callParams:[w].concat(v)}},setupParams:function(a,n,m){var v={},S=[],_=[],w=[],g=!m,y=void 0;g&&(m=[]),v.name=this.quotedString(a),v.hash=this.popStack(),this.trackIds&&(v.hashIds=this.popStack()),this.stringParams&&(v.hashTypes=this.popStack(),v.hashContexts=this.popStack());var P=this.popStack(),b=this.popStack();(b||P)&&(v.fn=b||"container.noop",v.inverse=P||"container.noop");for(var C=n;C--;)y=this.popStack(),m[C]=y,this.trackIds&&(w[C]=this.popStack()),this.stringParams&&(_[C]=this.popStack(),S[C]=this.popStack());return g&&(v.args=this.source.generateArray(m)),this.trackIds&&(v.ids=this.source.generateArray(w)),this.stringParams&&(v.types=this.source.generateArray(_),v.contexts=this.source.generateArray(S)),this.options.data&&(v.data="data"),this.useBlockParams&&(v.blockParams="blockParams"),v},setupHelperArgs:function(a,n,m,v){var S=this.setupParams(a,n,m);return S.loc=JSON.stringify(this.source.currentLocation),S=this.objectLiteral(S),v?(this.useRegister("options"),m.push("options"),["options=",S]):m?(m.push(S),""):S}},function(){for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),a=u.RESERVED_WORDS={},n=0,m=i.length;n<m;n++)a[i[n]]=!0}(),u.isValidJavaScriptVariableName=function(i){return!u.RESERVED_WORDS[i]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(i)};function d(i,a,n,m,v){var S=a.popStack(),_=n.length;for(i&&_--;m<_;m++)S=a.nameLookup(S,n[m],v);return i?[a.aliasable("container.strict"),"(",S,", ",a.quotedString(n[m]),", ",JSON.stringify(a.source.currentLocation)," )"]:S}e.default=u,t.exports=e.default})(Mt,Mt.exports);var La=Mt.exports;(function(t,e){e.__esModule=!0;function r(_){return _&&_.__esModule?_:{default:_}}var s=jo,p=r(s),f=Ar,l=r(f),h=ge,o=me,c=La,u=r(c),d=Pt,i=r(d),a=Or,n=r(a),m=p.default.create;function v(){var _=m();return _.compile=function(w,g){return o.compile(w,g,_)},_.precompile=function(w,g){return o.precompile(w,g,_)},_.AST=l.default,_.Compiler=o.Compiler,_.JavaScriptCompiler=u.default,_.Parser=h.parser,_.parse=h.parse,_.parseWithoutProcessing=h.parseWithoutProcessing,_}var S=v();S.create=v,n.default(S),S.Visitor=i.default,S.default=S,e.default=S,t.exports=e.default})(Qe,Qe.exports);var Oa=Qe.exports,De={};De.__esModule=!0,De.print=Na,De.PrintVisitor=A;function Aa(t){return t&&t.__esModule?t:{default:t}}var Ia=Pt,Ra=Aa(Ia);function Na(t){return new A().accept(t)}function A(){this.padding=0}A.prototype=new Ra.default,A.prototype.pad=function(t){for(var e="",r=0,s=this.padding;r<s;r++)e+=" ";return e+=t+`
|
|
70
|
+
`,e},A.prototype.Program=function(t){var e="",r=t.body,s=void 0,p=void 0;if(t.blockParams){var f="BLOCK PARAMS: [";for(s=0,p=t.blockParams.length;s<p;s++)f+=" "+t.blockParams[s];f+=" ]",e+=this.pad(f)}for(s=0,p=r.length;s<p;s++)e+=this.accept(r[s]);return this.padding--,e},A.prototype.MustacheStatement=function(t){return this.pad("{{ "+this.SubExpression(t)+" }}")},A.prototype.Decorator=function(t){return this.pad("{{ DIRECTIVE "+this.SubExpression(t)+" }}")},A.prototype.BlockStatement=A.prototype.DecoratorBlock=function(t){var e="";return e+=this.pad((t.type==="DecoratorBlock"?"DIRECTIVE ":"")+"BLOCK:"),this.padding++,e+=this.pad(this.SubExpression(t)),t.program&&(e+=this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--),t.inverse&&(t.program&&this.padding++,e+=this.pad("{{^}}"),this.padding++,e+=this.accept(t.inverse),this.padding--,t.program&&this.padding--),this.padding--,e},A.prototype.PartialStatement=function(t){var e="PARTIAL:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),this.pad("{{> "+e+" }}")},A.prototype.PartialBlockStatement=function(t){var e="PARTIAL BLOCK:"+t.name.original;return t.params[0]&&(e+=" "+this.accept(t.params[0])),t.hash&&(e+=" "+this.accept(t.hash)),e+=" "+this.pad("PROGRAM:"),this.padding++,e+=this.accept(t.program),this.padding--,this.pad("{{> "+e+" }}")},A.prototype.ContentStatement=function(t){return this.pad("CONTENT[ '"+t.value+"' ]")},A.prototype.CommentStatement=function(t){return this.pad("{{! '"+t.value+"' }}")},A.prototype.SubExpression=function(t){for(var e=t.params,r=[],s=void 0,p=0,f=e.length;p<f;p++)r.push(this.accept(e[p]));return e="["+r.join(", ")+"]",s=t.hash?" "+this.accept(t.hash):"",this.accept(t.path)+" "+e+s},A.prototype.PathExpression=function(t){var e=t.parts.join("/");return(t.data?"@":"")+"PATH:"+e},A.prototype.StringLiteral=function(t){return'"'+t.value+'"'},A.prototype.NumberLiteral=function(t){return"NUMBER{"+t.value+"}"},A.prototype.BooleanLiteral=function(t){return"BOOLEAN{"+t.value+"}"},A.prototype.UndefinedLiteral=function(){return"UNDEFINED"},A.prototype.NullLiteral=function(){return"NULL"},A.prototype.Hash=function(t){for(var e=t.pairs,r=[],s=0,p=e.length;s<p;s++)r.push(this.accept(e[s]));return"HASH{"+r.join(", ")+"}"},A.prototype.HashPair=function(t){return t.key+"="+this.accept(t.value)};var Te=Oa.default,Qr=De;Te.PrintVisitor=Qr.PrintVisitor,Te.print=Qr.print;var Da=Te;function Zr(t,e){var r=R,s=r.readFileSync(e,"utf8");t.exports=Te.compile(s)}typeof Me<"u"&&Me.extensions&&(Me.extensions[".handlebars"]=Zr,Me.extensions[".hbs"]=Zr);const Xr=He(Da),Ta={protocut:"template-protocut",laserlib:"template-laserlib"},Bt=process.cwd(),ei=Mn(process.argv.slice(2),{default:{help:!1},alias:{h:"help",t:"template"},string:["_"]}),ti={_gitignore:".gitignore"},ri={"protocut-2d":{"@fsdev/cadui-2d":"^0.0.2","@fsdev/cutui-2d":"^0.0.2","@fsdev/webcad-js":"1.1.0"},"protocut-3d":{"@fsdev/cutui-3d":"^0.0.2","@fsdev/webcad-platform":"1.1.0"}},ii="fsapp-project",Ba=ni(ei._[0]);let Z=Ba||ii;const Be=()=>Z==="."?N.basename(N.resolve()):Z;async function Ha(){return fr.override({overwrite:ei.overwrite}),await fr([{type:"text",name:"projectName",message:_r("Project Name:"),onState:t=>{Z=ni(t.value)||ii}},{type:()=>!R.existsSync(Z)||qa(Z)?null:"select",name:"overwrite",message:()=>Z==="."?"Current directory":`Target directory ${Z}is not empty. Please choose how to proceed:`,initial:0,choices:[{title:"Remove existing files and continue",value:"yes"},{title:"Cancel operation",value:"no"},{title:"Ignore files and continue",value:"ignore"}]},{type:(t,{overwrite:e})=>{if(e==="no")throw new Error(yr("\u2716")+"Operation cancelled");return null},name:"overwriteChecker"},{type:oi(Be())?null:"text",name:"packageName",message:_r("Package name:"),initial:()=>$a(Be()),validate:t=>oi(t)||"Invalid package.json name"},{type:"select",name:"template",message:"Select a template",choices:[{title:"Vue",value:"vue"},{title:"Docs",value:"docs"},{title:"ProtoCut",value:"protocut"},{title:"Lib",value:"laserlib"}]},{type:(t,{template:e})=>e==="laserlib"?null:"select",name:"variant",message:"Select a templateUse arrow-keys. Return to submit",choices:t=>t==="vue"?[{title:"TypeScript",value:"ts"},{title:"JavaScript",value:"js"}]:t==="docs"?[{title:"VitePress",value:"vitepress"},{title:"VuePress",value:"vuepress"}]:t==="protocut"?[{title:"2D",value:"2d"},{title:"3D",value:"3d"}]:[]}],{onCancel:()=>{throw new Error(yr("\u2716")+" Operation cancelled")}})}async function Fa(){const{overwrite:t,template:e,packageName:r,variant:s}=await Ha(),p=N.join(Bt,Z);t==="yes"?Ga(p):R.existsSync(p)||R.mkdirSync(p,{recursive:!0});const f=N.resolve(ai(import.meta.url),"../..",Ta[e]||`template-${e}-${s}`),l=R.readdirSync(f);function h(d,i){const a=N.join(p,ti[d]??d);i?R.writeFileSync(a,i):si(N.join(f,d),a)}function o(d){const i=N.join(p,ti[d]??d);return new Promise((a,n)=>{R.readFile(i,"utf-8",(m,v)=>{m&&(console.error("\u8BFB\u53D6\u6587\u4EF6\u5931\u8D25",m),n(m)),a(v)})})}for(const d of l.filter(i=>i!=="package.json"&&!i.includes("template")))h(d);const c=JSON.parse(R.readFileSync(N.join(f,"package.json"),"utf-8"));if(c.name=r||Be(),ri[`${e}-${s}`]&&Object.assign(c.dependencies,ri[`${e}-${s}`]),h("package.json",JSON.stringify(c,null,2)+`
|
|
71
|
+
`),e==="protocut"){const d=s==="2d";let i=R.readFileSync(N.join(f,"template/Home.handlebars"),"utf-8"),a=Xr.compile(i)({is2D:d});h("src/views/Home.vue",a),i=R.readFileSync(N.join(f,"template/main.handlebars"),"utf-8"),a=Xr.compile(i)({is2D:d}),h("src/main.ts",a)}if(e==="laserlib"){const d=await o("/data/message/process.ts");if(d){const i=d.replace(/project-name-/g,Be());h("data/message/process.ts",i)}}const u=N.relative(Bt,p);console.log("Done. Now run:"),p!==Bt&&console.log(`cd ${u.includes(" ")?`"${u}"`:u}`),e==="docs"?(console.log(" npm install"),console.log(" npm run docs:dev")):(console.log(" npm install"),console.log(" npm run dev"))}function si(t,e){R.statSync(t).isDirectory()?Va(t,e):R.copyFileSync(t,e)}function Va(t,e){R.mkdirSync(e,{recursive:!0});for(const r of R.readdirSync(t)){const s=N.resolve(t,r),p=N.resolve(e,r);si(s,p)}}function qa(t){const e=R.readdirSync(t);return e.length===0||e.length===1&&e[0]===".git"}function ni(t){return t?.trim().replace(/\/+$/g,"")}function oi(t){return/^(?:@[a-z\d\-*~][a-z\d\-*._~]*\/)?[a-z\d\-~][a-z\d\-._~]*$/.test(t)}function $a(t){return t.trim().toLowerCase().replace(/\s+/g,"-").replace(/^[._]/,"").replace(/[^a-z\d\-~]+/g,"-")}function Ga(t){if(R.existsSync(t))for(const e of R.readdirSync(t))e!==".git"&&R.rmSync(N.resolve(t,e),{recursive:!0,force:!0})}Fa().catch(console.error);
|