{
	"info": {
		"_postman_id": "76acdc49-ac81-4ab6-9a62-eb9216960c54",
		"name": "ONE Record API Unit Tests 2025-07",
		"description": "# ONE Record Example Collection\n\nThis collection contains all the examples described in the ONE Record API specification website([https://iata-cargo.github.io/ONE-Record/](https://))\n\n# Collection Variables\n\nA set of variables has been designed to ease the use of this collections. In order to run any call, please create an Environment and add the following variable:\n\n- baseUrl : the url of the ONE Record server (i.e. [https://1r.example.com](https://1r.example.com))\n    \n\n# Authentication\n\nIf ONE Record Server implements the authentication, you should add a bearer token for each API call. For more information check the Security section on [https://iata-cargo.github.io/ONE-Record/](https://iata-cargo.github.io/ONE-Record/)",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "28309429"
	},
	"item": [
		{
			"name": "Server Information",
			"item": [
				{
					"name": "Server Information",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									"// Inject jsonld.js\r",
									"var self = {}\r",
									"async function frame(json) {\r",
									"    return await jsonld.frame(jsonData, {});\r",
									"}\r",
									"eval(pm.collectionVariables.get('jsonCode'));\r",
									"\r",
									"\r",
									"// Test Status Code\r",
									"pm.test(\"Status code is 200\", function () {\r",
									"    pm.response.to.have.status(200);\r",
									"});\r",
									"// Test Response Headers\r",
									"pm.test(\"Content-Type is present\", function () {\r",
									"    pm.response.to.have.header(\"Content-Type\");\r",
									"});\r",
									"pm.test(\"Content-Language is present\", function () {\r",
									"    pm.response.to.have.header(\"Content-Language\");\r",
									"});\r",
									"pm.test(\"Last-Modified is present\", function () {\r",
									"    pm.response.to.have.header(\"Last-Modified\");\r",
									"});\r",
									"// Test Response Payload\r",
									"var jsonData = pm.response.json();\r",
									"\r",
									"const framedJson = frame(jsonData);\r",
									"framedJson.then(function (result) {\r",
									"\r",
									"    if (result['@graph']) {\r",
									"        result['@graph'].forEach((element) => {\r",
									"            if (element['@id'] == pm.request.url.toString()) {\r",
									"                jsonData = element;\r",
									"            }\r",
									"        })\r",
									"    } else {\r",
									"        jsonData = result;\r",
									"    }\r",
									"    pm.test(\"Response contains @id \", function () {\r",
									"        pm.expect(jsonData).to.have.property(\"@id\");\r",
									"    });\r",
									"    pm.test(\"Response contains @type \", function () {\r",
									"        pm.expect(jsonData).to.have.property(\"@type\");\r",
									"    });\r",
									"    pm.test(\"Response contains hasDataHolder \", function () {\r",
									"        pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasDataHolder\");\r",
									"    });\r",
									"    pm.test(\"Response contains hasServerEndpoint \", function () {\r",
									"        pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasServerEndpoint\");\r",
									"    });\r",
									"    pm.test(\"Response contains hasSupportedContentType\", function () {\r",
									"        pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasSupportedContentType\");\r",
									"    });\r",
									"    pm.test(\"Response contains hasSupportedLanguage \", function () {\r",
									"        pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasSupportedLanguage\");\r",
									"    });\r",
									"});\r",
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						},
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript",
								"packages": {}
							}
						}
					],
					"request": {
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"value": "application/ld+json; version=2.0.0-dev",
								"type": "text"
							},
							{
								"key": "Accept",
								"value": "application/ld+json; version=2.0.0-dev",
								"type": "text"
							}
						],
						"url": {
							"raw": "{{baseUrl}}/",
							"host": [
								"{{baseUrl}}"
							],
							"path": [
								""
							]
						},
						"description": "This request retrieve the Server Information of the ONE Record server. For more information visit : [ONE Record Server Information](https://iata-cargo.github.io/ONE-Record/server-information/)"
					},
					"response": []
				}
			],
			"description": "This folder contains Unit tests for the server information endpoint.  \nFor more information visit : [Server Information Endpoint](https://iata-cargo.github.io/ONE-Record/server-information/)"
		},
		{
			"name": "Logistics Objects",
			"item": [
				{
					"name": "Create",
					"item": [
						{
							"name": "Create a Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Test Status Code\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"// Test Response Headers\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Piece\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Piece\")){\r",
											"    pm.collectionVariables.set(\"pieceId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"pieceRevision\", 1);\r",
											"\r",
											"    //Set creation date for historical object\r",
											"    isoTimestamp = pm.variables.replaceIn('{{$isoTimestamp}}')\r",
											"    date = isoTimestamp.replaceAll('-','').replaceAll(':',\"\").split(\".\").shift() + \"Z\";\r",
											"    pm.collectionVariables.set(\"historicalCreation\",date);\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Piece\",\n    \"cargo:coload\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n        \"@value\": \"false\"\n    },\n    \"cargo:specialHandlingCodes\": [\n        {\n            \"@id\": \"https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a Company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Company\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Company\")){\r",
											"    pm.collectionVariables.set(\"companyId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"companyRevision\", 1);\r",
											"    pm.collectionVariables.set(\"companyCreationTime\", Date.now());\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": [\n        \"cargo:Company\",\n        \"cargo:Organization\",\n        \"cargo:LogisticsAgent\",\n        \"cargo:LogisticsObject\"\n    ],\n    \"cargo:name\": \"Acme Corporation\",\n    \"cargo:shortName\": \"ACME\",\n    \"cargo:contactPersons\": [\n        {\n            \"@type\": [\n                \"cargo:Person\",\n                \"cargo:Actor\",\n                \"cargo:LogisticsAgent\",\n                \"cargo:LogisticsObject\"\n            ],\n            \"cargo:firstName\": \"Jane\",\n            \"cargo:lastName\": \"Doe\",\n            \"cargo:salutation\": \"Ms\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a Shipment",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Shipment\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Shipment\")){\r",
											"    pm.collectionVariables.set(\"shipmentId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"shipmentRevision\", 1);\r",
											"    pm.collectionVariables.set(\"shipmentCreationTime\", Date.now());\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Shipment\",\n    \"cargo:goodsDescription\": \"Lots of awesome ONE Record information materials\",\n    \"cargo:pieces\": [{\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\"\n    }]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Get",
					"item": [
						{
							"name": "Get created Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(piece) {\r",
											"    return await jsonld.frame(piece, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"    console.log(result)\r",
											"    var specialHandlingCodes = \"https://onerecord.iata.org/ns/cargo#specialHandlingCodes\"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.includes(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"    });\r",
											"    var coload = \"https://onerecord.iata.org/ns/cargo#coload\"\r",
											"    pm.test(\"Response contains coload\", () => {\r",
											"        pm.expect(jsonData).to.have.property(coload);\r",
											"    });\r",
											"    \r",
											"    if (jsonData[coload] instanceof Object){\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#boolean');\r",
											"            pm.expect(jsonData[coload]['@value'].toString()).to.eql('false')\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]).to.eql(false);\r",
											"            pm.expect(jsonData[coload]).to.be.a('boolean');       \r",
											"        });\r",
											"    }\r",
											"    \r",
											"    pm.test(\"Response contains specialHandlingCodes \", () => {\r",
											"        pm.expect(jsonData).to.have.property(specialHandlingCodes);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains specialHandlingCodes-@id\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response value specialHandlingCodes-VAL\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes][\"@id\"]).to.eql('https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL');\r",
											"    });\r",
											"})\r",
											"\r",
											"//Update variables\r",
											"pm.collectionVariables.set(\"pieceRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{pieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get a not Existing Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"const apiNS = 'https://onerecord.iata.org/ns/api#';\r",
											"var self = {};\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 404\", () => {\r",
											"    pm.response.to.have.status(404);\r",
											"});\r",
											"\r",
											"pm.test(\"Response must have a error body\", () => {\r",
											"    pm.response.to.be.withBody;\r",
											"});\r",
											"\r",
											"//Test Error response payload\r",
											"var responseJson;\r",
											"if (pm.response.text()) {\r",
											"    responseJson = pm.response.json();\r",
											"} else {\r",
											"    responseJson = {}; // Handle the case where there is no response\r",
											"}\r",
											"\r",
											"const framedJson = frame(responseJson);\r",
											"\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == apiNS + \"Error\") {\r",
											"                responseJson = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        responseJson = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Contain Error\", () => {\r",
											"        pm.expect(responseJson[\"@type\"]).to.eql(apiNS + \"Error\")\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains Error-hasTitle \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasTitle\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasErrorDetail\");\r",
											"    });\r",
											"    var errorDetail = responseJson[apiNS + 'hasErrorDetail']\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasCode \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasCode\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasMessage \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasMessage\");\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "notExistingLO",
											"description": "Simulate a not existing Logistics Object"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get created Shipment with Piece embedded",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Shipment\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    console.log(pm.request.url.toString().split('?')[0])\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.contains(\"https://onerecord.iata.org/ns/cargo#Shipment\");\r",
											"    });\r",
											"    var goodsDesc = 'https://onerecord.iata.org/ns/cargo#goodsDescription'\r",
											"    pm.test(\"Response contains goodsDescription \", () => {\r",
											"        pm.expect(jsonData).to.have.property(goodsDesc);\r",
											"    });\r",
											"    pm.test(\"Response value goodsDescription \", () => {\r",
											"        pm.expect(jsonData[goodsDesc]).to.eql(\"Lots of awesome ONE Record information materials\");\r",
											"    });\r",
											"\r",
											"    var pieces = 'https://onerecord.iata.org/ns/cargo#pieces'\r",
											"    pm.test(\"Response contains pieces\", () => {\r",
											"        pm.expect(jsonData).to.have.property(pieces);\r",
											"    });\r",
											"\r",
											"    var piece = ''\r",
											"    if (Array.isArray(jsonData[pieces])) {\r",
											"        piece = jsonData[pieces][0]\r",
											"    } else {\r",
											"        piece = jsonData[pieces]\r",
											"    }\r",
											"    pm.test(\"Response contains pieces-@id\", () => {\r",
											"        pm.expect(piece).to.have.property('@id');\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains pieces-@type\", () => {\r",
											"        pm.expect(piece).to.have.property('@type');\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response value pieces-@type \", () => {\r",
											"        pm.expect(piece['@type']).to.contains('https://onerecord.iata.org/ns/cargo#Piece');\r",
											"    });\r",
											"\r",
											"    var coload = \"https://onerecord.iata.org/ns/cargo#coload\"\r",
											"    pm.test(\"Response contains pieces-coload\", () => {\r",
											"        pm.expect(piece).to.have.property(coload);\r",
											"    });\r",
											"\r",
											"    if (piece[coload] instanceof Object){\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(piece[coload]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#boolean');\r",
											"            pm.expect(piece[coload]['@value'].toString()).to.eql('false')\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(piece[coload]).to.eql(false);\r",
											"            pm.expect(piece[coload]).to.be.a('boolean');       \r",
											"        });\r",
											"    }\r",
											"\r",
											"    var specialHandlingCodes = \"https://onerecord.iata.org/ns/cargo#specialHandlingCodes\"\r",
											"    pm.test(\"Response contains pieces-specialHandlingCodes \", () => {\r",
											"        pm.expect(piece).to.have.property(specialHandlingCodes);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains pieces-specialHandlingCodes-@id\", () => {\r",
											"        pm.expect(piece[specialHandlingCodes]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response value pieces-specialHandlingCodes-VAL\", () => {\r",
											"        pm.expect(piece[specialHandlingCodes][\"@id\"]).to.eql('https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL');\r",
											"    });\r",
											"});\r",
											"//Update revision\r",
											"pm.collectionVariables.set(\"shipmentRevision\", pm.response.headers.get(\"Latest-Revision\"));"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId?embedded=true",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"query": [
										{
											"key": "embedded",
											"value": "true"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get created Shipment",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Shipment\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.includes(\"https://onerecord.iata.org/ns/cargo#Shipment\");\r",
											"    });\r",
											"    var goodsDesc = 'https://onerecord.iata.org/ns/cargo#goodsDescription'\r",
											"    pm.test(\"Response contains goodsDescription \", () => {\r",
											"        pm.expect(jsonData).to.have.property(goodsDesc);\r",
											"    });\r",
											"    pm.test(\"Response value goodsDescription \", () => {\r",
											"        pm.expect(jsonData[goodsDesc]).to.eql(\"Lots of awesome ONE Record information materials\");\r",
											"    });\r",
											"\r",
											"    var pieces = 'https://onerecord.iata.org/ns/cargo#pieces'\r",
											"    pm.test(\"Response contains pieces\", () => {\r",
											"        pm.expect(jsonData).to.have.property(pieces);\r",
											"    });\r",
											"\r",
											"    var piece = ''\r",
											"    if (Array.isArray(jsonData[pieces])) {\r",
											"        piece = jsonData[pieces][0]\r",
											"    } else {\r",
											"        piece = jsonData[pieces]\r",
											"    }\r",
											"    pm.test(\"Response contains pieces-@id\", () => {\r",
											"        pm.expect(piece).to.have.property('@id');\r",
											"    });\r",
											"\r",
											"});\r",
											"\r",
											"//Update revision\r",
											"pm.collectionVariables.set(\"shipmentRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get created Company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Company\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.includes(\"https://onerecord.iata.org/ns/cargo#Company\");\r",
											"    });\r",
											"    var contactPersons = 'https://onerecord.iata.org/ns/cargo#contactPersons'\r",
											"    pm.test(\"Response contains contactPersons \", () => {\r",
											"        pm.expect(jsonData).to.have.property(contactPersons);\r",
											"    });\r",
											"\r",
											"    var name = 'https://onerecord.iata.org/ns/cargo#name'\r",
											"    pm.test(\"Response contains name \", () => {\r",
											"        pm.expect(jsonData).to.have.property(name);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response value name \", () => {\r",
											"        pm.expect(jsonData[name]).to.eql('Acme Corporation');\r",
											"    });\r",
											"\r",
											"    var shortName = 'https://onerecord.iata.org/ns/cargo#shortName'\r",
											"    pm.test(\"Response contains shortName \", () => {\r",
											"        pm.expect(jsonData).to.have.property(shortName);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response value name \", () => {\r",
											"        pm.expect(jsonData[shortName]).to.eql('ACME');\r",
											"    });\r",
											"\r",
											"    var person = jsonData[contactPersons]\r",
											"\r",
											"    var firstname = 'https://onerecord.iata.org/ns/cargo#firstName'\r",
											"    pm.test(\"Response contains firstname \", () => {\r",
											"        pm.expect(person).to.have.property(firstname);\r",
											"    });\r",
											"    pm.test(\"Response value firstname \", () => {\r",
											"        pm.expect(person[firstname]).to.eql(\"Jane\");\r",
											"    });\r",
											"\r",
											"    var lastName = 'https://onerecord.iata.org/ns/cargo#lastName'\r",
											"    pm.test(\"Response contains lastName \", () => {\r",
											"        pm.expect(person).to.have.property(lastName);\r",
											"    });\r",
											"    pm.test(\"Response value lastName \", () => {\r",
											"        pm.expect(person[lastName]).to.eql(\"Doe\");\r",
											"    });\r",
											"\r",
											"\r",
											"    var salutation = 'https://onerecord.iata.org/ns/cargo#salutation'\r",
											"    pm.test(\"Response contains salutation \", () => {\r",
											"        pm.expect(person).to.have.property(salutation);\r",
											"    });\r",
											"    pm.test(\"Response value salutation \", () => {\r",
											"        pm.expect(person[salutation]).to.eql(\"Ms\");\r",
											"    });\r",
											"});\r",
											"//Update revision\r",
											"pm.collectionVariables.set(\"companyRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId?embedded=true",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"query": [
										{
											"key": "embedded",
											"value": "true"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{companyId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Add description to Piece and change Coload",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"\r",
											"var reqUrl = pm.variables.replaceIn(pm.request.url.toString());\r",
											"if (pm.response.to.be.success) {\r",
											"    // Update revisions\r",
											"    if (reqUrl.includes(pm.collectionVariables.get(\"pieceId\"))){\r",
											"        pm.collectionVariables.set(\"pieceRevision\", Number(pm.collectionVariables.get(\"pieceRevision\"))+1);\r",
											"    }\r",
											"        pm.collectionVariables.set(\"changeRequest\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"\r",
											"        //Set creation date for historical object\r",
											"    isoTimestamp = pm.variables.replaceIn('{{$isoTimestamp}}')\r",
											"    date = isoTimestamp.replaceAll('-','').replaceAll(':',\"\").split(\".\").shift() + \"Z\";\r",
											"    pm.collectionVariables.set(\"historicalChange\",date);\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\n    },\n    \"@type\": \"api:Change\",\n    \"api:hasLogisticsObject\": {\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\"\n    },\n    \"api:hasDescription\": \"Update goods description and coload\",\n    \"api:hasOperation\": [{\n            \"@type\": \"api:Operation\",\n            \"api:op\": { \"@id\": \"api:ADD\" },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#goodsDescription\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#string\",\n                \"api:hasValue\": \"ONE Record Advertisement Materials\"\n            }]\n        },\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": { \"@id\": \"api:DELETE\" },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#coload\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n                \"api:hasValue\": \"false\"\n            }]\n        },\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": { \"@id\": \"api:ADD\" },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#coload\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n                \"api:hasValue\": \"true\"\n            }]\n        }\n    ],\n    \"api:hasRevision\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\n        \"@value\": \"{{pieceRevision}}\"\n    }\n}\n",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticObjectId"
									],
									"variable": [
										{
											"key": "logisticObjectId",
											"value": "{{pieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Validate Change Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\n    },\n    \"@type\": \"api:Change\",\n    \"api:hasLogisticsObject\": {\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\"\n    },\n    \"api:hasDescription\": \"Update goods description and coload\",\n    \"api:hasOperation\": [{\n            \"@type\": \"api:Operation\",\n            \"api:op\": { \"@id\": \"api:ADD\" },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#goodsDescription\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#string\",\n                \"api:hasValue\": \"ONE Record Advertisement Materials\"\n            }]\n        },\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": { \"@id\": \"api:DELETE\" },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#coload\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n                \"api:hasValue\": \"false\"\n            }]\n        },\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": { \"@id\": \"api:ADD\" },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#coload\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n                \"api:hasValue\": \"true\"\n            }]\n        }\n    ],\n    \"api:hasRevision\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\n        \"@value\": \"{{pieceRevision}}\"\n    }\n}\n",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/action-requests/:changeRequest?status=REQUEST_ACCEPTED",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":changeRequest"
									],
									"query": [
										{
											"key": "status",
											"value": "REQUEST_ACCEPTED"
										}
									],
									"variable": [
										{
											"key": "changeRequest",
											"value": "{{changeRequest}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Piece Audit Trail",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response contains hasLatestRevision \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasLatestRevision\");\r",
											"    });\r",
											"\r",
											"    if (jsonData['https://onerecord.iata.org/ns/api#hasLatestRevision']['@value'] != \"1\") {\r",
											"        pm.test(\"Response contains hasActionRequest \", () => {\r",
											"            pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasActionRequest\");\r",
											"        });\r",
											"    }\r",
											"});\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/audit-trail",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"audit-trail"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{pieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Historical Logistics Object 404",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"// IMPORTANT - Known issue: this test fails if the @id starts with \"_\" (i.e.: _:1234). \r",
											"// In order to work please use something different like \"internal\" (i.e.: internal:1234). \r",
											"// Inject jsonld.js\r",
											"const apiNS = 'https://onerecord.iata.org/ns/api#';\r",
											"var self = {};\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 404\", () => {\r",
											"    pm.response.to.have.status(404);\r",
											"});\r",
											"//Test response header\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Response must have a error body\", () => {\r",
											"    pm.response.to.be.withBody;\r",
											"});\r",
											"\r",
											"//Test Error response payload\r",
											"var responseJson;\r",
											"if (pm.response.text()) {\r",
											"    responseJson = pm.response.json();\r",
											"} else {\r",
											"    responseJson = {}; // Handle the case where there is no response\r",
											"}\r",
											"\r",
											"const framedJson = frame(responseJson);\r",
											"\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == apiNS + \"Error\") {\r",
											"                responseJson = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        responseJson = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@id\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(responseJson['@type']).to.eql(apiNS + \"Error\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains hasTitle \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasTitle\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains Error-hasErrorDetail \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasErrorDetail\");\r",
											"    });\r",
											"    var errorDetail = responseJson[apiNS + 'hasErrorDetail']\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasCode \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasCode\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasMessage \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasMessage\");\r",
											"    });\r",
											"});\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId?at=20190926T075830Z",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"query": [
										{
											"key": "at",
											"value": "20190926T075830Z"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{pieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Historical Logistics Object 200",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											" //Set creation date for historical object\r",
											"    isoTimestamp = pm.variables.replaceIn('{{$isoTimestamp}}')\r",
											"    date = isoTimestamp.replaceAll('-','').replaceAll(':',\"\").split(\".\").shift() + \"Z\";\r",
											"    pm.collectionVariables.set(\"historicalChange\",date);"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response type presence\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"pm.test(\"Revision different from Latest revisions\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Revision\")).to.not.eql(\"Lastest-Revision\");  \r",
											"});\r",
											"\r",
											"//Update revision\r",
											"pm.collectionVariables.set(\"pieceRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId?at={{historicalChange}}",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"query": [
										{
											"key": "at",
											"value": "{{historicalChange}}"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{pieceId}}"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Patch",
					"item": [
						{
							"name": "Create a new Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Test Status Code\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"// Test Response Headers\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Piece\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Piece\")){\r",
											"    pm.collectionVariables.set(\"patchPieceId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"patchPieceRevision\", 1);\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Piece\",\n    \"cargo:coload\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n        \"@value\": \"false\"\n    },\n    \"cargo:goodsDescription\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#string\",\n        \"@value\": \"Important piece\"\n    },\n    \"cargo:specialHandlingCodes\": [\n        {\n            \"@id\": \"https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Add gross weight",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#ChangeRequest\");  \r",
											"});\r",
											"\r",
											"\r",
											"var reqUrl = pm.variables.replaceIn(pm.request.url.toString());\r",
											"if (pm.response.to.be.success) {\r",
											"    // Update revisions\r",
											"    if (reqUrl.includes(pm.collectionVariables.get(\"patchPieceId\"))){\r",
											"        pm.collectionVariables.set(\"patchPieceRevision\", Number(pm.collectionVariables.get(\"patchPieceRevision\"))+1);\r",
											"    }\r",
											"    pm.collectionVariables.set(\"addWeightCR\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\n    },\n    \"@type\": \"api:Change\",\n    \"api:hasLogisticsObject\": {\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\"\n    },\n    \"api:hasDescription\": \"Add grossWeight\",\n    \"api:hasOperation\": [\n                {\n            \"@type\": \"api:Operation\",\n            \"api:op\": {\n                \"@id\": \"api:ADD\"\n            },\n            \"api:s\": \"_:b0\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#numericalValue\",\n            \"api:o\": [\n                {\n                    \"@type\": \"api:OperationObject\",\n                    \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#double\",\n                    \"api:hasValue\": \"20.0\"\n                }\n            ]\n        },\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": {\n                \"@id\": \"api:ADD\"\n            },\n            \"api:s\": \"_:b0\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#unit\",\n            \"api:o\": [\n                {\n                    \"@type\": \"api:OperationObject\",\n                    \"api:hasDatatype\": \"https://onerecord.iata.org/ns/code-lists/MeasurementUnitCode\",\n                    \"api:hasValue\": \"https://onerecord.iata.org/ns/code-lists/MeasurementUnitCode#KGM\"\n                }\n            ]\n        },\n                {\n            \"@type\": \"api:Operation\",\n            \"api:op\": {\n                \"@id\": \"api:ADD\"\n            },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#grossWeight\",\n            \"api:o\": [\n                {\n                    \"@type\": \"api:OperationObject\",\n                    \"api:hasDatatype\": \"https://onerecord.iata.org/ns/cargo#Value\",\n                    \"api:hasValue\": \"_:b0\"\n                }\n            ]\n        }\n    ],\n    \"api:hasRevision\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\n        \"@value\": \"{{patchPieceRevision}}\"\n    }\n}\n",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticObjectId"
									],
									"variable": [
										{
											"key": "logisticObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Patch Action Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test response type\r",
											"pm.test(\"Check response type\", () => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#ChangeRequest\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/action-requests/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/api#ChangeRequest\");\r",
											"    });\r",
											"    var hasRequestStatus = \"https://onerecord.iata.org/ns/api#hasRequestStatus\"\r",
											"    pm.test(\"Response contains hasRequestStatus\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasRequestStatus);\r",
											"    });\r",
											"    var isRequestedAt = \"https://onerecord.iata.org/ns/api#isRequestedAt\"\r",
											"    pm.test(\"Response contains isRequestedAt\", () => {\r",
											"        pm.expect(jsonData).to.have.property(isRequestedAt);\r",
											"    });\r",
											"    var isRequestedBy = \"https://onerecord.iata.org/ns/api#isRequestedBy\"\r",
											"    pm.test(\"Response contains isRequestedBy\", () => {\r",
											"        pm.expect(jsonData).to.have.property(isRequestedBy);\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/action-requests/:actionRequestId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":actionRequestId"
									],
									"query": [
										{
											"key": "",
											"value": "",
											"disabled": true
										}
									],
									"variable": [
										{
											"key": "actionRequestId",
											"value": "{{addWeightCR}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Validate Change Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/action-requests/:changeRequest?status=REQUEST_ACCEPTED",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":changeRequest"
									],
									"query": [
										{
											"key": "status",
											"value": "REQUEST_ACCEPTED"
										}
									],
									"variable": [
										{
											"key": "changeRequest",
											"value": "{{addWeightCR}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get created Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"var grossWeight = 'https://onerecord.iata.org/ns/cargo#grossWeight';\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"    });\r",
											"    var coload = \"https://onerecord.iata.org/ns/cargo#coload\"\r",
											"    pm.test(\"Response contains coload\", () => {\r",
											"        pm.expect(jsonData).to.have.property(coload);\r",
											"    });\r",
											"\r",
											"    if (jsonData[coload] instanceof Object){\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#boolean');\r",
											"            pm.expect(jsonData[coload]['@value'].toString()).to.eql('false')\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]).to.eql(false);\r",
											"            pm.expect(jsonData[coload]).to.be.a('boolean');       \r",
											"        });\r",
											"    }\r",
											"\r",
											"\r",
											"    \r",
											"    let specialHandlingCodes = \"https://onerecord.iata.org/ns/cargo#specialHandlingCodes\";\r",
											"    pm.test(\"Response contains specialHandlingCodes \", () => {\r",
											"        pm.expect(jsonData).to.have.property(specialHandlingCodes);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains specialHandlingCodes-@id\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response value specialHandlingCodes-VAL\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes][\"@id\"]).to.eql('https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL');\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains grossWeight \", () => {\r",
											"        pm.expect(jsonData).to.have.property(grossWeight);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains grossWeight-id \", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains grossWeight-type \", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value grossWeight-type \", () => {\r",
											"        pm.expect(jsonData[grossWeight]['@type']).to.eql(\"https://onerecord.iata.org/ns/cargo#Value\");\r",
											"    });\r",
											"    var numericalValue = 'https://onerecord.iata.org/ns/cargo#numericalValue'\r",
											"    pm.test(\"Response contains grossWeight-numericalValue\", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(numericalValue);\r",
											"    });\r",
											"    pm.test(\"Response contains grossWeight-numericalValue-type\", () => {\r",
											"        pm.expect(jsonData[grossWeight][numericalValue]).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response contains grossWeight-numericalValue-value\", () => {\r",
											"        pm.expect(jsonData[grossWeight][numericalValue]).to.have.property(\"@value\");\r",
											"    });\r",
											"    pm.test(\"Response value grossWeight-numericalValue-value\", () => {\r",
											"        pm.expect(parseFloat(jsonData[grossWeight][numericalValue][\"@value\"])).to.eql(parseFloat(\"20.0\"));\r",
											"    });\r",
											"    var unit = 'https://onerecord.iata.org/ns/cargo#unit'\r",
											"    pm.test(\"Response contains grossWeight-unit\", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(unit);\r",
											"    });\r",
											"    pm.test(\"Response value grossWeight-unit\", () => {\r",
											"        pm.expect(jsonData[grossWeight][unit]['@id']).to.eql('https://onerecord.iata.org/ns/code-lists/MeasurementUnitCode#KGM');\r",
											"    });\r",
											"    if (jsonData[grossWeight] != null && jsonData[grossWeight]['@id'] != null) {\r",
											"        pm.collectionVariables.set(\"internalNodeId\", jsonData[grossWeight]['@id']);\r",
											"    }\r",
											"});\r",
											"\r",
											"//Update variables\r",
											"pm.collectionVariables.set(\"patchPieceRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId?embedded=true",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"query": [
										{
											"key": "embedded",
											"value": "true"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Change gross weight",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#ChangeRequest\");  \r",
											"});\r",
											"\r",
											"var reqUrl = pm.variables.replaceIn(pm.request.url.toString());\r",
											"if (pm.response.to.be.success) {\r",
											"    // Update revisions\r",
											"    if (reqUrl.includes(pm.collectionVariables.get(\"patchPieceId\"))){\r",
											"        pm.collectionVariables.set(\"patchPieceRevision\", Number(pm.collectionVariables.get(\"patchPieceRevision\"))+1);\r",
											"    }\r",
											"        pm.collectionVariables.set(\"changeWeightCR\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\n    },\n    \"@type\": \"api:Change\",\n    \"api:hasLogisticsObject\": {\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\"\n    },\n    \"api:hasDescription\": \"Change grossWeight\",\n    \"api:hasOperation\": [{\n            \"@type\": \"api:Operation\",\n            \"api:op\": {\n                \"@id\": \"api:DELETE\"\n            },\n            \"api:s\": \"{{internalNodeId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#numericalValue\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#double\",\n                \"api:hasValue\": \"20.0\"\n            }]\n        },\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": {\n                \"@id\": \"api:ADD\"\n            },\n            \"api:s\": \"{{internalNodeId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#numericalValue\",\n            \"api:o\": [{\n                \"@type\": \"api:OperationObject\",\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#double\",\n                \"api:hasValue\": \"25.0\"\n            }]\n        }\n    ],\n    \"api:hasRevision\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\n        \"@value\": \"{{patchPieceRevision}}\"\n    }\n}\n",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticObjectId"
									],
									"variable": [
										{
											"key": "logisticObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Validate Change Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/action-requests/:changeRequest?status=REQUEST_ACCEPTED",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":changeRequest"
									],
									"query": [
										{
											"key": "status",
											"value": "REQUEST_ACCEPTED"
										}
									],
									"variable": [
										{
											"key": "changeRequest",
											"value": "{{changeWeightCR}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get modified Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"var grossWeight = 'https://onerecord.iata.org/ns/cargo#grossWeight';\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    \r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"    });\r",
											"    var coload = \"https://onerecord.iata.org/ns/cargo#coload\"\r",
											"    pm.test(\"Response contains coload\", () => {\r",
											"        pm.expect(jsonData).to.have.property(coload);\r",
											"    });\r",
											"      \r",
											"    if (jsonData[coload] instanceof Object){\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#boolean');\r",
											"            pm.expect(jsonData[coload]['@value'].toString()).to.eql('false')\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]).to.eql(false);\r",
											"            pm.expect(jsonData[coload]).to.be.a('boolean');       \r",
											"        });\r",
											"    }\r",
											"\r",
											"    let specialHandlingCodes = \"https://onerecord.iata.org/ns/cargo#specialHandlingCodes\";\r",
											"    pm.test(\"Response contains specialHandlingCodes \", () => {\r",
											"        pm.expect(jsonData).to.have.property(specialHandlingCodes);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains specialHandlingCodes-@id\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response value specialHandlingCodes-VAL\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes][\"@id\"]).to.eql('https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL');\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains grossWeight \", () => {\r",
											"        pm.expect(jsonData).to.have.property(grossWeight);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains grossWeight-id \", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains grossWeight-type \", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value grossWeight-type \", () => {\r",
											"        pm.expect(jsonData[grossWeight]['@type']).to.eql(\"https://onerecord.iata.org/ns/cargo#Value\");\r",
											"    });\r",
											"    var numericalValue = 'https://onerecord.iata.org/ns/cargo#numericalValue'\r",
											"    pm.test(\"Response contains grossWeight-numericalValue\", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(numericalValue);\r",
											"    });\r",
											"    pm.test(\"Response contains grossWeight-numericalValue-type\", () => {\r",
											"        pm.expect(jsonData[grossWeight][numericalValue]).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response contains grossWeight-numericalValue-value\", () => {\r",
											"        pm.expect(jsonData[grossWeight][numericalValue]).to.have.property(\"@value\");\r",
											"    });\r",
											"    pm.test(\"Response value grossWeight-numericalValue-value\", () => {\r",
											"        pm.expect(parseFloat(jsonData[grossWeight][numericalValue][\"@value\"])).to.eql(parseFloat(\"25.0\"));\r",
											"    });\r",
											"    var unit = 'https://onerecord.iata.org/ns/cargo#unit'\r",
											"    pm.test(\"Response contains grossWeight-unit\", () => {\r",
											"        pm.expect(jsonData[grossWeight]).to.have.property(unit);\r",
											"    });\r",
											"    pm.test(\"Response value grossWeight-unit\", () => {\r",
											"        pm.expect(jsonData[grossWeight][unit]['@id']).to.eql('https://onerecord.iata.org/ns/code-lists/MeasurementUnitCode#KGM');\r",
											"    });\r",
											"    if (jsonData[grossWeight] != null && jsonData[grossWeight]['@id'] != null) {\r",
											"        pm.collectionVariables.set(\"internalNodeId\", jsonData[grossWeight]['@id']);\r",
											"    }\r",
											"});\r",
											"\r",
											"//Update variables\r",
											"pm.collectionVariables.set(\"patchPieceRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId?embedded=true",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"query": [
										{
											"key": "embedded",
											"value": "true"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Delete gross weight",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#ChangeRequest\");  \r",
											"});\r",
											"\r",
											"var reqUrl = pm.variables.replaceIn(pm.request.url.toString());\r",
											"if (pm.response.to.be.success) {\r",
											"    // Update revisions\r",
											"    if (reqUrl.includes(pm.collectionVariables.get(\"patchPieceId\"))){\r",
											"        pm.collectionVariables.set(\"patchPieceRevision\", Number(pm.collectionVariables.get(\"patchPieceRevision\"))+1);\r",
											"    }\r",
											"            pm.collectionVariables.set(\"deleteWeightCR\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:Change\",\r\n    \"api:hasLogisticsObject\": {\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\"\r\n    },\r\n    \"api:hasDescription\": \"delete grossWeight\",\r\n    \"api:hasOperation\": [\r\n        {\r\n            \"@type\": \"api:Operation\",\r\n            \"api:op\": {\r\n                \"@id\": \"api:DELETE\"\r\n            },\r\n            \"api:s\": \"{{internalNodeId}}\",\r\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#unit\",\r\n            \"api:o\": [\r\n                {\r\n                    \"@type\": \"api:OperationObject\",\r\n                    \"api:hasDatatype\": \"https://onerecord.iata.org/ns/code-lists/MeasurementUnitCode\",\r\n                    \"api:hasValue\": \"https://onerecord.iata.org/ns/code-lists/MeasurementUnitCode#KGM\"\r\n                }\r\n            ]\r\n        },\r\n        {\r\n            \"@type\": \"api:Operation\",\r\n            \"api:op\": {\r\n                \"@id\": \"api:DELETE\"\r\n            },\r\n            \"api:s\": \"{{internalNodeId}}\",\r\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#numericalValue\",\r\n            \"api:o\": [{\r\n                \"@type\": \"api:OperationObject\",\r\n                \"api:hasDatatype\": \"http://www.w3.org/2001/XMLSchema#double\",\r\n                \"api:hasValue\": \"25.0\"\r\n            }]\r\n        },\r\n        {\r\n            \"@type\": \"api:Operation\",\r\n            \"api:op\": {\r\n                \"@id\": \"api:DELETE\"\r\n            },\r\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\",\r\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#grossWeight\",\r\n            \"api:o\": [{\r\n                \"@type\": \"api:OperationObject\",\r\n                \"api:hasDatatype\": \"https://onerecord.iata.org/ns/cargo#Value\",\r\n                \"api:hasValue\": \"{{internalNodeId}}\"\r\n            }]\r\n        }\r\n    ],\r\n    \"api:hasRevision\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\r\n        \"@value\": \"{{patchPieceRevision}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticObjectId"
									],
									"variable": [
										{
											"key": "logisticObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Validate Change Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/action-requests/:changeRequest?status=REQUEST_ACCEPTED",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":changeRequest"
									],
									"query": [
										{
											"key": "status",
											"value": "REQUEST_ACCEPTED"
										}
									],
									"variable": [
										{
											"key": "changeRequest",
											"value": "{{deleteWeightCR}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Wrong Patch Operation",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test response code\r",
											"//IMPORTANT: this test should not change the Logistics Object!!!\r",
											"pm.test(\"Response Status code is 400\", () => {\r",
											"    pm.response.to.have.status(400);\r",
											"});\r",
											"\r",
											"pm.test(\"Content-Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"\r",
											"pm.test(\"Response must have a error body\", () => {\r",
											"    pm.response.to.be.withBody;\r",
											"});\r",
											"\r",
											"\r",
											"\r",
											"//Test response payload\r",
											"\r",
											"if (pm.response.to.be.badRequest) {\r",
											"    //Test Error response payload\r",
											"var jsonData;\r",
											"if (pm.response.text()) {\r",
											"    jsonData = pm.response.json();\r",
											"} else {\r",
											"    jsonData = {}; // Handle the case where there is no response\r",
											"}\r",
											"\r",
											"    const framedJson = frame(jsonData)\r",
											"    console.log(framedJson)\r",
											"    framedJson.then(function (result) {\r",
											"        if (result['@graph']) {\r",
											"            result['@graph'].forEach((element) => {\r",
											"                if (element['@type'] == 'https://onerecord.iata.org/ns/api#Error') {\r",
											"                    jsonData = element;\r",
											"                }\r",
											"            })\r",
											"        } else {\r",
											"            jsonData = result;\r",
											"        }\r",
											"\r",
											"        pm.test(\"Response contains @id \", () => {\r",
											"            pm.expect(jsonData).to.have.property(\"@id\");\r",
											"        });\r",
											"\r",
											"        pm.test(\"Response contains @type \", () => {\r",
											"            pm.expect(jsonData).to.have.property(\"@type\");\r",
											"        });\r",
											"        pm.test(\"Response value @type \", () => {\r",
											"            pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/api#Error\");\r",
											"        });\r",
											"\r",
											"        pm.test(\"Response contains hasTitle \", () => {\r",
											"            pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasTitle\");\r",
											"        });\r",
											"\r",
											"        pm.test(\"Response contains hasErrorDetail \", () => {\r",
											"            pm.expect(jsonData).to.have.property(\"https://onerecord.iata.org/ns/api#hasErrorDetail\");\r",
											"        });\r",
											"    });\r",
											"}\r",
											"\r",
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "//Wrong construction of the JSON payload \r\n{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:Change\",\r\n    \"api:hasLogisticsObject\": [\r\n        {\r\n            \"@type\": \"cargo:LogisticsObject\",\r\n            \"@id\": \"https://1r.example.com/logistics-objects/{{patchPieceId}}\"\r\n        }\r\n    ],    \r\n    \"api:hasDescription\": \"add LogisticsEvent\",\r\n    \"api:hasOperation\": [\r\n        {\r\n            \"@type\": \"api:Operation\",\r\n            \"api:op\": { \"@id\": \"api:ADD\" },\r\n            \"api:subject\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\",\r\n            \"api:predicate\": \"https://onerecord.iata.org/ns/cargo#hasLogisticsEvent\",\r\n            \"api:obj\": [\r\n                {\r\n                    \"@type\": \"api:OperationObject\",\r\n                    \"api:hasDatatype\": \"https://onerecord.iata.org/ns/cargo#LogisticsEvent\",\r\n                    \"api:hasValue\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}/logistics-events/c9ab534e-3246-48d3-b34d-bb380bd98af7\"\r\n                }\r\n            ]\r\n        }             \r\n    ],    \r\n    \"api:hasRevision\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\r\n        \"@value\": \"{{patchPieceRevision}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticObjectId"
									],
									"variable": [
										{
											"key": "logisticObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get final Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"\r",
											"    var handlingInstructions = \"https://onerecord.iata.org/ns/cargo#handlingInstructions\"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.include(\"https://onerecord.iata.org/ns/cargo#Piece\");\r",
											"    });\r",
											"    var coload = \"https://onerecord.iata.org/ns/cargo#coload\"\r",
											"    pm.test(\"Response contains coload\", () => {\r",
											"        pm.expect(jsonData).to.have.property(coload);\r",
											"    });\r",
											"\r",
											"    if (jsonData[coload] instanceof Object){\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#boolean');\r",
											"            pm.expect(jsonData[coload]['@value'].toString()).to.eql('false')\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value coload \", () => {\r",
											"            pm.expect(jsonData[coload]).to.eql(false);\r",
											"            pm.expect(jsonData[coload]).to.be.a('boolean');       \r",
											"        });\r",
											"    }\r",
											"    let specialHandlingCodes = \"https://onerecord.iata.org/ns/cargo#specialHandlingCodes\";\r",
											"    pm.test(\"Response contains specialHandlingCodes \", () => {\r",
											"        pm.expect(jsonData).to.have.property(specialHandlingCodes);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains specialHandlingCodes-@id\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes]).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response value specialHandlingCodes-VAL\", () => {\r",
											"        pm.expect(jsonData[specialHandlingCodes][\"@id\"]).to.eql('https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL');\r",
											"    });\r",
											"});\r",
											"//Update variables\r",
											"pm.collectionVariables.set(\"pieceRevision\", pm.response.headers.get(\"Latest-Revision\"));\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{patchPieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a new Shipment",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Test Status Code\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"// Test Response Headers\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Shipment\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Shipment\")){\r",
											"    pm.collectionVariables.set(\"patchShipmentId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"patchShipmentRevision\", 1);\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Shipment\",\n    \"cargo:goodsDescription\": \"Valuable cargo\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Link shipment with piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#ChangeRequest\");  \r",
											"});\r",
											"\r",
											"\r",
											"var reqUrl = pm.variables.replaceIn(pm.request.url.toString());\r",
											"if (pm.response.to.be.success) {\r",
											"    pm.collectionVariables.set(\"patchRequestShipment\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    // Update revisions\r",
											"    if (reqUrl.includes(pm.collectionVariables.get(\"patchShipmentId\"))){\r",
											"        pm.collectionVariables.set(\"patchShipmentRevision\", Number(pm.collectionVariables.get(\"patchPieceRevision\"))+1);\r",
											"    }\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\n    },\n    \"@type\": \"api:Change\",\n    \"api:hasLogisticsObject\": {\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{patchShipmentId}}\"\n    },\n    \"api:hasDescription\": \"Link shipment with piece\",\n    \"api:hasOperation\": [\n        {\n            \"@type\": \"api:Operation\",\n            \"api:op\": {\n                \"@id\": \"api:ADD\"\n            },\n            \"api:s\": \"{{baseUrl}}/logistics-objects/{{patchShipmentId}}\",\n            \"api:p\": \"https://onerecord.iata.org/ns/cargo#pieces\",\n            \"api:o\": [\n                {\n                    \"@type\": \"api:OperationObject\",\n                    \"api:hasDatatype\": \"https://onerecord.iata.org/ns/cargo#Piece\",\n                    \"api:hasValue\": \"{{baseUrl}}/logistics-objects/{{patchPieceId}}\"\n                }\n            ]\n        }\n    ],\n    \"api:hasRevision\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#positiveInteger\",\n        \"@value\": \"{{patchShipmentRevision}}\"\n    }\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticObjectId"
									],
									"variable": [
										{
											"key": "logisticObjectId",
											"value": "{{patchShipmentId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Validate Change Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/action-requests/:changeRequest?status=REQUEST_ACCEPTED",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":changeRequest"
									],
									"query": [
										{
											"key": "status",
											"value": "REQUEST_ACCEPTED"
										}
									],
									"variable": [
										{
											"key": "changeRequest",
											"value": "{{patchRequestShipment}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get final Shipment",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response headers\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.filter(header => header.key.toLowerCase().includes(\"type\")).map(header=>header.value)).to.include(\"https://onerecord.iata.org/ns/cargo#Shipment\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Revision\");\r",
											"});\r",
											"pm.test(\"Latest-Revision header is present\", () => {\r",
											"    pm.response.to.have.header(\"Latest-Revision\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString().split('?').shift()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.include(\"https://onerecord.iata.org/ns/cargo#Shipment\");\r",
											"    });\r",
											"    var pieces = \"https://onerecord.iata.org/ns/cargo#pieces\"\r",
											"    pm.test(\"Response contains pieces\", () => {\r",
											"        pm.expect(jsonData).to.have.property(pieces);\r",
											"    });\r",
											"    pm.test(\"Response value Pieces\", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\" + pm.variables.get(\"patchPieceId\");\r",
											"        pm.expect(jsonData[pieces]['@id']).to.eql(expectedValue);\r",
											"    });\r",
											"});\r",
											"\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{patchShipmentId}}"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			],
			"description": "This folder contains all unit tests for Logistics Objects endpoint. For more information visit : [ONE Record Logistics Objects](https://iata-cargo.github.io/ONE-Record/logistics-objects/)\n\n**Important**: Tests should be run using the defined order as each test saves variable for the next one."
		},
		{
			"name": "Logistics Events",
			"item": [
				{
					"name": "Prerequisite",
					"item": [
						{
							"name": "Create a Company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Create a company to be used in the Logistics Events Test\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Company\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Company\")){\r",
											"    pm.collectionVariables.set(\"companyId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"companyRevision\", 1);\r",
											"    pm.collectionVariables.set(\"companyCreationTime\", Date.now());\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": [\n        \"cargo:Company\",\n        \"cargo:Organization\",\n        \"cargo:LogisticsAgent\",\n        \"cargo:LogisticsObject\"\n    ],\n    \"cargo:name\": \"Acme Corporation\",\n    \"cargo:shortName\": \"ACME\",\n    \"cargo:contactPersons\": [\n        {\n            \"@type\": [\n                \"cargo:Person\",\n                \"cargo:Actor\",\n                \"cargo:LogisticsAgent\",\n                \"cargo:LogisticsObject\"\n            ],\n            \"cargo:firstName\": \"Jane\",\n            \"cargo:lastName\": \"Doe\",\n            \"cargo:salutation\": \"Ms\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a Shipment",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Shipment\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Shipment\")){\r",
											"    pm.collectionVariables.set(\"shipmentId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"shipmentRevision\", 1);\r",
											"    pm.collectionVariables.set(\"shipmentCreationTime\", Date.now());\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Shipment\",\n    \"cargo:goodsDescription\": \"Lots of awesome ONE Record information materials\"\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Create",
					"item": [
						{
							"name": "Add Shipment Test Event",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#LogisticsEvent\");  \r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\r\n    },\r\n    \"@type\": \"cargo:LogisticsEvent\",\r\n    \"cargo:creationDate\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\r\n        \"@value\": \"2023-10-01T10:38:01.000Z\"\r\n    },\r\n    \"cargo:eventDate\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\r\n        \"@value\": \"2023-10-01T10:38:01.000Z\"\r\n    },\r\n    \"cargo:eventCode\": {\r\n        \"@id\": \"https://1r.example.com/ns/eventCodes#TEST\"\r\n    },\r\n    \"cargo:eventName\": \"Test Event on shipment record\",\r\n    \"cargo:eventTimeType\": {\r\n        \"@type\": \"cargo:EventTimeType\",\r\n        \"@id\": \"cargo:ACTUAL\"\r\n    },    \"cargo:partialEventIndicator\": false,\r\n    \"cargo:eventFor\": {\r\n        \"@type\": \"cargo:Shipment\",\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{shipmentId}}\"\r\n    },\r\n    \"cargo:recordingOrganization\": {\r\n        \"@type\": \"cargo:Company\",\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Add Shipment Departed Event",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#LogisticsEvent\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"pm.collectionVariables.set(\"LEId\", pm.response.headers.get(\"Location\").split(\"/\").pop());"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\r\n    },\r\n    \"@type\": \"cargo:LogisticsEvent\",\r\n    \"cargo:creationDate\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\r\n        \"@value\": \"2023-04-01T10:38:01.000Z\"\r\n    },\r\n    \"cargo:eventDate\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\r\n        \"@value\": \"2023-04-01T10:38:01.000Z\"\r\n    },\r\n    \"cargo:eventCode\": {\r\n        \"@id\": \"https://onerecord.iata.org/ns/code-lists/StatusCode#DEP\"\r\n    },\r\n    \"cargo:eventName\": \"Consignment departed on a specific flight\",\r\n    \"cargo:eventTimeType\": {\r\n        \"@type\": \"cargo:EventTimeType\",\r\n        \"@id\": \"cargo:ACTUAL\"\r\n    },\r\n    \"cargo:partialEventIndicator\": false,\r\n    \"cargo:eventFor\": {\r\n        \"@type\": \"cargo:Shipment\",\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{shipmentId}}\"\r\n    },\r\n    \"cargo:recordingOrganization\": {\r\n        \"@type\": \"cargo:Company\",\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Add event on a not existing Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"const apiNS = 'https://onerecord.iata.org/ns/api#';\r",
											"var self = {};\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 404\", () => {\r",
											"    pm.response.to.have.status(404);\r",
											"});\r",
											"\r",
											"pm.test(\"Response must have a error body\", () => {\r",
											"    pm.response.to.be.withBody;\r",
											"});\r",
											"\r",
											"//Test Error response payload\r",
											"var responseJson;\r",
											"if (pm.response.text()) {\r",
											"    responseJson = pm.response.json();\r",
											"} else {\r",
											"    responseJson = {}; // Handle the case where there is no response\r",
											"}\r",
											"\r",
											"const framedJson = frame(responseJson);\r",
											"\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == apiNS + \"Error\") {\r",
											"                responseJson = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        responseJson = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Contain Error\", () => {\r",
											"        pm.expect(responseJson[\"@type\"]).to.eql(apiNS + \"Error\")\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains Error-hasTitle \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasTitle\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasErrorDetail\");\r",
											"    });\r",
											"    var errorDetail = responseJson[apiNS + 'hasErrorDetail']\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasCode \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasCode\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasMessage \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasMessage\");\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\r\n    },\r\n    \"@type\": \"cargo:LogisticsEvent\",\r\n    \"cargo:creationDate\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\r\n        \"@value\": \"2023-04-01T10:38:01.000Z\"\r\n    },\r\n    \"cargo:eventDate\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#dateTime\",\r\n        \"@value\": \"2023-04-01T10:38:01.000Z\"\r\n    },\r\n    \"cargo:eventCode\": {\r\n        \"@id\": \"https://onerecord.iata.org/ns/code-lists/StatusCode#DEP\"\r\n    },\r\n    \"cargo:eventName\": \"Consignment departed on a specific flight\",\r\n    \"cargo:eventTimeType\": {\r\n        \"@type\": \"cargo:EventTimeType\",\r\n        \"@id\": \"cargo:ACTUAL\"\r\n    },    \"cargo:partialEventIndicator\": false,\r\n    \"cargo:eventFor\": {\r\n        \"@type\": \"cargo:Shipment\",\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{shipmentId}}\"\r\n    },\r\n    \"cargo:recordingOrganization\": {\r\n        \"@type\": \"cargo:Company\",\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "NotExistingLO",
											"description": "Setup to not existing logistics object"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Get",
					"item": [
						{
							"name": "Get a Logistics Event",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test response code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response type presence\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test response type\r",
											"pm.test(\"Check type\", () => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#LogisticsEvent\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/logistics-objects/{{logisticsObject}}/logistics-events/{{logisticsEvent}}/ \", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/logistics-objects/\" + pm.variables.get(\"shipmentId\") + \"/logistics-events/\" + pm.variables.get(\"LEId\");\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/cargo#LogisticsEvent\");\r",
											"    });\r",
											"    var creationDate = \"https://onerecord.iata.org/ns/cargo#creationDate\";\r",
											"    pm.test(\"Response contains creationDate\", () => {\r",
											"        pm.expect(jsonData).to.have.property(creationDate);\r",
											"    });\r",
											"    //Creation Date value is set by the server\r",
											"    pm.test(\"Response value creationDate \", () => {\r",
											"        pm.expect(jsonData[creationDate]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#dateTime');\r",
											"    });\r",
											"    var eventDate = \"https://onerecord.iata.org/ns/cargo#eventDate\";\r",
											"    pm.test(\"Response contains eventDate\", () => {\r",
											"        pm.expect(jsonData).to.have.property(eventDate);\r",
											"    });\r",
											"    pm.test(\"Response value eventDate \", () => {\r",
											"        pm.expect(jsonData[eventDate]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#dateTime');\r",
											"        pm.expect(jsonData[eventDate]['@value']).to.eql('2023-04-01T10:38:01Z');\r",
											"    });\r",
											"\r",
											"    var eventCode = 'https://onerecord.iata.org/ns/cargo#eventCode';\r",
											"    pm.test(\"Response contains eventCode\", () => {\r",
											"        pm.expect(jsonData).to.have.property(eventCode);\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response value eventCode\", () => {\r",
											"        pm.expect(jsonData[eventCode]['@id']).to.eql('https://onerecord.iata.org/ns/code-lists/StatusCode#DEP');\r",
											"    });\r",
											"\r",
											"    var eventName = 'https://onerecord.iata.org/ns/cargo#eventName';\r",
											"    pm.test(\"Response contains eventName\", () => {\r",
											"        pm.expect(jsonData).to.have.property(eventName);\r",
											"    });\r",
											"    pm.test(\"Response value eventName\", () => {\r",
											"        pm.expect(jsonData[eventName]).to.eql('Consignment departed on a specific flight');\r",
											"    });\r",
											"\r",
											"    var eventTimeType = 'https://onerecord.iata.org/ns/cargo#eventTimeType';\r",
											"    pm.test(\"Response contains eventTimeType\", () => {\r",
											"        pm.expect(jsonData).to.have.property(eventTimeType);\r",
											"    });\r",
											"    pm.test(\"Response value eventTimeType \", () => {\r",
											"        if ('@type' in jsonData[eventTimeType]) {\r",
											"            pm.expect(jsonData[eventTimeType]['@type']).to.eql('https://onerecord.iata.org/ns/cargo#EventTimeType');\r",
											"        }\r",
											"        pm.expect(jsonData[eventTimeType]['@id']).to.eql('https://onerecord.iata.org/ns/cargo#ACTUAL');\r",
											"    });\r",
											"\r",
											"    var eventFor = \"https://onerecord.iata.org/ns/cargo#eventFor\";\r",
											"    pm.test(\"Response contains eventFor\", () => {\r",
											"        pm.expect(jsonData).to.have.property(eventFor);\r",
											"    });\r",
											"    pm.test(\"Response value eventFor \", () => {\r",
											"        if ('@type' in jsonData[eventFor]) {\r",
											"            pm.expect(jsonData[eventFor]['@type']).to.eql('https://onerecord.iata.org/ns/cargo#Shipment');\r",
											"        }\r",
											"        pm.expect(jsonData[eventFor]['@id']).to.eql(pm.variables.get(\"baseUrl\") + \"/logistics-objects/\" + pm.variables.get(\"shipmentId\"));\r",
											"    });\r",
											"\r",
											"    var recordingOrganization = \"https://onerecord.iata.org/ns/cargo#recordingOrganization\";\r",
											"    pm.test(\"Response contains recordingOrganization\", () => {\r",
											"        pm.expect(jsonData).to.have.property(recordingOrganization);\r",
											"    });\r",
											"    pm.test(\"Response value recordingOrganization \", () => {\r",
											"        if ('@type' in jsonData[recordingOrganization]) {\r",
											"            pm.expect(jsonData[recordingOrganization]['@type']).to.eql('https://onerecord.iata.org/ns/cargo#Company');\r",
											"        }\r",
											"        pm.expect(jsonData[recordingOrganization]['@id']).to.eql(pm.variables.get(\"baseUrl\") + \"/logistics-objects/\" + pm.variables.get(\"companyId\"));\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events/:logisticsEventId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events",
										":logisticsEventId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										},
										{
											"key": "logisticsEventId",
											"value": "{{LEId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get a not existing Logistics Event",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"const apiNS = 'https://onerecord.iata.org/ns/api#';\r",
											"var self = {};\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 404\", () => {\r",
											"    pm.response.to.have.status(404);\r",
											"});\r",
											"\r",
											"pm.test(\"Response must have a error body\", () => {\r",
											"    pm.response.to.be.withBody;\r",
											"});\r",
											"\r",
											"//Test Error response payload\r",
											"var responseJson;\r",
											"if (pm.response.text()) {\r",
											"    responseJson = pm.response.json();\r",
											"} else {\r",
											"    responseJson = {}; // Handle the case where there is no response\r",
											"}\r",
											"const framedJson = frame(responseJson);\r",
											"\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == apiNS + \"Error\") {\r",
											"                responseJson = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        responseJson = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Contain Error\", () => {\r",
											"        pm.expect(responseJson[\"@type\"]).to.eql(apiNS + \"Error\")\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains Error-hasTitle \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasTitle\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasErrorDetail\");\r",
											"    });\r",
											"    var errorDetail = responseJson[apiNS + 'hasErrorDetail']\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasCode \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasCode\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasMessage \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasMessage\");\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events/:logisticsEventId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events",
										":logisticsEventId"
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{pieceId}}"
										},
										{
											"key": "logisticsEventId",
											"value": "notExisingLE",
											"description": "Setup to not exiting Logistics Event"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get all Logistics Events of a Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test response code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response type presence\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test response type\r",
											"pm.test(\"Check type\", () => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#Collection\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == 'https://onerecord.iata.org/ns/api#Collection') {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/api#Collection\");\r",
											"    });\r",
											"\r",
											"    var hasTotalItems = 'https://onerecord.iata.org/ns/api#hasTotalItems';\r",
											"    pm.test(\"Response contains hasTotalItems\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasTotalItems);\r",
											"    });\r",
											"    if (jsonData[hasTotalItems]['@value']){\r",
											"        pm.test(\"Response value hasTotalItems\", () => {\r",
											"            pm.expect(parseInt(jsonData[hasTotalItems]['@value'])).to.eql(2);\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value hasTotalItems\", () => {\r",
											"            pm.expect(parseInt(jsonData[hasTotalItems])).to.eql(2);\r",
											"        });\r",
											"    }\r",
											"  \r",
											"    var hasItem = 'https://onerecord.iata.org/ns/api#hasItem';\r",
											"    pm.test(\"Response contains hasItem\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasItem);\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events/",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events",
										""
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get all Logistics Events DEP of a Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test response code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response type presence\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test response type\r",
											"pm.test(\"Check type\", () => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#Collection\");\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == 'https://onerecord.iata.org/ns/api#Collection') {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/api#Collection\");\r",
											"    });\r",
											"\r",
											"    var hasTotalItems = 'https://onerecord.iata.org/ns/api#hasTotalItems';\r",
											"    if (jsonData[hasTotalItems]['@value']){\r",
											"        pm.test(\"Response value hasTotalItems\", () => {\r",
											"            pm.expect(parseInt(jsonData[hasTotalItems]['@value'])).to.eql(1);\r",
											"        });\r",
											"    } else {\r",
											"        pm.test(\"Response value hasTotalItems\", () => {\r",
											"            pm.expect(parseInt(jsonData[hasTotalItems])).to.eql(1);\r",
											"        });\r",
											"    }\r",
											"\r",
											"    var hasItem = 'https://onerecord.iata.org/ns/api#hasItem';\r",
											"    pm.test(\"Response contains hasItem\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasItem);\r",
											"    });\r",
											"\r",
											"    var hasItem = 'https://onerecord.iata.org/ns/api#hasItem';\r",
											"    var eventCode = 'https://onerecord.iata.org/ns/cargo#eventCode';\r",
											"    //The following test can fail according on how the return body is implemented.\r",
											"    //The test checks that the only returned event has event-code=https://onerecord.iata.org/ns/code-lists/StatusCode#DEP.\r",
											"    //Please check the error and adjust the test.\r",
											"    pm.test(\"event-code=DEP inside hasItem\", () => {\r",
											"        pm.expect(jsonData[hasItem][eventCode]['@id']).to.eql('https://onerecord.iata.org/ns/code-lists/StatusCode#DEP');\r",
											"    });\r",
											"});\r",
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects/:logisticsObjectId/logistics-events/?event-code=DEP",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects",
										":logisticsObjectId",
										"logistics-events",
										""
									],
									"query": [
										{
											"key": "event-code",
											"value": "DEP"
										}
									],
									"variable": [
										{
											"key": "logisticsObjectId",
											"value": "{{shipmentId}}"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		},
		{
			"name": "Subscriptions",
			"item": [
				{
					"name": "Prerequisite",
					"item": [
						{
							"name": "Create a Company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Create a company to be used in the Logistics Events Test\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Company\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Company\")){\r",
											"    pm.collectionVariables.set(\"extCompany\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"}"
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": [\n        \"cargo:Company\",\n        \"cargo:Organization\",\n        \"cargo:LogisticsAgent\",\n        \"cargo:LogisticsObject\"\n    ],\n    \"cargo:name\": \"Ground Handling Agent\",\n    \"cargo:shortName\": \"GHA\",\n    \"cargo:contactPersons\": [\n        {\n            \"@type\": [\n                \"cargo:Person\",\n                \"cargo:Actor\",\n                \"cargo:LogisticsAgent\",\n                \"cargo:LogisticsObject\"\n            ],\n            \"cargo:firstName\": \"Jane\",\n            \"cargo:lastName\": \"Doe\",\n            \"cargo:salutation\": \"Ms\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Test Status Code\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"// Test Response Headers\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Piece\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Piece\")){\r",
											"    pm.collectionVariables.set(\"pieceId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"pieceRevision\", 1);\r",
											"\r",
											"    //Set creation date for historical object\r",
											"    isoTimestamp = pm.variables.replaceIn('{{$isoTimestamp}}')\r",
											"    date = isoTimestamp.replaceAll('-','').replaceAll(':',\"\").split(\".\").shift() + \"Z\";\r",
											"    pm.collectionVariables.set(\"historicalCreation\",date);\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Piece\",\n    \"cargo:coload\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n        \"@value\": \"false\"\n    },\n    \"cargo:goodsDescription\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#string\",\n        \"@value\": \"Important piece\"\n    },\n    \"cargo:specialHandlingCodes\": [\n        {\n            \"@id\": \"https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Get",
					"item": [
						{
							"name": "Get Subscription for a Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"pm.test(\"Content-Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == 'https://onerecord.iata.org/ns/api#Subscription') {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/api#Subscription\");\r",
											"    });\r",
											"\r",
											"    var hasContentType = \"https://onerecord.iata.org/ns/api#hasContentType\";\r",
											"    if (jsonData[hasContentType]) {\r",
											"        pm.test(\"Response contains hasContentType\", () => {\r",
											"            pm.expect(jsonData).to.have.property(hasContentType);\r",
											"        });\r",
											"        pm.test(\"Response value hasContentType \", () => {\r",
											"            pm.expect(jsonData[hasContentType]).to.eql('application/ld+json');\r",
											"        });\r",
											"    }\r",
											"    var hasSubscriber = \"https://onerecord.iata.org/ns/api#hasSubscriber\";\r",
											"    pm.test(\"Response contains hasSubscriber\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasSubscriber);\r",
											"    });\r",
											"    pm.test(\"Response value hasSubscriber \", () => {\r",
											"        pm.expect(jsonData[hasSubscriber]).to.have.property('@id');\r",
											"    });\r",
											"\r",
											"\r",
											"    var hasTopicType = \"https://onerecord.iata.org/ns/api#hasTopicType\";\r",
											"    pm.test(\"Response contains hasTopicType\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasTopicType);\r",
											"    });\r",
											"    pm.test(\"Response value hasTopicType \", () => {\r",
											"        pm.expect(jsonData[hasTopicType]['@id']).to.eql('https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_IDENTIFIER');\r",
											"    });\r",
											"\r",
											"    var includeSubscriptionEventType = \"https://onerecord.iata.org/ns/api#includeSubscriptionEventType\";\r",
											"    pm.test(\"Response contains includeSubscriptionEventType\", () => {\r",
											"        pm.expect(jsonData).to.have.property(includeSubscriptionEventType);\r",
											"    });\r",
											"    //Try to get the first includeSubscriptionEventType\r",
											"    var subEventTypes = ['https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_UPDATED', 'https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_CREATED', 'https://onerecord.iata.org/ns/api#LOGISTICS_EVENT_RECEIVED'];\r",
											"\r",
											"    pm.test(\"Response value includeSubscriptionEventType \", () => {\r",
											"        pm.expect(jsonData[includeSubscriptionEventType][0]['@id']).to.be.oneOf(subEventTypes);\r",
											"    });\r",
											"\r",
											"    var hasTopic = \"https://onerecord.iata.org/ns/api#hasTopic\";\r",
											"    pm.test(\"Response contains hasTopic\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasTopic);\r",
											"    });\r",
											"    pm.test(\"Response value hasTopic \", () => {\r",
											"        pm.expect(jsonData[hasTopic]['@value']).to.eql(pm.variables.get(\"baseUrl\") + '/logistics-objects/' + pm.variables.get(\"pieceId\"));\r",
											"    });\r",
											"});\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {},
										"requests": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions?topicType=https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_IDENTIFIER&topic={{baseUrl}}/logistics-objects/{{pieceId}}",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									],
									"query": [
										{
											"key": "topicType",
											"value": "https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_IDENTIFIER"
										},
										{
											"key": "topic",
											"value": "{{baseUrl}}/logistics-objects/{{pieceId}}"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Subscription for all Shipment Logistics Objects",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"pm.test(\"Content-Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == 'https://onerecord.iata.org/ns/api#Subscription') {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.eql(\"https://onerecord.iata.org/ns/api#Subscription\");\r",
											"    });\r",
											"\r",
											"    var hasContentType = \"https://onerecord.iata.org/ns/api#hasContentType\";\r",
											"    if (jsonData[hasContentType]) {\r",
											"        pm.test(\"Response contains hasContentType\", () => {\r",
											"            pm.expect(jsonData).to.have.property(hasContentType);\r",
											"        });\r",
											"        pm.test(\"Response value hasContentType \", () => {\r",
											"            pm.expect(jsonData[hasContentType]).to.eql('application/ld+json');\r",
											"        });\r",
											"    }\r",
											"    var hasSubscriber = \"https://onerecord.iata.org/ns/api#hasSubscriber\";\r",
											"    pm.test(\"Response contains hasSubscriber\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasSubscriber);\r",
											"    });\r",
											"    pm.test(\"Response value hasSubscriber \", () => {\r",
											"        pm.expect(jsonData[hasSubscriber]).to.have.property('@id');\r",
											"    });\r",
											"\r",
											"\r",
											"    var hasTopicType = \"https://onerecord.iata.org/ns/api#hasTopicType\";\r",
											"    pm.test(\"Response contains hasTopicType\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasTopicType);\r",
											"    });\r",
											"    pm.test(\"Response value hasTopicType \", () => {\r",
											"        pm.expect(jsonData[hasTopicType]['@id']).to.eql('https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_TYPE');\r",
											"    });\r",
											"\r",
											"    var includeSubscriptionEventType = \"https://onerecord.iata.org/ns/api#includeSubscriptionEventType\";\r",
											"    pm.test(\"Response contains includeSubscriptionEventType\", () => {\r",
											"        pm.expect(jsonData).to.have.property(includeSubscriptionEventType);\r",
											"    });\r",
											"    //Try to get the first includeSubscriptionEventType\r",
											"    var subEventTypes = ['https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_UPDATED', 'https://onerecord.iata.org/ns/api#LOGISTICS_OBJECT_CREATED', 'https://onerecord.iata.org/ns/api#LOGISTICS_EVENT_RECEIVED'];\r",
											"\r",
											"    pm.test(\"Response value includeSubscriptionEventType \", () => {\r",
											"        pm.expect(jsonData[includeSubscriptionEventType][0]['@id']).to.be.oneOf(subEventTypes);\r",
											"    });\r",
											"\r",
											"    var hasTopic = \"https://onerecord.iata.org/ns/api#hasTopic\";\r",
											"    pm.test(\"Response contains hasTopic\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasTopic);\r",
											"    });\r",
											"    pm.test(\"Response value hasTopicType \", () => {\r",
											"        pm.expect(jsonData[hasTopic]['@value']).to.eql('https://onerecord.iata.org/ns/cargo#Shipment');\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions?topicType=https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE&topic=https://onerecord.iata.org/ns/cargo%23Shipment",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									],
									"query": [
										{
											"key": "topicType",
											"value": "https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE"
										},
										{
											"key": "topic",
											"value": "https://onerecord.iata.org/ns/cargo%23Shipment"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Subscription for a non Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"const apiNS = 'https://onerecord.iata.org/ns/api#';\r",
											"var self = {};\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 400\", () => {\r",
											"    pm.response.to.have.status(400);\r",
											"});\r",
											"\r",
											"pm.test(\"Response must have a error body\", () => {\r",
											"    pm.response.to.be.withBody;\r",
											"});\r",
											"\r",
											"//Test Error response payload\r",
											"var responseJson;\r",
											"if (pm.response.text()) {\r",
											"    responseJson = pm.response.json();\r",
											"} else {\r",
											"    responseJson = {}; // Handle the case where there is no response\r",
											"}\r",
											"const framedJson = frame(responseJson);\r",
											"\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == apiNS + \"Error\") {\r",
											"                responseJson = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        responseJson = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Contain Error\", () => {\r",
											"        pm.expect(responseJson[\"@type\"]).to.eql(apiNS + \"Error\")\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains Error-hasTitle \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasTitle\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasErrorDetail\");\r",
											"    });\r",
											"    var errorDetail = responseJson[apiNS + 'hasErrorDetail']\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasCode \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasCode\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasMessage \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasMessage\");\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions?topicType=https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE&topic=https://onerecord.iata.org/ns/cargo%23Value",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									],
									"query": [
										{
											"key": "topicType",
											"value": "https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE"
										},
										{
											"key": "topic",
											"value": "https://onerecord.iata.org/ns/cargo%23Value"
										}
									]
								}
							},
							"response": []
						},
						{
							"name": "Get Subscription without a Logistics Object or Logistics object type",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"const apiNS = 'https://onerecord.iata.org/ns/api#';\r",
											"var self = {};\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test status code\r",
											"pm.test(\"Status code is 400\", () => {\r",
											"    pm.response.to.have.status(400);\r",
											"});\r",
											"\r",
											"//Test Error response payload\r",
											"var responseJson = pm.response.json();\r",
											"const framedJson = frame(responseJson);\r",
											"\r",
											"framedJson.then(function (result) {\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@type'] == apiNS + \"Error\") {\r",
											"                responseJson = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        responseJson = result;\r",
											"    }\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@id\");\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(responseJson).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Contain Error\", () => {\r",
											"        pm.expect(responseJson[\"@type\"]).to.eql(apiNS + \"Error\")\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response contains Error-hasTitle \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasTitle\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail \", () => {\r",
											"        pm.expect(responseJson).to.have.property(apiNS + \"hasErrorDetail\");\r",
											"    });\r",
											"    var errorDetail = responseJson[apiNS + 'hasErrorDetail']\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasCode \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasCode\");\r",
											"    });\r",
											"    pm.test(\"Response contains Error-hasErrorDetail-hasMessage \", () => {\r",
											"        pm.expect(errorDetail).to.have.property(apiNS + \"hasMessage\");\r",
											"    });\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"protocolProfileBehavior": {
								"disableBodyPruning": true
							},
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": ""
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions?topicType=https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									],
									"query": [
										{
											"key": "topicType",
											"value": "https://onerecord.iata.org/ns/api%23LOGISTICS_OBJECT_TYPE"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Create",
					"item": [
						{
							"name": "Subscribe to a Logistics Object",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#SubscriptionRequest\");  \r",
											"});\r",
											"//Test Location header\r",
											"pm.test(\"Check Location contains {{baseUrl}}/action-requests/ \", () => {\r",
											"    var expectedValue = pm.variables.get(\"baseUrl\")+ \"/action-requests/\";\r",
											"    pm.expect(pm.response.headers.get(\"Location\")).to.include(expectedValue);\r",
											"});\r",
											"\r",
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:Subscription\",\r\n    \"api:hasContentType\": \"application/ld+json\",\r\n    \"api:hasSubscriber\": {\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    },\r\n    \"api:hasTopicType\": {\r\n        \"@id\": \"api:LOGISTICS_OBJECT_IDENTIFIER\"\r\n    },\r\n    \"api:includeSubscriptionEventType\": [\r\n        {\r\n            \"@id\": \"api:LOGISTICS_OBJECT_UPDATED\"\r\n        },\r\n        {\r\n            \"@id\": \"api:LOGISTICS_OBJECT_CREATED\"\r\n        },\r\n        {\r\n            \"@id\": \"api:LOGISTICS_EVENT_RECEIVED\"\r\n        }\r\n    ],\r\n    \"api:hasTopic\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#anyURI\",\r\n        \"@value\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									]
								}
							},
							"response": []
						},
						{
							"name": "Subscribe to Shipment Logistics Objects",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#SubscriptionRequest\");  \r",
											"});\r",
											"\r",
											"//Test Location header\r",
											"pm.test(\"Check Location contains {{baseUrl}}/action-requests/ \", () => {\r",
											"    var expectedValue = pm.variables.get(\"baseUrl\")+ \"/action-requests/\";\r",
											"    pm.expect(pm.response.headers.get(\"Location\")).to.include(expectedValue);\r",
											"});\r",
											"\r",
											"pm.collectionVariables.set(\"ARId\", pm.response.headers.get(\"Location\").split(\"/\").pop());"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:Subscription\",\r\n    \"api:hasContentType\": \"application/ld+json\",\r\n    \"api:hasSubscriber\": {\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    },\r\n    \"api:hasTopicType\": {\r\n        \"@id\": \"api:LOGISTICS_OBJECT_TYPE\"\r\n    },\r\n    \"api:includeSubscriptionEventType\": [\r\n        {\r\n            \"@id\": \"api:LOGISTICS_OBJECT_UPDATED\"\r\n        },\r\n        {\r\n            \"@id\": \"api:LOGISTICS_OBJECT_CREATED\"\r\n        },\r\n        {\r\n            \"@id\": \"api:LOGISTICS_EVENT_RECEIVED\"\r\n        }\r\n    ],\r\n    \"api:hasTopic\": {\r\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#anyURI\",\r\n        \"@value\": \"https://onerecord.iata.org/ns/cargo#Shipment\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									]
								}
							},
							"response": []
						}
					]
				}
			],
			"description": "Note: Subscriptions uses a Piece and a Company object that must be created before running the test. Please use the calls in Logisitics Objects - Post"
		},
		{
			"name": "Access Delegations",
			"item": [
				{
					"name": "Prerequisite",
					"item": [
						{
							"name": "Create a Company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Create a company to be used in the Logistics Events Test\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"//Test type header\r",
											"pm.test(\"Check type\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Company\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Company\")){\r",
											"    pm.collectionVariables.set(\"extCompany\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": [\n        \"cargo:Company\",\n        \"cargo:Organization\",\n        \"cargo:LogisticsAgent\",\n        \"cargo:LogisticsObject\"\n    ],\n    \"cargo:name\": \"GHA Company\",\n    \"cargo:shortName\": \"GHA\",\n    \"cargo:contactPersons\": [\n        {\n            \"@type\": [\n                \"cargo:Person\",\n                \"cargo:Actor\",\n                \"cargo:LogisticsAgent\",\n                \"cargo:LogisticsObject\"\n            ],\n            \"cargo:firstName\": \"Jane\",\n            \"cargo:lastName\": \"Doe\",\n            \"cargo:salutation\": \"Ms\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create a Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Test Status Code\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"// Test Response Headers\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Piece\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Piece\")){\r",
											"    pm.collectionVariables.set(\"pieceId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"    pm.collectionVariables.set(\"pieceRevision\", 1);\r",
											"\r",
											"    //Set creation date for historical object\r",
											"    isoTimestamp = pm.variables.replaceIn('{{$isoTimestamp}}')\r",
											"    date = isoTimestamp.replaceAll('-','').replaceAll(':',\"\").split(\".\").shift() + \"Z\";\r",
											"    pm.collectionVariables.set(\"historicalCreation\",date);\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Piece\",\n    \"cargo:coload\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n        \"@value\": \"false\"\n    },\n    \"cargo:goodsDescription\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#string\",\n        \"@value\": \"Valuable piece\"\n    },\n    \"cargo:specialHandlingCodes\": [\n        {\n            \"@id\": \"https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Post",
					"item": [
						{
							"name": "Access delegation for holder company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Content-Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#AccessDelegationRequest\");  \r",
											"});\r",
											"//Test Location header\r",
											"pm.test(\"Check Location contains {{baseUrl}}/action-requests/ \", () => {\r",
											"    var expectedValue = pm.variables.get(\"baseUrl\")+ \"/action-requests/\";\r",
											"    pm.expect(pm.response.headers.get(\"Location\")).to.include(expectedValue);\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:AccessDelegation\",\r\n    \"api:hasDescription\": \"Our GHA requires read access to Piece for handling\",\r\n    \"api:hasPermission\": [{\r\n            \"@id\": \"api:GET_LOGISTICS_OBJECT\"\r\n        }\r\n    ],\r\n    \"api:isRequestedFor\": [{\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    }],\r\n    \"api:notifyRequestStatusChange\": false,\r\n    \"api:hasLogisticsObject\": [{\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\"\r\n    }]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/access-delegations",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"access-delegations"
									]
								}
							},
							"response": []
						},
						{
							"name": "Access delegation for third party company",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//Test response code\r",
											"pm.test(\"Response Status code is 201\", () => {\r",
											"    pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Content-Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#AccessDelegationRequest\");  \r",
											"});\r",
											"//Test Location header\r",
											"pm.test(\"Check Location contains {{baseUrl}}/action-requests/ \", () => {\r",
											"    var expectedValue = pm.variables.get(\"baseUrl\")+ \"/action-requests/\";\r",
											"    pm.expect(pm.response.headers.get(\"Location\")).to.include(expectedValue);\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:AccessDelegation\",\r\n    \"api:hasDescription\": \"Our GHA requires read access to Piece for handling\",\r\n    \"api:hasPermission\": [{\r\n            \"@id\": \"api:GET_LOGISTICS_OBJECT\"\r\n        }\r\n    ],\r\n    \"api:isRequestedFor\": [{\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{extCompany}}\"\r\n    }],\r\n    \"api:notifyRequestStatusChange\": false,\r\n    \"api:hasLogisticsObject\": [{\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{pieceId}}\"\r\n    }]\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/access-delegations",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"access-delegations"
									]
								}
							},
							"response": []
						}
					]
				}
			]
		},
		{
			"name": "Action Requests",
			"item": [
				{
					"name": "Prerequisite",
					"item": [
						{
							"name": "Create a Piece",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Test Status Code\r",
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"// Test Response Headers\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/cargo#Piece\");  \r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"if (req[\"@type\"].includes(\"cargo:Piece\")){\r",
											"    pm.collectionVariables.set(\"pieceSubscriptionId\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											"}"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\n    \"@context\": {\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\"\n    },\n    \"@type\": \"cargo:Piece\",\n    \"cargo:coload\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#boolean\",\n        \"@value\": \"false\"\n    },\n    \"cargo:goodsDescription\": {\n        \"@type\": \"http://www.w3.org/2001/XMLSchema#string\",\n        \"@value\": \"Valuable piece\"\n    },\n    \"cargo:specialHandlingCodes\": [\n        {\n            \"@id\": \"https://onerecord.iata.org/ns/code-lists/SpecialHandlingCode#VAL\"\n        }\n    ]\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/logistics-objects",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"logistics-objects"
									]
								}
							},
							"response": []
						},
						{
							"name": "Create Action Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 201\", () => {\r",
											"  pm.response.to.have.status(201);\r",
											"});\r",
											"pm.test(\"Location header is present\", () => {\r",
											"  pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type header is present\", () => {\r",
											"  pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.eql(\"https://onerecord.iata.org/ns/api#SubscriptionRequest\");  \r",
											"});\r",
											"//Test Location header\r",
											"pm.test(\"Check Location contains {{baseUrl}}/action-requests/ \", () => {\r",
											"    var expectedValue = pm.variables.get(\"baseUrl\")+ \"/action-requests/\";\r",
											"    pm.expect(pm.response.headers.get(\"Location\")).to.include(expectedValue);\r",
											"});\r",
											"\r",
											"//Save variables for running GET tests\r",
											"var req = JSON.parse(request.data);\r",
											"pm.collectionVariables.set(\"actionRequest\", pm.response.headers.get(\"Location\").split(\"/\").pop());\r",
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "{\r\n    \"@context\": {\r\n        \"cargo\": \"https://onerecord.iata.org/ns/cargo#\",\r\n        \"api\": \"https://onerecord.iata.org/ns/api#\"\r\n    },\r\n    \"@type\": \"api:Subscription\",\r\n    \"api:hasContentType\": \"application/ld+json\",\r\n    \"api:hasSubscriber\": {\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{companyId}}\"\r\n    },\r\n    \"api:hasTopicType\": {\r\n        \"@id\": \"api:LOGISTICS_OBJECT_IDENTIFIER\"\r\n    },\r\n    \"api:includeSubscriptionEventType\": [\r\n        {\r\n            \"@id\": \"api:LOGISTICS_OBJECT_UPDATED\"\r\n        },\r\n        {\r\n            \"@id\": \"api:LOGISTICS_OBJECT_CREATED\"\r\n        },\r\n        {\r\n            \"@id\": \"api:LOGISTICS_EVENT_RECEIVED\"\r\n        }\r\n    ],\r\n    \"api:hasTopic\": {\r\n        \"@id\": \"{{baseUrl}}/logistics-objects/{{pieceSubscriptionId}}\"\r\n    }\r\n}",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/subscriptions",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"subscriptions"
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Get",
					"item": [
						{
							"name": "Get Action Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"// Inject jsonld.js\r",
											"var self = {}\r",
											"async function frame(json) {\r",
											"    return await jsonld.frame(json, {});\r",
											"}\r",
											"eval(pm.collectionVariables.get('jsonCode'));\r",
											"\r",
											"//Test response code\r",
											"pm.test(\"Status code is 200\", () => {\r",
											"    pm.response.to.have.status(200);\r",
											"});\r",
											"//Test response type presence\r",
											"pm.test(\"Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"var actionTypes = ['https://onerecord.iata.org/ns/api#SubscriptionRequest', 'https://onerecord.iata.org/ns/api#AccessDelegationRequest', 'https://onerecord.iata.org/ns/api#ChangeRequest'];\r",
											"//Test type header\r",
											"pm.test(\"Check type header\", () => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.be.oneOf(actionTypes);\r",
											"});\r",
											"pm.test(\"Content-Type header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Type\");\r",
											"});\r",
											"pm.test(\"Content-Language header is present\", () => {\r",
											"    pm.response.to.have.header(\"Content-Language\");\r",
											"});\r",
											"pm.test(\"Last-Modified header is present\", () => {\r",
											"    pm.response.to.have.header(\"Last-Modified\");\r",
											"});\r",
											"\r",
											"//Test response payload\r",
											"var jsonData = pm.response.json();\r",
											"\r",
											"const framedJson = frame(jsonData);\r",
											"framedJson.then(function (result) {\r",
											"\r",
											"    if (result['@graph']) {\r",
											"        result['@graph'].forEach((element) => {\r",
											"            if (element['@id'] == pm.request.url.toString()) {\r",
											"                jsonData = element;\r",
											"            }\r",
											"        })\r",
											"    } else {\r",
											"        jsonData = result;\r",
											"    }\r",
											"\r",
											"\r",
											"    pm.test(\"Response contains @id \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@id\");\r",
											"    });\r",
											"\r",
											"    pm.test(\"Response @id contains {{baseUrl}}/action-requests/\", () => {\r",
											"        var expectedValue = pm.variables.get(\"baseUrl\") + \"/action-requests/\";\r",
											"        pm.expect(jsonData['@id']).to.include(expectedValue);\r",
											"    });\r",
											"    pm.test(\"Response contains @type \", () => {\r",
											"        pm.expect(jsonData).to.have.property(\"@type\");\r",
											"    });\r",
											"    pm.test(\"Response value @type \", () => {\r",
											"        pm.expect(jsonData['@type']).to.be.oneOf(actionTypes);\r",
											"    });\r",
											"    var hasSubscription = \"https://onerecord.iata.org/ns/api#hasSubscription\";\r",
											"    pm.test(\"Response contains hasSubscription\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasSubscription);\r",
											"    });\r",
											"\r",
											"    var isRequestedBy = \"https://onerecord.iata.org/ns/api#isRequestedBy\";\r",
											"    pm.test(\"Response contains isRequestedBy\", () => {\r",
											"        pm.expect(jsonData).to.have.property(isRequestedBy);\r",
											"    });\r",
											"    //Cannot check the isRequestedBy as it's linked with the authentication \r",
											"\r",
											"    var requestStatus = ['https://onerecord.iata.org/ns/api#REQUEST_ACCEPTED', 'https://onerecord.iata.org/ns/api#REQUEST_REJECTED', 'https://onerecord.iata.org/ns/api#REQUEST_PENDING', 'https://onerecord.iata.org/ns/api#REQUEST_FAILED', 'https://onerecord.iata.org/ns/api#REQUEST_REVOKED'];\r",
											"    var hasRequestStatus = \"https://onerecord.iata.org/ns/api#hasRequestStatus\";\r",
											"    pm.test(\"Response contains hasRequestStatus\", () => {\r",
											"        pm.expect(jsonData).to.have.property(hasRequestStatus);\r",
											"    });\r",
											"    pm.test(\"Response value hasRequestStatus \", () => {\r",
											"        pm.expect(jsonData[hasRequestStatus]['@id']).to.be.oneOf(requestStatus);\r",
											"    });\r",
											"\r",
											"    var isRequestedAt = \"https://onerecord.iata.org/ns/api#isRequestedAt\";\r",
											"    pm.test(\"Response contains isRequestedAt\", () => {\r",
											"        pm.expect(jsonData).to.have.property(isRequestedAt);\r",
											"    });\r",
											"    pm.test(\"Response value isRequestedAt \", () => {\r",
											"        pm.expect(jsonData[isRequestedAt]['@type']).to.eql('http://www.w3.org/2001/XMLSchema#dateTime');\r",
											"        pm.expect(jsonData[isRequestedAt]).to.have.property('@value');\r",
											"    });\r",
											"});\r",
											"\r",
											"\r",
											"\r",
											"\r",
											"\r",
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "GET",
								"header": [
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"url": {
									"raw": "{{baseUrl}}/action-requests/:actionRequestId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":actionRequestId"
									],
									"variable": [
										{
											"key": "actionRequestId",
											"value": "{{actionRequest}}"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Patch",
					"item": [
						{
							"name": "Approve Action Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"//NOTE: This test might fail as the action request must be in REQUEST_PENDING state.\r",
											"//Solution: Set param :actionRquestId to a REQUEST_PENDING action request \r",
											"//Test response code\r",
											"pm.test(\"Response Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});\r",
											"pm.test(\"Location is present\", () => {\r",
											"    pm.response.to.have.header(\"Location\");\r",
											"});\r",
											"pm.test(\"Type is present\", () => {\r",
											"    pm.response.to.have.header(\"Type\");\r",
											"});\r",
											"\r",
											"var actionTypes = ['https://onerecord.iata.org/ns/api#SubscriptionRequest','https://onerecord.iata.org/ns/api#AccessDelegationRequest','https://onerecord.iata.org/ns/api#ChangeRequest'];\r",
											"//Test type header\r",
											"pm.test(\"Check type header\",() => {\r",
											"    pm.expect(pm.response.headers.get(\"Type\")).to.be.oneOf(actionTypes);  \r",
											"});\r",
											"\r",
											"//Test Location header\r",
											"pm.test(\"Check Location contains {{baseUrl}}/action-requests/ \", () => {\r",
											"    var expectedValue = pm.variables.get(\"baseUrl\")+ \"/action-requests/\";\r",
											"    pm.expect(pm.response.headers.get(\"Location\")).to.include(expectedValue);\r",
											"});\r",
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript",
										"packages": {}
									}
								}
							],
							"request": {
								"method": "PATCH",
								"header": [
									{
										"key": "Content-Type",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									},
									{
										"key": "Accept",
										"value": "application/ld+json; version=2.0.0-dev",
										"type": "text"
									}
								],
								"body": {
									"mode": "raw",
									"raw": "",
									"options": {
										"raw": {
											"language": "json"
										}
									}
								},
								"url": {
									"raw": "{{baseUrl}}/action-requests/:actionRequestId?status=REQUEST_ACCEPTED",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":actionRequestId"
									],
									"query": [
										{
											"key": "status",
											"value": "REQUEST_ACCEPTED"
										}
									],
									"variable": [
										{
											"key": "actionRequestId",
											"value": "{{actionRequest}}"
										}
									]
								}
							},
							"response": []
						}
					]
				},
				{
					"name": "Del",
					"item": [
						{
							"name": "Delete Action Request",
							"event": [
								{
									"listen": "test",
									"script": {
										"exec": [
											"pm.test(\"Status code is 204\", () => {\r",
											"    pm.response.to.have.status(204);\r",
											"});"
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"method": "DELETE",
								"header": [],
								"url": {
									"raw": "{{baseUrl}}/action-requests/:actionRequestId",
									"host": [
										"{{baseUrl}}"
									],
									"path": [
										"action-requests",
										":actionRequestId"
									],
									"variable": [
										{
											"key": "actionRequestId",
											"value": "{{actionRequest}}"
										}
									]
								}
							},
							"response": []
						}
					]
				}
			]
		}
	],
	"auth": {
		"type": "bearer",
		"bearer": [
			{
				"key": "token",
				"value": "eyJhbGciOiJSUzUxMiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJzRU15dDJ0bGVyVlhVYVlVTXRjeWZPbldnZ09PcVBKTXhQTGhBUkU5enJnIn0.eyJleHAiOjE3ODU5MTc0MTYsImlhdCI6MTc1NDM4MTQxNiwianRpIjoiZTg4NzBjMGItYTUyMS00MGE1LTg0ZjQtNWEzYmVjOGE0NTUwIiwiaXNzIjoiaHR0cDovL29uZXJlY29yZC1kZXYuY2hhbXAuYWVybzo4MDgwL3JlYWxtcy9vbmVyZWNvcmQiLCJzdWIiOiJlMTUzNjY4Mi01OWZjLTRiYzYtYjM4YS0xM2VlNTc1YmFlMTAiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJvbmVyZWNvcmQtYWlybGluZSIsInNjb3BlIjoiIiwiY2xpZW50SG9zdCI6IjE3Mi4yOC4xNTcuMTI1IiwibG9naXN0aWNzX2FnZW50X3VyaSI6Imh0dHA6Ly9vbmVyZWNvcmQtZGV2LmNoYW1wLmFlcm86ODE4MC9BSVJMSU5FL2xvZ2lzdGljcy1vYmplY3RzL0RBVEFfSE9MREVSIiwiY2xpZW50QWRkcmVzcyI6IjE3Mi4yOC4xNTcuMTI1IiwiY2xpZW50X2lkIjoib25lcmVjb3JkLWFpcmxpbmUifQ.WpsTAQnXZfK2_Az7jWkr4HNYELt2qj-lESTmo7r8p3YePGNa-svaBqqTHvN_CNoWlArXKtvlwK04-mYhZGORNbNuf-aPofHd7MrCJgsXj9R1CGhKjMA_LE5kc8ysRwyhUdah5Wf9J0abpS6rKNVHUzvSC5ixgYSO0T78IdGsmgnUxf31gLQne-Ctenxua1bnc22D71M4DWp72wZxBHYCNPF4uneRpkRSLVecYhUwQt5XboVCN-lA4aMFdPAGghB5-ugzjCI5JS0_-65wAFpem-C_RAfSoK7ouARm-P0SL-lcu5hxB7TnS3wbq8_8oXakMxVHMSXQu57JpilsnZ3yxRDvCUI5Nmbyb-ENTSrwu9T_-Huz-9PmwpzqZd1_r1v9OZVNH7iopZfRMd5of75UFvx2WMO6W-OXDsmVBcCG1xzAzbAK6QS5iC2ENN-XoOAXZINFlIkcfZ7PYOaU-MLwhpq2A_n9QC2NPGdIdSqK5XliTGhpSCkgPGOe5B4vbN6Sn2QP42NqP8eXq8NnAgSwsEiVRjF-5HP2jGRK_alGtcazW8ldbE9vssDiIQcikEEmSVDG1GHbl7587q_BP3dqeDVuJGv3mLuLdjW4mElb9AbTLI1jSpcTwcuFLv6QNHQWXeqS-td70pv-But3dA6nWO5SW-bSATweV0GftsMANSs",
				"type": "string"
			}
		]
	},
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "jsonCode",
			"value": "var jsonld=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=174)}([function(e,t,n){\"use strict\";(function(t){var n=function(e){return e&&e.Math===Math&&e};e.exports=n(\"object\"==typeof globalThis&&globalThis)||n(\"object\"==typeof window&&window)||n(\"object\"==typeof self&&self)||n(\"object\"==typeof t&&t)||n(\"object\"==typeof this&&this)||function(){return this}()||Function(\"return this\")()}).call(this,n(118))},function(e,t,n){\"use strict\";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){\"use strict\";var r=n(68),o=Function.prototype,i=o.call,a=r&&o.bind.bind(i,i);e.exports=r?a:function(e){return function(){return i.apply(e,arguments)}}},function(e,t,n){\"use strict\";var r=n(0),o=n(42).f,i=n(31),a=n(27),s=n(87),c=n(126),u=n(93);e.exports=function(e,t){var n,l,d,f,p,h=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[h]||s(h,{}):(r[h]||{}).prototype)for(l in t){if(f=t[l],d=e.dontCallGetSet?(p=o(n,l))&&p.value:n[l],!u(v?l:h+(g?\".\":\"#\")+l,e.forced)&&void 0!==d){if(typeof f==typeof d)continue;c(f,d)}(e.sham||d&&d.sham)&&i(f,\"sham\",!0),a(n,l,f,e)}}},function(e,t,n){\"use strict\";var r=n(121),o=r.all;e.exports=r.IS_HTMLDDA?function(e){return\"function\"==typeof e||e===o}:function(e){return\"function\"==typeof e}},function(e,t,n){\"use strict\";var r=n(68),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},function(e,t,n){\"use strict\";var r=n(54),o=n(141),i=n(62),a=n(36),s=n(22).f,c=n(201),u=n(204),l=n(26),d=n(11),f=a.set,p=a.getterFor(\"Array Iterator\");e.exports=c(Array,\"Array\",(function(e,t){f(this,{type:\"Array Iterator\",target:r(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=void 0,u(void 0,!0);switch(e.kind){case\"keys\":return u(n,!1);case\"values\":return u(t[n],!1)}return u([n,t[n]],!1)}),\"values\");var h=i.Arguments=i.Array;if(o(\"keys\"),o(\"values\"),o(\"entries\"),!l&&d&&\"values\"!==h.name)try{s(h,\"name\",{value:\"values\"})}catch(e){}},function(e,t,n){\"use strict\";var r=n(0),o=n(85),i=n(13),a=n(88),s=n(84),c=n(122),u=r.Symbol,l=o(\"wks\"),d=c?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return i(l,e)||(l[e]=s&&i(u,e)?u[e]:d(\"Symbol.\"+e)),l[e]}},function(e,t,n){\"use strict\";var r=n(0),o=n(205),i=n(206),a=n(6),s=n(31),c=n(7),u=c(\"iterator\"),l=c(\"toStringTag\"),d=a.values,f=function(e,t){if(e){if(e[u]!==d)try{s(e,u,d)}catch(t){e[u]=d}if(e[l]||s(e,l,t),o[t])for(var n in a)if(e[n]!==a[n])try{s(e,n,a[n])}catch(t){e[n]=a[n]}}};for(var p in o)f(r[p]&&r[p].prototype,p);f(i,\"DOMTokenList\")},function(e,t,n){\"use strict\";var r=n(39),o=String;e.exports=function(e){if(\"Symbol\"===r(e))throw new TypeError(\"Cannot convert a Symbol value to a string\");return o(e)}},function(e,t,n){\"use strict\";var r=n(15),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+\" is not an object\")}},function(e,t,n){\"use strict\";var r=n(1);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){\"use strict\";n(180),n(193),n(195),n(196),n(197),n(198)},function(e,t,n){\"use strict\";var r=n(2),o=n(21),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},function(e,t,n){\"use strict\";var r=n(3),o=n(2),i=n(20),a=n(21),s=n(23),c=n(207),u=n(9),l=n(1),d=n(144),f=n(146),p=n(147),h=n(148),v=n(56),g=n(149),y=[],m=o(y.sort),x=o(y.push),b=l((function(){y.sort(void 0)})),w=l((function(){y.sort(null)})),j=f(\"sort\"),I=!l((function(){if(v)return v<70;if(!(p&&p>3)){if(h)return!0;if(g)return g<603;var e,t,n,r,o=\"\";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)y.push({k:t+r,v:n})}for(y.sort((function(e,t){return t.v-e.v})),r=0;r<y.length;r++)t=y[r].k.charAt(0),o.charAt(o.length-1)!==t&&(o+=t);return\"DGBEFHACIJK\"!==o}}));r({target:\"Array\",proto:!0,forced:b||!w||!j||!I},{sort:function(e){void 0!==e&&i(e);var t=a(this);if(I)return void 0===e?m(t):m(t,e);var n,r,o=[],l=s(t);for(r=0;r<l;r++)r in t&&x(o,t[r]);for(d(o,function(e){return function(t,n){return void 0===n?-1:void 0===t?1:void 0!==e?+e(t,n)||0:u(t)>u(n)?1:-1}}(e)),n=s(o),r=0;r<n;)t[r]=o[r++];for(;r<l;)c(t,r++);return t}})},function(e,t,n){\"use strict\";var r=n(4),o=n(121),i=o.all;e.exports=o.IS_HTMLDDA?function(e){return\"object\"==typeof e?null!==e:r(e)||e===i}:function(e){return\"object\"==typeof e?null!==e:r(e)}},function(e,t,n){\"use strict\";n(40),n(114);const r={};e.exports=r,r.isArray=Array.isArray,r.isBoolean=e=>\"boolean\"==typeof e||\"[object Boolean]\"===Object.prototype.toString.call(e),r.isDouble=e=>r.isNumber(e)&&(-1!==String(e).indexOf(\".\")||Math.abs(e)>=1e21),r.isEmptyObject=e=>r.isObject(e)&&0===Object.keys(e).length,r.isNumber=e=>\"number\"==typeof e||\"[object Number]\"===Object.prototype.toString.call(e),r.isNumeric=e=>!isNaN(parseFloat(e))&&isFinite(e),r.isObject=e=>\"[object Object]\"===Object.prototype.toString.call(e),r.isString=e=>\"string\"==typeof e||\"[object String]\"===Object.prototype.toString.call(e),r.isUndefined=e=>void 0===e},function(e,t,n){\"use strict\";var r=n(38),o=TypeError;e.exports=function(e){if(r(e))throw new o(\"Can't call method on \"+e);return e}},function(e,t,n){\"use strict\";n(6),n(8),n(40),n(104),n(25),n(52),n(14);const r=n(32),o=n(16),i=n(105).IdentifierIssuer,a=n(19),s=/(?:<[^>]*?>|\"[^\"]*?\"|[^,])+/g,c=/\\s*<([^>]*?)>\\s*(?:;\\s*(.*))?/,u=/(.*?)=(?:(?:\"([^\"]*?)\")|([^\"]*?))\\s*(?:(?:;\\s*)|$)/g,l={accept:\"application/ld+json, application/json\"},d={};e.exports=d,d.IdentifierIssuer=i,d.REGEX_BCP47=/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/,d.REGEX_KEYWORD=/^@[a-zA-Z]+$/,d.clone=function(e){if(e&&\"object\"==typeof e){let t;if(o.isArray(e)){t=[];for(let n=0;n<e.length;++n)t[n]=d.clone(e[n])}else if(e instanceof Map){t=new Map;for(const[n,r]of e)t.set(n,d.clone(r))}else if(e instanceof Set){t=new Set;for(const n of e)t.add(d.clone(n))}else if(o.isObject(e)){t={};for(const n in e)t[n]=d.clone(e[n])}else t=e.toString();return t}return e},d.asArray=function(e){return Array.isArray(e)?e:[e]},d.buildHeaders=(e={})=>{if(Object.keys(e).some(e=>\"accept\"===e.toLowerCase()))throw new RangeError('Accept header may not be specified; only \"'+l.accept+'\" is supported.');return Object.assign({Accept:l.accept},e)},d.parseLinkHeader=e=>{const t={},n=e.match(s);for(let e=0;e<n.length;++e){let r=n[e].match(c);if(!r)continue;const o={target:r[1]},i=r[2];for(;r=u.exec(i);)o[r[1]]=void 0===r[2]?r[3]:r[2];const a=o.rel||\"\";Array.isArray(t[a])?t[a].push(o):t.hasOwnProperty(a)?t[a]=[t[a],o]:t[a]=o}return t},d.validateTypeValue=(e,t)=>{if(!(o.isString(e)||o.isArray(e)&&e.every(e=>o.isString(e)))){if(t&&o.isObject(e))switch(Object.keys(e).length){case 0:return;case 1:if(\"@default\"in e&&d.asArray(e[\"@default\"]).every(e=>o.isString(e)))return}throw new a('Invalid JSON-LD syntax; \"@type\" value must a string, an array of strings, an empty object, or a default object.',\"jsonld.SyntaxError\",{code:\"invalid type value\",value:e})}},d.hasProperty=(e,t)=>{if(e.hasOwnProperty(t)){const n=e[t];return!o.isArray(n)||n.length>0}return!1},d.hasValue=(e,t,n)=>{if(d.hasProperty(e,t)){let i=e[t];const a=r.isList(i);if(o.isArray(i)||a){a&&(i=i[\"@list\"]);for(let e=0;e<i.length;++e)if(d.compareValues(n,i[e]))return!0}else if(!o.isArray(n))return d.compareValues(n,i)}return!1},d.addValue=(e,t,n,r)=>{if(\"propertyIsArray\"in(r=r||{})||(r.propertyIsArray=!1),\"valueIsArray\"in r||(r.valueIsArray=!1),\"allowDuplicate\"in r||(r.allowDuplicate=!0),\"prependValue\"in r||(r.prependValue=!1),r.valueIsArray)e[t]=n;else if(o.isArray(n)){0===n.length&&r.propertyIsArray&&!e.hasOwnProperty(t)&&(e[t]=[]),r.prependValue&&(n=n.concat(e[t]),e[t]=[]);for(let o=0;o<n.length;++o)d.addValue(e,t,n[o],r)}else if(e.hasOwnProperty(t)){const i=!r.allowDuplicate&&d.hasValue(e,t,n);o.isArray(e[t])||i&&!r.propertyIsArray||(e[t]=[e[t]]),i||(r.prependValue?e[t].unshift(n):e[t].push(n))}else e[t]=r.propertyIsArray?[n]:n},d.getValues=(e,t)=>[].concat(e[t]||[]),d.removeProperty=(e,t)=>{delete e[t]},d.removeValue=(e,t,n,r)=>{\"propertyIsArray\"in(r=r||{})||(r.propertyIsArray=!1);const o=d.getValues(e,t).filter(e=>!d.compareValues(e,n));0===o.length?d.removeProperty(e,t):1!==o.length||r.propertyIsArray?e[t]=o:e[t]=o[0]},d.relabelBlankNodes=(e,t)=>function e(t,n){if(o.isArray(n))for(let r=0;r<n.length;++r)n[r]=e(t,n[r]);else if(r.isList(n))n[\"@list\"]=e(t,n[\"@list\"]);else if(o.isObject(n)){r.isBlankNode(n)&&(n[\"@id\"]=t.getId(n[\"@id\"]));const o=Object.keys(n).sort();for(let r=0;r<o.length;++r){const i=o[r];\"@id\"!==i&&(n[i]=e(t,n[i]))}}return n}((t=t||{}).issuer||new i(\"_:b\"),e),d.compareValues=(e,t)=>e===t||(!(!r.isValue(e)||!r.isValue(t)||e[\"@value\"]!==t[\"@value\"]||e[\"@type\"]!==t[\"@type\"]||e[\"@language\"]!==t[\"@language\"]||e[\"@index\"]!==t[\"@index\"])||!!(o.isObject(e)&&\"@id\"in e&&o.isObject(t)&&\"@id\"in t)&&e[\"@id\"]===t[\"@id\"]),d.compareShortestLeast=(e,t)=>e.length<t.length?-1:t.length<e.length?1:e===t?0:e<t?-1:1},function(e,t,n){\"use strict\";e.exports=class extends Error{constructor(e=\"An unspecified JSON-LD error occurred.\",t=\"jsonld.Error\",n={}){super(e),this.name=t,this.message=e,this.details=n}}},function(e,t,n){\"use strict\";var r=n(4),o=n(44),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+\" is not a function\")}},function(e,t,n){\"use strict\";var r=n(17),o=Object;e.exports=function(e){return o(r(e))}},function(e,t,n){\"use strict\";var r=n(11),o=n(123),i=n(124),a=n(10),s=n(69),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=r?i?function(e,t,n){if(a(e),t=s(t),a(n),\"function\"==typeof e&&\"prototype\"===t&&\"value\"in n&&\"writable\"in n&&!n.writable){var r=l(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:\"configurable\"in n?n.configurable:r.configurable,enumerable:\"enumerable\"in n?n.enumerable:r.enumerable,writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(a(e),t=s(t),a(n),o)try{return u(e,t,n)}catch(e){}if(\"get\"in n||\"set\"in n)throw new c(\"Accessors not supported\");return\"value\"in n&&(e[t]=n.value),e}},function(e,t,n){\"use strict\";var r=n(24);e.exports=function(e){return r(e.length)}},function(e,t,n){\"use strict\";var r=n(28),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){\"use strict\";var r=n(3),o=n(80);r({target:\"RegExp\",proto:!0,forced:/./.exec!==o},{exec:o})},function(e,t,n){\"use strict\";e.exports=!1},function(e,t,n){\"use strict\";var r=n(4),o=n(22),i=n(125),a=n(87);e.exports=function(e,t,n,s){s||(s={});var c=s.enumerable,u=void 0!==s.name?s.name:t;if(r(n)&&i(n,u,s),s.global)c?e[t]=n:a(t,n);else{try{s.unsafe?e[t]&&(c=!0):delete e[t]}catch(e){}c?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return e}},function(e,t,n){\"use strict\";var r=n(184);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},function(e,t,n){\"use strict\";var r,o,i,a=n(152),s=n(11),c=n(0),u=n(4),l=n(15),d=n(13),f=n(39),p=n(44),h=n(31),v=n(27),g=n(58),y=n(35),m=n(78),x=n(45),b=n(7),w=n(88),j=n(36),I=j.enforce,O=j.get,S=c.Int8Array,E=S&&S.prototype,N=c.Uint8ClampedArray,A=N&&N.prototype,T=S&&m(S),D=E&&m(E),R=Object.prototype,k=c.TypeError,L=b(\"toStringTag\"),C=w(\"TYPED_ARRAY_TAG\"),_=a&&!!x&&\"Opera\"!==f(c.opera),P=!1,M={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},F={BigInt64Array:8,BigUint64Array:8},B=function(e){var t=m(e);if(l(t)){var n=O(t);return n&&d(n,\"TypedArrayConstructor\")?n.TypedArrayConstructor:B(t)}},J=function(e){if(!l(e))return!1;var t=f(e);return d(M,t)||d(F,t)};for(r in M)(i=(o=c[r])&&o.prototype)?I(i).TypedArrayConstructor=o:_=!1;for(r in F)(i=(o=c[r])&&o.prototype)&&(I(i).TypedArrayConstructor=o);if((!_||!u(T)||T===Function.prototype)&&(T=function(){throw new k(\"Incorrect invocation\")},_))for(r in M)c[r]&&x(c[r],T);if((!_||!D||D===R)&&(D=T.prototype,_))for(r in M)c[r]&&x(c[r].prototype,D);if(_&&m(A)!==D&&x(A,D),s&&!d(D,L))for(r in P=!0,g(D,L,{configurable:!0,get:function(){return l(this)?this[C]:void 0}}),M)c[r]&&h(c[r],C,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:_,TYPED_ARRAY_TAG:P&&C,aTypedArray:function(e){if(J(e))return e;throw new k(\"Target is not a typed array\")},aTypedArrayConstructor:function(e){if(u(e)&&(!x||y(T,e)))return e;throw new k(p(e)+\" is not a typed array constructor\")},exportTypedArrayMethod:function(e,t,n,r){if(s){if(n)for(var o in M){var i=c[o];if(i&&d(i.prototype,e))try{delete i.prototype[e]}catch(n){try{i.prototype[e]=t}catch(e){}}}D[e]&&!n||v(D,e,n?t:_&&E[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,o;if(s){if(x){if(n)for(r in M)if((o=c[r])&&d(o,e))try{delete o[e]}catch(e){}if(T[e]&&!n)return;try{return v(T,e,n?t:_&&T[e]||t)}catch(e){}}for(r in M)!(o=c[r])||o[e]&&!n||v(o,e,t)}},getTypedArrayConstructor:B,isView:function(e){if(!l(e))return!1;var t=f(e);return\"DataView\"===t||d(M,t)||d(F,t)},isTypedArray:J,TypedArray:T,TypedArrayPrototype:D}},function(e,t,n){\"use strict\";e.exports=\"undefined\"!=typeof navigator&&String(navigator.userAgent)||\"\"},function(e,t,n){\"use strict\";var r=n(11),o=n(22),i=n(53);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){\"use strict\";const r=n(16),o={};e.exports=o,o.isSubject=e=>{if(r.isObject(e)&&!(\"@value\"in e||\"@set\"in e||\"@list\"in e)){return Object.keys(e).length>1||!(\"@id\"in e)}return!1},o.isSubjectReference=e=>r.isObject(e)&&1===Object.keys(e).length&&\"@id\"in e,o.isValue=e=>r.isObject(e)&&\"@value\"in e,o.isList=e=>r.isObject(e)&&\"@list\"in e,o.isGraph=e=>r.isObject(e)&&\"@graph\"in e&&1===Object.keys(e).filter(e=>\"@id\"!==e&&\"@index\"!==e).length,o.isSimpleGraph=e=>o.isGraph(e)&&!(\"@id\"in e),o.isBlankNode=e=>{if(r.isObject(e)){if(\"@id\"in e){const t=e[\"@id\"];return!r.isString(t)||0===t.indexOf(\"_:\")}return 0===Object.keys(e).length||!(\"@value\"in e||\"@set\"in e||\"@list\"in e)}return!1}},function(e,t,n){\"use strict\";var r=n(2),o=r({}.toString),i=r(\"\".slice);e.exports=function(e){return i(o(e),8,-1)}},function(e,t,n){\"use strict\";var r=n(0),o=n(4),i=function(e){return o(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e]):r[e]&&r[e][t]}},function(e,t,n){\"use strict\";var r=n(2);e.exports=r({}.isPrototypeOf)},function(e,t,n){\"use strict\";var r,o,i,a=n(182),s=n(0),c=n(15),u=n(31),l=n(13),d=n(86),f=n(90),p=n(91),h=s.TypeError,v=s.WeakMap;if(a||d.state){var g=d.state||(d.state=new v);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new h(\"Object already initialized\");return t.facade=e,g.set(e,t),t},o=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var y=f(\"state\");p[y]=!0,r=function(e,t){if(l(e,y))throw new h(\"Object already initialized\");return t.facade=e,u(e,y,t),t},o=function(e){return l(e,y)?e[y]:{}},i=function(e){return l(e,y)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=o(t)).type!==e)throw new h(\"Incompatible receiver, \"+e+\" required\");return n}}}},function(e,t,n){\"use strict\";n(25),n(6),n(8),n(82),n(81);const r=n(16),o={};e.exports=o,o.parsers={simple:{keys:[\"href\",\"scheme\",\"authority\",\"path\",\"query\",\"fragment\"],regex:/^(?:([^:\\/?#]+):)?(?:\\/\\/([^\\/?#]*))?([^?#]*)(?:\\?([^#]*))?(?:#(.*))?/},full:{keys:[\"href\",\"protocol\",\"scheme\",\"authority\",\"auth\",\"user\",\"password\",\"hostname\",\"port\",\"path\",\"directory\",\"file\",\"query\",\"fragment\"],regex:/^(([a-zA-Z][a-zA-Z0-9+-.]*):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?(?:(((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/}},o.parse=(e,t)=>{const n={},r=o.parsers[t||\"full\"],i=r.regex.exec(e);let a=r.keys.length;for(;a--;)n[r.keys[a]]=void 0===i[a]?null:i[a];return(\"https\"===n.scheme&&\"443\"===n.port||\"http\"===n.scheme&&\"80\"===n.port)&&(n.href=n.href.replace(\":\"+n.port,\"\"),n.authority=n.authority.replace(\":\"+n.port,\"\"),n.port=null),n.normalizedPath=o.removeDotSegments(n.path),n},o.prependBase=(e,t)=>{if(null===e)return t;if(o.isAbsolute(t))return t;e&&!r.isString(e)||(e=o.parse(e||\"\"));const n=o.parse(t),i={protocol:e.protocol||\"\"};if(null!==n.authority)i.authority=n.authority,i.path=n.path,i.query=n.query;else if(i.authority=e.authority,\"\"===n.path)i.path=e.path,null!==n.query?i.query=n.query:i.query=e.query;else{if(0===n.path.indexOf(\"/\"))i.path=n.path;else{let t=e.path;t=t.substr(0,t.lastIndexOf(\"/\")+1),(t.length>0||e.authority)&&\"/\"!==t.substr(-1)&&(t+=\"/\"),t+=n.path,i.path=t}i.query=n.query}\"\"!==n.path&&(i.path=o.removeDotSegments(i.path));let a=i.protocol;return null!==i.authority&&(a+=\"//\"+i.authority),a+=i.path,null!==i.query&&(a+=\"?\"+i.query),null!==n.fragment&&(a+=\"#\"+n.fragment),\"\"===a&&(a=\"./\"),a},o.removeBase=(e,t)=>{if(null===e)return t;e&&!r.isString(e)||(e=o.parse(e||\"\"));let n=\"\";if(\"\"!==e.href?n+=(e.protocol||\"\")+\"//\"+(e.authority||\"\"):t.indexOf(\"//\")&&(n+=\"//\"),0!==t.indexOf(n))return t;const i=o.parse(t.substr(n.length)),a=e.normalizedPath.split(\"/\"),s=i.normalizedPath.split(\"/\"),c=i.fragment||i.query?0:1;for(;a.length>0&&s.length>c&&a[0]===s[0];)a.shift(),s.shift();let u=\"\";if(a.length>0){a.pop();for(let e=0;e<a.length;++e)u+=\"../\"}return u+=s.join(\"/\"),null!==i.query&&(u+=\"?\"+i.query),null!==i.fragment&&(u+=\"#\"+i.fragment),\"\"===u&&(u=\"./\"),u},o.removeDotSegments=e=>{if(0===e.length)return\"\";const t=e.split(\"/\"),n=[];for(;t.length>0;){const e=t.shift(),r=0===t.length;\".\"!==e?\"..\"!==e?n.push(e):(n.pop(),r&&n.push(\"\")):r&&n.push(\"\")}return\"/\"===e[0]&&n.length>0&&\"\"!==n[0]&&n.unshift(\"\"),1===n.length&&\"\"===n[0]?\"/\":n.join(\"/\")};const i=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^\\s]*$/;o.isAbsolute=e=>r.isString(e)&&i.test(e),o.isRelative=e=>r.isString(e)},function(e,t,n){\"use strict\";e.exports=function(e){return null==e}},function(e,t,n){\"use strict\";var r=n(187),o=n(4),i=n(33),a=n(7)(\"toStringTag\"),s=Object,c=\"Arguments\"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?\"Undefined\":null===e?\"Null\":\"string\"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=s(e),a))?n:c?i(t):\"Object\"===(r=i(t))&&o(t.callee)?\"Arguments\":r}},function(e,t,n){\"use strict\";var r=n(72).PROPER,o=n(27),i=n(10),a=n(9),s=n(1),c=n(160),u=RegExp.prototype.toString,l=s((function(){return\"/a/b\"!==u.call({source:\"a\",flags:\"b\"})})),d=r&&\"toString\"!==u.name;(l||d)&&o(RegExp.prototype,\"toString\",(function(){var e=i(this);return\"/\"+a(e.source)+\"/\"+a(c(e))}),{unsafe:!0})},function(e,t,n){\"use strict\";var r=n(66)(n(67));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(6),n(8),n(12),n(25),n(52),n(49),n(50),n(116),n(14),n(64),n(40);const a=n(18),s=n(19),{isArray:c,isObject:u,isString:l,isUndefined:d}=n(16),{isAbsolute:f,isRelative:p,prependBase:h}=n(37),{handleEvent:v}=n(65),{REGEX_BCP47:g,REGEX_KEYWORD:y,asArray:m,compareShortestLeast:x}=n(18),b=new Map,w={};function j(e,t,n,r,o,i){if(null===t||!l(t)||w.isKeyword(t))return t;if(t.match(y))return null;if(r&&r.hasOwnProperty(t)&&!0!==o.get(t)&&w.createTermDefinition({activeCtx:e,localCtx:r,term:t,defined:o,options:i}),(n=n||{}).vocab){const n=e.mappings.get(t);if(null===n)return null;if(u(n)&&\"@id\"in n)return n[\"@id\"]}const a=t.indexOf(\":\");if(a>0){const n=t.substr(0,a),s=t.substr(a+1);if(\"_\"===n||0===s.indexOf(\"//\"))return t;r&&r.hasOwnProperty(n)&&w.createTermDefinition({activeCtx:e,localCtx:r,term:n,defined:o,options:i});const c=e.mappings.get(n);if(c&&c._prefix)return c[\"@id\"]+s;if(f(t))return t}if(n.vocab&&\"@vocab\"in e){t=e[\"@vocab\"]+t}else if(n.base){let n,r;\"@base\"in e?e[\"@base\"]?(r=h(i.base,e[\"@base\"]),n=h(r,t)):(r=e[\"@base\"],n=t):(r=i.base,n=h(i.base,t)),t=n}return t}e.exports=w,w.process=async({activeCtx:e,localCtx:t,options:n,propagate:r=!0,overrideProtected:o=!1,cycles:a=new Set})=>{u(t)&&\"@context\"in t&&c(t[\"@context\"])&&(t=t[\"@context\"]);if(0===m(t).length)return e;const d=[],y=[({event:e,next:t})=>{d.push(e),t()}];n.eventHandler&&y.push(n.eventHandler);const x=n;n=i(i({},n),{},{eventHandler:y});const b=await n.contextResolver.resolve({activeCtx:e,context:t,documentLoader:n.documentLoader,base:n.base});u(b[0].document)&&\"boolean\"==typeof b[0].document[\"@propagate\"]&&(r=b[0].document[\"@propagate\"]);let I=e;r||I.previousContext||(I=I.clone(),I.previousContext=e);for(const r of b){let{document:i}=r;if(e=I,null===i){if(!o&&0!==Object.keys(e.protected).length)throw new s(\"Tried to nullify a context with protected terms outside of a term definition.\",\"jsonld.SyntaxError\",{code:\"invalid context nullification\"});I=e=w.getInitialContext(n).clone();continue}const c=r.getProcessed(e);if(c){if(x.eventHandler)for(const e of c.events)v({event:e,options:x});I=e=c.context;continue}if(u(i)&&\"@context\"in i&&(i=i[\"@context\"]),!u(i))throw new s(\"Invalid JSON-LD syntax; @context must be an object.\",\"jsonld.SyntaxError\",{code:\"invalid local context\",context:i});I=I.clone();const y=new Map;if(\"@version\"in i){if(1.1!==i[\"@version\"])throw new s(\"Unsupported JSON-LD version: \"+i[\"@version\"],\"jsonld.UnsupportedVersion\",{code:\"invalid @version value\",context:i});if(e.processingMode&&\"json-ld-1.0\"===e.processingMode)throw new s(\"@version: \"+i[\"@version\"]+\" not compatible with \"+e.processingMode,\"jsonld.ProcessingModeConflict\",{code:\"processing mode conflict\",context:i});I.processingMode=\"json-ld-1.1\",I[\"@version\"]=i[\"@version\"],y.set(\"@version\",!0)}if(I.processingMode=I.processingMode||e.processingMode,\"@base\"in i){let e=i[\"@base\"];if(null===e||f(e));else{if(!p(e))throw new s('Invalid JSON-LD syntax; the value of \"@base\" in a @context must be an absolute IRI, a relative IRI, or null.',\"jsonld.SyntaxError\",{code:\"invalid base IRI\",context:i});e=h(I[\"@base\"],e)}I[\"@base\"]=e,y.set(\"@base\",!0)}if(\"@vocab\"in i){const e=i[\"@vocab\"];if(null===e)delete I[\"@vocab\"];else{if(!l(e))throw new s('Invalid JSON-LD syntax; the value of \"@vocab\" in a @context must be a string or null.',\"jsonld.SyntaxError\",{code:\"invalid vocab mapping\",context:i});if(!f(e)&&w.processingMode(I,1))throw new s('Invalid JSON-LD syntax; the value of \"@vocab\" in a @context must be an absolute IRI.',\"jsonld.SyntaxError\",{code:\"invalid vocab mapping\",context:i});{const t=j(I,e,{vocab:!0,base:!0},void 0,void 0,n);f(t)||n.eventHandler&&v({event:{type:[\"JsonLdEvent\"],code:\"relative @vocab reference\",level:\"warning\",message:\"Relative @vocab reference found.\",details:{vocab:t}},options:n}),I[\"@vocab\"]=t}}y.set(\"@vocab\",!0)}if(\"@language\"in i){const e=i[\"@language\"];if(null===e)delete I[\"@language\"];else{if(!l(e))throw new s('Invalid JSON-LD syntax; the value of \"@language\" in a @context must be a string or null.',\"jsonld.SyntaxError\",{code:\"invalid default language\",context:i});e.match(g)||n.eventHandler&&v({event:{type:[\"JsonLdEvent\"],code:\"invalid @language value\",level:\"warning\",message:\"@language value must be valid BCP47.\",details:{language:e}},options:n}),I[\"@language\"]=e.toLowerCase()}y.set(\"@language\",!0)}if(\"@direction\"in i){const t=i[\"@direction\"];if(\"json-ld-1.0\"===e.processingMode)throw new s(\"Invalid JSON-LD syntax; @direction not compatible with \"+e.processingMode,\"jsonld.SyntaxError\",{code:\"invalid context member\",context:i});if(null===t)delete I[\"@direction\"];else{if(\"ltr\"!==t&&\"rtl\"!==t)throw new s('Invalid JSON-LD syntax; the value of \"@direction\" in a @context must be null, \"ltr\", or \"rtl\".',\"jsonld.SyntaxError\",{code:\"invalid base direction\",context:i});I[\"@direction\"]=t}y.set(\"@direction\",!0)}if(\"@propagate\"in i){const n=i[\"@propagate\"];if(\"json-ld-1.0\"===e.processingMode)throw new s(\"Invalid JSON-LD syntax; @propagate not compatible with \"+e.processingMode,\"jsonld.SyntaxError\",{code:\"invalid context entry\",context:i});if(\"boolean\"!=typeof n)throw new s(\"Invalid JSON-LD syntax; @propagate value must be a boolean.\",\"jsonld.SyntaxError\",{code:\"invalid @propagate value\",context:t});y.set(\"@propagate\",!0)}if(\"@import\"in i){const r=i[\"@import\"];if(\"json-ld-1.0\"===e.processingMode)throw new s(\"Invalid JSON-LD syntax; @import not compatible with \"+e.processingMode,\"jsonld.SyntaxError\",{code:\"invalid context entry\",context:i});if(!l(r))throw new s(\"Invalid JSON-LD syntax; @import must be a string.\",\"jsonld.SyntaxError\",{code:\"invalid @import value\",context:t});const o=await n.contextResolver.resolve({activeCtx:e,context:r,documentLoader:n.documentLoader,base:n.base});if(1!==o.length)throw new s(\"Invalid JSON-LD syntax; @import must reference a single context.\",\"jsonld.SyntaxError\",{code:\"invalid remote context\",context:t});const a=o[0].getProcessed(e);if(a)i=a;else{const n=o[0].document;if(\"@import\"in n)throw new s(\"Invalid JSON-LD syntax: imported context must not include @import.\",\"jsonld.SyntaxError\",{code:\"invalid context entry\",context:t});for(const e in n)i.hasOwnProperty(e)||(i[e]=n[e]);o[0].setProcessed(e,i)}y.set(\"@import\",!0)}y.set(\"@protected\",i[\"@protected\"]||!1);for(const e in i)if(w.createTermDefinition({activeCtx:I,localCtx:i,term:e,defined:y,options:n,overrideProtected:o}),u(i[e])&&\"@context\"in i[e]){const t=i[e][\"@context\"];let r=!0;if(l(t)){const e=h(n.base,t);a.has(e)?r=!1:a.add(e)}if(r)try{await w.process({activeCtx:I.clone(),localCtx:i[e][\"@context\"],overrideProtected:!0,options:n,cycles:a})}catch(t){throw new s(\"Invalid JSON-LD syntax; invalid scoped context.\",\"jsonld.SyntaxError\",{code:\"invalid scoped context\",context:i[e][\"@context\"],term:e})}}r.setProcessed(e,{context:I,events:d})}return I},w.createTermDefinition=({activeCtx:e,localCtx:t,term:n,defined:r,options:o,overrideProtected:i=!1})=>{if(r.has(n)){if(r.get(n))return;throw new s(\"Cyclical context definition detected.\",\"jsonld.CyclicalContext\",{code:\"cyclic IRI mapping\",context:t,term:n})}let a;if(r.set(n,!1),t.hasOwnProperty(n)&&(a=t[n]),\"@type\"===n&&u(a)&&\"@set\"===(a[\"@container\"]||\"@set\")&&w.processingMode(e,1.1)){const e=[\"@container\",\"@id\",\"@protected\"],r=Object.keys(a);if(0===r.length||r.some(t=>!e.includes(t)))throw new s(\"Invalid JSON-LD syntax; keywords cannot be overridden.\",\"jsonld.SyntaxError\",{code:\"keyword redefinition\",context:t,term:n})}else{if(w.isKeyword(n))throw new s(\"Invalid JSON-LD syntax; keywords cannot be overridden.\",\"jsonld.SyntaxError\",{code:\"keyword redefinition\",context:t,term:n});if(n.match(y))return void(o.eventHandler&&v({event:{type:[\"JsonLdEvent\"],code:\"reserved term\",level:\"warning\",message:'Terms beginning with \"@\" are reserved for future use and dropped.',details:{term:n}},options:o}));if(\"\"===n)throw new s(\"Invalid JSON-LD syntax; a term cannot be an empty string.\",\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t})}const d=e.mappings.get(n);e.mappings.has(n)&&e.mappings.delete(n);let p=!1;if((l(a)||null===a)&&(p=!0,a={\"@id\":a}),!u(a))throw new s(\"Invalid JSON-LD syntax; @context term values must be strings or objects.\",\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t});const h={};e.mappings.set(n,h),h.reverse=!1;const g=[\"@container\",\"@id\",\"@language\",\"@reverse\",\"@type\"];w.processingMode(e,1.1)&&g.push(\"@context\",\"@direction\",\"@index\",\"@nest\",\"@prefix\",\"@protected\");for(const e in a)if(!g.includes(e))throw new s(\"Invalid JSON-LD syntax; a term definition must not contain \"+e,\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t});const m=n.indexOf(\":\");if(h._termHasColon=m>0,\"@reverse\"in a){if(\"@id\"in a)throw new s(\"Invalid JSON-LD syntax; a @reverse term definition must not contain @id.\",\"jsonld.SyntaxError\",{code:\"invalid reverse property\",context:t});if(\"@nest\"in a)throw new s(\"Invalid JSON-LD syntax; a @reverse term definition must not contain @nest.\",\"jsonld.SyntaxError\",{code:\"invalid reverse property\",context:t});const i=a[\"@reverse\"];if(!l(i))throw new s(\"Invalid JSON-LD syntax; a @context @reverse value must be a string.\",\"jsonld.SyntaxError\",{code:\"invalid IRI mapping\",context:t});if(i.match(y))return o.eventHandler&&v({event:{type:[\"JsonLdEvent\"],code:\"reserved @reverse value\",level:\"warning\",message:'@reverse values beginning with \"@\" are reserved for future use and dropped.',details:{reverse:i}},options:o}),void(d?e.mappings.set(n,d):e.mappings.delete(n));const c=j(e,i,{vocab:!0,base:!1},t,r,o);if(!f(c))throw new s(\"Invalid JSON-LD syntax; a @context @reverse value must be an absolute IRI or a blank node identifier.\",\"jsonld.SyntaxError\",{code:\"invalid IRI mapping\",context:t});h[\"@id\"]=c,h.reverse=!0}else if(\"@id\"in a){let i=a[\"@id\"];if(i&&!l(i))throw new s(\"Invalid JSON-LD syntax; a @context @id value must be an array of strings or a string.\",\"jsonld.SyntaxError\",{code:\"invalid IRI mapping\",context:t});if(null===i)h[\"@id\"]=null;else{if(!w.isKeyword(i)&&i.match(y))return o.eventHandler&&v({event:{type:[\"JsonLdEvent\"],code:\"reserved @id value\",level:\"warning\",message:'@id values beginning with \"@\" are reserved for future use and dropped.',details:{id:i}},options:o}),void(d?e.mappings.set(n,d):e.mappings.delete(n));if(i!==n){if(i=j(e,i,{vocab:!0,base:!1},t,r,o),!f(i)&&!w.isKeyword(i))throw new s(\"Invalid JSON-LD syntax; a @context @id value must be an absolute IRI, a blank node identifier, or a keyword.\",\"jsonld.SyntaxError\",{code:\"invalid IRI mapping\",context:t});if(n.match(/(?::[^:])|\\//)){if(j(e,n,{vocab:!0,base:!1},t,new Map(r).set(n,!0),o)!==i)throw new s(\"Invalid JSON-LD syntax; term in form of IRI must expand to definition.\",\"jsonld.SyntaxError\",{code:\"invalid IRI mapping\",context:t})}h[\"@id\"]=i,h._prefix=p&&!h._termHasColon&&null!==i.match(/[:\\/\\?#\\[\\]@]$/)}}}if(!(\"@id\"in h))if(h._termHasColon){const i=n.substr(0,m);if(t.hasOwnProperty(i)&&w.createTermDefinition({activeCtx:e,localCtx:t,term:i,defined:r,options:o}),e.mappings.has(i)){const t=n.substr(m+1);h[\"@id\"]=e.mappings.get(i)[\"@id\"]+t}else h[\"@id\"]=n}else if(\"@type\"===n)h[\"@id\"]=n;else{if(!(\"@vocab\"in e))throw new s(\"Invalid JSON-LD syntax; @context terms must define an @id.\",\"jsonld.SyntaxError\",{code:\"invalid IRI mapping\",context:t,term:n});h[\"@id\"]=e[\"@vocab\"]+n}if((!0===a[\"@protected\"]||!0===r.get(\"@protected\")&&!1!==a[\"@protected\"])&&(e.protected[n]=!0,h.protected=!0),r.set(n,!0),\"@type\"in a){let n=a[\"@type\"];if(!l(n))throw new s(\"Invalid JSON-LD syntax; an @context @type value must be a string.\",\"jsonld.SyntaxError\",{code:\"invalid type mapping\",context:t});if(\"@json\"===n||\"@none\"===n){if(w.processingMode(e,1))throw new s(`Invalid JSON-LD syntax; an @context @type value must not be \"${n}\" in JSON-LD 1.0 mode.`,\"jsonld.SyntaxError\",{code:\"invalid type mapping\",context:t})}else if(\"@id\"!==n&&\"@vocab\"!==n){if(n=j(e,n,{vocab:!0,base:!1},t,r,o),!f(n))throw new s(\"Invalid JSON-LD syntax; an @context @type value must be an absolute IRI.\",\"jsonld.SyntaxError\",{code:\"invalid type mapping\",context:t});if(0===n.indexOf(\"_:\"))throw new s(\"Invalid JSON-LD syntax; an @context @type value must be an IRI, not a blank node identifier.\",\"jsonld.SyntaxError\",{code:\"invalid type mapping\",context:t})}h[\"@type\"]=n}if(\"@container\"in a){const n=l(a[\"@container\"])?[a[\"@container\"]]:a[\"@container\"]||[],r=[\"@list\",\"@set\",\"@index\",\"@language\"];let o=!0;const i=n.includes(\"@set\");if(w.processingMode(e,1.1)){if(r.push(\"@graph\",\"@id\",\"@type\"),n.includes(\"@list\")){if(1!==n.length)throw new s(\"Invalid JSON-LD syntax; @context @container with @list must have no other values\",\"jsonld.SyntaxError\",{code:\"invalid container mapping\",context:t})}else if(n.includes(\"@graph\")){if(n.some(e=>\"@graph\"!==e&&\"@id\"!==e&&\"@index\"!==e&&\"@set\"!==e))throw new s(\"Invalid JSON-LD syntax; @context @container with @graph must have no other values other than @id, @index, and @set\",\"jsonld.SyntaxError\",{code:\"invalid container mapping\",context:t})}else o&=n.length<=(i?2:1);if(n.includes(\"@type\")&&(h[\"@type\"]=h[\"@type\"]||\"@id\",![\"@id\",\"@vocab\"].includes(h[\"@type\"])))throw new s(\"Invalid JSON-LD syntax; container: @type requires @type to be @id or @vocab.\",\"jsonld.SyntaxError\",{code:\"invalid type mapping\",context:t})}else o&=!c(a[\"@container\"]),o&=n.length<=1;if(o&=n.every(e=>r.includes(e)),o&=!(i&&n.includes(\"@list\")),!o)throw new s(\"Invalid JSON-LD syntax; @context @container value must be one of the following: \"+r.join(\", \"),\"jsonld.SyntaxError\",{code:\"invalid container mapping\",context:t});if(h.reverse&&!n.every(e=>[\"@index\",\"@set\"].includes(e)))throw new s(\"Invalid JSON-LD syntax; @context @container value for a @reverse type definition must be @index or @set.\",\"jsonld.SyntaxError\",{code:\"invalid reverse property\",context:t});h[\"@container\"]=n}if(\"@index\"in a){if(!(\"@container\"in a)||!h[\"@container\"].includes(\"@index\"))throw new s(`Invalid JSON-LD syntax; @index without @index in @container: \"${a[\"@index\"]}\" on term \"${n}\".`,\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t});if(!l(a[\"@index\"])||0===a[\"@index\"].indexOf(\"@\"))throw new s(`Invalid JSON-LD syntax; @index must expand to an IRI: \"${a[\"@index\"]}\" on term \"${n}\".`,\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t});h[\"@index\"]=a[\"@index\"]}if(\"@context\"in a&&(h[\"@context\"]=a[\"@context\"]),\"@language\"in a&&!(\"@type\"in a)){let e=a[\"@language\"];if(null!==e&&!l(e))throw new s(\"Invalid JSON-LD syntax; @context @language value must be a string or null.\",\"jsonld.SyntaxError\",{code:\"invalid language mapping\",context:t});null!==e&&(e=e.toLowerCase()),h[\"@language\"]=e}if(\"@prefix\"in a){if(n.match(/:|\\//))throw new s(\"Invalid JSON-LD syntax; @context @prefix used on a compact IRI term\",\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t});if(w.isKeyword(h[\"@id\"]))throw new s(\"Invalid JSON-LD syntax; keywords may not be used as prefixes\",\"jsonld.SyntaxError\",{code:\"invalid term definition\",context:t});if(\"boolean\"!=typeof a[\"@prefix\"])throw new s(\"Invalid JSON-LD syntax; @context value for @prefix must be boolean\",\"jsonld.SyntaxError\",{code:\"invalid @prefix value\",context:t});h._prefix=!0===a[\"@prefix\"]}if(\"@direction\"in a){const e=a[\"@direction\"];if(null!==e&&\"ltr\"!==e&&\"rtl\"!==e)throw new s('Invalid JSON-LD syntax; @direction value must be null, \"ltr\", or \"rtl\".',\"jsonld.SyntaxError\",{code:\"invalid base direction\",context:t});h[\"@direction\"]=e}if(\"@nest\"in a){const e=a[\"@nest\"];if(!l(e)||\"@nest\"!==e&&0===e.indexOf(\"@\"))throw new s(\"Invalid JSON-LD syntax; @context @nest value must be a string which is not a keyword other than @nest.\",\"jsonld.SyntaxError\",{code:\"invalid @nest value\",context:t});h[\"@nest\"]=e}\n// disallow aliasing @context and @preserve\nconst x=h[\"@id\"];if(\"@context\"===x||\"@preserve\"===x)throw new s(\"Invalid JSON-LD syntax; @context and @preserve cannot be aliased.\",\"jsonld.SyntaxError\",{code:\"invalid keyword alias\",context:t});if(d&&d.protected&&!i&&(e.protected[n]=!0,h.protected=!0,!function e(t,n){if(!t||\"object\"!=typeof t||!n||\"object\"!=typeof n)return t===n;const r=Array.isArray(t);if(r!==Array.isArray(n))return!1;if(r){if(t.length!==n.length)return!1;for(let r=0;r<t.length;++r)if(!e(t[r],n[r]))return!1;return!0}const o=Object.keys(t),i=Object.keys(n);if(o.length!==i.length)return!1;for(const r in t){let o=t[r],i=n[r];if(\"@container\"===r&&Array.isArray(o)&&Array.isArray(i)&&(o=o.slice().sort(),i=i.slice().sort()),!e(o,i))return!1}return!0}(d,h)))throw new s(\"Invalid JSON-LD syntax; tried to redefine a protected term.\",\"jsonld.SyntaxError\",{code:\"protected term redefinition\",context:t,term:n})},w.expandIri=(e,t,n,r)=>j(e,t,n,void 0,void 0,r),w.getInitialContext=e=>{const t=JSON.stringify({processingMode:e.processingMode}),n=b.get(t);if(n)return n;const r={processingMode:e.processingMode,mappings:new Map,inverse:null,getInverse:function(){const e=this;if(e.inverse)return e.inverse;const t=e.inverse={},n=e.fastCurieMap={},r={},a=(e[\"@language\"]||\"@none\").toLowerCase(),s=e[\"@direction\"],c=e.mappings,u=[...c.keys()].sort(x);for(const e of u){const o=c.get(e);if(null===o)continue;let u=o[\"@container\"]||\"@none\";if(u=[].concat(u).sort().join(\"\"),null===o[\"@id\"])continue;const l=m(o[\"@id\"]);for(const c of l){let l=t[c];const d=w.isKeyword(c);if(l)d||o._termHasColon||r[c].push(e);else if(t[c]=l={},!d&&!o._termHasColon){r[c]=[e];const t={iri:c,terms:r[c]};c[0]in n?n[c[0]].push(t):n[c[0]]=[t]}if(l[u]||(l[u]={\"@language\":{},\"@type\":{},\"@any\":{}}),l=l[u],i(e,l[\"@any\"],\"@none\"),o.reverse)i(e,l[\"@type\"],\"@reverse\");else if(\"@none\"===o[\"@type\"])i(e,l[\"@any\"],\"@none\"),i(e,l[\"@language\"],\"@none\"),i(e,l[\"@type\"],\"@none\");else if(\"@type\"in o)i(e,l[\"@type\"],o[\"@type\"]);else if(\"@language\"in o&&\"@direction\"in o){const t=o[\"@language\"],n=o[\"@direction\"];i(e,l[\"@language\"],t&&n?`${t}_${n}`.toLowerCase():t?t.toLowerCase():n?\"_\"+n:\"@null\")}else\"@language\"in o?i(e,l[\"@language\"],(o[\"@language\"]||\"@null\").toLowerCase()):\"@direction\"in o?o[\"@direction\"]?i(e,l[\"@language\"],\"_\"+o[\"@direction\"]):i(e,l[\"@language\"],\"@none\"):s?(i(e,l[\"@language\"],\"_\"+s),i(e,l[\"@language\"],\"@none\"),i(e,l[\"@type\"],\"@none\")):(i(e,l[\"@language\"],a),i(e,l[\"@language\"],\"@none\"),i(e,l[\"@type\"],\"@none\"))}}for(const e in n)o(n,e,1);return t},clone:function(){const e={};e.mappings=a.clone(this.mappings),e.clone=this.clone,e.inverse=null,e.getInverse=this.getInverse,e.protected=a.clone(this.protected),this.previousContext&&(e.previousContext=this.previousContext.clone());e.revertToPreviousContext=this.revertToPreviousContext,\"@base\"in this&&(e[\"@base\"]=this[\"@base\"]);\"@language\"in this&&(e[\"@language\"]=this[\"@language\"]);\"@vocab\"in this&&(e[\"@vocab\"]=this[\"@vocab\"]);return e},revertToPreviousContext:function(){if(!this.previousContext)return this;return this.previousContext.clone()},protected:{}};return 1e4===b.size&&b.clear(),b.set(t,r),r;function o(e,t,n){const r=e[t],i=e[t]={};let a,s;for(const e of r)a=e.iri,s=n>=a.length?\"\":a[n],s in i?i[s].push(e):i[s]=[e];for(const e in i)\"\"!==e&&o(i,e,n+1)}function i(e,t,n){t.hasOwnProperty(n)||(t[n]=e)}},w.getContextValue=(e,t,n)=>{if(null===t){if(\"@context\"===n)return;return null}if(e.mappings.has(t)){const r=e.mappings.get(t);if(d(n))return r;if(r.hasOwnProperty(n))return r[n]}return\"@language\"===n&&n in e||\"@direction\"===n&&n in e?e[n]:\"@context\"!==n?null:void 0},w.processingMode=(e,t)=>t.toString()>=\"1.1\"?!e.processingMode||e.processingMode>=\"json-ld-\"+t.toString():\"json-ld-1.0\"===e.processingMode,w.isKeyword=e=>{if(!l(e)||\"@\"!==e[0])return!1;switch(e){case\"@base\":case\"@container\":case\"@context\":case\"@default\":case\"@direction\":case\"@embed\":case\"@explicit\":case\"@graph\":case\"@id\":case\"@included\":case\"@index\":case\"@json\":case\"@language\":case\"@list\":case\"@nest\":case\"@none\":case\"@omitDefault\":case\"@prefix\":case\"@preserve\":case\"@protected\":case\"@requireAll\":case\"@reverse\":case\"@set\":case\"@type\":case\"@value\":case\"@version\":case\"@vocab\":return!0}return!1}},function(e,t,n){\"use strict\";var r=n(11),o=n(5),i=n(119),a=n(53),s=n(54),c=n(69),u=n(13),l=n(123),d=Object.getOwnPropertyDescriptor;t.f=r?d:function(e,t){if(e=s(e),t=c(t),l)try{return d(e,t)}catch(e){}if(u(e,t))return a(!o(i.f,e,t),e[t])}},function(e,t,n){\"use strict\";var r=n(20),o=n(38);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},function(e,t,n){\"use strict\";var r=String;e.exports=function(e){try{return r(e)}catch(e){return\"Object\"}}},function(e,t,n){\"use strict\";var r=n(185),o=n(10),i=n(186);e.exports=Object.setPrototypeOf||(\"__proto__\"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,\"__proto__\",\"set\"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return o(n),i(r),t?e(n,r):n.__proto__=r,n}}():void 0)},function(e,t,n){\"use strict\";var r=n(68),o=Function.prototype,i=o.apply,a=o.call;e.exports=\"object\"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},function(e,t,n){\"use strict\";var r=n(48),o=n(20),i=n(68),a=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(e,t):function(){return e.apply(t,arguments)}}},function(e,t,n){\"use strict\";var r=n(33),o=n(2);e.exports=function(e){if(\"Function\"===r(e))return o(e)}},function(e,t,n){\"use strict\";var r=n(3),o=n(128).includes,i=n(1),a=n(141);r({target:\"Array\",proto:!0,forced:i((function(){return!Array(1).includes()}))},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a(\"includes\")},function(e,t,n){\"use strict\";var r=n(3),o=n(2),i=n(100),a=n(17),s=n(9),c=n(102),u=o(\"\".indexOf);r({target:\"String\",proto:!0,forced:!c(\"includes\")},{includes:function(e){return!!~u(s(a(this)),s(i(e)),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){\"use strict\";var r,o=n(3),i=n(48),a=n(42).f,s=n(24),c=n(9),u=n(100),l=n(17),d=n(102),f=n(26),p=i(\"\".startsWith),h=i(\"\".slice),v=Math.min,g=d(\"startsWith\");o({target:\"String\",proto:!0,forced:!!(f||g||(r=a(String.prototype,\"startsWith\"),!r||r.writable))&&!g},{startsWith:function(e){var t=c(l(this));u(e);var n=s(v(arguments.length>1?arguments[1]:void 0,t.length)),r=c(e);return p?p(t,r,n):h(t,n,n+r.length)===r}})},function(e,t,n){\"use strict\";var r=n(5),o=n(110),i=n(10),a=n(38),s=n(24),c=n(9),u=n(17),l=n(43),d=n(111),f=n(112);o(\"match\",(function(e,t,n){return[function(t){var n=u(this),o=a(t)?void 0:l(t,e);return o?r(o,t,n):new RegExp(t)[e](c(n))},function(e){var r=i(this),o=c(e),a=n(t,r,o);if(a.done)return a.value;if(!r.global)return f(r,o);var u=r.unicode;r.lastIndex=0;for(var l,p=[],h=0;null!==(l=f(r,o));){var v=c(l[0]);p[h]=v,\"\"===v&&(r.lastIndex=d(o,s(r.lastIndex),u)),h++}return 0===h?null:p}]}))},function(e,t,n){\"use strict\";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){\"use strict\";var r=n(55),o=n(17);e.exports=function(e){return r(o(e))}},function(e,t,n){\"use strict\";var r=n(2),o=n(1),i=n(33),a=Object,s=r(\"\".split);e.exports=o((function(){return!a(\"z\").propertyIsEnumerable(0)}))?function(e){return\"String\"===i(e)?s(e,\"\"):a(e)}:a},function(e,t,n){\"use strict\";var r,o,i=n(0),a=n(30),s=i.process,c=i.Deno,u=s&&s.versions||c&&c.version,l=u&&u.v8;l&&(o=(r=l.split(\".\"))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&a&&(!(r=a.match(/Edge\\/(\\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\\/(\\d+)/))&&(o=+r[1]),e.exports=o},function(e,t,n){\"use strict\";var r=n(0),o=n(33);e.exports=\"process\"===o(r.process)},function(e,t,n){\"use strict\";var r=n(125),o=n(22);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},function(e,t,n){\"use strict\";var r=n(0);e.exports=r.Promise},function(e,t,n){\"use strict\";var r=n(0),o=n(59),i=n(4),a=n(93),s=n(89),c=n(7),u=n(192),l=n(136),d=n(26),f=n(56),p=o&&o.prototype,h=c(\"species\"),v=!1,g=i(r.PromiseRejectionEvent),y=a(\"Promise\",(function(){var e=s(o),t=e!==String(o);if(!t&&66===f)return!0;if(d&&(!p.catch||!p.finally))return!0;if(!f||f<51||!/native code/.test(e)){var n=new o((function(e){e(1)})),r=function(e){e((function(){}),(function(){}))};if((n.constructor={})[h]=r,!(v=n.then((function(){}))instanceof r))return!0}return!t&&(u||l)&&!g}));e.exports={CONSTRUCTOR:y,REJECTION_EVENT:g,SUBCLASSING:v}},function(e,t,n){\"use strict\";var r=n(20),o=TypeError,i=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw new o(\"Bad Promise constructor\");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new i(e)}},function(e,t,n){\"use strict\";e.exports={}},function(e,t,n){\"use strict\";var r,o=n(10),i=n(200),a=n(92),s=n(91),c=n(132),u=n(71),l=n(90),d=l(\"IE_PROTO\"),f=function(){},p=function(e){return\"<script>\"+e+\"<\\/script>\"},h=function(e){e.write(p(\"\")),e.close();var t=e.parentWindow.Object;return e=null,t},v=function(){try{r=new ActiveXObject(\"htmlfile\")}catch(e){}var e,t;v=\"undefined\"!=typeof document?document.domain&&r?h(r):((t=u(\"iframe\")).style.display=\"none\",c.appendChild(t),t.src=String(\"javascript:\"),(e=t.contentWindow.document).open(),e.write(p(\"document.F=Object\")),e.close(),e.F):h(r);for(var n=a.length;n--;)delete v.prototype[a[n]];return v()};s[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=o(e),n=new f,f.prototype=null,n[d]=e):n=v(),void 0===t?n:i.f(n,t)}},function(e,t,n){\"use strict\";var r=n(3),o=n(2),i=n(107),a=o([].reverse),s=[1,2];r({target:\"Array\",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return i(this)&&(this.length=this.length),a(this)}})},function(e,t,n){\"use strict\";n(6),n(8);const r=n(19),{isArray:o}=n(16),{asArray:i}=n(18),a={};e.exports=a,a.defaultEventHandler=null,a.setupEventHandler=({options:e={}})=>{const t=[].concat(e.safe?a.safeEventHandler:[],e.eventHandler?i(e.eventHandler):[],a.defaultEventHandler?a.defaultEventHandler:[]);return 0===t.length?null:t},a.handleEvent=({event:e,options:t})=>{!function e({event:t,handlers:n}){let i=!0;for(let a=0;i&&a<n.length;++a){i=!1;const s=n[a];if(o(s))i=e({event:t,handlers:s});else if(\"function\"==typeof s)s({event:t,next:()=>{i=!0}});else{if(\"object\"!=typeof s)throw new r(\"Invalid event handler.\",\"jsonld.InvalidEventHandler\",{event:t});t.code in s?s[t.code]({event:t,next:()=>{i=!0}}):i=!0}}return i}({event:e,handlers:t.eventHandler})};const s=new Set([\"empty object\",\"free-floating scalar\",\"invalid @language value\",\"invalid property\",\"null @id value\",\"null @value value\",\"object with only @id\",\"object with only @language\",\"object with only @list\",\"object with only @value\",\"relative @id reference\",\"relative @type reference\",\"relative @vocab reference\",\"reserved @id value\",\"reserved @reverse value\",\"reserved term\",\"blank node predicate\",\"relative graph reference\",\"relative object reference\",\"relative predicate reference\",\"relative subject reference\",\"rdfDirection not set\"]);a.safeEventHandler=function({event:e,next:t}){if(\"warning\"===e.level&&s.has(e.code))throw new r(\"Safe mode validation error.\",\"jsonld.ValidationError\",{event:e});t()},a.logEventHandler=function({event:e,next:t}){console.log(\"EVENT: \"+e.message,{event:e}),t()},a.logWarningEventHandler=function({event:e,next:t}){\"warning\"===e.level&&console.warn(\"WARNING: \"+e.message,{event:e}),t()},a.unhandledEventHandler=function({event:e}){throw new r(\"No handler for event.\",\"jsonld.UnhandledEvent\",{event:e})},a.setDefaultEventHandler=function({eventHandler:e}={}){a.defaultEventHandler=e?i(e):null}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(178);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){\"use strict\";var r=n(1);e.exports=!r((function(){var e=function(){}.bind();return\"function\"!=typeof e||e.hasOwnProperty(\"prototype\")}))},function(e,t,n){\"use strict\";var r=n(120),o=n(70);e.exports=function(e){var t=r(e,\"string\");return o(t)?t:t+\"\"}},function(e,t,n){\"use strict\";var r=n(34),o=n(4),i=n(35),a=n(122),s=Object;e.exports=a?function(e){return\"symbol\"==typeof e}:function(e){var t=r(\"Symbol\");return o(t)&&i(t.prototype,s(e))}},function(e,t,n){\"use strict\";var r=n(0),o=n(15),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){\"use strict\";var r=n(11),o=n(13),i=Function.prototype,a=r&&Object.getOwnPropertyDescriptor,s=o(i,\"name\"),c=s&&\"something\"===function(){}.name,u=s&&(!r||r&&a(i,\"name\").configurable);e.exports={EXISTS:s,PROPER:c,CONFIGURABLE:u}},function(e,t,n){\"use strict\";var r=n(127),o=n(92).concat(\"length\",\"prototype\");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t,n){\"use strict\";var r=n(28),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t,n){\"use strict\";var r=n(22).f,o=n(13),i=n(7)(\"toStringTag\");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!o(e,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){\"use strict\";var r,o,i,a,s=n(0),c=n(46),u=n(47),l=n(4),d=n(13),f=n(1),p=n(132),h=n(77),v=n(71),g=n(133),y=n(134),m=n(57),x=s.setImmediate,b=s.clearImmediate,w=s.process,j=s.Dispatch,I=s.Function,O=s.MessageChannel,S=s.String,E=0,N={};f((function(){r=s.location}));var A=function(e){if(d(N,e)){var t=N[e];delete N[e],t()}},T=function(e){return function(){A(e)}},D=function(e){A(e.data)},R=function(e){s.postMessage(S(e),r.protocol+\"//\"+r.host)};x&&b||(x=function(e){g(arguments.length,1);var t=l(e)?e:I(e),n=h(arguments,1);return N[++E]=function(){c(t,void 0,n)},o(E),E},b=function(e){delete N[e]},m?o=function(e){w.nextTick(T(e))}:j&&j.now?o=function(e){j.now(T(e))}:O&&!y?(a=(i=new O).port2,i.port1.onmessage=D,o=u(a.postMessage,a)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&r&&\"file:\"!==r.protocol&&!f(R)?(o=R,s.addEventListener(\"message\",D,!1)):o=\"onreadystatechange\"in v(\"script\")?function(e){p.appendChild(v(\"script\")).onreadystatechange=function(){p.removeChild(this),A(e)}}:function(e){setTimeout(T(e),0)}),e.exports={set:x,clear:b}},function(e,t,n){\"use strict\";var r=n(2);e.exports=r([].slice)},function(e,t,n){\"use strict\";var r=n(13),o=n(4),i=n(21),a=n(90),s=n(203),c=a(\"IE_PROTO\"),u=Object,l=u.prototype;e.exports=s?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof u?l:null}},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.\n */n(12),n(6),n(215),n(221),n(232),n(234),n(235),n(237),n(239),n(240),n(241),n(242),n(40),n(245);const r=self.crypto||self.msCrypto;e.exports=class{constructor(e){if(!r||!r.subtle)throw new Error(\"crypto.subtle not found.\");if(\"sha256\"===e)this.algorithm={name:\"SHA-256\"};else{if(\"sha1\"!==e)throw new Error(`Unsupported algorithm \"${e}\".`);this.algorithm={name:\"SHA-1\"}}this._content=\"\"}update(e){this._content+=e}async digest(){const e=(new TextEncoder).encode(this._content),t=new Uint8Array(await r.subtle.digest(this.algorithm,e));let n=\"\";for(let e=0;e<t.length;++e)n+=t[e].toString(16).padStart(2,\"0\");return n}}},function(e,t,n){\"use strict\";var r,o,i=n(5),a=n(2),s=n(9),c=n(161),u=n(109),l=n(85),d=n(63),f=n(36).get,p=n(163),h=n(164),v=l(\"native-string-replace\",String.prototype.replace),g=RegExp.prototype.exec,y=g,m=a(\"\".charAt),x=a(\"\".indexOf),b=a(\"\".replace),w=a(\"\".slice),j=(o=/b*/g,i(g,r=/a/,\"a\"),i(g,o,\"a\"),0!==r.lastIndex||0!==o.lastIndex),I=u.BROKEN_CARET,O=void 0!==/()??/.exec(\"\")[1];(j||O||I||p||h)&&(y=function(e){var t,n,r,o,a,u,l,p=this,h=f(p),S=s(e),E=h.raw;if(E)return E.lastIndex=p.lastIndex,t=i(y,E,S),p.lastIndex=E.lastIndex,t;var N=h.groups,A=I&&p.sticky,T=i(c,p),D=p.source,R=0,k=S;if(A&&(T=b(T,\"y\",\"\"),-1===x(T,\"g\")&&(T+=\"g\"),k=w(S,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&\"\\n\"!==m(S,p.lastIndex-1))&&(D=\"(?: \"+D+\")\",k=\" \"+k,R++),n=new RegExp(\"^(?:\"+D+\")\",T)),O&&(n=new RegExp(\"^\"+D+\"$(?!\\\\s)\",T)),j&&(r=p.lastIndex),o=i(g,A?n:p,k),A?o?(o.input=w(o.input,R),o[0]=w(o[0],R),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:j&&o&&(p.lastIndex=p.global?o.index+o[0].length:r),O&&o&&o.length>1&&i(v,o[0],n,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(o[a]=void 0)})),o&&N)for(o.groups=u=d(null),a=0;a<N.length;a++)u[(l=N[a])[0]]=o[l[1]];return o}),e.exports=y},function(e,t,n){\"use strict\";n(25);var r,o,i=n(3),a=n(5),s=n(4),c=n(10),u=n(9),l=(r=!1,(o=/[ac]/).exec=function(){return r=!0,/./.exec.apply(this,arguments)},!0===o.test(\"abc\")&&r),d=/./.test;i({target:\"RegExp\",proto:!0,forced:!l},{test:function(e){var t=c(this),n=u(e),r=t.exec;if(!s(r))return a(d,t,n);var o=a(r,t,n);return null!==o&&(c(o),!0)}})},function(e,t,n){\"use strict\";var r=n(46),o=n(5),i=n(2),a=n(110),s=n(1),c=n(10),u=n(4),l=n(38),d=n(28),f=n(24),p=n(9),h=n(17),v=n(111),g=n(43),y=n(249),m=n(112),x=n(7)(\"replace\"),b=Math.max,w=Math.min,j=i([].concat),I=i([].push),O=i(\"\".indexOf),S=i(\"\".slice),E=\"$0\"===\"a\".replace(/./,\"$0\"),N=!!/./[x]&&\"\"===/./[x](\"a\",\"$0\");a(\"replace\",(function(e,t,n){var i=N?\"$\":\"$0\";return[function(e,n){var r=h(this),i=l(e)?void 0:g(e,x);return i?o(i,e,r,n):o(t,p(r),e,n)},function(e,o){var a=c(this),s=p(e);if(\"string\"==typeof o&&-1===O(o,i)&&-1===O(o,\"$<\")){var l=n(t,a,s,o);if(l.done)return l.value}var h=u(o);h||(o=p(o));var g,x=a.global;x&&(g=a.unicode,a.lastIndex=0);for(var E,N=[];null!==(E=m(a,s))&&(I(N,E),x);){\"\"===p(E[0])&&(a.lastIndex=v(s,f(a.lastIndex),g))}for(var A,T=\"\",D=0,R=0;R<N.length;R++){for(var k,L=p((E=N[R])[0]),C=b(w(d(E.index),s.length),0),_=[],P=1;P<E.length;P++)I(_,void 0===(A=E[P])?A:String(A));var M=E.groups;if(h){var F=j([L],_,C,s);void 0!==M&&I(F,M),k=p(r(o,void 0,F))}else k=y(L,s,C,_,M,o);C>=D&&(T+=S(s,D,C)+k,D=C+L.length)}return T+S(s,D)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:\"7\"},e},\"7\"!==\"\".replace(e,\"$<a>\")}))||!E||N)},function(e,t,n){\"use strict\";n(6),n(8),n(14);const{isKeyword:r}=n(41),o=n(32),i=n(16),a=n(18),s=n(19),c={};e.exports=c,c.createMergedNodeMap=(e,t)=>{const n=(t=t||{}).issuer||new a.IdentifierIssuer(\"_:b\"),r={\"@default\":{}};return c.createNodeMap(e,r,\"@default\",n),c.mergeNodeMaps(r)},c.createNodeMap=(e,t,n,u,l,d)=>{if(i.isArray(e)){for(const r of e)c.createNodeMap(r,t,n,u,void 0,d);return}if(!i.isObject(e))return void(d&&d.push(e));if(o.isValue(e)){if(\"@type\"in e){let t=e[\"@type\"];0===t.indexOf(\"_:\")&&(e[\"@type\"]=t=u.getId(t))}return void(d&&d.push(e))}if(d&&o.isList(e)){const r=[];return c.createNodeMap(e[\"@list\"],t,n,u,l,r),void d.push({\"@list\":r})}if(\"@type\"in e){const t=e[\"@type\"];for(const e of t)0===e.indexOf(\"_:\")&&u.getId(e)}i.isUndefined(l)&&(l=o.isBlankNode(e)?u.getId(e[\"@id\"]):e[\"@id\"]),d&&d.push({\"@id\":l});const f=t[n],p=f[l]=f[l]||{};p[\"@id\"]=l;const h=Object.keys(e).sort();for(let i of h){if(\"@id\"===i)continue;if(\"@reverse\"===i){const r={\"@id\":l},i=e[\"@reverse\"];for(const e in i){const s=i[e];for(const i of s){let s=i[\"@id\"];o.isBlankNode(i)&&(s=u.getId(s)),c.createNodeMap(i,t,n,u,s),a.addValue(f[s],e,r,{propertyIsArray:!0,allowDuplicate:!1})}}continue}if(\"@graph\"===i){l in t||(t[l]={}),c.createNodeMap(e[i],t,l,u);continue}if(\"@included\"===i){c.createNodeMap(e[i],t,n,u);continue}if(\"@type\"!==i&&r(i)){if(\"@index\"===i&&i in p&&(e[i]!==p[i]||e[i][\"@id\"]!==p[i][\"@id\"]))throw new s(\"Invalid JSON-LD syntax; conflicting @index property detected.\",\"jsonld.SyntaxError\",{code:\"conflicting indexes\",subject:p});p[i]=e[i];continue}const d=e[i];if(0===i.indexOf(\"_:\")&&(i=u.getId(i)),0!==d.length)for(let e of d)if(\"@type\"===i&&(e=0===e.indexOf(\"_:\")?u.getId(e):e),o.isSubject(e)||o.isSubjectReference(e)){if(\"@id\"in e&&!e[\"@id\"])continue;const r=o.isBlankNode(e)?u.getId(e[\"@id\"]):e[\"@id\"];a.addValue(p,i,{\"@id\":r},{propertyIsArray:!0,allowDuplicate:!1}),c.createNodeMap(e,t,n,u,r)}else if(o.isValue(e))a.addValue(p,i,e,{propertyIsArray:!0,allowDuplicate:!1});else if(o.isList(e)){const r=[];c.createNodeMap(e[\"@list\"],t,n,u,l,r),e={\"@list\":r},a.addValue(p,i,e,{propertyIsArray:!0,allowDuplicate:!1})}else c.createNodeMap(e,t,n,u,l),a.addValue(p,i,e,{propertyIsArray:!0,allowDuplicate:!1});else a.addValue(p,i,[],{propertyIsArray:!0})}},c.mergeNodeMapGraphs=e=>{const t={};for(const n of Object.keys(e).sort())for(const o of Object.keys(e[n]).sort()){const i=e[n][o];o in t||(t[o]={\"@id\":o});const s=t[o];for(const e of Object.keys(i).sort())if(r(e)&&\"@type\"!==e)s[e]=a.clone(i[e]);else for(const t of i[e])a.addValue(s,e,a.clone(t),{propertyIsArray:!0,allowDuplicate:!1})}return t},c.mergeNodeMaps=e=>{const t=e[\"@default\"],n=Object.keys(e).sort();for(const r of n){if(\"@default\"===r)continue;const n=e[r];let i=t[r];i?\"@graph\"in i||(i[\"@graph\"]=[]):t[r]=i={\"@id\":r,\"@graph\":[]};const a=i[\"@graph\"];for(const e of Object.keys(n).sort()){const t=n[e];o.isSubjectReference(t)||a.push(t)}}return t}},function(e,t,n){\"use strict\";var r=n(56),o=n(1),i=n(0).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol(\"symbol detection\");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){\"use strict\";var r=n(26),o=n(86);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})(\"versions\",[]).push({version:\"3.33.3\",mode:r?\"pure\":\"global\",copyright:\"© 2014-2023 Denis Pushkarev (zloirock.ru)\",license:\"https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE\",source:\"https://github.com/zloirock/core-js\"})},function(e,t,n){\"use strict\";var r=n(0),o=n(87),i=r[\"__core-js_shared__\"]||o(\"__core-js_shared__\",{});e.exports=i},function(e,t,n){\"use strict\";var r=n(0),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},function(e,t,n){\"use strict\";var r=n(2),o=0,i=Math.random(),a=r(1..toString);e.exports=function(e){return\"Symbol(\"+(void 0===e?\"\":e)+\")_\"+a(++o+i,36)}},function(e,t,n){\"use strict\";var r=n(2),o=n(4),i=n(86),a=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return a(e)}),e.exports=i.inspectSource},function(e,t,n){\"use strict\";var r=n(85),o=n(88),i=r(\"keys\");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t,n){\"use strict\";e.exports={}},function(e,t,n){\"use strict\";e.exports=[\"constructor\",\"hasOwnProperty\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toLocaleString\",\"toString\",\"valueOf\"]},function(e,t,n){\"use strict\";var r=n(1),o=n(4),i=/#|\\.prototype\\./,a=function(e,t){var n=c[s(e)];return n===l||n!==u&&(o(t)?r(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,\".\").toLowerCase()},c=a.data={},u=a.NATIVE=\"N\",l=a.POLYFILL=\"P\";e.exports=a},function(e,t,n){\"use strict\";var r=n(34),o=n(58),i=n(7),a=n(11),s=i(\"species\");e.exports=function(e){var t=r(e);a&&t&&!t[s]&&o(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){\"use strict\";var r=n(35),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o(\"Incorrect invocation\")}},function(e,t,n){\"use strict\";var r=n(10),o=n(130),i=n(38),a=n(7)(\"species\");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||i(n=r(s)[a])?t:o(n)}},function(e,t,n){\"use strict\";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){\"use strict\";var r=n(47),o=n(5),i=n(10),a=n(44),s=n(137),c=n(23),u=n(35),l=n(138),d=n(99),f=n(194),p=TypeError,h=function(e,t){this.stopped=e,this.result=t},v=h.prototype;e.exports=function(e,t,n){var g,y,m,x,b,w,j,I=n&&n.that,O=!(!n||!n.AS_ENTRIES),S=!(!n||!n.IS_RECORD),E=!(!n||!n.IS_ITERATOR),N=!(!n||!n.INTERRUPTED),A=r(t,I),T=function(e){return g&&f(g,\"normal\",e),new h(!0,e)},D=function(e){return O?(i(e),N?A(e[0],e[1],T):A(e[0],e[1])):N?A(e,T):A(e)};if(S)g=e.iterator;else if(E)g=e;else{if(!(y=d(e)))throw new p(a(e)+\" is not iterable\");if(s(y)){for(m=0,x=c(e);x>m;m++)if((b=D(e[m]))&&u(v,b))return b;return new h(!1)}g=l(e,y)}for(w=S?e.next:g.next;!(j=o(w,g)).done;){try{b=D(j.value)}catch(e){f(g,\"throw\",e)}if(\"object\"==typeof b&&b&&u(v,b))return b}return new h(!1)}},function(e,t,n){\"use strict\";var r=n(39),o=n(43),i=n(38),a=n(62),s=n(7)(\"iterator\");e.exports=function(e){if(!i(e))return o(e,s)||o(e,\"@@iterator\")||a[r(e)]}},function(e,t,n){\"use strict\";var r=n(101),o=TypeError;e.exports=function(e){if(r(e))throw new o(\"The method doesn't accept regular expressions\");return e}},function(e,t,n){\"use strict\";var r=n(15),o=n(33),i=n(7)(\"match\");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:\"RegExp\"===o(e))}},function(e,t,n){\"use strict\";var r=n(7)(\"match\");e.exports=function(e){var t=/./;try{\"/./\"[e](t)}catch(n){try{return t[r]=!1,\"/./\"[e](t)}catch(e){}}return!1}},function(e,t,n){\"use strict\";var r=n(74),o=n(23),i=n(145),a=Array,s=Math.max;e.exports=function(e,t,n){for(var c=o(e),u=r(t,c),l=r(void 0===n?c:n,c),d=a(s(l-u,0)),f=0;u<l;u++,f++)i(d,f,e[u]);return d.length=f,d}},function(e,t,n){\"use strict\";var r=n(3),o=n(208);r({target:\"Object\",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},function(e,t,n){\"use strict\";e.exports=n(209)},function(e,t,n){\"use strict\";n(6),n(8),e.exports=class e{constructor(e,t=new Map,n=0){this.prefix=e,this._existing=t,this.counter=n}clone(){const{prefix:t,_existing:n,counter:r}=this;return new e(t,new Map(n),r)}getId(e){const t=e&&this._existing.get(e);if(t)return t;const n=this.prefix+this.counter;return this.counter++,e&&this._existing.set(e,n),n}hasId(e){return this._existing.has(e)}getOldIds(){return[...this._existing.keys()]}}},function(e,t,n){\"use strict\";var r=n(33);e.exports=Array.isArray||function(e){return\"Array\"===r(e)}},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.\n */n(246),n(25),n(40),n(165),n(6),n(8),n(81),n(52),n(14),n(51),n(82),n(166);const r=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString\",o=\"http://www.w3.org/2001/XMLSchema#string\",i={};function a(e,t){return e.subject.termType===t.subject.termType&&e.object.termType===t.object.termType&&(e.subject.value===t.subject.value&&e.predicate.value===t.predicate.value&&e.object.value===t.object.value&&(\"Literal\"!==e.object.termType||e.object.datatype.termType===t.object.datatype.termType&&e.object.language===t.object.language&&e.object.datatype.value===t.object.datatype.value))}i.eoln=/(?:\\r\\n)|(?:\\n)|(?:\\r)/g,i.empty=new RegExp(\"^[ \\\\t]*$\"),i.quad=new RegExp('^[ \\\\t]*(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\\\t]+(?:<([^:]+:[^>]*)>)[ \\\\t]+(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?)|(?:\"([^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*)\"(?:(?:\\\\^\\\\^(?:<([^:]+:[^>]*)>))|(?:@([a-zA-Z]+(?:-[a-zA-Z0-9]+)*)))?))[ \\\\t]*(?:\\\\.|(?:(?:(?:<([^:]+:[^>]*)>)|(_:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9])(?:(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀.])*(?:[A-Za-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�_0-9-·̀-ͯ‿-⁀]))?))[ \\\\t]*\\\\.))[ \\\\t]*$'),e.exports=class e{static parse(e){const t=[],n={},s=e.split(i.eoln);let u=0;for(const e of s){if(u++,i.empty.test(e))continue;const s=e.match(i.quad);if(null===s)throw new Error(\"N-Quads parse error on line \"+u+\".\");const l={subject:null,predicate:null,object:null,graph:null};if(void 0!==s[1]?l.subject={termType:\"NamedNode\",value:s[1]}:l.subject={termType:\"BlankNode\",value:s[2]},l.predicate={termType:\"NamedNode\",value:s[3]},void 0!==s[4]?l.object={termType:\"NamedNode\",value:s[4]}:void 0!==s[5]?l.object={termType:\"BlankNode\",value:s[5]}:(l.object={termType:\"Literal\",value:void 0,datatype:{termType:\"NamedNode\"}},void 0!==s[7]?l.object.datatype.value=s[7]:void 0!==s[8]?(l.object.datatype.value=r,l.object.language=s[8]):l.object.datatype.value=o,l.object.value=s[6].replace(c,(function(e,t,n,r){if(t)switch(t){case\"t\":return\"\\t\";case\"b\":return\"\\b\";case\"n\":return\"\\n\";case\"r\":return\"\\r\";case\"f\":return\"\\f\";case'\"':return'\"';case\"'\":return\"'\";case\"\\\\\":return\"\\\\\"}if(n)return String.fromCharCode(parseInt(n,16));if(r)throw new Error(\"Unsupported U escape\")}))),void 0!==s[9]?l.graph={termType:\"NamedNode\",value:s[9]}:void 0!==s[10]?l.graph={termType:\"BlankNode\",value:s[10]}:l.graph={termType:\"DefaultGraph\",value:\"\"},l.graph.value in n){let e=!0;const r=n[l.graph.value];for(const t of r)if(a(t,l)){e=!1;break}e&&(r.push(l),t.push(l))}else n[l.graph.value]=[l],t.push(l)}return t}static serialize(t){Array.isArray(t)||(t=e.legacyDatasetToQuads(t));const n=[];for(const r of t)n.push(e.serializeQuad(r));return n.sort().join(\"\")}static serializeQuadComponents(e,t,n,i){let a=\"\";return\"NamedNode\"===e.termType?a+=`<${e.value}>`:a+=\"\"+e.value,a+=` <${t.value}> `,\"NamedNode\"===n.termType?a+=`<${n.value}>`:\"BlankNode\"===n.termType?a+=n.value:(a+=`\"${function(e){return e.replace(s,(function(e){switch(e){case'\"':return'\\\\\"';case\"\\\\\":return\"\\\\\\\\\";case\"\\n\":return\"\\\\n\";case\"\\r\":return\"\\\\r\"}}))}(n.value)}\"`,n.datatype.value===r?n.language&&(a+=\"@\"+n.language):n.datatype.value!==o&&(a+=`^^<${n.datatype.value}>`)),\"NamedNode\"===i.termType?a+=` <${i.value}>`:\"BlankNode\"===i.termType&&(a+=\" \"+i.value),a+=\" .\\n\",a}static serializeQuad(t){return e.serializeQuadComponents(t.subject,t.predicate,t.object,t.graph)}static legacyDatasetToQuads(e){const t=[],n={\"blank node\":\"BlankNode\",IRI:\"NamedNode\",literal:\"Literal\"};for(const i in e){e[i].forEach(e=>{const a={};for(const t in e){const i=e[t],s={termType:n[i.type],value:i.value};\"Literal\"===s.termType&&(s.datatype={termType:\"NamedNode\"},\"datatype\"in i&&(s.datatype.value=i.datatype),\"language\"in i?(\"datatype\"in i||(s.datatype.value=r),s.language=i.language):\"datatype\"in i||(s.datatype.value=o)),a[t]=s}a.graph=\"@default\"===i?{termType:\"DefaultGraph\",value:\"\"}:{termType:i.startsWith(\"_:\")?\"BlankNode\":\"NamedNode\",value:i},t.push(a)})}return t}};const s=/[\"\\\\\\n\\r]/g;const c=/(?:\\\\([tbnrf\"'\\\\]))|(?:\\\\u([0-9A-Fa-f]{4}))|(?:\\\\U([0-9A-Fa-f]{8}))/g},function(e,t,n){\"use strict\";var r=n(1),o=n(0).RegExp,i=r((function(){var e=o(\"a\",\"y\");return e.lastIndex=2,null!==e.exec(\"abcd\")})),a=i||r((function(){return!o(\"a\",\"y\").sticky})),s=i||r((function(){var e=o(\"^r\",\"gy\");return e.lastIndex=2,null!==e.exec(\"str\")}));e.exports={BROKEN_CARET:s,MISSED_STICKY:a,UNSUPPORTED_Y:i}},function(e,t,n){\"use strict\";n(25);var r=n(48),o=n(27),i=n(80),a=n(1),s=n(7),c=n(31),u=s(\"species\"),l=RegExp.prototype;e.exports=function(e,t,n,d){var f=s(e),p=!a((function(){var t={};return t[f]=function(){return 7},7!==\"\"[e](t)})),h=p&&!a((function(){var t=!1,n=/a/;return\"split\"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags=\"\",n[f]=/./[f]),n.exec=function(){return t=!0,null},n[f](\"\"),!t}));if(!p||!h||n){var v=r(/./[f]),g=t(f,\"\"[e],(function(e,t,n,o,a){var s=r(e),c=t.exec;return c===i||c===l.exec?p&&!a?{done:!0,value:v(t,n,o)}:{done:!0,value:s(n,t,o)}:{done:!1}}));o(String.prototype,e,g[0]),o(l,f,g[1])}d&&c(l[f],\"sham\",!0)}},function(e,t,n){\"use strict\";var r=n(248).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){\"use strict\";var r=n(5),o=n(10),i=n(4),a=n(33),s=n(80),c=TypeError;e.exports=function(e,t){var n=e.exec;if(i(n)){var u=r(n,e,t);return null!==u&&o(u),u}if(\"RegExp\"===a(e))return r(s,e,t);throw new c(\"RegExp#exec called on incompatible receiver\")}},function(e,t,n){\"use strict\";e.exports=\"\\t\\n\\v\\f\\r                　\\u2028\\u2029\\ufeff\"},function(e,t,n){\"use strict\";var r=n(3),o=n(257);r({global:!0,forced:parseFloat!==o},{parseFloat:o})},function(e,t,n){\"use strict\";const r=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",o=\"http://www.w3.org/2001/XMLSchema#\";e.exports={LINK_HEADER_REL:\"http://www.w3.org/ns/json-ld#context\",LINK_HEADER_CONTEXT:\"http://www.w3.org/ns/json-ld#context\",RDF:r,RDF_LIST:r+\"List\",RDF_FIRST:r+\"first\",RDF_REST:r+\"rest\",RDF_NIL:r+\"nil\",RDF_TYPE:r+\"type\",RDF_PLAIN_LITERAL:r+\"PlainLiteral\",RDF_XML_LITERAL:r+\"XMLLiteral\",RDF_JSON_LITERAL:r+\"JSON\",RDF_OBJECT:r+\"object\",RDF_LANGSTRING:r+\"langString\",XSD:o,XSD_BOOLEAN:o+\"boolean\",XSD_DOUBLE:o+\"double\",XSD_INTEGER:o+\"integer\",XSD_STRING:o+\"string\"}},function(e,t,n){\"use strict\";var r=n(3),o=n(34),i=n(46),a=n(5),s=n(2),c=n(1),u=n(4),l=n(70),d=n(77),f=n(259),p=n(84),h=String,v=o(\"JSON\",\"stringify\"),g=s(/./.exec),y=s(\"\".charAt),m=s(\"\".charCodeAt),x=s(\"\".replace),b=s(1..toString),w=/[\\uD800-\\uDFFF]/g,j=/^[\\uD800-\\uDBFF]$/,I=/^[\\uDC00-\\uDFFF]$/,O=!p||c((function(){var e=o(\"Symbol\")(\"stringify detection\");return\"[null]\"!==v([e])||\"{}\"!==v({a:e})||\"{}\"!==v(Object(e))})),S=c((function(){return'\"\\\\udf06\\\\ud834\"'!==v(\"\\udf06\\ud834\")||'\"\\\\udead\"'!==v(\"\\udead\")})),E=function(e,t){var n=d(arguments),r=f(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=a(r,this,h(e),t)),!l(t))return t},i(v,null,n)},N=function(e,t,n){var r=y(n,t-1),o=y(n,t+1);return g(j,e)&&!g(I,o)||g(I,e)&&!g(j,r)?\"\\\\u\"+b(m(e,0),16):e};v&&r({target:\"JSON\",stat:!0,arity:3,forced:O||S},{stringify:function(e,t,n){var r=d(arguments),o=i(O?E:v,null,r);return S&&\"string\"==typeof o?x(o,w,N):o}})},function(e,t){function n(t){return e.exports=n=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n;n=function(){return this}();try{n=n||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t,n){\"use strict\";var r=n(5),o=n(15),i=n(70),a=n(43),s=n(181),c=n(7),u=TypeError,l=c(\"toPrimitive\");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,c=a(e,l);if(c){if(void 0===t&&(t=\"default\"),n=r(c,e,t),!o(n)||i(n))return n;throw new u(\"Can't convert object to primitive value\")}return void 0===t&&(t=\"number\"),s(e,t)}},function(e,t,n){\"use strict\";var r=\"object\"==typeof document&&document.all,o=void 0===r&&void 0!==r;e.exports={all:r,IS_HTMLDDA:o}},function(e,t,n){\"use strict\";var r=n(84);e.exports=r&&!Symbol.sham&&\"symbol\"==typeof Symbol.iterator},function(e,t,n){\"use strict\";var r=n(11),o=n(1),i=n(71);e.exports=!r&&!o((function(){return 7!==Object.defineProperty(i(\"div\"),\"a\",{get:function(){return 7}}).a}))},function(e,t,n){\"use strict\";var r=n(11),o=n(1);e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),\"prototype\",{value:42,writable:!1}).prototype}))},function(e,t,n){\"use strict\";var r=n(2),o=n(1),i=n(4),a=n(13),s=n(11),c=n(72).CONFIGURABLE,u=n(89),l=n(36),d=l.enforce,f=l.get,p=String,h=Object.defineProperty,v=r(\"\".slice),g=r(\"\".replace),y=r([].join),m=s&&!o((function(){return 8!==h((function(){}),\"length\",{value:8}).length})),x=String(String).split(\"String\"),b=e.exports=function(e,t,n){\"Symbol(\"===v(p(t),0,7)&&(t=\"[\"+g(p(t),/^Symbol\\(([^)]*)\\)/,\"$1\")+\"]\"),n&&n.getter&&(t=\"get \"+t),n&&n.setter&&(t=\"set \"+t),(!a(e,\"name\")||c&&e.name!==t)&&(s?h(e,\"name\",{value:t,configurable:!0}):e.name=t),m&&n&&a(n,\"arity\")&&e.length!==n.arity&&h(e,\"length\",{value:n.arity});try{n&&a(n,\"constructor\")&&n.constructor?s&&h(e,\"prototype\",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=d(e);return a(r,\"source\")||(r.source=y(x,\"string\"==typeof t?t:\"\")),e};Function.prototype.toString=b((function(){return i(this)&&f(this).source||u(this)}),\"toString\")},function(e,t,n){\"use strict\";var r=n(13),o=n(183),i=n(42),a=n(22);e.exports=function(e,t,n){for(var s=o(t),c=a.f,u=i.f,l=0;l<s.length;l++){var d=s[l];r(e,d)||n&&r(n,d)||c(e,d,u(t,d))}}},function(e,t,n){\"use strict\";var r=n(2),o=n(13),i=n(54),a=n(128).indexOf,s=n(91),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!o(s,n)&&o(r,n)&&c(l,n);for(;t.length>u;)o(r,n=t[u++])&&(~a(l,n)||c(l,n));return l}},function(e,t,n){\"use strict\";var r=n(54),o=n(74),i=n(23),a=function(e){return function(t,n,a){var s,c=r(t),u=i(c),l=o(a,u);if(e&&n!=n){for(;u>l;)if((s=c[l++])!=s)return!0}else for(;u>l;l++)if((e||l in c)&&c[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){\"use strict\";t.f=Object.getOwnPropertySymbols},function(e,t,n){\"use strict\";var r=n(131),o=n(44),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+\" is not a constructor\")}},function(e,t,n){\"use strict\";var r=n(2),o=n(1),i=n(4),a=n(39),s=n(34),c=n(89),u=function(){},l=[],d=s(\"Reflect\",\"construct\"),f=/^\\s*(?:class|function)\\b/,p=r(f.exec),h=!f.test(u),v=function(e){if(!i(e))return!1;try{return d(u,l,e),!0}catch(e){return!1}},g=function(e){if(!i(e))return!1;switch(a(e)){case\"AsyncFunction\":case\"GeneratorFunction\":case\"AsyncGeneratorFunction\":return!1}try{return h||!!p(f,c(e))}catch(e){return!0}};g.sham=!0,e.exports=!d||o((function(){var e;return v(v.call)||!v(Object)||!v((function(){e=!0}))||e}))?g:v},function(e,t,n){\"use strict\";var r=n(34);e.exports=r(\"document\",\"documentElement\")},function(e,t,n){\"use strict\";var r=TypeError;e.exports=function(e,t){if(e<t)throw new r(\"Not enough arguments\");return e}},function(e,t,n){\"use strict\";var r=n(30);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},function(e,t,n){\"use strict\";var r=function(){this.head=null,this.tail=null};r.prototype={add:function(e){var t={item:e,next:null},n=this.tail;n?n.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=r},function(e,t,n){\"use strict\";e.exports=\"object\"==typeof Deno&&Deno&&\"object\"==typeof Deno.version},function(e,t,n){\"use strict\";var r=n(7),o=n(62),i=r(\"iterator\"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){\"use strict\";var r=n(5),o=n(20),i=n(10),a=n(44),s=n(99),c=TypeError;e.exports=function(e,t){var n=arguments.length<2?s(e):t;if(o(n))return i(r(n,e));throw new c(a(e)+\" is not iterable\")}},function(e,t,n){\"use strict\";var r=n(59),o=n(140),i=n(60).CONSTRUCTOR;e.exports=i||!o((function(e){r.all(e).then(void 0,(function(){}))}))},function(e,t,n){\"use strict\";var r=n(7)(\"iterator\"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){try{if(!t&&!o)return!1}catch(e){return!1}var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t,n){\"use strict\";var r=n(7),o=n(63),i=n(22).f,a=r(\"unscopables\"),s=Array.prototype;void 0===s[a]&&i(s,a,{configurable:!0,value:o(null)}),e.exports=function(e){s[a][e]=!0}},function(e,t,n){\"use strict\";var r=n(127),o=n(92);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){\"use strict\";var r,o,i,a=n(1),s=n(4),c=n(15),u=n(63),l=n(78),d=n(27),f=n(7),p=n(26),h=f(\"iterator\"),v=!1;[].keys&&(\"next\"in(i=[].keys())?(o=l(l(i)))!==Object.prototype&&(r=o):v=!0),!c(r)||a((function(){var e={};return r[h].call(e)!==e}))?r={}:p&&(r=u(r)),s(r[h])||d(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:v}},function(e,t,n){\"use strict\";var r=n(103),o=Math.floor,i=function(e,t){var n=e.length,c=o(n/2);return n<8?a(e,t):s(e,i(r(e,0,c),t),i(r(e,c),t),t)},a=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(r=i,n=e[i];r&&t(e[r-1],n)>0;)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},s=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e};e.exports=i},function(e,t,n){\"use strict\";var r=n(69),o=n(22),i=n(53);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){\"use strict\";var r=n(1);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){return 1},1)}))}},function(e,t,n){\"use strict\";var r=n(30).match(/firefox\\/(\\d+)/i);e.exports=!!r&&+r[1]},function(e,t,n){\"use strict\";var r=n(30);e.exports=/MSIE|Trident/.test(r)},function(e,t,n){\"use strict\";var r=n(30).match(/AppleWebKit\\/(\\d+)\\./);e.exports=!!r&&+r[1]},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.\n */n(6),n(8),n(12),n(14),n(51),n(210);const r=n(106),o=n(79),i=n(162),a=n(108);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=(()=>new o(\"sha256\")),canonicalIdMap:t=new Map,maxDeepIterations:n=1/0}={}){this.name=\"URDNA2015\",this.blankNodeInfo=new Map,this.canonicalIssuer=new r(\"_:c14n\",t),this.createMessageDigest=e,this.maxDeepIterations=n,this.quads=null,this.deepIterations=null}async main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];let o=0;for(const e of n)++o%100==0&&await this._yield(),await this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const i=[...t.keys()].sort(),c=[];for(const e of i){const n=t.get(e);if(n.length>1){c.push(n);continue}const r=n[0];this.canonicalIssuer.getId(r)}for(const e of c){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new r(\"_:b\");e.getId(n);const o=await this.hashNDegreeQuads(n,e);t.push(o)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const u=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId(e.subject),e.predicate,this._componentWithCanonicalId(e.object),this._componentWithCanonicalId(e.graph));u.push(t)}return u.sort(),u.join(\"\")}async hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),r=n.quads;for(const n of r){const r={subject:null,predicate:n.predicate,object:null,graph:null};r.subject=this.modifyFirstDegreeComponent(e,n.subject,\"subject\"),r.object=this.modifyFirstDegreeComponent(e,n.object,\"object\"),r.graph=this.modifyFirstDegreeComponent(e,n.graph,\"graph\"),t.push(a.serializeQuad(r))}t.sort();const o=this.createMessageDigest();for(const e of t)o.update(e);return n.hash=await o.digest(),n.hash}async hashRelatedBlankNode(e,t,n,r){let o;o=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const i=this.createMessageDigest();return i.update(r),\"g\"!==r&&i.update(this.getRelatedPredicate(t)),i.update(o),i.digest()}async hashNDegreeQuads(e,t){const n=this.deepIterations.get(e)||0;if(n>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,n+1);const r=this.createMessageDigest(),o=await this.createHashToRelated(e,t),a=[...o.keys()].sort();for(const e of a){r.update(e);let n,a=\"\";const s=new i(o.get(e));let c=0;for(;s.hasNext();){const e=s.next();++c%3==0&&await this._yield();let r=t.clone(),o=\"\";const i=[];let u=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?o+=this.canonicalIssuer.getId(t):(r.hasId(t)||i.push(t),o+=r.getId(t)),0!==a.length&&o>a){u=!0;break}if(!u){for(const e of i){const t=await this.hashNDegreeQuads(e,r);if(o+=r.getId(e),o+=`<${t.hash}>`,r=t.issuer,0!==a.length&&o>a){u=!0;break}}u||(0===a.length||o<a)&&(a=o,n=r)}}r.update(a),t=n}return{hash:await r.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return\"BlankNode\"!==t.termType?t:{termType:\"BlankNode\",value:t.value===e?\"_:a\":\"_:z\"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}async createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;let o=0;for(const i of r)++o%100==0&&await this._yield(),await Promise.all([this._addRelatedBlankNodeHash({quad:i,component:i.subject,position:\"s\",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:i,component:i.object,position:\"o\",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:i,component:i.graph,position:\"g\",id:e,issuer:t,hashToRelated:n})]);return n}async _hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=await this.hashFirstDegreeQuads(e),r=t.get(n);r?r.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if(\"BlankNode\"!==t.termType)return;const n=t.value,r=this.blankNodeInfo.get(n);r?r.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}async _addRelatedBlankNodeHash({quad:e,component:t,position:n,id:r,issuer:o,hashToRelated:i}){if(\"BlankNode\"!==t.termType||t.value===r)return;const a=t.value,s=await this.hashRelatedBlankNode(a,e,o,n),c=i.get(s);c?c.push(a):i.set(s,[a])}_componentWithCanonicalId(e){return\"BlankNode\"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:\"BlankNode\",value:this.canonicalIssuer.getId(e.value)}}async _yield(){return new Promise(e=>setImmediate(e))}}},function(e,t,n){\"use strict\";var r=n(0),o=n(2),i=n(11),a=n(152),s=n(72),c=n(31),u=n(58),l=n(216),d=n(1),f=n(95),p=n(28),h=n(24),v=n(153),g=n(217),y=n(220),m=n(78),x=n(45),b=n(73).f,w=n(154),j=n(103),I=n(75),O=n(36),S=s.PROPER,E=s.CONFIGURABLE,N=O.getterFor(\"ArrayBuffer\"),A=O.getterFor(\"DataView\"),T=O.set,D=r.ArrayBuffer,R=D,k=R&&R.prototype,L=r.DataView,C=L&&L.prototype,_=Object.prototype,P=r.Array,M=r.RangeError,F=o(w),B=o([].reverse),J=y.pack,U=y.unpack,H=function(e){return[255&e]},V=function(e){return[255&e,e>>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},G=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},z=function(e){return J(g(e),23,4)},$=function(e){return J(e,52,8)},W=function(e,t,n){u(e.prototype,t,{configurable:!0,get:function(){return n(this)[t]}})},K=function(e,t,n,r){var o=A(e),i=v(n),a=!!r;if(i+t>o.byteLength)throw new M(\"Wrong index\");var s=o.bytes,c=i+o.byteOffset,u=j(s,c,c+t);return a?u:B(u)},Q=function(e,t,n,r,o,i){var a=A(e),s=v(n),c=r(+o),u=!!i;if(s+t>a.byteLength)throw new M(\"Wrong index\");for(var l=a.bytes,d=s+a.byteOffset,f=0;f<t;f++)l[d+f]=c[u?f:t-f-1]};if(a){var X=S&&\"ArrayBuffer\"!==D.name;if(d((function(){D(1)}))&&d((function(){new D(-1)}))&&!d((function(){return new D,new D(1.5),new D(NaN),1!==D.length||X&&!E})))X&&E&&c(D,\"name\",\"ArrayBuffer\");else{(R=function(e){return f(this,k),new D(v(e))}).prototype=k;for(var Y,Z=b(D),ee=0;Z.length>ee;)(Y=Z[ee++])in R||c(R,Y,D[Y]);k.constructor=R}x&&m(C)!==_&&x(C,_);var te=new L(new R(2)),ne=o(C.setInt8);te.setInt8(0,2147483648),te.setInt8(1,2147483649),!te.getInt8(0)&&te.getInt8(1)||l(C,{setInt8:function(e,t){ne(this,e,t<<24>>24)},setUint8:function(e,t){ne(this,e,t<<24>>24)}},{unsafe:!0})}else k=(R=function(e){f(this,k);var t=v(e);T(this,{type:\"ArrayBuffer\",bytes:F(P(t),0),byteLength:t}),i||(this.byteLength=t,this.detached=!1)}).prototype,C=(L=function(e,t,n){f(this,C),f(e,k);var r=N(e),o=r.byteLength,a=p(t);if(a<0||a>o)throw new M(\"Wrong offset\");if(a+(n=void 0===n?o-a:h(n))>o)throw new M(\"Wrong length\");T(this,{type:\"DataView\",buffer:e,byteLength:n,byteOffset:a,bytes:r.bytes}),i||(this.buffer=e,this.byteLength=n,this.byteOffset=a)}).prototype,i&&(W(R,\"byteLength\",N),W(L,\"buffer\",A),W(L,\"byteLength\",A),W(L,\"byteOffset\",A)),l(C,{getInt8:function(e){return K(this,1,e)[0]<<24>>24},getUint8:function(e){return K(this,1,e)[0]},getInt16:function(e){var t=K(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=K(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return G(K(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return G(K(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return U(K(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return U(K(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){Q(this,1,e,H,t)},setUint8:function(e,t){Q(this,1,e,H,t)},setInt16:function(e,t){Q(this,2,e,V,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){Q(this,2,e,V,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){Q(this,4,e,q,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){Q(this,4,e,q,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){Q(this,4,e,z,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){Q(this,8,e,$,t,arguments.length>2&&arguments[2])}});I(R,\"ArrayBuffer\"),I(L,\"DataView\"),e.exports={ArrayBuffer:R,DataView:L}},function(e,t,n){\"use strict\";e.exports=\"undefined\"!=typeof ArrayBuffer&&\"undefined\"!=typeof DataView},function(e,t,n){\"use strict\";var r=n(28),o=n(24),i=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=o(t);if(t!==n)throw new i(\"Wrong length or index\");return n}},function(e,t,n){\"use strict\";var r=n(21),o=n(74),i=n(23);e.exports=function(e){for(var t=r(this),n=i(t),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,u=void 0===c?n:o(c,n);u>s;)t[s++]=e;return t}},function(e,t,n){\"use strict\";var r=n(225),o=RangeError;e.exports=function(e,t){var n=r(e);if(n%t)throw new o(\"Wrong offset\");return n}},function(e,t,n){\"use strict\";var r=n(120),o=TypeError;e.exports=function(e){var t=r(e,\"number\");if(\"number\"==typeof t)throw new o(\"Can't convert number to bigint\");return BigInt(t)}},function(e,t,n){\"use strict\";var r=n(4),o=n(15),i=n(45);e.exports=function(e,t,n){var a,s;return i&&r(a=t.constructor)&&a!==n&&o(s=a.prototype)&&s!==n.prototype&&i(e,s),e}},function(e,t,n){\"use strict\";var r=n(47),o=n(55),i=n(21),a=n(23),s=function(e){var t=1===e;return function(n,s,c){for(var u,l=i(n),d=o(l),f=r(s,c),p=a(d);p-- >0;)if(f(u=d[p],p,l))switch(e){case 0:return u;case 1:return p}return t?-1:void 0}};e.exports={findLast:s(0),findLastIndex:s(1)}},function(e,t,n){\"use strict\";var r=n(28),o=n(9),i=n(17),a=RangeError;e.exports=function(e){var t=o(i(this)),n=\"\",s=r(e);if(s<0||s===1/0)throw new a(\"Wrong number of repetitions\");for(;s>0;(s>>>=1)&&(t+=t))1&s&&(n+=t);return n}},function(e,t,n){\"use strict\";var r=n(5),o=n(13),i=n(35),a=n(161),s=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||\"flags\"in s||o(e,\"flags\")||!i(s,e)?t:r(a,e)}},function(e,t,n){\"use strict\";var r=n(10);e.exports=function(){var e=r(this),t=\"\";return e.hasIndices&&(t+=\"d\"),e.global&&(t+=\"g\"),e.ignoreCase&&(t+=\"i\"),e.multiline&&(t+=\"m\"),e.dotAll&&(t+=\"s\"),e.unicode&&(t+=\"u\"),e.unicodeSets&&(t+=\"v\"),e.sticky&&(t+=\"y\"),t}},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.\n */n(14),n(6),n(8),e.exports=class{constructor(e){this.current=e.sort(),this.done=!1,this.dir=new Map;for(let t=0;t<e.length;++t)this.dir.set(e[t],!0)}hasNext(){return!this.done}next(){const{current:e,dir:t}=this,n=e.slice();let r=null,o=0;const i=e.length;for(let n=0;n<i;++n){const a=e[n],s=t.get(a);(null===r||a>r)&&(s&&n>0&&a>e[n-1]||!s&&n<i-1&&a>e[n+1])&&(r=a,o=n)}if(null===r)this.done=!0;else{const n=t.get(r)?o-1:o+1;e[o]=e[n],e[n]=r;for(const n of e)n>r&&t.set(n,!t.get(n))}return n}}},function(e,t,n){\"use strict\";var r=n(1),o=n(0).RegExp;e.exports=r((function(){var e=o(\".\",\"s\");return!(e.dotAll&&e.test(\"\\n\")&&\"s\"===e.flags)}))},function(e,t,n){\"use strict\";var r=n(1),o=n(0).RegExp;e.exports=r((function(){var e=o(\"(?<a>b)\",\"g\");return\"b\"!==e.exec(\"b\").groups.a||\"bc\"!==\"b\".replace(e,\"$<a>c\")}))},function(e,t,n){\"use strict\";var r=n(46),o=n(5),i=n(2),a=n(110),s=n(10),c=n(38),u=n(101),l=n(17),d=n(96),f=n(111),p=n(24),h=n(9),v=n(43),g=n(103),y=n(112),m=n(80),x=n(109),b=n(1),w=x.UNSUPPORTED_Y,j=Math.min,I=[].push,O=i(/./.exec),S=i(I),E=i(\"\".slice);a(\"split\",(function(e,t,n){var i;return i=\"c\"===\"abbc\".split(/(b)*/)[1]||4!==\"test\".split(/(?:)/,-1).length||2!==\"ab\".split(/(?:ab)*/).length||4!==\".\".split(/(.?)(.?)/).length||\".\".split(/()()/).length>1||\"\".split(/.?/).length?function(e,n){var i=h(l(this)),a=void 0===n?4294967295:n>>>0;if(0===a)return[];if(void 0===e)return[i];if(!u(e))return o(t,i,e,a);for(var s,c,d,f=[],p=(e.ignoreCase?\"i\":\"\")+(e.multiline?\"m\":\"\")+(e.unicode?\"u\":\"\")+(e.sticky?\"y\":\"\"),v=0,y=new RegExp(e.source,p+\"g\");(s=o(m,y,i))&&!((c=y.lastIndex)>v&&(S(f,E(i,v,s.index)),s.length>1&&s.index<i.length&&r(I,f,g(s,1)),d=s[0].length,v=c,f.length>=a));)y.lastIndex===s.index&&y.lastIndex++;return v===i.length?!d&&O(y,\"\")||S(f,\"\"):S(f,E(i,v)),f.length>a?g(f,0,a):f}:\"0\".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:o(t,this,e,n)}:t,[function(t,n){var r=l(this),a=c(t)?void 0:v(t,e);return a?o(a,t,r,n):o(i,h(r),t,n)},function(e,r){var o=s(this),a=h(e),c=n(i,o,a,r,i!==t);if(c.done)return c.value;var u=d(o,RegExp),l=o.unicode,v=(o.ignoreCase?\"i\":\"\")+(o.multiline?\"m\":\"\")+(o.unicode?\"u\":\"\")+(w?\"g\":\"y\"),g=new u(w?\"^(?:\"+o.source+\")\":o,v),m=void 0===r?4294967295:r>>>0;if(0===m)return[];if(0===a.length)return null===y(g,a)?[a]:[];for(var x=0,b=0,I=[];b<a.length;){g.lastIndex=w?0:b;var O,N=y(g,w?E(a,b):a);if(null===N||(O=j(p(g.lastIndex+(w?b:0)),a.length))===x)b=f(a,b,l);else{if(S(I,E(a,x,b)),I.length===m)return I;for(var A=1;A<=N.length-1;A++)if(S(I,N[A]),I.length===m)return I;b=x=O}}return S(I,E(a,x)),I}]}),!!b((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n=\"ab\".split(e);return 2!==n.length||\"a\"!==n[0]||\"b\"!==n[1]})),w)},function(e,t,n){\"use strict\";var r=n(3),o=n(250);r({global:!0,forced:parseInt!==o},{parseInt:o})},function(e,t,n){\"use strict\";var r=n(2),o=n(17),i=n(9),a=n(113),s=r(\"\".replace),c=RegExp(\"^[\"+a+\"]+\"),u=RegExp(\"(^|[^\"+a+\"])[\"+a+\"]+$\"),l=function(e){return function(t){var n=i(o(t));return 1&e&&(n=s(n,c,\"\")),2&e&&(n=s(n,u,\"$1\")),n}};e.exports={start:l(1),end:l(2),trim:l(3)}},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.\n */n(6),n(8),n(14),n(51);const r=n(106),o=n(79),i=n(162),a=n(108);function s(e,t){return e.hash<t.hash?-1:e.hash>t.hash?1:0}e.exports=class{constructor({createMessageDigest:e=(()=>new o(\"sha256\")),canonicalIdMap:t=new Map,maxDeepIterations:n=1/0}={}){this.name=\"URDNA2015\",this.blankNodeInfo=new Map,this.canonicalIssuer=new r(\"_:c14n\",t),this.createMessageDigest=e,this.maxDeepIterations=n,this.quads=null,this.deepIterations=null}main(e){this.deepIterations=new Map,this.quads=e;for(const t of e)this._addBlankNodeQuadInfo({quad:t,component:t.subject}),this._addBlankNodeQuadInfo({quad:t,component:t.object}),this._addBlankNodeQuadInfo({quad:t,component:t.graph});const t=new Map,n=[...this.blankNodeInfo.keys()];for(const e of n)this._hashAndTrackBlankNode({id:e,hashToBlankNodes:t});const o=[...t.keys()].sort(),i=[];for(const e of o){const n=t.get(e);if(n.length>1){i.push(n);continue}const r=n[0];this.canonicalIssuer.getId(r)}for(const e of i){const t=[];for(const n of e){if(this.canonicalIssuer.hasId(n))continue;const e=new r(\"_:b\");e.getId(n);const o=this.hashNDegreeQuads(n,e);t.push(o)}t.sort(s);for(const e of t){const t=e.issuer.getOldIds();for(const e of t)this.canonicalIssuer.getId(e)}}const c=[];for(const e of this.quads){const t=a.serializeQuadComponents(this._componentWithCanonicalId({component:e.subject}),e.predicate,this._componentWithCanonicalId({component:e.object}),this._componentWithCanonicalId({component:e.graph}));c.push(t)}return c.sort(),c.join(\"\")}hashFirstDegreeQuads(e){const t=[],n=this.blankNodeInfo.get(e),r=n.quads;for(const n of r){const r={subject:null,predicate:n.predicate,object:null,graph:null};r.subject=this.modifyFirstDegreeComponent(e,n.subject,\"subject\"),r.object=this.modifyFirstDegreeComponent(e,n.object,\"object\"),r.graph=this.modifyFirstDegreeComponent(e,n.graph,\"graph\"),t.push(a.serializeQuad(r))}t.sort();const o=this.createMessageDigest();for(const e of t)o.update(e);return n.hash=o.digest(),n.hash}hashRelatedBlankNode(e,t,n,r){let o;o=this.canonicalIssuer.hasId(e)?this.canonicalIssuer.getId(e):n.hasId(e)?n.getId(e):this.blankNodeInfo.get(e).hash;const i=this.createMessageDigest();return i.update(r),\"g\"!==r&&i.update(this.getRelatedPredicate(t)),i.update(o),i.digest()}hashNDegreeQuads(e,t){const n=this.deepIterations.get(e)||0;if(n>this.maxDeepIterations)throw new Error(`Maximum deep iterations (${this.maxDeepIterations}) exceeded.`);this.deepIterations.set(e,n+1);const r=this.createMessageDigest(),o=this.createHashToRelated(e,t),a=[...o.keys()].sort();for(const e of a){r.update(e);let n,a=\"\";const s=new i(o.get(e));for(;s.hasNext();){const e=s.next();let r=t.clone(),o=\"\";const i=[];let c=!1;for(const t of e)if(this.canonicalIssuer.hasId(t)?o+=this.canonicalIssuer.getId(t):(r.hasId(t)||i.push(t),o+=r.getId(t)),0!==a.length&&o>a){c=!0;break}if(!c){for(const e of i){const t=this.hashNDegreeQuads(e,r);if(o+=r.getId(e),o+=`<${t.hash}>`,r=t.issuer,0!==a.length&&o>a){c=!0;break}}c||(0===a.length||o<a)&&(a=o,n=r)}}r.update(a),t=n}return{hash:r.digest(),issuer:t}}modifyFirstDegreeComponent(e,t){return\"BlankNode\"!==t.termType?t:{termType:\"BlankNode\",value:t.value===e?\"_:a\":\"_:z\"}}getRelatedPredicate(e){return`<${e.predicate.value}>`}createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;for(const o of r)this._addRelatedBlankNodeHash({quad:o,component:o.subject,position:\"s\",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:o,component:o.object,position:\"o\",id:e,issuer:t,hashToRelated:n}),this._addRelatedBlankNodeHash({quad:o,component:o.graph,position:\"g\",id:e,issuer:t,hashToRelated:n});return n}_hashAndTrackBlankNode({id:e,hashToBlankNodes:t}){const n=this.hashFirstDegreeQuads(e),r=t.get(n);r?r.push(e):t.set(n,[e])}_addBlankNodeQuadInfo({quad:e,component:t}){if(\"BlankNode\"!==t.termType)return;const n=t.value,r=this.blankNodeInfo.get(n);r?r.quads.add(e):this.blankNodeInfo.set(n,{quads:new Set([e]),hash:null})}_addRelatedBlankNodeHash({quad:e,component:t,position:n,id:r,issuer:o,hashToRelated:i}){if(\"BlankNode\"!==t.termType||t.value===r)return;const a=t.value,s=this.hashRelatedBlankNode(a,e,o,n),c=i.get(s);c?c.push(a):i.set(s,[a])}_componentWithCanonicalId({component:e}){return\"BlankNode\"!==e.termType||e.value.startsWith(this.canonicalIssuer.prefix)?e:{termType:\"BlankNode\",value:this.canonicalIssuer.getId(e.value)}}}},function(e,t,n){\"use strict\";n(12),e.exports=class{constructor(){this._requests={}}wrapLoader(e){const t=this;return t._loader=e,function(){return t.add.apply(t,arguments)}}async add(e){let t=this._requests[e];if(t)return Promise.resolve(t);t=this._requests[e]=this._loader(e);try{return await t}finally{delete this._requests[e]}}}},function(e,t,n){\"use strict\";n(171),n(12),n(6),n(8);const r=n(261),o=Symbol(\"max\"),i=Symbol(\"length\"),a=Symbol(\"lengthCalculator\"),s=Symbol(\"allowStale\"),c=Symbol(\"maxAge\"),u=Symbol(\"dispose\"),l=Symbol(\"noDisposeOnSet\"),d=Symbol(\"lruList\"),f=Symbol(\"cache\"),p=Symbol(\"updateAgeOnGet\"),h=()=>1;const v=(e,t,n)=>{const r=e[f].get(t);if(r){const t=r.value;if(g(e,t)){if(m(e,r),!e[s])return}else n&&(e[p]&&(r.value.now=Date.now()),e[d].unshiftNode(r));return t.value}},g=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const n=Date.now()-t.now;return t.maxAge?n>t.maxAge:e[c]&&n>e[c]},y=e=>{if(e[i]>e[o])for(let t=e[d].tail;e[i]>e[o]&&null!==t;){const n=t.prev;m(e,t),t=n}},m=(e,t)=>{if(t){const n=t.value;e[u]&&e[u](n.key,n.value),e[i]-=n.length,e[f].delete(n.key),e[d].removeNode(t)}};class x{constructor(e,t,n,r,o){this.key=e,this.value=t,this.length=n,this.now=r,this.maxAge=o||0}}const b=(e,t,n,r)=>{let o=n.value;g(e,o)&&(m(e,n),e[s]||(o=void 0)),o&&t.call(r,o.value,o.key,e)};e.exports=class{constructor(e){if(\"number\"==typeof e&&(e={max:e}),e||(e={}),e.max&&(\"number\"!=typeof e.max||e.max<0))throw new TypeError(\"max must be a non-negative number\");this[o]=e.max||1/0;const t=e.length||h;if(this[a]=\"function\"!=typeof t?h:t,this[s]=e.stale||!1,e.maxAge&&\"number\"!=typeof e.maxAge)throw new TypeError(\"maxAge must be a number\");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[p]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(\"number\"!=typeof e||e<0)throw new TypeError(\"max must be a non-negative number\");this[o]=e||1/0,y(this)}get max(){return this[o]}set allowStale(e){this[s]=!!e}get allowStale(){return this[s]}set maxAge(e){if(\"number\"!=typeof e)throw new TypeError(\"maxAge must be a non-negative number\");this[c]=e,y(this)}get maxAge(){return this[c]}set lengthCalculator(e){\"function\"!=typeof e&&(e=h),e!==this[a]&&(this[a]=e,this[i]=0,this[d].forEach(e=>{e.length=this[a](e.value,e.key),this[i]+=e.length})),y(this)}get lengthCalculator(){return this[a]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let n=this[d].tail;null!==n;){const r=n.prev;b(this,e,n,t),n=r}}forEach(e,t){t=t||this;for(let n=this[d].head;null!==n;){const r=n.next;b(this,e,n,t),n=r}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[u]&&this[d]&&this[d].length&&this[d].forEach(e=>this[u](e.key,e.value)),this[f]=new Map,this[d]=new r,this[i]=0}dump(){return this[d].map(e=>!g(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,n){if((n=n||this[c])&&\"number\"!=typeof n)throw new TypeError(\"maxAge must be a number\");const r=n?Date.now():0,s=this[a](t,e);if(this[f].has(e)){if(s>this[o])return m(this,this[f].get(e)),!1;const a=this[f].get(e).value;return this[u]&&(this[l]||this[u](e,a.value)),a.now=r,a.maxAge=n,a.value=t,this[i]+=s-a.length,a.length=s,this.get(e),y(this),!0}const p=new x(e,t,s,r,n);return p.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=p.length,this[d].unshift(p),this[f].set(e,this[d].head),y(this),!0)}has(e){if(!this[f].has(e))return!1;const t=this[f].get(e).value;return!g(this,t)}get(e){return v(this,e,!0)}peek(e){return v(this,e,!1)}pop(){const e=this[d].tail;return e?(m(this,e),e.value):null}del(e){m(this,this[f].get(e))}load(e){this.reset();const t=Date.now();for(let n=e.length-1;n>=0;n--){const r=e[n],o=r.e||0;if(0===o)this.set(r.k,r.v);else{const e=o-t;e>0&&this.set(r.k,r.v,e)}}}prune(){this[f].forEach((e,t)=>v(this,t,!1))}}},function(e,t,n){\"use strict\";var r=n(3),o=n(11),i=n(0),a=n(2),s=n(13),c=n(4),u=n(35),l=n(9),d=n(58),f=n(126),p=i.Symbol,h=p&&p.prototype;if(o&&c(p)&&(!(\"description\"in h)||void 0!==p().description)){var v={},g=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),t=u(h,this)?new p(e):void 0===e?p():p(e);return\"\"===e&&(v[t]=!0),t};f(g,p),g.prototype=h,h.constructor=g;var y=\"Symbol(description detection)\"===String(p(\"description detection\")),m=a(h.valueOf),x=a(h.toString),b=/^Symbol\\((.*)\\)[^)]+$/,w=a(\"\".replace),j=a(\"\".slice);d(h,\"description\",{configurable:!0,get:function(){var e=m(this);if(s(v,e))return\"\";var t=x(e),n=y?j(t,7,-1):w(t,b,\"$1\");return\"\"===n?void 0:n}}),r({global:!0,constructor:!0,forced:!0},{Symbol:g})}},function(e,t,n){\"use strict\";var r=n(3),o=n(262).left,i=n(146),a=n(56);r({target:\"Array\",proto:!0,forced:!n(57)&&a>79&&a<83||!i(\"reduce\")},{reduce:function(e){var t=arguments.length;return o(this,e,t,t>1?arguments[1]:void 0)}})},function(e,t,n){\"use strict\";var r=n(3),o=n(2),i=n(28),a=n(270),s=n(159),c=n(1),u=RangeError,l=String,d=Math.floor,f=o(s),p=o(\"\".slice),h=o(1..toFixed),v=function(e,t,n){return 0===t?n:t%2==1?v(e,t-1,n*e):v(e*e,t/2,n)},g=function(e,t,n){for(var r=-1,o=n;++r<6;)o+=t*e[r],e[r]=o%1e7,o=d(o/1e7)},y=function(e,t){for(var n=6,r=0;--n>=0;)r+=e[n],e[n]=d(r/t),r=r%t*1e7},m=function(e){for(var t=6,n=\"\";--t>=0;)if(\"\"!==n||0===t||0!==e[t]){var r=l(e[t]);n=\"\"===n?r:n+f(\"0\",7-r.length)+r}return n};r({target:\"Number\",proto:!0,forced:c((function(){return\"0.000\"!==h(8e-5,3)||\"1\"!==h(.9,0)||\"1.25\"!==h(1.255,2)||\"1000000000000000128\"!==h(0xde0b6b3a7640080,0)}))||!c((function(){h({})}))},{toFixed:function(e){var t,n,r,o,s=a(this),c=i(e),d=[0,0,0,0,0,0],h=\"\",x=\"0\";if(c<0||c>20)throw new u(\"Incorrect fraction digits\");if(s!=s)return\"NaN\";if(s<=-1e21||s>=1e21)return l(s);if(s<0&&(h=\"-\",s=-s),s>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(s*v(2,69,1))-69)<0?s*v(2,-t,1):s/v(2,t,1),n*=4503599627370496,(t=52-t)>0){for(g(d,0,n),r=c;r>=7;)g(d,1e7,0),r-=7;for(g(d,v(10,r,1),0),r=t-1;r>=23;)y(d,1<<23),r-=23;y(d,1<<r),g(d,1,1),y(d,2),x=m(d)}else g(d,0,n),g(d,1<<-t,0),x=m(d)+f(\"0\",c);return x=c>0?h+((o=x.length)<=c?\"0.\"+f(\"0\",c-o)+x:p(x,0,o-c)+\".\"+p(x,o-c)):h+x}})},function(e,t,n){e.exports=n(175)},function(e,t,n){\"use strict\";var r=n(66),o=r(n(176)),i=r(n(67));n(12),n(6),n(8),n(49),n(50),n(14),n(104);const a=[\"documentLoader\"];function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}\n/**\n * A JavaScript implementation of the JSON-LD API.\n *\n * @author Dave Longley\n *\n * @license BSD 3-Clause License\n * Copyright (c) 2011-2022 Digital Bazaar, Inc.\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n *\n * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * Neither the name of the Digital Bazaar, Inc. nor the names of its\n * contributors may be used to endorse or promote products derived from\n * this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n * IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\n * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */const u=n(105),l=n(254),d=n(18),f=n(258),p=d.IdentifierIssuer,h=n(19),v=n(170),g=n(264),{expand:y}=n(265),{flatten:m}=n(267),{fromRDF:x}=n(268),{toRDF:b}=n(271),{frameMergedOrDefault:w,cleanupNull:j}=n(274),{isArray:I,isObject:O,isString:S}=n(16),{isSubjectReference:E}=n(32),{expandIri:N,getInitialContext:A,process:T,processingMode:D}=n(41),{compact:R,compactIri:k}=n(275),{createNodeMap:L,createMergedNodeMap:C,mergeNodeMaps:_}=n(83),{logEventHandler:P,logWarningEventHandler:M,safeEventHandler:F,setDefaultEventHandler:B,setupEventHandler:J,strictEventHandler:U,unhandledEventHandler:H}=n(65),V=function(e){const t={},r=new v({max:100});function i(t,n){let{documentLoader:r=e.documentLoader}=n,i=(0,o.default)(n,a);if(t&&\"compactionMap\"in t)throw new h('\"compactionMap\" not supported.',\"jsonld.OptionsError\");if(t&&\"expansionMap\"in t)throw new h('\"expansionMap\" not supported.',\"jsonld.OptionsError\");return Object.assign({},{documentLoader:r},i,t,{eventHandler:J({options:t})})}return e.compact=async function(t,n,o){if(arguments.length<2)throw new TypeError(\"Could not compact, too few arguments.\");if(null===n)throw new h(\"The compaction context must not be null.\",\"jsonld.CompactError\",{code:\"invalid local context\"});if(null===t)return null;let a;(o=i(o,{base:S(t)?t:\"\",compactArrays:!0,compactToRelative:!0,graph:!1,skipExpansion:!1,link:!1,issuer:new p(\"_:b\"),contextResolver:new f({sharedCache:r})})).link&&(o.skipExpansion=!0),o.compactToRelative||delete o.base,a=o.skipExpansion?t:await e.expand(t,o);const s=await e.processContext(A(o),n,o);let c=await R({activeCtx:s,element:a,options:o});o.compactArrays&&!o.graph&&I(c)?1===c.length?c=c[0]:0===c.length&&(c={}):o.graph&&O(c)&&(c=[c]),O(n)&&\"@context\"in n&&(n=n[\"@context\"]),n=d.clone(n),I(n)||(n=[n]);const u=n;n=[];for(let e=0;e<u.length;++e)(!O(u[e])||Object.keys(u[e]).length>0)&&n.push(u[e]);const l=n.length>0;if(1===n.length&&(n=n[0]),I(c)){const e=k({activeCtx:s,iri:\"@graph\",relativeTo:{vocab:!0}}),t=c;c={},l&&(c[\"@context\"]=n),c[e]=t}else if(O(c)&&l){const e=c;c={\"@context\":n};for(const t in e)c[t]=e[t]}return c},e.expand=async function(t,n){if(arguments.length<1)throw new TypeError(\"Could not expand, too few arguments.\");const o={},a=[];if(\"expandContext\"in(n=i(n,{keepFreeFloatingNodes:!1,contextResolver:new f({sharedCache:r})}))){const e=d.clone(n.expandContext);O(e)&&\"@context\"in e?o.expandContext=e:o.expandContext={\"@context\":e},a.push(o.expandContext)}let s;if(S(t)){const r=await e.get(t,n);s=r.documentUrl,o.input=r.document,r.contextUrl&&(o.remoteContext={\"@context\":r.contextUrl},a.push(o.remoteContext))}else o.input=d.clone(t);\"base\"in n||(n.base=s||\"\");let c=A(n);for(const e of a)c=await T({activeCtx:c,localCtx:e,options:n});let u=await y({activeCtx:c,element:o.input,options:n});return O(u)&&\"@graph\"in u&&1===Object.keys(u).length?u=u[\"@graph\"]:null===u&&(u=[]),I(u)||(u=[u]),u},e.flatten=async function(t,n,o){if(arguments.length<1)return new TypeError(\"Could not flatten, too few arguments.\");n=\"function\"==typeof n?null:n||null,o=i(o,{base:S(t)?t:\"\",contextResolver:new f({sharedCache:r})});const a=await e.expand(t,o),s=m(a);if(null===n)return s;o.graph=!0,o.skipExpansion=!0;const c=await e.compact(s,n,o);return c},e.frame=async function(t,n,o){if(arguments.length<2)throw new TypeError(\"Could not frame, too few arguments.\");if(o=i(o,{base:S(t)?t:\"\",embed:\"@once\",explicit:!1,requireAll:!1,omitDefault:!1,bnodesToClear:[],contextResolver:new f({sharedCache:r})}),S(n)){const t=await e.get(n,o);if(n=t.document,t.contextUrl){let e=n[\"@context\"];e?I(e)?e.push(t.contextUrl):e=[e,t.contextUrl]:e=t.contextUrl,n[\"@context\"]=e}}const a=n&&n[\"@context\"]||{},s=await e.processContext(A(o),a,o);o.hasOwnProperty(\"omitGraph\")||(o.omitGraph=D(s,1.1)),o.hasOwnProperty(\"pruneBlankNodeIdentifiers\")||(o.pruneBlankNodeIdentifiers=D(s,1.1));const u=await e.expand(t,o),l=c({},o);l.isFrame=!0,l.keepFreeFloatingNodes=!0;const d=await e.expand(n,l),p=Object.keys(n).map(e=>N(s,e,{vocab:!0}));l.merged=!p.includes(\"@graph\"),l.is11=D(s,1.1);const h=w(u,d,l);l.graph=!o.omitGraph,l.skipExpansion=!0,l.link={},l.framing=!0;let v=await e.compact(h,a,l);return l.link={},v=j(v,l),v},e.link=async function(t,n,r){const o={};return n&&(o[\"@context\"]=n),o[\"@embed\"]=\"@link\",e.frame(t,o,r)},e.normalize=e.canonize=async function(t,n){if(arguments.length<1)throw new TypeError(\"Could not canonize, too few arguments.\");if(\"inputFormat\"in(n=i(n,{base:S(t)?t:null,algorithm:\"URDNA2015\",skipExpansion:!1,safe:!0,contextResolver:new f({sharedCache:r})}))){if(\"application/n-quads\"!==n.inputFormat&&\"application/nquads\"!==n.inputFormat)throw new h(\"Unknown canonicalization input format.\",\"jsonld.CanonizeError\");const e=g.parse(t);return u.canonize(e,n)}const o=c({},n);delete o.format,o.produceGeneralizedRdf=!1;const a=await e.toRDF(t,o);return u.canonize(a,n)},e.fromRDF=async function(e,n){if(arguments.length<1)throw new TypeError(\"Could not convert from RDF, too few arguments.\");n=i(n,{format:S(e)?\"application/n-quads\":void 0});const{format:r}=n;let{rdfParser:o}=n;if(r){if(o=o||t[r],!o)throw new h(\"Unknown input format.\",\"jsonld.UnknownFormat\",{format:r})}else o=()=>e;const a=await o(e);return x(a,n)},e.toRDF=async function(t,n){if(arguments.length<1)throw new TypeError(\"Could not convert to RDF, too few arguments.\");let o;o=(n=i(n,{base:S(t)?t:\"\",skipExpansion:!1,contextResolver:new f({sharedCache:r})})).skipExpansion?t:await e.expand(t,n);const a=b(o,n);if(n.format){if(\"application/n-quads\"===n.format||\"application/nquads\"===n.format)return g.serialize(a);throw new h(\"Unknown output format.\",\"jsonld.UnknownFormat\",{format:n.format})}return a},e.createNodeMap=async function(t,n){if(arguments.length<1)throw new TypeError(\"Could not create node map, too few arguments.\");n=i(n,{base:S(t)?t:\"\",contextResolver:new f({sharedCache:r})});const o=await e.expand(t,n);return C(o,n)},e.merge=async function(t,n,o){if(arguments.length<1)throw new TypeError(\"Could not merge, too few arguments.\");if(!I(t))throw new TypeError('Could not merge, \"docs\" must be an array.');n=\"function\"==typeof n?null:n||null,o=i(o,{contextResolver:new f({sharedCache:r})});const a=await Promise.all(t.map(t=>{const n=c({},o);return e.expand(t,n)}));let s=!0;\"mergeNodes\"in o&&(s=o.mergeNodes);const u=o.issuer||new p(\"_:b\"),l={\"@default\":{}};for(let e=0;e<a.length;++e){const t=d.relabelBlankNodes(a[e],{issuer:new p(\"_:b\"+e+\"-\")}),n=s||0===e?l:{\"@default\":{}};if(L(t,n,\"@default\",u),n!==l)for(const e in n){const t=n[e];if(!(e in l)){l[e]=t;continue}const r=l[e];for(const e in t)e in r||(r[e]=t[e])}}const h=_(l),v=[],g=Object.keys(h).sort();for(let e=0;e<g.length;++e){const t=h[g[e]];E(t)||v.push(t)}if(null===n)return v;o.graph=!0,o.skipExpansion=!0;const y=await e.compact(v,n,o);return y},Object.defineProperty(e,\"documentLoader\",{get:()=>e._documentLoader,set:t=>e._documentLoader=t}),e.documentLoader=async e=>{throw new h(\"Could not retrieve a JSON-LD document from the URL. URL dereferencing not implemented.\",\"jsonld.LoadDocumentError\",{code:\"loading document failed\",url:e})},e.get=async function(t,n){let r;r=\"function\"==typeof n.documentLoader?n.documentLoader:e.documentLoader;const o=await r(t);try{if(!o.document)throw new h(\"No remote document found at the given URL.\",\"jsonld.NullRemoteDocument\");S(o.document)&&(o.document=JSON.parse(o.document))}catch(e){throw new h(\"Could not retrieve a JSON-LD document from the URL.\",\"jsonld.LoadDocumentError\",{code:\"loading document failed\",cause:e,remoteDoc:o})}return o},e.processContext=async function(e,t,n){return n=i(n,{base:\"\",contextResolver:new f({sharedCache:r})}),null===t?A(n):(t=d.clone(t),O(t)&&\"@context\"in t||(t={\"@context\":t}),T({activeCtx:e,localCtx:t,options:n}))},e.getContextValue=n(41).getContextValue,e.documentLoaders={},e.useDocumentLoader=function(t){if(!(t in e.documentLoaders))throw new h('Unknown document loader type: \"'+t+'\"',\"jsonld.UnknownDocumentLoader\",{type:t});e.documentLoader=e.documentLoaders[t].apply(e,Array.prototype.slice.call(arguments,1))},e.registerRDFParser=function(e,n){t[e]=n},e.unregisterRDFParser=function(e){delete t[e]},e.registerRDFParser(\"application/n-quads\",g.parse),e.registerRDFParser(\"application/nquads\",g.parse),e.url=n(37),e.logEventHandler=P,e.logWarningEventHandler=M,e.safeEventHandler=F,e.setDefaultEventHandler=B,e.strictEventHandler=U,e.unhandledEventHandler=H,e.util=d,Object.assign(e,d),e.promises=e,e.RequestQueue=n(169),e.JsonLdProcessor=n(276)(e),l.setupGlobals(e),l.setupDocumentLoaders(e),e},q=function e(){return V((function(){return e()}))};V(q),e.exports=q},function(e,t,n){var r=n(177);e.exports=function(e,t){if(null==e)return{};var n,o,i=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(117).default,o=n(179);e.exports=function(e){var t=o(e,\"string\");return\"symbol\"===r(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(117).default;e.exports=function(e,t){if(\"object\"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||\"default\");if(\"object\"!==r(o))return o;throw new TypeError(\"@@toPrimitive must return a primitive value.\")}return(\"string\"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){\"use strict\";var r,o,i,a=n(3),s=n(26),c=n(57),u=n(0),l=n(5),d=n(27),f=n(45),p=n(75),h=n(94),v=n(20),g=n(4),y=n(15),m=n(95),x=n(96),b=n(76).set,w=n(188),j=n(191),I=n(97),O=n(135),S=n(36),E=n(59),N=n(60),A=n(61),T=N.CONSTRUCTOR,D=N.REJECTION_EVENT,R=N.SUBCLASSING,k=S.getterFor(\"Promise\"),L=S.set,C=E&&E.prototype,_=E,P=C,M=u.TypeError,F=u.document,B=u.process,J=A.f,U=J,H=!!(F&&F.createEvent&&u.dispatchEvent),V=function(e){var t;return!(!y(e)||!g(t=e.then))&&t},q=function(e,t){var n,r,o,i=t.value,a=1===t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,d=e.domain;try{s?(a||(2===t.rejection&&K(t),t.rejection=1),!0===s?n=i:(d&&d.enter(),n=s(i),d&&(d.exit(),o=!0)),n===e.promise?u(new M(\"Promise-chain cycle\")):(r=V(n))?l(r,n,c,u):c(n)):u(i)}catch(e){d&&!o&&d.exit(),u(e)}},G=function(e,t){e.notified||(e.notified=!0,w((function(){for(var n,r=e.reactions;n=r.get();)q(n,e);e.notified=!1,t&&!e.rejection&&$(e)})))},z=function(e,t,n){var r,o;H?((r=F.createEvent(\"Event\")).promise=t,r.reason=n,r.initEvent(e,!1,!0),u.dispatchEvent(r)):r={promise:t,reason:n},!D&&(o=u[\"on\"+e])?o(r):\"unhandledrejection\"===e&&j(\"Unhandled promise rejection\",n)},$=function(e){l(b,u,(function(){var t,n=e.facade,r=e.value;if(W(e)&&(t=I((function(){c?B.emit(\"unhandledRejection\",r,n):z(\"unhandledrejection\",n,r)})),e.rejection=c||W(e)?2:1,t.error))throw t.value}))},W=function(e){return 1!==e.rejection&&!e.parent},K=function(e){l(b,u,(function(){var t=e.facade;c?B.emit(\"rejectionHandled\",t):z(\"rejectionhandled\",t,e.value)}))},Q=function(e,t,n){return function(r){e(t,r,n)}},X=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,G(e,!0))},Y=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw new M(\"Promise can't be resolved itself\");var r=V(t);r?w((function(){var n={done:!1};try{l(r,t,Q(Y,n,e),Q(X,n,e))}catch(t){X(n,t,e)}})):(e.value=t,e.state=1,G(e,!1))}catch(t){X({done:!1},t,e)}}};if(T&&(P=(_=function(e){m(this,P),v(e),l(r,this);var t=k(this);try{e(Q(Y,t),Q(X,t))}catch(e){X(t,e)}}).prototype,(r=function(e){L(this,{type:\"Promise\",done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:void 0})}).prototype=d(P,\"then\",(function(e,t){var n=k(this),r=J(x(this,_));return n.parent=!0,r.ok=!g(e)||e,r.fail=g(t)&&t,r.domain=c?B.domain:void 0,0===n.state?n.reactions.add(r):w((function(){q(r,n)})),r.promise})),o=function(){var e=new r,t=k(e);this.promise=e,this.resolve=Q(Y,t),this.reject=Q(X,t)},A.f=J=function(e){return e===_||void 0===e?new o(e):U(e)},!s&&g(E)&&C!==Object.prototype)){i=C.then,R||d(C,\"then\",(function(e,t){var n=this;return new _((function(e,t){l(i,n,e,t)})).then(e,t)}),{unsafe:!0});try{delete C.constructor}catch(e){}f&&f(C,P)}a({global:!0,constructor:!0,wrap:!0,forced:T},{Promise:_}),p(_,\"Promise\",!1,!0),h(\"Promise\")},function(e,t,n){\"use strict\";var r=n(5),o=n(4),i=n(15),a=TypeError;e.exports=function(e,t){var n,s;if(\"string\"===t&&o(n=e.toString)&&!i(s=r(n,e)))return s;if(o(n=e.valueOf)&&!i(s=r(n,e)))return s;if(\"string\"!==t&&o(n=e.toString)&&!i(s=r(n,e)))return s;throw new a(\"Can't convert object to primitive value\")}},function(e,t,n){\"use strict\";var r=n(0),o=n(4),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},function(e,t,n){\"use strict\";var r=n(34),o=n(2),i=n(73),a=n(129),s=n(10),c=o([].concat);e.exports=r(\"Reflect\",\"ownKeys\")||function(e){var t=i.f(s(e)),n=a.f;return n?c(t,n(e)):t}},function(e,t,n){\"use strict\";var r=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?o:r)(t)}},function(e,t,n){\"use strict\";var r=n(2),o=n(20);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},function(e,t,n){\"use strict\";var r=n(4),o=String,i=TypeError;e.exports=function(e){if(\"object\"==typeof e||r(e))return e;throw new i(\"Can't set \"+o(e)+\" as a prototype\")}},function(e,t,n){\"use strict\";var r={};r[n(7)(\"toStringTag\")]=\"z\",e.exports=\"[object z]\"===String(r)},function(e,t,n){\"use strict\";var r,o,i,a,s,c=n(0),u=n(47),l=n(42).f,d=n(76).set,f=n(135),p=n(134),h=n(189),v=n(190),g=n(57),y=c.MutationObserver||c.WebKitMutationObserver,m=c.document,x=c.process,b=c.Promise,w=l(c,\"queueMicrotask\"),j=w&&w.value;if(!j){var I=new f,O=function(){var e,t;for(g&&(e=x.domain)&&e.exit();t=I.get();)try{t()}catch(e){throw I.head&&r(),e}e&&e.enter()};p||g||v||!y||!m?!h&&b&&b.resolve?((a=b.resolve(void 0)).constructor=b,s=u(a.then,a),r=function(){s(O)}):g?r=function(){x.nextTick(O)}:(d=u(d,c),r=function(){d(O)}):(o=!0,i=m.createTextNode(\"\"),new y(O).observe(i,{characterData:!0}),r=function(){i.data=o=!o}),j=function(e){I.head||r(),I.add(e)}}e.exports=j},function(e,t,n){\"use strict\";var r=n(30);e.exports=/ipad|iphone|ipod/i.test(r)&&\"undefined\"!=typeof Pebble},function(e,t,n){\"use strict\";var r=n(30);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){\"use strict\";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},function(e,t,n){\"use strict\";var r=n(136),o=n(57);e.exports=!r&&!o&&\"object\"==typeof window&&\"object\"==typeof document},function(e,t,n){\"use strict\";var r=n(3),o=n(5),i=n(20),a=n(61),s=n(97),c=n(98);r({target:\"Promise\",stat:!0,forced:n(139)},{all:function(e){var t=this,n=a.f(t),r=n.resolve,u=n.reject,l=s((function(){var n=i(t.resolve),a=[],s=0,l=1;c(e,(function(e){var i=s++,c=!1;l++,o(n,t,e).then((function(e){c||(c=!0,a[i]=e,--l||r(a))}),u)})),--l||r(a)}));return l.error&&u(l.value),n.promise}})},function(e,t,n){\"use strict\";var r=n(5),o=n(10),i=n(43);e.exports=function(e,t,n){var a,s;o(e);try{if(!(a=i(e,\"return\"))){if(\"throw\"===t)throw n;return n}a=r(a,e)}catch(e){s=!0,a=e}if(\"throw\"===t)throw n;if(s)throw a;return o(a),n}},function(e,t,n){\"use strict\";var r=n(3),o=n(26),i=n(60).CONSTRUCTOR,a=n(59),s=n(34),c=n(4),u=n(27),l=a&&a.prototype;if(r({target:\"Promise\",proto:!0,forced:i,real:!0},{catch:function(e){return this.then(void 0,e)}}),!o&&c(a)){var d=s(\"Promise\").prototype.catch;l.catch!==d&&u(l,\"catch\",d,{unsafe:!0})}},function(e,t,n){\"use strict\";var r=n(3),o=n(5),i=n(20),a=n(61),s=n(97),c=n(98);r({target:\"Promise\",stat:!0,forced:n(139)},{race:function(e){var t=this,n=a.f(t),r=n.reject,u=s((function(){var a=i(t.resolve);c(e,(function(e){o(a,t,e).then(n.resolve,r)}))}));return u.error&&r(u.value),n.promise}})},function(e,t,n){\"use strict\";var r=n(3),o=n(5),i=n(61);r({target:\"Promise\",stat:!0,forced:n(60).CONSTRUCTOR},{reject:function(e){var t=i.f(this);return o(t.reject,void 0,e),t.promise}})},function(e,t,n){\"use strict\";var r=n(3),o=n(34),i=n(26),a=n(59),s=n(60).CONSTRUCTOR,c=n(199),u=o(\"Promise\"),l=i&&!s;r({target:\"Promise\",stat:!0,forced:i||s},{resolve:function(e){return c(l&&this===u?a:this,e)}})},function(e,t,n){\"use strict\";var r=n(10),o=n(15),i=n(61);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){\"use strict\";var r=n(11),o=n(124),i=n(22),a=n(10),s=n(54),c=n(142);t.f=r&&!o?Object.defineProperties:function(e,t){a(e);for(var n,r=s(t),o=c(t),u=o.length,l=0;u>l;)i.f(e,n=o[l++],r[n]);return e}},function(e,t,n){\"use strict\";var r=n(3),o=n(5),i=n(26),a=n(72),s=n(4),c=n(202),u=n(78),l=n(45),d=n(75),f=n(31),p=n(27),h=n(7),v=n(62),g=n(143),y=a.PROPER,m=a.CONFIGURABLE,x=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,w=h(\"iterator\"),j=function(){return this};e.exports=function(e,t,n,a,h,g,I){c(n,t,a);var O,S,E,N=function(e){if(e===h&&k)return k;if(!b&&e&&e in D)return D[e];switch(e){case\"keys\":case\"values\":case\"entries\":return function(){return new n(this,e)}}return function(){return new n(this)}},A=t+\" Iterator\",T=!1,D=e.prototype,R=D[w]||D[\"@@iterator\"]||h&&D[h],k=!b&&R||N(h),L=\"Array\"===t&&D.entries||R;if(L&&(O=u(L.call(new e)))!==Object.prototype&&O.next&&(i||u(O)===x||(l?l(O,x):s(O[w])||p(O,w,j)),d(O,A,!0,!0),i&&(v[A]=j)),y&&\"values\"===h&&R&&\"values\"!==R.name&&(!i&&m?f(D,\"name\",\"values\"):(T=!0,k=function(){return o(R,this)})),h)if(S={values:N(\"values\"),keys:g?k:N(\"keys\"),entries:N(\"entries\")},I)for(E in S)(b||T||!(E in D))&&p(D,E,S[E]);else r({target:t,proto:!0,forced:b||T},S);return i&&!I||D[w]===k||p(D,w,k,{name:h}),v[t]=k,S}},function(e,t,n){\"use strict\";var r=n(143).IteratorPrototype,o=n(63),i=n(53),a=n(75),s=n(62),c=function(){return this};e.exports=function(e,t,n,u){var l=t+\" Iterator\";return e.prototype=o(r,{next:i(+!u,n)}),a(e,l,!1,!0),s[l]=c,e}},function(e,t,n){\"use strict\";var r=n(1);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){\"use strict\";e.exports=function(e,t){return{value:e,done:t}}},function(e,t,n){\"use strict\";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){\"use strict\";var r=n(71)(\"span\").classList,o=r&&r.constructor&&r.constructor.prototype;e.exports=o===Object.prototype?void 0:o},function(e,t,n){\"use strict\";var r=n(44),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw new o(\"Cannot delete property \"+r(t)+\" of \"+r(e))}},function(e,t,n){\"use strict\";var r=n(11),o=n(2),i=n(5),a=n(1),s=n(142),c=n(129),u=n(119),l=n(21),d=n(55),f=Object.assign,p=Object.defineProperty,h=o([].concat);e.exports=!f||a((function(){if(r&&1!==f({b:1},f(p({},\"a\",{enumerable:!0,get:function(){p(this,\"b\",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(\"assign detection\");return e[n]=7,\"abcdefghijklmnopqrst\".split(\"\").forEach((function(e){t[e]=e})),7!==f({},e)[n]||\"abcdefghijklmnopqrst\"!==s(f({},t)).join(\"\")}))?function(e,t){for(var n=l(e),o=arguments.length,a=1,f=c.f,p=u.f;o>a;)for(var v,g=d(arguments[a++]),y=f?h(s(g),f(g)):s(g),m=y.length,x=0;m>x;)v=y[x++],r&&!i(p,g,v)||(n[v]=g[v]);return n}:f},function(e,t,n){\"use strict\";n(12);const r=n(150),o=n(251),i=n(168),a=n(252);let s;try{s=n(253)}catch(e){}function c(e){return Array.isArray(e)?e:t.NQuads.legacyDatasetToQuads(e)}t.NQuads=n(108),t.IdentifierIssuer=n(106),t._rdfCanonizeNative=function(e){return e&&(s=e),s},t.canonize=async function(e,t){const n=c(e);if(t.useNative){if(!s)throw new Error(\"rdf-canonize-native not available\");if(t.createMessageDigest)throw new Error('\"createMessageDigest\" cannot be used with \"useNative\".');return new Promise((e,r)=>s.canonize(n,t,(t,n)=>t?r(t):e(n)))}if(\"URDNA2015\"===t.algorithm)return new r(t).main(n);if(\"URGNA2012\"===t.algorithm){if(t.createMessageDigest)throw new Error('\"createMessageDigest\" cannot be used with \"URGNA2012\".');return new o(t).main(n)}if(!(\"algorithm\"in t))throw new Error(\"No RDF Dataset Canonicalization algorithm specified.\");throw new Error(\"Invalid RDF Dataset Canonicalization algorithm: \"+t.algorithm)},t._canonizeSync=function(e,t){const n=c(e);if(t.useNative){if(!s)throw new Error(\"rdf-canonize-native not available\");if(t.createMessageDigest)throw new Error('\"createMessageDigest\" cannot be used with \"useNative\".');return s.canonizeSync(n,t)}if(\"URDNA2015\"===t.algorithm)return new i(t).main(n);if(\"URGNA2012\"===t.algorithm){if(t.createMessageDigest)throw new Error('\"createMessageDigest\" cannot be used with \"URGNA2012\".');return new a(t).main(n)}if(!(\"algorithm\"in t))throw new Error(\"No RDF Dataset Canonicalization algorithm specified.\");throw new Error(\"Invalid RDF Dataset Canonicalization algorithm: \"+t.algorithm)}},function(e,t,n){\"use strict\";n(211),n(212)},function(e,t,n){\"use strict\";var r=n(3),o=n(0),i=n(76).clear;r({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==i},{clearImmediate:i})},function(e,t,n){\"use strict\";var r=n(3),o=n(0),i=n(76).set,a=n(213),s=o.setImmediate?a(i,!1):i;r({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==s},{setImmediate:s})},function(e,t,n){\"use strict\";var r,o=n(0),i=n(46),a=n(4),s=n(214),c=n(30),u=n(77),l=n(133),d=o.Function,f=/MSIE .\\./.test(c)||s&&((r=o.Bun.version.split(\".\")).length<3||\"0\"===r[0]&&(r[1]<3||\"3\"===r[1]&&\"0\"===r[2]));e.exports=function(e,t){var n=t?2:1;return f?function(r,o){var s=l(arguments.length,1)>n,c=a(r)?r:d(r),f=s?u(arguments,n):[],p=s?function(){i(c,this,f)}:c;return t?e(p,o):e(p)}:e}},function(e,t,n){\"use strict\";e.exports=\"function\"==typeof Bun&&Bun&&\"string\"==typeof Bun.version},function(e,t,n){\"use strict\";var r=n(3),o=n(48),i=n(1),a=n(151),s=n(10),c=n(74),u=n(24),l=n(96),d=a.ArrayBuffer,f=a.DataView,p=f.prototype,h=o(d.prototype.slice),v=o(p.getUint8),g=o(p.setUint8);r({target:\"ArrayBuffer\",proto:!0,unsafe:!0,forced:i((function(){return!new d(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(h&&void 0===t)return h(s(this),e);for(var n=s(this).byteLength,r=c(e,n),o=c(void 0===t?n:t,n),i=new(l(this,d))(u(o-r)),a=new f(this),p=new f(i),y=0;r<o;)g(p,y++,v(a,r++));return i}})},function(e,t,n){\"use strict\";var r=n(27);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){\"use strict\";var r=n(218);e.exports=Math.fround||function(e){return r(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)}},function(e,t,n){\"use strict\";var r=n(219),o=Math.abs;e.exports=function(e,t,n,i){var a=+e,s=o(a),c=r(a);if(s<i)return c*function(e){return e+4503599627370496-4503599627370496}(s/i/t)*i*t;var u=(1+t/2220446049250313e-31)*s,l=u-(u-s);return l>n||l!=l?c*(1/0):c*l}},function(e,t,n){\"use strict\";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!=t?t:t<0?-1:1}},function(e,t,n){\"use strict\";var r=Array,o=Math.abs,i=Math.pow,a=Math.floor,s=Math.log,c=Math.LN2;e.exports={pack:function(e,t,n){var u,l,d,f=r(n),p=8*n-t-1,h=(1<<p)-1,v=h>>1,g=23===t?i(2,-24)-i(2,-77):0,y=e<0||0===e&&1/e<0?1:0,m=0;for((e=o(e))!=e||e===1/0?(l=e!=e?1:0,u=h):(u=a(s(e)/c),e*(d=i(2,-u))<1&&(u--,d*=2),(e+=u+v>=1?g/d:g*i(2,1-v))*d>=2&&(u++,d/=2),u+v>=h?(l=0,u=h):u+v>=1?(l=(e*d-1)*i(2,t),u+=v):(l=e*i(2,v-1)*i(2,t),u=0));t>=8;)f[m++]=255&l,l/=256,t-=8;for(u=u<<t|l,p+=t;p>0;)f[m++]=255&u,u/=256,p-=8;return f[--m]|=128*y,f},unpack:function(e,t){var n,r=e.length,o=8*r-t-1,a=(1<<o)-1,s=a>>1,c=o-7,u=r-1,l=e[u--],d=127&l;for(l>>=7;c>0;)d=256*d+e[u--],c-=8;for(n=d&(1<<-c)-1,d>>=-c,c+=t;c>0;)n=256*n+e[u--],c-=8;if(0===d)d=1-s;else{if(d===a)return n?NaN:l?-1/0:1/0;n+=i(2,t),d-=s}return(l?-1:1)*n*i(2,d-t)}}},function(e,t,n){\"use strict\";n(222)(\"Uint8\",(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){\"use strict\";var r=n(3),o=n(0),i=n(5),a=n(11),s=n(223),c=n(29),u=n(151),l=n(95),d=n(53),f=n(31),p=n(224),h=n(24),v=n(153),g=n(155),y=n(226),m=n(69),x=n(13),b=n(39),w=n(15),j=n(70),I=n(63),O=n(35),S=n(45),E=n(73).f,N=n(227),A=n(229).forEach,T=n(94),D=n(58),R=n(22),k=n(42),L=n(36),C=n(157),_=L.get,P=L.set,M=L.enforce,F=R.f,B=k.f,J=o.RangeError,U=u.ArrayBuffer,H=U.prototype,V=u.DataView,q=c.NATIVE_ARRAY_BUFFER_VIEWS,G=c.TYPED_ARRAY_TAG,z=c.TypedArray,$=c.TypedArrayPrototype,W=c.aTypedArrayConstructor,K=c.isTypedArray,Q=function(e,t){W(e);for(var n=0,r=t.length,o=new e(r);r>n;)o[n]=t[n++];return o},X=function(e,t){D(e,t,{configurable:!0,get:function(){return _(this)[t]}})},Y=function(e){var t;return O(H,e)||\"ArrayBuffer\"===(t=b(e))||\"SharedArrayBuffer\"===t},Z=function(e,t){return K(e)&&!j(t)&&t in e&&p(+t)&&t>=0},ee=function(e,t){return t=m(t),Z(e,t)?d(2,e[t]):B(e,t)},te=function(e,t,n){return t=m(t),!(Z(e,t)&&w(n)&&x(n,\"value\"))||x(n,\"get\")||x(n,\"set\")||n.configurable||x(n,\"writable\")&&!n.writable||x(n,\"enumerable\")&&!n.enumerable?F(e,t,n):(e[t]=n.value,e)};a?(q||(k.f=ee,R.f=te,X($,\"buffer\"),X($,\"byteOffset\"),X($,\"byteLength\"),X($,\"length\")),r({target:\"Object\",stat:!0,forced:!q},{getOwnPropertyDescriptor:ee,defineProperty:te}),e.exports=function(e,t,n){var a=e.match(/\\d+/)[0]/8,c=e+(n?\"Clamped\":\"\")+\"Array\",u=\"get\"+e,d=\"set\"+e,p=o[c],m=p,x=m&&m.prototype,b={},j=function(e,t){F(e,t,{get:function(){return function(e,t){var n=_(e);return n.view[u](t*a+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=_(e);o.view[d](t*a+o.byteOffset,n?y(r):r,!0)}(this,t,e)},enumerable:!0})};q?s&&(m=t((function(e,t,n,r){return l(e,x),C(w(t)?Y(t)?void 0!==r?new p(t,g(n,a),r):void 0!==n?new p(t,g(n,a)):new p(t):K(t)?Q(m,t):i(N,m,t):new p(v(t)),e,m)})),S&&S(m,z),A(E(p),(function(e){e in m||f(m,e,p[e])})),m.prototype=x):(m=t((function(e,t,n,r){l(e,x);var o,s,c,u=0,d=0;if(w(t)){if(!Y(t))return K(t)?Q(m,t):i(N,m,t);o=t,d=g(n,a);var f=t.byteLength;if(void 0===r){if(f%a)throw new J(\"Wrong length\");if((s=f-d)<0)throw new J(\"Wrong length\")}else if((s=h(r)*a)+d>f)throw new J(\"Wrong length\");c=s/a}else c=v(t),o=new U(s=c*a);for(P(e,{buffer:o,byteOffset:d,byteLength:s,length:c,view:new V(o)});u<c;)j(e,u++)})),S&&S(m,z),x=m.prototype=I($)),x.constructor!==m&&f(x,\"constructor\",m),M(x).TypedArrayConstructor=m,G&&f(x,G,c);var O=m!==p;b[c]=m,r({global:!0,constructor:!0,forced:O,sham:!q},b),\"BYTES_PER_ELEMENT\"in m||f(m,\"BYTES_PER_ELEMENT\",a),\"BYTES_PER_ELEMENT\"in x||f(x,\"BYTES_PER_ELEMENT\",a),T(c)}):e.exports=function(){}},function(e,t,n){\"use strict\";var r=n(0),o=n(1),i=n(140),a=n(29).NATIVE_ARRAY_BUFFER_VIEWS,s=r.ArrayBuffer,c=r.Int8Array;e.exports=!a||!o((function(){c(1)}))||!o((function(){new c(-1)}))||!i((function(e){new c,new c(null),new c(1.5),new c(e)}),!0)||o((function(){return 1!==new c(new s(2),1,void 0).length}))},function(e,t,n){\"use strict\";var r=n(15),o=Math.floor;e.exports=Number.isInteger||function(e){return!r(e)&&isFinite(e)&&o(e)===e}},function(e,t,n){\"use strict\";var r=n(28),o=RangeError;e.exports=function(e){var t=r(e);if(t<0)throw new o(\"The argument can't be less than 0\");return t}},function(e,t,n){\"use strict\";var r=Math.round;e.exports=function(e){var t=r(e);return t<0?0:t>255?255:255&t}},function(e,t,n){\"use strict\";var r=n(47),o=n(5),i=n(130),a=n(21),s=n(23),c=n(138),u=n(99),l=n(137),d=n(228),f=n(29).aTypedArrayConstructor,p=n(156);e.exports=function(e){var t,n,h,v,g,y,m,x,b=i(this),w=a(e),j=arguments.length,I=j>1?arguments[1]:void 0,O=void 0!==I,S=u(w);if(S&&!l(S))for(x=(m=c(w,S)).next,w=[];!(y=o(x,m)).done;)w.push(y.value);for(O&&j>2&&(I=r(I,arguments[2])),n=s(w),h=new(f(b))(n),v=d(h),t=0;n>t;t++)g=O?I(w[t],t):w[t],h[t]=v?p(g):+g;return h}},function(e,t,n){\"use strict\";var r=n(39);e.exports=function(e){var t=r(e);return\"BigInt64Array\"===t||\"BigUint64Array\"===t}},function(e,t,n){\"use strict\";var r=n(47),o=n(2),i=n(55),a=n(21),s=n(23),c=n(230),u=o([].push),l=function(e){var t=1===e,n=2===e,o=3===e,l=4===e,d=6===e,f=7===e,p=5===e||d;return function(h,v,g,y){for(var m,x,b=a(h),w=i(b),j=r(v,g),I=s(w),O=0,S=y||c,E=t?S(h,I):n||f?S(h,0):void 0;I>O;O++)if((p||O in w)&&(x=j(m=w[O],O,b),e))if(t)E[O]=x;else if(x)switch(e){case 3:return!0;case 5:return m;case 6:return O;case 2:u(E,m)}else switch(e){case 4:return!1;case 7:u(E,m)}return d?-1:o||l?l:E}};e.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(e,t,n){\"use strict\";var r=n(231);e.exports=function(e,t){return new(r(e))(0===t?0:t)}},function(e,t,n){\"use strict\";var r=n(107),o=n(131),i=n(15),a=n(7)(\"species\"),s=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(o(t)&&(t===s||r(t.prototype))||i(t)&&null===(t=t[a]))&&(t=void 0)),void 0===t?s:t}},function(e,t,n){\"use strict\";n(233)},function(e,t,n){\"use strict\";var r=n(29),o=n(23),i=n(28),a=r.aTypedArray;(0,r.exportTypedArrayMethod)(\"at\",(function(e){var t=a(this),n=o(t),r=i(e),s=r>=0?r:n+r;return s<0||s>=n?void 0:t[s]}))},function(e,t,n){\"use strict\";var r=n(29),o=n(154),i=n(156),a=n(39),s=n(5),c=n(2),u=n(1),l=r.aTypedArray,d=r.exportTypedArrayMethod,f=c(\"\".slice);d(\"fill\",(function(e){var t=arguments.length;l(this);var n=\"Big\"===f(a(this),0,3)?i(e):+e;return s(o,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})))},function(e,t,n){\"use strict\";n(236)},function(e,t,n){\"use strict\";var r=n(29),o=n(158).findLast,i=r.aTypedArray;(0,r.exportTypedArrayMethod)(\"findLast\",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){\"use strict\";n(238)},function(e,t,n){\"use strict\";var r=n(29),o=n(158).findLastIndex,i=r.aTypedArray;(0,r.exportTypedArrayMethod)(\"findLastIndex\",(function(e){return o(i(this),e,arguments.length>1?arguments[1]:void 0)}))},function(e,t,n){\"use strict\";var r=n(0),o=n(5),i=n(29),a=n(23),s=n(155),c=n(21),u=n(1),l=r.RangeError,d=r.Int8Array,f=d&&d.prototype,p=f&&f.set,h=i.aTypedArray,v=i.exportTypedArrayMethod,g=!u((function(){var e=new Uint8ClampedArray(2);return o(p,e,{length:1,0:3},1),3!==e[1]})),y=g&&i.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new d(2);return e.set(1),e.set(\"2\",1),0!==e[0]||2!==e[1]}));v(\"set\",(function(e){h(this);var t=s(arguments.length>1?arguments[1]:void 0,1),n=c(e);if(g)return o(p,this,n,t);var r=this.length,i=a(n),u=0;if(i+t>r)throw new l(\"Wrong length\");for(;u<i;)this[t+u]=n[u++]}),!g||y)},function(e,t,n){\"use strict\";var r=n(0),o=n(48),i=n(1),a=n(20),s=n(144),c=n(29),u=n(147),l=n(148),d=n(56),f=n(149),p=c.aTypedArray,h=c.exportTypedArrayMethod,v=r.Uint16Array,g=v&&o(v.prototype.sort),y=!(!g||i((function(){g(new v(2),null)}))&&i((function(){g(new v(2),{})}))),m=!!g&&!i((function(){if(d)return d<74;if(u)return u<67;if(l)return!0;if(f)return f<602;var e,t,n=new v(516),r=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,r[e]=e-2*t+3;for(g(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==r[e])return!0}));h(\"sort\",(function(e){return void 0!==e&&a(e),m?g(this,e):s(p(this),function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!=n?-1:t!=t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}}(e))}),!m||y)},function(e,t,n){\"use strict\";var r=n(0),o=n(46),i=n(29),a=n(1),s=n(77),c=r.Int8Array,u=i.aTypedArray,l=i.exportTypedArrayMethod,d=[].toLocaleString,f=!!c&&a((function(){d.call(new c(1))}));l(\"toLocaleString\",(function(){return o(d,f?s(u(this)):u(this),s(arguments))}),a((function(){return[1,2].toLocaleString()!==new c([1,2]).toLocaleString()}))||!a((function(){c.prototype.toLocaleString.call([1,2])})))},function(e,t,n){\"use strict\";var r=n(3),o=n(243).start;r({target:\"String\",proto:!0,forced:n(244)},{padStart:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){\"use strict\";var r=n(2),o=n(24),i=n(9),a=n(159),s=n(17),c=r(a),u=r(\"\".slice),l=Math.ceil,d=function(e){return function(t,n,r){var a,d,f=i(s(t)),p=o(n),h=f.length,v=void 0===r?\" \":i(r);return p<=h||\"\"===v?f:((d=c(v,l((a=p-h)/v.length))).length>a&&(d=u(d,0,a)),e?f+d:d+f)}};e.exports={start:d(!1),end:d(!0)}},function(e,t,n){\"use strict\";var r=n(30);e.exports=/Version\\/10(?:\\.\\d+){1,2}(?: [\\w./]+)?(?: Mobile\\/\\w+)? Safari\\//.test(r)},function(e,t,n){(function(e){!function(e,t){\"use strict\";if(!e.setImmediate){var n,r,o,i,a,s=1,c={},u=!1,l=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,\"[object process]\"==={}.toString.call(e.process)?n=function(e){process.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(\"\",\"*\"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},n=function(e){o.port2.postMessage(e)}):l&&\"onreadystatechange\"in l.createElement(\"script\")?(r=l.documentElement,n=function(e){var t=l.createElement(\"script\");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):n=function(e){setTimeout(p,0,e)}:(i=\"setImmediate$\"+Math.random()+\"$\",a=function(t){t.source===e&&\"string\"==typeof t.data&&0===t.data.indexOf(i)&&p(+t.data.slice(i.length))},e.addEventListener?e.addEventListener(\"message\",a,!1):e.attachEvent(\"onmessage\",a),n=function(t){e.postMessage(i+t,\"*\")}),d.setImmediate=function(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var o={callback:e,args:t};return c[s]=o,n(s),s++},d.clearImmediate=f}function f(e){delete c[e]}function p(e){if(u)setTimeout(p,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,n=e.args;switch(n.length){case 0:t();break;case 1:t(n[0]);break;case 2:t(n[0],n[1]);break;case 3:t(n[0],n[1],n[2]);break;default:t.apply(void 0,n)}}(t)}finally{f(e),u=!1}}}}}(\"undefined\"==typeof self?void 0===e?this:e:self)}).call(this,n(118))},function(e,t,n){\"use strict\";var r=n(11),o=n(0),i=n(2),a=n(93),s=n(157),c=n(31),u=n(73).f,l=n(35),d=n(101),f=n(9),p=n(160),h=n(109),v=n(247),g=n(27),y=n(1),m=n(13),x=n(36).enforce,b=n(94),w=n(7),j=n(163),I=n(164),O=w(\"match\"),S=o.RegExp,E=S.prototype,N=o.SyntaxError,A=i(E.exec),T=i(\"\".charAt),D=i(\"\".replace),R=i(\"\".indexOf),k=i(\"\".slice),L=/^\\?<[^\\s\\d!#%&*+<=>@^][^\\s!#%&*+<=>@^]*>/,C=/a/g,_=/a/g,P=new S(C)!==C,M=h.MISSED_STICKY,F=h.UNSUPPORTED_Y,B=r&&(!P||M||j||I||y((function(){return _[O]=!1,S(C)!==C||S(_)===_||\"/a/i\"!==String(S(C,\"i\"))})));if(a(\"RegExp\",B)){for(var J=function(e,t){var n,r,o,i,a,u,h=l(E,this),v=d(e),g=void 0===t,y=[],b=e;if(!h&&v&&g&&e.constructor===J)return e;if((v||l(E,e))&&(e=e.source,g&&(t=p(b))),e=void 0===e?\"\":f(e),t=void 0===t?\"\":f(t),b=e,j&&\"dotAll\"in C&&(r=!!t&&R(t,\"s\")>-1)&&(t=D(t,/s/g,\"\")),n=t,M&&\"sticky\"in C&&(o=!!t&&R(t,\"y\")>-1)&&F&&(t=D(t,/y/g,\"\")),I&&(e=(i=function(e){for(var t,n=e.length,r=0,o=\"\",i=[],a={},s=!1,c=!1,u=0,l=\"\";r<=n;r++){if(\"\\\\\"===(t=T(e,r)))t+=T(e,++r);else if(\"]\"===t)s=!1;else if(!s)switch(!0){case\"[\"===t:s=!0;break;case\"(\"===t:A(L,k(e,r+1))&&(r+=2,c=!0),o+=t,u++;continue;case\">\"===t&&c:if(\"\"===l||m(a,l))throw new N(\"Invalid capture group name\");a[l]=!0,i[i.length]=[l,u],c=!1,l=\"\";continue}c?l+=t:o+=t}return[o,i]}(e))[0],y=i[1]),a=s(S(e,t),h?this:E,J),(r||o||y.length)&&(u=x(a),r&&(u.dotAll=!0,u.raw=J(function(e){for(var t,n=e.length,r=0,o=\"\",i=!1;r<=n;r++)\"\\\\\"!==(t=T(e,r))?i||\".\"!==t?(\"[\"===t?i=!0:\"]\"===t&&(i=!1),o+=t):o+=\"[\\\\s\\\\S]\":o+=t+T(e,++r);return o}(e),n)),o&&(u.sticky=!0),y.length&&(u.groups=y)),e!==b)try{c(a,\"source\",\"\"===b?\"(?:)\":b)}catch(e){}return a},U=u(S),H=0;U.length>H;)v(J,S,U[H++]);E.constructor=J,J.prototype=E,g(o,\"RegExp\",J,{constructor:!0})}b(\"RegExp\")},function(e,t,n){\"use strict\";var r=n(22).f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},function(e,t,n){\"use strict\";var r=n(2),o=n(28),i=n(9),a=n(17),s=r(\"\".charAt),c=r(\"\".charCodeAt),u=r(\"\".slice),l=function(e){return function(t,n){var r,l,d=i(a(t)),f=o(n),p=d.length;return f<0||f>=p?e?\"\":void 0:(r=c(d,f))<55296||r>56319||f+1===p||(l=c(d,f+1))<56320||l>57343?e?s(d,f):r:e?u(d,f,f+2):l-56320+(r-55296<<10)+65536}};e.exports={codeAt:l(!1),charAt:l(!0)}},function(e,t,n){\"use strict\";var r=n(2),o=n(21),i=Math.floor,a=r(\"\".charAt),s=r(\"\".replace),c=r(\"\".slice),u=/\\$([$&'`]|\\d{1,2}|<[^>]*>)/g,l=/\\$([$&'`]|\\d{1,2})/g;e.exports=function(e,t,n,r,d,f){var p=n+e.length,h=r.length,v=l;return void 0!==d&&(d=o(d),v=u),s(f,v,(function(o,s){var u;switch(a(s,0)){case\"$\":return\"$\";case\"&\":return e;case\"`\":return c(t,0,n);case\"'\":return c(t,p);case\"<\":u=d[c(s,1,-1)];break;default:var l=+s;if(0===l)return o;if(l>h){var f=i(l/10);return 0===f?o:f<=h?void 0===r[f-1]?a(s,1):r[f-1]+a(s,1):o}u=r[l-1]}return void 0===u?\"\":u}))}},function(e,t,n){\"use strict\";var r=n(0),o=n(1),i=n(2),a=n(9),s=n(167).trim,c=n(113),u=r.parseInt,l=r.Symbol,d=l&&l.iterator,f=/^[+-]?0x/i,p=i(f.exec),h=8!==u(c+\"08\")||22!==u(c+\"0x16\")||d&&!o((function(){u(Object(d))}));e.exports=h?function(e,t){var n=s(a(e));return u(n,t>>>0||(p(f,n)?16:10))}:u},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2022 Digital Bazaar, Inc. All rights reserved.\n */n(12),n(6),n(8);const r=n(79),o=n(150);e.exports=class extends o{constructor(){super(),this.name=\"URGNA2012\",this.createMessageDigest=()=>new r(\"sha1\")}modifyFirstDegreeComponent(e,t,n){return\"BlankNode\"!==t.termType?t:\"graph\"===n?{termType:\"BlankNode\",value:\"_:g\"}:{termType:\"BlankNode\",value:t.value===e?\"_:a\":\"_:z\"}}getRelatedPredicate(e){return e.predicate.value}async createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;let o=0;for(const i of r){let r,a;if(\"BlankNode\"===i.subject.termType&&i.subject.value!==e)a=i.subject.value,r=\"p\";else{if(\"BlankNode\"!==i.object.termType||i.object.value===e)continue;a=i.object.value,r=\"r\"}++o%100==0&&await this._yield();const s=await this.hashRelatedBlankNode(a,i,t,r),c=n.get(s);c?c.push(a):n.set(s,[a])}return n}}},function(e,t,n){\"use strict\";\n/*!\n * Copyright (c) 2016-2021 Digital Bazaar, Inc. All rights reserved.\n */n(6),n(8);const r=n(79),o=n(168);e.exports=class extends o{constructor(){super(),this.name=\"URGNA2012\",this.createMessageDigest=()=>new r(\"sha1\")}modifyFirstDegreeComponent(e,t,n){return\"BlankNode\"!==t.termType?t:\"graph\"===n?{termType:\"BlankNode\",value:\"_:g\"}:{termType:\"BlankNode\",value:t.value===e?\"_:a\":\"_:z\"}}getRelatedPredicate(e){return e.predicate.value}createHashToRelated(e,t){const n=new Map,r=this.blankNodeInfo.get(e).quads;for(const o of r){let r,i;if(\"BlankNode\"===o.subject.termType&&o.subject.value!==e)i=o.subject.value,r=\"p\";else{if(\"BlankNode\"!==o.object.termType||o.object.value===e)continue;i=o.object.value,r=\"r\"}const a=this.hashRelatedBlankNode(i,o,t,r),s=n.get(a);s?s.push(i):n.set(a,[i])}return n}}},function(e,t){},function(e,t,n){\"use strict\";n(255);const r=n(256),o={};e.exports=o,o.setupDocumentLoaders=function(e){\"undefined\"!=typeof XMLHttpRequest&&(e.documentLoaders.xhr=r,e.useDocumentLoader(\"xhr\"))},o.setupGlobals=function(e){void 0===globalThis.JsonLdProcessor&&Object.defineProperty(globalThis,\"JsonLdProcessor\",{writable:!0,enumerable:!1,configurable:!0,value:e.JsonLdProcessor})}},function(e,t,n){\"use strict\";var r=n(3),o=n(0);r({global:!0,forced:o.globalThis!==o},{globalThis:o})},function(e,t,n){\"use strict\";n(12),n(25),n(81),n(52);const{parseLinkHeader:r,buildHeaders:o}=n(18),{LINK_HEADER_CONTEXT:i}=n(115),a=n(19),s=n(169),{prependBase:c}=n(37),u=/(^|(\\r\\n))link:/i;e.exports=({secure:e,headers:t={},xhr:n}={headers:{}})=>{t=o(t);return(new s).wrapLoader((async function o(s){if(0!==s.indexOf(\"http:\")&&0!==s.indexOf(\"https:\"))throw new a('URL could not be dereferenced; only \"http\" and \"https\" URLs are supported.',\"jsonld.InvalidUrl\",{code:\"loading document failed\",url:s});if(e&&0!==s.indexOf(\"https\"))throw new a('URL could not be dereferenced; secure mode is enabled and the URL\\'s scheme is not \"https\".',\"jsonld.InvalidUrl\",{code:\"loading document failed\",url:s});let l;try{l=await function(e,t,n){const r=new(e=e||XMLHttpRequest);return new Promise((e,o)=>{r.onload=()=>e(r),r.onerror=e=>o(e),r.open(\"GET\",t,!0);for(const e in n)r.setRequestHeader(e,n[e]);r.send()})}(n,s,t)}catch(e){throw new a(\"URL could not be dereferenced, an error occurred.\",\"jsonld.LoadDocumentError\",{code:\"loading document failed\",url:s,cause:e})}if(l.status>=400)throw new a(\"URL could not be dereferenced: \"+l.statusText,\"jsonld.LoadDocumentError\",{code:\"loading document failed\",url:s,httpStatusCode:l.status});let d={contextUrl:null,documentUrl:s,document:l.response},f=null;const p=l.getResponseHeader(\"Content-Type\");let h;u.test(l.getAllResponseHeaders())&&(h=l.getResponseHeader(\"Link\"));if(h&&\"application/ld+json\"!==p){const e=r(h),t=e[i];if(Array.isArray(t))throw new a(\"URL could not be dereferenced, it has more than one associated HTTP Link Header.\",\"jsonld.InvalidUrl\",{code:\"multiple context link headers\",url:s});t&&(d.contextUrl=t.target),f=e.alternate,f&&\"application/ld+json\"==f.type&&!(p||\"\").match(/^application\\/(\\w*\\+)?json$/)&&(d=await o(c(s,f.target)))}return d}))}},function(e,t,n){\"use strict\";var r=n(0),o=n(1),i=n(2),a=n(9),s=n(167).trim,c=n(113),u=i(\"\".charAt),l=r.parseFloat,d=r.Symbol,f=d&&d.iterator,p=1/l(c+\"-0\")!=-1/0||f&&!o((function(){l(Object(f))}));e.exports=p?function(e){var t=s(a(e)),n=l(t);return 0===n&&\"-\"===u(t,0)?-0:n}:l},function(e,t,n){\"use strict\";n(6),n(8),n(12),n(116);const{isArray:r,isObject:o,isString:i}=n(16),{asArray:a}=n(18),{prependBase:s}=n(37),c=n(19),u=n(260);function l(e){throw new c(\"Invalid JSON-LD syntax; @context must be an object.\",\"jsonld.SyntaxError\",{code:\"invalid local context\",context:e})}e.exports=class{constructor({sharedCache:e}){this.perOpCache=new Map,this.sharedCache=e}async resolve({activeCtx:e,context:t,documentLoader:n,base:s,cycles:c=new Set}){t&&o(t)&&t[\"@context\"]&&(t=t[\"@context\"]),t=a(t);const d=[];for(const a of t){if(i(a)){let t=this._get(a);t||(t=await this._resolveRemoteContext({activeCtx:e,url:a,documentLoader:n,base:s,cycles:c})),r(t)?d.push(...t):d.push(t);continue}if(null===a){d.push(new u({document:null}));continue}o(a)||l(t);const f=JSON.stringify(a);let p=this._get(f);p||(p=new u({document:a}),this._cacheResolvedContext({key:f,resolved:p,tag:\"static\"})),d.push(p)}return d}_get(e){let t=this.perOpCache.get(e);if(!t){const n=this.sharedCache.get(e);n&&(t=n.get(\"static\"),t&&this.perOpCache.set(e,t))}return t}_cacheResolvedContext({key:e,resolved:t,tag:n}){if(this.perOpCache.set(e,t),void 0!==n){let r=this.sharedCache.get(e);r||(r=new Map,this.sharedCache.set(e,r)),r.set(n,t)}return t}async _resolveRemoteContext({activeCtx:e,url:t,documentLoader:n,base:a,cycles:c}){t=s(a,t);const{context:u,remoteDoc:l}=await this._fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:c});(function e({context:t,base:n}){if(!t)return;const a=t[\"@context\"];if(i(a))return void(t[\"@context\"]=s(n,a));if(r(a)){for(let t=0;t<a.length;++t){const r=a[t];i(r)?a[t]=s(n,r):o(r)&&e({context:{\"@context\":r},base:n})}return}if(!o(a))return;for(const t in a)e({context:a[t],base:n})})({context:u,base:a=l.documentUrl||t});const d=await this.resolve({activeCtx:e,context:u,documentLoader:n,base:a,cycles:c});return this._cacheResolvedContext({key:t,resolved:d,tag:l.tag}),d}async _fetchContext({activeCtx:e,url:t,documentLoader:n,cycles:a}){if(a.size>10)throw new c(\"Maximum number of @context URLs exceeded.\",\"jsonld.ContextUrlError\",{code:\"json-ld-1.0\"===e.processingMode?\"loading remote context failed\":\"context overflow\",max:10});if(a.has(t))throw new c(\"Cyclical @context URLs detected.\",\"jsonld.ContextUrlError\",{code:\"json-ld-1.0\"===e.processingMode?\"recursive context inclusion\":\"context overflow\",url:t});let s,u;a.add(t);try{u=await n(t),s=u.document||null,i(s)&&(s=JSON.parse(s))}catch(e){throw new c(\"Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.\",\"jsonld.InvalidUrl\",{code:\"loading remote context failed\",url:t,cause:e})}if(!o(s))throw new c(\"Dereferencing a URL did not result in a JSON object. The response was valid JSON, but it was not a JSON object.\",\"jsonld.InvalidUrl\",{code:\"invalid remote context\",url:t});return s=\"@context\"in s?{\"@context\":s[\"@context\"]}:{\"@context\":{}},u.contextUrl&&(r(s[\"@context\"])||(s[\"@context\"]=[s[\"@context\"]]),s[\"@context\"].push(u.contextUrl)),{context:s,remoteDoc:u}}}},function(e,t,n){\"use strict\";var r=n(2),o=n(107),i=n(4),a=n(33),s=n(9),c=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];\"string\"==typeof u?c(n,u):\"number\"!=typeof u&&\"Number\"!==a(u)&&\"String\"!==a(u)||c(n,s(u))}var l=n.length,d=!0;return function(e,t){if(d)return d=!1,t;if(o(this))return t;for(var r=0;r<l;r++)if(n[r]===e)return t}}}},function(e,t,n){\"use strict\";const r=n(170);e.exports=class{constructor({document:e}){this.document=e,this.cache=new r({max:10})}getProcessed(e){return this.cache.get(e)}setProcessed(e,t){this.cache.set(e,t)}}},function(e,t,n){\"use strict\";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&\"function\"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,o=arguments.length;n<o;n++)t.push(arguments[n]);return t}function o(e,t,n){var r=t===e.head?new s(n,null,t,e):new s(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function i(e,t){e.tail=new s(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function a(e,t){e.head=new s(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function s(e,t,n,r){if(!(this instanceof s))return new s(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}n(172),n(12),n(64),e.exports=r,r.Node=s,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error(\"removing node which does not belong to this list\");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)a(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,o=this.head;null!==o;)n.push(e.call(t,o.value,this)),o=o.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,o=this.tail;null!==o;)n.push(e.call(t,o.value,this)),o=o.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError(\"Reduce of empty list with no initial value\");r=this.head.next,n=this.head.value}for(var o=0;null!==r;o++)n=e(n,r.value,o),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError(\"Reduce of empty list with no initial value\");r=this.tail.prev,n=this.tail.value}for(var o=this.length-1;null!==r;o--)n=e(n,r.value,o),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)n.push(i.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)n.push(i.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,i=this.head;null!==i&&r<e;r++)i=i.next;var a=[];for(r=0;i&&r<t;r++)a.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(r=0;r<n.length;r++)i=o(this,i,n[r]);return a},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(263)(r)}catch(e){}},function(e,t,n){\"use strict\";var r=n(20),o=n(21),i=n(55),a=n(23),s=TypeError,c=function(e){return function(t,n,c,u){r(n);var l=o(t),d=i(l),f=a(l),p=e?f-1:0,h=e?-1:1;if(c<2)for(;;){if(p in d){u=d[p],p+=h;break}if(p+=h,e?p<0:f<=p)throw new s(\"Reduce of empty array with no initial value\")}for(;e?p>=0:f>p;p+=h)p in d&&(u=n(u,d[p],p,l));return u}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){\"use strict\";n(6),n(8),n(171),e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},function(e,t,n){\"use strict\";e.exports=n(105).NQuads},function(e,t,n){\"use strict\";var r=n(66)(n(67));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(12),n(104),n(49),n(50),n(14),n(6),n(8),n(266),n(25),n(52),n(64),n(40);const a=n(19),{isArray:s,isObject:c,isEmptyObject:u,isString:l,isUndefined:d}=n(16),{isList:f,isValue:p,isGraph:h,isSubject:v}=n(32),{expandIri:g,getContextValue:y,isKeyword:m,process:x,processingMode:b}=n(41),{isAbsolute:w}=n(37),{REGEX_BCP47:j,REGEX_KEYWORD:I,addValue:O,asArray:S,getValues:E,validateTypeValue:N}=n(18),{handleEvent:A}=n(65),T={};function D({value:e,count:t,options:n}){if(0===t||\"@value\"in e||\"@list\"in e||1===t&&\"@id\"in e){if(n.eventHandler){let r,o;0===t?(r=\"empty object\",o=\"Dropping empty object.\"):\"@value\"in e?(r=\"object with only @value\",o=\"Dropping object with only @value.\"):\"@list\"in e?(r=\"object with only @list\",o=\"Dropping object with only @list.\"):1===t&&\"@id\"in e&&(r=\"object with only @id\",o=\"Dropping object with only @id.\"),A({event:{type:[\"JsonLdEvent\"],code:r,level:\"warning\",message:o,details:{value:e}},options:n})}return null}return e}function R({activeCtx:e,activeProperty:t,value:n,options:r}){if(null==n)return null;const o=g(e,t,{vocab:!0},r);if(\"@id\"===o)return g(e,n,{base:!0},r);if(\"@type\"===o)return g(e,n,{vocab:!0,base:!0},i(i({},r),{},{typeExpansion:!0}));const a=y(e,t,\"@type\");if((\"@id\"===a||\"@graph\"===o)&&l(n)){const o=g(e,n,{base:!0},r);return null===o&&n.match(I)&&r.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"reserved @id value\",level:\"warning\",message:\"Reserved @id found.\",details:{id:t}},options:r}),{\"@id\":o}}if(\"@vocab\"===a&&l(n))return{\"@id\":g(e,n,{vocab:!0,base:!0},r)};if(m(o))return n;const s={};if(a&&![\"@id\",\"@vocab\",\"@none\"].includes(a))s[\"@type\"]=a;else if(l(n)){const n=y(e,t,\"@language\");null!==n&&(s[\"@language\"]=n);const r=y(e,t,\"@direction\");null!==r&&(s[\"@direction\"]=r)}return[\"boolean\",\"number\",\"string\"].includes(typeof n)||(n=n.toString()),s[\"@value\"]=n,s}function k(e,t,n,r){const o=[],i=Object.keys(t).sort();for(const c of i){const i=g(e,c,{vocab:!0},r);let u=t[c];s(u)||(u=[u]);for(const e of u){if(null===e)continue;if(!l(e))throw new a(\"Invalid JSON-LD syntax; language map values must be strings.\",\"jsonld.SyntaxError\",{code:\"invalid language map value\",languageMap:t});const s={\"@value\":e};\"@none\"!==i&&(c.match(j)||r.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"invalid @language value\",level:\"warning\",message:\"@language value must be valid BCP47.\",details:{language:c}},options:r}),s[\"@language\"]=c.toLowerCase()),n&&(s[\"@direction\"]=n),o.push(s)}}return o}async function L({activeCtx:e,options:t,activeProperty:n,value:r,asGraph:o,indexKey:i,propertyIndex:c}){const u=[],l=Object.keys(r).sort(),f=\"@type\"===i;for(let v of l){if(f){const n=y(e,v,\"@context\");d(n)||(e=await x({activeCtx:e,localCtx:n,propagate:!1,options:t}))}let l,m=r[v];s(m)||(m=[m]),m=await T.expand({activeCtx:e,activeProperty:n,element:m,options:t,insideList:!1,insideIndex:!0}),l=c?\"@none\"===v?\"@none\":R({activeCtx:e,activeProperty:i,value:v,options:t}):g(e,v,{vocab:!0},t),\"@id\"===i?v=g(e,v,{base:!0},t):f&&(v=l);for(let e of m){if(o&&!h(e)&&(e={\"@graph\":[e]}),\"@type\"===i)\"@none\"===l||(e[\"@type\"]?e[\"@type\"]=[v].concat(e[\"@type\"]):e[\"@type\"]=[v]);else{if(p(e)&&![\"@language\",\"@type\",\"@index\"].includes(i))throw new a(`Invalid JSON-LD syntax; Attempt to add illegal key to value object: \"${i}\".`,\"jsonld.SyntaxError\",{code:\"invalid value object\",value:e});c?\"@none\"!==l&&O(e,c,l,{propertyIsArray:!0,prependValue:!0}):\"@none\"===l||i in e||(e[i]=v)}u.push(e)}}return u}e.exports=T,T.expand=async({activeCtx:e,activeProperty:t=null,element:n,options:r={},insideList:o=!1,insideIndex:h=!1,typeScopedContext:I=null})=>{if(null==n)return null;if(\"@default\"===t&&(r=Object.assign({},r,{isFrame:!1})),!s(n)&&!c(n))return o||null!==t&&\"@graph\"!==g(e,t,{vocab:!0},r)?R({activeCtx:e,activeProperty:t,value:n,options:r}):(r.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"free-floating scalar\",level:\"warning\",message:\"Dropping free-floating scalar not in a list.\",details:{value:n}},options:r}),null);if(s(n)){let i=[];const a=y(e,t,\"@container\")||[];o=o||a.includes(\"@list\");for(let a=0;a<n.length;++a){let c=await T.expand({activeCtx:e,activeProperty:t,element:n[a],options:r,insideIndex:h,typeScopedContext:I});o&&s(c)&&(c={\"@list\":c}),null!==c&&(s(c)?i=i.concat(c):i.push(c))}return i}const C=g(e,t,{vocab:!0},r),_=y(e,t,\"@context\");I=I||(e.previousContext?e:null);let P=Object.keys(n).sort(),M=!h;if(M&&I&&P.length<=2&&!P.includes(\"@context\"))for(const t of P){const n=g(I,t,{vocab:!0},r);if(\"@value\"===n){M=!1,e=I;break}if(\"@id\"===n&&1===P.length){M=!1;break}}M&&(e=e.revertToPreviousContext()),d(_)||(e=await x({activeCtx:e,localCtx:_,propagate:!0,overrideProtected:!0,options:r})),\"@context\"in n&&(e=await x({activeCtx:e,localCtx:n[\"@context\"],options:r})),I=e;let F=null;for(const t of P){if(\"@type\"===g(e,t,{vocab:!0},r)){F=F||t;const o=n[t],i=Array.isArray(o)?o.length>1?o.slice().sort():o:[o];for(const t of i){const n=y(I,t,\"@context\");d(n)||(e=await x({activeCtx:e,localCtx:n,options:r,propagate:!1}))}}}let B={};await async function e({activeCtx:t,activeProperty:n,expandedActiveProperty:r,element:o,expandedParent:h,options:I={},insideList:E,typeKey:R,typeScopedContext:C}){const _=Object.keys(o).sort(),P=[];let M;const F=o[R]&&\"@json\"===g(t,s(o[R])?o[R][0]:o[R],{vocab:!0},i(i({},I),{},{typeExpansion:!0}));for(const e of _){let E,R=o[e];if(\"@context\"===e)continue;const _=g(t,e,{vocab:!0},I);if(null===_||!w(_)&&!m(_)){I.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"invalid property\",level:\"warning\",message:\"Dropping property that did not expand into an absolute IRI or keyword.\",details:{property:e,expandedProperty:_}},options:I});continue}if(m(_)){if(\"@reverse\"===r)throw new a(\"Invalid JSON-LD syntax; a keyword cannot be used as a @reverse property.\",\"jsonld.SyntaxError\",{code:\"invalid reverse property map\",value:R});if(_ in h&&\"@included\"!==_&&\"@type\"!==_)throw new a(\"Invalid JSON-LD syntax; colliding keywords detected.\",\"jsonld.SyntaxError\",{code:\"colliding keywords\",keyword:_})}if(\"@id\"===_){if(!l(R)){if(!I.isFrame)throw new a('Invalid JSON-LD syntax; \"@id\" value must a string.',\"jsonld.SyntaxError\",{code:\"invalid @id value\",value:R});if(c(R)){if(!u(R))throw new a('Invalid JSON-LD syntax; \"@id\" value an empty object or array of strings, if framing',\"jsonld.SyntaxError\",{code:\"invalid @id value\",value:R})}else{if(!s(R))throw new a('Invalid JSON-LD syntax; \"@id\" value an empty object or array of strings, if framing',\"jsonld.SyntaxError\",{code:\"invalid @id value\",value:R});if(!R.every(e=>l(e)))throw new a('Invalid JSON-LD syntax; \"@id\" value an empty object or array of strings, if framing',\"jsonld.SyntaxError\",{code:\"invalid @id value\",value:R})}}O(h,\"@id\",S(R).map(e=>{if(l(e)){const n=g(t,e,{base:!0},I);return I.eventHandler&&(null===n?A(null===e?{event:{type:[\"JsonLdEvent\"],code:\"null @id value\",level:\"warning\",message:\"Null @id found.\",details:{id:e}},options:I}:{event:{type:[\"JsonLdEvent\"],code:\"reserved @id value\",level:\"warning\",message:\"Reserved @id found.\",details:{id:e}},options:I}):w(n)||A({event:{type:[\"JsonLdEvent\"],code:\"relative @id reference\",level:\"warning\",message:\"Relative @id reference found.\",details:{id:e,expandedId:n}},options:I})),n}return e}),{propertyIsArray:I.isFrame});continue}if(\"@type\"===_){c(R)&&(R=Object.fromEntries(Object.entries(R).map(([e,t])=>[g(C,e,{vocab:!0}),S(t).map(e=>g(C,e,{base:!0,vocab:!0},i(i({},I),{},{typeExpansion:!0})))]))),N(R,I.isFrame),O(h,\"@type\",S(R).map(e=>{if(l(e)){const t=g(C,e,{base:!0,vocab:!0},i(i({},I),{},{typeExpansion:!0}));return\"@json\"===t||w(t)||I.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"relative @type reference\",level:\"warning\",message:\"Relative @type reference found.\",details:{type:e}},options:I}),t}return e}),{propertyIsArray:!!I.isFrame});continue}if(\"@included\"===_&&b(t,1.1)){const e=S(await T.expand({activeCtx:t,activeProperty:n,element:R,options:I}));if(!e.every(e=>v(e)))throw new a(\"Invalid JSON-LD syntax; values of @included must expand to node objects.\",\"jsonld.SyntaxError\",{code:\"invalid @included value\",value:R});O(h,\"@included\",e,{propertyIsArray:!0});continue}if(\"@graph\"===_&&!c(R)&&!s(R))throw new a('Invalid JSON-LD syntax; \"@graph\" value must not be an object or an array.',\"jsonld.SyntaxError\",{code:\"invalid @graph value\",value:R});if(\"@value\"===_){M=R,F&&b(t,1.1)?h[\"@value\"]=R:O(h,\"@value\",R,{propertyIsArray:I.isFrame});continue}if(\"@language\"===_){if(null===R)continue;if(!l(R)&&!I.isFrame)throw new a('Invalid JSON-LD syntax; \"@language\" value must be a string.',\"jsonld.SyntaxError\",{code:\"invalid language-tagged string\",value:R});R=S(R).map(e=>l(e)?e.toLowerCase():e);for(const e of R)l(e)&&!e.match(j)&&I.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"invalid @language value\",level:\"warning\",message:\"@language value must be valid BCP47.\",details:{language:e}},options:I});O(h,\"@language\",R,{propertyIsArray:I.isFrame});continue}if(\"@direction\"===_){if(!l(R)&&!I.isFrame)throw new a('Invalid JSON-LD syntax; \"@direction\" value must be a string.',\"jsonld.SyntaxError\",{code:\"invalid base direction\",value:R});R=S(R);for(const e of R)if(l(e)&&\"ltr\"!==e&&\"rtl\"!==e)throw new a('Invalid JSON-LD syntax; \"@direction\" must be \"ltr\" or \"rtl\".',\"jsonld.SyntaxError\",{code:\"invalid base direction\",value:R});O(h,\"@direction\",R,{propertyIsArray:I.isFrame});continue}if(\"@index\"===_){if(!l(R))throw new a('Invalid JSON-LD syntax; \"@index\" value must be a string.',\"jsonld.SyntaxError\",{code:\"invalid @index value\",value:R});O(h,\"@index\",R);continue}if(\"@reverse\"===_){if(!c(R))throw new a('Invalid JSON-LD syntax; \"@reverse\" value must be an object.',\"jsonld.SyntaxError\",{code:\"invalid @reverse value\",value:R});if(E=await T.expand({activeCtx:t,activeProperty:\"@reverse\",element:R,options:I}),\"@reverse\"in E)for(const e in E[\"@reverse\"])O(h,e,E[\"@reverse\"][e],{propertyIsArray:!0});let e=h[\"@reverse\"]||null;for(const t in E){if(\"@reverse\"===t)continue;null===e&&(e=h[\"@reverse\"]={}),O(e,t,[],{propertyIsArray:!0});const n=E[t];for(let r=0;r<n.length;++r){const o=n[r];if(p(o)||f(o))throw new a('Invalid JSON-LD syntax; \"@reverse\" value must not be a @value or an @list.',\"jsonld.SyntaxError\",{code:\"invalid reverse property value\",value:E});O(e,t,o,{propertyIsArray:!0})}}continue}if(\"@nest\"===_){P.push(e);continue}let B=t;const J=y(t,e,\"@context\");d(J)||(B=await x({activeCtx:t,localCtx:J,propagate:!0,overrideProtected:!0,options:I}));const U=y(B,e,\"@container\")||[];if(U.includes(\"@language\")&&c(R)){const t=y(B,e,\"@direction\");E=k(B,R,t,I)}else if(U.includes(\"@index\")&&c(R)){const n=U.includes(\"@graph\"),r=y(B,e,\"@index\")||\"@index\",o=\"@index\"!==r&&g(t,r,{vocab:!0},I);E=await L({activeCtx:B,options:I,activeProperty:e,value:R,asGraph:n,indexKey:r,propertyIndex:o})}else if(U.includes(\"@id\")&&c(R)){const t=U.includes(\"@graph\");E=await L({activeCtx:B,options:I,activeProperty:e,value:R,asGraph:t,indexKey:\"@id\"})}else if(U.includes(\"@type\")&&c(R))E=await L({activeCtx:B.revertToPreviousContext(),options:I,activeProperty:e,value:R,asGraph:!1,indexKey:\"@type\"});else{const o=\"@list\"===_;if(o||\"@set\"===_){let e=n;o&&\"@graph\"===r&&(e=null),E=await T.expand({activeCtx:B,activeProperty:e,element:R,options:I,insideList:o})}else E=\"@json\"===y(t,e,\"@type\")?{\"@type\":\"@json\",\"@value\":R}:await T.expand({activeCtx:B,activeProperty:e,element:R,options:I,insideList:!1})}if(null!==E||\"@value\"===_){if(\"@list\"!==_&&!f(E)&&U.includes(\"@list\")&&(E={\"@list\":S(E)}),U.includes(\"@graph\")&&!U.some(e=>\"@id\"===e||\"@index\"===e)){if(E=S(E),I.isFrame||(E=E.filter(e=>null!==D({value:e,count:Object.keys(e).length,options:I}))),0===E.length)continue;E=E.map(e=>({\"@graph\":S(e)}))}if(B.mappings.has(e)&&B.mappings.get(e).reverse){const e=h[\"@reverse\"]=h[\"@reverse\"]||{};E=S(E);for(let t=0;t<E.length;++t){const n=E[t];if(p(n)||f(n))throw new a('Invalid JSON-LD syntax; \"@reverse\" value must not be a @value or an @list.',\"jsonld.SyntaxError\",{code:\"invalid reverse property value\",value:E});O(e,_,n,{propertyIsArray:!0})}}else O(h,_,E,{propertyIsArray:!0})}}if(\"@value\"in h)if(\"@json\"===h[\"@type\"]&&b(t,1.1));else if((c(M)||s(M))&&!I.isFrame)throw new a('Invalid JSON-LD syntax; \"@value\" value must not be an object or an array.',\"jsonld.SyntaxError\",{code:\"invalid value object value\",value:M});for(const i of P){const u=s(o[i])?o[i]:[o[i]];for(const o of u){if(!c(o)||Object.keys(o).some(e=>\"@value\"===g(t,e,{vocab:!0},I)))throw new a(\"Invalid JSON-LD syntax; nested value must be a node object.\",\"jsonld.SyntaxError\",{code:\"invalid @nest value\",value:o});await e({activeCtx:t,activeProperty:n,expandedActiveProperty:r,element:o,expandedParent:h,options:I,insideList:E,typeScopedContext:C,typeKey:R})}}}({activeCtx:e,activeProperty:t,expandedActiveProperty:C,element:n,expandedParent:B,options:r,insideList:o,typeKey:F,typeScopedContext:I}),P=Object.keys(B);let J=P.length;if(\"@value\"in B){if(\"@type\"in B&&(\"@language\"in B||\"@direction\"in B))throw new a('Invalid JSON-LD syntax; an element containing \"@value\" may not contain both \"@type\" and either \"@language\" or \"@direction\".',\"jsonld.SyntaxError\",{code:\"invalid value object\",element:B});let t=J-1;if(\"@type\"in B&&(t-=1),\"@index\"in B&&(t-=1),\"@language\"in B&&(t-=1),\"@direction\"in B&&(t-=1),0!==t)throw new a('Invalid JSON-LD syntax; an element containing \"@value\" may only have an \"@index\" property and either \"@type\" or either or both \"@language\" or \"@direction\".',\"jsonld.SyntaxError\",{code:\"invalid value object\",element:B});const n=null===B[\"@value\"]?[]:S(B[\"@value\"]),o=E(B,\"@type\");if(b(e,1.1)&&o.includes(\"@json\")&&1===o.length);else if(0===n.length)r.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"null @value value\",level:\"warning\",message:\"Dropping null @value value.\",details:{value:B}},options:r}),B=null;else{if(!n.every(e=>l(e)||u(e))&&\"@language\"in B)throw new a(\"Invalid JSON-LD syntax; only strings may be language-tagged.\",\"jsonld.SyntaxError\",{code:\"invalid language-tagged value\",element:B});if(!o.every(e=>w(e)&&!(l(e)&&0===e.indexOf(\"_:\"))||u(e)))throw new a('Invalid JSON-LD syntax; an element containing \"@value\" and \"@type\" must have an absolute IRI for the value of \"@type\".',\"jsonld.SyntaxError\",{code:\"invalid typed value\",element:B})}}else if(\"@type\"in B&&!s(B[\"@type\"]))B[\"@type\"]=[B[\"@type\"]];else if(\"@set\"in B||\"@list\"in B){if(J>1&&(2!==J||!(\"@index\"in B)))throw new a('Invalid JSON-LD syntax; if an element has the property \"@set\" or \"@list\", then it can have at most one other property that is \"@index\".',\"jsonld.SyntaxError\",{code:\"invalid set or list object\",element:B});\"@set\"in B&&(B=B[\"@set\"],P=Object.keys(B),J=P.length)}else 1===J&&\"@language\"in B&&(r.eventHandler&&A({event:{type:[\"JsonLdEvent\"],code:\"object with only @language\",level:\"warning\",message:\"Dropping object with only @language.\",details:{value:B}},options:r}),B=null);return!c(B)||r.keepFreeFloatingNodes||o||null!==t&&\"@graph\"!==C&&!(y(e,t,\"@container\")||[]).includes(\"@graph\")||(B=D({value:B,count:J,options:r})),B}},function(e,t,n){\"use strict\";var r=n(3),o=n(98),i=n(145);r({target:\"Object\",stat:!0},{fromEntries:function(e){var t={};return o(e,(function(e,n){i(t,e,n)}),{AS_ENTRIES:!0}),t}})},function(e,t,n){\"use strict\";n(14);const{isSubjectReference:r}=n(32),{createMergedNodeMap:o}=n(83),i={};e.exports=i,i.flatten=e=>{const t=o(e),n=[],i=Object.keys(t).sort();for(let e=0;e<i.length;++e){const o=t[i[e]];r(o)||n.push(o)}return n}},function(e,t,n){\"use strict\";n(12),n(6),n(8),n(269),n(64),n(14),n(25),n(52),n(166),n(173),n(114),n(49),n(50),n(51),n(165);const r=n(19),o=n(32),i=n(16),{REGEX_BCP47:a,addValue:s}=n(18),{handleEvent:c}=n(65),{RDF_LIST:u,RDF_FIRST:l,RDF_REST:d,RDF_NIL:f,RDF_TYPE:p,RDF_JSON_LITERAL:h,XSD_BOOLEAN:v,XSD_DOUBLE:g,XSD_INTEGER:y,XSD_STRING:m}=n(115),x={};function b(e,t,n,o){if(e.termType.endsWith(\"Node\"))return{\"@id\":e.value};const s={\"@value\":e.value};if(e.language)e.language.match(a)||o.eventHandler&&c({event:{type:[\"JsonLdEvent\"],code:\"invalid @language value\",level:\"warning\",message:\"@language value must be valid BCP47.\",details:{language:e.language}},options:o}),s[\"@language\"]=e.language;else{let u=e.datatype.value;if(u||(u=m),u===h){u=\"@json\";try{s[\"@value\"]=JSON.parse(s[\"@value\"])}catch(e){throw new r(\"JSON literal could not be parsed.\",\"jsonld.InvalidJsonLiteral\",{code:\"invalid JSON literal\",value:s[\"@value\"],cause:e})}}if(t){if(u===v)\"true\"===s[\"@value\"]?s[\"@value\"]=!0:\"false\"===s[\"@value\"]&&(s[\"@value\"]=!1);else if(i.isNumeric(s[\"@value\"]))if(u===y){const e=parseInt(s[\"@value\"],10);e.toFixed(0)===s[\"@value\"]&&(s[\"@value\"]=e)}else u===g&&(s[\"@value\"]=parseFloat(s[\"@value\"]));[v,y,g,m].includes(u)||(s[\"@type\"]=u)}else if(\"i18n-datatype\"===n&&u.startsWith(\"https://www.w3.org/ns/i18n#\")){const[,e,t]=u.split(/[#_]/);e.length>0&&(s[\"@language\"]=e,e.match(a)||o.eventHandler&&c({event:{type:[\"JsonLdEvent\"],code:\"invalid @language value\",level:\"warning\",message:\"@language value must be valid BCP47.\",details:{language:e}},options:o})),s[\"@direction\"]=t}else u!==m&&(s[\"@type\"]=u)}return s}e.exports=x,x.fromRDF=async(e,t)=>{const{useRdfType:n=!1,useNativeTypes:a=!1,rdfDirection:c=null}=t,h={},v={\"@default\":h},g={};if(c){if(\"compound-literal\"===c)throw new r(\"Unsupported rdfDirection value.\",\"jsonld.InvalidRdfDirection\",{value:c});if(\"i18n-datatype\"!==c)throw new r(\"Unknown rdfDirection value.\",\"jsonld.InvalidRdfDirection\",{value:c})}for(const r of e){const e=\"DefaultGraph\"===r.graph.termType?\"@default\":r.graph.value;e in v||(v[e]={}),\"@default\"===e||e in h||(h[e]={\"@id\":e});const o=v[e],i=r.subject.value,u=r.predicate.value,l=r.object;i in o||(o[i]={\"@id\":i});const d=o[i],y=l.termType.endsWith(\"Node\");if(y&&!(l.value in o)&&(o[l.value]={\"@id\":l.value}),u===p&&!n&&y){s(d,\"@type\",l.value,{propertyIsArray:!0});continue}const m=b(l,a,c,t);if(s(d,u,m,{propertyIsArray:!0}),y)if(l.value===f){const e=o[l.value];\"usages\"in e||(e.usages=[]),e.usages.push({node:d,property:u,value:m})}else l.value in g?g[l.value]=!1:g[l.value]={node:d,property:u,value:m}}for(const e in v){const t=v[e];if(!(f in t))continue;const n=t[f];if(n.usages){for(let e of n.usages){let n=e.node,r=e.property,a=e.value;const s=[],c=[];let f=Object.keys(n).length;for(;r===d&&i.isObject(g[n[\"@id\"]])&&i.isArray(n[l])&&1===n[l].length&&i.isArray(n[d])&&1===n[d].length&&(3===f||4===f&&i.isArray(n[\"@type\"])&&1===n[\"@type\"].length&&n[\"@type\"][0]===u)&&(s.push(n[l][0]),c.push(n[\"@id\"]),e=g[n[\"@id\"]],n=e.node,r=e.property,a=e.value,f=Object.keys(n).length,o.isBlankNode(n)););delete a[\"@id\"],a[\"@list\"]=s.reverse();for(const e of c)delete t[e]}delete n.usages}}const y=[],m=Object.keys(h).sort();for(const e of m){const t=h[e];if(e in v){const n=t[\"@graph\"]=[],r=v[e],i=Object.keys(r).sort();for(const e of i){const t=r[e];o.isSubjectReference(t)||n.push(t)}}o.isSubjectReference(t)||y.push(t)}return y}},function(e,t,n){\"use strict\";var r,o=n(3),i=n(48),a=n(42).f,s=n(24),c=n(9),u=n(100),l=n(17),d=n(102),f=n(26),p=i(\"\".endsWith),h=i(\"\".slice),v=Math.min,g=d(\"endsWith\");o({target:\"String\",proto:!0,forced:!!(f||g||(r=a(String.prototype,\"endsWith\"),!r||r.writable))&&!g},{endsWith:function(e){var t=c(l(this));u(e);var n=arguments.length>1?arguments[1]:void 0,r=t.length,o=void 0===n?r:v(s(n),r),i=c(e);return p?p(t,i,o):h(t,o-i.length,o)===i}})},function(e,t,n){\"use strict\";var r=n(2);e.exports=r(1..valueOf)},function(e,t,n){\"use strict\";n(14),n(6),n(8),n(51),n(40),n(114),n(25),n(82),n(173);const{createNodeMap:r}=n(83),{isKeyword:o}=n(41),i=n(32),a=n(272),s=n(19),c=n(16),u=n(18),{handleEvent:l}=n(65),{RDF_FIRST:d,RDF_REST:f,RDF_NIL:p,RDF_TYPE:h,RDF_JSON_LITERAL:v,RDF_LANGSTRING:g,XSD_BOOLEAN:y,XSD_DOUBLE:m,XSD_INTEGER:x,XSD_STRING:b}=n(115),{isAbsolute:w}=n(37),j={};function I(e,t,n,r,i){const a=Object.keys(t).sort();for(const s of a){const a=t[s],c=Object.keys(a).sort();for(let t of c){const c=a[t];if(\"@type\"===t)t=h;else if(o(t))continue;for(const o of c){const a={termType:s.startsWith(\"_:\")?\"BlankNode\":\"NamedNode\",value:s};if(!w(s)){i.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"relative subject reference\",level:\"warning\",message:\"Relative subject reference found.\",details:{subject:s}},options:i});continue}const c={termType:t.startsWith(\"_:\")?\"BlankNode\":\"NamedNode\",value:t};if(!w(t)){i.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"relative predicate reference\",level:\"warning\",message:\"Relative predicate reference found.\",details:{predicate:t}},options:i});continue}if(\"BlankNode\"===c.termType&&!i.produceGeneralizedRdf){i.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"blank node predicate\",level:\"warning\",message:\"Dropping blank node predicate.\",details:{property:r.getOldIds().find(e=>r.getId(e)===t)}},options:i});continue}const u=O(o,r,e,n,i.rdfDirection,i);u&&e.push({subject:a,predicate:c,object:u,graph:n})}}}}function O(e,t,n,r,o,u){const h={};if(i.isValue(e)){h.termType=\"Literal\",h.value=void 0,h.datatype={termType:\"NamedNode\"};let t=e[\"@value\"];const n=e[\"@type\"]||null;if(\"@json\"===n)h.value=a(t),h.datatype.value=v;else if(c.isBoolean(t))h.value=t.toString(),h.datatype.value=n||y;else if(c.isDouble(t)||n===m)c.isDouble(t)||(t=parseFloat(t)),h.value=t.toExponential(15).replace(/(\\d)0*e\\+?/,\"$1E\"),h.datatype.value=n||m;else if(c.isNumber(t))h.value=t.toFixed(0),h.datatype.value=n||x;else if(\"@direction\"in e&&\"i18n-datatype\"===o){const n=`https://www.w3.org/ns/i18n#${(e[\"@language\"]||\"\").toLowerCase()}_${e[\"@direction\"]}`;h.datatype.value=n,h.value=t}else{if(\"@direction\"in e&&\"compound-literal\"===o)throw new s(\"Unsupported rdfDirection value.\",\"jsonld.InvalidRdfDirection\",{value:o});if(\"@direction\"in e&&o)throw new s(\"Unknown rdfDirection value.\",\"jsonld.InvalidRdfDirection\",{value:o});\"@language\"in e?(\"@direction\"in e&&!o&&u.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"rdfDirection not set\",level:\"warning\",message:\"rdfDirection not set for @direction.\",details:{object:h.value}},options:u}),h.value=t,h.datatype.value=n||g,h.language=e[\"@language\"]):(\"@direction\"in e&&!o&&u.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"rdfDirection not set\",level:\"warning\",message:\"rdfDirection not set for @direction.\",details:{object:h.value}},options:u}),h.value=t,h.datatype.value=n||b)}}else if(i.isList(e)){const i=function(e,t,n,r,o,i){const a={termType:\"NamedNode\",value:d},s={termType:\"NamedNode\",value:f},c={termType:\"NamedNode\",value:p},u=e.pop(),l=u?{termType:\"BlankNode\",value:t.getId()}:c;let h=l;for(const c of e){const e=O(c,t,n,r,o,i),u={termType:\"BlankNode\",value:t.getId()};n.push({subject:h,predicate:a,object:e,graph:r}),n.push({subject:h,predicate:s,object:u,graph:r}),h=u}if(u){const e=O(u,t,n,r,o,i);n.push({subject:h,predicate:a,object:e,graph:r}),n.push({subject:h,predicate:s,object:c,graph:r})}return l}(e[\"@list\"],t,n,r,o,u);h.termType=i.termType,h.value=i.value}else{const t=c.isObject(e)?e[\"@id\"]:e;h.termType=t.startsWith(\"_:\")?\"BlankNode\":\"NamedNode\",h.value=t}return\"NamedNode\"!==h.termType||w(h.value)?h:(u.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"relative object reference\",level:\"warning\",message:\"Relative object reference found.\",details:{object:h.value}},options:u}),null)}e.exports=j,j.toRDF=(e,t)=>{const n=new u.IdentifierIssuer(\"_:b\"),o={\"@default\":{}};r(e,o,\"@default\",n);const i=[],a=Object.keys(o).sort();for(const e of a){let r;if(\"@default\"===e)r={termType:\"DefaultGraph\",value:\"\"};else{if(!w(e)){t.eventHandler&&l({event:{type:[\"JsonLdEvent\"],code:\"relative graph reference\",level:\"warning\",message:\"Relative graph reference found.\",details:{graph:e}},options:t});continue}r=e.startsWith(\"_:\")?{termType:\"BlankNode\"}:{termType:\"NamedNode\"},r.value=e}I(i,o[e],r,n,t)}return i}},function(e,t,n){\"use strict\";n(273),n(116),n(172),n(14),e.exports=function e(t){return null===t||\"object\"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?\"[\"+t.reduce((t,n,r)=>t+(0===r?\"\":\",\")+e(void 0===n||\"symbol\"==typeof n?null:n),\"\")+\"]\":\"{\"+Object.keys(t).sort().reduce((n,r,o)=>{if(void 0===t[r]||\"symbol\"==typeof t[r])return n;return n+(0===n.length?\"\":\",\")+e(r)+\":\"+e(t[r])},\"\")+\"}\"}},function(e,t,n){\"use strict\";var r=n(3),o=n(5);r({target:\"URL\",proto:!0,enumerable:!0},{toJSON:function(){return o(URL.prototype.toString,this)}})},function(e,t,n){\"use strict\";var r=n(66)(n(67));function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}n(14),n(6),n(8),n(49),n(50);const{isKeyword:a}=n(41),s=n(32),c=n(16),u=n(18),l=n(37),d=n(19),{createNodeMap:f,mergeNodeMapGraphs:p}=n(83),h={};function v(e){const t={};for(const n in e)void 0!==e[n]&&(t[\"@\"+n]=[e[n]]);return[t]}function g(e,t,n){for(let r=n.length-1;r>=0;--r){const o=n[r];if(o.graph===t&&o.subject[\"@id\"]===e[\"@id\"])return!0}return!1}function y(e,t,n){const r=\"@\"+n;let o=r in e?e[r][0]:t[n];if(\"embed\"===n)if(!0===o)o=\"@once\";else if(!1===o)o=\"@never\";else if(\"@always\"!==o&&\"@never\"!==o&&\"@link\"!==o&&\"@first\"!==o&&\"@last\"!==o&&\"@once\"!==o)throw new d(\"Invalid JSON-LD syntax; invalid value of @embed.\",\"jsonld.SyntaxError\",{code:\"invalid @embed value\",frame:e});return o}function m(e){if(!c.isArray(e)||1!==e.length||!c.isObject(e[0]))throw new d(\"Invalid JSON-LD syntax; a JSON-LD frame must be a single object.\",\"jsonld.SyntaxError\",{frame:e});if(\"@id\"in e[0])for(const t of u.asArray(e[0][\"@id\"]))if(!c.isObject(t)&&!l.isAbsolute(t)||c.isString(t)&&0===t.indexOf(\"_:\"))throw new d(\"Invalid JSON-LD syntax; invalid @id in frame.\",\"jsonld.SyntaxError\",{code:\"invalid frame\",frame:e});if(\"@type\"in e[0])for(const t of u.asArray(e[0][\"@type\"]))if(!c.isObject(t)&&!l.isAbsolute(t)&&\"@json\"!==t||c.isString(t)&&0===t.indexOf(\"_:\"))throw new d(\"Invalid JSON-LD syntax; invalid @type in frame.\",\"jsonld.SyntaxError\",{code:\"invalid frame\",frame:e})}function x(e,t,n,r){let o=!0,i=!1;for(const l in n){let d=!1;const f=u.getValues(t,l),p=0===u.getValues(n,l).length;if(\"@id\"===l){if(c.isEmptyObject(n[\"@id\"][0]||{})?d=!0:n[\"@id\"].length>=0&&(d=n[\"@id\"].includes(f[0])),!r.requireAll)return d}else if(\"@type\"===l){if(o=!1,p){if(f.length>0)return!1;d=!0}else if(1===n[\"@type\"].length&&c.isEmptyObject(n[\"@type\"][0]))d=f.length>0;else for(const e of n[\"@type\"])d=!(!c.isObject(e)||!(\"@default\"in e))||(d||f.some(t=>t===e));if(!r.requireAll)return d}else{if(a(l))continue;{const t=u.getValues(n,l)[0];let i=!1;if(t&&(m([t]),i=\"@default\"in t),o=!1,0===f.length&&i)continue;if(f.length>0&&p)return!1;if(void 0===t){if(f.length>0)return!1;d=!0}else if(s.isList(t)){const n=t[\"@list\"][0];if(s.isList(f[0])){const t=f[0][\"@list\"];s.isValue(n)?d=t.some(e=>I(n,e)):(s.isSubject(n)||s.isSubjectReference(n))&&(d=t.some(t=>j(e,n,t,r)))}}else d=s.isValue(t)?f.some(e=>I(t,e)):s.isSubjectReference(t)?f.some(n=>j(e,t,n,r)):!!c.isObject(t)&&f.length>0}}if(!d&&r.requireAll)return!1;i=i||d}return o||i}function b(e,t){const n=e.uniqueEmbeds[e.graph],r=n[t],o=r.parent,i=r.property,a={\"@id\":t};if(c.isArray(o)){for(let e=0;e<o.length;++e)if(u.compareValues(o[e],a)){o[e]=a;break}}else{const e=c.isArray(o[i]);u.removeValue(o,i,a,{propertyIsArray:e}),u.addValue(o,i,a,{propertyIsArray:e})}const s=e=>{const t=Object.keys(n);for(const r of t)r in n&&c.isObject(n[r].parent)&&n[r].parent[\"@id\"]===e&&(delete n[r],s(r))};s(t)}\n/**\n * Removes the @preserve keywords from expanded result of framing.\n *\n * @param input the framed, framed output.\n * @param options the framing options used.\n *\n * @return the resulting output.\n */function w(e,t,n){c.isObject(e)?u.addValue(e,t,n,{propertyIsArray:!0}):e.push(n)}function j(e,t,n,r){if(!(\"@id\"in n))return!1;const o=e.subjects[n[\"@id\"]];return o&&x(e,o,t,r)}function I(e,t){const n=t[\"@value\"],r=t[\"@type\"],o=t[\"@language\"],i=e[\"@value\"]?c.isArray(e[\"@value\"])?e[\"@value\"]:[e[\"@value\"]]:[],a=e[\"@type\"]?c.isArray(e[\"@type\"])?e[\"@type\"]:[e[\"@type\"]]:[],s=e[\"@language\"]?c.isArray(e[\"@language\"])?e[\"@language\"]:[e[\"@language\"]]:[];return 0===i.length&&0===a.length&&0===s.length||!(!i.includes(n)&&!c.isEmptyObject(i[0]))&&(!!(!r&&0===a.length||a.includes(r)||r&&c.isEmptyObject(a[0]))&&!!(!o&&0===s.length||s.includes(o)||o&&c.isEmptyObject(s[0])))}e.exports=h,h.frameMergedOrDefault=(e,t,n)=>{const r={options:n,embedded:!1,graph:\"@default\",graphMap:{\"@default\":{}},subjectStack:[],link:{},bnodeMap:{}},o=new u.IdentifierIssuer(\"_:b\");f(e,r.graphMap,\"@default\",o),n.merged&&(r.graphMap[\"@merged\"]=p(r.graphMap),r.graph=\"@merged\"),r.subjects=r.graphMap[r.graph];const i=[];return h.frame(r,Object.keys(r.subjects).sort(),t,i),n.pruneBlankNodeIdentifiers&&(n.bnodesToClear=Object.keys(r.bnodeMap).filter(e=>1===r.bnodeMap[e].length)),\n// remove @preserve from results\nn.link={},function e(t,n){if(c.isArray(t))return t.map(t=>e(t,n));if(c.isObject(t)){\n// remove @preserve\nif(\"@preserve\"in t)return t[\"@preserve\"][0];if(s.isValue(t))return t;if(s.isList(t))return t[\"@list\"]=e(t[\"@list\"],n),t;if(\"@id\"in t){const e=t[\"@id\"];if(n.link.hasOwnProperty(e)){const r=n.link[e].indexOf(t);if(-1!==r)return n.link[e][r];n.link[e].push(t)}else n.link[e]=[t]}for(const r in t)\"@id\"===r&&n.bnodesToClear.includes(t[r])?delete t[\"@id\"]:t[r]=e(t[r],n)}return t}(i,n)},h.frame=(e,t,n,r,o=null)=>{m(n),n=n[0];const l=e.options,f={embed:y(n,l,\"embed\"),explicit:y(n,l,\"explicit\"),requireAll:y(n,l,\"requireAll\")};e.link.hasOwnProperty(e.graph)||(e.link[e.graph]={});const p=e.link[e.graph],j=function(e,t,n,r){const o={};for(const i of t){const t=e.graphMap[e.graph][i];x(e,t,n,r)&&(o[i]=t)}return o}(e,t,n,f),O=Object.keys(j).sort();for(const m of O){const x=j[m];if(null===o?e.uniqueEmbeds={[e.graph]:{}}:e.uniqueEmbeds[e.graph]=e.uniqueEmbeds[e.graph]||{},\"@link\"===f.embed&&m in p){w(r,o,p[m]);continue}const O={\"@id\":m};if(0===m.indexOf(\"_:\")&&u.addValue(e.bnodeMap,m,O,{propertyIsArray:!0}),p[m]=O,(\"@first\"===f.embed||\"@last\"===f.embed)&&e.is11)throw new d(\"Invalid JSON-LD syntax; invalid value of @embed.\",\"jsonld.SyntaxError\",{code:\"invalid @embed value\",frame:n});if(e.embedded||!e.uniqueEmbeds[e.graph].hasOwnProperty(m))if(!e.embedded||\"@never\"!==f.embed&&!g(x,e.graph,e.subjectStack))if(!e.embedded||\"@first\"!=f.embed&&\"@once\"!=f.embed||!e.uniqueEmbeds[e.graph].hasOwnProperty(m)){if(\"@last\"===f.embed&&m in e.uniqueEmbeds[e.graph]&&b(e,m),e.uniqueEmbeds[e.graph][m]={parent:r,property:o},e.subjectStack.push({subject:x,graph:e.graph}),m in e.graphMap){let t=!1,r=null;\"@graph\"in n?(r=n[\"@graph\"][0],t=!(\"@merged\"===m||\"@default\"===m),c.isObject(r)||(r={})):(t=\"@merged\"!==e.graph,r={}),t&&h.frame(i(i({},e),{},{graph:m,embedded:!1}),Object.keys(e.graphMap[m]).sort(),[r],O,\"@graph\")}\"@included\"in n&&h.frame(i(i({},e),{},{embedded:!1}),t,n[\"@included\"],O,\"@included\");for(const t of Object.keys(x).sort())if(a(t)){if(O[t]=u.clone(x[t]),\"@type\"===t)for(const t of x[\"@type\"])0===t.indexOf(\"_:\")&&u.addValue(e.bnodeMap,t,O,{propertyIsArray:!0})}else if(!f.explicit||t in n)for(const r of x[t]){const o=t in n?n[t]:v(f);if(s.isList(r)){const o=n[t]&&n[t][0]&&n[t][0][\"@list\"]?n[t][0][\"@list\"]:v(f),a={\"@list\":[]};w(O,t,a);const c=r[\"@list\"];for(const t of c)s.isSubjectReference(t)?h.frame(i(i({},e),{},{embedded:!0}),[t[\"@id\"]],o,a,\"@list\"):w(a,\"@list\",u.clone(t))}else s.isSubjectReference(r)?h.frame(i(i({},e),{},{embedded:!0}),[r[\"@id\"]],o,O,t):I(o[0],r)&&w(O,t,u.clone(r))}for(const e of Object.keys(n).sort()){if(\"@type\"===e){if(!c.isObject(n[e][0])||!(\"@default\"in n[e][0]))continue}else if(a(e))continue;const t=n[e][0]||{};if(!y(t,l,\"omitDefault\")&&!(e in O)){let n=\"@null\";\"@default\"in t&&(n=u.clone(t[\"@default\"])),c.isArray(n)||(n=[n]),O[e]=[{\"@preserve\":n}]}}for(const t of Object.keys(n[\"@reverse\"]||{}).sort()){const r=n[\"@reverse\"][t];for(const n of Object.keys(e.subjects)){u.getValues(e.subjects[n],t).some(e=>e[\"@id\"]===m)&&(O[\"@reverse\"]=O[\"@reverse\"]||{},u.addValue(O[\"@reverse\"],t,[],{propertyIsArray:!0}),h.frame(i(i({},e),{},{embedded:!0}),[n],r,O[\"@reverse\"][t],o))}}w(r,o,O),e.subjectStack.pop()}else w(r,o,O);else w(r,o,O)}},h.cleanupNull=(e,t)=>{if(c.isArray(e)){return e.map(e=>h.cleanupNull(e,t)).filter(e=>e)}if(\"@null\"===e)return null;if(c.isObject(e)){if(\"@id\"in e){const n=e[\"@id\"];if(t.link.hasOwnProperty(n)){const r=t.link[n].indexOf(e);if(-1!==r)return t.link[n][r];t.link[n].push(e)}else t.link[n]=[e]}for(const n in e)e[n]=h.cleanupNull(e[n],t)}return e}},function(e,t,n){\"use strict\";n(12),n(49),n(50),n(14),n(6),n(8),n(64),n(51),n(25),n(81),n(82);const r=n(19),{isArray:o,isObject:i,isString:a,isUndefined:s}=n(16),{isList:c,isValue:u,isGraph:l,isSimpleGraph:d,isSubjectReference:f}=n(32),{expandIri:p,getContextValue:h,isKeyword:v,process:g,processingMode:y}=n(41),{removeBase:m,prependBase:x}=n(37),{REGEX_KEYWORD:b,addValue:w,asArray:j,compareShortestLeast:I}=n(18),O={};function S(e,t,n){if(\"@nest\"!==p(e,t,{vocab:!0},n))throw new r(\"JSON-LD compact error; nested property must have an @nest value resolving to @nest.\",\"jsonld.SyntaxError\",{code:\"invalid @nest value\"})}e.exports=O,O.compact=async({activeCtx:e,activeProperty:t=null,element:n,options:p={}})=>{if(o(n)){let r=[];for(let o=0;o<n.length;++o){const i=await O.compact({activeCtx:e,activeProperty:t,element:n[o],options:p});null!==i&&r.push(i)}if(p.compactArrays&&1===r.length){0===(h(e,t,\"@container\")||[]).length&&(r=r[0])}return r}const m=h(e,t,\"@context\");if(s(m)||(e=await g({activeCtx:e,localCtx:m,propagate:!0,overrideProtected:!0,options:p})),i(n)){if(p.link&&\"@id\"in n&&p.link.hasOwnProperty(n[\"@id\"])){const e=p.link[n[\"@id\"]];for(let t=0;t<e.length;++t)if(e[t].expanded===n)return e[t].compacted}if(u(n)||f(n)){const r=O.compactValue({activeCtx:e,activeProperty:t,value:n,options:p});return p.link&&f(n)&&(p.link.hasOwnProperty(n[\"@id\"])||(p.link[n[\"@id\"]]=[]),p.link[n[\"@id\"]].push({expanded:n,compacted:r})),r}if(c(n)){if((h(e,t,\"@container\")||[]).includes(\"@list\"))return O.compact({activeCtx:e,activeProperty:t,element:n[\"@list\"],options:p})}const m=\"@reverse\"===t,x={},b=e;u(n)||f(n)||(e=e.revertToPreviousContext());const I=h(b,t,\"@context\");s(I)||(e=await g({activeCtx:e,localCtx:I,propagate:!0,overrideProtected:!0,options:p})),p.link&&\"@id\"in n&&(p.link.hasOwnProperty(n[\"@id\"])||(p.link[n[\"@id\"]]=[]),p.link[n[\"@id\"]].push({expanded:n,compacted:x}));let E=n[\"@type\"]||[];E.length>1&&(E=Array.from(E).sort());const N=e;for(const t of E){const n=O.compactIri({activeCtx:N,iri:t,relativeTo:{vocab:!0}}),r=h(b,n,\"@context\");s(r)||(e=await g({activeCtx:e,localCtx:r,options:p,propagate:!1}))}const A=Object.keys(n).sort();for(const s of A){const f=n[s];if(\"@id\"!==s)if(\"@type\"!==s)if(\"@reverse\"!==s)if(\"@preserve\"!==s)if(\"@index\"!==s)if(\"@graph\"!==s&&\"@list\"!==s&&\"@included\"!==s&&v(s)){const t=O.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,t,f)}else{if(!o(f))throw new r(\"JSON-LD expansion error; expanded value must be an array.\",\"jsonld.SyntaxError\");if(0===f.length){const t=O.compactIri({activeCtx:e,iri:s,value:f,relativeTo:{vocab:!0},reverse:m}),n=e.mappings.has(t)?e.mappings.get(t)[\"@nest\"]:null;let r=x;n&&(S(e,n,p),i(x[n])||(x[n]={}),r=x[n]),w(r,t,f,{propertyIsArray:!0})}for(const t of f){const n=O.compactIri({activeCtx:e,iri:s,value:t,relativeTo:{vocab:!0},reverse:m}),r=e.mappings.has(n)?e.mappings.get(n)[\"@nest\"]:null;let f=x;r&&(S(e,r,p),i(x[r])||(x[r]={}),f=x[r]);const v=h(e,n,\"@container\")||[],g=l(t),y=c(t);let b;y?b=t[\"@list\"]:g&&(b=t[\"@graph\"]);let I=await O.compact({activeCtx:e,activeProperty:n,element:y||g?b:t,options:p});if(y){if(o(I)||(I=[I]),v.includes(\"@list\")){w(f,n,I,{valueIsArray:!0,allowDuplicate:!0});continue}I={[O.compactIri({activeCtx:e,iri:\"@list\",relativeTo:{vocab:!0}})]:I},\"@index\"in t&&(I[O.compactIri({activeCtx:e,iri:\"@index\",relativeTo:{vocab:!0}})]=t[\"@index\"])}if(g)if(v.includes(\"@graph\")&&(v.includes(\"@id\")||v.includes(\"@index\")&&d(t))){let r;f.hasOwnProperty(n)?r=f[n]:f[n]=r={};const o=(v.includes(\"@id\")?t[\"@id\"]:t[\"@index\"])||O.compactIri({activeCtx:e,iri:\"@none\",relativeTo:{vocab:!0}});w(r,o,I,{propertyIsArray:!p.compactArrays||v.includes(\"@set\")})}else v.includes(\"@graph\")&&d(t)?(o(I)&&I.length>1&&(I={\"@included\":I}),w(f,n,I,{propertyIsArray:!p.compactArrays||v.includes(\"@set\")})):(o(I)&&1===I.length&&p.compactArrays&&(I=I[0]),I={[O.compactIri({activeCtx:e,iri:\"@graph\",relativeTo:{vocab:!0}})]:I},\"@id\"in t&&(I[O.compactIri({activeCtx:e,iri:\"@id\",relativeTo:{vocab:!0}})]=t[\"@id\"]),\"@index\"in t&&(I[O.compactIri({activeCtx:e,iri:\"@index\",relativeTo:{vocab:!0}})]=t[\"@index\"]),w(f,n,I,{propertyIsArray:!p.compactArrays||v.includes(\"@set\")}));else if(v.includes(\"@language\")||v.includes(\"@index\")||v.includes(\"@id\")||v.includes(\"@type\")){let r,o;if(f.hasOwnProperty(n)?r=f[n]:f[n]=r={},v.includes(\"@language\"))u(I)&&(I=I[\"@value\"]),o=t[\"@language\"];else if(v.includes(\"@index\")){const r=h(e,n,\"@index\")||\"@index\",i=O.compactIri({activeCtx:e,iri:r,relativeTo:{vocab:!0}});if(\"@index\"===r)o=t[\"@index\"],delete I[i];else{let e;if([o,...e]=j(I[r]||[]),a(o))switch(e.length){case 0:delete I[r];break;case 1:I[r]=e[0];break;default:I[r]=e}else o=null}}else if(v.includes(\"@id\")){const t=O.compactIri({activeCtx:e,iri:\"@id\",relativeTo:{vocab:!0}});o=I[t],delete I[t]}else if(v.includes(\"@type\")){const r=O.compactIri({activeCtx:e,iri:\"@type\",relativeTo:{vocab:!0}});let i;switch([o,...i]=j(I[r]||[]),i.length){case 0:delete I[r];break;case 1:I[r]=i[0];break;default:I[r]=i}1===Object.keys(I).length&&\"@id\"in t&&(I=await O.compact({activeCtx:e,activeProperty:n,element:{\"@id\":t[\"@id\"]},options:p}))}o||(o=O.compactIri({activeCtx:e,iri:\"@none\",relativeTo:{vocab:!0}})),w(r,o,I,{propertyIsArray:v.includes(\"@set\")})}else{const e=!p.compactArrays||v.includes(\"@set\")||v.includes(\"@list\")||o(I)&&0===I.length||\"@list\"===s||\"@graph\"===s;w(f,n,I,{propertyIsArray:e})}}}else{if((h(e,t,\"@container\")||[]).includes(\"@index\"))continue;const n=O.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,n,f)}else{const n=await O.compact({activeCtx:e,activeProperty:t,element:f,options:p});o(n)&&0===n.length||w(x,s,n)}else{const t=await O.compact({activeCtx:e,activeProperty:\"@reverse\",element:f,options:p});for(const n in t)if(e.mappings.has(n)&&e.mappings.get(n).reverse){const r=t[n],o=(h(e,n,\"@container\")||[]).includes(\"@set\")||!p.compactArrays;w(x,n,r,{propertyIsArray:o}),delete t[n]}if(Object.keys(t).length>0){const n=O.compactIri({activeCtx:e,iri:s,relativeTo:{vocab:!0}});w(x,n,t)}}else{let t=j(f).map(e=>O.compactIri({activeCtx:b,iri:e,relativeTo:{vocab:!0}}));1===t.length&&(t=t[0]);const n=O.compactIri({activeCtx:e,iri:\"@type\",relativeTo:{vocab:!0}}),r=(h(e,n,\"@container\")||[]).includes(\"@set\")&&y(e,1.1)||o(t)&&0===f.length;w(x,n,t,{propertyIsArray:r})}else{let t=j(f).map(t=>O.compactIri({activeCtx:e,iri:t,relativeTo:{vocab:!1},base:p.base}));1===t.length&&(t=t[0]);x[O.compactIri({activeCtx:e,iri:\"@id\",relativeTo:{vocab:!0}})]=t}}return x}return n},O.compactIri=({activeCtx:e,iri:t,value:n=null,relativeTo:o={vocab:!1},reverse:a=!1,base:s=null})=>{if(null===t)return t;e.isPropertyTermScoped&&e.previousContext&&(e=e.previousContext);const d=e.getInverse();if(v(t)&&t in d&&\"@none\"in d[t]&&\"@type\"in d[t][\"@none\"]&&\"@none\"in d[t][\"@none\"][\"@type\"])return d[t][\"@none\"][\"@type\"][\"@none\"];if(o.vocab&&t in d){const r=e[\"@language\"]||\"@none\",o=[];i(n)&&\"@index\"in n&&!(\"@graph\"in n)&&o.push(\"@index\",\"@index@set\"),i(n)&&\"@preserve\"in n&&(n=n[\"@preserve\"][0]),l(n)?(\"@index\"in n&&o.push(\"@graph@index\",\"@graph@index@set\",\"@index\",\"@index@set\"),\"@id\"in n&&o.push(\"@graph@id\",\"@graph@id@set\"),o.push(\"@graph\",\"@graph@set\",\"@set\"),\"@index\"in n||o.push(\"@graph@index\",\"@graph@index@set\",\"@index\",\"@index@set\"),\"@id\"in n||o.push(\"@graph@id\",\"@graph@id@set\")):i(n)&&!u(n)&&o.push(\"@id\",\"@id@set\",\"@type\",\"@set@type\");let s=\"@language\",d=\"@null\";if(a)s=\"@type\",d=\"@reverse\",o.push(\"@set\");else if(c(n)){\"@index\"in n||o.push(\"@list\");const e=n[\"@list\"];if(0===e.length)s=\"@any\",d=\"@none\";else{let t=0===e.length?r:null,n=null;for(let r=0;r<e.length;++r){const o=e[r];let i=\"@none\",a=\"@none\";if(u(o))if(\"@direction\"in o){i=`${(o[\"@language\"]||\"\").toLowerCase()}_${o[\"@direction\"]}`}else\"@language\"in o?i=o[\"@language\"].toLowerCase():\"@type\"in o?a=o[\"@type\"]:i=\"@null\";else a=\"@id\";if(null===t?t=i:i!==t&&u(o)&&(t=\"@none\"),null===n?n=a:a!==n&&(n=\"@none\"),\"@none\"===t&&\"@none\"===n)break}t=t||\"@none\",n=n||\"@none\",\"@none\"!==n?(s=\"@type\",d=n):d=t}}else{if(u(n))if(\"@language\"in n&&!(\"@index\"in n)){o.push(\"@language\",\"@language@set\"),d=n[\"@language\"];const e=n[\"@direction\"];e&&(d=`${d}_${e}`)}else\"@direction\"in n&&!(\"@index\"in n)?d=\"_\"+n[\"@direction\"]:\"@type\"in n&&(s=\"@type\",d=n[\"@type\"]);else s=\"@type\",d=\"@id\";o.push(\"@set\")}o.push(\"@none\"),i(n)&&!(\"@index\"in n)&&o.push(\"@index\",\"@index@set\"),u(n)&&1===Object.keys(n).length&&o.push(\"@language\",\"@language@set\");const f=function(e,t,n,r,o,a){null===a&&(a=\"@null\");const s=[];if((\"@id\"===a||\"@reverse\"===a)&&i(n)&&\"@id\"in n){\"@reverse\"===a&&s.push(\"@reverse\");const t=O.compactIri({activeCtx:e,iri:n[\"@id\"],relativeTo:{vocab:!0}});e.mappings.has(t)&&e.mappings.get(t)&&e.mappings.get(t)[\"@id\"]===n[\"@id\"]?s.push.apply(s,[\"@vocab\",\"@id\"]):s.push.apply(s,[\"@id\",\"@vocab\"])}else{s.push(a);const e=s.find(e=>e.includes(\"_\"));e&&s.push(e.replace(/^[^_]+_/,\"_\"))}s.push(\"@none\");const c=e.inverse[t];for(const e of r){if(!(e in c))continue;const t=c[e][o];for(const e of s)if(e in t)return t[e]}return null}(e,t,n,o,s,d);if(null!==f)return f}if(o.vocab&&\"@vocab\"in e){const n=e[\"@vocab\"];if(0===t.indexOf(n)&&t!==n){const r=t.substr(n.length);if(!e.mappings.has(r))return r}}let f=null;const p=[];let h=e.fastCurieMap;const g=t.length-1;for(let e=0;e<g&&t[e]in h;++e)h=h[t[e]],\"\"in h&&p.push(h[\"\"][0]);for(let r=p.length-1;r>=0;--r){const o=p[r],i=o.terms;for(const r of i){const i=r+\":\"+t.substr(o.iri.length);e.mappings.get(r)._prefix&&(!e.mappings.has(i)||null===n&&e.mappings.get(i)[\"@id\"]===t)&&(null===f||I(i,f)<0)&&(f=i)}}if(null!==f)return f;for(const[n,o]of e.mappings)if(o&&o._prefix&&t.startsWith(n+\":\"))throw new r(`Absolute IRI \"${t}\" confused with prefix \"${n}\".`,\"jsonld.SyntaxError\",{code:\"IRI confused with prefix\",context:e});if(!o.vocab){if(\"@base\"in e){if(e[\"@base\"]){const n=m(x(s,e[\"@base\"]),t);return b.test(n)?\"./\"+n:n}return t}return m(s,t)}return t},O.compactValue=({activeCtx:e,activeProperty:t,value:n,options:r})=>{if(u(n)){const r=h(e,t,\"@type\"),o=h(e,t,\"@language\"),i=h(e,t,\"@direction\"),s=h(e,t,\"@container\")||[],c=\"@index\"in n&&!s.includes(\"@index\");if(!c&&\"@none\"!==r){if(n[\"@type\"]===r)return n[\"@value\"];if(\"@language\"in n&&n[\"@language\"]===o&&\"@direction\"in n&&n[\"@direction\"]===i)return n[\"@value\"];if(\"@language\"in n&&n[\"@language\"]===o)return n[\"@value\"];if(\"@direction\"in n&&n[\"@direction\"]===i)return n[\"@value\"]}const u=Object.keys(n).length,l=1===u||2===u&&\"@index\"in n&&!c,d=\"@language\"in e,f=a(n[\"@value\"]),p=e.mappings.has(t)&&null===e.mappings.get(t)[\"@language\"];if(l&&\"@none\"!==r&&(!d||!f||p))return n[\"@value\"];const v={};return c&&(v[O.compactIri({activeCtx:e,iri:\"@index\",relativeTo:{vocab:!0}})]=n[\"@index\"]),\"@type\"in n?v[O.compactIri({activeCtx:e,iri:\"@type\",relativeTo:{vocab:!0}})]=O.compactIri({activeCtx:e,iri:n[\"@type\"],relativeTo:{vocab:!0}}):\"@language\"in n&&(v[O.compactIri({activeCtx:e,iri:\"@language\",relativeTo:{vocab:!0}})]=n[\"@language\"]),\"@direction\"in n&&(v[O.compactIri({activeCtx:e,iri:\"@direction\",relativeTo:{vocab:!0}})]=n[\"@direction\"]),v[O.compactIri({activeCtx:e,iri:\"@value\",relativeTo:{vocab:!0}})]=n[\"@value\"],v}const o=p(e,t,{vocab:!0},r),i=h(e,t,\"@type\"),s=O.compactIri({activeCtx:e,iri:n[\"@id\"],relativeTo:{vocab:\"@vocab\"===i},base:r.base});return\"@id\"===i||\"@vocab\"===i||\"@graph\"===o?s:{[O.compactIri({activeCtx:e,iri:\"@id\",relativeTo:{vocab:!0}})]:s}}},function(e,t,n){\"use strict\";n(12),e.exports=e=>{class t{toString(){return\"[object JsonLdProcessor]\"}}return Object.defineProperty(t,\"prototype\",{writable:!1,enumerable:!1}),Object.defineProperty(t.prototype,\"constructor\",{writable:!0,enumerable:!1,configurable:!0,value:t}),t.compact=function(t,n){return arguments.length<2?Promise.reject(new TypeError(\"Could not compact, too few arguments.\")):e.compact(t,n)},t.expand=function(t){return arguments.length<1?Promise.reject(new TypeError(\"Could not expand, too few arguments.\")):e.expand(t)},t.flatten=function(t){return arguments.length<1?Promise.reject(new TypeError(\"Could not flatten, too few arguments.\")):e.flatten(t)},t}}]);\n//# sourceMappingURL=jsonld.esm.min.js.map",
			"type": "string"
		},
		{
			"key": "pieceId",
			"value": "",
			"type": "string"
		},
		{
			"key": "companyId",
			"value": "",
			"type": "string"
		},
		{
			"key": "shipmentId",
			"value": "",
			"type": "string"
		},
		{
			"key": "internalNodeId",
			"value": "_:test",
			"type": "string"
		},
		{
			"key": "historicalDate",
			"value": "20230807T143832Z",
			"type": "string"
		},
		{
			"key": "LEId",
			"value": "",
			"type": "string"
		},
		{
			"key": "ARId",
			"value": "",
			"type": "string"
		},
		{
			"key": "pieceRevision",
			"value": ""
		},
		{
			"key": "pieceCreationTime",
			"value": ""
		},
		{
			"key": "shipmentRevision",
			"value": ""
		},
		{
			"key": "historicalCreation",
			"value": ""
		},
		{
			"key": "historicalChange",
			"value": ""
		},
		{
			"key": "companyRevision",
			"value": ""
		},
		{
			"key": "companyCreationTime",
			"value": ""
		},
		{
			"key": "shipmentCreationTime",
			"value": ""
		},
		{
			"key": "patchRequest1",
			"value": ""
		},
		{
			"key": "patchPieceId",
			"value": ""
		},
		{
			"key": "patchPieceRevision",
			"value": ""
		},
		{
			"key": "pieceSubscriptionId",
			"value": ""
		},
		{
			"key": "actionRequest",
			"value": ""
		},
		{
			"key": "extCompany",
			"value": ""
		},
		{
			"key": "changeRequest",
			"value": ""
		},
		{
			"key": "addWeightCR",
			"value": ""
		},
		{
			"key": "changeWeightCR",
			"value": ""
		},
		{
			"key": "deleteWeightCR",
			"value": ""
		},
		{
			"key": "patchShipmentId",
			"value": ""
		},
		{
			"key": "patchShipmentRevision",
			"value": ""
		},
		{
			"key": "patchRequestShipment",
			"value": ""
		}
	]
}
