diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 7145c5499..ad96645e1 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -53,6 +53,7 @@ "prBodyNotes": "### Upgrade Instructions\n\ * Wait until both `danlynn/ember-cli` and `ember-cli` have the same update{{#unless isPatch}}\n\ * Then follow this guide: https://cli.emberjs.com/release/basic-use/upgrading/#upgradinganemberappitself\n\ +* Then update `.nvmrc` with the version used in dalynn/ember-cli and validate everything works with this Node version\n\ * Finally, make sure any package that was added to `package.json` by this process is added to `ignoreDeps` in [`renovate.json5`](https://github.com/csvalpha/amber-ui/blob/staging/.github/renovate.json5){{/unless}}" }, { diff --git a/.github/workflows/cleanup-registry.yml b/.github/workflows/cleanup-registry.yml index 8dd434b47..da476d12a 100644 --- a/.github/workflows/cleanup-registry.yml +++ b/.github/workflows/cleanup-registry.yml @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Delete old versions - uses: snok/container-retention-policy@6601a342b42bf08909bbd5b48736d4176100365b # tag=v1.5.1 + uses: snok/container-retention-policy@f617f1ca161a52bce48417eedd76924e71d0b4d9 # v2.1.0 with: image-names: ${{ env.IMAGE_NAMES }} cut-off: 2 days ago UTC account-type: org org-name: ${{ github.repository_owner }} skip-tags: latest,staging - token: ${{ secrets.PAT }} + token: ${{ secrets.GH_PAT }} diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index 41146e819..243a8c56c 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -13,8 +13,6 @@ concurrency: env: PROJECT_NAME: amber-ui - SENTRY_ORG: csvalpha - APP_ID: 152333 jobs: branch_check: @@ -37,7 +35,7 @@ jobs: stage: ${{ steps.get_metadata.outputs.stage }} steps: - name: Checkout code - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Get metadata id: get_metadata @@ -82,7 +80,7 @@ jobs: - name: Checkout code if: fromJSON(needs.metadata.outputs.has_diff) - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 - name: Run merge if: fromJSON(needs.metadata.outputs.has_diff) @@ -137,19 +135,19 @@ jobs: fi - name: Checkout code - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ needs.merge.outputs.sha }} - name: Start deployment - uses: bobheadxi/deployments@9d4477fdaa4120020cd10ab7e97f68c801422e73 # tag=v1.3.0 + uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3 # v1.4.0 id: start_deployment with: step: start env: ${{ needs.metadata.outputs.stage }} - name: Deploy - uses: appleboy/ssh-action@4a03da89e5c43da56e502053be4bbcb293411883 # v0.1.6 + uses: appleboy/ssh-action@334f9259f2f8eb3376d33fa4c684fff373f2c2a6 # v0.1.10 env: STAGE: ${{ needs.metadata.outputs.stage }} with: @@ -163,9 +161,10 @@ jobs: docker-compose up -d - name: Finalize Sentry release - uses: getsentry/action-release@bd5f874fcda966ba48139b0140fb3ec0cb3aabdd # v1.2.1 + uses: getsentry/action-release@4744f6a65149f441c5f396d5b0877307c0db52c7 # v1.4.1 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ vars.SENTRY_ORG_NAME }} SENTRY_PROJECT: ${{ env.PROJECT_NAME }} with: environment: ${{ needs.metadata.outputs.stage }} @@ -173,7 +172,7 @@ jobs: set_commits: skip - name: Finish deployment - uses: bobheadxi/deployments@9d4477fdaa4120020cd10ab7e97f68c801422e73 # tag=v1.3.0 + uses: bobheadxi/deployments@88ce5600046c82542f8246ac287d0a53c461bca3 # v1.4.0 if: steps.start_deployment.conclusion == 'success' && always() with: step: finish @@ -212,8 +211,8 @@ jobs: - name: Update Continuous Delivery check run uses: guidojw/actions/update-check-run@abb0ee8d1336edf73383f2e5a09abd3a22f25b13 # v1.3.3 with: - app_id: ${{ env.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} + app_id: ${{ vars.GH_APP_ID }} + private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} sha: ${{ needs.merge.outputs.sha }} name: Continuous Delivery conclusion: ${{ steps.get_conclusion.outputs.conclusion }} diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 35ee523a8..71a22b9a7 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -4,6 +4,7 @@ on: push: branches: [staging, master] pull_request: + merge_group: workflow_call: inputs: sha: @@ -17,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ inputs.sha }} @@ -34,7 +35,7 @@ jobs: needs: build steps: - name: Checkout code - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ inputs.sha }} @@ -46,7 +47,7 @@ jobs: - name: Download actionlint run: | - bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.22 + bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 1.6.24 - name: Load test image uses: guidojw/actions/load-docker-image@abb0ee8d1336edf73383f2e5a09abd3a22f25b13 # v1.3.3 @@ -56,7 +57,7 @@ jobs: - name: Lint run: | EXIT_STATUS=0 - ./actionlint -ignore 'property "app_private_key" is not defined' -ignore 'SC2153:' \ + ./actionlint -ignore 'property "gh_app_private_key" is not defined' -ignore 'SC2153:' \ -ignore 'property "sha" is not defined in object type {}' || EXIT_STATUS=$? docker run app yarn lint:hbs || EXIT_STATUS=$? docker run app yarn lint:js || EXIT_STATUS=$? diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index 509be50d0..c9be26317 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -17,9 +17,6 @@ on: env: PROJECT_NAME: amber-ui - REGISTRY_URL: ghcr.io - SENTRY_ORG: csvalpha - APP_ID: 152333 jobs: metadata: @@ -48,7 +45,7 @@ jobs: { echo 'build_args<> "$GITHUB_OUTPUT" fi @@ -58,24 +55,24 @@ jobs: needs: metadata steps: - name: Checkout code - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 with: ref: ${{ inputs.sha }} fetch-depth: 0 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # tag=v2.2.1 + uses: docker/setup-buildx-action@4b4e9c3e2d4531116a6f8ba8e71fc6e2cb6e6c8c # v2.5.0 - name: Login to GitHub Container Registry uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # tag=v2.1.0 with: - registry: ${{ env.REGISTRY_URL }} + registry: ${{ vars.DOCKER_REGISTRY_URL }} username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push image id: build_push_image - uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 # tag=v3.2.0 + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 # v4.0.0 with: push: true context: . @@ -83,7 +80,7 @@ jobs: cache-from: type=gha,scope=main cache-to: type=gha,mode=max,scope=main tags: | - ${{ env.REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.PROJECT_NAME }}:${{ + ${{ vars.DOCKER_REGISTRY_URL }}/${{ github.repository_owner }}/${{ env.PROJECT_NAME }}:${{ needs.metadata.outputs.tag }} - name: Get sourcemaps from image @@ -95,9 +92,10 @@ jobs: - name: Create Sentry release if: ${{ !(github.event_name == 'workflow_dispatch' && github.workflow == 'Publish Image') }} - uses: getsentry/action-release@bd5f874fcda966ba48139b0140fb3ec0cb3aabdd # v1.2.1 + uses: getsentry/action-release@4744f6a65149f441c5f396d5b0877307c0db52c7 # v1.4.1 env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ vars.SENTRY_ORG_NAME }} SENTRY_PROJECT: ${{ env.PROJECT_NAME }} with: finalize: false @@ -127,8 +125,8 @@ jobs: - name: Update Publish Image check run uses: guidojw/actions/update-check-run@abb0ee8d1336edf73383f2e5a09abd3a22f25b13 # v1.3.3 with: - app_id: ${{ env.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} + app_id: ${{ vars.GH_APP_ID }} + private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} name: Publish Image conclusion: ${{ steps.get_conclusion.outputs.conclusion }} details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.gitignore b/.gitignore index ecd1acc45..b6125b712 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ testem.log # IDE Folders # ############### /.idea/* +/.vscode/* # ember-try /.node_modules.ember-try/ diff --git a/.nvmrc b/.nvmrc index 261767ca4..72e4a483c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.21.2 +18.14.2 diff --git a/.stylelintrc.js b/.stylelintrc.js index a1fd0b569..8f0fccabb 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -6,8 +6,6 @@ module.exports = { 'stylelint-config-standard', // Configuration based on https://sass-guidelin.es 'stylelint-config-sass-guidelines', - // Configuration that turns off all Stylelint rules conflicting with prettier. - 'stylelint-config-prettier', // Concentric order of declarations based on http://rhodesmill.org/brandon/2011/concentric-css/ './.stylelintrc.order.js', ], @@ -20,5 +18,27 @@ module.exports = { 'scss/at-rule-no-unknown': null, 'scss/dollar-variable-colon-space-after': null, 'selector-class-pattern': null, + + // All these disables are rules enabled by stylelint-config-sass-guidelines + // that are deprecated in stylelint v15, remove these when + // stylelint-config-sass-guidelines is upgraded to support v15. + 'block-opening-brace-space-before': null, + 'color-hex-case': null, + 'declaration-bang-space-after': null, + 'declaration-bang-space-before': null, + 'declaration-block-semicolon-newline-after': null, + 'declaration-block-semicolon-space-before': null, + 'declaration-block-trailing-semicolon': null, + 'declaration-colon-space-after': null, + 'declaration-colon-space-before': null, + 'function-comma-space-after': null, + 'function-parentheses-space-inside': null, + indentation: null, + 'media-feature-parentheses-space-inside': null, + 'no-missing-end-of-source-newline': null, + 'number-leading-zero': null, + 'number-no-trailing-zeros': null, + 'selector-list-comma-newline-after': null, + 'string-quotes': null, }, }; diff --git a/.yarn/releases/yarn-3.3.1.cjs b/.yarn/releases/yarn-3.3.1.cjs deleted file mode 100755 index 53a282e43..000000000 --- a/.yarn/releases/yarn-3.3.1.cjs +++ /dev/null @@ -1,823 +0,0 @@ -#!/usr/bin/env node -/* eslint-disable */ -//prettier-ignore -(()=>{var dfe=Object.create;var jS=Object.defineProperty;var Cfe=Object.getOwnPropertyDescriptor;var mfe=Object.getOwnPropertyNames;var Efe=Object.getPrototypeOf,Ife=Object.prototype.hasOwnProperty;var J=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var y=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),ht=(r,e)=>{for(var t in e)jS(r,t,{get:e[t],enumerable:!0})},yfe=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of mfe(e))!Ife.call(r,n)&&n!==t&&jS(r,n,{get:()=>e[n],enumerable:!(i=Cfe(e,n))||i.enumerable});return r};var ne=(r,e,t)=>(t=r!=null?dfe(Efe(r)):{},yfe(e||!r||!r.__esModule?jS(t,"default",{value:r,enumerable:!0}):t,r));var aK=y((uZe,oK)=>{oK.exports=sK;sK.sync=Gfe;var iK=J("fs");function Hfe(r,e){var t=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!t||(t=t.split(";"),t.indexOf("")!==-1))return!0;for(var i=0;i{uK.exports=lK;lK.sync=Yfe;var AK=J("fs");function lK(r,e,t){AK.stat(r,function(i,n){t(i,i?!1:cK(n,e))})}function Yfe(r,e){return cK(AK.statSync(r),e)}function cK(r,e){return r.isFile()&&jfe(r,e)}function jfe(r,e){var t=r.mode,i=r.uid,n=r.gid,s=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),o=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),a=parseInt("100",8),l=parseInt("010",8),c=parseInt("001",8),u=a|l,g=t&c||t&l&&n===o||t&a&&i===s||t&u&&s===0;return g}});var hK=y((hZe,fK)=>{var fZe=J("fs"),OI;process.platform==="win32"||global.TESTING_WINDOWS?OI=aK():OI=gK();fK.exports=av;av.sync=qfe;function av(r,e,t){if(typeof e=="function"&&(t=e,e={}),!t){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(i,n){av(r,e||{},function(s,o){s?n(s):i(o)})})}OI(r,e||{},function(i,n){i&&(i.code==="EACCES"||e&&e.ignoreErrors)&&(i=null,n=!1),t(i,n)})}function qfe(r,e){try{return OI.sync(r,e||{})}catch(t){if(e&&e.ignoreErrors||t.code==="EACCES")return!1;throw t}}});var yK=y((pZe,IK)=>{var _g=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",pK=J("path"),Jfe=_g?";":":",dK=hK(),CK=r=>Object.assign(new Error(`not found: ${r}`),{code:"ENOENT"}),mK=(r,e)=>{let t=e.colon||Jfe,i=r.match(/\//)||_g&&r.match(/\\/)?[""]:[..._g?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(t)],n=_g?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s=_g?n.split(t):[""];return _g&&r.indexOf(".")!==-1&&s[0]!==""&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:n}},EK=(r,e,t)=>{typeof e=="function"&&(t=e,e={}),e||(e={});let{pathEnv:i,pathExt:n,pathExtExe:s}=mK(r,e),o=[],a=c=>new Promise((u,g)=>{if(c===i.length)return e.all&&o.length?u(o):g(CK(r));let f=i[c],h=/^".*"$/.test(f)?f.slice(1,-1):f,p=pK.join(h,r),C=!h&&/^\.[\\\/]/.test(r)?r.slice(0,2)+p:p;u(l(C,c,0))}),l=(c,u,g)=>new Promise((f,h)=>{if(g===n.length)return f(a(u+1));let p=n[g];dK(c+p,{pathExt:s},(C,w)=>{if(!C&&w)if(e.all)o.push(c+p);else return f(c+p);return f(l(c,u,g+1))})});return t?a(0).then(c=>t(null,c),t):a(0)},Wfe=(r,e)=>{e=e||{};let{pathEnv:t,pathExt:i,pathExtExe:n}=mK(r,e),s=[];for(let o=0;o{"use strict";var wK=(r={})=>{let e=r.env||process.env;return(r.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(i=>i.toUpperCase()==="PATH")||"Path"};Av.exports=wK;Av.exports.default=wK});var vK=y((CZe,SK)=>{"use strict";var bK=J("path"),zfe=yK(),Vfe=BK();function QK(r,e){let t=r.options.env||process.env,i=process.cwd(),n=r.options.cwd!=null,s=n&&process.chdir!==void 0&&!process.chdir.disabled;if(s)try{process.chdir(r.options.cwd)}catch{}let o;try{o=zfe.sync(r.command,{path:t[Vfe({env:t})],pathExt:e?bK.delimiter:void 0})}catch{}finally{s&&process.chdir(i)}return o&&(o=bK.resolve(n?r.options.cwd:"",o)),o}function Xfe(r){return QK(r)||QK(r,!0)}SK.exports=Xfe});var xK=y((mZe,cv)=>{"use strict";var lv=/([()\][%!^"`<>&|;, *?])/g;function _fe(r){return r=r.replace(lv,"^$1"),r}function Zfe(r,e){return r=`${r}`,r=r.replace(/(\\*)"/g,'$1$1\\"'),r=r.replace(/(\\*)$/,"$1$1"),r=`"${r}"`,r=r.replace(lv,"^$1"),e&&(r=r.replace(lv,"^$1")),r}cv.exports.command=_fe;cv.exports.argument=Zfe});var DK=y((EZe,PK)=>{"use strict";PK.exports=/^#!(.*)/});var RK=y((IZe,kK)=>{"use strict";var $fe=DK();kK.exports=(r="")=>{let e=r.match($fe);if(!e)return null;let[t,i]=e[0].replace(/#! ?/,"").split(" "),n=t.split("/").pop();return n==="env"?i:i?`${n} ${i}`:n}});var NK=y((yZe,FK)=>{"use strict";var uv=J("fs"),ehe=RK();function the(r){let t=Buffer.alloc(150),i;try{i=uv.openSync(r,"r"),uv.readSync(i,t,0,150,0),uv.closeSync(i)}catch{}return ehe(t.toString())}FK.exports=the});var MK=y((wZe,OK)=>{"use strict";var rhe=J("path"),TK=vK(),LK=xK(),ihe=NK(),nhe=process.platform==="win32",she=/\.(?:com|exe)$/i,ohe=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function ahe(r){r.file=TK(r);let e=r.file&&ihe(r.file);return e?(r.args.unshift(r.file),r.command=e,TK(r)):r.file}function Ahe(r){if(!nhe)return r;let e=ahe(r),t=!she.test(e);if(r.options.forceShell||t){let i=ohe.test(e);r.command=rhe.normalize(r.command),r.command=LK.command(r.command),r.args=r.args.map(s=>LK.argument(s,i));let n=[r.command].concat(r.args).join(" ");r.args=["/d","/s","/c",`"${n}"`],r.command=process.env.comspec||"cmd.exe",r.options.windowsVerbatimArguments=!0}return r}function lhe(r,e,t){e&&!Array.isArray(e)&&(t=e,e=null),e=e?e.slice(0):[],t=Object.assign({},t);let i={command:r,args:e,options:t,file:void 0,original:{command:r,args:e}};return t.shell?i:Ahe(i)}OK.exports=lhe});var HK=y((BZe,KK)=>{"use strict";var gv=process.platform==="win32";function fv(r,e){return Object.assign(new Error(`${e} ${r.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${r.command}`,path:r.command,spawnargs:r.args})}function che(r,e){if(!gv)return;let t=r.emit;r.emit=function(i,n){if(i==="exit"){let s=UK(n,e,"spawn");if(s)return t.call(r,"error",s)}return t.apply(r,arguments)}}function UK(r,e){return gv&&r===1&&!e.file?fv(e.original,"spawn"):null}function uhe(r,e){return gv&&r===1&&!e.file?fv(e.original,"spawnSync"):null}KK.exports={hookChildProcess:che,verifyENOENT:UK,verifyENOENTSync:uhe,notFoundError:fv}});var dv=y((bZe,Zg)=>{"use strict";var GK=J("child_process"),hv=MK(),pv=HK();function YK(r,e,t){let i=hv(r,e,t),n=GK.spawn(i.command,i.args,i.options);return pv.hookChildProcess(n,i),n}function ghe(r,e,t){let i=hv(r,e,t),n=GK.spawnSync(i.command,i.args,i.options);return n.error=n.error||pv.verifyENOENTSync(n.status,i),n}Zg.exports=YK;Zg.exports.spawn=YK;Zg.exports.sync=ghe;Zg.exports._parse=hv;Zg.exports._enoent=pv});var qK=y((QZe,jK)=>{"use strict";function fhe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function uc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,uc)}fhe(uc,Error);uc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g>",re=de(">>",!1),me=">&",tt=de(">&",!1),Rt=">",It=de(">",!1),Ur="<<<",oi=de("<<<",!1),pi="<&",pr=de("<&",!1),di="<",ai=de("<",!1),Os=function(m){return{type:"argument",segments:[].concat(...m)}},dr=function(m){return m},Bi="$'",_n=de("$'",!1),pa="'",EA=de("'",!1),kg=function(m){return[{type:"text",text:m}]},Zn='""',IA=de('""',!1),da=function(){return{type:"text",text:""}},Jp='"',yA=de('"',!1),wA=function(m){return m},Br=function(m){return{type:"arithmetic",arithmetic:m,quoted:!0}},Vl=function(m){return{type:"shell",shell:m,quoted:!0}},Rg=function(m){return{type:"variable",...m,quoted:!0}},Eo=function(m){return{type:"text",text:m}},Fg=function(m){return{type:"arithmetic",arithmetic:m,quoted:!1}},Wp=function(m){return{type:"shell",shell:m,quoted:!1}},zp=function(m){return{type:"variable",...m,quoted:!1}},Pr=function(m){return{type:"glob",pattern:m}},oe=/^[^']/,Io=Ye(["'"],!0,!1),kn=function(m){return m.join("")},Ng=/^[^$"]/,bt=Ye(["$",'"'],!0,!1),Xl=`\\ -`,Rn=de(`\\ -`,!1),$n=function(){return""},es="\\",ut=de("\\",!1),yo=/^[\\$"`]/,at=Ye(["\\","$",'"',"`"],!1,!1),ln=function(m){return m},S="\\a",Lt=de("\\a",!1),Tg=function(){return"a"},_l="\\b",Vp=de("\\b",!1),Xp=function(){return"\b"},_p=/^[Ee]/,Zp=Ye(["E","e"],!1,!1),$p=function(){return"\x1B"},G="\\f",yt=de("\\f",!1),BA=function(){return"\f"},Wi="\\n",Zl=de("\\n",!1),We=function(){return` -`},Ca="\\r",Lg=de("\\r",!1),uI=function(){return"\r"},ed="\\t",gI=de("\\t",!1),ar=function(){return" "},Fn="\\v",$l=de("\\v",!1),td=function(){return"\v"},Ms=/^[\\'"?]/,ma=Ye(["\\","'",'"',"?"],!1,!1),cn=function(m){return String.fromCharCode(parseInt(m,16))},ke="\\x",Og=de("\\x",!1),ec="\\u",Us=de("\\u",!1),tc="\\U",bA=de("\\U",!1),Mg=function(m){return String.fromCodePoint(parseInt(m,16))},Ug=/^[0-7]/,Ea=Ye([["0","7"]],!1,!1),Ia=/^[0-9a-fA-f]/,$e=Ye([["0","9"],["a","f"],["A","f"]],!1,!1),wo=rt(),QA="-",rc=de("-",!1),Ks="+",ic=de("+",!1),fI=".",rd=de(".",!1),Kg=function(m,Q,F){return{type:"number",value:(m==="-"?-1:1)*parseFloat(Q.join("")+"."+F.join(""))}},id=function(m,Q){return{type:"number",value:(m==="-"?-1:1)*parseInt(Q.join(""))}},hI=function(m){return{type:"variable",...m}},nc=function(m){return{type:"variable",name:m}},pI=function(m){return m},Hg="*",SA=de("*",!1),Nr="/",dI=de("/",!1),Hs=function(m,Q,F){return{type:Q==="*"?"multiplication":"division",right:F}},Gs=function(m,Q){return Q.reduce((F,K)=>({left:F,...K}),m)},Gg=function(m,Q,F){return{type:Q==="+"?"addition":"subtraction",right:F}},vA="$((",R=de("$((",!1),q="))",pe=de("))",!1),Ne=function(m){return m},xe="$(",qe=de("$(",!1),dt=function(m){return m},Ft="${",Nn=de("${",!1),vS=":-",AU=de(":-",!1),lU=function(m,Q){return{name:m,defaultValue:Q}},xS=":-}",cU=de(":-}",!1),uU=function(m){return{name:m,defaultValue:[]}},PS=":+",gU=de(":+",!1),fU=function(m,Q){return{name:m,alternativeValue:Q}},DS=":+}",hU=de(":+}",!1),pU=function(m){return{name:m,alternativeValue:[]}},kS=function(m){return{name:m}},dU="$",CU=de("$",!1),mU=function(m){return e.isGlobPattern(m)},EU=function(m){return m},RS=/^[a-zA-Z0-9_]/,FS=Ye([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),NS=function(){return O()},TS=/^[$@*?#a-zA-Z0-9_\-]/,LS=Ye(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),IU=/^[(){}<>$|&; \t"']/,Yg=Ye(["(",")","{","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),OS=/^[<>&; \t"']/,MS=Ye(["<",">","&",";"," "," ",'"',"'"],!1,!1),CI=/^[ \t]/,mI=Ye([" "," "],!1,!1),b=0,Fe=0,xA=[{line:1,column:1}],d=0,E=[],I=0,k;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function O(){return r.substring(Fe,b)}function X(){return Et(Fe,b)}function te(m,Q){throw Q=Q!==void 0?Q:Et(Fe,b),Fi([At(m)],r.substring(Fe,b),Q)}function ye(m,Q){throw Q=Q!==void 0?Q:Et(Fe,b),Tn(m,Q)}function de(m,Q){return{type:"literal",text:m,ignoreCase:Q}}function Ye(m,Q,F){return{type:"class",parts:m,inverted:Q,ignoreCase:F}}function rt(){return{type:"any"}}function wt(){return{type:"end"}}function At(m){return{type:"other",description:m}}function et(m){var Q=xA[m],F;if(Q)return Q;for(F=m-1;!xA[F];)F--;for(Q=xA[F],Q={line:Q.line,column:Q.column};Fd&&(d=b,E=[]),E.push(m))}function Tn(m,Q){return new uc(m,null,null,Q)}function Fi(m,Q,F){return new uc(uc.buildMessage(m,Q),m,Q,F)}function PA(){var m,Q;return m=b,Q=Kr(),Q===t&&(Q=null),Q!==t&&(Fe=m,Q=s(Q)),m=Q,m}function Kr(){var m,Q,F,K,ce;if(m=b,Q=Hr(),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();F!==t?(K=ya(),K!==t?(ce=ts(),ce===t&&(ce=null),ce!==t?(Fe=m,Q=o(Q,K,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;if(m===t)if(m=b,Q=Hr(),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();F!==t?(K=ya(),K===t&&(K=null),K!==t?(Fe=m,Q=a(Q,K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function ts(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=Kr(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=l(F),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function ya(){var m;return r.charCodeAt(b)===59?(m=c,b++):(m=t,I===0&&Be(u)),m===t&&(r.charCodeAt(b)===38?(m=g,b++):(m=t,I===0&&Be(f))),m}function Hr(){var m,Q,F;return m=b,Q=yU(),Q!==t?(F=$ge(),F===t&&(F=null),F!==t?(Fe=m,Q=h(Q,F),m=Q):(b=m,m=t)):(b=m,m=t),m}function $ge(){var m,Q,F,K,ce,Qe,ft;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=efe(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Hr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=p(F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function efe(){var m;return r.substr(b,2)===C?(m=C,b+=2):(m=t,I===0&&Be(w)),m===t&&(r.substr(b,2)===B?(m=B,b+=2):(m=t,I===0&&Be(v))),m}function yU(){var m,Q,F;return m=b,Q=ife(),Q!==t?(F=tfe(),F===t&&(F=null),F!==t?(Fe=m,Q=D(Q,F),m=Q):(b=m,m=t)):(b=m,m=t),m}function tfe(){var m,Q,F,K,ce,Qe,ft;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(F=rfe(),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=yU(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=T(F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;return m}function rfe(){var m;return r.substr(b,2)===H?(m=H,b+=2):(m=t,I===0&&Be(j)),m===t&&(r.charCodeAt(b)===124?(m=$,b++):(m=t,I===0&&Be(V))),m}function EI(){var m,Q,F,K,ce,Qe;if(m=b,Q=FU(),Q!==t)if(r.charCodeAt(b)===61?(F=W,b++):(F=t,I===0&&Be(Z)),F!==t)if(K=bU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(Fe=m,Q=A(Q,K),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;else b=m,m=t;if(m===t)if(m=b,Q=FU(),Q!==t)if(r.charCodeAt(b)===61?(F=W,b++):(F=t,I===0&&Be(Z)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=ae(Q),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t;return m}function ife(){var m,Q,F,K,ce,Qe,ft,Bt,Vr,Ci,rs;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(r.charCodeAt(b)===40?(F=ge,b++):(F=t,I===0&&Be(_)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Kr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();if(Qe!==t)if(r.charCodeAt(b)===41?(ft=L,b++):(ft=t,I===0&&Be(N)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=nd();Ci!==t;)Vr.push(Ci),Ci=nd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Fe=m,Q=ue(ce,Vr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t)if(r.charCodeAt(b)===123?(F=we,b++):(F=t,I===0&&Be(Te)),F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t)if(ce=Kr(),ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();if(Qe!==t)if(r.charCodeAt(b)===125?(ft=Pe,b++):(ft=t,I===0&&Be(Le)),ft!==t){for(Bt=[],Vr=Me();Vr!==t;)Bt.push(Vr),Vr=Me();if(Bt!==t){for(Vr=[],Ci=nd();Ci!==t;)Vr.push(Ci),Ci=nd();if(Vr!==t){for(Ci=[],rs=Me();rs!==t;)Ci.push(rs),rs=Me();Ci!==t?(Fe=m,Q=se(ce,Vr),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t}else b=m,m=t;else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){for(F=[],K=EI();K!==t;)F.push(K),K=EI();if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();if(K!==t){if(ce=[],Qe=BU(),Qe!==t)for(;Qe!==t;)ce.push(Qe),Qe=BU();else ce=t;if(ce!==t){for(Qe=[],ft=Me();ft!==t;)Qe.push(ft),ft=Me();Qe!==t?(Fe=m,Q=Ae(F,ce),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}else b=m,m=t}else b=m,m=t;if(m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){if(F=[],K=EI(),K!==t)for(;K!==t;)F.push(K),K=EI();else F=t;if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=be(F),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t}}}return m}function wU(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t){if(F=[],K=II(),K!==t)for(;K!==t;)F.push(K),K=II();else F=t;if(F!==t){for(K=[],ce=Me();ce!==t;)K.push(ce),ce=Me();K!==t?(Fe=m,Q=fe(F),m=Q):(b=m,m=t)}else b=m,m=t}else b=m,m=t;return m}function BU(){var m,Q,F;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();if(Q!==t?(F=nd(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t){for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();Q!==t?(F=II(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t)}return m}function nd(){var m,Q,F,K,ce;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();return Q!==t?(Ge.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(ie)),F===t&&(F=null),F!==t?(K=nfe(),K!==t?(ce=II(),ce!==t?(Fe=m,Q=Y(F,K,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function nfe(){var m;return r.substr(b,2)===he?(m=he,b+=2):(m=t,I===0&&Be(re)),m===t&&(r.substr(b,2)===me?(m=me,b+=2):(m=t,I===0&&Be(tt)),m===t&&(r.charCodeAt(b)===62?(m=Rt,b++):(m=t,I===0&&Be(It)),m===t&&(r.substr(b,3)===Ur?(m=Ur,b+=3):(m=t,I===0&&Be(oi)),m===t&&(r.substr(b,2)===pi?(m=pi,b+=2):(m=t,I===0&&Be(pr)),m===t&&(r.charCodeAt(b)===60?(m=di,b++):(m=t,I===0&&Be(ai))))))),m}function II(){var m,Q,F;for(m=b,Q=[],F=Me();F!==t;)Q.push(F),F=Me();return Q!==t?(F=bU(),F!==t?(Fe=m,Q=le(F),m=Q):(b=m,m=t)):(b=m,m=t),m}function bU(){var m,Q,F;if(m=b,Q=[],F=QU(),F!==t)for(;F!==t;)Q.push(F),F=QU();else Q=t;return Q!==t&&(Fe=m,Q=Os(Q)),m=Q,m}function QU(){var m,Q;return m=b,Q=sfe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=ofe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=afe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q,m===t&&(m=b,Q=Afe(),Q!==t&&(Fe=m,Q=dr(Q)),m=Q))),m}function sfe(){var m,Q,F,K;return m=b,r.substr(b,2)===Bi?(Q=Bi,b+=2):(Q=t,I===0&&Be(_n)),Q!==t?(F=ufe(),F!==t?(r.charCodeAt(b)===39?(K=pa,b++):(K=t,I===0&&Be(EA)),K!==t?(Fe=m,Q=kg(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function ofe(){var m,Q,F,K;return m=b,r.charCodeAt(b)===39?(Q=pa,b++):(Q=t,I===0&&Be(EA)),Q!==t?(F=lfe(),F!==t?(r.charCodeAt(b)===39?(K=pa,b++):(K=t,I===0&&Be(EA)),K!==t?(Fe=m,Q=kg(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function afe(){var m,Q,F,K;if(m=b,r.substr(b,2)===Zn?(Q=Zn,b+=2):(Q=t,I===0&&Be(IA)),Q!==t&&(Fe=m,Q=da()),m=Q,m===t)if(m=b,r.charCodeAt(b)===34?(Q=Jp,b++):(Q=t,I===0&&Be(yA)),Q!==t){for(F=[],K=SU();K!==t;)F.push(K),K=SU();F!==t?(r.charCodeAt(b)===34?(K=Jp,b++):(K=t,I===0&&Be(yA)),K!==t?(Fe=m,Q=wA(F),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;return m}function Afe(){var m,Q,F;if(m=b,Q=[],F=vU(),F!==t)for(;F!==t;)Q.push(F),F=vU();else Q=t;return Q!==t&&(Fe=m,Q=wA(Q)),m=Q,m}function SU(){var m,Q;return m=b,Q=kU(),Q!==t&&(Fe=m,Q=Br(Q)),m=Q,m===t&&(m=b,Q=RU(),Q!==t&&(Fe=m,Q=Vl(Q)),m=Q,m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=Rg(Q)),m=Q,m===t&&(m=b,Q=cfe(),Q!==t&&(Fe=m,Q=Eo(Q)),m=Q))),m}function vU(){var m,Q;return m=b,Q=kU(),Q!==t&&(Fe=m,Q=Fg(Q)),m=Q,m===t&&(m=b,Q=RU(),Q!==t&&(Fe=m,Q=Wp(Q)),m=Q,m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=zp(Q)),m=Q,m===t&&(m=b,Q=hfe(),Q!==t&&(Fe=m,Q=Pr(Q)),m=Q,m===t&&(m=b,Q=ffe(),Q!==t&&(Fe=m,Q=Eo(Q)),m=Q)))),m}function lfe(){var m,Q,F;for(m=b,Q=[],oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io));F!==t;)Q.push(F),oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io));return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function cfe(){var m,Q,F;if(m=b,Q=[],F=xU(),F===t&&(Ng.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(bt))),F!==t)for(;F!==t;)Q.push(F),F=xU(),F===t&&(Ng.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(bt)));else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function xU(){var m,Q,F;return m=b,r.substr(b,2)===Xl?(Q=Xl,b+=2):(Q=t,I===0&&Be(Rn)),Q!==t&&(Fe=m,Q=$n()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(yo.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(at)),F!==t?(Fe=m,Q=ln(F),m=Q):(b=m,m=t)):(b=m,m=t)),m}function ufe(){var m,Q,F;for(m=b,Q=[],F=PU(),F===t&&(oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io)));F!==t;)Q.push(F),F=PU(),F===t&&(oe.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Io)));return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function PU(){var m,Q,F;return m=b,r.substr(b,2)===S?(Q=S,b+=2):(Q=t,I===0&&Be(Lt)),Q!==t&&(Fe=m,Q=Tg()),m=Q,m===t&&(m=b,r.substr(b,2)===_l?(Q=_l,b+=2):(Q=t,I===0&&Be(Vp)),Q!==t&&(Fe=m,Q=Xp()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(_p.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(Zp)),F!==t?(Fe=m,Q=$p(),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===G?(Q=G,b+=2):(Q=t,I===0&&Be(yt)),Q!==t&&(Fe=m,Q=BA()),m=Q,m===t&&(m=b,r.substr(b,2)===Wi?(Q=Wi,b+=2):(Q=t,I===0&&Be(Zl)),Q!==t&&(Fe=m,Q=We()),m=Q,m===t&&(m=b,r.substr(b,2)===Ca?(Q=Ca,b+=2):(Q=t,I===0&&Be(Lg)),Q!==t&&(Fe=m,Q=uI()),m=Q,m===t&&(m=b,r.substr(b,2)===ed?(Q=ed,b+=2):(Q=t,I===0&&Be(gI)),Q!==t&&(Fe=m,Q=ar()),m=Q,m===t&&(m=b,r.substr(b,2)===Fn?(Q=Fn,b+=2):(Q=t,I===0&&Be($l)),Q!==t&&(Fe=m,Q=td()),m=Q,m===t&&(m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(Ms.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(ma)),F!==t?(Fe=m,Q=ln(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=gfe()))))))))),m}function gfe(){var m,Q,F,K,ce,Qe,ft,Bt,Vr,Ci,rs,YS;return m=b,r.charCodeAt(b)===92?(Q=es,b++):(Q=t,I===0&&Be(ut)),Q!==t?(F=US(),F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===ke?(Q=ke,b+=2):(Q=t,I===0&&Be(Og)),Q!==t?(F=b,K=b,ce=US(),ce!==t?(Qe=Ln(),Qe!==t?(ce=[ce,Qe],K=ce):(b=K,K=t)):(b=K,K=t),K===t&&(K=US()),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===ec?(Q=ec,b+=2):(Q=t,I===0&&Be(Us)),Q!==t?(F=b,K=b,ce=Ln(),ce!==t?(Qe=Ln(),Qe!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(ce=[ce,Qe,ft,Bt],K=ce):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=cn(F),m=Q):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===tc?(Q=tc,b+=2):(Q=t,I===0&&Be(bA)),Q!==t?(F=b,K=b,ce=Ln(),ce!==t?(Qe=Ln(),Qe!==t?(ft=Ln(),ft!==t?(Bt=Ln(),Bt!==t?(Vr=Ln(),Vr!==t?(Ci=Ln(),Ci!==t?(rs=Ln(),rs!==t?(YS=Ln(),YS!==t?(ce=[ce,Qe,ft,Bt,Vr,Ci,rs,YS],K=ce):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t)):(b=K,K=t),K!==t?F=r.substring(F,b):F=K,F!==t?(Fe=m,Q=Mg(F),m=Q):(b=m,m=t)):(b=m,m=t)))),m}function US(){var m;return Ug.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(Ea)),m}function Ln(){var m;return Ia.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be($e)),m}function ffe(){var m,Q,F,K,ce;if(m=b,Q=[],F=b,r.charCodeAt(b)===92?(K=es,b++):(K=t,I===0&&Be(ut)),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F===t&&(F=b,K=b,I++,ce=NU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t)),F!==t)for(;F!==t;)Q.push(F),F=b,r.charCodeAt(b)===92?(K=es,b++):(K=t,I===0&&Be(ut)),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F===t&&(F=b,K=b,I++,ce=NU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t));else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function KS(){var m,Q,F,K,ce,Qe;if(m=b,r.charCodeAt(b)===45?(Q=QA,b++):(Q=t,I===0&&Be(rc)),Q===t&&(r.charCodeAt(b)===43?(Q=Ks,b++):(Q=t,I===0&&Be(ic))),Q===t&&(Q=null),Q!==t){if(F=[],Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie)),K!==t)for(;K!==t;)F.push(K),Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie));else F=t;if(F!==t)if(r.charCodeAt(b)===46?(K=fI,b++):(K=t,I===0&&Be(rd)),K!==t){if(ce=[],Ge.test(r.charAt(b))?(Qe=r.charAt(b),b++):(Qe=t,I===0&&Be(ie)),Qe!==t)for(;Qe!==t;)ce.push(Qe),Ge.test(r.charAt(b))?(Qe=r.charAt(b),b++):(Qe=t,I===0&&Be(ie));else ce=t;ce!==t?(Fe=m,Q=Kg(Q,F,ce),m=Q):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;if(m===t){if(m=b,r.charCodeAt(b)===45?(Q=QA,b++):(Q=t,I===0&&Be(rc)),Q===t&&(r.charCodeAt(b)===43?(Q=Ks,b++):(Q=t,I===0&&Be(ic))),Q===t&&(Q=null),Q!==t){if(F=[],Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie)),K!==t)for(;K!==t;)F.push(K),Ge.test(r.charAt(b))?(K=r.charAt(b),b++):(K=t,I===0&&Be(ie));else F=t;F!==t?(Fe=m,Q=id(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;if(m===t&&(m=b,Q=GS(),Q!==t&&(Fe=m,Q=hI(Q)),m=Q,m===t&&(m=b,Q=sc(),Q!==t&&(Fe=m,Q=nc(Q)),m=Q,m===t)))if(m=b,r.charCodeAt(b)===40?(Q=ge,b++):(Q=t,I===0&&Be(_)),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();if(F!==t)if(K=DU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(r.charCodeAt(b)===41?(Qe=L,b++):(Qe=t,I===0&&Be(N)),Qe!==t?(Fe=m,Q=pI(K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t}return m}function HS(){var m,Q,F,K,ce,Qe,ft,Bt;if(m=b,Q=KS(),Q!==t){for(F=[],K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===42?(Qe=Hg,b++):(Qe=t,I===0&&Be(SA)),Qe===t&&(r.charCodeAt(b)===47?(Qe=Nr,b++):(Qe=t,I===0&&Be(dI))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Fe=K,ce=Hs(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t;for(;K!==t;){for(F.push(K),K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===42?(Qe=Hg,b++):(Qe=t,I===0&&Be(SA)),Qe===t&&(r.charCodeAt(b)===47?(Qe=Nr,b++):(Qe=t,I===0&&Be(dI))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=KS(),Bt!==t?(Fe=K,ce=Hs(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t}F!==t?(Fe=m,Q=Gs(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;return m}function DU(){var m,Q,F,K,ce,Qe,ft,Bt;if(m=b,Q=HS(),Q!==t){for(F=[],K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===43?(Qe=Ks,b++):(Qe=t,I===0&&Be(ic)),Qe===t&&(r.charCodeAt(b)===45?(Qe=QA,b++):(Qe=t,I===0&&Be(rc))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=HS(),Bt!==t?(Fe=K,ce=Gg(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t;for(;K!==t;){for(F.push(K),K=b,ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();if(ce!==t)if(r.charCodeAt(b)===43?(Qe=Ks,b++):(Qe=t,I===0&&Be(ic)),Qe===t&&(r.charCodeAt(b)===45?(Qe=QA,b++):(Qe=t,I===0&&Be(rc))),Qe!==t){for(ft=[],Bt=Me();Bt!==t;)ft.push(Bt),Bt=Me();ft!==t?(Bt=HS(),Bt!==t?(Fe=K,ce=Gg(Q,Qe,Bt),K=ce):(b=K,K=t)):(b=K,K=t)}else b=K,K=t;else b=K,K=t}F!==t?(Fe=m,Q=Gs(Q,F),m=Q):(b=m,m=t)}else b=m,m=t;return m}function kU(){var m,Q,F,K,ce,Qe;if(m=b,r.substr(b,3)===vA?(Q=vA,b+=3):(Q=t,I===0&&Be(R)),Q!==t){for(F=[],K=Me();K!==t;)F.push(K),K=Me();if(F!==t)if(K=DU(),K!==t){for(ce=[],Qe=Me();Qe!==t;)ce.push(Qe),Qe=Me();ce!==t?(r.substr(b,2)===q?(Qe=q,b+=2):(Qe=t,I===0&&Be(pe)),Qe!==t?(Fe=m,Q=Ne(K),m=Q):(b=m,m=t)):(b=m,m=t)}else b=m,m=t;else b=m,m=t}else b=m,m=t;return m}function RU(){var m,Q,F,K;return m=b,r.substr(b,2)===xe?(Q=xe,b+=2):(Q=t,I===0&&Be(qe)),Q!==t?(F=Kr(),F!==t?(r.charCodeAt(b)===41?(K=L,b++):(K=t,I===0&&Be(N)),K!==t?(Fe=m,Q=dt(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m}function GS(){var m,Q,F,K,ce,Qe;return m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,2)===vS?(K=vS,b+=2):(K=t,I===0&&Be(AU)),K!==t?(ce=wU(),ce!==t?(r.charCodeAt(b)===125?(Qe=Pe,b++):(Qe=t,I===0&&Be(Le)),Qe!==t?(Fe=m,Q=lU(F,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,3)===xS?(K=xS,b+=3):(K=t,I===0&&Be(cU)),K!==t?(Fe=m,Q=uU(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,2)===PS?(K=PS,b+=2):(K=t,I===0&&Be(gU)),K!==t?(ce=wU(),ce!==t?(r.charCodeAt(b)===125?(Qe=Pe,b++):(Qe=t,I===0&&Be(Le)),Qe!==t?(Fe=m,Q=fU(F,ce),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.substr(b,3)===DS?(K=DS,b+=3):(K=t,I===0&&Be(hU)),K!==t?(Fe=m,Q=pU(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.substr(b,2)===Ft?(Q=Ft,b+=2):(Q=t,I===0&&Be(Nn)),Q!==t?(F=sc(),F!==t?(r.charCodeAt(b)===125?(K=Pe,b++):(K=t,I===0&&Be(Le)),K!==t?(Fe=m,Q=kS(F),m=Q):(b=m,m=t)):(b=m,m=t)):(b=m,m=t),m===t&&(m=b,r.charCodeAt(b)===36?(Q=dU,b++):(Q=t,I===0&&Be(CU)),Q!==t?(F=sc(),F!==t?(Fe=m,Q=kS(F),m=Q):(b=m,m=t)):(b=m,m=t)))))),m}function hfe(){var m,Q,F;return m=b,Q=pfe(),Q!==t?(Fe=b,F=mU(Q),F?F=void 0:F=t,F!==t?(Fe=m,Q=EU(Q),m=Q):(b=m,m=t)):(b=m,m=t),m}function pfe(){var m,Q,F,K,ce;if(m=b,Q=[],F=b,K=b,I++,ce=TU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t),F!==t)for(;F!==t;)Q.push(F),F=b,K=b,I++,ce=TU(),I--,ce===t?K=void 0:(b=K,K=t),K!==t?(r.length>b?(ce=r.charAt(b),b++):(ce=t,I===0&&Be(wo)),ce!==t?(Fe=F,K=ln(ce),F=K):(b=F,F=t)):(b=F,F=t);else Q=t;return Q!==t&&(Fe=m,Q=kn(Q)),m=Q,m}function FU(){var m,Q,F;if(m=b,Q=[],RS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(FS)),F!==t)for(;F!==t;)Q.push(F),RS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(FS));else Q=t;return Q!==t&&(Fe=m,Q=NS()),m=Q,m}function sc(){var m,Q,F;if(m=b,Q=[],TS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(LS)),F!==t)for(;F!==t;)Q.push(F),TS.test(r.charAt(b))?(F=r.charAt(b),b++):(F=t,I===0&&Be(LS));else Q=t;return Q!==t&&(Fe=m,Q=NS()),m=Q,m}function NU(){var m;return IU.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(Yg)),m}function TU(){var m;return OS.test(r.charAt(b))?(m=r.charAt(b),b++):(m=t,I===0&&Be(MS)),m}function Me(){var m,Q;if(m=[],CI.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&Be(mI)),Q!==t)for(;Q!==t;)m.push(Q),CI.test(r.charAt(b))?(Q=r.charAt(b),b++):(Q=t,I===0&&Be(mI));else m=t;return m}if(k=n(),k!==t&&b===r.length)return k;throw k!==t&&b{"use strict";function phe(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function fc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,fc)}phe(fc,Error);fc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;gH&&(H=v,j=[]),j.push(ie))}function Le(ie,Y){return new fc(ie,null,null,Y)}function se(ie,Y,he){return new fc(fc.buildMessage(ie,Y),ie,Y,he)}function Ae(){var ie,Y,he,re;return ie=v,Y=be(),Y!==t?(r.charCodeAt(v)===47?(he=s,v++):(he=t,$===0&&Pe(o)),he!==t?(re=be(),re!==t?(D=ie,Y=a(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=be(),Y!==t&&(D=ie,Y=l(Y)),ie=Y),ie}function be(){var ie,Y,he,re;return ie=v,Y=fe(),Y!==t?(r.charCodeAt(v)===64?(he=c,v++):(he=t,$===0&&Pe(u)),he!==t?(re=Ge(),re!==t?(D=ie,Y=g(Y,re),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=fe(),Y!==t&&(D=ie,Y=f(Y)),ie=Y),ie}function fe(){var ie,Y,he,re,me;return ie=v,r.charCodeAt(v)===64?(Y=c,v++):(Y=t,$===0&&Pe(u)),Y!==t?(he=le(),he!==t?(r.charCodeAt(v)===47?(re=s,v++):(re=t,$===0&&Pe(o)),re!==t?(me=le(),me!==t?(D=ie,Y=h(),ie=Y):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t)):(v=ie,ie=t),ie===t&&(ie=v,Y=le(),Y!==t&&(D=ie,Y=h()),ie=Y),ie}function le(){var ie,Y,he;if(ie=v,Y=[],p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C)),he!==t)for(;he!==t;)Y.push(he),p.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(C));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}function Ge(){var ie,Y,he;if(ie=v,Y=[],w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B)),he!==t)for(;he!==t;)Y.push(he),w.test(r.charAt(v))?(he=r.charAt(v),v++):(he=t,$===0&&Pe(B));else Y=t;return Y!==t&&(D=ie,Y=h()),ie=Y,ie}if(V=n(),V!==t&&v===r.length)return V;throw V!==t&&v{"use strict";function XK(r){return typeof r>"u"||r===null}function Che(r){return typeof r=="object"&&r!==null}function mhe(r){return Array.isArray(r)?r:XK(r)?[]:[r]}function Ehe(r,e){var t,i,n,s;if(e)for(s=Object.keys(e),t=0,i=s.length;t{"use strict";function md(r,e){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}md.prototype=Object.create(Error.prototype);md.prototype.constructor=md;md.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t};_K.exports=md});var e2=y((YZe,$K)=>{"use strict";var ZK=pc();function wv(r,e,t,i,n){this.name=r,this.buffer=e,this.position=t,this.line=i,this.column=n}wv.prototype.getSnippet=function(e,t){var i,n,s,o,a;if(!this.buffer)return null;for(e=e||4,t=t||75,i="",n=this.position;n>0&&`\0\r -\x85\u2028\u2029`.indexOf(this.buffer.charAt(n-1))===-1;)if(n-=1,this.position-n>t/2-1){i=" ... ",n+=5;break}for(s="",o=this.position;ot/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(n,o),ZK.repeat(" ",e)+i+a+s+` -`+ZK.repeat(" ",e+this.position-n+i.length)+"^"};wv.prototype.toString=function(e){var t,i="";return this.name&&(i+='in "'+this.name+'" '),i+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(i+=`: -`+t)),i};$K.exports=wv});var Ai=y((jZe,r2)=>{"use strict";var t2=tf(),whe=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Bhe=["scalar","sequence","mapping"];function bhe(r){var e={};return r!==null&&Object.keys(r).forEach(function(t){r[t].forEach(function(i){e[String(i)]=t})}),e}function Qhe(r,e){if(e=e||{},Object.keys(e).forEach(function(t){if(whe.indexOf(t)===-1)throw new t2('Unknown option "'+t+'" is met in definition of "'+r+'" YAML type.')}),this.tag=r,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=bhe(e.styleAliases||null),Bhe.indexOf(this.kind)===-1)throw new t2('Unknown kind "'+this.kind+'" is specified for "'+r+'" YAML type.')}r2.exports=Qhe});var dc=y((qZe,n2)=>{"use strict";var i2=pc(),jI=tf(),She=Ai();function Bv(r,e,t){var i=[];return r.include.forEach(function(n){t=Bv(n,e,t)}),r[e].forEach(function(n){t.forEach(function(s,o){s.tag===n.tag&&s.kind===n.kind&&i.push(o)}),t.push(n)}),t.filter(function(n,s){return i.indexOf(s)===-1})}function vhe(){var r={scalar:{},sequence:{},mapping:{},fallback:{}},e,t;function i(n){r[n.kind][n.tag]=r.fallback[n.tag]=n}for(e=0,t=arguments.length;e{"use strict";var xhe=Ai();s2.exports=new xhe("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})});var A2=y((WZe,a2)=>{"use strict";var Phe=Ai();a2.exports=new Phe("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})});var c2=y((zZe,l2)=>{"use strict";var Dhe=Ai();l2.exports=new Dhe("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})});var qI=y((VZe,u2)=>{"use strict";var khe=dc();u2.exports=new khe({explicit:[o2(),A2(),c2()]})});var f2=y((XZe,g2)=>{"use strict";var Rhe=Ai();function Fhe(r){if(r===null)return!0;var e=r.length;return e===1&&r==="~"||e===4&&(r==="null"||r==="Null"||r==="NULL")}function Nhe(){return null}function The(r){return r===null}g2.exports=new Rhe("tag:yaml.org,2002:null",{kind:"scalar",resolve:Fhe,construct:Nhe,predicate:The,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var p2=y((_Ze,h2)=>{"use strict";var Lhe=Ai();function Ohe(r){if(r===null)return!1;var e=r.length;return e===4&&(r==="true"||r==="True"||r==="TRUE")||e===5&&(r==="false"||r==="False"||r==="FALSE")}function Mhe(r){return r==="true"||r==="True"||r==="TRUE"}function Uhe(r){return Object.prototype.toString.call(r)==="[object Boolean]"}h2.exports=new Lhe("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Ohe,construct:Mhe,predicate:Uhe,represent:{lowercase:function(r){return r?"true":"false"},uppercase:function(r){return r?"TRUE":"FALSE"},camelcase:function(r){return r?"True":"False"}},defaultStyle:"lowercase"})});var C2=y((ZZe,d2)=>{"use strict";var Khe=pc(),Hhe=Ai();function Ghe(r){return 48<=r&&r<=57||65<=r&&r<=70||97<=r&&r<=102}function Yhe(r){return 48<=r&&r<=55}function jhe(r){return 48<=r&&r<=57}function qhe(r){if(r===null)return!1;var e=r.length,t=0,i=!1,n;if(!e)return!1;if(n=r[t],(n==="-"||n==="+")&&(n=r[++t]),n==="0"){if(t+1===e)return!0;if(n=r[++t],n==="b"){for(t++;t=0?"0b"+r.toString(2):"-0b"+r.toString(2).slice(1)},octal:function(r){return r>=0?"0"+r.toString(8):"-0"+r.toString(8).slice(1)},decimal:function(r){return r.toString(10)},hexadecimal:function(r){return r>=0?"0x"+r.toString(16).toUpperCase():"-0x"+r.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var I2=y(($Ze,E2)=>{"use strict";var m2=pc(),zhe=Ai(),Vhe=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Xhe(r){return!(r===null||!Vhe.test(r)||r[r.length-1]==="_")}function _he(r){var e,t,i,n;return e=r.replace(/_/g,"").toLowerCase(),t=e[0]==="-"?-1:1,n=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?t===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(s){n.unshift(parseFloat(s,10))}),e=0,i=1,n.forEach(function(s){e+=s*i,i*=60}),t*e):t*parseFloat(e,10)}var Zhe=/^[-+]?[0-9]+e/;function $he(r,e){var t;if(isNaN(r))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===r)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===r)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(m2.isNegativeZero(r))return"-0.0";return t=r.toString(10),Zhe.test(t)?t.replace("e",".e"):t}function epe(r){return Object.prototype.toString.call(r)==="[object Number]"&&(r%1!==0||m2.isNegativeZero(r))}E2.exports=new zhe("tag:yaml.org,2002:float",{kind:"scalar",resolve:Xhe,construct:_he,predicate:epe,represent:$he,defaultStyle:"lowercase"})});var bv=y((e$e,y2)=>{"use strict";var tpe=dc();y2.exports=new tpe({include:[qI()],implicit:[f2(),p2(),C2(),I2()]})});var Qv=y((t$e,w2)=>{"use strict";var rpe=dc();w2.exports=new rpe({include:[bv()]})});var S2=y((r$e,Q2)=>{"use strict";var ipe=Ai(),B2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),b2=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function npe(r){return r===null?!1:B2.exec(r)!==null||b2.exec(r)!==null}function spe(r){var e,t,i,n,s,o,a,l=0,c=null,u,g,f;if(e=B2.exec(r),e===null&&(e=b2.exec(r)),e===null)throw new Error("Date resolve error");if(t=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(t,i,n));if(s=+e[4],o=+e[5],a=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(u=+e[10],g=+(e[11]||0),c=(u*60+g)*6e4,e[9]==="-"&&(c=-c)),f=new Date(Date.UTC(t,i,n,s,o,a,l)),c&&f.setTime(f.getTime()-c),f}function ope(r){return r.toISOString()}Q2.exports=new ipe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:npe,construct:spe,instanceOf:Date,represent:ope})});var x2=y((i$e,v2)=>{"use strict";var ape=Ai();function Ape(r){return r==="<<"||r===null}v2.exports=new ape("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ape})});var k2=y((n$e,D2)=>{"use strict";var Cc;try{P2=J,Cc=P2("buffer").Buffer}catch{}var P2,lpe=Ai(),Sv=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function cpe(r){if(r===null)return!1;var e,t,i=0,n=r.length,s=Sv;for(t=0;t64)){if(e<0)return!1;i+=6}return i%8===0}function upe(r){var e,t,i=r.replace(/[\r\n=]/g,""),n=i.length,s=Sv,o=0,a=[];for(e=0;e>16&255),a.push(o>>8&255),a.push(o&255)),o=o<<6|s.indexOf(i.charAt(e));return t=n%4*6,t===0?(a.push(o>>16&255),a.push(o>>8&255),a.push(o&255)):t===18?(a.push(o>>10&255),a.push(o>>2&255)):t===12&&a.push(o>>4&255),Cc?Cc.from?Cc.from(a):new Cc(a):a}function gpe(r){var e="",t=0,i,n,s=r.length,o=Sv;for(i=0;i>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]),t=(t<<8)+r[i];return n=s%3,n===0?(e+=o[t>>18&63],e+=o[t>>12&63],e+=o[t>>6&63],e+=o[t&63]):n===2?(e+=o[t>>10&63],e+=o[t>>4&63],e+=o[t<<2&63],e+=o[64]):n===1&&(e+=o[t>>2&63],e+=o[t<<4&63],e+=o[64],e+=o[64]),e}function fpe(r){return Cc&&Cc.isBuffer(r)}D2.exports=new lpe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cpe,construct:upe,predicate:fpe,represent:gpe})});var F2=y((s$e,R2)=>{"use strict";var hpe=Ai(),ppe=Object.prototype.hasOwnProperty,dpe=Object.prototype.toString;function Cpe(r){if(r===null)return!0;var e=[],t,i,n,s,o,a=r;for(t=0,i=a.length;t{"use strict";var Epe=Ai(),Ipe=Object.prototype.toString;function ype(r){if(r===null)return!0;var e,t,i,n,s,o=r;for(s=new Array(o.length),e=0,t=o.length;e{"use strict";var Bpe=Ai(),bpe=Object.prototype.hasOwnProperty;function Qpe(r){if(r===null)return!0;var e,t=r;for(e in t)if(bpe.call(t,e)&&t[e]!==null)return!1;return!0}function Spe(r){return r!==null?r:{}}L2.exports=new Bpe("tag:yaml.org,2002:set",{kind:"mapping",resolve:Qpe,construct:Spe})});var nf=y((A$e,M2)=>{"use strict";var vpe=dc();M2.exports=new vpe({include:[Qv()],implicit:[S2(),x2()],explicit:[k2(),F2(),T2(),O2()]})});var K2=y((l$e,U2)=>{"use strict";var xpe=Ai();function Ppe(){return!0}function Dpe(){}function kpe(){return""}function Rpe(r){return typeof r>"u"}U2.exports=new xpe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:Ppe,construct:Dpe,predicate:Rpe,represent:kpe})});var G2=y((c$e,H2)=>{"use strict";var Fpe=Ai();function Npe(r){if(r===null||r.length===0)return!1;var e=r,t=/\/([gim]*)$/.exec(r),i="";return!(e[0]==="/"&&(t&&(i=t[1]),i.length>3||e[e.length-i.length-1]!=="/"))}function Tpe(r){var e=r,t=/\/([gim]*)$/.exec(r),i="";return e[0]==="/"&&(t&&(i=t[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function Lpe(r){var e="/"+r.source+"/";return r.global&&(e+="g"),r.multiline&&(e+="m"),r.ignoreCase&&(e+="i"),e}function Ope(r){return Object.prototype.toString.call(r)==="[object RegExp]"}H2.exports=new Fpe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:Npe,construct:Tpe,predicate:Ope,represent:Lpe})});var q2=y((u$e,j2)=>{"use strict";var JI;try{Y2=J,JI=Y2("esprima")}catch{typeof window<"u"&&(JI=window.esprima)}var Y2,Mpe=Ai();function Upe(r){if(r===null)return!1;try{var e="("+r+")",t=JI.parse(e,{range:!0});return!(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function Kpe(r){var e="("+r+")",t=JI.parse(e,{range:!0}),i=[],n;if(t.type!=="Program"||t.body.length!==1||t.body[0].type!=="ExpressionStatement"||t.body[0].expression.type!=="ArrowFunctionExpression"&&t.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return t.body[0].expression.params.forEach(function(s){i.push(s.name)}),n=t.body[0].expression.body.range,t.body[0].expression.body.type==="BlockStatement"?new Function(i,e.slice(n[0]+1,n[1]-1)):new Function(i,"return "+e.slice(n[0],n[1]))}function Hpe(r){return r.toString()}function Gpe(r){return Object.prototype.toString.call(r)==="[object Function]"}j2.exports=new Mpe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:Upe,construct:Kpe,predicate:Gpe,represent:Hpe})});var Ed=y((g$e,W2)=>{"use strict";var J2=dc();W2.exports=J2.DEFAULT=new J2({include:[nf()],explicit:[K2(),G2(),q2()]})});var gH=y((f$e,Id)=>{"use strict";var Qa=pc(),eH=tf(),Ype=e2(),tH=nf(),jpe=Ed(),NA=Object.prototype.hasOwnProperty,WI=1,rH=2,iH=3,zI=4,vv=1,qpe=2,z2=3,Jpe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Wpe=/[\x85\u2028\u2029]/,zpe=/[,\[\]\{\}]/,nH=/^(?:!|!!|![a-z\-]+!)$/i,sH=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function V2(r){return Object.prototype.toString.call(r)}function So(r){return r===10||r===13}function Ec(r){return r===9||r===32}function fn(r){return r===9||r===32||r===10||r===13}function sf(r){return r===44||r===91||r===93||r===123||r===125}function Vpe(r){var e;return 48<=r&&r<=57?r-48:(e=r|32,97<=e&&e<=102?e-97+10:-1)}function Xpe(r){return r===120?2:r===117?4:r===85?8:0}function _pe(r){return 48<=r&&r<=57?r-48:-1}function X2(r){return r===48?"\0":r===97?"\x07":r===98?"\b":r===116||r===9?" ":r===110?` -`:r===118?"\v":r===102?"\f":r===114?"\r":r===101?"\x1B":r===32?" ":r===34?'"':r===47?"/":r===92?"\\":r===78?"\x85":r===95?"\xA0":r===76?"\u2028":r===80?"\u2029":""}function Zpe(r){return r<=65535?String.fromCharCode(r):String.fromCharCode((r-65536>>10)+55296,(r-65536&1023)+56320)}var oH=new Array(256),aH=new Array(256);for(mc=0;mc<256;mc++)oH[mc]=X2(mc)?1:0,aH[mc]=X2(mc);var mc;function $pe(r,e){this.input=r,this.filename=e.filename||null,this.schema=e.schema||jpe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=r.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function AH(r,e){return new eH(e,new Ype(r.filename,r.input,r.position,r.line,r.position-r.lineStart))}function gt(r,e){throw AH(r,e)}function VI(r,e){r.onWarning&&r.onWarning.call(null,AH(r,e))}var _2={YAML:function(e,t,i){var n,s,o;e.version!==null&>(e,"duplication of %YAML directive"),i.length!==1&>(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&>(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),o=parseInt(n[2],10),s!==1&>(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=o<2,o!==1&&o!==2&&VI(e,"unsupported YAML version of the document")},TAG:function(e,t,i){var n,s;i.length!==2&>(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],nH.test(n)||gt(e,"ill-formed tag handle (first argument) of the TAG directive"),NA.call(e.tagMap,n)&>(e,'there is a previously declared suffix for "'+n+'" tag handle'),sH.test(s)||gt(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[n]=s}};function FA(r,e,t,i){var n,s,o,a;if(e1&&(r.result+=Qa.repeat(` -`,e-1))}function ede(r,e,t){var i,n,s,o,a,l,c,u,g=r.kind,f=r.result,h;if(h=r.input.charCodeAt(r.position),fn(h)||sf(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=r.input.charCodeAt(r.position+1),fn(n)||t&&sf(n)))return!1;for(r.kind="scalar",r.result="",s=o=r.position,a=!1;h!==0;){if(h===58){if(n=r.input.charCodeAt(r.position+1),fn(n)||t&&sf(n))break}else if(h===35){if(i=r.input.charCodeAt(r.position-1),fn(i))break}else{if(r.position===r.lineStart&&XI(r)||t&&sf(h))break;if(So(h))if(l=r.line,c=r.lineStart,u=r.lineIndent,_r(r,!1,-1),r.lineIndent>=e){a=!0,h=r.input.charCodeAt(r.position);continue}else{r.position=o,r.line=l,r.lineStart=c,r.lineIndent=u;break}}a&&(FA(r,s,o,!1),Pv(r,r.line-l),s=o=r.position,a=!1),Ec(h)||(o=r.position+1),h=r.input.charCodeAt(++r.position)}return FA(r,s,o,!1),r.result?!0:(r.kind=g,r.result=f,!1)}function tde(r,e){var t,i,n;if(t=r.input.charCodeAt(r.position),t!==39)return!1;for(r.kind="scalar",r.result="",r.position++,i=n=r.position;(t=r.input.charCodeAt(r.position))!==0;)if(t===39)if(FA(r,i,r.position,!0),t=r.input.charCodeAt(++r.position),t===39)i=r.position,r.position++,n=r.position;else return!0;else So(t)?(FA(r,i,n,!0),Pv(r,_r(r,!1,e)),i=n=r.position):r.position===r.lineStart&&XI(r)?gt(r,"unexpected end of the document within a single quoted scalar"):(r.position++,n=r.position);gt(r,"unexpected end of the stream within a single quoted scalar")}function rde(r,e){var t,i,n,s,o,a;if(a=r.input.charCodeAt(r.position),a!==34)return!1;for(r.kind="scalar",r.result="",r.position++,t=i=r.position;(a=r.input.charCodeAt(r.position))!==0;){if(a===34)return FA(r,t,r.position,!0),r.position++,!0;if(a===92){if(FA(r,t,r.position,!0),a=r.input.charCodeAt(++r.position),So(a))_r(r,!1,e);else if(a<256&&oH[a])r.result+=aH[a],r.position++;else if((o=Xpe(a))>0){for(n=o,s=0;n>0;n--)a=r.input.charCodeAt(++r.position),(o=Vpe(a))>=0?s=(s<<4)+o:gt(r,"expected hexadecimal character");r.result+=Zpe(s),r.position++}else gt(r,"unknown escape sequence");t=i=r.position}else So(a)?(FA(r,t,i,!0),Pv(r,_r(r,!1,e)),t=i=r.position):r.position===r.lineStart&&XI(r)?gt(r,"unexpected end of the document within a double quoted scalar"):(r.position++,i=r.position)}gt(r,"unexpected end of the stream within a double quoted scalar")}function ide(r,e){var t=!0,i,n=r.tag,s,o=r.anchor,a,l,c,u,g,f={},h,p,C,w;if(w=r.input.charCodeAt(r.position),w===91)l=93,g=!1,s=[];else if(w===123)l=125,g=!0,s={};else return!1;for(r.anchor!==null&&(r.anchorMap[r.anchor]=s),w=r.input.charCodeAt(++r.position);w!==0;){if(_r(r,!0,e),w=r.input.charCodeAt(r.position),w===l)return r.position++,r.tag=n,r.anchor=o,r.kind=g?"mapping":"sequence",r.result=s,!0;t||gt(r,"missed comma between flow collection entries"),p=h=C=null,c=u=!1,w===63&&(a=r.input.charCodeAt(r.position+1),fn(a)&&(c=u=!0,r.position++,_r(r,!0,e))),i=r.line,af(r,e,WI,!1,!0),p=r.tag,h=r.result,_r(r,!0,e),w=r.input.charCodeAt(r.position),(u||r.line===i)&&w===58&&(c=!0,w=r.input.charCodeAt(++r.position),_r(r,!0,e),af(r,e,WI,!1,!0),C=r.result),g?of(r,s,f,p,h,C):c?s.push(of(r,null,f,p,h,C)):s.push(h),_r(r,!0,e),w=r.input.charCodeAt(r.position),w===44?(t=!0,w=r.input.charCodeAt(++r.position)):t=!1}gt(r,"unexpected end of the stream within a flow collection")}function nde(r,e){var t,i,n=vv,s=!1,o=!1,a=e,l=0,c=!1,u,g;if(g=r.input.charCodeAt(r.position),g===124)i=!1;else if(g===62)i=!0;else return!1;for(r.kind="scalar",r.result="";g!==0;)if(g=r.input.charCodeAt(++r.position),g===43||g===45)vv===n?n=g===43?z2:qpe:gt(r,"repeat of a chomping mode identifier");else if((u=_pe(g))>=0)u===0?gt(r,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?gt(r,"repeat of an indentation width identifier"):(a=e+u-1,o=!0);else break;if(Ec(g)){do g=r.input.charCodeAt(++r.position);while(Ec(g));if(g===35)do g=r.input.charCodeAt(++r.position);while(!So(g)&&g!==0)}for(;g!==0;){for(xv(r),r.lineIndent=0,g=r.input.charCodeAt(r.position);(!o||r.lineIndenta&&(a=r.lineIndent),So(g)){l++;continue}if(r.lineIndente)&&l!==0)gt(r,"bad indentation of a sequence entry");else if(r.lineIndente)&&(af(r,e,zI,!0,n)&&(p?f=r.result:h=r.result),p||(of(r,c,u,g,f,h,s,o),g=f=h=null),_r(r,!0,-1),w=r.input.charCodeAt(r.position)),r.lineIndent>e&&w!==0)gt(r,"bad indentation of a mapping entry");else if(r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndente?l=1:r.lineIndent===e?l=0:r.lineIndent tag; it should be "scalar", not "'+r.kind+'"'),g=0,f=r.implicitTypes.length;g tag; it should be "'+h.kind+'", not "'+r.kind+'"'),h.resolve(r.result)?(r.result=h.construct(r.result),r.anchor!==null&&(r.anchorMap[r.anchor]=r.result)):gt(r,"cannot resolve a node with !<"+r.tag+"> explicit tag")):gt(r,"unknown tag !<"+r.tag+">");return r.listener!==null&&r.listener("close",r),r.tag!==null||r.anchor!==null||u}function lde(r){var e=r.position,t,i,n,s=!1,o;for(r.version=null,r.checkLineBreaks=r.legacy,r.tagMap={},r.anchorMap={};(o=r.input.charCodeAt(r.position))!==0&&(_r(r,!0,-1),o=r.input.charCodeAt(r.position),!(r.lineIndent>0||o!==37));){for(s=!0,o=r.input.charCodeAt(++r.position),t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);for(i=r.input.slice(t,r.position),n=[],i.length<1&>(r,"directive name must not be less than one character in length");o!==0;){for(;Ec(o);)o=r.input.charCodeAt(++r.position);if(o===35){do o=r.input.charCodeAt(++r.position);while(o!==0&&!So(o));break}if(So(o))break;for(t=r.position;o!==0&&!fn(o);)o=r.input.charCodeAt(++r.position);n.push(r.input.slice(t,r.position))}o!==0&&xv(r),NA.call(_2,i)?_2[i](r,i,n):VI(r,'unknown document directive "'+i+'"')}if(_r(r,!0,-1),r.lineIndent===0&&r.input.charCodeAt(r.position)===45&&r.input.charCodeAt(r.position+1)===45&&r.input.charCodeAt(r.position+2)===45?(r.position+=3,_r(r,!0,-1)):s&>(r,"directives end mark is expected"),af(r,r.lineIndent-1,zI,!1,!0),_r(r,!0,-1),r.checkLineBreaks&&Wpe.test(r.input.slice(e,r.position))&&VI(r,"non-ASCII line breaks are interpreted as content"),r.documents.push(r.result),r.position===r.lineStart&&XI(r)){r.input.charCodeAt(r.position)===46&&(r.position+=3,_r(r,!0,-1));return}if(r.position"u"&&(t=e,e=null);var i=lH(r,t);if(typeof e!="function")return i;for(var n=0,s=i.length;n"u"&&(t=e,e=null),cH(r,e,Qa.extend({schema:tH},t))}function ude(r,e){return uH(r,Qa.extend({schema:tH},e))}Id.exports.loadAll=cH;Id.exports.load=uH;Id.exports.safeLoadAll=cde;Id.exports.safeLoad=ude});var TH=y((h$e,Fv)=>{"use strict";var wd=pc(),Bd=tf(),gde=Ed(),fde=nf(),IH=Object.prototype.toString,yH=Object.prototype.hasOwnProperty,hde=9,yd=10,pde=13,dde=32,Cde=33,mde=34,wH=35,Ede=37,Ide=38,yde=39,wde=42,BH=44,Bde=45,bH=58,bde=61,Qde=62,Sde=63,vde=64,QH=91,SH=93,xde=96,vH=123,Pde=124,xH=125,Ti={};Ti[0]="\\0";Ti[7]="\\a";Ti[8]="\\b";Ti[9]="\\t";Ti[10]="\\n";Ti[11]="\\v";Ti[12]="\\f";Ti[13]="\\r";Ti[27]="\\e";Ti[34]='\\"';Ti[92]="\\\\";Ti[133]="\\N";Ti[160]="\\_";Ti[8232]="\\L";Ti[8233]="\\P";var Dde=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function kde(r,e){var t,i,n,s,o,a,l;if(e===null)return{};for(t={},i=Object.keys(e),n=0,s=i.length;n0?r.charCodeAt(s-1):null,f=f&&pH(o,a)}else{for(s=0;si&&r[g+1]!==" ",g=s);else if(!Af(o))return _I;a=s>0?r.charCodeAt(s-1):null,f=f&&pH(o,a)}c=c||u&&s-g-1>i&&r[g+1]!==" "}return!l&&!c?f&&!n(r)?DH:kH:t>9&&PH(r)?_I:c?FH:RH}function Ode(r,e,t,i){r.dump=function(){if(e.length===0)return"''";if(!r.noCompatMode&&Dde.indexOf(e)!==-1)return"'"+e+"'";var n=r.indent*Math.max(1,t),s=r.lineWidth===-1?-1:Math.max(Math.min(r.lineWidth,40),r.lineWidth-n),o=i||r.flowLevel>-1&&t>=r.flowLevel;function a(l){return Fde(r,l)}switch(Lde(e,o,r.indent,s,a)){case DH:return e;case kH:return"'"+e.replace(/'/g,"''")+"'";case RH:return"|"+dH(e,r.indent)+CH(hH(e,n));case FH:return">"+dH(e,r.indent)+CH(hH(Mde(e,s),n));case _I:return'"'+Ude(e,s)+'"';default:throw new Bd("impossible error: invalid scalar style")}}()}function dH(r,e){var t=PH(r)?String(e):"",i=r[r.length-1]===` -`,n=i&&(r[r.length-2]===` -`||r===` -`),s=n?"+":i?"":"-";return t+s+` -`}function CH(r){return r[r.length-1]===` -`?r.slice(0,-1):r}function Mde(r,e){for(var t=/(\n+)([^\n]*)/g,i=function(){var c=r.indexOf(` -`);return c=c!==-1?c:r.length,t.lastIndex=c,mH(r.slice(0,c),e)}(),n=r[0]===` -`||r[0]===" ",s,o;o=t.exec(r);){var a=o[1],l=o[2];s=l[0]===" ",i+=a+(!n&&!s&&l!==""?` -`:"")+mH(l,e),n=s}return i}function mH(r,e){if(r===""||r[0]===" ")return r;for(var t=/ [^ ]/g,i,n=0,s,o=0,a=0,l="";i=t.exec(r);)a=i.index,a-n>e&&(s=o>n?o:a,l+=` -`+r.slice(n,s),n=s+1),o=a;return l+=` -`,r.length-n>e&&o>n?l+=r.slice(n,o)+` -`+r.slice(o+1):l+=r.slice(n),l.slice(1)}function Ude(r){for(var e="",t,i,n,s=0;s=55296&&t<=56319&&(i=r.charCodeAt(s+1),i>=56320&&i<=57343)){e+=fH((t-55296)*1024+i-56320+65536),s++;continue}n=Ti[t],e+=!n&&Af(t)?r[s]:n||fH(t)}return e}function Kde(r,e,t){var i="",n=r.tag,s,o;for(s=0,o=t.length;s1024&&(u+="? "),u+=r.dump+(r.condenseFlow?'"':"")+":"+(r.condenseFlow?"":" "),Ic(r,e,c,!1,!1)&&(u+=r.dump,i+=u));r.tag=n,r.dump="{"+i+"}"}function Yde(r,e,t,i){var n="",s=r.tag,o=Object.keys(t),a,l,c,u,g,f;if(r.sortKeys===!0)o.sort();else if(typeof r.sortKeys=="function")o.sort(r.sortKeys);else if(r.sortKeys)throw new Bd("sortKeys must be a boolean or a function");for(a=0,l=o.length;a1024,g&&(r.dump&&yd===r.dump.charCodeAt(0)?f+="?":f+="? "),f+=r.dump,g&&(f+=Dv(r,e)),Ic(r,e+1,u,!0,g)&&(r.dump&&yd===r.dump.charCodeAt(0)?f+=":":f+=": ",f+=r.dump,n+=f));r.tag=s,r.dump=n||"{}"}function EH(r,e,t){var i,n,s,o,a,l;for(n=t?r.explicitTypes:r.implicitTypes,s=0,o=n.length;s tag resolver accepts not "'+l+'" style');r.dump=i}return!0}return!1}function Ic(r,e,t,i,n,s){r.tag=null,r.dump=t,EH(r,t,!1)||EH(r,t,!0);var o=IH.call(r.dump);i&&(i=r.flowLevel<0||r.flowLevel>e);var a=o==="[object Object]"||o==="[object Array]",l,c;if(a&&(l=r.duplicates.indexOf(t),c=l!==-1),(r.tag!==null&&r.tag!=="?"||c||r.indent!==2&&e>0)&&(n=!1),c&&r.usedDuplicates[l])r.dump="*ref_"+l;else{if(a&&c&&!r.usedDuplicates[l]&&(r.usedDuplicates[l]=!0),o==="[object Object]")i&&Object.keys(r.dump).length!==0?(Yde(r,e,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Gde(r,e,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump));else if(o==="[object Array]"){var u=r.noArrayIndent&&e>0?e-1:e;i&&r.dump.length!==0?(Hde(r,u,r.dump,n),c&&(r.dump="&ref_"+l+r.dump)):(Kde(r,u,r.dump),c&&(r.dump="&ref_"+l+" "+r.dump))}else if(o==="[object String]")r.tag!=="?"&&Ode(r,r.dump,e,s);else{if(r.skipInvalid)return!1;throw new Bd("unacceptable kind of an object to dump "+o)}r.tag!==null&&r.tag!=="?"&&(r.dump="!<"+r.tag+"> "+r.dump)}return!0}function jde(r,e){var t=[],i=[],n,s;for(kv(r,t,i),n=0,s=i.length;n{"use strict";var ZI=gH(),LH=TH();function $I(r){return function(){throw new Error("Function "+r+" is deprecated and cannot be used.")}}Tr.exports.Type=Ai();Tr.exports.Schema=dc();Tr.exports.FAILSAFE_SCHEMA=qI();Tr.exports.JSON_SCHEMA=bv();Tr.exports.CORE_SCHEMA=Qv();Tr.exports.DEFAULT_SAFE_SCHEMA=nf();Tr.exports.DEFAULT_FULL_SCHEMA=Ed();Tr.exports.load=ZI.load;Tr.exports.loadAll=ZI.loadAll;Tr.exports.safeLoad=ZI.safeLoad;Tr.exports.safeLoadAll=ZI.safeLoadAll;Tr.exports.dump=LH.dump;Tr.exports.safeDump=LH.safeDump;Tr.exports.YAMLException=tf();Tr.exports.MINIMAL_SCHEMA=qI();Tr.exports.SAFE_SCHEMA=nf();Tr.exports.DEFAULT_SCHEMA=Ed();Tr.exports.scan=$I("scan");Tr.exports.parse=$I("parse");Tr.exports.compose=$I("compose");Tr.exports.addConstructor=$I("addConstructor")});var UH=y((d$e,MH)=>{"use strict";var Jde=OH();MH.exports=Jde});var HH=y((C$e,KH)=>{"use strict";function Wde(r,e){function t(){this.constructor=r}t.prototype=e.prototype,r.prototype=new t}function yc(r,e,t,i){this.message=r,this.expected=e,this.found=t,this.location=i,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,yc)}Wde(yc,Error);yc.buildMessage=function(r,e){var t={literal:function(c){return'"'+n(c.text)+'"'},class:function(c){var u="",g;for(g=0;g0){for(g=1,f=1;g({[Ne]:pe})))},H=function(R){return R},j=function(R){return R},$=Ms("correct indentation"),V=" ",W=ar(" ",!1),Z=function(R){return R.length===vA*Gg},A=function(R){return R.length===(vA+1)*Gg},ae=function(){return vA++,!0},ge=function(){return vA--,!0},_=function(){return Lg()},L=Ms("pseudostring"),N=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,ue=Fn(["\r",` -`," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),we=/^[^\r\n\t ,\][{}:#"']/,Te=Fn(["\r",` -`," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),Pe=function(){return Lg().replace(/^ *| *$/g,"")},Le="--",se=ar("--",!1),Ae=/^[a-zA-Z\/0-9]/,be=Fn([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),fe=/^[^\r\n\t :,]/,le=Fn(["\r",` -`," "," ",":",","],!0,!1),Ge="null",ie=ar("null",!1),Y=function(){return null},he="true",re=ar("true",!1),me=function(){return!0},tt="false",Rt=ar("false",!1),It=function(){return!1},Ur=Ms("string"),oi='"',pi=ar('"',!1),pr=function(){return""},di=function(R){return R},ai=function(R){return R.join("")},Os=/^[^"\\\0-\x1F\x7F]/,dr=Fn(['"',"\\",["\0",""],"\x7F"],!0,!1),Bi='\\"',_n=ar('\\"',!1),pa=function(){return'"'},EA="\\\\",kg=ar("\\\\",!1),Zn=function(){return"\\"},IA="\\/",da=ar("\\/",!1),Jp=function(){return"/"},yA="\\b",wA=ar("\\b",!1),Br=function(){return"\b"},Vl="\\f",Rg=ar("\\f",!1),Eo=function(){return"\f"},Fg="\\n",Wp=ar("\\n",!1),zp=function(){return` -`},Pr="\\r",oe=ar("\\r",!1),Io=function(){return"\r"},kn="\\t",Ng=ar("\\t",!1),bt=function(){return" "},Xl="\\u",Rn=ar("\\u",!1),$n=function(R,q,pe,Ne){return String.fromCharCode(parseInt(`0x${R}${q}${pe}${Ne}`))},es=/^[0-9a-fA-F]/,ut=Fn([["0","9"],["a","f"],["A","F"]],!1,!1),yo=Ms("blank space"),at=/^[ \t]/,ln=Fn([" "," "],!1,!1),S=Ms("white space"),Lt=/^[ \t\n\r]/,Tg=Fn([" "," ",` -`,"\r"],!1,!1),_l=`\r -`,Vp=ar(`\r -`,!1),Xp=` -`,_p=ar(` -`,!1),Zp="\r",$p=ar("\r",!1),G=0,yt=0,BA=[{line:1,column:1}],Wi=0,Zl=[],We=0,Ca;if("startRule"in e){if(!(e.startRule in i))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');n=i[e.startRule]}function Lg(){return r.substring(yt,G)}function uI(){return cn(yt,G)}function ed(R,q){throw q=q!==void 0?q:cn(yt,G),ec([Ms(R)],r.substring(yt,G),q)}function gI(R,q){throw q=q!==void 0?q:cn(yt,G),Og(R,q)}function ar(R,q){return{type:"literal",text:R,ignoreCase:q}}function Fn(R,q,pe){return{type:"class",parts:R,inverted:q,ignoreCase:pe}}function $l(){return{type:"any"}}function td(){return{type:"end"}}function Ms(R){return{type:"other",description:R}}function ma(R){var q=BA[R],pe;if(q)return q;for(pe=R-1;!BA[pe];)pe--;for(q=BA[pe],q={line:q.line,column:q.column};peWi&&(Wi=G,Zl=[]),Zl.push(R))}function Og(R,q){return new yc(R,null,null,q)}function ec(R,q,pe){return new yc(yc.buildMessage(R,q),R,q,pe)}function Us(){var R;return R=Mg(),R}function tc(){var R,q,pe;for(R=G,q=[],pe=bA();pe!==t;)q.push(pe),pe=bA();return q!==t&&(yt=R,q=s(q)),R=q,R}function bA(){var R,q,pe,Ne,xe;return R=G,q=Ia(),q!==t?(r.charCodeAt(G)===45?(pe=o,G++):(pe=t,We===0&&ke(a)),pe!==t?(Ne=Nr(),Ne!==t?(xe=Ea(),xe!==t?(yt=R,q=l(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R}function Mg(){var R,q,pe;for(R=G,q=[],pe=Ug();pe!==t;)q.push(pe),pe=Ug();return q!==t&&(yt=R,q=c(q)),R=q,R}function Ug(){var R,q,pe,Ne,xe,qe,dt,Ft,Nn;if(R=G,q=Nr(),q===t&&(q=null),q!==t){if(pe=G,r.charCodeAt(G)===35?(Ne=u,G++):(Ne=t,We===0&&ke(g)),Ne!==t){if(xe=[],qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&ke(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t),qe!==t)for(;qe!==t;)xe.push(qe),qe=G,dt=G,We++,Ft=Gs(),We--,Ft===t?dt=void 0:(G=dt,dt=t),dt!==t?(r.length>G?(Ft=r.charAt(G),G++):(Ft=t,We===0&&ke(f)),Ft!==t?(dt=[dt,Ft],qe=dt):(G=qe,qe=t)):(G=qe,qe=t);else xe=t;xe!==t?(Ne=[Ne,xe],pe=Ne):(G=pe,pe=t)}else G=pe,pe=t;if(pe===t&&(pe=null),pe!==t){if(Ne=[],xe=Hs(),xe!==t)for(;xe!==t;)Ne.push(xe),xe=Hs();else Ne=t;Ne!==t?(yt=R,q=h(),R=q):(G=R,R=t)}else G=R,R=t}else G=R,R=t;if(R===t&&(R=G,q=Ia(),q!==t?(pe=rc(),pe!==t?(Ne=Nr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&ke(C)),xe!==t?(qe=Nr(),qe===t&&(qe=null),qe!==t?(dt=Ea(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Ia(),q!==t?(pe=Ks(),pe!==t?(Ne=Nr(),Ne===t&&(Ne=null),Ne!==t?(r.charCodeAt(G)===58?(xe=p,G++):(xe=t,We===0&&ke(C)),xe!==t?(qe=Nr(),qe===t&&(qe=null),qe!==t?(dt=Ea(),dt!==t?(yt=R,q=w(pe,dt),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))){if(R=G,q=Ia(),q!==t)if(pe=Ks(),pe!==t)if(Ne=Nr(),Ne!==t)if(xe=fI(),xe!==t){if(qe=[],dt=Hs(),dt!==t)for(;dt!==t;)qe.push(dt),dt=Hs();else qe=t;qe!==t?(yt=R,q=w(pe,xe),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;else G=R,R=t;else G=R,R=t;if(R===t)if(R=G,q=Ia(),q!==t)if(pe=Ks(),pe!==t){if(Ne=[],xe=G,qe=Nr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&ke(v)),dt!==t?(Ft=Nr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Ks(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t),xe!==t)for(;xe!==t;)Ne.push(xe),xe=G,qe=Nr(),qe===t&&(qe=null),qe!==t?(r.charCodeAt(G)===44?(dt=B,G++):(dt=t,We===0&&ke(v)),dt!==t?(Ft=Nr(),Ft===t&&(Ft=null),Ft!==t?(Nn=Ks(),Nn!==t?(yt=xe,qe=D(pe,Nn),xe=qe):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t)):(G=xe,xe=t);else Ne=t;Ne!==t?(xe=Nr(),xe===t&&(xe=null),xe!==t?(r.charCodeAt(G)===58?(qe=p,G++):(qe=t,We===0&&ke(C)),qe!==t?(dt=Nr(),dt===t&&(dt=null),dt!==t?(Ft=Ea(),Ft!==t?(yt=R,q=T(pe,Ne,Ft),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)}else G=R,R=t;else G=R,R=t}return R}function Ea(){var R,q,pe,Ne,xe,qe,dt;if(R=G,q=G,We++,pe=G,Ne=Gs(),Ne!==t?(xe=$e(),xe!==t?(r.charCodeAt(G)===45?(qe=o,G++):(qe=t,We===0&&ke(a)),qe!==t?(dt=Nr(),dt!==t?(Ne=[Ne,xe,qe,dt],pe=Ne):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t)):(G=pe,pe=t),We--,pe!==t?(G=q,q=void 0):q=t,q!==t?(pe=Hs(),pe!==t?(Ne=wo(),Ne!==t?(xe=tc(),xe!==t?(qe=QA(),qe!==t?(yt=R,q=H(xe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,q=Gs(),q!==t?(pe=wo(),pe!==t?(Ne=Mg(),Ne!==t?(xe=QA(),xe!==t?(yt=R,q=H(Ne),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t),R===t))if(R=G,q=ic(),q!==t){if(pe=[],Ne=Hs(),Ne!==t)for(;Ne!==t;)pe.push(Ne),Ne=Hs();else pe=t;pe!==t?(yt=R,q=j(q),R=q):(G=R,R=t)}else G=R,R=t;return R}function Ia(){var R,q,pe;for(We++,R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));return q!==t?(yt=G,pe=Z(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),We--,R===t&&(q=t,We===0&&ke($)),R}function $e(){var R,q,pe;for(R=G,q=[],r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));pe!==t;)q.push(pe),r.charCodeAt(G)===32?(pe=V,G++):(pe=t,We===0&&ke(W));return q!==t?(yt=G,pe=A(q),pe?pe=void 0:pe=t,pe!==t?(q=[q,pe],R=q):(G=R,R=t)):(G=R,R=t),R}function wo(){var R;return yt=G,R=ae(),R?R=void 0:R=t,R}function QA(){var R;return yt=G,R=ge(),R?R=void 0:R=t,R}function rc(){var R;return R=nc(),R===t&&(R=rd()),R}function Ks(){var R,q,pe;if(R=nc(),R===t){if(R=G,q=[],pe=Kg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Kg();else q=t;q!==t&&(yt=R,q=_()),R=q}return R}function ic(){var R;return R=id(),R===t&&(R=hI(),R===t&&(R=nc(),R===t&&(R=rd()))),R}function fI(){var R;return R=id(),R===t&&(R=nc(),R===t&&(R=Kg())),R}function rd(){var R,q,pe,Ne,xe,qe;if(We++,R=G,N.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ue)),q!==t){for(pe=[],Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&ke(Te)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(we.test(r.charAt(G))?(qe=r.charAt(G),G++):(qe=t,We===0&&ke(Te)),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;return We--,R===t&&(q=t,We===0&&ke(L)),R}function Kg(){var R,q,pe,Ne,xe;if(R=G,r.substr(G,2)===Le?(q=Le,G+=2):(q=t,We===0&&ke(se)),q===t&&(q=null),q!==t)if(Ae.test(r.charAt(G))?(pe=r.charAt(G),G++):(pe=t,We===0&&ke(be)),pe!==t){for(Ne=[],fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&ke(le));xe!==t;)Ne.push(xe),fe.test(r.charAt(G))?(xe=r.charAt(G),G++):(xe=t,We===0&&ke(le));Ne!==t?(yt=R,q=Pe(),R=q):(G=R,R=t)}else G=R,R=t;else G=R,R=t;return R}function id(){var R,q;return R=G,r.substr(G,4)===Ge?(q=Ge,G+=4):(q=t,We===0&&ke(ie)),q!==t&&(yt=R,q=Y()),R=q,R}function hI(){var R,q;return R=G,r.substr(G,4)===he?(q=he,G+=4):(q=t,We===0&&ke(re)),q!==t&&(yt=R,q=me()),R=q,R===t&&(R=G,r.substr(G,5)===tt?(q=tt,G+=5):(q=t,We===0&&ke(Rt)),q!==t&&(yt=R,q=It()),R=q),R}function nc(){var R,q,pe,Ne;return We++,R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&ke(pi)),q!==t?(r.charCodeAt(G)===34?(pe=oi,G++):(pe=t,We===0&&ke(pi)),pe!==t?(yt=R,q=pr(),R=q):(G=R,R=t)):(G=R,R=t),R===t&&(R=G,r.charCodeAt(G)===34?(q=oi,G++):(q=t,We===0&&ke(pi)),q!==t?(pe=pI(),pe!==t?(r.charCodeAt(G)===34?(Ne=oi,G++):(Ne=t,We===0&&ke(pi)),Ne!==t?(yt=R,q=di(pe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)),We--,R===t&&(q=t,We===0&&ke(Ur)),R}function pI(){var R,q,pe;if(R=G,q=[],pe=Hg(),pe!==t)for(;pe!==t;)q.push(pe),pe=Hg();else q=t;return q!==t&&(yt=R,q=ai(q)),R=q,R}function Hg(){var R,q,pe,Ne,xe,qe;return Os.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&ke(dr)),R===t&&(R=G,r.substr(G,2)===Bi?(q=Bi,G+=2):(q=t,We===0&&ke(_n)),q!==t&&(yt=R,q=pa()),R=q,R===t&&(R=G,r.substr(G,2)===EA?(q=EA,G+=2):(q=t,We===0&&ke(kg)),q!==t&&(yt=R,q=Zn()),R=q,R===t&&(R=G,r.substr(G,2)===IA?(q=IA,G+=2):(q=t,We===0&&ke(da)),q!==t&&(yt=R,q=Jp()),R=q,R===t&&(R=G,r.substr(G,2)===yA?(q=yA,G+=2):(q=t,We===0&&ke(wA)),q!==t&&(yt=R,q=Br()),R=q,R===t&&(R=G,r.substr(G,2)===Vl?(q=Vl,G+=2):(q=t,We===0&&ke(Rg)),q!==t&&(yt=R,q=Eo()),R=q,R===t&&(R=G,r.substr(G,2)===Fg?(q=Fg,G+=2):(q=t,We===0&&ke(Wp)),q!==t&&(yt=R,q=zp()),R=q,R===t&&(R=G,r.substr(G,2)===Pr?(q=Pr,G+=2):(q=t,We===0&&ke(oe)),q!==t&&(yt=R,q=Io()),R=q,R===t&&(R=G,r.substr(G,2)===kn?(q=kn,G+=2):(q=t,We===0&&ke(Ng)),q!==t&&(yt=R,q=bt()),R=q,R===t&&(R=G,r.substr(G,2)===Xl?(q=Xl,G+=2):(q=t,We===0&&ke(Rn)),q!==t?(pe=SA(),pe!==t?(Ne=SA(),Ne!==t?(xe=SA(),xe!==t?(qe=SA(),qe!==t?(yt=R,q=$n(pe,Ne,xe,qe),R=q):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)):(G=R,R=t)))))))))),R}function SA(){var R;return es.test(r.charAt(G))?(R=r.charAt(G),G++):(R=t,We===0&&ke(ut)),R}function Nr(){var R,q;if(We++,R=[],at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ln)),q!==t)for(;q!==t;)R.push(q),at.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(ln));else R=t;return We--,R===t&&(q=t,We===0&&ke(yo)),R}function dI(){var R,q;if(We++,R=[],Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(Tg)),q!==t)for(;q!==t;)R.push(q),Lt.test(r.charAt(G))?(q=r.charAt(G),G++):(q=t,We===0&&ke(Tg));else R=t;return We--,R===t&&(q=t,We===0&&ke(S)),R}function Hs(){var R,q,pe,Ne,xe,qe;if(R=G,q=Gs(),q!==t){for(pe=[],Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);Ne!==t;)pe.push(Ne),Ne=G,xe=Nr(),xe===t&&(xe=null),xe!==t?(qe=Gs(),qe!==t?(xe=[xe,qe],Ne=xe):(G=Ne,Ne=t)):(G=Ne,Ne=t);pe!==t?(q=[q,pe],R=q):(G=R,R=t)}else G=R,R=t;return R}function Gs(){var R;return r.substr(G,2)===_l?(R=_l,G+=2):(R=t,We===0&&ke(Vp)),R===t&&(r.charCodeAt(G)===10?(R=Xp,G++):(R=t,We===0&&ke(_p)),R===t&&(r.charCodeAt(G)===13?(R=Zp,G++):(R=t,We===0&&ke($p)))),R}let Gg=2,vA=0;if(Ca=n(),Ca!==t&&G===r.length)return Ca;throw Ca!==t&&G{"use strict";var $de=r=>{let e=!1,t=!1,i=!1;for(let n=0;n{if(!(typeof r=="string"||Array.isArray(r)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let t=n=>e.pascalCase?n.charAt(0).toUpperCase()+n.slice(1):n;return Array.isArray(r)?r=r.map(n=>n.trim()).filter(n=>n.length).join("-"):r=r.trim(),r.length===0?"":r.length===1?e.pascalCase?r.toUpperCase():r.toLowerCase():(r!==r.toLowerCase()&&(r=$de(r)),r=r.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(n,s)=>s.toUpperCase()).replace(/\d+(\w|$)/g,n=>n.toUpperCase()),t(r))};Tv.exports=JH;Tv.exports.default=JH});var zH=y((B$e,eCe)=>{eCe.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var wc=y(Mn=>{"use strict";var XH=zH(),vo=process.env;Object.defineProperty(Mn,"_vendors",{value:XH.map(function(r){return r.constant})});Mn.name=null;Mn.isPR=null;XH.forEach(function(r){let t=(Array.isArray(r.env)?r.env:[r.env]).every(function(i){return VH(i)});if(Mn[r.constant]=t,t)switch(Mn.name=r.name,typeof r.pr){case"string":Mn.isPR=!!vo[r.pr];break;case"object":"env"in r.pr?Mn.isPR=r.pr.env in vo&&vo[r.pr.env]!==r.pr.ne:"any"in r.pr?Mn.isPR=r.pr.any.some(function(i){return!!vo[i]}):Mn.isPR=VH(r.pr);break;default:Mn.isPR=null}});Mn.isCI=!!(vo.CI||vo.CONTINUOUS_INTEGRATION||vo.BUILD_NUMBER||vo.RUN_ID||Mn.name);function VH(r){return typeof r=="string"?!!vo[r]:Object.keys(r).every(function(e){return vo[e]===r[e]})}});var ry=y(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});var tCe=0,rCe=1,iCe=2,nCe="",sCe="\0",oCe=-1,aCe=/^(-h|--help)(?:=([0-9]+))?$/,ACe=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,lCe=/^-[a-zA-Z]{2,}$/,cCe=/^([^=]+)=([\s\S]*)$/,uCe=process.env.DEBUG_CLI==="1";Un.BATCH_REGEX=lCe;Un.BINDING_REGEX=cCe;Un.DEBUG=uCe;Un.END_OF_INPUT=sCe;Un.HELP_COMMAND_INDEX=oCe;Un.HELP_REGEX=aCe;Un.NODE_ERRORED=iCe;Un.NODE_INITIAL=tCe;Un.NODE_SUCCESS=rCe;Un.OPTION_REGEX=ACe;Un.START_OF_INPUT=nCe});var iy=y(Qd=>{"use strict";Object.defineProperty(Qd,"__esModule",{value:!0});var gCe=ry(),Lv=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},Ov=class extends Error{constructor(e,t){if(super(),this.input=e,this.candidates=t,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(i=>i.reason!==null&&i.reason===t[0].reason)){let[{reason:i}]=this.candidates;this.message=`${i} - -${this.candidates.map(({usage:n})=>`$ ${n}`).join(` -`)}`}else if(this.candidates.length===1){let[{usage:i}]=this.candidates;this.message=`Command not found; did you mean: - -$ ${i} -${Uv(e)}`}else this.message=`Command not found; did you mean one of: - -${this.candidates.map(({usage:i},n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Uv(e)}`}},Mv=class extends Error{constructor(e,t){super(),this.input=e,this.usages=t,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: - -${this.usages.map((i,n)=>`${`${n}.`.padStart(4)} ${i}`).join(` -`)} - -${Uv(e)}`}},Uv=r=>`While running ${r.filter(e=>e!==gCe.END_OF_INPUT).map(e=>{let t=JSON.stringify(e);return e.match(/\s/)||e.length===0||t!==`"${e}"`?t:e}).join(" ")}`;Qd.AmbiguousSyntaxError=Mv;Qd.UnknownSyntaxError=Ov;Qd.UsageError=Lv});var va=y(TA=>{"use strict";Object.defineProperty(TA,"__esModule",{value:!0});var _H=iy(),ZH=Symbol("clipanion/isOption");function fCe(r){return{...r,[ZH]:!0}}function hCe(r,e){return typeof r>"u"?[r,e]:typeof r=="object"&&r!==null&&!Array.isArray(r)?[void 0,r]:[r,e]}function Kv(r,e=!1){let t=r.replace(/^\.: /,"");return e&&(t=t[0].toLowerCase()+t.slice(1)),t}function $H(r,e){return e.length===1?new _H.UsageError(`${r}: ${Kv(e[0],!0)}`):new _H.UsageError(`${r}: -${e.map(t=>` -- ${Kv(t)}`).join("")}`)}function pCe(r,e,t){if(typeof t>"u")return e;let i=[],n=[],s=a=>{let l=e;return e=a,s.bind(null,l)};if(!t(e,{errors:i,coercions:n,coercion:s}))throw $H(`Invalid value for ${r}`,i);for(let[,a]of n)a();return e}TA.applyValidator=pCe;TA.cleanValidationError=Kv;TA.formatError=$H;TA.isOptionSymbol=ZH;TA.makeCommandOption=fCe;TA.rerouteArguments=hCe});var ns=y(st=>{"use strict";Object.defineProperty(st,"__esModule",{value:!0});var eG=/^[a-zA-Z_][a-zA-Z0-9_]*$/,tG=/^#[0-9a-f]{6}$/i,rG=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,iG=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,nG=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,Hv=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/,sG=r=>()=>r;function Qt({test:r}){return sG(r)()}function Zr(r){return r===null?"null":r===void 0?"undefined":r===""?"an empty string":JSON.stringify(r)}function LA(r,e){var t,i,n;return typeof e=="number"?`${(t=r==null?void 0:r.p)!==null&&t!==void 0?t:"."}[${e}]`:eG.test(e)?`${(i=r==null?void 0:r.p)!==null&&i!==void 0?i:""}.${e}`:`${(n=r==null?void 0:r.p)!==null&&n!==void 0?n:"."}[${JSON.stringify(e)}]`}function Bc(r,e){return t=>{let i=r[e];return r[e]=t,Bc(r,e).bind(null,i)}}function oG(r,e){return t=>{r[e]=t}}function ny(r,e,t){return r===1?e:t}function pt({errors:r,p:e}={},t){return r==null||r.push(`${e!=null?e:"."}: ${t}`),!1}var aG=()=>Qt({test:(r,e)=>!0});function dCe(r){return Qt({test:(e,t)=>e!==r?pt(t,`Expected a literal (got ${Zr(r)})`):!0})}var CCe=()=>Qt({test:(r,e)=>typeof r!="string"?pt(e,`Expected a string (got ${Zr(r)})`):!0});function mCe(r){let e=Array.isArray(r)?r:Object.values(r),t=new Set(e);return Qt({test:(i,n)=>t.has(i)?!0:pt(n,`Expected a valid enumeration value (got ${Zr(i)})`)})}var ECe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]),ICe=()=>Qt({test:(r,e)=>{var t;if(typeof r!="boolean"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i=ECe.get(r);if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a boolean (got ${Zr(r)})`)}return!0}}),yCe=()=>Qt({test:(r,e)=>{var t;if(typeof r!="number"){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"){let n;try{n=JSON.parse(r)}catch{}if(typeof n=="number")if(JSON.stringify(n)===r)i=n;else return pt(e,`Received a number that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a number (got ${Zr(r)})`)}return!0}}),wCe=()=>Qt({test:(r,e)=>{var t;if(!(r instanceof Date)){if(typeof(e==null?void 0:e.coercions)<"u"){if(typeof(e==null?void 0:e.coercion)>"u")return pt(e,"Unbound coercion result");let i;if(typeof r=="string"&&Hv.test(r))i=new Date(r);else{let n;if(typeof r=="string"){let s;try{s=JSON.parse(r)}catch{}typeof s=="number"&&(n=s)}else typeof r=="number"&&(n=r);if(typeof n<"u")if(Number.isSafeInteger(n)||!Number.isSafeInteger(n*1e3))i=new Date(n*1e3);else return pt(e,`Received a timestamp that can't be safely represented by the runtime (${r})`)}if(typeof i<"u")return e.coercions.push([(t=e.p)!==null&&t!==void 0?t:".",e.coercion.bind(null,i)]),!0}return pt(e,`Expected a date (got ${Zr(r)})`)}return!0}}),BCe=(r,{delimiter:e}={})=>Qt({test:(t,i)=>{var n;if(typeof t=="string"&&typeof e<"u"&&typeof(i==null?void 0:i.coercions)<"u"){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");t=t.split(e),i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,t)])}if(!Array.isArray(t))return pt(i,`Expected an array (got ${Zr(t)})`);let s=!0;for(let o=0,a=t.length;o{let t=AG(r.length);return Qt({test:(i,n)=>{var s;if(typeof i=="string"&&typeof e<"u"&&typeof(n==null?void 0:n.coercions)<"u"){if(typeof(n==null?void 0:n.coercion)>"u")return pt(n,"Unbound coercion result");i=i.split(e),n.coercions.push([(s=n.p)!==null&&s!==void 0?s:".",n.coercion.bind(null,i)])}if(!Array.isArray(i))return pt(n,`Expected a tuple (got ${Zr(i)})`);let o=t(i,Object.assign({},n));for(let a=0,l=i.length;aQt({test:(t,i)=>{if(typeof t!="object"||t===null)return pt(i,`Expected an object (got ${Zr(t)})`);let n=Object.keys(t),s=!0;for(let o=0,a=n.length;o{let t=Object.keys(r);return Qt({test:(i,n)=>{if(typeof i!="object"||i===null)return pt(n,`Expected an object (got ${Zr(i)})`);let s=new Set([...t,...Object.keys(i)]),o={},a=!0;for(let l of s){if(l==="constructor"||l==="__proto__")a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),"Unsafe property name");else{let c=Object.prototype.hasOwnProperty.call(r,l)?r[l]:void 0,u=Object.prototype.hasOwnProperty.call(i,l)?i[l]:void 0;typeof c<"u"?a=c(u,Object.assign(Object.assign({},n),{p:LA(n,l),coercion:Bc(i,l)}))&&a:e===null?a=pt(Object.assign(Object.assign({},n),{p:LA(n,l)}),`Extraneous property (got ${Zr(u)})`):Object.defineProperty(o,l,{enumerable:!0,get:()=>u,set:oG(i,l)})}if(!a&&(n==null?void 0:n.errors)==null)break}return e!==null&&(a||(n==null?void 0:n.errors)!=null)&&(a=e(o,n)&&a),a}})},vCe=r=>Qt({test:(e,t)=>e instanceof r?!0:pt(t,`Expected an instance of ${r.name} (got ${Zr(e)})`)}),xCe=(r,{exclusive:e=!1}={})=>Qt({test:(t,i)=>{var n,s,o;let a=[],l=typeof(i==null?void 0:i.errors)<"u"?[]:void 0;for(let c=0,u=r.length;c1?pt(i,`Expected to match exactly a single predicate (matched ${a.join(", ")})`):(o=i==null?void 0:i.errors)===null||o===void 0||o.push(...l),!1}}),PCe=(r,e)=>Qt({test:(t,i)=>{var n,s;let o={value:t},a=typeof(i==null?void 0:i.coercions)<"u"?Bc(o,"value"):void 0,l=typeof(i==null?void 0:i.coercions)<"u"?[]:void 0;if(!r(t,Object.assign(Object.assign({},i),{coercion:a,coercions:l})))return!1;let c=[];if(typeof l<"u")for(let[,u]of l)c.push(u());try{if(typeof(i==null?void 0:i.coercions)<"u"){if(o.value!==t){if(typeof(i==null?void 0:i.coercion)>"u")return pt(i,"Unbound coercion result");i.coercions.push([(n=i.p)!==null&&n!==void 0?n:".",i.coercion.bind(null,o.value)])}(s=i==null?void 0:i.coercions)===null||s===void 0||s.push(...l)}return e.every(u=>u(o.value,i))}finally{for(let u of c)u()}}}),DCe=r=>Qt({test:(e,t)=>typeof e>"u"?!0:r(e,t)}),kCe=r=>Qt({test:(e,t)=>e===null?!0:r(e,t)}),RCe=r=>Qt({test:(e,t)=>e.length>=r?!0:pt(t,`Expected to have a length of at least ${r} elements (got ${e.length})`)}),FCe=r=>Qt({test:(e,t)=>e.length<=r?!0:pt(t,`Expected to have a length of at most ${r} elements (got ${e.length})`)}),AG=r=>Qt({test:(e,t)=>e.length!==r?pt(t,`Expected to have a length of exactly ${r} elements (got ${e.length})`):!0}),NCe=({map:r}={})=>Qt({test:(e,t)=>{let i=new Set,n=new Set;for(let s=0,o=e.length;sQt({test:(r,e)=>r<=0?!0:pt(e,`Expected to be negative (got ${r})`)}),LCe=()=>Qt({test:(r,e)=>r>=0?!0:pt(e,`Expected to be positive (got ${r})`)}),OCe=r=>Qt({test:(e,t)=>e>=r?!0:pt(t,`Expected to be at least ${r} (got ${e})`)}),MCe=r=>Qt({test:(e,t)=>e<=r?!0:pt(t,`Expected to be at most ${r} (got ${e})`)}),UCe=(r,e)=>Qt({test:(t,i)=>t>=r&&t<=e?!0:pt(i,`Expected to be in the [${r}; ${e}] range (got ${t})`)}),KCe=(r,e)=>Qt({test:(t,i)=>t>=r&&tQt({test:(e,t)=>e!==Math.round(e)?pt(t,`Expected to be an integer (got ${e})`):Number.isSafeInteger(e)?!0:pt(t,`Expected to be a safe integer (got ${e})`)}),GCe=r=>Qt({test:(e,t)=>r.test(e)?!0:pt(t,`Expected to match the pattern ${r.toString()} (got ${Zr(e)})`)}),YCe=()=>Qt({test:(r,e)=>r!==r.toLowerCase()?pt(e,`Expected to be all-lowercase (got ${r})`):!0}),jCe=()=>Qt({test:(r,e)=>r!==r.toUpperCase()?pt(e,`Expected to be all-uppercase (got ${r})`):!0}),qCe=()=>Qt({test:(r,e)=>nG.test(r)?!0:pt(e,`Expected to be a valid UUID v4 (got ${Zr(r)})`)}),JCe=()=>Qt({test:(r,e)=>Hv.test(r)?!1:pt(e,`Expected to be a valid ISO 8601 date string (got ${Zr(r)})`)}),WCe=({alpha:r=!1})=>Qt({test:(e,t)=>(r?tG.test(e):rG.test(e))?!0:pt(t,`Expected to be a valid hexadecimal color string (got ${Zr(e)})`)}),zCe=()=>Qt({test:(r,e)=>iG.test(r)?!0:pt(e,`Expected to be a valid base 64 string (got ${Zr(r)})`)}),VCe=(r=aG())=>Qt({test:(e,t)=>{let i;try{i=JSON.parse(e)}catch{return pt(t,`Expected to be a valid JSON string (got ${Zr(e)})`)}return r(i,t)}}),XCe=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)||s.push(o);return s.length>0?pt(i,`Missing required ${ny(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},_Ce=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>0?pt(i,`Forbidden ${ny(s.length,"property","properties")} ${s.map(o=>`"${o}"`).join(", ")}`):!0}})},ZCe=r=>{let e=new Set(r);return Qt({test:(t,i)=>{let n=new Set(Object.keys(t)),s=[];for(let o of e)n.has(o)&&s.push(o);return s.length>1?pt(i,`Mutually exclusive properties ${s.map(o=>`"${o}"`).join(", ")}`):!0}})};(function(r){r.Forbids="Forbids",r.Requires="Requires"})(st.KeyRelationship||(st.KeyRelationship={}));var $Ce={[st.KeyRelationship.Forbids]:{expect:!1,message:"forbids using"},[st.KeyRelationship.Requires]:{expect:!0,message:"requires using"}},eme=(r,e,t,{ignore:i=[]}={})=>{let n=new Set(i),s=new Set(t),o=$Ce[e];return Qt({test:(a,l)=>{let c=new Set(Object.keys(a));if(!c.has(r)||n.has(a[r]))return!0;let u=[];for(let g of s)(c.has(g)&&!n.has(a[g]))!==o.expect&&u.push(g);return u.length>=1?pt(l,`Property "${r}" ${o.message} ${ny(u.length,"property","properties")} ${u.map(g=>`"${g}"`).join(", ")}`):!0}})};st.applyCascade=PCe;st.base64RegExp=iG;st.colorStringAlphaRegExp=rG;st.colorStringRegExp=tG;st.computeKey=LA;st.getPrintable=Zr;st.hasExactLength=AG;st.hasForbiddenKeys=_Ce;st.hasKeyRelationship=eme;st.hasMaxLength=FCe;st.hasMinLength=RCe;st.hasMutuallyExclusiveKeys=ZCe;st.hasRequiredKeys=XCe;st.hasUniqueItems=NCe;st.isArray=BCe;st.isAtLeast=OCe;st.isAtMost=MCe;st.isBase64=zCe;st.isBoolean=ICe;st.isDate=wCe;st.isDict=QCe;st.isEnum=mCe;st.isHexColor=WCe;st.isISO8601=JCe;st.isInExclusiveRange=KCe;st.isInInclusiveRange=UCe;st.isInstanceOf=vCe;st.isInteger=HCe;st.isJSON=VCe;st.isLiteral=dCe;st.isLowerCase=YCe;st.isNegative=TCe;st.isNullable=kCe;st.isNumber=yCe;st.isObject=SCe;st.isOneOf=xCe;st.isOptional=DCe;st.isPositive=LCe;st.isString=CCe;st.isTuple=bCe;st.isUUID4=qCe;st.isUnknown=aG;st.isUpperCase=jCe;st.iso8601RegExp=Hv;st.makeCoercionFn=Bc;st.makeSetter=oG;st.makeTrait=sG;st.makeValidator=Qt;st.matchesRegExp=GCe;st.plural=ny;st.pushError=pt;st.simpleKeyRegExp=eG;st.uuid4RegExp=nG});var bc=y(Gv=>{"use strict";Object.defineProperty(Gv,"__esModule",{value:!0});var lG=va();function tme(r){if(r&&r.__esModule)return r;var e=Object.create(null);return r&&Object.keys(r).forEach(function(t){if(t!=="default"){var i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:function(){return r[t]}})}}),e.default=r,Object.freeze(e)}var Sd=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let t=this.constructor.schema;if(Array.isArray(t)){let{isDict:n,isUnknown:s,applyCascade:o}=await Promise.resolve().then(function(){return tme(ns())}),a=o(n(s()),t),l=[],c=[];if(!a(this,{errors:l,coercions:c}))throw lG.formatError("Invalid option schema",l);for(let[,g]of c)g()}else if(t!=null)throw new Error("Invalid command schema");let i=await this.execute();return typeof i<"u"?i:0}};Sd.isOption=lG.isOptionSymbol;Sd.Default=[];Gv.Command=Sd});var jv=y(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});var cG=80,Yv=Array(cG).fill("\u2501");for(let r=0;r<=24;++r)Yv[Yv.length-r]=`\x1B[38;5;${232+r}m\u2501`;var rme={header:r=>`\x1B[1m\u2501\u2501\u2501 ${r}${r.length`\x1B[1m${r}\x1B[22m`,error:r=>`\x1B[31m\x1B[1m${r}\x1B[22m\x1B[39m`,code:r=>`\x1B[36m${r}\x1B[39m`},ime={header:r=>r,bold:r=>r,error:r=>r,code:r=>r};function nme(r){let e=r.split(` -`),t=e.filter(n=>n.match(/\S/)),i=t.length>0?t.reduce((n,s)=>Math.min(n,s.length-s.trimStart().length),Number.MAX_VALUE):0;return e.map(n=>n.slice(i).trimRight()).join(` -`)}function sme(r,{format:e,paragraphs:t}){return r=r.replace(/\r\n?/g,` -`),r=nme(r),r=r.replace(/^\n+|\n+$/g,""),r=r.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 - -`),r=r.replace(/\n(\n)?\n*/g,"$1"),t&&(r=r.split(/\n/).map(i=>{let n=i.match(/^\s*[*-][\t ]+(.*)/);if(!n)return i.match(/(.{1,80})(?: |$)/g).join(` -`);let s=i.length-i.trimStart().length;return n[1].match(new RegExp(`(.{1,${78-s}})(?: |$)`,"g")).map((o,a)=>" ".repeat(s)+(a===0?"- ":" ")+o).join(` -`)}).join(` - -`)),r=r.replace(/(`+)((?:.|[\n])*?)\1/g,(i,n,s)=>e.code(n+s+n)),r=r.replace(/(\*\*)((?:.|[\n])*?)\1/g,(i,n,s)=>e.bold(n+s+n)),r?`${r} -`:""}vd.formatMarkdownish=sme;vd.richFormat=rme;vd.textFormat=ime});var ly=y(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});var lt=ry(),ay=iy();function Vi(r){lt.DEBUG&&console.log(r)}var uG={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:lt.HELP_COMMAND_INDEX};function qv(){return{nodes:[Li(),Li(),Li()]}}function gG(r){let e=qv(),t=[],i=e.nodes.length;for(let n of r){t.push(i);for(let s=0;s{if(e.has(i))return;e.add(i);let n=r.nodes[i];for(let o of Object.values(n.statics))for(let{to:a}of o)t(a);for(let[,{to:o}]of n.dynamics)t(o);for(let{to:o}of n.shortcuts)t(o);let s=new Set(n.shortcuts.map(({to:o})=>o));for(;n.shortcuts.length>0;){let{to:o}=n.shortcuts.shift(),a=r.nodes[o];for(let[l,c]of Object.entries(a.statics)){let u=Object.prototype.hasOwnProperty.call(n.statics,l)?n.statics[l]:n.statics[l]=[];for(let g of c)u.some(({to:f})=>g.to===f)||u.push(g)}for(let[l,c]of a.dynamics)n.dynamics.some(([u,{to:g}])=>l===u&&c.to===g)||n.dynamics.push([l,c]);for(let l of a.shortcuts)s.has(l.to)||(n.shortcuts.push(l),s.add(l.to))}};t(lt.NODE_INITIAL)}function hG(r,{prefix:e=""}={}){if(lt.DEBUG){Vi(`${e}Nodes are:`);for(let t=0;tl!==lt.NODE_ERRORED).map(({state:l})=>({usage:l.candidateUsage,reason:null})));if(a.every(({node:l})=>l===lt.NODE_ERRORED))throw new ay.UnknownSyntaxError(e,a.map(({state:l})=>({usage:l.candidateUsage,reason:l.errorMessage})));i=pG(a)}if(i.length>0){Vi(" Results:");for(let s of i)Vi(` - ${s.node} -> ${JSON.stringify(s.state)}`)}else Vi(" No results");return i}function ome(r,e){if(e.selectedIndex!==null)return!0;if(Object.prototype.hasOwnProperty.call(r.statics,lt.END_OF_INPUT)){for(let{to:t}of r.statics[lt.END_OF_INPUT])if(t===lt.NODE_SUCCESS)return!0}return!1}function ame(r,e,t){let i=t&&e.length>0?[""]:[],n=Jv(r,e,t),s=[],o=new Set,a=(l,c,u=!0)=>{let g=[c];for(;g.length>0;){let h=g;g=[];for(let p of h){let C=r.nodes[p],w=Object.keys(C.statics);for(let B of Object.keys(C.statics)){let v=w[0];for(let{to:D,reducer:T}of C.statics[v])T==="pushPath"&&(u||l.push(v),g.push(D))}}u=!1}let f=JSON.stringify(l);o.has(f)||(s.push(l),o.add(f))};for(let{node:l,state:c}of n){if(c.remainder!==null){a([c.remainder],l);continue}let u=r.nodes[l],g=ome(u,c);for(let[f,h]of Object.entries(u.statics))(g&&f!==lt.END_OF_INPUT||!f.startsWith("-")&&h.some(({reducer:p})=>p==="pushPath"))&&a([...i,f],l);if(!!g)for(let[f,{to:h}]of u.dynamics){if(h===lt.NODE_ERRORED)continue;let p=IG(f,c);if(p!==null)for(let C of p)a([...i,C],l)}}return[...s].sort()}function Ame(r,e){let t=Jv(r,[...e,lt.END_OF_INPUT]);return dG(e,t.map(({state:i})=>i))}function pG(r){let e=0;for(let{state:t}of r)t.path.length>e&&(e=t.path.length);return r.filter(({state:t})=>t.path.length===e)}function dG(r,e){let t=e.filter(g=>g.selectedIndex!==null);if(t.length===0)throw new Error;let i=t.filter(g=>g.requiredOptions.every(f=>f.some(h=>g.options.find(p=>p.name===h))));if(i.length===0)throw new ay.UnknownSyntaxError(r,t.map(g=>({usage:g.candidateUsage,reason:null})));let n=0;for(let g of i)g.path.length>n&&(n=g.path.length);let s=i.filter(g=>g.path.length===n),o=g=>g.positionals.filter(({extra:f})=>!f).length+g.options.length,a=s.map(g=>({state:g,positionalCount:o(g)})),l=0;for(let{positionalCount:g}of a)g>l&&(l=g);let c=a.filter(({positionalCount:g})=>g===l).map(({state:g})=>g),u=CG(c);if(u.length>1)throw new ay.AmbiguousSyntaxError(r,u.map(g=>g.candidateUsage));return u[0]}function CG(r){let e=[],t=[];for(let i of r)i.selectedIndex===lt.HELP_COMMAND_INDEX?t.push(i):e.push(i);return t.length>0&&e.push({...uG,path:mG(...t.map(i=>i.path)),options:t.reduce((i,n)=>i.concat(n.options),[])}),e}function mG(r,e,...t){return e===void 0?Array.from(r):mG(r.filter((i,n)=>i===e[n]),...t)}function Li(){return{dynamics:[],shortcuts:[],statics:{}}}function Wv(r){return r===lt.NODE_SUCCESS||r===lt.NODE_ERRORED}function sy(r,e=0){return{to:Wv(r.to)?r.to:r.to>2?r.to+e-2:r.to+e,reducer:r.reducer}}function EG(r,e=0){let t=Li();for(let[i,n]of r.dynamics)t.dynamics.push([i,sy(n,e)]);for(let i of r.shortcuts)t.shortcuts.push(sy(i,e));for(let[i,n]of Object.entries(r.statics))t.statics[i]=n.map(s=>sy(s,e));return t}function Ei(r,e,t,i,n){r.nodes[e].dynamics.push([t,{to:i,reducer:n}])}function Qc(r,e,t,i){r.nodes[e].shortcuts.push({to:t,reducer:i})}function xo(r,e,t,i,n){(Object.prototype.hasOwnProperty.call(r.nodes[e].statics,t)?r.nodes[e].statics[t]:r.nodes[e].statics[t]=[]).push({to:i,reducer:n})}function xd(r,e,t,i){if(Array.isArray(e)){let[n,...s]=e;return r[n](t,i,...s)}else return r[e](t,i)}function IG(r,e){let t=Array.isArray(r)?Pd[r[0]]:Pd[r];if(typeof t.suggest>"u")return null;let i=Array.isArray(r)?r.slice(1):[];return t.suggest(e,...i)}var Pd={always:()=>!0,isOptionLike:(r,e)=>!r.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(r,e)=>r.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(r,e,t,i)=>!r.ignoreOptions&&e===t,isBatchOption:(r,e,t)=>!r.ignoreOptions&<.BATCH_REGEX.test(e)&&[...e.slice(1)].every(i=>t.includes(`-${i}`)),isBoundOption:(r,e,t,i)=>{let n=e.match(lt.BINDING_REGEX);return!r.ignoreOptions&&!!n&<.OPTION_REGEX.test(n[1])&&t.includes(n[1])&&i.filter(s=>s.names.includes(n[1])).every(s=>s.allowBinding)},isNegatedOption:(r,e,t)=>!r.ignoreOptions&&e===`--no-${t.slice(2)}`,isHelp:(r,e)=>!r.ignoreOptions&<.HELP_REGEX.test(e),isUnsupportedOption:(r,e,t)=>!r.ignoreOptions&&e.startsWith("-")&<.OPTION_REGEX.test(e)&&!t.includes(e),isInvalidOption:(r,e)=>!r.ignoreOptions&&e.startsWith("-")&&!lt.OPTION_REGEX.test(e)};Pd.isOption.suggest=(r,e,t=!0)=>t?null:[e];var oy={setCandidateState:(r,e,t)=>({...r,...t}),setSelectedIndex:(r,e,t)=>({...r,selectedIndex:t}),pushBatch:(r,e)=>({...r,options:r.options.concat([...e.slice(1)].map(t=>({name:`-${t}`,value:!0})))}),pushBound:(r,e)=>{let[,t,i]=e.match(lt.BINDING_REGEX);return{...r,options:r.options.concat({name:t,value:i})}},pushPath:(r,e)=>({...r,path:r.path.concat(e)}),pushPositional:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!1})}),pushExtra:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:!0})}),pushExtraNoLimits:(r,e)=>({...r,positionals:r.positionals.concat({value:e,extra:Po})}),pushTrue:(r,e,t=e)=>({...r,options:r.options.concat({name:e,value:!0})}),pushFalse:(r,e,t=e)=>({...r,options:r.options.concat({name:t,value:!1})}),pushUndefined:(r,e)=>({...r,options:r.options.concat({name:e,value:void 0})}),pushStringValue:(r,e)=>{var t;let i={...r,options:[...r.options]},n=r.options[r.options.length-1];return n.value=((t=n.value)!==null&&t!==void 0?t:[]).concat([e]),i},setStringValue:(r,e)=>{let t={...r,options:[...r.options]},i=r.options[r.options.length-1];return i.value=e,t},inhibateOptions:r=>({...r,ignoreOptions:!0}),useHelp:(r,e,t)=>{let[,,i]=e.match(lt.HELP_REGEX);return typeof i<"u"?{...r,options:[{name:"-c",value:String(t)},{name:"-i",value:i}]}:{...r,options:[{name:"-c",value:String(t)}]}},setError:(r,e,t)=>e===lt.END_OF_INPUT?{...r,errorMessage:`${t}.`}:{...r,errorMessage:`${t} ("${e}").`},setOptionArityError:(r,e)=>{let t=r.options[r.options.length-1];return{...r,errorMessage:`Not enough arguments to option ${t.name}.`}}},Po=Symbol(),Ay=class{constructor(e,t){this.allOptionNames=[],this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=t}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:t=this.arity.trailing,extra:i=this.arity.extra,proxy:n=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:t,extra:i,proxy:n})}addPositional({name:e="arg",required:t=!0}={}){if(!t&&this.arity.extra===Po)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!t&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!t&&this.arity.extra!==Po?this.arity.extra.push(e):this.arity.extra!==Po&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:t=0}={}){if(this.arity.extra===Po)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let i=0;i1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(i))throw new Error(`The arity must be an integer, got ${i}`);if(i<0)throw new Error(`The arity must be positive, got ${i}`);this.allOptionNames.push(...e),this.options.push({names:e,description:t,arity:i,hidden:n,required:s,allowBinding:o})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:t=!0}={}){let i=[this.cliOpts.binaryName],n=[];if(this.paths.length>0&&i.push(...this.paths[0]),e){for(let{names:o,arity:a,hidden:l,description:c,required:u}of this.options){if(l)continue;let g=[];for(let h=0;h`:`[${f}]`)}i.push(...this.arity.leading.map(o=>`<${o}>`)),this.arity.extra===Po?i.push("..."):i.push(...this.arity.extra.map(o=>`[${o}]`)),i.push(...this.arity.trailing.map(o=>`<${o}>`))}return{usage:i.join(" "),options:n}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=qv(),t=lt.NODE_INITIAL,i=this.usage().usage,n=this.options.filter(a=>a.required).map(a=>a.names);t=ss(e,Li()),xo(e,lt.NODE_INITIAL,lt.START_OF_INPUT,t,["setCandidateState",{candidateUsage:i,requiredOptions:n}]);let s=this.arity.proxy?"always":"isNotOptionLike",o=this.paths.length>0?this.paths:[[]];for(let a of o){let l=t;if(a.length>0){let f=ss(e,Li());Qc(e,l,f),this.registerOptions(e,f),l=f}for(let f=0;f0||!this.arity.proxy){let f=ss(e,Li());Ei(e,l,"isHelp",f,["useHelp",this.cliIndex]),xo(e,f,lt.END_OF_INPUT,lt.NODE_SUCCESS,["setSelectedIndex",lt.HELP_COMMAND_INDEX]),this.registerOptions(e,l)}this.arity.leading.length>0&&xo(e,l,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let c=l;for(let f=0;f0||f+1!==this.arity.leading.length)&&xo(e,h,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]),Ei(e,c,"isNotOptionLike",h,"pushPositional"),c=h}let u=c;if(this.arity.extra===Po||this.arity.extra.length>0){let f=ss(e,Li());if(Qc(e,c,f),this.arity.extra===Po){let h=ss(e,Li());this.arity.proxy||this.registerOptions(e,h),Ei(e,c,s,h,"pushExtraNoLimits"),Ei(e,h,s,h,"pushExtraNoLimits"),Qc(e,h,f)}else for(let h=0;h0&&xo(e,u,lt.END_OF_INPUT,lt.NODE_ERRORED,["setError","Not enough positional arguments"]);let g=u;for(let f=0;fo.length>s.length?o:s,"");if(i.arity===0)for(let s of i.names)Ei(e,t,["isOption",s,i.hidden||s!==n],t,"pushTrue"),s.startsWith("--")&&!s.startsWith("--no-")&&Ei(e,t,["isNegatedOption",s],t,["pushFalse",s]);else{let s=ss(e,Li());for(let o of i.names)Ei(e,t,["isOption",o,i.hidden||o!==n],s,"pushUndefined");for(let o=0;o=0&&eAme(i,n),suggest:(n,s)=>ame(i,n,s)}}};Ar.CliBuilder=Dd;Ar.CommandBuilder=Ay;Ar.NoLimits=Po;Ar.aggregateHelpStates=CG;Ar.cloneNode=EG;Ar.cloneTransition=sy;Ar.debug=Vi;Ar.debugMachine=hG;Ar.execute=xd;Ar.injectNode=ss;Ar.isTerminalNode=Wv;Ar.makeAnyOfMachine=gG;Ar.makeNode=Li;Ar.makeStateMachine=qv;Ar.reducers=oy;Ar.registerDynamic=Ei;Ar.registerShortcut=Qc;Ar.registerStatic=xo;Ar.runMachineInternal=Jv;Ar.selectBestState=dG;Ar.simplifyMachine=fG;Ar.suggest=IG;Ar.tests=Pd;Ar.trimSmallerBranches=pG});var yG=y(zv=>{"use strict";Object.defineProperty(zv,"__esModule",{value:!0});var lme=bc(),kd=class extends lme.Command{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,t){let i=new kd(t);i.path=e.path;for(let n of e.options)switch(n.name){case"-c":i.commands.push(Number(n.value));break;case"-i":i.index=Number(n.value);break}return i}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: -`),this.context.stdout.write(` -`);let t=0;for(let i of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[i].commandClass,{prefix:`${t++}. `.padStart(5)}));this.context.stdout.write(` -`),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. -`)}}};zv.HelpCommand=kd});var vG=y(Vv=>{"use strict";Object.defineProperty(Vv,"__esModule",{value:!0});var cme=ry(),wG=bc(),ume=J("tty"),gme=ly(),hn=jv(),fme=yG();function hme(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var BG=hme(ume),bG=Symbol("clipanion/errorCommand");function pme(){return process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}var OA=class{constructor({binaryLabel:e,binaryName:t="...",binaryVersion:i,enableCapture:n=!1,enableColors:s}={}){this.registrations=new Map,this.builder=new gme.CliBuilder({binaryName:t}),this.binaryLabel=e,this.binaryName=t,this.binaryVersion=i,this.enableCapture=n,this.enableColors=s}static from(e,t={}){let i=new OA(t);for(let n of e)i.register(n);return i}register(e){var t;let i=new Map,n=new e;for(let l in n){let c=n[l];typeof c=="object"&&c!==null&&c[wG.Command.isOption]&&i.set(l,c)}let s=this.builder.command(),o=s.cliIndex,a=(t=e.paths)!==null&&t!==void 0?t:n.paths;if(typeof a<"u")for(let l of a)s.addPath(l);this.registrations.set(e,{specs:i,builder:s,index:o});for(let[l,{definition:c}]of i.entries())c(s,l);s.setContext({commandClass:e})}process(e){let{contexts:t,process:i}=this.builder.compile(),n=i(e);switch(n.selectedIndex){case cme.HELP_COMMAND_INDEX:return fme.HelpCommand.from(n,t);default:{let{commandClass:s}=t[n.selectedIndex],o=this.registrations.get(s);if(typeof o>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let a=new s;a.path=n.path;try{for(let[l,{transformer:c}]of o.specs.entries())a[l]=c(o.builder,l,n);return a}catch(l){throw l[bG]=a,l}}break}}async run(e,t){var i;let n,s={...OA.defaultContext,...t},o=(i=this.enableColors)!==null&&i!==void 0?i:s.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e)}catch(c){return s.stdout.write(this.error(c,{colored:o})),1}if(n.help)return s.stdout.write(this.usage(n,{colored:o,detailed:!0})),0;n.context=s,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),error:(c,u)=>this.error(c,u),format:c=>this.format(c),process:c=>this.process(c),run:(c,u)=>this.run(c,{...s,...u}),usage:(c,u)=>this.usage(c,u)};let a=this.enableCapture?dme(s):SG,l;try{l=await a(()=>n.validateAndExecute().catch(c=>n.catch(c).then(()=>0)))}catch(c){return s.stdout.write(this.error(c,{colored:o,command:n})),1}return l}async runExit(e,t){process.exitCode=await this.run(e,t)}suggest(e,t){let{suggest:i}=this.builder.compile();return i(e,t)}definitions({colored:e=!1}={}){let t=[];for(let[i,{index:n}]of this.registrations){if(typeof i.usage>"u")continue;let{usage:s}=this.getUsageByIndex(n,{detailed:!1}),{usage:o,options:a}=this.getUsageByIndex(n,{detailed:!0,inlineOptions:!1}),l=typeof i.usage.category<"u"?hn.formatMarkdownish(i.usage.category,{format:this.format(e),paragraphs:!1}):void 0,c=typeof i.usage.description<"u"?hn.formatMarkdownish(i.usage.description,{format:this.format(e),paragraphs:!1}):void 0,u=typeof i.usage.details<"u"?hn.formatMarkdownish(i.usage.details,{format:this.format(e),paragraphs:!0}):void 0,g=typeof i.usage.examples<"u"?i.usage.examples.map(([f,h])=>[hn.formatMarkdownish(f,{format:this.format(e),paragraphs:!1}),h.replace(/\$0/g,this.binaryName)]):void 0;t.push({path:s,usage:o,category:l,description:c,details:u,examples:g,options:a})}return t}usage(e=null,{colored:t,detailed:i=!1,prefix:n="$ "}={}){var s;if(e===null){for(let l of this.registrations.keys()){let c=l.paths,u=typeof l.usage<"u";if(!c||c.length===0||c.length===1&&c[0].length===0||((s=c==null?void 0:c.some(h=>h.length===0))!==null&&s!==void 0?s:!1))if(e){e=null;break}else e=l;else if(u){e=null;continue}}e&&(i=!0)}let o=e!==null&&e instanceof wG.Command?e.constructor:e,a="";if(o)if(i){let{description:l="",details:c="",examples:u=[]}=o.usage||{};l!==""&&(a+=hn.formatMarkdownish(l,{format:this.format(t),paragraphs:!1}).replace(/^./,h=>h.toUpperCase()),a+=` -`),(c!==""||u.length>0)&&(a+=`${this.format(t).header("Usage")} -`,a+=` -`);let{usage:g,options:f}=this.getUsageByRegistration(o,{inlineOptions:!1});if(a+=`${this.format(t).bold(n)}${g} -`,f.length>0){a+=` -`,a+=`${hn.richFormat.header("Options")} -`;let h=f.reduce((p,C)=>Math.max(p,C.definition.length),0);a+=` -`;for(let{definition:p,description:C}of f)a+=` ${this.format(t).bold(p.padEnd(h))} ${hn.formatMarkdownish(C,{format:this.format(t),paragraphs:!1})}`}if(c!==""&&(a+=` -`,a+=`${this.format(t).header("Details")} -`,a+=` -`,a+=hn.formatMarkdownish(c,{format:this.format(t),paragraphs:!0})),u.length>0){a+=` -`,a+=`${this.format(t).header("Examples")} -`;for(let[h,p]of u)a+=` -`,a+=hn.formatMarkdownish(h,{format:this.format(t),paragraphs:!1}),a+=`${p.replace(/^/m,` ${this.format(t).bold(n)}`).replace(/\$0/g,this.binaryName)} -`}}else{let{usage:l}=this.getUsageByRegistration(o);a+=`${this.format(t).bold(n)}${l} -`}else{let l=new Map;for(let[f,{index:h}]of this.registrations.entries()){if(typeof f.usage>"u")continue;let p=typeof f.usage.category<"u"?hn.formatMarkdownish(f.usage.category,{format:this.format(t),paragraphs:!1}):null,C=l.get(p);typeof C>"u"&&l.set(p,C=[]);let{usage:w}=this.getUsageByIndex(h);C.push({commandClass:f,usage:w})}let c=Array.from(l.keys()).sort((f,h)=>f===null?-1:h===null?1:f.localeCompare(h,"en",{usage:"sort",caseFirst:"upper"})),u=typeof this.binaryLabel<"u",g=typeof this.binaryVersion<"u";u||g?(u&&g?a+=`${this.format(t).header(`${this.binaryLabel} - ${this.binaryVersion}`)} - -`:u?a+=`${this.format(t).header(`${this.binaryLabel}`)} -`:a+=`${this.format(t).header(`${this.binaryVersion}`)} -`,a+=` ${this.format(t).bold(n)}${this.binaryName} -`):a+=`${this.format(t).bold(n)}${this.binaryName} -`;for(let f of c){let h=l.get(f).slice().sort((C,w)=>C.usage.localeCompare(w.usage,"en",{usage:"sort",caseFirst:"upper"})),p=f!==null?f.trim():"General commands";a+=` -`,a+=`${this.format(t).header(`${p}`)} -`;for(let{commandClass:C,usage:w}of h){let B=C.usage.description||"undocumented";a+=` -`,a+=` ${this.format(t).bold(w)} -`,a+=` ${hn.formatMarkdownish(B,{format:this.format(t),paragraphs:!1})}`}}a+=` -`,a+=hn.formatMarkdownish("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(t),paragraphs:!0})}return a}error(e,t){var i,{colored:n,command:s=(i=e[bG])!==null&&i!==void 0?i:null}=t===void 0?{}:t;e instanceof Error||(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let o="",a=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");a==="Error"&&(a="Internal Error"),o+=`${this.format(n).error(a)}: ${e.message} -`;let l=e.clipanion;return typeof l<"u"?l.type==="usage"&&(o+=` -`,o+=this.usage(s)):e.stack&&(o+=`${e.stack.replace(/^.*\n/,"")} -`),o}format(e){var t;return((t=e!=null?e:this.enableColors)!==null&&t!==void 0?t:OA.defaultContext.colorDepth>1)?hn.richFormat:hn.textFormat}getUsageByRegistration(e,t){let i=this.registrations.get(e);if(typeof i>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(i.index,t)}getUsageByIndex(e,t){return this.builder.getBuilderByIndex(e).usage(t)}};OA.defaultContext={stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:"getColorDepth"in BG.default.WriteStream.prototype?BG.default.WriteStream.prototype.getColorDepth():pme()};var QG;function dme(r){let e=QG;if(typeof e>"u"){if(r.stdout===process.stdout&&r.stderr===process.stderr)return SG;let{AsyncLocalStorage:t}=J("async_hooks");e=QG=new t;let i=process.stdout._write;process.stdout._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?i.call(this,s,o,a):l.stdout.write(s,o,a)};let n=process.stderr._write;process.stderr._write=function(s,o,a){let l=e.getStore();return typeof l>"u"?n.call(this,s,o,a):l.stderr.write(s,o,a)}}return t=>e.run(r,t)}function SG(r){return r()}Vv.Cli=OA});var xG=y(Xv=>{"use strict";Object.defineProperty(Xv,"__esModule",{value:!0});var Cme=bc(),cy=class extends Cme.Command{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} -`)}};cy.paths=[["--clipanion=definitions"]];Xv.DefinitionsCommand=cy});var PG=y(_v=>{"use strict";Object.defineProperty(_v,"__esModule",{value:!0});var mme=bc(),uy=class extends mme.Command{async execute(){this.context.stdout.write(this.cli.usage())}};uy.paths=[["-h"],["--help"]];_v.HelpCommand=uy});var DG=y(Zv=>{"use strict";Object.defineProperty(Zv,"__esModule",{value:!0});var Eme=bc(),gy=class extends Eme.Command{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} -`)}};gy.paths=[["-v"],["--version"]];Zv.VersionCommand=gy});var kG=y(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});var Ime=xG(),yme=PG(),wme=DG();Rd.DefinitionsCommand=Ime.DefinitionsCommand;Rd.HelpCommand=yme.HelpCommand;Rd.VersionCommand=wme.VersionCommand});var FG=y($v=>{"use strict";Object.defineProperty($v,"__esModule",{value:!0});var RG=va();function Bme(r,e,t){let[i,n]=RG.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return RG.makeCommandOption({definition(l){l.addOption({names:o,arity:s,hidden:n==null?void 0:n.hidden,description:n==null?void 0:n.description,required:n.required})},transformer(l,c,u){let g=typeof i<"u"?[...i]:void 0;for(let{name:f,value:h}of u.options)!a.has(f)||(g=g!=null?g:[],g.push(h));return g}})}$v.Array=Bme});var TG=y(ex=>{"use strict";Object.defineProperty(ex,"__esModule",{value:!0});var NG=va();function bme(r,e,t){let[i,n]=NG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return NG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u=f);return u}})}ex.Boolean=bme});var OG=y(tx=>{"use strict";Object.defineProperty(tx,"__esModule",{value:!0});var LG=va();function Qme(r,e,t){let[i,n]=LG.rerouteArguments(e,t!=null?t:{}),s=r.split(","),o=new Set(s);return LG.makeCommandOption({definition(a){a.addOption({names:s,allowBinding:!1,arity:0,hidden:n.hidden,description:n.description,required:n.required})},transformer(a,l,c){let u=i;for(let{name:g,value:f}of c.options)!o.has(g)||(u!=null||(u=0),f?u+=1:u=0);return u}})}tx.Counter=Qme});var MG=y(rx=>{"use strict";Object.defineProperty(rx,"__esModule",{value:!0});var Sme=va();function vme(r={}){return Sme.makeCommandOption({definition(e,t){var i;e.addProxy({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){return i.positionals.map(({value:n})=>n)}})}rx.Proxy=vme});var UG=y(ix=>{"use strict";Object.defineProperty(ix,"__esModule",{value:!0});var xme=va(),Pme=ly();function Dme(r={}){return xme.makeCommandOption({definition(e,t){var i;e.addRest({name:(i=r.name)!==null&&i!==void 0?i:t,required:r.required})},transformer(e,t,i){let n=o=>{let a=i.positionals[o];return a.extra===Pme.NoLimits||a.extra===!1&&oo)}})}ix.Rest=Dme});var KG=y(nx=>{"use strict";Object.defineProperty(nx,"__esModule",{value:!0});var Fd=va(),kme=ly();function Rme(r,e,t){let[i,n]=Fd.rerouteArguments(e,t!=null?t:{}),{arity:s=1}=n,o=r.split(","),a=new Set(o);return Fd.makeCommandOption({definition(l){l.addOption({names:o,arity:n.tolerateBoolean?0:s,hidden:n.hidden,description:n.description,required:n.required})},transformer(l,c,u){let g,f=i;for(let{name:h,value:p}of u.options)!a.has(h)||(g=h,f=p);return typeof f=="string"?Fd.applyValidator(g!=null?g:c,f,n.validator):f}})}function Fme(r={}){let{required:e=!0}=r;return Fd.makeCommandOption({definition(t,i){var n;t.addPositional({name:(n=r.name)!==null&&n!==void 0?n:i,required:r.required})},transformer(t,i,n){var s;for(let o=0;o{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});var lf=va(),Tme=FG(),Lme=TG(),Ome=OG(),Mme=MG(),Ume=UG(),Kme=KG();pn.applyValidator=lf.applyValidator;pn.cleanValidationError=lf.cleanValidationError;pn.formatError=lf.formatError;pn.isOptionSymbol=lf.isOptionSymbol;pn.makeCommandOption=lf.makeCommandOption;pn.rerouteArguments=lf.rerouteArguments;pn.Array=Tme.Array;pn.Boolean=Lme.Boolean;pn.Counter=Ome.Counter;pn.Proxy=Mme.Proxy;pn.Rest=Ume.Rest;pn.String=Kme.String});var Xe=y(MA=>{"use strict";Object.defineProperty(MA,"__esModule",{value:!0});var Hme=iy(),Gme=bc(),Yme=jv(),jme=vG(),qme=kG(),Jme=HG();MA.UsageError=Hme.UsageError;MA.Command=Gme.Command;MA.formatMarkdownish=Yme.formatMarkdownish;MA.Cli=jme.Cli;MA.Builtins=qme;MA.Option=Jme});var YG=y((J$e,GG)=>{"use strict";GG.exports=(r,...e)=>new Promise(t=>{t(r(...e))})});var cf=y((W$e,sx)=>{"use strict";var Wme=YG(),jG=r=>{if(r<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],t=0,i=()=>{t--,e.length>0&&e.shift()()},n=(a,l,...c)=>{t++;let u=Wme(a,...c);l(u),u.then(i,i)},s=(a,l,...c)=>{tnew Promise(c=>s(a,c,...l));return Object.defineProperties(o,{activeCount:{get:()=>t},pendingCount:{get:()=>e.length}}),o};sx.exports=jG;sx.exports.default=jG});var Nd=y((V$e,qG)=>{var zme="2.0.0",Vme=Number.MAX_SAFE_INTEGER||9007199254740991,Xme=16;qG.exports={SEMVER_SPEC_VERSION:zme,MAX_LENGTH:256,MAX_SAFE_INTEGER:Vme,MAX_SAFE_COMPONENT_LENGTH:Xme}});var Td=y((X$e,JG)=>{var _me=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...r)=>console.error("SEMVER",...r):()=>{};JG.exports=_me});var Sc=y((KA,WG)=>{var{MAX_SAFE_COMPONENT_LENGTH:ox}=Nd(),Zme=Td();KA=WG.exports={};var $me=KA.re=[],_e=KA.src=[],Ze=KA.t={},eEe=0,St=(r,e,t)=>{let i=eEe++;Zme(i,e),Ze[r]=i,_e[i]=e,$me[i]=new RegExp(e,t?"g":void 0)};St("NUMERICIDENTIFIER","0|[1-9]\\d*");St("NUMERICIDENTIFIERLOOSE","[0-9]+");St("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*");St("MAINVERSION",`(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})\\.(${_e[Ze.NUMERICIDENTIFIER]})`);St("MAINVERSIONLOOSE",`(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})\\.(${_e[Ze.NUMERICIDENTIFIERLOOSE]})`);St("PRERELEASEIDENTIFIER",`(?:${_e[Ze.NUMERICIDENTIFIER]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASEIDENTIFIERLOOSE",`(?:${_e[Ze.NUMERICIDENTIFIERLOOSE]}|${_e[Ze.NONNUMERICIDENTIFIER]})`);St("PRERELEASE",`(?:-(${_e[Ze.PRERELEASEIDENTIFIER]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIER]})*))`);St("PRERELEASELOOSE",`(?:-?(${_e[Ze.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_e[Ze.PRERELEASEIDENTIFIERLOOSE]})*))`);St("BUILDIDENTIFIER","[0-9A-Za-z-]+");St("BUILD",`(?:\\+(${_e[Ze.BUILDIDENTIFIER]}(?:\\.${_e[Ze.BUILDIDENTIFIER]})*))`);St("FULLPLAIN",`v?${_e[Ze.MAINVERSION]}${_e[Ze.PRERELEASE]}?${_e[Ze.BUILD]}?`);St("FULL",`^${_e[Ze.FULLPLAIN]}$`);St("LOOSEPLAIN",`[v=\\s]*${_e[Ze.MAINVERSIONLOOSE]}${_e[Ze.PRERELEASELOOSE]}?${_e[Ze.BUILD]}?`);St("LOOSE",`^${_e[Ze.LOOSEPLAIN]}$`);St("GTLT","((?:<|>)?=?)");St("XRANGEIDENTIFIERLOOSE",`${_e[Ze.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);St("XRANGEIDENTIFIER",`${_e[Ze.NUMERICIDENTIFIER]}|x|X|\\*`);St("XRANGEPLAIN",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:\\.(${_e[Ze.XRANGEIDENTIFIER]})(?:${_e[Ze.PRERELEASE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGEPLAINLOOSE",`[v=\\s]*(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_e[Ze.XRANGEIDENTIFIERLOOSE]})(?:${_e[Ze.PRERELEASELOOSE]})?${_e[Ze.BUILD]}?)?)?`);St("XRANGE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAIN]}$`);St("XRANGELOOSE",`^${_e[Ze.GTLT]}\\s*${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COERCE",`(^|[^\\d])(\\d{1,${ox}})(?:\\.(\\d{1,${ox}}))?(?:\\.(\\d{1,${ox}}))?(?:$|[^\\d])`);St("COERCERTL",_e[Ze.COERCE],!0);St("LONETILDE","(?:~>?)");St("TILDETRIM",`(\\s*)${_e[Ze.LONETILDE]}\\s+`,!0);KA.tildeTrimReplace="$1~";St("TILDE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAIN]}$`);St("TILDELOOSE",`^${_e[Ze.LONETILDE]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("LONECARET","(?:\\^)");St("CARETTRIM",`(\\s*)${_e[Ze.LONECARET]}\\s+`,!0);KA.caretTrimReplace="$1^";St("CARET",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAIN]}$`);St("CARETLOOSE",`^${_e[Ze.LONECARET]}${_e[Ze.XRANGEPLAINLOOSE]}$`);St("COMPARATORLOOSE",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]})$|^$`);St("COMPARATOR",`^${_e[Ze.GTLT]}\\s*(${_e[Ze.FULLPLAIN]})$|^$`);St("COMPARATORTRIM",`(\\s*)${_e[Ze.GTLT]}\\s*(${_e[Ze.LOOSEPLAIN]}|${_e[Ze.XRANGEPLAIN]})`,!0);KA.comparatorTrimReplace="$1$2$3";St("HYPHENRANGE",`^\\s*(${_e[Ze.XRANGEPLAIN]})\\s+-\\s+(${_e[Ze.XRANGEPLAIN]})\\s*$`);St("HYPHENRANGELOOSE",`^\\s*(${_e[Ze.XRANGEPLAINLOOSE]})\\s+-\\s+(${_e[Ze.XRANGEPLAINLOOSE]})\\s*$`);St("STAR","(<|>)?=?\\s*\\*");St("GTE0","^\\s*>=\\s*0.0.0\\s*$");St("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")});var Ld=y((_$e,zG)=>{var tEe=["includePrerelease","loose","rtl"],rEe=r=>r?typeof r!="object"?{loose:!0}:tEe.filter(e=>r[e]).reduce((e,t)=>(e[t]=!0,e),{}):{};zG.exports=rEe});var hy=y((Z$e,_G)=>{var VG=/^[0-9]+$/,XG=(r,e)=>{let t=VG.test(r),i=VG.test(e);return t&&i&&(r=+r,e=+e),r===e?0:t&&!i?-1:i&&!t?1:rXG(e,r);_G.exports={compareIdentifiers:XG,rcompareIdentifiers:iEe}});var Oi=y(($$e,tY)=>{var py=Td(),{MAX_LENGTH:ZG,MAX_SAFE_INTEGER:dy}=Nd(),{re:$G,t:eY}=Sc(),nEe=Ld(),{compareIdentifiers:Od}=hy(),Kn=class{constructor(e,t){if(t=nEe(t),e instanceof Kn){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid Version: ${e}`);if(e.length>ZG)throw new TypeError(`version is longer than ${ZG} characters`);py("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;let i=e.trim().match(t.loose?$G[eY.LOOSE]:$G[eY.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>dy||this.major<0)throw new TypeError("Invalid major version");if(this.minor>dy||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>dy||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map(n=>{if(/^[0-9]+$/.test(n)){let s=+n;if(s>=0&&s=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);i===-1&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}};tY.exports=Kn});var vc=y((eet,sY)=>{var{MAX_LENGTH:sEe}=Nd(),{re:rY,t:iY}=Sc(),nY=Oi(),oEe=Ld(),aEe=(r,e)=>{if(e=oEe(e),r instanceof nY)return r;if(typeof r!="string"||r.length>sEe||!(e.loose?rY[iY.LOOSE]:rY[iY.FULL]).test(r))return null;try{return new nY(r,e)}catch{return null}};sY.exports=aEe});var aY=y((tet,oY)=>{var AEe=vc(),lEe=(r,e)=>{let t=AEe(r,e);return t?t.version:null};oY.exports=lEe});var lY=y((ret,AY)=>{var cEe=vc(),uEe=(r,e)=>{let t=cEe(r.trim().replace(/^[=v]+/,""),e);return t?t.version:null};AY.exports=uEe});var uY=y((iet,cY)=>{var gEe=Oi(),fEe=(r,e,t,i)=>{typeof t=="string"&&(i=t,t=void 0);try{return new gEe(r,t).inc(e,i).version}catch{return null}};cY.exports=fEe});var os=y((net,fY)=>{var gY=Oi(),hEe=(r,e,t)=>new gY(r,t).compare(new gY(e,t));fY.exports=hEe});var Cy=y((set,hY)=>{var pEe=os(),dEe=(r,e,t)=>pEe(r,e,t)===0;hY.exports=dEe});var CY=y((oet,dY)=>{var pY=vc(),CEe=Cy(),mEe=(r,e)=>{if(CEe(r,e))return null;{let t=pY(r),i=pY(e),n=t.prerelease.length||i.prerelease.length,s=n?"pre":"",o=n?"prerelease":"";for(let a in t)if((a==="major"||a==="minor"||a==="patch")&&t[a]!==i[a])return s+a;return o}};dY.exports=mEe});var EY=y((aet,mY)=>{var EEe=Oi(),IEe=(r,e)=>new EEe(r,e).major;mY.exports=IEe});var yY=y((Aet,IY)=>{var yEe=Oi(),wEe=(r,e)=>new yEe(r,e).minor;IY.exports=wEe});var BY=y((cet,wY)=>{var BEe=Oi(),bEe=(r,e)=>new BEe(r,e).patch;wY.exports=bEe});var QY=y((uet,bY)=>{var QEe=vc(),SEe=(r,e)=>{let t=QEe(r,e);return t&&t.prerelease.length?t.prerelease:null};bY.exports=SEe});var vY=y((get,SY)=>{var vEe=os(),xEe=(r,e,t)=>vEe(e,r,t);SY.exports=xEe});var PY=y((fet,xY)=>{var PEe=os(),DEe=(r,e)=>PEe(r,e,!0);xY.exports=DEe});var my=y((het,kY)=>{var DY=Oi(),kEe=(r,e,t)=>{let i=new DY(r,t),n=new DY(e,t);return i.compare(n)||i.compareBuild(n)};kY.exports=kEe});var FY=y((pet,RY)=>{var REe=my(),FEe=(r,e)=>r.sort((t,i)=>REe(t,i,e));RY.exports=FEe});var TY=y((det,NY)=>{var NEe=my(),TEe=(r,e)=>r.sort((t,i)=>NEe(i,t,e));NY.exports=TEe});var Md=y((Cet,LY)=>{var LEe=os(),OEe=(r,e,t)=>LEe(r,e,t)>0;LY.exports=OEe});var Ey=y((met,OY)=>{var MEe=os(),UEe=(r,e,t)=>MEe(r,e,t)<0;OY.exports=UEe});var ax=y((Eet,MY)=>{var KEe=os(),HEe=(r,e,t)=>KEe(r,e,t)!==0;MY.exports=HEe});var Iy=y((Iet,UY)=>{var GEe=os(),YEe=(r,e,t)=>GEe(r,e,t)>=0;UY.exports=YEe});var yy=y((yet,KY)=>{var jEe=os(),qEe=(r,e,t)=>jEe(r,e,t)<=0;KY.exports=qEe});var Ax=y((wet,HY)=>{var JEe=Cy(),WEe=ax(),zEe=Md(),VEe=Iy(),XEe=Ey(),_Ee=yy(),ZEe=(r,e,t,i)=>{switch(e){case"===":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r===t;case"!==":return typeof r=="object"&&(r=r.version),typeof t=="object"&&(t=t.version),r!==t;case"":case"=":case"==":return JEe(r,t,i);case"!=":return WEe(r,t,i);case">":return zEe(r,t,i);case">=":return VEe(r,t,i);case"<":return XEe(r,t,i);case"<=":return _Ee(r,t,i);default:throw new TypeError(`Invalid operator: ${e}`)}};HY.exports=ZEe});var YY=y((Bet,GY)=>{var $Ee=Oi(),eIe=vc(),{re:wy,t:By}=Sc(),tIe=(r,e)=>{if(r instanceof $Ee)return r;if(typeof r=="number"&&(r=String(r)),typeof r!="string")return null;e=e||{};let t=null;if(!e.rtl)t=r.match(wy[By.COERCE]);else{let i;for(;(i=wy[By.COERCERTL].exec(r))&&(!t||t.index+t[0].length!==r.length);)(!t||i.index+i[0].length!==t.index+t[0].length)&&(t=i),wy[By.COERCERTL].lastIndex=i.index+i[1].length+i[2].length;wy[By.COERCERTL].lastIndex=-1}return t===null?null:eIe(`${t[2]}.${t[3]||"0"}.${t[4]||"0"}`,e)};GY.exports=tIe});var qY=y((bet,jY)=>{"use strict";jY.exports=function(r){r.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var Ud=y((Qet,JY)=>{"use strict";JY.exports=Ht;Ht.Node=xc;Ht.create=Ht;function Ht(r){var e=this;if(e instanceof Ht||(e=new Ht),e.tail=null,e.head=null,e.length=0,r&&typeof r.forEach=="function")r.forEach(function(n){e.push(n)});else if(arguments.length>0)for(var t=0,i=arguments.length;t1)t=e;else if(this.head)i=this.head.next,t=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=0;i!==null;n++)t=r(t,i.value,n),i=i.next;return t};Ht.prototype.reduceReverse=function(r,e){var t,i=this.tail;if(arguments.length>1)t=e;else if(this.tail)i=this.tail.prev,t=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var n=this.length-1;i!==null;n--)t=r(t,i.value,n),i=i.prev;return t};Ht.prototype.toArray=function(){for(var r=new Array(this.length),e=0,t=this.head;t!==null;e++)r[e]=t.value,t=t.next;return r};Ht.prototype.toArrayReverse=function(){for(var r=new Array(this.length),e=0,t=this.tail;t!==null;e++)r[e]=t.value,t=t.prev;return r};Ht.prototype.slice=function(r,e){e=e||this.length,e<0&&(e+=this.length),r=r||0,r<0&&(r+=this.length);var t=new Ht;if(ethis.length&&(e=this.length);for(var i=0,n=this.head;n!==null&&ithis.length&&(e=this.length);for(var i=this.length,n=this.tail;n!==null&&i>e;i--)n=n.prev;for(;n!==null&&i>r;i--,n=n.prev)t.push(n.value);return t};Ht.prototype.splice=function(r,e,...t){r>this.length&&(r=this.length-1),r<0&&(r=this.length+r);for(var i=0,n=this.head;n!==null&&i{"use strict";var sIe=Ud(),Pc=Symbol("max"),Pa=Symbol("length"),uf=Symbol("lengthCalculator"),Hd=Symbol("allowStale"),Dc=Symbol("maxAge"),xa=Symbol("dispose"),WY=Symbol("noDisposeOnSet"),Ii=Symbol("lruList"),zs=Symbol("cache"),VY=Symbol("updateAgeOnGet"),lx=()=>1,ux=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let t=this[Pc]=e.max||1/0,i=e.length||lx;if(this[uf]=typeof i!="function"?lx:i,this[Hd]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[Dc]=e.maxAge||0,this[xa]=e.dispose,this[WY]=e.noDisposeOnSet||!1,this[VY]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[Pc]=e||1/0,Kd(this)}get max(){return this[Pc]}set allowStale(e){this[Hd]=!!e}get allowStale(){return this[Hd]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[Dc]=e,Kd(this)}get maxAge(){return this[Dc]}set lengthCalculator(e){typeof e!="function"&&(e=lx),e!==this[uf]&&(this[uf]=e,this[Pa]=0,this[Ii].forEach(t=>{t.length=this[uf](t.value,t.key),this[Pa]+=t.length})),Kd(this)}get lengthCalculator(){return this[uf]}get length(){return this[Pa]}get itemCount(){return this[Ii].length}rforEach(e,t){t=t||this;for(let i=this[Ii].tail;i!==null;){let n=i.prev;zY(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[Ii].head;i!==null;){let n=i.next;zY(this,e,i,t),i=n}}keys(){return this[Ii].toArray().map(e=>e.key)}values(){return this[Ii].toArray().map(e=>e.value)}reset(){this[xa]&&this[Ii]&&this[Ii].length&&this[Ii].forEach(e=>this[xa](e.key,e.value)),this[zs]=new Map,this[Ii]=new sIe,this[Pa]=0}dump(){return this[Ii].map(e=>by(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[Ii]}set(e,t,i){if(i=i||this[Dc],i&&typeof i!="number")throw new TypeError("maxAge must be a number");let n=i?Date.now():0,s=this[uf](t,e);if(this[zs].has(e)){if(s>this[Pc])return gf(this,this[zs].get(e)),!1;let l=this[zs].get(e).value;return this[xa]&&(this[WY]||this[xa](e,l.value)),l.now=n,l.maxAge=i,l.value=t,this[Pa]+=s-l.length,l.length=s,this.get(e),Kd(this),!0}let o=new gx(e,t,s,n,i);return o.length>this[Pc]?(this[xa]&&this[xa](e,t),!1):(this[Pa]+=o.length,this[Ii].unshift(o),this[zs].set(e,this[Ii].head),Kd(this),!0)}has(e){if(!this[zs].has(e))return!1;let t=this[zs].get(e).value;return!by(this,t)}get(e){return cx(this,e,!0)}peek(e){return cx(this,e,!1)}pop(){let e=this[Ii].tail;return e?(gf(this,e),e.value):null}del(e){gf(this,this[zs].get(e))}load(e){this.reset();let t=Date.now();for(let i=e.length-1;i>=0;i--){let n=e[i],s=n.e||0;if(s===0)this.set(n.k,n.v);else{let o=s-t;o>0&&this.set(n.k,n.v,o)}}}prune(){this[zs].forEach((e,t)=>cx(this,t,!1))}},cx=(r,e,t)=>{let i=r[zs].get(e);if(i){let n=i.value;if(by(r,n)){if(gf(r,i),!r[Hd])return}else t&&(r[VY]&&(i.value.now=Date.now()),r[Ii].unshiftNode(i));return n.value}},by=(r,e)=>{if(!e||!e.maxAge&&!r[Dc])return!1;let t=Date.now()-e.now;return e.maxAge?t>e.maxAge:r[Dc]&&t>r[Dc]},Kd=r=>{if(r[Pa]>r[Pc])for(let e=r[Ii].tail;r[Pa]>r[Pc]&&e!==null;){let t=e.prev;gf(r,e),e=t}},gf=(r,e)=>{if(e){let t=e.value;r[xa]&&r[xa](t.key,t.value),r[Pa]-=t.length,r[zs].delete(t.key),r[Ii].removeNode(e)}},gx=class{constructor(e,t,i,n,s){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=s||0}},zY=(r,e,t,i)=>{let n=t.value;by(r,n)&&(gf(r,t),r[Hd]||(n=void 0)),n&&e.call(i,n.value,n.key,r)};XY.exports=ux});var as=y((xet,tj)=>{var kc=class{constructor(e,t){if(t=aIe(t),e instanceof kc)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new kc(e.raw,t);if(e instanceof fx)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(i=>this.parseRange(i.trim())).filter(i=>i.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){let i=this.set[0];if(this.set=this.set.filter(n=>!$Y(n[0])),this.set.length===0)this.set=[i];else if(this.set.length>1){for(let n of this.set)if(n.length===1&&gIe(n[0])){this.set=[n];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();let i=`parseRange:${Object.keys(this.options).join(",")}:${e}`,n=ZY.get(i);if(n)return n;let s=this.options.loose,o=s?Mi[Qi.HYPHENRANGELOOSE]:Mi[Qi.HYPHENRANGE];e=e.replace(o,wIe(this.options.includePrerelease)),jr("hyphen replace",e),e=e.replace(Mi[Qi.COMPARATORTRIM],lIe),jr("comparator trim",e,Mi[Qi.COMPARATORTRIM]),e=e.replace(Mi[Qi.TILDETRIM],cIe),e=e.replace(Mi[Qi.CARETTRIM],uIe),e=e.split(/\s+/).join(" ");let a=s?Mi[Qi.COMPARATORLOOSE]:Mi[Qi.COMPARATOR],l=e.split(" ").map(f=>fIe(f,this.options)).join(" ").split(/\s+/).map(f=>yIe(f,this.options)).filter(this.options.loose?f=>!!f.match(a):()=>!0).map(f=>new fx(f,this.options)),c=l.length,u=new Map;for(let f of l){if($Y(f))return[f];u.set(f.value,f)}u.size>1&&u.has("")&&u.delete("");let g=[...u.values()];return ZY.set(i,g),g}intersects(e,t){if(!(e instanceof kc))throw new TypeError("a Range is required");return this.set.some(i=>ej(i,t)&&e.set.some(n=>ej(n,t)&&i.every(s=>n.every(o=>s.intersects(o,t)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new AIe(e,this.options)}catch{return!1}for(let t=0;tr.value==="<0.0.0-0",gIe=r=>r.value==="",ej=(r,e)=>{let t=!0,i=r.slice(),n=i.pop();for(;t&&i.length;)t=i.every(s=>n.intersects(s,e)),n=i.pop();return t},fIe=(r,e)=>(jr("comp",r,e),r=dIe(r,e),jr("caret",r),r=hIe(r,e),jr("tildes",r),r=mIe(r,e),jr("xrange",r),r=IIe(r,e),jr("stars",r),r),Xi=r=>!r||r.toLowerCase()==="x"||r==="*",hIe=(r,e)=>r.trim().split(/\s+/).map(t=>pIe(t,e)).join(" "),pIe=(r,e)=>{let t=e.loose?Mi[Qi.TILDELOOSE]:Mi[Qi.TILDE];return r.replace(t,(i,n,s,o,a)=>{jr("tilde",r,i,n,s,o,a);let l;return Xi(n)?l="":Xi(s)?l=`>=${n}.0.0 <${+n+1}.0.0-0`:Xi(o)?l=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`:a?(jr("replaceTilde pr",a),l=`>=${n}.${s}.${o}-${a} <${n}.${+s+1}.0-0`):l=`>=${n}.${s}.${o} <${n}.${+s+1}.0-0`,jr("tilde return",l),l})},dIe=(r,e)=>r.trim().split(/\s+/).map(t=>CIe(t,e)).join(" "),CIe=(r,e)=>{jr("caret",r,e);let t=e.loose?Mi[Qi.CARETLOOSE]:Mi[Qi.CARET],i=e.includePrerelease?"-0":"";return r.replace(t,(n,s,o,a,l)=>{jr("caret",r,n,s,o,a,l);let c;return Xi(s)?c="":Xi(o)?c=`>=${s}.0.0${i} <${+s+1}.0.0-0`:Xi(a)?s==="0"?c=`>=${s}.${o}.0${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.0${i} <${+s+1}.0.0-0`:l?(jr("replaceCaret pr",l),s==="0"?o==="0"?c=`>=${s}.${o}.${a}-${l} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}-${l} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a}-${l} <${+s+1}.0.0-0`):(jr("no pr"),s==="0"?o==="0"?c=`>=${s}.${o}.${a}${i} <${s}.${o}.${+a+1}-0`:c=`>=${s}.${o}.${a}${i} <${s}.${+o+1}.0-0`:c=`>=${s}.${o}.${a} <${+s+1}.0.0-0`),jr("caret return",c),c})},mIe=(r,e)=>(jr("replaceXRanges",r,e),r.split(/\s+/).map(t=>EIe(t,e)).join(" ")),EIe=(r,e)=>{r=r.trim();let t=e.loose?Mi[Qi.XRANGELOOSE]:Mi[Qi.XRANGE];return r.replace(t,(i,n,s,o,a,l)=>{jr("xRange",r,i,n,s,o,a,l);let c=Xi(s),u=c||Xi(o),g=u||Xi(a),f=g;return n==="="&&f&&(n=""),l=e.includePrerelease?"-0":"",c?n===">"||n==="<"?i="<0.0.0-0":i="*":n&&f?(u&&(o=0),a=0,n===">"?(n=">=",u?(s=+s+1,o=0,a=0):(o=+o+1,a=0)):n==="<="&&(n="<",u?s=+s+1:o=+o+1),n==="<"&&(l="-0"),i=`${n+s}.${o}.${a}${l}`):u?i=`>=${s}.0.0${l} <${+s+1}.0.0-0`:g&&(i=`>=${s}.${o}.0${l} <${s}.${+o+1}.0-0`),jr("xRange return",i),i})},IIe=(r,e)=>(jr("replaceStars",r,e),r.trim().replace(Mi[Qi.STAR],"")),yIe=(r,e)=>(jr("replaceGTE0",r,e),r.trim().replace(Mi[e.includePrerelease?Qi.GTE0PRE:Qi.GTE0],"")),wIe=r=>(e,t,i,n,s,o,a,l,c,u,g,f,h)=>(Xi(i)?t="":Xi(n)?t=`>=${i}.0.0${r?"-0":""}`:Xi(s)?t=`>=${i}.${n}.0${r?"-0":""}`:o?t=`>=${t}`:t=`>=${t}${r?"-0":""}`,Xi(c)?l="":Xi(u)?l=`<${+c+1}.0.0-0`:Xi(g)?l=`<${c}.${+u+1}.0-0`:f?l=`<=${c}.${u}.${g}-${f}`:r?l=`<${c}.${u}.${+g+1}-0`:l=`<=${l}`,`${t} ${l}`.trim()),BIe=(r,e,t)=>{for(let i=0;i0){let n=r[i].semver;if(n.major===e.major&&n.minor===e.minor&&n.patch===e.patch)return!0}return!1}return!0}});var Gd=y((Pet,oj)=>{var Yd=Symbol("SemVer ANY"),ff=class{static get ANY(){return Yd}constructor(e,t){if(t=bIe(t),e instanceof ff){if(e.loose===!!t.loose)return e;e=e.value}px("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===Yd?this.value="":this.value=this.operator+this.semver.version,px("comp",this)}parse(e){let t=this.options.loose?rj[ij.COMPARATORLOOSE]:rj[ij.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=i[1]!==void 0?i[1]:"",this.operator==="="&&(this.operator=""),i[2]?this.semver=new nj(i[2],this.options.loose):this.semver=Yd}toString(){return this.value}test(e){if(px("Comparator.test",e,this.options.loose),this.semver===Yd||e===Yd)return!0;if(typeof e=="string")try{e=new nj(e,this.options)}catch{return!1}return hx(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof ff))throw new TypeError("a Comparator is required");if((!t||typeof t!="object")&&(t={loose:!!t,includePrerelease:!1}),this.operator==="")return this.value===""?!0:new sj(e.value,t).test(this.value);if(e.operator==="")return e.value===""?!0:new sj(this.value,t).test(e.semver);let i=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">"),n=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<"),s=this.semver.version===e.semver.version,o=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<="),a=hx(this.semver,"<",e.semver,t)&&(this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"),l=hx(this.semver,">",e.semver,t)&&(this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">");return i||n||s&&o||a||l}};oj.exports=ff;var bIe=Ld(),{re:rj,t:ij}=Sc(),hx=Ax(),px=Td(),nj=Oi(),sj=as()});var jd=y((Det,aj)=>{var QIe=as(),SIe=(r,e,t)=>{try{e=new QIe(e,t)}catch{return!1}return e.test(r)};aj.exports=SIe});var lj=y((ket,Aj)=>{var vIe=as(),xIe=(r,e)=>new vIe(r,e).set.map(t=>t.map(i=>i.value).join(" ").trim().split(" "));Aj.exports=xIe});var uj=y((Ret,cj)=>{var PIe=Oi(),DIe=as(),kIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new DIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===-1)&&(i=o,n=new PIe(i,t))}),i};cj.exports=kIe});var fj=y((Fet,gj)=>{var RIe=Oi(),FIe=as(),NIe=(r,e,t)=>{let i=null,n=null,s=null;try{s=new FIe(e,t)}catch{return null}return r.forEach(o=>{s.test(o)&&(!i||n.compare(o)===1)&&(i=o,n=new RIe(i,t))}),i};gj.exports=NIe});var dj=y((Net,pj)=>{var dx=Oi(),TIe=as(),hj=Md(),LIe=(r,e)=>{r=new TIe(r,e);let t=new dx("0.0.0");if(r.test(t)||(t=new dx("0.0.0-0"),r.test(t)))return t;t=null;for(let i=0;i{let a=new dx(o.semver.version);switch(o.operator){case">":a.prerelease.length===0?a.patch++:a.prerelease.push(0),a.raw=a.format();case"":case">=":(!s||hj(a,s))&&(s=a);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${o.operator}`)}}),s&&(!t||hj(t,s))&&(t=s)}return t&&r.test(t)?t:null};pj.exports=LIe});var mj=y((Tet,Cj)=>{var OIe=as(),MIe=(r,e)=>{try{return new OIe(r,e).range||"*"}catch{return null}};Cj.exports=MIe});var Qy=y((Let,wj)=>{var UIe=Oi(),yj=Gd(),{ANY:KIe}=yj,HIe=as(),GIe=jd(),Ej=Md(),Ij=Ey(),YIe=yy(),jIe=Iy(),qIe=(r,e,t,i)=>{r=new UIe(r,i),e=new HIe(e,i);let n,s,o,a,l;switch(t){case">":n=Ej,s=YIe,o=Ij,a=">",l=">=";break;case"<":n=Ij,s=jIe,o=Ej,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(GIe(r,e,i))return!1;for(let c=0;c{h.semver===KIe&&(h=new yj(">=0.0.0")),g=g||h,f=f||h,n(h.semver,g.semver,i)?g=h:o(h.semver,f.semver,i)&&(f=h)}),g.operator===a||g.operator===l||(!f.operator||f.operator===a)&&s(r,f.semver))return!1;if(f.operator===l&&o(r,f.semver))return!1}return!0};wj.exports=qIe});var bj=y((Oet,Bj)=>{var JIe=Qy(),WIe=(r,e,t)=>JIe(r,e,">",t);Bj.exports=WIe});var Sj=y((Met,Qj)=>{var zIe=Qy(),VIe=(r,e,t)=>zIe(r,e,"<",t);Qj.exports=VIe});var Pj=y((Uet,xj)=>{var vj=as(),XIe=(r,e,t)=>(r=new vj(r,t),e=new vj(e,t),r.intersects(e));xj.exports=XIe});var kj=y((Ket,Dj)=>{var _Ie=jd(),ZIe=os();Dj.exports=(r,e,t)=>{let i=[],n=null,s=null,o=r.sort((u,g)=>ZIe(u,g,t));for(let u of o)_Ie(u,e,t)?(s=u,n||(n=u)):(s&&i.push([n,s]),s=null,n=null);n&&i.push([n,null]);let a=[];for(let[u,g]of i)u===g?a.push(u):!g&&u===o[0]?a.push("*"):g?u===o[0]?a.push(`<=${g}`):a.push(`${u} - ${g}`):a.push(`>=${u}`);let l=a.join(" || "),c=typeof e.raw=="string"?e.raw:String(e);return l.length{var Rj=as(),Sy=Gd(),{ANY:Cx}=Sy,qd=jd(),mx=os(),$Ie=(r,e,t={})=>{if(r===e)return!0;r=new Rj(r,t),e=new Rj(e,t);let i=!1;e:for(let n of r.set){for(let s of e.set){let o=eye(n,s,t);if(i=i||o!==null,o)continue e}if(i)return!1}return!0},eye=(r,e,t)=>{if(r===e)return!0;if(r.length===1&&r[0].semver===Cx){if(e.length===1&&e[0].semver===Cx)return!0;t.includePrerelease?r=[new Sy(">=0.0.0-0")]:r=[new Sy(">=0.0.0")]}if(e.length===1&&e[0].semver===Cx){if(t.includePrerelease)return!0;e=[new Sy(">=0.0.0")]}let i=new Set,n,s;for(let h of r)h.operator===">"||h.operator===">="?n=Fj(n,h,t):h.operator==="<"||h.operator==="<="?s=Nj(s,h,t):i.add(h.semver);if(i.size>1)return null;let o;if(n&&s){if(o=mx(n.semver,s.semver,t),o>0)return null;if(o===0&&(n.operator!==">="||s.operator!=="<="))return null}for(let h of i){if(n&&!qd(h,String(n),t)||s&&!qd(h,String(s),t))return null;for(let p of e)if(!qd(h,String(p),t))return!1;return!0}let a,l,c,u,g=s&&!t.includePrerelease&&s.semver.prerelease.length?s.semver:!1,f=n&&!t.includePrerelease&&n.semver.prerelease.length?n.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(let h of e){if(u=u||h.operator===">"||h.operator===">=",c=c||h.operator==="<"||h.operator==="<=",n){if(f&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===f.major&&h.semver.minor===f.minor&&h.semver.patch===f.patch&&(f=!1),h.operator===">"||h.operator===">="){if(a=Fj(n,h,t),a===h&&a!==n)return!1}else if(n.operator===">="&&!qd(n.semver,String(h),t))return!1}if(s){if(g&&h.semver.prerelease&&h.semver.prerelease.length&&h.semver.major===g.major&&h.semver.minor===g.minor&&h.semver.patch===g.patch&&(g=!1),h.operator==="<"||h.operator==="<="){if(l=Nj(s,h,t),l===h&&l!==s)return!1}else if(s.operator==="<="&&!qd(s.semver,String(h),t))return!1}if(!h.operator&&(s||n)&&o!==0)return!1}return!(n&&c&&!s&&o!==0||s&&u&&!n&&o!==0||f||g)},Fj=(r,e,t)=>{if(!r)return e;let i=mx(r.semver,e.semver,t);return i>0?r:i<0||e.operator===">"&&r.operator===">="?e:r},Nj=(r,e,t)=>{if(!r)return e;let i=mx(r.semver,e.semver,t);return i<0?r:i>0||e.operator==="<"&&r.operator==="<="?e:r};Tj.exports=$Ie});var $r=y((Get,Oj)=>{var Ex=Sc();Oj.exports={re:Ex.re,src:Ex.src,tokens:Ex.t,SEMVER_SPEC_VERSION:Nd().SEMVER_SPEC_VERSION,SemVer:Oi(),compareIdentifiers:hy().compareIdentifiers,rcompareIdentifiers:hy().rcompareIdentifiers,parse:vc(),valid:aY(),clean:lY(),inc:uY(),diff:CY(),major:EY(),minor:yY(),patch:BY(),prerelease:QY(),compare:os(),rcompare:vY(),compareLoose:PY(),compareBuild:my(),sort:FY(),rsort:TY(),gt:Md(),lt:Ey(),eq:Cy(),neq:ax(),gte:Iy(),lte:yy(),cmp:Ax(),coerce:YY(),Comparator:Gd(),Range:as(),satisfies:jd(),toComparators:lj(),maxSatisfying:uj(),minSatisfying:fj(),minVersion:dj(),validRange:mj(),outside:Qy(),gtr:bj(),ltr:Sj(),intersects:Pj(),simplifyRange:kj(),subset:Lj()}});var Ix=y(vy=>{"use strict";Object.defineProperty(vy,"__esModule",{value:!0});vy.VERSION=void 0;vy.VERSION="9.1.0"});var Gt=y((exports,module)=>{"use strict";var __spreadArray=exports&&exports.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i{(function(r,e){typeof define=="function"&&define.amd?define([],e):typeof xy=="object"&&xy.exports?xy.exports=e():r.regexpToAst=e()})(typeof self<"u"?self:Mj,function(){function r(){}r.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},r.prototype.restoreState=function(p){this.idx=p.idx,this.input=p.input,this.groupIdx=p.groupIdx},r.prototype.pattern=function(p){this.idx=0,this.input=p,this.groupIdx=0,this.consumeChar("/");var C=this.disjunction();this.consumeChar("/");for(var w={type:"Flags",loc:{begin:this.idx,end:p.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(w,"global");break;case"i":o(w,"ignoreCase");break;case"m":o(w,"multiLine");break;case"u":o(w,"unicode");break;case"y":o(w,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:w,value:C,loc:this.loc(0)}},r.prototype.disjunction=function(){var p=[],C=this.idx;for(p.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),p.push(this.alternative());return{type:"Disjunction",value:p,loc:this.loc(C)}},r.prototype.alternative=function(){for(var p=[],C=this.idx;this.isTerm();)p.push(this.term());return{type:"Alternative",value:p,loc:this.loc(C)}},r.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},r.prototype.assertion=function(){var p=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(p)};case"$":return{type:"EndAnchor",loc:this.loc(p)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(p)};case"B":return{type:"NonWordBoundary",loc:this.loc(p)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var C;switch(this.popChar()){case"=":C="Lookahead";break;case"!":C="NegativeLookahead";break}a(C);var w=this.disjunction();return this.consumeChar(")"),{type:C,value:w,loc:this.loc(p)}}l()},r.prototype.quantifier=function(p){var C,w=this.idx;switch(this.popChar()){case"*":C={atLeast:0,atMost:1/0};break;case"+":C={atLeast:1,atMost:1/0};break;case"?":C={atLeast:0,atMost:1};break;case"{":var B=this.integerIncludingZero();switch(this.popChar()){case"}":C={atLeast:B,atMost:B};break;case",":var v;this.isDigit()?(v=this.integerIncludingZero(),C={atLeast:B,atMost:v}):C={atLeast:B,atMost:1/0},this.consumeChar("}");break}if(p===!0&&C===void 0)return;a(C);break}if(!(p===!0&&C===void 0))return a(C),this.peekChar(0)==="?"?(this.consumeChar("?"),C.greedy=!1):C.greedy=!0,C.type="Quantifier",C.loc=this.loc(w),C},r.prototype.atom=function(){var p,C=this.idx;switch(this.peekChar()){case".":p=this.dotAll();break;case"\\":p=this.atomEscape();break;case"[":p=this.characterClass();break;case"(":p=this.group();break}return p===void 0&&this.isPatternCharacter()&&(p=this.patternCharacter()),a(p),p.loc=this.loc(C),this.isQuantifier()&&(p.quantifier=this.quantifier()),p},r.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[n(` -`),n("\r"),n("\u2028"),n("\u2029")]}},r.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},r.prototype.decimalEscapeAtom=function(){var p=this.positiveInteger();return{type:"GroupBackReference",value:p}},r.prototype.characterClassEscape=function(){var p,C=!1;switch(this.popChar()){case"d":p=u;break;case"D":p=u,C=!0;break;case"s":p=f;break;case"S":p=f,C=!0;break;case"w":p=g;break;case"W":p=g,C=!0;break}return a(p),{type:"Set",value:p,complement:C}},r.prototype.controlEscapeAtom=function(){var p;switch(this.popChar()){case"f":p=n("\f");break;case"n":p=n(` -`);break;case"r":p=n("\r");break;case"t":p=n(" ");break;case"v":p=n("\v");break}return a(p),{type:"Character",value:p}},r.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var p=this.popChar();if(/[a-zA-Z]/.test(p)===!1)throw Error("Invalid ");var C=p.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:C}},r.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:n("\0")}},r.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},r.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},r.prototype.identityEscapeAtom=function(){var p=this.popChar();return{type:"Character",value:n(p)}},r.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var p=this.popChar();return{type:"Character",value:n(p)}}},r.prototype.characterClass=function(){var p=[],C=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),C=!0);this.isClassAtom();){var w=this.classAtom(),B=w.type==="Character";if(B&&this.isRangeDash()){this.consumeChar("-");var v=this.classAtom(),D=v.type==="Character";if(D){if(v.value=this.input.length)throw Error("Unexpected end of input");this.idx++},r.prototype.loc=function(p){return{begin:p,end:this.idx}};var e=/[0-9a-fA-F]/,t=/[0-9]/,i=/[1-9]/;function n(p){return p.charCodeAt(0)}function s(p,C){p.length!==void 0?p.forEach(function(w){C.push(w)}):C.push(p)}function o(p,C){if(p[C]===!0)throw"duplicate flag "+C;p[C]=!0}function a(p){if(p===void 0)throw Error("Internal Error - Should never get here!")}function l(){throw Error("Internal Error - Should never get here!")}var c,u=[];for(c=n("0");c<=n("9");c++)u.push(c);var g=[n("_")].concat(u);for(c=n("a");c<=n("z");c++)g.push(c);for(c=n("A");c<=n("Z");c++)g.push(c);var f=[n(" "),n("\f"),n(` -`),n("\r"),n(" "),n("\v"),n(" "),n("\xA0"),n("\u1680"),n("\u2000"),n("\u2001"),n("\u2002"),n("\u2003"),n("\u2004"),n("\u2005"),n("\u2006"),n("\u2007"),n("\u2008"),n("\u2009"),n("\u200A"),n("\u2028"),n("\u2029"),n("\u202F"),n("\u205F"),n("\u3000"),n("\uFEFF")];function h(){}return h.prototype.visitChildren=function(p){for(var C in p){var w=p[C];p.hasOwnProperty(C)&&(w.type!==void 0?this.visit(w):Array.isArray(w)&&w.forEach(function(B){this.visit(B)},this))}},h.prototype.visit=function(p){switch(p.type){case"Pattern":this.visitPattern(p);break;case"Flags":this.visitFlags(p);break;case"Disjunction":this.visitDisjunction(p);break;case"Alternative":this.visitAlternative(p);break;case"StartAnchor":this.visitStartAnchor(p);break;case"EndAnchor":this.visitEndAnchor(p);break;case"WordBoundary":this.visitWordBoundary(p);break;case"NonWordBoundary":this.visitNonWordBoundary(p);break;case"Lookahead":this.visitLookahead(p);break;case"NegativeLookahead":this.visitNegativeLookahead(p);break;case"Character":this.visitCharacter(p);break;case"Set":this.visitSet(p);break;case"Group":this.visitGroup(p);break;case"GroupBackReference":this.visitGroupBackReference(p);break;case"Quantifier":this.visitQuantifier(p);break}this.visitChildren(p)},h.prototype.visitPattern=function(p){},h.prototype.visitFlags=function(p){},h.prototype.visitDisjunction=function(p){},h.prototype.visitAlternative=function(p){},h.prototype.visitStartAnchor=function(p){},h.prototype.visitEndAnchor=function(p){},h.prototype.visitWordBoundary=function(p){},h.prototype.visitNonWordBoundary=function(p){},h.prototype.visitLookahead=function(p){},h.prototype.visitNegativeLookahead=function(p){},h.prototype.visitCharacter=function(p){},h.prototype.visitSet=function(p){},h.prototype.visitGroup=function(p){},h.prototype.visitGroupBackReference=function(p){},h.prototype.visitQuantifier=function(p){},{RegExpParser:r,BaseRegExpVisitor:h,VERSION:"0.5.0"}})});var ky=y(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.clearRegExpParserCache=hf.getRegExpAst=void 0;var tye=Py(),Dy={},rye=new tye.RegExpParser;function iye(r){var e=r.toString();if(Dy.hasOwnProperty(e))return Dy[e];var t=rye.pattern(e);return Dy[e]=t,t}hf.getRegExpAst=iye;function nye(){Dy={}}hf.clearRegExpParserCache=nye});var Yj=y(dn=>{"use strict";var sye=dn&&dn.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(dn,"__esModule",{value:!0});dn.canMatchCharCode=dn.firstCharOptimizedIndices=dn.getOptimizedStartCodesIndices=dn.failedOptimizationPrefixMsg=void 0;var Kj=Py(),As=Gt(),Hj=ky(),Da=wx(),Gj="Complement Sets are not supported for first char optimization";dn.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations: -`;function oye(r,e){e===void 0&&(e=!1);try{var t=(0,Hj.getRegExpAst)(r),i=Fy(t.value,{},t.flags.ignoreCase);return i}catch(s){if(s.message===Gj)e&&(0,As.PRINT_WARNING)(""+dn.failedOptimizationPrefixMsg+(" Unable to optimize: < "+r.toString()+` > -`)+` Complement Sets cannot be automatically optimized. - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var n="";e&&(n=` - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,As.PRINT_ERROR)(dn.failedOptimizationPrefixMsg+` -`+(" Failed parsing: < "+r.toString()+` > -`)+(" Using the regexp-to-ast library version: "+Kj.VERSION+` -`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+n)}}return[]}dn.getOptimizedStartCodesIndices=oye;function Fy(r,e,t){switch(r.type){case"Disjunction":for(var i=0;i=Da.minOptimizationVal)for(var f=u.from>=Da.minOptimizationVal?u.from:Da.minOptimizationVal,h=u.to,p=(0,Da.charCodeToOptimizedIndex)(f),C=(0,Da.charCodeToOptimizedIndex)(h),w=p;w<=C;w++)e[w]=w}}});break;case"Group":Fy(o.value,e,t);break;default:throw Error("Non Exhaustive Match")}var a=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&yx(o)===!1||o.type!=="Group"&&a===!1)break}break;default:throw Error("non exhaustive match!")}return(0,As.values)(e)}dn.firstCharOptimizedIndices=Fy;function Ry(r,e,t){var i=(0,Da.charCodeToOptimizedIndex)(r);e[i]=i,t===!0&&aye(r,e)}function aye(r,e){var t=String.fromCharCode(r),i=t.toUpperCase();if(i!==t){var n=(0,Da.charCodeToOptimizedIndex)(i.charCodeAt(0));e[n]=n}else{var s=t.toLowerCase();if(s!==t){var n=(0,Da.charCodeToOptimizedIndex)(s.charCodeAt(0));e[n]=n}}}function Uj(r,e){return(0,As.find)(r.value,function(t){if(typeof t=="number")return(0,As.contains)(e,t);var i=t;return(0,As.find)(e,function(n){return i.from<=n&&n<=i.to})!==void 0})}function yx(r){return r.quantifier&&r.quantifier.atLeast===0?!0:r.value?(0,As.isArray)(r.value)?(0,As.every)(r.value,yx):yx(r.value):!1}var Aye=function(r){sye(e,r);function e(t){var i=r.call(this)||this;return i.targetCharCodes=t,i.found=!1,i}return e.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}r.prototype.visitChildren.call(this,t)}},e.prototype.visitCharacter=function(t){(0,As.contains)(this.targetCharCodes,t.value)&&(this.found=!0)},e.prototype.visitSet=function(t){t.complement?Uj(t,this.targetCharCodes)===void 0&&(this.found=!0):Uj(t,this.targetCharCodes)!==void 0&&(this.found=!0)},e}(Kj.BaseRegExpVisitor);function lye(r,e){if(e instanceof RegExp){var t=(0,Hj.getRegExpAst)(e),i=new Aye(r);return i.visit(t),i.found}else return(0,As.find)(e,function(n){return(0,As.contains)(r,n.charCodeAt(0))})!==void 0}dn.canMatchCharCode=lye});var wx=y(Je=>{"use strict";var jj=Je&&Je.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Je,"__esModule",{value:!0});Je.charCodeToOptimizedIndex=Je.minOptimizationVal=Je.buildLineBreakIssueMessage=Je.LineTerminatorOptimizedTester=Je.isShortPattern=Je.isCustomPattern=Je.cloneEmptyGroups=Je.performWarningRuntimeChecks=Je.performRuntimeChecks=Je.addStickyFlag=Je.addStartOfInput=Je.findUnreachablePatterns=Je.findModesThatDoNotExist=Je.findInvalidGroupType=Je.findDuplicatePatterns=Je.findUnsupportedFlags=Je.findStartOfInputAnchor=Je.findEmptyMatchRegExps=Je.findEndOfInputAnchor=Je.findInvalidPatterns=Je.findMissingPatterns=Je.validatePatterns=Je.analyzeTokenTypes=Je.enableSticky=Je.disableSticky=Je.SUPPORT_STICKY=Je.MODES=Je.DEFAULT_MODE=void 0;var qj=Py(),ir=Jd(),Se=Gt(),pf=Yj(),Jj=ky(),Do="PATTERN";Je.DEFAULT_MODE="defaultMode";Je.MODES="modes";Je.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function cye(){Je.SUPPORT_STICKY=!1}Je.disableSticky=cye;function uye(){Je.SUPPORT_STICKY=!0}Je.enableSticky=uye;function gye(r,e){e=(0,Se.defaults)(e,{useSticky:Je.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:function(v,D){return D()}});var t=e.tracer;t("initCharCodeToOptimizedIndexMap",function(){wye()});var i;t("Reject Lexer.NA",function(){i=(0,Se.reject)(r,function(v){return v[Do]===ir.Lexer.NA})});var n=!1,s;t("Transform Patterns",function(){n=!1,s=(0,Se.map)(i,function(v){var D=v[Do];if((0,Se.isRegExp)(D)){var T=D.source;return T.length===1&&T!=="^"&&T!=="$"&&T!=="."&&!D.ignoreCase?T:T.length===2&&T[0]==="\\"&&!(0,Se.contains)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],T[1])?T[1]:e.useSticky?Qx(D):bx(D)}else{if((0,Se.isFunction)(D))return n=!0,{exec:D};if((0,Se.has)(D,"exec"))return n=!0,D;if(typeof D=="string"){if(D.length===1)return D;var H=D.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),j=new RegExp(H);return e.useSticky?Qx(j):bx(j)}else throw Error("non exhaustive match")}})});var o,a,l,c,u;t("misc mapping",function(){o=(0,Se.map)(i,function(v){return v.tokenTypeIdx}),a=(0,Se.map)(i,function(v){var D=v.GROUP;if(D!==ir.Lexer.SKIPPED){if((0,Se.isString)(D))return D;if((0,Se.isUndefined)(D))return!1;throw Error("non exhaustive match")}}),l=(0,Se.map)(i,function(v){var D=v.LONGER_ALT;if(D){var T=(0,Se.isArray)(D)?(0,Se.map)(D,function(H){return(0,Se.indexOf)(i,H)}):[(0,Se.indexOf)(i,D)];return T}}),c=(0,Se.map)(i,function(v){return v.PUSH_MODE}),u=(0,Se.map)(i,function(v){return(0,Se.has)(v,"POP_MODE")})});var g;t("Line Terminator Handling",function(){var v=oq(e.lineTerminatorCharacters);g=(0,Se.map)(i,function(D){return!1}),e.positionTracking!=="onlyOffset"&&(g=(0,Se.map)(i,function(D){if((0,Se.has)(D,"LINE_BREAKS"))return D.LINE_BREAKS;if(nq(D,v)===!1)return(0,pf.canMatchCharCode)(v,D.PATTERN)}))});var f,h,p,C;t("Misc Mapping #2",function(){f=(0,Se.map)(i,vx),h=(0,Se.map)(s,iq),p=(0,Se.reduce)(i,function(v,D){var T=D.GROUP;return(0,Se.isString)(T)&&T!==ir.Lexer.SKIPPED&&(v[T]=[]),v},{}),C=(0,Se.map)(s,function(v,D){return{pattern:s[D],longerAlt:l[D],canLineTerminator:g[D],isCustom:f[D],short:h[D],group:a[D],push:c[D],pop:u[D],tokenTypeIdx:o[D],tokenType:i[D]}})});var w=!0,B=[];return e.safeMode||t("First Char Optimization",function(){B=(0,Se.reduce)(i,function(v,D,T){if(typeof D.PATTERN=="string"){var H=D.PATTERN.charCodeAt(0),j=Sx(H);Bx(v,j,C[T])}else if((0,Se.isArray)(D.START_CHARS_HINT)){var $;(0,Se.forEach)(D.START_CHARS_HINT,function(W){var Z=typeof W=="string"?W.charCodeAt(0):W,A=Sx(Z);$!==A&&($=A,Bx(v,A,C[T]))})}else if((0,Se.isRegExp)(D.PATTERN))if(D.PATTERN.unicode)w=!1,e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+pf.failedOptimizationPrefixMsg+(" Unable to analyze < "+D.PATTERN.toString()+` > pattern. -`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var V=(0,pf.getOptimizedStartCodesIndices)(D.PATTERN,e.ensureOptimizations);(0,Se.isEmpty)(V)&&(w=!1),(0,Se.forEach)(V,function(W){Bx(v,W,C[T])})}else e.ensureOptimizations&&(0,Se.PRINT_ERROR)(""+pf.failedOptimizationPrefixMsg+(" TokenType: <"+D.name+`> is using a custom token pattern without providing parameter. -`)+` This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),w=!1;return v},[])}),t("ArrayPacking",function(){B=(0,Se.packArray)(B)}),{emptyGroups:p,patternIdxToConfig:C,charCodeToPatternIdxToConfig:B,hasCustom:n,canBeOptimized:w}}Je.analyzeTokenTypes=gye;function fye(r,e){var t=[],i=Wj(r);t=t.concat(i.errors);var n=zj(i.valid),s=n.valid;return t=t.concat(n.errors),t=t.concat(hye(s)),t=t.concat(eq(s)),t=t.concat(tq(s,e)),t=t.concat(rq(s)),t}Je.validatePatterns=fye;function hye(r){var e=[],t=(0,Se.filter)(r,function(i){return(0,Se.isRegExp)(i[Do])});return e=e.concat(Vj(t)),e=e.concat(_j(t)),e=e.concat(Zj(t)),e=e.concat($j(t)),e=e.concat(Xj(t)),e}function Wj(r){var e=(0,Se.filter)(r,function(n){return!(0,Se.has)(n,Do)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- missing static 'PATTERN' property",type:ir.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findMissingPatterns=Wj;function zj(r){var e=(0,Se.filter)(r,function(n){var s=n[Do];return!(0,Se.isRegExp)(s)&&!(0,Se.isFunction)(s)&&!(0,Se.has)(s,"exec")&&!(0,Se.isString)(s)}),t=(0,Se.map)(e,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ir.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[n]}}),i=(0,Se.difference)(r,e);return{errors:t,valid:i}}Je.findInvalidPatterns=zj;var pye=/[^\\][\$]/;function Vj(r){var e=function(n){jj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitEndAnchor=function(o){this.found=!0},s}(qj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Jj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return pye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findEndOfInputAnchor=Vj;function Xj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n.test("")}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' must not match an empty string",type:ir.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[i]}});return t}Je.findEmptyMatchRegExps=Xj;var dye=/[^\\[][\^]|^\^/;function _j(r){var e=function(n){jj(s,n);function s(){var o=n!==null&&n.apply(this,arguments)||this;return o.found=!1,o}return s.prototype.visitStartAnchor=function(o){this.found=!0},s}(qj.BaseRegExpVisitor),t=(0,Se.filter)(r,function(n){var s=n[Do];try{var o=(0,Jj.getRegExpAst)(s),a=new e;return a.visit(o),a.found}catch{return dye.test(s.source)}}),i=(0,Se.map)(t,function(n){return{message:`Unexpected RegExp Anchor Error: - Token Type: ->`+n.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:ir.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[n]}});return i}Je.findStartOfInputAnchor=_j;function Zj(r){var e=(0,Se.filter)(r,function(i){var n=i[Do];return n instanceof RegExp&&(n.multiline||n.global)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ir.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[i]}});return t}Je.findUnsupportedFlags=Zj;function $j(r){var e=[],t=(0,Se.map)(r,function(s){return(0,Se.reduce)(r,function(o,a){return s.PATTERN.source===a.PATTERN.source&&!(0,Se.contains)(e,a)&&a.PATTERN!==ir.Lexer.NA&&(e.push(a),o.push(a)),o},[])});t=(0,Se.compact)(t);var i=(0,Se.filter)(t,function(s){return s.length>1}),n=(0,Se.map)(i,function(s){var o=(0,Se.map)(s,function(l){return l.name}),a=(0,Se.first)(s).PATTERN;return{message:"The same RegExp pattern ->"+a+"<-"+("has been used in all of the following Token Types: "+o.join(", ")+" <-"),type:ir.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:s}});return n}Je.findDuplicatePatterns=$j;function eq(r){var e=(0,Se.filter)(r,function(i){if(!(0,Se.has)(i,"GROUP"))return!1;var n=i.GROUP;return n!==ir.Lexer.SKIPPED&&n!==ir.Lexer.NA&&!(0,Se.isString)(n)}),t=(0,Se.map)(e,function(i){return{message:"Token Type: ->"+i.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ir.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[i]}});return t}Je.findInvalidGroupType=eq;function tq(r,e){var t=(0,Se.filter)(r,function(n){return n.PUSH_MODE!==void 0&&!(0,Se.contains)(e,n.PUSH_MODE)}),i=(0,Se.map)(t,function(n){var s="Token Type: ->"+n.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+n.PUSH_MODE+"<-which does not exist";return{message:s,type:ir.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[n]}});return i}Je.findModesThatDoNotExist=tq;function rq(r){var e=[],t=(0,Se.reduce)(r,function(i,n,s){var o=n.PATTERN;return o===ir.Lexer.NA||((0,Se.isString)(o)?i.push({str:o,idx:s,tokenType:n}):(0,Se.isRegExp)(o)&&mye(o)&&i.push({str:o.source,idx:s,tokenType:n})),i},[]);return(0,Se.forEach)(r,function(i,n){(0,Se.forEach)(t,function(s){var o=s.str,a=s.idx,l=s.tokenType;if(n"+i.name+"<-")+`in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.push({message:c,type:ir.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[i,l]})}})}),e}Je.findUnreachablePatterns=rq;function Cye(r,e){if((0,Se.isRegExp)(e)){var t=e.exec(r);return t!==null&&t.index===0}else{if((0,Se.isFunction)(e))return e(r,0,[],{});if((0,Se.has)(e,"exec"))return e.exec(r,0,[],{});if(typeof e=="string")return e===r;throw Error("non exhaustive match")}}function mye(r){var e=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,Se.find)(e,function(t){return r.source.indexOf(t)!==-1})===void 0}function bx(r){var e=r.ignoreCase?"i":"";return new RegExp("^(?:"+r.source+")",e)}Je.addStartOfInput=bx;function Qx(r){var e=r.ignoreCase?"iy":"y";return new RegExp(""+r.source,e)}Je.addStickyFlag=Qx;function Eye(r,e,t){var i=[];return(0,Se.has)(r,Je.DEFAULT_MODE)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.DEFAULT_MODE+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Se.has)(r,Je.MODES)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+Je.MODES+`> property in its definition -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Se.has)(r,Je.MODES)&&(0,Se.has)(r,Je.DEFAULT_MODE)&&!(0,Se.has)(r.modes,r.defaultMode)&&i.push({message:"A MultiMode Lexer cannot be initialized with a "+Je.DEFAULT_MODE+": <"+r.defaultMode+`>which does not exist -`,type:ir.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Se.has)(r,Je.MODES)&&(0,Se.forEach)(r.modes,function(n,s){(0,Se.forEach)(n,function(o,a){(0,Se.isUndefined)(o)&&i.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+("<"+s+"> at index: <"+a+`> -`),type:ir.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})})}),i}Je.performRuntimeChecks=Eye;function Iye(r,e,t){var i=[],n=!1,s=(0,Se.compact)((0,Se.flatten)((0,Se.mapValues)(r.modes,function(l){return l}))),o=(0,Se.reject)(s,function(l){return l[Do]===ir.Lexer.NA}),a=oq(t);return e&&(0,Se.forEach)(o,function(l){var c=nq(l,a);if(c!==!1){var u=sq(l,c),g={message:u,type:c.issue,tokenType:l};i.push(g)}else(0,Se.has)(l,"LINE_BREAKS")?l.LINE_BREAKS===!0&&(n=!0):(0,pf.canMatchCharCode)(a,l.PATTERN)&&(n=!0)}),e&&!n&&i.push({message:`Warning: No LINE_BREAKS Found. - This Lexer has been defined to track line and column information, - But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:ir.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),i}Je.performWarningRuntimeChecks=Iye;function yye(r){var e={},t=(0,Se.keys)(r);return(0,Se.forEach)(t,function(i){var n=r[i];if((0,Se.isArray)(n))e[i]=[];else throw Error("non exhaustive match")}),e}Je.cloneEmptyGroups=yye;function vx(r){var e=r.PATTERN;if((0,Se.isRegExp)(e))return!1;if((0,Se.isFunction)(e))return!0;if((0,Se.has)(e,"exec"))return!0;if((0,Se.isString)(e))return!1;throw Error("non exhaustive match")}Je.isCustomPattern=vx;function iq(r){return(0,Se.isString)(r)&&r.length===1?r.charCodeAt(0):!1}Je.isShortPattern=iq;Je.LineTerminatorOptimizedTester={test:function(r){for(var e=r.length,t=this.lastIndex;t Token Type -`)+(" Root cause: "+e.errMsg+`. -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(e.issue===ir.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. -`+(" The problem is in the <"+r.name+`> Token Type -`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}Je.buildLineBreakIssueMessage=sq;function oq(r){var e=(0,Se.map)(r,function(t){return(0,Se.isString)(t)&&t.length>0?t.charCodeAt(0):t});return e}function Bx(r,e,t){r[e]===void 0?r[e]=[t]:r[e].push(t)}Je.minOptimizationVal=256;var Ny=[];function Sx(r){return r255?255+~~(r/255):r}}});var df=y(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.isTokenType=Nt.hasExtendingTokensTypesMapProperty=Nt.hasExtendingTokensTypesProperty=Nt.hasCategoriesProperty=Nt.hasShortKeyProperty=Nt.singleAssignCategoriesToksMap=Nt.assignCategoriesMapProp=Nt.assignCategoriesTokensProp=Nt.assignTokenDefaultProps=Nt.expandCategories=Nt.augmentTokenTypes=Nt.tokenIdxToClass=Nt.tokenShortNameIdx=Nt.tokenStructuredMatcherNoCategories=Nt.tokenStructuredMatcher=void 0;var ei=Gt();function Bye(r,e){var t=r.tokenTypeIdx;return t===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[t]===!0}Nt.tokenStructuredMatcher=Bye;function bye(r,e){return r.tokenTypeIdx===e.tokenTypeIdx}Nt.tokenStructuredMatcherNoCategories=bye;Nt.tokenShortNameIdx=1;Nt.tokenIdxToClass={};function Qye(r){var e=aq(r);Aq(e),cq(e),lq(e),(0,ei.forEach)(e,function(t){t.isParent=t.categoryMatches.length>0})}Nt.augmentTokenTypes=Qye;function aq(r){for(var e=(0,ei.cloneArr)(r),t=r,i=!0;i;){t=(0,ei.compact)((0,ei.flatten)((0,ei.map)(t,function(s){return s.CATEGORIES})));var n=(0,ei.difference)(t,e);e=e.concat(n),(0,ei.isEmpty)(n)?i=!1:t=n}return e}Nt.expandCategories=aq;function Aq(r){(0,ei.forEach)(r,function(e){uq(e)||(Nt.tokenIdxToClass[Nt.tokenShortNameIdx]=e,e.tokenTypeIdx=Nt.tokenShortNameIdx++),xx(e)&&!(0,ei.isArray)(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),xx(e)||(e.CATEGORIES=[]),gq(e)||(e.categoryMatches=[]),fq(e)||(e.categoryMatchesMap={})})}Nt.assignTokenDefaultProps=Aq;function lq(r){(0,ei.forEach)(r,function(e){e.categoryMatches=[],(0,ei.forEach)(e.categoryMatchesMap,function(t,i){e.categoryMatches.push(Nt.tokenIdxToClass[i].tokenTypeIdx)})})}Nt.assignCategoriesTokensProp=lq;function cq(r){(0,ei.forEach)(r,function(e){Px([],e)})}Nt.assignCategoriesMapProp=cq;function Px(r,e){(0,ei.forEach)(r,function(t){e.categoryMatchesMap[t.tokenTypeIdx]=!0}),(0,ei.forEach)(e.CATEGORIES,function(t){var i=r.concat(e);(0,ei.contains)(i,t)||Px(i,t)})}Nt.singleAssignCategoriesToksMap=Px;function uq(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.hasShortKeyProperty=uq;function xx(r){return(0,ei.has)(r,"CATEGORIES")}Nt.hasCategoriesProperty=xx;function gq(r){return(0,ei.has)(r,"categoryMatches")}Nt.hasExtendingTokensTypesProperty=gq;function fq(r){return(0,ei.has)(r,"categoryMatchesMap")}Nt.hasExtendingTokensTypesMapProperty=fq;function Sye(r){return(0,ei.has)(r,"tokenTypeIdx")}Nt.isTokenType=Sye});var Dx=y(Ty=>{"use strict";Object.defineProperty(Ty,"__esModule",{value:!0});Ty.defaultLexerErrorProvider=void 0;Ty.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(r){return"Unable to pop Lexer Mode after encountering Token ->"+r.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(r,e,t,i,n){return"unexpected character: ->"+r.charAt(e)+"<- at offset: "+e+","+(" skipped "+t+" characters.")}}});var Jd=y(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});Rc.Lexer=Rc.LexerDefinitionErrorType=void 0;var Vs=wx(),nr=Gt(),vye=df(),xye=Dx(),Pye=ky(),Dye;(function(r){r[r.MISSING_PATTERN=0]="MISSING_PATTERN",r[r.INVALID_PATTERN=1]="INVALID_PATTERN",r[r.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",r[r.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",r[r.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",r[r.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",r[r.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",r[r.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",r[r.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",r[r.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",r[r.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",r[r.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",r[r.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",r[r.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",r[r.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",r[r.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",r[r.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK"})(Dye=Rc.LexerDefinitionErrorType||(Rc.LexerDefinitionErrorType={}));var Wd={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:xye.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(Wd);var kye=function(){function r(e,t){var i=this;if(t===void 0&&(t=Wd),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof t=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=(0,nr.merge)(Wd,t);var n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var s,o=!0;i.TRACE_INIT("Lexer Config handling",function(){if(i.config.lineTerminatorsPattern===Wd.lineTerminatorsPattern)i.config.lineTerminatorsPattern=Vs.LineTerminatorOptimizedTester;else if(i.config.lineTerminatorCharacters===Wd.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');i.trackStartLines=/full|onlyStart/i.test(i.config.positionTracking),i.trackEndLines=/full/i.test(i.config.positionTracking),(0,nr.isArray)(e)?(s={modes:{}},s.modes[Vs.DEFAULT_MODE]=(0,nr.cloneArr)(e),s[Vs.DEFAULT_MODE]=Vs.DEFAULT_MODE):(o=!1,s=(0,nr.cloneObj)(e))}),i.config.skipValidations===!1&&(i.TRACE_INIT("performRuntimeChecks",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.performRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))}),i.TRACE_INIT("performWarningRuntimeChecks",function(){i.lexerDefinitionWarning=i.lexerDefinitionWarning.concat((0,Vs.performWarningRuntimeChecks)(s,i.trackStartLines,i.config.lineTerminatorCharacters))})),s.modes=s.modes?s.modes:{},(0,nr.forEach)(s.modes,function(u,g){s.modes[g]=(0,nr.reject)(u,function(f){return(0,nr.isUndefined)(f)})});var a=(0,nr.keys)(s.modes);if((0,nr.forEach)(s.modes,function(u,g){i.TRACE_INIT("Mode: <"+g+"> processing",function(){if(i.modes.push(g),i.config.skipValidations===!1&&i.TRACE_INIT("validatePatterns",function(){i.lexerDefinitionErrors=i.lexerDefinitionErrors.concat((0,Vs.validatePatterns)(u,a))}),(0,nr.isEmpty)(i.lexerDefinitionErrors)){(0,vye.augmentTokenTypes)(u);var f;i.TRACE_INIT("analyzeTokenTypes",function(){f=(0,Vs.analyzeTokenTypes)(u,{lineTerminatorCharacters:i.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:i.TRACE_INIT.bind(i)})}),i.patternIdxToConfig[g]=f.patternIdxToConfig,i.charCodeToPatternIdxToConfig[g]=f.charCodeToPatternIdxToConfig,i.emptyGroups=(0,nr.merge)(i.emptyGroups,f.emptyGroups),i.hasCustom=f.hasCustom||i.hasCustom,i.canModeBeOptimized[g]=f.canBeOptimized}})}),i.defaultMode=s.defaultMode,!(0,nr.isEmpty)(i.lexerDefinitionErrors)&&!i.config.deferDefinitionErrorsHandling){var l=(0,nr.map)(i.lexerDefinitionErrors,function(u){return u.message}),c=l.join(`----------------------- -`);throw new Error(`Errors detected in definition of Lexer: -`+c)}(0,nr.forEach)(i.lexerDefinitionWarning,function(u){(0,nr.PRINT_WARNING)(u.message)}),i.TRACE_INIT("Choosing sub-methods implementations",function(){if(Vs.SUPPORT_STICKY?(i.chopInput=nr.IDENTITY,i.match=i.matchWithTest):(i.updateLastIndex=nr.NOOP,i.match=i.matchWithExec),o&&(i.handleModes=nr.NOOP),i.trackStartLines===!1&&(i.computeNewColumn=nr.IDENTITY),i.trackEndLines===!1&&(i.updateTokenEndLineColumnLocation=nr.NOOP),/full/i.test(i.config.positionTracking))i.createTokenInstance=i.createFullToken;else if(/onlyStart/i.test(i.config.positionTracking))i.createTokenInstance=i.createStartOnlyToken;else if(/onlyOffset/i.test(i.config.positionTracking))i.createTokenInstance=i.createOffsetOnlyToken;else throw Error('Invalid config option: "'+i.config.positionTracking+'"');i.hasCustom?(i.addToken=i.addTokenUsingPush,i.handlePayload=i.handlePayloadWithCustom):(i.addToken=i.addTokenUsingMemberAccess,i.handlePayload=i.handlePayloadNoCustom)}),i.TRACE_INIT("Failed Optimization Warnings",function(){var u=(0,nr.reduce)(i.canModeBeOptimized,function(g,f,h){return f===!1&&g.push(h),g},[]);if(t.ensureOptimizations&&!(0,nr.isEmpty)(u))throw Error("Lexer Modes: < "+u.join(", ")+` > cannot be optimized. - Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),i.TRACE_INIT("clearRegExpParserCache",function(){(0,Pye.clearRegExpParserCache)()}),i.TRACE_INIT("toFastProperties",function(){(0,nr.toFastProperties)(i)})})}return r.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!(0,nr.isEmpty)(this.lexerDefinitionErrors)){var i=(0,nr.map)(this.lexerDefinitionErrors,function(o){return o.message}),n=i.join(`----------------------- -`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+n)}var s=this.tokenizeInternal(e,t);return s},r.prototype.tokenizeInternal=function(e,t){var i=this,n,s,o,a,l,c,u,g,f,h,p,C,w,B,v,D,T=e,H=T.length,j=0,$=0,V=this.hasCustom?0:Math.floor(e.length/10),W=new Array(V),Z=[],A=this.trackStartLines?1:void 0,ae=this.trackStartLines?1:void 0,ge=(0,Vs.cloneEmptyGroups)(this.emptyGroups),_=this.trackStartLines,L=this.config.lineTerminatorsPattern,N=0,ue=[],we=[],Te=[],Pe=[];Object.freeze(Pe);var Le=void 0;function se(){return ue}function Ae(dr){var Bi=(0,Vs.charCodeToOptimizedIndex)(dr),_n=we[Bi];return _n===void 0?Pe:_n}var be=function(dr){if(Te.length===1&&dr.tokenType.PUSH_MODE===void 0){var Bi=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(dr);Z.push({offset:dr.startOffset,line:dr.startLine!==void 0?dr.startLine:void 0,column:dr.startColumn!==void 0?dr.startColumn:void 0,length:dr.image.length,message:Bi})}else{Te.pop();var _n=(0,nr.last)(Te);ue=i.patternIdxToConfig[_n],we=i.charCodeToPatternIdxToConfig[_n],N=ue.length;var pa=i.canModeBeOptimized[_n]&&i.config.safeMode===!1;we&&pa?Le=Ae:Le=se}};function fe(dr){Te.push(dr),we=this.charCodeToPatternIdxToConfig[dr],ue=this.patternIdxToConfig[dr],N=ue.length,N=ue.length;var Bi=this.canModeBeOptimized[dr]&&this.config.safeMode===!1;we&&Bi?Le=Ae:Le=se}fe.call(this,t);for(var le;jc.length){c=a,u=g,le=tt;break}}}break}}if(c!==null){if(f=c.length,h=le.group,h!==void 0&&(p=le.tokenTypeIdx,C=this.createTokenInstance(c,j,p,le.tokenType,A,ae,f),this.handlePayload(C,u),h===!1?$=this.addToken(W,$,C):ge[h].push(C)),e=this.chopInput(e,f),j=j+f,ae=this.computeNewColumn(ae,f),_===!0&&le.canLineTerminator===!0){var It=0,Ur=void 0,oi=void 0;L.lastIndex=0;do Ur=L.test(c),Ur===!0&&(oi=L.lastIndex-1,It++);while(Ur===!0);It!==0&&(A=A+It,ae=f-oi,this.updateTokenEndLineColumnLocation(C,h,oi,It,A,ae,f))}this.handleModes(le,be,fe,C)}else{for(var pi=j,pr=A,di=ae,ai=!1;!ai&&j <"+e+">");var n=(0,nr.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",r.NA=/NOT_APPLICABLE/,r}();Rc.Lexer=kye});var HA=y(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.tokenMatcher=Si.createTokenInstance=Si.EOF=Si.createToken=Si.hasTokenLabel=Si.tokenName=Si.tokenLabel=void 0;var Xs=Gt(),Rye=Jd(),kx=df();function Fye(r){return wq(r)?r.LABEL:r.name}Si.tokenLabel=Fye;function Nye(r){return r.name}Si.tokenName=Nye;function wq(r){return(0,Xs.isString)(r.LABEL)&&r.LABEL!==""}Si.hasTokenLabel=wq;var Tye="parent",hq="categories",pq="label",dq="group",Cq="push_mode",mq="pop_mode",Eq="longer_alt",Iq="line_breaks",yq="start_chars_hint";function Bq(r){return Lye(r)}Si.createToken=Bq;function Lye(r){var e=r.pattern,t={};if(t.name=r.name,(0,Xs.isUndefined)(e)||(t.PATTERN=e),(0,Xs.has)(r,Tye))throw`The parent property is no longer supported. -See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Xs.has)(r,hq)&&(t.CATEGORIES=r[hq]),(0,kx.augmentTokenTypes)([t]),(0,Xs.has)(r,pq)&&(t.LABEL=r[pq]),(0,Xs.has)(r,dq)&&(t.GROUP=r[dq]),(0,Xs.has)(r,mq)&&(t.POP_MODE=r[mq]),(0,Xs.has)(r,Cq)&&(t.PUSH_MODE=r[Cq]),(0,Xs.has)(r,Eq)&&(t.LONGER_ALT=r[Eq]),(0,Xs.has)(r,Iq)&&(t.LINE_BREAKS=r[Iq]),(0,Xs.has)(r,yq)&&(t.START_CHARS_HINT=r[yq]),t}Si.EOF=Bq({name:"EOF",pattern:Rye.Lexer.NA});(0,kx.augmentTokenTypes)([Si.EOF]);function Oye(r,e,t,i,n,s,o,a){return{image:e,startOffset:t,endOffset:i,startLine:n,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:r.tokenTypeIdx,tokenType:r}}Si.createTokenInstance=Oye;function Mye(r,e){return(0,kx.tokenStructuredMatcher)(r,e)}Si.tokenMatcher=Mye});var Cn=y(Wt=>{"use strict";var ka=Wt&&Wt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Wt,"__esModule",{value:!0});Wt.serializeProduction=Wt.serializeGrammar=Wt.Terminal=Wt.Alternation=Wt.RepetitionWithSeparator=Wt.Repetition=Wt.RepetitionMandatoryWithSeparator=Wt.RepetitionMandatory=Wt.Option=Wt.Alternative=Wt.Rule=Wt.NonTerminal=Wt.AbstractProduction=void 0;var lr=Gt(),Uye=HA(),ko=function(){function r(e){this._definition=e}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this),(0,lr.forEach)(this.definition,function(t){t.accept(e)})},r}();Wt.AbstractProduction=ko;var bq=function(r){ka(e,r);function e(t){var i=r.call(this,[])||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(t){},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this)},e}(ko);Wt.NonTerminal=bq;var Qq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.orgText="",(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Rule=Qq;var Sq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.ignoreAmbiguities=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Alternative=Sq;var vq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Option=vq;var xq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatory=xq;var Pq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionMandatoryWithSeparator=Pq;var Dq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.Repetition=Dq;var kq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return e}(ko);Wt.RepetitionWithSeparator=kq;var Rq=function(r){ka(e,r);function e(t){var i=r.call(this,t.definition)||this;return i.idx=1,i.ignoreAmbiguities=!1,i.hasPredicates=!1,(0,lr.assign)(i,(0,lr.pick)(t,function(n){return n!==void 0})),i}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e}(ko);Wt.Alternation=Rq;var Ly=function(){function r(e){this.idx=1,(0,lr.assign)(this,(0,lr.pick)(e,function(t){return t!==void 0}))}return r.prototype.accept=function(e){e.visit(this)},r}();Wt.Terminal=Ly;function Kye(r){return(0,lr.map)(r,zd)}Wt.serializeGrammar=Kye;function zd(r){function e(s){return(0,lr.map)(s,zd)}if(r instanceof bq){var t={type:"NonTerminal",name:r.nonTerminalName,idx:r.idx};return(0,lr.isString)(r.label)&&(t.label=r.label),t}else{if(r instanceof Sq)return{type:"Alternative",definition:e(r.definition)};if(r instanceof vq)return{type:"Option",idx:r.idx,definition:e(r.definition)};if(r instanceof xq)return{type:"RepetitionMandatory",idx:r.idx,definition:e(r.definition)};if(r instanceof Pq)return{type:"RepetitionMandatoryWithSeparator",idx:r.idx,separator:zd(new Ly({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof kq)return{type:"RepetitionWithSeparator",idx:r.idx,separator:zd(new Ly({terminalType:r.separator})),definition:e(r.definition)};if(r instanceof Dq)return{type:"Repetition",idx:r.idx,definition:e(r.definition)};if(r instanceof Rq)return{type:"Alternation",idx:r.idx,definition:e(r.definition)};if(r instanceof Ly){var i={type:"Terminal",name:r.terminalType.name,label:(0,Uye.tokenLabel)(r.terminalType),idx:r.idx};(0,lr.isString)(r.label)&&(i.terminalLabel=r.label);var n=r.terminalType.PATTERN;return r.terminalType.PATTERN&&(i.pattern=(0,lr.isRegExp)(n)?n.source:n),i}else{if(r instanceof Qq)return{type:"Rule",name:r.name,orgText:r.orgText,definition:e(r.definition)};throw Error("non exhaustive match")}}}Wt.serializeProduction=zd});var My=y(Oy=>{"use strict";Object.defineProperty(Oy,"__esModule",{value:!0});Oy.RestWalker=void 0;var Rx=Gt(),mn=Cn(),Hye=function(){function r(){}return r.prototype.walk=function(e,t){var i=this;t===void 0&&(t=[]),(0,Rx.forEach)(e.definition,function(n,s){var o=(0,Rx.drop)(e.definition,s+1);if(n instanceof mn.NonTerminal)i.walkProdRef(n,o,t);else if(n instanceof mn.Terminal)i.walkTerminal(n,o,t);else if(n instanceof mn.Alternative)i.walkFlat(n,o,t);else if(n instanceof mn.Option)i.walkOption(n,o,t);else if(n instanceof mn.RepetitionMandatory)i.walkAtLeastOne(n,o,t);else if(n instanceof mn.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(n,o,t);else if(n instanceof mn.RepetitionWithSeparator)i.walkManySep(n,o,t);else if(n instanceof mn.Repetition)i.walkMany(n,o,t);else if(n instanceof mn.Alternation)i.walkOr(n,o,t);else throw Error("non exhaustive match")})},r.prototype.walkTerminal=function(e,t,i){},r.prototype.walkProdRef=function(e,t,i){},r.prototype.walkFlat=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkOption=function(e,t,i){var n=t.concat(i);this.walk(e,n)},r.prototype.walkAtLeastOne=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkAtLeastOneSep=function(e,t,i){var n=Fq(e,t,i);this.walk(e,n)},r.prototype.walkMany=function(e,t,i){var n=[new mn.Option({definition:e.definition})].concat(t,i);this.walk(e,n)},r.prototype.walkManySep=function(e,t,i){var n=Fq(e,t,i);this.walk(e,n)},r.prototype.walkOr=function(e,t,i){var n=this,s=t.concat(i);(0,Rx.forEach)(e.definition,function(o){var a=new mn.Alternative({definition:[o]});n.walk(a,s)})},r}();Oy.RestWalker=Hye;function Fq(r,e,t){var i=[new mn.Option({definition:[new mn.Terminal({terminalType:r.separator})].concat(r.definition)})],n=i.concat(e,t);return n}});var Cf=y(Uy=>{"use strict";Object.defineProperty(Uy,"__esModule",{value:!0});Uy.GAstVisitor=void 0;var Ro=Cn(),Gye=function(){function r(){}return r.prototype.visit=function(e){var t=e;switch(t.constructor){case Ro.NonTerminal:return this.visitNonTerminal(t);case Ro.Alternative:return this.visitAlternative(t);case Ro.Option:return this.visitOption(t);case Ro.RepetitionMandatory:return this.visitRepetitionMandatory(t);case Ro.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(t);case Ro.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(t);case Ro.Repetition:return this.visitRepetition(t);case Ro.Alternation:return this.visitAlternation(t);case Ro.Terminal:return this.visitTerminal(t);case Ro.Rule:return this.visitRule(t);default:throw Error("non exhaustive match")}},r.prototype.visitNonTerminal=function(e){},r.prototype.visitAlternative=function(e){},r.prototype.visitOption=function(e){},r.prototype.visitRepetition=function(e){},r.prototype.visitRepetitionMandatory=function(e){},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){},r.prototype.visitRepetitionWithSeparator=function(e){},r.prototype.visitAlternation=function(e){},r.prototype.visitTerminal=function(e){},r.prototype.visitRule=function(e){},r}();Uy.GAstVisitor=Gye});var Xd=y(Ui=>{"use strict";var Yye=Ui&&Ui.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Ui,"__esModule",{value:!0});Ui.collectMethods=Ui.DslMethodsCollectorVisitor=Ui.getProductionDslName=Ui.isBranchingProd=Ui.isOptionalProd=Ui.isSequenceProd=void 0;var Vd=Gt(),Qr=Cn(),jye=Cf();function qye(r){return r instanceof Qr.Alternative||r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionMandatory||r instanceof Qr.RepetitionMandatoryWithSeparator||r instanceof Qr.RepetitionWithSeparator||r instanceof Qr.Terminal||r instanceof Qr.Rule}Ui.isSequenceProd=qye;function Fx(r,e){e===void 0&&(e=[]);var t=r instanceof Qr.Option||r instanceof Qr.Repetition||r instanceof Qr.RepetitionWithSeparator;return t?!0:r instanceof Qr.Alternation?(0,Vd.some)(r.definition,function(i){return Fx(i,e)}):r instanceof Qr.NonTerminal&&(0,Vd.contains)(e,r)?!1:r instanceof Qr.AbstractProduction?(r instanceof Qr.NonTerminal&&e.push(r),(0,Vd.every)(r.definition,function(i){return Fx(i,e)})):!1}Ui.isOptionalProd=Fx;function Jye(r){return r instanceof Qr.Alternation}Ui.isBranchingProd=Jye;function Wye(r){if(r instanceof Qr.NonTerminal)return"SUBRULE";if(r instanceof Qr.Option)return"OPTION";if(r instanceof Qr.Alternation)return"OR";if(r instanceof Qr.RepetitionMandatory)return"AT_LEAST_ONE";if(r instanceof Qr.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(r instanceof Qr.RepetitionWithSeparator)return"MANY_SEP";if(r instanceof Qr.Repetition)return"MANY";if(r instanceof Qr.Terminal)return"CONSUME";throw Error("non exhaustive match")}Ui.getProductionDslName=Wye;var Nq=function(r){Yye(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return e.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},e.prototype.visitTerminal=function(t){var i=t.terminalType.name+this.separator+"Terminal";(0,Vd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitNonTerminal=function(t){var i=t.nonTerminalName+this.separator+"Terminal";(0,Vd.has)(this.dslMethods,i)||(this.dslMethods[i]=[]),this.dslMethods[i].push(t)},e.prototype.visitOption=function(t){this.dslMethods.option.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.dslMethods.repetitionWithSeparator.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.dslMethods.repetitionMandatory.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)},e.prototype.visitRepetition=function(t){this.dslMethods.repetition.push(t)},e.prototype.visitAlternation=function(t){this.dslMethods.alternation.push(t)},e}(jye.GAstVisitor);Ui.DslMethodsCollectorVisitor=Nq;var Ky=new Nq;function zye(r){Ky.reset(),r.accept(Ky);var e=Ky.dslMethods;return Ky.reset(),e}Ui.collectMethods=zye});var Tx=y(Fo=>{"use strict";Object.defineProperty(Fo,"__esModule",{value:!0});Fo.firstForTerminal=Fo.firstForBranching=Fo.firstForSequence=Fo.first=void 0;var Hy=Gt(),Tq=Cn(),Nx=Xd();function Gy(r){if(r instanceof Tq.NonTerminal)return Gy(r.referencedRule);if(r instanceof Tq.Terminal)return Mq(r);if((0,Nx.isSequenceProd)(r))return Lq(r);if((0,Nx.isBranchingProd)(r))return Oq(r);throw Error("non exhaustive match")}Fo.first=Gy;function Lq(r){for(var e=[],t=r.definition,i=0,n=t.length>i,s,o=!0;n&&o;)s=t[i],o=(0,Nx.isOptionalProd)(s),e=e.concat(Gy(s)),i=i+1,n=t.length>i;return(0,Hy.uniq)(e)}Fo.firstForSequence=Lq;function Oq(r){var e=(0,Hy.map)(r.definition,function(t){return Gy(t)});return(0,Hy.uniq)((0,Hy.flatten)(e))}Fo.firstForBranching=Oq;function Mq(r){return[r.terminalType]}Fo.firstForTerminal=Mq});var Lx=y(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});Yy.IN=void 0;Yy.IN="_~IN~_"});var Yq=y(ls=>{"use strict";var Vye=ls&&ls.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(ls,"__esModule",{value:!0});ls.buildInProdFollowPrefix=ls.buildBetweenProdsFollowPrefix=ls.computeAllProdsFollows=ls.ResyncFollowsWalker=void 0;var Xye=My(),_ye=Tx(),Uq=Gt(),Kq=Lx(),Zye=Cn(),Hq=function(r){Vye(e,r);function e(t){var i=r.call(this)||this;return i.topProd=t,i.follows={},i}return e.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},e.prototype.walkTerminal=function(t,i,n){},e.prototype.walkProdRef=function(t,i,n){var s=Gq(t.referencedRule,t.idx)+this.topProd.name,o=i.concat(n),a=new Zye.Alternative({definition:o}),l=(0,_ye.first)(a);this.follows[s]=l},e}(Xye.RestWalker);ls.ResyncFollowsWalker=Hq;function $ye(r){var e={};return(0,Uq.forEach)(r,function(t){var i=new Hq(t).startWalking();(0,Uq.assign)(e,i)}),e}ls.computeAllProdsFollows=$ye;function Gq(r,e){return r.name+e+Kq.IN}ls.buildBetweenProdsFollowPrefix=Gq;function ewe(r){var e=r.terminalType.name;return e+r.idx+Kq.IN}ls.buildInProdFollowPrefix=ewe});var _d=y(Ra=>{"use strict";Object.defineProperty(Ra,"__esModule",{value:!0});Ra.defaultGrammarValidatorErrorProvider=Ra.defaultGrammarResolverErrorProvider=Ra.defaultParserErrorProvider=void 0;var mf=HA(),twe=Gt(),_s=Gt(),Ox=Cn(),jq=Xd();Ra.defaultParserErrorProvider={buildMismatchTokenMessage:function(r){var e=r.expected,t=r.actual,i=r.previous,n=r.ruleName,s=(0,mf.hasTokenLabel)(e),o=s?"--> "+(0,mf.tokenLabel)(e)+" <--":"token of type --> "+e.name+" <--",a="Expecting "+o+" but found --> '"+t.image+"' <--";return a},buildNotAllInputParsedMessage:function(r){var e=r.firstRedundant,t=r.ruleName;return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage:function(r){var e=r.expectedPathsPerAlt,t=r.actual,i=r.previous,n=r.customUserDescription,s=r.ruleName,o="Expecting: ",a=(0,_s.first)(t).image,l=` -but found: '`+a+"'";if(n)return o+n+l;var c=(0,_s.reduce)(e,function(h,p){return h.concat(p)},[]),u=(0,_s.map)(c,function(h){return"["+(0,_s.map)(h,function(p){return(0,mf.tokenLabel)(p)}).join(", ")+"]"}),g=(0,_s.map)(u,function(h,p){return" "+(p+1)+". "+h}),f=`one of these possible Token sequences: -`+g.join(` -`);return o+f+l},buildEarlyExitMessage:function(r){var e=r.expectedIterationPaths,t=r.actual,i=r.customUserDescription,n=r.ruleName,s="Expecting: ",o=(0,_s.first)(t).image,a=` -but found: '`+o+"'";if(i)return s+i+a;var l=(0,_s.map)(e,function(u){return"["+(0,_s.map)(u,function(g){return(0,mf.tokenLabel)(g)}).join(",")+"]"}),c=`expecting at least one iteration which starts with one of these possible Token sequences:: - `+("<"+l.join(" ,")+">");return s+c+a}};Object.freeze(Ra.defaultParserErrorProvider);Ra.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(r,e){var t="Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+r.name+"<-";return t}};Ra.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(r,e){function t(u){return u instanceof Ox.Terminal?u.terminalType.name:u instanceof Ox.NonTerminal?u.nonTerminalName:""}var i=r.name,n=(0,_s.first)(e),s=n.idx,o=(0,jq.getProductionDslName)(n),a=t(n),l=s>0,c="->"+o+(l?s:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+` - appears more than once (`+e.length+" times) in the top level rule: ->"+i+`<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES - `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,` -`),c},buildNamespaceConflictError:function(r){var e=`Namespace conflict found in grammar. -`+("The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+r.name+`>. -`)+`To resolve this make sure each Terminal and Non-Terminal names are unique -This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`;return e},buildAlternationPrefixAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,mf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous alternatives: <"+r.ambiguityIndices.join(" ,")+`> due to common lookahead prefix -`+("in inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`;return i},buildAlternationAmbiguityError:function(r){var e=(0,_s.map)(r.prefixPath,function(n){return(0,mf.tokenLabel)(n)}).join(", "),t=r.alternation.idx===0?"":r.alternation.idx,i="Ambiguous Alternatives Detected: <"+r.ambiguityIndices.join(" ,")+"> in "+(" inside <"+r.topLevelRule.name+`> Rule, -`)+("<"+e+`> may appears as a prefix path in all these alternatives. -`);return i=i+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,i},buildEmptyRepetitionError:function(r){var e=(0,jq.getProductionDslName)(r.repetition);r.repetition.idx!==0&&(e+=r.repetition.idx);var t="The repetition <"+e+"> within Rule <"+r.topLevelRule.name+`> can never consume any tokens. -This could lead to an infinite loop.`;return t},buildTokenNameError:function(r){return"deprecated"},buildEmptyAlternationError:function(r){var e="Ambiguous empty alternative: <"+(r.emptyChoiceIdx+1)+">"+(" in inside <"+r.topLevelRule.name+`> Rule. -`)+"Only the last alternative may be an empty alternative.";return e},buildTooManyAlternativesError:function(r){var e=`An Alternation cannot have more than 256 alternatives: -`+(" inside <"+r.topLevelRule.name+`> Rule. - has `+(r.alternation.definition.length+1)+" alternatives.");return e},buildLeftRecursionError:function(r){var e=r.topLevelRule.name,t=twe.map(r.leftRecursionPath,function(s){return s.name}),i=e+" --> "+t.concat([e]).join(" --> "),n=`Left Recursion found in grammar. -`+("rule: <"+e+`> can be invoked from itself (directly or indirectly) -`)+(`without consuming any Tokens. The grammar path that causes this is: - `+i+` -`)+` To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`;return n},buildInvalidRuleNameError:function(r){return"deprecated"},buildDuplicateRuleNameError:function(r){var e;r.topLevelRule instanceof Ox.Rule?e=r.topLevelRule.name:e=r.topLevelRule;var t="Duplicate definition, rule: ->"+e+"<- is already defined in the grammar: ->"+r.grammarName+"<-";return t}}});var Wq=y(GA=>{"use strict";var rwe=GA&&GA.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(GA,"__esModule",{value:!0});GA.GastRefResolverVisitor=GA.resolveGrammar=void 0;var iwe=Hn(),qq=Gt(),nwe=Cf();function swe(r,e){var t=new Jq(r,e);return t.resolveRefs(),t.errors}GA.resolveGrammar=swe;var Jq=function(r){rwe(e,r);function e(t,i){var n=r.call(this)||this;return n.nameToTopRule=t,n.errMsgProvider=i,n.errors=[],n}return e.prototype.resolveRefs=function(){var t=this;(0,qq.forEach)((0,qq.values)(this.nameToTopRule),function(i){t.currTopLevel=i,i.accept(t)})},e.prototype.visitNonTerminal=function(t){var i=this.nameToTopRule[t.nonTerminalName];if(i)t.referencedRule=i;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:iwe.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}},e}(nwe.GAstVisitor);GA.GastRefResolverVisitor=Jq});var $d=y(Lr=>{"use strict";var Fc=Lr&&Lr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Lr,"__esModule",{value:!0});Lr.nextPossibleTokensAfter=Lr.possiblePathsFrom=Lr.NextTerminalAfterAtLeastOneSepWalker=Lr.NextTerminalAfterAtLeastOneWalker=Lr.NextTerminalAfterManySepWalker=Lr.NextTerminalAfterManyWalker=Lr.AbstractNextTerminalAfterProductionWalker=Lr.NextAfterTokenWalker=Lr.AbstractNextPossibleTokensWalker=void 0;var zq=My(),Ut=Gt(),owe=Tx(),Dt=Cn(),Vq=function(r){Fc(e,r);function e(t,i){var n=r.call(this)||this;return n.topProd=t,n.path=i,n.possibleTokTypes=[],n.nextProductionName="",n.nextProductionOccurrence=0,n.found=!1,n.isAtEndOfPath=!1,n}return e.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Ut.cloneArr)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Ut.cloneArr)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},e.prototype.walk=function(t,i){i===void 0&&(i=[]),this.found||r.prototype.walk.call(this,t,i)},e.prototype.walkProdRef=function(t,i,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){var s=i.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,s)}},e.prototype.updateExpectedNext=function(){(0,Ut.isEmpty)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},e}(zq.RestWalker);Lr.AbstractNextPossibleTokensWalker=Vq;var awe=function(r){Fc(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.path=i,n.nextTerminalName="",n.nextTerminalOccurrence=0,n.nextTerminalName=n.path.lastTok.name,n.nextTerminalOccurrence=n.path.lastTokOccurrence,n}return e.prototype.walkTerminal=function(t,i,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){var s=i.concat(n),o=new Dt.Alternative({definition:s});this.possibleTokTypes=(0,owe.first)(o),this.found=!0}},e}(Vq);Lr.NextAfterTokenWalker=awe;var Zd=function(r){Fc(e,r);function e(t,i){var n=r.call(this)||this;return n.topRule=t,n.occurrence=i,n.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},n}return e.prototype.startWalking=function(){return this.walk(this.topRule),this.result},e}(zq.RestWalker);Lr.AbstractNextTerminalAfterProductionWalker=Zd;var Awe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkMany=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkMany.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterManyWalker=Awe;var lwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkManySep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkManySep.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterManySepWalker=lwe;var cwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOne=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOne.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterAtLeastOneWalker=cwe;var uwe=function(r){Fc(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.walkAtLeastOneSep=function(t,i,n){if(t.idx===this.occurrence){var s=(0,Ut.first)(i.concat(n));this.result.isEndOfRule=s===void 0,s instanceof Dt.Terminal&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else r.prototype.walkAtLeastOneSep.call(this,t,i,n)},e}(Zd);Lr.NextTerminalAfterAtLeastOneSepWalker=uwe;function Xq(r,e,t){t===void 0&&(t=[]),t=(0,Ut.cloneArr)(t);var i=[],n=0;function s(c){return c.concat((0,Ut.drop)(r,n+1))}function o(c){var u=Xq(s(c),e,t);return i.concat(u)}for(;t.length=0;ge--){var _=B.definition[ge],L={idx:p,def:_.definition.concat((0,Ut.drop)(h)),ruleStack:C,occurrenceStack:w};g.push(L),g.push(o)}else if(B instanceof Dt.Alternative)g.push({idx:p,def:B.definition.concat((0,Ut.drop)(h)),ruleStack:C,occurrenceStack:w});else if(B instanceof Dt.Rule)g.push(fwe(B,p,C,w));else throw Error("non exhaustive match")}}return u}Lr.nextPossibleTokensAfter=gwe;function fwe(r,e,t,i){var n=(0,Ut.cloneArr)(t);n.push(r.name);var s=(0,Ut.cloneArr)(i);return s.push(1),{idx:e,def:r.definition,ruleStack:n,occurrenceStack:s}}});var eC=y(_t=>{"use strict";var $q=_t&&_t.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(_t,"__esModule",{value:!0});_t.areTokenCategoriesNotUsed=_t.isStrictPrefixOfPath=_t.containsPath=_t.getLookaheadPathsForOptionalProd=_t.getLookaheadPathsForOr=_t.lookAheadSequenceFromAlternatives=_t.buildSingleAlternativeLookaheadFunction=_t.buildAlternativesLookAheadFunc=_t.buildLookaheadFuncForOptionalProd=_t.buildLookaheadFuncForOr=_t.getProdType=_t.PROD_TYPE=void 0;var sr=Gt(),_q=$d(),hwe=My(),jy=df(),YA=Cn(),pwe=Cf(),li;(function(r){r[r.OPTION=0]="OPTION",r[r.REPETITION=1]="REPETITION",r[r.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",r[r.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",r[r.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",r[r.ALTERNATION=5]="ALTERNATION"})(li=_t.PROD_TYPE||(_t.PROD_TYPE={}));function dwe(r){if(r instanceof YA.Option)return li.OPTION;if(r instanceof YA.Repetition)return li.REPETITION;if(r instanceof YA.RepetitionMandatory)return li.REPETITION_MANDATORY;if(r instanceof YA.RepetitionMandatoryWithSeparator)return li.REPETITION_MANDATORY_WITH_SEPARATOR;if(r instanceof YA.RepetitionWithSeparator)return li.REPETITION_WITH_SEPARATOR;if(r instanceof YA.Alternation)return li.ALTERNATION;throw Error("non exhaustive match")}_t.getProdType=dwe;function Cwe(r,e,t,i,n,s){var o=tJ(r,e,t),a=Kx(o)?jy.tokenStructuredMatcherNoCategories:jy.tokenStructuredMatcher;return s(o,i,a,n)}_t.buildLookaheadFuncForOr=Cwe;function mwe(r,e,t,i,n,s){var o=rJ(r,e,n,t),a=Kx(o)?jy.tokenStructuredMatcherNoCategories:jy.tokenStructuredMatcher;return s(o[0],a,i)}_t.buildLookaheadFuncForOptionalProd=mwe;function Ewe(r,e,t,i){var n=r.length,s=(0,sr.every)(r,function(l){return(0,sr.every)(l,function(c){return c.length===1})});if(e)return function(l){for(var c=(0,sr.map)(l,function(D){return D.GATE}),u=0;u{"use strict";var Hx=zt&&zt.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(zt,"__esModule",{value:!0});zt.checkPrefixAlternativesAmbiguities=zt.validateSomeNonEmptyLookaheadPath=zt.validateTooManyAlts=zt.RepetionCollector=zt.validateAmbiguousAlternationAlternatives=zt.validateEmptyOrAlternative=zt.getFirstNoneTerminal=zt.validateNoLeftRecursion=zt.validateRuleIsOverridden=zt.validateRuleDoesNotAlreadyExist=zt.OccurrenceValidationCollector=zt.identifyProductionForDuplicates=zt.validateGrammar=void 0;var er=Gt(),Sr=Gt(),No=Hn(),Gx=Xd(),Ef=eC(),bwe=$d(),Zs=Cn(),Yx=Cf();function Qwe(r,e,t,i,n){var s=er.map(r,function(h){return Swe(h,i)}),o=er.map(r,function(h){return jx(h,h,i)}),a=[],l=[],c=[];(0,Sr.every)(o,Sr.isEmpty)&&(a=(0,Sr.map)(r,function(h){return AJ(h,i)}),l=(0,Sr.map)(r,function(h){return lJ(h,e,i)}),c=gJ(r,e,i));var u=Pwe(r,t,i),g=(0,Sr.map)(r,function(h){return uJ(h,i)}),f=(0,Sr.map)(r,function(h){return aJ(h,r,n,i)});return er.flatten(s.concat(c,o,a,l,u,g,f))}zt.validateGrammar=Qwe;function Swe(r,e){var t=new oJ;r.accept(t);var i=t.allProductions,n=er.groupBy(i,nJ),s=er.pick(n,function(a){return a.length>1}),o=er.map(er.values(s),function(a){var l=er.first(a),c=e.buildDuplicateFoundError(r,a),u=(0,Gx.getProductionDslName)(l),g={message:c,type:No.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:r.name,dslName:u,occurrence:l.idx},f=sJ(l);return f&&(g.parameter=f),g});return o}function nJ(r){return(0,Gx.getProductionDslName)(r)+"_#_"+r.idx+"_#_"+sJ(r)}zt.identifyProductionForDuplicates=nJ;function sJ(r){return r instanceof Zs.Terminal?r.terminalType.name:r instanceof Zs.NonTerminal?r.nonTerminalName:""}var oJ=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitNonTerminal=function(t){this.allProductions.push(t)},e.prototype.visitOption=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e.prototype.visitAlternation=function(t){this.allProductions.push(t)},e.prototype.visitTerminal=function(t){this.allProductions.push(t)},e}(Yx.GAstVisitor);zt.OccurrenceValidationCollector=oJ;function aJ(r,e,t,i){var n=[],s=(0,Sr.reduce)(e,function(a,l){return l.name===r.name?a+1:a},0);if(s>1){var o=i.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t});n.push({message:o,type:No.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:r.name})}return n}zt.validateRuleDoesNotAlreadyExist=aJ;function vwe(r,e,t){var i=[],n;return er.contains(e,r)||(n="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+t+"<-as it is not defined in any of the super grammars ",i.push({message:n,type:No.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:r})),i}zt.validateRuleIsOverridden=vwe;function jx(r,e,t,i){i===void 0&&(i=[]);var n=[],s=tC(e.definition);if(er.isEmpty(s))return[];var o=r.name,a=er.contains(s,r);a&&n.push({message:t.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:No.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var l=er.difference(s,i.concat([r])),c=er.map(l,function(u){var g=er.cloneArr(i);return g.push(u),jx(r,u,t,g)});return n.concat(er.flatten(c))}zt.validateNoLeftRecursion=jx;function tC(r){var e=[];if(er.isEmpty(r))return e;var t=er.first(r);if(t instanceof Zs.NonTerminal)e.push(t.referencedRule);else if(t instanceof Zs.Alternative||t instanceof Zs.Option||t instanceof Zs.RepetitionMandatory||t instanceof Zs.RepetitionMandatoryWithSeparator||t instanceof Zs.RepetitionWithSeparator||t instanceof Zs.Repetition)e=e.concat(tC(t.definition));else if(t instanceof Zs.Alternation)e=er.flatten(er.map(t.definition,function(o){return tC(o.definition)}));else if(!(t instanceof Zs.Terminal))throw Error("non exhaustive match");var i=(0,Gx.isOptionalProd)(t),n=r.length>1;if(i&&n){var s=er.drop(r);return e.concat(tC(s))}else return e}zt.getFirstNoneTerminal=tC;var qx=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.alternations=[],t}return e.prototype.visitAlternation=function(t){this.alternations.push(t)},e}(Yx.GAstVisitor);function AJ(r,e){var t=new qx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){var a=er.dropRight(o.definition),l=er.map(a,function(c,u){var g=(0,bwe.nextPossibleTokensAfter)([c],[],null,1);return er.isEmpty(g)?{message:e.buildEmptyAlternationError({topLevelRule:r,alternation:o,emptyChoiceIdx:u}),type:No.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:r.name,occurrence:o.idx,alternative:u+1}:null});return s.concat(er.compact(l))},[]);return n}zt.validateEmptyOrAlternative=AJ;function lJ(r,e,t){var i=new qx;r.accept(i);var n=i.alternations;n=(0,Sr.reject)(n,function(o){return o.ignoreAmbiguities===!0});var s=er.reduce(n,function(o,a){var l=a.idx,c=a.maxLookahead||e,u=(0,Ef.getLookaheadPathsForOr)(l,r,c,a),g=xwe(u,a,r,t),f=fJ(u,a,r,t);return o.concat(g,f)},[]);return s}zt.validateAmbiguousAlternationAlternatives=lJ;var cJ=function(r){Hx(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.allProductions=[],t}return e.prototype.visitRepetitionWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatory=function(t){this.allProductions.push(t)},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){this.allProductions.push(t)},e.prototype.visitRepetition=function(t){this.allProductions.push(t)},e}(Yx.GAstVisitor);zt.RepetionCollector=cJ;function uJ(r,e){var t=new qx;r.accept(t);var i=t.alternations,n=er.reduce(i,function(s,o){return o.definition.length>255&&s.push({message:e.buildTooManyAlternativesError({topLevelRule:r,alternation:o}),type:No.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:r.name,occurrence:o.idx}),s},[]);return n}zt.validateTooManyAlts=uJ;function gJ(r,e,t){var i=[];return(0,Sr.forEach)(r,function(n){var s=new cJ;n.accept(s);var o=s.allProductions;(0,Sr.forEach)(o,function(a){var l=(0,Ef.getProdType)(a),c=a.maxLookahead||e,u=a.idx,g=(0,Ef.getLookaheadPathsForOptionalProd)(u,n,l,c),f=g[0];if((0,Sr.isEmpty)((0,Sr.flatten)(f))){var h=t.buildEmptyRepetitionError({topLevelRule:n,repetition:a});i.push({message:h,type:No.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name})}})}),i}zt.validateSomeNonEmptyLookaheadPath=gJ;function xwe(r,e,t,i){var n=[],s=(0,Sr.reduce)(r,function(a,l,c){return e.definition[c].ignoreAmbiguities===!0||(0,Sr.forEach)(l,function(u){var g=[c];(0,Sr.forEach)(r,function(f,h){c!==h&&(0,Ef.containsPath)(f,u)&&e.definition[h].ignoreAmbiguities!==!0&&g.push(h)}),g.length>1&&!(0,Ef.containsPath)(n,u)&&(n.push(u),a.push({alts:g,path:u}))}),a},[]),o=er.map(s,function(a){var l=(0,Sr.map)(a.alts,function(u){return u+1}),c=i.buildAlternationAmbiguityError({topLevelRule:t,alternation:e,ambiguityIndices:l,prefixPath:a.path});return{message:c,type:No.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:t.name,occurrence:e.idx,alternatives:[a.alts]}});return o}function fJ(r,e,t,i){var n=[],s=(0,Sr.reduce)(r,function(o,a,l){var c=(0,Sr.map)(a,function(u){return{idx:l,path:u}});return o.concat(c)},[]);return(0,Sr.forEach)(s,function(o){var a=e.definition[o.idx];if(a.ignoreAmbiguities!==!0){var l=o.idx,c=o.path,u=(0,Sr.findAll)(s,function(f){return e.definition[f.idx].ignoreAmbiguities!==!0&&f.idx{"use strict";Object.defineProperty(If,"__esModule",{value:!0});If.validateGrammar=If.resolveGrammar=void 0;var Wx=Gt(),Dwe=Wq(),kwe=Jx(),hJ=_d();function Rwe(r){r=(0,Wx.defaults)(r,{errMsgProvider:hJ.defaultGrammarResolverErrorProvider});var e={};return(0,Wx.forEach)(r.rules,function(t){e[t.name]=t}),(0,Dwe.resolveGrammar)(e,r.errMsgProvider)}If.resolveGrammar=Rwe;function Fwe(r){return r=(0,Wx.defaults)(r,{errMsgProvider:hJ.defaultGrammarValidatorErrorProvider}),(0,kwe.validateGrammar)(r.rules,r.maxLookahead,r.tokenTypes,r.errMsgProvider,r.grammarName)}If.validateGrammar=Fwe});var yf=y(En=>{"use strict";var rC=En&&En.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(En,"__esModule",{value:!0});En.EarlyExitException=En.NotAllInputParsedException=En.NoViableAltException=En.MismatchedTokenException=En.isRecognitionException=void 0;var Nwe=Gt(),dJ="MismatchedTokenException",CJ="NoViableAltException",mJ="EarlyExitException",EJ="NotAllInputParsedException",IJ=[dJ,CJ,mJ,EJ];Object.freeze(IJ);function Twe(r){return(0,Nwe.contains)(IJ,r.name)}En.isRecognitionException=Twe;var qy=function(r){rC(e,r);function e(t,i){var n=this.constructor,s=r.call(this,t)||this;return s.token=i,s.resyncedTokens=[],Object.setPrototypeOf(s,n.prototype),Error.captureStackTrace&&Error.captureStackTrace(s,s.constructor),s}return e}(Error),Lwe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=dJ,s}return e}(qy);En.MismatchedTokenException=Lwe;var Owe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=CJ,s}return e}(qy);En.NoViableAltException=Owe;var Mwe=function(r){rC(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.name=EJ,n}return e}(qy);En.NotAllInputParsedException=Mwe;var Uwe=function(r){rC(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.previousToken=n,s.name=mJ,s}return e}(qy);En.EarlyExitException=Uwe});var Vx=y(Ki=>{"use strict";Object.defineProperty(Ki,"__esModule",{value:!0});Ki.attemptInRepetitionRecovery=Ki.Recoverable=Ki.InRuleRecoveryException=Ki.IN_RULE_RECOVERY_EXCEPTION=Ki.EOF_FOLLOW_KEY=void 0;var Jy=HA(),cs=Gt(),Kwe=yf(),Hwe=Lx(),Gwe=Hn();Ki.EOF_FOLLOW_KEY={};Ki.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";function zx(r){this.name=Ki.IN_RULE_RECOVERY_EXCEPTION,this.message=r}Ki.InRuleRecoveryException=zx;zx.prototype=Error.prototype;var Ywe=function(){function r(){}return r.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,cs.has)(e,"recoveryEnabled")?e.recoveryEnabled:Gwe.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=yJ)},r.prototype.getTokenToInsert=function(e){var t=(0,Jy.createTokenInstance)(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},r.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},r.prototype.tryInRepetitionRecovery=function(e,t,i,n){for(var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],c=!1,u=this.LA(1),g=this.LA(1),f=function(){var h=s.LA(0),p=s.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:u,previous:h,ruleName:s.getCurrRuleFullName()}),C=new Kwe.MismatchedTokenException(p,u,s.LA(0));C.resyncedTokens=(0,cs.dropRight)(l),s.SAVE_ERROR(C)};!c;)if(this.tokenMatcher(g,n)){f();return}else if(i.call(this)){f(),e.apply(this,t);return}else this.tokenMatcher(g,o)?c=!0:(g=this.SKIP_TOKEN(),this.addToResyncTokens(g,l));this.importLexerState(a)},r.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,i){return!(i===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},r.prototype.getFollowsForInRuleRecovery=function(e,t){var i=this.getCurrentGrammarPath(e,t),n=this.getNextPossibleTokenTypes(i);return n},r.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var i=this.getTokenToInsert(e);return i}if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new zx("sad sad panda")},r.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},r.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var i=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||(0,cs.isEmpty)(t))return!1;var n=this.LA(1),s=(0,cs.find)(t,function(o){return i.tokenMatcher(n,o)})!==void 0;return s},r.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},r.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),i=this.getFollowSetFromFollowKey(t);return(0,cs.contains)(i,e)},r.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),i=2;;){var n=t.tokenType;if((0,cs.contains)(e,n))return n;t=this.LA(i),i++}},r.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return Ki.EOF_FOLLOW_KEY;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),i=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(i)}},r.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return(0,cs.map)(t,function(n,s){return s===0?Ki.EOF_FOLLOW_KEY:{ruleName:e.shortRuleNameToFullName(n),idxInCallingRule:i[s],inRule:e.shortRuleNameToFullName(t[s-1])}})},r.prototype.flattenFollowSet=function(){var e=this,t=(0,cs.map)(this.buildFullFollowKeyStack(),function(i){return e.getFollowSetFromFollowKey(i)});return(0,cs.flatten)(t)},r.prototype.getFollowSetFromFollowKey=function(e){if(e===Ki.EOF_FOLLOW_KEY)return[Jy.EOF];var t=e.ruleName+e.idxInCallingRule+Hwe.IN+e.inRule;return this.resyncFollows[t]},r.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,Jy.EOF)||t.push(e),t},r.prototype.reSyncTo=function(e){for(var t=[],i=this.LA(1);this.tokenMatcher(i,e)===!1;)i=this.SKIP_TOKEN(),this.addToResyncTokens(i,t);return(0,cs.dropRight)(t)},r.prototype.attemptInRepetitionRecovery=function(e,t,i,n,s,o,a){},r.prototype.getCurrentGrammarPath=function(e,t){var i=this.getHumanReadableRuleStack(),n=(0,cs.cloneArr)(this.RULE_OCCURRENCE_STACK),s={ruleStack:i,occurrenceStack:n,lastTok:e,lastTokOccurrence:t};return s},r.prototype.getHumanReadableRuleStack=function(){var e=this;return(0,cs.map)(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},r}();Ki.Recoverable=Ywe;function yJ(r,e,t,i,n,s,o){var a=this.getKeyForAutomaticLookahead(i,n),l=this.firstAfterRepMap[a];if(l===void 0){var c=this.getCurrRuleFullName(),u=this.getGAstProductions()[c],g=new s(u,n);l=g.startWalking(),this.firstAfterRepMap[a]=l}var f=l.token,h=l.occurrence,p=l.isEndOfRule;this.RULE_STACK.length===1&&p&&f===void 0&&(f=Jy.EOF,h=1),this.shouldInRepetitionRecoveryBeTried(f,h,o)&&this.tryInRepetitionRecovery(r,e,t,f)}Ki.attemptInRepetitionRecovery=yJ});var Wy=y(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});qt.getKeyForAutomaticLookahead=qt.AT_LEAST_ONE_SEP_IDX=qt.MANY_SEP_IDX=qt.AT_LEAST_ONE_IDX=qt.MANY_IDX=qt.OPTION_IDX=qt.OR_IDX=qt.BITS_FOR_ALT_IDX=qt.BITS_FOR_RULE_IDX=qt.BITS_FOR_OCCURRENCE_IDX=qt.BITS_FOR_METHOD_TYPE=void 0;qt.BITS_FOR_METHOD_TYPE=4;qt.BITS_FOR_OCCURRENCE_IDX=8;qt.BITS_FOR_RULE_IDX=12;qt.BITS_FOR_ALT_IDX=8;qt.OR_IDX=1<{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.LooksAhead=void 0;var Fa=eC(),$s=Gt(),wJ=Hn(),Na=Wy(),Nc=Xd(),qwe=function(){function r(){}return r.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=(0,$s.has)(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:wJ.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,$s.has)(e,"maxLookahead")?e.maxLookahead:wJ.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=(0,$s.isES2015MapSupported)()?new Map:[],(0,$s.isES2015MapSupported)()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},r.prototype.preComputeLookaheadFunctions=function(e){var t=this;(0,$s.forEach)(e,function(i){t.TRACE_INIT(i.name+" Rule Lookahead",function(){var n=(0,Nc.collectMethods)(i),s=n.alternation,o=n.repetition,a=n.option,l=n.repetitionMandatory,c=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;(0,$s.forEach)(s,function(g){var f=g.idx===0?"":g.idx;t.TRACE_INIT(""+(0,Nc.getProductionDslName)(g)+f,function(){var h=(0,Fa.buildLookaheadFuncForOr)(g.idx,i,g.maxLookahead||t.maxLookahead,g.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),p=(0,Na.getKeyForAutomaticLookahead)(t.fullRuleNameToShort[i.name],Na.OR_IDX,g.idx);t.setLaFuncCache(p,h)})}),(0,$s.forEach)(o,function(g){t.computeLookaheadFunc(i,g.idx,Na.MANY_IDX,Fa.PROD_TYPE.REPETITION,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(a,function(g){t.computeLookaheadFunc(i,g.idx,Na.OPTION_IDX,Fa.PROD_TYPE.OPTION,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(l,function(g){t.computeLookaheadFunc(i,g.idx,Na.AT_LEAST_ONE_IDX,Fa.PROD_TYPE.REPETITION_MANDATORY,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(c,function(g){t.computeLookaheadFunc(i,g.idx,Na.AT_LEAST_ONE_SEP_IDX,Fa.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,g.maxLookahead,(0,Nc.getProductionDslName)(g))}),(0,$s.forEach)(u,function(g){t.computeLookaheadFunc(i,g.idx,Na.MANY_SEP_IDX,Fa.PROD_TYPE.REPETITION_WITH_SEPARATOR,g.maxLookahead,(0,Nc.getProductionDslName)(g))})})})},r.prototype.computeLookaheadFunc=function(e,t,i,n,s,o){var a=this;this.TRACE_INIT(""+o+(t===0?"":t),function(){var l=(0,Fa.buildLookaheadFuncForOptionalProd)(t,e,s||a.maxLookahead,a.dynamicTokensEnabled,n,a.lookAheadBuilderForOptional),c=(0,Na.getKeyForAutomaticLookahead)(a.fullRuleNameToShort[e.name],i,t);a.setLaFuncCache(c,l)})},r.prototype.lookAheadBuilderForOptional=function(e,t,i){return(0,Fa.buildSingleAlternativeLookaheadFunction)(e,t,i)},r.prototype.lookAheadBuilderForAlternatives=function(e,t,i,n){return(0,Fa.buildAlternativesLookAheadFunc)(e,t,i,n)},r.prototype.getKeyForAutomaticLookahead=function(e,t){var i=this.getLastExplicitRuleShortName();return(0,Na.getKeyForAutomaticLookahead)(i,e,t)},r.prototype.getLaFuncFromCache=function(e){},r.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},r.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},r.prototype.setLaFuncCache=function(e,t){},r.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},r.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},r}();zy.LooksAhead=qwe});var bJ=y(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.addNoneTerminalToCst=To.addTerminalToCst=To.setNodeLocationFull=To.setNodeLocationOnlyOffset=void 0;function Jwe(r,e){isNaN(r.startOffset)===!0?(r.startOffset=e.startOffset,r.endOffset=e.endOffset):r.endOffset{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});jA.defineNameProp=jA.functionName=jA.classNameFromInstance=void 0;var Xwe=Gt();function _we(r){return SJ(r.constructor)}jA.classNameFromInstance=_we;var QJ="name";function SJ(r){var e=r.name;return e||"anonymous"}jA.functionName=SJ;function Zwe(r,e){var t=Object.getOwnPropertyDescriptor(r,QJ);return(0,Xwe.isUndefined)(t)||t.configurable?(Object.defineProperty(r,QJ,{enumerable:!1,configurable:!0,writable:!1,value:e}),!0):!1}jA.defineNameProp=Zwe});var kJ=y(vi=>{"use strict";Object.defineProperty(vi,"__esModule",{value:!0});vi.validateRedundantMethods=vi.validateMissingCstMethods=vi.validateVisitor=vi.CstVisitorDefinitionError=vi.createBaseVisitorConstructorWithDefaults=vi.createBaseSemanticVisitorConstructor=vi.defaultVisit=void 0;var us=Gt(),iC=Xx();function vJ(r,e){for(var t=(0,us.keys)(r),i=t.length,n=0;n: - `+(""+s.join(` - -`).replace(/\n/g,` - `)))}}};return t.prototype=i,t.prototype.constructor=t,t._RULE_NAMES=e,t}vi.createBaseSemanticVisitorConstructor=$we;function eBe(r,e,t){var i=function(){};(0,iC.defineNameProp)(i,r+"BaseSemanticsWithDefaults");var n=Object.create(t.prototype);return(0,us.forEach)(e,function(s){n[s]=vJ}),i.prototype=n,i.prototype.constructor=i,i}vi.createBaseVisitorConstructorWithDefaults=eBe;var _x;(function(r){r[r.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",r[r.MISSING_METHOD=1]="MISSING_METHOD"})(_x=vi.CstVisitorDefinitionError||(vi.CstVisitorDefinitionError={}));function xJ(r,e){var t=PJ(r,e),i=DJ(r,e);return t.concat(i)}vi.validateVisitor=xJ;function PJ(r,e){var t=(0,us.map)(e,function(i){if(!(0,us.isFunction)(r[i]))return{msg:"Missing visitor method: <"+i+"> on "+(0,iC.functionName)(r.constructor)+" CST Visitor.",type:_x.MISSING_METHOD,methodName:i}});return(0,us.compact)(t)}vi.validateMissingCstMethods=PJ;var tBe=["constructor","visit","validateVisitor"];function DJ(r,e){var t=[];for(var i in r)(0,us.isFunction)(r[i])&&!(0,us.contains)(tBe,i)&&!(0,us.contains)(e,i)&&t.push({msg:"Redundant visitor method: <"+i+"> on "+(0,iC.functionName)(r.constructor)+` CST Visitor -There is no Grammar Rule corresponding to this method's name. -`,type:_x.REDUNDANT_METHOD,methodName:i});return t}vi.validateRedundantMethods=DJ});var FJ=y(Vy=>{"use strict";Object.defineProperty(Vy,"__esModule",{value:!0});Vy.TreeBuilder=void 0;var wf=bJ(),ti=Gt(),RJ=kJ(),rBe=Hn(),iBe=function(){function r(){}return r.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(0,ti.has)(e,"nodeLocationTracking")?e.nodeLocationTracking:rBe.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ti.NOOP,this.cstFinallyStateUpdate=ti.NOOP,this.cstPostTerminal=ti.NOOP,this.cstPostNonTerminal=ti.NOOP,this.cstPostRule=ti.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wf.setNodeLocationFull,this.setNodeLocationFromNode=wf.setNodeLocationFull,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wf.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=wf.setNodeLocationOnlyOffset,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ti.NOOP,this.setNodeLocationFromNode=ti.NOOP,this.cstPostRule=ti.NOOP,this.setInitialNodeLocation=ti.NOOP;else throw Error('Invalid config option: "'+e.nodeLocationTracking+'"')},r.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},r.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},r.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},r.prototype.cstInvocationStateUpdate=function(e,t){var i={name:e,children:{}};this.setInitialNodeLocation(i),this.CST_STACK.push(i)},r.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},r.prototype.cstPostRuleFull=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?(i.endOffset=t.endOffset,i.endLine=t.endLine,i.endColumn=t.endColumn):(i.startOffset=NaN,i.startLine=NaN,i.startColumn=NaN)},r.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),i=e.location;i.startOffset<=t.startOffset?i.endOffset=t.endOffset:i.startOffset=NaN},r.prototype.cstPostTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,wf.addTerminalToCst)(i,t,e),this.setNodeLocationFromToken(i.location,t)},r.prototype.cstPostNonTerminal=function(e,t){var i=this.CST_STACK[this.CST_STACK.length-1];(0,wf.addNoneTerminalToCst)(i,t,e),this.setNodeLocationFromNode(i.location,e.location)},r.prototype.getBaseCstVisitorConstructor=function(){if((0,ti.isUndefined)(this.baseCstVisitorConstructor)){var e=(0,RJ.createBaseSemanticVisitorConstructor)(this.className,(0,ti.keys)(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},r.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,ti.isUndefined)(this.baseCstVisitorWithDefaultsConstructor)){var e=(0,RJ.createBaseVisitorConstructorWithDefaults)(this.className,(0,ti.keys)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},r.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},r.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},r.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},r}();Vy.TreeBuilder=iBe});var TJ=y(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});Xy.LexerAdapter=void 0;var NJ=Hn(),nBe=function(){function r(){}return r.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(r.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(this.selfAnalysisDone!==!0)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!1,configurable:!0}),r.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):NJ.END_OF_FILE},r.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?NJ.END_OF_FILE:this.tokVector[t]},r.prototype.consumeToken=function(){this.currIdx++},r.prototype.exportLexerState=function(){return this.currIdx},r.prototype.importLexerState=function(e){this.currIdx=e},r.prototype.resetLexerState=function(){this.currIdx=-1},r.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},r.prototype.getLexerPosition=function(){return this.exportLexerState()},r}();Xy.LexerAdapter=nBe});var OJ=y(_y=>{"use strict";Object.defineProperty(_y,"__esModule",{value:!0});_y.RecognizerApi=void 0;var LJ=Gt(),sBe=yf(),Zx=Hn(),oBe=_d(),aBe=Jx(),ABe=Cn(),lBe=function(){function r(){}return r.prototype.ACTION=function(e){return e.call(this)},r.prototype.consume=function(e,t,i){return this.consumeInternal(t,e,i)},r.prototype.subrule=function(e,t,i){return this.subruleInternal(t,e,i)},r.prototype.option=function(e,t){return this.optionInternal(t,e)},r.prototype.or=function(e,t){return this.orInternal(t,e)},r.prototype.many=function(e,t){return this.manyInternal(e,t)},r.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},r.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},r.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},r.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},r.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},r.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},r.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},r.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},r.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},r.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},r.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},r.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},r.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},r.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},r.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},r.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},r.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},r.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},r.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},r.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},r.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},r.prototype.OPTION=function(e){return this.optionInternal(e,0)},r.prototype.OPTION1=function(e){return this.optionInternal(e,1)},r.prototype.OPTION2=function(e){return this.optionInternal(e,2)},r.prototype.OPTION3=function(e){return this.optionInternal(e,3)},r.prototype.OPTION4=function(e){return this.optionInternal(e,4)},r.prototype.OPTION5=function(e){return this.optionInternal(e,5)},r.prototype.OPTION6=function(e){return this.optionInternal(e,6)},r.prototype.OPTION7=function(e){return this.optionInternal(e,7)},r.prototype.OPTION8=function(e){return this.optionInternal(e,8)},r.prototype.OPTION9=function(e){return this.optionInternal(e,9)},r.prototype.OR=function(e){return this.orInternal(e,0)},r.prototype.OR1=function(e){return this.orInternal(e,1)},r.prototype.OR2=function(e){return this.orInternal(e,2)},r.prototype.OR3=function(e){return this.orInternal(e,3)},r.prototype.OR4=function(e){return this.orInternal(e,4)},r.prototype.OR5=function(e){return this.orInternal(e,5)},r.prototype.OR6=function(e){return this.orInternal(e,6)},r.prototype.OR7=function(e){return this.orInternal(e,7)},r.prototype.OR8=function(e){return this.orInternal(e,8)},r.prototype.OR9=function(e){return this.orInternal(e,9)},r.prototype.MANY=function(e){this.manyInternal(0,e)},r.prototype.MANY1=function(e){this.manyInternal(1,e)},r.prototype.MANY2=function(e){this.manyInternal(2,e)},r.prototype.MANY3=function(e){this.manyInternal(3,e)},r.prototype.MANY4=function(e){this.manyInternal(4,e)},r.prototype.MANY5=function(e){this.manyInternal(5,e)},r.prototype.MANY6=function(e){this.manyInternal(6,e)},r.prototype.MANY7=function(e){this.manyInternal(7,e)},r.prototype.MANY8=function(e){this.manyInternal(8,e)},r.prototype.MANY9=function(e){this.manyInternal(9,e)},r.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},r.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},r.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},r.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},r.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},r.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},r.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},r.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},r.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},r.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},r.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},r.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},r.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},r.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},r.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},r.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},r.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},r.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},r.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},r.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},r.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},r.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},r.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},r.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},r.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},r.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},r.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},r.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},r.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},r.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},r.prototype.RULE=function(e,t,i){if(i===void 0&&(i=Zx.DEFAULT_RULE_CONFIG),(0,LJ.contains)(this.definedRulesNames,e)){var n=oBe.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:n,type:Zx.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,i);return this[e]=o,o},r.prototype.OVERRIDE_RULE=function(e,t,i){i===void 0&&(i=Zx.DEFAULT_RULE_CONFIG);var n=[];n=n.concat((0,aBe.validateRuleIsOverridden)(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(n);var s=this.defineRule(e,t,i);return this[e]=s,s},r.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var i=this.saveRecogState();try{return e.apply(this,t),!0}catch(n){if((0,sBe.isRecognitionException)(n))return!1;throw n}finally{this.reloadRecogState(i),this.isBackTrackingStack.pop()}}},r.prototype.getGAstProductions=function(){return this.gastProductionsCache},r.prototype.getSerializedGastProductions=function(){return(0,ABe.serializeGrammar)((0,LJ.values)(this.gastProductionsCache))},r}();_y.RecognizerApi=lBe});var HJ=y($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.RecognizerEngine=void 0;var kr=Gt(),Gn=Wy(),Zy=yf(),MJ=eC(),Bf=$d(),UJ=Hn(),cBe=Vx(),KJ=HA(),nC=df(),uBe=Xx(),gBe=function(){function r(){}return r.prototype.initRecognizerEngine=function(e,t){if(this.className=(0,uBe.classNameFromInstance)(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=nC.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,kr.has)(t,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if((0,kr.isArray)(e)){if((0,kr.isEmpty)(e))throw Error(`A Token Vocabulary cannot be empty. - Note that the first argument for the parser constructor - is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if((0,kr.isArray)(e))this.tokensMap=(0,kr.reduce)(e,function(o,a){return o[a.name]=a,o},{});else if((0,kr.has)(e,"modes")&&(0,kr.every)((0,kr.flatten)((0,kr.values)(e.modes)),nC.isTokenType)){var i=(0,kr.flatten)((0,kr.values)(e.modes)),n=(0,kr.uniq)(i);this.tokensMap=(0,kr.reduce)(n,function(o,a){return o[a.name]=a,o},{})}else if((0,kr.isObject)(e))this.tokensMap=(0,kr.cloneObj)(e);else throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=KJ.EOF;var s=(0,kr.every)((0,kr.values)(e),function(o){return(0,kr.isEmpty)(o.categoryMatches)});this.tokenMatcher=s?nC.tokenStructuredMatcherNoCategories:nC.tokenStructuredMatcher,(0,nC.augmentTokenTypes)((0,kr.values)(this.tokensMap))},r.prototype.defineRule=function(e,t,i){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+`> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var n=(0,kr.has)(i,"resyncEnabled")?i.resyncEnabled:UJ.DEFAULT_RULE_CONFIG.resyncEnabled,s=(0,kr.has)(i,"recoveryValueFunc")?i.recoveryValueFunc:UJ.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<t},r.prototype.orInternal=function(e,t){var i=this.getKeyForAutomaticLookahead(Gn.OR_IDX,t),n=(0,kr.isArray)(e)?e:e.DEF,s=this.getLaFuncFromCache(i),o=s.call(this,n);if(o!==void 0){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},r.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Zy.NotAllInputParsedException(t,e))}},r.prototype.subruleInternal=function(e,t,i){var n;try{var s=i!==void 0?i.ARGS:void 0;return n=e.call(this,t,s),this.cstPostNonTerminal(n,i!==void 0&&i.LABEL!==void 0?i.LABEL:e.ruleName),n}catch(o){this.subruleInternalError(o,i,e.ruleName)}},r.prototype.subruleInternalError=function(e,t,i){throw(0,Zy.isRecognitionException)(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:i),delete e.partialCstResult),e},r.prototype.consumeInternal=function(e,t,i){var n;try{var s=this.LA(1);this.tokenMatcher(s,e)===!0?(this.consumeToken(),n=s):this.consumeInternalError(e,s,i)}catch(o){n=this.consumeInternalRecovery(e,t,o)}return this.cstPostTerminal(i!==void 0&&i.LABEL!==void 0?i.LABEL:e.name,n),n},r.prototype.consumeInternalError=function(e,t,i){var n,s=this.LA(0);throw i!==void 0&&i.ERR_MSG?n=i.ERR_MSG:n=this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:s,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Zy.MismatchedTokenException(n,t,s))},r.prototype.consumeInternalRecovery=function(e,t,i){if(this.recoveryEnabled&&i.name==="MismatchedTokenException"&&!this.isBackTracking()){var n=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,n)}catch(s){throw s.name===cBe.IN_RULE_RECOVERY_EXCEPTION?i:s}}else throw i},r.prototype.saveRecogState=function(){var e=this.errors,t=(0,kr.cloneArr)(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}},r.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},r.prototype.ruleInvocationStateUpdate=function(e,t,i){this.RULE_OCCURRENCE_STACK.push(i),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},r.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},r.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},r.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},r.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),KJ.EOF)},r.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},r}();$y.RecognizerEngine=gBe});var YJ=y(ew=>{"use strict";Object.defineProperty(ew,"__esModule",{value:!0});ew.ErrorHandler=void 0;var $x=yf(),eP=Gt(),GJ=eC(),fBe=Hn(),hBe=function(){function r(){}return r.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=(0,eP.has)(e,"errorMessageProvider")?e.errorMessageProvider:fBe.DEFAULT_PARSER_CONFIG.errorMessageProvider},r.prototype.SAVE_ERROR=function(e){if((0,$x.isRecognitionException)(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,eP.cloneArr)(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(r.prototype,"errors",{get:function(){return(0,eP.cloneArr)(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),r.prototype.raiseEarlyExitException=function(e,t,i){for(var n=this.getCurrRuleFullName(),s=this.getGAstProductions()[n],o=(0,GJ.getLookaheadPathsForOptionalProd)(e,s,t,this.maxLookahead),a=o[0],l=[],c=1;c<=this.maxLookahead;c++)l.push(this.LA(c));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:l,previous:this.LA(0),customUserDescription:i,ruleName:n});throw this.SAVE_ERROR(new $x.EarlyExitException(u,this.LA(1),this.LA(0)))},r.prototype.raiseNoAltException=function(e,t){for(var i=this.getCurrRuleFullName(),n=this.getGAstProductions()[i],s=(0,GJ.getLookaheadPathsForOr)(e,n,this.maxLookahead),o=[],a=1;a<=this.maxLookahead;a++)o.push(this.LA(a));var l=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:s,actual:o,previous:l,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new $x.NoViableAltException(c,this.LA(1),l))},r}();ew.ErrorHandler=hBe});var JJ=y(tw=>{"use strict";Object.defineProperty(tw,"__esModule",{value:!0});tw.ContentAssist=void 0;var jJ=$d(),qJ=Gt(),pBe=function(){function r(){}return r.prototype.initContentAssist=function(){},r.prototype.computeContentAssist=function(e,t){var i=this.gastProductionsCache[e];if((0,qJ.isUndefined)(i))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return(0,jJ.nextPossibleTokensAfter)([i],t,this.tokenMatcher,this.maxLookahead)},r.prototype.getNextPossibleTokenTypes=function(e){var t=(0,qJ.first)(e.ruleStack),i=this.getGAstProductions(),n=i[t],s=new jJ.NextAfterTokenWalker(n,e).startWalking();return s},r}();tw.ContentAssist=pBe});var e3=y(nw=>{"use strict";Object.defineProperty(nw,"__esModule",{value:!0});nw.GastRecorder=void 0;var In=Gt(),Lo=Cn(),dBe=Jd(),XJ=df(),_J=HA(),CBe=Hn(),mBe=Wy(),iw={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(iw);var WJ=!0,zJ=Math.pow(2,mBe.BITS_FOR_OCCURRENCE_IDX)-1,ZJ=(0,_J.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:dBe.Lexer.NA});(0,XJ.augmentTokenTypes)([ZJ]);var $J=(0,_J.createTokenInstance)(ZJ,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze($J);var EBe={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},IBe=function(){function r(){}return r.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},r.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var t=function(n){var s=n>0?n:"";e["CONSUME"+s]=function(o,a){return this.consumeInternalRecord(o,n,a)},e["SUBRULE"+s]=function(o,a){return this.subruleInternalRecord(o,n,a)},e["OPTION"+s]=function(o){return this.optionInternalRecord(o,n)},e["OR"+s]=function(o){return this.orInternalRecord(o,n)},e["MANY"+s]=function(o){this.manyInternalRecord(n,o)},e["MANY_SEP"+s]=function(o){this.manySepFirstInternalRecord(n,o)},e["AT_LEAST_ONE"+s]=function(o){this.atLeastOneInternalRecord(n,o)},e["AT_LEAST_ONE_SEP"+s]=function(o){this.atLeastOneSepFirstInternalRecord(n,o)}},i=0;i<10;i++)t(i);e.consume=function(n,s,o){return this.consumeInternalRecord(s,n,o)},e.subrule=function(n,s,o){return this.subruleInternalRecord(s,n,o)},e.option=function(n,s){return this.optionInternalRecord(s,n)},e.or=function(n,s){return this.orInternalRecord(s,n)},e.many=function(n,s){this.manyInternalRecord(n,s)},e.atLeastOne=function(n,s){this.atLeastOneInternalRecord(n,s)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},r.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var t=0;t<10;t++){var i=t>0?t:"";delete e["CONSUME"+i],delete e["SUBRULE"+i],delete e["OPTION"+i],delete e["OR"+i],delete e["MANY"+i],delete e["MANY_SEP"+i],delete e["AT_LEAST_ONE"+i],delete e["AT_LEAST_ONE_SEP"+i]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},r.prototype.ACTION_RECORD=function(e){},r.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},r.prototype.LA_RECORD=function(e){return CBe.END_OF_FILE},r.prototype.topLevelRuleRecord=function(e,t){try{var i=new Lo.Rule({definition:[],name:e});return i.name=e,this.recordingProdStack.push(i),t.call(this),this.recordingProdStack.pop(),i}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+` - This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}},r.prototype.optionInternalRecord=function(e,t){return sC.call(this,Lo.Option,e,t)},r.prototype.atLeastOneInternalRecord=function(e,t){sC.call(this,Lo.RepetitionMandatory,t,e)},r.prototype.atLeastOneSepFirstInternalRecord=function(e,t){sC.call(this,Lo.RepetitionMandatoryWithSeparator,t,e,WJ)},r.prototype.manyInternalRecord=function(e,t){sC.call(this,Lo.Repetition,t,e)},r.prototype.manySepFirstInternalRecord=function(e,t){sC.call(this,Lo.RepetitionWithSeparator,t,e,WJ)},r.prototype.orInternalRecord=function(e,t){return yBe.call(this,e,t)},r.prototype.subruleInternalRecord=function(e,t,i){if(rw(t),!e||(0,In.has)(e,"ruleName")===!1){var n=new Error(" argument is invalid"+(" expecting a Parser method reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=e.ruleName,a=new Lo.NonTerminal({idx:t,nonTerminalName:o,label:i==null?void 0:i.LABEL,referencedRule:void 0});return s.definition.push(a),this.outputCst?EBe:iw},r.prototype.consumeInternalRecord=function(e,t,i){if(rw(t),!(0,XJ.hasShortKeyProperty)(e)){var n=new Error(" argument is invalid"+(" expecting a TokenType reference but got: <"+JSON.stringify(e)+">")+(` - inside top level rule: <`+this.recordingProdStack[0].name+">"));throw n.KNOWN_RECORDER_ERROR=!0,n}var s=(0,In.peek)(this.recordingProdStack),o=new Lo.Terminal({idx:t,terminalType:e,label:i==null?void 0:i.LABEL});return s.definition.push(o),$J},r}();nw.GastRecorder=IBe;function sC(r,e,t,i){i===void 0&&(i=!1),rw(t);var n=(0,In.peek)(this.recordingProdStack),s=(0,In.isFunction)(e)?e:e.DEF,o=new r({definition:[],idx:t});return i&&(o.separator=e.SEP),(0,In.has)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(o),s.call(this),n.definition.push(o),this.recordingProdStack.pop(),iw}function yBe(r,e){var t=this;rw(e);var i=(0,In.peek)(this.recordingProdStack),n=(0,In.isArray)(r)===!1,s=n===!1?r:r.DEF,o=new Lo.Alternation({definition:[],idx:e,ignoreAmbiguities:n&&r.IGNORE_AMBIGUITIES===!0});(0,In.has)(r,"MAX_LOOKAHEAD")&&(o.maxLookahead=r.MAX_LOOKAHEAD);var a=(0,In.some)(s,function(l){return(0,In.isFunction)(l.GATE)});return o.hasPredicates=a,i.definition.push(o),(0,In.forEach)(s,function(l){var c=new Lo.Alternative({definition:[]});o.definition.push(c),(0,In.has)(l,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:(0,In.has)(l,"GATE")&&(c.ignoreAmbiguities=!0),t.recordingProdStack.push(c),l.ALT.call(t),t.recordingProdStack.pop()}),iw}function VJ(r){return r===0?"":""+r}function rw(r){if(r<0||r>zJ){var e=new Error("Invalid DSL Method idx value: <"+r+`> - `+("Idx value must be a none negative value smaller than "+(zJ+1)));throw e.KNOWN_RECORDER_ERROR=!0,e}}});var r3=y(sw=>{"use strict";Object.defineProperty(sw,"__esModule",{value:!0});sw.PerformanceTracer=void 0;var t3=Gt(),wBe=Hn(),BBe=function(){function r(){}return r.prototype.initPerformanceTracer=function(e){if((0,t3.has)(e,"traceInitPerf")){var t=e.traceInitPerf,i=typeof t=="number";this.traceInitMaxIdent=i?t:1/0,this.traceInitPerf=i?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=wBe.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},r.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var i=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent <"+e+">");var n=(0,t3.timer)(t),s=n.time,o=n.value,a=s>10?console.warn:console.log;return this.traceInitIndent time: "+s+"ms"),this.traceInitIndent--,o}else return t()},r}();sw.PerformanceTracer=BBe});var i3=y(ow=>{"use strict";Object.defineProperty(ow,"__esModule",{value:!0});ow.applyMixins=void 0;function bBe(r,e){e.forEach(function(t){var i=t.prototype;Object.getOwnPropertyNames(i).forEach(function(n){if(n!=="constructor"){var s=Object.getOwnPropertyDescriptor(i,n);s&&(s.get||s.set)?Object.defineProperty(r.prototype,n,s):r.prototype[n]=t.prototype[n]}})})}ow.applyMixins=bBe});var Hn=y(Cr=>{"use strict";var o3=Cr&&Cr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();Object.defineProperty(Cr,"__esModule",{value:!0});Cr.EmbeddedActionsParser=Cr.CstParser=Cr.Parser=Cr.EMPTY_ALT=Cr.ParserDefinitionErrorType=Cr.DEFAULT_RULE_CONFIG=Cr.DEFAULT_PARSER_CONFIG=Cr.END_OF_FILE=void 0;var _i=Gt(),QBe=Yq(),n3=HA(),a3=_d(),s3=pJ(),SBe=Vx(),vBe=BJ(),xBe=FJ(),PBe=TJ(),DBe=OJ(),kBe=HJ(),RBe=YJ(),FBe=JJ(),NBe=e3(),TBe=r3(),LBe=i3();Cr.END_OF_FILE=(0,n3.createTokenInstance)(n3.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Cr.END_OF_FILE);Cr.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a3.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});Cr.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var OBe;(function(r){r[r.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",r[r.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",r[r.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",r[r.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",r[r.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",r[r.LEFT_RECURSION=5]="LEFT_RECURSION",r[r.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",r[r.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",r[r.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",r[r.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",r[r.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",r[r.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",r[r.TOO_MANY_ALTS=12]="TOO_MANY_ALTS"})(OBe=Cr.ParserDefinitionErrorType||(Cr.ParserDefinitionErrorType={}));function MBe(r){return r===void 0&&(r=void 0),function(){return r}}Cr.EMPTY_ALT=MBe;var aw=function(){function r(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(t),i.initLexerAdapter(),i.initLooksAhead(t),i.initRecognizerEngine(e,t),i.initRecoverable(t),i.initTreeBuilder(t),i.initContentAssist(),i.initGastRecorder(t),i.initPerformanceTracer(t),(0,_i.has)(t,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. - Please use the flag on the relevant DSL method instead. - See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=(0,_i.has)(t,"skipValidations")?t.skipValidations:Cr.DEFAULT_PARSER_CONFIG.skipValidations}return r.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},r.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT("performSelfAnalysis",function(){var t;e.selfAnalysisDone=!0;var i=e.className;e.TRACE_INIT("toFastProps",function(){(0,_i.toFastProperties)(e)}),e.TRACE_INIT("Grammar Recording",function(){try{e.enableRecording(),(0,_i.forEach)(e.definedRulesNames,function(s){var o=e[s],a=o.originalGrammarAction,l=void 0;e.TRACE_INIT(s+" Rule",function(){l=e.topLevelRuleRecord(s,a)}),e.gastProductionsCache[s]=l})}finally{e.disableRecording()}});var n=[];if(e.TRACE_INIT("Grammar Resolving",function(){n=(0,s3.resolveGrammar)({rules:(0,_i.values)(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(n)}),e.TRACE_INIT("Grammar Validations",function(){if((0,_i.isEmpty)(n)&&e.skipValidations===!1){var s=(0,s3.validateGrammar)({rules:(0,_i.values)(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:(0,_i.values)(e.tokensMap),errMsgProvider:a3.defaultGrammarValidatorErrorProvider,grammarName:i});e.definitionErrors=e.definitionErrors.concat(s)}}),(0,_i.isEmpty)(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT("computeAllProdsFollows",function(){var s=(0,QBe.computeAllProdsFollows)((0,_i.values)(e.gastProductionsCache));e.resyncFollows=s}),e.TRACE_INIT("ComputeLookaheadFunctions",function(){e.preComputeLookaheadFunctions((0,_i.values)(e.gastProductionsCache))})),!r.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,_i.isEmpty)(e.definitionErrors))throw t=(0,_i.map)(e.definitionErrors,function(s){return s.message}),new Error(`Parser Definition Errors detected: - `+t.join(` -------------------------------- -`))})},r.DEFER_DEFINITION_ERRORS_HANDLING=!1,r}();Cr.Parser=aw;(0,LBe.applyMixins)(aw,[SBe.Recoverable,vBe.LooksAhead,xBe.TreeBuilder,PBe.LexerAdapter,kBe.RecognizerEngine,DBe.RecognizerApi,RBe.ErrorHandler,FBe.ContentAssist,NBe.GastRecorder,TBe.PerformanceTracer]);var UBe=function(r){o3(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!0,n=r.call(this,t,s)||this,n}return e}(aw);Cr.CstParser=UBe;var KBe=function(r){o3(e,r);function e(t,i){i===void 0&&(i=Cr.DEFAULT_PARSER_CONFIG);var n=this,s=(0,_i.cloneObj)(i);return s.outputCst=!1,n=r.call(this,t,s)||this,n}return e}(aw);Cr.EmbeddedActionsParser=KBe});var l3=y(Aw=>{"use strict";Object.defineProperty(Aw,"__esModule",{value:!0});Aw.createSyntaxDiagramsCode=void 0;var A3=Ix();function HBe(r,e){var t=e===void 0?{}:e,i=t.resourceBase,n=i===void 0?"https://unpkg.com/chevrotain@"+A3.VERSION+"/diagrams/":i,s=t.css,o=s===void 0?"https://unpkg.com/chevrotain@"+A3.VERSION+"/diagrams/diagrams.css":s,a=` - - - - - -`,l=` - -`,c=` - {{content-for "head-footer"}} diff --git a/app/initializers/service-worker.js b/app/initializers/service-worker.js index 1ba2ae398..a611a651c 100644 --- a/app/initializers/service-worker.js +++ b/app/initializers/service-worker.js @@ -1,4 +1,4 @@ -import ENV from '../config/environment'; +import ENV from 'amber-ui/config/environment'; export default { name: 'service-worker', diff --git a/app/router.js b/app/router.js index 783cbe8c8..c12278f6d 100644 --- a/app/router.js +++ b/app/router.js @@ -32,29 +32,89 @@ export default class Router extends EmberRouter { } Router.map(function () { - this.route('oauth', function () { - this.route('authorize'); + this.route('404-page-not-found', { path: '/*path' }); + + this.route('418-im-a-teapot', { path: '/coffee' }); + + this.route('activities', function () { + this.route('new'); + + this.route('ical'); + + this.route('activity', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + + this.route('generate-alias'); + this.route('print-enrolled'); + }); }); - this.route('login'); + this.route('article-comments', function () { + this.route('article-comment', { path: ':id' }, function () { + this.route('destroy'); + }); + }); - this.route('profile'); + this.route('articles', function () { + this.route('new'); - this.route('static-pages', function () { - this.route('show', { path: '/:id' }); + this.route('article', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + }); + }); + + this.route('books', function () { this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('destroy', { path: '/:id/destroy' }); + + this.route('book', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + }); }); - this.route('quickpost'); + this.route('debit', function () { + this.route('collections', function () { + this.route('new'); + + this.route('collection', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + + this.route('sepa'); + }); + }); + + this.route('mandates', function () { + this.route('new'); + + this.route('mandate', { path: ':id' }, function () { + this.route('edit'); + }); + }); + + this.route('transactions', function () { + this.route('transaction', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + }); + }); + }); + + this.route('form', function () { + this.route('responses', function () { + this.route('response', { path: ':id' }, function () { + this.route('destroy'); + }); + }); + }); this.route('forum', function () { this.route('categories', function () { this.route('new'); this.route('category', { path: ':category_id' }, function () { - this.route('show', { path: '/' }); this.route('edit'); this.route('destroy'); @@ -62,13 +122,14 @@ Router.map(function () { this.route('new'); this.route('thread', { path: ':thread_id' }, function () { - this.route('show', { path: '/' }); this.route('edit'); this.route('destroy'); this.route('posts', function () { - this.route('edit', { path: ':post_id/edit' }); - this.route('destroy', { path: ':post_id/destroy' }); + this.route('post', { path: ':post_id' }, function () { + this.route('edit'); + this.route('destroy'); + }); }); }); }); @@ -76,151 +137,126 @@ Router.map(function () { }); }); - this.route('photo-albums', function () { + this.route('groups', function () { this.route('new'); - this.route('photo-album', { path: ':photo_album_id' }, function () { - this.route('show', { path: '/' }); + this.route('group', { path: ':id' }, function () { this.route('edit'); - this.route('destroy'); - this.route('photos', function () { - this.route('show', { path: '/:photo_id' }); - this.route('destroy', { path: '/:photo_id/destroy' }); - }); + this.route('export'); }); }); - this.route('photo-comments', function () { - this.route('destroy', { path: '/:id/destroy' }); - }); - - this.route('users', function () { - this.route('members'); + this.route('login'); + this.route('mail-aliases', function () { this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('edit-permissions', { path: '/:id/edit/permissions' }); - this.route('edit-privacy', { path: '/:id/edit/privacy' }); - this.route('edit-security', { path: '/:id/edit/security' }); - this.route('show', { path: '/:id' }); - this.route('show-groups', { path: '/:id/groups' }); - this.route('show-settings', { path: '/:id/settings' }); - this.route('show-mail', { path: '/:id/mail' }); - this.route('show-mandates', { path: '/:id/mandates' }); - this.route('show-permissions', { path: '/:id/permissions' }); - this.route('destroy', { path: '/:id/destroy' }); - - this.route('webdav'); - this.route('forgot_password'); - this.route('activate_account', { path: '/:id/activate_account' }); - this.route('resend_activation', { path: '/:id/resend_activation' }); - - this.route('batch', function () { - this.route('new'); - this.route('confirm'); + this.route('mail-alias', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); }); }); - this.route('articles', function () { - this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('show', { path: '/:id' }); - this.route('destroy', { path: '/:id/destroy' }); - }); + this.route('mail-moderations', function () { + this.route('mail-moderation', { path: ':id' }, function () { + this.route('destroy'); - this.route('article-comments', function () { - this.route('destroy', { path: '/:id/destroy' }); + this.route('accept'); + this.route('reject'); + }); }); - this.route('polls', function () { - this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('show', { path: '/:id' }); - this.route('destroy', { path: '/:id/destroy' }); + this.route('oauth', function () { + this.route('authorize'); }); - this.route('mail-aliases', function () { + this.route('photo-albums', function () { this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('show', { path: '/:id' }); - this.route('destroy', { path: '/:id/destroy' }); - }); - this.route('mail-moderations', function () { - this.route('show', { path: '/:id' }); - this.route('destroy', { path: '/:id/destroy' }); - this.route('accept', { path: '/:id/accept' }); - this.route('reject', { path: '/:id/reject' }); - }); + this.route('photo-album', { path: ':photo_album_id' }, function () { + this.route('edit'); + this.route('destroy'); - this.route('activities', function () { - this.route('show', { path: '/:id' }); - this.route('ical'); - this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('destroy', { path: '/:id/destroy' }); - this.route('generate-alias', { path: '/:id/generate-alias' }); - this.route('print-enrolled', { path: '/:id/print-enrolled' }); + this.route('photos', function () { + this.route('photo', { path: ':photo_id' }, function () { + this.route('destroy'); + }); + }); + }); }); - this.route('debit', function () { - this.route('collections', function () { - this.route('show', { path: '/:id' }); - this.route('sepa', { path: '/:id/sepa' }); - this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('destroy', { path: '/:id/destroy' }); + this.route('photo-comments', function () { + this.route('photo-comment', { path: ':id' }, function () { + this.route('destroy'); }); + }); - this.route('transactions', function () { - this.route('edit', { path: '/:id/edit' }); - this.route('destroy', { path: '/:id/destroy' }); - }); + this.route('polls', function () { + this.route('new'); - this.route('mandates', function () { - this.route('show', { path: '/:id' }); - this.route('new'); - this.route('edit', { path: '/:id/edit' }); + this.route('poll', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); }); }); - this.route('form', function () { - this.route('responses', function () { - this.route('destroy', { path: '/:id/destroy' }); - }); - }); + this.route('profile'); - this.route('groups', function () { - this.route('show', { path: '/:id' }); - this.route('export', { path: '/:id/export' }); - this.route('new'); - this.route('edit', { path: '/:id/edit' }); - }); + this.route('quickpost'); this.route('sog', function () { this.route('name-trainer'); }); - this.route('404-page-not-found', { path: '/*path' }); + this.route('sponsorkliks'); - this.route('418-im-a-teapot', { path: '/coffee' }); + this.route('static-pages', function () { + this.route('new'); - this.route('sponsorkliks'); + this.route('static-page', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + }); + }); - this.route('books', function () { - this.route('show', { path: '/:id' }); + this.route('users', function () { this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('destroy', { path: '/:id/destroy' }); + + this.route('forgot-password'); + this.route('members'); + this.route('webdav'); + this.route('activate-account', { path: ':id/activate-account' }); + + this.route('user', { path: ':id' }, function () { + this.route('edit', function () { + this.route('permissions'); + this.route('privacy'); + this.route('security'); + }); + this.route('destroy'); + + this.route('groups'); + this.route('mail'); + this.route('mandates'); + this.route('permissions'); + this.route('settings'); + + this.route('resend-activation-code'); + }); + + this.route('batch', function () { + this.route('new'); + }); }); this.route('vacancies', function () { - this.route('show', { path: '/:id' }); this.route('new'); - this.route('edit', { path: '/:id/edit' }); - this.route('destroy', { path: '/:id/destroy' }); + + this.route('vacancy', { path: ':id' }, function () { + this.route('edit'); + this.route('destroy'); + }); }); return true; diff --git a/app/routes/activities.js b/app/routes/activities.js new file mode 100644 index 000000000..7773b5065 --- /dev/null +++ b/app/routes/activities.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class ActivitiesRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Activiteiten' }; +} diff --git a/app/routes/activities/activity.js b/app/routes/activities/activity.js new file mode 100644 index 000000000..be5e8e8d1 --- /dev/null +++ b/app/routes/activities/activity.js @@ -0,0 +1,17 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class ActivityRoute extends ApplicationRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.title }; + } + + canAccess() { + return this.abilities.can('show activities'); + } + + model(params) { + return this.store.findRecord('activity', params.id, params); + } +} diff --git a/app/routes/activities/activity/destroy.js b/app/routes/activities/activity/destroy.js new file mode 100644 index 000000000..58a80d61d --- /dev/null +++ b/app/routes/activities/activity/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ActivityDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Activiteit verwijderen' }; + + canAccess() { + return this.abilities.can('destroy activities'); + } +} diff --git a/app/routes/activities/edit.js b/app/routes/activities/activity/edit.js similarity index 58% rename from app/routes/activities/edit.js rename to app/routes/activities/activity/edit.js index 1a8845f1e..70fecf079 100644 --- a/app/routes/activities/edit.js +++ b/app/routes/activities/activity/edit.js @@ -1,14 +1,14 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EdityActivityRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Activiteit aanpassen' }; +export default class ActivityEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Activiteit aanpassen' }; canAccess(model) { return this.abilities.can('edit activity', model); } - async model(params) { - const activity = await this.store.findRecord('activity', params.id, params); + async model() { + const activity = this.modelFor('activities.activity'); await activity.form; return activity; } diff --git a/app/routes/activities/activity/generate-alias.js b/app/routes/activities/activity/generate-alias.js new file mode 100644 index 000000000..fb8068c4e --- /dev/null +++ b/app/routes/activities/activity/generate-alias.js @@ -0,0 +1,15 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ActivityGenerateAliasRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Creëer mail alias' }; + + canAccess(model) { + return this.abilities.can('generate alias for activity', model); + } + + async model() { + const activity = this.modelFor('activities.activity'); + await activity.form; + return activity; + } +} diff --git a/app/routes/activities/show.js b/app/routes/activities/activity/index.js similarity index 74% rename from app/routes/activities/show.js rename to app/routes/activities/activity/index.js index 611ecac2f..5991fa0d8 100644 --- a/app/routes/activities/show.js +++ b/app/routes/activities/activity/index.js @@ -1,39 +1,34 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +import FormLoadOrCreateUtil from 'amber-ui/utils/form-load-or-create'; import { hash } from 'rsvp'; import { inject as service } from '@ember/service'; -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -import FormLoadOrCreateUtil from 'amber-ui/utils/form-load-or-create'; -export default class ShowActivityRoute extends AuthenticatedRoute { +export default class ActivityIndexRoute extends ApplicationRoute { @service store; - constructor() { super(...arguments); this.formLoadOrCreateUtil = new FormLoadOrCreateUtil(this); } - get breadCrumb() { - return { title: this.controller.model.activity.title }; - } - get pageActions() { const { activity } = this.controller.model; return [ { - link: 'activities.edit', + link: 'activities.activity.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: activity, canAccess: this.abilities.can('edit activity', activity), }, { - link: 'activities.destroy', + link: 'activities.activity.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: activity, canAccess: this.abilities.can('destroy activities'), }, { - link: 'activities.print-enrolled', + link: 'activities.activity.print-enrolled', title: 'Print ingeschrevenen', icon: 'print', linkArgument: activity, @@ -43,7 +38,7 @@ export default class ShowActivityRoute extends AuthenticatedRoute { ), }, { - link: 'activities.generate-alias', + link: 'activities.activity.generate-alias', title: 'Mail ingeschrevenen', icon: 'paper-plane', linkArgument: activity, @@ -53,23 +48,15 @@ export default class ShowActivityRoute extends AuthenticatedRoute { ]; } - canAccess() { - return this.abilities.can('show activities'); - } - - model(params) { - const activityPromise = this.store.findRecord( - 'activity', - params.id, - params - ); + model() { + const activity = this.modelFor('activities.activity'); let formPromise, responsePromise; if ( this.abilities.can('show form/forms') && this.abilities.can('show form/responses') ) { - formPromise = activityPromise.then((activity) => activity.get('form')); + formPromise = activity.form; responsePromise = formPromise // Load or create the response .then((form) => @@ -86,7 +73,7 @@ export default class ShowActivityRoute extends AuthenticatedRoute { } return hash({ - activity: activityPromise, + activity, form: formPromise, currentUserResponse: responsePromise, }); diff --git a/app/routes/activities/activity/print-enrolled.js b/app/routes/activities/activity/print-enrolled.js new file mode 100644 index 000000000..15e554eb8 --- /dev/null +++ b/app/routes/activities/activity/print-enrolled.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ActivityPrintEnrolledRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Print inschrijvingen/streeplijst' }; + + canAccess(model) { + return this.abilities.can('edit activity', model); + } +} diff --git a/app/routes/activities/destroy.js b/app/routes/activities/destroy.js deleted file mode 100644 index 952f24c72..000000000 --- a/app/routes/activities/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyActivityRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Activiteit verwijderen' }; - - canAccess() { - return this.abilities.can('destroy activities'); - } - - model(params) { - return this.store.findRecord('activity', params.id, params); - } -} diff --git a/app/routes/activities/generate-alias.js b/app/routes/activities/generate-alias.js deleted file mode 100644 index cb4ff2e1d..000000000 --- a/app/routes/activities/generate-alias.js +++ /dev/null @@ -1,15 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class GenerateAliasRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Creëer mailalias' }; - - canAccess(model) { - return this.abilities.can('generate alias for activity', model); - } - - model(params) { - return this.store - .findRecord('activity', params.id, params) - .then((activity) => activity.get('form').then(() => activity)); - } -} diff --git a/app/routes/activities/ical.js b/app/routes/activities/ical.js index 87aeea0ec..57130242f 100644 --- a/app/routes/activities/ical.js +++ b/app/routes/activities/ical.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class IcalRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Agenda Ical' }; +export default class ActivitiesIcalRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Agenda iCal' }; canAccess() { return this.abilities.can('show ical activities'); diff --git a/app/routes/activities/index.js b/app/routes/activities/index.js index 664764953..b0714ac4d 100644 --- a/app/routes/activities/index.js +++ b/app/routes/activities/index.js @@ -1,8 +1,6 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class ActivityIndexRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Activiteiten' }; +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +export default class ActivitiesIndexRoute extends ApplicationRoute { queryParams = { search: { refreshModel: true, @@ -28,17 +26,13 @@ export default class ActivityIndexRoute extends AuthenticatedRoute { }, { link: 'activities.ical', - title: 'Ical link', + title: 'iCal link', icon: 'calendar-days', canAccess: this.abilities.can('show ical activities'), }, ]; } - canAccess() { - return this.abilities.can('show activities'); - } - model(params) { if (!params.showPassed) { params.filter = { upcoming: true }; diff --git a/app/routes/activities/new.js b/app/routes/activities/new.js index 29220c9c8..516f5a6f2 100644 --- a/app/routes/activities/new.js +++ b/app/routes/activities/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; export default class NewActivityRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Activiteit aanmaken' }; + breadcrumb = { title: 'Activiteit aanmaken' }; canAccess() { return this.abilities.can('create activities'); diff --git a/app/routes/activities/print-enrolled.js b/app/routes/activities/print-enrolled.js deleted file mode 100644 index 9b971600e..000000000 --- a/app/routes/activities/print-enrolled.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class PrintEnrolledRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Print inschrijvingen/streeplijst' }; - - canAccess(model) { - return this.abilities.can('edit activity', model); - } - - model(params) { - return this.store.findRecord('activity', params.id, params); - } -} diff --git a/app/routes/application.js b/app/routes/application.js index adc835d18..08c5d99cf 100644 --- a/app/routes/application.js +++ b/app/routes/application.js @@ -2,9 +2,9 @@ import Route from '@ember/routing/route'; import { inject as service } from '@ember/service'; export default class AppRoute extends Route { - @service session; @service intl; @service moment; + @service session; async beforeModel() { await this.session.setup(); diff --git a/app/routes/application/application.js b/app/routes/application/application.js index 7ab64e637..b998a6406 100644 --- a/app/routes/application/application.js +++ b/app/routes/application/application.js @@ -25,6 +25,12 @@ export class ApplicationRoute extends Route { controller.pageActions = this.pageActions; controller.tabItems = this.tabItems; } + + buildRouteInfoMetadata() { + return { + breadcrumb: this.breadcrumb, + }; + } } export class AuthenticatedRoute extends ApplicationRoute { diff --git a/app/routes/article-comments.js b/app/routes/article-comments.js new file mode 100644 index 000000000..7b478e573 --- /dev/null +++ b/app/routes/article-comments.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class ArticleCommentsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Artikel reacties' }; +} diff --git a/app/routes/article-comments/article-comment.js b/app/routes/article-comments/article-comment.js new file mode 100644 index 000000000..e31988f32 --- /dev/null +++ b/app/routes/article-comments/article-comment.js @@ -0,0 +1,13 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ArticleCommentRoute extends AuthenticatedRoute { + queryParams = {}; + + canAccess() { + return this.abilities.can('show article-comments'); + } + + model(params) { + return this.store.findRecord('article-comment', params.id, params); + } +} diff --git a/app/routes/article-comments/article-comment/destroy.js b/app/routes/article-comments/article-comment/destroy.js new file mode 100644 index 000000000..8a22b2a2b --- /dev/null +++ b/app/routes/article-comments/article-comment/destroy.js @@ -0,0 +1,15 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ArticleCommentDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Artikel reactie verwijderen' }; + + canAccess() { + return this.abilities.can('destroy article-comments'); + } + + async model() { + const articleComment = this.modelFor('article-comments.article-comment'); + await articleComment.article; + return articleComment; + } +} diff --git a/app/routes/article-comments/destroy.js b/app/routes/article-comments/destroy.js deleted file mode 100644 index 858e095ab..000000000 --- a/app/routes/article-comments/destroy.js +++ /dev/null @@ -1,19 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyArticleCommentRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Artikel comment verwijderen' }; - - canAccess() { - return this.abilities.can('destroy article-comments'); - } - - async model(params) { - const articleComment = this.store.findRecord( - 'article-comment', - params.id, - params - ); - await articleComment.article; - return articleComment; - } -} diff --git a/app/routes/articles.js b/app/routes/articles.js new file mode 100644 index 000000000..5c22bc0a1 --- /dev/null +++ b/app/routes/articles.js @@ -0,0 +1,15 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +import { capitalize } from '@ember/string'; +import { inject as service } from '@ember/service'; + +export default class ArticlesRoute extends ApplicationRoute { + @service intl; + + queryParams = {}; + + get breadcrumb() { + return { + title: capitalize(this.intl.t('model.article.name.other').toString()), + }; + } +} diff --git a/app/routes/articles/article.js b/app/routes/articles/article.js new file mode 100644 index 000000000..b7e6a427b --- /dev/null +++ b/app/routes/articles/article.js @@ -0,0 +1,13 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class ArticleRoute extends ApplicationRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.title }; + } + + model(params) { + return this.store.findRecord('article', params.id, params); + } +} diff --git a/app/routes/articles/article/destroy.js b/app/routes/articles/article/destroy.js new file mode 100644 index 000000000..31d655e64 --- /dev/null +++ b/app/routes/articles/article/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ArticleDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Artikel verwijderen' }; + + canAccess() { + return this.abilities.can('destroy articles'); + } +} diff --git a/app/routes/articles/edit.js b/app/routes/articles/article/edit.js similarity index 56% rename from app/routes/articles/edit.js rename to app/routes/articles/article/edit.js index 08c9970a4..b1b05d823 100644 --- a/app/routes/articles/edit.js +++ b/app/routes/articles/article/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditArticleRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Activiteit aanpassen' }; +export default class ArticleEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Artikel aanpassen' }; canAccess(model) { return this.abilities.can('edit article', model); } - model(params) { - return this.store.findRecord('article', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/articles/show.js b/app/routes/articles/article/index.js similarity index 58% rename from app/routes/articles/show.js rename to app/routes/articles/article/index.js index 91b8ad564..17c1867b0 100644 --- a/app/routes/articles/show.js +++ b/app/routes/articles/article/index.js @@ -1,22 +1,18 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -export default class ShowArticleRoute extends ApplicationRoute { - get breadCrumb() { - return { title: this.controller.model.title }; - } - +export default class ArticleIndexRoute extends ApplicationRoute { get pageActions() { const article = this.controller.model; return [ { - link: 'articles.edit', + link: 'articles.article.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: article, canAccess: this.abilities.can('edit article', article), }, { - link: 'articles.destroy', + link: 'articles.article.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: this.controller.model, @@ -24,12 +20,4 @@ export default class ShowArticleRoute extends ApplicationRoute { }, ]; } - - canAccess() { - return this.abilities.can('show articles'); - } - - model(params) { - return this.store.findRecord('article', params.id, params); - } } diff --git a/app/routes/articles/destroy.js b/app/routes/articles/destroy.js deleted file mode 100644 index 95193a0e8..000000000 --- a/app/routes/articles/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyArticleRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Artikel verwijderen' }; - - canAccess() { - return this.abilities.can('destroy articles'); - } - - model(params) { - return this.store.findRecord('article', params.id, params); - } -} diff --git a/app/routes/articles/index.js b/app/routes/articles/index.js index baa92ee31..85e06a420 100644 --- a/app/routes/articles/index.js +++ b/app/routes/articles/index.js @@ -1,16 +1,6 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -import { capitalize } from '@ember/string'; -import { inject as service } from '@ember/service'; export default class ArticlesIndexRoute extends ApplicationRoute { - @service intl; - - get breadCrumb() { - return { - title: capitalize(this.intl.t('model.article.name.other').toString()), - }; - } - get pageActions() { return [ { @@ -22,10 +12,6 @@ export default class ArticlesIndexRoute extends ApplicationRoute { ]; } - canAccess() { - return this.abilities.can('show articles'); - } - model(params) { params.sort = `-pinned,${params.sort}`; return this.store.queryPaged('article', params); diff --git a/app/routes/articles/new.js b/app/routes/articles/new.js index f676c1397..ea43d7cf2 100644 --- a/app/routes/articles/new.js +++ b/app/routes/articles/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewArticleRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Artikel aanmaken' }; +export default class ArticlesNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Artikel aanmaken' }; canAccess() { return this.abilities.can('create articles'); diff --git a/app/routes/books.js b/app/routes/books.js new file mode 100644 index 000000000..3c248ede0 --- /dev/null +++ b/app/routes/books.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class BooksRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Boeken' }; +} diff --git a/app/routes/books/book.js b/app/routes/books/book.js new file mode 100644 index 000000000..4dade7952 --- /dev/null +++ b/app/routes/books/book.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class BookRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.title }; + } + + canAccess() { + return this.abilities.can('show books'); + } + + model(params) { + return this.store.findRecord('book', params.id, params); + } +} diff --git a/app/routes/books/book/destroy.js b/app/routes/books/book/destroy.js new file mode 100644 index 000000000..2445cccfa --- /dev/null +++ b/app/routes/books/book/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class BookDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Boek verwijderen' }; + + canAccess() { + return this.abilities.can('destroy books'); + } +} diff --git a/app/routes/books/edit.js b/app/routes/books/book/edit.js similarity index 56% rename from app/routes/books/edit.js rename to app/routes/books/book/edit.js index 8d5826ddb..a21ea14dc 100644 --- a/app/routes/books/edit.js +++ b/app/routes/books/book/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditBookRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Boek aanpassen' }; +export default class BookEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Boek aanpassen' }; canAccess(model) { return this.abilities.can('edit book', model); } - model(params) { - return this.store.findRecord('book', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/books/show.js b/app/routes/books/book/index.js similarity index 73% rename from app/routes/books/show.js rename to app/routes/books/book/index.js index a65235ddb..d4a876024 100644 --- a/app/routes/books/show.js +++ b/app/routes/books/book/index.js @@ -2,7 +2,7 @@ import { inject as service } from '@ember/service'; import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; import FormLoadOrCreateUtil from 'amber-ui/utils/form-load-or-create'; -export default class ShowBookRoute extends AuthenticatedRoute { +export default class BookIndexRoute extends AuthenticatedRoute { @service store; constructor() { @@ -10,22 +10,18 @@ export default class ShowBookRoute extends AuthenticatedRoute { this.formLoadOrCreateUtil = new FormLoadOrCreateUtil(this); } - get breadCrumb() { - return { title: this.controller.model.title }; - } - get pageActions() { const book = this.controller.model; return [ { - link: 'books.edit', + link: 'books.book.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: book, canAccess: this.abilities.can('edit book', book), }, { - link: 'books.destroy', + link: 'books.book.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: book, @@ -37,8 +33,4 @@ export default class ShowBookRoute extends AuthenticatedRoute { canAccess() { return this.abilities.can('show books'); } - - model(params) { - return this.store.findRecord('book', params.id, params); - } } diff --git a/app/routes/books/destroy.js b/app/routes/books/destroy.js deleted file mode 100644 index 5afe9cf41..000000000 --- a/app/routes/books/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyBookRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Boek verwijderen' }; - - canAccess() { - return this.abilities.can('destroy books'); - } - - model(params) { - return this.store.findRecord('book', params.id, params); - } -} diff --git a/app/routes/books/index.js b/app/routes/books/index.js index c8e0f6c87..3a494645b 100644 --- a/app/routes/books/index.js +++ b/app/routes/books/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class IndexBookRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Boeken' }; - +export default class BooksIndexRoute extends AuthenticatedRoute { queryParams = { search: { refreshModel: true, diff --git a/app/routes/books/new.js b/app/routes/books/new.js index ef44c4bde..cc2b779ba 100644 --- a/app/routes/books/new.js +++ b/app/routes/books/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewBookRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Boek aanmaken' }; +export default class BooksNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Boek aanmaken' }; canAccess() { return this.abilities.can('create books'); diff --git a/app/routes/debit.js b/app/routes/debit.js deleted file mode 100644 index ba811f73d..000000000 --- a/app/routes/debit.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class DebitRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/debit/collections.js b/app/routes/debit/collections.js new file mode 100644 index 000000000..b34645c7c --- /dev/null +++ b/app/routes/debit/collections.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class CollectionsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: "Incasso's" }; +} diff --git a/app/routes/debit/collections/collection.js b/app/routes/debit/collections/collection.js new file mode 100644 index 000000000..b373b1da8 --- /dev/null +++ b/app/routes/debit/collections/collection.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class CollectionRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.name }; + } + + canAccess() { + return this.abilities.can('show debit/collections'); + } + + model(params) { + return this.store.findRecord('debit/collection', params.id, params); + } +} diff --git a/app/routes/debit/collections/collection/destroy.js b/app/routes/debit/collections/collection/destroy.js new file mode 100644 index 000000000..be42fe94a --- /dev/null +++ b/app/routes/debit/collections/collection/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class CollectionDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Incasso verwijderen' }; + + canAccess() { + return this.abilities.can('destroy debit/collections'); + } +} diff --git a/app/routes/debit/collections/edit.js b/app/routes/debit/collections/collection/edit.js similarity index 55% rename from app/routes/debit/collections/edit.js rename to app/routes/debit/collections/collection/edit.js index 533d4f079..f17e63e01 100644 --- a/app/routes/debit/collections/edit.js +++ b/app/routes/debit/collections/collection/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditCollectionRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Incasso aanpassen' }; +export default class CollectionEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Incasso aanpassen' }; canAccess() { return this.abilities.can('edit debit/collections'); } - model(params) { - return this.store.findRecord('debit/collection', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/debit/collections/show.js b/app/routes/debit/collections/collection/index.js similarity index 70% rename from app/routes/debit/collections/show.js rename to app/routes/debit/collections/collection/index.js index 806efce3b..fcf368a8b 100644 --- a/app/routes/debit/collections/show.js +++ b/app/routes/debit/collections/collection/index.js @@ -1,29 +1,25 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class CollectionsIndexRoute extends AuthenticatedRoute { - get breadCrumb() { - return { title: this.controller.model.name }; - } - +export default class CollectionIndexRoute extends AuthenticatedRoute { get pageActions() { const collection = this.controller.model; return [ { - link: 'debit.collections.edit', + link: 'debit.collections.collection.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: collection, canAccess: this.abilities.can('edit debit/collections'), }, { - link: 'debit.collections.destroy', + link: 'debit.collections.collection.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: collection, canAccess: this.abilities.can('destroy debit/collections'), }, { - link: 'debit.collections.sepa', + link: 'debit.collections.collection.sepa', title: 'SEPA bestand downloaden', icon: 'download', linkArgument: collection.id, @@ -36,11 +32,8 @@ export default class CollectionsIndexRoute extends AuthenticatedRoute { return this.abilities.can('show debit/collections'); } - async model(params) { - const collection = await this.store.findRecord( - 'debit/collection', - params.id - ); + async model() { + const collection = this.modelFor('debit.collections.collection'); await collection.transactions; // todo: simplify this to just returning collection, because transactions can be gotten from the collection, right? return collection; diff --git a/app/routes/debit/collections/sepa.js b/app/routes/debit/collections/collection/sepa.js similarity index 66% rename from app/routes/debit/collections/sepa.js rename to app/routes/debit/collections/collection/sepa.js index bec3b7d58..f9a0f45a0 100644 --- a/app/routes/debit/collections/sepa.js +++ b/app/routes/debit/collections/collection/sepa.js @@ -1,32 +1,32 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -import { inject as service } from '@ember/service'; import { isInvalidResponse } from 'ember-fetch/errors'; +import { inject as service } from '@ember/service'; -export default class SepaRoute extends AuthenticatedRoute { +export default class CollectionSepaRoute extends AuthenticatedRoute { @service fetch; - @service('file-saver') fileSaver; + @service fileSaver; - breadCrumb = { title: 'Sepa downloaden' }; + breadcrumb = { title: 'SEPA downloaden' }; canAccess() { return this.abilities.can('download sepa debit/collections'); } - async model(params) { - const model = await this.store.findRecord('debit/collection', params.id); + async model() { + const model = this.modelFor('debit.collections.collection'); const response = await this.fetch.fetch( `/debit/collections/${model.id}/sepa`, { dataType: 'text' } ); if (response.ok) { - let blob = await response.blob(); + const blob = await response.blob(); this.fileSaver.saveFileAs( `${model.get('name')}.xml`, blob, 'application/xml' ); - return this.transitionTo('debit.collections.show', model.id); + return this.transitionTo('debit.collections.collection', model.id); } else if (isInvalidResponse(response)) { const json = await response.json(); return json.errors; diff --git a/app/routes/debit/collections/destroy.js b/app/routes/debit/collections/destroy.js deleted file mode 100644 index b769e1d0f..000000000 --- a/app/routes/debit/collections/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyCollectionsRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Incasso aanpassen' }; - - canAccess() { - return this.abilities.can('destroy debit/collections'); - } - - model(params) { - return this.store.findRecord('debit/collection', params.id, params); - } -} diff --git a/app/routes/debit/collections/index.js b/app/routes/debit/collections/index.js index dc619cb69..650ed28ad 100644 --- a/app/routes/debit/collections/index.js +++ b/app/routes/debit/collections/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; export default class CollectionsIndexRoute extends AuthenticatedRoute { - breadCrumb = { title: "Incasso's" }; - get pageActions() { return [ { diff --git a/app/routes/debit/collections/new.js b/app/routes/debit/collections/new.js index 03461dcdf..d1f4eac10 100644 --- a/app/routes/debit/collections/new.js +++ b/app/routes/debit/collections/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewCollectionRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Incasso aanmaken' }; +export default class CollectionsNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Incasso aanmaken' }; canAccess() { return this.abilities.can('create debit/collections'); diff --git a/app/routes/debit/mandates.js b/app/routes/debit/mandates.js new file mode 100644 index 000000000..11aab8217 --- /dev/null +++ b/app/routes/debit/mandates.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class MandatesRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Incasso mandaten' }; +} diff --git a/app/routes/debit/mandates/index.js b/app/routes/debit/mandates/index.js index 43cbc2b86..5cff4ff11 100644 --- a/app/routes/debit/mandates/index.js +++ b/app/routes/debit/mandates/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class MandatesRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Incasso mandaten' }; - +export default class MandatesIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { diff --git a/app/routes/debit/mandates/mandate.js b/app/routes/debit/mandates/mandate.js new file mode 100644 index 000000000..e1265e18a --- /dev/null +++ b/app/routes/debit/mandates/mandate.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MandateRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.id }; + } + + canAccess() { + return this.abilities.can('show debit/mandates'); + } + + model(params) { + return this.store.findRecord('debit/mandate', params.id, params); + } +} diff --git a/app/routes/debit/mandates/edit.js b/app/routes/debit/mandates/mandate/edit.js similarity index 55% rename from app/routes/debit/mandates/edit.js rename to app/routes/debit/mandates/mandate/edit.js index 6462f1067..e1e08bb76 100644 --- a/app/routes/debit/mandates/edit.js +++ b/app/routes/debit/mandates/mandate/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditMandateRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Mandaat aanpassen' }; +export default class MandateEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Mandaat aanpassen' }; canAccess() { return this.abilities.can('edit debit/mandates'); } - model(params) { - return this.store.findRecord('debit/mandate', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/debit/mandates/show.js b/app/routes/debit/mandates/mandate/index.js similarity index 57% rename from app/routes/debit/mandates/show.js rename to app/routes/debit/mandates/mandate/index.js index 3c8119f4c..e537e1591 100644 --- a/app/routes/debit/mandates/show.js +++ b/app/routes/debit/mandates/mandate/index.js @@ -1,14 +1,10 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class CollectionsIndexRoute extends AuthenticatedRoute { - get breadCrumb() { - return { title: this.controller.model.id }; - } - +export default class MandateIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { - link: 'debit.mandates.edit', + link: 'debit.mandates.mandate.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: this.controller.model, @@ -20,8 +16,4 @@ export default class CollectionsIndexRoute extends AuthenticatedRoute { canAccess() { return this.abilities.can('show debit/mandates'); } - - model(params) { - return this.store.findRecord('debit/mandate', params.id, params); - } } diff --git a/app/routes/debit/mandates/new.js b/app/routes/debit/mandates/new.js index 84332ec49..fc9d99c34 100644 --- a/app/routes/debit/mandates/new.js +++ b/app/routes/debit/mandates/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewMandateRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Mandaat aanmaken' }; +export default class MandatesNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Mandaat aanmaken' }; canAccess() { return this.abilities.can('create debit/mandates'); diff --git a/app/routes/debit/transactions.js b/app/routes/debit/transactions.js new file mode 100644 index 000000000..78ca2bfdb --- /dev/null +++ b/app/routes/debit/transactions.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class TransactionsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Transacties' }; +} diff --git a/app/routes/debit/transactions/destroy.js b/app/routes/debit/transactions/transaction.js similarity index 51% rename from app/routes/debit/transactions/destroy.js rename to app/routes/debit/transactions/transaction.js index 14e7a3a58..ed0577ac5 100644 --- a/app/routes/debit/transactions/destroy.js +++ b/app/routes/debit/transactions/transaction.js @@ -1,10 +1,10 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class DestroyTransactionRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Transactie verwijderen' }; +export default class TransactionRoute extends AuthenticatedRoute { + queryParams = {}; canAccess() { - return this.abilities.can('destroy debit/transactions'); + return this.abilities.can('show debit/transactions'); } model(params) { diff --git a/app/routes/debit/transactions/transaction/destroy.js b/app/routes/debit/transactions/transaction/destroy.js new file mode 100644 index 000000000..62f0f6798 --- /dev/null +++ b/app/routes/debit/transactions/transaction/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class TransactionDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Transactie verwijderen' }; + + canAccess() { + return this.abilities.can('destroy debit/transactions'); + } +} diff --git a/app/routes/debit/transactions/edit.js b/app/routes/debit/transactions/transaction/edit.js similarity index 55% rename from app/routes/debit/transactions/edit.js rename to app/routes/debit/transactions/transaction/edit.js index 311688dc6..86d0c6334 100644 --- a/app/routes/debit/transactions/edit.js +++ b/app/routes/debit/transactions/transaction/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditTransactionRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Transactie aanpassen' }; +export default class TransactionEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Transactie aanpassen' }; canAccess() { return this.abilities.can('edit debit/transactions'); } - model(params) { - return this.store.findRecord('debit/transaction', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/form.js b/app/routes/form.js deleted file mode 100644 index 57f1cd412..000000000 --- a/app/routes/form.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class FormRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/form/responses.js b/app/routes/form/responses.js deleted file mode 100644 index fce25c16a..000000000 --- a/app/routes/form/responses.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class FormResponseRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/form/responses/destroy.js b/app/routes/form/responses/destroy.js deleted file mode 100644 index b7580c6be..000000000 --- a/app/routes/form/responses/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyFormResponseRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Formulierantwoord verwijderen' }; - - canAccess(model) { - return this.abilities.can('destroy form/response', model); - } - - model(params) { - return this.store.findRecord('form/response', params.id, params); - } -} diff --git a/app/routes/form/responses/response.js b/app/routes/form/responses/response.js new file mode 100644 index 000000000..87208b4a7 --- /dev/null +++ b/app/routes/form/responses/response.js @@ -0,0 +1,13 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ResponseRoute extends AuthenticatedRoute { + queryParams = {}; + + canAccess() { + return this.abilities.can('show form/responses'); + } + + model(params) { + return this.store.findRecord('form/response', params.id, params); + } +} diff --git a/app/routes/form/responses/response/destroy.js b/app/routes/form/responses/response/destroy.js new file mode 100644 index 000000000..fd162754b --- /dev/null +++ b/app/routes/form/responses/response/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class ResponseDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Formulierantwoord verwijderen' }; + + canAccess(model) { + return this.abilities.can('destroy form/responses', model); + } +} diff --git a/app/routes/forum.js b/app/routes/forum.js new file mode 100644 index 000000000..5e68c11dd --- /dev/null +++ b/app/routes/forum.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class ForumRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Forum' }; +} diff --git a/app/routes/forum/categories.js b/app/routes/forum/categories.js deleted file mode 100644 index aadd45ccb..000000000 --- a/app/routes/forum/categories.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class CategoriesRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/forum/categories/category.js b/app/routes/forum/categories/category.js index 2105bc875..6dc2c7d29 100644 --- a/app/routes/forum/categories/category.js +++ b/app/routes/forum/categories/category.js @@ -3,8 +3,8 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; export default class CategoryRoute extends AuthenticatedRoute { queryParams = {}; - get breadCrumb() { - return { title: this.controller.model.name }; + get breadcrumb() { + return { title: this.controller?.model.name }; } canAccess() { diff --git a/app/routes/forum/categories/category/destroy.js b/app/routes/forum/categories/category/destroy.js index 0b54302ae..25733be26 100644 --- a/app/routes/forum/categories/category/destroy.js +++ b/app/routes/forum/categories/category/destroy.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class DestroyCategoryRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Categorie verwijderen' }; +export default class CategoryDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Categorie verwijderen' }; canAccess() { return this.abilities.can('destroy forum/categories'); } - model() { - return this.modelFor('forum.categories.category'); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/forum/categories/category/edit.js b/app/routes/forum/categories/category/edit.js index 83cac32bb..792a0a0c0 100644 --- a/app/routes/forum/categories/category/edit.js +++ b/app/routes/forum/categories/category/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditCategoryRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Categorie aanpassen' }; +export default class CategoryEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Categorie aanpassen' }; canAccess() { return this.abilities.can('edit forum/categories'); } - model() { - return this.modelFor('forum.categories.category'); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/forum/categories/category/index.js b/app/routes/forum/categories/category/index.js new file mode 100644 index 000000000..d1bbbb0fb --- /dev/null +++ b/app/routes/forum/categories/category/index.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class CategoryIndexRoute extends ApplicationRoute { + beforeModel() { + this.transitionTo('forum.categories.category.threads'); + } +} diff --git a/app/routes/forum/categories/category/show.js b/app/routes/forum/categories/category/show.js deleted file mode 100644 index 520916dce..000000000 --- a/app/routes/forum/categories/category/show.js +++ /dev/null @@ -1,7 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class ShowCategoryRoute extends AuthenticatedRoute { - beforeModel() { - this.transitionTo('forum.categories.category.threads'); - } -} diff --git a/app/routes/forum/categories/category/threads.js b/app/routes/forum/categories/category/threads.js deleted file mode 100644 index 96ab0ce36..000000000 --- a/app/routes/forum/categories/category/threads.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class ThreadsRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/forum/categories/category/threads/index.js b/app/routes/forum/categories/category/threads/index.js index ef53fc107..771b31454 100644 --- a/app/routes/forum/categories/category/threads/index.js +++ b/app/routes/forum/categories/category/threads/index.js @@ -1,8 +1,8 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; import { assign } from '@ember/polyfills'; -export default class ThreadIndexRoute extends AuthenticatedRoute { - get breadCrumb() { +export default class ThreadsIndexRoute extends AuthenticatedRoute { + get breadcrumb() { return { title: this.controller.model.name }; } diff --git a/app/routes/forum/categories/category/threads/new.js b/app/routes/forum/categories/category/threads/new.js index 4ddd41ac6..39f10eb7e 100644 --- a/app/routes/forum/categories/category/threads/new.js +++ b/app/routes/forum/categories/category/threads/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewTopicRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Topic aanmaken' }; +export default class ThreadsNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Topic aanmaken' }; canAccess() { return this.abilities.can('create forum/thread'); diff --git a/app/routes/forum/categories/category/threads/thread.js b/app/routes/forum/categories/category/threads/thread.js index a93f01537..09ac4c618 100644 --- a/app/routes/forum/categories/category/threads/thread.js +++ b/app/routes/forum/categories/category/threads/thread.js @@ -3,8 +3,8 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; export default class ThreadRoute extends AuthenticatedRoute { queryParams = {}; - get breadCrumb() { - return { title: this.controller.model.title }; + get breadcrumb() { + return { title: this.controller?.model.title }; } canAccess() { diff --git a/app/routes/forum/categories/category/threads/thread/destroy.js b/app/routes/forum/categories/category/threads/thread/destroy.js index 724faea4a..334044d7f 100644 --- a/app/routes/forum/categories/category/threads/thread/destroy.js +++ b/app/routes/forum/categories/category/threads/thread/destroy.js @@ -1,13 +1,9 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class DestroyTopicRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Topic verwijderen' }; +export default class ThreadDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Topic verwijderen' }; canAccess() { return this.abilities.can('destroy forum/threads'); } - - model() { - return this.modelFor('forum.categories.category.threads.thread'); - } } diff --git a/app/routes/forum/categories/category/threads/thread/edit.js b/app/routes/forum/categories/category/threads/thread/edit.js index 2662be6f3..5a7475a59 100644 --- a/app/routes/forum/categories/category/threads/thread/edit.js +++ b/app/routes/forum/categories/category/threads/thread/edit.js @@ -1,19 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditTopicRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Topic aanpassen' }; +export default class ThreadEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Topic aanpassen' }; canAccess() { return this.abilities.can('edit forum/threads'); } - async model() { - const thread = await this.modelFor( - 'forum.categories.category.threads.thread' - ); - return thread; - } - deactivate() { super.deactivate(); this.controller.model.rollbackAttributesAndPosts(); diff --git a/app/routes/forum/categories/category/threads/thread/index.js b/app/routes/forum/categories/category/threads/thread/index.js new file mode 100644 index 000000000..8a9c7636b --- /dev/null +++ b/app/routes/forum/categories/category/threads/thread/index.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class ThreadIndexRoute extends ApplicationRoute { + beforeModel() { + this.transitionTo('forum.categories.category.threads.thread.posts'); + } +} diff --git a/app/routes/forum/categories/category/threads/thread/posts.js b/app/routes/forum/categories/category/threads/thread/posts.js deleted file mode 100644 index de97256e9..000000000 --- a/app/routes/forum/categories/category/threads/thread/posts.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class PostsRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/forum/categories/category/threads/thread/posts/index.js b/app/routes/forum/categories/category/threads/thread/posts/index.js index 0dc902715..7a33ba396 100644 --- a/app/routes/forum/categories/category/threads/thread/posts/index.js +++ b/app/routes/forum/categories/category/threads/thread/posts/index.js @@ -1,17 +1,34 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; import { bindKeyboardShortcuts, unbindKeyboardShortcuts, } from 'ember-keyboard-shortcuts'; +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; -export default class PostIndexRoute extends AuthenticatedRoute { - @service router; +export default class PostsIndexRoute extends AuthenticatedRoute { @service fetch; + @service router; - get breadCrumb() { - return { title: this.controller.model.title }; + keyboardShortcuts = { + left: 'goToPreviousPage', + up: 'goToPreviousPage', + right: 'goToNextPage', + down: 'goToNextPage', + }; + + constructor() { + super(...arguments); + + this.router.on('routeDidChange', () => { + const thread = this.modelFor('forum.categories.category.threads.thread'); + if (thread) { + // only mark as read if we are in a thread + this.fetch.fetch(`/forum/threads/${thread.id}/mark_read`, { + method: 'POST', + }); + } + }); } get pageActions() { @@ -43,6 +60,13 @@ export default class PostIndexRoute extends AuthenticatedRoute { return model; } + resetController(controller, isExiting, transition) { + super.resetController(controller, isExiting, transition); + if (isExiting) { + controller.send('resetNewContent'); + } + } + activate() { bindKeyboardShortcuts(this); } @@ -51,13 +75,6 @@ export default class PostIndexRoute extends AuthenticatedRoute { unbindKeyboardShortcuts(this); } - keyboardShortcuts = { - left: 'goToPreviousPage', - up: 'goToPreviousPage', - right: 'goToNextPage', - down: 'goToNextPage', - }; - @action goToPreviousPage() { this.controller.send('goToPreviousPage'); @@ -67,25 +84,4 @@ export default class PostIndexRoute extends AuthenticatedRoute { goToNextPage() { this.controller.send('goToNextPage'); } - - resetController(controller, isExiting, transition) { - super.resetController(controller, isExiting, transition); - if (isExiting) { - controller.send('resetNewContent'); - } - } - - constructor() { - super(...arguments); - - this.router.on('routeDidChange', () => { - const thread = this.modelFor('forum.categories.category.threads.thread'); - if (thread) { - // only mark as read if we are in a thread - this.fetch.fetch(`/forum/threads/${thread.id}/mark_read`, { - method: 'POST', - }); - } - }); - } } diff --git a/app/routes/forum/categories/category/threads/thread/posts/destroy.js b/app/routes/forum/categories/category/threads/thread/posts/post.js similarity index 52% rename from app/routes/forum/categories/category/threads/thread/posts/destroy.js rename to app/routes/forum/categories/category/threads/thread/posts/post.js index d88a0acc2..f62e63ec7 100644 --- a/app/routes/forum/categories/category/threads/thread/posts/destroy.js +++ b/app/routes/forum/categories/category/threads/thread/posts/post.js @@ -1,10 +1,10 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class DestroyPostRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Forumbericht verwijderen' }; +export default class PostRoute extends AuthenticatedRoute { + queryParams = {}; canAccess() { - return this.abilities.can('destroy forum/posts'); + return this.abilities.can('show forum/posts'); } model(params) { diff --git a/app/routes/forum/categories/category/threads/thread/posts/post/destroy.js b/app/routes/forum/categories/category/threads/thread/posts/post/destroy.js new file mode 100644 index 000000000..93cc4c136 --- /dev/null +++ b/app/routes/forum/categories/category/threads/thread/posts/post/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class PostDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Forumbericht verwijderen' }; + + canAccess() { + return this.abilities.can('destroy forum/posts'); + } +} diff --git a/app/routes/forum/categories/category/threads/thread/posts/edit.js b/app/routes/forum/categories/category/threads/thread/posts/post/edit.js similarity index 55% rename from app/routes/forum/categories/category/threads/thread/posts/edit.js rename to app/routes/forum/categories/category/threads/thread/posts/post/edit.js index ca1b86c2d..b1a2fff3e 100644 --- a/app/routes/forum/categories/category/threads/thread/posts/edit.js +++ b/app/routes/forum/categories/category/threads/thread/posts/post/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditPostRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Forumbericht aanpassen' }; +export default class PostEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Forumbericht aanpassen' }; canAccess(model) { return this.abilities.can('edit forum/post', model); } - model(params) { - return this.store.findRecord('forum/post', params.post_id, params); - } - deactivate() { super.deactivate(); this.controller.model.rollbackAttributes(); diff --git a/app/routes/forum/categories/category/threads/thread/show.js b/app/routes/forum/categories/category/threads/thread/show.js deleted file mode 100644 index d13bb6a55..000000000 --- a/app/routes/forum/categories/category/threads/thread/show.js +++ /dev/null @@ -1,7 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class ShowThreadRoute extends AuthenticatedRoute { - beforeModel() { - this.transitionTo('forum.categories.category.threads.thread.posts'); - } -} diff --git a/app/routes/forum/categories/index.js b/app/routes/forum/categories/index.js index aa440d304..f02d278c1 100644 --- a/app/routes/forum/categories/index.js +++ b/app/routes/forum/categories/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class ForumIndexRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Forum' }; - +export default class CategoriesIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { diff --git a/app/routes/forum/categories/new.js b/app/routes/forum/categories/new.js index a23a33af1..c83b218b3 100644 --- a/app/routes/forum/categories/new.js +++ b/app/routes/forum/categories/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; export default class NewCategoryRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Categorie aanmaken' }; + breadcrumb = { title: 'Categorie aanmaken' }; canAccess() { return this.abilities.can('create forum/categories'); diff --git a/app/routes/forum/index.js b/app/routes/forum/index.js index 2cacd73ad..00051b048 100644 --- a/app/routes/forum/index.js +++ b/app/routes/forum/index.js @@ -1,10 +1,6 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class ForumIndexRoute extends AuthenticatedRoute { - canAccess() { - return this.abilities.can('show forum/categories'); - } +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +export default class ForumIndexRoute extends ApplicationRoute { beforeModel() { this.transitionTo('forum.categories'); } diff --git a/app/routes/groups.js b/app/routes/groups.js new file mode 100644 index 000000000..c4e1147b4 --- /dev/null +++ b/app/routes/groups.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class GroupsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Groepen' }; +} diff --git a/app/routes/groups/group.js b/app/routes/groups/group.js new file mode 100644 index 000000000..c1146e42a --- /dev/null +++ b/app/routes/groups/group.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class GroupRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.name }; + } + + canAccess() { + return this.abilities.can('show groups'); + } + + model(params) { + return this.store.findRecord('group', params.id, params); + } +} diff --git a/app/routes/groups/edit.js b/app/routes/groups/group/edit.js similarity index 58% rename from app/routes/groups/edit.js rename to app/routes/groups/group/edit.js index d0088d360..f942ce3af 100644 --- a/app/routes/groups/edit.js +++ b/app/routes/groups/group/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewGroupRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Groep aanpassen' }; +export default class GroupEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Groep aanpassen' }; canAccess(model) { return this.abilities.can('edit group', model); } - model(params) { - return this.store.findRecord('group', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributesAndMemberships(); diff --git a/app/routes/groups/export.js b/app/routes/groups/group/export.js similarity index 57% rename from app/routes/groups/export.js rename to app/routes/groups/group/export.js index f2e5d8354..9293d97a4 100644 --- a/app/routes/groups/export.js +++ b/app/routes/groups/group/export.js @@ -1,15 +1,11 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class ExportGroupRoute extends AuthenticatedRoute { - get breadCrumb() { +export default class GroupExportRoute extends AuthenticatedRoute { + get breadcrumb() { return { title: `${this.controller.model.name} exporteren` }; } canAccess(model) { return this.abilities.can('export group', model); } - - model(params) { - return this.store.findRecord('group', params.id, params); - } } diff --git a/app/routes/groups/show.js b/app/routes/groups/group/index.js similarity index 74% rename from app/routes/groups/show.js rename to app/routes/groups/group/index.js index 7b0611ecd..7b1631f96 100644 --- a/app/routes/groups/show.js +++ b/app/routes/groups/group/index.js @@ -1,23 +1,19 @@ -import { all } from 'rsvp'; import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; +import { all } from 'rsvp'; -export default class ShowGroupRoute extends AuthenticatedRoute { - get breadCrumb() { - return { title: this.controller.model.name }; - } - +export default class GroupIndexRoute extends AuthenticatedRoute { get pageActions() { const group = this.controller.model; return [ { - link: 'groups.edit', + link: 'groups.group.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: group, canAccess: this.abilities.can('edit group', group), }, { - link: 'groups.export', + link: 'groups.group.export', title: 'Gebruikers exporteren', icon: 'download', linkArgument: group, @@ -30,10 +26,6 @@ export default class ShowGroupRoute extends AuthenticatedRoute { return this.abilities.can('show groups'); } - model(params) { - return this.store.findRecord('group', params.id, params); - } - afterModel(group) { // This ensures all memberships and users are loaded if (this.abilities.can('show memberships')) { diff --git a/app/routes/groups/index.js b/app/routes/groups/index.js index dfec544e8..7929a351e 100644 --- a/app/routes/groups/index.js +++ b/app/routes/groups/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class GroupIndexRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Groepen' }; - +export default class GroupsIndexRoute extends AuthenticatedRoute { queryParams = { search: { refreshModel: true, diff --git a/app/routes/groups/new.js b/app/routes/groups/new.js index 005ff0627..509aaed8f 100644 --- a/app/routes/groups/new.js +++ b/app/routes/groups/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewGroupRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Groep aanmaken' }; +export default class GroupsNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Groep aanmaken' }; canAccess() { return this.abilities.can('create groups'); diff --git a/app/routes/index.js b/app/routes/index.js index 3485af863..89ad3f030 100644 --- a/app/routes/index.js +++ b/app/routes/index.js @@ -12,10 +12,6 @@ export default class IndexRoute extends ApplicationRoute { ]; } - canAccess() { - return true; - } - model(params) { params.sort = '-pinned,-created_at'; return this.store.queryPaged('article', params); diff --git a/app/routes/mail-aliases.js b/app/routes/mail-aliases.js new file mode 100644 index 000000000..9158d5a2c --- /dev/null +++ b/app/routes/mail-aliases.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class MailAliasesRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Mail aliassen' }; +} diff --git a/app/routes/mail-aliases/destroy.js b/app/routes/mail-aliases/destroy.js deleted file mode 100644 index 7c9141e9f..000000000 --- a/app/routes/mail-aliases/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyMailAliasRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Mail-alias verwijderen' }; - - canAccess() { - return this.abilities.can('destroy mail-aliases'); - } - - model(params) { - return this.store.findRecord('mail-aliases', params.id, params); - } -} diff --git a/app/routes/mail-aliases/index.js b/app/routes/mail-aliases/index.js index 4bfb8679d..c43e2e6ff 100644 --- a/app/routes/mail-aliases/index.js +++ b/app/routes/mail-aliases/index.js @@ -1,15 +1,11 @@ -import { ApplicationRoute } from 'amber-ui/routes/application/application'; -import { inject as service } from '@ember/service'; - -export default class MailAliasIndexRoute extends ApplicationRoute { - @service intl; - breadCrumb = { title: 'Mail-aliassen' }; +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; +export default class MailAliasesIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { link: 'mail-aliases.new', - title: 'Nieuw mailalias', + title: 'Nieuw mail alias', icon: 'plus', canAccess: this.abilities.can('create mail-aliases'), }, diff --git a/app/routes/mail-aliases/mail-alias.js b/app/routes/mail-aliases/mail-alias.js new file mode 100644 index 000000000..d1508e893 --- /dev/null +++ b/app/routes/mail-aliases/mail-alias.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MailAliasRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.email }; + } + + canAccess() { + return this.abilities.can('show mail-aliases'); + } + + model(params) { + return this.store.findRecord('mail-alias', params.id, params); + } +} diff --git a/app/routes/mail-aliases/mail-alias/destroy.js b/app/routes/mail-aliases/mail-alias/destroy.js new file mode 100644 index 000000000..0a6f8c9c4 --- /dev/null +++ b/app/routes/mail-aliases/mail-alias/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MailAliasDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Mail alias verwijderen' }; + + canAccess() { + return this.abilities.can('destroy mail-aliases'); + } +} diff --git a/app/routes/mail-aliases/edit.js b/app/routes/mail-aliases/mail-alias/edit.js similarity index 56% rename from app/routes/mail-aliases/edit.js rename to app/routes/mail-aliases/mail-alias/edit.js index 6364ab773..2aeb6ac44 100644 --- a/app/routes/mail-aliases/edit.js +++ b/app/routes/mail-aliases/mail-alias/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditMailAliasRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Mail-alias aanpassen' }; +export default class MailAliasEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Mail alias aanpassen' }; canAccess(model) { return this.abilities.can('edit mail-alias', model); } - model(params) { - return this.store.findRecord('mail-alias', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/mail-aliases/show.js b/app/routes/mail-aliases/mail-alias/index.js similarity index 64% rename from app/routes/mail-aliases/show.js rename to app/routes/mail-aliases/mail-alias/index.js index c53051945..a7c5df11a 100644 --- a/app/routes/mail-aliases/show.js +++ b/app/routes/mail-aliases/mail-alias/index.js @@ -1,22 +1,18 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class ShowMailAliasRoute extends AuthenticatedRoute { - get breadCrumb() { - return { title: this.controller.model.email }; - } - +export default class MailAliasIndexRoute extends AuthenticatedRoute { get pageActions() { const mailAlias = this.controller.model; return [ { - link: 'mail-aliases.edit', + link: 'mail-aliases.mail-alias.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: mailAlias, canAccess: this.abilities.can('edit mail-aliases'), }, { - link: 'mail-aliases.destroy', + link: 'mail-aliases.mail-alias.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: mailAlias, @@ -28,8 +24,4 @@ export default class ShowMailAliasRoute extends AuthenticatedRoute { canAccess() { return this.abilities.can('show mail-aliases'); } - - model(params) { - return this.store.findRecord('mail-alias', params.id, params); - } } diff --git a/app/routes/mail-aliases/new.js b/app/routes/mail-aliases/new.js index 51e772c01..8c8986979 100644 --- a/app/routes/mail-aliases/new.js +++ b/app/routes/mail-aliases/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewMailAliasRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Mail-alias aanmaken' }; +export default class MailAliasesNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Mail alias aanmaken' }; canAccess() { return this.abilities.can('create mail-aliases'); diff --git a/app/routes/mail-moderations.js b/app/routes/mail-moderations.js new file mode 100644 index 000000000..820140741 --- /dev/null +++ b/app/routes/mail-moderations.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class MailModerationsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Mail moderatie' }; +} diff --git a/app/routes/mail-moderations/accept.js b/app/routes/mail-moderations/accept.js deleted file mode 100644 index e58f57008..000000000 --- a/app/routes/mail-moderations/accept.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class AcceptModerationRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Moderatieverzoek goedkeuren' }; - - canAccess() { - return this.abilities.can('accept mail-moderations'); - } - - model(params) { - return this.store.findRecord('stored-mail', params.id, params); - } -} diff --git a/app/routes/mail-moderations/destroy.js b/app/routes/mail-moderations/destroy.js deleted file mode 100644 index 9b572fcd2..000000000 --- a/app/routes/mail-moderations/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyModerationRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Moderatieverzoek negeren' }; - - canAccess() { - return this.abilities.can('destroy mail-moderations'); - } - - model(params) { - return this.store.findRecord('stored-mail', params.id, params); - } -} diff --git a/app/routes/mail-moderations/index.js b/app/routes/mail-moderations/index.js index 44fc81474..606d5a41c 100644 --- a/app/routes/mail-moderations/index.js +++ b/app/routes/mail-moderations/index.js @@ -1,8 +1,6 @@ -import { ApplicationRoute } from 'amber-ui/routes/application/application'; - -export default class ModerationIndexRoute extends ApplicationRoute { - breadCrumb = { title: 'Mailmoderatie' }; +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; +export default class MailModerationsIndexRoute extends AuthenticatedRoute { canAccess() { return this.abilities.can('show mail-moderations'); } diff --git a/app/routes/mail-moderations/mail-moderation.js b/app/routes/mail-moderations/mail-moderation.js new file mode 100644 index 000000000..fc7284bc7 --- /dev/null +++ b/app/routes/mail-moderations/mail-moderation.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MailModerationRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.subject }; + } + + canAccess() { + return this.abilities.can('show mail-moderations'); + } + + model(params) { + return this.store.findRecord('stored-mail', params.id, params); + } +} diff --git a/app/routes/mail-moderations/mail-moderation/accept.js b/app/routes/mail-moderations/mail-moderation/accept.js new file mode 100644 index 000000000..cfc6c3b13 --- /dev/null +++ b/app/routes/mail-moderations/mail-moderation/accept.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MailModerationAcceptRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Moderatieverzoek goedkeuren' }; + + canAccess() { + return this.abilities.can('accept mail-moderations'); + } +} diff --git a/app/routes/mail-moderations/mail-moderation/destroy.js b/app/routes/mail-moderations/mail-moderation/destroy.js new file mode 100644 index 000000000..71b75f66e --- /dev/null +++ b/app/routes/mail-moderations/mail-moderation/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MailModerationDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Moderatieverzoek negeren' }; + + canAccess() { + return this.abilities.can('destroy mail-moderations'); + } +} diff --git a/app/routes/mail-moderations/show.js b/app/routes/mail-moderations/mail-moderation/index.js similarity index 67% rename from app/routes/mail-moderations/show.js rename to app/routes/mail-moderations/mail-moderation/index.js index 156d65be3..d95e9d1ff 100644 --- a/app/routes/mail-moderations/show.js +++ b/app/routes/mail-moderations/mail-moderation/index.js @@ -1,28 +1,24 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class ShowModerationRoute extends AuthenticatedRoute { - get breadCrumb() { - return { title: this.controller.model.subject }; - } - +export default class MailModerationIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { - link: 'mail-moderations.accept', + link: 'mail-moderations.mail-moderation.accept', title: 'Goedkeuren', icon: 'check', linkArgument: this.controller.model, canAccess: this.abilities.can('accept mail-moderations'), }, { - link: 'mail-moderations.reject', + link: 'mail-moderations.mail-moderation.reject', title: 'Afkeuren', icon: 'circle-minus', linkArgument: this.controller.model, canAccess: this.abilities.can('reject mail-moderations'), }, { - link: 'mail-moderations.destroy', + link: 'mail-moderations.mail-moderation.destroy', title: 'Negeren', icon: 'trash', linkArgument: this.controller.model, @@ -34,8 +30,4 @@ export default class ShowModerationRoute extends AuthenticatedRoute { canAccess() { return this.abilities.can('show mail-moderations'); } - - model(params) { - return this.store.findRecord('stored-mail', params.id, params); - } } diff --git a/app/routes/mail-moderations/mail-moderation/reject.js b/app/routes/mail-moderations/mail-moderation/reject.js new file mode 100644 index 000000000..64117011b --- /dev/null +++ b/app/routes/mail-moderations/mail-moderation/reject.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class MailModerationRejectRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Moderatieverzoek afwijzen' }; + + canAccess() { + return this.abilities.can('reject mail-moderations'); + } +} diff --git a/app/routes/mail-moderations/reject.js b/app/routes/mail-moderations/reject.js deleted file mode 100644 index ccc7af73f..000000000 --- a/app/routes/mail-moderations/reject.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class RejectModerationRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Moderatieverzoek afwijzen' }; - - canAccess() { - return this.abilities.can('reject mail-moderations'); - } - - model(params) { - return this.store.findRecord('stored-mail', params.id, params); - } -} diff --git a/app/routes/oauth/authorize.js b/app/routes/oauth/authorize.js index 4ed1435df..daf737e18 100644 --- a/app/routes/oauth/authorize.js +++ b/app/routes/oauth/authorize.js @@ -6,10 +6,6 @@ export default class OauthAuthorizeRoute extends AuthenticatedRoute { @service router; @service session; - canAccess() { - return this.session.isAuthenticated; - } - constructor() { super(...arguments); @@ -41,4 +37,8 @@ export default class OauthAuthorizeRoute extends AuthenticatedRoute { }); }); } + + canAccess() { + return this.session.isAuthenticated; + } } diff --git a/app/routes/photo-albums.js b/app/routes/photo-albums.js index 11063579c..452b3fde7 100644 --- a/app/routes/photo-albums.js +++ b/app/routes/photo-albums.js @@ -1,5 +1,15 @@ -import Route from '@ember/routing/route'; +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +import { capitalize } from '@ember/string'; +import { inject as service } from '@ember/service'; -export default class PhotoAlbumsRoute extends Route { - breadCrumb = null; +export default class PhotoAlbumsRoute extends ApplicationRoute { + @service intl; + + queryParams = {}; + + get breadcrumb() { + return { + title: capitalize(this.intl.t('model.photoAlbum.name.other').toString()), + }; + } } diff --git a/app/routes/photo-albums/index.js b/app/routes/photo-albums/index.js index e882c9a8e..90c544940 100644 --- a/app/routes/photo-albums/index.js +++ b/app/routes/photo-albums/index.js @@ -1,37 +1,23 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -import { capitalize } from '@ember/string'; -import { inject as service } from '@ember/service'; - -export default class ArticlesIndexRoute extends ApplicationRoute { - @service intl; - - get breadCrumb() { - return { - title: capitalize(this.intl.t('model.photoAlbum.name.other').toString()), - }; - } +export default class PhotoAlbumsIndexRoute extends ApplicationRoute { get pageActions() { return [ { - link: 'photo-comments.index', - title: 'Bekijk fotoreacties', + link: 'photo-comments', + title: 'Bekijk foto reacties', icon: 'comments', canAccess: this.abilities.can('show photo-comments'), }, { link: 'photo-albums.new', - title: 'Nieuw foto-album', + title: 'Nieuw fotoalbum', icon: 'plus', canAccess: this.abilities.can('create photo-albums'), }, ]; } - canAccess() { - return this.abilities.can('show photo-albums'); - } - model(params) { return this.store.queryPaged('photo-album', params); } diff --git a/app/routes/photo-albums/new.js b/app/routes/photo-albums/new.js index 22ae62e24..e4de6b049 100644 --- a/app/routes/photo-albums/new.js +++ b/app/routes/photo-albums/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewPhotoAlbumRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Foto album aanmaken' }; +export default class PhotoAlbumsNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Fotoalbum aanmaken' }; canAccess() { return this.abilities.can('create photo-album'); diff --git a/app/routes/photo-albums/photo-album.js b/app/routes/photo-albums/photo-album.js index 49eb2c85e..fb8dd28fa 100644 --- a/app/routes/photo-albums/photo-album.js +++ b/app/routes/photo-albums/photo-album.js @@ -1,32 +1,29 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -export default class PhotoAlbumSubRoute extends ApplicationRoute { +export default class PhotoAlbumRoute extends ApplicationRoute { queryParams = {}; - get breadCrumb() { - return { title: this.controller.model.title }; + + get breadcrumb() { + return { title: this.controller?.model.title }; } get pageActions() { return [ { - link: 'photo-comments.index', - title: 'Bekijk fotoreacties', + link: 'photo-comments', + title: 'Bekijk foto reacties', icon: 'comments', canAccess: this.abilities.can('show photo-comments'), }, { link: 'photo-albums.new', - title: 'Nieuw foto-album', + title: 'Nieuw fotoalbum', icon: 'plus', canAccess: this.abilities.can('create photo-albums'), }, ]; } - canAccess() { - return this.abilities.can('show photo-albums'); - } - model(params) { return this.store.findRecord('photo-album', params.photo_album_id, params); } diff --git a/app/routes/photo-albums/photo-album/destroy.js b/app/routes/photo-albums/photo-album/destroy.js index 20437d1a6..d9363158d 100644 --- a/app/routes/photo-albums/photo-album/destroy.js +++ b/app/routes/photo-albums/photo-album/destroy.js @@ -1,13 +1,9 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class DestroyArticleRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Foto album verwijderen' }; +export default class PhotoAlbumDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Fotoalbum verwijderen' }; canAccess() { return this.abilities.can('destroy photo-albums'); } - - model() { - return this.modelFor('photo-albums.photo-album'); - } } diff --git a/app/routes/photo-albums/photo-album/edit.js b/app/routes/photo-albums/photo-album/edit.js index 65170cb29..49f52e96b 100644 --- a/app/routes/photo-albums/photo-album/edit.js +++ b/app/routes/photo-albums/photo-album/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditPhotoAlbumRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Foto album aanpassen' }; +export default class PhotoAlbumEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Fotoalbum aanpassen' }; canAccess(model) { return this.abilities.can('edit photo-albums', model); } - model() { - return this.modelFor('photo-albums.photo-album'); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/photo-albums/photo-album/show.js b/app/routes/photo-albums/photo-album/index.js similarity index 53% rename from app/routes/photo-albums/photo-album/show.js rename to app/routes/photo-albums/photo-album/index.js index 75353952f..b7d6c2751 100644 --- a/app/routes/photo-albums/photo-album/show.js +++ b/app/routes/photo-albums/photo-album/index.js @@ -1,10 +1,6 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -export default class ShowPhotoAlbumRoute extends ApplicationRoute { - canAccess() { - return this.abilities.can('show photo-albums'); - } - +export default class PhotoAlbumIndexRoute extends ApplicationRoute { beforeModel() { this.transitionTo('photo-albums.photo-album.photos'); } diff --git a/app/routes/photo-albums/photo-album/photos.js b/app/routes/photo-albums/photo-album/photos.js deleted file mode 100644 index 48eaa53f0..000000000 --- a/app/routes/photo-albums/photo-album/photos.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class PhotosRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/photo-albums/photo-album/photos/destroy.js b/app/routes/photo-albums/photo-album/photos/destroy.js deleted file mode 100644 index 7d54abcd5..000000000 --- a/app/routes/photo-albums/photo-album/photos/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyArticleRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Foto verwijderen' }; - - canAccess() { - return this.abilities.can('destroy photos'); - } - - model(params) { - return this.store.findRecord('photo', params.photo_id, params); - } -} diff --git a/app/routes/photo-albums/photo-album/photos/index.js b/app/routes/photo-albums/photo-album/photos/index.js index 4358784f6..a21e43f49 100644 --- a/app/routes/photo-albums/photo-album/photos/index.js +++ b/app/routes/photo-albums/photo-album/photos/index.js @@ -1,10 +1,6 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; export default class PhotosIndexRoute extends ApplicationRoute { - get breadCrumb() { - return { title: this.controller.model.title }; - } - get pageActions() { const photoAlbum = this.controller.model; return [ @@ -24,12 +20,4 @@ export default class PhotosIndexRoute extends ApplicationRoute { }, ]; } - - canAccess() { - return this.abilities.can('show photo-albums'); - } - - model() { - return this.modelFor('photo-albums.photo-album'); - } } diff --git a/app/routes/photo-albums/photo-album/photos/photo.js b/app/routes/photo-albums/photo-album/photos/photo.js new file mode 100644 index 000000000..6d11d1f19 --- /dev/null +++ b/app/routes/photo-albums/photo-album/photos/photo.js @@ -0,0 +1,9 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class PhotoRoute extends ApplicationRoute { + queryParams = {}; + + model(params) { + return this.store.findRecord('photo', params.photo_id, params); + } +} diff --git a/app/routes/photo-albums/photo-album/photos/photo/destroy.js b/app/routes/photo-albums/photo-album/photos/photo/destroy.js new file mode 100644 index 000000000..0a3fa6799 --- /dev/null +++ b/app/routes/photo-albums/photo-album/photos/photo/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class PhotoDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Foto verwijderen' }; + + canAccess() { + return this.abilities.can('destroy photos'); + } +} diff --git a/app/routes/photo-albums/photo-album/photos/show.js b/app/routes/photo-albums/photo-album/photos/photo/index.js similarity index 80% rename from app/routes/photo-albums/photo-album/photos/show.js rename to app/routes/photo-albums/photo-album/photos/photo/index.js index 90842d78f..86a7ab5f4 100644 --- a/app/routes/photo-albums/photo-album/photos/show.js +++ b/app/routes/photo-albums/photo-album/photos/photo/index.js @@ -1,15 +1,22 @@ -import { ApplicationRoute } from 'amber-ui/routes/application/application'; -import { inject as service } from '@ember/service'; -import { action } from '@ember/object'; import { bindKeyboardShortcuts, unbindKeyboardShortcuts, } from 'ember-keyboard-shortcuts'; +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +import { action } from '@ember/object'; +import { inject as service } from '@ember/service'; -export default class ShowPhotosRoute extends ApplicationRoute { +export default class PhotoIndexRoute extends ApplicationRoute { @service intl; - get breadCrumb() { + keyboardShortcuts = { + left: 'goToPreviousPhoto', + up: 'goToPreviousPhoto', + right: 'goToNextPhoto', + down: 'goToNextPhoto', + }; + + get breadcrumb() { const photo = this.controller.model; const allAlbumPhotos = this.controller.model.photoAlbum.get('sortedPhotos'); const photoAlbumPhotosLength = allAlbumPhotos.get('length'); @@ -21,7 +28,7 @@ export default class ShowPhotosRoute extends ApplicationRoute { get pageActions() { return [ { - link: 'photo-albums.photo-album.photos.destroy', + link: 'photo-albums.photo-album.photos.photo.destroy', linkArgument: this.controller.model, title: 'Foto verwijderen', icon: 'trash', @@ -30,12 +37,14 @@ export default class ShowPhotosRoute extends ApplicationRoute { ]; } - canAccess() { - return this.abilities.can('show photo-albums'); + @action + goToPreviousPhoto() { + this.controller.send('goToPreviousPhoto'); } - model(params) { - return this.store.findRecord('photo', params.photo_id, params); + @action + goToNextPhoto() { + this.controller.send('goToNextPhoto'); } activate() { @@ -45,21 +54,4 @@ export default class ShowPhotosRoute extends ApplicationRoute { deactivate() { unbindKeyboardShortcuts(this); } - - keyboardShortcuts = { - left: 'goToPreviousPhoto', - up: 'goToPreviousPhoto', - right: 'goToNextPhoto', - down: 'goToNextPhoto', - }; - - @action - goToPreviousPhoto() { - this.controller.send('goToPreviousPhoto'); - } - - @action - goToNextPhoto() { - this.controller.send('goToNextPhoto'); - } } diff --git a/app/routes/photo-comments.js b/app/routes/photo-comments.js new file mode 100644 index 000000000..86c121e87 --- /dev/null +++ b/app/routes/photo-comments.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class PhotoCommentsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Foto reacties' }; +} diff --git a/app/routes/photo-comments/index.js b/app/routes/photo-comments/index.js index 54a98b0cd..e40c823aa 100644 --- a/app/routes/photo-comments/index.js +++ b/app/routes/photo-comments/index.js @@ -1,8 +1,6 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; export default class PhotoCommentsIndexRoute extends ApplicationRoute { - breadCrumb = { title: 'Fotoreacties' }; - canAccess() { return this.abilities.can('show photo-comments'); } diff --git a/app/routes/photo-comments/destroy.js b/app/routes/photo-comments/photo-comment.js similarity index 52% rename from app/routes/photo-comments/destroy.js rename to app/routes/photo-comments/photo-comment.js index 16913b218..f6f3f8cb1 100644 --- a/app/routes/photo-comments/destroy.js +++ b/app/routes/photo-comments/photo-comment.js @@ -1,10 +1,10 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class DestroyArticleRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Fotoreactie verwijderen' }; +export default class PhotoCommentRoute extends AuthenticatedRoute { + queryParams = {}; canAccess() { - return this.abilities.can('destroy photo-comments'); + return this.abilities.can('show photo-comments'); } model(params) { diff --git a/app/routes/photo-comments/photo-comment/destroy.js b/app/routes/photo-comments/photo-comment/destroy.js new file mode 100644 index 000000000..b0499d71b --- /dev/null +++ b/app/routes/photo-comments/photo-comment/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class PhotoCommentDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Foto reactie verwijderen' }; + + canAccess() { + return this.abilities.can('destroy photo-comments'); + } +} diff --git a/app/routes/polls.js b/app/routes/polls.js new file mode 100644 index 000000000..2786f429d --- /dev/null +++ b/app/routes/polls.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class PollsRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Polls' }; +} diff --git a/app/routes/polls/destroy.js b/app/routes/polls/destroy.js deleted file mode 100644 index b2841ab66..000000000 --- a/app/routes/polls/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyPollRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Poll verwijderen' }; - - canAccess() { - return this.abilities.can('destroy polls'); - } - - model(params) { - return this.store.findRecord('poll', params.id, params); - } -} diff --git a/app/routes/polls/index.js b/app/routes/polls/index.js index a7c97c2e5..e33d7f9a3 100644 --- a/app/routes/polls/index.js +++ b/app/routes/polls/index.js @@ -1,8 +1,6 @@ -import { ApplicationRoute } from 'amber-ui/routes/application/application'; - -export default class MailAliasIndexRoute extends ApplicationRoute { - breadCrumb = { title: 'Polls' }; +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; +export default class PollsIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { diff --git a/app/routes/polls/new.js b/app/routes/polls/new.js index 5e39423ab..1317b3b80 100644 --- a/app/routes/polls/new.js +++ b/app/routes/polls/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewPollRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Poll aanmaken' }; +export default class PollsNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Poll aanmaken' }; canAccess() { return this.abilities.can('create polls'); diff --git a/app/routes/polls/poll.js b/app/routes/polls/poll.js new file mode 100644 index 000000000..0bddc43ad --- /dev/null +++ b/app/routes/polls/poll.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class PollRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.question.question }; + } + + canAccess() { + return this.abilities.can('show polls'); + } + + model(params) { + return this.store.findRecord('poll', params.id, params); + } +} diff --git a/app/routes/polls/poll/destroy.js b/app/routes/polls/poll/destroy.js new file mode 100644 index 000000000..b9c5912dd --- /dev/null +++ b/app/routes/polls/poll/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class PollDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Poll verwijderen' }; + + canAccess() { + return this.abilities.can('destroy polls'); + } +} diff --git a/app/routes/polls/edit.js b/app/routes/polls/poll/edit.js similarity index 56% rename from app/routes/polls/edit.js rename to app/routes/polls/poll/edit.js index 69344befb..62d5acb27 100644 --- a/app/routes/polls/edit.js +++ b/app/routes/polls/poll/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditMailAliasRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Poll aanpassen' }; +export default class PollEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Poll aanpassen' }; canAccess(model) { return this.abilities.can('edit poll', model); } - model(params) { - return this.store.findRecord('poll', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/polls/show.js b/app/routes/polls/poll/index.js similarity index 77% rename from app/routes/polls/show.js rename to app/routes/polls/poll/index.js index 54906dd31..623c97358 100644 --- a/app/routes/polls/show.js +++ b/app/routes/polls/poll/index.js @@ -1,9 +1,9 @@ -import { hash } from 'rsvp'; -import { inject as service } from '@ember/service'; import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; import FormLoadOrCreateUtil from 'amber-ui/utils/form-load-or-create'; +import { hash } from 'rsvp'; +import { inject as service } from '@ember/service'; -export default class ShowPollsRoute extends AuthenticatedRoute { +export default class PollIndexRoute extends AuthenticatedRoute { @service store; constructor() { @@ -11,22 +11,18 @@ export default class ShowPollsRoute extends AuthenticatedRoute { this.formLoadOrCreateUtil = new FormLoadOrCreateUtil(this); } - get breadCrumb() { - return { title: this.controller.model.poll.question.question }; - } - get pageActions() { const { poll } = this.controller.model; return [ { - link: 'polls.edit', + link: 'polls.poll.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: poll, canAccess: this.abilities.can('edit poll', poll), }, { - link: 'polls.destroy', + link: 'polls.poll.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: poll, @@ -39,9 +35,9 @@ export default class ShowPollsRoute extends AuthenticatedRoute { return this.abilities.can('show polls'); } - model(params) { - const pollPromise = this.store.findRecord('poll', params.id, params); - const formPromise = pollPromise.then((poll) => poll.get('form')); + model() { + const poll = this.modelFor('polls.poll'); + const formPromise = poll.form; const responsePromise = formPromise // Load or create the response .then((form) => @@ -57,7 +53,7 @@ export default class ShowPollsRoute extends AuthenticatedRoute { ); return hash({ - poll: pollPromise, + poll, form: formPromise, currentUserResponse: responsePromise, }); diff --git a/app/routes/profile.js b/app/routes/profile.js new file mode 100644 index 000000000..0a9b32370 --- /dev/null +++ b/app/routes/profile.js @@ -0,0 +1,14 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; +import { inject as service } from '@ember/service'; + +export default class ProfileRoute extends AuthenticatedRoute { + @service router; + + canAccess() { + return this.abilities.can('show own users'); + } + + redirect() { + this.router.transitionTo('users.user', this.session.currentUser.id); + } +} diff --git a/app/routes/quickpost.js b/app/routes/quickpost.js index 5767ea5e1..170104311 100644 --- a/app/routes/quickpost.js +++ b/app/routes/quickpost.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; export default class QuickpostRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Quickpost' }; + breadcrumb = { title: 'Quickpost' }; canAccess() { return this.abilities.can('show quickpost-messages'); diff --git a/app/routes/sog/index.js b/app/routes/sog/index.js index e9ebd3b76..6e9f15827 100644 --- a/app/routes/sog/index.js +++ b/app/routes/sog/index.js @@ -1,7 +1,7 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; export default class SogIndexRoute extends ApplicationRoute { - breadCrumb = { title: 'SOG' }; + breadcrumb = { title: 'SOG' }; canAccess() { return this.abilities.can('show sog'); diff --git a/app/routes/sog/name-trainer.js b/app/routes/sog/name-trainer.js index 3ca2f3db9..46f4a351e 100644 --- a/app/routes/sog/name-trainer.js +++ b/app/routes/sog/name-trainer.js @@ -1,7 +1,7 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; export default class SogIndexRoute extends ApplicationRoute { - breadCrumb = { title: 'Namen leren' }; + breadcrumb = { title: 'Namen leren' }; canAccess() { return this.abilities.can('show sog/name-trainer'); diff --git a/app/routes/static-pages.js b/app/routes/static-pages.js new file mode 100644 index 000000000..6fe99a940 --- /dev/null +++ b/app/routes/static-pages.js @@ -0,0 +1,15 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; +import { capitalize } from '@ember/string'; +import { inject as service } from '@ember/service'; + +export default class StaticPagesRoute extends ApplicationRoute { + @service intl; + + queryParams = {}; + + get breadcrumb() { + return { + title: capitalize(this.intl.t('model.staticPage.name.other').toString()), + }; + } +} diff --git a/app/routes/static-pages/destroy.js b/app/routes/static-pages/destroy.js deleted file mode 100644 index 6ac0c3ad0..000000000 --- a/app/routes/static-pages/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyStaticPageRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Informatie pagina verwijderen' }; - - canAccess() { - return this.abilities.can('destroy static-pages'); - } - - model(params) { - return this.store.findRecord('static-page', params.id, params); - } -} diff --git a/app/routes/static-pages/index.js b/app/routes/static-pages/index.js index 2dc91126a..46530fe6c 100644 --- a/app/routes/static-pages/index.js +++ b/app/routes/static-pages/index.js @@ -1,16 +1,6 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -import { inject as service } from '@ember/service'; -import { capitalize } from '@ember/string'; export default class StaticPagesIndexRoute extends ApplicationRoute { - @service intl; - - get breadCrumb() { - return { - title: capitalize(this.intl.t('model.staticPage.name.other').toString()), - }; - } - get pageActions() { return [ { @@ -22,10 +12,6 @@ export default class StaticPagesIndexRoute extends ApplicationRoute { ]; } - canAccess() { - return this.abilities.can('show static-pages'); - } - model(params) { return this.store.query('static-page', params); } diff --git a/app/routes/static-pages/new.js b/app/routes/static-pages/new.js index 94522722e..7ea4942fe 100644 --- a/app/routes/static-pages/new.js +++ b/app/routes/static-pages/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewStaticPageRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Informatie pagina aanmaken' }; +export default class StaticPagesNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Infopagina aanmaken' }; canAccess() { return this.abilities.can('create static-pages'); diff --git a/app/routes/static-pages/static-page.js b/app/routes/static-pages/static-page.js new file mode 100644 index 000000000..ea9e5afee --- /dev/null +++ b/app/routes/static-pages/static-page.js @@ -0,0 +1,13 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class StaticPageRoute extends ApplicationRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.title }; + } + + model(params) { + return this.store.findRecord('static-page', params.id, params); + } +} diff --git a/app/routes/static-pages/static-page/destroy.js b/app/routes/static-pages/static-page/destroy.js new file mode 100644 index 000000000..71a6fc099 --- /dev/null +++ b/app/routes/static-pages/static-page/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class StaticPageDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Infopagina verwijderen' }; + + canAccess() { + return this.abilities.can('destroy static-pages'); + } +} diff --git a/app/routes/static-pages/edit.js b/app/routes/static-pages/static-page/edit.js similarity index 54% rename from app/routes/static-pages/edit.js rename to app/routes/static-pages/static-page/edit.js index 0070ab635..043c438cd 100644 --- a/app/routes/static-pages/edit.js +++ b/app/routes/static-pages/static-page/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditStaticPageRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Informatie pagina aanpassen' }; +export default class StaticPageEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Infopagina aanpassen' }; canAccess() { return this.abilities.can('edit static-pages'); } - model(params) { - return this.store.findRecord('static-page', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/static-pages/show.js b/app/routes/static-pages/static-page/index.js similarity index 55% rename from app/routes/static-pages/show.js rename to app/routes/static-pages/static-page/index.js index ccb7c7a4a..ed88bb172 100644 --- a/app/routes/static-pages/show.js +++ b/app/routes/static-pages/static-page/index.js @@ -1,21 +1,17 @@ import { ApplicationRoute } from 'amber-ui/routes/application/application'; -export default class ShowStaticPagesRoute extends ApplicationRoute { - get breadCrumb() { - return { title: this.controller.model.title }; - } - +export default class StaticPageIndexRoute extends ApplicationRoute { get pageActions() { return [ { - link: 'static-pages.edit', + link: 'static-pages.static-page.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: this.controller.model, canAccess: this.abilities.can('edit static-pages'), }, { - link: 'static-pages.destroy', + link: 'static-pages.static-page.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: this.controller.model, @@ -23,12 +19,4 @@ export default class ShowStaticPagesRoute extends ApplicationRoute { }, ]; } - - canAccess() { - return this.abilities.can('show static-pages'); - } - - model(params) { - return this.store.findRecord('static-page', params.id, params); - } } diff --git a/app/routes/users.js b/app/routes/users.js new file mode 100644 index 000000000..9142de30d --- /dev/null +++ b/app/routes/users.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class UsersRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Gebruikers' }; +} diff --git a/app/routes/users/activate-account.js b/app/routes/users/activate-account.js index 3e6b5e7da..0b5f9cc19 100644 --- a/app/routes/users/activate-account.js +++ b/app/routes/users/activate-account.js @@ -1,3 +1,5 @@ -import Route from '@ember/routing/route'; +import ApplicationRoute from 'amber-ui/routes/application/application'; -export default Route; +export default class ActivateAccountRoute extends ApplicationRoute { + breadcrumb = { title: 'Account activeren' }; +} diff --git a/app/routes/users/batch.js b/app/routes/users/batch.js deleted file mode 100644 index 2e59471b6..000000000 --- a/app/routes/users/batch.js +++ /dev/null @@ -1,5 +0,0 @@ -import Route from '@ember/routing/route'; - -export default class BatchRoute extends Route { - breadCrumb = null; -} diff --git a/app/routes/users/batch/new.js b/app/routes/users/batch/new.js index 19a543fab..2ec7520e7 100644 --- a/app/routes/users/batch/new.js +++ b/app/routes/users/batch/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditStaticPageRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Batch gebruikers uploaden' }; +export default class BatchNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Batch gebruikers uploaden' }; canAccess() { return this.abilities.can('batch upload users'); diff --git a/app/routes/users/destroy.js b/app/routes/users/destroy.js deleted file mode 100644 index 648375f81..000000000 --- a/app/routes/users/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyUserRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Lid verwijderen' }; - - canAccess(model) { - return this.abilities.can('destroy user', model); - } - - model(params) { - return this.store.findRecord('user', params.id, params); - } -} diff --git a/app/routes/users/edit-permissions.js b/app/routes/users/edit-permissions.js deleted file mode 100644 index 3533de386..000000000 --- a/app/routes/users/edit-permissions.js +++ /dev/null @@ -1,7 +0,0 @@ -import EditUserRoute from 'amber-ui/routes/users/edit'; - -export default class EditUserPermissionsRoute extends EditUserRoute { - canAccess() { - return this.abilities.can('create permissions-users'); - } -} diff --git a/app/routes/users/edit-privacy.js b/app/routes/users/edit-privacy.js deleted file mode 100644 index 5ad74fe3d..000000000 --- a/app/routes/users/edit-privacy.js +++ /dev/null @@ -1,3 +0,0 @@ -import EditUserRoute from 'amber-ui/routes/users/edit'; - -export default EditUserRoute; diff --git a/app/routes/users/edit-security.js b/app/routes/users/edit-security.js deleted file mode 100644 index 5ad74fe3d..000000000 --- a/app/routes/users/edit-security.js +++ /dev/null @@ -1,3 +0,0 @@ -import EditUserRoute from 'amber-ui/routes/users/edit'; - -export default EditUserRoute; diff --git a/app/routes/users/forgot-password.js b/app/routes/users/forgot-password.js deleted file mode 100644 index 3e6b5e7da..000000000 --- a/app/routes/users/forgot-password.js +++ /dev/null @@ -1,3 +0,0 @@ -import Route from '@ember/routing/route'; - -export default Route; diff --git a/app/routes/users/index.js b/app/routes/users/index.js index ad760a9f0..ab0684d84 100644 --- a/app/routes/users/index.js +++ b/app/routes/users/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class UserIndexRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Gebruikers' }; - +export default class UsersIndexRoute extends AuthenticatedRoute { get pageActions() { return [ { diff --git a/app/routes/users/members.js b/app/routes/users/members.js index 84204e6de..55b916f26 100644 --- a/app/routes/users/members.js +++ b/app/routes/users/members.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class MembersRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Leden' }; +export default class UsersMembersRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Leden' }; get pageActions() { return [ diff --git a/app/routes/users/new.js b/app/routes/users/new.js index c6124d0ab..99045651f 100644 --- a/app/routes/users/new.js +++ b/app/routes/users/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewUserRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Gebruiker aanmaken' }; +export default class UsersNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Gebruiker aanmaken' }; canAccess() { return this.abilities.can('create users'); diff --git a/app/routes/users/resend-activation.js b/app/routes/users/resend-activation.js deleted file mode 100644 index b3aa96c2f..000000000 --- a/app/routes/users/resend-activation.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class ResendActivationRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Activatiecode hersturen' }; - - canAccess(model) { - return this.abilities.can('resend activation code of user', model); - } - - model(params) { - return this.store.findRecord('user', params.id, params); - } -} diff --git a/app/routes/users/show-groups.js b/app/routes/users/show-groups.js deleted file mode 100644 index d082da4eb..000000000 --- a/app/routes/users/show-groups.js +++ /dev/null @@ -1,5 +0,0 @@ -import ShowUserRouter from 'amber-ui/routes/users/show'; - -export default class ShowUserGroupsRoute extends ShowUserRouter { - pageActions = null; -} diff --git a/app/routes/users/show-mail.js b/app/routes/users/show-mail.js deleted file mode 100644 index 5198630db..000000000 --- a/app/routes/users/show-mail.js +++ /dev/null @@ -1,9 +0,0 @@ -import ShowUserRouter from 'amber-ui/routes/users/show'; - -export default class ShowUserMailRoute extends ShowUserRouter { - pageActions = null; - - canAccess() { - return this.abilities.can('show mail-aliases'); - } -} diff --git a/app/routes/users/show-mandates.js b/app/routes/users/show-mandates.js deleted file mode 100644 index 30cbd768a..000000000 --- a/app/routes/users/show-mandates.js +++ /dev/null @@ -1,5 +0,0 @@ -import ShowUserRouter from 'amber-ui/routes/users/show'; - -export default class ShowUserMandatesRoute extends ShowUserRouter { - pageActions = null; -} diff --git a/app/routes/users/user.js b/app/routes/users/user.js new file mode 100644 index 000000000..a35af78a3 --- /dev/null +++ b/app/routes/users/user.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class UserRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.fullName }; + } + + canAccess() { + return this.abilities.can('show individual users'); + } + + model(params) { + return this.store.findRecord('user', params.id, params); + } +} diff --git a/app/routes/users/user/destroy.js b/app/routes/users/user/destroy.js new file mode 100644 index 000000000..0331370df --- /dev/null +++ b/app/routes/users/user/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class UserDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Lid verwijderen' }; + + canAccess(model) { + return this.abilities.can('destroy user', model); + } +} diff --git a/app/routes/users/user/edit.js b/app/routes/users/user/edit.js new file mode 100644 index 000000000..389b2dcf1 --- /dev/null +++ b/app/routes/users/user/edit.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class UserEditRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Lid aanpassen' }; +} diff --git a/app/routes/users/edit.js b/app/routes/users/user/edit/index.js similarity index 70% rename from app/routes/users/edit.js rename to app/routes/users/user/edit/index.js index 1037fa213..c6d05ee15 100644 --- a/app/routes/users/edit.js +++ b/app/routes/users/user/edit/index.js @@ -1,31 +1,29 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditUserRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Lid aanpassen' }; - +export default class EditIndexRoute extends AuthenticatedRoute { get tabItems() { const user = this.controller.model; return [ { - link: 'users.edit', + link: 'users.user.edit.index', title: 'Algemeen', linkArgument: user, canAccess: true, }, { - link: 'users.edit-permissions', + link: 'users.user.edit.permissions', title: 'Rechten', linkArgument: user, canAccess: this.abilities.can('create permissions-users'), }, { - link: 'users.edit-privacy', + link: 'users.user.edit.privacy', title: 'Privacy', linkArgument: user, canAccess: this.session.currentUser === user, }, { - link: 'users.edit-security', + link: 'users.user.edit.security', title: 'Beveiliging', linkArgument: user, canAccess: this.session.currentUser === user, @@ -37,10 +35,6 @@ export default class EditUserRoute extends AuthenticatedRoute { return this.abilities.can('edit user', model); } - async model(params) { - return await this.store.findRecord('user', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/users/user/edit/permissions.js b/app/routes/users/user/edit/permissions.js new file mode 100644 index 000000000..13b78f7fd --- /dev/null +++ b/app/routes/users/user/edit/permissions.js @@ -0,0 +1,7 @@ +import EditIndexRoute from './index'; + +export default class EditPermissionsRoute extends EditIndexRoute { + canAccess() { + return this.abilities.can('create permissions-users'); + } +} diff --git a/app/routes/users/user/edit/privacy.js b/app/routes/users/user/edit/privacy.js new file mode 100644 index 000000000..22cadb533 --- /dev/null +++ b/app/routes/users/user/edit/privacy.js @@ -0,0 +1,3 @@ +import EditIndexRoute from './index'; + +export default class EditPrivacyRoute extends EditIndexRoute {} diff --git a/app/routes/users/user/edit/security.js b/app/routes/users/user/edit/security.js new file mode 100644 index 000000000..70f538ff2 --- /dev/null +++ b/app/routes/users/user/edit/security.js @@ -0,0 +1,3 @@ +import EditIndexRoute from './index'; + +export default class EditSecurityRoute extends EditIndexRoute {} diff --git a/app/routes/users/user/groups.js b/app/routes/users/user/groups.js new file mode 100644 index 000000000..7bc0ce859 --- /dev/null +++ b/app/routes/users/user/groups.js @@ -0,0 +1,5 @@ +import UserIndexRoute from './index'; + +export default class UserGroupsRoute extends UserIndexRoute { + pageActions = null; +} diff --git a/app/routes/users/show.js b/app/routes/users/user/index.js similarity index 71% rename from app/routes/users/show.js rename to app/routes/users/user/index.js index 0761def80..06979c424 100644 --- a/app/routes/users/show.js +++ b/app/routes/users/user/index.js @@ -1,22 +1,18 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class ShowUserRouter extends AuthenticatedRoute { - get breadCrumb() { - return { title: this.controller.model.fullName }; - } - +export default class UserIndexRoute extends AuthenticatedRoute { get pageActions() { const user = this.controller.model; return [ { - link: 'users.edit', + link: 'users.user.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: user, canAccess: this.abilities.can('edit user', user), }, { - link: 'users.resend_activation', + link: 'users.user.resend-activation-code', title: 'Verstuur activatie code', icon: 'paper-plane', linkArgument: user, @@ -29,37 +25,37 @@ export default class ShowUserRouter extends AuthenticatedRoute { const user = this.controller.model; return [ { - link: 'users.show', + link: 'users.user.index', title: 'Algemeen', linkArgument: user, - canAccess: this.abilities.can('show users'), + canAccess: this.abilities.can('show individual users'), }, { - link: 'users.show-groups', + link: 'users.user.groups', title: 'Groepen', linkArgument: user, canAccess: this.abilities.can('show memberships'), }, { - link: 'users.show-settings', + link: 'users.user.settings', title: 'Instellingen', linkArgument: user, canAccess: this.abilities.can('edit user', user), }, { - link: 'users.show-mail', + link: 'users.user.mail', title: 'Mail aliassen', linkArgument: user, canAccess: this.abilities.can('show mail-aliases'), }, { - link: 'users.show-mandates', + link: 'users.user.mandates', title: 'Incasso mandaten', linkArgument: user, canAccess: true, }, { - link: 'users.show-permissions', + link: 'users.user.permissions', title: 'Rechten', linkArgument: user, canAccess: this.abilities.can('show permissions-users'), @@ -70,8 +66,4 @@ export default class ShowUserRouter extends AuthenticatedRoute { canAccess() { return this.abilities.can('show individual users'); } - - model(params) { - return this.store.findRecord('user', params.id, params); - } } diff --git a/app/routes/users/user/mail.js b/app/routes/users/user/mail.js new file mode 100644 index 000000000..4a1761eff --- /dev/null +++ b/app/routes/users/user/mail.js @@ -0,0 +1,9 @@ +import UserIndexRoute from './index'; + +export default class UserMailRoute extends UserIndexRoute { + pageActions = null; + + canAccess() { + return this.abilities.can('show mail-aliases'); + } +} diff --git a/app/routes/users/user/mandates.js b/app/routes/users/user/mandates.js new file mode 100644 index 000000000..748466e52 --- /dev/null +++ b/app/routes/users/user/mandates.js @@ -0,0 +1,5 @@ +import UserIndexRoute from './index'; + +export default class UserMandatesRoute extends UserIndexRoute { + pageActions = null; +} diff --git a/app/routes/users/show-permissions.js b/app/routes/users/user/permissions.js similarity index 66% rename from app/routes/users/show-permissions.js rename to app/routes/users/user/permissions.js index 9f86099cf..7c4e7d1f9 100644 --- a/app/routes/users/show-permissions.js +++ b/app/routes/users/user/permissions.js @@ -1,11 +1,11 @@ -import ShowUserRouter from 'amber-ui/routes/users/show'; +import UserIndexRoute from './index'; -export default class ShowUserPermissions extends ShowUserRouter { +export default class UserPermissionsRoute extends UserIndexRoute { get pageActions() { const user = this.controller.model; return [ { - link: 'users.edit-permissions', + link: 'users.user.edit.permissions', title: 'Wijzigen', icon: 'pencil', linkArgument: user, diff --git a/app/routes/users/user/resend-activation-code.js b/app/routes/users/user/resend-activation-code.js new file mode 100644 index 000000000..7a730520b --- /dev/null +++ b/app/routes/users/user/resend-activation-code.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class UserResendActivationCodeRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Activatiecode hersturen' }; + + canAccess(model) { + return this.abilities.can('resend activation code of user', model); + } +} diff --git a/app/routes/users/show-settings.js b/app/routes/users/user/settings.js similarity index 67% rename from app/routes/users/show-settings.js rename to app/routes/users/user/settings.js index 0bf51dc9d..6c78e7ee0 100644 --- a/app/routes/users/show-settings.js +++ b/app/routes/users/user/settings.js @@ -1,11 +1,11 @@ -import ShowUserRouter from 'amber-ui/routes/users/show'; +import UserIndexRoute from './index'; -export default class ShowUserSettings extends ShowUserRouter { +export default class UserSettingsRoute extends UserIndexRoute { get pageActions() { const user = this.controller.model; return [ { - link: 'users.edit-privacy', + link: 'users.user.edit.privacy', title: 'Wijzigen', icon: 'pencil', linkArgument: user, diff --git a/app/routes/users/webdav.js b/app/routes/users/webdav.js index f64b63e23..3b7ac4709 100644 --- a/app/routes/users/webdav.js +++ b/app/routes/users/webdav.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class WebdavRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Contactsynchronisatie' }; +export default class UsersWebdavRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Contactsynchronisatie' }; canAccess() { return this.abilities.can('show webdav users'); diff --git a/app/routes/vacancies.js b/app/routes/vacancies.js new file mode 100644 index 000000000..5506a7b2a --- /dev/null +++ b/app/routes/vacancies.js @@ -0,0 +1,7 @@ +import { ApplicationRoute } from 'amber-ui/routes/application/application'; + +export default class VacanciesRoute extends ApplicationRoute { + queryParams = {}; + + breadcrumb = { title: 'Vacatures' }; +} diff --git a/app/routes/vacancies/destroy.js b/app/routes/vacancies/destroy.js deleted file mode 100644 index ee0cc6647..000000000 --- a/app/routes/vacancies/destroy.js +++ /dev/null @@ -1,13 +0,0 @@ -import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; - -export default class DestroyVacancyRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Vacature verwijderen' }; - - canAccess() { - return this.abilities.can('destroy vacancies'); - } - - model(params) { - return this.store.findRecord('vacancy', params.id, params); - } -} diff --git a/app/routes/vacancies/index.js b/app/routes/vacancies/index.js index aa82999a4..b7b9ab448 100644 --- a/app/routes/vacancies/index.js +++ b/app/routes/vacancies/index.js @@ -1,8 +1,6 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class IndexVacancyRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Vacatures' }; - +export default class VacanciesIndexRoute extends AuthenticatedRoute { queryParams = { page: { refreshModel: true, diff --git a/app/routes/vacancies/new.js b/app/routes/vacancies/new.js index 27aac5d5b..ca5372a97 100644 --- a/app/routes/vacancies/new.js +++ b/app/routes/vacancies/new.js @@ -1,7 +1,7 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class NewVacancyRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Vacature aanmaken' }; +export default class VacanciesNewRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Vacature aanmaken' }; canAccess() { return this.abilities.can('create vacancies'); diff --git a/app/routes/vacancies/vacancy.js b/app/routes/vacancies/vacancy.js new file mode 100644 index 000000000..0e42cf08c --- /dev/null +++ b/app/routes/vacancies/vacancy.js @@ -0,0 +1,17 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class VacancyRoute extends AuthenticatedRoute { + queryParams = {}; + + get breadcrumb() { + return { title: this.controller?.model.title }; + } + + canAccess() { + return this.abilities.can('show vacancies'); + } + + model(params) { + return this.store.findRecord('vacancy', params.id, params); + } +} diff --git a/app/routes/vacancies/vacancy/destroy.js b/app/routes/vacancies/vacancy/destroy.js new file mode 100644 index 000000000..9b501e50a --- /dev/null +++ b/app/routes/vacancies/vacancy/destroy.js @@ -0,0 +1,9 @@ +import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; + +export default class VacancyDestroyRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Vacature verwijderen' }; + + canAccess() { + return this.abilities.can('destroy vacancies'); + } +} diff --git a/app/routes/vacancies/edit.js b/app/routes/vacancies/vacancy/edit.js similarity index 56% rename from app/routes/vacancies/edit.js rename to app/routes/vacancies/vacancy/edit.js index 12b5e7fe2..e213478e9 100644 --- a/app/routes/vacancies/edit.js +++ b/app/routes/vacancies/vacancy/edit.js @@ -1,16 +1,12 @@ import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class EditVacancyRoute extends AuthenticatedRoute { - breadCrumb = { title: 'Vacature aanpassen' }; +export default class VacancyEditRoute extends AuthenticatedRoute { + breadcrumb = { title: 'Vacature aanpassen' }; canAccess(model) { return this.abilities.can('edit vacancy', model); } - model(params) { - return this.store.findRecord('vacancy', params.id, params); - } - deactivate() { super.deactivate(); this.controller.model?.rollbackAttributes(); diff --git a/app/routes/vacancies/show.js b/app/routes/vacancies/vacancy/index.js similarity index 60% rename from app/routes/vacancies/show.js rename to app/routes/vacancies/vacancy/index.js index 8badbd93d..521623889 100644 --- a/app/routes/vacancies/show.js +++ b/app/routes/vacancies/vacancy/index.js @@ -1,25 +1,18 @@ -import { inject as service } from '@ember/service'; import { AuthenticatedRoute } from 'amber-ui/routes/application/application'; -export default class ShowVacancyRoute extends AuthenticatedRoute { - @service store; - - get breadCrumb() { - return { title: this.controller.model.title }; - } - +export default class VacancyIndexRoute extends AuthenticatedRoute { get pageActions() { const vacancy = this.controller.model; return [ { - link: 'vacancies.edit', + link: 'vacancies.vacancy.edit', title: 'Wijzigen', icon: 'pencil', linkArgument: vacancy, canAccess: this.abilities.can('edit vacancy', vacancy), }, { - link: 'vacancies.destroy', + link: 'vacancies.vacancy.destroy', title: 'Verwijderen', icon: 'trash', linkArgument: vacancy, @@ -31,8 +24,4 @@ export default class ShowVacancyRoute extends AuthenticatedRoute { canAccess() { return this.abilities.can('show vacancies'); } - - model(params) { - return this.store.findRecord('vacancy', params.id, params); - } } diff --git a/app/services/fetch.js b/app/services/fetch.js index 975d19a92..dfcac2b0f 100644 --- a/app/services/fetch.js +++ b/app/services/fetch.js @@ -1,5 +1,5 @@ import Service, { inject as service } from '@ember/service'; -import ENV from '../config/environment'; +import ENV from 'amber-ui/config/environment'; import { fetch as basefetch } from 'fetch'; export default class FetchService extends Service { diff --git a/app/services/flash-notice.js b/app/services/flash-notice.js index 138dea871..420bc0605 100644 --- a/app/services/flash-notice.js +++ b/app/services/flash-notice.js @@ -1,6 +1,6 @@ import Service, { inject as service } from '@ember/service'; import { run } from '@ember/runloop'; -import ENV from '../config/environment'; +import ENV from 'amber-ui/config/environment'; import { tracked } from '@glimmer/tracking'; export default class FlashNoticeService extends Service { diff --git a/app/styles/app.scss b/app/styles/app.scss index 68215778d..be937112b 100644 --- a/app/styles/app.scss +++ b/app/styles/app.scss @@ -10,19 +10,24 @@ @import 'components/advertisement-tool'; @import 'components/basic-modal'; @import 'components/bread-crumbs'; -@import 'components/cards/frontpage-activity-card-small'; +@import 'components/cards/public-activity-card-small'; @import 'components/cards/membership-card'; @import 'components/cards/photo-album-card'; @import 'components/dropzone'; @import 'components/flash-notice'; @import 'components/forum/forum-post'; @import 'components/footer'; -@import 'components/index/public/activities'; @import 'components/md-editor'; @import 'components/menu-sidebar'; @import 'components/navbar'; @import 'components/page-actions'; @import 'components/pagination'; +@import 'components/public/index/about-alpha'; +@import 'components/public/index/activities'; +@import 'components/public/index/header'; +@import 'components/public/index/photo-albums'; +@import 'components/public/index/sponsor-banner'; +@import 'components/public/index/youtube-videos'; @import 'components/quickpost'; @import 'components/sidebar'; @import 'components/social-media-buttons'; @@ -38,7 +43,6 @@ @import 'modules/base'; @import 'modules/button'; @import 'modules/card'; -@import 'modules/checkbox'; @import 'modules/comment'; @import 'modules/dropdown'; @import 'modules/forms'; @@ -58,11 +62,13 @@ @import 'routes/418-im-a-teapot'; @import 'routes/activities/print-enrolled'; @import 'routes/articles'; +@import 'routes/groups'; @import 'routes/index'; @import 'routes/loading'; @import 'routes/login'; @import 'routes/photos'; @import 'routes/polls'; +@import 'routes/public/index'; @import 'routes/sog/name-trainer'; // Import package style diff --git a/app/styles/components/advertisement-tool.scss b/app/styles/components/advertisement-tool.scss index db84e734a..ffc85258c 100644 --- a/app/styles/components/advertisement-tool.scss +++ b/app/styles/components/advertisement-tool.scss @@ -1,5 +1,5 @@ // CSS3 code for animation of advertisements -$amount-of-advertisements: 11; +$amount-of-advertisements: 14; $single-advertisement-width: 175px; $advertisement-animation-duration: 16s; $advertisement-animation-holder-width: -$amount-of-advertisements * @@ -65,7 +65,7 @@ $advertisement-row-width: calc( } .advertisement-item { - margin: 5px 0; + margin: 5px 10px; width: $single-advertisement-width; &--full { diff --git a/app/styles/components/basic-modal.scss b/app/styles/components/basic-modal.scss index 91f02e465..f69c15c2b 100644 --- a/app/styles/components/basic-modal.scss +++ b/app/styles/components/basic-modal.scss @@ -1,17 +1,9 @@ .basic-modal { display: flex; - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; flex-direction: column; align-items: center; justify-content: center; - z-index: 6; background-color: $opaque-black-halfly; - width: 100vw; - height: 100vh; } .modal-header { diff --git a/app/styles/components/cards/photo-album-card.scss b/app/styles/components/cards/photo-album-card.scss index 1f535fbff..6fa9418a4 100644 --- a/app/styles/components/cards/photo-album-card.scss +++ b/app/styles/components/cards/photo-album-card.scss @@ -5,6 +5,17 @@ height: $photo-card-height; } + &.public { + margin-bottom: 1rem; + // half of the allowed height - the social-buttons row + // and that minus the bottom-margin + height: calc(($public-activity-and-photo-holders-height - 3rem) / 2 - 1rem); + + img { + height: calc(($public-activity-and-photo-holders-height - 3rem) / 2 - 1rem); + } + } + .card-title { font-size: 1.5rem; } diff --git a/app/styles/components/cards/frontpage-activity-card-small.scss b/app/styles/components/cards/public-activity-card-small.scss similarity index 64% rename from app/styles/components/cards/frontpage-activity-card-small.scss rename to app/styles/components/cards/public-activity-card-small.scss index 9f0a367c5..124c51165 100644 --- a/app/styles/components/cards/frontpage-activity-card-small.scss +++ b/app/styles/components/cards/public-activity-card-small.scss @@ -1,16 +1,23 @@ -.frontpage-activity-card-small { +// allowed total height - the height of bottom-margins of top two activity cards +// and that all divided by 3, for 3 article cards +$public-activity-card-height: calc(($public-activity-and-photo-holders-height - 2rem) / 3); + +.public-activity-card-small { + margin-bottom: 1rem; box-shadow: none; background-color: $white; cursor: pointer; + // subtract bottom-margin + height: $public-activity-card-height; overflow: hidden; color: $white; - .frontpage-card-image { + .public-card-image { transition: background-color 0.3s ease-in-out; - background-color: $gray-800; + background-color: $gray-700; background-position: center; background-size: cover; - height: 120px; + height: $public-activity-card-height; background-blend-mode: overlay; } @@ -23,7 +30,7 @@ } &:hover { - .frontpage-card-image { + .public-card-image { background-color: $gray-900; } diff --git a/app/styles/components/dropzone.scss b/app/styles/components/dropzone.scss index 06758dd94..4c163e698 100644 --- a/app/styles/components/dropzone.scss +++ b/app/styles/components/dropzone.scss @@ -11,7 +11,7 @@ .dropzone.dropzone { display: flex; flex-flow: row wrap; - align-content: flex-end; + align-content: center; align-items: center; border: 1px solid $gray-200; border-radius: 4px; diff --git a/app/styles/components/footer.scss b/app/styles/components/footer.scss index f1a7e9887..16238cfee 100644 --- a/app/styles/components/footer.scss +++ b/app/styles/components/footer.scss @@ -3,8 +3,7 @@ right: 0; left: 0; transition: padding-left 0.3s ease-in-out; - margin-top: 50px; - background-color: $black; + background-color: $brand-primary; padding-left: 0; &.left-sidebar-open { @@ -14,9 +13,22 @@ padding-left: 250px; } } + + &.authenticated { + background-color: $black; + + .footer-bottom-text, .footer-header, .footer-text { + color: $gray-200; + } + + .footer-table-cell { + border-top: 0; + color: $gray-200; + } + } } -@include media-breakpoint-down(sm) { +@include media-breakpoint-down(md) { .footer-holder { transform: translateX(0); transition: transform 0.3s ease-in-out; @@ -34,7 +46,7 @@ } .footer { - margin-top: 50px; + margin-top: 10px; padding: 20px; width: 100%; @@ -43,17 +55,13 @@ } } -.footer-header { - color: $gray-200; -} - -.footer-text { - color: $gray-200; +.footer-header, .footer-text { + color: $black; } .footer-table-cell { border-top: 0; - color: $gray-200; + color: $black; } .footer-bottom { @@ -62,5 +70,5 @@ } .footer-bottom-text { - color: $gray-500; + color: $gray-900; } diff --git a/app/styles/components/index/public/activities.scss b/app/styles/components/index/public/activities.scss deleted file mode 100644 index 1126e8285..000000000 --- a/app/styles/components/index/public/activities.scss +++ /dev/null @@ -1,11 +0,0 @@ -@include media-breakpoint-up(md) { - .activity-list { - column-count: 2; - } -} - -@include media-breakpoint-up(lg) { - .activity-list { - column-count: 3; - } -} \ No newline at end of file diff --git a/app/styles/components/md-editor.scss b/app/styles/components/md-editor.scss index 036ac9f70..42b1772e0 100644 --- a/app/styles/components/md-editor.scss +++ b/app/styles/components/md-editor.scss @@ -1,5 +1,5 @@ .md-editor-and-toolbar { - border: 1px solid $gray-200; + border: 1px solid $gray-400; border-radius: $card-border-radius; } diff --git a/app/styles/components/menu-sidebar.scss b/app/styles/components/menu-sidebar.scss index a1471e572..4b892cabb 100644 --- a/app/styles/components/menu-sidebar.scss +++ b/app/styles/components/menu-sidebar.scss @@ -30,12 +30,12 @@ $profile-menu-height: 360px; } .menu-sidebar-item-icon { + flex-shrink: 0; margin-left: 15px; outline: 0; width: 40px; text-align: center; line-height: 40px; - white-space: nowrap; font-size: 1.2rem; overflow-y: hidden; } @@ -51,18 +51,20 @@ $profile-menu-height: 360px; } .menu-sidebar-item-text { - transform: translateX(-40px); transition: transform $animation-duration $animation-behaviour, opacity $animation-duration $animation-behaviour; opacity: 0; + margin-top: 7px; + margin-right: 5px; margin-left: 10px; - line-height: 40px; + line-height: 25px; white-space: nowrap; pointer-events: none; &.visible { transform: translateX(0); opacity: 1; + white-space: normal; pointer-events: all; } } @@ -75,6 +77,14 @@ $profile-menu-height: 360px; } } + .sidebar-item-static { + color: $gray-500; + + &:hover { + color: $gray-500; + } + } + .expand-menu-sidebar-btn { bottom: 10px; diff --git a/app/styles/components/navbar.scss b/app/styles/components/navbar.scss index a1bdc1164..c8388e736 100644 --- a/app/styles/components/navbar.scss +++ b/app/styles/components/navbar.scss @@ -5,34 +5,68 @@ z-index: 5; background-color: $brand-primary; width: 100vw; - height: $navbar-height; .navbar { flex-wrap: nowrap; - height: inherit; + + &.public { + border-bottom: 4px solid $brand-secondary; + } } } .navbar-nav { - height: calc(100% + 20px); - min-height: calc(100% + 20px); - overflow-x: scroll; - overflow-y: hidden; - - > * { - height: 56px; - } + height: $navbar-height; + min-height: $navbar-height; + overflow: hidden; .dropdown-toggle { align-self: center; height: fit-content; } + + .public-about-us-dropdown { + display: flex; + flex-direction: column; + border: 2px solid $brand-secondary; + border-top-left-radius: 0; + background-color: $brand-primary; + padding: 0; + min-width: auto; + + .dropdown-item, + .dropdown-item.active { + border-radius: var(--bs-dropdown-border-radius); + padding: 0.375rem 0.75rem; + text-transform: capitalize; + } + + .dropdown-item:hover, + .dropdown-item.active:hover, + .dropdown-item.active { + background-color: tint-color($brand-primary, $btn-hover-bg-tint-amount); /* stylelint-disable-line function-no-unknown */ + } + } } .navbar-contents-holder { align-items: center; width: calc(100% - 52px); height: $navbar-height; + + .public-navbar-button { + position: relative; + text-transform: uppercase; + + &.selected::before { + position: absolute; + top: 1.85rem; + margin: 0 calc((100% - 2.65rem) / 2); + border: 0.65rem solid transparent; + border-bottom: 0.65rem solid $brand-secondary; + content: ""; + } + } } .navbar-overflow-wrapper { @@ -53,6 +87,21 @@ height: 40px; } +.public-header-logo { + position: absolute; + top: 10px; + right: calc(50% - 40px); + left: calc(50% - 40px); + z-index: 1; + border: 4px solid $brand-secondary; + border-radius: 50%; + background-image: url('/images/alphalogonotextyellow.svg'); + background-size: contain; + padding: 0; + width: 80px; + height: 80px; +} + .nav-item { margin-left: 10px; cursor: pointer; @@ -70,7 +119,6 @@ .btn-locale { transition: none; - margin-right: 24px; background-color: transparent; background-repeat: no-repeat; background-position: center; @@ -80,37 +128,23 @@ } .left-sidebar-toggle { - position: absolute; - left: -10px; + position: relative; font-size: 1.5rem; + + &.half-toggle { + left: -24px; + margin-right: -20px; + } } .navbar-brand { margin-right: 0.5rem; } -.dropdown-menu { - top: 56px; - border-width: 0; - padding: 0; - - .dropdown-item, - .dropdown-item.active { - background-color: $brand-primary; - padding: 0.375rem 0.75rem; - } - - .dropdown-item:hover, - .dropdown-item.active:hover { - background-color: $brand-primary-dark; - } -} - -@media all and (max-width: #{map-get($grid-breakpoints, md)}) { - .btn-locale { - margin-right: 10px; - margin-left: -20px; - } +.public-navbar-button.dropdown-toggle[aria-expanded='true'] { + border: 2px solid $brand-secondary; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; } .btn-inverse-locale-nl { diff --git a/app/styles/components/page-actions.scss b/app/styles/components/page-actions.scss index 5e2216f89..9fa8a615b 100644 --- a/app/styles/components/page-actions.scss +++ b/app/styles/components/page-actions.scss @@ -108,26 +108,6 @@ font-size: 1rem; } -.checkbox-holder { - display: flex; - flex-direction: row; - justify-content: space-between; - margin-bottom: 0; - padding-top: 0.4rem; - padding-bottom: 0; - color: $black; - - .filter-bar-dropdown-checkbox { - margin-top: 5px; - margin-right: 10px; - width: 15px; - } - - label { - display: flex; - } -} - .dropdown-menu { min-width: 14rem; } diff --git a/app/styles/components/pagination.scss b/app/styles/components/pagination.scss index bb7805dd2..bd5019bef 100644 --- a/app/styles/components/pagination.scss +++ b/app/styles/components/pagination.scss @@ -1,7 +1,10 @@ .pagination { + margin-right: auto; + margin-left: auto; border: 1px solid $gray-300; border-radius: 0.25rem; background: $white; + width: fit-content; height: inherit; } diff --git a/app/styles/components/public/index/about-alpha.scss b/app/styles/components/public/index/about-alpha.scss new file mode 100644 index 000000000..bf107bb80 --- /dev/null +++ b/app/styles/components/public/index/about-alpha.scss @@ -0,0 +1,33 @@ +.public-index-about-alpha { + .about-text { + font-size: 1.5rem; + hyphens: none; + } + + .about-v { + display: flex; + flex-direction: column; + align-items: center; + padding: 0 5%; + + .about-v-image { + width: 100%; + clip-path: circle(); + object-fit: cover; + max-width: 25rem; + } + + .about-v-title { + margin-top: 1rem; + text-align: center; + color: $brand-secondary; + font-family: "Libre Franklin", sans-serif; + } + + .about-v-text { + text-align: justify; + line-height: 1.6rem; + font-size: 1.3rem; + } + } +} \ No newline at end of file diff --git a/app/styles/components/public/index/activities.scss b/app/styles/components/public/index/activities.scss new file mode 100644 index 000000000..61b433f93 --- /dev/null +++ b/app/styles/components/public/index/activities.scss @@ -0,0 +1,11 @@ +.public-index-activity-modal { + .activity-modal-backdrop { + position: fixed; + inset: 0; + background-color: $opaque-black-halfly; + } + + .activity-modal-content-wrapper { + top: 100px; + } +} \ No newline at end of file diff --git a/app/styles/components/public/index/header.scss b/app/styles/components/public/index/header.scss new file mode 100644 index 000000000..d027d1dcc --- /dev/null +++ b/app/styles/components/public/index/header.scss @@ -0,0 +1,57 @@ +.public-index-header { + display: flex; + position: relative; + flex-direction: column; + align-items: center; + justify-content: center; + margin-top: calc(-100px + $navbar-height); + padding-top: 80px; + padding-bottom: 60px; + height: fit-content; + min-height: 22vw; + color: $white; + + .header-background { + object-fit: cover; + object-position: bottom; + } + + .header-overlay { + opacity: 0.45; + background-color: $black; + } + + .header-background, .header-overlay { + position: absolute; + top: 56px; + left: 50%; + margin-top: -$navbar-height; + margin-left: -50vw; + width: 100vw; + max-width: 100vw; + height: 100%; + } + + .header-slogan { + z-index: 1; + text-align: center; + text-transform: uppercase; + line-height: min(7rem, 11vw); + font-family: 'Advent Pro', sans-serif; + font-size: min(5.5rem, 8vw); + font-weight: 500; + + span { + font-size: min(7rem, 11vw); + } + } + + .header-buttons { + z-index: 1; + + .header-button { + width: 14rem; + text-transform: uppercase; + } + } +} \ No newline at end of file diff --git a/app/styles/components/public/index/photo-albums.scss b/app/styles/components/public/index/photo-albums.scss new file mode 100644 index 000000000..818704daa --- /dev/null +++ b/app/styles/components/public/index/photo-albums.scss @@ -0,0 +1,6 @@ +.public-index-photo-albums { + .social-icon { + width: 3rem; + height: 3rem; + } +} \ No newline at end of file diff --git a/app/styles/components/public/index/sponsor-banner.scss b/app/styles/components/public/index/sponsor-banner.scss new file mode 100644 index 000000000..3beffcfcf --- /dev/null +++ b/app/styles/components/public/index/sponsor-banner.scss @@ -0,0 +1,38 @@ +.public-index-sponsors-banner { + background: linear-gradient(90deg, rgba(0 0 0 / 40%) 0%, $brand-secondary 100%), $brand-secondary; + height: fit-content; + + .advertisement-tool { + background-color: $white; + padding: 0; + + .adv-row { + height: 130px; + + // stylelint-disable selector-max-compound-selectors + .advertisement-item { + display: flex; + align-content: center; + justify-content: center; + padding: 5px; + max-height: 100%; + font-size: 1.5rem; + + // stylelint-disable max-nesting-depth + > * { + max-width: calc(100% - 10px); + max-height: 100%; + object-position: center; + } + // stylelint-enable max-nesting-depth + } + // stylelint-enable selector-max-compound-selectors + } + } + + .potential-sponsor-text { + text-align: center; + color: $brand-cream; + font-weight: bold; + } +} \ No newline at end of file diff --git a/app/styles/components/public/index/youtube-videos.scss b/app/styles/components/public/index/youtube-videos.scss new file mode 100644 index 000000000..9d72316d3 --- /dev/null +++ b/app/styles/components/public/index/youtube-videos.scss @@ -0,0 +1,8 @@ +.public-index-videos-section { + background: linear-gradient(90deg, rgba(0 0 0 / 40%) 0%, $brand-secondary 100%), $brand-secondary; + + .videos-section-wrapper { + margin-right: auto; + margin-left: auto; + } +} \ No newline at end of file diff --git a/app/styles/components/quickpost.scss b/app/styles/components/quickpost.scss index 267092196..109749853 100644 --- a/app/styles/components/quickpost.scss +++ b/app/styles/components/quickpost.scss @@ -57,9 +57,8 @@ } .emoticon-holder { - background-color: $gray-700; padding: 10px; - width: 20vw; + width: 15rem; .emoticon { text-align: center; @@ -78,6 +77,7 @@ .emoticon { cursor: pointer; + padding: 2px 0; width: 20%; min-width: 20%; font-size: $font-size-lg; diff --git a/app/styles/components/tools/board-room-presence.scss b/app/styles/components/tools/board-room-presence.scss index ffdeeb313..683763d55 100644 --- a/app/styles/components/tools/board-room-presence.scss +++ b/app/styles/components/tools/board-room-presence.scss @@ -27,10 +27,12 @@ } .edit-presence { - background-color: $gray-100; - .edit-presence-row { margin: 5px; + + .delete-presence-button { + padding: 0 5px; + } } .presence-time-input { diff --git a/app/styles/modules/base.scss b/app/styles/modules/base.scss index 2b04b9314..4f9ee63f9 100644 --- a/app/styles/modules/base.scss +++ b/app/styles/modules/base.scss @@ -1,5 +1,7 @@ html { + word-wrap: break-word; font-size: $font-size-root; + hyphens: auto; } body { @@ -17,10 +19,16 @@ h5 { } a { + text-decoration: none; color: inherit; &:hover { text-decoration: none; + color: $brand-primary-dark; + } + + .list-group-item:hover { + color: $brand-primary-dark; } } @@ -32,11 +40,23 @@ p { .app { overflow-x: hidden; + background-color: $brand-cream; + + &.authenticated { + background-color: $white; + } } .main { + @include media-breakpoint-up(xl) { + &:not(.authenticated) { + max-width: 1600px; + } + } + transform: translateX(0); transition: all 0.3s ease-in-out; + margin-bottom: 50px; padding-top: 100px; min-height: 100vh; @@ -91,11 +111,11 @@ img { width: auto; } -@include media-breakpoint-down(sm) { +@include media-breakpoint-down(md) { .full-width-small-screens { position: relative; left: 50%; margin-left: -50vw; width: 100vw; } -} +} \ No newline at end of file diff --git a/app/styles/modules/button.scss b/app/styles/modules/button.scss index feefbaa34..65cb2eba0 100644 --- a/app/styles/modules/button.scss +++ b/app/styles/modules/button.scss @@ -1,8 +1,8 @@ -.btn-primary { +.btn.btn-primary { font-weight: bold; } -.btn-default { +.btn.btn-default { border: 1px solid $gray-400; background-color: $white; color: $black; diff --git a/app/styles/modules/card.scss b/app/styles/modules/card.scss index 50e85da12..6003965f6 100644 --- a/app/styles/modules/card.scss +++ b/app/styles/modules/card.scss @@ -66,8 +66,7 @@ $card-border: 0 solid $gray-300; .card-header { border: 0; background-color: $white; - padding-right: 0.8rem; - padding-left: 0.8rem; + padding: 0.8rem; h5 { margin-bottom: 0; @@ -152,6 +151,7 @@ $card-border: 0 solid $gray-300; } .card-subheader-row { + border-bottom: 1px solid $gray-200; width: 100%; .card-subheader-item { diff --git a/app/styles/modules/checkbox.scss b/app/styles/modules/checkbox.scss deleted file mode 100644 index 37e0245f2..000000000 --- a/app/styles/modules/checkbox.scss +++ /dev/null @@ -1,82 +0,0 @@ -// Customize the label -.form-check-label { - display: block; - position: relative; - margin-bottom: 12px; - cursor: pointer; - padding-right: 12px; - padding-left: 35px; - user-select: none; - - // Hide the browser's default checkbox - input { - position: absolute; - opacity: 0; - - &:checked ~ .custom-radiobutton { - border: 1px solid $brand-primary; - background-color: $brand-primary; - } - - &:checked ~ .custom-radiobutton::after { - display: block; - } - - &:hover ~ .custom-radiobutton { - border: 1px solid $brand-primary; - background-color: $brand-primary; - } - - &:checked ~ .custom-checkmark { - border: 1px solid $brand-primary; - background-color: $brand-primary; - } - - &:checked ~ .custom-checkmark::after { - display: block; - } - - &:hover ~ .custom-checkmark { - border: 1px solid $brand-primary; - background-color: $brand-primary; - } - } - - // Create a custom checkbox - .custom-checkmark, - .custom-radiobutton { - position: absolute; - top: 2px; - left: 3px; - border: 1px solid $gray-300; - background-color: $white; - width: 18px; - height: 18px; - - // Create the checkmark/indicator - &::after { - display: none; - position: absolute; - top: 2px; - left: 6px; - transform: rotate(45deg); - border: solid $white; - border-width: 0 2px 2px 0; - width: 5px; - height: 10px; - content: ''; - } - } - - .custom-checkmark { - border-radius: 4px; - } - - .custom-radiobutton { - border-radius: 50%; - } -} - -.input-checkmark { - margin-top: -4px; -} diff --git a/app/styles/modules/forms.scss b/app/styles/modules/forms.scss index 88b5fa542..71e1f6fd9 100644 --- a/app/styles/modules/forms.scss +++ b/app/styles/modules/forms.scss @@ -60,36 +60,26 @@ legend { align-items: center; height: $navbar-height; - .input-group-prepend { - border: 0; - padding-right: 1px; - } - - .input-group-append { - border: 0; + div { + width: fit-content; } .input-group-text { border: 0; - background-color: rgb(255 255 255 / 50%); + background-color: tint-color($brand-primary, 50%); /* stylelint-disable-line function-no-unknown */ } .filter-bar-filter { - margin-right: 1px; + margin-left: 0; border: 0; - background-color: rgb(255 255 255 / 50%); + background-color: tint-color($brand-primary, 50%); /* stylelint-disable-line function-no-unknown */ padding: 0; padding-left: 12px; } - .input-group-append button { - border: 0; - background-color: rgb(255 255 255 / 50%); - } - - .input-group-prepend button { + .input-group button { border: 0; - background-color: rgb(255 255 255 / 50%); + background-color: tint-color($brand-primary, 50%); /* stylelint-disable-line function-no-unknown */ } .form-check { diff --git a/app/styles/modules/profile-picture.scss b/app/styles/modules/profile-picture.scss index 693ca44eb..85c7c659e 100644 --- a/app/styles/modules/profile-picture.scss +++ b/app/styles/modules/profile-picture.scss @@ -2,6 +2,7 @@ @include border-radius(50%); object-fit: cover; + padding: 0; } .profile-picture { diff --git a/app/styles/modules/rtable.scss b/app/styles/modules/rtable.scss index 1497dea1a..85571b6fb 100644 --- a/app/styles/modules/rtable.scss +++ b/app/styles/modules/rtable.scss @@ -9,6 +9,7 @@ display: inline; position: absolute; margin-left: -18px; + line-height: 1.6rem; } .rtable-header-item { diff --git a/app/styles/modules/table.scss b/app/styles/modules/table.scss index 1c621b8dd..bf9e7e7d4 100644 --- a/app/styles/modules/table.scss +++ b/app/styles/modules/table.scss @@ -3,6 +3,12 @@ overflow: hidden; overflow-x: scroll; + thead { + tr { + border-bottom: 2px solid $gray-400; + } + } + th { background-color: $gray-100; diff --git a/app/styles/modules/video.scss b/app/styles/modules/video.scss index 627b66cf1..59b15100b 100644 --- a/app/styles/modules/video.scss +++ b/app/styles/modules/video.scss @@ -22,7 +22,7 @@ } } -.about-alpha { +.public-index-videos { position: relative; height: 100%; @@ -46,7 +46,7 @@ } @media (max-width: #{map-get($grid-breakpoints, lg)}) { - .about-alpha { + .public-index-videos { &__container { display: flex; position: static; @@ -66,7 +66,7 @@ } @media (max-width: #{map-get($grid-breakpoints, sm)}) { - .about-alpha { + .public-index-videos { &__video { flex-basis: 50%; max-width: 50%; diff --git a/app/styles/routes/groups.scss b/app/styles/routes/groups.scss new file mode 100644 index 000000000..57083493c --- /dev/null +++ b/app/styles/routes/groups.scss @@ -0,0 +1,4 @@ +.groups-avatar { + max-height: 75vh; + object-fit: contain; +} diff --git a/app/styles/routes/index.scss b/app/styles/routes/index.scss index 7995fa7a6..8c08bf713 100644 --- a/app/styles/routes/index.scss +++ b/app/styles/routes/index.scss @@ -1,202 +1,3 @@ -$header-height: 75vh; - -.text-xl { - padding-top: 20px; - width: 100%; - letter-spacing: 0.1rem; - color: $black; - font-size: 2.5rem; - font-weight: 700; -} - -.info-text { - font-size: 1.3rem; - font-weight: 200; -} - -@media (max-width: #{map-get($grid-breakpoints, md)}) { - .text-xl { - font-size: 2rem; - } -} - -.index-header { - display: flex; - position: relative; - flex-direction: column; - align-items: center; - justify-content: center; - margin-top: -44px; - height: $header-height; - min-height: 400px; - color: $white; - - .index-poster, .index-poster-overlay { - position: absolute; - top: 56px; - left: 50%; - margin-top: -$navbar-height; - margin-left: -50vw; - width: 100vw; - height: $header-height; - min-height: 400px; - } - - .index-poster { - background-position: center; - background-size: cover; - } - - .index-poster-overlay { - opacity: 0.25; - background-color: $black; - } - - .image { - width: 100%; - max-width: min(350px, 70vw); - } - - .new-member-text { - margin-bottom: 1.5rem; - width: min(95%, 700px); - text-align: center; - font-size: $font-size-h4; - } - - * { - z-index: 1; - } -} - -@include media-breakpoint-only(xs) { - .index-header { - padding-top: 1rem; - padding-bottom: 2rem; - height: fit-content; - - .index-poster, .index-poster-overlay { - height: 100%; - } - } -} - -.index-yellow-bar { - margin-top: 0; - background-color: $brand-primary; - padding-top: 20px; - padding-bottom: 20px; - overflow: hidden; - - .card-columns { - @include media-breakpoint-down(sm) { - column-count: 1; - } - - @include media-breakpoint-only(md) { - column-count: 2; - } - } -} - -.index-recent-news { - margin-top: 40px; - margin-bottom: 90px; -} - -.index-sidebar { - margin-top: calc(40px + 2.5rem); -} - -.index-action-buttons { - margin: 50px 0; - background-color: $gray-100; - padding-top: 40px; - padding-bottom: 20px; - color: $gray-900; - font-size: 1.2rem; - font-weight: 200; - - .info-holder { - @include media-breakpoint-down(md) { - font-size: 1.1rem; - } - - display: flex; - flex-direction: column; - align-content: space-between; - padding-bottom: 20px; - - p { - flex: 1; - } - } -} - -.frontpage-button { - border-color: $brand-primary; - background-color: $brand-primary; - max-width: 230px; - color: $black; - font-weight: bold; - - &:hover { - background-color: $brand-primary-dark; - color: $black; - } - - &--light { - border-color: $gray-300; - background-color: $gray-300; - } -} - -.index-photo-albums { - margin-bottom: 90px; -} - -.index-promo-video { - margin-top: 50px; - margin-bottom: 50px; -} - -.flux-image-holder { - margin-bottom: 10px; - object-fit: cover; -} - -.static-page-list { - background-color: $gray-300; - padding: 2rem 40px 1rem; - color: $gray-900; - - h3 { - margin-right: 20px; - font-size: 1.2rem; - font-weight: 200; - } -} - -.index-special-promo { - background-color: $black; - padding: 4rem; - color: $white; - - p { - font-size: 1.4rem; - font-weight: 200; - } -} - -.activity-modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - background-color: $opaque-black-halfly; -} - .article-cards-wrapper { overflow: hidden; } diff --git a/app/styles/routes/photos.scss b/app/styles/routes/photos.scss index c0a8d12f4..75776231e 100644 --- a/app/styles/routes/photos.scss +++ b/app/styles/routes/photos.scss @@ -1,12 +1,13 @@ // A photo in the overview of a photo album .photo-album-image-card { + position: relative; padding: 5px; .comments-counter { position: absolute; bottom: 0; margin-bottom: 1rem; - margin-left: 10px; + margin-left: 15px; padding-left: 5px; } diff --git a/app/styles/routes/public/index.scss b/app/styles/routes/public/index.scss new file mode 100644 index 000000000..5224a947d --- /dev/null +++ b/app/styles/routes/public/index.scss @@ -0,0 +1,22 @@ +.public-index { + .public-title { + margin-bottom: 1rem; + text-align: center; + font-family: "Libre Franklin", sans-serif; + font-size: 3rem; + + &.public-title-smaller { + margin-bottom: 0.8rem; + font-size: 2.5rem; + } + } + + .public-title-border { + width: 30vw; + } + + .public-no-items-text { + text-align: center; + font-size: 1.2rem; + } +} \ No newline at end of file diff --git a/app/styles/variables.scss b/app/styles/variables.scss index 8fcf1d694..36f5ee611 100644 --- a/app/styles/variables.scss +++ b/app/styles/variables.scss @@ -1,7 +1,7 @@ // Basic colors $brand-primary: #ffd218; //yellow $brand-primary-dark: #e0b400; //dark yellow -$brand-secondary: #b9182c; //darkred +$brand-secondary: #6f0218; //darkred $brand-info: #6889cc; //blue $brand-warning: #ff9904; //orange $brand-success: #00af43; //green @@ -9,6 +9,7 @@ $brand-danger: #ba211c; //red $brand-hidden: #6c0894; //purple $facebook-blue: #3b5998; $youtube-red: #c00; +$brand-cream: #FFFBE9; // grayscales (white to black) $white: #fff; @@ -24,6 +25,7 @@ $opaque-white-halfly: rgb(255 255 255 / 50%); $brand-primary-transparent-halfly: rgb(255 210 24 / 30%); $photo-card-height: 200px; +$public-activity-and-photo-holders-height: 400px; // also set the color scheme for Bootstrap $theme-colors: ( @@ -37,11 +39,33 @@ $theme-colors: ( dark: #333, ); +// link colors for tabs +$nav-link-color: $black; +$nav-link-hover-color: $brand-primary; + +// color of active inputs +$component-active-bg: $brand-primary; +$btn-hover-bg-tint-amount: 25%; +$btn-hover-border-tint-amount: 20%; + // sizes $image-input-max-height: 100pt; $image-input-max-width: 600pt; $navbar-height: 56px; +// padding of list-items +$list-group-item-padding-x: 1.25rem; +$list-group-item-padding-y: 0.75rem; + +// color of table stripes +$table-striped-bg-factor: 0.03; + +// colors of ember-power-select +$ember-power-select-border-color: #ced4da; // same as $gray-400 +$ember-power-select-trigger-icon-color: #ced4da; +$ember-power-select-focus-border-color: mix($white, $component-active-bg, 50%); /* stylelint-disable-line function-no-unknown */ +$ember-power-select-focus-box-shadow: 0 0 0 .2rem rgb(255 210 24 / 25%); + // pixel value used to responsively scale all typography, applied to the `` element. $font-size-root: 15px; @@ -99,6 +123,9 @@ $container-max-widths: ( $grid-columns: 12 !default; $grid-gutter-width: 1.875rem; // 30px +// Allow negative margins +$enable-negative-margins: true; + // fonts $font-family-sans-serif: 'nunito sans', 'Arial', sans-serif; $font-family-serif: 'Georgia', 'Times New Roman', 'Times', serif; diff --git a/app/templates/activities/activity/destroy.hbs b/app/templates/activities/activity/destroy.hbs new file mode 100644 index 000000000..7cfe851bf --- /dev/null +++ b/app/templates/activities/activity/destroy.hbs @@ -0,0 +1,21 @@ +
+
+
Activiteit verwijderen
+
+
+

+ Weet je zeker dat je deze activiteit ({{@model.title}}) wilt + verwijderen? +

+ + + + {{#if errorMessage}} +
{{this.errorMessage}}
+ {{/if}} +
+
\ No newline at end of file diff --git a/app/templates/activities/edit.hbs b/app/templates/activities/activity/edit.hbs similarity index 100% rename from app/templates/activities/edit.hbs rename to app/templates/activities/activity/edit.hbs diff --git a/app/templates/activities/generate-alias.hbs b/app/templates/activities/activity/generate-alias.hbs similarity index 100% rename from app/templates/activities/generate-alias.hbs rename to app/templates/activities/activity/generate-alias.hbs diff --git a/app/templates/activities/show.hbs b/app/templates/activities/activity/index.hbs similarity index 100% rename from app/templates/activities/show.hbs rename to app/templates/activities/activity/index.hbs diff --git a/app/templates/activities/print-enrolled.hbs b/app/templates/activities/activity/print-enrolled.hbs similarity index 83% rename from app/templates/activities/print-enrolled.hbs rename to app/templates/activities/activity/print-enrolled.hbs index 9fd66f23a..2a5ead808 100644 --- a/app/templates/activities/print-enrolled.hbs +++ b/app/templates/activities/activity/print-enrolled.hbs @@ -1,6 +1,6 @@
-
Afdrukinstellingen
+
Afdrukinstellingen