@squiz/component-cli-lib 1.39.1-alpha.29 → 1.39.1-alpha.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
|
@@ -350,7 +350,7 @@ Reference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.ht
|
|
|
350
350
|
JOIN component_set_component_version as cscv ON
|
|
351
351
|
cv.component_name = cscv.component_name AND
|
|
352
352
|
cv.version = cscv.component_version
|
|
353
|
-
WHERE cscv.component_set_web_path=$1 ${n}`;return(await this.executeQueryRaw(s,i)).map(a=>({componentName:a.component_name,version:a.version,displayName:a.display_name,description:a.description,icon:a.icon?a.icon:void 0,environmentVariables:a.env_vars}))}async getComponentByNameAndVersion(t,r){return await this.findOne({componentName:t,version:r})}async componentVersionExists(t,r){return await this.getComponentByNameAndVersion(t,r)!=null}async addComponentVersion(t,r,n,i,s){if(Ynt.test(r)===!1)throw new Error("ComponentVersion does not follow the semver convention. Component version must be in the form of major.minor.patch");return await this.create({componentName:t,version:r,description:i||"",displayName:n||"",icon:s})}};vI.ComponentVersionRepository=q5});var O5=A(gI=>{"use strict";Object.defineProperty(gI,"__esModule",{value:!0});gI.createComponentRepositories=void 0;var Qnt=$3(),Xnt=Yce(),Znt=Kue(),eit=w5(),tit=mde(),rit=P5(),nit=T5();function iit(e){return{component:new rit.ComponentRepository(e),componentVersion:new nit.ComponentVersionRepository(e),componentSet:new eit.ComponentSetRepository(e),componentSetComponentVersion:new Qnt.ComponentSetComponentVersionRepository(e),componentSetComponentVersionExcluded:new Xnt.ComponentSetComponentVersionExcludedRepository(e),componentSetComponentVersionEditable:new Znt.ComponentSetComponentVersionEditableRepository(e),componentSetRule:new tit.ComponentSetRuleRepository(e)}}gI.createComponentRepositories=iit});var _de=A(j5=>{"use strict";Object.defineProperty(j5,"__esModule",{value:!0});j5.default=["20220704054051_initial.sql","20220718172237_adding_component_sets.sql","20220728113941_add_env_vars_field.sql","20220817113300_removing_null_props_from_jsonb.sql","20223525103556_component_set_rule.sql","20221027151225_dummy.sql","20221117151200_add_detail_columns_to_component_version.js","20221220151200_add_required_to_manifests.js","20221222151200_add_required_to_manifests.js","20230111095522_update_environment_property.js","20230203084900_ensure_static_root_exists.js","20230210143300_lowercase_all_uri_names.js","20230217151212_component_set_component_version_updates.sql","20230218121212_add_component_set_rules.js"]});var vde=A(_f=>{"use strict";var sit=_f&&_f.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_f,"__esModule",{value:!0});_f.createConnectionManager=void 0;var hde=Cl(),oit=O5(),ait=sit(_de());async function cit(e,t,r){let n=await(0,hde.getConnectionInfo)(t);return new hde.ConnectionManager(e,n,r,ait.default,oit.createComponentRepositories)}_f.createConnectionManager=cit});var gde=A(jl=>{"use strict";var lit=jl&&jl.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),N5=jl&&jl.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&lit(t,e,r)};Object.defineProperty(jl,"__esModule",{value:!0});N5(Kce(),jl);N5(O5(),jl);N5(vde(),jl)});var hf=A(yI=>{"use strict";Object.defineProperty(yI,"__esModule",{value:!0});yI.ManifestValidationError=void 0;var k5=class extends Error{constructor(t,r){super(t),this.stack=r==null?void 0:r.stack,this.name="ManifestValidationError"}};yI.ManifestValidationError=k5});var M5=A(vf=>{"use strict";var uit=vf&&vf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vf,"__esModule",{value:!0});vf.getComponentFileSystemFolder=void 0;var dit=uit(require("path"));function pit(e,t){return dit.default.join(e,t)}vf.getComponentFileSystemFolder=pit});var wI=A(SI=>{"use strict";Object.defineProperty(SI,"__esModule",{value:!0});SI.getComponentName=void 0;function mit(e,t){return`${e}/${t}`}SI.getComponentName=mit});var yde=A(gf=>{"use strict";var fit=gf&&gf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gf,"__esModule",{value:!0});gf.moveFilesAndDirectories=void 0;var D5=fit(require("fs/promises"));async function _it(e,t){if(await hit(e)===!1)throw new Error(`Source directory "${e}" does not exist`);await D5.default.cp(e,t,{recursive:!0,force:!0}),await D5.default.rm(e,{recursive:!0,force:!0})}gf.moveFilesAndDirectories=_it;async function hit(e){try{return await D5.default.stat(e),!0}catch(t){if((t==null?void 0:t.code)==="ENOENT")return!1;throw t}}});var wde=A(Sf=>{"use strict";var Sde=Sf&&Sf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0});Sf.ComponentService=void 0;var io=Sde(require("path")),ja=Sde(pm()),Ec=Gr(),vit=hf(),Sy=M5(),yf=wI(),git=gc(),yit=yde(),F5=class{constructor(t,r,n,i){this.db=t,this.logger=r,this.dataMountPoint=n,this.manifestService=i}async getComponentVersionForWeb(t,r,n){await this.assertComponentVersionExists(r,t,n);let i=await this.db.repositories.componentVersion.findOne({componentName:(0,yf.getComponentName)(t,r),version:n});if(!i)throw new Ec.ResourceNotFoundError(`${t}/${r} ${n} could not be found`);let s=await this.db.repositories.componentSet.findAllSetsComponentVersionIsIn(t,r,n);return{namespace:t,name:r,version:n,description:i.description,displayName:i.displayName,icon:i.icon,sets:s.map(o=>({displayName:o.displayName,webPath:o.webPath}))}}async getComponentForWeb(t,r){let n=(0,yf.getComponentName)(t,r);if(await this.assertComponentExists(r,t),await this.db.repositories.component.componentExists(n)==!1)throw new Ec.ResourceNotFoundError(`${t}/${r} could not be found`);return{versions:(await this.db.repositories.componentVersion.find({componentName:n})).map(o=>({description:o.description,displayName:o.displayName,icon:o.icon,version:o.version}))}}async getPaginatedComponents(t=1,r=[],n="asc",i=20,s=null){let o=await this.db.repositories.componentVersion.getPaginatedMaxComponentVersion(t,r,n,i,s),a=[];for(let c of o.items){let l=(await this.db.repositories.componentSet.findAllSetsComponentIsIn(c.componentName)).map(u=>({displayName:u.displayName,webPath:u.webPath}));a.push({name:c.componentName,includedInSets:l.length,componentSets:l,latestVersion:{description:c.description,displayName:c.displayName,icon:c.icon,version:c.version}})}return{items:a,pageInfo:(0,Ec.getPageInfo)(t,o.pageSize,o.totalCount)}}async saveComponent(t){let r;try{let o=io.default.join(t,"manifest.json");r=await this.manifestService.readManifest(o),await this.manifestService.assertManifestIsValid(o,r.getModel(),{tempLocation:!0})}catch(o){if(o instanceof vit.ManifestValidationError||o instanceof git.SchemaValidationError){let a=new Ec.BadRequestError(o.message);throw a.stack=o.stack,a}else throw o}let n=r.getName(),i=r.getVersion();if(await this.componentVersionExists(n,i))throw new Ec.BadRequestError(`Component ${n} ${i} already exists`);let s=await this.getValidComponentDestinationPath(n,i);return await this.moveFilesAndUpdateDb(r,t,s),{name:n,version:i,manifest:r}}async componentVersionExists(t,r){return await this.db.repositories.componentVersion.getComponentByNameAndVersion(t,r)!==void 0}async deleteComponent(t,r){let n=(0,yf.getComponentName)(t,r),i=(0,Sy.getComponentFileSystemFolder)(t,r);this.assertValidComponentName(r,t),await this.assertComponentExists(r,t);let s=io.default.join(this.dataMountPoint,i);try{await this.db.repositories.componentVersion.delete({componentName:n})}catch(c){this.logger.error(c)}try{await this.db.repositories.component.delete({name:n})}catch(c){this.logger.error(c)}try{await ja.default.rm(s,{force:!0,recursive:!0})}catch(c){this.logger.error(c)}let o=await this.db.repositories.component.componentExists(n),a=await ja.default.pathExists(s);if(o)throw new Error(`failed to remove ${n} from DB`);if(a)throw new Error(`failed to remove ${n} files from the disk`)}async deleteComponentVersion(t,r,n){let i=(0,yf.getComponentName)(t,r),s=(0,Sy.getComponentFileSystemFolder)(t,r);this.assertValidComponentVersion(r,t,n),await this.assertComponentVersionExists(r,t,n);let o=io.default.join(this.dataMountPoint,s,n);try{await this.db.repositories.componentVersion.delete({componentName:i,version:n}),await ja.default.rm(o,{force:!0,recursive:!0})}catch(l){this.logger.error(l)}let a=await this.db.repositories.componentVersion.componentVersionExists(i,n),c=await ja.default.pathExists(o);if(a)throw new Error(`failed to remove ${i} from DB`);if(c)throw new Error(`failed to remove ${i} files from the disk`)}assertValidComponentName(t,r){let n=(0,Sy.getComponentFileSystemFolder)(r,t),i=io.default.resolve(this.dataMountPoint),s=io.default.join(this.dataMountPoint,n);if(io.default.resolve(this.dataMountPoint)+io.default.sep+n!==s||i===s)throw new Ec.ResourceNotFoundError(`component name ${n} is invalid`)}assertValidComponentVersion(t,r,n){let i=(0,Sy.getComponentFileSystemFolder)(r,t),s=io.default.join(io.default.resolve(this.dataMountPoint),i,n);if([io.default.resolve(this.dataMountPoint),i,n].join(io.default.sep)!==s)throw new Ec.ResourceNotFoundError(`Component version ${n} is invalid`)}async assertComponentExists(t,r){let n=(0,yf.getComponentName)(r,t),i=(0,Sy.getComponentFileSystemFolder)(r,t),s=io.default.join(this.dataMountPoint,i);if(!await this.db.repositories.component.componentExists(n)&&!await ja.default.pathExists(s))throw new Ec.ResourceNotFoundError(`Component ${n} not found`)}async assertComponentVersionExists(t,r,n){let i=(0,yf.getComponentName)(r,t);await this.assertComponentExists(t,r);let s=io.default.join(this.dataMountPoint,i,n);if(!await this.db.repositories.componentVersion.componentVersionExists(i,n)&&!await ja.default.pathExists(s))throw new Ec.ResourceNotFoundError(`Component version ${n} for component ${i} not found`)}async moveFilesAndUpdateDb(t,r,n){try{await(0,yit.moveFilesAndDirectories)(r,n)}catch(i){throw ja.default.rm(r,{force:!0,recursive:!0}),i}try{await ja.default.chmod(n,"755")}catch(i){throw ja.default.rm(n,{force:!0,recursive:!0}),i}try{await this.addComponentVersion(t)}catch(i){throw ja.default.rm(n,{force:!0,recursive:!0}),i}}async addComponentVersion(t){let r=t.getVersion(),n=t.getName(),{displayName:i,description:s,icon:o}=t.getModel();await this.db.repositories.component.componentExists(n)===!1&&await this.db.repositories.component.addComponent(n),await this.db.repositories.componentVersion.addComponentVersion(n,r,i,s,o)}async getValidComponentDestinationPath(t,r){let n=io.default.join(this.dataMountPoint,t,r);if(await ja.default.pathExists(n))throw new Ec.BadRequestError(`${t} version ${r} already exists and cannot be uploaded`);return n}};Sf.ComponentService=F5});var wy=A(Rc=>{"use strict";var Sit=Rc&&Rc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rc,"__esModule",{value:!0});Rc.AbstractManifest=Rc.schemaVersionRegex=Rc.SCHEMA_VERSIONS=void 0;var wit=Sit(require("util")),bit=wI(),Eit=gc();Rc.SCHEMA_VERSIONS=Object.keys(Eit.MANIFEST_MODELS);Rc.schemaVersionRegex=/\/schemas\/(?<schema>v\d+)\.json#?$/;var L5=class{constructor(t){this.manifest=t}getNamespace(){return this.manifest.namespace}getName(){return(0,bit.getComponentName)(this.manifest.namespace,this.manifest.name)}getVersion(){return this.manifest.version}getInputSchemas(){return this.manifest.functions.map(t=>({name:t.name,schema:t.input})).filter(t=>!wit.default.isDeepStrictEqual(t.schema,{}))}};Rc.AbstractManifest=L5});var EI=A(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});bI.isValidManifestVersion=void 0;var Rit=wy();function xit(e){return typeof e=="string"?Rit.SCHEMA_VERSIONS.includes(e):!1}bI.isValidManifestVersion=xit});var U5=A(RI=>{"use strict";Object.defineProperty(RI,"__esModule",{value:!0});RI.getAndAssertManifestVersion=void 0;var bde=wy(),z5=hf(),Ait=EI();function Pit(e){var t;if(!e.$schema)throw new z5.ManifestValidationError("Could not determine manifest version. Your manifest must have a $schema property defined.");let r=bde.schemaVersionRegex.exec(e.$schema),n=(t=r==null?void 0:r.groups)===null||t===void 0?void 0:t.schema;if(n===void 0)throw new z5.ManifestValidationError("Could not determine manifest version from $schema value.");if((0,Ait.isValidManifestVersion)(n))return n;throw new z5.ManifestValidationError(`manifest version "${n}" isn't a valid version. Valid versions are "${bde.SCHEMA_VERSIONS.join('", "')}"`)}RI.getAndAssertManifestVersion=Pit});var V5=A(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});xI.getAndAssertJobManifestVersion=void 0;var $5=hf(),Cit=EI(),Iit=gc();function qit(e,t){var r;if(!e.$schema)throw new $5.ManifestValidationError("Could not determine manifest version. Your manifest must have a $schema property defined.");let n;t&&(n=t.exec(e.$schema));let i=(r=n==null?void 0:n.groups)===null||r===void 0?void 0:r.schema;if(i===void 0)throw new $5.ManifestValidationError("Could not determine manifest version from $schema value.");if((0,Cit.isValidManifestVersion)(i))return i;let o=Object.keys(Iit.MANIFEST_MODELS).filter(a=>a.includes("JobV"));throw new $5.ManifestValidationError(`manifest version "${i}" isn't a valid version. Valid versions are "${o.toString()}"`)}xI.getAndAssertJobManifestVersion=qit});var G5=A(wf=>{"use strict";var Rde=wf&&wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wf,"__esModule",{value:!0});wf.ManifestV1=void 0;var Tit=wy(),Bu=Gr(),Nl=Rde(require("path")),Ede=pm(),Oit=Rde(require("fs/promises")),H5=class extends Tit.AbstractManifest{constructor(t,r){super(t),this.manifest=t,this.manifestPath=r}getSchemaVersion(){return"v1"}getModel(){return this.manifest}getComponentFunctionByName(t=""){let r=this.getModel();if(!t)if(r.mainFunction)t=r.mainFunction;else throw new Bu.ResourceNotFoundError("Component main function is not defined");let n=r.functions.find(i=>i.name===t);if(!n)throw new Bu.ResourceNotFoundError(`"${t}" function for ${this.getName()} ${this.getVersion()} could not be found`);return n}async getComponentFunctionEntryFilePath(t){let r=this.getComponentDirectory();return Nl.default.resolve(Nl.default.join(r,t.entry))}getComponentDirectory(){return Nl.default.resolve(Nl.default.join(this.manifestPath,".."))}async getManifestPath(){return this.manifestPath}getFunctionPreviewConfiguration(t,r){var n;let i=(n=this.manifest.previews)===null||n===void 0?void 0:n[t];if(i===void 0){let o;if(this.manifest.previews){let a=Object.keys(this.manifest.previews).join(", ");o=`Component has not defined preview with key "${t}", the defined preview keys for this component are "${a}"`}else o="Component has no previews defined";throw new Bu.ResourceNotFoundError(o)}return i.functionData[r.name]}async getFunctionPreviewData(t){var r;switch((r=t==null?void 0:t.inputData)===null||r===void 0?void 0:r.type){case"file":{let n=Nl.default.resolve(this.getComponentDirectory(),t.inputData.path);if(Nl.default.dirname(n).startsWith(this.getComponentDirectory())===!1)throw new Bu.BadRequestError(`Preview inputData file "${t.inputData.path}" is outside the component directory`);if(await(0,Ede.pathExists)(n)===!1)throw new Bu.BadRequestError(`Preview inputData file "${t.inputData.path}" does not exist`);return this.loadDataFromFile(n)}case"inline":return t.inputData.value;default:throw new Error("Unknown Preview Configuration Type")}}async getMockedUriObject(t){let r=this.manifest.mockedUris!==void 0?this.manifest.mockedUris[t]:void 0;if(r===void 0)throw new Bu.BadRequestError(`Mocked URI object "${t}" not defined in the manifest`);switch(r.type){case"file":{let n=Nl.default.resolve(this.getComponentDirectory(),r.path);if(Nl.default.dirname(n).startsWith(this.getComponentDirectory())===!1)throw new Bu.BadRequestError(`Mocked URI object file "${r.path}" is outside the component directory`);if(await(0,Ede.pathExists)(n)===!1)throw new Bu.BadRequestError(`Mocked URI object file "${r.path}" does not exist`);return this.loadDataFromFile(n)}case"inline":return r.value;default:throw new Error("Unknown Mocked URL object type")}}async loadDataFromFile(t){switch(Nl.default.extname(t)){case".json":{let r=await Oit.default.readFile(t,{encoding:"utf-8"});return JSON.parse(r)}case".js":return require(t);default:throw new Error("Unknown filetype to load data")}}};wf.ManifestV1=H5});var J5=A(bf=>{"use strict";var jit=bf&&bf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bf,"__esModule",{value:!0});bf.JobManifestV1=void 0;var xde=Gr(),AI=jit(require("path")),B5=class{constructor(t,r){this.manifest=t,this.manifestPath=r}static getJobSchemaVersionRegex(){return/\/schemas\/(?<schema>JobV\d+)\.json#?$/}getSchemaVersion(){return"JobV1"}getModel(){return this.manifest}getJobFunctionByName(t=""){let r=this.getModel();if(!t)if(r.mainFunction)t=r.mainFunction;else throw new xde.ResourceNotFoundError("Job main function is not defined");let n=r.functions.find(i=>i.name===t);if(!n)throw new xde.ResourceNotFoundError(`"${t}" function for ${this.getName()} ${this.getVersion()} could not be found`);return n}async getJobFunctionEntryFilePath(t){let r=this.getJobDirectory();return AI.default.resolve(AI.default.join(r,t.entry))}getJobDirectory(){return AI.default.resolve(AI.default.join(this.manifestPath,".."))}getManifestPath(){return this.manifestPath}getName(){return this.manifest.name}getVersion(){return this.manifest.version}};bf.JobManifestV1=B5});var W5=A(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});PI.assertFuncEntryFilesAreValid=void 0;var Ade=Gr();async function Nit(e,t,r){if((0,Ade.isPathTryingToAccessOutsideOfRoot)(e,r.entry))throw new Error(`access to component "${r.name}'s" entry file "${r.entry}" outside the parent directory in "${t.name} ${t.version}" is not allowed`);if(!await(0,Ade.isReadable)(e,r.entry))throw new Error(`"${r.name}'s" entry file "${r.entry}" is inaccessible`)}PI.assertFuncEntryFilesAreValid=Nit});var K5=A(Ef=>{"use strict";var kit=Ef&&Ef.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.assertStaticFilesAreValid=void 0;var Mit=kit(require("path")),Pde=Gr();async function Dit(e,t,r,n){let i=Mit.default.join(e,n),s=r.output.staticFiles||[];for(let o of s){if(o.file.filepath.startsWith("http://")||o.file.filepath.startsWith("https://"))continue;if((0,Pde.isPathTryingToAccessOutsideOfRoot)(i,o.file.filepath))throw new Error(`access to a static file "${o.file.filepath}" for "${r.name}" outside the parent directory in "${t.name} ${t.version}" is not allowed`);if(!await(0,Pde.isReadable)(i,o.file.filepath))throw new Error(`"${r.name}'s" static file "${o.file.filepath}" is inaccessible`)}}Ef.assertStaticFilesAreValid=Dit});var Cde=A(CI=>{"use strict";Object.defineProperty(CI,"__esModule",{value:!0});CI.assertStaticFilesHaveAbsolutePath=void 0;async function Fit(e){let t=e.output.staticFiles||[];for(let r of t)if(!(r.file.filepath.startsWith("http://")||r.file.filepath.startsWith("https://")))throw new Error(`function ${e.name} defines static files but manifest has no staticFiles.locationRoot defined`)}CI.assertStaticFilesHaveAbsolutePath=Fit});var qI=A(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});II.ComponentSchemaValidationServiceFactory=void 0;var Rf=gc(),Y5=class{static create(){return new Rf.JSONSchemaService(new Rf.TypeResolver([Rf.SquizImageType,Rf.BaseFormattedTextType,Rf.SquizLinkType]),Rf.ManifestV1MetaSchema)}};II.ComponentSchemaValidationServiceFactory=Y5});var X5=A(TI=>{"use strict";Object.defineProperty(TI,"__esModule",{value:!0});TI.ComponentInputValidationServiceFactory=void 0;var xf=gc(),Q5=class{static create(){return new xf.JSONSchemaService(new xf.TypeResolver([xf.SquizImageType,xf.ComponentInputFormattedTextType,xf.SquizLinkType]),xf.ComponentInputMetaSchema)}};TI.ComponentInputValidationServiceFactory=Q5});var jI=A(Pf=>{"use strict";var Ode=Pf&&Pf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pf,"__esModule",{value:!0});Pf.AbstractManifestService=void 0;var Af=Gr(),Ju=hf(),Ide=U5(),qde=V5(),Lit=G5(),Z5=J5(),zit=gc(),by=Ode(pm()),Tde=W5(),Uit=K5(),OI=Ode(require("path")),$it=Cde(),Vit=qI(),Hit=X5(),eV=class{constructor(t){this.logger=t,this.jsonValidationService=Vit.ComponentSchemaValidationServiceFactory.create(),this.inputValidationService=Hit.ComponentInputValidationServiceFactory.create(),this.jobValidationService=new zit.JsonValidationService}async loadManifest(t,r,n,i){let s;try{let o=await this.getManifestPath(t,r,n);return s=await this.readManifest(o),await this.assertManifestIsValid(o,s.getModel(),i),s}catch(o){if(o instanceof Af.ResourceNotFoundError){this.logger.error(o);let a=o;throw s===void 0&&(a=new Af.ResourceNotFoundError(`manifest for ${t}/${r} ${n} could not be found`)),a.stack=o.stack,a}throw o}}async readManifest(t){if(await by.default.pathExists(t)){let r=JSON.parse(await by.default.readFile(t,{encoding:"utf-8"}));return await this.assertManifestMeetsSchemaVersion(r),this.getManifest(r,t)}throw new Af.ResourceNotFoundError("manifest could not be found")}getManifest(t,r){let n=(0,Ide.getAndAssertManifestVersion)(t);if(n==="v1")return new Lit.ManifestV1(t,r);throw new Ju.ManifestValidationError(`Unsupported manifest schema version ${n}`)}async assertManifestIsValid(t,r,n){let i=this.getManifest(r,t),s;n&&"validateFunction"in n&&(s=i.getComponentFunctionByName(n.validateFunction)),this.assertThatMainFunctionExists(r),await this.assertStaticFileLocationNotOutsideOfRoot(t,r),await this.assertFuncEntryFilesAreValid(t,r,s),await this.assertStaticFilesAreValid(t,r,s),await this.assertPreviewDataIsValid(t,r,i,s),await this.assertMockedUriObjectsAreValid(t,r,i)}getJobManifest(t,r){let n=(0,qde.getAndAssertJobManifestVersion)(t,Z5.JobManifestV1.getJobSchemaVersionRegex());if(n==="JobV1")return new Z5.JobManifestV1(t,r);throw new Ju.ManifestValidationError(`Unsupported manifest schema version ${n}`)}async readJobManifest(t){if(await by.default.pathExists(t)){let r=JSON.parse(await by.default.readFile(t,{encoding:"utf-8"}));return await this.assertJobManifestMeetsSchemaVersion(r,Z5.JobManifestV1.getJobSchemaVersionRegex()),this.getJobManifest(r,t)}throw new Af.ResourceNotFoundError("manifest could not be found")}async assertPreviewDataIsValid(t,r,n,i=void 0){if(!r.previews)return;let s="";try{for(let[o,a]of Object.entries(r.previews)){s=o;for(let[c,l]of Object.entries(a.functionData)){let u=n.getComponentFunctionByName(c);if(i===void 0||i.name===u.name){let p=await n.getFunctionPreviewData(l);this.inputValidationService.validateInput(p,u.input)}}}}catch(o){if(o instanceof Error){let a=`Invalid preview data for preview "${s}": ${o.message}`;throw new Ju.ManifestValidationError(a,o)}throw o}}async assertMockedUriObjectsAreValid(t,r,n){if(r.mockedUris)try{for(let[i,s]of Object.entries(r.mockedUris)){let o=await n.getMockedUriObject(i)}}catch(i){throw i instanceof Error?new Ju.ManifestValidationError(i.message,i):i}}assertThatMainFunctionExists(t){if(!t.functions.find(r=>r.name===t.mainFunction))throw new Ju.ManifestValidationError(`"${t.name} ${t.version}" main function could not be found in function list`)}async assertStaticFileLocationNotOutsideOfRoot(t,r){var n;let i=OI.default.resolve(t,".."),s=(n=r.staticFiles)===null||n===void 0?void 0:n.locationRoot;if(s){if((0,Af.isPathTryingToAccessOutsideOfRoot)(i,s))throw new Error(`access to a static file locationRoot outside the parent directory in "${r.name} ${r.version}" is not allowed`);if(!await(0,Af.isReadable)(i,s))throw new Error(`static root ${s} from "${r.name} ${r.version}" is not accessible`)}}async assertStaticFilesAreValid(t,r,n=void 0){let i=OI.default.resolve(t,"..");n!==void 0&&await this.assertFunctionStaticFilesAreValid(n,r,i);for(let s of r.functions)await this.assertFunctionStaticFilesAreValid(s,r,i)}async assertFunctionStaticFilesAreValid(t,r,n){var i;let s=(i=r.staticFiles)===null||i===void 0?void 0:i.locationRoot;if(t.output.responseType==="html"){if(s===void 0&&t.output.staticFiles&&t.output.staticFiles.length>0)try{await(0,$it.assertStaticFilesHaveAbsolutePath)(t)}catch(o){throw o instanceof Error?new Ju.ManifestValidationError(o.message,o):o}else if(s)try{await(0,Uit.assertStaticFilesAreValid)(n,r,t,s)}catch(o){throw o instanceof Error?new Ju.ManifestValidationError(o.message,o):o}}}async assertFuncEntryFilesAreValid(t,r,n=void 0){let i=OI.default.resolve(t,"..");try{if(n!==void 0)await(0,Tde.assertFuncEntryFilesAreValid)(i,r,n);else for(let s of r.functions)await(0,Tde.assertFuncEntryFilesAreValid)(i,r,s)}catch(s){throw s instanceof Error?new Ju.ManifestValidationError(s.message,s):s}}async assertManifestMeetsSchemaVersion(t){(0,Ide.getAndAssertManifestVersion)(t),this.jsonValidationService.validateInput(t)}async assertJobManifestMeetsSchemaVersion(t,r){(0,qde.getAndAssertJobManifestVersion)(t,r),this.jobValidationService.validateManifest(t,"JobV1")}async isComponentDirectory(t){return by.default.pathExists(OI.default.join(t,"manifest.json"))}};Pf.AbstractManifestService=eV});var Nde=A(Cf=>{"use strict";var jde=Cf&&Cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cf,"__esModule",{value:!0});Cf.ManifestServiceForDev=void 0;var tV=jde(require("path")),Git=jde(require("fs/promises")),Bit=jI(),Jit=Gr(),Wit=wI(),rV=class extends Bit.AbstractManifestService{constructor(t,r){super(r),this.componentMountPoint=t,this.logger=r,this.foundManifests=[]}async listAllComponentManifests(){return this.foundManifests.length===0&&(this.foundManifests=await this.recursivelyLookForManifests(this.componentMountPoint)),this.foundManifests.map(t=>t.manifest)}async getManifestPath(t,r,n){this.foundManifests.length===0&&(this.foundManifests=await this.recursivelyLookForManifests(this.componentMountPoint));let i=this.foundManifests.find(s=>s.manifest.getName()===(0,Wit.getComponentName)(t,r)&&s.manifest.getVersion()===n);if(i)return tV.default.join(i.directory,"manifest.json");throw new Jit.ResourceNotFoundError("manifest could not be found")}async recursivelyLookForManifests(t,r=10){if(await this.isComponentDirectory(t)){let o=await this.tryToReadManifest(tV.default.join(t,"manifest.json"));return o?[{directory:t,manifest:o}]:[]}if(r===0)return[];let i=(await Git.default.readdir(t,{withFileTypes:!0,encoding:"utf-8"})).filter(o=>o.isDirectory());return(await Promise.all(i.map(o=>this.recursivelyLookForManifests(tV.default.join(t,o.name),r-1)))).flat()}async tryToReadManifest(t){let r;try{r=await this.readManifest(t)}catch(n){if(n&&n.message)this.logger.warn(`found manifest ${t}, but failed schema validation because: ${n.message}`);else throw n}if(r)try{await this.assertManifestIsValid(t,r.getModel())}catch(n){if(n&&n.message)this.logger.warn(`found manifest ${t}, but failed to load manifest because: ${n.message}`);else throw n}return r}};Cf.ManifestServiceForDev=rV});var iV=A(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.ManifestLocationError=void 0;var nV=class extends Error{constructor(t,r,n){super(t),this.manifest=r,this.stack=n==null?void 0:n.stack,this.name="ManifestLocationError"}};NI.ManifestLocationError=nV});var Dde=A(If=>{"use strict";var Mde=If&&If.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(If,"__esModule",{value:!0});If.ManifestServiceForProduction=void 0;var yp=Mde(require("path")),Ey=Mde(require("fs/promises")),Kit=jI(),kde=iV(),sV=class extends Kit.AbstractManifestService{constructor(t,r){super(r),this.componentMountPoint=t,this.logger=r}async listAllComponentManifests(){let t=await Ey.default.readdir(this.componentMountPoint,{encoding:"utf-8"}),r=[];for(let n of t){let i=yp.default.join(this.componentMountPoint,n);if((await Ey.default.stat(i)).isDirectory()){let s=await Ey.default.readdir(i,{encoding:"utf-8"});for(let o of s)try{let a=yp.default.join(i,o);if((await Ey.default.stat(a)).isDirectory()){let c=await Ey.default.readdir(a,{encoding:"utf-8"});for(let l of c){let u=yp.default.join(a,l);if(await this.isComponentDirectory(u))try{let p=yp.default.join(u,"manifest.json"),d=await this.readManifest(p);await this.assertManifestVersionIsTheSameAsFileSystemVersion(p,d.getModel()),r.push(d)}catch{}}}}catch{}}}return r}async assertManifestIsValid(t,r,n){await super.assertManifestIsValid(t,r,n),(n==null?void 0:n.tempLocation)!==!0&&await this.assertManifestVersionIsTheSameAsFileSystemVersion(t,r)}async getManifestPath(t,r,n){return yp.default.join(this.componentMountPoint,t,r,n,"manifest.json")}async assertManifestVersionIsTheSameAsFileSystemVersion(t,r){let n=this.getManifest(r,t),i=yp.default.join(n.getName(),n.getVersion(),"manifest.json");if(!t.endsWith(i)){let s=t.split(yp.default.sep).reverse(),o=s[1],a=s[3];throw o!==n.getVersion()?new kde.ManifestLocationError(`manifest version miss match, expected version ${o} but found ${n.getVersion()}`,r):new kde.ManifestLocationError(`manifest namespace miss match, expected namespace ${a} but found ${n.getNamespace()}`,r)}}};If.ManifestServiceForProduction=sV});var Lde=A((S2t,Fde)=>{"use strict";Fde.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)});var Hde=A((w2t,Vde)=>{"use strict";var $de="%[a-f0-9]{2}",zde=new RegExp("("+$de+")|([^%]+?)","gi"),Ude=new RegExp("("+$de+")+","gi");function oV(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],oV(r),oV(n))}function Yit(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(zde)||[],r=1;r<t.length;r++)e=oV(t,r).join(""),t=e.match(zde)||[];return e}}function Qit(e){for(var t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=Ude.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=Yit(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Ude.exec(e)}t["%C2"]="\uFFFD";for(var i=Object.keys(t),s=0;s<i.length;s++){var o=i[s];e=e.replace(new RegExp(o,"g"),t[o])}return e}Vde.exports=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Qit(e)}}});var Bde=A((b2t,Gde)=>{"use strict";Gde.exports=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];let r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}});var Wde=A((E2t,Jde)=>{"use strict";Jde.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),s=0;s<n.length;s++){var o=n[s],a=e[o];(i?t.indexOf(o)!==-1:t(o,a,e))&&(r[o]=a)}return r}});var kI=A(so=>{"use strict";var Xit=Lde(),Zit=Hde(),Yde=Bde(),est=Wde(),tst=e=>e==null,aV=Symbol("encodeFragmentIdentifier");function rst(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Bn(t,e),"[",i,"]"].join("")]:[...r,[Bn(t,e),"[",Bn(i,e),"]=",Bn(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Bn(t,e),"[]"].join("")]:[...r,[Bn(t,e),"[]=",Bn(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Bn(t,e),":list="].join("")]:[...r,[Bn(t,e),":list=",Bn(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Bn(r,e),t,Bn(i,e)].join("")]:[[n,Bn(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,Bn(t,e)]:[...r,[Bn(t,e),"=",Bn(n,e)].join("")]}}function nst(e){let t;switch(e.arrayFormat){case"index":return(r,n,i)=>{if(t=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!t){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][t[1]]=n};case"bracket":return(r,n,i)=>{if(t=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"colon-list-separator":return(r,n,i)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"comma":case"separator":return(r,n,i)=>{let s=typeof n=="string"&&n.includes(e.arrayFormatSeparator),o=typeof n=="string"&&!s&&kl(n,e).includes(e.arrayFormatSeparator);n=o?kl(n,e):n;let a=s||o?n.split(e.arrayFormatSeparator).map(c=>kl(c,e)):n===null?n:kl(n,e);i[r]=a};case"bracket-separator":return(r,n,i)=>{let s=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!s){i[r]=n&&kl(n,e);return}let o=n===null?[]:n.split(e.arrayFormatSeparator).map(a=>kl(a,e));if(i[r]===void 0){i[r]=o;return}i[r]=[].concat(i[r],o)};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[].concat(i[r],n)}}}function Qde(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Bn(e,t){return t.encode?t.strict?Xit(e):encodeURIComponent(e):e}function kl(e,t){return t.decode?Zit(e):e}function Xde(e){return Array.isArray(e)?e.sort():typeof e=="object"?Xde(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function Zde(e){let t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function ist(e){let t="",r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function epe(e){e=Zde(e);let t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function Kde(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function tpe(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t),Qde(t.arrayFormatSeparator);let r=nst(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(let i of e.split("&")){if(i==="")continue;let[s,o]=Yde(t.decode?i.replace(/\+/g," "):i,"=");o=o===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:kl(o,t),r(kl(s,t),o,n)}for(let i of Object.keys(n)){let s=n[i];if(typeof s=="object"&&s!==null)for(let o of Object.keys(s))s[o]=Kde(s[o],t);else n[i]=Kde(s,t)}return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((i,s)=>{let o=n[s];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?i[s]=Xde(o):i[s]=o,i},Object.create(null))}so.extract=epe;so.parse=tpe;so.stringify=(e,t)=>{if(!e)return"";t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t),Qde(t.arrayFormatSeparator);let r=o=>t.skipNull&&tst(e[o])||t.skipEmptyString&&e[o]==="",n=rst(t),i={};for(let o of Object.keys(e))r(o)||(i[o]=e[o]);let s=Object.keys(i);return t.sort!==!1&&s.sort(t.sort),s.map(o=>{let a=e[o];return a===void 0?"":a===null?Bn(o,t):Array.isArray(a)?a.length===0&&t.arrayFormat==="bracket-separator"?Bn(o,t)+"[]":a.reduce(n(o),[]).join("&"):Bn(o,t)+"="+Bn(a,t)}).filter(o=>o.length>0).join("&")};so.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,n]=Yde(e,"#");return Object.assign({url:r.split("?")[0]||"",query:tpe(epe(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:kl(n,t)}:{})};so.stringifyUrl=(e,t)=>{t=Object.assign({encode:!0,strict:!0,[aV]:!0},t);let r=Zde(e.url).split("?")[0]||"",n=so.extract(e.url),i=so.parse(n,{sort:!1}),s=Object.assign(i,e.query),o=so.stringify(s,t);o&&(o=`?${o}`);let a=ist(e.url);return e.fragmentIdentifier&&(a=`#${t[aV]?Bn(e.fragmentIdentifier,t):e.fragmentIdentifier}`),`${r}${o}${a}`};so.pick=(e,t,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[aV]:!1},r);let{url:n,query:i,fragmentIdentifier:s}=so.parseUrl(e,r);return so.stringifyUrl({url:n,query:est(i,t),fragmentIdentifier:s},r)};so.exclude=(e,t,r)=>{let n=Array.isArray(t)?i=>!t.includes(i):(i,s)=>!t(i,s);return so.pick(e,n,r)}});var cV=A(qf=>{"use strict";var sst=qf&&qf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qf,"__esModule",{value:!0});qf.convertFunctionStaticFilesToFqdn=void 0;var ost=Gr(),ast=sst(kI());function cst(e,t,r,n,i){if(t.startsWith("https://")||t.startsWith("http://"))return t;let s=(0,ost.joinAbsoluteUrlPath)(e,"s",n,i,t);return ast.default.stringifyUrl({url:s,query:{_componentSet:r}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})}qf.convertFunctionStaticFilesToFqdn=cst});var rpe=A(Tf=>{"use strict";var lst=Tf&&Tf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tf,"__esModule",{value:!0});Tf.convertFunctionStaticFilesToFqdnForPreview=void 0;var ust=Gr(),dst=lst(kI());function pst(e,t,r,n,i){if(t.startsWith("https://")||t.startsWith("http://"))return t;let s=(0,ust.joinAbsoluteUrlPath)(e,"s",r,n,t);return dst.default.stringifyUrl({url:s,query:{_previewKey:i}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})}Tf.convertFunctionStaticFilesToFqdnForPreview=pst});var ipe=A(MI=>{"use strict";Object.defineProperty(MI,"__esModule",{value:!0});MI.ComponentFunctionService=void 0;var lV=Gr(),npe=cV(),mst=rpe(),fst=qI(),_st=X5(),uV=class{constructor(t){this.rootUrl=t,this.schemaValidationService=fst.ComponentSchemaValidationServiceFactory.create(),this.inputValidationService=_st.ComponentInputValidationServiceFactory.create()}getFunctionDefinitionFromManifest(t,r){return r.getModel().functions.find(i=>i.name===t)}prepareComponentFunctionForWebResponse(t,r,n){var i;return t.output.responseType==="html"&&(t.output.staticFiles=(i=t.output.staticFiles)===null||i===void 0?void 0:i.map(s=>({...s,file:{...s.file,filepath:(0,npe.convertFunctionStaticFilesToFqdn)(this.rootUrl,s.file.filepath,n,r.getName(),r.getVersion())}}))),t}prepareManifestForWebResponse(t,r){let n=t.getModel(),i={...n,functions:[]};for(let s of n.functions)if(s.output.responseType==="html"&&s.output.staticFiles){let o={...s,output:{...s.output,staticFiles:s.output.staticFiles.map(a=>({...a,file:{...a.file,filepath:(0,npe.convertFunctionStaticFilesToFqdn)(this.rootUrl,a.file.filepath,r,t.getName(),t.getVersion())}}))}};i.functions.push(o)}else i.functions.push(s);return i}prepareComponentFunctionForPreview(t,r,n){var i;return t.output.responseType==="html"&&(t.output.staticFiles=(i=t.output.staticFiles)===null||i===void 0?void 0:i.map(s=>({...s,file:{...s.file,filepath:(0,mst.convertFunctionStaticFilesToFqdnForPreview)(this.rootUrl,s.file.filepath,r.getName(),r.getVersion(),n)}}))),t}prepareManifestForPreview(t,r){let n=t.getModel(),i={...n,functions:[]};for(let s of n.functions){let o=this.prepareComponentFunctionForPreview(s,t,r);i.functions.push(o)}return i}assertInputValidForComponentFunction(t,r){if(t===void 0)throw new lV.BadRequestError(`input value for ${r.name} cannot be undefined`);this.schemaValidationService.validateInput(t,r.input)}assertRenderInputValidForComponentFunction(t,r){if(t===void 0)throw new lV.BadRequestError(`input value for ${r.name} cannot be undefined`);this.inputValidationService.validateInput(t,r.input)}assertOutputValidForComponentFunction(t,r){if(r===void 0)throw new Error(`input value for ${r} cannot be undefined`);if(t===void 0)throw new Error(`input value for ${r.name} cannot be undefined`);let n=this.getOutputValidationSchema(r.output);this.schemaValidationService.validateInput(t,n)}getOutputValidationSchema(t){let r=t.responseType;switch(r){case"html":return{type:"string",minLength:0};case"json":{let n=t;if(n.definition)return n.definition;throw new Error("definition is missing for the json")}default:(0,lV.never)(r)}}};MI.ComponentFunctionService=uV});var spe=A(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.JobFunctionService=void 0;var hst=Gr(),vst=qI(),dV=class{constructor(){this.schemaValidationService=vst.ComponentSchemaValidationServiceFactory.create()}assertInputValidForJobFunction(t,r){if(t===void 0)throw new hst.BadRequestError(`input value for ${r.name} cannot be undefined`);this.schemaValidationService.validateInput(t,r.input)}};DI.JobFunctionService=dV});var pV=A(jn=>{"use strict";var gst=jn&&jn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),_s=jn&&jn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&gst(t,e,r)};Object.defineProperty(jn,"__esModule",{value:!0});_s(jI(),jn);_s(Nde(),jn);_s(Dde(),jn);_s(ipe(),jn);_s(spe(),jn);_s(W5(),jn);_s(K5(),jn);_s(U5(),jn);_s(V5(),jn);_s(EI(),jn);_s(wy(),jn);_s(L3(),jn);_s(G5(),jn);_s(J5(),jn);_s(iV(),jn);_s(hf(),jn)});var ope=A(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.ComponentContentUriResolverForPreview=void 0;var yst=pV(),mV=class{constructor(t,r){this.manifest=t,this.manifestService=new yst.ManifestV1(t,r??"")}async resolveUri(t){return await this.manifestService.getMockedUriObject(t)}};FI.ComponentContentUriResolverForPreview=mV});var cpe=A(ape=>{"use strict";Object.defineProperty(ape,"__esModule",{value:!0})});var upe=A(lpe=>{"use strict";Object.defineProperty(lpe,"__esModule",{value:!0})});var ppe=A(dpe=>{"use strict";Object.defineProperty(dpe,"__esModule",{value:!0})});var mpe=A(Of=>{"use strict";var Sst=Of&&Of.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Of,"__esModule",{value:!0});Of.createComponentContextualFunctions=void 0;var LI=Sst(kI()),Ry=Gr(),wst=require("crypto");function bst(e){let t=(0,Ry.joinAbsoluteUrlPath)(e.rootUrl,"r",e.componentName,e.manifest.version),r=(0,Ry.joinAbsoluteUrlPath)(e.rootUrl,"s",e.componentName,e.manifest.version);return{getStaticResourceUrl:n=>{if(typeof n!="string")throw new Error("getStaticResourceUrl: first argument must be a string");let i=(0,Ry.joinAbsoluteUrlPath)(r,n).split("?")[0];return e.withPreviewKey?LI.default.stringifyUrl({url:i,query:{_previewKey:e.withPreviewKey}},{skipNull:!0,encode:!0,arrayFormat:"bracket"}):LI.default.stringifyUrl({url:i,query:{_componentSet:e.set.webPath}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})},getFunctionUrl:(n,i={})=>{if(typeof n!="string")throw new Error("getFunctionUrl: first argument must be a string");return n=n.toLowerCase(),e.withPreviewKey?LI.default.stringifyUrl({url:(0,Ry.joinAbsoluteUrlPath)(t,n),query:{...i,_previewKey:e.withPreviewKey}},{skipNull:!0,encode:!0,arrayFormat:"bracket"}):LI.default.stringifyUrl({url:(0,Ry.joinAbsoluteUrlPath)(t,n),query:{...i,_componentSet:e.set.webPath}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})},resolveUri:async n=>{if(typeof n!="string")throw new Error("resolveUri: first argument must be a string");if(e.requestId===void 0)throw new Error("resolveUri: request id is undefined");let i=(0,wst.randomUUID)();return e.webRequestEvents.emit("uri-request",n,e.requestId,i),await new Promise((o,a)=>{let c=(l,u,p)=>{i==p&&(e.webRequestEvents.removeListener("uri-response",c),l.status==="fulfilled"&&o(l.value),l.status==="rejected"&&a(l.reason))};e.webRequestEvents.on("uri-response",c)})}}}Of.createComponentContextualFunctions=bst});var fpe=A(zI=>{"use strict";Object.defineProperty(zI,"__esModule",{value:!0});zI.ComponentError=void 0;var Est=Gr(),fV=class extends Est.ErrorWithHttpStatusCode{constructor(t,r,n,i,s,o,a=500){super(a,(r==null?void 0:r.message)||"An error occurred with no additional information available"),this.requestId=t,this.error=r,this.functionName=n,this.componentName=i,this.componentVersion=s,this.setWebPath=o,this.name="ComponentError",this.stack=r==null?void 0:r.stack}};zI.ComponentError=fV});var _pe=A(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});UI.JobError=void 0;var Rst=Gr(),_V=class extends Rst.ErrorWithHttpStatusCode{constructor(t,r,n,i,s,o,a=500){super(a,(r==null?void 0:r.message)||"An error occurred with no additional information available"),this.requestId=t,this.error=r,this.functionName=n,this.jobName=i,this.jobVersion=s,this.setWebPath=o,this.name="JobError",this.stack=r==null?void 0:r.stack}};UI.JobError=_V});var hpe=A(Si=>{"use strict";var xst=Si&&Si.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),To=Si&&Si.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&xst(t,e,r)};Object.defineProperty(Si,"__esModule",{value:!0});To(x5(),Si);To(I5(),Si);To(P5(),Si);To(T5(),Si);To(wde(),Si);To(ope(),Si);To(cpe(),Si);To(upe(),Si);To(ppe(),Si);To(mpe(),Si);To(fpe(),Si);To(_pe(),Si);To(M5(),Si)});var vpe=A(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.JOB_EXECUTION_STATUS=void 0;var Ast;(function(e){e.queued="queued",e.terminated="terminated",e.successfullyCompleted="successfully-completed",e.running="running",e.errored="errored"})(Ast=xy.JOB_EXECUTION_STATUS||(xy.JOB_EXECUTION_STATUS={}))});var gpe=A(Sp=>{"use strict";var Pst=Sp&&Sp.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Cst=Sp&&Sp.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Pst(t,e,r)};Object.defineProperty(Sp,"__esModule",{value:!0});Cst(vpe(),Sp)});var ype=A($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});$I.ContentItemService=void 0;var hV=class{constructor(t){this.api=t}async getContentItem(t,r){var n;try{let i={};return r&&(i["x-api-key"]=r),(await this.api.getContentItem(t,{resolveDynamicContent:!0},{headers:i})).data.content}catch(i){let s=i;if(((n=s.response)===null||n===void 0?void 0:n.status)===404)return;throw this.handleAxiosError(s)}}handleAxiosError(t){var r;let{response:n}=t;if(!n||typeof t=="object"&&!t.isAxiosError)return t;throw new Error(`Error occurred in Component Content Item service: ${(r=n.data)===null||r===void 0?void 0:r.message}`)}};$I.ContentItemService=hV});var gV=A(oo=>{"use strict";var Ist=oo&&oo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oo,"__esModule",{value:!0});oo.Api=oo.HttpClient=oo.ContentType=oo.ContentSchemaType=void 0;var qst;(function(e){e.Component="component",e.User="user"})(qst=oo.ContentSchemaType||(oo.ContentSchemaType={}));var Tst=Ist(require("axios")),Na;(function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"})(Na=oo.ContentType||(oo.ContentType={}));var VI=class{constructor({securityWorker:t,secure:r,format:n,...i}={}){this.securityData=null,this.setSecurityData=s=>{this.securityData=s},this.request=async({secure:s,path:o,type:a,query:c,format:l,body:u,...p})=>{let d=(typeof s=="boolean"?s:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},f=this.mergeRequestParams(p,d),m=l||this.format||void 0;return a===Na.FormData&&u&&u!==null&&typeof u=="object"&&(u=this.createFormData(u)),a===Na.Text&&u&&u!==null&&typeof u!="string"&&(u=JSON.stringify(u)),this.instance.request({...f,headers:{...f.headers||{},...a&&a!==Na.FormData?{"Content-Type":a}:{}},params:c,responseType:m,data:u,url:o})},this.instance=Tst.default.create({...i,baseURL:i.baseURL||"/"}),this.secure=r,this.format=n,this.securityWorker=t}mergeRequestParams(t,r){let n=t.method||r&&r.method;return{...this.instance.defaults,...t,...r||{},headers:{...n&&this.instance.defaults.headers[n.toLowerCase()]||{},...t.headers||{},...r&&r.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return Object.keys(t||{}).reduce((r,n)=>{let i=t[n],s=i instanceof Array?i:[i];for(let o of s){let a=o instanceof Blob||o instanceof File;r.append(n,a?o:this.stringifyFormItem(o))}return r},new FormData)}};oo.HttpClient=VI;var vV=class extends VI{constructor(){super(...arguments),this.getRoot=(t={})=>this.request({path:"/",method:"GET",...t}),this.contentItem={createContentItem:(t,r,n={})=>this.request({path:"/content-item",method:"POST",query:r,body:t,secure:!0,type:Na.Json,...n}),getPaginatedContentItems:(t,r={})=>this.request({path:"/content-item",method:"GET",query:t,secure:!0,format:"json",...r}),updateContentItem:(t,r,n={})=>this.request({path:`/content-item/${t}`,method:"PATCH",body:r,secure:!0,type:Na.Json,format:"json",...n}),getContentItem:(t,r,n={})=>this.request({path:`/content-item/${t}`,method:"GET",query:r,secure:!0,format:"json",...n}),deleteContentItemById:(t,r={})=>this.request({path:`/content-item/${t}`,method:"DELETE",secure:!0,format:"json",...r})},this.contentSchema={createContentSchema:(t,r={})=>this.request({path:"/content-schema",method:"POST",body:t,secure:!0,type:Na.Json,format:"json",...r}),getPaginatedContentSchemas:(t,r={})=>this.request({path:"/content-schema",method:"GET",query:t,secure:!0,format:"json",...r}),getContentSchemaSchema:(t,r={})=>this.request({path:"/content-schema/{schemaName*.json}",method:"GET",secure:!0,format:"json",...r}),getContentSchema:(t,r={})=>this.request({path:"/content-schema/{schemaName*}",method:"GET",secure:!0,format:"json",...r}),updateContentSchema:(t={})=>this.request({path:"/content-schema/{schemaName*}",method:"PATCH",secure:!0,...t}),deleteContentSchema:(t,r={})=>this.request({path:"/content-schema/{schemaName*}",method:"DELETE",secure:!0,format:"json",...r})},this.health={getHealthInfo:(t={})=>this.request({path:"/health",method:"GET",format:"json",...t})},this.dynamicContent={getDynamicContentItem:(t,r={})=>this.request({path:"/dynamic-content",method:"GET",query:t,secure:!0,format:"json",...r})},this.matrixQuery={getPaginatedAssets:(t,r,n={})=>this.request({path:`/matrix-query/${t}`,method:"GET",query:r,secure:!0,format:"json",...n}),getAsset:(t,r,n={})=>this.request({path:`/matrix-query/${t}/asset`,method:"GET",query:r,secure:!0,format:"json",...n})},this.pageContents={createPageContents:(t,r={})=>this.request({path:"/page-contents",method:"POST",body:t,secure:!0,type:Na.Json,...r}),updateContentItem:(t,r,n={})=>this.request({path:`/page-contents/${t}`,method:"PATCH",body:r,secure:!0,type:Na.Json,format:"json",...n}),getPageContents:(t,r={})=>this.request({path:`/page-contents/${t}`,method:"GET",secure:!0,format:"json",...r}),deletePageContents:(t,r={})=>this.request({path:`/page-contents/${t}`,method:"DELETE",secure:!0,format:"json",...r})},this.settings={getMatrixIdentifiers:(t={})=>this.request({path:"/settings/matrix-identifiers",method:"GET",secure:!0,format:"json",...t}),createMatrixIdentifier:(t,r={})=>this.request({path:"/settings/matrix-identifiers",method:"POST",body:t,secure:!0,type:Na.Json,format:"json",...r}),updateMatrixIdentifier:(t,r,n={})=>this.request({path:`/settings/matrix-identifiers/${t}`,method:"PATCH",body:r,secure:!0,type:Na.Json,format:"json",...n}),getMatrixIdentifier:(t,r={})=>this.request({path:`/settings/matrix-identifiers/${t}`,method:"GET",secure:!0,format:"json",...r}),deleteMatrixIdentifier:(t,r={})=>this.request({path:`/settings/matrix-identifiers/${t}`,method:"DELETE",secure:!0,...r})}}};oo.Api=vV});var Spe=A(oa=>{"use strict";var Ost=oa&&oa.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jst=oa&&oa.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nst=oa&&oa.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ost(t,e,r);return jst(t,e),t};Object.defineProperty(oa,"__esModule",{value:!0});oa.ContentApi=oa.ContentApiService=void 0;var kst=gV();Object.defineProperty(oa,"ContentApiService",{enumerable:!0,get:function(){return kst.Api}});oa.ContentApi=Nst(gV())});var yV=A(HI=>{"use strict";Object.defineProperty(HI,"__esModule",{value:!0});HI.getContentSchemaName=void 0;function Mst(e,t,r){return[e,t,r].join("/")}HI.getContentSchemaName=Mst});var wpe=A(GI=>{"use strict";Object.defineProperty(GI,"__esModule",{value:!0});GI.ComponentContentSchemaService=void 0;var Dst=Spe(),Fst=yV(),SV=class{constructor(t){this.api=t}async createComponentContentSchemas(t,r){let n=t.getInputSchemas();for(let i of n)if(i.schema&&Object.keys(i.schema).length){let s=(0,Fst.getContentSchemaName)(t.getName(),t.getVersion(),i.name);await this.createContentSchema(s,i.schema,r)}}async createContentSchema(t,r,n){try{let i={"Content-Type":"application/json"};n&&(i.authorization=n),await this.api.createContentSchema({contentSchemaType:Dst.ContentApi.ContentSchemaType.Component,schema:r,name:t},{headers:i})}catch(i){throw this.handleAxiosError(i)}}handleAxiosError(t){var r;let{response:n}=t;if(!n||typeof t=="object"&&!t.isAxiosError)return t;throw new Error(`Error occurred when creating content schema: ${(r=n.data)===null||r===void 0?void 0:r.message}`)}};GI.ComponentContentSchemaService=SV});var bpe=A(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});BI.DynamicContentItemService=void 0;var wV=class{constructor(t){this.api=t}async getDynamicContentItem(t,r){try{let n={};return r&&(n["x-api-key"]=r),(await this.api.getDynamicContentItem({_contentUri:t},{headers:n})).data}catch(n){let i=n;throw this.handleAxiosError(i)}}handleAxiosError(t){var r;let{response:n}=t;if(!n||typeof t=="object"&&!t.isAxiosError)return t;throw new Error(`Error occurred when resolving content from uri: ${(r=n.data)===null||r===void 0?void 0:r.message}`)}};BI.DynamicContentItemService=wV});var Epe=A(xc=>{"use strict";var Lst=xc&&xc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),JI=xc&&xc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Lst(t,e,r)};Object.defineProperty(xc,"__esModule",{value:!0});JI(ype(),xc);JI(wpe(),xc);JI(bpe(),xc);JI(yV(),xc)});var Rpe=A(wp=>{"use strict";var zst=wp&&wp.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ust=wp&&wp.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&zst(t,e,r)};Object.defineProperty(wp,"__esModule",{value:!0});Ust(cV(),wp)});var Ape=A(Nf=>{"use strict";var xpe=Nf&&Nf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.ComponentFixture=void 0;var jf=xpe(require("fs/promises")),Oo=xpe(require("path")),$st=require("crypto"),Vst=require("child_process"),Hst="some-namespace",Ay=class{static async setupFullComponentDirectory(t,{raw:r=!1}={}){let n=await this.createFixtureDirectory(),{directory:i,version:s}=await this.createVersionDirectory(n),o=await this.createManifest(i,{version:s,staticFilesRoot:"static"});return await jf.default.writeFile(Oo.default.join(i,"main.js"),Gst(t,{raw:r})),await jf.default.mkdir(Oo.default.join(i,"static")),await jf.default.writeFile(Oo.default.join(i,"static","static.txt"),"hello"),{fixtureDirectory:n,componentDirectory:i,version:s,manifest:o,componentName:Oo.default.basename(n)}}static async createFixtureDirectory(){let t=Bst(),r=Oo.default.join(this.fixtureRootDirectory,t);return await jf.default.mkdir(r,{recursive:!0}),r}static async createVersionDirectory(t){let r="1.0.1",n=Oo.default.join(t,r);return await jf.default.mkdir(n),{directory:n,version:r}}static async createManifest(t,r={}){var n,i,s,o;let c={$schema:"http://localhost:3000/schemas/v1.json#",name:Oo.default.basename(t)===r.version?Oo.default.basename(Oo.default.dirname(t)):Oo.default.basename(t),namespace:this.namespace,displayName:"some-display-name",description:"some-description",version:(n=r.version)!==null&&n!==void 0?n:"1.0.0",mainFunction:(i=r.mainFunction)!==null&&i!==void 0?i:"main",functions:[{name:(s=r.mainFunction)!==null&&s!==void 0?s:"main",entry:((o=r.mainFunction)!==null&&o!==void 0?o:"main")+".js",input:{},output:{responseType:"html"}}]};return r.staticFilesRoot&&(c.staticFiles={locationRoot:r.staticFilesRoot}),await jf.default.writeFile(Oo.default.join(t,"manifest.json"),JSON.stringify(c)),c}};Nf.ComponentFixture=Ay;Ay.fixtureRootDirectory=Oo.default.join(Jst(),"fixtures");Ay.namespace=Hst;function Gst(e,{raw:t=!1}={}){return t?`module.exports = (input, info) => ${e}`:typeof e=="string"?`module.exports = () => "${e}"`:`module.exports = () => JSON.parse(${JSON.stringify(e)})`}function Bst(){return"test-"+(0,$st.randomUUID)()}function Jst(){var e;if(process.env.NODE_ENV!=="test")return(e=process.env.DATA_MOUNT_POINT)!==null&&e!==void 0?e:"";let t=(0,Vst.execSync)("git rev-parse --show-toplevel",{encoding:"utf-8"}).replace(/\n$/,"");return Oo.default.resolve(t,"test-components")}});var WI=A(ai=>{"use strict";var Ppe=ai&&ai.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Wst=ai&&ai.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Wu=ai&&ai.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ppe(t,e,r)},Kst=ai&&ai.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ppe(t,e,r);return Wst(t,e),t};Object.defineProperty(ai,"__esModule",{value:!0});ai.TestHelpers=void 0;Wu(L3(),ai);Wu(gde(),ai);Wu(S5(),ai);Wu(hpe(),ai);Wu(gpe(),ai);Wu(Epe(),ai);Wu(Rpe(),ai);Wu(pV(),ai);ai.TestHelpers=Kst(Ape())});var kpe=A((r9t,Npe)=>{"use strict";Npe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var Fpe=A((n9t,Dpe)=>{"use strict";var Mpe=typeof Symbol<"u"&&Symbol,Qst=kpe();Dpe.exports=function(){return typeof Mpe!="function"||typeof Symbol!="function"||typeof Mpe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Qst()}});var zpe=A((i9t,Lpe)=>{"use strict";var Xst="Function.prototype.bind called on incompatible ",RV=Array.prototype.slice,Zst=Object.prototype.toString,eot="[object Function]";Lpe.exports=function(t){var r=this;if(typeof r!="function"||Zst.call(r)!==eot)throw new TypeError(Xst+r);for(var n=RV.call(arguments,1),i,s=function(){if(this instanceof i){var u=r.apply(this,n.concat(RV.call(arguments)));return Object(u)===u?u:this}else return r.apply(t,n.concat(RV.call(arguments)))},o=Math.max(0,r.length-n.length),a=[],c=0;c<o;c++)a.push("$"+c);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}});var XI=A((s9t,Upe)=>{"use strict";var tot=zpe();Upe.exports=Function.prototype.bind||tot});var Vpe=A((o9t,$pe)=>{"use strict";var rot=XI();$pe.exports=rot.call(Function.call,Object.prototype.hasOwnProperty)});var tq=A((a9t,Wpe)=>{"use strict";var gr,Lf=SyntaxError,Jpe=Function,Ff=TypeError,xV=function(e){try{return Jpe('"use strict"; return ('+e+").constructor;")()}catch{}},bp=Object.getOwnPropertyDescriptor;if(bp)try{bp({},"")}catch{bp=null}var AV=function(){throw new Ff},not=bp?function(){try{return arguments.callee,AV}catch{try{return bp(arguments,"callee").get}catch{return AV}}}():AV,Mf=Fpe()(),Ac=Object.getPrototypeOf||function(e){return e.__proto__},Df={},iot=typeof Uint8Array>"u"?gr:Ac(Uint8Array),Ep={"%AggregateError%":typeof AggregateError>"u"?gr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?gr:ArrayBuffer,"%ArrayIteratorPrototype%":Mf?Ac([][Symbol.iterator]()):gr,"%AsyncFromSyncIteratorPrototype%":gr,"%AsyncFunction%":Df,"%AsyncGenerator%":Df,"%AsyncGeneratorFunction%":Df,"%AsyncIteratorPrototype%":Df,"%Atomics%":typeof Atomics>"u"?gr:Atomics,"%BigInt%":typeof BigInt>"u"?gr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?gr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?gr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?gr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?gr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?gr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?gr:FinalizationRegistry,"%Function%":Jpe,"%GeneratorFunction%":Df,"%Int8Array%":typeof Int8Array>"u"?gr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?gr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?gr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mf?Ac(Ac([][Symbol.iterator]())):gr,"%JSON%":typeof JSON=="object"?JSON:gr,"%Map%":typeof Map>"u"?gr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mf?gr:Ac(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?gr:Promise,"%Proxy%":typeof Proxy>"u"?gr:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?gr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?gr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mf?gr:Ac(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?gr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mf?Ac(""[Symbol.iterator]()):gr,"%Symbol%":Mf?Symbol:gr,"%SyntaxError%":Lf,"%ThrowTypeError%":not,"%TypedArray%":iot,"%TypeError%":Ff,"%Uint8Array%":typeof Uint8Array>"u"?gr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?gr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?gr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?gr:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?gr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?gr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?gr:WeakSet};try{null.error}catch(e){Hpe=Ac(Ac(e)),Ep["%Error.prototype%"]=Hpe}var Hpe,sot=function e(t){var r;if(t==="%AsyncFunction%")r=xV("async function () {}");else if(t==="%GeneratorFunction%")r=xV("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=xV("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(r=Ac(i.prototype))}return Ep[t]=r,r},Gpe={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Cy=XI(),ZI=Vpe(),oot=Cy.call(Function.call,Array.prototype.concat),aot=Cy.call(Function.apply,Array.prototype.splice),Bpe=Cy.call(Function.call,String.prototype.replace),eq=Cy.call(Function.call,String.prototype.slice),cot=Cy.call(Function.call,RegExp.prototype.exec),lot=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uot=/\\(\\)?/g,dot=function(t){var r=eq(t,0,1),n=eq(t,-1);if(r==="%"&&n!=="%")throw new Lf("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Lf("invalid intrinsic syntax, expected opening `%`");var i=[];return Bpe(t,lot,function(s,o,a,c){i[i.length]=a?Bpe(c,uot,"$1"):o||s}),i},pot=function(t,r){var n=t,i;if(ZI(Gpe,n)&&(i=Gpe[n],n="%"+i[0]+"%"),ZI(Ep,n)){var s=Ep[n];if(s===Df&&(s=sot(n)),typeof s>"u"&&!r)throw new Ff("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Lf("intrinsic "+t+" does not exist!")};Wpe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Ff("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ff('"allowMissing" argument must be a boolean');if(cot(/^%?[^%]*%?$/,t)===null)throw new Lf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=dot(t),i=n.length>0?n[0]:"",s=pot("%"+i+"%",r),o=s.name,a=s.value,c=!1,l=s.alias;l&&(i=l[0],aot(n,oot([0,1],l)));for(var u=1,p=!0;u<n.length;u+=1){var d=n[u],f=eq(d,0,1),m=eq(d,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new Lf("property names with quotes must have matching quotes");if((d==="constructor"||!p)&&(c=!0),i+="."+d,o="%"+i+"%",ZI(Ep,o))a=Ep[o];else if(a!=null){if(!(d in a)){if(!r)throw new Ff("base intrinsic for "+t+" exists, but the property is not available.");return}if(bp&&u+1>=n.length){var v=bp(a,d);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[d]}else p=ZI(a,d),a=a[d];p&&!c&&(Ep[o]=a)}}return a}});var eme=A((c9t,rq)=>{"use strict";var PV=XI(),zf=tq(),Qpe=zf("%Function.prototype.apply%"),Xpe=zf("%Function.prototype.call%"),Zpe=zf("%Reflect.apply%",!0)||PV.call(Xpe,Qpe),Kpe=zf("%Object.getOwnPropertyDescriptor%",!0),Rp=zf("%Object.defineProperty%",!0),mot=zf("%Math.max%");if(Rp)try{Rp({},"a",{value:1})}catch{Rp=null}rq.exports=function(t){var r=Zpe(PV,Xpe,arguments);if(Kpe&&Rp){var n=Kpe(r,"length");n.configurable&&Rp(r,"length",{value:1+mot(0,t.length-(arguments.length-1))})}return r};var Ype=function(){return Zpe(PV,Qpe,arguments)};Rp?Rp(rq.exports,"apply",{value:Ype}):rq.exports.apply=Ype});var ime=A((l9t,nme)=>{"use strict";var tme=tq(),rme=eme(),fot=rme(tme("String.prototype.indexOf"));nme.exports=function(t,r){var n=tme(t,!!r);return typeof n=="function"&&fot(t,".prototype.")>-1?rme(n):n}});var ome=A((u9t,sme)=>{sme.exports=require("util").inspect});var Ame=A((d9t,xme)=>{var DV=typeof Map=="function"&&Map.prototype,CV=Object.getOwnPropertyDescriptor&&DV?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,iq=DV&&CV&&typeof CV.get=="function"?CV.get:null,ame=DV&&Map.prototype.forEach,FV=typeof Set=="function"&&Set.prototype,IV=Object.getOwnPropertyDescriptor&&FV?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,sq=FV&&IV&&typeof IV.get=="function"?IV.get:null,cme=FV&&Set.prototype.forEach,_ot=typeof WeakMap=="function"&&WeakMap.prototype,qy=_ot?WeakMap.prototype.has:null,hot=typeof WeakSet=="function"&&WeakSet.prototype,Ty=hot?WeakSet.prototype.has:null,vot=typeof WeakRef=="function"&&WeakRef.prototype,lme=vot?WeakRef.prototype.deref:null,got=Boolean.prototype.valueOf,yot=Object.prototype.toString,Sot=Function.prototype.toString,wot=String.prototype.match,LV=String.prototype.slice,Qu=String.prototype.replace,bot=String.prototype.toUpperCase,ume=String.prototype.toLowerCase,yme=RegExp.prototype.test,dme=Array.prototype.concat,Pc=Array.prototype.join,Eot=Array.prototype.slice,pme=Math.floor,OV=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qV=Object.getOwnPropertySymbols,jV=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",hs=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Uf||"symbol")?Symbol.toStringTag:null,Sme=Object.prototype.propertyIsEnumerable,mme=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fme(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||yme.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-pme(-e):pme(e);if(n!==e){var i=String(n),s=LV.call(t,i.length+1);return Qu.call(i,r,"$&_")+"."+Qu.call(Qu.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Qu.call(t,r,"$&_")}var NV=ome(),_me=NV.custom,hme=bme(_me)?_me:null;xme.exports=function e(t,r,n,i){var s=r||{};if(Yu(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Yu(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Yu(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Yu(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Yu(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Rme(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?fme(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return a?fme(t,l):l}var u=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return kV(t)?"[Array]":"[Object]";var p=Uot(s,n);if(typeof i>"u")i=[];else if(Eme(i,t)>=0)return"[Circular]";function d(M,k,H){if(k&&(i=Eot.call(i),i.push(k)),H){var Q={depth:s.depth};return Yu(s,"quoteStyle")&&(Q.quoteStyle=s.quoteStyle),e(M,Q,n+1,i)}return e(M,s,n+1,i)}if(typeof t=="function"&&!vme(t)){var f=Oot(t),m=nq(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(m.length>0?" { "+Pc.call(m,", ")+" }":"")}if(bme(t)){var v=Uf?Qu.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):jV.call(t);return typeof t=="object"&&!Uf?Iy(v):v}if(Fot(t)){for(var g="<"+ume.call(String(t.nodeName)),y=t.attributes||[],h=0;h<y.length;h++)g+=" "+y[h].name+"="+wme(Rot(y[h].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+ume.call(String(t.nodeName))+">",g}if(kV(t)){if(t.length===0)return"[]";var S=nq(t,d);return p&&!zot(S)?"["+MV(S,p)+"]":"[ "+Pc.call(S,", ")+" ]"}if(Aot(t)){var E=nq(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Sme.call(t,"cause")?"{ ["+String(t)+"] "+Pc.call(dme.call("[cause]: "+d(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Pc.call(E,", ")+" }"}if(typeof t=="object"&&o){if(hme&&typeof t[hme]=="function"&&NV)return NV(t,{depth:u-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(jot(t)){var N=[];return ame&&ame.call(t,function(M,k){N.push(d(k,t,!0)+" => "+d(M,t))}),gme("Map",iq.call(t),N,p)}if(Mot(t)){var C=[];return cme&&cme.call(t,function(M){C.push(d(M,t))}),gme("Set",sq.call(t),C,p)}if(Not(t))return TV("WeakMap");if(Dot(t))return TV("WeakSet");if(kot(t))return TV("WeakRef");if(Cot(t))return Iy(d(Number(t)));if(qot(t))return Iy(d(OV.call(t)));if(Iot(t))return Iy(got.call(t));if(Pot(t))return Iy(d(String(t)));if(!xot(t)&&!vme(t)){var j=nq(t,d),T=mme?mme(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",I=!T&&hs&&Object(t)===t&&hs in t?LV.call(Xu(t),8,-1):P?"Object":"",w=T||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",b=w+(I||P?"["+Pc.call(dme.call([],I||[],P||[]),": ")+"] ":"");return j.length===0?b+"{}":p?b+"{"+MV(j,p)+"}":b+"{ "+Pc.call(j,", ")+" }"}return String(t)};function wme(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Rot(e){return Qu.call(String(e),/"/g,""")}function kV(e){return Xu(e)==="[object Array]"&&(!hs||!(typeof e=="object"&&hs in e))}function xot(e){return Xu(e)==="[object Date]"&&(!hs||!(typeof e=="object"&&hs in e))}function vme(e){return Xu(e)==="[object RegExp]"&&(!hs||!(typeof e=="object"&&hs in e))}function Aot(e){return Xu(e)==="[object Error]"&&(!hs||!(typeof e=="object"&&hs in e))}function Pot(e){return Xu(e)==="[object String]"&&(!hs||!(typeof e=="object"&&hs in e))}function Cot(e){return Xu(e)==="[object Number]"&&(!hs||!(typeof e=="object"&&hs in e))}function Iot(e){return Xu(e)==="[object Boolean]"&&(!hs||!(typeof e=="object"&&hs in e))}function bme(e){if(Uf)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!jV)return!1;try{return jV.call(e),!0}catch{}return!1}function qot(e){if(!e||typeof e!="object"||!OV)return!1;try{return OV.call(e),!0}catch{}return!1}var Tot=Object.prototype.hasOwnProperty||function(e){return e in this};function Yu(e,t){return Tot.call(e,t)}function Xu(e){return yot.call(e)}function Oot(e){if(e.name)return e.name;var t=wot.call(Sot.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Eme(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function jot(e){if(!iq||!e||typeof e!="object")return!1;try{iq.call(e);try{sq.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Not(e){if(!qy||!e||typeof e!="object")return!1;try{qy.call(e,qy);try{Ty.call(e,Ty)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function kot(e){if(!lme||!e||typeof e!="object")return!1;try{return lme.call(e),!0}catch{}return!1}function Mot(e){if(!sq||!e||typeof e!="object")return!1;try{sq.call(e);try{iq.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Dot(e){if(!Ty||!e||typeof e!="object")return!1;try{Ty.call(e,Ty);try{qy.call(e,qy)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Fot(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Rme(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Rme(LV.call(e,0,t.maxStringLength),t)+n}var i=Qu.call(Qu.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Lot);return wme(i,"single",t)}function Lot(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+bot.call(t.toString(16))}function Iy(e){return"Object("+e+")"}function TV(e){return e+" { ? }"}function gme(e,t,r,n){var i=n?MV(r,n):Pc.call(r,", ");return e+" ("+t+") {"+i+"}"}function zot(e){for(var t=0;t<e.length;t++)if(Eme(e[t],`
|
|
353
|
+
WHERE cscv.component_set_web_path=$1 ${n}`;return(await this.executeQueryRaw(s,i)).map(a=>({componentName:a.component_name,version:a.version,displayName:a.display_name,description:a.description,icon:a.icon?a.icon:void 0,environmentVariables:a.env_vars}))}async getComponentByNameAndVersion(t,r){return await this.findOne({componentName:t,version:r})}async componentVersionExists(t,r){return await this.getComponentByNameAndVersion(t,r)!=null}async addComponentVersion(t,r,n,i,s){if(Ynt.test(r)===!1)throw new Error("ComponentVersion does not follow the semver convention. Component version must be in the form of major.minor.patch");return await this.create({componentName:t,version:r,description:i||"",displayName:n||"",icon:s})}};vI.ComponentVersionRepository=q5});var O5=A(gI=>{"use strict";Object.defineProperty(gI,"__esModule",{value:!0});gI.createComponentRepositories=void 0;var Qnt=$3(),Xnt=Yce(),Znt=Kue(),eit=w5(),tit=mde(),rit=P5(),nit=T5();function iit(e){return{component:new rit.ComponentRepository(e),componentVersion:new nit.ComponentVersionRepository(e),componentSet:new eit.ComponentSetRepository(e),componentSetComponentVersion:new Qnt.ComponentSetComponentVersionRepository(e),componentSetComponentVersionExcluded:new Xnt.ComponentSetComponentVersionExcludedRepository(e),componentSetComponentVersionEditable:new Znt.ComponentSetComponentVersionEditableRepository(e),componentSetRule:new tit.ComponentSetRuleRepository(e)}}gI.createComponentRepositories=iit});var _de=A(j5=>{"use strict";Object.defineProperty(j5,"__esModule",{value:!0});j5.default=["20220704054051_initial.sql","20220718172237_adding_component_sets.sql","20220728113941_add_env_vars_field.sql","20220817113300_removing_null_props_from_jsonb.sql","20223525103556_component_set_rule.sql","20221027151225_dummy.sql","20221117151200_add_detail_columns_to_component_version.js","20221220151200_add_required_to_manifests.js","20221222151200_add_required_to_manifests.js","20230111095522_update_environment_property.js","20230203084900_ensure_static_root_exists.js","20230210143300_lowercase_all_uri_names.js","20230217151212_component_set_component_version_updates.sql","20230218121212_add_component_set_rules.js"]});var vde=A(_f=>{"use strict";var sit=_f&&_f.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_f,"__esModule",{value:!0});_f.createConnectionManager=void 0;var hde=Cl(),oit=O5(),ait=sit(_de());async function cit(e,t,r){let n=await(0,hde.getConnectionInfo)(t);return new hde.ConnectionManager(e,n,r,ait.default,oit.createComponentRepositories)}_f.createConnectionManager=cit});var gde=A(jl=>{"use strict";var lit=jl&&jl.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),N5=jl&&jl.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&lit(t,e,r)};Object.defineProperty(jl,"__esModule",{value:!0});N5(Kce(),jl);N5(O5(),jl);N5(vde(),jl)});var hf=A(yI=>{"use strict";Object.defineProperty(yI,"__esModule",{value:!0});yI.ManifestValidationError=void 0;var k5=class extends Error{constructor(t,r){super(t),this.stack=r==null?void 0:r.stack,this.name="ManifestValidationError"}};yI.ManifestValidationError=k5});var M5=A(vf=>{"use strict";var uit=vf&&vf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vf,"__esModule",{value:!0});vf.getComponentFileSystemFolder=void 0;var dit=uit(require("path"));function pit(e,t){return dit.default.join(e,t)}vf.getComponentFileSystemFolder=pit});var wI=A(SI=>{"use strict";Object.defineProperty(SI,"__esModule",{value:!0});SI.getComponentName=void 0;function mit(e,t){return`${e}/${t}`}SI.getComponentName=mit});var yde=A(gf=>{"use strict";var fit=gf&&gf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gf,"__esModule",{value:!0});gf.moveFilesAndDirectories=void 0;var D5=fit(require("fs/promises"));async function _it(e,t){if(await hit(e)===!1)throw new Error(`Source directory "${e}" does not exist`);await D5.default.cp(e,t,{recursive:!0,force:!0}),await D5.default.rm(e,{recursive:!0,force:!0})}gf.moveFilesAndDirectories=_it;async function hit(e){try{return await D5.default.stat(e),!0}catch(t){if((t==null?void 0:t.code)==="ENOENT")return!1;throw t}}});var wde=A(Sf=>{"use strict";var Sde=Sf&&Sf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0});Sf.ComponentService=void 0;var io=Sde(require("path")),ja=Sde(pm()),Ec=Gr(),vit=hf(),Sy=M5(),yf=wI(),git=gc(),yit=yde(),F5=class{constructor(t,r,n,i){this.db=t,this.logger=r,this.dataMountPoint=n,this.manifestService=i}async getComponentVersionForWeb(t,r,n){await this.assertComponentVersionExists(r,t,n);let i=await this.db.repositories.componentVersion.findOne({componentName:(0,yf.getComponentName)(t,r),version:n});if(!i)throw new Ec.ResourceNotFoundError(`${t}/${r} ${n} could not be found`);let s=await this.db.repositories.componentSet.findAllSetsComponentVersionIsIn(t,r,n);return{namespace:t,name:r,version:n,description:i.description,displayName:i.displayName,icon:i.icon,sets:s.map(o=>({displayName:o.displayName,webPath:o.webPath}))}}async getComponentForWeb(t,r){let n=(0,yf.getComponentName)(t,r);if(await this.assertComponentExists(r,t),await this.db.repositories.component.componentExists(n)==!1)throw new Ec.ResourceNotFoundError(`${t}/${r} could not be found`);return{versions:(await this.db.repositories.componentVersion.find({componentName:n})).map(o=>({description:o.description,displayName:o.displayName,icon:o.icon,version:o.version}))}}async getPaginatedComponents(t=1,r=[],n="asc",i=20,s=null){let o=await this.db.repositories.componentVersion.getPaginatedMaxComponentVersion(t,r,n,i,s),a=[];for(let c of o.items){let l=(await this.db.repositories.componentSet.findAllSetsComponentIsIn(c.componentName)).map(u=>({displayName:u.displayName,webPath:u.webPath}));a.push({name:c.componentName,includedInSets:l.length,componentSets:l,latestVersion:{description:c.description,displayName:c.displayName,icon:c.icon,version:c.version}})}return{items:a,pageInfo:(0,Ec.getPageInfo)(t,o.pageSize,o.totalCount)}}async saveComponent(t){let r;try{let o=io.default.join(t,"manifest.json");r=await this.manifestService.readManifest(o),await this.manifestService.assertManifestIsValid(o,r.getModel(),{tempLocation:!0})}catch(o){if(o instanceof vit.ManifestValidationError||o instanceof git.SchemaValidationError){let a=new Ec.BadRequestError(o.message);throw a.stack=o.stack,a}else throw o}let n=r.getName(),i=r.getVersion();if(await this.componentVersionExists(n,i))throw new Ec.BadRequestError(`Component ${n} ${i} already exists`);let s=await this.getValidComponentDestinationPath(n,i);return await this.moveFilesAndUpdateDb(r,t,s),{name:n,version:i,manifest:r}}async componentVersionExists(t,r){return await this.db.repositories.componentVersion.getComponentByNameAndVersion(t,r)!==void 0}async deleteComponent(t,r){let n=(0,yf.getComponentName)(t,r),i=(0,Sy.getComponentFileSystemFolder)(t,r);this.assertValidComponentName(r,t),await this.assertComponentExists(r,t);let s=io.default.join(this.dataMountPoint,i);try{await this.db.repositories.componentVersion.delete({componentName:n})}catch(c){this.logger.error(c)}try{await this.db.repositories.component.delete({name:n})}catch(c){this.logger.error(c)}try{await ja.default.rm(s,{force:!0,recursive:!0})}catch(c){this.logger.error(c)}let o=await this.db.repositories.component.componentExists(n),a=await ja.default.pathExists(s);if(o)throw new Error(`failed to remove ${n} from DB`);if(a)throw new Error(`failed to remove ${n} files from the disk`)}async deleteComponentVersion(t,r,n){let i=(0,yf.getComponentName)(t,r),s=(0,Sy.getComponentFileSystemFolder)(t,r);this.assertValidComponentVersion(r,t,n),await this.assertComponentVersionExists(r,t,n);let o=io.default.join(this.dataMountPoint,s,n);try{await this.db.repositories.componentVersion.delete({componentName:i,version:n}),await ja.default.rm(o,{force:!0,recursive:!0})}catch(l){this.logger.error(l)}let a=await this.db.repositories.componentVersion.componentVersionExists(i,n),c=await ja.default.pathExists(o);if(a)throw new Error(`failed to remove ${i} from DB`);if(c)throw new Error(`failed to remove ${i} files from the disk`)}assertValidComponentName(t,r){let n=(0,Sy.getComponentFileSystemFolder)(r,t),i=io.default.resolve(this.dataMountPoint),s=io.default.join(this.dataMountPoint,n);if(io.default.resolve(this.dataMountPoint)+io.default.sep+n!==s||i===s)throw new Ec.ResourceNotFoundError(`component name ${n} is invalid`)}assertValidComponentVersion(t,r,n){let i=(0,Sy.getComponentFileSystemFolder)(r,t),s=io.default.join(io.default.resolve(this.dataMountPoint),i,n);if([io.default.resolve(this.dataMountPoint),i,n].join(io.default.sep)!==s)throw new Ec.ResourceNotFoundError(`Component version ${n} is invalid`)}async assertComponentExists(t,r){let n=(0,yf.getComponentName)(r,t),i=(0,Sy.getComponentFileSystemFolder)(r,t),s=io.default.join(this.dataMountPoint,i);if(!await this.db.repositories.component.componentExists(n)&&!await ja.default.pathExists(s))throw new Ec.ResourceNotFoundError(`Component ${n} not found`)}async assertComponentVersionExists(t,r,n){let i=(0,yf.getComponentName)(r,t);await this.assertComponentExists(t,r);let s=io.default.join(this.dataMountPoint,i,n);if(!await this.db.repositories.componentVersion.componentVersionExists(i,n)&&!await ja.default.pathExists(s))throw new Ec.ResourceNotFoundError(`Component version ${n} for component ${i} not found`)}async moveFilesAndUpdateDb(t,r,n){try{await(0,yit.moveFilesAndDirectories)(r,n)}catch(i){throw ja.default.rm(r,{force:!0,recursive:!0}),i}try{await ja.default.chmod(n,"755")}catch(i){throw ja.default.rm(n,{force:!0,recursive:!0}),i}try{await this.addComponentVersion(t)}catch(i){throw ja.default.rm(n,{force:!0,recursive:!0}),i}}async addComponentVersion(t){let r=t.getVersion(),n=t.getName(),{displayName:i,description:s,icon:o}=t.getModel();await this.db.repositories.component.componentExists(n)===!1&&await this.db.repositories.component.addComponent(n),await this.db.repositories.componentVersion.addComponentVersion(n,r,i,s,o)}async getValidComponentDestinationPath(t,r){let n=io.default.join(this.dataMountPoint,t,r);if(await ja.default.pathExists(n))throw new Ec.BadRequestError(`${t} version ${r} already exists and cannot be uploaded`);return n}};Sf.ComponentService=F5});var wy=A(Rc=>{"use strict";var Sit=Rc&&Rc.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rc,"__esModule",{value:!0});Rc.AbstractManifest=Rc.schemaVersionRegex=Rc.SCHEMA_VERSIONS=void 0;var wit=Sit(require("util")),bit=wI(),Eit=gc();Rc.SCHEMA_VERSIONS=Object.keys(Eit.MANIFEST_MODELS);Rc.schemaVersionRegex=/\/schemas\/(?<schema>v\d+)\.json#?$/;var L5=class{constructor(t){this.manifest=t}getNamespace(){return this.manifest.namespace}getName(){return(0,bit.getComponentName)(this.manifest.namespace,this.manifest.name)}getVersion(){return this.manifest.version}getInputSchemas(){return this.manifest.functions.map(t=>({name:t.name,schema:t.input})).filter(t=>!wit.default.isDeepStrictEqual(t.schema,{}))}};Rc.AbstractManifest=L5});var EI=A(bI=>{"use strict";Object.defineProperty(bI,"__esModule",{value:!0});bI.isValidManifestVersion=void 0;var Rit=wy();function xit(e){return typeof e=="string"?Rit.SCHEMA_VERSIONS.includes(e):!1}bI.isValidManifestVersion=xit});var U5=A(RI=>{"use strict";Object.defineProperty(RI,"__esModule",{value:!0});RI.getAndAssertManifestVersion=void 0;var bde=wy(),z5=hf(),Ait=EI();function Pit(e){var t;if(!e.$schema)throw new z5.ManifestValidationError("Could not determine manifest version. Your manifest must have a $schema property defined.");let r=bde.schemaVersionRegex.exec(e.$schema),n=(t=r==null?void 0:r.groups)===null||t===void 0?void 0:t.schema;if(n===void 0)throw new z5.ManifestValidationError("Could not determine manifest version from $schema value.");if((0,Ait.isValidManifestVersion)(n))return n;throw new z5.ManifestValidationError(`manifest version "${n}" isn't a valid version. Valid versions are "${bde.SCHEMA_VERSIONS.join('", "')}"`)}RI.getAndAssertManifestVersion=Pit});var V5=A(xI=>{"use strict";Object.defineProperty(xI,"__esModule",{value:!0});xI.getAndAssertJobManifestVersion=void 0;var $5=hf(),Cit=EI(),Iit=gc();function qit(e,t){var r;if(!e.$schema)throw new $5.ManifestValidationError("Could not determine manifest version. Your manifest must have a $schema property defined.");let n;t&&(n=t.exec(e.$schema));let i=(r=n==null?void 0:n.groups)===null||r===void 0?void 0:r.schema;if(i===void 0)throw new $5.ManifestValidationError("Could not determine manifest version from $schema value.");if((0,Cit.isValidManifestVersion)(i))return i;let o=Object.keys(Iit.MANIFEST_MODELS).filter(a=>a.includes("JobV"));throw new $5.ManifestValidationError(`manifest version "${i}" isn't a valid version. Valid versions are "${o.toString()}"`)}xI.getAndAssertJobManifestVersion=qit});var G5=A(wf=>{"use strict";var Rde=wf&&wf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wf,"__esModule",{value:!0});wf.ManifestV1=void 0;var Tit=wy(),Bu=Gr(),Nl=Rde(require("path")),Ede=pm(),Oit=Rde(require("fs/promises")),H5=class extends Tit.AbstractManifest{constructor(t,r){super(t),this.manifest=t,this.manifestPath=r}getSchemaVersion(){return"v1"}getModel(){return this.manifest}getComponentFunctionByName(t=""){let r=this.getModel();if(!t)if(r.mainFunction)t=r.mainFunction;else throw new Bu.ResourceNotFoundError("Component main function is not defined");let n=r.functions.find(i=>i.name===t);if(!n)throw new Bu.ResourceNotFoundError(`"${t}" function for ${this.getName()} ${this.getVersion()} could not be found`);return n}async getComponentFunctionEntryFilePath(t){let r=this.getComponentDirectory();return Nl.default.resolve(Nl.default.join(r,t.entry))}getComponentDirectory(){return Nl.default.resolve(Nl.default.join(this.manifestPath,".."))}async getManifestPath(){return this.manifestPath}getFunctionPreviewConfiguration(t,r){var n;let i=(n=this.manifest.previews)===null||n===void 0?void 0:n[t];if(i===void 0){let o;if(this.manifest.previews){let a=Object.keys(this.manifest.previews).join(", ");o=`Component has not defined preview with key "${t}", the defined preview keys for this component are "${a}"`}else o="Component has no previews defined";throw new Bu.ResourceNotFoundError(o)}return i.functionData[r.name]}async getFunctionPreviewData(t){var r;switch((r=t==null?void 0:t.inputData)===null||r===void 0?void 0:r.type){case"file":{let n=Nl.default.resolve(this.getComponentDirectory(),t.inputData.path);if(Nl.default.dirname(n).startsWith(this.getComponentDirectory())===!1)throw new Bu.BadRequestError(`Preview inputData file "${t.inputData.path}" is outside the component directory`);if(await(0,Ede.pathExists)(n)===!1)throw new Bu.BadRequestError(`Preview inputData file "${t.inputData.path}" does not exist`);return this.loadDataFromFile(n)}case"inline":return t.inputData.value;default:throw new Error("Unknown Preview Configuration Type")}}async getMockedUriObject(t){let r=this.manifest.mockedUris!==void 0?this.manifest.mockedUris[t]:void 0;if(r===void 0)throw new Bu.BadRequestError(`Mocked URI object "${t}" not defined in the manifest`);switch(r.type){case"file":{let n=Nl.default.resolve(this.getComponentDirectory(),r.path);if(Nl.default.dirname(n).startsWith(this.getComponentDirectory())===!1)throw new Bu.BadRequestError(`Mocked URI object file "${r.path}" is outside the component directory`);if(await(0,Ede.pathExists)(n)===!1)throw new Bu.BadRequestError(`Mocked URI object file "${r.path}" does not exist`);return this.loadDataFromFile(n)}case"inline":return r.value;default:throw new Error("Unknown Mocked URL object type")}}async loadDataFromFile(t){switch(Nl.default.extname(t)){case".json":{let r=await Oit.default.readFile(t,{encoding:"utf-8"});return JSON.parse(r)}case".js":return require(t);default:throw new Error("Unknown filetype to load data")}}};wf.ManifestV1=H5});var J5=A(bf=>{"use strict";var jit=bf&&bf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(bf,"__esModule",{value:!0});bf.JobManifestV1=void 0;var xde=Gr(),AI=jit(require("path")),B5=class{constructor(t,r){this.manifest=t,this.manifestPath=r}static getJobSchemaVersionRegex(){return/\/schemas\/(?<schema>JobV\d+)\.json#?$/}getSchemaVersion(){return"JobV1"}getModel(){return this.manifest}getJobFunctionByName(t=""){let r=this.getModel();if(!t)if(r.mainFunction)t=r.mainFunction;else throw new xde.ResourceNotFoundError("Job main function is not defined");let n=r.functions.find(i=>i.name===t);if(!n)throw new xde.ResourceNotFoundError(`"${t}" function for ${this.getName()} ${this.getVersion()} could not be found`);return n}async getJobFunctionEntryFilePath(t){let r=this.getJobDirectory();return AI.default.resolve(AI.default.join(r,t.entry))}getJobDirectory(){return AI.default.resolve(AI.default.join(this.manifestPath,".."))}getManifestPath(){return this.manifestPath}getName(){return this.manifest.name}getVersion(){return this.manifest.version}};bf.JobManifestV1=B5});var W5=A(PI=>{"use strict";Object.defineProperty(PI,"__esModule",{value:!0});PI.assertFuncEntryFilesAreValid=void 0;var Ade=Gr();async function Nit(e,t,r){if((0,Ade.isPathTryingToAccessOutsideOfRoot)(e,r.entry))throw new Error(`access to component "${r.name}'s" entry file "${r.entry}" outside the parent directory in "${t.name} ${t.version}" is not allowed`);if(!await(0,Ade.isReadable)(e,r.entry))throw new Error(`"${r.name}'s" entry file "${r.entry}" is inaccessible`)}PI.assertFuncEntryFilesAreValid=Nit});var K5=A(Ef=>{"use strict";var kit=Ef&&Ef.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.assertStaticFilesAreValid=void 0;var Mit=kit(require("path")),Pde=Gr();async function Dit(e,t,r,n){let i=Mit.default.join(e,n),s=r.output.staticFiles||[];for(let o of s){if(o.file.filepath.startsWith("http://")||o.file.filepath.startsWith("https://"))continue;if((0,Pde.isPathTryingToAccessOutsideOfRoot)(i,o.file.filepath))throw new Error(`access to a static file "${o.file.filepath}" for "${r.name}" outside the parent directory in "${t.name} ${t.version}" is not allowed`);if(!await(0,Pde.isReadable)(i,o.file.filepath))throw new Error(`"${r.name}'s" static file "${o.file.filepath}" is inaccessible`)}}Ef.assertStaticFilesAreValid=Dit});var Cde=A(CI=>{"use strict";Object.defineProperty(CI,"__esModule",{value:!0});CI.assertStaticFilesHaveAbsolutePath=void 0;async function Fit(e){let t=e.output.staticFiles||[];for(let r of t)if(!(r.file.filepath.startsWith("http://")||r.file.filepath.startsWith("https://")))throw new Error(`function ${e.name} defines static files but manifest has no staticFiles.locationRoot defined`)}CI.assertStaticFilesHaveAbsolutePath=Fit});var qI=A(II=>{"use strict";Object.defineProperty(II,"__esModule",{value:!0});II.ComponentSchemaValidationServiceFactory=void 0;var Rf=gc(),Y5=class{static create(){return new Rf.JSONSchemaService(new Rf.TypeResolver([Rf.SquizImageType,Rf.BaseFormattedTextType,Rf.SquizLinkType]),Rf.ManifestV1MetaSchema)}};II.ComponentSchemaValidationServiceFactory=Y5});var X5=A(TI=>{"use strict";Object.defineProperty(TI,"__esModule",{value:!0});TI.ComponentInputValidationServiceFactory=void 0;var xf=gc(),Q5=class{static create(){return new xf.JSONSchemaService(new xf.TypeResolver([xf.SquizImageType,xf.ComponentInputFormattedTextType,xf.SquizLinkType]),xf.ComponentInputMetaSchema)}};TI.ComponentInputValidationServiceFactory=Q5});var jI=A(Pf=>{"use strict";var Ode=Pf&&Pf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Pf,"__esModule",{value:!0});Pf.AbstractManifestService=void 0;var Af=Gr(),Ju=hf(),Ide=U5(),qde=V5(),Lit=G5(),Z5=J5(),zit=gc(),by=Ode(pm()),Tde=W5(),Uit=K5(),OI=Ode(require("path")),$it=Cde(),Vit=qI(),Hit=X5(),eV=class{constructor(t){this.logger=t,this.jsonValidationService=Vit.ComponentSchemaValidationServiceFactory.create(),this.inputValidationService=Hit.ComponentInputValidationServiceFactory.create(),this.jobValidationService=new zit.JsonValidationService}async loadManifest(t,r,n,i){let s;try{let o=await this.getManifestPath(t,r,n);return s=await this.readManifest(o),await this.assertManifestIsValid(o,s.getModel(),i),s}catch(o){if(o instanceof Af.ResourceNotFoundError){this.logger.error(o);let a=o;throw s===void 0&&(a=new Af.ResourceNotFoundError(`manifest for ${t}/${r} ${n} could not be found`)),a.stack=o.stack,a}throw o}}async readManifest(t){if(await by.default.pathExists(t)){let r=JSON.parse(await by.default.readFile(t,{encoding:"utf-8"}));return await this.assertManifestMeetsSchemaVersion(r),this.getManifest(r,t)}throw new Af.ResourceNotFoundError("manifest could not be found")}getManifest(t,r){let n=(0,Ide.getAndAssertManifestVersion)(t);if(n==="v1")return new Lit.ManifestV1(t,r);throw new Ju.ManifestValidationError(`Unsupported manifest schema version ${n}`)}async assertManifestIsValid(t,r,n){let i=this.getManifest(r,t),s;n&&"validateFunction"in n&&(s=i.getComponentFunctionByName(n.validateFunction)),this.assertThatMainFunctionExists(r),await this.assertStaticFileLocationNotOutsideOfRoot(t,r),await this.assertFuncEntryFilesAreValid(t,r,s),await this.assertStaticFilesAreValid(t,r,s),await this.assertPreviewDataIsValid(t,r,i,s),await this.assertMockedUriObjectsAreValid(t,r,i)}getJobManifest(t,r){let n=(0,qde.getAndAssertJobManifestVersion)(t,Z5.JobManifestV1.getJobSchemaVersionRegex());if(n==="JobV1")return new Z5.JobManifestV1(t,r);throw new Ju.ManifestValidationError(`Unsupported manifest schema version ${n}`)}async readJobManifest(t){if(await by.default.pathExists(t)){let r=JSON.parse(await by.default.readFile(t,{encoding:"utf-8"}));return await this.assertJobManifestMeetsSchemaVersion(r,Z5.JobManifestV1.getJobSchemaVersionRegex()),this.getJobManifest(r,t)}throw new Af.ResourceNotFoundError("manifest could not be found")}async assertPreviewDataIsValid(t,r,n,i=void 0){if(!r.previews)return;let s="";try{for(let[o,a]of Object.entries(r.previews)){s=o;for(let[c,l]of Object.entries(a.functionData)){let u=n.getComponentFunctionByName(c);if(i===void 0||i.name===u.name){let p=await n.getFunctionPreviewData(l);this.inputValidationService.validateInput(p,u.input)}}}}catch(o){if(o instanceof Error){let a=`Invalid preview data for preview "${s}": ${o.message}`;throw new Ju.ManifestValidationError(a,o)}throw o}}async assertMockedUriObjectsAreValid(t,r,n){if(r.mockedUris)try{for(let[i,s]of Object.entries(r.mockedUris)){let o=await n.getMockedUriObject(i)}}catch(i){throw i instanceof Error?new Ju.ManifestValidationError(i.message,i):i}}assertThatMainFunctionExists(t){if(!t.functions.find(r=>r.name===t.mainFunction))throw new Ju.ManifestValidationError(`"${t.name} ${t.version}" main function could not be found in function list`)}async assertStaticFileLocationNotOutsideOfRoot(t,r){var n;let i=OI.default.resolve(t,".."),s=(n=r.staticFiles)===null||n===void 0?void 0:n.locationRoot;if(s){if((0,Af.isPathTryingToAccessOutsideOfRoot)(i,s))throw new Error(`access to a static file locationRoot outside the parent directory in "${r.name} ${r.version}" is not allowed`);if(!await(0,Af.isReadable)(i,s))throw new Error(`static root ${s} from "${r.name} ${r.version}" is not accessible`)}}async assertStaticFilesAreValid(t,r,n=void 0){let i=OI.default.resolve(t,"..");n!==void 0&&await this.assertFunctionStaticFilesAreValid(n,r,i);for(let s of r.functions)await this.assertFunctionStaticFilesAreValid(s,r,i)}async assertFunctionStaticFilesAreValid(t,r,n){var i;let s=(i=r.staticFiles)===null||i===void 0?void 0:i.locationRoot;if(t.output.responseType==="html"){if(s===void 0&&t.output.staticFiles&&t.output.staticFiles.length>0)try{await(0,$it.assertStaticFilesHaveAbsolutePath)(t)}catch(o){throw o instanceof Error?new Ju.ManifestValidationError(o.message,o):o}else if(s)try{await(0,Uit.assertStaticFilesAreValid)(n,r,t,s)}catch(o){throw o instanceof Error?new Ju.ManifestValidationError(o.message,o):o}}}async assertFuncEntryFilesAreValid(t,r,n=void 0){let i=OI.default.resolve(t,"..");try{if(n!==void 0)await(0,Tde.assertFuncEntryFilesAreValid)(i,r,n);else for(let s of r.functions)await(0,Tde.assertFuncEntryFilesAreValid)(i,r,s)}catch(s){throw s instanceof Error?new Ju.ManifestValidationError(s.message,s):s}}async assertManifestMeetsSchemaVersion(t){(0,Ide.getAndAssertManifestVersion)(t),this.jsonValidationService.validateInput(t)}async assertJobManifestMeetsSchemaVersion(t,r){(0,qde.getAndAssertJobManifestVersion)(t,r),this.jobValidationService.validateManifest(t,"JobV1")}async isComponentDirectory(t){return by.default.pathExists(OI.default.join(t,"manifest.json"))}};Pf.AbstractManifestService=eV});var Nde=A(Cf=>{"use strict";var jde=Cf&&Cf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cf,"__esModule",{value:!0});Cf.ManifestServiceForDev=void 0;var tV=jde(require("path")),Git=jde(require("fs/promises")),Bit=jI(),Jit=Gr(),Wit=wI(),rV=class extends Bit.AbstractManifestService{constructor(t,r){super(r),this.componentMountPoint=t,this.logger=r,this.foundManifests=[]}async listAllComponentManifests(){return this.foundManifests.length===0&&(this.foundManifests=await this.recursivelyLookForManifests(this.componentMountPoint)),this.foundManifests.map(t=>t.manifest)}async getManifestPath(t,r,n){this.foundManifests.length===0&&(this.foundManifests=await this.recursivelyLookForManifests(this.componentMountPoint));let i=this.foundManifests.find(s=>s.manifest.getName()===(0,Wit.getComponentName)(t,r)&&s.manifest.getVersion()===n);if(i)return tV.default.join(i.directory,"manifest.json");throw new Jit.ResourceNotFoundError("manifest could not be found")}async recursivelyLookForManifests(t,r=10){if(await this.isComponentDirectory(t)){let o=await this.tryToReadManifest(tV.default.join(t,"manifest.json"));return o?[{directory:t,manifest:o}]:[]}if(r===0)return[];let i=(await Git.default.readdir(t,{withFileTypes:!0,encoding:"utf-8"})).filter(o=>o.isDirectory());return(await Promise.all(i.map(o=>this.recursivelyLookForManifests(tV.default.join(t,o.name),r-1)))).flat()}async tryToReadManifest(t){let r;try{r=await this.readManifest(t)}catch(n){if(n&&n.message)this.logger.warn(`found manifest ${t}, but failed schema validation because: ${n.message}`);else throw n}if(r)try{await this.assertManifestIsValid(t,r.getModel())}catch(n){if(n&&n.message)this.logger.warn(`found manifest ${t}, but failed to load manifest because: ${n.message}`);else throw n}return r}};Cf.ManifestServiceForDev=rV});var iV=A(NI=>{"use strict";Object.defineProperty(NI,"__esModule",{value:!0});NI.ManifestLocationError=void 0;var nV=class extends Error{constructor(t,r,n){super(t),this.manifest=r,this.stack=n==null?void 0:n.stack,this.name="ManifestLocationError"}};NI.ManifestLocationError=nV});var Dde=A(If=>{"use strict";var Mde=If&&If.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(If,"__esModule",{value:!0});If.ManifestServiceForProduction=void 0;var yp=Mde(require("path")),Ey=Mde(require("fs/promises")),Kit=jI(),kde=iV(),sV=class extends Kit.AbstractManifestService{constructor(t,r){super(r),this.componentMountPoint=t,this.logger=r}async listAllComponentManifests(){let t=await Ey.default.readdir(this.componentMountPoint,{encoding:"utf-8"}),r=[];for(let n of t){let i=yp.default.join(this.componentMountPoint,n);if((await Ey.default.stat(i)).isDirectory()){let s=await Ey.default.readdir(i,{encoding:"utf-8"});for(let o of s)try{let a=yp.default.join(i,o);if((await Ey.default.stat(a)).isDirectory()){let c=await Ey.default.readdir(a,{encoding:"utf-8"});for(let l of c){let u=yp.default.join(a,l);if(await this.isComponentDirectory(u))try{let p=yp.default.join(u,"manifest.json"),d=await this.readManifest(p);await this.assertManifestVersionIsTheSameAsFileSystemVersion(p,d.getModel()),r.push(d)}catch{}}}}catch{}}}return r}async assertManifestIsValid(t,r,n){await super.assertManifestIsValid(t,r,n),(n==null?void 0:n.tempLocation)!==!0&&await this.assertManifestVersionIsTheSameAsFileSystemVersion(t,r)}async getManifestPath(t,r,n){return yp.default.join(this.componentMountPoint,t,r,n,"manifest.json")}async assertManifestVersionIsTheSameAsFileSystemVersion(t,r){let n=this.getManifest(r,t),i=yp.default.join(n.getName(),n.getVersion(),"manifest.json");if(!t.endsWith(i)){let s=t.split(yp.default.sep).reverse(),o=s[1],a=s[3];throw o!==n.getVersion()?new kde.ManifestLocationError(`manifest version miss match, expected version ${o} but found ${n.getVersion()}`,r):new kde.ManifestLocationError(`manifest namespace miss match, expected namespace ${a} but found ${n.getNamespace()}`,r)}}};If.ManifestServiceForProduction=sV});var Lde=A((S2t,Fde)=>{"use strict";Fde.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)});var Hde=A((w2t,Vde)=>{"use strict";var $de="%[a-f0-9]{2}",zde=new RegExp("("+$de+")|([^%]+?)","gi"),Ude=new RegExp("("+$de+")+","gi");function oV(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],oV(r),oV(n))}function Yit(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(zde)||[],r=1;r<t.length;r++)e=oV(t,r).join(""),t=e.match(zde)||[];return e}}function Qit(e){for(var t={"%FE%FF":"\uFFFD\uFFFD","%FF%FE":"\uFFFD\uFFFD"},r=Ude.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch{var n=Yit(r[0]);n!==r[0]&&(t[r[0]]=n)}r=Ude.exec(e)}t["%C2"]="\uFFFD";for(var i=Object.keys(t),s=0;s<i.length;s++){var o=i[s];e=e.replace(new RegExp(o,"g"),t[o])}return e}Vde.exports=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Qit(e)}}});var Bde=A((b2t,Gde)=>{"use strict";Gde.exports=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];let r=e.indexOf(t);return r===-1?[e]:[e.slice(0,r),e.slice(r+t.length)]}});var Wde=A((E2t,Jde)=>{"use strict";Jde.exports=function(e,t){for(var r={},n=Object.keys(e),i=Array.isArray(t),s=0;s<n.length;s++){var o=n[s],a=e[o];(i?t.indexOf(o)!==-1:t(o,a,e))&&(r[o]=a)}return r}});var kI=A(so=>{"use strict";var Xit=Lde(),Zit=Hde(),Yde=Bde(),est=Wde(),tst=e=>e==null,aV=Symbol("encodeFragmentIdentifier");function rst(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let i=r.length;return n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Bn(t,e),"[",i,"]"].join("")]:[...r,[Bn(t,e),"[",Bn(i,e),"]=",Bn(n,e)].join("")]};case"bracket":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Bn(t,e),"[]"].join("")]:[...r,[Bn(t,e),"[]=",Bn(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,[Bn(t,e),":list="].join("")]:[...r,[Bn(t,e),":list=",Bn(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t=e.arrayFormat==="bracket-separator"?"[]=":"=";return r=>(n,i)=>i===void 0||e.skipNull&&i===null||e.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Bn(r,e),t,Bn(i,e)].join("")]:[[n,Bn(i,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>n===void 0||e.skipNull&&n===null||e.skipEmptyString&&n===""?r:n===null?[...r,Bn(t,e)]:[...r,[Bn(t,e),"=",Bn(n,e)].join("")]}}function nst(e){let t;switch(e.arrayFormat){case"index":return(r,n,i)=>{if(t=/\[(\d*)\]$/.exec(r),r=r.replace(/\[\d*\]$/,""),!t){i[r]=n;return}i[r]===void 0&&(i[r]={}),i[r][t[1]]=n};case"bracket":return(r,n,i)=>{if(t=/(\[\])$/.exec(r),r=r.replace(/\[\]$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"colon-list-separator":return(r,n,i)=>{if(t=/(:list)$/.exec(r),r=r.replace(/:list$/,""),!t){i[r]=n;return}if(i[r]===void 0){i[r]=[n];return}i[r]=[].concat(i[r],n)};case"comma":case"separator":return(r,n,i)=>{let s=typeof n=="string"&&n.includes(e.arrayFormatSeparator),o=typeof n=="string"&&!s&&kl(n,e).includes(e.arrayFormatSeparator);n=o?kl(n,e):n;let a=s||o?n.split(e.arrayFormatSeparator).map(c=>kl(c,e)):n===null?n:kl(n,e);i[r]=a};case"bracket-separator":return(r,n,i)=>{let s=/(\[\])$/.test(r);if(r=r.replace(/\[\]$/,""),!s){i[r]=n&&kl(n,e);return}let o=n===null?[]:n.split(e.arrayFormatSeparator).map(a=>kl(a,e));if(i[r]===void 0){i[r]=o;return}i[r]=[].concat(i[r],o)};default:return(r,n,i)=>{if(i[r]===void 0){i[r]=n;return}i[r]=[].concat(i[r],n)}}}function Qde(e){if(typeof e!="string"||e.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Bn(e,t){return t.encode?t.strict?Xit(e):encodeURIComponent(e):e}function kl(e,t){return t.decode?Zit(e):e}function Xde(e){return Array.isArray(e)?e.sort():typeof e=="object"?Xde(Object.keys(e)).sort((t,r)=>Number(t)-Number(r)).map(t=>e[t]):e}function Zde(e){let t=e.indexOf("#");return t!==-1&&(e=e.slice(0,t)),e}function ist(e){let t="",r=e.indexOf("#");return r!==-1&&(t=e.slice(r)),t}function epe(e){e=Zde(e);let t=e.indexOf("?");return t===-1?"":e.slice(t+1)}function Kde(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&typeof e=="string"&&e.trim()!==""?e=Number(e):t.parseBooleans&&e!==null&&(e.toLowerCase()==="true"||e.toLowerCase()==="false")&&(e=e.toLowerCase()==="true"),e}function tpe(e,t){t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t),Qde(t.arrayFormatSeparator);let r=nst(t),n=Object.create(null);if(typeof e!="string"||(e=e.trim().replace(/^[?#&]/,""),!e))return n;for(let i of e.split("&")){if(i==="")continue;let[s,o]=Yde(t.decode?i.replace(/\+/g," "):i,"=");o=o===void 0?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?o:kl(o,t),r(kl(s,t),o,n)}for(let i of Object.keys(n)){let s=n[i];if(typeof s=="object"&&s!==null)for(let o of Object.keys(s))s[o]=Kde(s[o],t);else n[i]=Kde(s,t)}return t.sort===!1?n:(t.sort===!0?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((i,s)=>{let o=n[s];return Boolean(o)&&typeof o=="object"&&!Array.isArray(o)?i[s]=Xde(o):i[s]=o,i},Object.create(null))}so.extract=epe;so.parse=tpe;so.stringify=(e,t)=>{if(!e)return"";t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t),Qde(t.arrayFormatSeparator);let r=o=>t.skipNull&&tst(e[o])||t.skipEmptyString&&e[o]==="",n=rst(t),i={};for(let o of Object.keys(e))r(o)||(i[o]=e[o]);let s=Object.keys(i);return t.sort!==!1&&s.sort(t.sort),s.map(o=>{let a=e[o];return a===void 0?"":a===null?Bn(o,t):Array.isArray(a)?a.length===0&&t.arrayFormat==="bracket-separator"?Bn(o,t)+"[]":a.reduce(n(o),[]).join("&"):Bn(o,t)+"="+Bn(a,t)}).filter(o=>o.length>0).join("&")};so.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);let[r,n]=Yde(e,"#");return Object.assign({url:r.split("?")[0]||"",query:tpe(epe(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:kl(n,t)}:{})};so.stringifyUrl=(e,t)=>{t=Object.assign({encode:!0,strict:!0,[aV]:!0},t);let r=Zde(e.url).split("?")[0]||"",n=so.extract(e.url),i=so.parse(n,{sort:!1}),s=Object.assign(i,e.query),o=so.stringify(s,t);o&&(o=`?${o}`);let a=ist(e.url);return e.fragmentIdentifier&&(a=`#${t[aV]?Bn(e.fragmentIdentifier,t):e.fragmentIdentifier}`),`${r}${o}${a}`};so.pick=(e,t,r)=>{r=Object.assign({parseFragmentIdentifier:!0,[aV]:!1},r);let{url:n,query:i,fragmentIdentifier:s}=so.parseUrl(e,r);return so.stringifyUrl({url:n,query:est(i,t),fragmentIdentifier:s},r)};so.exclude=(e,t,r)=>{let n=Array.isArray(t)?i=>!t.includes(i):(i,s)=>!t(i,s);return so.pick(e,n,r)}});var cV=A(qf=>{"use strict";var sst=qf&&qf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(qf,"__esModule",{value:!0});qf.convertFunctionStaticFilesToFqdn=void 0;var ost=Gr(),ast=sst(kI());function cst(e,t,r,n,i){if(t.startsWith("https://")||t.startsWith("http://"))return t;let s=(0,ost.joinAbsoluteUrlPath)(e,"s",n,i,t);return ast.default.stringifyUrl({url:s,query:{_componentSet:r}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})}qf.convertFunctionStaticFilesToFqdn=cst});var rpe=A(Tf=>{"use strict";var lst=Tf&&Tf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Tf,"__esModule",{value:!0});Tf.convertFunctionStaticFilesToFqdnForPreview=void 0;var ust=Gr(),dst=lst(kI());function pst(e,t,r,n,i){if(t.startsWith("https://")||t.startsWith("http://"))return t;let s=(0,ust.joinAbsoluteUrlPath)(e,"s",r,n,t);return dst.default.stringifyUrl({url:s,query:{_previewKey:i}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})}Tf.convertFunctionStaticFilesToFqdnForPreview=pst});var ipe=A(MI=>{"use strict";Object.defineProperty(MI,"__esModule",{value:!0});MI.ComponentFunctionService=void 0;var lV=Gr(),npe=cV(),mst=rpe(),fst=qI(),_st=X5(),uV=class{constructor(t){this.rootUrl=t,this.schemaValidationService=fst.ComponentSchemaValidationServiceFactory.create(),this.inputValidationService=_st.ComponentInputValidationServiceFactory.create()}getFunctionDefinitionFromManifest(t,r){return r.getModel().functions.find(i=>i.name===t)}prepareComponentFunctionForWebResponse(t,r,n){var i;return t.output.responseType==="html"&&(t.output.staticFiles=(i=t.output.staticFiles)===null||i===void 0?void 0:i.map(s=>({...s,file:{...s.file,filepath:(0,npe.convertFunctionStaticFilesToFqdn)(this.rootUrl,s.file.filepath,n,r.getName(),r.getVersion())}}))),t}prepareManifestForWebResponse(t,r){let n=t.getModel(),i={...n,functions:[]};for(let s of n.functions)if(s.output.responseType==="html"&&s.output.staticFiles){let o={...s,output:{...s.output,staticFiles:s.output.staticFiles.map(a=>({...a,file:{...a.file,filepath:(0,npe.convertFunctionStaticFilesToFqdn)(this.rootUrl,a.file.filepath,r,t.getName(),t.getVersion())}}))}};i.functions.push(o)}else i.functions.push(s);return i}prepareComponentFunctionForPreview(t,r,n){var i;return t.output.responseType==="html"&&(t.output.staticFiles=(i=t.output.staticFiles)===null||i===void 0?void 0:i.map(s=>({...s,file:{...s.file,filepath:(0,mst.convertFunctionStaticFilesToFqdnForPreview)(this.rootUrl,s.file.filepath,r.getName(),r.getVersion(),n)}}))),t}prepareManifestForPreview(t,r){let n=t.getModel(),i={...n,functions:[]};for(let s of n.functions){let o=this.prepareComponentFunctionForPreview(s,t,r);i.functions.push(o)}return i}assertInputValidForComponentFunction(t,r){if(t===void 0)throw new lV.BadRequestError(`input value for ${r.name} cannot be undefined`);this.schemaValidationService.validateInput(t,r.input)}assertRenderInputValidForComponentFunction(t,r){if(t===void 0)throw new lV.BadRequestError(`input value for ${r.name} cannot be undefined`);this.inputValidationService.validateInput(t,r.input)}assertOutputValidForComponentFunction(t,r){if(r===void 0)throw new Error(`input value for ${r} cannot be undefined`);if(t===void 0)throw new Error(`input value for ${r.name} cannot be undefined`);let n=this.getOutputValidationSchema(r.output);this.schemaValidationService.validateInput(t,n)}getOutputValidationSchema(t){let r=t.responseType;switch(r){case"html":return{type:"string",minLength:0};case"json":{let n=t;if(n.definition)return n.definition;throw new Error("definition is missing for the json")}default:(0,lV.never)(r)}}};MI.ComponentFunctionService=uV});var spe=A(DI=>{"use strict";Object.defineProperty(DI,"__esModule",{value:!0});DI.JobFunctionService=void 0;var hst=Gr(),vst=qI(),dV=class{constructor(){this.schemaValidationService=vst.ComponentSchemaValidationServiceFactory.create()}assertInputValidForJobFunction(t,r){if(t===void 0)throw new hst.BadRequestError(`input value for ${r.name} cannot be undefined`);this.schemaValidationService.validateInput(t,r.input)}};DI.JobFunctionService=dV});var pV=A(jn=>{"use strict";var gst=jn&&jn.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),_s=jn&&jn.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&gst(t,e,r)};Object.defineProperty(jn,"__esModule",{value:!0});_s(jI(),jn);_s(Nde(),jn);_s(Dde(),jn);_s(ipe(),jn);_s(spe(),jn);_s(W5(),jn);_s(K5(),jn);_s(U5(),jn);_s(V5(),jn);_s(EI(),jn);_s(wy(),jn);_s(L3(),jn);_s(G5(),jn);_s(J5(),jn);_s(iV(),jn);_s(hf(),jn)});var ope=A(FI=>{"use strict";Object.defineProperty(FI,"__esModule",{value:!0});FI.ComponentContentUriResolverForPreview=void 0;var yst=pV(),mV=class{constructor(t,r){this.manifest=t,this.manifestService=new yst.ManifestV1(t,r??"")}async resolveUri(t){return await this.manifestService.getMockedUriObject(t)}};FI.ComponentContentUriResolverForPreview=mV});var cpe=A(ape=>{"use strict";Object.defineProperty(ape,"__esModule",{value:!0})});var upe=A(lpe=>{"use strict";Object.defineProperty(lpe,"__esModule",{value:!0})});var ppe=A(dpe=>{"use strict";Object.defineProperty(dpe,"__esModule",{value:!0})});var mpe=A(Of=>{"use strict";var Sst=Of&&Of.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Of,"__esModule",{value:!0});Of.createComponentContextualFunctions=void 0;var LI=Sst(kI()),Ry=Gr(),wst=require("crypto");function bst(e){let t=(0,Ry.joinAbsoluteUrlPath)(e.rootUrl,"r",e.componentName,e.manifest.version),r=(0,Ry.joinAbsoluteUrlPath)(e.rootUrl,"s",e.componentName,e.manifest.version);return{getStaticResourceUrl:n=>{if(typeof n!="string")throw new Error("getStaticResourceUrl: first argument must be a string");let i=(0,Ry.joinAbsoluteUrlPath)(r,n).split("?")[0];return e.withPreviewKey?LI.default.stringifyUrl({url:i,query:{_previewKey:e.withPreviewKey}},{skipNull:!0,encode:!0,arrayFormat:"bracket"}):LI.default.stringifyUrl({url:i,query:{_componentSet:e.set.webPath}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})},getFunctionUrl:(n,i={})=>{if(typeof n!="string")throw new Error("getFunctionUrl: first argument must be a string");return n=n.toLowerCase(),e.withPreviewKey?LI.default.stringifyUrl({url:(0,Ry.joinAbsoluteUrlPath)(t,n),query:{...i,_previewKey:e.withPreviewKey}},{skipNull:!0,encode:!0,arrayFormat:"bracket"}):LI.default.stringifyUrl({url:(0,Ry.joinAbsoluteUrlPath)(t,n),query:{...i,_componentSet:e.set.webPath}},{skipNull:!0,encode:!0,arrayFormat:"bracket"})},resolveUri:async n=>{if(typeof n!="string")throw new Error("resolveUri: first argument must be a string");if(e.requestId===void 0)throw new Error("resolveUri: request id is undefined");let i=(0,wst.randomUUID)();return e.webRequestEvents.emit("uri-request",n,e.requestId,i),await new Promise((o,a)=>{let c=(l,u,p)=>{i==p&&(e.webRequestEvents.removeListener("uri-response",c),l.status==="fulfilled"&&o(l.value),l.status==="rejected"&&a(l.reason))};e.webRequestEvents.on("uri-response",c)})}}}Of.createComponentContextualFunctions=bst});var fpe=A(zI=>{"use strict";Object.defineProperty(zI,"__esModule",{value:!0});zI.ComponentError=void 0;var Est=Gr(),fV=class extends Est.ErrorWithHttpStatusCode{constructor(t,r,n,i,s,o,a=500){super(a,(r==null?void 0:r.message)||"An error occurred with no additional information available"),this.requestId=t,this.error=r,this.functionName=n,this.componentName=i,this.componentVersion=s,this.setWebPath=o,this.name="ComponentError",this.stack=r==null?void 0:r.stack}};zI.ComponentError=fV});var _pe=A(UI=>{"use strict";Object.defineProperty(UI,"__esModule",{value:!0});UI.JobError=void 0;var Rst=Gr(),_V=class extends Rst.ErrorWithHttpStatusCode{constructor(t,r,n,i,s,o=500){super(o,(r==null?void 0:r.message)||"An error occurred with no additional information available"),this.requestId=t,this.error=r,this.functionName=n,this.jobName=i,this.jobVersion=s,this.name="JobError",this.stack=r==null?void 0:r.stack}};UI.JobError=_V});var hpe=A(Si=>{"use strict";var xst=Si&&Si.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),To=Si&&Si.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&xst(t,e,r)};Object.defineProperty(Si,"__esModule",{value:!0});To(x5(),Si);To(I5(),Si);To(P5(),Si);To(T5(),Si);To(wde(),Si);To(ope(),Si);To(cpe(),Si);To(upe(),Si);To(ppe(),Si);To(mpe(),Si);To(fpe(),Si);To(_pe(),Si);To(M5(),Si)});var vpe=A(xy=>{"use strict";Object.defineProperty(xy,"__esModule",{value:!0});xy.JOB_EXECUTION_STATUS=void 0;var Ast;(function(e){e.queued="queued",e.terminated="terminated",e.successfullyCompleted="successfully-completed",e.running="running",e.errored="errored"})(Ast=xy.JOB_EXECUTION_STATUS||(xy.JOB_EXECUTION_STATUS={}))});var gpe=A(Sp=>{"use strict";var Pst=Sp&&Sp.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Cst=Sp&&Sp.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Pst(t,e,r)};Object.defineProperty(Sp,"__esModule",{value:!0});Cst(vpe(),Sp)});var ype=A($I=>{"use strict";Object.defineProperty($I,"__esModule",{value:!0});$I.ContentItemService=void 0;var hV=class{constructor(t){this.api=t}async getContentItem(t,r){var n;try{let i={};return r&&(i["x-api-key"]=r),(await this.api.getContentItem(t,{resolveDynamicContent:!0},{headers:i})).data.content}catch(i){let s=i;if(((n=s.response)===null||n===void 0?void 0:n.status)===404)return;throw this.handleAxiosError(s)}}handleAxiosError(t){var r;let{response:n}=t;if(!n||typeof t=="object"&&!t.isAxiosError)return t;throw new Error(`Error occurred in Component Content Item service: ${(r=n.data)===null||r===void 0?void 0:r.message}`)}};$I.ContentItemService=hV});var gV=A(oo=>{"use strict";var Ist=oo&&oo.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oo,"__esModule",{value:!0});oo.Api=oo.HttpClient=oo.ContentType=oo.ContentSchemaType=void 0;var qst;(function(e){e.Component="component",e.User="user"})(qst=oo.ContentSchemaType||(oo.ContentSchemaType={}));var Tst=Ist(require("axios")),Na;(function(e){e.Json="application/json",e.FormData="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Text="text/plain"})(Na=oo.ContentType||(oo.ContentType={}));var VI=class{constructor({securityWorker:t,secure:r,format:n,...i}={}){this.securityData=null,this.setSecurityData=s=>{this.securityData=s},this.request=async({secure:s,path:o,type:a,query:c,format:l,body:u,...p})=>{let d=(typeof s=="boolean"?s:this.secure)&&this.securityWorker&&await this.securityWorker(this.securityData)||{},f=this.mergeRequestParams(p,d),m=l||this.format||void 0;return a===Na.FormData&&u&&u!==null&&typeof u=="object"&&(u=this.createFormData(u)),a===Na.Text&&u&&u!==null&&typeof u!="string"&&(u=JSON.stringify(u)),this.instance.request({...f,headers:{...f.headers||{},...a&&a!==Na.FormData?{"Content-Type":a}:{}},params:c,responseType:m,data:u,url:o})},this.instance=Tst.default.create({...i,baseURL:i.baseURL||"/"}),this.secure=r,this.format=n,this.securityWorker=t}mergeRequestParams(t,r){let n=t.method||r&&r.method;return{...this.instance.defaults,...t,...r||{},headers:{...n&&this.instance.defaults.headers[n.toLowerCase()]||{},...t.headers||{},...r&&r.headers||{}}}}stringifyFormItem(t){return typeof t=="object"&&t!==null?JSON.stringify(t):`${t}`}createFormData(t){return Object.keys(t||{}).reduce((r,n)=>{let i=t[n],s=i instanceof Array?i:[i];for(let o of s){let a=o instanceof Blob||o instanceof File;r.append(n,a?o:this.stringifyFormItem(o))}return r},new FormData)}};oo.HttpClient=VI;var vV=class extends VI{constructor(){super(...arguments),this.getRoot=(t={})=>this.request({path:"/",method:"GET",...t}),this.contentItem={createContentItem:(t,r,n={})=>this.request({path:"/content-item",method:"POST",query:r,body:t,secure:!0,type:Na.Json,...n}),getPaginatedContentItems:(t,r={})=>this.request({path:"/content-item",method:"GET",query:t,secure:!0,format:"json",...r}),updateContentItem:(t,r,n={})=>this.request({path:`/content-item/${t}`,method:"PATCH",body:r,secure:!0,type:Na.Json,format:"json",...n}),getContentItem:(t,r,n={})=>this.request({path:`/content-item/${t}`,method:"GET",query:r,secure:!0,format:"json",...n}),deleteContentItemById:(t,r={})=>this.request({path:`/content-item/${t}`,method:"DELETE",secure:!0,format:"json",...r})},this.contentSchema={createContentSchema:(t,r={})=>this.request({path:"/content-schema",method:"POST",body:t,secure:!0,type:Na.Json,format:"json",...r}),getPaginatedContentSchemas:(t,r={})=>this.request({path:"/content-schema",method:"GET",query:t,secure:!0,format:"json",...r}),getContentSchemaSchema:(t,r={})=>this.request({path:"/content-schema/{schemaName*.json}",method:"GET",secure:!0,format:"json",...r}),getContentSchema:(t,r={})=>this.request({path:"/content-schema/{schemaName*}",method:"GET",secure:!0,format:"json",...r}),updateContentSchema:(t={})=>this.request({path:"/content-schema/{schemaName*}",method:"PATCH",secure:!0,...t}),deleteContentSchema:(t,r={})=>this.request({path:"/content-schema/{schemaName*}",method:"DELETE",secure:!0,format:"json",...r})},this.health={getHealthInfo:(t={})=>this.request({path:"/health",method:"GET",format:"json",...t})},this.dynamicContent={getDynamicContentItem:(t,r={})=>this.request({path:"/dynamic-content",method:"GET",query:t,secure:!0,format:"json",...r})},this.matrixQuery={getPaginatedAssets:(t,r,n={})=>this.request({path:`/matrix-query/${t}`,method:"GET",query:r,secure:!0,format:"json",...n}),getAsset:(t,r,n={})=>this.request({path:`/matrix-query/${t}/asset`,method:"GET",query:r,secure:!0,format:"json",...n})},this.pageContents={createPageContents:(t,r={})=>this.request({path:"/page-contents",method:"POST",body:t,secure:!0,type:Na.Json,...r}),updateContentItem:(t,r,n={})=>this.request({path:`/page-contents/${t}`,method:"PATCH",body:r,secure:!0,type:Na.Json,format:"json",...n}),getPageContents:(t,r={})=>this.request({path:`/page-contents/${t}`,method:"GET",secure:!0,format:"json",...r}),deletePageContents:(t,r={})=>this.request({path:`/page-contents/${t}`,method:"DELETE",secure:!0,format:"json",...r})},this.settings={getMatrixIdentifiers:(t={})=>this.request({path:"/settings/matrix-identifiers",method:"GET",secure:!0,format:"json",...t}),createMatrixIdentifier:(t,r={})=>this.request({path:"/settings/matrix-identifiers",method:"POST",body:t,secure:!0,type:Na.Json,format:"json",...r}),updateMatrixIdentifier:(t,r,n={})=>this.request({path:`/settings/matrix-identifiers/${t}`,method:"PATCH",body:r,secure:!0,type:Na.Json,format:"json",...n}),getMatrixIdentifier:(t,r={})=>this.request({path:`/settings/matrix-identifiers/${t}`,method:"GET",secure:!0,format:"json",...r}),deleteMatrixIdentifier:(t,r={})=>this.request({path:`/settings/matrix-identifiers/${t}`,method:"DELETE",secure:!0,...r})}}};oo.Api=vV});var Spe=A(oa=>{"use strict";var Ost=oa&&oa.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),jst=oa&&oa.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Nst=oa&&oa.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ost(t,e,r);return jst(t,e),t};Object.defineProperty(oa,"__esModule",{value:!0});oa.ContentApi=oa.ContentApiService=void 0;var kst=gV();Object.defineProperty(oa,"ContentApiService",{enumerable:!0,get:function(){return kst.Api}});oa.ContentApi=Nst(gV())});var yV=A(HI=>{"use strict";Object.defineProperty(HI,"__esModule",{value:!0});HI.getContentSchemaName=void 0;function Mst(e,t,r){return[e,t,r].join("/")}HI.getContentSchemaName=Mst});var wpe=A(GI=>{"use strict";Object.defineProperty(GI,"__esModule",{value:!0});GI.ComponentContentSchemaService=void 0;var Dst=Spe(),Fst=yV(),SV=class{constructor(t){this.api=t}async createComponentContentSchemas(t,r){let n=t.getInputSchemas();for(let i of n)if(i.schema&&Object.keys(i.schema).length){let s=(0,Fst.getContentSchemaName)(t.getName(),t.getVersion(),i.name);await this.createContentSchema(s,i.schema,r)}}async createContentSchema(t,r,n){try{let i={"Content-Type":"application/json"};n&&(i.authorization=n),await this.api.createContentSchema({contentSchemaType:Dst.ContentApi.ContentSchemaType.Component,schema:r,name:t},{headers:i})}catch(i){throw this.handleAxiosError(i)}}handleAxiosError(t){var r;let{response:n}=t;if(!n||typeof t=="object"&&!t.isAxiosError)return t;throw new Error(`Error occurred when creating content schema: ${(r=n.data)===null||r===void 0?void 0:r.message}`)}};GI.ComponentContentSchemaService=SV});var bpe=A(BI=>{"use strict";Object.defineProperty(BI,"__esModule",{value:!0});BI.DynamicContentItemService=void 0;var wV=class{constructor(t){this.api=t}async getDynamicContentItem(t,r){try{let n={};return r&&(n["x-api-key"]=r),(await this.api.getDynamicContentItem({_contentUri:t},{headers:n})).data}catch(n){let i=n;throw this.handleAxiosError(i)}}handleAxiosError(t){var r;let{response:n}=t;if(!n||typeof t=="object"&&!t.isAxiosError)return t;throw new Error(`Error occurred when resolving content from uri: ${(r=n.data)===null||r===void 0?void 0:r.message}`)}};BI.DynamicContentItemService=wV});var Epe=A(xc=>{"use strict";var Lst=xc&&xc.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),JI=xc&&xc.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Lst(t,e,r)};Object.defineProperty(xc,"__esModule",{value:!0});JI(ype(),xc);JI(wpe(),xc);JI(bpe(),xc);JI(yV(),xc)});var Rpe=A(wp=>{"use strict";var zst=wp&&wp.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Ust=wp&&wp.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&zst(t,e,r)};Object.defineProperty(wp,"__esModule",{value:!0});Ust(cV(),wp)});var Ape=A(Nf=>{"use strict";var xpe=Nf&&Nf.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Nf,"__esModule",{value:!0});Nf.ComponentFixture=void 0;var jf=xpe(require("fs/promises")),Oo=xpe(require("path")),$st=require("crypto"),Vst=require("child_process"),Hst="some-namespace",Ay=class{static async setupFullComponentDirectory(t,{raw:r=!1}={}){let n=await this.createFixtureDirectory(),{directory:i,version:s}=await this.createVersionDirectory(n),o=await this.createManifest(i,{version:s,staticFilesRoot:"static"});return await jf.default.writeFile(Oo.default.join(i,"main.js"),Gst(t,{raw:r})),await jf.default.mkdir(Oo.default.join(i,"static")),await jf.default.writeFile(Oo.default.join(i,"static","static.txt"),"hello"),{fixtureDirectory:n,componentDirectory:i,version:s,manifest:o,componentName:Oo.default.basename(n)}}static async createFixtureDirectory(){let t=Bst(),r=Oo.default.join(this.fixtureRootDirectory,t);return await jf.default.mkdir(r,{recursive:!0}),r}static async createVersionDirectory(t){let r="1.0.1",n=Oo.default.join(t,r);return await jf.default.mkdir(n),{directory:n,version:r}}static async createManifest(t,r={}){var n,i,s,o;let c={$schema:"http://localhost:3000/schemas/v1.json#",name:Oo.default.basename(t)===r.version?Oo.default.basename(Oo.default.dirname(t)):Oo.default.basename(t),namespace:this.namespace,displayName:"some-display-name",description:"some-description",version:(n=r.version)!==null&&n!==void 0?n:"1.0.0",mainFunction:(i=r.mainFunction)!==null&&i!==void 0?i:"main",functions:[{name:(s=r.mainFunction)!==null&&s!==void 0?s:"main",entry:((o=r.mainFunction)!==null&&o!==void 0?o:"main")+".js",input:{},output:{responseType:"html"}}]};return r.staticFilesRoot&&(c.staticFiles={locationRoot:r.staticFilesRoot}),await jf.default.writeFile(Oo.default.join(t,"manifest.json"),JSON.stringify(c)),c}};Nf.ComponentFixture=Ay;Ay.fixtureRootDirectory=Oo.default.join(Jst(),"fixtures");Ay.namespace=Hst;function Gst(e,{raw:t=!1}={}){return t?`module.exports = (input, info) => ${e}`:typeof e=="string"?`module.exports = () => "${e}"`:`module.exports = () => JSON.parse(${JSON.stringify(e)})`}function Bst(){return"test-"+(0,$st.randomUUID)()}function Jst(){var e;if(process.env.NODE_ENV!=="test")return(e=process.env.DATA_MOUNT_POINT)!==null&&e!==void 0?e:"";let t=(0,Vst.execSync)("git rev-parse --show-toplevel",{encoding:"utf-8"}).replace(/\n$/,"");return Oo.default.resolve(t,"test-components")}});var WI=A(ai=>{"use strict";var Ppe=ai&&ai.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),Wst=ai&&ai.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Wu=ai&&ai.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Ppe(t,e,r)},Kst=ai&&ai.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&Ppe(t,e,r);return Wst(t,e),t};Object.defineProperty(ai,"__esModule",{value:!0});ai.TestHelpers=void 0;Wu(L3(),ai);Wu(gde(),ai);Wu(S5(),ai);Wu(hpe(),ai);Wu(gpe(),ai);Wu(Epe(),ai);Wu(Rpe(),ai);Wu(pV(),ai);ai.TestHelpers=Kst(Ape())});var kpe=A((r9t,Npe)=>{"use strict";Npe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}});var Fpe=A((n9t,Dpe)=>{"use strict";var Mpe=typeof Symbol<"u"&&Symbol,Qst=kpe();Dpe.exports=function(){return typeof Mpe!="function"||typeof Symbol!="function"||typeof Mpe("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Qst()}});var zpe=A((i9t,Lpe)=>{"use strict";var Xst="Function.prototype.bind called on incompatible ",RV=Array.prototype.slice,Zst=Object.prototype.toString,eot="[object Function]";Lpe.exports=function(t){var r=this;if(typeof r!="function"||Zst.call(r)!==eot)throw new TypeError(Xst+r);for(var n=RV.call(arguments,1),i,s=function(){if(this instanceof i){var u=r.apply(this,n.concat(RV.call(arguments)));return Object(u)===u?u:this}else return r.apply(t,n.concat(RV.call(arguments)))},o=Math.max(0,r.length-n.length),a=[],c=0;c<o;c++)a.push("$"+c);if(i=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var l=function(){};l.prototype=r.prototype,i.prototype=new l,l.prototype=null}return i}});var XI=A((s9t,Upe)=>{"use strict";var tot=zpe();Upe.exports=Function.prototype.bind||tot});var Vpe=A((o9t,$pe)=>{"use strict";var rot=XI();$pe.exports=rot.call(Function.call,Object.prototype.hasOwnProperty)});var tq=A((a9t,Wpe)=>{"use strict";var gr,Lf=SyntaxError,Jpe=Function,Ff=TypeError,xV=function(e){try{return Jpe('"use strict"; return ('+e+").constructor;")()}catch{}},bp=Object.getOwnPropertyDescriptor;if(bp)try{bp({},"")}catch{bp=null}var AV=function(){throw new Ff},not=bp?function(){try{return arguments.callee,AV}catch{try{return bp(arguments,"callee").get}catch{return AV}}}():AV,Mf=Fpe()(),Ac=Object.getPrototypeOf||function(e){return e.__proto__},Df={},iot=typeof Uint8Array>"u"?gr:Ac(Uint8Array),Ep={"%AggregateError%":typeof AggregateError>"u"?gr:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?gr:ArrayBuffer,"%ArrayIteratorPrototype%":Mf?Ac([][Symbol.iterator]()):gr,"%AsyncFromSyncIteratorPrototype%":gr,"%AsyncFunction%":Df,"%AsyncGenerator%":Df,"%AsyncGeneratorFunction%":Df,"%AsyncIteratorPrototype%":Df,"%Atomics%":typeof Atomics>"u"?gr:Atomics,"%BigInt%":typeof BigInt>"u"?gr:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?gr:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?gr:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?gr:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?gr:Float32Array,"%Float64Array%":typeof Float64Array>"u"?gr:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?gr:FinalizationRegistry,"%Function%":Jpe,"%GeneratorFunction%":Df,"%Int8Array%":typeof Int8Array>"u"?gr:Int8Array,"%Int16Array%":typeof Int16Array>"u"?gr:Int16Array,"%Int32Array%":typeof Int32Array>"u"?gr:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Mf?Ac(Ac([][Symbol.iterator]())):gr,"%JSON%":typeof JSON=="object"?JSON:gr,"%Map%":typeof Map>"u"?gr:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Mf?gr:Ac(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?gr:Promise,"%Proxy%":typeof Proxy>"u"?gr:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?gr:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?gr:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Mf?gr:Ac(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?gr:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Mf?Ac(""[Symbol.iterator]()):gr,"%Symbol%":Mf?Symbol:gr,"%SyntaxError%":Lf,"%ThrowTypeError%":not,"%TypedArray%":iot,"%TypeError%":Ff,"%Uint8Array%":typeof Uint8Array>"u"?gr:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?gr:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?gr:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?gr:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?gr:WeakMap,"%WeakRef%":typeof WeakRef>"u"?gr:WeakRef,"%WeakSet%":typeof WeakSet>"u"?gr:WeakSet};try{null.error}catch(e){Hpe=Ac(Ac(e)),Ep["%Error.prototype%"]=Hpe}var Hpe,sot=function e(t){var r;if(t==="%AsyncFunction%")r=xV("async function () {}");else if(t==="%GeneratorFunction%")r=xV("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=xV("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&(r=Ac(i.prototype))}return Ep[t]=r,r},Gpe={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Cy=XI(),ZI=Vpe(),oot=Cy.call(Function.call,Array.prototype.concat),aot=Cy.call(Function.apply,Array.prototype.splice),Bpe=Cy.call(Function.call,String.prototype.replace),eq=Cy.call(Function.call,String.prototype.slice),cot=Cy.call(Function.call,RegExp.prototype.exec),lot=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,uot=/\\(\\)?/g,dot=function(t){var r=eq(t,0,1),n=eq(t,-1);if(r==="%"&&n!=="%")throw new Lf("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Lf("invalid intrinsic syntax, expected opening `%`");var i=[];return Bpe(t,lot,function(s,o,a,c){i[i.length]=a?Bpe(c,uot,"$1"):o||s}),i},pot=function(t,r){var n=t,i;if(ZI(Gpe,n)&&(i=Gpe[n],n="%"+i[0]+"%"),ZI(Ep,n)){var s=Ep[n];if(s===Df&&(s=sot(n)),typeof s>"u"&&!r)throw new Ff("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:s}}throw new Lf("intrinsic "+t+" does not exist!")};Wpe.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new Ff("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ff('"allowMissing" argument must be a boolean');if(cot(/^%?[^%]*%?$/,t)===null)throw new Lf("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=dot(t),i=n.length>0?n[0]:"",s=pot("%"+i+"%",r),o=s.name,a=s.value,c=!1,l=s.alias;l&&(i=l[0],aot(n,oot([0,1],l)));for(var u=1,p=!0;u<n.length;u+=1){var d=n[u],f=eq(d,0,1),m=eq(d,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new Lf("property names with quotes must have matching quotes");if((d==="constructor"||!p)&&(c=!0),i+="."+d,o="%"+i+"%",ZI(Ep,o))a=Ep[o];else if(a!=null){if(!(d in a)){if(!r)throw new Ff("base intrinsic for "+t+" exists, but the property is not available.");return}if(bp&&u+1>=n.length){var v=bp(a,d);p=!!v,p&&"get"in v&&!("originalValue"in v.get)?a=v.get:a=a[d]}else p=ZI(a,d),a=a[d];p&&!c&&(Ep[o]=a)}}return a}});var eme=A((c9t,rq)=>{"use strict";var PV=XI(),zf=tq(),Qpe=zf("%Function.prototype.apply%"),Xpe=zf("%Function.prototype.call%"),Zpe=zf("%Reflect.apply%",!0)||PV.call(Xpe,Qpe),Kpe=zf("%Object.getOwnPropertyDescriptor%",!0),Rp=zf("%Object.defineProperty%",!0),mot=zf("%Math.max%");if(Rp)try{Rp({},"a",{value:1})}catch{Rp=null}rq.exports=function(t){var r=Zpe(PV,Xpe,arguments);if(Kpe&&Rp){var n=Kpe(r,"length");n.configurable&&Rp(r,"length",{value:1+mot(0,t.length-(arguments.length-1))})}return r};var Ype=function(){return Zpe(PV,Qpe,arguments)};Rp?Rp(rq.exports,"apply",{value:Ype}):rq.exports.apply=Ype});var ime=A((l9t,nme)=>{"use strict";var tme=tq(),rme=eme(),fot=rme(tme("String.prototype.indexOf"));nme.exports=function(t,r){var n=tme(t,!!r);return typeof n=="function"&&fot(t,".prototype.")>-1?rme(n):n}});var ome=A((u9t,sme)=>{sme.exports=require("util").inspect});var Ame=A((d9t,xme)=>{var DV=typeof Map=="function"&&Map.prototype,CV=Object.getOwnPropertyDescriptor&&DV?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,iq=DV&&CV&&typeof CV.get=="function"?CV.get:null,ame=DV&&Map.prototype.forEach,FV=typeof Set=="function"&&Set.prototype,IV=Object.getOwnPropertyDescriptor&&FV?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,sq=FV&&IV&&typeof IV.get=="function"?IV.get:null,cme=FV&&Set.prototype.forEach,_ot=typeof WeakMap=="function"&&WeakMap.prototype,qy=_ot?WeakMap.prototype.has:null,hot=typeof WeakSet=="function"&&WeakSet.prototype,Ty=hot?WeakSet.prototype.has:null,vot=typeof WeakRef=="function"&&WeakRef.prototype,lme=vot?WeakRef.prototype.deref:null,got=Boolean.prototype.valueOf,yot=Object.prototype.toString,Sot=Function.prototype.toString,wot=String.prototype.match,LV=String.prototype.slice,Qu=String.prototype.replace,bot=String.prototype.toUpperCase,ume=String.prototype.toLowerCase,yme=RegExp.prototype.test,dme=Array.prototype.concat,Pc=Array.prototype.join,Eot=Array.prototype.slice,pme=Math.floor,OV=typeof BigInt=="function"?BigInt.prototype.valueOf:null,qV=Object.getOwnPropertySymbols,jV=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",hs=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Uf||"symbol")?Symbol.toStringTag:null,Sme=Object.prototype.propertyIsEnumerable,mme=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fme(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||yme.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-pme(-e):pme(e);if(n!==e){var i=String(n),s=LV.call(t,i.length+1);return Qu.call(i,r,"$&_")+"."+Qu.call(Qu.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Qu.call(t,r,"$&_")}var NV=ome(),_me=NV.custom,hme=bme(_me)?_me:null;xme.exports=function e(t,r,n,i){var s=r||{};if(Yu(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Yu(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Yu(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Yu(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Yu(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Rme(t,s);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return a?fme(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return a?fme(t,l):l}var u=typeof s.depth>"u"?5:s.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return kV(t)?"[Array]":"[Object]";var p=Uot(s,n);if(typeof i>"u")i=[];else if(Eme(i,t)>=0)return"[Circular]";function d(M,k,H){if(k&&(i=Eot.call(i),i.push(k)),H){var Q={depth:s.depth};return Yu(s,"quoteStyle")&&(Q.quoteStyle=s.quoteStyle),e(M,Q,n+1,i)}return e(M,s,n+1,i)}if(typeof t=="function"&&!vme(t)){var f=Oot(t),m=nq(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(m.length>0?" { "+Pc.call(m,", ")+" }":"")}if(bme(t)){var v=Uf?Qu.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):jV.call(t);return typeof t=="object"&&!Uf?Iy(v):v}if(Fot(t)){for(var g="<"+ume.call(String(t.nodeName)),y=t.attributes||[],h=0;h<y.length;h++)g+=" "+y[h].name+"="+wme(Rot(y[h].value),"double",s);return g+=">",t.childNodes&&t.childNodes.length&&(g+="..."),g+="</"+ume.call(String(t.nodeName))+">",g}if(kV(t)){if(t.length===0)return"[]";var S=nq(t,d);return p&&!zot(S)?"["+MV(S,p)+"]":"[ "+Pc.call(S,", ")+" ]"}if(Aot(t)){var E=nq(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!Sme.call(t,"cause")?"{ ["+String(t)+"] "+Pc.call(dme.call("[cause]: "+d(t.cause),E),", ")+" }":E.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Pc.call(E,", ")+" }"}if(typeof t=="object"&&o){if(hme&&typeof t[hme]=="function"&&NV)return NV(t,{depth:u-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(jot(t)){var N=[];return ame&&ame.call(t,function(M,k){N.push(d(k,t,!0)+" => "+d(M,t))}),gme("Map",iq.call(t),N,p)}if(Mot(t)){var C=[];return cme&&cme.call(t,function(M){C.push(d(M,t))}),gme("Set",sq.call(t),C,p)}if(Not(t))return TV("WeakMap");if(Dot(t))return TV("WeakSet");if(kot(t))return TV("WeakRef");if(Cot(t))return Iy(d(Number(t)));if(qot(t))return Iy(d(OV.call(t)));if(Iot(t))return Iy(got.call(t));if(Pot(t))return Iy(d(String(t)));if(!xot(t)&&!vme(t)){var j=nq(t,d),T=mme?mme(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",I=!T&&hs&&Object(t)===t&&hs in t?LV.call(Xu(t),8,-1):P?"Object":"",w=T||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",b=w+(I||P?"["+Pc.call(dme.call([],I||[],P||[]),": ")+"] ":"");return j.length===0?b+"{}":p?b+"{"+MV(j,p)+"}":b+"{ "+Pc.call(j,", ")+" }"}return String(t)};function wme(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function Rot(e){return Qu.call(String(e),/"/g,""")}function kV(e){return Xu(e)==="[object Array]"&&(!hs||!(typeof e=="object"&&hs in e))}function xot(e){return Xu(e)==="[object Date]"&&(!hs||!(typeof e=="object"&&hs in e))}function vme(e){return Xu(e)==="[object RegExp]"&&(!hs||!(typeof e=="object"&&hs in e))}function Aot(e){return Xu(e)==="[object Error]"&&(!hs||!(typeof e=="object"&&hs in e))}function Pot(e){return Xu(e)==="[object String]"&&(!hs||!(typeof e=="object"&&hs in e))}function Cot(e){return Xu(e)==="[object Number]"&&(!hs||!(typeof e=="object"&&hs in e))}function Iot(e){return Xu(e)==="[object Boolean]"&&(!hs||!(typeof e=="object"&&hs in e))}function bme(e){if(Uf)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!jV)return!1;try{return jV.call(e),!0}catch{}return!1}function qot(e){if(!e||typeof e!="object"||!OV)return!1;try{return OV.call(e),!0}catch{}return!1}var Tot=Object.prototype.hasOwnProperty||function(e){return e in this};function Yu(e,t){return Tot.call(e,t)}function Xu(e){return yot.call(e)}function Oot(e){if(e.name)return e.name;var t=wot.call(Sot.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Eme(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function jot(e){if(!iq||!e||typeof e!="object")return!1;try{iq.call(e);try{sq.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function Not(e){if(!qy||!e||typeof e!="object")return!1;try{qy.call(e,qy);try{Ty.call(e,Ty)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function kot(e){if(!lme||!e||typeof e!="object")return!1;try{return lme.call(e),!0}catch{}return!1}function Mot(e){if(!sq||!e||typeof e!="object")return!1;try{sq.call(e);try{iq.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function Dot(e){if(!Ty||!e||typeof e!="object")return!1;try{Ty.call(e,Ty);try{qy.call(e,qy)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function Fot(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Rme(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Rme(LV.call(e,0,t.maxStringLength),t)+n}var i=Qu.call(Qu.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Lot);return wme(i,"single",t)}function Lot(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+bot.call(t.toString(16))}function Iy(e){return"Object("+e+")"}function TV(e){return e+" { ? }"}function gme(e,t,r,n){var i=n?MV(r,n):Pc.call(r,", ");return e+" ("+t+") {"+i+"}"}function zot(e){for(var t=0;t<e.length;t++)if(Eme(e[t],`
|
|
354
354
|
`)>=0)return!1;return!0}function Uot(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Pc.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Pc.call(Array(t+1),r)}}function MV(e,t){if(e.length===0)return"";var r=`
|
|
355
355
|
`+t.prev+t.base;return r+Pc.call(e,","+r)+`
|
|
356
356
|
`+t.prev}function nq(e,t){var r=kV(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=Yu(e,i)?t(e[i],e):""}var s=typeof qV=="function"?qV(e):[],o;if(Uf){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var c in e)Yu(e,c)&&(r&&String(Number(c))===c&&c<e.length||Uf&&o["$"+c]instanceof Symbol||(yme.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof qV=="function")for(var l=0;l<s.length;l++)Sme.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}});var $V=A((p9t,Pme)=>{"use strict";var zV=tq(),$f=ime(),$ot=Ame(),Vot=zV("%TypeError%"),oq=zV("%WeakMap%",!0),aq=zV("%Map%",!0),Hot=$f("WeakMap.prototype.get",!0),Got=$f("WeakMap.prototype.set",!0),Bot=$f("WeakMap.prototype.has",!0),Jot=$f("Map.prototype.get",!0),Wot=$f("Map.prototype.set",!0),Kot=$f("Map.prototype.has",!0),UV=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Yot=function(e,t){var r=UV(e,t);return r&&r.value},Qot=function(e,t,r){var n=UV(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Xot=function(e,t){return!!UV(e,t)};Pme.exports=function(){var t,r,n,i={assert:function(s){if(!i.has(s))throw new Vot("Side channel does not contain "+$ot(s))},get:function(s){if(oq&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Hot(t,s)}else if(aq){if(r)return Jot(r,s)}else if(n)return Yot(n,s)},has:function(s){if(oq&&s&&(typeof s=="object"||typeof s=="function")){if(t)return Bot(t,s)}else if(aq){if(r)return Kot(r,s)}else if(n)return Xot(n,s);return!1},set:function(s,o){oq&&s&&(typeof s=="object"||typeof s=="function")?(t||(t=new oq),Got(t,s,o)):aq?(r||(r=new aq),Wot(r,s,o)):(n||(n={key:{},next:null}),Qot(n,s,o))}};return i}});var cq=A((m9t,Cme)=>{"use strict";var Zot=String.prototype.replace,eat=/%20/g,VV={RFC1738:"RFC1738",RFC3986:"RFC3986"};Cme.exports={default:VV.RFC3986,formatters:{RFC1738:function(e){return Zot.call(e,eat,"+")},RFC3986:function(e){return String(e)}},RFC1738:VV.RFC1738,RFC3986:VV.RFC3986}});var GV=A((f9t,qme)=>{"use strict";var tat=cq(),HV=Object.prototype.hasOwnProperty,xp=Array.isArray,Cc=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),rat=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(xp(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},Ime=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},nat=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(xp(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!HV.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return xp(t)&&!xp(r)&&(i=Ime(t,n)),xp(t)&&xp(r)?(r.forEach(function(s,o){if(HV.call(t,o)){var a=t[o];a&&typeof a=="object"&&s&&typeof s=="object"?t[o]=e(a,s,n):t.push(s)}else t[o]=s}),t):Object.keys(r).reduce(function(s,o){var a=r[o];return HV.call(s,o)?s[o]=e(s[o],a,n):s[o]=a,s},i)},iat=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},sat=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},oat=function(t,r,n,i,s){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",c=0;c<o.length;++c){var l=o.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===tat.RFC1738&&(l===40||l===41)){a+=o.charAt(c);continue}if(l<128){a=a+Cc[l];continue}if(l<2048){a=a+(Cc[192|l>>6]+Cc[128|l&63]);continue}if(l<55296||l>=57344){a=a+(Cc[224|l>>12]+Cc[128|l>>6&63]+Cc[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|o.charCodeAt(c)&1023),a+=Cc[240|l>>18]+Cc[128|l>>12&63]+Cc[128|l>>6&63]+Cc[128|l&63]}return a},aat=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],u=o[l];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:o,prop:l}),n.push(u))}return rat(r),t},cat=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},lat=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},uat=function(t,r){return[].concat(t,r)},dat=function(t,r){if(xp(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)};qme.exports={arrayToObject:Ime,assign:iat,combine:uat,compact:aat,decode:sat,encode:oat,isBuffer:lat,isRegExp:cat,maybeMap:dat,merge:nat}});var Mme=A((_9t,kme)=>{"use strict";var jme=$V(),lq=GV(),Oy=cq(),pat=Object.prototype.hasOwnProperty,Tme={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Ml=Array.isArray,mat=Array.prototype.push,Nme=function(e,t){mat.apply(e,Ml(t)?t:[t])},fat=Date.prototype.toISOString,Ome=Oy.default,vs={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:lq.encode,encodeValuesOnly:!1,format:Ome,formatter:Oy.formatters[Ome],indices:!1,serializeDate:function(t){return fat.call(t)},skipNulls:!1,strictNullHandling:!1},_at=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},BV={},hat=function e(t,r,n,i,s,o,a,c,l,u,p,d,f,m,v,g){for(var y=t,h=g,S=0,E=!1;(h=h.get(BV))!==void 0&&!E;){var N=h.get(t);if(S+=1,typeof N<"u"){if(N===S)throw new RangeError("Cyclic object value");E=!0}typeof h.get(BV)>"u"&&(S=0)}if(typeof c=="function"?y=c(r,y):y instanceof Date?y=p(y):n==="comma"&&Ml(y)&&(y=lq.maybeMap(y,function(Q){return Q instanceof Date?p(Q):Q})),y===null){if(s)return a&&!m?a(r,vs.encoder,v,"key",d):r;y=""}if(_at(y)||lq.isBuffer(y)){if(a){var C=m?r:a(r,vs.encoder,v,"key",d);return[f(C)+"="+f(a(y,vs.encoder,v,"value",d))]}return[f(r)+"="+f(String(y))]}var j=[];if(typeof y>"u")return j;var T;if(n==="comma"&&Ml(y))m&&a&&(y=lq.maybeMap(y,a)),T=[{value:y.length>0?y.join(",")||null:void 0}];else if(Ml(c))T=c;else{var P=Object.keys(y);T=l?P.sort(l):P}for(var I=i&&Ml(y)&&y.length===1?r+"[]":r,w=0;w<T.length;++w){var b=T[w],M=typeof b=="object"&&typeof b.value<"u"?b.value:y[b];if(!(o&&M===null)){var k=Ml(y)?typeof n=="function"?n(I,b):I:I+(u?"."+b:"["+b+"]");g.set(t,S);var H=jme();H.set(BV,g),Nme(j,e(M,k,n,i,s,o,n==="comma"&&m&&Ml(y)?null:a,c,l,u,p,d,f,m,v,H))}}return j},vat=function(t){if(!t)return vs;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||vs.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Oy.default;if(typeof t.format<"u"){if(!pat.call(Oy.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=Oy.formatters[n],s=vs.filter;return(typeof t.filter=="function"||Ml(t.filter))&&(s=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:vs.addQueryPrefix,allowDots:typeof t.allowDots>"u"?vs.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:vs.charsetSentinel,delimiter:typeof t.delimiter>"u"?vs.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:vs.encode,encoder:typeof t.encoder=="function"?t.encoder:vs.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:vs.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:vs.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:vs.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:vs.strictNullHandling}};kme.exports=function(e,t){var r=e,n=vat(t),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):Ml(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;t&&t.arrayFormat in Tme?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var c=Tme[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var u=jme(),p=0;p<i.length;++p){var d=i[p];n.skipNulls&&r[d]===null||Nme(o,hat(r[d],d,c,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var f=o.join(n.delimiter),m=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),f.length>0?m+f:""}});var Lme=A((h9t,Fme)=>{"use strict";var Vf=GV(),JV=Object.prototype.hasOwnProperty,gat=Array.isArray,Di={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Vf.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},yat=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Dme=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Sat="utf8=%26%2310003%3B",wat="utf8=%E2%9C%93",bat=function(t,r){var n={},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,l=r.charset;if(r.charsetSentinel)for(c=0;c<o.length;++c)o[c].indexOf("utf8=")===0&&(o[c]===wat?l="utf-8":o[c]===Sat&&(l="iso-8859-1"),a=c,c=o.length);for(c=0;c<o.length;++c)if(c!==a){var u=o[c],p=u.indexOf("]="),d=p===-1?u.indexOf("="):p+1,f,m;d===-1?(f=r.decoder(u,Di.decoder,l,"key"),m=r.strictNullHandling?null:""):(f=r.decoder(u.slice(0,d),Di.decoder,l,"key"),m=Vf.maybeMap(Dme(u.slice(d+1),r),function(v){return r.decoder(v,Di.decoder,l,"value")})),m&&r.interpretNumericEntities&&l==="iso-8859-1"&&(m=yat(m)),u.indexOf("[]=")>-1&&(m=gat(m)?[m]:m),JV.call(n,f)?n[f]=Vf.combine(n[f],m):n[f]=m}return n},Eat=function(e,t,r,n){for(var i=n?t:Dme(t,r),s=e.length-1;s>=0;--s){var o,a=e[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,l=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[],o[l]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},Rat=function(t,r,n,i){if(t){var s=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),l=c?s.slice(0,c.index):s,u=[];if(l){if(!n.plainObjects&&JV.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var p=0;n.depth>0&&(c=a.exec(s))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&JV.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+s.slice(c.index)+"]"),Eat(u,r,n,i)}},xat=function(t){if(!t)return Di;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Di.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Di.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Di.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Di.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Di.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Di.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Di.comma,decoder:typeof t.decoder=="function"?t.decoder:Di.decoder,delimiter:typeof t.delimiter=="string"||Vf.isRegExp(t.delimiter)?t.delimiter:Di.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Di.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Di.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Di.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Di.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Di.strictNullHandling}};Fme.exports=function(e,t){var r=xat(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?bat(e,r):e,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=Rat(a,n[a],r,typeof e=="string");i=Vf.merge(i,c,r)}return r.allowSparse===!0?i:Vf.compact(i)}});var WV=A((v9t,zme)=>{"use strict";var Aat=Mme(),Pat=Lme(),Cat=cq();zme.exports={formats:Cat,parse:Pat,stringify:Aat}});var $me=A((g9t,Ume)=>{"use strict";function uq(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}uq.prototype.define=function(e,t){for(let r in e){let n=e[r].map(function(i){return i.toLowerCase()});r=r.toLowerCase();for(let i=0;i<n.length;i++){let s=n[i];if(s[0]!=="*"){if(!t&&s in this._types)throw new Error('Attempt to change mapping for "'+s+'" extension from "'+this._types[s]+'" to "'+r+'". Pass `force=true` to allow this, otherwise remove "'+s+'" from the list of extensions for "'+r+'".');this._types[s]=r}}if(t||!this._extensions[r]){let i=n[0];this._extensions[r]=i[0]!=="*"?i:i.substr(1)}}};uq.prototype.getType=function(e){e=String(e);let t=e.replace(/^.*[/\\]/,"").toLowerCase(),r=t.replace(/^.*\./,"").toLowerCase(),n=t.length<e.length;return(r.length<t.length-1||!n)&&this._types[r]||null};uq.prototype.getExtension=function(e){return e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1,e&&this._extensions[e.toLowerCase()]||null};Ume.exports=uq});var Hme=A((y9t,Vme)=>{Vme.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}});var Bme=A((S9t,Gme)=>{Gme.exports={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}});var Wme=A((w9t,Jme)=>{"use strict";var Iat=$me();Jme.exports=new Iat(Hme(),Bme())});var KV=A((b9t,Yme)=>{"use strict";var Kme=require("http");Yme.exports=qat()||Tat();function qat(){return Kme.METHODS&&Kme.METHODS.map(function(t){return t.toLowerCase()})}function Tat(){return["get","post","put","head","delete","options","trace","copy","lock","mkcol","move","purge","propfind","proppatch","unlock","report","mkactivity","checkout","merge","m-search","notify","subscribe","unsubscribe","patch","search","connect"]}});var QV=A((E9t,Xme)=>{"use strict";var Qme=require("fs"),Oat=require("crypto"),{EventEmitter:jat}=require("events"),YV=class extends jat{constructor({filepath:t,newFilename:r,originalFilename:n,mimetype:i,hashAlgorithm:s}){super(),this.lastModifiedDate=null,Object.assign(this,{filepath:t,newFilename:r,originalFilename:n,mimetype:i,hashAlgorithm:s}),this.size=0,this._writeStream=null,typeof this.hashAlgorithm=="string"?this.hash=Oat.createHash(this.hashAlgorithm):this.hash=null}open(){this._writeStream=new Qme.WriteStream(this.filepath),this._writeStream.on("error",t=>{this.emit("error",t)})}toJSON(){let t={size:this.size,filepath:this.filepath,newFilename:this.newFilename,mimetype:this.mimetype,mtime:this.lastModifiedDate,length:this.length,originalFilename:this.originalFilename};return this.hash&&this.hash!==""&&(t.hash=this.hash),t}toString(){return`PersistentFile: ${this.newFilename}, Original: ${this.originalFilename}, Path: ${this.filepath}`}write(t,r){if(this.hash&&this.hash.update(t),this._writeStream.closed){r();return}this._writeStream.write(t,()=>{this.lastModifiedDate=new Date,this.size+=t.length,this.emit("progress",this.size),r()})}end(t){this.hash&&(this.hash=this.hash.digest("hex")),this._writeStream.end(()=>{this.emit("end"),t()})}destroy(){this._writeStream.destroy(),Qme.unlink(this.filepath,()=>{})}};Xme.exports=YV});var ZV=A((R9t,Zme)=>{"use strict";var Nat=require("crypto"),{EventEmitter:kat}=require("events"),XV=class extends kat{constructor({filepath:t,newFilename:r,originalFilename:n,mimetype:i,hashAlgorithm:s,createFileWriteStream:o}){super(),this.lastModifiedDate=null,Object.assign(this,{filepath:t,newFilename:r,originalFilename:n,mimetype:i,hashAlgorithm:s,createFileWriteStream:o}),this.size=0,this._writeStream=null,typeof this.hashAlgorithm=="string"?this.hash=Nat.createHash(this.hashAlgorithm):this.hash=null}open(){this._writeStream=this.createFileWriteStream(this),this._writeStream.on("error",t=>{this.emit("error",t)})}destroy(){this._writeStream.destroy()}toJSON(){let t={size:this.size,newFilename:this.newFilename,length:this.length,originalFilename:this.originalFilename,mimetype:this.mimetype};return this.hash&&this.hash!==""&&(t.hash=this.hash),t}toString(){return`VolatileFile: ${this.originalFilename}`}write(t,r){if(this.hash&&this.hash.update(t),this._writeStream.closed||this._writeStream.destroyed){r();return}this._writeStream.write(t,()=>{this.size+=t.length,this.emit("progress",this.size),r()})}end(t){this.hash&&(this.hash=this.hash.digest("hex")),this._writeStream.end(()=>{this.emit("end"),t()})}};Zme.exports=XV});var tfe=A((x9t,efe)=>{var e4=256,t4=[];for(;e4--;)t4[e4]=(e4+256).toString(16).substring(1);efe.exports=function(e){e=e||16;var t="",r=0;return function(){if(!t||r===256){for(t="",r=(1+e)/2|0;r--;)t+=t4[256*Math.random()|0];t=t.substring(r=0,e-2)}return t+t4[r++]}}});var r4=A((A9t,nfe)=>{nfe.exports=rfe;function rfe(e,t){if(e&&t)return rfe(e)(t);if(typeof e!="function")throw new TypeError("need wrapper function");return Object.keys(e).forEach(function(n){r[n]=e[n]}),r;function r(){for(var n=new Array(arguments.length),i=0;i<n.length;i++)n[i]=arguments[i];var s=e.apply(this,n),o=n[n.length-1];return typeof s=="function"&&s!==o&&Object.keys(o).forEach(function(a){s[a]=o[a]}),s}}});var ofe=A((P9t,n4)=>{var ife=r4();n4.exports=ife(dq);n4.exports.strict=ife(sfe);dq.proto=dq(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return dq(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return sfe(this)},configurable:!0})});function dq(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function sfe(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}});var dfe=A((C9t,ufe)=>{"use strict";var pq,Mat=typeof setImmediate=="function";ufe.exports=cfe;function cfe(e){qc.length||(lfe(),i4=!0),qc[qc.length]=e}var qc=[],i4=!1,Ic=0,Dat=1024;function afe(){for(;Ic<qc.length;){var e=Ic;if(Ic=Ic+1,qc[e].call(),Ic>Dat){for(var t=0,r=qc.length-Ic;t<r;t++)qc[t]=qc[t+Ic];qc.length-=Ic,Ic=0}}qc.length=0,Ic=0,i4=!1}cfe.requestFlush=lfe;function lfe(){var e=process.domain;e&&(pq||(pq=require("domain")),pq.active=process.domain=null),i4&&Mat?setImmediate(afe):process.nextTick(afe),e&&(pq.active=process.domain=e)}});var _fe=A((I9t,ffe)=>{"use strict";var pfe=dfe(),s4=[];ffe.exports=Fat;function Fat(e){var t;s4.length?t=s4.pop():t=new mfe,t.task=e,t.domain=process.domain,pfe(t)}function mfe(){this.task=null,this.domain=null}mfe.prototype.call=function(){this.domain&&this.domain.enter();var e=!0;try{this.task.call(),e=!1,this.domain&&this.domain.exit()}finally{e&&pfe.requestFlush(),this.task=null,this.domain=null,s4.push(this)}}});var gfe=A((q9t,vfe)=>{var Lat=r4();vfe.exports=Lat(zat);var hfe=_fe();function zat(e){var t=!0;return hfe(function(){t=!1}),function(){var n=arguments,i=this;t?hfe(function(){e.apply(i,n)}):e.apply(i,n)}}});var mq=A((T9t,yfe)=>{"use strict";var Uat=String.prototype.replace,$at=/%20/g,o4={RFC1738:"RFC1738",RFC3986:"RFC3986"};yfe.exports={default:o4.RFC3986,formatters:{RFC1738:function(e){return Uat.call(e,$at,"+")},RFC3986:function(e){return String(e)}},RFC1738:o4.RFC1738,RFC3986:o4.RFC3986}});var c4=A((O9t,wfe)=>{"use strict";var Vat=mq(),a4=Object.prototype.hasOwnProperty,Ap=Array.isArray,Tc=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Hat=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(Ap(n)){for(var i=[],s=0;s<n.length;++s)typeof n[s]<"u"&&i.push(n[s]);r.obj[r.prop]=i}}},Sfe=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},Gat=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(Ap(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!a4.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return Ap(t)&&!Ap(r)&&(i=Sfe(t,n)),Ap(t)&&Ap(r)?(r.forEach(function(s,o){if(a4.call(t,o)){var a=t[o];a&&typeof a=="object"&&s&&typeof s=="object"?t[o]=e(a,s,n):t.push(s)}else t[o]=s}),t):Object.keys(r).reduce(function(s,o){var a=r[o];return a4.call(s,o)?s[o]=e(s[o],a,n):s[o]=a,s},i)},Bat=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},Jat=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Wat=function(t,r,n,i,s){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var a="",c=0;c<o.length;++c){var l=o.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||s===Vat.RFC1738&&(l===40||l===41)){a+=o.charAt(c);continue}if(l<128){a=a+Tc[l];continue}if(l<2048){a=a+(Tc[192|l>>6]+Tc[128|l&63]);continue}if(l<55296||l>=57344){a=a+(Tc[224|l>>12]+Tc[128|l>>6&63]+Tc[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|o.charCodeAt(c)&1023),a+=Tc[240|l>>18]+Tc[128|l>>12&63]+Tc[128|l>>6&63]+Tc[128|l&63]}return a},Kat=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var s=r[i],o=s.obj[s.prop],a=Object.keys(o),c=0;c<a.length;++c){var l=a[c],u=o[l];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:o,prop:l}),n.push(u))}return Hat(r),t},Yat=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},Qat=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},Xat=function(t,r){return[].concat(t,r)},Zat=function(t,r){if(Ap(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)};wfe.exports={arrayToObject:Sfe,assign:Bat,combine:Xat,compact:Kat,decode:Jat,encode:Wat,isBuffer:Qat,isRegExp:Yat,maybeMap:Zat,merge:Gat}});var Pfe=A((j9t,Afe)=>{"use strict";var Rfe=$V(),fq=c4(),jy=mq(),ect=Object.prototype.hasOwnProperty,bfe={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Dl=Array.isArray,tct=Array.prototype.push,xfe=function(e,t){tct.apply(e,Dl(t)?t:[t])},rct=Date.prototype.toISOString,Efe=jy.default,gs={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:fq.encode,encodeValuesOnly:!1,format:Efe,formatter:jy.formatters[Efe],indices:!1,serializeDate:function(t){return rct.call(t)},skipNulls:!1,strictNullHandling:!1},nct=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},l4={},ict=function e(t,r,n,i,s,o,a,c,l,u,p,d,f,m,v,g){for(var y=t,h=g,S=0,E=!1;(h=h.get(l4))!==void 0&&!E;){var N=h.get(t);if(S+=1,typeof N<"u"){if(N===S)throw new RangeError("Cyclic object value");E=!0}typeof h.get(l4)>"u"&&(S=0)}if(typeof c=="function"?y=c(r,y):y instanceof Date?y=p(y):n==="comma"&&Dl(y)&&(y=fq.maybeMap(y,function(Q){return Q instanceof Date?p(Q):Q})),y===null){if(s)return a&&!m?a(r,gs.encoder,v,"key",d):r;y=""}if(nct(y)||fq.isBuffer(y)){if(a){var C=m?r:a(r,gs.encoder,v,"key",d);return[f(C)+"="+f(a(y,gs.encoder,v,"value",d))]}return[f(r)+"="+f(String(y))]}var j=[];if(typeof y>"u")return j;var T;if(n==="comma"&&Dl(y))m&&a&&(y=fq.maybeMap(y,a)),T=[{value:y.length>0?y.join(",")||null:void 0}];else if(Dl(c))T=c;else{var P=Object.keys(y);T=l?P.sort(l):P}for(var I=i&&Dl(y)&&y.length===1?r+"[]":r,w=0;w<T.length;++w){var b=T[w],M=typeof b=="object"&&typeof b.value<"u"?b.value:y[b];if(!(o&&M===null)){var k=Dl(y)?typeof n=="function"?n(I,b):I:I+(u?"."+b:"["+b+"]");g.set(t,S);var H=Rfe();H.set(l4,g),xfe(j,e(M,k,n,i,s,o,n==="comma"&&m&&Dl(y)?null:a,c,l,u,p,d,f,m,v,H))}}return j},sct=function(t){if(!t)return gs;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||gs.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=jy.default;if(typeof t.format<"u"){if(!ect.call(jy.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=jy.formatters[n],s=gs.filter;return(typeof t.filter=="function"||Dl(t.filter))&&(s=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:gs.addQueryPrefix,allowDots:typeof t.allowDots>"u"?gs.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:gs.charsetSentinel,delimiter:typeof t.delimiter>"u"?gs.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:gs.encode,encoder:typeof t.encoder=="function"?t.encoder:gs.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:gs.encodeValuesOnly,filter:s,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:gs.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:gs.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:gs.strictNullHandling}};Afe.exports=function(e,t){var r=e,n=sct(t),i,s;typeof n.filter=="function"?(s=n.filter,r=s("",r)):Dl(n.filter)&&(s=n.filter,i=s);var o=[];if(typeof r!="object"||r===null)return"";var a;t&&t.arrayFormat in bfe?a=t.arrayFormat:t&&"indices"in t?a=t.indices?"indices":"repeat":a="indices";var c=bfe[a];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var u=Rfe(),p=0;p<i.length;++p){var d=i[p];n.skipNulls&&r[d]===null||xfe(o,ict(r[d],d,c,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var f=o.join(n.delimiter),m=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B&":m+="utf8=%E2%9C%93&"),f.length>0?m+f:""}});var qfe=A((N9t,Ife)=>{"use strict";var Hf=c4(),u4=Object.prototype.hasOwnProperty,oct=Array.isArray,Fi={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Hf.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},act=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Cfe=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},cct="utf8=%26%2310003%3B",lct="utf8=%E2%9C%93",uct=function(t,r){var n={},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,s=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,s),a=-1,c,l=r.charset;if(r.charsetSentinel)for(c=0;c<o.length;++c)o[c].indexOf("utf8=")===0&&(o[c]===lct?l="utf-8":o[c]===cct&&(l="iso-8859-1"),a=c,c=o.length);for(c=0;c<o.length;++c)if(c!==a){var u=o[c],p=u.indexOf("]="),d=p===-1?u.indexOf("="):p+1,f,m;d===-1?(f=r.decoder(u,Fi.decoder,l,"key"),m=r.strictNullHandling?null:""):(f=r.decoder(u.slice(0,d),Fi.decoder,l,"key"),m=Hf.maybeMap(Cfe(u.slice(d+1),r),function(v){return r.decoder(v,Fi.decoder,l,"value")})),m&&r.interpretNumericEntities&&l==="iso-8859-1"&&(m=act(m)),u.indexOf("[]=")>-1&&(m=oct(m)?[m]:m),u4.call(n,f)?n[f]=Hf.combine(n[f],m):n[f]=m}return n},dct=function(e,t,r,n){for(var i=n?t:Cfe(t,r),s=e.length-1;s>=0;--s){var o,a=e[s];if(a==="[]"&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var c=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,l=parseInt(c,10);!r.parseArrays&&c===""?o={0:i}:!isNaN(l)&&a!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[],o[l]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},pct=function(t,r,n,i){if(t){var s=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,c=n.depth>0&&o.exec(s),l=c?s.slice(0,c.index):s,u=[];if(l){if(!n.plainObjects&&u4.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var p=0;n.depth>0&&(c=a.exec(s))!==null&&p<n.depth;){if(p+=1,!n.plainObjects&&u4.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+s.slice(c.index)+"]"),dct(u,r,n,i)}},mct=function(t){if(!t)return Fi;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Fi.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Fi.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Fi.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Fi.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Fi.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Fi.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Fi.comma,decoder:typeof t.decoder=="function"?t.decoder:Fi.decoder,delimiter:typeof t.delimiter=="string"||Hf.isRegExp(t.delimiter)?t.delimiter:Fi.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Fi.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Fi.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Fi.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Fi.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Fi.strictNullHandling}};Ife.exports=function(e,t){var r=mct(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?uct(e,r):e,i=r.plainObjects?Object.create(null):{},s=Object.keys(n),o=0;o<s.length;++o){var a=s[o],c=pct(a,n[a],r,typeof e=="string");i=Hf.merge(i,c,r)}return r.allowSparse===!0?i:Hf.compact(i)}});var Ofe=A((k9t,Tfe)=>{"use strict";var fct=Pfe(),_ct=qfe(),hct=mq();Tfe.exports={formats:hct,parse:_ct,stringify:fct}});var p4=A((M9t,jfe)=>{"use strict";var{Transform:vct}=require("stream"),d4=class extends vct{constructor(t,r={}){super(),this.globalOptions={...r},this.incomingForm=t}_flush(t){this.incomingForm.ended=!0,this.incomingForm._maybeEnd(),t()}};jfe.exports=d4});var Ny=A((D9t,Nfe)=>{var gct=class extends Error{constructor(e,t,r=500){super(e),this.code=t,this.httpCode=r}};Nfe.exports={missingPlugin:1e3,pluginFunction:1001,aborted:1002,noParser:1003,uninitializedParser:1004,filenameNotString:1005,maxFieldsSizeExceeded:1006,maxFieldsExceeded:1007,smallerThanMinFileSize:1008,biggerThanMaxFileSize:1009,noEmptyFiles:1010,missingContentType:1011,malformedMultipart:1012,missingMultipartBoundary:1013,unknownTransferEncoding:1014,FormidableError:gct}});var gq=A((vq,Dfe)=>{"use strict";var{Transform:yct}=require("stream"),Mfe=Ny(),{FormidableError:Sct}=Mfe,jo=0,Rr={PARSER_UNINITIALIZED:jo++,START:jo++,START_BOUNDARY:jo++,HEADER_FIELD_START:jo++,HEADER_FIELD:jo++,HEADER_VALUE_START:jo++,HEADER_VALUE:jo++,HEADER_VALUE_ALMOST_DONE:jo++,HEADERS_ALMOST_DONE:jo++,PART_DATA_START:jo++,PART_DATA:jo++,PART_END:jo++,END:jo++},kfe=1,Zu={PART_BOUNDARY:kfe,LAST_BOUNDARY:kfe*=2},_q=10,hq=13,wct=32,ky=45,bct=58,Ect=97,Rct=122;function xct(e){return e|32}vq.STATES={};Object.keys(Rr).forEach(e=>{vq.STATES[e]=Rr[e]});var Gf=class extends yct{constructor(t={}){super({readableObjectMode:!0}),this.boundary=null,this.boundaryChars=null,this.lookbehind=null,this.bufferLength=0,this.state=Rr.PARSER_UNINITIALIZED,this.globalOptions={...t},this.index=null,this.flags=0}_flush(t){this.state===Rr.HEADER_FIELD_START&&this.index===0||this.state===Rr.PART_DATA&&this.index===this.boundary.length?(this._handleCallback("partEnd"),this._handleCallback("end"),t()):this.state!==Rr.END&&t(new Sct(`MultipartParser.end(): stream ended unexpectedly: ${this.explain()}`,Mfe.malformedMultipart,400))}initWithBoundary(t){this.boundary=Buffer.from(`\r
|
|
@@ -489,7 +489,7 @@ mime-types/index.js:
|
|
|
489
489
|
*/
|
|
490
490
|
/**
|
|
491
491
|
* @title @squiz/content-api
|
|
492
|
-
* @version 1.39.1-alpha.
|
|
492
|
+
* @version 1.39.1-alpha.30
|
|
493
493
|
* @license ISC
|
|
494
494
|
* @baseUrl /
|
|
495
495
|
* @contact
|