@cmflow/cli 3.4.0-alpha.5 → 3.4.0-beta.10
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/README.md +11 -14
- package/dist/bin/cm.mjs +1682 -39247
- package/dist/bin/cmrelease.mjs +1697 -39059
- package/dist/common-DvEL7rzl.mjs +2 -0
- package/dist/common-DvEL7rzl.mjs.map +1 -0
- package/dist/{compile-packages-BB08_q2B.mjs → compile-packages-Cd19TaUb.mjs} +2 -2
- package/dist/{compile-packages-BB08_q2B.mjs.map → compile-packages-Cd19TaUb.mjs.map} +1 -1
- package/dist/{docker-clean-tags-EvFdWykP.mjs → docker-clean-tags-C8fsKmA7.mjs} +2 -2
- package/dist/{docker-clean-tags-EvFdWykP.mjs.map → docker-clean-tags-C8fsKmA7.mjs.map} +1 -1
- package/dist/docker-nm7ubWPx.mjs +34 -0
- package/dist/docker-nm7ubWPx.mjs.map +1 -0
- package/dist/{docker-publish-CG0aN9se.mjs → docker-publish-CwInm1oK.mjs} +2 -2
- package/dist/{docker-publish-CG0aN9se.mjs.map → docker-publish-CwInm1oK.mjs.map} +1 -1
- package/dist/{find-packages-611B-66T.mjs → find-packages-CCoDSkVV.mjs} +10 -10
- package/dist/{find-packages-611B-66T.mjs.map → find-packages-CCoDSkVV.mjs.map} +1 -1
- package/dist/get-config-D9xSS1Lq.mjs +9 -0
- package/dist/get-config-D9xSS1Lq.mjs.map +1 -0
- package/dist/index-MmHuVKDa.d.mts +266 -0
- package/dist/index.d.mts +2066 -0
- package/dist/index.mjs +32 -0
- package/dist/index.mjs.map +1 -0
- package/dist/{npm-VM_GgazT.mjs → npm-BKRyPuCX.mjs} +2 -2
- package/dist/{npm-VM_GgazT.mjs.map → npm-BKRyPuCX.mjs.map} +1 -1
- package/dist/rolldown-runtime-Csi-cuKc.mjs +1 -0
- package/dist/semantic/core/analyze-commits.d.mts +6 -0
- package/dist/semantic/core/analyze-commits.mjs +2 -0
- package/dist/semantic/core/analyze-commits.mjs.map +1 -0
- package/dist/semantic/core/conditional.d.mts +15 -0
- package/dist/semantic/core/conditional.mjs +2 -0
- package/dist/semantic/core/conditional.mjs.map +1 -0
- package/dist/semantic/core/exit.d.mts +6 -0
- package/dist/semantic/core/exit.mjs +2 -0
- package/dist/semantic/core/exit.mjs.map +1 -0
- package/dist/semantic/core/prepare/artifacts.d.mts +6 -0
- package/dist/semantic/core/prepare/artifacts.mjs +2 -0
- package/dist/semantic/core/prepare/artifacts.mjs.map +1 -0
- package/dist/semantic/core/prepare/bump-version.d.mts +6 -0
- package/dist/semantic/core/prepare/bump-version.mjs +2 -0
- package/dist/semantic/core/prepare/bump-version.mjs.map +1 -0
- package/dist/semantic/core/prepare/commit.d.mts +6 -0
- package/dist/semantic/core/prepare/commit.mjs +2 -0
- package/dist/semantic/core/prepare/commit.mjs.map +1 -0
- package/dist/semantic/core/prepare/release-info.d.mts +8 -0
- package/dist/semantic/core/prepare/release-info.mjs +2 -0
- package/dist/semantic/core/prepare/release-info.mjs.map +1 -0
- package/dist/semantic/core/publish-packages.d.mts +10 -0
- package/dist/semantic/core/publish-packages.mjs +5 -0
- package/dist/semantic/core/publish-packages.mjs.map +1 -0
- package/dist/semantic/core/push-release.d.mts +7 -0
- package/dist/semantic/core/push-release.mjs +2 -0
- package/dist/semantic/core/push-release.mjs.map +1 -0
- package/dist/semantic/core/run.d.mts +13 -0
- package/dist/semantic/core/run.mjs +2 -0
- package/dist/semantic/core/run.mjs.map +1 -0
- package/dist/semantic/core/sync-repository.d.mts +6 -0
- package/dist/semantic/core/sync-repository.mjs +2 -0
- package/dist/semantic/core/sync-repository.mjs.map +1 -0
- package/dist/semantic/core/verify-conditions.d.mts +6 -0
- package/dist/semantic/core/verify-conditions.mjs +2 -0
- package/dist/semantic/core/verify-conditions.mjs.map +1 -0
- package/dist/semantic/core/verify-release.d.mts +6 -0
- package/dist/semantic/core/verify-release.mjs +2 -0
- package/dist/semantic/core/verify-release.mjs.map +1 -0
- package/dist/semantic/docker/publish.d.mts +6 -0
- package/dist/semantic/docker/publish.mjs +2 -0
- package/dist/semantic/docker/publish.mjs.map +1 -0
- package/dist/semantic/docker/success.d.mts +6 -0
- package/dist/semantic/docker/success.mjs +2 -0
- package/dist/semantic/docker/success.mjs.map +1 -0
- package/dist/semver-Bgw8dAW8.mjs +2 -0
- package/dist/{semver-DFjVbN1S.mjs.map → semver-Bgw8dAW8.mjs.map} +1 -1
- package/dist/source-CHDdP5eQ.mjs +7 -0
- package/dist/{source-CwLcYLzI.mjs.map → source-CHDdP5eQ.mjs.map} +1 -1
- package/dist/{write-package-cxki9d3K.mjs → write-package-z7IDmENp.mjs} +6 -6
- package/dist/{write-package-cxki9d3K.mjs.map → write-package-z7IDmENp.mjs.map} +1 -1
- package/dist/{write-packages-CxCAl_AG.mjs → write-packages-CdhvWsMw.mjs} +3 -3
- package/dist/{write-packages-CxCAl_AG.mjs.map → write-packages-CdhvWsMw.mjs.map} +1 -1
- package/package.json +18 -9
- package/dist/cli-truncate-Bi2MjGwF.mjs +0 -323
- package/dist/cli-truncate-DMcpM5Q7.mjs +0 -2
- package/dist/cli-truncate-DMcpM5Q7.mjs.map +0 -1
- package/dist/cli-truncate-DsW0mgI_.mjs +0 -323
- package/dist/common-BdfXquG0.mjs +0 -61
- package/dist/common-BdfXquG0.mjs.map +0 -1
- package/dist/docker-Cc30aRzl.mjs +0 -34
- package/dist/docker-Cc30aRzl.mjs.map +0 -1
- package/dist/get-config-8ivgd1KC.mjs +0 -9
- package/dist/get-config-8ivgd1KC.mjs.map +0 -1
- package/dist/get-east-asian-width-Tfn8qoqd.mjs +0 -2
- package/dist/get-east-asian-width-Tfn8qoqd.mjs.map +0 -1
- package/dist/get-east-asian-width-wiVWCFXf.mjs +0 -682
- package/dist/log-update-CLbF3iV6.mjs +0 -6
- package/dist/log-update-CLbF3iV6.mjs.map +0 -1
- package/dist/log-update-CTXRtajW.mjs +0 -668
- package/dist/log-update-Dy1vPMGY.mjs +0 -668
- package/dist/rolldown-runtime-B4iAMlE-.mjs +0 -35
- package/dist/semver-DFjVbN1S.mjs +0 -2
- package/dist/source-CwLcYLzI.mjs +0 -7
- package/dist/wrap-ansi-9ugahFCy.mjs +0 -9
- package/dist/wrap-ansi-9ugahFCy.mjs.map +0 -1
- package/dist/wrap-ansi-BRr0GA6g.mjs +0 -330
- package/dist/wrap-ansi-Cupoo4Yg.mjs +0 -330
- package/dist/wrap-ansi-dwgEjNWf.mjs +0 -2
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-Csi-cuKc.mjs";import{S as i,T as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,w as T,x as E,y as D}from"./get-config-D9xSS1Lq.mjs";import{a as ee,i as O,n as te,o as k,r as A,s as ne,t as re}from"./common-DvEL7rzl.mjs";import{n as ie,r as j,t as ae}from"./docker-nm7ubWPx.mjs";import{t as oe}from"./npm-BKRyPuCX.mjs";import{t as se}from"./source-CHDdP5eQ.mjs";import{t as M}from"./docker-clean-tags-C8fsKmA7.mjs";import{t as N}from"./docker-publish-CwInm1oK.mjs";import{t as ce}from"./semver-Bgw8dAW8.mjs";import{n as le,t as ue}from"./compile-packages-Cd19TaUb.mjs";import{n as de,t as fe}from"./write-packages-CdhvWsMw.mjs";import{isCancel as pe,select as me,text as he}from"@clack/prompts";import ge from"semantic-release";var _e=a();function ve(e){let{output:t=[]}=e;return{title:`Refresh local repository`,task:()=>[{title:`Git fetch`,task:()=>i.fetch(`--prune`).toObservable().pipe((0,_e.tap)(e=>t.push(e)),(0,_e.catchError)(e=>(t.push(e),_e.EMPTY)))}]}}var ye=class{mapContext(e,t){return{...t,output:[]}}getTasks(e){return[ve(e)]}success(){let e=i.branchesInfos(`-r`);for(let{branch:t,date:n,creation:r,author:i}of e)console.log(`${n}\t${r}\t${i}\t${t}`)}},be=r(((e,t)=>{var n=/[|\\{}()[\]^$+*?.]/g;t.exports=function(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(n,`\\$&`)}})),P=r(((e,t)=>{let n=be(),{platform:r}=process,i={tick:`✔`,cross:`✖`,star:`★`,square:`▇`,squareSmall:`◻`,squareSmallFilled:`◼`,play:`▶`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,circleQuestionMark:`?⃝`,bullet:`●`,dot:`․`,line:`─`,ellipsis:`…`,pointer:`❯`,pointerSmall:`›`,info:`ℹ`,warning:`⚠`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,heart:`♥`,nodejs:`⬢`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,questionMarkPrefix:`?⃝`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneSeventh:`⅐`,oneEighth:`⅛`,oneNinth:`⅑`,oneTenth:`⅒`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`},a={tick:`√`,cross:`×`,star:`*`,square:`█`,squareSmall:`[ ]`,squareSmallFilled:`[█]`,play:`►`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,circleQuestionMark:`(?)`,bullet:`*`,dot:`.`,line:`─`,ellipsis:`...`,pointer:`>`,pointerSmall:`»`,info:`i`,warning:`‼`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,heart:i.heart,nodejs:`♦`,arrowUp:i.arrowUp,arrowDown:i.arrowDown,arrowLeft:i.arrowLeft,arrowRight:i.arrowRight,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,questionMarkPrefix:`?`,oneHalf:`1/2`,oneThird:`1/3`,oneQuarter:`1/4`,oneFifth:`1/5`,oneSixth:`1/6`,oneSeventh:`1/7`,oneEighth:`1/8`,oneNinth:`1/9`,oneTenth:`1/10`,twoThirds:`2/3`,twoFifths:`2/5`,threeQuarters:`3/4`,threeFifths:`3/5`,threeEighths:`3/8`,fourFifths:`4/5`,fiveSixths:`5/6`,fiveEighths:`5/8`,sevenEighths:`7/8`};r===`linux`&&(i.questionMarkPrefix=`?`);let o=r===`win32`?a:i;t.exports=Object.assign(e=>{if(o===i)return e;for(let[t,r]of Object.entries(i))r!==o[t]&&(e=e.replace(new RegExp(n(r),`g`),o[t]));return e},o),t.exports.main=i,t.exports.windows=a})),F=e(se(),1),I=e(P(),1),xe=class{mapContext(e,t){return{...t}}getTasks(e){return[{title:`Clean docker tags`,task:()=>M(e)}]}success(){console.log(F.default.green(I.default.tick),`Docker tags cleaned`)}},Se=class{mapContext(e,t){return{...t,config:_()}}getTasks(e){return[{title:`Configure workspace`,task:()=>A(e)}]}},Ce=class{mapContext(e,t){return{...t,target:e.target,config:_()}}getTasks(e){return[{title:`Deploy on docker`,task:()=>N(e)}]}success(){console.log(F.default.green(I.default.tick),`Docker image deployed`)}},we=class{mapContext(e,t){return{...t,output:[]}}getTasks(e){return[ve(e)]}success(e){let t=e.output??[];console.log(t.filter(e=>!e.match(`Fetching`)).join(`
|
|
2
|
+
`))}};const L=({config:{E2E_CMD:e,PACKAGE_MANAGER:t},skipTest:n,skipUnit:r,skipE2E:a})=>[{title:`Unit test`,skip:()=>!!(n||r),task:()=>te(t).run(`test`)},{title:`E2E test`,skip:()=>!!(n||a),task:()=>te(t).run(e||`test_e2e`)},{title:`Reset changes`,skip:()=>!!n,task:()=>i.reset(`--hard`)}];async function Te({featureBranch:e,origin:t,force:n}){if(i.branchExists(e,t)&&!n&&i.checkBranchRemoteStatus(e))throw Error(`Remote branch changed, check diff before continue`)}const Ee=e=>{let{origin:t,fromBranch:n,checkStatus:r=!0,rebase:a=!0}=e;return{title:`Rebase branch`,task:()=>[{title:`Check status`,enabled:()=>r,task:()=>Te(e)},{title:`Rebase from ${t}/${F.default.green(n)}`,enabled:()=>a,task:()=>i.rebase(`${t}/${n}`).toObservable()}]}};var De=r(((e,t)=>{var n=C();function r(){this.__data__=new n,this.size=0}t.exports=r})),R=r(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),Oe=r(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),ke=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Ae=r(((e,t)=>{var n=C(),r=h(),i=l(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),je=r(((e,t)=>{var n=C(),r=De(),i=R(),a=Oe(),o=ke(),s=Ae();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),Me=r(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),Ne=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),Pe=r(((e,t)=>{var n=l(),r=Me(),i=Ne();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),Fe=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),Ie=r(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),Le=r(((e,t)=>{var n=Pe(),r=Fe(),i=Ie(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),Re=r(((e,t)=>{t.exports=D().Uint8Array})),ze=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),Be=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),Ve=r(((e,t)=>{var n=w(),r=Re(),i=u(),a=Le(),o=ze(),s=Be(),c=1,l=2,d=`[object Boolean]`,f=`[object Date]`,p=`[object Error]`,m=`[object Map]`,h=`[object Number]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object Symbol]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=n?n.prototype:void 0,C=S?S.valueOf:void 0;function T(e,t,n,u,S,w,T){switch(n){case x:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case b:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case d:case f:case h:return i(+e,+t);case p:return e.name==t.name&&e.message==t.message;case g:case v:return e==t+``;case m:var E=o;case _:var D=u&c;if(E||=s,e.size!=t.size&&!D)return!1;var ee=T.get(e);if(ee)return ee==t;u|=l,T.set(e,t);var O=a(E(e),E(t),u,S,w,T);return T.delete(e),O;case y:if(C)return C.call(e)==C.call(t)}return!1}t.exports=T})),z=r(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),He=r(((e,t)=>{var n=z(),r=E();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Ue=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),We=r(((e,t)=>{function n(){return[]}t.exports=n})),B=r(((e,t)=>{var n=Ue(),r=We(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),V=r(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),Ge=r(((e,t)=>{var n=o(),r=f(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),H=r(((e,t)=>{var n=Ge(),r=f(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),Ke=r(((e,t)=>{function n(){return!1}t.exports=n})),qe=r(((e,t)=>{var n=D(),r=Ke(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Je=r(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),U=r(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Ye=r(((e,t)=>{var n=o(),r=U(),i=f(),a=`[object Arguments]`,s=`[object Array]`,c=`[object Boolean]`,l=`[object Date]`,u=`[object Error]`,d=`[object Function]`,p=`[object Map]`,m=`[object Number]`,h=`[object Object]`,g=`[object RegExp]`,_=`[object Set]`,v=`[object String]`,y=`[object WeakMap]`,b=`[object ArrayBuffer]`,x=`[object DataView]`,S=`[object Float32Array]`,C=`[object Float64Array]`,w=`[object Int8Array]`,T=`[object Int16Array]`,E=`[object Int32Array]`,D=`[object Uint8Array]`,ee=`[object Uint8ClampedArray]`,O=`[object Uint16Array]`,te=`[object Uint32Array]`,k={};k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[ee]=k[O]=k[te]=!0,k[a]=k[s]=k[b]=k[c]=k[x]=k[l]=k[u]=k[d]=k[p]=k[m]=k[h]=k[g]=k[_]=k[v]=k[y]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),W=r(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),G=r(((e,t)=>{var n=c(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),K=r(((e,t)=>{var n=Ye(),r=W(),i=G(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),Xe=r(((e,t)=>{var n=V(),r=H(),i=E(),a=qe(),o=Je(),s=K(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),Ze=r(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),Qe=r(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),$e=r(((e,t)=>{t.exports=Qe()(Object.keys,Object)})),et=r(((e,t)=>{var n=Ze(),r=$e(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),tt=r(((e,t)=>{var n=g(),r=U();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),nt=r(((e,t)=>{var n=Xe(),r=et(),i=tt();function a(e){return i(e)?n(e):r(e)}t.exports=a})),rt=r(((e,t)=>{var n=He(),r=B(),i=nt();function a(e){return n(e,i,r)}t.exports=a})),it=r(((e,t)=>{var n=rt(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),at=r(((e,t)=>{t.exports=d()(D(),`DataView`)})),ot=r(((e,t)=>{t.exports=d()(D(),`Promise`)})),st=r(((e,t)=>{t.exports=d()(D(),`Set`)})),ct=r(((e,t)=>{t.exports=d()(D(),`WeakMap`)})),q=r(((e,t)=>{var n=at(),r=h(),i=ot(),a=st(),s=ct(),c=o(),l=y(),u=`[object Map]`,d=`[object Object]`,f=`[object Promise]`,p=`[object Set]`,m=`[object WeakMap]`,g=`[object DataView]`,_=l(n),v=l(r),b=l(i),x=l(a),S=l(s),C=c;(n&&C(new n(new ArrayBuffer(1)))!=g||r&&C(new r)!=u||i&&C(i.resolve())!=f||a&&C(new a)!=p||s&&C(new s)!=m)&&(C=function(e){var t=c(e),n=t==d?e.constructor:void 0,r=n?l(n):``;if(r)switch(r){case _:return g;case v:return u;case b:return f;case x:return p;case S:return m}return t}),t.exports=C})),lt=r(((e,t)=>{var n=je(),r=Le(),i=Ve(),a=it(),o=q(),s=E(),c=qe(),l=K(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var ee=E?e.value():e,O=D?t.value():t;return v||=new n,_(ee,O,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),ut=r(((e,t)=>{var n=lt(),r=f();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),dt=e(r(((e,t)=>{var n=ut();function r(e,t){return n(e,t)}t.exports=r}))(),1);function ft(){let e=b();return{dependencies:e.dependencies,devDependencies:e.devDependencies}}function pt(){return Buffer.from(JSON.stringify(ft())).toString(`base64`)}function mt(){try{return JSON.parse(Buffer.from(i.config(`--local`,`npm.hash`),`base64`).toString(`utf8`))}catch{return``}}function ht(){return!(0,dt.default)(ft(),mt())}function gt(){i.config(`--local`,`npm.hash`,`${pt()}`)}const _t=({config:{PACKAGE_MANAGER:e}})=>{let t=ht();return{title:`Install`,enabled:()=>t,task:()=>[{title:`Restore dependencies using ${e.toUpperCase()}`,task:()=>te(e).restore().toObservable().pipe((0,_e.catchError)(t=>{throw e===`yarn`&&t.stderr.startsWith(`error Your lockfile needs to be updated`)?Error(`yarn.lock file is outdated. Run yarn, commit the updated lockfile and try again.`):t}))},{title:`Refresh metadata`,task:()=>gt()}]}};var vt=class extends we{mapContext(e,t){return{...t,origin:t.ORIGIN,featureBranch:i.getBranchName(),fromBranch:t.PRODUCTION_BRANCH,checkStatus:e.force===void 0||!!e.force,rebase:!0,skipTest:!e.cucumber&&!e.unitTest,skipUnit:!e.unitTest,skipE2E:!t.HAS_E2E||!e.cucumber}}getTasks(e){return[...super.getTasks(e),Ee(e),_t(e),...L(e)]}success(e){console.log(F.default.green(I.default.tick),`Branch ${F.default.green(e.featureBranch)} rebased from ${F.default.green(e.fromBranch)} HEAD`)}};function yt({origin:e=`origin`,featureBranch:t,upstream:n=!0,noVerify:r=!0}){if(!t)throw Error(`A feature branch is required before pushing.`);return{title:`Push ${t}`,task:()=>i.push(...[n?`-u`:``,`-f`,e,t,r?`--no-verify`:``].filter(Boolean)).toObservable()}}var bt=class extends vt{mapContext(e,t){return{...super.mapContext(e,t),checkStatus:!0,force:!0}}verifyConditions(e){e.featureBranch===e.fromBranch&&(console.error(F.default.red(`${I.default.cross} ${e.fromBranch} cannot be finished`)),process.exit(1))}getTasks(e){return[...super.getTasks(e),{title:`Add ${e.RELEASE_CANDIDATE_TAG} on last commit`,task(){let t=`${i.getLastCommitMsg()} ${e.config.RELEASE_CANDIDATE_TAG}`;return i.commit(`--amend`,`-m`,t).toObservable()}},yt(e)]}success(e){console.log(F.default.green(I.default.tick),`Branch`,F.default.green(e.featureBranch),`is finished`)}},xt=r(((e,t)=>{
|
|
3
|
+
//! moment.js
|
|
4
|
+
//! version : 2.30.1
|
|
5
|
+
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
6
|
+
//! license : MIT
|
|
7
|
+
//! momentjs.com
|
|
8
|
+
(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):n.moment=r()})(e,(function(){var e;function r(){return e.apply(null,arguments)}function i(t){e=t}function a(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function o(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(s(e,t))return!1;return!0}function l(e){return e===void 0}function u(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function d(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function f(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function p(e,t){for(var n in t)s(t,n)&&(e[n]=t[n]);return s(t,`toString`)&&(e.toString=t.toString),s(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function m(e,t,n,r){return er(e,t,n,r,!0).utc()}function h(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function g(e){return e._pf??=h(),e._pf}var _=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function v(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=g(e),n=_.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function y(e){var t=m(NaN);return e==null?g(t).userInvalidated=!0:p(g(t),e),t}var b=r.momentProperties=[],x=!1;function S(e,t){var n,r,i,a=b.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=g(t)),l(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=b[n],i=t[r],l(i)||(e[r]=i);return e}function C(e){S(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),x===!1&&(x=!0,r.updateOffset(this),x=!1)}function w(e){return e instanceof C||e!=null&&e._isAMomentObject!=null}function T(e){r.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function E(e,t){var n=!0;return p(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,e),n){var i=[],a,o,c,l=arguments.length;for(o=0;o<l;o++){if(a=``,typeof arguments[o]==`object`){for(c in a+=`
|
|
9
|
+
[`+o+`] `,arguments[0])s(arguments[0],c)&&(a+=c+`: `+arguments[0][c]+`, `);a=a.slice(0,-2)}else a=arguments[o];i.push(a)}T(e+`
|
|
10
|
+
Arguments: `+Array.prototype.slice.call(i).join(``)+`
|
|
11
|
+
`+Error().stack),n=!1}return t.apply(this,arguments)},t)}var D={};function ee(e,t){r.deprecationHandler!=null&&r.deprecationHandler(e,t),D[e]||(T(t),D[e]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function O(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function te(e){var t,n;for(n in e)s(e,n)&&(t=e[n],O(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function k(e,t){var n=p({},e),r;for(r in t)s(t,r)&&(o(e[r])&&o(t[r])?(n[r]={},p(n[r],e[r]),p(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)s(e,r)&&!s(t,r)&&o(e[r])&&(n[r]=p({},n[r]));return n}function A(e){e!=null&&this.set(e)}var ne=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n},re={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function ie(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r}function j(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var ae=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,oe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,se={},M={};function N(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(M[e]=i),t&&(M[t[0]]=function(){return j(i.apply(this,arguments),t[1],t[2])}),n&&(M[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function ce(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function le(e){var t=e.match(ae),n,r;for(n=0,r=t.length;n<r;n++)M[t[n]]?t[n]=M[t[n]]:t[n]=ce(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=O(t[a])?t[a].call(n,e):t[a];return i}}function ue(e,t){return e.isValid()?(t=de(t,e.localeData()),se[t]=se[t]||le(t),se[t](e)):e.localeData().invalidDate()}function de(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(oe.lastIndex=0;n>=0&&oe.test(e);)e=e.replace(oe,r),oe.lastIndex=0,--n;return e}var fe={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function pe(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(ae).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var me=`Invalid date`;function he(){return this._invalidDate}var ge=`%d`,_e=/\d{1,2}/;function ve(e){return this._ordinal.replace(`%d`,e)}var ye={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function be(e,t,n,r){var i=this._relativeTime[n];return O(i)?i(e,t,n,r):i.replace(/%d/i,e)}function P(e,t){var n=this._relativeTime[e>0?`future`:`past`];return O(n)?n(t):n.replace(/%s/i,t)}var F={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function I(e){return typeof e==`string`?F[e]||F[e.toLowerCase()]:void 0}function xe(e){var t={},n,r;for(r in e)s(e,r)&&(n=I(r),n&&(t[n]=e[r]));return t}var Se={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ce(e){var t=[],n;for(n in e)s(e,n)&&t.push({unit:n,priority:Se[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var we=/\d/,L=/\d\d/,Te=/\d{3}/,Ee=/\d{4}/,De=/[+-]?\d{6}/,R=/\d\d?/,Oe=/\d\d\d\d?/,ke=/\d\d\d\d\d\d?/,Ae=/\d{1,3}/,je=/\d{1,4}/,Me=/[+-]?\d{1,6}/,Ne=/\d+/,Pe=/[+-]?\d+/,Fe=/Z|[+-]\d\d:?\d\d/gi,Ie=/Z|[+-]\d\d(?::?\d\d)?/gi,Le=/[+-]?\d+(\.\d{1,3})?/,Re=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ze=/^[1-9]\d?/,Be=/^([1-9]\d|\d)/,Ve={};function z(e,t,n){Ve[e]=O(t)?t:function(e,r){return e&&n?n:t}}function He(e,t){return s(Ve,e)?Ve[e](t._strict,t._locale):new RegExp(Ue(e))}function Ue(e){return We(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function We(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function B(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function V(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=B(t)),n}var Ge={};function H(e,t){var n,r=t,i;for(typeof e==`string`&&(e=[e]),u(t)&&(r=function(e,n){n[t]=V(e)}),i=e.length,n=0;n<i;n++)Ge[e[n]]=r}function Ke(e,t){H(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function qe(e,t,n){t!=null&&s(Ge,e)&&Ge[e](t,n._a,n,e)}function Je(e){return e%4==0&&e%100!=0||e%400==0}var U=0,Ye=1,W=2,G=3,K=4,Xe=5,Ze=6,Qe=7,$e=8;N(`Y`,0,0,function(){var e=this.year();return e<=9999?j(e,4):`+`+e}),N(0,[`YY`,2],0,function(){return this.year()%100}),N(0,[`YYYY`,4],0,`year`),N(0,[`YYYYY`,5],0,`year`),N(0,[`YYYYYY`,6,!0],0,`year`),z(`Y`,Pe),z(`YY`,R,L),z(`YYYY`,je,Ee),z(`YYYYY`,Me,De),z(`YYYYYY`,Me,De),H([`YYYYY`,`YYYYYY`],U),H(`YYYY`,function(e,t){t[U]=e.length===2?r.parseTwoDigitYear(e):V(e)}),H(`YY`,function(e,t){t[U]=r.parseTwoDigitYear(e)}),H(`Y`,function(e,t){t[U]=parseInt(e,10)});function et(e){return Je(e)?366:365}r.parseTwoDigitYear=function(e){return V(e)+(V(e)>68?1900:2e3)};var tt=rt(`FullYear`,!0);function nt(){return Je(this.year())}function rt(e,t){return function(n){return n==null?it(this,e):(at(this,e,n),r.updateOffset(this,t),this)}}function it(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function at(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!Je(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function ot(e){return e=I(e),O(this[e])?this[e]():this}function st(e,t){if(typeof e==`object`){e=xe(e);var n=Ce(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=I(e),O(this[e]))return this[e](t);return this}function ct(e,t){return(e%t+t)%t}var q=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function lt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=ct(t,12);return e+=(t-n)/12,n===1?Je(e)?29:28:31-n%7%2}N(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),N(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),N(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),z(`M`,R,ze),z(`MM`,R,L),z(`MMM`,function(e,t){return t.monthsShortRegex(e)}),z(`MMMM`,function(e,t){return t.monthsRegex(e)}),H([`M`,`MM`],function(e,t){t[Ye]=V(e)-1}),H([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?g(n).invalidMonth=e:t[Ye]=i});var ut=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),dt=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),ft=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,pt=Re,mt=Re;function ht(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||ft).test(t)?`format`:`standalone`][e.month()]:a(this._months)?this._months:this._months.standalone}function gt(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[ft.test(t)?`format`:`standalone`][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _t(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=m([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=q.call(this._shortMonthsParse,o),i===-1?null:i):(i=q.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=q.call(this._shortMonthsParse,o),i===-1?(i=q.call(this._longMonthsParse,o),i===-1?null:i):i):(i=q.call(this._longMonthsParse,o),i===-1?(i=q.call(this._shortMonthsParse,o),i===-1?null:i):i)}function vt(e,t,n){var r,i,a;if(this._monthsParseExact)return _t.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=m([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function yt(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=V(t);else if(t=e.localeData().monthsParse(t),!u(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,lt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function bt(e){return e==null?it(this,`Month`):(yt(this,e),r.updateOffset(this,!0),this)}function xt(){return lt(this.year(),this.month())}function St(e){return this._monthsParseExact?(s(this,`_monthsRegex`)||wt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,`_monthsShortRegex`)||(this._monthsShortRegex=pt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ct(e){return this._monthsParseExact?(s(this,`_monthsRegex`)||wt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,`_monthsRegex`)||(this._monthsRegex=mt),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function wt(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=m([2e3,i]),o=We(this.monthsShort(a,``)),s=We(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function Tt(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function Et(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Dt(e,t,n){var r=7+t-n;return-((7+Et(e,0,r).getUTCDay()-t)%7)+r-1}function Ot(e,t,n,r,i){var a=(7+n-r)%7,o=Dt(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=et(c)+s):s>et(e)?(c=e+1,l=s-et(e)):(c=e,l=s),{year:c,dayOfYear:l}}function kt(e,t,n){var r=Dt(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+At(o,t,n)):i>At(e.year(),t,n)?(a=i-At(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function At(e,t,n){var r=Dt(e,t,n),i=Dt(e+1,t,n);return(et(e)-r+i)/7}N(`w`,[`ww`,2],`wo`,`week`),N(`W`,[`WW`,2],`Wo`,`isoWeek`),z(`w`,R,ze),z(`ww`,R,L),z(`W`,R,ze),z(`WW`,R,L),Ke([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=V(e)});function jt(e){return kt(e,this._week.dow,this._week.doy).week}var Mt={dow:0,doy:6};function Nt(){return this._week.dow}function Pt(){return this._week.doy}function Ft(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function It(e){var t=kt(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}N(`d`,0,`do`,`day`),N(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),N(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),N(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),N(`e`,0,0,`weekday`),N(`E`,0,0,`isoWeekday`),z(`d`,R),z(`e`,R),z(`E`,R),z(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),z(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),z(`dddd`,function(e,t){return t.weekdaysRegex(e)}),Ke([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?g(n).invalidWeekday=e:t.d=i}),Ke([`d`,`e`,`E`],function(e,t,n,r){t[r]=V(e)});function Lt(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function Rt(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function zt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Bt=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),Vt=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),Ht=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),Ut=Re,Wt=Re,Gt=Re;function Kt(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?zt(n,this._week.dow):e?n[e.day()]:n}function qt(e){return e===!0?zt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Jt(e){return e===!0?zt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Yt(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=m([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=q.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=q.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=q.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=q.call(this._weekdaysParse,o),i!==-1||(i=q.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=q.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=q.call(this._shortWeekdaysParse,o),i!==-1||(i=q.call(this._weekdaysParse,o),i!==-1)?i:(i=q.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=q.call(this._minWeekdaysParse,o),i!==-1||(i=q.call(this._weekdaysParse,o),i!==-1)?i:(i=q.call(this._shortWeekdaysParse,o),i===-1?null:i))}function Xt(e,t,n){var r,i,a;if(this._weekdaysParseExact)return Yt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=m([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function Zt(e){if(!this.isValid())return e==null?NaN:this;var t=it(this,`Day`);return e==null?t:(e=Lt(e,this.localeData()),this.add(e-t,`d`))}function Qt(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function $t(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=Rt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function en(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||rn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,`_weekdaysRegex`)||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function tn(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||rn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=Wt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function nn(e){return this._weekdaysParseExact?(s(this,`_weekdaysRegex`)||rn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=Gt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function rn(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;for(a=0;a<7;a++)o=m([2e3,1]).day(a),s=We(this.weekdaysMin(o,``)),c=We(this.weekdaysShort(o,``)),l=We(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function an(){return this.hours()%12||12}function on(){return this.hours()||24}N(`H`,[`HH`,2],0,`hour`),N(`h`,[`hh`,2],0,an),N(`k`,[`kk`,2],0,on),N(`hmm`,0,0,function(){return``+an.apply(this)+j(this.minutes(),2)}),N(`hmmss`,0,0,function(){return``+an.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)}),N(`Hmm`,0,0,function(){return``+this.hours()+j(this.minutes(),2)}),N(`Hmmss`,0,0,function(){return``+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)});function sn(e,t){N(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}sn(`a`,!0),sn(`A`,!1);function cn(e,t){return t._meridiemParse}z(`a`,cn),z(`A`,cn),z(`H`,R,Be),z(`h`,R,ze),z(`k`,R,ze),z(`HH`,R,L),z(`hh`,R,L),z(`kk`,R,L),z(`hmm`,Oe),z(`hmmss`,ke),z(`Hmm`,Oe),z(`Hmmss`,ke),H([`H`,`HH`],G),H([`k`,`kk`],function(e,t,n){var r=V(e);t[G]=r===24?0:r}),H([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),H([`h`,`hh`],function(e,t,n){t[G]=V(e),g(n).bigHour=!0}),H(`hmm`,function(e,t,n){var r=e.length-2;t[G]=V(e.substr(0,r)),t[K]=V(e.substr(r)),g(n).bigHour=!0}),H(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[G]=V(e.substr(0,r)),t[K]=V(e.substr(r,2)),t[Xe]=V(e.substr(i)),g(n).bigHour=!0}),H(`Hmm`,function(e,t,n){var r=e.length-2;t[G]=V(e.substr(0,r)),t[K]=V(e.substr(r))}),H(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[G]=V(e.substr(0,r)),t[K]=V(e.substr(r,2)),t[Xe]=V(e.substr(i))});function ln(e){return(e+``).toLowerCase().charAt(0)===`p`}var un=/[ap]\.?m?\.?/i,dn=rt(`Hours`,!0);function fn(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var pn={calendar:re,longDateFormat:fe,invalidDate:me,ordinal:ge,dayOfMonthOrdinalParse:_e,relativeTime:ye,months:ut,monthsShort:dt,week:Mt,weekdays:Bt,weekdaysMin:Ht,weekdaysShort:Vt,meridiemParse:un},J={},mn={},hn;function gn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function _n(e){return e&&e.toLowerCase().replace(`_`,`-`)}function vn(e){for(var t=0,n,r,i,a;t<e.length;){for(a=_n(e[t]).split(`-`),n=a.length,r=_n(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=bn(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&gn(a,r)>=n-1)break;n--}t++}return hn}function yn(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function bn(e){var r=null,i;if(J[e]===void 0&&t!==void 0&&t&&t.exports&&yn(e))try{r=hn._abbr,i=n,i(`./locale/`+e),xn(r)}catch{J[e]=null}return J[e]}function xn(e,t){var n;return e&&(n=l(t)?wn(e):Sn(e,t),n?hn=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),hn._abbr}function Sn(e,t){if(t!==null){var n,r=pn;if(t.abbr=e,J[e]!=null)ee(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=J[e]._config;else if(t.parentLocale!=null){if(J[t.parentLocale]!=null)r=J[t.parentLocale]._config;else if(n=bn(t.parentLocale),n!=null)r=n._config;else return mn[t.parentLocale]||(mn[t.parentLocale]=[]),mn[t.parentLocale].push({name:e,config:t}),null}return J[e]=new A(k(r,t)),mn[e]&&mn[e].forEach(function(e){Sn(e.name,e.config)}),xn(e),J[e]}return delete J[e],null}function Cn(e,t){if(t!=null){var n,r,i=pn;J[e]!=null&&J[e].parentLocale!=null?J[e].set(k(J[e]._config,t)):(r=bn(e),r!=null&&(i=r._config),t=k(i,t),r??(t.abbr=e),n=new A(t),n.parentLocale=J[e],J[e]=n),xn(e)}else J[e]!=null&&(J[e].parentLocale==null?J[e]!=null&&delete J[e]:(J[e]=J[e].parentLocale,e===xn()&&xn(e)));return J[e]}function wn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return hn;if(!a(e)){if(t=bn(e),t)return t;e=[e]}return vn(e)}function Tn(){return ne(J)}function En(e){var t,n=e._a;return n&&g(e).overflow===-2&&(t=n[Ye]<0||n[Ye]>11?Ye:n[W]<1||n[W]>lt(n[U],n[Ye])?W:n[G]<0||n[G]>24||n[G]===24&&(n[K]!==0||n[Xe]!==0||n[Ze]!==0)?G:n[K]<0||n[K]>59?K:n[Xe]<0||n[Xe]>59?Xe:n[Ze]<0||n[Ze]>999?Ze:-1,g(e)._overflowDayOfYear&&(t<U||t>W)&&(t=W),g(e)._overflowWeeks&&t===-1&&(t=Qe),g(e)._overflowWeekday&&t===-1&&(t=$e),g(e).overflow=t),e}var Dn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,On=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kn=/Z|[+-]\d\d(?::?\d\d)?/,An=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],jn=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],Mn=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Pn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Fn(e){var t,n,r=e._i,i=Dn.exec(r)||On.exec(r),a,o,s,c,l=An.length,u=jn.length;if(i){for(g(e).iso=!0,t=0,n=l;t<n;t++)if(An[t][1].exec(i[1])){o=An[t][0],a=An[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(jn[t][1].exec(i[3])){s=(i[2]||` `)+jn[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4]){if(kn.exec(i[4]))c=`Z`;else{e._isValid=!1;return}}e._f=o+(s||``)+(c||``),qn(e)}else e._isValid=!1}function In(e,t,n,r,i,a){var o=[Ln(e),dt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function Ln(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Rn(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function zn(e,t,n){return e&&Vt.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(g(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function Bn(e,t,n){if(e)return Pn[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Vn(e){var t=Nn.exec(Rn(e._i)),n;if(t){if(n=In(t[4],t[3],t[2],t[5],t[6],t[7]),!zn(t[1],n,e))return;e._a=n,e._tzm=Bn(t[8],t[9],t[10]),e._d=Et.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),g(e).rfc2822=!0}else e._isValid=!1}function Hn(e){var t=Mn.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Fn(e),e._isValid===!1)delete e._isValid;else return;if(Vn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:r.createFromInputFallback(e)}r.createFromInputFallback=E(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function Un(e,t,n){return e??t??n}function Wn(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Gn(e){var t,n,r=[],i,a,o;if(!e._d){for(i=Wn(e),e._w&&e._a[W]==null&&e._a[Ye]==null&&Kn(e),e._dayOfYear!=null&&(o=Un(e._a[U],i[U]),(e._dayOfYear>et(o)||e._dayOfYear===0)&&(g(e)._overflowDayOfYear=!0),n=Et(o,0,e._dayOfYear),e._a[Ye]=n.getUTCMonth(),e._a[W]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?+(t===2):e._a[t];e._a[G]===24&&e._a[K]===0&&e._a[Xe]===0&&e._a[Ze]===0&&(e._nextDay=!0,e._a[G]=0),e._d=(e._useUTC?Et:Tt).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[G]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(g(e).weekdayMismatch=!0)}}function Kn(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=Un(t.GG,e._a[U],kt(Y(),1,4).year),r=Un(t.W,1),i=Un(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=kt(Y(),a,o),n=Un(t.gg,e._a[U],l.year),r=Un(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>At(n,a,o)?g(e)._overflowWeeks=!0:c==null?(s=Ot(n,r,i,a,o),e._a[U]=s.year,e._dayOfYear=s.dayOfYear):g(e)._overflowWeekday=!0}r.ISO_8601=function(){},r.RFC_2822=function(){};function qn(e){if(e._f===r.ISO_8601){Fn(e);return}if(e._f===r.RFC_2822){Vn(e);return}e._a=[],g(e).empty=!0;var t=``+e._i,n,i,a,o,s,c=t.length,l=0,u,d;for(a=de(e._f,e._locale).match(ae)||[],d=a.length,n=0;n<d;n++)o=a[n],i=(t.match(He(o,e))||[])[0],i&&(s=t.substr(0,t.indexOf(i)),s.length>0&&g(e).unusedInput.push(s),t=t.slice(t.indexOf(i)+i.length),l+=i.length),M[o]?(i?g(e).empty=!1:g(e).unusedTokens.push(o),qe(o,i,e)):e._strict&&!i&&g(e).unusedTokens.push(o);g(e).charsLeftOver=c-l,t.length>0&&g(e).unusedInput.push(t),e._a[G]<=12&&g(e).bigHour===!0&&e._a[G]>0&&(g(e).bigHour=void 0),g(e).parsedDateParts=e._a.slice(0),g(e).meridiem=e._meridiem,e._a[G]=Jn(e._locale,e._a[G],e._meridiem),u=g(e).era,u!==null&&(e._a[U]=e._locale.erasConvertYear(u,e._a[U])),Gn(e),En(e)}function Jn(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function Yn(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){g(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=S({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],qn(t),v(t)&&(o=!0),a+=g(t).charsLeftOver,a+=g(t).unusedTokens.length*10,g(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));p(e,n||t)}function Xn(e){if(!e._d){var t=xe(e._i),n=t.day===void 0?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Gn(e)}}function Zn(e){var t=new C(En(Qn(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function Qn(e){var t=e._i,n=e._f;return e._locale=e._locale||wn(e._l),t===null||n===void 0&&t===``?y({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),w(t)?new C(En(t)):(d(t)?e._d=t:a(n)?Yn(e):n?qn(e):$n(e),v(e)||(e._d=null),e))}function $n(e){var t=e._i;l(t)?e._d=new Date(r.now()):d(t)?e._d=new Date(t.valueOf()):typeof t==`string`?Hn(e):a(t)?(e._a=f(t.slice(0),function(e){return parseInt(e,10)}),Gn(e)):o(t)?Xn(e):u(t)?e._d=new Date(t):r.createFromInputFallback(e)}function er(e,t,n,r,i){var s={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(o(e)&&c(e)||a(e)&&e.length===0)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Zn(s)}function Y(e,t,n,r){return er(e,t,n,r,!1)}var tr=E(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=Y.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()}),nr=E(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=Y.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()});function rr(e,t){var n,r;if(t.length===1&&a(t[0])&&(t=t[0]),!t.length)return Y();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function ir(){return rr(`isBefore`,[].slice.call(arguments,0))}function ar(){return rr(`isAfter`,[].slice.call(arguments,0))}var or=function(){return Date.now?Date.now():+new Date},sr=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function cr(e){var t,n=!1,r,i=sr.length;for(t in e)if(s(e,t)&&!(q.call(sr,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[sr[r]]){if(n)return!1;parseFloat(e[sr[r]])!==V(e[sr[r]])&&(n=!0)}return!0}function lr(){return this._isValid}function ur(){return X(NaN)}function dr(e){var t=xe(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=cr(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=wn(),this._bubble()}function fr(e){return e instanceof dr}function pr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function mr(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&V(e[o])!==V(t[o]))&&a++;return a+i}function hr(e,t){N(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+j(~~(e/60),2)+t+j(~~e%60,2)})}hr(`Z`,`:`),hr(`ZZ`,``),z(`Z`,Ie),z(`ZZ`,Ie),H([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=_r(Ie,e)});var gr=/([\+\-]|\d\d)/gi;function _r(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(gr)||[`-`,0,0],a=+(i[1]*60)+V(i[2]),a===0?0:i[0]===`+`?a:-a)}function vr(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(w(e)||d(e)?e.valueOf():Y(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Y(e).local()}function yr(e){return-Math.round(e._d.getTimezoneOffset())}r.updateOffset=function(){};function br(e,t,n){var i=this._offset||0,a;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=_r(Ie,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(a=yr(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,`m`),i!==e&&(!t||this._changeInProgress?Lr(this,X(e-i,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,r.updateOffset(this,!0),null)),this}return this._isUTC?i:yr(this)}function xr(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function Sr(e){return this.utcOffset(0,e)}function Cr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(yr(this),`m`)),this}function wr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=_r(Fe,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function Tr(e){return this.isValid()?(e=e?Y(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function Er(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dr(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e={},t;return S(e,this),e=Qn(e),e._a?(t=e._isUTC?m(e._a):Y(e._a),this._isDSTShifted=this.isValid()&&mr(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Or(){return this.isValid()?!this._isUTC:!1}function kr(){return this.isValid()?this._isUTC:!1}function Ar(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Mr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function X(e,t){var n=e,r=null,i,a,o;return fr(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:u(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=jr.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:V(r[W])*i,h:V(r[G])*i,m:V(r[K])*i,s:V(r[Xe])*i,ms:V(pr(r[Ze]*1e3))*i}):(r=Mr.exec(e))?(i=r[1]===`-`?-1:1,n={y:Nr(r[2],i),M:Nr(r[3],i),w:Nr(r[4],i),d:Nr(r[5],i),h:Nr(r[6],i),m:Nr(r[7],i),s:Nr(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=Fr(Y(n.from),Y(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new dr(n),fr(e)&&s(e,`_locale`)&&(a._locale=e._locale),fr(e)&&s(e,`_isValid`)&&(a._isValid=e._isValid),a}X.fn=dr.prototype,X.invalid=ur;function Nr(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function Pr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function Fr(e,t){var n;return e.isValid()&&t.isValid()?(t=vr(t,e),e.isBefore(t)?n=Pr(e,t):(n=Pr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ir(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(ee(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=X(n,r),Lr(this,i,e),this}}function Lr(e,t,n,i){var a=t._milliseconds,o=pr(t._days),s=pr(t._months);e.isValid()&&(i??=!0,s&&yt(e,it(e,`Month`)+s*n),o&&at(e,`Date`,it(e,`Date`)+o*n),a&&e._d.setTime(e._d.valueOf()+a*n),i&&r.updateOffset(e,o||s))}var Rr=Ir(1,`add`),zr=Ir(-1,`subtract`);function Br(e){return typeof e==`string`||e instanceof String}function Vr(e){return w(e)||d(e)||Br(e)||u(e)||Ur(e)||Hr(e)||e==null}function Hr(e){var t=o(e)&&!c(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,l=r.length;for(i=0;i<l;i+=1)a=r[i],n||=s(e,a);return t&&n}function Ur(e){var t=a(e),n=!1;return t&&(n=e.filter(function(t){return!u(t)&&Br(e)}).length===0),t&&n}function Wr(e){var t=o(e)&&!c(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=s(e,a);return t&&n}function Gr(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function Kr(e,t){arguments.length===1&&(arguments[0]?Vr(arguments[0])?(e=arguments[0],t=void 0):Wr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Y(),i=vr(n,this).startOf(`day`),a=r.calendarFormat(this,i)||`sameElse`,o=t&&(O(t[a])?t[a].call(this,n):t[a]);return this.format(o||this.localeData().calendar(a,this,Y(n)))}function qr(){return new C(this)}function Jr(e,t){var n=w(e)?e:Y(e);return this.isValid()&&n.isValid()?(t=I(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Yr(e,t){var n=w(e)?e:Y(e);return this.isValid()&&n.isValid()?(t=I(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Xr(e,t,n,r){var i=w(e)?e:Y(e),a=w(t)?t:Y(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function Zr(e,t){var n=w(e)?e:Y(e),r;return this.isValid()&&n.isValid()?(t=I(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function Qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function $r(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function ei(e,t,n){var r,i,a;if(!this.isValid()||(r=vr(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=I(t),t){case`year`:a=ti(this,r)/12;break;case`month`:a=ti(this,r);break;case`quarter`:a=ti(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:B(a)}function ti(e,t){if(e.date()<t.date())return-ti(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}r.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,r.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function ni(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function ri(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?ue(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,ue(n,`Z`)):ue(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function ii(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function ai(e){e||=this.isUtc()?r.defaultFormatUtc:r.defaultFormat;var t=ue(this,e);return this.localeData().postformat(t)}function oi(e,t){return this.isValid()&&(w(e)&&e.isValid()||Y(e).isValid())?X({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(Y(),e)}function ci(e,t){return this.isValid()&&(w(e)&&e.isValid()||Y(e).isValid())?X({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function li(e){return this.to(Y(),e)}function ui(e){var t;return e===void 0?this._locale._abbr:(t=wn(e),t!=null&&(this._locale=t),this)}var di=E(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function fi(){return this._locale}var pi=1e3,mi=60*pi,hi=60*mi,gi=3506328*hi;function _i(e,t){return(e%t+t)%t}function vi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-gi:new Date(e,t,n).valueOf()}function yi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-gi:Date.UTC(e,t,n)}function bi(e){var t,n;if(e=I(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?yi:vi,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=_i(t+(this._isUTC?0:this.utcOffset()*mi),hi);break;case`minute`:t=this._d.valueOf(),t-=_i(t,mi);break;case`second`:t=this._d.valueOf(),t-=_i(t,pi)}return this._d.setTime(t),r.updateOffset(this,!0),this}function xi(e){var t,n;if(e=I(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?yi:vi,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=hi-_i(t+(this._isUTC?0:this.utcOffset()*mi),hi)-1;break;case`minute`:t=this._d.valueOf(),t+=mi-_i(t,mi)-1;break;case`second`:t=this._d.valueOf(),t+=pi-_i(t,pi)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function Si(){return this._d.valueOf()-(this._offset||0)*6e4}function Ci(){return Math.floor(this.valueOf()/1e3)}function wi(){return new Date(this.valueOf())}function Ti(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ei(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Di(){return this.isValid()?this.toISOString():null}function Oi(){return v(this)}function ki(){return p({},g(this))}function Ai(){return g(this).overflow}function ji(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}N(`N`,0,0,`eraAbbr`),N(`NN`,0,0,`eraAbbr`),N(`NNN`,0,0,`eraAbbr`),N(`NNNN`,0,0,`eraName`),N(`NNNNN`,0,0,`eraNarrow`),N(`y`,[`y`,1],`yo`,`eraYear`),N(`y`,[`yy`,2],0,`eraYear`),N(`y`,[`yyy`,3],0,`eraYear`),N(`y`,[`yyyy`,4],0,`eraYear`),z(`N`,Hi),z(`NN`,Hi),z(`NNN`,Hi),z(`NNNN`,Ui),z(`NNNNN`,Wi),H([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?g(n).era=i:g(n).invalidEra=e}),z(`y`,Ne),z(`yy`,Ne),z(`yyy`,Ne),z(`yyyy`,Ne),z(`yo`,Gi),H([`y`,`yy`,`yyy`,`yyyy`],U),H([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[U]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)});function Mi(e,t){var n,i,a,o=this._eras||wn(`en`)._eras;for(n=0,i=o.length;n<i;++n)switch(typeof o[n].since==`string`&&(a=r(o[n].since).startOf(`day`),o[n].since=a.valueOf()),typeof o[n].until){case`undefined`:o[n].until=1/0;break;case`string`:a=r(o[n].until).startOf(`day`).valueOf(),o[n].until=a.valueOf()}return o}function Ni(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r]}else if([o,s,c].indexOf(e)>=0)return a[r]}function Pi(e,t){var n=e.since<=e.until?1:-1;return t===void 0?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Fi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function Ii(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function Li(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function Ri(){var e,t,n,i,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=a[e].since<=a[e].until?1:-1,i=this.clone().startOf(`day`).valueOf(),a[e].since<=i&&i<=a[e].until||a[e].until<=i&&i<=a[e].since)return(this.year()-r(a[e].since).year())*n+a[e].offset;return this.year()}function zi(e){return s(this,`_erasNameRegex`)||Ki.call(this),e?this._erasNameRegex:this._erasRegex}function Bi(e){return s(this,`_erasAbbrRegex`)||Ki.call(this),e?this._erasAbbrRegex:this._erasRegex}function Vi(e){return s(this,`_erasNarrowRegex`)||Ki.call(this),e?this._erasNarrowRegex:this._erasRegex}function Hi(e,t){return t.erasAbbrRegex(e)}function Ui(e,t){return t.erasNameRegex(e)}function Wi(e,t){return t.erasNarrowRegex(e)}function Gi(e,t){return t._eraYearOrdinalRegex||Ne}function Ki(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=We(l[i].name),s=We(l[i].abbr),c=We(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}N(0,[`gg`,2],0,function(){return this.weekYear()%100}),N(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function qi(e,t){N(0,[e,e.length],0,t)}qi(`gggg`,`weekYear`),qi(`ggggg`,`weekYear`),qi(`GGGG`,`isoWeekYear`),qi(`GGGGG`,`isoWeekYear`),z(`G`,Pe),z(`g`,Pe),z(`GG`,R,L),z(`gg`,R,L),z(`GGGG`,je,Ee),z(`gggg`,je,Ee),z(`GGGGG`,Me,De),z(`ggggg`,Me,De),Ke([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=V(e)}),Ke([`gg`,`GG`],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)});function Ji(e){return ea.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Yi(e){return ea.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Xi(){return At(this.year(),1,4)}function Zi(){return At(this.isoWeekYear(),1,4)}function Qi(){var e=this.localeData()._week;return At(this.year(),e.dow,e.doy)}function $i(){var e=this.localeData()._week;return At(this.weekYear(),e.dow,e.doy)}function ea(e,t,n,r,i){var a;return e==null?kt(this,r,i).year:(a=At(e,r,i),t>a&&(t=a),ta.call(this,e,t,n,r,i))}function ta(e,t,n,r,i){var a=Ot(e,t,n,r,i),o=Et(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}N(`Q`,0,`Qo`,`quarter`),z(`Q`,we),H(`Q`,function(e,t){t[Ye]=(V(e)-1)*3});function na(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}N(`D`,[`DD`,2],`Do`,`date`),z(`D`,R,ze),z(`DD`,R,L),z(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),H([`D`,`DD`],W),H(`Do`,function(e,t){t[W]=V(e.match(R)[0])});var ra=rt(`Date`,!0);N(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),z(`DDD`,Ae),z(`DDDD`,Te),H([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=V(e)});function ia(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}N(`m`,[`mm`,2],0,`minute`),z(`m`,R,Be),z(`mm`,R,L),H([`m`,`mm`],K);var aa=rt(`Minutes`,!1);N(`s`,[`ss`,2],0,`second`),z(`s`,R,Be),z(`ss`,R,L),H([`s`,`ss`],Xe);var oa=rt(`Seconds`,!1);N(`S`,0,0,function(){return~~(this.millisecond()/100)}),N(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),N(0,[`SSS`,3],0,`millisecond`),N(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),N(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),N(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),N(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),N(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),N(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),z(`S`,Ae,we),z(`SS`,Ae,L),z(`SSS`,Ae,Te);var sa,ca;for(sa=`SSSS`;sa.length<=9;sa+=`S`)z(sa,Ne);function la(e,t){t[Ze]=V((`0.`+e)*1e3)}for(sa=`S`;sa.length<=9;sa+=`S`)H(sa,la);ca=rt(`Milliseconds`,!1),N(`z`,0,0,`zoneAbbr`),N(`zz`,0,0,`zoneName`);function ua(){return this._isUTC?`UTC`:``}function da(){return this._isUTC?`Coordinated Universal Time`:``}var Z=C.prototype;Z.add=Rr,Z.calendar=Kr,Z.clone=qr,Z.diff=ei,Z.endOf=xi,Z.format=ai,Z.from=oi,Z.fromNow=si,Z.to=ci,Z.toNow=li,Z.get=ot,Z.invalidAt=Ai,Z.isAfter=Jr,Z.isBefore=Yr,Z.isBetween=Xr,Z.isSame=Zr,Z.isSameOrAfter=Qr,Z.isSameOrBefore=$r,Z.isValid=Oi,Z.lang=di,Z.locale=ui,Z.localeData=fi,Z.max=nr,Z.min=tr,Z.parsingFlags=ki,Z.set=st,Z.startOf=bi,Z.subtract=zr,Z.toArray=Ti,Z.toObject=Ei,Z.toDate=wi,Z.toISOString=ri,Z.inspect=ii,typeof Symbol<`u`&&Symbol.for!=null&&(Z[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),Z.toJSON=Di,Z.toString=ni,Z.unix=Ci,Z.valueOf=Si,Z.creationData=ji,Z.eraName=Fi,Z.eraNarrow=Ii,Z.eraAbbr=Li,Z.eraYear=Ri,Z.year=tt,Z.isLeapYear=nt,Z.weekYear=Ji,Z.isoWeekYear=Yi,Z.quarter=Z.quarters=na,Z.month=bt,Z.daysInMonth=xt,Z.week=Z.weeks=Ft,Z.isoWeek=Z.isoWeeks=It,Z.weeksInYear=Qi,Z.weeksInWeekYear=$i,Z.isoWeeksInYear=Xi,Z.isoWeeksInISOWeekYear=Zi,Z.date=ra,Z.day=Z.days=Zt,Z.weekday=Qt,Z.isoWeekday=$t,Z.dayOfYear=ia,Z.hour=Z.hours=dn,Z.minute=Z.minutes=aa,Z.second=Z.seconds=oa,Z.millisecond=Z.milliseconds=ca,Z.utcOffset=br,Z.utc=Sr,Z.local=Cr,Z.parseZone=wr,Z.hasAlignedHourOffset=Tr,Z.isDST=Er,Z.isLocal=Or,Z.isUtcOffset=kr,Z.isUtc=Ar,Z.isUTC=Ar,Z.zoneAbbr=ua,Z.zoneName=da,Z.dates=E(`dates accessor is deprecated. Use date instead.`,ra),Z.months=E(`months accessor is deprecated. Use month instead`,bt),Z.years=E(`years accessor is deprecated. Use year instead`,tt),Z.zone=E(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,xr),Z.isDSTShifted=E(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,Dr);function fa(e){return Y(e*1e3)}function pa(){return Y.apply(null,arguments).parseZone()}function ma(e){return e}var Q=A.prototype;Q.calendar=ie,Q.longDateFormat=pe,Q.invalidDate=he,Q.ordinal=ve,Q.preparse=ma,Q.postformat=ma,Q.relativeTime=be,Q.pastFuture=P,Q.set=te,Q.eras=Mi,Q.erasParse=Ni,Q.erasConvertYear=Pi,Q.erasAbbrRegex=Bi,Q.erasNameRegex=zi,Q.erasNarrowRegex=Vi,Q.months=ht,Q.monthsShort=gt,Q.monthsParse=vt,Q.monthsRegex=Ct,Q.monthsShortRegex=St,Q.week=jt,Q.firstDayOfYear=Pt,Q.firstDayOfWeek=Nt,Q.weekdays=Kt,Q.weekdaysMin=Jt,Q.weekdaysShort=qt,Q.weekdaysParse=Xt,Q.weekdaysRegex=en,Q.weekdaysShortRegex=tn,Q.weekdaysMinRegex=nn,Q.isPM=ln,Q.meridiem=fn;function ha(e,t,n,r){var i=wn(),a=m().set(r,t);return i[n](a,e)}function ga(e,t,n){if(u(e)&&(t=e,e=void 0),e||=``,t!=null)return ha(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=ha(e,r,n,`month`);return i}function _a(e,t,n,r){typeof e==`boolean`?(u(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,u(t)&&(n=t,t=void 0),t||=``);var i=wn(),a=e?i._week.dow:0,o,s=[];if(n!=null)return ha(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=ha(t,(o+a)%7,r,`day`);return s}function va(e,t){return ga(e,t,`months`)}function ya(e,t){return ga(e,t,`monthsShort`)}function ba(e,t,n){return _a(e,t,n,`weekdays`)}function xa(e,t,n){return _a(e,t,n,`weekdaysShort`)}function Sa(e,t,n){return _a(e,t,n,`weekdaysMin`)}xn(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(V(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),r.lang=E(`moment.lang is deprecated. Use moment.locale instead.`,xn),r.langData=E(`moment.langData is deprecated. Use moment.localeData instead.`,wn);var Ca=Math.abs;function wa(){var e=this._data;return this._milliseconds=Ca(this._milliseconds),this._days=Ca(this._days),this._months=Ca(this._months),e.milliseconds=Ca(e.milliseconds),e.seconds=Ca(e.seconds),e.minutes=Ca(e.minutes),e.hours=Ca(e.hours),e.months=Ca(e.months),e.years=Ca(e.years),this}function Ta(e,t,n,r){var i=X(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ea(e,t){return Ta(this,e,t,1)}function Da(e,t){return Ta(this,e,t,-1)}function Oa(e){return e<0?Math.floor(e):Math.ceil(e)}function ka(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Oa(ja(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=B(e/1e3),r.seconds=i%60,a=B(i/60),r.minutes=a%60,o=B(a/60),r.hours=o%24,t+=B(o/24),c=B(Aa(t)),n+=c,t-=Oa(ja(c)),s=B(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function Aa(e){return e*4800/146097}function ja(e){return e*146097/4800}function Ma(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=I(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+Aa(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(ja(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function Na(e){return function(){return this.as(e)}}var Pa=Na(`ms`),Fa=Na(`s`),Ia=Na(`m`),La=Na(`h`),Ra=Na(`d`),za=Na(`w`),Ba=Na(`M`),Va=Na(`Q`),Ha=Na(`y`),Ua=Pa;function Wa(){return X(this)}function Ga(e){return e=I(e),this.isValid()?this[e+`s`]():NaN}function Ka(e){return function(){return this.isValid()?this._data[e]:NaN}}var qa=Ka(`milliseconds`),Ja=Ka(`seconds`),Ya=Ka(`minutes`),Xa=Ka(`hours`),Za=Ka(`days`),Qa=Ka(`months`),$a=Ka(`years`);function eo(){return B(this.days()/7)}var to=Math.round,no={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ro(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function io(e,t,n,r){var i=X(e).abs(),a=to(i.as(`s`)),o=to(i.as(`m`)),s=to(i.as(`h`)),c=to(i.as(`d`)),l=to(i.as(`M`)),u=to(i.as(`w`)),d=to(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,ro.apply(null,f)}function ao(e){return e===void 0?to:typeof e==`function`&&(to=e,!0)}function oo(e,t){return no[e]===void 0?!1:t===void 0?no[e]:(no[e]=t,e===`s`&&(no.ss=t-1),!0)}function so(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=no,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},no,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=io(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var co=Math.abs;function lo(e){return(e>0)-(e<0)||+e}function uo(){if(!this.isValid())return this.localeData().invalidDate();var e=co(this._milliseconds)/1e3,t=co(this._days),n=co(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=B(e/60),i=B(r/60),e%=60,r%=60,a=B(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=lo(this._months)===lo(s)?``:`-`,u=lo(this._days)===lo(s)?``:`-`,d=lo(this._milliseconds)===lo(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var $=dr.prototype
|
|
12
|
+
//! moment.js
|
|
13
|
+
;return $.isValid=lr,$.abs=wa,$.add=Ea,$.subtract=Da,$.as=Ma,$.asMilliseconds=Pa,$.asSeconds=Fa,$.asMinutes=Ia,$.asHours=La,$.asDays=Ra,$.asWeeks=za,$.asMonths=Ba,$.asQuarters=Va,$.asYears=Ha,$.valueOf=Ua,$._bubble=ka,$.clone=Wa,$.get=Ga,$.milliseconds=qa,$.seconds=Ja,$.minutes=Ya,$.hours=Xa,$.days=Za,$.weeks=eo,$.months=Qa,$.years=$a,$.humanize=so,$.toISOString=uo,$.toString=uo,$.toJSON=uo,$.locale=ui,$.localeData=fi,$.toIsoString=E(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,uo),$.lang=di,N(`X`,0,0,`unix`),N(`x`,0,0,`valueOf`),z(`x`,Pe),z(`X`,Le),H(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),H(`x`,function(e,t,n){n._d=new Date(V(e))}),r.version=`2.30.1`,i(Y),r.fn=Z,r.min=ir,r.max=ar,r.now=or,r.utc=m,r.unix=fa,r.months=va,r.isDate=d,r.locale=xn,r.invalid=y,r.duration=X,r.isMoment=w,r.weekdays=ba,r.parseZone=pa,r.localeData=wn,r.isDuration=fr,r.monthsShort=ya,r.weekdaysMin=Sa,r.defineLocale=Sn,r.updateLocale=Cn,r.locales=Tn,r.weekdaysShort=xa,r.normalizeUnits=I,r.relativeTimeRounding=ao,r.relativeTimeThreshold=oo,r.calendarFormat=Gr,r.prototype=Z,r.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`},r}))})),St=r(((e,t)=>{let n=new Set(`ENOTFOUND.ENETUNREACH.UNABLE_TO_GET_ISSUER_CERT.UNABLE_TO_GET_CRL.UNABLE_TO_DECRYPT_CERT_SIGNATURE.UNABLE_TO_DECRYPT_CRL_SIGNATURE.UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY.CERT_SIGNATURE_FAILURE.CRL_SIGNATURE_FAILURE.CERT_NOT_YET_VALID.CERT_HAS_EXPIRED.CRL_NOT_YET_VALID.CRL_HAS_EXPIRED.ERROR_IN_CERT_NOT_BEFORE_FIELD.ERROR_IN_CERT_NOT_AFTER_FIELD.ERROR_IN_CRL_LAST_UPDATE_FIELD.ERROR_IN_CRL_NEXT_UPDATE_FIELD.OUT_OF_MEM.DEPTH_ZERO_SELF_SIGNED_CERT.SELF_SIGNED_CERT_IN_CHAIN.UNABLE_TO_GET_ISSUER_CERT_LOCALLY.UNABLE_TO_VERIFY_LEAF_SIGNATURE.CERT_CHAIN_TOO_LONG.CERT_REVOKED.INVALID_CA.PATH_LENGTH_EXCEEDED.INVALID_PURPOSE.CERT_UNTRUSTED.CERT_REJECTED.HOSTNAME_MISMATCH`.split(`.`));t.exports=e=>!n.has(e&&e.code)})),Ct=e(xt(),1),wt=e(St());const Tt=`axios-retry`;function Et(e){return e.response||!e.code||[`ERR_CANCELED`,`ECONNABORTED`].includes(e.code)?!1:(0,wt.default)(e)}const Dt=[`get`,`head`,`options`],Ot=Dt.concat([`put`,`delete`]);function kt(e){return e.code!==`ECONNABORTED`&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function At(e){return e.config?.method?kt(e)&&Dt.indexOf(e.config.method)!==-1:!1}function jt(e){return e.config?.method?kt(e)&&Ot.indexOf(e.config.method)!==-1:!1}function Mt(e){return Et(e)||jt(e)}function Nt(e=void 0){let t=e?.response?.headers[`retry-after`];if(!t)return 0;let n=(Number(t)||0)*1e3;return n===0&&(n=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,n)}function Pt(e=0,t=void 0){return Math.max(0,Nt(t))}function Ft(e=0,t=void 0,n=100){let r=2**e*n,i=Math.max(r,Nt(t));return i+i*.2*Math.random()}function It(e=100){return(t=0,n=void 0)=>{let r=t*e;return Math.max(r,Nt(n))}}const Lt={retries:3,retryCondition:Mt,retryDelay:Pt,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function Rt(e,t){return{...Lt,...t,...e[Tt]}}function zt(e,t,n=!1){let r=Rt(e,t||{});return r.retryCount=r.retryCount||0,(!r.lastRequestTime||n)&&(r.lastRequestTime=Date.now()),e[Tt]=r,r}function Bt(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function Vt(e,t){let{retries:n,retryCondition:r}=e,i=(e.retryCount||0)<n&&r(t);if(typeof i==`object`)try{return await i!==!1}catch{return!1}return i}async function Ht(e,t,n,r){t.retryCount+=1;let{retryDelay:i,shouldResetTimeout:a,onRetry:o}=t,s=i(t.retryCount,n);if(Bt(e,r),!a&&r.timeout&&t.lastRequestTime){let e=Date.now()-t.lastRequestTime,i=r.timeout-e-s;if(i<=0)return Promise.reject(n);r.timeout=i}return r.transformRequest=[e=>e],await o(t.retryCount,n,r),r.signal?.aborted?Promise.resolve(e(r)):new Promise(t=>{let n=()=>{clearTimeout(i),t(e(r))},i=setTimeout(()=>{t(e(r)),r.signal?.removeEventListener&&r.signal.removeEventListener(`abort`,n)},s);r.signal?.addEventListener&&r.signal.addEventListener(`abort`,n,{once:!0})})}async function Ut(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}const Wt=(e,t)=>({requestInterceptorId:e.interceptors.request.use(e=>(zt(e,t,!0),e[`axios-retry`]?.validateResponse&&(e.validateStatus=()=>!1),e)),responseInterceptorId:e.interceptors.response.use(null,async n=>{let{config:r}=n;if(!r)return Promise.reject(n);let i=zt(r,t);return n.response&&i.validateResponse?.(n.response)?n.response:await Vt(i,n)?Ht(e,i,n,r):(await Ut(i,n),Promise.reject(n))})});Wt.isNetworkError=Et,Wt.isSafeRequestError=At,Wt.isIdempotentRequestError=jt,Wt.isNetworkOrIdempotentRequestError=Mt,Wt.exponentialDelay=Ft,Wt.linearDelay=It,Wt.isRetryableError=kt;var Gt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n};Object.defineProperty(e,"__esModule",{value:!0}),e.req=e.json=e.toBuffer=void 0;let a=i(n(`http`)),o=i(n(`https`));async function s(e){let t=0,n=[];for await(let r of e)t+=r.length,n.push(r);return Buffer.concat(n,t)}e.toBuffer=s;async function c(e){let t=(await s(e)).toString(`utf8`);try{return JSON.parse(t)}catch(e){let n=e;throw n.message+=` (input: ${t})`,n}}e.json=c;function l(e,t={}){let n=((typeof e==`string`?e:e.href).startsWith(`https:`)?o:a).request(e,t),r=new Promise((e,t)=>{n.once(`response`,e).once(`error`,t).end()});return n.then=r.then.bind(r),n}e.req=l})),Kt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.Agent=void 0;let o=i(n(`net`)),s=i(n(`http`)),c=n(`https`);a(Gt(),e);let l=Symbol(`AgentBaseInternalState`);e.Agent=class extends s.Agent{constructor(e){super(e),this[l]={}}isSecureEndpoint(e){if(e){if(typeof e.secureEndpoint==`boolean`)return e.secureEndpoint;if(typeof e.protocol==`string`)return e.protocol===`https:`}let{stack:t}=Error();return typeof t==`string`&&t.split(`
|
|
14
|
+
`).some(e=>e.indexOf(`(https.js:`)!==-1||e.indexOf(`node:https:`)!==-1)}incrementSockets(e){if(this.maxSockets===1/0&&this.maxTotalSockets===1/0)return null;this.sockets[e]||(this.sockets[e]=[]);let t=new o.Socket({writable:!1});return this.sockets[e].push(t),this.totalSocketCount++,t}decrementSockets(e,t){if(!this.sockets[e]||t===null)return;let n=this.sockets[e],r=n.indexOf(t);r!==-1&&(n.splice(r,1),this.totalSocketCount--,n.length===0&&delete this.sockets[e])}getName(e){return this.isSecureEndpoint(e)?c.Agent.prototype.getName.call(this,e):super.getName(e)}createSocket(e,t,n){let r={...t,secureEndpoint:this.isSecureEndpoint(t)},i=this.getName(r),a=this.incrementSockets(i);Promise.resolve().then(()=>this.connect(e,r)).then(o=>{if(this.decrementSockets(i,a),o instanceof s.Agent)try{return o.addRequest(e,r)}catch(e){return n(e)}this[l].currentSocket=o,super.createSocket(e,t,n)},e=>{this.decrementSockets(i,a),n(e)})}createConnection(){let e=this[l].currentSocket;if(this[l].currentSocket=void 0,!e)throw Error("No socket was returned in the `connect()` function");return e}get defaultPort(){return this[l].defaultPort??(this.protocol===`https:`?443:80)}set defaultPort(e){this[l]&&(this[l].defaultPort=e)}get protocol(){return this[l].protocol??(this.isSecureEndpoint()?`https:`:`http:`)}set protocol(e){this[l]&&(this[l].protocol=e)}}})),qt=r((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.parseProxyResponse=void 0;let n=(0,t(j()).default)(`https-proxy-agent:parse-proxy-response`);function r(e){return new Promise((t,r)=>{let i=0,a=[];function o(){let t=e.read();t?u(t):e.once(`readable`,o)}function s(){e.removeListener(`end`,c),e.removeListener(`error`,l),e.removeListener(`readable`,o)}function c(){s(),n(`onend`),r(Error(`Proxy connection ended before receiving CONNECT response`))}function l(e){s(),n(`onerror %o`,e),r(e)}function u(c){a.push(c),i+=c.length;let l=Buffer.concat(a,i),u=l.indexOf(`\r
|
|
15
|
+
\r
|
|
16
|
+
`);if(u===-1){n(`have not received end of HTTP headers yet...`),o();return}let d=l.slice(0,u).toString(`ascii`).split(`\r
|
|
17
|
+
`),f=d.shift();if(!f)return e.destroy(),r(Error(`No header received from proxy CONNECT response`));let p=f.split(` `),m=+p[1],h=p.slice(2).join(` `),g={};for(let t of d){if(!t)continue;let n=t.indexOf(`:`);if(n===-1)return e.destroy(),r(Error(`Invalid header from proxy CONNECT response: "${t}"`));let i=t.slice(0,n).toLowerCase(),a=t.slice(n+1).trimStart(),o=g[i];typeof o==`string`?g[i]=[o,a]:Array.isArray(o)?o.push(a):g[i]=a}n(`got proxy server response: %o %o`,f,g),s(),t({connect:{statusCode:m,statusText:h,headers:g},buffered:l})}e.on(`error`,l),e.on(`end`,c),o()})}e.parseProxyResponse=r})),Jt=r((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var n={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(n,e,i);return r(n,e),n},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.HttpsProxyAgent=void 0;let o=i(n(`net`)),s=i(n(`tls`)),c=a(n(`assert`)),l=a(j()),u=Kt(),d=n(`url`),f=qt(),p=(0,l.default)(`https-proxy-agent`),m=e=>e.servername===void 0&&e.host&&!o.isIP(e.host)?{...e,servername:e.host}:e;var h=class extends u.Agent{constructor(e,t){super(t),this.options={path:void 0},this.proxy=typeof e==`string`?new d.URL(e):e,this.proxyHeaders=t?.headers??{},p(`Creating new HttpsProxyAgent instance: %o`,this.proxy.href);let n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,``),r=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol===`https:`?443:80;this.connectOpts={ALPNProtocols:[`http/1.1`],...t?_(t,`headers`):null,host:n,port:r}}async connect(e,t){let{proxy:n}=this;if(!t.host)throw TypeError(`No "host" provided`);let r;n.protocol===`https:`?(p("Creating `tls.Socket`: %o",this.connectOpts),r=s.connect(m(this.connectOpts))):(p("Creating `net.Socket`: %o",this.connectOpts),r=o.connect(this.connectOpts));let i=typeof this.proxyHeaders==`function`?this.proxyHeaders():{...this.proxyHeaders},a=o.isIPv6(t.host)?`[${t.host}]`:t.host,l=`CONNECT ${a}:${t.port} HTTP/1.1\r\n`;if(n.username||n.password){let e=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;i[`Proxy-Authorization`]=`Basic ${Buffer.from(e).toString(`base64`)}`}i.Host=`${a}:${t.port}`,i[`Proxy-Connection`]||=this.keepAlive?`Keep-Alive`:`close`;for(let e of Object.keys(i))l+=`${e}: ${i[e]}\r\n`;let u=(0,f.parseProxyResponse)(r);r.write(`${l}\r\n`);let{connect:d,buffered:h}=await u;if(e.emit(`proxyConnect`,d),this.emit(`proxyConnect`,d,e),d.statusCode===200)return e.once(`socket`,g),t.secureEndpoint?(p(`Upgrading socket connection to TLS`),s.connect({..._(m(t),`host`,`path`,`port`),socket:r})):r;r.destroy();let v=new o.Socket({writable:!1});return v.readable=!0,e.once(`socket`,e=>{p(`Replaying proxy buffer for failed request`),(0,c.default)(e.listenerCount(`data`)>0),e.push(h),e.push(null)}),v}};h.protocols=[`http`,`https`],e.HttpsProxyAgent=h;function g(e){e.resume()}function _(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}}))();const{HTTPS_PROXY:Yt}=_(),Xt=e=>{if(Yt)return console.debug({message:`Using proxy agent for ${e.callee} requests`,value:Yt}),new Jt.HttpsProxyAgent(Yt,e)};async function Zt(e,t={}){let{callee:n,headers:r,method:i=`get`,params:a={},rejectUnauthorized:o,...s}=t,c=Xt({rejectUnauthorized:o,callee:n}),l=ie.create();Wt(l,t);try{let t=await l({url:e,method:i,params:a,headers:{...r,"Content-Type":`application/json`},httpsAgent:c,...s});return console.info({message:`Successfully retrieved data from ${n}`,url:e,method:i.toUpperCase(),status:t.status}),t.data}catch(r){let a=r,o=a.response?.status,s=a.response?.data;throw console.error({...t,message:`Fail to retrieved data from ${n}`,url:e,method:i.toUpperCase(),status:o,response:s}),Error(`HTTP error! status: ${o}`)}}async function Qt(e,t,n={}){let{DIRECTUS_URL:r,DIRECTUS_FLOW_ID:i,DIRECTUS_ACCESS_TOKEN:a}=_(),o=`${r}/flows/trigger/${i}`,s={method:`post`,callee:`DIRECTUS`,headers:{Authorization:`Bearer ${a}`,"Content-Type":`application/json`},data:{projectId:e,versions:t},retries:3,retryDelay:Wt.exponentialDelay,...n};return s.data&&s.headers?.[`Content-Type`]===`application/json`&&(s.data=JSON.stringify(s.data)),Zt(o,s)}var $t=e(ce(),1);async function en(e,t={}){let{JIRA_API:n,JIRA_TOKEN:r,JIRA_EMAIL:i}=_(),a=`${n}${e}`,o=Buffer.from(`${i}:${r}`).toString(`base64`);return Zt(a,{...t,callee:`JIRA`,headers:{...t.headers,Authorization:`Basic ${o}`},retries:3,retryDelay:Wt.exponentialDelay})}async function tn(e){let t=await en(`/rest/api/3/project/${e}/versions?expand`);return!t||!Array.isArray(t)?[]:t}async function nn(e){let t=`/rest/api/3/version/${e.id}`;try{await en(t,{method:`put`,headers:{"Content-Type":`application/json`,Accept:`application/json`},data:{id:e.id,description:e.description,name:e.name,archived:e.archived,released:e.released,projectId:e.projectId,releaseDate:e.releaseDate}})}catch(t){console.log(`Error while updating jira release ${e.id}`,t)}}async function rn(e,t,n){let r=(await tn(e)).filter(e=>{e.version=e.name.replace(t+`-`,``).replace(`version-`,``).replace(`v`,``);try{return $t.default.lte(e.version,n)}catch{return!1}}).sort((e,t)=>$t.default.rcompare(e.version,t.version)),[i,...a]=await Promise.all(r);return[i,...a.filter(e=>!e?.released)].filter(Boolean).reverse()}var an=class{mapContext(e,t){return{...t,projectId:e.projectId,update:e.update,component:e.component,tag:e.tag?.replace(/^version-/,``).replace(/^v/,``)}}getTasks(e){return e.tag?[{title:`List all releases under ${e.tag} for ${e.component} component and ${e.projectId} project`,task:async()=>{e.releases=(await rn(e.projectId??``,e.component??``,e.tag??``)).filter(Boolean).filter(e=>e.released===!1)}},{title:`Update ${e.tag} on ${e.component} component`,skip:()=>!e.update||(e.releases?.length??0)===0,task:async()=>{for(let t of e.releases??[])t.released=!0,t.releaseDate=(0,Ct.default)().format(`YYYY-MM-DD`),await nn(t)}},{title:`Trigger CMS API Workflow`,skip:()=>!_().CAN_TRIGGER_WORKFLOW||(e.releases?.length??0)===0,task:()=>Qt(e.projectId??``,(e.releases??[]).map(({version:e})=>e))}]:(console.log(F.default.red(I.default.cross),`Missing tag version. Skipping release notes generation`),[])}};function on(e){let{logger:t,config:{SCM_TOKEN:n,REPOSITORY_URL:r,ORIGIN:a}}=e;if(n){let e=(r||``).replace(`https://`,``);t.info(`Configure remote repository ${e}`),i.remote(`remove`,a).sync(),i.remote(`add`,a,`https://${n}@${e}`).sync()}}async function sn(e){let{logger:t,branch:n,config:{PRODUCTION_BRANCH:r,ORIGIN:a}}=e;t.info(`Branch ${n.name} is candidate to MEP`),i.reset(`--hard`),i.clean(`-f`,`-d`).sync(),t.info(`Checkout production branch`),i.config(`--replace-all`,`remote.origin.fetch`,`+refs/heads/*:refs/remotes/origin/*`),i.fetch().sync(),i.fetch(`--tags`).sync(),i.checkout(`-qf`,r).sync(),t.info(`Current branch: ${r}`);let o=i.getLastCommitMsg();t.info(`Last commit message on production`,o),t.info(`Merge ${n.name} into ${r} branch`),i.merge(`--no-ff`,`-m`,`${n.name}`,n.name),t.info(`${n.name} merged into ${r} branch`),on(e),t.info(`Push ${r} branch`),await i.push(a,r),t.info(`${r} branch pushed`),t.info(`Remove ${a}/${n.name} branch`),await i.push(a,`:`+n.name),t.info(`${a}/${n.name} branch correctly removed`)}function cn(e){let{BRANCH_NAME:t,PRODUCTION_BRANCH:n}=e.config;return{title:`Merge ${t} into ${n}`,task:async()=>{await sn(e)}}}var ln=class{constructor(){this.lastCommitMessage=``}getTasks(e){let{RELEASE_CANDIDATE_TAG:t}=e;return this.lastCommitMessage=i.getLastCommitMsg(),this.lastCommitMessage.includes(t)?[cn(e)]:[]}success(e){let{RELEASE_CANDIDATE_TAG:t}=e;this.lastCommitMessage.includes(t)?e.logger.info(F.default.green(I.default.tick),`Branch`,F.default.green(e.BRANCH_NAME),`merged into ${e.PRODUCTION_BRANCH}`):(e.logger.info(F.default.green(I.default.tick),`Merge branch`,F.default.green(e.BRANCH_NAME),`into ${e.PRODUCTION_BRANCH} not required`),e.logger.info(F.default.green(I.default.tick),`Last commit message:`,F.default.green(this.lastCommitMessage),`does not contain ${t}`))}},un=r((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),dn=r((e=>{let{InvalidArgumentError:t}=un();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&this._name.slice(-3)===`...`&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._concatValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),fn=r((e=>{let{humanReadableArgName:t}=dn();e.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,t.subcommandTerm(n).length),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,t.optionTerm(n).length),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,t.optionTerm(n).length),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,t.argumentTerm(n).length),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];return e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(`, `)})`:e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth||80;function i(e,i){if(i){let a=`${e.padEnd(n+2)}${i}`;return t.wrap(a,r-2,n+2)}return e}function a(e){return e.join(`
|
|
18
|
+
`).replace(/^/gm,` `.repeat(2))}let o=[`Usage: ${t.commandUsage(e)}`,``],s=t.commandDescription(e);s.length>0&&(o=o.concat([t.wrap(s,r,0),``]));let c=t.visibleArguments(e).map(e=>i(t.argumentTerm(e),t.argumentDescription(e)));c.length>0&&(o=o.concat([`Arguments:`,a(c),``]));let l=t.visibleOptions(e).map(e=>i(t.optionTerm(e),t.optionDescription(e)));if(l.length>0&&(o=o.concat([`Options:`,a(l),``])),this.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.optionTerm(e),t.optionDescription(e)));n.length>0&&(o=o.concat([`Global Options:`,a(n),``]))}let u=t.visibleCommands(e).map(e=>i(t.subcommandTerm(e),t.subcommandDescription(e)));return u.length>0&&(o=o.concat([`Commands:`,a(u),``])),o.join(`
|
|
19
|
+
`)}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,r=40){let i=RegExp(`[\\n][ \\f\\t\\v\xA0 - ]+`);if(e.match(i))return e;let a=t-n;if(a<r)return e;let o=e.slice(0,n),s=e.slice(n).replace(`\r
|
|
20
|
+
`,`
|
|
21
|
+
`),c=` `.repeat(n),l=`\\s`,u=RegExp(`\n|.{1,${a-1}}([${l}]|$)|[^${l}]+?([${l}]|$)`,`g`);return o+(s.match(u)||[]).map((e,t)=>e===`
|
|
22
|
+
`?``:(t>0?c:``)+e.trimEnd()).join(`
|
|
23
|
+
`)}}})),pn=r((e=>{let{InvalidArgumentError:t}=un();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:t.concat(e)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._concatValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return i(this.name().replace(/^no-/,``))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r!==void 0&&r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=e.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(t=r.shift()),n=r.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0),{shortFlag:t,longFlag:n}}e.Option=n,e.DualOptions=r})),J=r((e=>{function t(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);let n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let i=1;i<=e.length;i++){let a=1;a=e[i-1]===t[r-1]?0:1,n[i][r]=Math.min(n[i-1][r]+1,n[i][r-1]+1,n[i-1][r-1]+a),i>1&&r>1&&e[i-1]===t[r-2]&&e[i-2]===t[r-1]&&(n[i][r]=Math.min(n[i][r],n[i-2][r-2]+1))}return n[e.length][t.length]}function n(e,n){if(!n||n.length===0)return``;n=Array.from(new Set(n));let r=e.startsWith(`--`);r&&(e=e.slice(2),n=n.map(e=>e.slice(2)));let i=[],a=3;return n.forEach(n=>{if(n.length<=1)return;let r=t(e,n),o=Math.max(e.length,n.length);(o-r)/o>.4&&(r<a?(a=r,i=[n]):r===a&&i.push(n))}),i.sort((e,t)=>e.localeCompare(t)),r&&(i=i.map(e=>`--${e}`)),i.length>1?`\n(Did you mean one of ${i.join(`, `)}?)`:i.length===1?`\n(Did you mean ${i[0]}?)`:``}e.suggestSimilar=n})),mn=r((e=>{let t=n(`node:events`).EventEmitter,r=n(`node:child_process`),i=n(`node:path`),a=n(`node:fs`),o=n(`node:process`),{Argument:s,humanReadableArgName:c}=dn(),{CommanderError:l}=un(),{Help:u}=fn(),{Option:d,DualOptions:f}=pn(),{suggestSimilar:p}=J();var m=class e extends t{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||``,this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description=``,this._summary=``,this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>o.stdout.write(e),writeErr:e=>o.stderr.write(e),getOutHelpWidth:()=>o.stdout.isTTY?o.stdout.columns:void 0,getErrHelpWidth:()=>o.stderr.isTTY?o.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._helpOption=e._helpOption,this._helpCommand=e._helpCommand,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}_getCommandAndAncestors(){let e=[];for(let t=this;t;t=t.parent)e.push(t);return e}command(e,t,n){let r=t,i=n;typeof r==`object`&&r&&(i=r,r=null),i||={};let[,a,o]=e.match(/([^ ]+) *(.*)/),s=this.createCommand(a);return r&&(s.description(r),s._executableHandler=!0),i.isDefault&&(this._defaultCommandName=s._name),s._hidden=!!(i.noHelp||i.hidden),s._executableFile=i.executableFile||null,o&&s.arguments(o),this._registerCommand(s),s.parent=this,s.copyInheritedSettings(this),r?this:s}createCommand(t){return new e(t)}createHelp(){return Object.assign(new u,this.configureHelp())}configureHelp(e){return e===void 0?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return e===void 0?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return typeof e!=`string`&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw Error(`Command passed to .addCommand() must have a name
|
|
24
|
+
- specify the name in Command constructor or using .name()`);return t||={},t.isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this._registerCommand(e),e.parent=this,e._checkForBrokenPassThrough(),this}createArgument(e,t){return new s(e,t)}argument(e,t,n,r){let i=this.createArgument(e,t);return typeof n==`function`?i.default(r).argParser(n):i.default(n),this.addArgument(i),this}arguments(e){return e.trim().split(/ +/).forEach(e=>{this.argument(e)}),this}addArgument(e){let t=this.registeredArguments.slice(-1)[0];if(t&&t.variadic)throw Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&e.defaultValue!==void 0&&e.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${e.name()}'`);return this.registeredArguments.push(e),this}helpCommand(e,t){if(typeof e==`boolean`)return this._addImplicitHelpCommand=e,this;e??=`help [command]`;let[,n,r]=e.match(/([^ ]+) *(.*)/),i=t??`display help for command`,a=this.createCommand(n);return a.helpOption(!1),r&&a.arguments(r),i&&a.description(i),this._addImplicitHelpCommand=!0,this._helpCommand=a,this}addHelpCommand(e,t){return typeof e==`object`?(this._addImplicitHelpCommand=!0,this._helpCommand=e,this):(this.helpCommand(e,t),this)}_getHelpCommand(){return this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand(`help`))?(this._helpCommand===void 0&&this.helpCommand(void 0,void 0),this._helpCommand):null}hook(e,t){let n=[`preSubcommand`,`preAction`,`postAction`];if(!n.includes(e))throw Error(`Unexpected value for event passed to hook : '${e}'.
|
|
25
|
+
Expecting one of '${n.join(`', '`)}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if(e.code!==`commander.executeSubCommandAsync`)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new l(e,t,n)),o.exit(e)}action(e){let t=t=>{let n=this.registeredArguments.length,r=t.slice(0,n);return r[n]=this._storeOptionsAsProperties?this:this.opts(),r.push(this),e.apply(this,r)};return this._actionHandler=t,this}createOption(e,t){return new d(e,t)}_callParseArg(e,t,n,r){try{return e.parseArg(t,n)}catch(e){if(e.code===`commander.invalidArgument`){let t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}}_registerOption(e){let t=e.short&&this._findOption(e.short)||e.long&&this._findOption(e.long);if(t){let n=e.long&&this._findOption(e.long)?e.long:e.short;throw Error(`Cannot add option '${e.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${n}'
|
|
26
|
+
- already used by option '${t.flags}'`)}this.options.push(e)}_registerCommand(e){let t=e=>[e.name()].concat(e.aliases()),n=t(e).find(e=>this._findCommand(e));if(n){let r=t(this._findCommand(n)).join(`|`),i=t(e).join(`|`);throw Error(`cannot add command '${i}' as already have command '${r}'`)}this.commands.push(e)}addOption(e){this._registerOption(e);let t=e.name(),n=e.attributeName();if(e.negate){let t=e.long.replace(/^--no-/,`--`);this._findOption(t)||this.setOptionValueWithSource(n,e.defaultValue===void 0||e.defaultValue,`default`)}else e.defaultValue!==void 0&&this.setOptionValueWithSource(n,e.defaultValue,`default`);let r=(t,r,i)=>{t==null&&e.presetArg!==void 0&&(t=e.presetArg);let a=this.getOptionValue(n);t!==null&&e.parseArg?t=this._callParseArg(e,t,a,r):t!==null&&e.variadic&&(t=e._concatValue(t,a)),t??=e.negate?!1:e.isBoolean()||e.optional?!0:``,this.setOptionValueWithSource(n,t,i)};return this.on(`option:`+t,t=>{let n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,`cli`)}),e.envVar&&this.on(`optionEnv:`+t,t=>{let n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,`env`)}),this}_optionEx(e,t,n,r,i){if(typeof t==`object`&&t instanceof d)throw Error(`To add an Option object use addOption() instead of option() or requiredOption()`);let a=this.createOption(t,n);if(a.makeOptionMandatory(!!e.mandatory),typeof r==`function`)a.default(i).argParser(r);else if(r instanceof RegExp){let e=r;r=(t,n)=>{let r=e.exec(t);return r?r[0]:n},a.default(i).argParser(r)}else a.default(r);return this.addOption(a)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){return this._passThroughOptions=!!e,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(e=!0){if(this.options.length)throw Error(`call .storeOptionsAsProperties() before adding options`);if(Object.keys(this._optionValues).length)throw Error(`call .storeOptionsAsProperties() before setting option values`);return this._storeOptionsAsProperties=!!e,this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this.setOptionValueWithSource(e,t,void 0)}setOptionValueWithSource(e,t,n){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}getOptionValueSourceWithGlobals(e){let t;return this._getCommandAndAncestors().forEach(n=>{n.getOptionValueSource(e)!==void 0&&(t=n.getOptionValueSource(e))}),t}_prepareUserArgs(e,t){if(e!==void 0&&!Array.isArray(e))throw Error(`first parameter to parse must be array or undefined`);if(t||={},e===void 0&&t.from===void 0){o.versions?.electron&&(t.from=`electron`);let e=o.execArgv??[];(e.includes(`-e`)||e.includes(`--eval`)||e.includes(`-p`)||e.includes(`--print`))&&(t.from=`eval`)}e===void 0&&(e=o.argv),this.rawArgs=e.slice();let n;switch(t.from){case void 0:case`node`:this._scriptPath=e[1],n=e.slice(2);break;case`electron`:o.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case`user`:n=e.slice(0);break;case`eval`:n=e.slice(1);break;default:throw Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||`program`,n}parse(e,t){let n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){let n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1,s=[`.js`,`.ts`,`.tsx`,`.mjs`,`.cjs`];function c(e,t){let n=i.resolve(e,t);if(a.existsSync(n))return n;if(s.includes(i.extname(t)))return;let r=s.find(e=>a.existsSync(`${n}${e}`));if(r)return`${n}${r}`}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let u=e._executableFile||`${this._name}-${e._name}`,d=this._executableDir||``;if(this._scriptPath){let e;try{e=a.realpathSync(this._scriptPath)}catch{e=this._scriptPath}d=i.resolve(i.dirname(e),d)}if(d){let t=c(d,u);if(!t&&!e._executableFile&&this._scriptPath){let n=i.basename(this._scriptPath,i.extname(this._scriptPath));n!==this._name&&(t=c(d,`${n}-${e._name}`))}u=t||u}n=s.includes(i.extname(u));let f;o.platform===`win32`?(t.unshift(u),t=h(o.execArgv).concat(t),f=r.spawn(o.execPath,t,{stdio:`inherit`})):n?(t.unshift(u),t=h(o.execArgv).concat(t),f=r.spawn(o.argv[0],t,{stdio:`inherit`})):f=r.spawn(u,t,{stdio:`inherit`}),f.killed||[`SIGUSR1`,`SIGUSR2`,`SIGTERM`,`SIGINT`,`SIGHUP`].forEach(e=>{o.on(e,()=>{f.killed===!1&&f.exitCode===null&&f.kill(e)})});let p=this._exitCallback;f.on(`close`,e=>{e??=1,p?p(new l(e,`commander.executeSubCommandAsync`,`(close)`)):o.exit(e)}),f.on(`error`,t=>{if(t.code===`ENOENT`){let t=d?`searched for local subcommand relative to directory '${d}'`:`no directory for search for local subcommand, use .executableDir() to supply a custom directory`,n=`'${u}' does not exist
|
|
27
|
+
- if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
28
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
29
|
+
- ${t}`;throw Error(n)}if(t.code===`EACCES`)throw Error(`'${u}' not executable`);if(!p)o.exit(1);else{let e=new l(1,`commander.executeSubCommandAsync`,`(error)`);e.nestedError=t,p(e)}}),this.runningCommand=f}_dispatchSubcommand(e,t,n){let r=this._findCommand(e);r||this.help({error:!0});let i;return i=this._chainOrCallSubCommandHook(i,r,`preSubcommand`),i=this._chainOrCall(i,()=>{if(r._executableHandler)this._executeSubCommand(r,t.concat(n));else return r._parseCommand(t,n)}),i}_dispatchHelpCommand(e){e||this.help();let t=this._findCommand(e);return t&&!t._executableHandler&&t.help(),this._dispatchSubcommand(e,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??`--help`])}_checkNumberOfArguments(){this.registeredArguments.forEach((e,t)=>{e.required&&this.args[t]==null&&this.missingArgument(e.name())}),!(this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)&&this.args.length>this.registeredArguments.length&&this._excessArguments(this.args)}_processArguments(){let e=(e,t,n)=>{let r=t;if(t!==null&&e.parseArg){let i=`error: command-argument value '${t}' is invalid for argument '${e.name()}'.`;r=this._callParseArg(e,t,n,i)}return r};this._checkNumberOfArguments();let t=[];this.registeredArguments.forEach((n,r)=>{let i=n.defaultValue;n.variadic?r<this.args.length?(i=this.args.slice(r),n.parseArg&&(i=i.reduce((t,r)=>e(n,r,t),n.defaultValue))):i===void 0&&(i=[]):r<this.args.length&&(i=this.args[r],n.parseArg&&(i=e(n,i,n.defaultValue))),t[r]=i}),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&typeof e.then==`function`?e.then(()=>t()):t()}_chainOrCallHooks(e,t){let n=e,r=[];return this._getCommandAndAncestors().reverse().filter(e=>e._lifeCycleHooks[t]!==void 0).forEach(e=>{e._lifeCycleHooks[t].forEach(t=>{r.push({hookedCommand:e,callback:t})})}),t===`postAction`&&r.reverse(),r.forEach(e=>{n=this._chainOrCall(n,()=>e.callback(e.hookedCommand,this))}),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return this._lifeCycleHooks[n]!==void 0&&this._lifeCycleHooks[n].forEach(e=>{r=this._chainOrCall(r,()=>e(this,t))}),r}_parseCommand(e,t){let n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._getHelpCommand()&&e[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(e[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(t),this._dispatchSubcommand(this._defaultCommandName,e,t);this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName&&this.help({error:!0}),this._outputHelpIfRequested(n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},i=`command:${this.name()}`;if(this._actionHandler){r(),this._processArguments();let n;return n=this._chainOrCallHooks(n,`preAction`),n=this._chainOrCall(n,()=>this._actionHandler(this.processedArgs)),this.parent&&(n=this._chainOrCall(n,()=>{this.parent.emit(i,e,t)})),n=this._chainOrCallHooks(n,`postAction`),n}if(this.parent&&this.parent.listenerCount(i))r(),this._processArguments(),this.parent.emit(i,e,t);else if(e.length){if(this._findCommand(`*`))return this._dispatchSubcommand(`*`,e,t);this.listenerCount(`command:*`)?this.emit(`command:*`,e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find(t=>t._name===e||t._aliases.includes(e))}_findOption(e){return this.options.find(t=>t.is(e))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach(e=>{e.options.forEach(t=>{t.mandatory&&e.getOptionValue(t.attributeName())===void 0&&e.missingMandatoryOptionValue(t)})})}_checkForConflictingLocalOptions(){let e=this.options.filter(e=>{let t=e.attributeName();return this.getOptionValue(t)!==void 0&&this.getOptionValueSource(t)!=="default"});e.filter(e=>e.conflictsWith.length>0).forEach(t=>{let n=e.find(e=>t.conflictsWith.includes(e.attributeName()));n&&this._conflictingOption(t,n)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach(e=>{e._checkForConflictingLocalOptions()})}parseOptions(e){let t=[],n=[],r=t,i=e.slice();function a(e){return e.length>1&&e[0]===`-`}let o=null;for(;i.length;){let e=i.shift();if(e===`--`){r===n&&r.push(e),r.push(...i);break}if(o&&!a(e)){this.emit(`option:${o.name()}`,e);continue}if(o=null,a(e)){let t=this._findOption(e);if(t){if(t.required){let e=i.shift();e===void 0&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;i.length>0&&!a(i[0])&&(e=i.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);o=t.variadic?t:null;continue}}if(e.length>2&&e[0]===`-`&&e[1]!==`-`){let t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),i.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){let t=e.indexOf(`=`),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(a(e)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&t.length===0&&n.length===0){if(this._findCommand(e)){t.push(e),i.length>0&&n.push(...i);break}if(this._getHelpCommand()&&e===this._getHelpCommand().name()){t.push(e),i.length>0&&t.push(...i);break}if(this._defaultCommandName){n.push(e),i.length>0&&n.push(...i);break}}if(this._passThroughOptions){r.push(e),i.length>0&&r.push(...i);break}r.push(e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){let e={},t=this.options.length;for(let n=0;n<t;n++){let t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((e,t)=>Object.assign(e,t.opts()),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==`string`?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr(`
|
|
30
|
+
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,i=n.code||`commander.error`;this._exit(r,i,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in o.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||[`default`,`config`,`env`].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,o.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new f(this.options),t=e=>this.getOptionValue(e)!==void 0&&![`default`,`implied`].includes(this.getOptionValueSource(e));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(e=>{Object.keys(e.implied).filter(e=>!t(e)).forEach(t=>{this.setOptionValueWithSource(t,e.implied[t],`implied`)})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:`commander.missingArgument`})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:`commander.optionMissingArgument`})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:`commander.missingMandatoryOptionValue`})}_conflictingOption(e,t){let n=e=>{let t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find(e=>e.negate&&t===e.attributeName()),i=this.options.find(e=>!e.negate&&t===e.attributeName());return r&&(r.presetArg===void 0&&n===!1||r.presetArg!==void 0&&n===r.presetArg)?r:i||e},r=e=>{let t=n(e),r=t.attributeName();return this.getOptionValueSource(r)===`env`?`environment variable '${t.envVar}'`:`option '${t.flags}'`},i=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(i,{code:`commander.conflictingOption`})}unknownOption(e){if(this._allowUnknownOption)return;let t=``;if(e.startsWith(`--`)&&this._showSuggestionAfterError){let n=[],r=this;do{let e=r.createHelp().visibleOptions(r).filter(e=>e.long).map(e=>e.long);n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=p(e,n)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:`commander.unknownOption`})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?``:`s`,r=`error: too many arguments${this.parent?` for '${this.name()}'`:``}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:`commander.excessArguments`})}unknownCommand(){let e=this.args[0],t=``;if(this._showSuggestionAfterError){let n=[];this.createHelp().visibleCommands(this).forEach(e=>{n.push(e.name()),e.alias()&&n.push(e.alias())}),t=p(e,n)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:`commander.unknownCommand`})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t||=`-V, --version`,n||=`output the version number`;let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on(`option:`+r.name(),()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,`commander.version`,e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw Error(`Command alias can't be the same as its name`);let n=this.parent?._findCommand(e);if(n){let t=[n.name()].concat(n.aliases()).join(`|`);throw Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${t}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(e=>this.alias(e)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let e=this.registeredArguments.map(e=>c(e));return[].concat(this.options.length||this._helpOption!==null?`[options]`:[],this.commands.length?`[command]`:[],this.registeredArguments.length?e:[]).join(` `)}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=i.basename(e,i.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp();return t.helpWidth===void 0&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){e||={};let t={error:!!e.error},n;return n=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;typeof e==`function`&&(t=e,e=void 0);let n=this._getHelpContext(e);this._getCommandAndAncestors().reverse().forEach(e=>e.emit(`beforeAllHelp`,n)),this.emit(`beforeHelp`,n);let r=this.helpInformation(n);if(t&&(r=t(r),typeof r!=`string`&&!Buffer.isBuffer(r)))throw Error(`outputHelp callback must return a string or a Buffer`);n.write(r),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit(`afterHelp`,n),this._getCommandAndAncestors().forEach(e=>e.emit(`afterAllHelp`,n))}helpOption(e,t){return typeof e==`boolean`?(this._helpOption=e?this._helpOption??void 0:null,this):(e??=`-h, --help`,t??=`display help for command`,this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=o.exitCode||0;t===0&&e&&typeof e!=`function`&&e.error&&(t=1),this._exit(t,`commander.help`,`(outputHelp)`)}addHelpText(e,t){let n=[`beforeAll`,`before`,`after`,`afterAll`];if(!n.includes(e))throw Error(`Unexpected value for position to addHelpText.
|
|
31
|
+
Expecting one of '${n.join(`', '`)}'`);let r=`${e}Help`;return this.on(r,e=>{let n;n=typeof t==`function`?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(e=>t.is(e))&&(this.outputHelp(),this._exit(0,`commander.helpDisplayed`,`(outputHelp)`))}};function h(e){return e.map(e=>{if(!e.startsWith(`--inspect`))return e;let t,n=`127.0.0.1`,r=`9229`,i;return(i=e.match(/^(--inspect(-brk)?)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))===null?(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=i[1],n=i[3],r=i[4]):(t=i[1],/^\d+$/.test(i[3])?r=i[3]:n=i[3]):t=i[1],t&&r!==`0`?`${t}=${n}:${parseInt(r)+1}`:e})}e.Command=m}));const{program:hn,createCommand:gn,createArgument:_n,createOption:vn,CommanderError:yn,InvalidArgumentError:bn,InvalidOptionArgumentError:xn,Command:Sn,Argument:Cn,Option:wn,Help:Tn}=e(r((e=>{let{Argument:t}=dn(),{Command:n}=mn(),{CommanderError:r,InvalidArgumentError:i}=un(),{Help:a}=fn(),{Option:o}=pn();e.program=new n,e.createCommand=e=>new n(e),e.createOption=(e,t)=>new o(e,t),e.createArgument=(e,n)=>new t(e,n),e.Command=n,e.Option=o,e.Argument=t,e.Help=a,e.CommanderError=r,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i}))(),1).default;var En=class{mapContext(e,t){return{...t,version:e.version}}getTasks(e){return[{title:`Clean workspace`,task:()=>le(e)},{title:`Compile packages`,task:()=>ue(e)},{title:`Copy packages`,task:()=>de(e)},{title:`Write package.json`,task:()=>{let t=e.version??e.config.pkg.version;if(!t)throw Error(`No package version is available to prepare artifacts.`);return fe({...e,version:t,dependencies:new Map})}}]}},Dn=class{mapContext(e,t){return{...t,targetBranch:e.branch}}getTasks(e){let{targetBranch:t}=e;return[{title:`Git fetch`,task:()=>i.fetch(`--all`,`--prune`,`--tags`)},{title:`Delete local branch ${t}`,task:()=>i.branch(`-D`,t).catch(()=>{})},{title:`Checkout origin/${t}`,task:()=>i.checkout(`origin/${t}`,`--track`)}]}success(e){console.log(`BRANCH ${e.targetBranch} RETRIEVE DONE`)}},On=class extends vt{mapContext(e,t){return{...super.mapContext(e,t),force:!!e.force,checkStatus:!0}}getTasks(e){return[...super.getTasks(e),yt(e)]}success(e){console.log(F.default.green(I.default.tick),`Branch`,F.default.green(e.featureBranch),`rebased and pushed.`)}};const kn=e=>void e.command(`publish`).description(`Alias of push: rebase and push current branch`).option(`-t, --unit-test`,`Run unit test`,(e,t)=>t+1,0).option(`-c, --cucumber`,`Run cucumber`,(e,t)=>t+1,0).option(`-f, --force`,`Force push`,(e,t)=>t+1,0).option(`-v, --verbose`,`Enable verbose log`,(e,t)=>t+1,0).action(e=>re(On,e));function An(e){let{origin:t=`origin`,upstream:n=!0,noVerify:r=!0}=e;return{title:`Rebase all branches`,task:async()=>{let a=i.branches(`-r`).filter(t=>!RegExp(`${e.config.PRODUCTION_BRANCH}|${e.config.DEVELOP_BRANCH}`).test(t));for(let o of a){let a=o.split(`/`)[1];try{await i.branch(`-D`,a)}catch{}try{await i.checkout(`--track`,o),await i.rebase(`${t}/${e.config.PRODUCTION_BRANCH}`),await i.push(...[n?`-u`:``,`-f`,t,a,r?`--no-verify`:``].filter(Boolean))}catch{try{await i.rebase(`--abort`),await i.reset(`--hard`)}catch{}}}}}}var jn=class extends we{mapContext(e,t){return{...super.mapContext(e,t)}}getTasks(e){return[...super.getTasks(e),An(e)]}success(){console.log(F.default.green(I.default.tick),`All branches rebased and pushed.`)}};const Mn=[{type:`feat`,label:`Features`,release:`minor`},{type:`fix`,label:`Bug Fixes`,release:`patch`},{type:`chore`,label:`Chores`,release:!1},{type:`ci`,label:`CI`,release:!1},{type:`docs`,label:`Documentation`,release:`patch`},{type:`tech`,label:`Technical Improvements`,release:`patch`},{type:`refactor`,label:`Technical Improvements`,release:`patch`},{type:`default`,label:`Miscellaneous`,release:!1}];function Nn(e,t){return e=e.replace(`${t}/`,``),`${t}/${e}`}function Pn({origin:e,PRODUCTION_BRANCH:t,DEVELOP_BRANCH:n}){let r=i.getBranchName(),a=`${e}/${n}`,o=`${e}/${t}`,s=[o];s.indexOf(Nn(r,e))===-1&&i.branchExists(r,e)&&(s=s.concat(Nn(r,e)));let c=i.branchesInfos(`-r`).map(e=>e.branch).filter(e=>!s.includes(e)&&![a,o].includes(e));return c.length&&(s=s.concat(c)),s}function Fn(e){return e.replace(/[/\\_|. ]/gi,`-`).split(`-`).filter(Boolean).join(`-`)}var In=class extends we{mapContext(e,t){let n=e.branchName??``,r=Mn.map(({type:e})=>e).find(e=>n.startsWith(`${e}-`)),i=e.jiraId??(n.startsWith(`CMAB-`)?`CMAB-${n.split(`-`)[1]}`:void 0),a=n.startsWith(`CMAB-`)?n.split(`-`).slice(2).join(`-`):n;return{...t,origin:t.ORIGIN,jiraId:i,branchName:a,dryRun:e.dryRun,type:r}}async prompt(e){let t={};if(!e.jiraId){let n=await he({message:`What is the Jira ID? (leave blank to skip)`,initialValue:e.jiraId});if(pe(n))return n;t.jiraId=n}if(!e.type&&!e.jiraId){let n=await me({message:`Choose the type of your branch:`,initialValue:e.type,options:[`fix`,`feat`,`chore`,`docs`,`tech`].map(e=>({value:e,label:e}))});if(pe(n))return n;t.type=n}if(!e.branchName){let n=await he({message:`What is the branch name?`,validate(t){if(!t?.length)return`Branch name is required`;if(i.branchExists(t,e.origin))return`${t} already exists`}});if(pe(n))return n;t.branchName=n}let n=i.getBranchName();if(!e.fromBranch||n!==e.DEVELOP_BRANCH){let n=Pn({origin:e.origin,PRODUCTION_BRANCH:e.PRODUCTION_BRANCH,DEVELOP_BRANCH:e.DEVELOP_BRANCH}),r=await me({message:`Start your branch from:`,initialValue:e.fromBranch??`${e.origin}/${e.PRODUCTION_BRANCH}`,options:n.map(e=>({value:e,label:e}))});if(pe(r))return r;t.fromBranch=r}return t}getTasks(e){return e.branchName=Fn(e.branchName??``),e.featureBranch=e.jiraId?`${e.jiraId}-${e.branchName}`:e.branchName.includes((e.type??``)+`-`)?e.branchName:`${e.type}-${e.branchName}`,e.fromBranch=e.fromBranch??e.config.PRODUCTION_BRANCH,[...super.getTasks(e),{title:`Create branch from ${F.default.green(e.fromBranch)}`,task:()=>i.checkout(`--no-track`,`-b`,e.featureBranch,e.fromBranch).toObservable()},_t(e)]}success(e){if(e.dryRun){console.log(`Dry run complete: no branch or dependency was modified.`);return}console.log(F.default.green(I.default.tick),`New branch ${F.default.green(e.featureBranch)} created from ${F.default.green(e.fromBranch)} HEAD`)}},Ln=t({Checkfeatures:()=>ye,Clean:()=>xe,Config:()=>Se,Deploy:()=>Ce,Fetch:()=>we,Finish:()=>bt,JiraReleases:()=>an,Merge:()=>ln,Packages:()=>En,Pull:()=>Dn,Push:()=>On,Rebase:()=>vt,Republish:()=>jn,Start:()=>In,publish:()=>kn});delete process.env.CIRCLE_PR_NUMBER,delete process.env.CIRCLE_PULL_REQUEST,delete process.env.CI_PULL_REQUEST;function Rn(e={}){ge({dryRun:process.argv.includes(`--dry-run`),ci:!1,noCi:!0,...e}).then(()=>{process.exitCode=0}).catch(e=>{console.log(`Error while releasing`,e),process.exitCode=1})}var zn=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),Bn=r(((e,t)=>{var n=d();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Vn=r(((e,t)=>{var n=Bn();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),Hn=r(((e,t)=>{var n=Vn(),r=u(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),Un=r(((e,t)=>{var n=Hn(),r=Vn();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),Wn=r(((e,t)=>{var n=Un(),r=nt();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Gn=r(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),Kn=r(((e,t)=>{var n=p(),r=Ze(),i=Gn(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)s==`constructor`&&(t||!a.call(e,s))||o.push(s);return o}t.exports=o})),qn=r(((e,t)=>{var n=Xe(),r=Kn(),i=tt();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),Jn=r(((e,t)=>{var n=Un(),r=qn();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Yn=r(((e,t)=>{var n=D(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),Xn=r(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Zn=r(((e,t)=>{var n=Un(),r=B();function i(e,t){return n(e,r(e),t)}t.exports=i})),Qn=r(((e,t)=>{t.exports=Qe()(Object.getPrototypeOf,Object)})),$n=r(((e,t)=>{var n=z(),r=Qn(),i=B(),a=We();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),er=r(((e,t)=>{var n=Un(),r=$n();function i(e,t){return n(e,r(e),t)}t.exports=i})),Y=r(((e,t)=>{var n=He(),r=$n(),i=qn();function a(e){return n(e,i,r)}t.exports=a})),tr=r(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),nr=r(((e,t)=>{var n=Re();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),rr=r(((e,t)=>{var n=nr();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),ir=r(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),ar=r(((e,t)=>{var n=w(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),or=r(((e,t)=>{var n=nr();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),sr=r(((e,t)=>{var n=nr(),r=rr(),i=ir(),a=ar(),o=or(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),cr=r(((e,t)=>{var n=p(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),lr=r(((e,t)=>{var n=cr(),r=Qn(),i=Ze();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),ur=r(((e,t)=>{var n=q(),r=f(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),dr=r(((e,t)=>{var n=ur(),r=W(),i=G(),a=i&&i.isMap;t.exports=a?r(a):n})),fr=r(((e,t)=>{var n=q(),r=f(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),pr=r(((e,t)=>{var n=fr(),r=W(),i=G(),a=i&&i.isSet;t.exports=a?r(a):n})),mr=r(((e,t)=>{var n=je(),r=zn(),i=Hn(),a=Wn(),o=Jn(),s=Yn(),c=Xn(),l=Zn(),u=er(),d=rt(),f=Y(),m=q(),h=tr(),g=sr(),_=lr(),v=E(),y=qe(),b=dr(),x=p(),S=pr(),C=nt(),w=qn(),T=1,D=2,ee=4,O=`[object Arguments]`,te=`[object Array]`,k=`[object Boolean]`,A=`[object Date]`,ne=`[object Error]`,re=`[object Function]`,ie=`[object GeneratorFunction]`,j=`[object Map]`,ae=`[object Number]`,oe=`[object Object]`,se=`[object RegExp]`,M=`[object Set]`,N=`[object String]`,ce=`[object Symbol]`,le=`[object WeakMap]`,ue=`[object ArrayBuffer]`,de=`[object DataView]`,fe=`[object Float32Array]`,pe=`[object Float64Array]`,me=`[object Int8Array]`,he=`[object Int16Array]`,ge=`[object Int32Array]`,_e=`[object Uint8Array]`,ve=`[object Uint8ClampedArray]`,ye=`[object Uint16Array]`,be=`[object Uint32Array]`,P={};P[O]=P[te]=P[ue]=P[de]=P[k]=P[A]=P[fe]=P[pe]=P[me]=P[he]=P[ge]=P[j]=P[ae]=P[oe]=P[se]=P[M]=P[N]=P[ce]=P[_e]=P[ve]=P[ye]=P[be]=!0,P[ne]=P[re]=P[le]=!1;function F(e,t,p,E,te,k){var A,ne=t&T,j=t&D,ae=tⅇif(p&&(A=te?p(e,E,te,k):p(e)),A!==void 0)return A;if(!x(e))return e;var se=v(e);if(se){if(A=h(e),!ne)return c(e,A)}else{var M=m(e),N=M==re||M==ie;if(y(e))return s(e,ne);if(M==oe||M==O||N&&!te){if(A=j||N?{}:_(e),!ne)return j?u(e,o(A,e)):l(e,a(A,e))}else{if(!P[M])return te?e:{};A=g(e,M,ne)}}k||=new n;var ce=k.get(e);if(ce)return ce;k.set(e,A),S(e)?e.forEach(function(n){A.add(F(n,t,p,n,e,k))}):b(e)&&e.forEach(function(n,r){A.set(r,F(n,t,p,r,e,k))});var le=se?void 0:(ae?j?f:d:j?w:C)(e);return r(le||e,function(n,r){le&&(r=n,n=e[r]),i(A,r,F(n,t,p,r,e,k))}),A}t.exports=F})),hr=r(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n})),gr=r(((e,t)=>{function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}t.exports=n})),_r=r(((e,t)=>{var n=m(),r=gr();function i(e,t){return t.length<2?e:n(e,r(t,0,-1))}t.exports=i})),vr=r(((e,t)=>{var n=v(),r=hr(),i=_r(),a=s();function o(e,t){return t=n(t,e),e=i(e,t),e==null||delete e[a(r(t))]}t.exports=o})),yr=r(((e,t)=>{var n=o(),r=Qn(),i=f(),a=`[object Object]`,s=Function.prototype,c=Object.prototype,l=s.toString,u=c.hasOwnProperty,d=l.call(Object);function p(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=u.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&l.call(o)==d}t.exports=p})),br=r(((e,t)=>{var n=yr();function r(e){return n(e)?void 0:e}t.exports=r})),xr=r(((e,t)=>{var n=w(),r=H(),i=E(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),Sr=r(((e,t)=>{var n=z(),r=xr();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),Cr=r(((e,t)=>{var n=Sr();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),wr=r(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),Tr=r(((e,t)=>{var n=wr(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),Er=r(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),Dr=r(((e,t)=>{function n(e){return e}t.exports=n})),Or=r(((e,t)=>{var n=Er(),r=Bn(),i=Dr();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),kr=r(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),Ar=r(((e,t)=>{var n=Or();t.exports=kr()(n)})),jr=r(((e,t)=>{var n=Cr(),r=Tr(),i=Ar();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),Mr=e(r(((e,t)=>{var n=x(),r=mr(),i=vr(),a=v(),o=Un(),s=br(),c=jr(),l=Y(),u=1,d=2,f=4;t.exports=c(function(e,t){var c={};if(e==null)return c;var p=!1;t=n(t,function(t){return t=a(t,e),p||=t.length>1,t}),o(e,l(e),c),p&&(c=r(c,u|d|f,s));for(var m=t.length;m--;)i(c,t[m]);return c})}))(),1);const X=[{breaking:!0,release:`major`},{revert:!0,release:`patch`},...Mn.map(e=>(0,Mr.default)(e,[`label`]))],Nr=Mn.reduce((e,{type:t,label:n})=>({...e,[t]:n}),{}),Pr=e=>Nr[e.type]?Nr[e.type]:Nr.default??e.type;function Fr(e,t){e={...e};let n=[];if(e.notes.forEach(e=>{e.title=`BREAKING CHANGES`}),e.type=Pr(e),!(e.message&&e.message.match(/^[\w-]+$/i))){if(e.subject&&(e.subject=e.subject.replace(`[MEP]`,``)),e.scope===`*`&&(e.scope=``),typeof e.hash==`string`&&(e.shortHash=e.hash.substring(0,7)),typeof e.subject==`string`){let r=t.repository?`${t.host}/${t.owner}/${t.repository}`:t.repoUrl;r&&(r=`${r}/issues/`,e.subject=e.subject.replace(/#([0-9]+)/g,(e,t)=>(n.push(t),`[#${t}](${r}${t})`))),t.host&&(e.subject=e.subject.replace(/\B@([a-z0-9](?:-?[a-z0-9/]){0,38})/g,(e,n)=>n.includes(`/`)?`@${n}`:`[@${n}](${t.host}/${n})`))}return e.references=e.references.filter(e=>n.indexOf(e.issue)===-1),e}}function Ir(e={}){let{PRODUCTION_BRANCH:t,BRANCH_NAME:n}=_(),r=n??t;return{noCi:t!==r||void 0,branches:[{name:t,channel:`release`},{name:r,channel:`prerelease`,prerelease:!0}],verifyConditions:[`@cmflow/cli/semantic/verify-conditions`],analyzeCommits:[`@cmflow/cli/semantic/analyze-commits`],verifyRelease:[`@cmflow/cli/semantic/verify-release`],generateNotes:[`@cmflow/cli/semantic/generate-notes`],prepare:[`@cmflow/cli/semantic/prepare/bump-version`,`@cmflow/cli/semantif/prepare/post`],releaseRules:X,parserOpts:{noteKeywords:[`BREAKING CHANGE`,`BREAKING CHANGES`]},writerOpts:{transform:Fr},...e}}export{T as Cli,Mn as WORKFLOW_CONFIGURATION,ne as bun,Ln as commands,A as configureGitWorkspace,Ir as defineConfig,ae as docker,S as getCI,_ as getConfig,b as getPackageJson,te as getPackageManager,i as git,k as lerna,oe as npm,ee as pnpm,Rn as release,X as releaseRules,re as runCommand,Fr as transformWriter,O as yarn};
|
|
32
|
+
//# sourceMappingURL=index.mjs.map
|