diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d50258e..ab465cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: run: | set -euo pipefail latest_version="$(jq -r '.version' package.json)" - count_expected=18 + count_expected=19 count_actual="$(grep -c "setup-pixi@v$latest_version" README.md || true)" if [ "$count_actual" -ne "$count_expected" ]; then echo "::error file=README.md::Expected $count_expected mentions of \`setup-pixi@v$latest_version\` in README.md, but found $count_actual." diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 748bc32..b4701d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -231,6 +231,53 @@ jobs: pixi-url-bearer-token: s3cr3tT0k3nABC123 - run: pixi --version | grep -q "pixi 0.14.0" + pixi-url-custom-template-no-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./ + with: + pixi-url: | + {{#if latest ~}} + https://github.com/prefix-dev/pixi/releases/download/v0.14.0/{{pixiFile}} + {{~else~}} + https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} + {{~/if}} + run-install: false + - run: pixi --version | grep -q "pixi 0.14.0" + + pixi-url-custom-template-version: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./ + with: + pixi-url: | + {{#if latest ~}} + https://github.com/prefix-dev/pixi/releases/download/v0.14.0/{{pixiFile}} + {{~else~}} + https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} + {{~/if}} + run-install: false + pixi-version: v0.15.1 + - run: pixi --version | grep -q "pixi 0.15.1" + + pixi-url-custom-template-version-latest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./ + with: + pixi-url: | + {{#if latest ~}} + https://github.com/prefix-dev/pixi/releases/download/v0.14.0/{{pixiFile}} + {{~else~}} + https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} + {{~/if}} + run-install: false + pixi-version: latest + - run: pixi --version | grep -q "pixi 0.14.0" + custom-manifest-path: strategy: matrix: diff --git a/README.md b/README.md index 7baa34f..ac22ef2 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m ## Usage ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: pixi-version: v0.49.0 @@ -35,7 +35,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m > [!WARNING] > Since pixi is not yet stable, the API of this action may change between minor versions. -> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.8.12`) to avoid breaking changes. +> Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.8.13`) to avoid breaking changes. > You can automatically update the version of this action by using [Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot). > > Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions: @@ -74,7 +74,7 @@ In order to not exceed the [10 GB cache size limit](https://docs.github.com/en/a This can be done by setting the `cache-write` argument. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: cache: true cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} @@ -119,7 +119,7 @@ test: environment: [py311, py312] steps: - uses: actions/checkout@v4 - - uses: prefix-dev/setup-pixi@v0.8.12 + - uses: prefix-dev/setup-pixi@v0.8.13 with: environments: ${{ matrix.environment }} ``` @@ -129,7 +129,7 @@ test: The following example will install both the `py311` and the `py312` environment on the runner. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: # separated by spaces environments: >- @@ -165,7 +165,7 @@ Specify the token using the `auth-token` input argument. This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev). ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: auth-host: prefix.dev auth-token: ${{ secrets.PREFIX_DEV_TOKEN }} @@ -177,7 +177,7 @@ Specify the username and password using the `auth-username` and `auth-password` This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: auth-host: custom-artifactory.com auth-username: ${{ secrets.PIXI_USERNAME }} @@ -190,7 +190,7 @@ Specify the conda-token using the `auth-conda-token` input argument. This form of authentication (token is encoded in URL: `https://my-quetz-instance.com/t//get/custom-channel`) is used at [anaconda.org](https://anaconda.org) or with [quetz instances](https://github.com/mamba-org/quetz). ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: auth-host: anaconda.org # or my-quetz-instance.com auth-conda-token: ${{ secrets.CONDA_TOKEN }} @@ -202,7 +202,7 @@ Specify the S3 key pair using the `auth-access-key-id` and `auth-secret-access-k You can also specify the session token using the `auth-session-token` input argument. ```yaml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: auth-host: s3://my-s3-bucket auth-s3-access-key-id: ${{ secrets.ACCESS_KEY_ID }} @@ -274,7 +274,7 @@ To this end, `setup-pixi` adds all environment variables set when executing `pix As a result, all installed binaries can be accessed without having to call `pixi run`. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: activate-environment: true ``` @@ -282,7 +282,7 @@ As a result, all installed binaries can be accessed without having to call `pixi If you are installing multiple environments, you will need to specify the name of the environment that you want to be activated. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: environments: >- py311 @@ -299,7 +299,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi See the [official documentation](https://prefix.dev/docs/pixi/cli#install) for more information about the `--frozen` and `--locked` flags. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: locked: true # or @@ -318,7 +318,7 @@ The first one is the debug logging of the action itself. This can be enabled by running the action with the `RUNNER_DEBUG` environment variable set to `true`. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 env: RUNNER_DEBUG: true ``` @@ -336,7 +336,7 @@ The second type is the debug logging of the pixi executable. This can be specified by setting the `log-level` input. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: # one of `q`, `default`, `v`, `vv`, or `vvv`. log-level: vvv @@ -362,7 +362,7 @@ If nothing is specified, `post-cleanup` will default to `true`. On self-hosted runners, you also might want to alter the default pixi install location to a temporary location. You can use `pixi-bin-path: ${{ runner.temp }}/bin/pixi` to do this. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: post-cleanup: true # ${{ runner.temp }}\Scripts\pixi.exe on Windows @@ -378,7 +378,7 @@ You can also use a preinstalled local version of pixi on the runner by not setti This can be overwritten by setting the `manifest-path` input argument. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: manifest-path: pyproject.toml ``` @@ -388,7 +388,7 @@ This can be overwritten by setting the `manifest-path` input argument. If you only want to install pixi and not install the current project, you can use the `run-install` option. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: run-install: false ``` @@ -399,12 +399,32 @@ You can also download pixi from a custom URL by setting the `pixi-url` input arg Optionally, you can combine this with the `pixi-url-bearer-token` input argument to authenticate the download request. ```yml -- uses: prefix-dev/setup-pixi@v0.8.12 +- uses: prefix-dev/setup-pixi@v0.8.13 with: pixi-url: https://pixi-mirror.example.com/releases/download/v0.48.0/pixi-x86_64-unknown-linux-musl pixi-url-bearer-token: ${{ secrets.PIXI_MIRROR_BEARER_TOKEN }} ``` +The `pixi-url` input argument can also be a [Handlebars](https://handlebarsjs.com/) template string. +It will be rendered with the following variables: + +- `version`: The version of pixi that is being installed (`latest` or a version like `v0.48.0`). +- `latest`: A boolean indicating if the version is `latest`. +- `pixiFile`: The name of the pixi binary to download, as determined by the system of the runner (e.g., `pixi-x86_64-unknown-linux-musl`). + +By default, `pixi-url` is equivalent to the following template: + +```yml +- uses: prefix-dev/setup-pixi@v0.8.13 + with: + pixi-url: | + {{#if latest~}} + https://github.com/prefix-dev/pixi/releases/latest/download/{{pixiFile}} + {{~else~}} + https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} + {{~/if}} +``` + ### Setting inputs from environment variables Alternatively to setting the inputs in the `with` section, you can also set each of them using environment variables. diff --git a/action.yml b/action.yml index 9c8f361..0a2227a 100644 --- a/action.yml +++ b/action.yml @@ -9,7 +9,7 @@ inputs: pixi-version: description: Version of pixi to install pixi-url: - description: URL of pixi to install + description: URL of pixi to install. Can be a Handlebars template receiving `version`, `latest`, and `pixiFile` as variables. pixi-url-bearer-token: description: Bearer token to use for authentication when downloading pixi from a URL. log-level: diff --git a/dist/index.js b/dist/index.js index 78c8e44..867dbdd 100644 --- a/dist/index.js +++ b/dist/index.js @@ -22062,6 +22062,5854 @@ var require_lib2 = __commonJS({ } }); +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js +var require_utils3 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.extend = extend2; + exports2.indexOf = indexOf; + exports2.escapeExpression = escapeExpression; + exports2.isEmpty = isEmpty; + exports2.createFrame = createFrame; + exports2.blockParams = blockParams; + exports2.appendContextPath = appendContextPath; + var escape2 = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "`": "`", + "=": "=" + }; + var badChars = /[&<>"'`=]/g; + var possible = /[&<>"'`=]/; + function escapeChar(chr) { + return escape2[chr]; + } + function extend2(obj) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + return obj; + } + var toString3 = Object.prototype.toString; + exports2.toString = toString3; + var isFunction = function isFunction2(value) { + return typeof value === "function"; + }; + if (isFunction(/x/)) { + exports2.isFunction = isFunction = function(value) { + return typeof value === "function" && toString3.call(value) === "[object Function]"; + }; + } + exports2.isFunction = isFunction; + var isArray = Array.isArray || function(value) { + return value && typeof value === "object" ? toString3.call(value) === "[object Array]" : false; + }; + exports2.isArray = isArray; + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + function escapeExpression(string) { + if (typeof string !== "string") { + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ""; + } else if (!string) { + return string + ""; + } + string = "" + string; + } + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + function createFrame(object) { + var frame = extend2({}, object); + frame._parent = object; + return frame; + } + function blockParams(params, ids) { + params.path = ids; + return params; + } + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + "." : "") + id; + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/exception.js +var require_exception = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/exception.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var errorProps = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"]; + function Exception(message, node) { + var loc = node && node.loc, line = void 0, endLineNumber = void 0, column = void 0, endColumn = void 0; + if (loc) { + line = loc.start.line; + endLineNumber = loc.end.line; + column = loc.start.column; + endColumn = loc.end.column; + message += " - " + line + ":" + column; + } + var tmp = Error.prototype.constructor.call(this, message); + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + try { + if (loc) { + this.lineNumber = line; + this.endLineNumber = endLineNumber; + if (Object.defineProperty) { + Object.defineProperty(this, "column", { + value: column, + enumerable: true + }); + Object.defineProperty(this, "endColumn", { + value: endColumn, + enumerable: true + }); + } else { + this.column = column; + this.endColumn = endColumn; + } + } + } catch (nop) { + } + } + Exception.prototype = new Error(); + exports2["default"] = Exception; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js +var require_block_helper_missing = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + exports2["default"] = function(instance) { + instance.registerHelper("blockHelperMissing", function(context, options2) { + var inverse = options2.inverse, fn = options2.fn; + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options2.ids) { + options2.ids = [options2.name]; + } + return instance.helpers.each(context, options2); + } else { + return inverse(this); + } + } else { + if (options2.data && options2.ids) { + var data = _utils.createFrame(options2.data); + data.contextPath = _utils.appendContextPath(options2.data.contextPath, options2.name); + options2 = { data }; + } + return fn(context, options2); + } + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +var require_each = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("each", function(context, options2) { + if (!options2) { + throw new _exception2["default"]("Must pass iterator to #each"); + } + var fn = options2.fn, inverse = options2.inverse, i = 0, ret = "", data = void 0, contextPath = void 0; + if (options2.data && options2.ids) { + contextPath = _utils.appendContextPath(options2.data.contextPath, options2.ids[0]) + "."; + } + if (_utils.isFunction(context)) { + context = context.call(this); + } + if (options2.data) { + data = _utils.createFrame(options2.data); + } + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + if (contextPath) { + data.contextPath = contextPath + field; + } + } + ret = ret + fn(context[field], { + data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + if (context && typeof context === "object") { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else if (typeof Symbol === "function" && context[Symbol.iterator]) { + var newContext = []; + var iterator = context[Symbol.iterator](); + for (var it = iterator.next(); !it.done; it = iterator.next()) { + newContext.push(it.value); + } + context = newContext; + for (var j = context.length; i < j; i++) { + execIteration(i, i, i === context.length - 1); + } + } else { + (function() { + var priorKey = void 0; + Object.keys(context).forEach(function(key) { + if (priorKey !== void 0) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + }); + if (priorKey !== void 0) { + execIteration(priorKey, i - 1, true); + } + })(); + } + } + if (i === 0) { + ret = inverse(this); + } + return ret; + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js +var require_helper_missing = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("helperMissing", function() { + if (arguments.length === 1) { + return void 0; + } else { + throw new _exception2["default"]('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js +var require_if = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("if", function(conditional, options2) { + if (arguments.length != 2) { + throw new _exception2["default"]("#if requires exactly one argument"); + } + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + if (!options2.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options2.inverse(this); + } else { + return options2.fn(this); + } + }); + instance.registerHelper("unless", function(conditional, options2) { + if (arguments.length != 2) { + throw new _exception2["default"]("#unless requires exactly one argument"); + } + return instance.helpers["if"].call(this, conditional, { + fn: options2.inverse, + inverse: options2.fn, + hash: options2.hash + }); + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js +var require_log = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + exports2["default"] = function(instance) { + instance.registerHelper("log", function() { + var args = [void 0], options2 = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + var level = 1; + if (options2.hash.level != null) { + level = options2.hash.level; + } else if (options2.data && options2.data.level != null) { + level = options2.data.level; + } + args[0] = level; + instance.log.apply(instance, args); + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js +var require_lookup = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + exports2["default"] = function(instance) { + instance.registerHelper("lookup", function(obj, field, options2) { + if (!obj) { + return obj; + } + return options2.lookupProperty(obj, field); + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js +var require_with = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("with", function(context, options2) { + if (arguments.length != 2) { + throw new _exception2["default"]("#with requires exactly one argument"); + } + if (_utils.isFunction(context)) { + context = context.call(this); + } + var fn = options2.fn; + if (!_utils.isEmpty(context)) { + var data = options2.data; + if (options2.data && options2.ids) { + data = _utils.createFrame(options2.data); + data.contextPath = _utils.appendContextPath(options2.data.contextPath, options2.ids[0]); + } + return fn(context, { + data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options2.inverse(this); + } + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers.js +var require_helpers = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.registerDefaultHelpers = registerDefaultHelpers; + exports2.moveHelperToHooks = moveHelperToHooks; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _helpersBlockHelperMissing = require_block_helper_missing(); + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + var _helpersEach = require_each(); + var _helpersEach2 = _interopRequireDefault(_helpersEach); + var _helpersHelperMissing = require_helper_missing(); + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + var _helpersIf = require_if(); + var _helpersIf2 = _interopRequireDefault(_helpersIf); + var _helpersLog = require_log(); + var _helpersLog2 = _interopRequireDefault(_helpersLog); + var _helpersLookup = require_lookup(); + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + var _helpersWith = require_with(); + var _helpersWith2 = _interopRequireDefault(_helpersWith); + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2["default"](instance); + _helpersEach2["default"](instance); + _helpersHelperMissing2["default"](instance); + _helpersIf2["default"](instance); + _helpersLog2["default"](instance); + _helpersLookup2["default"](instance); + _helpersWith2["default"](instance); + } + function moveHelperToHooks(instance, helperName, keepHelper) { + if (instance.helpers[helperName]) { + instance.hooks[helperName] = instance.helpers[helperName]; + if (!keepHelper) { + delete instance.helpers[helperName]; + } + } + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js +var require_inline = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + exports2["default"] = function(instance) { + instance.registerDecorator("inline", function(fn, props, container, options2) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function(context, options3) { + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret2 = fn(context, options3); + container.partials = original; + return ret2; + }; + } + props.partials[options2.args[0]] = options2.fn; + return ret; + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators.js +var require_decorators = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.registerDefaultDecorators = registerDefaultDecorators; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _decoratorsInline = require_inline(); + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + function registerDefaultDecorators(instance) { + _decoratorsInline2["default"](instance); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/logger.js +var require_logger = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/logger.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + var logger5 = { + methodMap: ["debug", "info", "warn", "error"], + level: "info", + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === "string") { + var levelMap2 = _utils.indexOf(logger5.methodMap, level.toLowerCase()); + if (levelMap2 >= 0) { + level = levelMap2; + } else { + level = parseInt(level, 10); + } + } + return level; + }, + // Can be overridden in the host environment + log: function log2(level) { + level = logger5.lookupLevel(level); + if (typeof console !== "undefined" && logger5.lookupLevel(logger5.level) <= level) { + var method = logger5.methodMap[level]; + if (!console[method]) { + method = "log"; + } + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + console[method].apply(console, message); + } + } + }; + exports2["default"] = logger5; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js +var require_create_new_lookup_object = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.createNewLookupObject = createNewLookupObject; + var _utils = require_utils3(); + function createNewLookupObject() { + for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { + sources[_key] = arguments[_key]; + } + return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources)); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +var require_proto_access = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.createProtoAccessControl = createProtoAccessControl; + exports2.resultIsAllowed = resultIsAllowed; + exports2.resetLoggedProperties = resetLoggedProperties; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _createNewLookupObject = require_create_new_lookup_object(); + var _logger = require_logger(); + var _logger2 = _interopRequireDefault(_logger); + var loggedProperties = /* @__PURE__ */ Object.create(null); + function createProtoAccessControl(runtimeOptions) { + var defaultMethodWhiteList = /* @__PURE__ */ Object.create(null); + defaultMethodWhiteList["constructor"] = false; + defaultMethodWhiteList["__defineGetter__"] = false; + defaultMethodWhiteList["__defineSetter__"] = false; + defaultMethodWhiteList["__lookupGetter__"] = false; + var defaultPropertyWhiteList = /* @__PURE__ */ Object.create(null); + defaultPropertyWhiteList["__proto__"] = false; + return { + properties: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), + defaultValue: runtimeOptions.allowProtoPropertiesByDefault + }, + methods: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), + defaultValue: runtimeOptions.allowProtoMethodsByDefault + } + }; + } + function resultIsAllowed(result, protoAccessControl, propertyName) { + if (typeof result === "function") { + return checkWhiteList(protoAccessControl.methods, propertyName); + } else { + return checkWhiteList(protoAccessControl.properties, propertyName); + } + } + function checkWhiteList(protoAccessControlForType, propertyName) { + if (protoAccessControlForType.whitelist[propertyName] !== void 0) { + return protoAccessControlForType.whitelist[propertyName] === true; + } + if (protoAccessControlForType.defaultValue !== void 0) { + return protoAccessControlForType.defaultValue; + } + logUnexpecedPropertyAccessOnce(propertyName); + return false; + } + function logUnexpecedPropertyAccessOnce(propertyName) { + if (loggedProperties[propertyName] !== true) { + loggedProperties[propertyName] = true; + _logger2["default"].log("error", 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); + } + } + function resetLoggedProperties() { + Object.keys(loggedProperties).forEach(function(propertyName) { + delete loggedProperties[propertyName]; + }); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/base.js +var require_base = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/base.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.HandlebarsEnvironment = HandlebarsEnvironment; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _helpers = require_helpers(); + var _decorators = require_decorators(); + var _logger = require_logger(); + var _logger2 = _interopRequireDefault(_logger); + var _internalProtoAccess = require_proto_access(); + var VERSION = "4.7.8"; + exports2.VERSION = VERSION; + var COMPILER_REVISION = 8; + exports2.COMPILER_REVISION = COMPILER_REVISION; + var LAST_COMPATIBLE_COMPILER_REVISION = 7; + exports2.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; + var REVISION_CHANGES = { + 1: "<= 1.0.rc.2", + // 1.0.rc.2 is actually rev2 but doesn't report it + 2: "== 1.0.0-rc.3", + 3: "== 1.0.0-rc.4", + 4: "== 1.x.x", + 5: "== 2.0.0-alpha.x", + 6: ">= 2.0.0-beta.1", + 7: ">= 4.0.0 <4.3.0", + 8: ">= 4.3.0" + }; + exports2.REVISION_CHANGES = REVISION_CHANGES; + var objectType2 = "[object Object]"; + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + logger: _logger2["default"], + log: _logger2["default"].log, + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType2) { + if (fn) { + throw new _exception2["default"]("Arg not supported with multiple helpers"); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType2) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === "undefined") { + throw new _exception2["default"]('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType2) { + if (fn) { + throw new _exception2["default"]("Arg not supported with multiple decorators"); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + }, + /** + * Reset the memory of illegal property accesses that have already been logged. + * @deprecated should only be used in handlebars test-cases + */ + resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { + _internalProtoAccess.resetLoggedProperties(); + } + }; + var log2 = _logger2["default"].log; + exports2.log = log2; + exports2.createFrame = _utils.createFrame; + exports2.logger = _logger2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/safe-string.js +var require_safe_string = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/safe-string.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function SafeString(string) { + this.string = string; + } + SafeString.prototype.toString = SafeString.prototype.toHTML = function() { + return "" + this.string; + }; + exports2["default"] = SafeString; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js +var require_wrapHelper = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.wrapHelper = wrapHelper; + function wrapHelper(helper, transformOptionsFn) { + if (typeof helper !== "function") { + return helper; + } + var wrapper = function wrapper2() { + var options2 = arguments[arguments.length - 1]; + arguments[arguments.length - 1] = transformOptionsFn(options2); + return helper.apply(this, arguments); + }; + return wrapper; + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/runtime.js +var require_runtime = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/runtime.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.checkRevision = checkRevision; + exports2.template = template; + exports2.wrapProgram = wrapProgram; + exports2.resolvePartial = resolvePartial; + exports2.invokePartial = invokePartial; + exports2.noop = noop; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } + } + var _utils = require_utils3(); + var Utils = _interopRequireWildcard(_utils); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _base = require_base(); + var _helpers = require_helpers(); + var _internalWrapHelper = require_wrapHelper(); + var _internalProtoAccess = require_proto_access(); + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, currentRevision = _base.COMPILER_REVISION; + if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { + return; + } + if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + runtimeVersions + ") or downgrade your runtime to an older version (" + compilerVersions + ")."); + } else { + throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + compilerInfo[1] + ")."); + } + } + function template(templateSpec, env) { + if (!env) { + throw new _exception2["default"]("No environment passed to template"); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2["default"]("Unknown template object: " + typeof templateSpec); + } + templateSpec.main.decorator = templateSpec.main_d; + env.VM.checkRevision(templateSpec.compiler); + var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; + function invokePartialWrapper(partial, context, options2) { + if (options2.hash) { + context = Utils.extend({}, context, options2.hash); + if (options2.ids) { + options2.ids[0] = true; + } + } + partial = env.VM.resolvePartial.call(this, partial, context, options2); + var extendedOptions = Utils.extend({}, options2, { + hooks: this.hooks, + protoAccessControl: this.protoAccessControl + }); + var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); + if (result == null && env.compile) { + options2.partials[options2.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options2.partials[options2.name](context, extendedOptions); + } + if (result != null) { + if (options2.indent) { + var lines = result.split("\n"); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + lines[i] = options2.indent + lines[i]; + } + result = lines.join("\n"); + } + return result; + } else { + throw new _exception2["default"]("The partial " + options2.name + " could not be compiled when running in runtime-only mode"); + } + } + var container = { + strict: function strict(obj, name, loc) { + if (!obj || !(name in obj)) { + throw new _exception2["default"]('"' + name + '" not defined in ' + obj, { + loc + }); + } + return container.lookupProperty(obj, name); + }, + lookupProperty: function lookupProperty(parent, propertyName) { + var result = parent[propertyName]; + if (result == null) { + return result; + } + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return result; + } + if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { + return result; + } + return void 0; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + var result = depths[i] && container.lookupProperty(depths[i], name); + if (result != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === "function" ? current.call(context) : current; + }, + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + fn: function fn(i) { + var ret2 = templateSpec[i]; + ret2.decorator = templateSpec[i + "_d"]; + return ret2; + }, + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + mergeIfNeeded: function mergeIfNeeded(param, common) { + var obj = param || common; + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + return obj; + }, + // An empty object to use as replacement for null-contexts + nullContext: Object.seal({}), + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + function ret(context) { + var options2 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + var data = options2.data; + ret._setup(options2); + if (!options2.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = void 0, blockParams = templateSpec.useBlockParams ? [] : void 0; + if (templateSpec.useDepths) { + if (options2.depths) { + depths = context != options2.depths[0] ? [context].concat(options2.depths) : options2.depths; + } else { + depths = [context]; + } + } + function main(context2) { + return "" + templateSpec.main(container, context2, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options2.depths || [], data, blockParams); + return main(context, options2); + } + ret.isTop = true; + ret._setup = function(options2) { + if (!options2.partial) { + var mergedHelpers = Utils.extend({}, env.helpers, options2.helpers); + wrapHelpersToPassLookupProperty(mergedHelpers, container); + container.helpers = mergedHelpers; + if (templateSpec.usePartial) { + container.partials = container.mergeIfNeeded(options2.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = Utils.extend({}, env.decorators, options2.decorators); + } + container.hooks = {}; + container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options2); + var keepHelperInHelpers = options2.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; + _helpers.moveHelperToHooks(container, "helperMissing", keepHelperInHelpers); + _helpers.moveHelperToHooks(container, "blockHelperMissing", keepHelperInHelpers); + } else { + container.protoAccessControl = options2.protoAccessControl; + container.helpers = options2.helpers; + container.partials = options2.partials; + container.decorators = options2.decorators; + container.hooks = options2.hooks; + } + }; + ret._child = function(i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2["default"]("must pass block params"); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2["default"]("must pass parent depths"); + } + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options2 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + var currentDepths = depths; + if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { + currentDepths = [context].concat(depths); + } + return fn(container, context, container.helpers, container.partials, options2.data || data, blockParams && [options2.blockParams].concat(blockParams), currentDepths); + } + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + function resolvePartial(partial, context, options2) { + if (!partial) { + if (options2.name === "@partial-block") { + partial = options2.data["partial-block"]; + } else { + partial = options2.partials[options2.name]; + } + } else if (!partial.call && !options2.name) { + options2.name = partial; + partial = options2.partials[partial]; + } + return partial; + } + function invokePartial(partial, context, options2) { + var currentPartialBlock = options2.data && options2.data["partial-block"]; + options2.partial = true; + if (options2.ids) { + options2.data.contextPath = options2.ids[0] || options2.data.contextPath; + } + var partialBlock = void 0; + if (options2.fn && options2.fn !== noop) { + (function() { + options2.data = _base.createFrame(options2.data); + var fn = options2.fn; + partialBlock = options2.data["partial-block"] = function partialBlockWrapper(context2) { + var options3 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options3.data = _base.createFrame(options3.data); + options3.data["partial-block"] = currentPartialBlock; + return fn(context2, options3); + }; + if (fn.partials) { + options2.partials = Utils.extend({}, options2.partials, fn.partials); + } + })(); + } + if (partial === void 0 && partialBlock) { + partial = partialBlock; + } + if (partial === void 0) { + throw new _exception2["default"]("The partial " + options2.name + " could not be found"); + } else if (partial instanceof Function) { + return partial(context, options2); + } + } + function noop() { + return ""; + } + function initData(context, data) { + if (!data || !("root" in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + function wrapHelpersToPassLookupProperty(mergedHelpers, container) { + Object.keys(mergedHelpers).forEach(function(helperName) { + var helper = mergedHelpers[helperName]; + mergedHelpers[helperName] = passLookupPropertyOption(helper, container); + }); + } + function passLookupPropertyOption(helper, container) { + var lookupProperty = container.lookupProperty; + return _internalWrapHelper.wrapHelper(helper, function(options2) { + return Utils.extend({ lookupProperty }, options2); + }); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js +var require_no_conflict = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + exports2["default"] = function(Handlebars2) { + (function() { + if (typeof globalThis === "object") return; + Object.prototype.__defineGetter__("__magic__", function() { + return this; + }); + __magic__.globalThis = __magic__; + delete Object.prototype.__magic__; + })(); + var $Handlebars = globalThis.Handlebars; + Handlebars2.noConflict = function() { + if (globalThis.Handlebars === Handlebars2) { + globalThis.Handlebars = $Handlebars; + } + return Handlebars2; + }; + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.runtime.js +var require_handlebars_runtime = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.runtime.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } + } + var _handlebarsBase = require_base(); + var base = _interopRequireWildcard(_handlebarsBase); + var _handlebarsSafeString = require_safe_string(); + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + var _handlebarsException = require_exception(); + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + var _handlebarsUtils = require_utils3(); + var Utils = _interopRequireWildcard(_handlebarsUtils); + var _handlebarsRuntime = require_runtime(); + var runtime = _interopRequireWildcard(_handlebarsRuntime); + var _handlebarsNoConflict = require_no_conflict(); + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + function create() { + var hb = new base.HandlebarsEnvironment(); + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2["default"]; + hb.Exception = _handlebarsException2["default"]; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + hb.VM = runtime; + hb.template = function(spec) { + return runtime.template(spec, hb); + }; + return hb; + } + var inst = create(); + inst.create = create; + _handlebarsNoConflict2["default"](inst); + inst["default"] = inst; + exports2["default"] = inst; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js +var require_ast = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash); + }, + scopedId: function scopedId(path4) { + return /^\.|this\b/.test(path4.original); + }, + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path4) { + return path4.parts.length === 1 && !AST.helpers.scopedId(path4) && !path4.depth; + } + } + }; + exports2["default"] = AST; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +var require_parser = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var handlebars = function() { + var parser = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: "CommentStatement", + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + break; + case 10: + this.$ = { + type: "ContentStatement", + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + this.$ = { strip: $$[$0 - 2].strip, program, chain: true }; + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: "PartialStatement", + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: "", + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: "SubExpression", + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + break; + case 30: + this.$ = { type: "Hash", pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: "HashPair", key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: "StringLiteral", value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: "NumberLiteral", value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: "BooleanLiteral", value: $$[$0] === "true", original: $$[$0] === "true", loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: "NullLiteral", original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] }); + this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = []; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse3(input) { + var self2 = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self2.lexer.lex() || 1; + if (typeof token !== "number") { + token = self2.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state3, action5, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state3 = stack[stack.length - 1]; + if (this.defaultActions[state3]) { + action5 = this.defaultActions[state3]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action5 = table[state3] && table[state3][symbol]; + } + if (typeof action5 === "undefined" || !action5.length || !action5[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state3]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected }); + } + } + if (action5[0] instanceof Array && action5.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state3 + ", token: " + symbol); + } + switch (action5[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action5[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action5[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action5[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action5[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== "undefined") { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } + }; + lexer2.options = {}; + lexer2.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + function strip(start, end) { + return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); + } + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + break; + case 3: + this.begin("raw"); + return 15; + break; + case 4: + this.popState(); + if (this.conditionStack[this.conditionStack.length - 1] === "raw") { + return 15; + } else { + strip(5, 9); + return "END_RAW_BLOCK"; + } + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin("raw"); + return 23; + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState(); + return 44; + break; + case 16: + this.popState(); + return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin("com"); + break; + case 22: + this.popState(); + return 14; + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + break; + case 29: + this.popState(); + return 54; + break; + case 30: + this.popState(); + return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"'); + return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'"); + return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, "$1"); + return 72; + break; + case 43: + return "INVALID"; + break; + case 44: + return 5; + break; + } + }; + lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer2; + }(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser; + parser.Parser = Parser; + return new Parser(); + }(); + exports2["default"] = handlebars; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +var require_visitor = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + function Visitor() { + this.parents = []; + } + Visitor.prototype = { + constructor: Visitor, + mutating: false, + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + if (value && !Visitor.prototype[value.type]) { + throw new _exception2["default"]('Unexpected node type "' + value.type + '" found when accepting ' + name + " on " + node.type); + } + node[name] = value; + } + }, + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + if (!node[name]) { + throw new _exception2["default"](node.type + " requires " + name); + } + }, + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + accept: function accept3(object) { + if (!object) { + return; + } + if (!this[object.type]) { + throw new _exception2["default"]("Unknown type: " + object.type, object); + } + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + var ret = this[object.type](object); + this.current = this.parents.shift(); + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + Program: function Program(program) { + this.acceptArray(program.body); + }, + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + this.acceptKey(partial, "program"); + }, + ContentStatement: function ContentStatement() { + }, + CommentStatement: function CommentStatement() { + }, + SubExpression: visitSubExpression, + PathExpression: function PathExpression() { + }, + StringLiteral: function StringLiteral() { + }, + NumberLiteral: function NumberLiteral() { + }, + BooleanLiteral: function BooleanLiteral() { + }, + UndefinedLiteral: function UndefinedLiteral() { + }, + NullLiteral: function NullLiteral() { + }, + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, "value"); + } + }; + function visitSubExpression(mustache) { + this.acceptRequired(mustache, "path"); + this.acceptArray(mustache.params); + this.acceptKey(mustache, "hash"); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + this.acceptKey(block, "program"); + this.acceptKey(block, "inverse"); + } + function visitPartial(partial) { + this.acceptRequired(partial, "name"); + this.acceptArray(partial.params); + this.acceptKey(partial, "hash"); + } + exports2["default"] = Visitor; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +var require_whitespace_control = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _visitor = require_visitor(); + var _visitor2 = _interopRequireDefault(_visitor); + function WhitespaceControl() { + var options2 = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0]; + this.options = options2; + } + WhitespaceControl.prototype = new _visitor2["default"](); + WhitespaceControl.prototype.Program = function(program) { + var doStandalone = !this.options.ignoreStandalone; + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + var body2 = program.body; + for (var i = 0, l = body2.length; i < l; i++) { + var current = body2[i], strip = this.accept(current); + if (!strip) { + continue; + } + var _isPrevWhitespace = isPrevWhitespace(body2, i, isRoot), _isNextWhitespace = isNextWhitespace(body2, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + if (strip.close) { + omitRight(body2, i, true); + } + if (strip.open) { + omitLeft(body2, i, true); + } + if (doStandalone && inlineStandalone) { + omitRight(body2, i); + if (omitLeft(body2, i)) { + if (current.type === "PartialStatement") { + current.indent = /([ \t]+$)/.exec(body2[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + omitLeft(body2, i); + } + if (doStandalone && closeStandalone) { + omitRight(body2, i); + omitLeft((current.inverse || current.program).body); + } + } + return program; + }; + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(block) { + this.accept(block.program); + this.accept(block.inverse); + var program = block.program || block.inverse, inverse = block.program && block.inverse, firstInverse = inverse, lastInverse = inverse; + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + if (inverse) { + var inverseStrip = block.inverseStrip; + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + return strip; + }; + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(mustache) { + return mustache.strip; + }; + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(node) { + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + function isPrevWhitespace(body2, i, isRoot) { + if (i === void 0) { + i = body2.length; + } + var prev = body2[i - 1], sibling = body2[i - 2]; + if (!prev) { + return isRoot; + } + if (prev.type === "ContentStatement") { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body2, i, isRoot) { + if (i === void 0) { + i = -1; + } + var next = body2[i + 1], sibling = body2[i + 2]; + if (!next) { + return isRoot; + } + if (next.type === "ContentStatement") { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + function omitRight(body2, i, multiple) { + var current = body2[i == null ? 0 : i + 1]; + if (!current || current.type !== "ContentStatement" || !multiple && current.rightStripped) { + return; + } + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ""); + current.rightStripped = current.value !== original; + } + function omitLeft(body2, i, multiple) { + var current = body2[i == null ? body2.length - 1 : i - 1]; + if (!current || current.type !== "ContentStatement" || !multiple && current.leftStripped) { + return; + } + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ""); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + exports2["default"] = WhitespaceControl; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.SourceLocation = SourceLocation; + exports2.id = id; + exports2.stripFlags = stripFlags; + exports2.stripComment = stripComment; + exports2.preparePath = preparePath; + exports2.prepareMustache = prepareMustache; + exports2.prepareRawBlock = prepareRawBlock; + exports2.prepareBlock = prepareBlock; + exports2.prepareProgram = prepareProgram; + exports2.preparePartialBlock = preparePartialBlock; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + function validateClose(open, close) { + close = close.path ? close.path.original : close; + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + throw new _exception2["default"](open.path.original + " doesn't match " + close, errorNode); + } + } + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substring(1, token.length - 1); + } else { + return token; + } + } + function stripFlags(open, close) { + return { + open: open.charAt(2) === "~", + close: close.charAt(close.length - 3) === "~" + }; + } + function stripComment(comment) { + return comment.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, ""); + } + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + var original = data ? "@" : "", dig = [], depth = 0; + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, isLiteral = parts[i].original !== part; + original += (parts[i].separator || "") + part; + if (!isLiteral && (part === ".." || part === "." || part === "this")) { + if (dig.length > 0) { + throw new _exception2["default"]("Invalid path: " + original, { loc }); + } else if (part === "..") { + depth++; + } + } else { + dig.push(part); + } + } + return { + type: "PathExpression", + data, + depth, + parts: dig, + original, + loc + }; + } + function prepareMustache(path4, params, hash, open, strip, locInfo) { + var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&"; + var decorator = /\*/.test(open); + return { + type: decorator ? "Decorator" : "MustacheStatement", + path: path4, + params, + hash, + escaped, + strip, + loc: this.locInfo(locInfo) + }; + } + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + locInfo = this.locInfo(locInfo); + var program = { + type: "Program", + body: contents, + strip: {}, + loc: locInfo + }; + return { + type: "BlockStatement", + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + var decorator = /\*/.test(openBlock.open); + program.blockParams = openBlock.blockParams; + var inverse = void 0, inverseStrip = void 0; + if (inverseAndProgram) { + if (decorator) { + throw new _exception2["default"]("Unexpected inverse block on decorator", inverseAndProgram); + } + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + return { + type: decorator ? "DecoratorBlock" : "BlockStatement", + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program, + inverse, + openStrip: openBlock.strip, + inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, lastLoc = statements[statements.length - 1].loc; + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + return { + type: "Program", + body: statements, + strip: {}, + loc + }; + } + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + return { + type: "PartialBlockStatement", + name: open.path, + params: open.params, + hash: open.hash, + program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +var require_base2 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.parseWithoutProcessing = parseWithoutProcessing; + exports2.parse = parse3; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _parser = require_parser(); + var _parser2 = _interopRequireDefault(_parser); + var _whitespaceControl = require_whitespace_control(); + var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + var _helpers = require_helpers2(); + var Helpers = _interopRequireWildcard(_helpers); + var _utils = require_utils3(); + exports2.parser = _parser2["default"]; + var yy = {}; + _utils.extend(yy, Helpers); + function parseWithoutProcessing(input, options2) { + if (input.type === "Program") { + return input; + } + _parser2["default"].yy = yy; + yy.locInfo = function(locInfo) { + return new yy.SourceLocation(options2 && options2.srcName, locInfo); + }; + var ast = _parser2["default"].parse(input); + return ast; + } + function parse3(input, options2) { + var ast = parseWithoutProcessing(input, options2); + var strip = new _whitespaceControl2["default"](options2); + return strip.accept(ast); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +var require_compiler = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.Compiler = Compiler; + exports2.precompile = precompile; + exports2.compile = compile; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _utils = require_utils3(); + var _ast = require_ast(); + var _ast2 = _interopRequireDefault(_ast); + var slice = [].slice; + function Compiler() { + } + Compiler.prototype = { + compiler: Compiler, + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + return true; + }, + guid: 0, + compile: function compile2(program, options2) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options2; + this.stringParams = options2.stringParams; + this.trackIds = options2.trackIds; + options2.blockParams = options2.blockParams || []; + options2.knownHelpers = _utils.extend(/* @__PURE__ */ Object.create(null), { + helperMissing: true, + blockHelperMissing: true, + each: true, + "if": true, + unless: true, + "with": true, + log: true, + lookup: true + }, options2.knownHelpers); + return this.accept(program); + }, + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), result = childCompiler.compile(program, this.options), guid = this.guid++; + this.usePartial = this.usePartial || result.usePartial; + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + return guid; + }, + accept: function accept3(node) { + if (!this[node.type]) { + throw new _exception2["default"]("Unknown type: " + node.type, node); + } + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + var body2 = program.body, bodyLength = body2.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body2[i]); + } + this.options.blockParams.shift(); + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + return this; + }, + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + var program = block.program, inverse = block.inverse; + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + var type2 = this.classifySexpr(block); + if (type2 === "helper") { + this.helperSexpr(block, program, inverse); + } else if (type2 === "simple") { + this.simpleSexpr(block); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + this.opcode("emptyHash"); + this.opcode("blockValue", block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + this.opcode("emptyHash"); + this.opcode("ambiguousBlockValue"); + } + this.opcode("append"); + }, + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, void 0), path4 = decorator.path; + this.useDecorators = true; + this.opcode("registerDecorator", params.length, path4.original); + }, + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + var params = partial.params; + if (params.length > 1) { + throw new _exception2["default"]("Unsupported number of partial arguments: " + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode("pushLiteral", "undefined"); + } else { + params.push({ type: "PathExpression", parts: [], depth: 0 }); + } + } + var partialName = partial.name.original, isDynamic = partial.name.type === "SubExpression"; + if (isDynamic) { + this.accept(partial.name); + } + this.setupFullMustacheParams(partial, program, void 0, true); + var indent = partial.indent || ""; + if (this.options.preventIndent && indent) { + this.opcode("appendContent", indent); + indent = ""; + } + this.opcode("invokePartial", isDynamic, partialName, indent); + this.opcode("append"); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + if (mustache.escaped && !this.options.noEscape) { + this.opcode("appendEscaped"); + } else { + this.opcode("append"); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode("appendContent", content.value); + } + }, + CommentStatement: function CommentStatement() { + }, + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type2 = this.classifySexpr(sexpr); + if (type2 === "simple") { + this.simpleSexpr(sexpr); + } else if (type2 === "helper") { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path4 = sexpr.path, name = path4.parts[0], isBlock = program != null || inverse != null; + this.opcode("getContext", path4.depth); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + path4.strict = true; + this.accept(path4); + this.opcode("invokeAmbiguous", name, isBlock); + }, + simpleSexpr: function simpleSexpr(sexpr) { + var path4 = sexpr.path; + path4.strict = true; + this.accept(path4); + this.opcode("resolvePossibleLambda"); + }, + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), path4 = sexpr.path, name = path4.parts[0]; + if (this.options.knownHelpers[name]) { + this.opcode("invokeKnownHelper", params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr); + } else { + path4.strict = true; + path4.falsy = true; + this.accept(path4); + this.opcode("invokeHelper", params.length, path4.original, _ast2["default"].helpers.simpleId(path4)); + } + }, + PathExpression: function PathExpression(path4) { + this.addDepth(path4.depth); + this.opcode("getContext", path4.depth); + var name = path4.parts[0], scoped = _ast2["default"].helpers.scopedId(path4), blockParamId = !path4.depth && !scoped && this.blockParamIndex(name); + if (blockParamId) { + this.opcode("lookupBlockParam", blockParamId, path4.parts); + } else if (!name) { + this.opcode("pushContext"); + } else if (path4.data) { + this.options.data = true; + this.opcode("lookupData", path4.depth, path4.parts, path4.strict); + } else { + this.opcode("lookupOnContext", path4.parts, path4.falsy, path4.strict, scoped); + } + }, + StringLiteral: function StringLiteral(string) { + this.opcode("pushString", string.value); + }, + NumberLiteral: function NumberLiteral(number) { + this.opcode("pushLiteral", number.value); + }, + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode("pushLiteral", bool.value); + }, + UndefinedLiteral: function UndefinedLiteral() { + this.opcode("pushLiteral", "undefined"); + }, + NullLiteral: function NullLiteral() { + this.opcode("pushLiteral", "null"); + }, + Hash: function Hash(hash) { + var pairs = hash.pairs, i = 0, l = pairs.length; + this.opcode("pushHash"); + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode("assignToHash", pairs[i].key); + } + this.opcode("popHash"); + }, + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ + opcode: name, + args: slice.call(arguments, 1), + loc: this.sourceNode[0].loc + }); + }, + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + this.useDepths = true; + }, + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2["default"].helpers.simpleId(sexpr.path); + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + var isHelper = !isBlockParam && _ast2["default"].helpers.helperExpression(sexpr); + var isEligible = !isBlockParam && (isHelper || isSimple); + if (isEligible && !isHelper) { + var _name = sexpr.path.parts[0], options2 = this.options; + if (options2.knownHelpers[_name]) { + isHelper = true; + } else if (options2.knownHelpersOnly) { + isEligible = false; + } + } + if (isHelper) { + return "helper"; + } else if (isEligible) { + return "ambiguous"; + } else { + return "simple"; + } + }, + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ""; + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, "").replace(/\//g, "."); + } + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode("getContext", val.depth || 0); + this.opcode("pushStringParam", value, val.type); + if (val.type === "SubExpression") { + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = void 0; + if (val.parts && !_ast2["default"].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join("."); + this.opcode("pushId", "BlockParam", blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, ""); + } + this.opcode("pushId", val.type, value); + } + } + this.accept(val); + } + }, + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode("emptyHash", omitEmpty); + } + return params; + }, + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + function precompile(input, options2, env) { + if (input == null || typeof input !== "string" && input.type !== "Program") { + throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input); + } + options2 = options2 || {}; + if (!("data" in options2)) { + options2.data = true; + } + if (options2.compat) { + options2.useDepths = true; + } + var ast = env.parse(input, options2), environment = new env.Compiler().compile(ast, options2); + return new env.JavaScriptCompiler().compile(environment, options2); + } + function compile(input, options2, env) { + if (options2 === void 0) options2 = {}; + if (input == null || typeof input !== "string" && input.type !== "Program") { + throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input); + } + options2 = _utils.extend({}, options2); + if (!("data" in options2)) { + options2.data = true; + } + if (options2.compat) { + options2.useDepths = true; + } + var compiled = void 0; + function compileInput() { + var ast = env.parse(input, options2), environment = new env.Compiler().compile(ast, options2), templateSpec = new env.JavaScriptCompiler().compile(environment, options2, void 0, true); + return env.template(templateSpec); + } + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function(setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function(i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + function argEquals(a, b) { + if (a === b) { + return true; + } + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + sexpr.path = { + type: "PathExpression", + data: false, + depth: 0, + parts: [literal.original + ""], + original: literal.original + "", + loc: literal.loc + }; + } + } + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js +var require_base64 = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) { + "use strict"; + var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + exports2.encode = function(number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + exports2.decode = function(charCode) { + var bigA = 65; + var bigZ = 90; + var littleA = 97; + var littleZ = 122; + var zero = 48; + var nine = 57; + var plus = 43; + var slash = 47; + var littleOffset = 26; + var numberOffset = 52; + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } + if (charCode == plus) { + return 62; + } + if (charCode == slash) { + return 63; + } + return -1; + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js +var require_base64_vlq = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports2) { + "use strict"; + var base64 = require_base64(); + var VLQ_BASE_SHIFT = 5; + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + var VLQ_BASE_MASK = VLQ_BASE - 1; + var VLQ_CONTINUATION_BIT = VLQ_BASE; + function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; + } + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; + } + exports2.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + return encoded; + }; + exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js +var require_util8 = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js"(exports2) { + "use strict"; + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports2.getArg = getArg; + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports2.urlParse = urlParse; + function urlGenerate(aParsedUrl) { + var url2 = ""; + if (aParsedUrl.scheme) { + url2 += aParsedUrl.scheme + ":"; + } + url2 += "//"; + if (aParsedUrl.auth) { + url2 += aParsedUrl.auth + "@"; + } + if (aParsedUrl.host) { + url2 += aParsedUrl.host; + } + if (aParsedUrl.port) { + url2 += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url2 += aParsedUrl.path; + } + return url2; + } + exports2.urlGenerate = urlGenerate; + function normalize(aPath) { + var path4 = aPath; + var url2 = urlParse(aPath); + if (url2) { + if (!url2.path) { + return aPath; + } + path4 = url2.path; + } + var isAbsolute = exports2.isAbsolute(path4); + var parts = path4.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === ".") { + parts.splice(i, 1); + } else if (part === "..") { + up++; + } else if (up > 0) { + if (part === "") { + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path4 = parts.join("/"); + if (path4 === "") { + path4 = isAbsolute ? "/" : "."; + } + if (url2) { + url2.path = path4; + return urlGenerate(url2); + } + return path4; + } + exports2.normalize = normalize; + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || "/"; + } + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports2.join = join; + exports2.isAbsolute = function(aPath) { + return aPath.charAt(0) === "/" || urlRegexp.test(aPath); + }; + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + aRoot = aRoot.replace(/\/$/, ""); + var level = 0; + while (aPath.indexOf(aRoot + "/") !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + ++level; + } + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports2.relative = relative; + var supportsNullProto = function() { + var obj = /* @__PURE__ */ Object.create(null); + return !("__proto__" in obj); + }(); + function identity(s) { + return s; + } + function toSetString(aStr) { + if (isProtoString(aStr)) { + return "$" + aStr; + } + return aStr; + } + exports2.toSetString = supportsNullProto ? identity : toSetString; + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + return aStr; + } + exports2.fromSetString = supportsNullProto ? identity : fromSetString; + function isProtoString(s) { + if (!s) { + return false; + } + var length = s.length; + if (length < 9) { + return false; + } + if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { + return false; + } + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36) { + return false; + } + } + return true; + } + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByOriginalPositions = compareByOriginalPositions; + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + if (aStr1 === null) { + return 1; + } + if (aStr2 === null) { + return -1; + } + if (aStr1 > aStr2) { + return 1; + } + return -1; + } + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); + } + exports2.parseSourceMapInput = parseSourceMapInput; + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ""; + if (sourceRoot) { + if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { + sourceRoot += "/"; + } + sourceURL = sourceRoot + sourceURL; + } + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + var index = parsed.path.lastIndexOf("/"); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + return normalize(sourceURL); + } + exports2.computeSourceURL = computeSourceURL; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js +var require_array_set = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js"(exports2) { + "use strict"; + var util4 = require_util8(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null); + } + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util4.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util4.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util4.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error("No element indexed by " + aIdx); + }; + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + exports2.ArraySet = ArraySet; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js +var require_mapping_list = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js"(exports2) { + "use strict"; + var util4 = require_util8(); + function generatedPositionAfter(mappingA, mappingB) { + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util4.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + function MappingList() { + this._array = []; + this._sorted = true; + this._last = { generatedLine: -1, generatedColumn: 0 }; + } + MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util4.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + exports2.MappingList = MappingList; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js +var require_source_map_generator = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js"(exports2) { + "use strict"; + var base64VLQ = require_base64_vlq(); + var util4 = require_util8(); + var ArraySet = require_array_set().ArraySet; + var MappingList = require_mapping_list().MappingList; + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util4.getArg(aArgs, "file", null); + this._sourceRoot = util4.getArg(aArgs, "sourceRoot", null); + this._skipValidation = util4.getArg(aArgs, "skipValidation", false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + SourceMapGenerator.prototype._version = 3; + SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot + }); + aSourceMapConsumer.eachMapping(function(mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util4.relative(sourceRoot, newMapping.source); + } + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util4.relative(sourceRoot, sourceFile); + } + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util4.getArg(aArgs, "generated"); + var original = util4.getArg(aArgs, "original", null); + var source = util4.getArg(aArgs, "source", null); + var name = util4.getArg(aArgs, "name", null); + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source, + name + }); + }; + SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util4.relative(this._sourceRoot, source); + } + if (aSourceContent != null) { + if (!this._sourcesContents) { + this._sourcesContents = /* @__PURE__ */ Object.create(null); + } + this._sourcesContents[util4.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + delete this._sourcesContents[util4.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.` + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + if (sourceRoot != null) { + sourceFile = util4.relative(sourceRoot, sourceFile); + } + var newSources = new ArraySet(); + var newNames = new ArraySet(); + this._mappings.unsortedForEach(function(mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util4.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util4.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + this._sources = newSources; + this._names = newNames; + aSourceMapConsumer.sources.forEach(function(sourceFile2) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile2); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile2 = util4.join(aSourceMapPath, sourceFile2); + } + if (sourceRoot != null) { + sourceFile2 = util4.relative(sourceRoot, sourceFile2); + } + this.setSourceContent(sourceFile2, content); + } + }, this); + }; + SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { + throw new Error( + "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values." + ); + } + if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + return; + } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + return; + } else { + throw new Error("Invalid mapping: " + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ""; + var next; + var mapping; + var nameIdx; + var sourceIdx; + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ""; + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ";"; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util4.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ","; + } + } + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + result += next; + } + return result; + }; + SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function(source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util4.relative(aSourceRoot, source); + } + var key = util4.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); + }; + SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + return map; + }; + SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + exports2.SourceMapGenerator = SourceMapGenerator; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js +var require_binary_search = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js"(exports2) { + "use strict"; + exports2.GREATEST_LOWER_BOUND = 1; + exports2.LEAST_UPPER_BOUND = 2; + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + return mid; + } else if (cmp > 0) { + if (aHigh - mid > 1) { + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + if (mid - aLow > 1) { + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + var index = recursiveSearch( + -1, + aHaystack.length, + aNeedle, + aHaystack, + aCompare, + aBias || exports2.GREATEST_LOWER_BOUND + ); + if (index < 0) { + return -1; + } + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + return index; + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js +var require_quick_sort = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js"(exports2) { + "use strict"; + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); + } + function doQuickSort(ary, comparator, p, r) { + if (p < r) { + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + swap(ary, i + 1, j); + var q = i + 1; + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + exports2.quickSort = function(ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js +var require_source_map_consumer = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js"(exports2) { + "use strict"; + var util4 = require_util8(); + var binarySearch = require_binary_search(); + var ArraySet = require_array_set().ArraySet; + var base64VLQ = require_base64_vlq(); + var quickSort = require_quick_sort().quickSort; + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util4.parseSourceMapInput(aSourceMap); + } + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + SourceMapConsumer.prototype._version = 3; + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__generatedMappings; + } + }); + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__originalMappings; + } + }); + SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + var sourceRoot = this.sourceRoot; + mappings.map(function(mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util4.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util4.getArg(aArgs, "line"); + var needle = { + source: util4.getArg(aArgs, "source"), + originalLine: line, + originalColumn: util4.getArg(aArgs, "column", 0) + }; + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + var mappings = []; + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util4.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND + ); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (aArgs.column === void 0) { + var originalLine = mapping.originalLine; + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util4.getArg(mapping, "generatedLine", null), + column: util4.getArg(mapping, "generatedColumn", null), + lastColumn: util4.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util4.getArg(mapping, "generatedLine", null), + column: util4.getArg(mapping, "generatedColumn", null), + lastColumn: util4.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } + } + return mappings; + }; + exports2.SourceMapConsumer = SourceMapConsumer; + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util4.parseSourceMapInput(aSourceMap); + } + var version2 = util4.getArg(sourceMap, "version"); + var sources = util4.getArg(sourceMap, "sources"); + var names = util4.getArg(sourceMap, "names", []); + var sourceRoot = util4.getArg(sourceMap, "sourceRoot", null); + var sourcesContent = util4.getArg(sourceMap, "sourcesContent", null); + var mappings = util4.getArg(sourceMap, "mappings"); + var file = util4.getArg(sourceMap, "file", null); + if (version2 != this._version) { + throw new Error("Unsupported version: " + version2); + } + if (sourceRoot) { + sourceRoot = util4.normalize(sourceRoot); + } + sources = sources.map(String).map(util4.normalize).map(function(source) { + return sourceRoot && util4.isAbsolute(sourceRoot) && util4.isAbsolute(source) ? util4.relative(sourceRoot, source) : source; + }); + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this._absoluteSources = this._sources.toArray().map(function(s) { + return util4.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util4.relative(this.sourceRoot, relativeSource); + } + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + return -1; + }; + BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent( + smc._sources.toArray(), + smc.sourceRoot + ); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function(s) { + return util4.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + destOriginalMappings.push(destMapping); + } + destGeneratedMappings.push(destMapping); + } + quickSort(smc.__originalMappings, util4.compareByOriginalPositions); + return smc; + }; + BasicSourceMapConsumer.prototype._version = 3; + Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { + get: function() { + return this._absoluteSources.slice(); + } + }); + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + while (index < length) { + if (aStr.charAt(index) === ";") { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ",") { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + if (segment.length === 2) { + throw new Error("Found a source, but no line and column"); + } + if (segment.length === 3) { + throw new Error("Found a source and line, but no column"); + } + cachedSegments[str] = segment; + } + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + if (segment.length > 1) { + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + mapping.originalLine += 1; + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + if (segment.length > 4) { + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + generatedMappings.push(mapping); + if (typeof mapping.originalLine === "number") { + originalMappings.push(mapping); + } + } + } + quickSort(generatedMappings, util4.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util4.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + if (aNeedle[aLineName] <= 0) { + throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]); + } + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + mapping.lastGeneratedColumn = Infinity; + } + }; + BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util4.getArg(aArgs, "line"), + generatedColumn: util4.getArg(aArgs, "column") + }; + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util4.compareByGeneratedPositionsDeflated, + util4.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + if (index >= 0) { + var mapping = this._generatedMappings[index]; + if (mapping.generatedLine === needle.generatedLine) { + var source = util4.getArg(mapping, "source", null); + if (source !== null) { + source = this._sources.at(source); + source = util4.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util4.getArg(mapping, "name", null); + if (name !== null) { + name = this._names.at(name); + } + return { + source, + line: util4.getArg(mapping, "originalLine", null), + column: util4.getArg(mapping, "originalColumn", null), + name + }; + } + } + return { + source: null, + line: null, + column: null, + name: null + }; + }; + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { + return sc == null; + }); + }; + BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util4.relative(this.sourceRoot, relativeSource); + } + var url2; + if (this.sourceRoot != null && (url2 = util4.urlParse(this.sourceRoot))) { + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url2.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + if ((!url2.path || url2.path == "/") && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util4.getArg(aArgs, "source"); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + var needle = { + source, + originalLine: util4.getArg(aArgs, "line"), + originalColumn: util4.getArg(aArgs, "column") + }; + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util4.compareByOriginalPositions, + util4.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (mapping.source === needle.source) { + return { + line: util4.getArg(mapping, "generatedLine", null), + column: util4.getArg(mapping, "generatedColumn", null), + lastColumn: util4.getArg(mapping, "lastGeneratedColumn", null) + }; + } + } + return { + line: null, + column: null, + lastColumn: null + }; + }; + exports2.BasicSourceMapConsumer = BasicSourceMapConsumer; + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util4.parseSourceMapInput(aSourceMap); + } + var version2 = util4.getArg(sourceMap, "version"); + var sections = util4.getArg(sourceMap, "sections"); + if (version2 != this._version) { + throw new Error("Unsupported version: " + version2); + } + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function(s) { + if (s.url) { + throw new Error("Support for url field in sections not implemented."); + } + var offset = util4.getArg(s, "offset"); + var offsetLine = util4.getArg(offset, "line"); + var offsetColumn = util4.getArg(offset, "column"); + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error("Section offsets must be ordered and non-overlapping."); + } + lastOffset = offset; + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util4.getArg(s, "map"), aSourceMapURL) + }; + }); + } + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + IndexedSourceMapConsumer.prototype._version = 3; + Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { + get: function() { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util4.getArg(aArgs, "line"), + generatedColumn: util4.getArg(aArgs, "column") + }; + var sectionIndex = binarySearch.search( + needle, + this._sections, + function(needle2, section2) { + var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + return needle2.generatedColumn - section2.generatedOffset.generatedColumn; + } + ); + var section = this._sections[sectionIndex]; + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); + }; + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function(s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + if (section.consumer._findSourceIndex(util4.getArg(aArgs, "source")) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + return { + line: null, + column: null + }; + }; + IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + var source = section.consumer._sources.at(mapping.source); + source = util4.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + var adjustedMapping = { + source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name + }; + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === "number") { + this.__originalMappings.push(adjustedMapping); + } + } + } + quickSort(this.__generatedMappings, util4.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util4.compareByOriginalPositions); + }; + exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js +var require_source_node = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js"(exports2) { + "use strict"; + var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + var util4 = require_util8(); + var REGEX_NEWLINE = /(\r?\n)/; + var NEWLINE_CODE = 10; + var isSourceNode = "$$$isSourceNode$$$"; + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + var node = new SourceNode(); + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + var newLine = getNextLine() || ""; + return lineContents + newLine; + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0; + } + }; + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + var lastMapping = null; + aSourceMapConsumer.eachMapping(function(mapping) { + if (lastMapping !== null) { + if (lastGeneratedLine < mapping.generatedLine) { + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + } else { + var nextLine = remainingLines[remainingLinesIndex] || ""; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + lastMapping = mapping; + return; + } + } + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ""; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + addMappingWithCode(lastMapping, shiftNextLine()); + } + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util4.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + return node; + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === void 0) { + node.add(code); + } else { + var source = aRelativePath ? util4.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode( + mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name + )); + } + } + }; + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function(chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== "") { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } + }; + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === "string") { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push("".replace(aPattern, aReplacement)); + } + return this; + }; + SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util4.toSetString(aSourceFile)] = aSourceContent; + }; + SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util4.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function(chunk) { + str += chunk; + }); + return str; + }; + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function(chunk, original) { + generated.code += chunk; + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function(sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { code: generated.code, map }; + }; + exports2.SourceNode = SourceNode; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js +var require_source_map = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js"(exports2) { + "use strict"; + exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; + exports2.SourceNode = require_source_node().SourceNode; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +var require_code_gen = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + var SourceNode = void 0; + try { + if (typeof define !== "function" || !define.amd) { + SourceMap = require_source_map(); + SourceNode = SourceMap.SourceNode; + } + } catch (err) { + } + var SourceMap; + if (!SourceNode) { + SourceNode = function(line, column, srcFile, chunks) { + this.src = ""; + if (chunks) { + this.add(chunks); + } + }; + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(""); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(""); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString3() { + return this.src; + } + }; + } + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === "boolean" || typeof chunk === "number") { + return chunk + ""; + } + return chunk; + } + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + merge: function merge() { + var source = this.empty(); + this.each(function(line) { + source.add([" ", line, "\n"]); + }); + return source; + }, + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === void 0 ? this.currentLocation || { start: {} } : arguments[1]; + if (chunk instanceof SourceNode) { + return chunk; + } + chunk = castChunk(chunk, this, loc); + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + functionCall: function functionCall(fn, type2, params) { + params = this.generateList(params); + return this.wrap([fn, type2 ? "." + type2 + "(" : "(", params, ")"]); + }, + quotedString: function quotedString(str) { + return '"' + (str + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"'; + }, + objectLiteral: function objectLiteral(obj) { + var _this = this; + var pairs = []; + Object.keys(obj).forEach(function(key) { + var value = castChunk(obj[key], _this); + if (value !== "undefined") { + pairs.push([_this.quotedString(key), ":", value]); + } + }); + var ret = this.generateList(pairs); + ret.prepend("{"); + ret.add("}"); + return ret; + }, + generateList: function generateList2(entries) { + var ret = this.empty(); + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(","); + } + ret.add(castChunk(entries[i], this)); + } + return ret; + }, + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend("["); + ret.add("]"); + return ret; + } + }; + exports2["default"] = CodeGen; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +var require_javascript_compiler = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _base = require_base(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _utils = require_utils3(); + var _codeGen = require_code_gen(); + var _codeGen2 = _interopRequireDefault(_codeGen); + function Literal(value) { + this.value = value; + } + function JavaScriptCompiler() { + } + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name) { + return this.internalNameLookup(parent, name); + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable("container.lookup"), "(depths, ", JSON.stringify(name), ")"]; + }, + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, versions2 = _base.REVISION_CHANGES[revision]; + return [revision, versions2]; + }, + appendToBuffer: function appendToBuffer(source, location, explicit) { + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + if (this.environment.isSimple) { + return ["return ", source, ";"]; + } else if (explicit) { + return ["buffer += ", source, ";"]; + } else { + source.appendToBuffer = true; + return source; + } + }, + initializeBuffer: function initializeBuffer() { + return this.quotedString(""); + }, + // END PUBLIC API + internalNameLookup: function internalNameLookup(parent, name) { + this.lookupPropertyFunctionIsUsed = true; + return ["lookupProperty(", parent, ",", JSON.stringify(name), ")"]; + }, + lookupPropertyFunctionIsUsed: false, + compile: function compile(environment, options2, context, asObject) { + this.environment = environment; + this.options = options2; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + this.preamble(); + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + this.compileChildren(environment, options2); + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + var opcodes = environment.opcodes, opcode = void 0, firstLoc = void 0, i = void 0, l = void 0; + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + this.source.currentLocation = firstLoc; + this.pushSource(""); + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2["default"]("Compile completed with content left on stack"); + } + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + this.decorators.prepend(["var decorators = container.decorators, ", this.lookupPropertyFunctionVarDeclaration(), ";\n"]); + this.decorators.push("return fn;"); + if (asObject) { + this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]); + } else { + this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"); + this.decorators.push("}\n"); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = void 0; + } + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + if (this.decorators) { + ret.main_d = this.decorators; + ret.useDecorators = true; + } + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + "_d"] = decorators[i]; + ret.useDecorators = true; + } + } + } + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + if (options2.srcName) { + ret = ret.toStringWithSourceMap({ file: options2.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + return ret; + } else { + return fn; + } + }, + preamble: function preamble() { + this.lastContext = 0; + this.source = new _codeGen2["default"](this.options.srcName); + this.decorators = new _codeGen2["default"](this.options.srcName); + }, + createFunctionContext: function createFunctionContext(asObject) { + var _this = this; + var varDeclarations = ""; + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ", " + locals.join(", "); + } + var aliasCount = 0; + Object.keys(this.aliases).forEach(function(alias) { + var node = _this.aliases[alias]; + if (node.children && node.referenceCount > 1) { + varDeclarations += ", alias" + ++aliasCount + "=" + alias; + node.children[0] = "alias" + aliasCount; + } + }); + if (this.lookupPropertyFunctionIsUsed) { + varDeclarations += ", " + this.lookupPropertyFunctionVarDeclaration(); + } + var params = ["container", "depth0", "helpers", "partials", "data"]; + if (this.useBlockParams || this.useDepths) { + params.push("blockParams"); + } + if (this.useDepths) { + params.push("depths"); + } + var source = this.mergeSource(varDeclarations); + if (asObject) { + params.push(source); + return Function.apply(this, params); + } else { + return this.source.wrap(["function(", params.join(","), ") {\n ", source, "}"]); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, appendOnly = !this.forceBuffer, appendFirst = void 0, sourceSeen = void 0, bufferStart = void 0, bufferEnd = void 0; + this.source.each(function(line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(" + "); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend("buffer += "); + } + bufferEnd.add(";"); + bufferStart = bufferEnd = void 0; + } + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend("return "); + bufferEnd.add(";"); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ", buffer = " + (appendFirst ? "" : this.initializeBuffer()); + if (bufferStart) { + bufferStart.prepend("return buffer + "); + bufferEnd.add(";"); + } else { + this.source.push("return buffer;"); + } + } + if (varDeclarations) { + this.source.prepend("var " + varDeclarations.substring(2) + (appendFirst ? "" : ";\n")); + } + return this.source.merge(); + }, + lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { + return "\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim(); + }, + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + var blockName = this.popStack(); + params.splice(1, 0, blockName); + this.push(this.source.functionCall(blockHelperMissing, "call", params)); + }, + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)]; + this.setupHelperArgs("", 0, params, true); + this.flushInline(); + var current = this.topStack(); + params.splice(1, 0, current); + this.pushSource(["if (!", this.lastHelper, ") { ", current, " = ", this.source.functionCall(blockHelperMissing, "call", params), "}"]); + }, + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + this.pendingContent = content; + }, + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function(current) { + return [" != null ? ", current, ' : ""']; + }); + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(["if (", local, " != null) { ", this.appendToBuffer(local, void 0, true), " }"]); + if (this.environment.isSimple) { + this.pushSource(["else { ", this.appendToBuffer("''", void 0, true), " }"]); + } + } + }, + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"])); + }, + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + if (!scoped && this.options.compat && !this.lastContext) { + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + this.resolvePath("context", parts, i, falsy, strict); + }, + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + this.push(["blockParams[", blockParamId[0], "][", blockParamId[1], "]"]); + this.resolvePath("context", parts, 1); + }, + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral("data"); + } else { + this.pushStackLiteral("container.data(data, " + depth + ")"); + } + this.resolvePath("data", parts, 0, true, strict); + }, + resolvePath: function resolvePath(type2, parts, i, falsy, strict) { + var _this2 = this; + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, i, type2)); + return; + } + var len = parts.length; + for (; i < len; i++) { + this.replaceStack(function(current) { + var lookup = _this2.nameLookup(current, parts[i], type2); + if (!falsy) { + return [" != null ? ", lookup, " : ", current]; + } else { + return [" && ", lookup]; + } + }); + } + }, + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]); + }, + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type2) { + this.pushContext(); + this.pushString(type2); + if (type2 !== "SubExpression") { + if (typeof string === "string") { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push("{}"); + } + if (this.stringParams) { + this.push("{}"); + this.push("{}"); + } + this.pushStackLiteral(omitEmpty ? "undefined" : "{}"); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: {}, types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + this.push(this.objectLiteral(hash.values)); + }, + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup("decorators", name, "decorator"), options2 = this.setupHelperArgs(name, paramSize); + this.decorators.push(["fn = ", this.decorators.functionCall(foundDecorator, "", ["fn", "props", "container", options2]), " || fn;"]); + }, + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), helper = this.setupHelper(paramSize, name); + var possibleFunctionCalls = []; + if (isSimple) { + possibleFunctionCalls.push(helper.name); + } + possibleFunctionCalls.push(nonHelper); + if (!this.options.strict) { + possibleFunctionCalls.push(this.aliasable("container.hooks.helperMissing")); + } + var functionLookupCode = ["(", this.itemsSeparatedBy(possibleFunctionCalls, "||"), ")"]; + var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams); + this.push(functionCall); + }, + itemsSeparatedBy: function itemsSeparatedBy(items, separator) { + var result = []; + result.push(items[0]); + for (var i = 1; i < items.length; i++) { + result.push(separator, items[i]); + } + return result; + }, + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, "call", helper.callParams)); + }, + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister("helper"); + var nonHelper = this.popStack(); + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + var helperName = this.lastHelper = this.nameLookup("helpers", name, "helper"); + var lookup = ["(", "(helper = ", helperName, " || ", nonHelper, ")"]; + if (!this.options.strict) { + lookup[0] = "(helper = "; + lookup.push(" != null ? helper : ", this.aliasable("container.hooks.helperMissing")); + } + this.push(["(", lookup, helper.paramsInit ? ["),(", helper.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", helper.callParams), " : helper))"]); + }, + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], options2 = this.setupParams(name, 1, params); + if (isDynamic) { + name = this.popStack(); + delete options2.name; + } + if (indent) { + options2.indent = JSON.stringify(indent); + } + options2.helpers = "helpers"; + options2.partials = "partials"; + options2.decorators = "container.decorators"; + if (!isDynamic) { + params.unshift(this.nameLookup("partials", name, "partial")); + } else { + params.unshift(name); + } + if (this.options.compat) { + options2.depths = "depths"; + } + options2 = this.objectLiteral(options2); + params.push(options2); + this.push(this.source.functionCall("container.invokePartial", "", params)); + }, + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), context = void 0, type2 = void 0, id = void 0; + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type2 = this.popStack(); + context = this.popStack(); + } + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type2) { + hash.types[key] = type2; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + pushId: function pushId(type2, name, child) { + if (type2 === "BlockParam") { + this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " + JSON.stringify("." + child) : "")); + } else if (type2 === "PathExpression") { + this.pushString(name); + } else if (type2 === "SubExpression") { + this.pushStackLiteral("true"); + } else { + this.pushStackLiteral("null"); + } + }, + // HELPERS + compiler: JavaScriptCompiler, + compileChildren: function compileChildren(environment, options2) { + var children = environment.children, child = void 0, compiler = void 0; + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); + var existing = this.matchExistingProgram(child); + if (existing == null) { + this.context.programs.push(""); + var index = this.context.programs.length; + child.index = index; + child.name = "program" + index; + this.context.programs[index] = compiler.compile(child, options2, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + child.useDepths = this.useDepths; + child.useBlockParams = this.useBlockParams; + } else { + child.index = existing.index; + child.name = "program" + existing.index; + this.useDepths = this.useDepths || existing.useDepths; + this.useBlockParams = this.useBlockParams || existing.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return environment; + } + } + }, + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], programParams = [child.index, "data", child.blockParams]; + if (this.useBlockParams || this.useDepths) { + programParams.push("blockParams"); + } + if (this.useDepths) { + programParams.push("depths"); + } + return "container.program(" + programParams.join(", ") + ")"; + }, + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + this.inlineStack.push(expr); + return expr; + }, + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = void 0; + } + if (source) { + this.source.push(source); + } + }, + replaceStack: function replaceStack(callback) { + var prefix2 = ["("], stack = void 0, createdStack = void 0, usedLiteral = void 0; + if (!this.isInline()) { + throw new _exception2["default"]("replaceStack on non-inline"); + } + var top = this.popStack(true); + if (top instanceof Literal) { + stack = [top.value]; + prefix2 = ["(", stack]; + usedLiteral = true; + } else { + createdStack = true; + var _name = this.incrStack(); + prefix2 = ["((", this.push(_name), " = ", top, ")"]; + stack = this.topStack(); + } + var item = callback.call(this, stack); + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix2.concat(item, ")")); + }, + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push("stack" + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return "stack" + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, " = ", entry, ";"]); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + popStack: function popStack(wrapped) { + var inline = this.isInline(), item = (inline ? this.inlineStack : this.compileStack).pop(); + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + if (!this.stackSlot) { + throw new _exception2["default"]("Invalid stack pop"); + } + this.stackSlot--; + } + return item; + } + }, + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, item = stack[stack.length - 1]; + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + contextName: function contextName(context) { + if (this.useDepths && context) { + return "depths[" + context + "]"; + } else { + return "depth" + context; + } + }, + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + return ret; + }, + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup("helpers", name, "helper"), callContext = this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})"); + return { + params, + paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + setupParams: function setupParams(helper, paramSize, params) { + var options2 = {}, contexts = [], types = [], ids = [], objectArgs = !params, param = void 0; + if (objectArgs) { + params = []; + } + options2.name = this.quotedString(helper); + options2.hash = this.popStack(); + if (this.trackIds) { + options2.hashIds = this.popStack(); + } + if (this.stringParams) { + options2.hashTypes = this.popStack(); + options2.hashContexts = this.popStack(); + } + var inverse = this.popStack(), program = this.popStack(); + if (program || inverse) { + options2.fn = program || "container.noop"; + options2.inverse = inverse || "container.noop"; + } + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + if (objectArgs) { + options2.args = this.source.generateArray(params); + } + if (this.trackIds) { + options2.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options2.types = this.source.generateArray(types); + options2.contexts = this.source.generateArray(contexts); + } + if (this.options.data) { + options2.data = "data"; + } + if (this.useBlockParams) { + options2.blockParams = "blockParams"; + } + return options2; + }, + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options2 = this.setupParams(helper, paramSize, params); + options2.loc = JSON.stringify(this.source.currentLocation); + options2 = this.objectLiteral(options2); + if (useRegister) { + this.useRegister("options"); + params.push("options"); + return ["options=", options2]; + } else if (params) { + params.push(options2); + return ""; + } else { + return options2; + } + } + }; + (function() { + var reservedWords = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "); + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + function strictLookup(requireTerminal, compiler, parts, i, type2) { + var stack = compiler.popStack(), len = parts.length; + if (requireTerminal) { + len--; + } + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type2); + } + if (requireTerminal) { + return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"]; + } else { + return stack; + } + } + exports2["default"] = JavaScriptCompiler; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.js +var require_handlebars = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _handlebarsRuntime = require_handlebars_runtime(); + var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + var _handlebarsCompilerAst = require_ast(); + var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + var _handlebarsCompilerBase = require_base2(); + var _handlebarsCompilerCompiler = require_compiler(); + var _handlebarsCompilerJavascriptCompiler = require_javascript_compiler(); + var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + var _handlebarsCompilerVisitor = require_visitor(); + var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + var _handlebarsNoConflict = require_no_conflict(); + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + var _create = _handlebarsRuntime2["default"].create; + function create() { + var hb = _create(); + hb.compile = function(input, options2) { + return _handlebarsCompilerCompiler.compile(input, options2, hb); + }; + hb.precompile = function(input, options2) { + return _handlebarsCompilerCompiler.precompile(input, options2, hb); + }; + hb.AST = _handlebarsCompilerAst2["default"]; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2["default"]; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; + return hb; + } + var inst = create(); + inst.create = create; + _handlebarsNoConflict2["default"](inst); + inst.Visitor = _handlebarsCompilerVisitor2["default"]; + inst["default"] = inst; + exports2["default"] = inst; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js +var require_printer = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.print = print; + exports2.PrintVisitor = PrintVisitor; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _visitor = require_visitor(); + var _visitor2 = _interopRequireDefault(_visitor); + function print(ast) { + return new PrintVisitor().accept(ast); + } + function PrintVisitor() { + this.padding = 0; + } + PrintVisitor.prototype = new _visitor2["default"](); + PrintVisitor.prototype.pad = function(string) { + var out = ""; + for (var i = 0, l = this.padding; i < l; i++) { + out += " "; + } + out += string + "\n"; + return out; + }; + PrintVisitor.prototype.Program = function(program) { + var out = "", body2 = program.body, i = void 0, l = void 0; + if (program.blockParams) { + var blockParams = "BLOCK PARAMS: ["; + for (i = 0, l = program.blockParams.length; i < l; i++) { + blockParams += " " + program.blockParams[i]; + } + blockParams += " ]"; + out += this.pad(blockParams); + } + for (i = 0, l = body2.length; i < l; i++) { + out += this.accept(body2[i]); + } + this.padding--; + return out; + }; + PrintVisitor.prototype.MustacheStatement = function(mustache) { + return this.pad("{{ " + this.SubExpression(mustache) + " }}"); + }; + PrintVisitor.prototype.Decorator = function(mustache) { + return this.pad("{{ DIRECTIVE " + this.SubExpression(mustache) + " }}"); + }; + PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function(block) { + var out = ""; + out += this.pad((block.type === "DecoratorBlock" ? "DIRECTIVE " : "") + "BLOCK:"); + this.padding++; + out += this.pad(this.SubExpression(block)); + if (block.program) { + out += this.pad("PROGRAM:"); + this.padding++; + out += this.accept(block.program); + this.padding--; + } + if (block.inverse) { + if (block.program) { + this.padding++; + } + out += this.pad("{{^}}"); + this.padding++; + out += this.accept(block.inverse); + this.padding--; + if (block.program) { + this.padding--; + } + } + this.padding--; + return out; + }; + PrintVisitor.prototype.PartialStatement = function(partial) { + var content = "PARTIAL:" + partial.name.original; + if (partial.params[0]) { + content += " " + this.accept(partial.params[0]); + } + if (partial.hash) { + content += " " + this.accept(partial.hash); + } + return this.pad("{{> " + content + " }}"); + }; + PrintVisitor.prototype.PartialBlockStatement = function(partial) { + var content = "PARTIAL BLOCK:" + partial.name.original; + if (partial.params[0]) { + content += " " + this.accept(partial.params[0]); + } + if (partial.hash) { + content += " " + this.accept(partial.hash); + } + content += " " + this.pad("PROGRAM:"); + this.padding++; + content += this.accept(partial.program); + this.padding--; + return this.pad("{{> " + content + " }}"); + }; + PrintVisitor.prototype.ContentStatement = function(content) { + return this.pad("CONTENT[ '" + content.value + "' ]"); + }; + PrintVisitor.prototype.CommentStatement = function(comment) { + return this.pad("{{! '" + comment.value + "' }}"); + }; + PrintVisitor.prototype.SubExpression = function(sexpr) { + var params = sexpr.params, paramStrings = [], hash = void 0; + for (var i = 0, l = params.length; i < l; i++) { + paramStrings.push(this.accept(params[i])); + } + params = "[" + paramStrings.join(", ") + "]"; + hash = sexpr.hash ? " " + this.accept(sexpr.hash) : ""; + return this.accept(sexpr.path) + " " + params + hash; + }; + PrintVisitor.prototype.PathExpression = function(id) { + var path4 = id.parts.join("/"); + return (id.data ? "@" : "") + "PATH:" + path4; + }; + PrintVisitor.prototype.StringLiteral = function(string) { + return '"' + string.value + '"'; + }; + PrintVisitor.prototype.NumberLiteral = function(number) { + return "NUMBER{" + number.value + "}"; + }; + PrintVisitor.prototype.BooleanLiteral = function(bool) { + return "BOOLEAN{" + bool.value + "}"; + }; + PrintVisitor.prototype.UndefinedLiteral = function() { + return "UNDEFINED"; + }; + PrintVisitor.prototype.NullLiteral = function() { + return "NULL"; + }; + PrintVisitor.prototype.Hash = function(hash) { + var pairs = hash.pairs, joinedPairs = []; + for (var i = 0, l = pairs.length; i < l; i++) { + joinedPairs.push(this.accept(pairs[i])); + } + return "HASH{" + joinedPairs.join(", ") + "}"; + }; + PrintVisitor.prototype.HashPair = function(pair) { + return pair.key + "=" + this.accept(pair.value); + }; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/lib/index.js"(exports2, module2) { + "use strict"; + var handlebars = require_handlebars()["default"]; + var printer = require_printer(); + handlebars.PrintVisitor = printer.PrintVisitor; + handlebars.print = printer.print; + module2.exports = handlebars; + function extension(module3, filename) { + var fs4 = require("fs"); + var templateString = fs4.readFileSync(filename, "utf8"); + module3.exports = handlebars.compile(templateString); + } + if (typeof require !== "undefined" && require.extensions) { + require.extensions[".handlebars"] = extension; + require.extensions[".hbs"] = extension; + } + } +}); + // node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js var require_internal_glob_options_helper = __commonJS({ "node_modules/.pnpm/@actions+glob@0.1.2/node_modules/@actions/glob/lib/internal-glob-options-helper.js"(exports2) { @@ -26471,7 +32319,7 @@ var require_src = __commonJS({ }); // node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js -var require_helpers = __commonJS({ +var require_helpers3 = __commonJS({ "node_modules/.pnpm/agent-base@7.1.3/node_modules/agent-base/dist/helpers.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? function(o, m, k, k2) { @@ -26579,7 +32427,7 @@ var require_dist = __commonJS({ var net = __importStar(require("net")); var http2 = __importStar(require("http")); var https_1 = require("https"); - __exportStar(require_helpers(), exports2); + __exportStar(require_helpers3(), exports2); var INTERNAL = Symbol("AgentBaseInternalState"); var Agent3 = class extends http2.Agent { constructor(opts) { @@ -63387,7 +69235,7 @@ var require_cache_twirp_client = __commonJS({ }); // node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js -var require_util8 = __commonJS({ +var require_util9 = __commonJS({ "node_modules/.pnpm/@actions+cache@4.0.3/node_modules/@actions/cache/lib/internal/shared/util.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -63465,7 +69313,7 @@ var require_cacheTwirpClient = __commonJS({ var auth_1 = require_auth(); var http_client_1 = require_lib(); var cache_twirp_client_1 = require_cache_twirp_client(); - var util_1 = require_util8(); + var util_1 = require_util9(); var CacheServiceClient = class { constructor(userAgent, maxAttempts, baseRetryIntervalMilliseconds, retryMultiplier) { this.maxAttempts = 5; @@ -64241,10 +70089,10 @@ var import_tool_cache = __toESM(require_tool_cache()); // src/options.ts var import_path = __toESM(require("path")); -var import_os = __toESM(require("os")); +var import_os2 = __toESM(require("os")); var import_process = require("process"); var import_fs = require("fs"); -var core = __toESM(require_core()); +var core2 = __toESM(require_core()); // node_modules/.pnpm/zod@3.25.67/node_modules/zod/dist/esm/v3/helpers/util.js var util; @@ -68830,24 +74678,125 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { // src/options.ts var import_which = __toESM(require_lib2()); + +// src/util.ts +var import_crypto = require("crypto"); +var import_os = __toESM(require("os")); +var core = __toESM(require_core()); +var import_exec = __toESM(require_exec()); +var import_handlebars = __toESM(require_lib3()); +var DEFAULT_PIXI_URL_TEMPLATE = `{{#if latest~}} +https://github.com/prefix-dev/pixi/releases/latest/download/{{pixiFile}} +{{~else~}} +https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} +{{~/if}}`; +var getCondaArch = () => { + const archDict = { + "darwin-x64": "osx-64", + "darwin-arm64": "osx-arm64", + "linux-x64": "linux-64", + "linux-arm64": "linux-aarch64", + "linux-ppc64": "linux-ppc64le", + "win32-x64": "win-64", + "win32-arm64": "win-arm64" + }; + const arch2 = archDict[`${import_os.default.platform()}-${import_os.default.arch()}`]; + if (!arch2) { + throw new Error(`Unsupported platform: ${import_os.default.platform()}-${import_os.default.arch()}`); + } + return arch2; +}; +var getPlatform = () => { + const platform = import_os.default.platform(); + switch (platform) { + case "darwin": + return "apple-darwin"; + case "linux": + return "unknown-linux-musl"; + case "win32": + return "pc-windows-msvc"; + default: + throw new Error(`Unsupported architecture: ${platform}`); + } +}; +var getArch = () => { + const arch2 = import_os.default.arch(); + switch (arch2) { + case "x64": + return "x86_64"; + case "arm64": + return "aarch64"; + default: + throw new Error(`Unsupported architecture: ${arch2}`); + } +}; +var renderPixiUrl = (urlTemplate, version2) => { + const latest = version2 == "latest"; + const arch2 = getArch(); + const platform = getPlatform(); + const pixiFile = `pixi-${arch2}-${platform}${platform === "pc-windows-msvc" ? ".exe" : ""}`; + const template = import_handlebars.default.compile(urlTemplate); + return template({ + version: version2, + latest, + pixiFile + }); +}; +var sha256 = (s) => { + return (0, import_crypto.createHash)("sha256").update(s).digest("hex"); +}; +var execute = (cmd) => { + core.debug(`Executing: \`${cmd.toString()}\``); + return (0, import_exec.exec)(`"${cmd[0]}"`, cmd.slice(1)); +}; +var executeGetOutput = (cmd, options2) => { + core.debug(`Executing: \`${cmd.toString()}\``); + return (0, import_exec.getExecOutput)(`"${cmd[0]}"`, cmd.slice(1), options2); +}; +var pixiCmd = (command, withManifestPath = true) => { + let commandArray = [options.pixiBinPath].concat(command.split(" ").filter((x) => x !== "")); + if (withManifestPath) { + commandArray = commandArray.concat(["--manifest-path", options.manifestPath]); + } + commandArray = commandArray.concat(["--color", "always"]); + switch (options.logLevel) { + case "vvv": + commandArray = commandArray.concat(["-vvv"]); + break; + case "vv": + commandArray = commandArray.concat(["-vv"]); + break; + case "v": + commandArray = commandArray.concat(["-v"]); + break; + case "default": + break; + case "q": + commandArray = commandArray.concat(["-q"]); + break; + } + return commandArray; +}; + +// src/options.ts var pixiPath = "pixi.toml"; var pyprojectPath = "pyproject.toml"; var logLevelSchema = enumType(["q", "default", "v", "vv", "vvv"]); var PATHS = { - pixiBin: import_path.default.join(import_os.default.homedir(), ".pixi", "bin", `pixi${import_os.default.platform() === "win32" ? ".exe" : ""}`) + pixiBin: import_path.default.join(import_os2.default.homedir(), ".pixi", "bin", `pixi${import_os2.default.platform() === "win32" ? ".exe" : ""}`) }; var getEnvironmentVariableName = (key) => { return `SETUP_PIXI_${key.toUpperCase().replace(/-/g, "_")}`; }; var inputOrEnvironmentVariable = (key) => { - const inputValue = core.getInput(key); + const inputValue = core2.getInput(key); if (inputValue !== "") { return inputValue; } const envVarName = getEnvironmentVariableName(key); const envVarValue = process.env[envVarName]; if (envVarValue !== void 0 && envVarValue !== "") { - core.debug(`Using environment variable ${envVarName} with value: ${envVarValue}`); + core2.debug(`Using environment variable ${envVarName} with value: ${envVarValue}`); return envVarValue; } return void 0; @@ -68881,9 +74830,6 @@ var parseOrUndefinedList = (key, schema) => { return input.split(" ").map((s) => schema.parse(s)).filter((s) => s !== ""); }; var validateInputs = (inputs) => { - if (inputs.pixiVersion && inputs.pixiUrl) { - throw new Error("You need to specify either pixi-version or pixi-url"); - } if (inputs.pixiUrlBearerToken && !inputs.pixiUrl) { throw new Error("You need to specify pixi-url when using pixi-url-bearer-token"); } @@ -68950,7 +74896,7 @@ var determinePixiInstallation = (pixiUrlOrVersionSet, pixiBinPath) => { const preinstalledPixi = import_which.default.sync("pixi", { nothrow: true }); if (pixiUrlOrVersionSet || pixiBinPath) { if (preinstalledPixi) { - core.debug(`Local pixi found at ${preinstalledPixi} is being ignored.`); + core2.debug(`Local pixi found at ${preinstalledPixi} is being ignored.`); } return { downloadPixi: true, @@ -68958,19 +74904,23 @@ var determinePixiInstallation = (pixiUrlOrVersionSet, pixiBinPath) => { }; } if (preinstalledPixi) { - core.info(`Using pre-installed pixi at ${preinstalledPixi}`); + core2.info(`Using pre-installed pixi at ${preinstalledPixi}`); return { downloadPixi: false, pixiBinPath: preinstalledPixi }; } return { downloadPixi: true, pixiBinPath: PATHS.pixiBin }; }; var inferOptions = (inputs) => { const runInstall = inputs.runInstall ?? true; - const pixiSource = inputs.pixiVersion ? { version: inputs.pixiVersion } : inputs.pixiUrl ? { url: inputs.pixiUrl, bearerToken: inputs.pixiUrlBearerToken } : { version: "latest" }; + const pixiSource = { + urlTemplate: inputs.pixiUrl ?? DEFAULT_PIXI_URL_TEMPLATE, + bearerToken: inputs.pixiUrlBearerToken, + version: inputs.pixiVersion ?? "latest" + }; const { downloadPixi: downloadPixi2, pixiBinPath } = determinePixiInstallation( !!inputs.pixiVersion || !!inputs.pixiUrl, inputs.pixiBinPath ); - const logLevel = inputs.logLevel ?? (core.isDebug() ? "vv" : "default"); + const logLevel = inputs.logLevel ?? (core2.isDebug() ? "vv" : "default"); let manifestPath = pixiPath; if (inputs.manifestPath) { manifestPath = import_path.default.resolve(untildify(inputs.manifestPath)); @@ -68982,20 +74932,20 @@ var inferOptions = (inputs) => { const fileContent = (0, import_fs.readFileSync)(pyprojectPath, "utf-8"); const parsedContent = parse(fileContent); if (parsedContent.tool && typeof parsedContent.tool === "object" && "pixi" in parsedContent.tool) { - core.debug(`The tool.pixi table found, using ${pyprojectPath} as manifest file.`); + core2.debug(`The tool.pixi table found, using ${pyprojectPath} as manifest file.`); manifestPath = pyprojectPath; } } catch (error3) { - core.error(`Error while trying to read ${pyprojectPath} file.`); - core.error(error3); + core2.error(`Error while trying to read ${pyprojectPath} file.`); + core2.error(error3); } } else if (runInstall) { - core.warning(`Could not find any manifest file. Defaulting to ${pixiPath}.`); + core2.warning(`Could not find any manifest file. Defaulting to ${pixiPath}.`); } } const pixiLockFile = import_path.default.join(import_path.default.dirname(manifestPath), "pixi.lock"); const lockFileAvailable = (0, import_fs.existsSync)(pixiLockFile); - core.debug(`lockFileAvailable: ${lockFileAvailable ? "yes" : "no"}`); + core2.debug(`lockFileAvailable: ${lockFileAvailable ? "yes" : "no"}`); if (!lockFileAvailable && inputs.cacheWrite === true) { throw new Error("You cannot specify cache-write = true without a lock file present"); } @@ -69055,7 +75005,7 @@ var getOptions = () => { unionType([literalType("latest"), stringType().regex(/^v\d+\.\d+\.\d+$/)]), "pixi-version must either be `latest` or a version string matching `vX.Y.Z`." ), - pixiUrl: parseOrUndefined("pixi-url", stringType().url()), + pixiUrl: parseOrUndefined("pixi-url", stringType()), pixiUrlBearerToken: parseOrUndefined("pixi-url-bearer-token", stringType()), logLevel: parseOrUndefined( "log-level", @@ -69082,10 +75032,10 @@ var getOptions = () => { authS3SessionToken: parseOrUndefined("auth-s3-session-token", stringType()), postCleanup: parseOrUndefinedJSON("post-cleanup", booleanType()) }; - core.debug(`Inputs: ${JSON.stringify(inputs)}`); + core2.debug(`Inputs: ${JSON.stringify(inputs)}`); validateInputs(inputs); const options2 = inferOptions(inputs); - core.debug(`Inferred options: ${JSON.stringify(options2)}`); + core2.debug(`Inferred options: ${JSON.stringify(options2)}`); assertOptions(options2); return options2; }; @@ -69093,110 +75043,20 @@ var _options; try { _options = getOptions(); } catch (error3) { - if (core.isDebug()) { + if (core2.isDebug()) { throw error3; } if (error3 instanceof Error) { - core.setFailed(error3.message); + core2.setFailed(error3.message); (0, import_process.exit)(1); } else if (typeof error3 === "string") { - core.setFailed(error3); + core2.setFailed(error3); (0, import_process.exit)(1); } throw error3; } var options = _options; -// src/util.ts -var import_crypto = require("crypto"); -var import_os2 = __toESM(require("os")); -var core2 = __toESM(require_core()); -var import_exec = __toESM(require_exec()); -var getCondaArch = () => { - const archDict = { - "darwin-x64": "osx-64", - "darwin-arm64": "osx-arm64", - "linux-x64": "linux-64", - "linux-arm64": "linux-aarch64", - "linux-ppc64": "linux-ppc64le", - "win32-x64": "win-64", - "win32-arm64": "win-arm64" - }; - const arch2 = archDict[`${import_os2.default.platform()}-${import_os2.default.arch()}`]; - if (!arch2) { - throw new Error(`Unsupported platform: ${import_os2.default.platform()}-${import_os2.default.arch()}`); - } - return arch2; -}; -var getPlatform = () => { - const platform = import_os2.default.platform(); - switch (platform) { - case "darwin": - return "apple-darwin"; - case "linux": - return "unknown-linux-musl"; - case "win32": - return "pc-windows-msvc"; - default: - throw new Error(`Unsupported architecture: ${platform}`); - } -}; -var getArch = () => { - const arch2 = import_os2.default.arch(); - switch (arch2) { - case "x64": - return "x86_64"; - case "arm64": - return "aarch64"; - default: - throw new Error(`Unsupported architecture: ${arch2}`); - } -}; -var getPixiUrlFromVersion = (version2) => { - const arch2 = getArch(); - const platform = getPlatform(); - const pixiFile = `pixi-${arch2}-${platform}${platform === "pc-windows-msvc" ? ".exe" : ""}`; - if (version2 === "latest") { - return `https://github.com/prefix-dev/pixi/releases/latest/download/${pixiFile}`; - } - return `https://github.com/prefix-dev/pixi/releases/download/${version2}/${pixiFile}`; -}; -var sha256 = (s) => { - return (0, import_crypto.createHash)("sha256").update(s).digest("hex"); -}; -var execute = (cmd) => { - core2.debug(`Executing: \`${cmd.toString()}\``); - return (0, import_exec.exec)(`"${cmd[0]}"`, cmd.slice(1)); -}; -var executeGetOutput = (cmd, options2) => { - core2.debug(`Executing: \`${cmd.toString()}\``); - return (0, import_exec.getExecOutput)(`"${cmd[0]}"`, cmd.slice(1), options2); -}; -var pixiCmd = (command, withManifestPath = true) => { - let commandArray = [options.pixiBinPath].concat(command.split(" ").filter((x) => x !== "")); - if (withManifestPath) { - commandArray = commandArray.concat(["--manifest-path", options.manifestPath]); - } - commandArray = commandArray.concat(["--color", "always"]); - switch (options.logLevel) { - case "vvv": - commandArray = commandArray.concat(["-vvv"]); - break; - case "vv": - commandArray = commandArray.concat(["-vv"]); - break; - case "v": - commandArray = commandArray.concat(["-v"]); - break; - case "default": - break; - case "q": - commandArray = commandArray.concat(["-q"]); - break; - } - return commandArray; -}; - // src/cache.ts var import_promises = __toESM(require("fs/promises")); var import_path2 = __toESM(require("path")); @@ -69321,7 +75181,7 @@ var activateEnvironment = async (environment) => { // src/main.ts var downloadPixi = (source) => { - const url2 = "version" in source ? getPixiUrlFromVersion(source.version) : source.url; + const url2 = renderPixiUrl(source.urlTemplate, source.version); const auth = "bearerToken" in source && source.bearerToken ? `Bearer ${source.bearerToken}` : ""; return core5.group("Downloading Pixi", () => { core5.debug("Installing pixi"); diff --git a/dist/post.js b/dist/post.js index 4258b5d..f67d2a7 100644 --- a/dist/post.js +++ b/dist/post.js @@ -403,7 +403,7 @@ var require_tunnel = __commonJS({ connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } - debug3("making CONNECT request"); + debug4("making CONNECT request"); var connectReq = self.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); @@ -423,7 +423,7 @@ var require_tunnel = __commonJS({ connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { - debug3( + debug4( "tunneling socket could not be established, statusCode=%d", res.statusCode ); @@ -435,7 +435,7 @@ var require_tunnel = __commonJS({ return; } if (head.length > 0) { - debug3("got illegal response body from proxy"); + debug4("got illegal response body from proxy"); socket.destroy(); var error2 = new Error("got illegal response body from proxy"); error2.code = "ECONNRESET"; @@ -443,13 +443,13 @@ var require_tunnel = __commonJS({ self.removeSocket(placeholder); return; } - debug3("tunneling connection has established"); + debug4("tunneling connection has established"); self.sockets[self.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { connectReq.removeAllListeners(); - debug3( + debug4( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack @@ -511,9 +511,9 @@ var require_tunnel = __commonJS({ } return target; } - var debug3; + var debug4; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug3 = function() { + debug4 = function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -523,10 +523,10 @@ var require_tunnel = __commonJS({ console.error.apply(console, args); }; } else { - debug3 = function() { + debug4 = function() { }; } - exports2.debug = debug3; + exports2.debug = debug4; } }); @@ -19462,7 +19462,7 @@ var require_exec = __commonJS({ exports2.getExecOutput = exports2.exec = void 0; var string_decoder_1 = require("string_decoder"); var tr = __importStar(require_toolrunner()); - function exec(commandLine, args, options2) { + function exec2(commandLine, args, options2) { return __awaiter(this, void 0, void 0, function* () { const commandArgs = tr.argStringToArray(commandLine); if (commandArgs.length === 0) { @@ -19474,8 +19474,8 @@ var require_exec = __commonJS({ return runner.exec(); }); } - exports2.exec = exec; - function getExecOutput(commandLine, args, options2) { + exports2.exec = exec2; + function getExecOutput2(commandLine, args, options2) { var _a, _b; return __awaiter(this, void 0, void 0, function* () { let stdout = ""; @@ -19497,7 +19497,7 @@ var require_exec = __commonJS({ } }; const listeners = Object.assign(Object.assign({}, options2 === null || options2 === void 0 ? void 0 : options2.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec(commandLine, args, Object.assign(Object.assign({}, options2), { listeners })); + const exitCode = yield exec2(commandLine, args, Object.assign(Object.assign({}, options2), { listeners })); stdout += stdoutDecoder.end(); stderr += stderrDecoder.end(); return { @@ -19507,7 +19507,7 @@ var require_exec = __commonJS({ }; }); } - exports2.getExecOutput = getExecOutput; + exports2.getExecOutput = getExecOutput2; } }); @@ -19575,12 +19575,12 @@ var require_platform = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; var os_1 = __importDefault(require("os")); - var exec = __importStar(require_exec()); + var exec2 = __importStar(require_exec()); var getWindowsInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout: version } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { + const { stdout: version } = yield exec2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { silent: true }); - const { stdout: name } = yield exec.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { + const { stdout: name } = yield exec2.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { silent: true }); return { @@ -19590,7 +19590,7 @@ var require_platform = __commonJS({ }); var getMacOsInfo = () => __awaiter(void 0, void 0, void 0, function* () { var _a, _b, _c, _d; - const { stdout } = yield exec.getExecOutput("sw_vers", void 0, { + const { stdout } = yield exec2.getExecOutput("sw_vers", void 0, { silent: true }); const version = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; @@ -19601,7 +19601,7 @@ var require_platform = __commonJS({ }; }); var getLinuxInfo = () => __awaiter(void 0, void 0, void 0, function* () { - const { stdout } = yield exec.getExecOutput("lsb_release", ["-i", "-r", "-s"], { + const { stdout } = yield exec2.getExecOutput("lsb_release", ["-i", "-r", "-s"], { silent: true }); const [name, version] = stdout.trim().split("\n"); @@ -19778,10 +19778,10 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); return process.env["RUNNER_DEBUG"] === "1"; } exports2.isDebug = isDebug3; - function debug3(message) { + function debug4(message) { (0, command_1.issueCommand)("debug", {}, message); } - exports2.debug = debug3; + exports2.debug = debug4; function error2(message, properties = {}) { (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); } @@ -20108,20 +20108,5868 @@ var require_lib2 = __commonJS({ } }); +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js +var require_utils3 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.extend = extend; + exports2.indexOf = indexOf; + exports2.escapeExpression = escapeExpression; + exports2.isEmpty = isEmpty; + exports2.createFrame = createFrame; + exports2.blockParams = blockParams; + exports2.appendContextPath = appendContextPath; + var escape = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + "`": "`", + "=": "=" + }; + var badChars = /[&<>"'`=]/g; + var possible = /[&<>"'`=]/; + function escapeChar(chr) { + return escape[chr]; + } + function extend(obj) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + return obj; + } + var toString = Object.prototype.toString; + exports2.toString = toString; + var isFunction = function isFunction2(value) { + return typeof value === "function"; + }; + if (isFunction(/x/)) { + exports2.isFunction = isFunction = function(value) { + return typeof value === "function" && toString.call(value) === "[object Function]"; + }; + } + exports2.isFunction = isFunction; + var isArray = Array.isArray || function(value) { + return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false; + }; + exports2.isArray = isArray; + function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; + } + function escapeExpression(string) { + if (typeof string !== "string") { + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ""; + } else if (!string) { + return string + ""; + } + string = "" + string; + } + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); + } + function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } + } + function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; + } + function blockParams(params, ids) { + params.path = ids; + return params; + } + function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + "." : "") + id; + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/exception.js +var require_exception = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/exception.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var errorProps = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"]; + function Exception(message, node) { + var loc = node && node.loc, line = void 0, endLineNumber = void 0, column = void 0, endColumn = void 0; + if (loc) { + line = loc.start.line; + endLineNumber = loc.end.line; + column = loc.start.column; + endColumn = loc.end.column; + message += " - " + line + ":" + column; + } + var tmp = Error.prototype.constructor.call(this, message); + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + try { + if (loc) { + this.lineNumber = line; + this.endLineNumber = endLineNumber; + if (Object.defineProperty) { + Object.defineProperty(this, "column", { + value: column, + enumerable: true + }); + Object.defineProperty(this, "endColumn", { + value: endColumn, + enumerable: true + }); + } else { + this.column = column; + this.endColumn = endColumn; + } + } + } catch (nop) { + } + } + Exception.prototype = new Error(); + exports2["default"] = Exception; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js +var require_block_helper_missing = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + exports2["default"] = function(instance) { + instance.registerHelper("blockHelperMissing", function(context, options2) { + var inverse = options2.inverse, fn = options2.fn; + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options2.ids) { + options2.ids = [options2.name]; + } + return instance.helpers.each(context, options2); + } else { + return inverse(this); + } + } else { + if (options2.data && options2.ids) { + var data = _utils.createFrame(options2.data); + data.contextPath = _utils.appendContextPath(options2.data.contextPath, options2.name); + options2 = { data }; + } + return fn(context, options2); + } + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js +var require_each = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("each", function(context, options2) { + if (!options2) { + throw new _exception2["default"]("Must pass iterator to #each"); + } + var fn = options2.fn, inverse = options2.inverse, i = 0, ret = "", data = void 0, contextPath = void 0; + if (options2.data && options2.ids) { + contextPath = _utils.appendContextPath(options2.data.contextPath, options2.ids[0]) + "."; + } + if (_utils.isFunction(context)) { + context = context.call(this); + } + if (options2.data) { + data = _utils.createFrame(options2.data); + } + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + if (contextPath) { + data.contextPath = contextPath + field; + } + } + ret = ret + fn(context[field], { + data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + if (context && typeof context === "object") { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else if (typeof Symbol === "function" && context[Symbol.iterator]) { + var newContext = []; + var iterator = context[Symbol.iterator](); + for (var it = iterator.next(); !it.done; it = iterator.next()) { + newContext.push(it.value); + } + context = newContext; + for (var j = context.length; i < j; i++) { + execIteration(i, i, i === context.length - 1); + } + } else { + (function() { + var priorKey = void 0; + Object.keys(context).forEach(function(key) { + if (priorKey !== void 0) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + }); + if (priorKey !== void 0) { + execIteration(priorKey, i - 1, true); + } + })(); + } + } + if (i === 0) { + ret = inverse(this); + } + return ret; + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js +var require_helper_missing = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("helperMissing", function() { + if (arguments.length === 1) { + return void 0; + } else { + throw new _exception2["default"]('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js +var require_if = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("if", function(conditional, options2) { + if (arguments.length != 2) { + throw new _exception2["default"]("#if requires exactly one argument"); + } + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + if (!options2.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options2.inverse(this); + } else { + return options2.fn(this); + } + }); + instance.registerHelper("unless", function(conditional, options2) { + if (arguments.length != 2) { + throw new _exception2["default"]("#unless requires exactly one argument"); + } + return instance.helpers["if"].call(this, conditional, { + fn: options2.inverse, + inverse: options2.fn, + hash: options2.hash + }); + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js +var require_log = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + exports2["default"] = function(instance) { + instance.registerHelper("log", function() { + var args = [void 0], options2 = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + var level = 1; + if (options2.hash.level != null) { + level = options2.hash.level; + } else if (options2.data && options2.data.level != null) { + level = options2.data.level; + } + args[0] = level; + instance.log.apply(instance, args); + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js +var require_lookup = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + exports2["default"] = function(instance) { + instance.registerHelper("lookup", function(obj, field, options2) { + if (!obj) { + return obj; + } + return options2.lookupProperty(obj, field); + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js +var require_with = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + exports2["default"] = function(instance) { + instance.registerHelper("with", function(context, options2) { + if (arguments.length != 2) { + throw new _exception2["default"]("#with requires exactly one argument"); + } + if (_utils.isFunction(context)) { + context = context.call(this); + } + var fn = options2.fn; + if (!_utils.isEmpty(context)) { + var data = options2.data; + if (options2.data && options2.ids) { + data = _utils.createFrame(options2.data); + data.contextPath = _utils.appendContextPath(options2.data.contextPath, options2.ids[0]); + } + return fn(context, { + data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options2.inverse(this); + } + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers.js +var require_helpers = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.registerDefaultHelpers = registerDefaultHelpers; + exports2.moveHelperToHooks = moveHelperToHooks; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _helpersBlockHelperMissing = require_block_helper_missing(); + var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + var _helpersEach = require_each(); + var _helpersEach2 = _interopRequireDefault(_helpersEach); + var _helpersHelperMissing = require_helper_missing(); + var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + var _helpersIf = require_if(); + var _helpersIf2 = _interopRequireDefault(_helpersIf); + var _helpersLog = require_log(); + var _helpersLog2 = _interopRequireDefault(_helpersLog); + var _helpersLookup = require_lookup(); + var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + var _helpersWith = require_with(); + var _helpersWith2 = _interopRequireDefault(_helpersWith); + function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2["default"](instance); + _helpersEach2["default"](instance); + _helpersHelperMissing2["default"](instance); + _helpersIf2["default"](instance); + _helpersLog2["default"](instance); + _helpersLookup2["default"](instance); + _helpersWith2["default"](instance); + } + function moveHelperToHooks(instance, helperName, keepHelper) { + if (instance.helpers[helperName]) { + instance.hooks[helperName] = instance.helpers[helperName]; + if (!keepHelper) { + delete instance.helpers[helperName]; + } + } + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js +var require_inline = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + exports2["default"] = function(instance) { + instance.registerDecorator("inline", function(fn, props, container, options2) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function(context, options3) { + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret2 = fn(context, options3); + container.partials = original; + return ret2; + }; + } + props.partials[options2.args[0]] = options2.fn; + return ret; + }); + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators.js +var require_decorators = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.registerDefaultDecorators = registerDefaultDecorators; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _decoratorsInline = require_inline(); + var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + function registerDefaultDecorators(instance) { + _decoratorsInline2["default"](instance); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/logger.js +var require_logger = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/logger.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + var logger = { + methodMap: ["debug", "info", "warn", "error"], + level: "info", + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === "string") { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + return level; + }, + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + if (typeof console !== "undefined" && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + if (!console[method]) { + method = "log"; + } + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + console[method].apply(console, message); + } + } + }; + exports2["default"] = logger; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js +var require_create_new_lookup_object = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.createNewLookupObject = createNewLookupObject; + var _utils = require_utils3(); + function createNewLookupObject() { + for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { + sources[_key] = arguments[_key]; + } + return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources)); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js +var require_proto_access = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.createProtoAccessControl = createProtoAccessControl; + exports2.resultIsAllowed = resultIsAllowed; + exports2.resetLoggedProperties = resetLoggedProperties; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _createNewLookupObject = require_create_new_lookup_object(); + var _logger = require_logger(); + var _logger2 = _interopRequireDefault(_logger); + var loggedProperties = /* @__PURE__ */ Object.create(null); + function createProtoAccessControl(runtimeOptions) { + var defaultMethodWhiteList = /* @__PURE__ */ Object.create(null); + defaultMethodWhiteList["constructor"] = false; + defaultMethodWhiteList["__defineGetter__"] = false; + defaultMethodWhiteList["__defineSetter__"] = false; + defaultMethodWhiteList["__lookupGetter__"] = false; + var defaultPropertyWhiteList = /* @__PURE__ */ Object.create(null); + defaultPropertyWhiteList["__proto__"] = false; + return { + properties: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), + defaultValue: runtimeOptions.allowProtoPropertiesByDefault + }, + methods: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), + defaultValue: runtimeOptions.allowProtoMethodsByDefault + } + }; + } + function resultIsAllowed(result, protoAccessControl, propertyName) { + if (typeof result === "function") { + return checkWhiteList(protoAccessControl.methods, propertyName); + } else { + return checkWhiteList(protoAccessControl.properties, propertyName); + } + } + function checkWhiteList(protoAccessControlForType, propertyName) { + if (protoAccessControlForType.whitelist[propertyName] !== void 0) { + return protoAccessControlForType.whitelist[propertyName] === true; + } + if (protoAccessControlForType.defaultValue !== void 0) { + return protoAccessControlForType.defaultValue; + } + logUnexpecedPropertyAccessOnce(propertyName); + return false; + } + function logUnexpecedPropertyAccessOnce(propertyName) { + if (loggedProperties[propertyName] !== true) { + loggedProperties[propertyName] = true; + _logger2["default"].log("error", 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); + } + } + function resetLoggedProperties() { + Object.keys(loggedProperties).forEach(function(propertyName) { + delete loggedProperties[propertyName]; + }); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/base.js +var require_base = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/base.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.HandlebarsEnvironment = HandlebarsEnvironment; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _utils = require_utils3(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _helpers = require_helpers(); + var _decorators = require_decorators(); + var _logger = require_logger(); + var _logger2 = _interopRequireDefault(_logger); + var _internalProtoAccess = require_proto_access(); + var VERSION = "4.7.8"; + exports2.VERSION = VERSION; + var COMPILER_REVISION = 8; + exports2.COMPILER_REVISION = COMPILER_REVISION; + var LAST_COMPATIBLE_COMPILER_REVISION = 7; + exports2.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; + var REVISION_CHANGES = { + 1: "<= 1.0.rc.2", + // 1.0.rc.2 is actually rev2 but doesn't report it + 2: "== 1.0.0-rc.3", + 3: "== 1.0.0-rc.4", + 4: "== 1.x.x", + 5: "== 2.0.0-alpha.x", + 6: ">= 2.0.0-beta.1", + 7: ">= 4.0.0 <4.3.0", + 8: ">= 4.3.0" + }; + exports2.REVISION_CHANGES = REVISION_CHANGES; + var objectType2 = "[object Object]"; + function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); + } + HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + logger: _logger2["default"], + log: _logger2["default"].log, + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType2) { + if (fn) { + throw new _exception2["default"]("Arg not supported with multiple helpers"); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType2) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === "undefined") { + throw new _exception2["default"]('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType2) { + if (fn) { + throw new _exception2["default"]("Arg not supported with multiple decorators"); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + }, + /** + * Reset the memory of illegal property accesses that have already been logged. + * @deprecated should only be used in handlebars test-cases + */ + resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { + _internalProtoAccess.resetLoggedProperties(); + } + }; + var log = _logger2["default"].log; + exports2.log = log; + exports2.createFrame = _utils.createFrame; + exports2.logger = _logger2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/safe-string.js +var require_safe_string = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/safe-string.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function SafeString(string) { + this.string = string; + } + SafeString.prototype.toString = SafeString.prototype.toHTML = function() { + return "" + this.string; + }; + exports2["default"] = SafeString; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js +var require_wrapHelper = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.wrapHelper = wrapHelper; + function wrapHelper(helper, transformOptionsFn) { + if (typeof helper !== "function") { + return helper; + } + var wrapper = function wrapper2() { + var options2 = arguments[arguments.length - 1]; + arguments[arguments.length - 1] = transformOptionsFn(options2); + return helper.apply(this, arguments); + }; + return wrapper; + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/runtime.js +var require_runtime = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/runtime.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.checkRevision = checkRevision; + exports2.template = template; + exports2.wrapProgram = wrapProgram; + exports2.resolvePartial = resolvePartial; + exports2.invokePartial = invokePartial; + exports2.noop = noop; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } + } + var _utils = require_utils3(); + var Utils = _interopRequireWildcard(_utils); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _base = require_base(); + var _helpers = require_helpers(); + var _internalWrapHelper = require_wrapHelper(); + var _internalProtoAccess = require_proto_access(); + function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, currentRevision = _base.COMPILER_REVISION; + if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { + return; + } + if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + runtimeVersions + ") or downgrade your runtime to an older version (" + compilerVersions + ")."); + } else { + throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + compilerInfo[1] + ")."); + } + } + function template(templateSpec, env) { + if (!env) { + throw new _exception2["default"]("No environment passed to template"); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2["default"]("Unknown template object: " + typeof templateSpec); + } + templateSpec.main.decorator = templateSpec.main_d; + env.VM.checkRevision(templateSpec.compiler); + var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; + function invokePartialWrapper(partial, context, options2) { + if (options2.hash) { + context = Utils.extend({}, context, options2.hash); + if (options2.ids) { + options2.ids[0] = true; + } + } + partial = env.VM.resolvePartial.call(this, partial, context, options2); + var extendedOptions = Utils.extend({}, options2, { + hooks: this.hooks, + protoAccessControl: this.protoAccessControl + }); + var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); + if (result == null && env.compile) { + options2.partials[options2.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options2.partials[options2.name](context, extendedOptions); + } + if (result != null) { + if (options2.indent) { + var lines = result.split("\n"); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + lines[i] = options2.indent + lines[i]; + } + result = lines.join("\n"); + } + return result; + } else { + throw new _exception2["default"]("The partial " + options2.name + " could not be compiled when running in runtime-only mode"); + } + } + var container = { + strict: function strict(obj, name, loc) { + if (!obj || !(name in obj)) { + throw new _exception2["default"]('"' + name + '" not defined in ' + obj, { + loc + }); + } + return container.lookupProperty(obj, name); + }, + lookupProperty: function lookupProperty(parent, propertyName) { + var result = parent[propertyName]; + if (result == null) { + return result; + } + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return result; + } + if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { + return result; + } + return void 0; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + var result = depths[i] && container.lookupProperty(depths[i], name); + if (result != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === "function" ? current.call(context) : current; + }, + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + fn: function fn(i) { + var ret2 = templateSpec[i]; + ret2.decorator = templateSpec[i + "_d"]; + return ret2; + }, + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + mergeIfNeeded: function mergeIfNeeded(param, common) { + var obj = param || common; + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + return obj; + }, + // An empty object to use as replacement for null-contexts + nullContext: Object.seal({}), + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + function ret(context) { + var options2 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + var data = options2.data; + ret._setup(options2); + if (!options2.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = void 0, blockParams = templateSpec.useBlockParams ? [] : void 0; + if (templateSpec.useDepths) { + if (options2.depths) { + depths = context != options2.depths[0] ? [context].concat(options2.depths) : options2.depths; + } else { + depths = [context]; + } + } + function main(context2) { + return "" + templateSpec.main(container, context2, container.helpers, container.partials, data, blockParams, depths); + } + main = executeDecorators(templateSpec.main, main, container, options2.depths || [], data, blockParams); + return main(context, options2); + } + ret.isTop = true; + ret._setup = function(options2) { + if (!options2.partial) { + var mergedHelpers = Utils.extend({}, env.helpers, options2.helpers); + wrapHelpersToPassLookupProperty(mergedHelpers, container); + container.helpers = mergedHelpers; + if (templateSpec.usePartial) { + container.partials = container.mergeIfNeeded(options2.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = Utils.extend({}, env.decorators, options2.decorators); + } + container.hooks = {}; + container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options2); + var keepHelperInHelpers = options2.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; + _helpers.moveHelperToHooks(container, "helperMissing", keepHelperInHelpers); + _helpers.moveHelperToHooks(container, "blockHelperMissing", keepHelperInHelpers); + } else { + container.protoAccessControl = options2.protoAccessControl; + container.helpers = options2.helpers; + container.partials = options2.partials; + container.decorators = options2.decorators; + container.hooks = options2.hooks; + } + }; + ret._child = function(i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2["default"]("must pass block params"); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2["default"]("must pass parent depths"); + } + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; + } + function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options2 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + var currentDepths = depths; + if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { + currentDepths = [context].concat(depths); + } + return fn(container, context, container.helpers, container.partials, options2.data || data, blockParams && [options2.blockParams].concat(blockParams), currentDepths); + } + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; + } + function resolvePartial(partial, context, options2) { + if (!partial) { + if (options2.name === "@partial-block") { + partial = options2.data["partial-block"]; + } else { + partial = options2.partials[options2.name]; + } + } else if (!partial.call && !options2.name) { + options2.name = partial; + partial = options2.partials[partial]; + } + return partial; + } + function invokePartial(partial, context, options2) { + var currentPartialBlock = options2.data && options2.data["partial-block"]; + options2.partial = true; + if (options2.ids) { + options2.data.contextPath = options2.ids[0] || options2.data.contextPath; + } + var partialBlock = void 0; + if (options2.fn && options2.fn !== noop) { + (function() { + options2.data = _base.createFrame(options2.data); + var fn = options2.fn; + partialBlock = options2.data["partial-block"] = function partialBlockWrapper(context2) { + var options3 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1]; + options3.data = _base.createFrame(options3.data); + options3.data["partial-block"] = currentPartialBlock; + return fn(context2, options3); + }; + if (fn.partials) { + options2.partials = Utils.extend({}, options2.partials, fn.partials); + } + })(); + } + if (partial === void 0 && partialBlock) { + partial = partialBlock; + } + if (partial === void 0) { + throw new _exception2["default"]("The partial " + options2.name + " could not be found"); + } else if (partial instanceof Function) { + return partial(context, options2); + } + } + function noop() { + return ""; + } + function initData(context, data) { + if (!data || !("root" in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; + } + function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; + } + function wrapHelpersToPassLookupProperty(mergedHelpers, container) { + Object.keys(mergedHelpers).forEach(function(helperName) { + var helper = mergedHelpers[helperName]; + mergedHelpers[helperName] = passLookupPropertyOption(helper, container); + }); + } + function passLookupPropertyOption(helper, container) { + var lookupProperty = container.lookupProperty; + return _internalWrapHelper.wrapHelper(helper, function(options2) { + return Utils.extend({ lookupProperty }, options2); + }); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js +var require_no_conflict = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + exports2["default"] = function(Handlebars2) { + (function() { + if (typeof globalThis === "object") return; + Object.prototype.__defineGetter__("__magic__", function() { + return this; + }); + __magic__.globalThis = __magic__; + delete Object.prototype.__magic__; + })(); + var $Handlebars = globalThis.Handlebars; + Handlebars2.noConflict = function() { + if (globalThis.Handlebars === Handlebars2) { + globalThis.Handlebars = $Handlebars; + } + return Handlebars2; + }; + }; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.runtime.js +var require_handlebars_runtime = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.runtime.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } + } + var _handlebarsBase = require_base(); + var base = _interopRequireWildcard(_handlebarsBase); + var _handlebarsSafeString = require_safe_string(); + var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + var _handlebarsException = require_exception(); + var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + var _handlebarsUtils = require_utils3(); + var Utils = _interopRequireWildcard(_handlebarsUtils); + var _handlebarsRuntime = require_runtime(); + var runtime = _interopRequireWildcard(_handlebarsRuntime); + var _handlebarsNoConflict = require_no_conflict(); + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + function create() { + var hb = new base.HandlebarsEnvironment(); + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2["default"]; + hb.Exception = _handlebarsException2["default"]; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + hb.VM = runtime; + hb.template = function(spec) { + return runtime.template(spec, hb); + }; + return hb; + } + var inst = create(); + inst.create = create; + _handlebarsNoConflict2["default"](inst); + inst["default"] = inst; + exports2["default"] = inst; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js +var require_ast = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash); + }, + scopedId: function scopedId(path3) { + return /^\.|this\b/.test(path3.original); + }, + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path3) { + return path3.parts.length === 1 && !AST.helpers.scopedId(path3) && !path3.depth; + } + } + }; + exports2["default"] = AST; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +var require_parser = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var handlebars = function() { + var parser = { + trace: function trace() { + }, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: "CommentStatement", + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + break; + case 10: + this.$ = { + type: "ContentStatement", + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + this.$ = { strip: $$[$0 - 2].strip, program, chain: true }; + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: "PartialStatement", + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: "", + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: "SubExpression", + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + break; + case 30: + this.$ = { type: "Hash", pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: "HashPair", key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: "StringLiteral", value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: "NumberLiteral", value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: "BooleanLiteral", value: $$[$0] === "true", original: $$[$0] === "true", loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: "NullLiteral", original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] }); + this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = []; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse2(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + var lexer = function() { + var lexer2 = { + EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ""; + this.conditionStack = ["INITIAL"]; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + this.yylloc = { + first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ""; + this.match = ""; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { + first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length + }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token; + else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== "undefined") { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } + }; + lexer2.options = {}; + lexer2.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + function strip(start, end) { + return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); + } + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + break; + case 3: + this.begin("raw"); + return 15; + break; + case 4: + this.popState(); + if (this.conditionStack[this.conditionStack.length - 1] === "raw") { + return 15; + } else { + strip(5, 9); + return "END_RAW_BLOCK"; + } + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin("raw"); + return 23; + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState(); + return 44; + break; + case 16: + this.popState(); + return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin("com"); + break; + case 22: + this.popState(); + return 14; + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + break; + case 29: + this.popState(); + return 54; + break; + case 30: + this.popState(); + return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"'); + return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'"); + return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, "$1"); + return 72; + break; + case 43: + return "INVALID"; + break; + case 44: + return 5; + break; + } + }; + lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer2; + }(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + } + Parser.prototype = parser; + parser.Parser = Parser; + return new Parser(); + }(); + exports2["default"] = handlebars; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +var require_visitor = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + function Visitor() { + this.parents = []; + } + Visitor.prototype = { + constructor: Visitor, + mutating: false, + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + if (value && !Visitor.prototype[value.type]) { + throw new _exception2["default"]('Unexpected node type "' + value.type + '" found when accepting ' + name + " on " + node.type); + } + node[name] = value; + } + }, + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + if (!node[name]) { + throw new _exception2["default"](node.type + " requires " + name); + } + }, + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + accept: function accept(object) { + if (!object) { + return; + } + if (!this[object.type]) { + throw new _exception2["default"]("Unknown type: " + object.type, object); + } + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + var ret = this[object.type](object); + this.current = this.parents.shift(); + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + Program: function Program(program) { + this.acceptArray(program.body); + }, + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + this.acceptKey(partial, "program"); + }, + ContentStatement: function ContentStatement() { + }, + CommentStatement: function CommentStatement() { + }, + SubExpression: visitSubExpression, + PathExpression: function PathExpression() { + }, + StringLiteral: function StringLiteral() { + }, + NumberLiteral: function NumberLiteral() { + }, + BooleanLiteral: function BooleanLiteral() { + }, + UndefinedLiteral: function UndefinedLiteral() { + }, + NullLiteral: function NullLiteral() { + }, + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, "value"); + } + }; + function visitSubExpression(mustache) { + this.acceptRequired(mustache, "path"); + this.acceptArray(mustache.params); + this.acceptKey(mustache, "hash"); + } + function visitBlock(block) { + visitSubExpression.call(this, block); + this.acceptKey(block, "program"); + this.acceptKey(block, "inverse"); + } + function visitPartial(partial) { + this.acceptRequired(partial, "name"); + this.acceptArray(partial.params); + this.acceptKey(partial, "hash"); + } + exports2["default"] = Visitor; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +var require_whitespace_control = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _visitor = require_visitor(); + var _visitor2 = _interopRequireDefault(_visitor); + function WhitespaceControl() { + var options2 = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0]; + this.options = options2; + } + WhitespaceControl.prototype = new _visitor2["default"](); + WhitespaceControl.prototype.Program = function(program) { + var doStandalone = !this.options.ignoreStandalone; + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], strip = this.accept(current); + if (!strip) { + continue; + } + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), _isNextWhitespace = isNextWhitespace(body, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + if (doStandalone && inlineStandalone) { + omitRight(body, i); + if (omitLeft(body, i)) { + if (current.type === "PartialStatement") { + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + omitRight(body, i); + omitLeft((current.inverse || current.program).body); + } + } + return program; + }; + WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(block) { + this.accept(block.program); + this.accept(block.inverse); + var program = block.program || block.inverse, inverse = block.program && block.inverse, firstInverse = inverse, lastInverse = inverse; + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + if (inverse) { + var inverseStrip = block.inverseStrip; + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + return strip; + }; + WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(mustache) { + return mustache.strip; + }; + WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(node) { + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; + }; + function isPrevWhitespace(body, i, isRoot) { + if (i === void 0) { + i = body.length; + } + var prev = body[i - 1], sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + if (prev.type === "ContentStatement") { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } + } + function isNextWhitespace(body, i, isRoot) { + if (i === void 0) { + i = -1; + } + var next = body[i + 1], sibling = body[i + 2]; + if (!next) { + return isRoot; + } + if (next.type === "ContentStatement") { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } + } + function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== "ContentStatement" || !multiple && current.rightStripped) { + return; + } + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ""); + current.rightStripped = current.value !== original; + } + function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== "ContentStatement" || !multiple && current.leftStripped) { + return; + } + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ""); + current.leftStripped = current.value !== original; + return current.leftStripped; + } + exports2["default"] = WhitespaceControl; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js +var require_helpers2 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.SourceLocation = SourceLocation; + exports2.id = id; + exports2.stripFlags = stripFlags; + exports2.stripComment = stripComment; + exports2.preparePath = preparePath; + exports2.prepareMustache = prepareMustache; + exports2.prepareRawBlock = prepareRawBlock; + exports2.prepareBlock = prepareBlock; + exports2.prepareProgram = prepareProgram; + exports2.preparePartialBlock = preparePartialBlock; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + function validateClose(open, close) { + close = close.path ? close.path.original : close; + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + throw new _exception2["default"](open.path.original + " doesn't match " + close, errorNode); + } + } + function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; + } + function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substring(1, token.length - 1); + } else { + return token; + } + } + function stripFlags(open, close) { + return { + open: open.charAt(2) === "~", + close: close.charAt(close.length - 3) === "~" + }; + } + function stripComment(comment) { + return comment.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, ""); + } + function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + var original = data ? "@" : "", dig = [], depth = 0; + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, isLiteral = parts[i].original !== part; + original += (parts[i].separator || "") + part; + if (!isLiteral && (part === ".." || part === "." || part === "this")) { + if (dig.length > 0) { + throw new _exception2["default"]("Invalid path: " + original, { loc }); + } else if (part === "..") { + depth++; + } + } else { + dig.push(part); + } + } + return { + type: "PathExpression", + data, + depth, + parts: dig, + original, + loc + }; + } + function prepareMustache(path3, params, hash, open, strip, locInfo) { + var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&"; + var decorator = /\*/.test(open); + return { + type: decorator ? "Decorator" : "MustacheStatement", + path: path3, + params, + hash, + escaped, + strip, + loc: this.locInfo(locInfo) + }; + } + function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + locInfo = this.locInfo(locInfo); + var program = { + type: "Program", + body: contents, + strip: {}, + loc: locInfo + }; + return { + type: "BlockStatement", + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; + } + function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + var decorator = /\*/.test(openBlock.open); + program.blockParams = openBlock.blockParams; + var inverse = void 0, inverseStrip = void 0; + if (inverseAndProgram) { + if (decorator) { + throw new _exception2["default"]("Unexpected inverse block on decorator", inverseAndProgram); + } + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + return { + type: decorator ? "DecoratorBlock" : "BlockStatement", + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program, + inverse, + openStrip: openBlock.strip, + inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, lastLoc = statements[statements.length - 1].loc; + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + return { + type: "Program", + body: statements, + strip: {}, + loc + }; + } + function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + return { + type: "PartialBlockStatement", + name: open.path, + params: open.params, + hash: open.hash, + program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +var require_base2 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.parseWithoutProcessing = parseWithoutProcessing; + exports2.parse = parse2; + function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; + } else { + var newObj = {}; + if (obj != null) { + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; + } + } + newObj["default"] = obj; + return newObj; + } + } + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _parser = require_parser(); + var _parser2 = _interopRequireDefault(_parser); + var _whitespaceControl = require_whitespace_control(); + var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + var _helpers = require_helpers2(); + var Helpers = _interopRequireWildcard(_helpers); + var _utils = require_utils3(); + exports2.parser = _parser2["default"]; + var yy = {}; + _utils.extend(yy, Helpers); + function parseWithoutProcessing(input, options2) { + if (input.type === "Program") { + return input; + } + _parser2["default"].yy = yy; + yy.locInfo = function(locInfo) { + return new yy.SourceLocation(options2 && options2.srcName, locInfo); + }; + var ast = _parser2["default"].parse(input); + return ast; + } + function parse2(input, options2) { + var ast = parseWithoutProcessing(input, options2); + var strip = new _whitespaceControl2["default"](options2); + return strip.accept(ast); + } + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +var require_compiler = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.Compiler = Compiler; + exports2.precompile = precompile; + exports2.compile = compile; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _utils = require_utils3(); + var _ast = require_ast(); + var _ast2 = _interopRequireDefault(_ast); + var slice = [].slice; + function Compiler() { + } + Compiler.prototype = { + compiler: Compiler, + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + return true; + }, + guid: 0, + compile: function compile2(program, options2) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options2; + this.stringParams = options2.stringParams; + this.trackIds = options2.trackIds; + options2.blockParams = options2.blockParams || []; + options2.knownHelpers = _utils.extend(/* @__PURE__ */ Object.create(null), { + helperMissing: true, + blockHelperMissing: true, + each: true, + "if": true, + unless: true, + "with": true, + log: true, + lookup: true + }, options2.knownHelpers); + return this.accept(program); + }, + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), result = childCompiler.compile(program, this.options), guid = this.guid++; + this.usePartial = this.usePartial || result.usePartial; + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + return guid; + }, + accept: function accept(node) { + if (!this[node.type]) { + throw new _exception2["default"]("Unknown type: " + node.type, node); + } + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + var body = program.body, bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + this.options.blockParams.shift(); + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + return this; + }, + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + var program = block.program, inverse = block.inverse; + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + var type = this.classifySexpr(block); + if (type === "helper") { + this.helperSexpr(block, program, inverse); + } else if (type === "simple") { + this.simpleSexpr(block); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + this.opcode("emptyHash"); + this.opcode("blockValue", block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + this.opcode("emptyHash"); + this.opcode("ambiguousBlockValue"); + } + this.opcode("append"); + }, + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, void 0), path3 = decorator.path; + this.useDecorators = true; + this.opcode("registerDecorator", params.length, path3.original); + }, + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + var params = partial.params; + if (params.length > 1) { + throw new _exception2["default"]("Unsupported number of partial arguments: " + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode("pushLiteral", "undefined"); + } else { + params.push({ type: "PathExpression", parts: [], depth: 0 }); + } + } + var partialName = partial.name.original, isDynamic = partial.name.type === "SubExpression"; + if (isDynamic) { + this.accept(partial.name); + } + this.setupFullMustacheParams(partial, program, void 0, true); + var indent = partial.indent || ""; + if (this.options.preventIndent && indent) { + this.opcode("appendContent", indent); + indent = ""; + } + this.opcode("invokePartial", isDynamic, partialName, indent); + this.opcode("append"); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + if (mustache.escaped && !this.options.noEscape) { + this.opcode("appendEscaped"); + } else { + this.opcode("append"); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode("appendContent", content.value); + } + }, + CommentStatement: function CommentStatement() { + }, + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + if (type === "simple") { + this.simpleSexpr(sexpr); + } else if (type === "helper") { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path3 = sexpr.path, name = path3.parts[0], isBlock = program != null || inverse != null; + this.opcode("getContext", path3.depth); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + path3.strict = true; + this.accept(path3); + this.opcode("invokeAmbiguous", name, isBlock); + }, + simpleSexpr: function simpleSexpr(sexpr) { + var path3 = sexpr.path; + path3.strict = true; + this.accept(path3); + this.opcode("resolvePossibleLambda"); + }, + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), path3 = sexpr.path, name = path3.parts[0]; + if (this.options.knownHelpers[name]) { + this.opcode("invokeKnownHelper", params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr); + } else { + path3.strict = true; + path3.falsy = true; + this.accept(path3); + this.opcode("invokeHelper", params.length, path3.original, _ast2["default"].helpers.simpleId(path3)); + } + }, + PathExpression: function PathExpression(path3) { + this.addDepth(path3.depth); + this.opcode("getContext", path3.depth); + var name = path3.parts[0], scoped = _ast2["default"].helpers.scopedId(path3), blockParamId = !path3.depth && !scoped && this.blockParamIndex(name); + if (blockParamId) { + this.opcode("lookupBlockParam", blockParamId, path3.parts); + } else if (!name) { + this.opcode("pushContext"); + } else if (path3.data) { + this.options.data = true; + this.opcode("lookupData", path3.depth, path3.parts, path3.strict); + } else { + this.opcode("lookupOnContext", path3.parts, path3.falsy, path3.strict, scoped); + } + }, + StringLiteral: function StringLiteral(string) { + this.opcode("pushString", string.value); + }, + NumberLiteral: function NumberLiteral(number) { + this.opcode("pushLiteral", number.value); + }, + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode("pushLiteral", bool.value); + }, + UndefinedLiteral: function UndefinedLiteral() { + this.opcode("pushLiteral", "undefined"); + }, + NullLiteral: function NullLiteral() { + this.opcode("pushLiteral", "null"); + }, + Hash: function Hash(hash) { + var pairs = hash.pairs, i = 0, l = pairs.length; + this.opcode("pushHash"); + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode("assignToHash", pairs[i].key); + } + this.opcode("popHash"); + }, + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ + opcode: name, + args: slice.call(arguments, 1), + loc: this.sourceNode[0].loc + }); + }, + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + this.useDepths = true; + }, + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2["default"].helpers.simpleId(sexpr.path); + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + var isHelper = !isBlockParam && _ast2["default"].helpers.helperExpression(sexpr); + var isEligible = !isBlockParam && (isHelper || isSimple); + if (isEligible && !isHelper) { + var _name = sexpr.path.parts[0], options2 = this.options; + if (options2.knownHelpers[_name]) { + isHelper = true; + } else if (options2.knownHelpersOnly) { + isEligible = false; + } + } + if (isHelper) { + return "helper"; + } else if (isEligible) { + return "ambiguous"; + } else { + return "simple"; + } + }, + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ""; + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, "").replace(/\//g, "."); + } + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode("getContext", val.depth || 0); + this.opcode("pushStringParam", value, val.type); + if (val.type === "SubExpression") { + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = void 0; + if (val.parts && !_ast2["default"].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join("."); + this.opcode("pushId", "BlockParam", blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, ""); + } + this.opcode("pushId", val.type, value); + } + } + this.accept(val); + } + }, + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + this.opcode("pushProgram", program); + this.opcode("pushProgram", inverse); + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode("emptyHash", omitEmpty); + } + return params; + }, + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } + }; + function precompile(input, options2, env) { + if (input == null || typeof input !== "string" && input.type !== "Program") { + throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input); + } + options2 = options2 || {}; + if (!("data" in options2)) { + options2.data = true; + } + if (options2.compat) { + options2.useDepths = true; + } + var ast = env.parse(input, options2), environment = new env.Compiler().compile(ast, options2); + return new env.JavaScriptCompiler().compile(environment, options2); + } + function compile(input, options2, env) { + if (options2 === void 0) options2 = {}; + if (input == null || typeof input !== "string" && input.type !== "Program") { + throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input); + } + options2 = _utils.extend({}, options2); + if (!("data" in options2)) { + options2.data = true; + } + if (options2.compat) { + options2.useDepths = true; + } + var compiled = void 0; + function compileInput() { + var ast = env.parse(input, options2), environment = new env.Compiler().compile(ast, options2), templateSpec = new env.JavaScriptCompiler().compile(environment, options2, void 0, true); + return env.template(templateSpec); + } + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function(setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function(i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; + } + function argEquals(a, b) { + if (a === b) { + return true; + } + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } + } + function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + sexpr.path = { + type: "PathExpression", + data: false, + depth: 0, + parts: [literal.original + ""], + original: literal.original + "", + loc: literal.loc + }; + } + } + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js +var require_base64 = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js"(exports2) { + "use strict"; + var intToCharMap = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""); + exports2.encode = function(number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); + }; + exports2.decode = function(charCode) { + var bigA = 65; + var bigZ = 90; + var littleA = 97; + var littleZ = 122; + var zero = 48; + var nine = 57; + var plus = 43; + var slash = 47; + var littleOffset = 26; + var numberOffset = 52; + if (bigA <= charCode && charCode <= bigZ) { + return charCode - bigA; + } + if (littleA <= charCode && charCode <= littleZ) { + return charCode - littleA + littleOffset; + } + if (zero <= charCode && charCode <= nine) { + return charCode - zero + numberOffset; + } + if (charCode == plus) { + return 62; + } + if (charCode == slash) { + return 63; + } + return -1; + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js +var require_base64_vlq = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64-vlq.js"(exports2) { + "use strict"; + var base64 = require_base64(); + var VLQ_BASE_SHIFT = 5; + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + var VLQ_BASE_MASK = VLQ_BASE - 1; + var VLQ_CONTINUATION_BIT = VLQ_BASE; + function toVLQSigned(aValue) { + return aValue < 0 ? (-aValue << 1) + 1 : (aValue << 1) + 0; + } + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative ? -shifted : shifted; + } + exports2.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + var vlq = toVLQSigned(aValue); + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + return encoded; + }; + exports2.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js +var require_util8 = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/util.js"(exports2) { + "use strict"; + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports2.getArg = getArg; + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports2.urlParse = urlParse; + function urlGenerate(aParsedUrl) { + var url = ""; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ":"; + } + url += "//"; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + "@"; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port; + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports2.urlGenerate = urlGenerate; + function normalize(aPath) { + var path3 = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path3 = url.path; + } + var isAbsolute = exports2.isAbsolute(path3); + var parts = path3.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === ".") { + parts.splice(i, 1); + } else if (part === "..") { + up++; + } else if (up > 0) { + if (part === "") { + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path3 = parts.join("/"); + if (path3 === "") { + path3 = isAbsolute ? "/" : "."; + } + if (url) { + url.path = path3; + return urlGenerate(url); + } + return path3; + } + exports2.normalize = normalize; + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || "/"; + } + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + var joined = aPath.charAt(0) === "/" ? aPath : normalize(aRoot.replace(/\/+$/, "") + "/" + aPath); + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports2.join = join; + exports2.isAbsolute = function(aPath) { + return aPath.charAt(0) === "/" || urlRegexp.test(aPath); + }; + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + aRoot = aRoot.replace(/\/$/, ""); + var level = 0; + while (aPath.indexOf(aRoot + "/") !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + ++level; + } + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); + } + exports2.relative = relative; + var supportsNullProto = function() { + var obj = /* @__PURE__ */ Object.create(null); + return !("__proto__" in obj); + }(); + function identity(s) { + return s; + } + function toSetString(aStr) { + if (isProtoString(aStr)) { + return "$" + aStr; + } + return aStr; + } + exports2.toSetString = supportsNullProto ? identity : toSetString; + function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + return aStr; + } + exports2.fromSetString = supportsNullProto ? identity : fromSetString; + function isProtoString(s) { + if (!s) { + return false; + } + var length = s.length; + if (length < 9) { + return false; + } + if (s.charCodeAt(length - 1) !== 95 || s.charCodeAt(length - 2) !== 95 || s.charCodeAt(length - 3) !== 111 || s.charCodeAt(length - 4) !== 116 || s.charCodeAt(length - 5) !== 111 || s.charCodeAt(length - 6) !== 114 || s.charCodeAt(length - 7) !== 112 || s.charCodeAt(length - 8) !== 95 || s.charCodeAt(length - 9) !== 95) { + return false; + } + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36) { + return false; + } + } + return true; + } + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByOriginalPositions = compareByOriginalPositions; + function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + if (aStr1 === null) { + return 1; + } + if (aStr2 === null) { + return -1; + } + if (aStr1 > aStr2) { + return 1; + } + return -1; + } + function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + return strcmp(mappingA.name, mappingB.name); + } + exports2.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, "")); + } + exports2.parseSourceMapInput = parseSourceMapInput; + function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ""; + if (sourceRoot) { + if (sourceRoot[sourceRoot.length - 1] !== "/" && sourceURL[0] !== "/") { + sourceRoot += "/"; + } + sourceURL = sourceRoot + sourceURL; + } + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + var index = parsed.path.lastIndexOf("/"); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + return normalize(sourceURL); + } + exports2.computeSourceURL = computeSourceURL; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js +var require_array_set = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/array-set.js"(exports2) { + "use strict"; + var util2 = require_util8(); + var has = Object.prototype.hasOwnProperty; + var hasNativeMap = typeof Map !== "undefined"; + function ArraySet() { + this._array = []; + this._set = hasNativeMap ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null); + } + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; + }; + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util2.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } + }; + ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util2.toSetString(aStr); + return has.call(this._set, sStr); + } + }; + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util2.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error("No element indexed by " + aIdx); + }; + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + exports2.ArraySet = ArraySet; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js +var require_mapping_list = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/mapping-list.js"(exports2) { + "use strict"; + var util2 = require_util8(); + function generatedPositionAfter(mappingA, mappingB) { + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || util2.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; + } + function MappingList() { + this._array = []; + this._sorted = true; + this._last = { generatedLine: -1, generatedColumn: 0 }; + } + MappingList.prototype.unsortedForEach = function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util2.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; + }; + exports2.MappingList = MappingList; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js +var require_source_map_generator = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-generator.js"(exports2) { + "use strict"; + var base64VLQ = require_base64_vlq(); + var util2 = require_util8(); + var ArraySet = require_array_set().ArraySet; + var MappingList = require_mapping_list().MappingList; + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util2.getArg(aArgs, "file", null); + this._sourceRoot = util2.getArg(aArgs, "sourceRoot", null); + this._skipValidation = util2.getArg(aArgs, "skipValidation", false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + SourceMapGenerator.prototype._version = 3; + SourceMapGenerator.fromSourceMap = function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot + }); + aSourceMapConsumer.eachMapping(function(mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util2.relative(sourceRoot, newMapping.source); + } + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util2.relative(sourceRoot, sourceFile); + } + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + SourceMapGenerator.prototype.addMapping = function SourceMapGenerator_addMapping(aArgs) { + var generated = util2.getArg(aArgs, "generated"); + var original = util2.getArg(aArgs, "original", null); + var source = util2.getArg(aArgs, "source", null); + var name = util2.getArg(aArgs, "name", null); + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source, + name + }); + }; + SourceMapGenerator.prototype.setSourceContent = function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util2.relative(this._sourceRoot, source); + } + if (aSourceContent != null) { + if (!this._sourcesContents) { + this._sourcesContents = /* @__PURE__ */ Object.create(null); + } + this._sourcesContents[util2.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + delete this._sourcesContents[util2.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + SourceMapGenerator.prototype.applySourceMap = function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + `SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.` + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + if (sourceRoot != null) { + sourceFile = util2.relative(sourceRoot, sourceFile); + } + var newSources = new ArraySet(); + var newNames = new ArraySet(); + this._mappings.unsortedForEach(function(mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util2.join(aSourceMapPath, mapping.source); + } + if (sourceRoot != null) { + mapping.source = util2.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + }, this); + this._sources = newSources; + this._names = newNames; + aSourceMapConsumer.sources.forEach(function(sourceFile2) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile2); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile2 = util2.join(aSourceMapPath, sourceFile2); + } + if (sourceRoot != null) { + sourceFile2 = util2.relative(sourceRoot, sourceFile2); + } + this.setSourceContent(sourceFile2, content); + } + }, this); + }; + SourceMapGenerator.prototype._validateMapping = function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, aName) { + if (aOriginal && typeof aOriginal.line !== "number" && typeof aOriginal.column !== "number") { + throw new Error( + "original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values." + ); + } + if (aGenerated && "line" in aGenerated && "column" in aGenerated && aGenerated.line > 0 && aGenerated.column >= 0 && !aOriginal && !aSource && !aName) { + return; + } else if (aGenerated && "line" in aGenerated && "column" in aGenerated && aOriginal && "line" in aOriginal && "column" in aOriginal && aGenerated.line > 0 && aGenerated.column >= 0 && aOriginal.line > 0 && aOriginal.column >= 0 && aSource) { + return; + } else { + throw new Error("Invalid mapping: " + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ""; + var next; + var mapping; + var nameIdx; + var sourceIdx; + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = ""; + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ";"; + previousGeneratedLine++; + } + } else { + if (i > 0) { + if (!util2.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ","; + } + } + next += base64VLQ.encode(mapping.generatedColumn - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + next += base64VLQ.encode(mapping.originalLine - 1 - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + next += base64VLQ.encode(mapping.originalColumn - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + result += next; + } + return result; + }; + SourceMapGenerator.prototype._generateSourcesContent = function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function(source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util2.relative(aSourceRoot, source); + } + var key = util2.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) ? this._sourcesContents[key] : null; + }, this); + }; + SourceMapGenerator.prototype.toJSON = function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + return map; + }; + SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + exports2.SourceMapGenerator = SourceMapGenerator; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js +var require_binary_search = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/binary-search.js"(exports2) { + "use strict"; + exports2.GREATEST_LOWER_BOUND = 1; + exports2.LEAST_UPPER_BOUND = 2; + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + return mid; + } else if (cmp > 0) { + if (aHigh - mid > 1) { + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } else { + if (mid - aLow > 1) { + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + if (aBias == exports2.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + exports2.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + var index = recursiveSearch( + -1, + aHaystack.length, + aNeedle, + aHaystack, + aCompare, + aBias || exports2.GREATEST_LOWER_BOUND + ); + if (index < 0) { + return -1; + } + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + return index; + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js +var require_quick_sort = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/quick-sort.js"(exports2) { + "use strict"; + function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; + } + function randomIntInRange(low, high) { + return Math.round(low + Math.random() * (high - low)); + } + function doQuickSort(ary, comparator, p, r) { + if (p < r) { + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + swap(ary, pivotIndex, r); + var pivot = ary[r]; + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + swap(ary, i + 1, j); + var q = i + 1; + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } + } + exports2.quickSort = function(ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); + }; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js +var require_source_map_consumer = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-map-consumer.js"(exports2) { + "use strict"; + var util2 = require_util8(); + var binarySearch = require_binary_search(); + var ArraySet = require_array_set().ArraySet; + var base64VLQ = require_base64_vlq(); + var quickSort = require_quick_sort().quickSort; + function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util2.parseSourceMapInput(aSourceMap); + } + return sourceMap.sections != null ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); + } + SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); + }; + SourceMapConsumer.prototype._version = 3; + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_generatedMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__generatedMappings; + } + }); + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, "_originalMappings", { + configurable: true, + enumerable: true, + get: function() { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + return this.__originalMappings; + } + }); + SourceMapConsumer.prototype._charIsMappingSeparator = function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + SourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + SourceMapConsumer.GREATEST_LOWER_BOUND = 1; + SourceMapConsumer.LEAST_UPPER_BOUND = 2; + SourceMapConsumer.prototype.eachMapping = function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + var sourceRoot = this.sourceRoot; + mappings.map(function(mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util2.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + SourceMapConsumer.prototype.allGeneratedPositionsFor = function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util2.getArg(aArgs, "line"); + var needle = { + source: util2.getArg(aArgs, "source"), + originalLine: line, + originalColumn: util2.getArg(aArgs, "column", 0) + }; + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + var mappings = []; + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util2.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND + ); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (aArgs.column === void 0) { + var originalLine = mapping.originalLine; + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util2.getArg(mapping, "generatedLine", null), + column: util2.getArg(mapping, "generatedColumn", null), + lastColumn: util2.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + while (mapping && mapping.originalLine === line && mapping.originalColumn == originalColumn) { + mappings.push({ + line: util2.getArg(mapping, "generatedLine", null), + column: util2.getArg(mapping, "generatedColumn", null), + lastColumn: util2.getArg(mapping, "lastGeneratedColumn", null) + }); + mapping = this._originalMappings[++index]; + } + } + } + return mappings; + }; + exports2.SourceMapConsumer = SourceMapConsumer; + function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util2.parseSourceMapInput(aSourceMap); + } + var version = util2.getArg(sourceMap, "version"); + var sources = util2.getArg(sourceMap, "sources"); + var names = util2.getArg(sourceMap, "names", []); + var sourceRoot = util2.getArg(sourceMap, "sourceRoot", null); + var sourcesContent = util2.getArg(sourceMap, "sourcesContent", null); + var mappings = util2.getArg(sourceMap, "mappings"); + var file = util2.getArg(sourceMap, "file", null); + if (version != this._version) { + throw new Error("Unsupported version: " + version); + } + if (sourceRoot) { + sourceRoot = util2.normalize(sourceRoot); + } + sources = sources.map(String).map(util2.normalize).map(function(source) { + return sourceRoot && util2.isAbsolute(sourceRoot) && util2.isAbsolute(source) ? util2.relative(sourceRoot, source) : source; + }); + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + this._absoluteSources = this._sources.toArray().map(function(s) { + return util2.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; + } + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util2.relative(this.sourceRoot, relativeSource); + } + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + return -1; + }; + BasicSourceMapConsumer.fromSourceMap = function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent( + smc._sources.toArray(), + smc.sourceRoot + ); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function(s) { + return util2.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping(); + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + destOriginalMappings.push(destMapping); + } + destGeneratedMappings.push(destMapping); + } + quickSort(smc.__originalMappings, util2.compareByOriginalPositions); + return smc; + }; + BasicSourceMapConsumer.prototype._version = 3; + Object.defineProperty(BasicSourceMapConsumer.prototype, "sources", { + get: function() { + return this._absoluteSources.slice(); + } + }); + function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; + } + BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + while (index < length) { + if (aStr.charAt(index) === ";") { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } else if (aStr.charAt(index) === ",") { + index++; + } else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + if (segment.length === 2) { + throw new Error("Found a source, but no line and column"); + } + if (segment.length === 3) { + throw new Error("Found a source and line, but no column"); + } + cachedSegments[str] = segment; + } + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + if (segment.length > 1) { + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + mapping.originalLine += 1; + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + if (segment.length > 4) { + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + generatedMappings.push(mapping); + if (typeof mapping.originalLine === "number") { + originalMappings.push(mapping); + } + } + } + quickSort(generatedMappings, util2.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + quickSort(originalMappings, util2.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + BasicSourceMapConsumer.prototype._findMapping = function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, aColumnName, aComparator, aBias) { + if (aNeedle[aLineName] <= 0) { + throw new TypeError("Line must be greater than or equal to 1, got " + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError("Column must be greater than or equal to 0, got " + aNeedle[aColumnName]); + } + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + BasicSourceMapConsumer.prototype.computeColumnSpans = function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + mapping.lastGeneratedColumn = Infinity; + } + }; + BasicSourceMapConsumer.prototype.originalPositionFor = function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util2.getArg(aArgs, "line"), + generatedColumn: util2.getArg(aArgs, "column") + }; + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util2.compareByGeneratedPositionsDeflated, + util2.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + if (index >= 0) { + var mapping = this._generatedMappings[index]; + if (mapping.generatedLine === needle.generatedLine) { + var source = util2.getArg(mapping, "source", null); + if (source !== null) { + source = this._sources.at(source); + source = util2.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util2.getArg(mapping, "name", null); + if (name !== null) { + name = this._names.at(name); + } + return { + source, + line: util2.getArg(mapping, "originalLine", null), + column: util2.getArg(mapping, "originalColumn", null), + name + }; + } + } + return { + source: null, + line: null, + column: null, + name: null + }; + }; + BasicSourceMapConsumer.prototype.hasContentsOfAllSources = function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && !this.sourcesContent.some(function(sc) { + return sc == null; + }); + }; + BasicSourceMapConsumer.prototype.sourceContentFor = function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util2.relative(this.sourceRoot, relativeSource); + } + var url; + if (this.sourceRoot != null && (url = util2.urlParse(this.sourceRoot))) { + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]; + } + if ((!url.path || url.path == "/") && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + BasicSourceMapConsumer.prototype.generatedPositionFor = function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util2.getArg(aArgs, "source"); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + var needle = { + source, + originalLine: util2.getArg(aArgs, "line"), + originalColumn: util2.getArg(aArgs, "column") + }; + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util2.compareByOriginalPositions, + util2.getArg(aArgs, "bias", SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + if (index >= 0) { + var mapping = this._originalMappings[index]; + if (mapping.source === needle.source) { + return { + line: util2.getArg(mapping, "generatedLine", null), + column: util2.getArg(mapping, "generatedColumn", null), + lastColumn: util2.getArg(mapping, "lastGeneratedColumn", null) + }; + } + } + return { + line: null, + column: null, + lastColumn: null + }; + }; + exports2.BasicSourceMapConsumer = BasicSourceMapConsumer; + function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === "string") { + sourceMap = util2.parseSourceMapInput(aSourceMap); + } + var version = util2.getArg(sourceMap, "version"); + var sections = util2.getArg(sourceMap, "sections"); + if (version != this._version) { + throw new Error("Unsupported version: " + version); + } + this._sources = new ArraySet(); + this._names = new ArraySet(); + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function(s) { + if (s.url) { + throw new Error("Support for url field in sections not implemented."); + } + var offset = util2.getArg(s, "offset"); + var offsetLine = util2.getArg(offset, "line"); + var offsetColumn = util2.getArg(offset, "column"); + if (offsetLine < lastOffset.line || offsetLine === lastOffset.line && offsetColumn < lastOffset.column) { + throw new Error("Section offsets must be ordered and non-overlapping."); + } + lastOffset = offset; + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util2.getArg(s, "map"), aSourceMapURL) + }; + }); + } + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + IndexedSourceMapConsumer.prototype._version = 3; + Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { + get: function() { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } + }); + IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util2.getArg(aArgs, "line"), + generatedColumn: util2.getArg(aArgs, "column") + }; + var sectionIndex = binarySearch.search( + needle, + this._sections, + function(needle2, section2) { + var cmp = needle2.generatedLine - section2.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + return needle2.generatedColumn - section2.generatedOffset.generatedColumn; + } + ); + var section = this._sections[sectionIndex]; + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + return section.consumer.originalPositionFor({ + line: needle.generatedLine - (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - (section.generatedOffset.generatedLine === needle.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + bias: aArgs.bias + }); + }; + IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function(s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + IndexedSourceMapConsumer.prototype.sourceContentFor = function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + IndexedSourceMapConsumer.prototype.generatedPositionFor = function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + if (section.consumer._findSourceIndex(util2.getArg(aArgs, "source")) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + (section.generatedOffset.generatedLine === generatedPosition.line ? section.generatedOffset.generatedColumn - 1 : 0) + }; + return ret; + } + } + return { + line: null, + column: null + }; + }; + IndexedSourceMapConsumer.prototype._parseMappings = function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + var source = section.consumer._sources.at(mapping.source); + source = util2.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + var adjustedMapping = { + source, + generatedLine: mapping.generatedLine + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + (section.generatedOffset.generatedLine === mapping.generatedLine ? section.generatedOffset.generatedColumn - 1 : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name + }; + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === "number") { + this.__originalMappings.push(adjustedMapping); + } + } + } + quickSort(this.__generatedMappings, util2.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util2.compareByOriginalPositions); + }; + exports2.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js +var require_source_node = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/source-node.js"(exports2) { + "use strict"; + var SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + var util2 = require_util8(); + var REGEX_NEWLINE = /(\r?\n)/; + var NEWLINE_CODE = 10; + var isSourceNode = "$$$isSourceNode$$$"; + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + SourceNode.fromStringWithSourceMap = function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + var node = new SourceNode(); + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + var newLine = getNextLine() || ""; + return lineContents + newLine; + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? remainingLines[remainingLinesIndex++] : void 0; + } + }; + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + var lastMapping = null; + aSourceMapConsumer.eachMapping(function(mapping) { + if (lastMapping !== null) { + if (lastGeneratedLine < mapping.generatedLine) { + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + } else { + var nextLine = remainingLines[remainingLinesIndex] || ""; + var code = nextLine.substr(0, mapping.generatedColumn - lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + lastMapping = mapping; + return; + } + } + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ""; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + addMappingWithCode(lastMapping, shiftNextLine()); + } + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + aSourceMapConsumer.sources.forEach(function(sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util2.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + return node; + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === void 0) { + node.add(code); + } else { + var source = aRelativePath ? util2.join(aRelativePath, mapping.source) : mapping.source; + node.add(new SourceNode( + mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name + )); + } + } + }; + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function(chunk) { + this.add(chunk); + }, this); + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length - 1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } else { + if (chunk !== "") { + aFn(chunk, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }); + } + } + } + }; + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len - 1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } else if (typeof lastChild === "string") { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } else { + this.children.push("".replace(aPattern, aReplacement)); + } + return this; + }; + SourceNode.prototype.setSourceContent = function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util2.toSetString(aSourceFile)] = aSourceContent; + }; + SourceNode.prototype.walkSourceContents = function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util2.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function(chunk) { + str += chunk; + }); + return str; + }; + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function(chunk, original) { + generated.code += chunk; + if (original.source !== null && original.line !== null && original.column !== null) { + if (lastOriginalSource !== original.source || lastOriginalLine !== original.line || lastOriginalColumn !== original.column || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function(sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + return { code: generated.code, map }; + }; + exports2.SourceNode = SourceNode; + } +}); + +// node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js +var require_source_map = __commonJS({ + "node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/source-map.js"(exports2) { + "use strict"; + exports2.SourceMapGenerator = require_source_map_generator().SourceMapGenerator; + exports2.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer; + exports2.SourceNode = require_source_node().SourceNode; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +var require_code_gen = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + var _utils = require_utils3(); + var SourceNode = void 0; + try { + if (typeof define !== "function" || !define.amd) { + SourceMap = require_source_map(); + SourceNode = SourceMap.SourceNode; + } + } catch (err) { + } + var SourceMap; + if (!SourceNode) { + SourceNode = function(line, column, srcFile, chunks) { + this.src = ""; + if (chunks) { + this.add(chunks); + } + }; + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(""); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(""); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; + } + function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === "boolean" || typeof chunk === "number") { + return chunk + ""; + } + return chunk; + } + function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; + } + CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + merge: function merge() { + var source = this.empty(); + this.each(function(line) { + source.add([" ", line, "\n"]); + }); + return source; + }, + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === void 0 ? this.currentLocation || { start: {} } : arguments[1]; + if (chunk instanceof SourceNode) { + return chunk; + } + chunk = castChunk(chunk, this, loc); + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? "." + type + "(" : "(", params, ")"]); + }, + quotedString: function quotedString(str) { + return '"' + (str + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"'; + }, + objectLiteral: function objectLiteral(obj) { + var _this = this; + var pairs = []; + Object.keys(obj).forEach(function(key) { + var value = castChunk(obj[key], _this); + if (value !== "undefined") { + pairs.push([_this.quotedString(key), ":", value]); + } + }); + var ret = this.generateList(pairs); + ret.prepend("{"); + ret.add("}"); + return ret; + }, + generateList: function generateList(entries) { + var ret = this.empty(); + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(","); + } + ret.add(castChunk(entries[i], this)); + } + return ret; + }, + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend("["); + ret.add("]"); + return ret; + } + }; + exports2["default"] = CodeGen; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +var require_javascript_compiler = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _base = require_base(); + var _exception = require_exception(); + var _exception2 = _interopRequireDefault(_exception); + var _utils = require_utils3(); + var _codeGen = require_code_gen(); + var _codeGen2 = _interopRequireDefault(_codeGen); + function Literal(value) { + this.value = value; + } + function JavaScriptCompiler() { + } + JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name) { + return this.internalNameLookup(parent, name); + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable("container.lookup"), "(depths, ", JSON.stringify(name), ")"]; + }, + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + appendToBuffer: function appendToBuffer(source, location, explicit) { + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + if (this.environment.isSimple) { + return ["return ", source, ";"]; + } else if (explicit) { + return ["buffer += ", source, ";"]; + } else { + source.appendToBuffer = true; + return source; + } + }, + initializeBuffer: function initializeBuffer() { + return this.quotedString(""); + }, + // END PUBLIC API + internalNameLookup: function internalNameLookup(parent, name) { + this.lookupPropertyFunctionIsUsed = true; + return ["lookupProperty(", parent, ",", JSON.stringify(name), ")"]; + }, + lookupPropertyFunctionIsUsed: false, + compile: function compile(environment, options2, context, asObject) { + this.environment = environment; + this.options = options2; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + this.preamble(); + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + this.compileChildren(environment, options2); + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + var opcodes = environment.opcodes, opcode = void 0, firstLoc = void 0, i = void 0, l = void 0; + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + this.source.currentLocation = firstLoc; + this.pushSource(""); + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2["default"]("Compile completed with content left on stack"); + } + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + this.decorators.prepend(["var decorators = container.decorators, ", this.lookupPropertyFunctionVarDeclaration(), ";\n"]); + this.decorators.push("return fn;"); + if (asObject) { + this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]); + } else { + this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"); + this.decorators.push("}\n"); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = void 0; + } + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + if (this.decorators) { + ret.main_d = this.decorators; + ret.useDecorators = true; + } + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + "_d"] = decorators[i]; + ret.useDecorators = true; + } + } + } + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + if (options2.srcName) { + ret = ret.toStringWithSourceMap({ file: options2.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + return ret; + } else { + return fn; + } + }, + preamble: function preamble() { + this.lastContext = 0; + this.source = new _codeGen2["default"](this.options.srcName); + this.decorators = new _codeGen2["default"](this.options.srcName); + }, + createFunctionContext: function createFunctionContext(asObject) { + var _this = this; + var varDeclarations = ""; + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ", " + locals.join(", "); + } + var aliasCount = 0; + Object.keys(this.aliases).forEach(function(alias) { + var node = _this.aliases[alias]; + if (node.children && node.referenceCount > 1) { + varDeclarations += ", alias" + ++aliasCount + "=" + alias; + node.children[0] = "alias" + aliasCount; + } + }); + if (this.lookupPropertyFunctionIsUsed) { + varDeclarations += ", " + this.lookupPropertyFunctionVarDeclaration(); + } + var params = ["container", "depth0", "helpers", "partials", "data"]; + if (this.useBlockParams || this.useDepths) { + params.push("blockParams"); + } + if (this.useDepths) { + params.push("depths"); + } + var source = this.mergeSource(varDeclarations); + if (asObject) { + params.push(source); + return Function.apply(this, params); + } else { + return this.source.wrap(["function(", params.join(","), ") {\n ", source, "}"]); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, appendOnly = !this.forceBuffer, appendFirst = void 0, sourceSeen = void 0, bufferStart = void 0, bufferEnd = void 0; + this.source.each(function(line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(" + "); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend("buffer += "); + } + bufferEnd.add(";"); + bufferStart = bufferEnd = void 0; + } + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend("return "); + bufferEnd.add(";"); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ", buffer = " + (appendFirst ? "" : this.initializeBuffer()); + if (bufferStart) { + bufferStart.prepend("return buffer + "); + bufferEnd.add(";"); + } else { + this.source.push("return buffer;"); + } + } + if (varDeclarations) { + this.source.prepend("var " + varDeclarations.substring(2) + (appendFirst ? "" : ";\n")); + } + return this.source.merge(); + }, + lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { + return "\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim(); + }, + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + var blockName = this.popStack(); + params.splice(1, 0, blockName); + this.push(this.source.functionCall(blockHelperMissing, "call", params)); + }, + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)]; + this.setupHelperArgs("", 0, params, true); + this.flushInline(); + var current = this.topStack(); + params.splice(1, 0, current); + this.pushSource(["if (!", this.lastHelper, ") { ", current, " = ", this.source.functionCall(blockHelperMissing, "call", params), "}"]); + }, + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + this.pendingContent = content; + }, + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function(current) { + return [" != null ? ", current, ' : ""']; + }); + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(["if (", local, " != null) { ", this.appendToBuffer(local, void 0, true), " }"]); + if (this.environment.isSimple) { + this.pushSource(["else { ", this.appendToBuffer("''", void 0, true), " }"]); + } + } + }, + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"])); + }, + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + if (!scoped && this.options.compat && !this.lastContext) { + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + this.resolvePath("context", parts, i, falsy, strict); + }, + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + this.push(["blockParams[", blockParamId[0], "][", blockParamId[1], "]"]); + this.resolvePath("context", parts, 1); + }, + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral("data"); + } else { + this.pushStackLiteral("container.data(data, " + depth + ")"); + } + this.resolvePath("data", parts, 0, true, strict); + }, + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + var _this2 = this; + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, i, type)); + return; + } + var len = parts.length; + for (; i < len; i++) { + this.replaceStack(function(current) { + var lookup = _this2.nameLookup(current, parts[i], type); + if (!falsy) { + return [" != null ? ", lookup, " : ", current]; + } else { + return [" && ", lookup]; + } + }); + } + }, + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]); + }, + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + if (type !== "SubExpression") { + if (typeof string === "string") { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push("{}"); + } + if (this.stringParams) { + this.push("{}"); + this.push("{}"); + } + this.pushStackLiteral(omitEmpty ? "undefined" : "{}"); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: {}, types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + this.push(this.objectLiteral(hash.values)); + }, + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup("decorators", name, "decorator"), options2 = this.setupHelperArgs(name, paramSize); + this.decorators.push(["fn = ", this.decorators.functionCall(foundDecorator, "", ["fn", "props", "container", options2]), " || fn;"]); + }, + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), helper = this.setupHelper(paramSize, name); + var possibleFunctionCalls = []; + if (isSimple) { + possibleFunctionCalls.push(helper.name); + } + possibleFunctionCalls.push(nonHelper); + if (!this.options.strict) { + possibleFunctionCalls.push(this.aliasable("container.hooks.helperMissing")); + } + var functionLookupCode = ["(", this.itemsSeparatedBy(possibleFunctionCalls, "||"), ")"]; + var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams); + this.push(functionCall); + }, + itemsSeparatedBy: function itemsSeparatedBy(items, separator) { + var result = []; + result.push(items[0]); + for (var i = 1; i < items.length; i++) { + result.push(separator, items[i]); + } + return result; + }, + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, "call", helper.callParams)); + }, + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister("helper"); + var nonHelper = this.popStack(); + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + var helperName = this.lastHelper = this.nameLookup("helpers", name, "helper"); + var lookup = ["(", "(helper = ", helperName, " || ", nonHelper, ")"]; + if (!this.options.strict) { + lookup[0] = "(helper = "; + lookup.push(" != null ? helper : ", this.aliasable("container.hooks.helperMissing")); + } + this.push(["(", lookup, helper.paramsInit ? ["),(", helper.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", helper.callParams), " : helper))"]); + }, + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], options2 = this.setupParams(name, 1, params); + if (isDynamic) { + name = this.popStack(); + delete options2.name; + } + if (indent) { + options2.indent = JSON.stringify(indent); + } + options2.helpers = "helpers"; + options2.partials = "partials"; + options2.decorators = "container.decorators"; + if (!isDynamic) { + params.unshift(this.nameLookup("partials", name, "partial")); + } else { + params.unshift(name); + } + if (this.options.compat) { + options2.depths = "depths"; + } + options2 = this.objectLiteral(options2); + params.push(options2); + this.push(this.source.functionCall("container.invokePartial", "", params)); + }, + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), context = void 0, type = void 0, id = void 0; + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + pushId: function pushId(type, name, child) { + if (type === "BlockParam") { + this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " + JSON.stringify("." + child) : "")); + } else if (type === "PathExpression") { + this.pushString(name); + } else if (type === "SubExpression") { + this.pushStackLiteral("true"); + } else { + this.pushStackLiteral("null"); + } + }, + // HELPERS + compiler: JavaScriptCompiler, + compileChildren: function compileChildren(environment, options2) { + var children = environment.children, child = void 0, compiler = void 0; + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); + var existing = this.matchExistingProgram(child); + if (existing == null) { + this.context.programs.push(""); + var index = this.context.programs.length; + child.index = index; + child.name = "program" + index; + this.context.programs[index] = compiler.compile(child, options2, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + child.useDepths = this.useDepths; + child.useBlockParams = this.useBlockParams; + } else { + child.index = existing.index; + child.name = "program" + existing.index; + this.useDepths = this.useDepths || existing.useDepths; + this.useBlockParams = this.useBlockParams || existing.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return environment; + } + } + }, + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], programParams = [child.index, "data", child.blockParams]; + if (this.useBlockParams || this.useDepths) { + programParams.push("blockParams"); + } + if (this.useDepths) { + programParams.push("depths"); + } + return "container.program(" + programParams.join(", ") + ")"; + }, + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + this.inlineStack.push(expr); + return expr; + }, + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = void 0; + } + if (source) { + this.source.push(source); + } + }, + replaceStack: function replaceStack(callback) { + var prefix = ["("], stack = void 0, createdStack = void 0, usedLiteral = void 0; + if (!this.isInline()) { + throw new _exception2["default"]("replaceStack on non-inline"); + } + var top = this.popStack(true); + if (top instanceof Literal) { + stack = [top.value]; + prefix = ["(", stack]; + usedLiteral = true; + } else { + createdStack = true; + var _name = this.incrStack(); + prefix = ["((", this.push(_name), " = ", top, ")"]; + stack = this.topStack(); + } + var item = callback.call(this, stack); + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ")")); + }, + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push("stack" + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return "stack" + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, " = ", entry, ";"]); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + popStack: function popStack(wrapped) { + var inline = this.isInline(), item = (inline ? this.inlineStack : this.compileStack).pop(); + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + if (!this.stackSlot) { + throw new _exception2["default"]("Invalid stack pop"); + } + this.stackSlot--; + } + return item; + } + }, + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, item = stack[stack.length - 1]; + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + contextName: function contextName(context) { + if (this.useDepths && context) { + return "depths[" + context + "]"; + } else { + return "depth" + context; + } + }, + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + return ret; + }, + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup("helpers", name, "helper"), callContext = this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})"); + return { + params, + paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + setupParams: function setupParams(helper, paramSize, params) { + var options2 = {}, contexts = [], types = [], ids = [], objectArgs = !params, param = void 0; + if (objectArgs) { + params = []; + } + options2.name = this.quotedString(helper); + options2.hash = this.popStack(); + if (this.trackIds) { + options2.hashIds = this.popStack(); + } + if (this.stringParams) { + options2.hashTypes = this.popStack(); + options2.hashContexts = this.popStack(); + } + var inverse = this.popStack(), program = this.popStack(); + if (program || inverse) { + options2.fn = program || "container.noop"; + options2.inverse = inverse || "container.noop"; + } + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + if (objectArgs) { + options2.args = this.source.generateArray(params); + } + if (this.trackIds) { + options2.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options2.types = this.source.generateArray(types); + options2.contexts = this.source.generateArray(contexts); + } + if (this.options.data) { + options2.data = "data"; + } + if (this.useBlockParams) { + options2.blockParams = "blockParams"; + } + return options2; + }, + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options2 = this.setupParams(helper, paramSize, params); + options2.loc = JSON.stringify(this.source.currentLocation); + options2 = this.objectLiteral(options2); + if (useRegister) { + this.useRegister("options"); + params.push("options"); + return ["options=", options2]; + } else if (params) { + params.push(options2); + return ""; + } else { + return options2; + } + } + }; + (function() { + var reservedWords = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "); + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } + })(); + JavaScriptCompiler.isValidJavaScriptVariableName = function(name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); + }; + function strictLookup(requireTerminal, compiler, parts, i, type) { + var stack = compiler.popStack(), len = parts.length; + if (requireTerminal) { + len--; + } + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + if (requireTerminal) { + return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"]; + } else { + return stack; + } + } + exports2["default"] = JavaScriptCompiler; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.js +var require_handlebars = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.js"(exports2, module2) { + "use strict"; + exports2.__esModule = true; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _handlebarsRuntime = require_handlebars_runtime(); + var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + var _handlebarsCompilerAst = require_ast(); + var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + var _handlebarsCompilerBase = require_base2(); + var _handlebarsCompilerCompiler = require_compiler(); + var _handlebarsCompilerJavascriptCompiler = require_javascript_compiler(); + var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + var _handlebarsCompilerVisitor = require_visitor(); + var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + var _handlebarsNoConflict = require_no_conflict(); + var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + var _create = _handlebarsRuntime2["default"].create; + function create() { + var hb = _create(); + hb.compile = function(input, options2) { + return _handlebarsCompilerCompiler.compile(input, options2, hb); + }; + hb.precompile = function(input, options2) { + return _handlebarsCompilerCompiler.precompile(input, options2, hb); + }; + hb.AST = _handlebarsCompilerAst2["default"]; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2["default"]; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; + return hb; + } + var inst = create(); + inst.create = create; + _handlebarsNoConflict2["default"](inst); + inst.Visitor = _handlebarsCompilerVisitor2["default"]; + inst["default"] = inst; + exports2["default"] = inst; + module2.exports = exports2["default"]; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js +var require_printer = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js"(exports2) { + "use strict"; + exports2.__esModule = true; + exports2.print = print; + exports2.PrintVisitor = PrintVisitor; + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { "default": obj }; + } + var _visitor = require_visitor(); + var _visitor2 = _interopRequireDefault(_visitor); + function print(ast) { + return new PrintVisitor().accept(ast); + } + function PrintVisitor() { + this.padding = 0; + } + PrintVisitor.prototype = new _visitor2["default"](); + PrintVisitor.prototype.pad = function(string) { + var out = ""; + for (var i = 0, l = this.padding; i < l; i++) { + out += " "; + } + out += string + "\n"; + return out; + }; + PrintVisitor.prototype.Program = function(program) { + var out = "", body = program.body, i = void 0, l = void 0; + if (program.blockParams) { + var blockParams = "BLOCK PARAMS: ["; + for (i = 0, l = program.blockParams.length; i < l; i++) { + blockParams += " " + program.blockParams[i]; + } + blockParams += " ]"; + out += this.pad(blockParams); + } + for (i = 0, l = body.length; i < l; i++) { + out += this.accept(body[i]); + } + this.padding--; + return out; + }; + PrintVisitor.prototype.MustacheStatement = function(mustache) { + return this.pad("{{ " + this.SubExpression(mustache) + " }}"); + }; + PrintVisitor.prototype.Decorator = function(mustache) { + return this.pad("{{ DIRECTIVE " + this.SubExpression(mustache) + " }}"); + }; + PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function(block) { + var out = ""; + out += this.pad((block.type === "DecoratorBlock" ? "DIRECTIVE " : "") + "BLOCK:"); + this.padding++; + out += this.pad(this.SubExpression(block)); + if (block.program) { + out += this.pad("PROGRAM:"); + this.padding++; + out += this.accept(block.program); + this.padding--; + } + if (block.inverse) { + if (block.program) { + this.padding++; + } + out += this.pad("{{^}}"); + this.padding++; + out += this.accept(block.inverse); + this.padding--; + if (block.program) { + this.padding--; + } + } + this.padding--; + return out; + }; + PrintVisitor.prototype.PartialStatement = function(partial) { + var content = "PARTIAL:" + partial.name.original; + if (partial.params[0]) { + content += " " + this.accept(partial.params[0]); + } + if (partial.hash) { + content += " " + this.accept(partial.hash); + } + return this.pad("{{> " + content + " }}"); + }; + PrintVisitor.prototype.PartialBlockStatement = function(partial) { + var content = "PARTIAL BLOCK:" + partial.name.original; + if (partial.params[0]) { + content += " " + this.accept(partial.params[0]); + } + if (partial.hash) { + content += " " + this.accept(partial.hash); + } + content += " " + this.pad("PROGRAM:"); + this.padding++; + content += this.accept(partial.program); + this.padding--; + return this.pad("{{> " + content + " }}"); + }; + PrintVisitor.prototype.ContentStatement = function(content) { + return this.pad("CONTENT[ '" + content.value + "' ]"); + }; + PrintVisitor.prototype.CommentStatement = function(comment) { + return this.pad("{{! '" + comment.value + "' }}"); + }; + PrintVisitor.prototype.SubExpression = function(sexpr) { + var params = sexpr.params, paramStrings = [], hash = void 0; + for (var i = 0, l = params.length; i < l; i++) { + paramStrings.push(this.accept(params[i])); + } + params = "[" + paramStrings.join(", ") + "]"; + hash = sexpr.hash ? " " + this.accept(sexpr.hash) : ""; + return this.accept(sexpr.path) + " " + params + hash; + }; + PrintVisitor.prototype.PathExpression = function(id) { + var path3 = id.parts.join("/"); + return (id.data ? "@" : "") + "PATH:" + path3; + }; + PrintVisitor.prototype.StringLiteral = function(string) { + return '"' + string.value + '"'; + }; + PrintVisitor.prototype.NumberLiteral = function(number) { + return "NUMBER{" + number.value + "}"; + }; + PrintVisitor.prototype.BooleanLiteral = function(bool) { + return "BOOLEAN{" + bool.value + "}"; + }; + PrintVisitor.prototype.UndefinedLiteral = function() { + return "UNDEFINED"; + }; + PrintVisitor.prototype.NullLiteral = function() { + return "NULL"; + }; + PrintVisitor.prototype.Hash = function(hash) { + var pairs = hash.pairs, joinedPairs = []; + for (var i = 0, l = pairs.length; i < l; i++) { + joinedPairs.push(this.accept(pairs[i])); + } + return "HASH{" + joinedPairs.join(", ") + "}"; + }; + PrintVisitor.prototype.HashPair = function(pair) { + return pair.key + "=" + this.accept(pair.value); + }; + } +}); + +// node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/lib/index.js +var require_lib3 = __commonJS({ + "node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/lib/index.js"(exports2, module2) { + "use strict"; + var handlebars = require_handlebars()["default"]; + var printer = require_printer(); + handlebars.PrintVisitor = printer.PrintVisitor; + handlebars.print = printer.print; + module2.exports = handlebars; + function extension(module3, filename) { + var fs2 = require("fs"); + var templateString = fs2.readFileSync(filename, "utf8"); + module3.exports = handlebars.compile(templateString); + } + if (typeof require !== "undefined" && require.extensions) { + require.extensions[".handlebars"] = extension; + require.extensions[".hbs"] = extension; + } + } +}); + // src/post.ts var import_promises = __toESM(require("fs/promises")); var import_fs2 = require("fs"); var import_path2 = __toESM(require("path")); var import_os2 = __toESM(require("os")); var import_process2 = require("process"); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); // src/options.ts var import_path = __toESM(require("path")); var import_os = __toESM(require("os")); var import_process = require("process"); var import_fs = require("fs"); -var core = __toESM(require_core()); +var core2 = __toESM(require_core()); // node_modules/.pnpm/zod@3.25.67/node_modules/zod/dist/esm/v3/helpers/util.js var util; @@ -24707,6 +30555,18 @@ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) { // src/options.ts var import_which = __toESM(require_lib2()); + +// src/util.ts +var core = __toESM(require_core()); +var import_exec = __toESM(require_exec()); +var import_handlebars = __toESM(require_lib3()); +var DEFAULT_PIXI_URL_TEMPLATE = `{{#if latest~}} +https://github.com/prefix-dev/pixi/releases/latest/download/{{pixiFile}} +{{~else~}} +https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} +{{~/if}}`; + +// src/options.ts var pixiPath = "pixi.toml"; var pyprojectPath = "pyproject.toml"; var logLevelSchema = enumType(["q", "default", "v", "vv", "vvv"]); @@ -24717,14 +30577,14 @@ var getEnvironmentVariableName = (key) => { return `SETUP_PIXI_${key.toUpperCase().replace(/-/g, "_")}`; }; var inputOrEnvironmentVariable = (key) => { - const inputValue = core.getInput(key); + const inputValue = core2.getInput(key); if (inputValue !== "") { return inputValue; } const envVarName = getEnvironmentVariableName(key); const envVarValue = process.env[envVarName]; if (envVarValue !== void 0 && envVarValue !== "") { - core.debug(`Using environment variable ${envVarName} with value: ${envVarValue}`); + core2.debug(`Using environment variable ${envVarName} with value: ${envVarValue}`); return envVarValue; } return void 0; @@ -24758,9 +30618,6 @@ var parseOrUndefinedList = (key, schema) => { return input.split(" ").map((s) => schema.parse(s)).filter((s) => s !== ""); }; var validateInputs = (inputs) => { - if (inputs.pixiVersion && inputs.pixiUrl) { - throw new Error("You need to specify either pixi-version or pixi-url"); - } if (inputs.pixiUrlBearerToken && !inputs.pixiUrl) { throw new Error("You need to specify pixi-url when using pixi-url-bearer-token"); } @@ -24827,7 +30684,7 @@ var determinePixiInstallation = (pixiUrlOrVersionSet, pixiBinPath) => { const preinstalledPixi = import_which.default.sync("pixi", { nothrow: true }); if (pixiUrlOrVersionSet || pixiBinPath) { if (preinstalledPixi) { - core.debug(`Local pixi found at ${preinstalledPixi} is being ignored.`); + core2.debug(`Local pixi found at ${preinstalledPixi} is being ignored.`); } return { downloadPixi: true, @@ -24835,19 +30692,23 @@ var determinePixiInstallation = (pixiUrlOrVersionSet, pixiBinPath) => { }; } if (preinstalledPixi) { - core.info(`Using pre-installed pixi at ${preinstalledPixi}`); + core2.info(`Using pre-installed pixi at ${preinstalledPixi}`); return { downloadPixi: false, pixiBinPath: preinstalledPixi }; } return { downloadPixi: true, pixiBinPath: PATHS.pixiBin }; }; var inferOptions = (inputs) => { const runInstall = inputs.runInstall ?? true; - const pixiSource = inputs.pixiVersion ? { version: inputs.pixiVersion } : inputs.pixiUrl ? { url: inputs.pixiUrl, bearerToken: inputs.pixiUrlBearerToken } : { version: "latest" }; + const pixiSource = { + urlTemplate: inputs.pixiUrl ?? DEFAULT_PIXI_URL_TEMPLATE, + bearerToken: inputs.pixiUrlBearerToken, + version: inputs.pixiVersion ?? "latest" + }; const { downloadPixi, pixiBinPath } = determinePixiInstallation( !!inputs.pixiVersion || !!inputs.pixiUrl, inputs.pixiBinPath ); - const logLevel = inputs.logLevel ?? (core.isDebug() ? "vv" : "default"); + const logLevel = inputs.logLevel ?? (core2.isDebug() ? "vv" : "default"); let manifestPath = pixiPath; if (inputs.manifestPath) { manifestPath = import_path.default.resolve(untildify(inputs.manifestPath)); @@ -24859,20 +30720,20 @@ var inferOptions = (inputs) => { const fileContent = (0, import_fs.readFileSync)(pyprojectPath, "utf-8"); const parsedContent = parse(fileContent); if (parsedContent.tool && typeof parsedContent.tool === "object" && "pixi" in parsedContent.tool) { - core.debug(`The tool.pixi table found, using ${pyprojectPath} as manifest file.`); + core2.debug(`The tool.pixi table found, using ${pyprojectPath} as manifest file.`); manifestPath = pyprojectPath; } } catch (error2) { - core.error(`Error while trying to read ${pyprojectPath} file.`); - core.error(error2); + core2.error(`Error while trying to read ${pyprojectPath} file.`); + core2.error(error2); } } else if (runInstall) { - core.warning(`Could not find any manifest file. Defaulting to ${pixiPath}.`); + core2.warning(`Could not find any manifest file. Defaulting to ${pixiPath}.`); } } const pixiLockFile = import_path.default.join(import_path.default.dirname(manifestPath), "pixi.lock"); const lockFileAvailable = (0, import_fs.existsSync)(pixiLockFile); - core.debug(`lockFileAvailable: ${lockFileAvailable ? "yes" : "no"}`); + core2.debug(`lockFileAvailable: ${lockFileAvailable ? "yes" : "no"}`); if (!lockFileAvailable && inputs.cacheWrite === true) { throw new Error("You cannot specify cache-write = true without a lock file present"); } @@ -24932,7 +30793,7 @@ var getOptions = () => { unionType([literalType("latest"), stringType().regex(/^v\d+\.\d+\.\d+$/)]), "pixi-version must either be `latest` or a version string matching `vX.Y.Z`." ), - pixiUrl: parseOrUndefined("pixi-url", stringType().url()), + pixiUrl: parseOrUndefined("pixi-url", stringType()), pixiUrlBearerToken: parseOrUndefined("pixi-url-bearer-token", stringType()), logLevel: parseOrUndefined( "log-level", @@ -24959,10 +30820,10 @@ var getOptions = () => { authS3SessionToken: parseOrUndefined("auth-s3-session-token", stringType()), postCleanup: parseOrUndefinedJSON("post-cleanup", booleanType()) }; - core.debug(`Inputs: ${JSON.stringify(inputs)}`); + core2.debug(`Inputs: ${JSON.stringify(inputs)}`); validateInputs(inputs); const options2 = inferOptions(inputs); - core.debug(`Inferred options: ${JSON.stringify(options2)}`); + core2.debug(`Inferred options: ${JSON.stringify(options2)}`); assertOptions(options2); return options2; }; @@ -24970,14 +30831,14 @@ var _options; try { _options = getOptions(); } catch (error2) { - if (core.isDebug()) { + if (core2.isDebug()) { throw error2; } if (error2 instanceof Error) { - core.setFailed(error2.message); + core2.setFailed(error2.message); (0, import_process.exit)(1); } else if (typeof error2 === "string") { - core.setFailed(error2); + core2.setFailed(error2); (0, import_process.exit)(1); } throw error2; @@ -24989,7 +30850,7 @@ var removeEmptyParentDirs = (dirPath) => { if ((0, import_fs2.existsSync)(dirPath)) { return import_promises.default.readdir(dirPath).then((files) => { if (files.length === 0) { - core2.debug(`Removing empty directory ${dirPath}.`); + core3.debug(`Removing empty directory ${dirPath}.`); return import_promises.default.rm(dirPath, { recursive: true, force: true }).then(() => { const parentDir = import_path2.default.dirname(dirPath); if (parentDir !== dirPath) { @@ -25004,7 +30865,7 @@ var removeEmptyParentDirs = (dirPath) => { var cleanupPixiBin = () => { const pixiBinPath = options.pixiBinPath; const pixiBinDir = import_path2.default.dirname(pixiBinPath); - core2.debug(`Cleaning up pixi binary ${pixiBinPath}.`); + core3.debug(`Cleaning up pixi binary ${pixiBinPath}.`); if ((0, import_fs2.existsSync)(pixiBinPath)) { return import_promises.default.rm(pixiBinPath).then(() => removeEmptyParentDirs(pixiBinDir)); } else { @@ -25013,11 +30874,11 @@ var cleanupPixiBin = () => { }; var cleanupEnv = () => { if (!options.runInstall) { - core2.debug("Skipping cleanup of .pixi directory."); + core3.debug("Skipping cleanup of .pixi directory."); return Promise.resolve(); } const envDir = import_path2.default.join(import_path2.default.dirname(options.manifestPath), ".pixi"); - core2.debug(`Cleaning up .pixi directory ${envDir}.`); + core3.debug(`Cleaning up .pixi directory ${envDir}.`); return import_promises.default.rm(envDir, { recursive: true, // Ignore exceptions if environment does not exist anymore, @@ -25038,7 +30899,7 @@ var cleanupRattler = () => { const rattlerPath = import_path2.default.join(import_os2.default.homedir(), ".rattler"); const cacheDir = determineCacheDir(); const rattlerCachePath = import_path2.default.join(cacheDir, "rattler"); - core2.debug(`Cleaning up rattler directories ${rattlerPath} and ${rattlerCachePath}.`); + core3.debug(`Cleaning up rattler directories ${rattlerPath} and ${rattlerCachePath}.`); return Promise.all([ import_promises.default.rm(rattlerPath, { recursive: true, force: true }), import_promises.default.rm(rattlerCachePath, { recursive: true, force: true }) @@ -25049,18 +30910,18 @@ var run = () => { if (postCleanup) { return Promise.all([cleanupPixiBin(), cleanupEnv(), cleanupRattler()]); } - core2.debug("Skipping post-cleanup."); + core3.debug("Skipping post-cleanup."); return Promise.resolve(); }; run().then(() => (0, import_process2.exit)(0)).catch((error2) => { - if (core2.isDebug()) { + if (core3.isDebug()) { throw error2; } if (error2 instanceof Error) { - core2.setFailed(error2.message); + core3.setFailed(error2.message); (0, import_process2.exit)(1); } else if (typeof error2 === "string") { - core2.setFailed(error2); + core3.setFailed(error2); (0, import_process2.exit)(1); } throw error2; diff --git a/package.json b/package.json index 1a00407..a3ec2ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "setup-pixi", - "version": "0.8.12", + "version": "0.8.13", "private": true, "description": "Action to set up the pixi package manager.", "scripts": { @@ -27,6 +27,7 @@ "@actions/exec": "^1.1.1", "@actions/io": "^1.1.3", "@actions/tool-cache": "^2.0.2", + "handlebars": "^4.7.8", "smol-toml": "^1.4.0", "untildify": "^5.0.0", "which": "^5.0.0", @@ -34,7 +35,6 @@ }, "devDependencies": { "@eslint/js": "^9.30.0", - "@types/eslint__js": "^9.14.0", "@types/node": "^24.0.8", "@types/which": "^3.0.4", "eslint": "^9.30.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e7841a1..8a7d124 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,6 +23,9 @@ importers: '@actions/tool-cache': specifier: ^2.0.2 version: 2.0.2 + handlebars: + specifier: ^4.7.8 + version: 4.7.8 smol-toml: specifier: ^1.4.0 version: 1.4.0 @@ -39,9 +42,6 @@ importers: '@eslint/js': specifier: ^9.30.0 version: 9.30.0 - '@types/eslint__js': - specifier: ^9.14.0 - version: 9.14.0 '@types/node': specifier: ^24.0.8 version: 24.0.8 @@ -508,10 +508,6 @@ packages: cpu: [x64] os: [win32] - '@types/eslint__js@9.14.0': - resolution: {integrity: sha512-s0jepCjOJWB/GKcuba4jISaVpBudw3ClXJ3fUK4tugChUMQsp6kSwuA8Dcx6wFd/JsJqcY8n4rEpa5RTHs5ypA==} - deprecated: This is a stub types definition. @eslint/js provides its own type definitions, so you do not need this installed. - '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -910,6 +906,11 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} + engines: {node: '>=0.4.7'} + hasBin: true + has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} @@ -1054,6 +1055,9 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} @@ -1070,6 +1074,9 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + node-fetch@2.7.0: resolution: {integrity: sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==} engines: {node: 4.x || >=6.0.0} @@ -1224,6 +1231,10 @@ packages: resolution: {integrity: sha512-IMxaDA/58wBvkvX77ykQ6e9r6fjs8xbxpz8bMCyVQ/fEFWbA5uJrnaVwDuhLrrANGdd7apRyTPDBvI893Bxu9g==} engines: {node: '>= 18'} + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + source-map@0.8.0-beta.0: resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} engines: {node: '>= 8'} @@ -1350,6 +1361,11 @@ packages: ufo@1.6.1: resolution: {integrity: sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==} + uglify-js@3.19.3: + resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} + engines: {node: '>=0.8.0'} + hasBin: true + undici-types@7.8.0: resolution: {integrity: sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw==} @@ -1394,6 +1410,9 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} + wordwrap@1.0.0: + resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -1828,10 +1847,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.34.8': optional: true - '@types/eslint__js@9.14.0': - dependencies: - '@eslint/js': 9.30.0 - '@types/estree@1.0.6': {} '@types/estree@1.0.8': {} @@ -2284,6 +2299,15 @@ snapshots: graphemer@1.4.0: {} + handlebars@4.7.8: + dependencies: + minimist: 1.2.8 + neo-async: 2.6.2 + source-map: 0.6.1 + wordwrap: 1.0.0 + optionalDependencies: + uglify-js: 3.19.3 + has-flag@4.0.0: {} has-symbols@1.1.0: {} @@ -2405,6 +2429,8 @@ snapshots: dependencies: brace-expansion: 2.0.2 + minimist@1.2.8: {} + minipass@7.1.2: {} mlly@1.7.4: @@ -2424,6 +2450,8 @@ snapshots: natural-compare@1.4.0: {} + neo-async@2.6.2: {} + node-fetch@2.7.0: dependencies: whatwg-url: 5.0.0 @@ -2545,6 +2573,8 @@ snapshots: smol-toml@1.4.0: {} + source-map@0.6.1: {} + source-map@0.8.0-beta.0: dependencies: whatwg-url: 7.1.0 @@ -2673,6 +2703,9 @@ snapshots: ufo@1.6.1: {} + uglify-js@3.19.3: + optional: true + undici-types@7.8.0: {} undici@5.29.0: @@ -2712,6 +2745,8 @@ snapshots: word-wrap@1.2.5: {} + wordwrap@1.0.0: {} + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 diff --git a/src/main.ts b/src/main.ts index 5769cc6..66c314f 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,12 +6,12 @@ import * as core from '@actions/core' import { downloadTool } from '@actions/tool-cache' import type { PixiSource } from './options' import { options } from './options' -import { execute, getPixiUrlFromVersion, pixiCmd } from './util' +import { execute, pixiCmd, renderPixiUrl } from './util' import { saveCache, tryRestoreCache } from './cache' import { activateEnvironment } from './activate' const downloadPixi = (source: PixiSource) => { - const url = 'version' in source ? getPixiUrlFromVersion(source.version) : source.url + const url = renderPixiUrl(source.urlTemplate, source.version) const auth = 'bearerToken' in source && source.bearerToken ? `Bearer ${source.bearerToken}` : '' return core.group('Downloading Pixi', () => { core.debug('Installing pixi') diff --git a/src/options.ts b/src/options.ts index cb4ef01..fd5e8b6 100644 --- a/src/options.ts +++ b/src/options.ts @@ -7,6 +7,7 @@ import * as z from 'zod' import untildify from 'untildify' import { parse } from 'smol-toml' import which from 'which' +import { DEFAULT_PIXI_URL_TEMPLATE } from './util' type Inputs = Readonly<{ pixiVersion?: string @@ -34,14 +35,11 @@ type Inputs = Readonly<{ postCleanup?: boolean }> -export type PixiSource = - | { - version: string - } - | { - url: string - bearerToken?: string - } +export interface PixiSource { + urlTemplate: string + bearerToken?: string + version: string +} type Auth = { host: string @@ -150,9 +148,6 @@ const parseOrUndefinedList = (key: string, schema: z.ZodSchema): T[] | und } const validateInputs = (inputs: Inputs): void => { - if (inputs.pixiVersion && inputs.pixiUrl) { - throw new Error('You need to specify either pixi-version or pixi-url') - } if (inputs.pixiUrlBearerToken && !inputs.pixiUrl) { throw new Error('You need to specify pixi-url when using pixi-url-bearer-token') } @@ -243,11 +238,11 @@ const determinePixiInstallation = (pixiUrlOrVersionSet: boolean, pixiBinPath: st const inferOptions = (inputs: Inputs): Options => { const runInstall = inputs.runInstall ?? true - const pixiSource = inputs.pixiVersion - ? { version: inputs.pixiVersion } - : inputs.pixiUrl - ? { url: inputs.pixiUrl, bearerToken: inputs.pixiUrlBearerToken } - : { version: 'latest' } + const pixiSource: PixiSource = { + urlTemplate: inputs.pixiUrl ?? DEFAULT_PIXI_URL_TEMPLATE, + bearerToken: inputs.pixiUrlBearerToken, + version: inputs.pixiVersion ?? 'latest' + } const { downloadPixi, pixiBinPath } = determinePixiInstallation( !!inputs.pixiVersion || !!inputs.pixiUrl, @@ -362,7 +357,7 @@ const getOptions = () => { z.union([z.literal('latest'), z.string().regex(/^v\d+\.\d+\.\d+$/)]), 'pixi-version must either be `latest` or a version string matching `vX.Y.Z`.' ), - pixiUrl: parseOrUndefined('pixi-url', z.string().url()), + pixiUrl: parseOrUndefined('pixi-url', z.string()), pixiUrlBearerToken: parseOrUndefined('pixi-url-bearer-token', z.string()), logLevel: parseOrUndefined( 'log-level', diff --git a/src/util.ts b/src/util.ts index 7488adc..d2b1028 100644 --- a/src/util.ts +++ b/src/util.ts @@ -5,6 +5,14 @@ import * as core from '@actions/core' import type { ExecOptions } from '@actions/exec' import { exec, getExecOutput } from '@actions/exec' import { options } from './options' +import Handlebars from 'handlebars' + +export const DEFAULT_PIXI_URL_TEMPLATE = `\ +{{#if latest~}} +https://github.com/prefix-dev/pixi/releases/latest/download/{{pixiFile}} +{{~else~}} +https://github.com/prefix-dev/pixi/releases/download/{{version}}/{{pixiFile}} +{{~/if}}` export const getCondaArch = () => { const archDict: Record = { @@ -49,14 +57,17 @@ const getArch = () => { } } -export const getPixiUrlFromVersion = (version: string) => { +export const renderPixiUrl = (urlTemplate: string, version: string) => { + const latest = version == 'latest' const arch = getArch() const platform = getPlatform() const pixiFile = `pixi-${arch}-${platform}${platform === 'pc-windows-msvc' ? '.exe' : ''}` - if (version === 'latest') { - return `https://github.com/prefix-dev/pixi/releases/latest/download/${pixiFile}` - } - return `https://github.com/prefix-dev/pixi/releases/download/${version}/${pixiFile}` + const template = Handlebars.compile(urlTemplate) + return template({ + version, + latest, + pixiFile + }) } export const sha256 = (s: BinaryLike) => { diff --git a/tsup.config.js b/tsup.config.js index 2658c08..e80d9a2 100644 --- a/tsup.config.js +++ b/tsup.config.js @@ -24,6 +24,7 @@ export default defineConfig({ '@actions/cache', '@actions/io', '@actions/tool-cache', + 'handlebars', 'untildify', 'smol-toml', 'which',